/* ==============================
   PAGE RENDEZ-VOUS
   ============================== */

/* --- Hero --- */
.appt-hero {
    background-color: #0d5091;
    padding: 48px 0;
    text-align: center;
}

.appt-hero__title {
    font-family: "Poppins", sans-serif;
    font-size: 36px;
    font-weight: 700;
    color: #ffffff;
    margin-bottom: 12px;
}

.appt-hero__sub {
    font-family: "Inter", sans-serif;
    font-size: 16px;
    color: rgba(255, 255, 255, 0.8);
    max-width: 560px;
    margin: 0 auto;
    line-height: 1.7;
}

/* --- Section --- */
.appt-section {
    padding: 64px 0;
}

/* --- Alertes --- */
.appt-alert {
    padding: 14px 16px;
    border-radius: 8px;
    margin-bottom: 24px;
    font-family: "Inter", sans-serif;
    font-size: 14px;
}

.appt-alert--success {
    background-color: #e8f5e9;
    color: #2e7d32;
    border: 1px solid #a5d6a7;
}

.appt-alert--error {
    background-color: #ffebee;
    color: #c62828;
    border: 1px solid #ef9a9a;
}

.appt-alert--error ul {
    margin: 0;
    padding-left: 16px;
}

/* ==============================
   STEPPER
   ============================== */

.stepper {
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 40px;
    gap: 0;
}

.stepper__step {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
}

.stepper__circle {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: #e0e0e0;
    color: #888;
    font-family: "Poppins", sans-serif;
    font-size: 15px;
    font-weight: 600;
    display: flex;
    align-items: center;
    justify-content: center;
    transition:
        background-color 0.3s,
        color 0.3s;
}

.stepper__label {
    font-family: "Inter", sans-serif;
    font-size: 12px;
    font-weight: 500;
    color: #aaa;
    white-space: nowrap;
    transition: color 0.3s;
}

.stepper__line {
    flex: 1;
    height: 2px;
    background: #e0e0e0;
    margin: 0 12px;
    margin-bottom: 24px;
    max-width: 120px;
    transition: background-color 0.3s;
}

/* Étape active */
.stepper__step.active .stepper__circle {
    background: #0d5091;
    color: #ffffff;
}

.stepper__step.active .stepper__label {
    color: #0d5091;
    font-weight: 600;
}

/* Étape complétée */
.stepper__step.completed .stepper__circle {
    background: #2e7d32;
    color: #ffffff;
}

.stepper__step.completed .stepper__label {
    color: #2e7d32;
}

.stepper__line.completed {
    background: #2e7d32;
}

/* ==============================
   FORMULAIRE
   ============================== */

.appt-form-wrapper {
    background: #ffffff;
    border: 1px solid #e0e0e0;
    border-radius: 12px;
    padding: 40px;
    max-width: 680px;
    margin: 0 auto;
}

.appt-step__title {
    font-family: "Poppins", sans-serif;
    font-size: 22px;
    font-weight: 600;
    color: #1a1a2e;
    margin-bottom: 6px;
}

.appt-step__sub {
    font-family: "Inter", sans-serif;
    font-size: 14px;
    color: #888;
    margin-bottom: 28px;
    line-height: 1.6;
}

.appt-form__row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 16px;
}

.appt-form__group {
    margin-bottom: 20px;
}

.appt-form__label {
    display: block;
    font-family: "Inter", sans-serif;
    font-size: 14px;
    font-weight: 500;
    color: #1a1a2e;
    margin-bottom: 6px;
}

.appt-form__optional {
    font-weight: 400;
    color: #888;
}

.appt-form__input,
.appt-form__textarea {
    width: 100%;
    padding: 10px 14px;
    border: 1px solid #d0d0d0;
    border-radius: 6px;
    font-family: "Inter", sans-serif;
    font-size: 14px;
    color: #1a1a2e;
    background: #fafafa;
    transition:
        border-color 0.2s,
        box-shadow 0.2s;
    outline: none;
}

.appt-form__input:focus,
.appt-form__textarea:focus {
    border-color: #0d5091;
    box-shadow: 0 0 0 3px rgba(13, 80, 145, 0.1);
    background: #ffffff;
}

.appt-form__input--date {
    cursor: pointer;
}

.appt-form__textarea {
    resize: none;
    min-height: 100px;
}

/* --- Navigation étapes --- */
.appt-step__nav {
    display: flex;
    justify-content: flex-end;
    margin-top: 8px;
}

.appt-step__nav--between {
    justify-content: space-between;
}

/* --- Créneaux horaires --- */
.appt-slots {
    display: none;
    margin-bottom: 20px;
    padding: 20px;
    background: #f8f9fa;
    border-radius: 8px;
    border: 1px solid #e0e0e0;
}

.appt-slots__period {
    font-family: "Inter", sans-serif;
    font-size: 12px;
    font-weight: 600;
    color: #0d5091;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    margin-bottom: 10px;
    margin-top: 16px;
}

.appt-slots__period:first-of-type {
    margin-top: 0;
}

.slots-grid {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-bottom: 8px;
}

.slot-btn {
    padding: 8px 16px;
    border: 1.5px solid #d0d0d0;
    background: #ffffff;
    border-radius: 6px;
    cursor: pointer;
    font-family: "Inter", sans-serif;
    font-size: 13px;
    font-weight: 500;
    color: #444;
    transition: all 0.2s;
}

.slot-btn:hover {
    border-color: #0d5091;
    color: #0d5091;
    background: #e8f0fb;
}

.slot-btn.selected {
    background: #0d5091;
    color: #ffffff;
    border-color: #0d5091;
}

.slot-btn.disabled {
    background: #f0f0f0;
    color: #bbb;
    border-color: #e0e0e0;
    cursor: not-allowed;
}

/* --- Récapitulatif étape 3 --- */
.appt-recap {
    background: #f8f9fa;
    border: 1px solid #e0e0e0;
    border-radius: 8px;
    padding: 16px 20px;
    margin-bottom: 24px;
}

.appt-recap__title {
    font-family: "Poppins", sans-serif;
    font-size: 13px;
    font-weight: 600;
    color: #0d5091;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    margin-bottom: 12px;
}

.appt-recap__grid {
    display: grid;
    grid-template-columns: 120px minmax(0, 1fr);
    gap: 8px 16px;
}

.appt-recap__label {
    font-family: "Inter", sans-serif;
    font-size: 13px;
    font-weight: 600;
    color: #888;
}

.appt-recap__value {
    font-family: "Inter", sans-serif;
    font-size: 13px;
    color: #1a1a2e;
    /* Une adresse email ne comporte aucun espace : sans cette règle,
       elle déborde du cadre au lieu de passer à la ligne */
    overflow-wrap: anywhere;
}

/* --- RGPD --- */
.appt-form__gdpr {
    margin-bottom: 24px;
}

.appt-form__checkbox-label {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    font-family: "Inter", sans-serif;
    font-size: 13px;
    color: #555;
    cursor: pointer;
    line-height: 1.6;
}

.appt-form__checkbox {
    accent-color: #0d5091;
    width: 16px;
    height: 16px;
    flex-shrink: 0;
    margin-top: 2px;
    cursor: pointer;
}

/* --- Captcha --- */
.appt-captcha {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 8px;
}

.appt-captcha__img {
    border-radius: 6px;
    border: 1px solid #d0d0d0;
    display: block;
}

.appt-captcha__refresh {
    background: none;
    border: none;
    color: #0d5091;
    display: flex;
    align-items: center;
    cursor: pointer;
    padding: 4px;
    border-radius: 4px;
    transition:
        color 0.2s,
        transform 0.3s;
}

.appt-captcha__refresh:hover {
    color: #0a3f72;
    transform: rotate(180deg);
}

.appt-captcha__hint {
    font-family: "Inter", sans-serif;
    font-size: 12px;
    color: #888;
    margin-top: 4px;
}

.appt-captcha__error {
    font-family: "Inter", sans-serif;
    font-size: 13px;
    color: #c62828;
    margin-top: 4px;
}

/* ==============================
   RESPONSIVE
   ============================== */

@media (max-width: 768px) {
    .appt-form-wrapper {
        padding: 24px;
    }

    .appt-form__row {
        grid-template-columns: 1fr;
    }

    .appt-hero__title {
        font-size: 28px;
    }

    .stepper__label {
        font-size: 10px;
    }

    .stepper__line {
        max-width: 40px;
    }
}

@media (max-width: 520px) {
    .appt-form-wrapper {
        padding: 20px 16px;
    }

    /* Les paires libellé / valeur s'empilent : une colonne de 120px
       ne laisse plus assez de place aux emails et aux dates complètes */
    .appt-recap__grid {
        grid-template-columns: 1fr;
        row-gap: 0;
    }

    .appt-recap__label {
        font-size: 12px;
    }

    .appt-recap__value {
        margin-bottom: 12px;
    }

    .appt-recap__value:last-child {
        margin-bottom: 0;
    }

    /* Les deux boutons ne tiennent plus côte à côte sans se couper :
       ils s'empilent, l'action principale en premier */
    .appt-step__nav--between {
        flex-direction: column-reverse;
        gap: 10px;
    }

    .appt-step__nav .btn {
        width: 100%;
        text-align: center;
    }
}
