/* Polices des cartes cadeaux (aussi affichées dans l'espace kiné) et du site public. */
@font-face { font-family: 'Barlow'; src: url('/static/fonts/barlow-400.woff') format('woff'); font-weight: 400; font-display: swap; }
@font-face { font-family: 'Barlow'; src: url('/static/fonts/barlow-500.woff') format('woff'); font-weight: 500; font-display: swap; }
@font-face { font-family: 'Barlow'; src: url('/static/fonts/barlow-600.woff') format('woff'); font-weight: 600; font-display: swap; }
@font-face { font-family: 'Barlow'; src: url('/static/fonts/barlow-700.woff') format('woff'); font-weight: 700 800; font-display: swap; }
@font-face { font-family: 'Shrikhand'; src: url('/static/fonts/shrikhand.woff') format('woff'); font-weight: 400; font-display: swap; }
@font-face { font-family: 'Caveat'; src: url('/static/fonts/caveat.woff') format('woff'); font-weight: 400 700; font-display: swap; }

/* KBS Bikefitting — styles du site, d'après CHARTE.md. Couleurs et polices déclarées une seule fois ici. */

@font-face {
  font-family: 'Bebas Neue';
  src: url('/static/fonts/bebas-neue.woff2') format('woff2');
  font-weight: 400;
  font-display: swap;
}
@font-face {
  font-family: 'Figtree';
  src: url('/static/fonts/figtree.woff2') format('woff2');
  font-weight: 300 800;
  font-display: swap;
}

:root {
  --bleu: #264f7e;
  --nuit: #0a2740;
  --engrenage: #1b5683;
  --turquoise: #6cb8c6;
  --turquoise-texte: #286f7d;
  --ciel: #eaf5f8;
  --texte: #1d2b3a;
  --gris: #5a6b7b;
  --ligne: #dce6ee;
  --champ: #c9d6e2;
  --blanc: #ffffff;
  --ok: #2e7d4f;
  --ok-clair: #e5f4ea;
  --attente: #8a5a00;
  --attente-clair: #fff3d9;
  --alerte: #b3261e;
  --alerte-clair: #fbe9e7;
  --off: #6f7c86;
  --off-clair: #eef1f3;
  --degrade: linear-gradient(135deg, #4a7298 0%, var(--bleu) 42%, var(--engrenage) 70%, var(--nuit) 100%);
  --rayon: 16px;
  --ombre: 0 1px 2px rgb(10 39 64 / 6%), 0 10px 30px rgb(10 39 64 / 8%);
  --affiche: 'Bebas Neue', 'Oswald', Impact, sans-serif;
  --police: 'Figtree', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Arial, sans-serif;
  color-scheme: light;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body { margin: 0; background: var(--blanc); color: var(--texte); font: 400 17px/1.6 var(--police); -webkit-font-smoothing: antialiased; }
body.bm-ouverte { overflow: hidden; }
img { max-width: 100%; }
a { color: var(--bleu); text-underline-offset: 3px; }
a:hover { color: var(--nuit); }
h1, h2, h3 { line-height: 1.2; margin: 0 0 0.6em; color: var(--nuit); }
h1 { font-size: clamp(1.8rem, 4vw, 2.4rem); font-weight: 800; }
h2 { font-size: 1.4rem; font-weight: 800; }
h3 { font-size: 1.12rem; font-weight: 700; }
p { margin: 0 0 1em; }
code { font-size: 0.9em; background: var(--ciel); padding: 1px 6px; border-radius: 4px; }
:focus-visible { outline: 3px solid var(--turquoise); outline-offset: 2px; }
[hidden] { display: none !important; }

.evitement { position: absolute; left: -9999px; }
.evitement:focus { left: 16px; top: 8px; z-index: 50; background: var(--blanc); padding: 8px 12px; border-radius: 8px; }
.conteneur { width: min(1160px, 100% - 32px); margin-inline: auto; }
.etroit { max-width: 820px; }
.etroit-m { max-width: 680px; }
.etroit-s { max-width: 440px; }
.muted { color: var(--gris); }
.petit { font-size: 0.87rem; }
.centree { text-align: center; }
.nowrap { white-space: nowrap; }
.chapo { font-size: 1.1rem; color: var(--gris); max-width: 62ch; }
.aide { display: block; font-weight: 400; font-size: 0.86rem; color: var(--gris); margin: 2px 0 0; }

/* Titres d'affiche : Bebas Neue, capitales, variante contour */
.titre-affiche { font-family: var(--affiche); font-weight: 400; text-transform: uppercase; letter-spacing: 0.01em; line-height: 0.95; }
.titre-bleu { color: var(--bleu); font-size: clamp(2.4rem, 5vw, 3.4rem); }
.titre-section { font-family: var(--affiche); font-weight: 400; text-transform: uppercase; color: var(--bleu); font-size: clamp(2.4rem, 5vw, 3.4rem); line-height: 0.95; margin-bottom: 0.5em; }
.titre-section::after { content: ''; display: block; width: 140px; height: 5px; background: var(--turquoise); margin-top: 12px; border-radius: 3px; }
.sous-titre { font-weight: 600; color: var(--engrenage); font-size: 1.1rem; }

/* Boutons */
.btn, .btn-secondaire, .btn-clair, .lien-bouton {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  font: 700 0.98rem/1.2 var(--police); border-radius: 10px; cursor: pointer; text-decoration: none;
  transition: background 0.15s, border-color 0.15s, color 0.15s, transform 0.15s;
}
.btn { background: var(--bleu); color: var(--blanc); border: 2px solid var(--bleu); padding: 13px 22px; }
.btn:hover { background: var(--nuit); border-color: var(--nuit); color: var(--blanc); }
.btn:disabled { opacity: 0.4; cursor: not-allowed; }
.btn-petit { padding: 9px 16px; font-size: 0.92rem; }
.btn-secondaire { background: var(--blanc); color: var(--bleu); border: 2px solid var(--bleu); padding: 11px 18px; }
.btn-secondaire:hover { background: var(--ciel); color: var(--nuit); }
.btn-clair { background: var(--blanc); color: var(--bleu); border: 2px solid var(--blanc); padding: 13px 22px; }
.btn-clair:hover { background: var(--ciel); color: var(--nuit); }
.btn-danger { background: var(--alerte); border-color: var(--alerte); }
.btn-danger:hover { background: #8e1f18; border-color: #8e1f18; }
.lien-bouton { background: none; border: 0; padding: 0; color: var(--bleu); font-weight: 600; text-decoration: underline; }
.lien-clair { color: var(--blanc); font-weight: 700; }
.lien-clair:hover { color: var(--ciel); }

/* En-tête public */
.site-entete { background: rgb(255 255 255 / 94%); backdrop-filter: blur(8px); border-bottom: 1px solid var(--ligne); position: sticky; top: 0; z-index: 10; }
.entete-ligne { display: flex; align-items: center; justify-content: space-between; gap: 16px; min-height: 76px; flex-wrap: wrap; padding-block: 8px; }
.marque { display: inline-flex; align-items: center; gap: 12px; text-decoration: none; }
.marque img { height: 56px; width: auto; display: block; }
.nav { display: flex; align-items: center; gap: 6px 22px; flex-wrap: wrap; }
.nav a:not(.btn) { color: var(--nuit); text-decoration: none; font-weight: 600; font-size: 0.96rem; }
.nav a:not(.btn):hover { color: var(--turquoise-texte); }

/* Hero, d'après les affiches 2 et 3 */
.hero { position: relative; overflow: hidden; background: var(--degrade); color: var(--blanc); padding: clamp(56px, 9vw, 110px) 0 0; }
.hero-filigrane { position: absolute; right: -6%; top: 6%; width: min(680px, 62vw); opacity: 0.1; pointer-events: none; }
.hero-contenu { position: relative; padding-bottom: clamp(48px, 7vw, 80px); }
.hero .titre-affiche { font-size: clamp(3.6rem, 10vw, 7.6rem); color: var(--blanc); margin: 0 0 28px; }
.titre-affiche span { display: block; }
.contour { color: transparent; -webkit-text-stroke: 2px var(--blanc); paint-order: stroke fill; }
.hero-promesse { font-weight: 600; font-size: clamp(1.08rem, 2vw, 1.3rem); max-width: 36ch; line-height: 1.5; }
.hero-actions { display: flex; gap: 22px; align-items: center; flex-wrap: wrap; margin: 30px 0 22px; }
.hero-infos { display: flex; gap: 10px; flex-wrap: wrap; margin: 0; }
.hero-infos span { border: 1px solid rgb(255 255 255 / 40%); border-radius: 999px; padding: 5px 14px; font-weight: 600; font-size: 0.9rem; }
.vague { display: block; width: 100%; height: clamp(50px, 7vw, 100px); position: relative; margin-top: -1px; }
.vague-lisere { fill: var(--turquoise); }
.vague-fond { fill: var(--blanc); }
.vague-petite { height: clamp(36px, 5vw, 64px); }

.bandeau-page { position: relative; background: var(--degrade); color: var(--blanc); padding-top: clamp(36px, 6vw, 64px); overflow: hidden; }
.bandeau-page .titre-affiche { font-size: clamp(2.6rem, 6vw, 4.2rem); color: var(--blanc); margin-bottom: 10px; }
.bandeau-page p { font-weight: 600; margin-bottom: 18px; }

/* Sections */
.section { padding: clamp(48px, 7vw, 88px) 0; }
.section-serree { padding-top: 24px; }
.section-ciel { background: var(--ciel); }
section[id] { scroll-margin-top: 80px; }
.icone { flex: none; }

.piliers { list-style: none; padding: 0; margin: 36px 0 0; display: grid; grid-template-columns: repeat(4, 1fr); }
.piliers li { text-align: center; padding: 8px 22px; border-left: 2px solid var(--turquoise); }
.piliers li:first-child { border-left: 0; }
.piliers .icone { color: var(--turquoise); margin-bottom: 14px; }
.piliers h3 { text-transform: uppercase; font-weight: 800; color: var(--bleu); letter-spacing: 0.02em; margin-bottom: 6px; }
.piliers p { color: var(--gris); margin: 0; }

.etude-grille { display: grid; grid-template-columns: 1fr 1.25fr; gap: 48px; align-items: start; }
.etude-intro .titre-bleu { margin-bottom: 8px; }
.encadre-inclus { border: 2px solid var(--bleu); border-radius: var(--rayon); padding: 18px 22px; background: var(--blanc); margin: 22px 0; }
.encadre-inclus p { margin: 0 0 6px; }
.encadre-inclus p:last-child { margin: 0; }
.etapes { list-style: none; padding: 0; margin: 0; display: grid; gap: 18px; }
.etape-carte { display: flex; gap: 20px; align-items: flex-start; background: var(--blanc); border-radius: var(--rayon); padding: 22px; box-shadow: var(--ombre); }
.etape-icone { flex: none; display: grid; place-items: center; width: 72px; height: 72px; border-radius: 50%; background: var(--bleu); color: var(--blanc); }
.etape-carte h3 { color: var(--bleu); font-weight: 800; }
.etape-num { color: var(--bleu); margin-right: 4px; }
.etape-duree { white-space: nowrap; }
.etape-carte p { margin: 0; color: var(--texte); }

.deux-encadres { display: grid; grid-template-columns: 1fr 1fr; gap: 28px; }
.encadre { background: var(--ciel); border-radius: 22px; padding: 30px 28px; }
.encadre-titre { display: inline-block; background: var(--bleu); color: var(--blanc); border-radius: 14px; padding: 8px 22px; font-size: 1.05rem; font-weight: 800; text-transform: uppercase; letter-spacing: 0.03em; margin-bottom: 22px; }
.encadre-bleu { background: var(--bleu); color: var(--blanc); }
.encadre-bleu h3 { color: var(--blanc); font-family: var(--affiche); font-weight: 400; font-size: 2rem; text-transform: uppercase; }
.liste-icones, .liste-coches { list-style: none; padding: 0; margin: 0; display: grid; gap: 18px; }
.liste-icones li, .liste-coches li { display: flex; gap: 16px; align-items: center; }
.liste-icones .icone { color: var(--bleu); }
.liste-coches-claire { margin-bottom: 18px; }

.equipe-grille { display: grid; grid-template-columns: 1.3fr 1fr; gap: 48px; align-items: center; }
.bio h3 { color: var(--bleu); font-weight: 800; margin-bottom: 4px; }
.bio { margin-bottom: 20px; }
.photo-equipe { width: min(420px, 100%); aspect-ratio: 1; object-fit: cover; object-position: 48% 50%; border-radius: 50%; border: 8px solid var(--blanc); box-shadow: var(--ombre); justify-self: center; }

.infos-grille { display: grid; grid-template-columns: 1.2fr 1fr; gap: 40px; align-items: start; }
.infos { display: grid; gap: 14px; margin: 0; }
.infos div { display: grid; grid-template-columns: 130px 1fr; gap: 12px; padding-bottom: 12px; border-bottom: 1px solid var(--ligne); }
.infos dt { color: var(--gris); }
.infos dd { margin: 0; font-weight: 700; color: var(--nuit); }

/* Pied de page, d'après les affiches */
.site-pied { background: var(--bleu); color: var(--blanc); margin-top: 0; }
.site-pied a { color: var(--blanc); }
.pied-colonnes { display: grid; grid-template-columns: repeat(4, 1fr); padding: 40px 0 32px; }
.pied-col { display: flex; flex-direction: column; align-items: center; gap: 12px; text-align: center; font-weight: 700; padding: 0 12px; border-left: 1px solid rgb(255 255 255 / 35%); }
.pied-col:first-child { border-left: 0; }
.pied-col a { text-decoration: none; overflow-wrap: anywhere; }
.pied-col a:hover { text-decoration: underline; }
.pied-bas { display: flex; justify-content: space-between; gap: 16px; flex-wrap: wrap; border-top: 1px solid rgb(255 255 255 / 25%); padding: 18px 0; font-size: 0.9rem; }
.pied-bas nav { display: flex; gap: 18px; flex-wrap: wrap; }
.mention-demo { font-size: 0.8rem; color: #c6d6e6; padding-bottom: 22px; margin: 0 auto; }

/* Cartes, formulaires, alertes */
.carte { background: var(--blanc); border: 1px solid var(--ligne); border-radius: var(--rayon); padding: clamp(20px, 3vw, 32px); box-shadow: var(--ombre); margin-bottom: 20px; }
.formulaire label { display: grid; gap: 6px; font-weight: 600; font-size: 0.96rem; margin-bottom: 16px; color: var(--nuit); }
.formulaire input:not([type='checkbox'], [type='radio']), .formulaire select, .formulaire textarea, .recherche input, .filtres-factures select {
  font: 400 1rem/1.4 var(--police); padding: 11px 13px; border: 1.5px solid var(--champ); border-radius: 10px; background: var(--blanc); color: var(--texte); width: 100%;
}
.formulaire textarea { resize: vertical; }
.formulaire input:focus, .formulaire select:focus, .formulaire textarea:focus { border-color: var(--bleu); outline: 3px solid rgb(108 184 198 / 45%); }
.grille-champs { display: grid; grid-template-columns: 1fr 1fr; gap: 0 16px; }
.grille-champs .pleine { grid-column: 1 / -1; }
.actions { display: flex; gap: 12px; flex-wrap: wrap; align-items: center; margin-top: 22px; }
.actions form { margin: 0; }
.formulaire .case, .case { display: flex !important; gap: 12px; align-items: flex-start; font-weight: 400 !important; margin-bottom: 14px; }
.case input { margin-top: 4px; width: 19px; height: 19px; flex: none; accent-color: var(--bleu); }
.piege { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }
.en-ligne { display: inline; margin: 0; }
.alerte { padding: 12px 16px; border-radius: 12px; margin: 0 0 18px; font-size: 0.96rem; }
.alerte ul { margin: 6px 0 0; padding-left: 20px; }
.alerte p { margin: 0; }
.alerte-erreur { background: var(--alerte-clair); color: #7f1d16; border: 1px solid #f2c4bf; }
.alerte-info { background: var(--ciel); color: var(--nuit); border: 1px solid #c4e1e9; }
.alerte-succes { background: var(--ok-clair); color: #1f5e39; border: 1px solid #bfe2cb; }
.icone-ronde { display: inline-grid; place-items: center; width: 72px; height: 72px; border-radius: 50%; background: var(--ciel); color: var(--bleu); margin-bottom: 16px; }
.icone-ok { background: transparent; }
.texte-long h2 { margin-top: 1.6em; }
.resume { display: grid; gap: 10px; margin: 0 0 20px; padding: 16px 18px; background: var(--ciel); border-radius: 12px; border-left: 4px solid var(--turquoise); }
.resume div { display: grid; grid-template-columns: 140px 1fr; gap: 12px; }
.resume dt { color: var(--gris); }
.resume dd { margin: 0; font-weight: 700; color: var(--nuit); overflow-wrap: anywhere; }
.resume .destinataire { font-size: 1.12rem; color: var(--bleu); }

/* Parcours de réservation */
.progression { list-style: none; padding: 0; margin: 8px 0 24px; display: grid; grid-template-columns: repeat(4, 1fr); gap: 8px; counter-reset: etape; }
.progression li { counter-increment: etape; font-size: 0.88rem; color: var(--gris); padding-top: 10px; border-top: 5px solid var(--ligne); font-weight: 600; }
.progression li::before { content: counter(etape, decimal-leading-zero) ' '; font-weight: 800; }
.progression li.en-cours { color: var(--bleu); border-top-color: var(--bleu); }
.progression li.fait { color: var(--turquoise-texte); border-top-color: var(--turquoise); }
.etape { background: var(--blanc); border: 1px solid var(--ligne); border-radius: var(--rayon); padding: clamp(20px, 3vw, 34px); box-shadow: var(--ombre); }
.etape > h2 { color: var(--bleu); }
.filtre-kine { border: 0; padding: 0; margin: 18px 0 6px; display: flex; gap: 8px; flex-wrap: wrap; align-items: center; }
.filtre-kine legend { font-weight: 700; color: var(--nuit); margin-bottom: 8px; width: 100%; }

/* Questionnaire, d'après le PDF du cabinet */
.questionnaire { display: grid; gap: 26px; margin-top: 18px; }
.q-section { display: grid; gap: 14px; }
.q-section-titre { background: var(--bleu); color: var(--blanc); border-radius: 10px; padding: 11px 16px; font-size: 1rem; font-weight: 800; text-transform: uppercase; letter-spacing: 0.02em; margin: 0; }
.q { border: 1px solid var(--ligne); border-radius: 12px; padding: 16px 18px 18px; margin: 0; min-width: 0; }
.q legend { display: flex; gap: 10px; align-items: baseline; font-weight: 700; padding: 0 6px; margin-left: -6px; color: var(--nuit); }
.q-num { flex: none; display: inline-grid; place-items: center; width: 26px; height: 26px; border-radius: 50%; background: var(--ciel); color: var(--bleu); font-size: 0.8rem; font-weight: 800; }
.facultatif { color: var(--gris); font-weight: 400; }
.q .aide { margin: -2px 0 8px; }
.q input[type='text'], .q textarea { margin-top: 6px; }
.choix { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 8px; border: 0; padding: 0; }
.choix legend { font-weight: 700; margin-bottom: 8px; width: 100%; }
.choix-item { position: relative; display: inline-flex !important; margin: 0 !important; font-weight: 600 !important; cursor: pointer; }
.choix-item input { position: absolute; opacity: 0; inset: 0; cursor: pointer; }
.choix-item span { padding: 8px 16px; border: 1.5px solid var(--champ); border-radius: 999px; background: var(--blanc); transition: all 0.12s; }
.choix-item:has(input:checked) span { background: var(--bleu); border-color: var(--bleu); color: var(--blanc); }
.choix-item:has(input:focus-visible) span { outline: 3px solid var(--turquoise); }
.detail { margin: 12px 0 0 !important; font-weight: 600 !important; }
.champ-unite { display: flex; align-items: center; gap: 10px; max-width: 260px; margin-top: 6px; }
.champ-unite span { color: var(--gris); font-weight: 600; white-space: nowrap; }
.liste-detail { display: grid; gap: 6px; margin-top: 8px; }
.ld-ligne { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 4px 14px; align-items: center; padding: 6px 0; border-bottom: 1px solid var(--ligne); }
.ld-ligne:last-child { border-bottom: 0; }
.ld-ligne .case { margin: 0 !important; font-weight: 600 !important; }
.ld-ligne input[type='text'] { margin: 0 !important; }
.reponses-titre { font-size: 0.86rem; text-transform: uppercase; letter-spacing: 0.03em; background: var(--ciel); color: var(--bleu); padding: 7px 12px; border-radius: 8px; margin: 18px 0 4px; }
.reponses { margin: 0; display: grid; }
.reponse { display: grid; grid-template-columns: 1fr 1.2fr; gap: 16px; padding: 10px 0; border-bottom: 1px solid var(--ligne); }
.reponse dt { color: var(--gris); }
.reponse dd { margin: 0; font-weight: 600; color: var(--nuit); }
.ld-reponse { margin: 0; padding-left: 18px; }

/* Calendrier */
.calendrier { margin: 18px 0 8px; }
.cal-legende { display: flex; gap: 18px; flex-wrap: wrap; font-size: 0.86rem; color: var(--gris); }
.cal-legende-item { display: inline-flex; align-items: center; gap: 6px; }
.cal-pastille { width: 14px; height: 14px; border-radius: 4px; border: 1px solid var(--ligne); }
.cal-mois-liste { display: grid; gap: 22px; margin-top: 14px; }
.cal-mois { max-width: none; }
/* Calendrier centré dans la page, avec le choix du kiné et le panneau des heures. */
.calendrier, .filtre-kine, .cal-choix { max-width: 600px; margin-inline: auto; }
.calendrier .cal-legende { justify-content: center; }
.cal-mois-titre { font-weight: 800; font-size: 1.05rem; margin: 0 0 10px; color: var(--bleu); text-transform: none; }
.cal-mois + .cal-mois { padding-top: 22px; border-top: 1px solid var(--ligne); }
.cal-grille { display: grid; grid-template-columns: repeat(7, 1fr); gap: 6px; }
.cal-jsem { text-align: center; font-size: 0.75rem; color: var(--gris); font-weight: 700; padding-bottom: 2px; }
.cal-jour { height: 52px; border-radius: 10px; border: 1.5px solid transparent; font: 700 1rem var(--police); cursor: pointer; }
.cal-libre, .cal-pastille.cal-libre { background: var(--ciel); color: var(--bleu); border-color: #9fcfdb; }
.cal-libre:hover { background: #d3eaf1; border-color: var(--bleu); }
.cal-indispo, .cal-pastille.cal-indispo { background: transparent; color: #b8c2ca; font-weight: 500; cursor: default; }
.cal-pastille.cal-indispo { border-color: var(--ligne); }
.cal-jour[aria-pressed='true'] { background: var(--bleu); color: var(--blanc); border-color: var(--bleu); }
.cal-creneaux { margin: 4px 0 8px; padding: 18px; border-radius: 14px; background: var(--ciel); }
.cal-creneaux-titre { font-weight: 700; color: var(--nuit); }
.cal-creneaux-ligne { display: flex; gap: 10px; flex-wrap: wrap; }
.cal-creneau { display: grid; gap: 2px; text-align: left; font: 600 0.9rem var(--police); padding: 12px 18px; border-radius: 12px; border: 2px solid var(--bleu); background: var(--blanc); color: var(--bleu); cursor: pointer; }
.cal-creneau-heure { font-size: 1.08rem; font-weight: 800; }
.cal-creneau-kine { color: var(--gris); font-weight: 600; }
.cal-creneau[aria-pressed='true'] { background: var(--bleu); color: var(--blanc); }
.cal-creneau[aria-pressed='true'] .cal-creneau-kine { color: var(--ciel); }
.cal-creneau:disabled { border-style: dashed; border-color: var(--champ); color: var(--gris); cursor: not-allowed; }
.cal-choix { font-weight: 700; color: var(--bleu); min-height: 1.6em; }

/* Espace kiné */
.admin { background: #f5f8fa; }
.admin-entete { background: var(--nuit); position: sticky; top: 0; z-index: 10; }
.admin-entete .marque img { height: 44px; }
.admin-entete .marque span { color: var(--turquoise); font-weight: 800; text-transform: uppercase; letter-spacing: 0.08em; font-size: 0.82rem; }
.admin-entete .nav a { color: #c9dbe8 !important; padding: 6px 0; border-bottom: 2px solid transparent; }
.admin-entete .nav a:hover, .admin-entete .nav a[aria-current='page'] { color: var(--blanc) !important; border-bottom-color: var(--turquoise); }
.deconnexion { display: flex; gap: 12px; align-items: center; margin: 0; }
.deconnexion .lien-bouton { color: var(--blanc); }
.admin-main { padding: 30px 0 90px; }
.titre-ligne { display: flex; align-items: center; justify-content: space-between; gap: 16px; flex-wrap: wrap; margin-bottom: 14px; }
.titre-ligne h1 { margin: 0; }
.nav-semaines { display: flex; gap: 8px; flex-wrap: wrap; }
.pastille-kine { display: inline-flex; align-items: center; gap: 6px; font-weight: 700; font-size: 0.85rem; color: var(--nuit); background: var(--blanc); border: 1px solid var(--ligne); border-radius: 999px; padding: 2px 10px 2px 8px; }
.pastille-kine::before { content: ''; width: 10px; height: 10px; border-radius: 50%; background: var(--kine); }
.legende-kines { display: flex; gap: 10px; flex-wrap: wrap; align-items: center; margin-bottom: 14px; }
.puce-exemple { font-size: 0.8rem; padding: 3px 10px; border-radius: 8px; }
.puce-exemple.puce-libre { border: 1.5px dashed var(--champ); background: var(--blanc); }
.agenda-grille { display: grid; grid-template-columns: 1fr 300px; gap: 22px; align-items: start; }
.agenda { background: var(--blanc); border: 1px solid var(--ligne); border-radius: var(--rayon); padding: 14px; overflow-x: auto; }
.agenda-entete, .agenda-semaine { display: grid; grid-template-columns: repeat(7, minmax(112px, 1fr)); gap: 6px; }
.agenda-entete { font-size: 0.8rem; color: var(--gris); font-weight: 700; padding: 0 4px 8px; }
.agenda-semaine { margin-bottom: 6px; }
.jour { min-height: 110px; border: 1px solid var(--ligne); border-radius: 10px; padding: 7px; background: #fbfcfd; display: flex; flex-direction: column; gap: 5px; }
.jour.passe { opacity: 0.55; }
.jour.auj { border-color: var(--bleu); box-shadow: inset 0 0 0 1px var(--bleu); }
.jour-date { font-size: 0.78rem; color: var(--gris); font-weight: 600; }
.ferie { color: var(--attente); }
.periode-agenda { margin: 2px 0 0; color: var(--gris); font-weight: 600; }
.nav-semaines { align-items: center; }
a.jour-date { text-decoration: none; }
a.jour-date:hover { color: var(--bleu); text-decoration: underline; }
.vues-agenda { display: inline-flex; border: 1.5px solid var(--champ); border-radius: 10px; overflow: hidden; background: var(--blanc); margin-right: 6px; }
.vues-agenda a { padding: 9px 14px; font-weight: 700; font-size: 0.9rem; color: var(--gris); text-decoration: none; }
.vues-agenda a + a { border-left: 1.5px solid var(--champ); }
.vues-agenda a[aria-current='page'] { background: var(--bleu); color: var(--blanc); }

/* ---------- Agenda en grille horaire (semaine / jour) ---------- */
/* L'agenda en grille prend toute la largeur de l'écran. */
.admin-main:has(.agenda-horaire) { width: calc(100% - 40px); max-width: 1800px; }
.agenda-horaire { grid-template-columns: 1fr 250px; }
/* Écran moyen : la grille prend toute la largeur, le calendrier et les encadrés passent dessous. */
@media (max-width: 1499px) {
  .agenda-horaire { grid-template-columns: 1fr; }
  .agenda-horaire .panneaux { grid-template-columns: repeat(auto-fit, minmax(250px, 1fr)); }
}
.aller-date { display: inline-flex; }
.aller-date input { padding: 8px 10px; border: 1.5px solid var(--champ); border-radius: 10px; font: 600 0.9rem var(--police); color: var(--nuit); background: var(--blanc); }
.agenda-gh { padding: 0; overflow: hidden; }
.gh-defile { overflow-x: auto; }
.gh { min-width: max-content; }
.gh-entete, .gh-corps { display: grid; }
.gh-entete { position: sticky; top: 0; z-index: 5; background: var(--blanc); border-bottom: 2px solid var(--champ); }
/* Séparation nette entre les jours */
.gh-jour-tete, .gh-jour { border-left: 3px solid #b9c7d4; }
.gh-jour-tete { padding: 10px 8px 0; text-align: center; font-size: 0.95rem; font-weight: 800; }
.gh-jour-tete a { color: var(--nuit); text-decoration: none; }
.gh-jour-tete a:hover { color: var(--bleu); text-decoration: underline; }
.gh-jour-tete.auj { background: var(--ciel); }
.gh-jour-tete.auj a { color: var(--bleu); }
.gh-jour-tete.passe { opacity: 0.55; }
.gh-kines { display: flex; margin-top: 8px; }
.gh-kines span { flex: 1; font-size: 0.75rem; font-weight: 800; padding: 4px 0; color: var(--kine); background: color-mix(in srgb, var(--kine) 12%, white); border-top: 3px solid var(--kine); }
.gh-corps { position: relative; }
.gh-heures { position: relative; }
.gh-heures span { position: absolute; right: 8px; transform: translateY(-50%); font-size: 0.75rem; color: var(--gris); font-weight: 700; }
.gh-heures span:first-child { transform: none; }
.gh-heures span:last-child { transform: translateY(-100%); }
.gh-jour {
  position: relative; display: flex;
  background-image: linear-gradient(to bottom, #d9e2ea 1px, transparent 1px), linear-gradient(to bottom, #f0f3f6 1px, transparent 1px);
  background-size: 100% var(--h), 100% var(--h);
  background-position: 0 0, 0 calc(var(--h) / 2);
}
.gh-jour.auj { background-color: #f7fbfd; }
.gh-jour.passe { background-color: #f6f8fa; }
.gh-jour.passe .gh-sous { opacity: 0.55; }
.gh-sous { position: relative; flex: 1; min-width: 0; }
.gh-sous + .gh-sous { border-left: 1px dashed #dde5ec; }
/* Plage ouverte mais indisponible (créneaux bloqués) : grisée et hachurée */
.gh-plage { position: absolute; left: 3px; right: 3px; border-radius: 6px; background: repeating-linear-gradient(135deg, #eef1f4 0 6px, #f8f9fb 6px 12px); border: 1px solid #e1e6eb; }
/* Partie encore réservable : teinte transparente de la couleur du kiné */
.gh-libre { position: absolute; left: 3px; right: 3px; border-radius: 6px; background: color-mix(in srgb, var(--kine) 13%, white); border: 1px solid color-mix(in srgb, var(--kine) 35%, white); }
/* Heures de départ : texte simple avec un petit trait, barré et gris si bloqué */
.gh-depart {
  position: absolute; left: 3px; right: 3px; z-index: 1; display: flex; align-items: flex-start;
  padding: 3px 7px 0; border-top: 2px solid rgb(255 255 255 / 85%);
  font-size: 0.72rem; font-weight: 800; line-height: 1.1; white-space: nowrap;
  color: color-mix(in srgb, var(--kine, var(--bleu)) 80%, black);
}
.gh-depart:first-of-type { border-top-color: transparent; }
.gh-depart-bloque { color: #a3adb6; font-weight: 600; text-decoration: line-through; }
.gh-rdv {
  position: absolute; left: 4px; right: 4px; z-index: 2; overflow: hidden; display: flex; flex-direction: column; gap: 2px;
  padding: 6px 8px; border-radius: 8px; font-size: 0.76rem; line-height: 1.25; text-decoration: none;
  background: color-mix(in srgb, var(--kine) 24%, white); color: var(--nuit);
  border: 1px solid color-mix(in srgb, var(--kine) 45%, white); border-left: 5px solid var(--kine);
  box-shadow: 0 2px 6px rgb(10 39 64 / 12%);
}
.gh-rdv strong { font-size: 0.84rem; color: color-mix(in srgb, var(--kine) 70%, black); }
.gh-rdv > span, .gh-rdv strong { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.gh-rdv { padding-bottom: 4px; }
.gh-vue-semaine .gh-rdv { padding: 4px 5px; font-size: 0.72rem; }
.gh-vue-semaine .gh-rdv strong { font-size: 0.78rem; }
.ma-couleur { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; margin: 12px 0 6px; }
.ma-couleur label { display: flex; align-items: center; gap: 8px; font-weight: 600; }
.ma-couleur input[type='color'] { width: 44px; height: 32px; padding: 0; border: 1px solid var(--champ); border-radius: 8px; background: none; }
.gh-rdv-heure { font-weight: 800; }
.gh-rdv:hover { background: color-mix(in srgb, var(--kine) 34%, white); }
.gh-attente { background: var(--blanc); border-style: dashed; }
.gh-fait { opacity: 0.7; }
.gh-alerte { background: var(--alerte-clair); border-color: var(--alerte); }
.gh-suivi { background-image: repeating-linear-gradient(135deg, rgb(255 255 255 / 55%) 0 5px, transparent 5px 10px); }
.gh-sans-lieu { font-weight: 800; color: var(--attente); }
.gh-court-texte { display: none; }
.gh-court { padding: 2px 6px; justify-content: center; }
.gh-court > :not(.gh-court-texte) { display: none; }
.gh-court .gh-court-texte { display: block; font-weight: 800; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.gh-maintenant { position: absolute; left: 0; right: 0; height: 2px; background: var(--alerte); z-index: 3; }
.gh-maintenant::before { content: ''; position: absolute; left: -5px; top: -4px; width: 10px; height: 10px; border-radius: 50%; background: var(--alerte); }
.gh-sous { cursor: pointer; }
.gh-fantome { position: absolute; left: 3px; right: 3px; z-index: 4; pointer-events: none; border-radius: 6px; border: 2px dashed var(--kine); background: rgb(255 255 255 / 70%); color: color-mix(in srgb, var(--kine) 80%, black); font-size: 0.72rem; font-weight: 800; padding: 3px 6px; }
.gh-evt {
  position: absolute; left: 4px; right: 4px; z-index: 2; overflow: hidden; display: flex; flex-direction: column; gap: 2px;
  padding: 5px 7px; border-radius: 8px; font-size: 0.74rem; line-height: 1.25; text-decoration: none; color: var(--nuit);
  box-shadow: 0 2px 6px rgb(10 39 64 / 10%);
}
.gh-evt > span, .gh-evt strong { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.gh-evt-rdv { background: color-mix(in srgb, var(--kine) 10%, white); border: 1.5px solid var(--kine); border-left-width: 5px; }
.gh-evt-perso { background: repeating-linear-gradient(45deg, #eceff3 0 6px, #f6f7f9 6px 12px); border: 1.5px solid #b5c0ca; border-left: 5px solid #7d8a96; color: #46525e; }
.gh-evt-note { font-style: italic; opacity: 0.85; }
.gh-evt.gh-court { padding: 2px 6px; justify-content: center; }
.gh-evt.gh-court > :not(.gh-court-texte) { display: none; }
.gh-ex-evt { background: color-mix(in srgb, var(--bleu) 10%, white); border: 1.5px solid var(--bleu); border-left-width: 4px; }
.gh-ex-perso { background: repeating-linear-gradient(45deg, #e3e8ed 0 4px, #f6f7f9 4px 8px); border: 1.5px solid #b5c0ca; border-left: 4px solid #7d8a96; }
.puce-evt { background: var(--off-clair); }
.aide-clic { color: var(--bleu); font-size: 0.88rem; font-weight: 600; margin: -6px 0 12px; }
/* Fenêtre d'ajout depuis l'agenda */
.dialogue-ajout { width: min(560px, calc(100% - 24px)); border: 0; border-radius: var(--rayon); padding: 22px 24px 18px; box-shadow: 0 20px 60px rgb(10 39 64 / 35%); }
.dialogue-ajout::backdrop { background: rgb(10 39 64 / 45%); }
.dialogue-ajout h2 { margin: 0 0 2px; color: var(--bleu); }
.dialogue-fermer { position: absolute; top: 10px; right: 12px; }
.dialogue-fermer button { border: 0; background: none; font-size: 1.6rem; line-height: 1; color: var(--gris); cursor: pointer; }
.onglets-ajout { display: flex; gap: 4px; margin: 14px 0 12px; border-bottom: 2px solid var(--ligne); }
.onglets-ajout button { border: 0; background: none; padding: 9px 12px; font: 700 0.92rem var(--police); color: var(--gris); cursor: pointer; border-bottom: 3px solid transparent; margin-bottom: -2px; }
.onglets-ajout button[aria-selected='true'] { color: var(--bleu); border-bottom-color: var(--bleu); }
.legende-gh { display: inline-flex; align-items: center; gap: 6px; font-size: 0.82rem; color: var(--gris); }
.gh-ex { display: inline-block; width: 22px; height: 14px; border-radius: 4px; }
.gh-ex-libre { background: color-mix(in srgb, var(--bleu) 13%, white); border: 1px solid color-mix(in srgb, var(--bleu) 35%, white); }
.gh-ex-plage { background: repeating-linear-gradient(135deg, #e6eaee 0 4px, #f8f9fb 4px 8px); border: 1px solid #dfe5ea; }
.gh-ex-rdv { background: color-mix(in srgb, var(--bleu) 24%, white); border-left: 4px solid var(--bleu); }
.gh-ex-suivi { background-image: repeating-linear-gradient(135deg, rgb(255 255 255 / 55%) 0 4px, transparent 4px 8px); }
.legende-gh .gh-depart { position: static; border: 0; padding: 0; --kine: var(--bleu); }
.legende-gh .gh-depart-bloque { --kine: initial; }

/* Mini calendrier */
.mini-cal h2 { margin: 0; }
.mc-tete { display: flex; align-items: center; justify-content: space-between; margin-bottom: 8px; }
.mc-tete a { text-decoration: none; font-size: 1.3rem; font-weight: 700; padding: 0 10px; color: var(--bleu); }
.mc-grille { display: grid; grid-template-columns: repeat(7, 1fr); gap: 2px; text-align: center; }
.mc-jsem { font-size: 0.72rem; font-weight: 700; color: var(--gris); padding-bottom: 4px; }
.mc-jour { position: relative; display: block; padding: 6px 0; border-radius: 8px; font-size: 0.85rem; font-weight: 600; color: var(--nuit); text-decoration: none; }
.mc-jour:hover { background: var(--ciel); }
.mc-hors { color: #b8c2ca; }
.mc-auj { box-shadow: inset 0 0 0 1.5px var(--bleu); }
.mc-choisi { background: var(--bleu); color: var(--blanc); }
.mc-choisi:hover { background: var(--bleu); }
.mc-rdv::after { content: ''; position: absolute; left: 50%; bottom: 2px; width: 4px; height: 4px; margin-left: -2px; border-radius: 50%; background: var(--turquoise); }
.jour-vide { color: #b8c2ca; font-size: 0.8rem; }
.puce { display: grid; gap: 1px; text-decoration: none; padding: 6px 7px; border-radius: 8px; font-size: 0.77rem; line-height: 1.3; border-left: 4px solid var(--kine); }
.puce-libre { background: var(--blanc); border-top: 1px dashed var(--champ); border-right: 1px dashed var(--champ); border-bottom: 1px dashed var(--champ); }
.puce-heure { font-weight: 800; color: var(--nuit); }
.puce-nom { color: var(--nuit); font-weight: 700; }
.puce-meta { color: var(--gris); font-size: 0.72rem; }
.ton-ok { background: var(--ok-clair); color: var(--ok); }
.ton-attente { background: var(--attente-clair); color: var(--attente); }
.ton-fait { background: var(--ciel); color: var(--bleu); }
.ton-alerte { background: var(--alerte-clair); color: var(--alerte); }
.ton-off { background: var(--off-clair); color: var(--off); }
.ton-libre { background: var(--blanc); color: var(--turquoise-texte); border: 1px dashed var(--turquoise); }
.badge { display: inline-block; padding: 3px 11px; border-radius: 999px; font-size: 0.8rem; font-weight: 800; }
.panneaux { display: grid; gap: 14px; }
.panneau { background: var(--blanc); border: 1px solid var(--ligne); border-radius: var(--rayon); padding: 16px; }
.panneau h2 { font-size: 0.98rem; display: flex; justify-content: space-between; align-items: center; color: var(--bleu); }
.compteur { background: var(--ciel); color: var(--bleu); border-radius: 999px; padding: 1px 10px; font-size: 0.85rem; }
.liste-rdv { list-style: none; padding: 0; margin: 0; display: grid; gap: 8px; }
.liste-rdv a { display: grid; gap: 2px; padding: 10px 12px; border-radius: 10px; background: #f5f8fa; text-decoration: none; color: var(--texte); font-size: 0.9rem; }
.liste-rdv a:hover { background: var(--ciel); }
.liste-rdv span { color: var(--gris); font-size: 0.85rem; }
.liste-simple { padding-left: 18px; margin: 0; display: grid; gap: 10px; }
.fiche-grille { display: grid; grid-template-columns: 1.3fr 1fr; gap: 22px; align-items: start; }
.replie { border-top: 1px solid var(--ligne); margin-top: 20px; padding-top: 14px; }
.replie summary { cursor: pointer; font-weight: 700; color: var(--bleu); }
.historique { list-style: none; padding: 0; margin: 0; display: grid; gap: 12px; font-size: 0.9rem; }
.historique li { padding-left: 14px; border-left: 3px solid var(--turquoise); }
.apercu-mail { border: 1px solid var(--ligne); border-radius: 12px; background: var(--ciel); margin: 8px 0 4px; }
.recherche { display: flex; gap: 10px; margin-bottom: 20px; max-width: 560px; }
.tableau-conteneur { overflow-x: auto; background: var(--blanc); border: 1px solid var(--ligne); border-radius: var(--rayon); }
.tableau { width: 100%; border-collapse: collapse; font-size: 0.92rem; }
.tableau th, .tableau td { text-align: left; padding: 11px 14px; border-bottom: 1px solid var(--ligne); vertical-align: top; }
.tableau th { font-size: 0.78rem; text-transform: uppercase; letter-spacing: 0.05em; color: var(--blanc); background: var(--bleu); }
.semaine-titre { font-size: 0.95rem; color: var(--bleu); margin: 18px 0 8px; }
.liste-journees { list-style: none; padding: 0; margin: 0; display: grid; gap: 8px; }
.liste-journees li { padding: 10px 12px; border-radius: 10px; background: #f8fafb; border-left: 4px solid var(--kine); font-size: 0.92rem; scroll-margin-top: 90px; }
.lj-tete { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 12px; margin-bottom: 8px; }
.lj-fermer { margin-left: auto; font-size: 0.85rem; }
.lj-departs { display: flex; flex-wrap: wrap; gap: 6px; }
.lc-date { font-weight: 700; color: var(--nuit); }
/* Un départ (créneau) : libre, bloqué par un rendez-vous voisin, ou réservé. */
.depart { display: inline-flex; align-items: center; gap: 6px; padding: 4px 6px 4px 10px; border-radius: 8px; font-size: 0.86rem; font-weight: 700; line-height: 1.3; text-decoration: none; }
.depart-libre { background: var(--blanc); color: var(--bleu); border: 1.5px solid var(--turquoise); }
.depart-bloque { background: var(--off-clair); color: var(--off); border: 1.5px dashed var(--champ); font-weight: 600; }
.depart-pris { padding-right: 10px; font-weight: 600; }
.depart-pris strong { font-weight: 800; }
.depart-fermer { border: 0; background: none; color: var(--gris); font: 700 1rem/1 var(--police); padding: 0 4px; cursor: pointer; border-radius: 4px; }
.depart-fermer:hover { color: var(--alerte); background: var(--alerte-clair); }
.legende-departs { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 8px; font-size: 0.85rem; color: var(--gris); }
.legende-departs .depart { padding-right: 10px; }
.apercu-series { color: var(--bleu); font-weight: 600; min-height: 1.3em; }
/* Liste des études (onglet Patients) */
.barre-patients { display: flex; flex-wrap: wrap; gap: 12px 20px; align-items: center; justify-content: space-between; margin-bottom: 16px; }
.barre-patients .recherche { margin: 0; }
.filtres { display: flex; flex-wrap: wrap; gap: 6px; }
.filtres a { display: inline-flex; align-items: center; gap: 8px; border: 1.5px solid var(--champ); background: var(--blanc); border-radius: 999px; padding: 6px 8px 6px 14px; font-weight: 700; font-size: 0.88rem; color: var(--gris); text-decoration: none; }
.filtres a[aria-current='page'] { background: var(--bleu); border-color: var(--bleu); color: var(--blanc); }
.filtres a[aria-current='page'] .compteur { background: rgb(255 255 255 / 18%); color: var(--blanc); }
.tableau-etudes td { vertical-align: middle; }
.tableau-etudes .pastille-kine { margin-top: 4px; }
.cr { display: inline-flex; align-items: center; gap: 8px; text-decoration: none; color: var(--gris); font-weight: 600; }
.pastille-cr { display: inline-grid; place-items: center; width: 28px; height: 28px; border-radius: 50%; flex: none; vertical-align: middle; }
.pastille-cr-attente { background: var(--off-clair); color: #a9b5bf; border: 2px dashed #c3ccd4; }
a.cr:hover .pastille-cr-attente { border-color: var(--ok); color: var(--ok); }
.pastille-cr-futur { opacity: 0.45; }
.pastille-cr-ok { background: var(--ok); color: var(--blanc); border: 2px solid var(--ok); }
.legende-cr { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin-top: 12px; }
.legende-cr .pastille-cr { width: 22px; height: 22px; }
.lien-planifier { font-weight: 700; }
/* Cartes cadeaux (espace kiné) */
.tableau-cartes td { vertical-align: middle; }
.pour { display: flex; align-items: center; gap: 10px; }
.mini-carte { flex: none; display: grid; place-items: center; width: 28px; height: 38px; border-radius: 5px; font: 800 0.8rem var(--police); box-shadow: 0 1px 3px rgb(10 39 64 / 25%); }
.code-carte { letter-spacing: 0.06em; font-variant-numeric: tabular-nums; }
.message-carte { color: var(--gris); font-style: italic; }
.venue { display: inline-flex; align-items: center; gap: 8px; margin: 0; }
.venue button { cursor: pointer; padding: 0; }
.venue .pastille-cr-attente:hover { border-color: var(--ok); color: var(--ok); }
.encaisser { display: flex; flex-wrap: wrap; gap: 6px; margin: 0 0 6px; }
.encaisser select { padding: 6px 8px; border: 1.5px solid var(--champ); border-radius: 8px; font: 600 0.85rem var(--police); }
.actions-carte { font-size: 0.9rem; min-width: 210px; }
.ajout-carte { margin-top: 20px; }
/* Adresse du rendez-vous */
.choix-lieu { display: inline-flex; flex-wrap: wrap; gap: 6px; vertical-align: middle; }
.bouton-lieu { border: 1.5px solid var(--champ); background: var(--blanc); color: var(--bleu); border-radius: 999px; padding: 5px 12px; font: 700 0.85rem var(--police); cursor: pointer; }
.bouton-lieu:hover { border-color: var(--bleu); }
.bouton-lieu[aria-pressed='true'] { background: var(--bleu); border-color: var(--bleu); color: var(--blanc); }
.puce-sans-lieu { color: var(--attente); font-weight: 700; }
.panneau-alerte { border-color: #f3c969; box-shadow: inset 4px 0 0 #f3c969; }
/* Nouveau rendez-vous : heures libres pour une séance de suivi */
.occupation { background: var(--ciel); border-radius: 12px; padding: 12px 14px; margin: 4px 0 12px; }
.occupation p { margin: 0 0 8px; }
.depart-choix { cursor: pointer; padding: 5px 12px; font: 700 0.9rem var(--police); }
.depart-choix[aria-pressed='true'] { background: var(--bleu); color: var(--blanc); border-color: var(--bleu); }
.plage { border: 1px solid var(--ligne); border-radius: 12px; padding: 12px 14px 4px; margin: 0 0 12px; background: #f8fafb; }
.plage .case { margin-bottom: 8px; }
.plage-off .grille-champs { opacity: 0.45; }
.resultats .alerte { margin-bottom: 10px; }
.liste-questions { margin: 0; padding-left: 22px; display: grid; gap: 6px; }

/* Page charte */
.charte-logos { display: grid; grid-template-columns: repeat(2, 1fr); gap: 18px; }
.charte-logo { border-radius: var(--rayon); padding: 32px; display: grid; place-items: center; min-height: 200px; border: 1px solid var(--ligne); }
.charte-logo img { max-height: 120px; width: auto; }
.charte-logo.fond-bleu { background: var(--degrade); }
.charte-logo.fond-ciel { background: var(--ciel); }
.charte-logo figcaption { font-size: 0.85rem; color: var(--gris); margin-top: 10px; }
.charte-logo.fond-bleu figcaption { color: var(--ciel); }
.nuancier { display: grid; grid-template-columns: repeat(auto-fill, minmax(190px, 1fr)); gap: 16px; }
.nuance { border-radius: var(--rayon); overflow: hidden; border: 1px solid var(--ligne); background: var(--blanc); }
.nuance-couleur { height: 96px; }
.nuance div:last-child { padding: 12px 14px; font-size: 0.9rem; }
.nuance strong { display: block; color: var(--nuit); }
.nuance code { background: none; padding: 0; color: var(--gris); }
.specimen-affiche { font-family: var(--affiche); text-transform: uppercase; font-size: clamp(3rem, 7vw, 5rem); line-height: 0.92; color: var(--bleu); }
.specimen-affiche .contour { -webkit-text-stroke: 2px var(--bleu); }
.composants { display: flex; gap: 14px; flex-wrap: wrap; align-items: center; }
.icones-charte { display: flex; gap: 22px; flex-wrap: wrap; color: var(--turquoise); }
.bandeau-demo { position: relative; background: var(--degrade); border-radius: var(--rayon); overflow: hidden; padding-top: 40px; }

/* Boîte mail de démonstration (outil local, hors charte du site) */
.bm-lanceur {
  position: fixed; right: 20px; bottom: 20px; z-index: 40; display: inline-flex; align-items: center; gap: 10px;
  padding: 12px 18px; border-radius: 999px; border: 2px solid var(--turquoise); background: var(--nuit); color: var(--blanc); font: 700 0.92rem var(--police);
  box-shadow: 0 8px 24px rgb(0 0 0 / 25%); cursor: pointer;
}
.bm-lanceur:hover { background: var(--bleu); }
.bm-icone { font-size: 1.1rem; color: var(--turquoise); }
.bm-badge { background: var(--turquoise); color: var(--nuit); border-radius: 999px; min-width: 22px; height: 22px; padding: 0 6px; display: inline-grid; place-items: center; font-size: 0.8rem; }
.bm-pulse { animation: bm-pulse 1.8s ease-in-out infinite; }
@keyframes bm-pulse { 50% { box-shadow: 0 0 0 8px rgb(108 184 198 / 35%), 0 8px 24px rgb(0 0 0 / 25%); } }
.bm-toast { position: fixed; right: 20px; bottom: 82px; z-index: 41; background: var(--nuit); color: var(--blanc); padding: 12px 16px; border-radius: 12px; max-width: 360px; box-shadow: var(--ombre); font-size: 0.92rem; border-left: 4px solid var(--turquoise); }
.bm-fond { position: fixed; inset: 0; background: rgb(10 39 64 / 55%); z-index: 44; }
.bm-panneau {
  position: fixed; z-index: 45; inset: 24px; margin: auto; max-width: 1180px; max-height: 860px; background: var(--blanc);
  border-radius: 18px; box-shadow: 0 24px 80px rgb(0 0 0 / 35%); display: grid; grid-template-rows: auto auto 1fr auto; overflow: hidden;
}
.bm-entete { display: flex; justify-content: space-between; align-items: flex-start; gap: 16px; padding: 18px 22px 8px; }
.bm-entete h2 { font-size: 1.25rem; margin: 0 0 2px; color: var(--bleu); }
.bm-entete p { margin: 0; color: var(--gris); font-size: 0.9rem; }
.bm-fermer { border: 0; background: var(--ciel); width: 38px; height: 38px; border-radius: 50%; font-size: 1.4rem; cursor: pointer; color: var(--nuit); }
.bm-filtres { display: flex; gap: 6px; padding: 8px 22px 12px; border-bottom: 1px solid var(--ligne); }
.bm-filtres button { border: 1.5px solid var(--champ); background: var(--blanc); border-radius: 999px; padding: 6px 14px; cursor: pointer; font: 700 0.85rem var(--police); color: var(--gris); }
.bm-filtres button[aria-pressed='true'] { background: var(--bleu); color: var(--blanc); border-color: var(--bleu); }
.bm-corps { display: grid; grid-template-columns: 340px 1fr; min-height: 0; }
.bm-liste { list-style: none; margin: 0; padding: 0; overflow-y: auto; border-right: 1px solid var(--ligne); }
.bm-liste-vide { padding: 24px; color: var(--gris); font-size: 0.92rem; }
.bm-item { display: grid; grid-template-columns: auto 1fr; gap: 2px 8px; width: 100%; text-align: left; padding: 12px 18px; border: 0; border-bottom: 1px solid var(--ligne); background: var(--blanc); cursor: pointer; font: 400 0.88rem/1.4 var(--police); color: var(--texte); }
.bm-item:hover { background: #f5f8fa; }
.bm-item.bm-actif { background: var(--ciel); }
.bm-non-lu .bm-sujet { font-weight: 800; }
.bm-non-lu { box-shadow: inset 4px 0 0 var(--turquoise); }
.bm-role { font-size: 0.72rem; font-weight: 800; text-transform: uppercase; letter-spacing: 0.05em; padding: 1px 8px; border-radius: 999px; justify-self: start; }
.bm-role-patient { background: var(--ciel); color: var(--bleu); }
.bm-role-kine { background: var(--nuit); color: var(--blanc); }
.bm-date { justify-self: end; color: var(--gris); font-size: 0.78rem; }
.bm-dest { grid-column: 1 / -1; color: var(--gris); font-size: 0.8rem; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.bm-sujet { grid-column: 1 / -1; }
.bm-lecture { display: flex; flex-direction: column; min-height: 0; background: var(--ciel); }
.bm-vide { padding: 32px; color: var(--gris); }
.bm-retour { display: none; }
.bm-lecture-entete { padding: 14px 20px; background: var(--blanc); border-bottom: 1px solid var(--ligne); font-size: 0.88rem; }
.bm-lecture-entete p { margin: 0; }
.bm-lecture-entete span { color: var(--gris); display: inline-block; min-width: 52px; }
.bm-pj { display: inline-block; margin-top: 8px; padding: 6px 12px; border-radius: 8px; background: var(--ciel); text-decoration: none; font-weight: 700; }
.bm-cadre { flex: 1; min-height: 0; overflow-y: auto; background: var(--ciel); }
.bm-outils { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; padding: 12px 22px; border-top: 1px solid var(--ligne); font-size: 0.85rem; color: var(--gris); background: #f5f8fa; }
.bm-outils button { border: 1.5px solid var(--champ); background: var(--blanc); border-radius: 8px; padding: 6px 12px; cursor: pointer; font: 700 0.82rem var(--police); color: var(--nuit); }
.bm-outils button:hover { border-color: var(--bleu); }
.bm-outils .bm-danger { color: var(--alerte); margin-left: auto; }

/* Écrans moyens et étroits */
@media (max-width: 1200px) {
  .agenda-grille { grid-template-columns: 1fr; }
  .panneaux { grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); }
}
@media (max-width: 960px) {
  .etude-grille, .equipe-grille, .infos-grille, .fiche-grille, .deux-encadres { grid-template-columns: 1fr; }
  .piliers { grid-template-columns: repeat(2, 1fr); row-gap: 28px; }
  .piliers li:nth-child(3) { border-left: 0; }
  .pied-colonnes { grid-template-columns: repeat(2, 1fr); row-gap: 26px; }
  .pied-col:nth-child(3) { border-left: 0; }
  .charte-logos { grid-template-columns: 1fr; }
}
@media (max-width: 640px) {
  body { font-size: 16px; }
  .site-entete, .admin-entete { position: static; }
  .entete-ligne { gap: 8px; min-height: 0; padding-block: 10px; }
  .marque img { height: 46px; }
  .nav { gap: 4px 14px; }
  .nav a:not(.btn) { font-size: 0.88rem; }
  .site-entete .nav .btn { display: none; }
  .hero-filigrane { width: 90vw; right: -30%; top: 2%; }
  .grille-champs { grid-template-columns: 1fr; }
  .nav-semaines { gap: 6px; }
  .nav-semaines .btn, .nav-semaines .btn-secondaire { padding: 8px 12px; font-size: 0.9rem; }
  .vues-agenda a { padding: 8px 10px; font-size: 0.85rem; }
  .progression li { font-size: 0.72rem; }
  .resume div, .reponse, .infos div { grid-template-columns: 1fr; gap: 2px; }
  .ld-ligne { grid-template-columns: 1fr; }
  .piliers { grid-template-columns: 1fr; }
  .piliers li { border-left: 0; border-top: 2px solid var(--turquoise); padding-top: 22px; }
  .piliers li:first-child { border-top: 0; padding-top: 8px; }
  .pied-colonnes { grid-template-columns: 1fr; }
  .pied-col { border-left: 0; border-top: 1px solid rgb(255 255 255 / 25%); padding-top: 18px; }
  .pied-col:first-child { border-top: 0; padding-top: 0; }
  .etape-carte { flex-direction: column; }
  .bm-lanceur span:not(.bm-icone, .bm-badge) { display: none; }
  .bm-panneau { inset: 0; border-radius: 0; max-height: none; }
  .bm-corps { grid-template-columns: 1fr; }
  .bm-lecture { display: none; }
  .bm-lecture-ouverte .bm-liste { display: none; }
  .bm-lecture-ouverte .bm-lecture { display: flex; }
  .bm-retour { display: block; border: 0; background: var(--blanc); text-align: left; padding: 12px 20px; font: 700 0.9rem var(--police); color: var(--bleu); border-bottom: 1px solid var(--ligne); }
  .bm-outils { flex-wrap: nowrap; overflow-x: auto; padding: 10px 16px; }
  .bm-outils button { flex: none; }
  .bm-outils .bm-danger { margin-left: 0; }
}

/* ---------- Planning de la semaine (Mes créneaux) ---------- */
.lieu-1 { --lieu: #2C7889; --lieu-fond: #E3F1F4; }
.lieu-2 { --lieu: #A45A12; --lieu-fond: #FBEBD9; }
.tag-lieu { display: inline-block; font-size: .75rem; font-weight: 700; color: var(--lieu); background: var(--lieu-fond); border-radius: 999px; padding: 1px 9px; }
.lj-lieux { margin-left: 4px; font-size: .8rem; }
.planning .alerte { margin-block: 10px; }
.planning-defile { overflow-x: auto; margin-block: 14px 6px; }
.tableau-planning { border-collapse: separate; border-spacing: 4px; min-width: 640px; width: 100%; }
.tableau-planning thead th { font-size: .78rem; text-transform: uppercase; letter-spacing: .06em; color: var(--gris); font-weight: 700; text-align: center; }
.tableau-planning th[scope="rowgroup"] { text-align: left; padding-right: 6px; white-space: nowrap; }
.tableau-planning th.demi { text-align: left; font-size: .8rem; font-weight: 600; color: var(--gris); white-space: nowrap; padding-right: 6px; }
.tableau-planning tr.premiere > * { padding-top: 12px; }
.tableau-planning tbody tr.premiere:first-child > * { padding-top: 0; }
.choix-lieu-planning { width: 100%; min-width: 90px; font: inherit; font-size: .85rem; font-weight: 600; border-radius: 8px; padding: 7px 8px; border: 1px solid var(--ligne); background: #fff; color: var(--gris); cursor: pointer; }
.choix-lieu-planning[data-lieu="1"] { background: #E3F1F4; border-color: #9CCBD5; color: #1F5F6D; }
.choix-lieu-planning[data-lieu="2"] { background: #FBEBD9; border-color: #E6B985; color: #844609; }
.planning-heures { margin-top: 10px; }
.ouvrir-planning { border-top: 1px solid var(--ligne); margin-top: 18px; padding-top: 16px; }
.ouvrir-planning h3 { margin: 0 0 6px; }
.choix-kines { border: 0; padding: 0; margin: 4px 0; display: flex; gap: 18px; align-items: center; flex-wrap: wrap; }
.choix-kines legend { float: left; font-weight: 600; margin-right: 6px; }
.gh-plage-lieu { position: absolute; right: 6px; left: auto; z-index: 2; font-size: .62rem; font-weight: 700; letter-spacing: .04em; text-transform: uppercase; color: var(--lieu); background: var(--lieu-fond); border-radius: 4px; padding: 0 5px; pointer-events: none; line-height: 1.5; }
.gh-vue-mois .gh-plage-lieu { display: none; }
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; }
.planning .grille-champs { grid-template-columns: repeat(auto-fill, minmax(170px, 1fr)); }

/* ---------- Factures ---------- */
.infos-facturation summary { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; cursor: pointer; list-style: none; }
.infos-facturation summary::-webkit-details-marker { display: none; }
.infos-facturation summary h2 { margin: 0; }
.infos-facturation summary::before { content: "▸"; color: var(--bleu); }
.infos-facturation[open] summary::before { content: "▾"; }
.infos-facturation .formulaire { margin-top: 14px; }
.filtres-factures { display: flex; gap: 12px; align-items: end; flex-wrap: wrap; margin: 22px 0 14px; }
.filtres-factures label { display: flex; flex-direction: column; gap: 4px; font-weight: 600; font-size: .85rem; }
.totaux-factures { display: grid; grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); gap: 12px; margin-bottom: 16px; }
.totaux-factures > div { background: var(--blanc); border: 1px solid var(--ligne); border-radius: 14px; padding: 14px 16px; display: flex; flex-direction: column; gap: 2px; }
.totaux-factures strong { font-size: 1.35rem; color: var(--bleu); }
.label-total { font-size: .75rem; font-weight: 700; text-transform: uppercase; letter-spacing: .06em; color: var(--gris); }
.tableau-defile { overflow-x: auto; }
.tableau-factures { width: 100%; border-collapse: collapse; background: var(--blanc); border-radius: 14px; overflow: hidden; border: 1px solid var(--ligne); min-width: 760px; }
.tableau-factures th { background: var(--bleu); color: var(--blanc); text-align: left; font-size: .75rem; text-transform: uppercase; letter-spacing: .05em; padding: 10px 12px; }
.tableau-factures td { padding: 10px 12px; border-top: 1px solid var(--ligne); vertical-align: middle; }
.tableau-factures .num { text-align: right; white-space: nowrap; font-variant-numeric: tabular-nums; }
.tableau-factures tr.annulee td { color: var(--gris); }
.tableau-factures tr.annulee .num { text-decoration: line-through; }
.lignes-facture { display: flex; flex-direction: column; gap: 8px; }
.lf-tete, .lf-ligne { display: grid; grid-template-columns: minmax(0, 1fr) 70px 110px; gap: 8px; }
.lf-tete { font-size: .75rem; font-weight: 700; text-transform: uppercase; letter-spacing: .05em; color: var(--gris); }
.lf-ligne input { width: 100%; box-sizing: border-box; }
@media (max-width: 560px) { .lf-tete { display: none; } .lf-ligne { grid-template-columns: 1fr 1fr; } .lf-ligne input:first-child { grid-column: 1 / -1; } }
.form-facture h2 { margin-top: 18px; }
.form-facture h2:first-of-type { margin-top: 0; }
.liste-factures li { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
details.carte > summary { display: flex; align-items: center; gap: 10px; cursor: pointer; list-style: none; }
details.carte > summary::-webkit-details-marker { display: none; }
details.carte > summary h2 { margin: 0; }
details.carte:not(.infos-facturation) > summary::before { content: "▸"; color: var(--bleu); }
details.carte:not(.infos-facturation)[open] > summary::before { content: "▾"; }
details.carte[open] > summary + * { margin-top: 14px; }
button.mini-carte { border: 0; cursor: zoom-in; padding: 0; }
button.mini-carte:focus-visible { outline: 3px solid var(--turquoise); outline-offset: 2px; }
.apercu-flottant { position: fixed; z-index: 50; pointer-events: none; border-radius: 8px; overflow: hidden; box-shadow: 0 18px 50px -12px rgb(10 39 64 / 45%); }
.tableau-cartes .pour { cursor: default; }

/* ---------- En-tête de l'espace kiné : 5 onglets, bouton « + Rendez-vous », menu du kiné ---------- */
.admin-entete .entete-ligne { flex-wrap: nowrap; }
.admin-entete .nav { flex: 1; justify-content: center; gap: 6px 22px; }
.admin-entete .nav a:not(.btn) { font-size: 0.95rem; }
.admin-entete .marque span { display: inline; }
.entete-actions { display: flex; align-items: center; gap: 14px; flex-shrink: 0; }
.btn-nouveau { display: inline-flex; align-items: center; gap: 6px; background: var(--turquoise); color: var(--nuit); font-weight: 800; font-size: 0.9rem; text-decoration: none; border-radius: 999px; padding: 8px 16px; white-space: nowrap; }
.btn-nouveau span { font-size: 1.15rem; line-height: 1; }
.btn-nouveau:hover, .btn-nouveau[aria-current='page'] { background: var(--blanc); color: var(--nuit); }
.menu-kine { position: relative; }
.menu-kine summary { list-style: none; display: flex; align-items: center; gap: 6px; cursor: pointer; color: #c9dbe8; padding: 4px 0; border-bottom: 2px solid transparent; }
.menu-kine summary::-webkit-details-marker { display: none; }
.menu-kine summary.actif { border-bottom-color: var(--turquoise); }
.menu-kine .chevron { width: 14px; height: 14px; flex: none; transition: transform .15s ease; }
.menu-kine[open] .chevron { transform: rotate(180deg); }
.menu-kine-liste { position: absolute; right: 0; top: calc(100% + 10px); background: var(--blanc); border-radius: 12px; box-shadow: 0 14px 40px -12px rgb(10 39 64 / 40%); padding: 8px; min-width: 180px; display: flex; flex-direction: column; z-index: 30; }
.admin-entete .menu-kine-liste a, .menu-kine-liste .lien-bouton { color: var(--nuit) !important; text-decoration: none; font-weight: 600; padding: 9px 12px; border-radius: 8px; border: 0; text-align: left; font-size: 0.95rem; background: none; width: 100%; }
.admin-entete .menu-kine-liste a:hover, .menu-kine-liste .lien-bouton:hover { background: var(--ciel); }
.admin-entete .menu-kine-liste a[aria-current='page'] { background: var(--ciel); border-bottom: 0; }
.menu-kine-liste form { margin: 0; border-top: 1px solid var(--ligne); margin-top: 6px; padding-top: 6px; }
@media (max-width: 1100px) { .admin-entete .marque span { display: none; } .admin-entete .nav { gap: 6px 16px; } }
@media (max-width: 860px) {
  .admin-entete .entete-ligne { flex-wrap: wrap; }
  .admin-entete .nav { order: 3; flex-basis: 100%; justify-content: flex-start; overflow-x: auto; flex-wrap: nowrap; padding-bottom: 4px; }
  .admin-entete .nav a { white-space: nowrap; }
}
.menu-kine-liste .lien-bouton { display: block; text-align: left; text-decoration: none; }

/* ---------- Règlements (patients, fiche rendez-vous) ---------- */
.cellule-reglement, .resume .cellule-reglement { display: flex; flex-direction: column; align-items: flex-start; gap: 10px; }
.resume .cellule-reglement .petit { font-weight: 600; }
.regle { display: flex; align-items: center; gap: 12px; margin: 0; min-height: 30px; }
/* Pastille-bouton : même rendu dans tous les navigateurs (Safari ignore la grille sur un bouton) et coche au centre. */
button.pastille-cr { display: inline-flex; align-items: center; justify-content: center; box-sizing: border-box; width: 30px; height: 30px; padding: 0; margin: 0; font: inherit; line-height: 0; cursor: pointer; appearance: none; -webkit-appearance: none; }
.pastille-cr svg { display: block; flex: none; margin: 0; }
/* Menu du mode de règlement dessiné par le site (le menu natif de Safari déborde sur le prix). */
.regle select { appearance: none; -webkit-appearance: none; box-sizing: border-box; height: 30px; margin: 0; font: inherit; font-size: .8rem; line-height: 1.2; color: var(--nuit); padding: 0 28px 0 10px; border: 1px solid var(--ligne); border-radius: 8px; max-width: 150px;
  background: var(--blanc) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 24 24' fill='none' stroke='%2316243F' stroke-width='2.5' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E") no-repeat right 9px center; }
.prix-rdv { display: block; font-weight: 700; color: var(--nuit); line-height: 1.25; }
.prix-rdv.modifie { color: #A45A12; }
.totaux-reglements { margin: 6px 0 18px; }

/* Carte cadeau avec un mot : on resserre le haut pour lui laisser la place (styles en ligne, d'où !important). */
.carte-cadeau[data-compact] .cc-logo { height: 70px !important; margin-bottom: 4px !important; }
.carte-cadeau[data-compact] .cc-titre { zoom: .8; }
.carte-cadeau[data-compact] .cc-ticket { margin-top: 12px !important; padding-top: 14px !important; gap: 3px !important; }
.carte-cadeau[data-compact] .cc-nom { font-size: 44px !important; }
/* Petit mot sur la carte : entre guillemets, en texte simple, pour ne pas se mêler au nom manuscrit. */
.carte-cadeau [data-carte-mot]::before { content: '« '; }
.carte-cadeau [data-carte-mot]::after { content: ' »'; }

/* ---------- Page Créneaux : trois étapes ---------- */
.etape-num { display: inline-grid; place-items: center; width: 30px; height: 30px; border-radius: 50%; background: var(--nuit); color: #fff; font-weight: 800; font-size: .9rem; flex: none; }
.etape-tete { display: flex; align-items: center; gap: 12px; margin-bottom: 6px; }
.etape-tete h2 { margin: 0; }
.etape-reglage { background: var(--ciel); color: var(--nuit); font-weight: 400; }
.sous-titre-carte { margin: 18px 0 2px; font-size: 1rem; }
.planning-horaires { margin: 0; }
.planning-lecture td { text-align: center; padding: 6px 4px; background: var(--off-clair, #F4F6F8); border-radius: 8px; }
.planning-lecture .tag-lieu { font-size: .78rem; }
.modifier-planning { margin-top: 12px; }
.modifier-planning[open] { padding-bottom: 4px; }
.replie-carte > summary { list-style: none; cursor: pointer; display: flex; gap: 12px; align-items: flex-start; }
.replie-carte > summary::-webkit-details-marker { display: none; }
details.carte.replie-carte > summary::before { content: none; }
.replie-carte > summary .etape-num { margin-top: 1px; }
.replie-carte > summary .etape-num { margin: 0; }
.replie-carte > summary > span:last-child { display: flex; flex-direction: column; gap: 2px; flex: 1; }
.replie-carte > summary .titre-summary { font-size: 1.15rem; color: var(--nuit); }
.replie-carte > summary .titre-summary::after { content: ' ▸'; color: var(--bleu); }
.replie-carte[open] > summary .titre-summary::after { content: ' ▾'; }
.replie-carte[open] > summary { margin-bottom: 14px; }
.replie-carte .aide { margin: 0; }
.en-un-coup { margin-top: -4px; }
.comment-ca-marche { margin: -6px 0 20px; border-top: 0; padding-top: 0; }
.comment-ca-marche ul { margin-top: 10px; }
.semaines-suivantes { margin-top: 18px; }
.regles-creneaux .regle-bloc { border: 0; margin: 0 0 18px; padding: 16px 0 0; border-top: 1px solid var(--ligne); }
.regles-creneaux .regle-bloc legend { font-weight: 700; color: var(--nuit); padding: 0; margin-bottom: 8px; float: left; width: 100%; }
.regles-creneaux .regle-bloc legend + * { clear: left; }
.regles-creneaux .regle-bloc .case { margin-bottom: 8px; }
.regle-battement { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; font-weight: 600; }
.regle-battement select { width: auto; min-width: 260px; }
#regles .ma-couleur { border-top: 1px solid var(--ligne); padding-top: 14px; }
select.champ-heure { width: 100%; }
.plage-off select.champ-heure { pointer-events: none; opacity: .55; }
.formulaire .regle-battement select, .regles-creneaux .regle-battement select { max-width: 360px; }
.sans-cadre { border: 0; margin: 0; padding: 0; min-width: 0; }
.apercu-questionnaire .questionnaire { margin-top: 0; }
.apercu-questionnaire fieldset[disabled] input, .apercu-questionnaire fieldset[disabled] textarea { background: var(--off-clair, #F4F6F8); }
.ld-aucun { padding: 6px 0; border-bottom: 1px solid var(--ligne); }
.details-oui { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 10px 14px; margin-top: 10px; }
.details-oui[hidden] { display: none; }
.details-oui .detail { margin: 0 !important; }

/* ---------- Créneaux à venir : jour par jour, matin / après-midi ---------- */
.cv-legende { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 10px; font-size: .85rem; color: var(--gris); margin: 4px 0 10px; }
.cv-pastille { display: inline-block; width: 12px; height: 12px; border-radius: 3px; margin-left: 6px; }
.cv-pastille.cv-libre { background: #2E9E63; }
.cv-pastille.cv-pris { background: #9AA8B5; }
.cv-pastille.cv-ferme { background: transparent; border: 2px dashed #C9821F; }
.cv-jour { border: 1px solid var(--ligne); border-radius: 12px; padding: 12px 16px; margin-bottom: 10px; background: #fff; }
.cv-date { margin: 0 0 8px; font-size: 1rem; }
.cv-date a { color: var(--nuit); text-decoration: none; }
.cv-date a:hover { text-decoration: underline; }
.cv-ferie { margin: 0; color: var(--gris); }
.cv-kine { display: grid; grid-template-columns: 110px minmax(0, 1fr); gap: 10px; padding: 8px 0; border-top: 1px solid var(--ligne); scroll-margin-top: 120px; }
.cv-kine:first-of-type { border-top: 0; }
.cv-kine:target { background: color-mix(in srgb, var(--turquoise) 10%, transparent); border-radius: 8px; }
.cv-qui { padding-top: 4px; }
.cv-demis { display: grid; gap: 6px; }
.cv-demi { display: grid; grid-template-columns: 92px 100px minmax(0, 1fr) auto; align-items: center; gap: 10px; padding: 6px 10px; border-radius: 8px; border-left: 4px solid transparent; background: var(--off-clair, #F4F6F8); font-size: .92rem; }
.cv-demi.cv-libre { border-left-color: #2E9E63; }
.cv-demi.cv-pris { border-left-color: #9AA8B5; }
.cv-demi.cv-ferme { border-left-color: #C9821F; background: #FFF8EE; }
.cv-demi.cv-ferme .cv-etat { color: #9A5A0E; font-weight: 700; }
.cv-demi.cv-rien { display: block; background: transparent; padding-left: 0; }
.cv-moment { font-weight: 700; color: var(--nuit); }
.cv-etat { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 6px; color: var(--nuit); }
.cv-sep { color: var(--gris); }
.cv-rdv { font-size: .85rem; padding: 2px 9px; border-radius: 999px; background: #E6EEF8; color: var(--nuit); text-decoration: none; }
.cv-rdv:hover { text-decoration: underline; }
.cv-actions { display: flex; gap: 8px; justify-content: flex-end; }
.cv-bouton { appearance: none; font: inherit; font-size: .8rem; font-weight: 700; padding: 4px 12px; border-radius: 999px; border: 1.5px solid var(--bleu); background: #fff; color: var(--bleu); cursor: pointer; white-space: nowrap; }
.cv-bouton:hover { background: var(--bleu); color: #fff; }
.cv-bouton-ouvrir { border-color: #1F7A4C; color: #1F7A4C; }
.cv-bouton-ouvrir:hover { background: #1F7A4C; color: #fff; }
.cv-detail { font-size: .8rem; margin-top: 2px; }
.cv-detail summary { cursor: pointer; color: var(--gris); font-weight: 600; }
.cv-detail .lj-departs { margin-top: 6px; }
@media (max-width: 760px) {
  .cv-kine { grid-template-columns: 1fr; gap: 4px; }
  .cv-demi { grid-template-columns: auto auto 1fr; }
  .cv-etat { grid-column: 1 / -1; }
  .cv-actions { grid-column: 1 / -1; justify-content: flex-start; }
}

/* ---------- Espace kiné sur téléphone : barre d'onglets en bas, en-tête allégé ---------- */
.nav-bas { display: none; }
@media (max-width: 760px) {
  .admin-entete .nav { display: none; }
  .admin-entete .entete-ligne { flex-wrap: nowrap; min-height: 60px; padding-block: 6px; }
  .admin-entete .marque img { height: 38px; width: auto; }
  .admin-entete .btn-nouveau { padding: 8px 14px; font-size: .9rem; }
  .nav-bas {
    display: grid; grid-template-columns: repeat(5, 1fr); position: fixed; z-index: 30; left: 0; right: 0; bottom: 0;
    background: var(--nuit); padding: 6px 4px calc(6px + env(safe-area-inset-bottom)); box-shadow: 0 -6px 20px rgb(0 0 0 / 18%);
  }
  .nav-bas a { display: flex; flex-direction: column; align-items: center; gap: 3px; padding: 5px 2px; color: #9fb6c9; text-decoration: none; font-size: .7rem; font-weight: 700; border-radius: 10px; }
  .nav-bas a[aria-current='page'] { color: #fff; background: rgb(255 255 255 / 10%); }
  .nav-bas a[aria-current='page'] svg { color: var(--turquoise); }
  body.admin { padding-bottom: calc(76px + env(safe-area-inset-bottom)); }
  body.admin .bm-lanceur { bottom: calc(84px + env(safe-area-inset-bottom)); }
  .admin-main h1.titre-affiche { font-size: 2.3rem; }
  .admin-main .chapo { font-size: .98rem; }
  /* Agenda : légende réduite aux kinés, plus de place pour les rendez-vous. */
  .legende-gh, .puce-exemple { display: none; }
}
@media (max-width: 760px) {
  .btn-ouvrir-agenda { display: none; }
  .totaux-factures { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 6px; }
  .totaux-factures > div { padding: 10px; border-radius: 10px; }
  .totaux-factures strong { font-size: 1.05rem; }
  .totaux-factures .label-total { font-size: .62rem; letter-spacing: .04em; }
  .totaux-factures .muted.petit { font-size: .7rem; }
}
/* Patients sur téléphone : une fiche par étude au lieu d'un tableau à faire défiler. */
@media (max-width: 760px) {
  .tableau-etudes thead { display: none; }
  .tableau-etudes, .tableau-etudes tbody, .tableau-etudes tr, .tableau-etudes td { display: block; width: 100%; }
  .tableau-etudes { min-width: 0 !important; }
  .tableau-conteneur:has(.tableau-etudes) { overflow: visible; border: 0; box-shadow: none; background: transparent; }
  .tableau-etudes tr { background: var(--blanc); border: 1px solid var(--ligne); border-radius: 14px; padding: 12px 14px; margin-bottom: 10px; display: grid; grid-template-columns: 1fr 1fr; gap: 8px 12px; }
  .tableau-etudes td { padding: 0 !important; border: 0 !important; }
  .tableau-etudes td.td-titre:first-child { grid-column: 1 / -1; }
  .tableau-etudes td.td-titre + td.td-titre { grid-column: 1 / -1; padding-bottom: 8px !important; border-bottom: 1px solid var(--ligne) !important; }
  .tableau-etudes td[data-label]::before { content: attr(data-label); display: block; font-size: .68rem; font-weight: 700; text-transform: uppercase; letter-spacing: .05em; color: var(--gris); margin-bottom: 4px; }
  .tableau-etudes td[data-label="Règlement"] { grid-column: 1 / -1; }
}
@media (max-width: 760px) {
  .tableau-etudes td[data-label="Statut"] { order: 1; }
  .tableau-etudes td[data-label="Suivi"] { order: 2; }
  .tableau-etudes td[data-label="Règlement"] { order: 3; }
  .tableau-etudes td[data-label="Rapport"] { order: 4; }
  .tableau-etudes td[data-label="Compte-rendu"] { order: 5; }
  .filtres-etudes, .filtres { gap: 6px; }
}
/* Appli sur l'écran d'accueil (iPhone) : l'en-tête passe sous la barre d'état. */
.admin-entete { padding-top: env(safe-area-inset-top); }
@media (display-mode: standalone) { body.public .vt-entete { padding-top: env(safe-area-inset-top); } }

/* ---------- Connexion à l'espace kiné : un seul écran ---------- */
body.page-connexion { margin: 0; min-height: 100vh; min-height: 100dvh; background: var(--nuit); }
.connexion-ecran { min-height: 100vh; min-height: 100dvh; box-sizing: border-box; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 22px; padding: calc(24px + env(safe-area-inset-top)) 16px calc(24px + env(safe-area-inset-bottom)); }
.connexion-logo img { height: 72px; width: auto; display: block; }
.connexion-carte { width: 100%; max-width: 420px; margin: 0; }
.connexion-carte h1 { font-size: 2.6rem; margin: 0 0 6px; }
.connexion-retour { color: #c9dbe8; font-size: .9rem; }
.connexion-retour:hover { color: #fff; }

/* Réservation en ligne fermée provisoirement */
.etat-ferme, .etat-ouvert { font-size: .8em; padding: .1em .55em; border-radius: 999px; vertical-align: .15em; }
.etat-ferme { background: var(--alerte-clair); color: #7f1d16; }
.etat-ouvert { background: var(--ok-clair); color: #1f5e39; }
.carte-fermeture { border-left: 4px solid #c0392b; }
.bandeau-fermeture { margin-bottom: 1rem; }
.fermeture-message { font-size: 1.1rem; font-weight: 600; color: var(--nuit); }
