body {
    margin: 0;
    color: var(--navy);
    background:
        radial-gradient(900px 600px at 10% 10%, rgba(240, 90, 36, 0.28), transparent 60%),
        radial-gradient(900px 600px at 90% 15%, rgba(29, 141, 214, 0.26), transparent 60%),
        linear-gradient(160deg, var(--soft), var(--ice));
    padding: 24px;
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
}

.back-link {
    position: absolute;
    top: 18px;
    left: 18px;
    width: 42px;
    height: 42px;
    border-radius: 999px;
    background: white;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 12px 26px rgba(16, 40, 68, 0.18);
    border: 1px solid rgba(29, 141, 214, 0.2);
    text-decoration: none;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.back-link:hover {
    transform: translateY(-1px);
    box-shadow: 0 18px 32px rgba(16, 40, 68, 0.24);
}

.back-link img {
    width: 20px;
    height: 20px;
    object-fit: contain;
}

.devis {
    max-width: 720px;
    background: white;
    padding: 28px;
    border-radius: 20px;
    box-shadow: 0 24px 60px rgba(16, 40, 68, 0.18);
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.eyebrow {
    margin: 0 0 8px;
    text-transform: uppercase;
    letter-spacing: 2px;
    font-size: 12px;
    color: var(--slate);
}

h1 {
    margin: 0 0 8px;
    font-family: "Georgia", "Times New Roman", Times, serif;
    font-size: 30px;
}

.lead {
    margin: 0;
    color: var(--slate);
    line-height: 1.6;
}

.devis-form {
    display: grid;
    gap: 14px;
}

.form-error {
    margin: 0;
    color: #b42318;
    font-weight: 700;
    min-height: 18px;
}

.devis-form input,
.devis-form textarea,
.devis-form select {
    width: 100%;
    border-radius: 12px;
    border: 1px solid rgba(16, 40, 68, 0.2);
    padding: 12px 14px;
    font-size: 15px;
    font-family: inherit;
    background: #f8fbff;
}

.devis-form textarea {
    min-height: 140px;
    resize: vertical;
}

.company-field.is-hidden {
    display: none;
}

.devis-form .is-invalid {
    border-color: #b42318;
    box-shadow: 0 0 0 3px rgba(180, 35, 24, 0.15);
    animation: fieldShake 0.3s ease;
}

.devis-form button {
    justify-self: start;
    padding: 10px 18px;
    border-radius: 999px;
    border: none;
    background: linear-gradient(135deg, var(--sky), var(--sun));
    color: white;
    font-weight: 700;
    cursor: pointer;
    box-shadow: 0 16px 30px rgba(16, 40, 68, 0.25);
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.devis-form button:hover {
    transform: translateY(-1px);
    box-shadow: 0 20px 36px rgba(16, 40, 68, 0.3);
}

@media (max-width: 600px) {
    body {
        padding: 16px;
    }

    .devis {
        padding: 22px;
    }

    h1 {
        font-size: 26px;
    }
}

.modal {
    position: fixed;
    inset: 0;
    display: grid;
    place-items: center;
    background: rgba(16, 40, 68, 0.4);
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.2s ease;
    padding: 18px;
}

.modal.is-visible {
    opacity: 1;
    pointer-events: auto;
}

.modal-card {
    background: white;
    border-radius: 20px;
    padding: 26px;
    max-width: 420px;
    width: 100%;
    text-align: center;
    box-shadow: 0 26px 80px rgba(16, 40, 68, 0.25);
    animation: modalPop 0.25s ease;
}

.modal-icon {
    margin: 0 0 8px;
    font-size: 28px;
    color: var(--sun);
}

.modal-card h2 {
    margin: 0 0 8px;
    font-size: 22px;
}

.modal-text {
    margin: 0 0 16px;
    color: var(--slate);
}

.modal-actions {
    display: flex;
    gap: 10px;
    justify-content: center;
}

.modal-button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 10px 18px;
    border-radius: 999px;
    background: linear-gradient(135deg, var(--sky), var(--sun));
    color: white;
    text-decoration: none;
    font-weight: 700;
    box-shadow: 0 16px 30px rgba(16, 40, 68, 0.25);
    border: none;
    cursor: pointer;
}

.modal-button.secondary {
    background: #eaf1f9;
    color: var(--deep);
    box-shadow: none;
}

@keyframes modalPop {
    from {
        transform: translateY(8px) scale(0.98);
    }
    to {
        transform: translateY(0) scale(1);
    }
}

@keyframes fieldShake {
    0%, 100% {
        transform: translateX(0);
    }
    25% {
        transform: translateX(-3px);
    }
    75% {
        transform: translateX(3px);
    }
}
