/* RDV Booking v2 — interface de prise de rendez-vous */

.rdv-booking {
    --rdv-color: #0b4f9c;
    --rdv-soft: #eaf2fb;
    --rdv-ink: #14213d;
    --rdv-muted: #6b7a90;
    --rdv-line: #dfe6f0;
    --rdv-ok: #16a34a;
    --rdv-err: #dc2626;
    max-width: 760px;
    margin: 24px auto;
    color: var(--rdv-ink);
    font-size: 16px;
    line-height: 1.5;
}
.rdv-booking *, .rdv-booking *::before, .rdv-booking *::after { box-sizing: border-box; }
.rdv-booking [hidden] { display: none !important; }

/* En-tête */
.rdv-head { margin-bottom: 18px; }
.rdv-titre { margin: 0; font-size: 1.6em; color: var(--rdv-ink); font-weight: 700; }
.rdv-adresse { margin: 4px 0 0; color: var(--rdv-muted); }
.rdv-accueil { margin: 10px 0 0; padding: 10px 14px; background: var(--rdv-soft); border-radius: 10px; }

/* Étapes */
.rdv-steps { display: flex; gap: 8px; list-style: none; margin: 0 0 18px; padding: 0; flex-wrap: wrap; }
.rdv-steps li {
    display: flex; align-items: center; gap: 8px;
    padding: 6px 12px 6px 6px; border-radius: 999px;
    background: #f3f6fa; color: var(--rdv-muted); font-weight: 600; font-size: 14px;
}
.rdv-steps li span {
    display: inline-flex; align-items: center; justify-content: center;
    width: 24px; height: 24px; border-radius: 50%; background: #fff; color: var(--rdv-muted); font-size: 13px;
}
.rdv-steps li.is-active { background: var(--rdv-color); color: #fff; }
.rdv-steps li.is-active span { background: #fff; color: var(--rdv-color); }
.rdv-steps li.is-done { color: var(--rdv-color); background: var(--rdv-soft); }
.rdv-steps li.is-done span { background: var(--rdv-color); color: #fff; }

/* Cartes */
.rdv-card {
    background: #fff;
    border: 1px solid var(--rdv-line);
    border-radius: 18px;
    padding: 24px;
    box-shadow: 0 6px 24px rgba(20, 33, 61, .06);
}

/* Calendrier */
.rdv-mois-nav { display: flex; align-items: center; justify-content: space-between; margin-bottom: 14px; }
.rdv-mois { font-weight: 700; font-size: 1.15em; text-transform: capitalize; }
.rdv-nav {
    width: 40px; height: 40px; border-radius: 50%;
    border: 1px solid var(--rdv-line); background: #fff; color: var(--rdv-color);
    font-size: 22px; line-height: 1; cursor: pointer;
}
.rdv-nav:hover:not(:disabled) { background: var(--rdv-soft); }
.rdv-nav:disabled { opacity: .3; cursor: default; }

.rdv-grille {
    display: grid; grid-template-columns: repeat(7, 1fr); gap: 6px;
}
.rdv-jsem {
    text-align: center; font-size: 12px; font-weight: 700; text-transform: uppercase;
    color: var(--rdv-muted); padding: 6px 0;
}
.rdv-vide-case { min-height: 58px; }
.rdv-chargement { grid-column: 1 / -1; text-align: center; color: var(--rdv-muted); padding: 30px 0; }

.rdv-jour {
    min-height: 58px; border-radius: 12px; border: 1px solid var(--rdv-line); background: #fff;
    display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 2px;
    font: inherit; color: var(--rdv-ink); cursor: pointer; padding: 4px;
    transition: background .15s, border-color .15s, transform .08s;
}
.rdv-jour .rdv-num { font-size: 1.1em; font-weight: 700; }
.rdv-jour .rdv-badge { font-size: 11px; line-height: 1.2; text-align: center; }
.rdv-jour.etat-libre { border-color: #b7d3f2; }
.rdv-jour.etat-libre .rdv-badge { color: var(--rdv-color); font-weight: 600; }
.rdv-jour.etat-libre:hover { background: var(--rdv-soft); border-color: var(--rdv-color); transform: translateY(-1px); }
.rdv-jour.etat-complet { background: #f6f7f9; color: #9aa6b8; }
.rdv-jour.etat-complet .rdv-badge { text-decoration: line-through; }
.rdv-jour.etat-ferme, .rdv-jour.etat-passe { background: transparent; border-style: dashed; color: #c3ccd9; }
.rdv-jour.is-today .rdv-num::after { content: ''; display: block; width: 4px; height: 4px; border-radius: 50%; background: var(--rdv-color); margin: 2px auto 0; }
.rdv-jour:focus-visible { outline: 3px solid #fbd914; outline-offset: 2px; }

.rdv-legende { display: flex; gap: 16px; flex-wrap: wrap; margin-top: 16px; font-size: 13px; color: var(--rdv-muted); }
.rdv-l::before {
    content: ''; display: inline-block; width: 12px; height: 12px; border-radius: 4px; margin-right: 6px; vertical-align: -1px;
    border: 1px solid var(--rdv-line);
}
.rdv-l-libre::before { background: var(--rdv-soft); border-color: #b7d3f2; }
.rdv-l-complet::before { background: #f6f7f9; }
.rdv-l-ferme::before { border-style: dashed; }

/* Retour */
.rdv-retour {
    background: none; border: 0; padding: 0; margin-bottom: 14px;
    color: var(--rdv-color); font: inherit; font-weight: 600; cursor: pointer;
}
.rdv-retour:hover { text-decoration: underline; }

/* Créneaux */
.rdv-jour-titre { margin: 0 0 16px; font-size: 1.2em; text-transform: capitalize; }
.rdv-periode { margin-bottom: 18px; }
.rdv-periode h4 { margin: 0 0 8px; font-size: 13px; text-transform: uppercase; letter-spacing: .04em; color: var(--rdv-muted); }
.rdv-heures { display: grid; grid-template-columns: repeat(auto-fill, minmax(96px, 1fr)); gap: 8px; }
.rdv-heure {
    padding: 11px 8px; border-radius: 999px; border: 1.5px solid var(--rdv-color); background: #fff;
    color: var(--rdv-color); font: inherit; font-weight: 700; cursor: pointer;
    transition: background .15s, color .15s;
}
.rdv-heure:hover { background: var(--rdv-color); color: #fff; }
.rdv-heure:focus-visible { outline: 3px solid #fbd914; outline-offset: 2px; }

/* Formulaire */
.rdv-recap {
    background: var(--rdv-soft); color: var(--rdv-color); font-weight: 700;
    padding: 12px 14px; border-radius: 12px; margin-bottom: 18px; text-transform: capitalize;
}
.rdv-label { display: block; font-weight: 600; margin: 0 0 14px; font-size: 15px; }
.rdv-req { color: var(--rdv-err); }
.rdv-booking input[type="text"],
.rdv-booking input[type="email"],
.rdv-booking input[type="tel"],
.rdv-booking textarea {
    display: block; width: 100%; margin-top: 6px;
    font: inherit; padding: 11px 13px; border: 1px solid #c9d3e0; border-radius: 10px; background: #fff; color: inherit;
}
.rdv-booking input:focus, .rdv-booking textarea:focus { outline: 3px solid #fbd914; outline-offset: 0; border-color: var(--rdv-color); }

.rdv-consent { display: flex; gap: 10px; align-items: flex-start; margin: 4px 0 6px; font-size: 14px; color: var(--rdv-muted); }
.rdv-consent input { margin-top: 4px; }
.rdv-hp { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }

.rdv-submit {
    display: block; width: 100%; margin-top: 16px; padding: 14px;
    border: 0; border-radius: 12px; background: var(--rdv-color); color: #fff;
    font: inherit; font-weight: 700; font-size: 17px; cursor: pointer;
}
.rdv-submit:hover:not(:disabled) { filter: brightness(1.08); }
.rdv-submit:disabled { opacity: .55; cursor: default; }

/* Confirmation */
.rdv-ok { text-align: center; padding: 36px 24px; }
.rdv-ok-icone {
    width: 64px; height: 64px; margin: 0 auto 14px; border-radius: 50%;
    background: var(--rdv-ok); color: #fff; font-size: 34px; line-height: 64px;
}
.rdv-ok h3 { margin: 0 0 8px; font-size: 1.4em; }
.rdv-ok-texte { color: var(--rdv-muted); margin: 0 0 18px; }
.rdv-ok .rdv-nouveau { max-width: 320px; margin: 0 auto; }

/* Messages */
.rdv-msg { margin-top: 14px; padding: 12px 14px; border-radius: 10px; font-weight: 600; }
.rdv-msg:empty { display: none; }
.rdv-msg.is-error { background: #fee2e2; color: #b91c1c; }
.rdv-msg.is-success { background: #dcfce7; color: #166534; }

/* Petits écrans */
@media (max-width: 560px) {
    .rdv-card { padding: 16px; border-radius: 14px; }
    .rdv-grille { gap: 4px; }
    .rdv-jour { min-height: 50px; }
    .rdv-jour .rdv-badge { display: none; }
    .rdv-heures { grid-template-columns: repeat(auto-fill, minmax(84px, 1fr)); }
    .rdv-titre { font-size: 1.3em; }
    .rdv-steps li { font-size: 13px; padding-right: 9px; }
}
