/* ============================================================
   IAtena — Page de prise de rendez-vous
   ============================================================ */

/* --- HERO --- */
.rdv-hero {
    padding: 160px 0 90px;
    display: flex;
    align-items: center;
    position: relative;
    overflow: hidden;
    background-color: var(--color-bg-dark);
    background-image:
        linear-gradient(to right, rgba(0, 229, 255, 0.05) 1px, transparent 1px),
        linear-gradient(to bottom, rgba(0, 229, 255, 0.05) 1px, transparent 1px);
    background-size: 30px 30px;
    border-bottom: 1px solid var(--color-border-dark);
}

.rdv-hero-content {
    max-width: 780px;
    margin: 0 auto;
    text-align: center;
}

.hero-badge-blueprint {
    display: inline-block;
    background-color: rgba(0, 229, 255, 0.08);
    color: var(--color-blueprint-line);
    padding: 6px 18px;
    border-radius: 50px;
    font-size: 0.8rem;
    font-weight: 700;
    letter-spacing: 2px;
    margin-bottom: 24px;
    border: 1px solid rgba(0, 229, 255, 0.25);
    text-transform: uppercase;
}

.title-blueprint {
    font-family: var(--font-title);
    font-size: clamp(2.2rem, 5.5vw, 3.75rem);
    font-weight: 800;
    color: #ffffff;
    line-height: 1.15;
    margin-bottom: 10px;
    letter-spacing: -1px;
}

/* Seconde ligne du titre.
   Elle vivait dans un <span> à l'intérieur du H1, qui atteignait alors quinze
   mots : sémantiquement un seul titre, dont les moteurs ne retenaient que la
   fin. Elle est désormais un paragraphe à part, au rendu identique. */
.tagline-blueprint {
    color: var(--color-blueprint-line);
    display: block;
    font-size: clamp(1.4rem, 3.5vw, 2.1rem);
    font-weight: 500;
    font-family: var(--font-title);
    line-height: 1.2;
    margin: 0 0 24px;
    letter-spacing: 0;
}

.subtitle-blueprint {
    font-size: 1.15rem;
    color: var(--color-text-secondary-dark);
    max-width: 640px;
    margin: 0 auto;
    line-height: 1.7;
}

/* --- CONTENEUR DU MODULE --- */
.rdv-section {
    padding: 80px 0 110px;
    background-color: var(--color-bg);
}

.rdv-box {
    max-width: 880px;
    margin: 0 auto;
    background: var(--color-bg-card);
    border: 1px solid var(--color-border);
    border-radius: var(--border-radius-lg);
    box-shadow: var(--shadow-md);
    padding: 44px;
}

/* --- FIL D'ÉTAPES --- */
.rdv-steps {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    list-style: none;
    margin: 0 0 38px;
    padding: 0 0 24px;
    border-bottom: 1px solid var(--color-border);
}

.rdv-step {
    display: flex;
    align-items: center;
    gap: 9px;
    flex: 1;
    min-width: 130px;
    font-size: 0.82rem;
    font-weight: 600;
    color: var(--color-text-secondary);
    transition: color .25s ease;
}

.rdv-step span {
    display: grid;
    place-items: center;
    width: 28px;
    height: 28px;
    flex-shrink: 0;
    border-radius: 50%;
    background: var(--color-grid);
    color: var(--color-text-secondary);
    font-size: 0.82rem;
    font-weight: 700;
    transition: background .25s ease, color .25s ease;
}

.rdv-step.is-current {
    color: var(--color-teal);
}

.rdv-step.is-current span {
    background: var(--color-teal-light);
    color: #fff;
}

.rdv-step.is-done {
    color: var(--color-teal-light);
}

.rdv-step.is-done span {
    background: var(--color-teal-light);
    color: #fff;
}

/* --- PANNEAUX --- */
.rdv-panel {
    display: none;
    animation: rdvFade .3s ease;
}

.rdv-panel.is-active {
    display: block;
}

@keyframes rdvFade {
    from { opacity: 0; transform: translateY(8px); }
    to   { opacity: 1; transform: none; }
}

.rdv-panel-title {
    font-family: var(--font-title);
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--color-text-primary);
    margin: 0 0 10px;
}

.rdv-panel-desc {
    color: var(--color-text-secondary);
    font-size: 1rem;
    line-height: 1.65;
    margin: 0 0 26px;
}

/* --- CHAMPS --- */
.rdv-field {
    margin-bottom: 18px;
}

.rdv-field label {
    display: block;
    font-size: 0.82rem;
    font-weight: 600;
    color: var(--color-text-primary);
    margin-bottom: 7px;
}

.rdv-field input,
.rdv-field textarea {
    width: 100%;
    padding: 12px 14px;
    border: 1px solid var(--color-border);
    border-radius: var(--border-radius-sm, 8px);
    background: var(--color-bg);
    font-family: inherit;
    font-size: 1rem;
    color: var(--color-text-primary);
    transition: border-color .2s ease, box-shadow .2s ease;
}

.rdv-field input:focus,
.rdv-field textarea:focus {
    outline: none;
    border-color: var(--color-teal-light);
    box-shadow: 0 0 0 3px var(--color-teal-glow);
}

.rdv-field textarea {
    resize: vertical;
    min-height: 110px;
}

.rdv-field-inline {
    display: flex;
    align-items: flex-end;
    gap: 14px;
    flex-wrap: wrap;
}

.rdv-field-inline .rdv-field {
    flex: 1;
    min-width: 180px;
    max-width: 240px;
    margin-bottom: 0;
}

.rdv-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(230px, 1fr));
    gap: 0 18px;
}

/* Piège à robots : masqué visuellement, jamais rempli par un humain */
.rdv-hp {
    position: absolute;
    left: -9999px;
    width: 1px;
    height: 1px;
    overflow: hidden;
}

/* --- CHOIX DU FORMAT --- */
.rdv-types {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(210px, 1fr));
    gap: 16px;
}

.rdv-type {
    text-align: left;
    padding: 22px;
    border: 2px solid var(--color-border);
    border-radius: var(--border-radius-md, 12px);
    background: var(--color-bg-card);
    cursor: pointer;
    font-family: inherit;
    transition: border-color .2s ease, transform .2s ease, box-shadow .2s ease;
}

.rdv-type:hover {
    border-color: var(--color-teal-light);
    transform: translateY(-3px);
    box-shadow: var(--shadow-sm);
}

.rdv-type-icon {
    display: block;
    margin-bottom: 12px;
    color: var(--color-teal-light);
}

.rdv-type-name {
    display: block;
    font-family: var(--font-title);
    font-size: 1.05rem;
    font-weight: 700;
    color: var(--color-text-primary);
    margin-bottom: 5px;
}

.rdv-type-desc {
    display: block;
    font-size: 0.86rem;
    color: var(--color-text-secondary);
    line-height: 1.5;
}

/* --- CALENDRIER --- */
.rdv-calendar {
    margin-bottom: 26px;
}

.rdv-cal-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 14px;
}

.rdv-cal-month {
    font-family: var(--font-title);
    font-size: 1.05rem;
    font-weight: 700;
    color: var(--color-text-primary);
}

.rdv-cal-month::first-letter {
    text-transform: uppercase;
}

.rdv-cal-nav {
    display: grid;
    place-items: center;
    width: 36px;
    height: 36px;
    border: 1px solid var(--color-border);
    border-radius: 50%;
    background: var(--color-bg);
    color: var(--color-text-primary);
    cursor: pointer;
    transition: all .2s ease;
}

.rdv-cal-nav .icon {
    width: 18px;
    height: 18px;
    stroke-width: 2.5;
}

.rdv-cal-nav:hover:not(:disabled) {
    border-color: var(--color-teal-light);
    background: var(--color-teal-light);
    color: #fff;
}

.rdv-cal-nav:disabled {
    opacity: .35;
    cursor: not-allowed;
}

.rdv-cal-weekdays {
    display: grid;
    grid-template-columns: repeat(7, 1fr);
    margin-bottom: 4px;
}

.rdv-cal-weekdays span {
    text-align: center;
    font-size: 0.76rem;
    font-weight: 700;
    color: var(--color-text-secondary);
    padding: 4px 0;
}

.rdv-cal-grid {
    display: grid;
    grid-template-columns: repeat(7, 1fr);
    gap: 4px;
}

.rdv-cal-day {
    position: relative;
    aspect-ratio: 1;
    display: grid;
    place-items: center;
    border: 1px solid transparent;
    border-radius: var(--border-radius-sm, 8px);
    background: transparent;
    font-family: inherit;
    font-size: 0.9rem;
    font-weight: 600;
    color: var(--color-text-secondary);
    cursor: default;
    transition: all .2s ease;
}

.rdv-cal-day.is-empty {
    visibility: hidden;
}

.rdv-cal-day.has-slots {
    color: var(--color-text-primary);
    background: var(--color-bg);
    border-color: var(--color-border);
    cursor: pointer;
}

.rdv-cal-day.has-slots::after {
    content: '';
    position: absolute;
    bottom: 6px;
    width: 5px;
    height: 5px;
    border-radius: 50%;
    background: var(--color-teal-light);
}

.rdv-cal-day.has-slots:hover {
    border-color: var(--color-teal-light);
    transform: translateY(-2px);
    box-shadow: var(--shadow-sm);
}

.rdv-cal-day.is-selected {
    background: var(--color-teal-light);
    border-color: var(--color-teal-light);
    color: #fff;
}

.rdv-cal-day.is-selected::after {
    background: #fff;
}

.rdv-cal-day.is-today {
    box-shadow: inset 0 0 0 1px var(--color-teal-light);
}

.rdv-cal-day:disabled {
    cursor: not-allowed;
    color: var(--color-text-secondary);
    opacity: .4;
}

.rdv-cal-legend {
    display: flex;
    gap: 20px;
    list-style: none;
    margin: 16px 0 0;
    padding: 0;
    font-size: 0.8rem;
    color: var(--color-text-secondary);
}

.rdv-cal-legend li {
    display: flex;
    align-items: center;
    gap: 7px;
}

.rdv-cal-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: var(--color-teal-light);
}

.rdv-cal-dot.is-full {
    background: var(--color-border);
}

/* --- CRÉNEAUX DU JOUR SÉLECTIONNÉ --- */
.rdv-times-panel {
    padding-top: 22px;
    border-top: 1px solid var(--color-border);
    animation: rdvFade .25s ease;
}

.rdv-day-label {
    font-family: var(--font-title);
    font-size: 0.95rem;
    font-weight: 700;
    color: var(--color-teal);
    margin: 0 0 14px;
}

/* En français seul le jour prend une majuscule, pas le mois. */
.rdv-day-label::first-letter {
    text-transform: uppercase;
}

.rdv-times {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}

.rdv-time {
    padding: 10px 18px;
    border: 1px solid var(--color-border);
    border-radius: 50px;
    background: var(--color-bg);
    font-family: inherit;
    font-size: 0.92rem;
    font-weight: 600;
    color: var(--color-text-primary);
    cursor: pointer;
    transition: all .2s ease;
}

.rdv-time:hover {
    border-color: var(--color-teal-light);
    background: var(--color-teal-light);
    color: #fff;
}

/* --- NAVIGATION & MESSAGES --- */
.rdv-nav {
    display: flex;
    gap: 12px;
    flex-wrap: wrap;
    margin-top: 30px;
}

/* Le retour reste discret : l'action principale doit dominer. */
.rdv-nav .btn.btn-back {
    background: transparent;
    color: var(--color-text-secondary);
    border: 1px solid var(--color-border);
    box-shadow: none;
}

.rdv-nav .btn.btn-back:hover {
    background: var(--color-bg);
    color: var(--color-text-primary);
    border-color: var(--color-teal-light);
    transform: none;
}

.rdv-error {
    margin: 18px 0 0;
    padding: 12px 16px;
    border-radius: 8px;
    background: #fdecec;
    color: #8a1c1c;
    font-size: 0.9rem;
    line-height: 1.55;
}

.rdv-note {
    display: inline-block;
    margin-top: 4px;
    padding: 4px 12px;
    border-radius: 50px;
    background: var(--color-teal-glow);
    color: var(--color-teal);
    font-size: 0.82rem;
    font-weight: 600;
}

/* --- CONFIRMATION --- */
.rdv-success {
    text-align: center;
    padding: 30px 0;
}

.rdv-success-icon {
    display: grid;
    place-items: center;
    width: 68px;
    height: 68px;
    margin: 0 auto 22px;
    border-radius: 50%;
    background: var(--color-teal-light);
    color: #fff;
}

.rdv-success-icon .icon {
    width: 34px;
    height: 34px;
    stroke-width: 2.5;
}

.rdv-success h2 {
    font-family: var(--font-title);
    font-size: 1.6rem;
    color: var(--color-text-primary);
    margin: 0 0 14px;
}

.rdv-success p {
    color: var(--color-text-secondary);
    line-height: 1.65;
    max-width: 480px;
    margin: 0 auto 14px;
}

.rdv-success strong {
    color: var(--color-text-primary);
}

/* --- ÉTAT DE CHARGEMENT --- */
.rdv-loading {
    color: var(--color-text-secondary);
    font-style: italic;
    padding: 20px 0;
}

/* --- RESPONSIVE --- */
@media (max-width: 768px) {
    .rdv-hero {
        padding: 130px 0 70px;
    }

    .rdv-box {
        padding: 28px 22px;
    }

    .rdv-steps {
        gap: 6px;
    }

    .rdv-step {
        min-width: 0;
        flex-direction: column;
        gap: 5px;
        text-align: center;
        font-size: 0.7rem;
    }

    .rdv-field-inline .rdv-field {
        max-width: none;
    }

    .rdv-nav .btn {
        flex: 1;
    }

    .rdv-cal-grid {
        gap: 2px;
    }

    .rdv-cal-day {
        font-size: 0.82rem;
    }

    .rdv-cal-legend {
        flex-wrap: wrap;
        gap: 10px 20px;
    }
}

/* Ce que le visiteur obtient exactement en choisissant un créneau : une
   demande, pas une réservation ferme. Le dire à l'écran de choix évite la
   déception — et les absences qu'elle produit — à l'écran de confirmation. */
.rdv-panel-note {
    font-size: 0.85rem;
    color: var(--color-text-secondary);
    margin: -8px 0 18px;
}
