/* ==========================================================================
   Choix du créneau dans le tunnel de RDV (étape 3)
   --------------------------------------------------------------------------
   Balisage : element/patient/tunnel/choix_creneau.php
   Comportement : js/choix-creneau-tunnel.js
   Variables de la DA avec valeurs de repli (fiche publique + espace patient).
   Pensé d'abord pour le mobile : cibles de 44 px minimum, un appui par choix.
   ========================================================================== */
.choix-creneau-tunnel {
    font-family: var(--ff, 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif);
    color: var(--encre, #12333a);
}

.choix-creneau-tunnel button {
    font-family: inherit;
    -webkit-tap-highlight-color: transparent;
}

.choix-creneau-tunnel .cc-chargement {
    padding: 36px 0;
    text-align: center;
    color: var(--encre-douce, #5a7479);
}

.choix-creneau-tunnel .cc-chargement .fa-circle-notch {
    margin-right: 6px;
    color: var(--teal, #0B5768);
}

.choix-creneau-tunnel .cc-bloc {
    margin-top: 22px;
}

.choix-creneau-tunnel .cc-label {
    display: block;
    margin-bottom: 10px;
    font-size: .95rem;
    font-weight: 600;
    color: var(--teal, #0B5768);
}

.choix-creneau-tunnel .cc-label-ligne {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    margin-bottom: 10px;
}

.choix-creneau-tunnel .cc-label-ligne .cc-label {
    margin-bottom: 0;
}

/* --- Raccourci « premier créneau disponible » --- */
.choix-creneau-tunnel .cc-prochain {
    display: flex;
    align-items: center;
    gap: 14px;
    width: 100%;
    padding: 14px 16px;
    text-align: left;
    background: var(--vert-clair, #e6f5f3);
    border: 1px solid transparent;
    border-radius: var(--rayon-sm, 14px);
    color: var(--teal, #0B5768);
    cursor: pointer;
    transition: border-color .15s ease, box-shadow .15s ease, transform .1s ease;
}

@media (hover: hover) {
    .choix-creneau-tunnel .cc-prochain:hover {
        border-color: var(--teal, #0B5768);
        box-shadow: 0 4px 14px -6px rgba(11, 87, 104, .35);
    }
}

.choix-creneau-tunnel .cc-prochain:focus-visible {
    border-color: var(--teal, #0B5768);
    box-shadow: 0 4px 14px -6px rgba(11, 87, 104, .35);
    outline: none;
}

.choix-creneau-tunnel .cc-prochain:active {
    transform: scale(.99);
}

.choix-creneau-tunnel .cc-prochain-icone {
    display: inline-flex;
    flex: 0 0 auto;
    align-items: center;
    justify-content: center;
    width: 38px;
    height: 38px;
    border-radius: 50%;
    background: var(--teal, #0B5768);
    color: #fff;
    font-size: .9rem;
}

.choix-creneau-tunnel .cc-prochain-texte {
    display: flex;
    flex: 1 1 auto;
    flex-direction: column;
    min-width: 0;
}

.choix-creneau-tunnel .cc-prochain-surtitre {
    font-size: .8rem;
    font-weight: 500;
    color: var(--vert-fonce, #1e7f77);
}

.choix-creneau-tunnel .cc-prochain-date {
    font-size: 1.02rem;
    font-weight: 700;
}

.choix-creneau-tunnel .cc-prochain-fleche {
    flex: 0 0 auto;
    font-size: .95rem;
}

/* --- Durées (contrôle segmenté) --- */
.choix-creneau-tunnel .cc-durees {
    display: flex;
    gap: 6px;
    padding: 5px;
    background: var(--fond-doux, #f3f7f7);
    border-radius: var(--rayon-sm, 14px);
}

.choix-creneau-tunnel .cc-duree {
    display: flex;
    flex: 1 1 0;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    min-height: 52px;
    padding: 6px 8px;
    background: transparent;
    border: 1px solid transparent;
    border-radius: 10px;
    color: var(--encre, #12333a);
    cursor: pointer;
    transition: background .15s ease, box-shadow .15s ease;
}

.choix-creneau-tunnel .cc-duree-minutes {
    font-size: 1rem;
    font-weight: 600;
}

.choix-creneau-tunnel .cc-duree-prix {
    font-size: .82rem;
    color: var(--encre-douce, #5a7479);
}

.choix-creneau-tunnel .cc-duree:hover:not(:disabled) {
    background: rgba(255, 255, 255, .6);
}

.choix-creneau-tunnel .cc-duree--active,
.choix-creneau-tunnel .cc-duree--active:hover:not(:disabled) {
    background: var(--blanc, #fff);
    border-color: var(--teal, #0B5768);
    box-shadow: 0 2px 8px -3px rgba(11, 87, 104, .3);
}

.choix-creneau-tunnel .cc-duree--active .cc-duree-minutes,
.choix-creneau-tunnel .cc-duree--active .cc-duree-prix {
    color: var(--teal, #0B5768);
}

.choix-creneau-tunnel .cc-duree:disabled {
    opacity: .45;
    cursor: not-allowed;
}

.choix-creneau-tunnel .cc-duree:focus-visible {
    outline: 2px solid var(--teal, #0B5768);
    outline-offset: 2px;
}

/* Une seule durée : simple rappel, non cliquable */
.choix-creneau-tunnel .cc-bloc--unique .cc-durees {
    padding: 0;
    background: none;
}

.choix-creneau-tunnel .cc-bloc--unique .cc-duree {
    flex: 0 0 auto;
    flex-direction: row;
    gap: 8px;
    min-height: 0;
    padding: 8px 14px;
    background: var(--fond-doux, #f3f7f7);
    border-color: transparent;
    box-shadow: none;
    cursor: default;
    pointer-events: none;
}

/* --- Bande de jours --- */
.choix-creneau-tunnel .cc-navigation {
    display: inline-flex;
    gap: 6px;
}

.choix-creneau-tunnel .cc-fleche {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 34px;
    height: 34px;
    padding: 0;
    background: var(--blanc, #fff);
    border: 1px solid var(--ligne, #E3ECEC);
    border-radius: 50%;
    color: var(--teal, #0B5768);
    font-size: .8rem;
    cursor: pointer;
}

.choix-creneau-tunnel .cc-fleche:hover:not(:disabled) {
    border-color: var(--teal, #0B5768);
}

.choix-creneau-tunnel .cc-fleche:disabled {
    opacity: .35;
    cursor: default;
}

/* Sur écran tactile on fait glisser la bande : flèches inutiles */
@media (hover: none) {
    .choix-creneau-tunnel .cc-navigation {
        display: none !important;
    }
}

.choix-creneau-tunnel .cc-jours {
    display: flex;
    gap: 8px;
    margin: 0 -4px;
    padding: 4px 4px 8px;
    overflow-x: auto;
    scroll-snap-type: x proximity;
    scrollbar-width: none;
    -webkit-overflow-scrolling: touch;
}

.choix-creneau-tunnel .cc-jours::-webkit-scrollbar {
    display: none;
}

.choix-creneau-tunnel .cc-jour {
    display: flex;
    flex: 0 0 auto;
    flex-direction: column;
    align-items: center;
    width: 66px;
    padding: 9px 4px 8px;
    background: var(--blanc, #fff);
    border: 1px solid var(--ligne, #E3ECEC);
    border-radius: 12px;
    color: var(--encre, #12333a);
    line-height: 1.15;
    cursor: pointer;
    scroll-snap-align: start;
    transition: border-color .15s ease, background .15s ease;
}

@media (hover: hover) {
    .choix-creneau-tunnel .cc-jour:hover {
        border-color: var(--teal, #0B5768);
    }
}

.choix-creneau-tunnel .cc-jour:focus-visible {
    outline: 2px solid var(--teal, #0B5768);
    outline-offset: 2px;
}

.choix-creneau-tunnel .cc-jour-nom,
.choix-creneau-tunnel .cc-jour-mois {
    font-size: .74rem;
    color: var(--encre-douce, #5a7479);
    text-transform: capitalize;
}

.choix-creneau-tunnel .cc-jour-numero {
    margin: 2px 0;
    font-size: 1.25rem;
    font-weight: 700;
}

.choix-creneau-tunnel .cc-jour-nombre {
    margin-top: 5px;
    padding: 1px 6px;
    border-radius: 20px;
    background: var(--vert-clair, #e6f5f3);
    color: var(--vert-fonce, #1e7f77);
    font-size: .66rem;
    font-weight: 600;
    white-space: nowrap;
}

.choix-creneau-tunnel .cc-jour--actif,
.choix-creneau-tunnel .cc-jour--actif:hover {
    background: var(--teal, #0B5768);
    border-color: var(--teal, #0B5768);
    color: #fff;
}

.choix-creneau-tunnel .cc-jour--actif .cc-jour-nom,
.choix-creneau-tunnel .cc-jour--actif .cc-jour-mois {
    color: rgba(255, 255, 255, .8);
}

.choix-creneau-tunnel .cc-jour--actif .cc-jour-nombre {
    background: rgba(255, 255, 255, .18);
    color: #fff;
}

/* --- Heures --- */
.choix-creneau-tunnel .cc-periode + .cc-periode {
    margin-top: 16px;
}

.choix-creneau-tunnel .cc-periode-titre {
    display: flex;
    align-items: center;
    gap: 7px;
    margin-bottom: 8px;
    font-size: .8rem;
    font-weight: 500;
    color: var(--encre-douce, #5a7479);
}

.choix-creneau-tunnel .cc-grille {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(74px, 1fr));
    gap: 8px;
}

.choix-creneau-tunnel .cc-heure {
    min-height: 46px;
    padding: 0 4px;
    background: var(--vert-clair, #e6f5f3);
    border: 1px solid transparent;
    border-radius: 10px;
    color: var(--teal, #0B5768);
    font-size: .98rem;
    font-weight: 600;
    font-variant-numeric: tabular-nums;
    cursor: pointer;
    transition: background .12s ease, color .12s ease, transform .1s ease;
}

@media (hover: hover) {
    .choix-creneau-tunnel .cc-heure:hover {
        background: var(--teal, #0B5768);
        color: #fff;
    }
}

.choix-creneau-tunnel .cc-heure:focus-visible {
    background: var(--teal, #0B5768);
    color: #fff;
    outline: none;
}

.choix-creneau-tunnel .cc-heure:active {
    transform: scale(.96);
}

.choix-creneau-tunnel .cc-heure.cc-choisi {
    background: var(--teal, #0B5768);
    color: #fff;
}

/* --- Aucun créneau --- */
.choix-creneau-tunnel .cc-vide {
    margin-top: 10px;
    padding: 28px 20px;
    text-align: center;
    background: var(--fond-doux, #f3f7f7);
    border-radius: var(--rayon-sm, 14px);
}

.choix-creneau-tunnel .cc-vide-titre {
    margin-top: 10px;
    font-size: 1.1rem;
    font-weight: 600;
}

.choix-creneau-tunnel .cc-vide p {
    margin: 6px 0 0;
    color: var(--encre-douce, #5a7479);
}
