:root {
    --texte: #1f2937;
    --texte-doux: #6b7280;
    --fond: #ffffff;
    --fond-doux: #f6f7f9;
    --bordure: #e5e7eb;
    /* Les couleurs du logo du cabinet (Le Perget) : bleu ardoise et dore. */
    --accent: #344e5c;
    --accent-fonce: #263b47;
    --accent-fond: #eef3f5;
    --or: #bc9975;
    --or-clair: #ece2d6;
    /* L'ocre, tire du dore du logo : touches de l'interface (onglet actif,
       aujourd'hui, selection). Le fonce porte du texte blanc lisible. */
    --ocre: #b08452;
    --ocre-fonce: #8f6639;
    --ocre-fond: #f7f0e6;
    --conge: #22c55e;
    --jour-isole: #f59e0b;
    --demi: #3b82f6;
    --alerte: #dc2626;
    --alerte-fond: #fef2f2;
    --ok-fond: #f0fdf4;
    --ok: #15803d;
    --orange-fond: #fff7ed;
    --orange: #c2410c;
    --rayon: 8px;
}

* { box-sizing: border-box; }
body { font-family: system-ui, -apple-system, "Segoe UI", sans-serif; margin: 0; color: var(--texte); background: var(--fond); font-size: 15px; line-height: 1.45; }
main { padding: 1.25rem 1.5rem 3rem; max-width: 1400px; }
h1 { font-size: 1.6rem; margin: 0 0 0.5rem; }
h2 { font-size: 1.2rem; margin: 0 0 1rem; }
a { color: var(--accent); }
.visuellement-cache { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }

/* ── En-tête ─────────────────────────────────────────────────────────────── */
.entete { display: flex; align-items: center; gap: 2rem; padding: 0.7rem 1.5rem; border-bottom: 2px solid var(--or-clair); background: var(--fond); }
.marque { display: flex; align-items: center; gap: 0.75rem; color: var(--texte); text-decoration: none; }
.marque img { display: block; height: 32px; width: auto; }
.marque-app { padding-left: 0.75rem; border-left: 1px solid var(--or); color: var(--texte-doux); font-size: 0.72rem; font-weight: 600; letter-spacing: 0.14em; text-transform: uppercase; }
.entete nav { display: flex; gap: 0.25rem; flex-wrap: wrap; }
.entete nav a { text-decoration: none; color: var(--texte-doux); font-weight: 600; padding: 0.4rem 0.75rem; border-radius: var(--rayon); }
.entete nav a:hover { background: var(--fond-doux); color: var(--texte); }
.entete nav .nav-grise { color: var(--texte-doux); font-weight: 600; padding: 0.4rem 0.75rem; opacity: 0.45; cursor: not-allowed; }
.entete nav a[aria-current="page"] { background: var(--ocre-fond); color: var(--accent); box-shadow: inset 0 -2px 0 var(--ocre); border-radius: var(--rayon) var(--rayon) 0 0; }

.entete-compte { margin-left: auto; display: flex; align-items: center; gap: 0.5rem; font-size: 0.88rem; }
.entete-compte a { color: var(--texte-doux); font-weight: 600; text-decoration: none; padding: 0.3rem 0.5rem; border-radius: var(--rayon); }
.entete-compte a span { color: var(--ocre); font-size: 0.6rem; vertical-align: middle; }
.entete-compte a:hover, .entete-compte a[aria-current="page"] { background: var(--ocre-fond); color: var(--accent); }

/* ── Bandeau de fraîcheur ─────────────────────────────────────────────────── */
.fraicheur { display: flex; align-items: flex-start; gap: 0.6rem; padding: 0.55rem 1.5rem; font-size: 0.9rem; border-bottom: 1px solid var(--bordure); }
.fraicheur-pastille { width: 0.6rem; height: 0.6rem; border-radius: 50%; margin-top: 0.35rem; flex: none; }
.fraicheur-ok { background: var(--ok-fond); }
.fraicheur-ok .fraicheur-pastille { background: var(--ok); }
.fraicheur-alerte { background: var(--alerte-fond); color: #7f1d1d; }
.fraicheur-alerte .fraicheur-pastille { background: var(--alerte); }
.fraicheur-inconnu { background: var(--orange-fond); color: #7c2d12; }
.fraicheur-inconnu .fraicheur-pastille { background: var(--orange); }
.fraicheur-echec { display: block; color: var(--alerte); font-size: 0.85rem; }
.fraicheur-texte { flex: 1; }
.fraicheur-action { margin: 0; flex: none; align-self: center; }
.fraicheur-en-cours { background: var(--accent-fond); color: var(--accent); }
.fraicheur-en-cours .fraicheur-pastille { background: var(--accent); animation: pulsation 1s ease-in-out infinite alternate; }
@keyframes pulsation { from { opacity: 1; } to { opacity: 0.25; } }
@media (prefers-reduced-motion: reduce) { .fraicheur-en-cours .fraicheur-pastille { animation: none; } }

/* ── Boutons, formulaires ─────────────────────────────────────────────────── */
.bouton, button { font: inherit; font-weight: 600; font-size: 0.9rem; padding: 0.45rem 0.9rem; border-radius: var(--rayon); border: 1px solid var(--bordure); background: var(--fond); color: var(--texte); cursor: pointer; text-decoration: none; display: inline-block; }
.bouton:hover, button:hover { background: var(--fond-doux); }
.bouton.principal, button.principal { background: var(--accent); border-color: var(--accent); color: #fff; }
.bouton.principal:hover, button.principal:hover { background: var(--accent-fonce); }
input, select { font: inherit; padding: 0.4rem 0.55rem; border: 1px solid #d1d5db; border-radius: 6px; background: #fff; min-width: 0; }
input:focus, select:focus, button:focus-visible, .bouton:focus-visible { outline: 2px solid var(--accent); outline-offset: 1px; }
form { margin: 1rem 0; display: flex; gap: 1rem; align-items: flex-end; flex-wrap: wrap; }
form.column { flex-direction: column; align-items: stretch; max-width: 26rem; }
label { display: flex; flex-direction: column; gap: 0.3rem; font-size: 0.9rem; font-weight: 600; }
label.choix, label.case { flex-direction: row; align-items: center; gap: 0.5rem; font-weight: 400; }
.facultatif { font-weight: 400; color: var(--texte-doux); }
.aide { color: var(--texte-doux); font-size: 0.88rem; margin: 0.25rem 0 0.75rem; }
.note { color: var(--texte-doux); font-size: 0.85rem; margin-top: 1rem; max-width: 60rem; }
.erreur { color: var(--alerte); }

/* ── Tableaux ─────────────────────────────────────────────────────────────── */
table { border-collapse: collapse; width: 100%; margin-top: 1rem; }
th, td { border: 1px solid var(--bordure); padding: 0.5rem 0.75rem; text-align: left; }
th { background: #faf6f0; }

.badge { display: inline-block; padding: 0.15rem 0.6rem; border-radius: 999px; font-size: 0.8rem; font-weight: 600; white-space: nowrap; }
.badge-demi_journee { background: #dbeafe; color: #1e40af; }
.badge-jour_isole { background: #fef3c7; color: #92400e; }
.badge-conge { background: #dcfce7; color: #166534; }
.badge-weekend { background: #e5e7eb; color: #4b5563; }

/* ── Calendrier : le mois en semaines ────────────────────────────────────── */
.cal-entete { display: flex; align-items: center; gap: 1rem; flex-wrap: wrap; }
.cal-entete h1 { margin: 0; min-width: 11rem; }
.cal-nav { display: flex; gap: 0.35rem; align-items: center; margin: 0; flex-wrap: wrap; }
.cal-nav select { font-weight: 600; font-size: 1rem; padding: 0.4rem 0.6rem; }
.cal-entete [data-declarer] { margin-left: auto; }

.mois { --colonnes: 2.4rem repeat(5, minmax(0, 1fr)) repeat(2, minmax(0, 0.55fr)); border: 1px solid var(--bordure); border-radius: var(--rayon); overflow: hidden; user-select: none; -webkit-user-select: none; background: var(--bordure); display: grid; gap: 1px; }
.mois-entete { display: grid; grid-template-columns: var(--colonnes); gap: 1px; }
.mois-entete > span { background: var(--fond-doux); font-size: 0.8rem; font-weight: 600; color: var(--texte-doux); padding: 0.4rem 0.5rem; text-transform: uppercase; letter-spacing: 0.03em; overflow: hidden; }
.mois-semaine { background: var(--fond-doux); color: var(--ocre-fonce); font-size: 0.72rem; font-weight: 600; text-align: center; padding-top: 0.55rem; }

/* Une semaine : la ligne 1 porte les numeros des jours, les suivantes les
   barres d'absence ; le fond de chaque jour occupe toute la hauteur. */
.semaine { display: grid; grid-template-columns: var(--colonnes); column-gap: 1px; min-height: 6.5rem; background: var(--bordure); }
.semaine > .mois-semaine { grid-column: 1; grid-row: 1 / -1; }
.jour { grid-row: 1 / -1; background: var(--fond); cursor: pointer; min-width: 0; }
.jour:hover { box-shadow: inset 0 0 0 2px var(--or-clair); }
.jour:focus-visible { outline: 2px solid var(--accent); outline-offset: -2px; }
.jour-tete { grid-row: 1; z-index: 1; display: flex; align-items: center; gap: 0.35rem; padding: 0.3rem 0.4rem 0.2rem; min-width: 0; pointer-events: none; }
.jour-num { font-weight: 600; font-size: 0.9rem; min-width: 1.6rem; height: 1.6rem; line-height: 1.6rem; text-align: center; border-radius: 999px; }
.jour-aujourdhui .jour-num { background: var(--ocre-fonce); color: #fff; }
.jour-ferie-nom { font-size: 0.7rem; color: var(--texte-doux); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.jour-compte { margin-left: auto; font-size: 0.72rem; font-weight: 700; padding: 0 0.45rem; border-radius: 999px; line-height: 1.25rem; }

/* Le nombre de medecins presents (un remplace compte comme present) : un fond
   tres discret, et la pastille "presents/total". 3-4 vert, 2 jaune, 1 orange, 0 rouge. */
.jour-inconnu { background: var(--fond); }
.jour-vert { background: #fbfefc; }
.jour-compte-vert { background: #dcfce7; color: #166534; }
.jour-jaune { background: #fefdf0; }
.jour-compte-jaune { background: #fef08a; color: #854d0e; }
.jour-orange { background: #fff8f1; }
.jour-compte-orange { background: #fed7aa; color: #9a3412; }
.jour-rouge { background: #fff5f5; }
.jour-compte-rouge { background: #fecaca; color: #991b1b; }

/* Vacances scolaires (zone C) : un liseré violet clair en haut du jour, et
   leur nom au premier jour et en debut de semaine. */
.jour-vacances { position: relative; }
.jour-vacances::before { content: ""; position: absolute; top: 0; left: 0; right: 0; height: 3px; background: #c4b5fd; }
.jour-vacances-nom { font-size: 0.68rem; color: #6d28d9; background: #f5f3ff; padding: 0 0.4rem; border-radius: 999px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; min-width: 0; }
.echantillon.echantillon-vacances { border-top: 3px solid #c4b5fd; }
.jour-weekend, .jour-ferie { background: var(--fond-doux); }
.jour-weekend { background-image: repeating-linear-gradient(135deg, transparent 0 5px, rgba(0, 0, 0, 0.025) 5px 10px); }
.jour-hors-mois { background: var(--fond-doux); cursor: default; }
.jour-hors-mois:hover { box-shadow: none; }
.jour-tete-hors-mois .jour-num { color: #c4c8cf; font-weight: 500; }
.jour-selection { background: #f1e3d0 !important; }

/* Une barre d'absence, sur un ou plusieurs jours. */
.barre { z-index: 2; margin: 1px 3px; cursor: pointer; }
.barre[data-saisies]:hover { filter: brightness(0.96); box-shadow: 0 0 0 1px currentColor; }
.pastille.barre-suite-avant { margin-left: 0; border-left-width: 0; border-top-left-radius: 0; border-bottom-left-radius: 0; padding-left: 0.6rem; }
.pastille.barre-suite-apres { margin-right: 0; border-top-right-radius: 0; border-bottom-right-radius: 0; }

.pastille { position: relative; display: flex; align-items: baseline; gap: 0.3rem; font-size: 0.76rem; line-height: 1.15rem; padding: 0 0.45rem 0 0.5rem; border-radius: 4px; border-left: 3px solid; white-space: nowrap; overflow: hidden; }
.pastille-nom { font-weight: 600; overflow: hidden; text-overflow: ellipsis; }
.pastille-detail { color: inherit; opacity: 0.75; overflow: hidden; text-overflow: ellipsis; }
.pastille-conge { background: #dcfce7; border-color: var(--conge); color: #14532d; }
.pastille-jour_isole { background: #fef3c7; border-color: var(--jour-isole); color: #78350f; }
.pastille-demi { background: #dbeafe; border-color: var(--demi); color: #1e3a8a; }
.pastille-passee { background: transparent; border: 1px dashed #b8bec8; border-left: 3px dashed #b8bec8; color: var(--texte-doux); }
.badge-passee { background: #f3f4f6; color: var(--texte-doux); border: 1px dashed #c4c8cf; }
.pastille-remplace { background-image: repeating-linear-gradient(135deg, transparent 0 4px, rgba(255, 255, 255, 0.7) 4px 8px); opacity: 0.85; }
.legende .pastille { display: inline-flex; }

/* Une couleur par medecin (--c, posee sur chaque barre) : fond clair, liseré et
   texte dans sa teinte. La forme dit le type : demi-journee plus claire,
   remplace hachure, passe non compte en pointilles. */
.pastille.barre, .pastille.barre-legende { background-color: color-mix(in srgb, var(--c) 20%, white); border-left-color: var(--c); color: color-mix(in srgb, var(--c) 72%, black); }
.pastille.barre.pastille-demi, .pastille.barre-legende.pastille-demi { background-color: color-mix(in srgb, var(--c) 8%, white); border-left-style: solid; }
.pastille.barre.pastille-passee, .pastille.barre-legende.pastille-passee { background-color: transparent; border: 1px dashed color-mix(in srgb, var(--c) 55%, white); border-left: 3px dashed color-mix(in srgb, var(--c) 55%, white); color: var(--texte-doux); }
.legende + .legende { margin-top: 0.4rem; }

/* Absence saisie dans CabinetOS : point du controle Doctolib. */
.cal-manuel::after { content: ""; position: absolute; top: 3px; right: 3px; width: 7px; height: 7px; border-radius: 50%; background: #111827; border: 1.5px solid #fff; }
.pastille.cal-manuel { padding-right: 1rem; }
.bouton.danger { background: var(--alerte); border-color: var(--alerte); color: #fff; }
.bouton.danger:hover { background: #b91c1c; }
.bouton-discret { font-size: 0.8rem; padding: 0.2rem 0.5rem; color: var(--alerte); border-color: #fecaca; background: #fff; }
form.en-ligne { display: inline; margin: 0; }
.saisies { list-style: none; padding: 0; margin: 0; display: flex; flex-direction: column; gap: 0.6rem; }
.saisies li { display: flex; align-items: center; justify-content: space-between; gap: 1rem; padding: 0.6rem 0.75rem; border: 1px solid var(--bordure); border-radius: var(--rayon); }
.cal-controle-ok::after { background: var(--ok); }
.cal-controle-attente::after { background: #9ca3af; }
.cal-controle-ouvert::after { background: var(--alerte); width: 9px; height: 9px; top: 2px; }

.a-corriger { border: 1px solid #fecaca; background: var(--alerte-fond); border-radius: var(--rayon); padding: 0.75rem 1rem; margin: 0 0 1rem; }
.a-corriger h2 { color: var(--alerte); font-size: 1rem; margin: 0 0 0.25rem; }
.a-corriger p { margin: 0 0 0.4rem; font-size: 0.9rem; }
.a-corriger ul { margin: 0; padding-left: 1.2rem; font-size: 0.9rem; }

.legende { display: flex; flex-wrap: wrap; gap: 0.5rem 1.25rem; list-style: none; padding: 0; margin: 0.9rem 0 0.25rem; font-size: 0.85rem; color: var(--texte-doux); }
.legende li { display: flex; align-items: center; gap: 0.4rem; }
.echantillon { display: inline-block; width: 1.6rem; height: 1.2rem; border: 1px solid var(--bordure); border-radius: 4px; }
.echantillon-point { display: inline-block; position: relative; width: 12px; height: 12px; }
.echantillon-point::after { top: 1px; right: 1px; }

/* ── Fenêtre de déclaration ───────────────────────────────────────────────── */
dialog { border: none; border-radius: 12px; padding: 1.5rem; width: min(30rem, calc(100vw - 2rem)); box-shadow: 0 20px 50px rgba(0, 0, 0, 0.25); }
dialog::backdrop { background: rgba(17, 24, 39, 0.45); }
.formulaire { flex-direction: column; align-items: stretch; margin: 0; gap: 0.9rem; }
.formulaire-ligne { display: flex; gap: 0.75rem; }
.formulaire-ligne label { flex: 1; }
fieldset { border: 1px solid var(--bordure); border-radius: var(--rayon); padding: 0.5rem 0.9rem 0.7rem; display: flex; gap: 1rem; flex-wrap: wrap; }
legend { font-size: 0.9rem; font-weight: 600; padding: 0 0.3rem; }
.actions { display: flex; justify-content: flex-end; gap: 0.5rem; }

/* ── Connexion, comptes ───────────────────────────────────────────────────── */
.carte-seule { max-width: 24rem; margin: 2.5rem auto; padding: 1.5rem; border: 1px solid var(--bordure); border-radius: 12px; box-shadow: 0 6px 24px rgba(17, 24, 39, 0.06); }
.carte-seule h1 { font-size: 1.35rem; }
.boite-ok, .boite-erreur, .boite-alerte { padding: 0.6rem 0.9rem; border-radius: var(--rayon); font-size: 0.92rem; max-width: 50rem; }
.boite-ok { background: var(--ok-fond); color: var(--ok); border: 1px solid #bbf7d0; }
.boite-erreur { background: var(--alerte-fond); color: var(--alerte); border: 1px solid #fecaca; }
.boite-alerte { background: var(--orange-fond); color: #7c2d12; border: 1px solid #fed7aa; }
.boite-lien { max-width: 50rem; padding: 0.75rem 0.9rem; border: 1px solid var(--or); background: var(--ocre-fond); border-radius: var(--rayon); }
.boite-lien input { width: 100%; font-family: ui-monospace, monospace; font-size: 0.85rem; }
.bloc-compte { margin-top: 2rem; max-width: 34rem; }
.bloc-compte:has(table) { max-width: none; }
.fiche-compte { display: grid; grid-template-columns: max-content 1fr; gap: 0.3rem 1rem; margin: 1rem 0; }
.fiche-compte dt { color: var(--texte-doux); }
.fiche-compte dd { margin: 0; font-weight: 600; }
.bouton-petit { font-size: 0.8rem; padding: 0.25rem 0.6rem; }
/* Le petit oeil des champs de mot de passe (mot-de-passe.js). */
.champ-secret { position: relative; display: block; }
.champ-secret input { width: 100%; padding-right: 2.6rem; }
.champ-secret .voir-secret { position: absolute; right: 0.3rem; top: 50%; transform: translateY(-50%); display: flex; padding: 0.3rem; border: 0; border-radius: 6px; background: transparent; color: var(--texte-doux); line-height: 0; }
.champ-secret .voir-secret:hover { background: var(--fond-doux); color: var(--accent); }
.champ-secret .voir-secret[aria-pressed="true"] { color: var(--accent); }
form.en-ligne-flex { display: flex; gap: 0.35rem; align-items: center; margin: 0; flex-wrap: nowrap; }
.actions-compte { display: flex; flex-wrap: wrap; gap: 0.35rem; align-items: flex-start; }
.provisoire summary { list-style: none; }
.provisoire summary::-webkit-details-marker { display: none; }
.provisoire[open] form { margin-top: 0.35rem; }
.compte-inactif td { color: var(--texte-doux); }
.badge-admin { background: var(--ocre-fond); color: var(--ocre-fonce); }
.tableau-comptes td { vertical-align: top; }
.journal { font-size: 0.85rem; }
.journal td { padding: 0.3rem 0.6rem; }

@media (max-width: 760px) {
    .mois { --colonnes: 0 repeat(5, minmax(0, 1fr)) repeat(2, minmax(0, 0.6fr)); }
    .mois-semaine { visibility: hidden; padding: 0; }
    .mois-entete > span { font-size: 0.65rem; padding: 0.3rem 0.2rem; }
    .semaine { min-height: 4.5rem; }
    .jour-tete { padding: 0.2rem; }
    .barre { margin: 1px 1px; }
    .pastille-detail, .jour-ferie-nom, .jour-vacances-nom { display: none; }
    .jour-compte { padding: 0 0.25rem; font-size: 0.62rem; }
    .pastille { padding: 0 0.25rem; font-size: 0.68rem; }
}

@media (max-width: 640px) {
    main { padding: 1rem; }
    .marque img { height: 26px; }
    .entete { flex-direction: column; align-items: flex-start; gap: 0.5rem; padding: 0.75rem 1rem; }
    .fraicheur { padding: 0.55rem 1rem; }
    .cal-entete [data-declarer] { margin-left: 0; }
    .entete-compte { margin-left: 0; }
    .tableau-comptes { display: block; overflow-x: auto; }
}

/* ── Activité et revenus (lot 2, 2026-10-09) ─────────────────────────────── */
/* Séries des graphiques : couleurs validées par le script du skill dataviz
   (bleu #2a78d6 l'année affichée, orange #eb6834 l'année précédente). */
/* Années précédentes : un dégradé orange, de la plus récente (foncée) à la plus
   ancienne (pâle) — validé en ordinal ; le bleu et l'orange foncé, en catégoriel. */
.serie-0 { fill: #2a78d6; background: #2a78d6; }
.serie-1 { fill: #c9501f; background: #c9501f; }
.serie-2 { fill: #eb6834; background: #eb6834; }
.serie-3 { fill: #f29a6f; background: #f29a6f; }
.comparer { display: inline-flex; gap: 0.25rem; align-items: center; font-size: 0.85rem; color: var(--texte-doux); }
.comparer a, .comparer span.actif { padding: 0.15rem 0.5rem; border: 1px solid var(--bordure); border-radius: 999px; text-decoration: none; color: var(--texte); }
.comparer span.actif { background: var(--accent-fond); border-color: var(--accent); }
.visuellement-cache { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.activite-fraicheur { color: var(--texte-doux); font-size: 0.9rem; margin: 0 0 1rem; }
.tuiles { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 0.75rem; margin-bottom: 1.25rem; }
.tuile { border: 1px solid var(--bordure); border-radius: var(--rayon); padding: 0.75rem 0.9rem; background: var(--fond); }
.tuile-libelle { color: var(--texte-doux); font-size: 0.85rem; }
.tuile-valeur { font-size: 1.6rem; font-weight: 600; margin: 0.15rem 0; font-variant-numeric: tabular-nums; }
.tuile-delta { font-size: 0.85rem; color: var(--texte-doux); }
.tuile-delta.hausse { color: var(--ok); }
.tuile-delta.baisse { color: var(--alerte); }
.tuile-ref { color: var(--texte-doux); }
.graphiques { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 1rem; margin-bottom: 1.5rem; }
.graphique { margin: 0; border: 1px solid var(--bordure); border-radius: var(--rayon); padding: 0.75rem; background: var(--fond); }
.graphique figcaption { display: flex; justify-content: space-between; align-items: baseline; gap: 0.5rem; margin-bottom: 0.25rem; flex-wrap: wrap; }
.graphique-titre { font-weight: 600; }
.legende { color: var(--texte-doux); font-size: 0.85rem; display: inline-flex; align-items: center; gap: 0.35rem; }
.cle { display: inline-block; width: 10px; height: 10px; border-radius: 2px; margin-left: 0.5rem; }
.graphique-svg { width: 100%; height: auto; display: block; }
.graphique-svg .grille { stroke: var(--bordure); stroke-width: 1; }
.graphique-svg .axe { fill: var(--texte-doux); font-size: 11px; }
.graphique-svg .cible { fill: transparent; cursor: default; }
.graphique-svg .cible:hover, .graphique-svg .cible:focus { fill: rgba(52, 78, 92, 0.06); outline: none; }
.infobulle { position: absolute; z-index: 10; background: var(--fond); border: 1px solid var(--bordure); border-radius: 6px; padding: 0.4rem 0.6rem; box-shadow: 0 4px 14px rgba(0, 0, 0, 0.1); font-size: 0.85rem; pointer-events: none; }
.infobulle-titre { color: var(--texte-doux); margin-bottom: 0.15rem; }
.infobulle-ligne { display: flex; align-items: center; gap: 0.4rem; }
.cle-trait { display: inline-block; width: 12px; height: 2px; }
.defile { overflow-x: auto; margin-bottom: 0.5rem; }
table.chiffres td, table.chiffres th { text-align: right; font-variant-numeric: tabular-nums; white-space: nowrap; }
table.chiffres td:first-child, table.chiffres th:first-child { text-align: left; }
table.chiffres tfoot th { border-top: 2px solid var(--bordure); }
.deux-colonnes { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 1.5rem; }
@media (max-width: 760px) {
    .tuiles { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .graphiques, .deux-colonnes { grid-template-columns: 1fr; }
}
.en-cours { font-size: 0.75rem; color: var(--texte-doux); border: 1px solid var(--bordure); border-radius: 999px; padding: 0 0.4rem; }
.interrupteur { display: inline-flex; align-items: center; gap: 0.4rem; font-size: 0.85rem; color: var(--texte); margin: 0; }
.interrupteur label { display: inline-flex; flex-direction: row; align-items: center; gap: 0.35rem; cursor: pointer; font-weight: 400; font-size: 0.85rem; }
.interrupteur input[type=checkbox] { appearance: none; -webkit-appearance: none; width: 30px; height: 18px; border-radius: 999px; background: var(--bordure); position: relative; cursor: pointer; transition: background 0.15s; margin: 0; }
.interrupteur input[type=checkbox]::after { content: ""; position: absolute; top: 2px; left: 2px; width: 14px; height: 14px; border-radius: 50%; background: var(--fond); box-shadow: 0 1px 2px rgba(0, 0, 0, 0.2); transition: left 0.15s; }
.interrupteur input[type=checkbox]:checked { background: var(--accent); }
.interrupteur input[type=checkbox]:checked::after { left: 14px; }
.interrupteur input[type=checkbox]:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
@media (prefers-reduced-motion: reduce) { .interrupteur input[type=checkbox], .interrupteur input[type=checkbox]::after { transition: none; } }

/* ── Récapitulatif des encaissements, pour le comptable ───────────────────── */
.cal-entete .bouton-comptable { margin-left: auto; }
.titre-et-action { display: flex; align-items: center; gap: 1rem; flex-wrap: wrap; margin-top: 1.5rem; }
.titre-et-action h2 { margin: 0; }
.barre-outils { display: flex; align-items: center; gap: 0.5rem; flex-wrap: wrap; margin-bottom: 1.25rem; }
.barre-outils-annees { display: inline-flex; align-items: center; gap: 0.35rem; margin-right: auto; flex-wrap: wrap; }
.barre-outils-annees .aide { margin: 0 0.15rem 0 0; }
.annee-choisie { font-weight: 700; padding: 0.25rem 0.6rem; border-radius: var(--rayon); background: var(--ocre-fond); color: var(--accent); box-shadow: inset 0 -2px 0 var(--ocre); }
.recap-incomplete { margin: 0.4rem 0 0; padding: 0.35rem 0.6rem; border-left: 3px solid var(--orange); background: var(--orange-fond); color: #7c2d12; font-size: 0.88rem; }
.recap { max-width: 64rem; }
.recap-entete { display: flex; align-items: flex-start; justify-content: space-between; gap: 2rem; padding-bottom: 0.9rem; border-bottom: 2px solid var(--or-clair); }
.recap-logo { width: 46mm; height: auto; }
.recap-medecin { display: flex; flex-direction: column; align-items: flex-end; text-align: right; font-style: normal; font-size: 0.88rem; line-height: 1.35; color: var(--texte); }
.recap-medecin strong { font-size: 1.05rem; color: var(--accent); }
.recap-ids { color: var(--texte-doux); font-size: 0.8rem; }
.recap-cabinet { margin-top: 0.35rem; }
.recap-titre { margin: 1rem 0 0.25rem; }
.recap-titre h1 { margin: 0; font-size: 1.45rem; }
.recap-titre p { margin: 0.15rem 0 0; color: var(--texte-doux); }
.recap h2 { font-size: 1.05rem; margin: 1.5rem 0 0.5rem; }
.recap-table { margin-top: 0; font-variant-numeric: tabular-nums; font-size: 0.88rem; }
.recap-table th, .recap-table td { padding: 0.35rem 0.6rem; }
.recap-table td { text-align: right; white-space: nowrap; }
.recap-table tbody th { text-align: left; font-weight: 600; background: none; white-space: nowrap; }
.recap-table tfoot th, .recap-table tfoot td { font-weight: 700; background: #faf6f0; border-top: 2px solid var(--or); }
.recap-table .recap-dont { color: var(--texte-doux); font-size: 0.92em; }
.recap-table .recap-total { font-weight: 700; }
.recap-virements td:nth-child(-n+3) { text-align: left; }
.recap-virements td:nth-child(2), .recap-virements td:nth-child(3) { white-space: normal; }
.recap-virements .recap-ref { font-size: 0.9em; color: var(--texte-doux); }
.recap-virements caption { text-align: left; font-weight: 700; padding: 0.4rem 0 0.25rem; color: var(--accent); }
.recap-bloc-mois { margin-top: 0.9rem; }
.recap-virements .recap-sous-total th, .recap-virements .recap-sous-total td { background: var(--fond-doux); font-weight: 600; text-align: right; border-top: 1px solid var(--or); }
.recap-virements .recap-sous-total th { text-align: left; }
.recap-siret { font-weight: 600; }
.recap-notes { margin-top: 1.5rem; font-size: 0.82rem; color: var(--texte-doux); }
.recap-notes h2 { font-size: 0.95rem; color: var(--texte); }
.recap-notes ul { padding-left: 1.1rem; margin: 0.4rem 0; }
.recap-notes li { margin-bottom: 0.3rem; }
.recap-source { margin-top: 0.75rem; }
@media (max-width: 760px) {
    .recap-table { display: block; overflow-x: auto; }
}

@media print {
    @page { size: A4 portrait; margin: 12mm 11mm 14mm; }
    body { font-size: 9.5pt; background: #fff; }
    .entete, .fraicheur, .barre-outils { display: none !important; }
    main { padding: 0; max-width: none; }
    .recap { max-width: none; }
    .recap-table { display: table; font-size: 8.5pt; line-height: 1.2; }
    .recap-table th, .recap-table td { padding: 1.2pt 4pt; }
    .recap-entete { padding-bottom: 6pt; }
    .recap-titre { margin-top: 8pt; }
    .recap h2 { margin: 10pt 0 4pt; }
    .recap-bloc-mois { margin-top: 6pt; }
    .recap-virements caption { padding: 2pt 0 1pt; }
    /* Un bloc (titre + tableau) jamais coupe ; et, si un tableau depassait une
       page, jamais une ligne coupee. Les deux syntaxes : Safari et Chrome. */
    .insecable, .recap-notes, .recap-entete { break-inside: avoid; page-break-inside: avoid; }
    .recap-table tr { break-inside: avoid; page-break-inside: avoid; }
    .recap h2 { break-after: avoid; page-break-after: avoid; }
    .recap-table thead { display: table-header-group; }
    .recap-notes { color: #333; }
    a { color: inherit; text-decoration: none; }
}
