/* Charte : interface dense en deux colonnes (liste des modules, contenu), fond beige et accent bleu.
   Thème clair (beige) par défaut, thème sombre disponible. Contrastes vérifiés (WCAG AA).
   Une seule couleur d'accent ; vert, orange, rouge réservés aux états. */
:root, [data-theme="clair"] {
  --fond: #efeae2;
  --surface: #ffffff;
  --surface-2: #f6f3ee;
  --surface-3: #ebe5dc;
  --bordure: #e0d9ce;
  --texte: #111b21;
  --texte-2: #54656f;
  --accent: #0a66c2;
  --accent-fort: #084f96;
  --accent-texte: #ffffff;
  --accent-doux: rgba(10, 102, 194, 0.10);
  --vert: #166534;
  --orange: #9a4b06;
  --rouge: #b91c1c;
  --vert-fond: #dcf5e4;
  --orange-fond: #fdf0d8;
  --rouge-fond: #fde2e2;
  --ombre: 0 6px 20px rgba(17, 27, 33, 0.12);
  --rayon: 10px;
  --rayon-petit: 8px;
  color-scheme: light;
}
[data-theme="sombre"] {
  --fond: #0b141a;
  --surface: #111b21;
  --surface-2: #202c33;
  --surface-3: #2a3942;
  --bordure: #2a363e;
  --texte: #e9edef;
  --texte-2: #9aa8b1;
  --accent: #53a6ff;
  --accent-fort: #7dbbff;
  --accent-texte: #06111c;
  --accent-doux: rgba(83, 166, 255, 0.15);
  --vert: #5ee08f;
  --orange: #fbbf24;
  --rouge: #ff8a8a;
  --vert-fond: rgba(94, 224, 143, 0.13);
  --orange-fond: rgba(251, 191, 36, 0.13);
  --rouge-fond: rgba(255, 138, 138, 0.13);
  --ombre: 0 6px 22px rgba(0, 0, 0, 0.4);
  color-scheme: dark;
}

* { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }
body {
  background: var(--fond);
  color: var(--texte);
  font-family: "Segoe UI", system-ui, -apple-system, "Helvetica Neue", Roboto, Arial, sans-serif;
  font-size: 14px;
  line-height: 1.45;
  -webkit-font-smoothing: antialiased;
  min-height: 100vh;
}
h1, h2, h3 { line-height: 1.25; margin: 0 0 .6em; font-weight: 600; letter-spacing: -0.005em; }
h1 { font-size: 1.32rem; }
h2 { font-size: 1.08rem; }
h3 { font-size: .97rem; }
p { margin: 0 0 .75em; }
a { color: var(--accent); }
small, .discret { color: var(--texte-2); }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; border-radius: 6px; }
.visuellement-cache { position: absolute !important; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

/* ---------- Boutons ---------- */
.bouton {
  display: inline-flex; align-items: center; justify-content: center; gap: .45em;
  min-height: 36px; padding: .4em .95em; border-radius: var(--rayon-petit);
  border: 1px solid var(--bordure); background: var(--surface-2); color: var(--texte);
  font: inherit; font-weight: 600; cursor: pointer; text-decoration: none; white-space: nowrap;
  transition: background .15s, border-color .15s, transform .05s;
}
.bouton:hover { border-color: var(--accent); }
.bouton:active { transform: translateY(1px); }
.bouton:disabled { opacity: .5; cursor: not-allowed; }
.bouton-principal { background: var(--accent); color: var(--accent-texte); border-color: var(--accent); }
.bouton-principal:hover { background: var(--accent-fort); }
.bouton-danger { background: var(--rouge-fond); color: var(--rouge); border-color: var(--rouge); }
.bouton-discret { background: transparent; border-color: transparent; color: var(--texte-2); }
.bouton-discret:hover { color: var(--texte); background: var(--surface-2); }
.bouton-petit { min-height: 30px; padding: .2em .7em; font-size: .88rem; }
.bouton .icone svg { width: 16px; height: 16px; display: block; }
.bouton-icone { background: transparent; border: 0; color: var(--texte-2); cursor: pointer; padding: 8px; border-radius: 50%; display: inline-flex; }
.bouton-icone:hover { color: var(--texte); background: var(--surface-3); }
.actions { display: flex; flex-wrap: wrap; gap: .45rem; align-items: center; }

/* ---------- Formulaires ---------- */
.champ { display: flex; flex-direction: column; gap: .25rem; margin-bottom: .8rem; }
.champ label { font-weight: 600; font-size: .88rem; }
.aide { color: var(--texte-2); font-size: .82rem; }
input, select, textarea {
  font: inherit; color: var(--texte); background: var(--surface-2); border: 1px solid var(--bordure);
  border-radius: var(--rayon-petit); padding: .45em .7em; min-height: 36px; width: 100%;
}
textarea { min-height: 84px; resize: vertical; }
input[type="checkbox"], input[type="radio"] { width: 18px; height: 18px; min-height: 0; accent-color: var(--accent); }
input:focus, select:focus, textarea:focus { outline: 2px solid var(--accent); outline-offset: 0; border-color: var(--accent); }
.grille-champs { display: grid; grid-template-columns: repeat(auto-fit, minmax(210px, 1fr)); gap: 0 .9rem; }
.case { display: flex; gap: .55rem; align-items: center; margin: .3rem 0; cursor: pointer; }

/* ---------- Structure Direction : liste des modules | contenu ---------- */
.app { display: grid; grid-template-columns: 330px minmax(0, 1fr); height: 100vh; overflow: hidden; }
.espace { flex: 1; }

.nav-laterale { background: var(--surface); border-right: 1px solid var(--bordure); display: flex; flex-direction: column; min-height: 0; }
.panneau-tete { display: flex; align-items: center; justify-content: space-between; height: 60px; padding: 0 .6rem 0 .9rem; flex: none; background: var(--surface-2); border-bottom: 1px solid var(--bordure); }
.marque { display: flex; align-items: center; gap: .6rem; text-decoration: none; color: var(--texte); }
.marque .logo { width: 36px; height: 36px; border-radius: 50%; background: var(--accent); color: var(--accent-texte); display: grid; place-items: center; }
.marque-titre { font-size: 1.2rem; font-weight: 700; letter-spacing: -0.01em; }
.marque small { display: block; font-weight: 500; font-size: .78rem; color: var(--texte-2); }
.page-connexion .marque { font-weight: 700; font-size: 1.02rem; margin-bottom: 1rem; }
.recherche-modules { position: relative; margin: .55rem .7rem .3rem; flex: none; }
.recherche-modules .loupe { position: absolute; left: .8rem; top: 50%; transform: translateY(-50%); color: var(--texte-2); display: flex; pointer-events: none; }
.recherche-modules input { border: 0; border-radius: 999px; padding-left: 2.4rem; min-height: 36px; background: var(--surface-2); }
.liste-modules { overflow-y: auto; flex: 1; padding-bottom: .5rem; overscroll-behavior: contain; }
.nav-groupe { font-size: .72rem; text-transform: uppercase; letter-spacing: .07em; color: var(--accent); font-weight: 700; padding: .8rem 1rem .25rem; }
.nav-lien { display: flex; align-items: center; gap: .8rem; padding: 0 .9rem 0 .8rem; text-decoration: none; color: var(--texte); }
.nav-lien:hover { background: var(--surface-2); }
.nav-lien.actif { background: var(--surface-3); }
.pastille-module {
  width: 40px; height: 40px; border-radius: 50%; background: var(--surface-3); color: var(--accent);
  display: grid; place-items: center; flex: none;
}
.nav-lien.actif .pastille-module { background: var(--accent); color: var(--accent-texte); }
.nav-texte { display: flex; flex-direction: column; min-width: 0; flex: 1; padding: .6rem 0; border-bottom: 1px solid var(--bordure); }
.nav-libelle { font-size: .98rem; font-weight: 500; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.nav-desc { color: var(--texte-2); font-size: .82rem; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.nav-vide { color: var(--texte-2); text-align: center; padding: 1.5rem 1rem; }
.panneau-pied { display: flex; align-items: center; gap: .65rem; padding: .55rem .6rem .55rem .9rem; border-top: 1px solid var(--bordure); background: var(--surface-2); flex: none; }
.avatar { width: 36px; height: 36px; border-radius: 50%; background: var(--surface-3); color: var(--texte); display: grid; place-items: center; font-size: .8rem; font-weight: 700; flex: none; }
.pied-texte { display: flex; flex-direction: column; min-width: 0; flex: 1; }
.pied-texte strong { font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.pied-texte small { font-size: .8rem; }

.principal { min-width: 0; display: flex; flex-direction: column; min-height: 0; background: var(--fond); }
.barre-haut {
  display: flex; align-items: center; gap: .75rem; height: 60px; padding: 0 1rem; flex: none;
  background: var(--surface-2); border-bottom: 1px solid var(--bordure); position: sticky; top: 0; z-index: 20;
}
.titre-module { display: flex; align-items: center; gap: .75rem; min-width: 0; }
.titre-module .pastille-module { width: 40px; height: 40px; }
.titre-texte { display: flex; flex-direction: column; min-width: 0; }
.titre-texte strong { font-size: 1rem; font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.titre-texte small { font-size: .82rem; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.selecteur-etab { width: auto; min-width: 200px; max-width: 320px; border-radius: 999px; background: var(--surface); }
.bouton-menu { display: none; }
.contenu { padding: 1.25rem 1.5rem 2rem; width: 100%; flex: 1; overflow-y: auto; }
.contenu > * { max-width: 1400px; }
.bandeau-demo { background: var(--accent-doux); color: var(--texte); border-bottom: 1px solid var(--bordure); padding: .3rem 1rem; font-size: .82rem; flex: none; }

.en-tete-page { display: flex; flex-wrap: wrap; align-items: flex-end; justify-content: space-between; gap: .8rem; margin-bottom: 1.1rem; }
.en-tete-page h1 { margin: 0; }
.en-tete-page p { margin: .2rem 0 0; color: var(--texte-2); }
.section-titre { display: flex; flex-wrap: wrap; gap: .7rem; align-items: center; justify-content: space-between; margin: 1.3rem 0 .7rem; }
.section-titre h2 { margin: 0; }

.carte { background: var(--surface); border: 1px solid var(--bordure); border-radius: var(--rayon); padding: 1rem 1.1rem; }
.carte + .carte { margin-top: .8rem; }
.cartes { display: grid; grid-template-columns: repeat(auto-fill, minmax(270px, 1fr)); gap: .8rem; }
.deux-colonnes { display: grid; grid-template-columns: 1fr 1fr; gap: .8rem; }
.indicateurs { display: grid; grid-template-columns: repeat(auto-fill, minmax(250px, 1fr)); gap: .6rem; margin-bottom: 1rem; }
.indicateur {
  background: var(--surface); border: 1px solid var(--bordure); border-radius: var(--rayon); padding: .55rem .85rem;
  display: flex; align-items: center; justify-content: space-between; gap: .8rem; min-height: 58px; color: var(--texte); text-decoration: none;
}
.indicateur-texte { min-width: 0; }
.indicateur-titre { color: var(--texte); font-size: .88rem; font-weight: 600; }
.indicateur-valeur { font-size: 1.35rem; font-weight: 700; font-variant-numeric: tabular-nums; white-space: nowrap; text-align: right; flex: none; }
.indicateur-detail { color: var(--texte-2); font-size: .78rem; line-height: 1.3; }
.carte-import { margin-bottom: 1rem; padding: .7rem .9rem; }
.carte-import-tete { display: flex; align-items: center; gap: .8rem; flex-wrap: wrap; }
.import-integre:not(:empty) { margin-top: .9rem; border-top: 1px solid var(--bordure); padding-top: .9rem; }
.import-integre .en-tete-page h1 { font-size: 1.1rem; }
a.indicateur-lien { cursor: pointer; transition: border-color .15s, background .15s; }
a.indicateur-lien:hover { border-color: var(--accent); background: var(--surface-2); }
.indicateur-rouge { border-color: var(--rouge); box-shadow: inset 3px 0 0 var(--rouge); }
.indicateur-orange { border-color: var(--orange); box-shadow: inset 3px 0 0 var(--orange); }
.indicateur-vert { box-shadow: inset 3px 0 0 var(--vert); }

/* ---------- Voyants et badges ---------- */
.voyant { display: inline-flex; align-items: center; gap: .45rem; font-weight: 600; font-size: .9rem; }
.voyant .pastille { width: 11px; height: 11px; border-radius: 50%; flex: none; }
.voyant-vert { color: var(--vert); } .voyant-vert .pastille { background: var(--vert); }
.voyant-orange { color: var(--orange); } .voyant-orange .pastille { background: var(--orange); }
.voyant-rouge { color: var(--rouge); } .voyant-rouge .pastille { background: var(--rouge); }
.voyant-gris { color: var(--texte-2); } .voyant-gris .pastille { background: var(--texte-2); }
.badge { display: inline-block; padding: .15em .65em; border-radius: 999px; font-size: .8rem; font-weight: 650; border: 1px solid transparent; white-space: nowrap; }
.badge-neutre { background: var(--surface-3); color: var(--texte); }
.badge-accent { background: var(--accent-doux); color: var(--accent); border-color: var(--accent); }
.badge-vert { background: var(--vert-fond); color: var(--vert); }
.badge-orange { background: var(--orange-fond); color: var(--orange); }
.badge-rouge { background: var(--rouge-fond); color: var(--rouge); }

/* ---------- Tableaux ---------- */
.tableau-conteneur { overflow-x: auto; border: 1px solid var(--bordure); border-radius: var(--rayon); background: var(--surface); }
.tableau { width: 100%; border-collapse: collapse; font-size: .9rem; }
.tableau th { text-align: left; font-size: .74rem; text-transform: uppercase; letter-spacing: .05em; color: var(--texte-2); padding: .55rem .8rem; border-bottom: 1px solid var(--bordure); background: var(--surface-2); white-space: nowrap; }
.tableau td { padding: .55rem .8rem; border-bottom: 1px solid var(--bordure); vertical-align: middle; }
.tableau tr:last-child td { border-bottom: 0; }
.tableau tr.cliquable { cursor: pointer; }
.tableau tr.cliquable:hover td { background: var(--surface-2); }
.nombre { text-align: right; font-variant-numeric: tabular-nums; white-space: nowrap; }
.vide { color: var(--texte-2); padding: 1.2rem; text-align: center; border: 1px dashed var(--bordure); border-radius: var(--rayon); }

/* ---------- Onglets ---------- */
.onglets { display: flex; gap: .2rem; flex-wrap: wrap; border-bottom: 1px solid var(--bordure); margin-bottom: 1rem; }
.onglets button { background: none; border: 0; color: var(--texte-2); font: inherit; font-weight: 600; padding: .55rem .85rem; cursor: pointer; border-bottom: 3px solid transparent; margin-bottom: -1px; }
.onglets button.actif { color: var(--texte); border-bottom-color: var(--accent); }
.onglets button:hover { color: var(--texte); }

/* ---------- Chambres ---------- */
.plan-chambres { display: grid; grid-template-columns: repeat(auto-fill, minmax(140px, 1fr)); gap: .6rem; }
.barre-plan { display: flex; flex-wrap: wrap; gap: .6rem; align-items: center; margin-bottom: .6rem; }
.puces { display: flex; flex-wrap: wrap; gap: .35rem; }
.puce { border: 1px solid var(--bordure); background: var(--surface); color: var(--texte); border-radius: 999px; padding: .3rem .85rem; font: inherit; font-size: .88rem; font-weight: 600; cursor: pointer; }
.puce[aria-pressed="true"] { background: var(--accent); border-color: var(--accent); color: var(--accent-texte); }
.plan-etab { margin-bottom: 1.6rem; }
.batiment { background: var(--surface); border: 1px solid var(--bordure); border-radius: var(--rayon); margin-bottom: .9rem; overflow: hidden; }
.batiment-titre { display: flex; align-items: baseline; gap: .7rem; padding: .55rem .9rem; background: var(--surface-2); border-bottom: 1px solid var(--bordure); }
.batiment-titre strong { font-size: 1rem; }
.etage { display: grid; grid-template-columns: 128px minmax(0, 1fr); border-bottom: 1px dashed var(--bordure); }
.etage:last-child { border-bottom: 0; }
.etage-libelle { padding: .7rem .9rem; font-weight: 700; font-size: .85rem; color: var(--texte-2); border-right: 1px solid var(--bordure); background: var(--surface-2); display: flex; align-items: center; }
.etage-chambres { display: flex; flex-wrap: wrap; gap: .45rem; padding: .55rem; }
.carte-chambre { background: var(--surface); border: 1px solid var(--bordure); border-radius: var(--rayon-petit); padding: .4rem .55rem; cursor: pointer; text-align: left; font: inherit; color: inherit; display: flex; flex-direction: column; gap: .05rem; width: 118px; min-height: 0; }
.carte-chambre:hover { border-color: var(--accent); }
.carte-chambre-tete { display: flex; justify-content: space-between; align-items: center; gap: .3rem; }
.carte-chambre .numero { font-size: 1.05rem; font-weight: 700; }
.carte-chambre-statut { font-size: .78rem; font-weight: 600; }
.carte-chambre .occupant { color: var(--texte-2); font-size: .76rem; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.carte-chambre.trouvee { outline: 3px solid var(--accent); outline-offset: 1px; }
.carte-chambre.estompee { opacity: .35; }
.statut-occupee { box-shadow: inset 4px 0 0 var(--accent); }
.statut-rav { box-shadow: inset 4px 0 0 var(--texte-2); }
.statut-travaux { box-shadow: inset 4px 0 0 var(--orange); }
.statut-bloquee { box-shadow: inset 4px 0 0 var(--rouge); }
.statut-libre { opacity: .85; }
.legende { display: flex; flex-wrap: wrap; gap: 1rem; margin: .4rem 0 1rem; color: var(--texte-2); font-size: .88rem; }

/* ---------- Modales et notifications ---------- */
.modale-fond { position: fixed; inset: 0; background: rgba(5, 8, 12, 0.66); display: grid; place-items: center; z-index: 100; padding: 1rem; }
.modale { background: var(--surface); border: 1px solid var(--bordure); border-radius: var(--rayon); width: min(560px, 100%); max-height: calc(100vh - 2rem); display: flex; flex-direction: column; box-shadow: var(--ombre); }
.modale-large { width: min(920px, 100%); }
.modale-tete { display: flex; justify-content: space-between; align-items: center; padding: 1rem 1.2rem .4rem; }
.modale-tete h2 { margin: 0; }
.modale-corps { padding: .6rem 1.2rem 1rem; overflow-y: auto; }
.modale-actions { display: flex; gap: .6rem; justify-content: flex-end; flex-wrap: wrap; padding: .9rem 1.2rem; border-top: 1px solid var(--bordure); }
#notifications { position: fixed; bottom: 1rem; right: 1rem; display: flex; flex-direction: column; gap: .5rem; z-index: 200; max-width: min(420px, calc(100vw - 2rem)); }
.notification { background: var(--surface-3); color: var(--texte); border: 1px solid var(--bordure); border-left: 4px solid var(--accent); padding: .8rem 1rem; border-radius: 10px; box-shadow: var(--ombre); transition: opacity .3s; }
.notification-succes { border-left-color: var(--vert); }
.notification-erreur { border-left-color: var(--rouge); }
.notification-alerte { border-left-color: var(--orange); }
.notification.sortie { opacity: 0; }
.chargement { display: flex; align-items: center; gap: .7rem; color: var(--texte-2); padding: 2rem; justify-content: center; }
.rouet { width: 20px; height: 20px; border-radius: 50%; border: 3px solid var(--bordure); border-top-color: var(--accent); animation: tourne 0.8s linear infinite; }
@keyframes tourne { to { transform: rotate(360deg); } }

.apercu-mail { background: var(--surface-2); border: 1px solid var(--bordure); border-radius: var(--rayon-petit); padding: 1rem; white-space: pre-wrap; font-size: .93rem; }
.apercu-mail .entete-mail { border-bottom: 1px solid var(--bordure); padding-bottom: .6rem; margin-bottom: .6rem; color: var(--texte-2); white-space: normal; }
.apercu-mail .entete-mail strong { color: var(--texte); }
.vignettes { display: flex; flex-wrap: wrap; gap: .5rem; }
.vignette { width: 92px; height: 92px; border-radius: 10px; object-fit: cover; border: 1px solid var(--bordure); background: var(--surface-2); cursor: zoom-in; }
.grille-cases { display: grid; grid-template-columns: repeat(auto-fill, minmax(84px, 1fr)); gap: .3rem; }
.grille-cases-larges { grid-template-columns: repeat(auto-fill, minmax(180px, 1fr)); }
.case-audit { margin: 0; padding: .35rem .5rem; border: 1px solid var(--bordure); border-radius: var(--rayon-petit); background: var(--surface); }
.case-audit:has(input:checked) { border-color: var(--accent); background: var(--accent-doux); }
.audit-batiment h4 { margin: .6rem 0 .3rem; }
.audit-etage { margin-bottom: .6rem; }
.audit-etage-tete { display: flex; align-items: center; justify-content: space-between; gap: .5rem; margin-bottom: .25rem; color: var(--texte-2); font-size: .88rem; }
.audit-point { align-items: center; }
.audit-libelle { flex: 1 1 220px; }
.barre-audit { position: sticky; bottom: 0; z-index: 5; display: flex; gap: .8rem; align-items: center; justify-content: space-between; flex-wrap: wrap;
  margin-top: 1rem; padding: .7rem .9rem; background: var(--surface); border: 1px solid var(--bordure); border-radius: var(--rayon); box-shadow: var(--ombre); }
.entete-lignes-registre, .ligne-registre { display: grid; grid-template-columns: 54px minmax(160px, 1fr) 74px minmax(140px, 200px) auto auto; gap: .45rem; align-items: center; }
.entete-lignes-registre { font-size: .75rem; text-transform: uppercase; letter-spacing: .05em; color: var(--texte-2); padding: 0 0 .3rem; }
.ligne-registre { padding: .35rem 0; border-bottom: 1px solid var(--bordure); }
.ligne-registre.non-concernee input:not([type=checkbox]) { opacity: .55; }
.ordre-boutons { display: flex; gap: 0; }
.ordre-boutons .bouton-icone { padding: 4px 6px; font-size: .75rem; border-radius: 6px; }
.ordre-boutons .bouton-icone:disabled { opacity: .3; cursor: default; }
.detail-verification { border: 1px solid var(--bordure); border-radius: var(--rayon-petit); padding: .4rem .7rem; margin: .5rem 0; background: var(--surface-2); }
.detail-verification summary { cursor: pointer; font-weight: 600; }
.autres-verifications summary { cursor: pointer; color: var(--accent); font-weight: 600; font-size: .9rem; padding: .3rem 0; }
.liste-justificatifs { display: flex; flex-direction: column; border: 1px solid var(--bordure); border-radius: var(--rayon-petit); margin-bottom: 1rem; }
.ligne-justificatif { display: grid; grid-template-columns: minmax(180px, 1.4fr) auto minmax(120px, 1fr) 150px; gap: .6rem; align-items: center; padding: .45rem .7rem; border-bottom: 1px solid var(--bordure); }
.ligne-justificatif:last-child { border-bottom: 0; }
.justificatif-type { font-weight: 600; font-size: .9rem; }
.ligne-justificatif > span:nth-child(3) { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: .85rem; }
.liste-simple { list-style: none; padding: 0; margin: 0; }
.liste-simple li { padding: .65rem 0; border-bottom: 1px solid var(--bordure); display: flex; gap: .8rem; justify-content: space-between; align-items: center; flex-wrap: wrap; }
.liste-simple li:last-child { border-bottom: 0; }
.mention-interne { border: 1px solid var(--orange); background: var(--orange-fond); color: var(--orange); border-radius: var(--rayon-petit); padding: .6rem .9rem; font-weight: 650; margin-bottom: 1rem; }
.encart { background: var(--accent-doux); border: 1px solid var(--bordure); border-radius: var(--rayon-petit); padding: .8rem 1rem; margin-bottom: 1rem; }
.barres { display: flex; flex-direction: column; gap: .45rem; }
.barre-ligne { display: grid; grid-template-columns: minmax(90px, 160px) 1fr 40px; gap: .6rem; align-items: center; font-size: .9rem; }
.barre-ligne .jauge { height: 10px; background: var(--surface-3); border-radius: 99px; overflow: hidden; }
.barre-ligne .jauge span { display: block; height: 100%; background: var(--accent); border-radius: 99px; }
.zone-depot { border: 2px dashed var(--bordure); border-radius: var(--rayon); padding: 2rem 1rem; text-align: center; color: var(--texte-2); cursor: pointer; }
.zone-depot.survol { border-color: var(--accent); background: var(--accent-doux); color: var(--texte); }
.calendrier { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); gap: .4rem; }
.calendrier .jour { background: var(--surface); border: 1px solid var(--bordure); border-radius: 10px; min-height: 110px; padding: .45rem; font-size: .82rem; min-width: 0; }
.calendrier .jour.aujourdhui { border-color: var(--accent); }
.calendrier .jour.hors-mois { opacity: .45; }
.calendrier .jour-tete { font-weight: 700; margin-bottom: .3rem; color: var(--texte-2); }
.calendrier .evenement { background: var(--accent-doux); border-left: 3px solid var(--accent); border-radius: 6px; padding: .2rem .35rem; margin-bottom: .25rem; cursor: pointer; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.calendrier .evenement.fait { border-left-color: var(--vert); background: var(--vert-fond); }

/* ---------- Vue Gardien : finition premium ---------- */
.gardien {
  --g-bleu-nuit: #0b2545; --g-bleu: #0a66c2; --g-ombre: 0 1px 2px rgba(17, 27, 33, .06), 0 8px 24px rgba(17, 27, 33, .08);
  --g-ombre-forte: 0 2px 4px rgba(17, 27, 33, .08), 0 14px 34px rgba(17, 27, 33, .12);
  background: linear-gradient(180deg, #f4f1ec 0%, var(--fond) 100%);
}
[data-theme="sombre"] .gardien { --g-ombre: 0 1px 2px rgba(0, 0, 0, .3), 0 8px 24px rgba(0, 0, 0, .35); --g-ombre-forte: 0 2px 4px rgba(0, 0, 0, .35), 0 14px 34px rgba(0, 0, 0, .45); background: var(--fond); }
.g-hero {
  position: relative; color: #fff; padding: calc(1rem + env(safe-area-inset-top)) 1.15rem 3.4rem;
  background: radial-gradient(120% 140% at 100% 0%, #1f6fd1 0%, rgba(31, 111, 209, 0) 55%), linear-gradient(160deg, #0b2545 0%, #103a6b 60%, #0a66c2 130%);
  border-radius: 0 0 28px 28px; overflow: hidden;
}
.g-hero::after { content: ""; position: absolute; right: -60px; top: -60px; width: 220px; height: 220px; border-radius: 50%; border: 1px solid rgba(255, 255, 255, .08); box-shadow: 0 0 0 30px rgba(255, 255, 255, .03); pointer-events: none; }
.g-hero-haut { display: flex; align-items: center; justify-content: space-between; gap: .6rem; position: relative; z-index: 1; }
.g-marque { display: inline-flex; align-items: center; gap: .45rem; font-weight: 800; font-size: .82rem; letter-spacing: .08em; color: rgba(255, 255, 255, .85); }
.g-marque-logo { width: 26px; height: 26px; border-radius: 50%; display: grid; place-items: center; background: rgba(255, 255, 255, .14); }
.g-hero-actions { display: flex; align-items: center; gap: .45rem; }
.g-lien-direction { color: #fff; text-decoration: none; font-weight: 700; font-size: .82rem; padding: .35rem .7rem; border-radius: 999px; background: rgba(255, 255, 255, .12); }
.g-langues-seg { display: inline-flex; padding: 3px; border-radius: 999px; background: rgba(255, 255, 255, .12); }
.g-langues-seg button { border: 0; background: transparent; color: rgba(255, 255, 255, .8); font: inherit; font-weight: 800; font-size: .78rem; letter-spacing: .04em; padding: .3rem .65rem; border-radius: 999px; cursor: pointer; }
.g-langues-seg button[aria-pressed="true"] { background: #fff; color: var(--g-bleu-nuit); }
.g-quitter { width: 36px; height: 36px; border-radius: 50%; border: 0; display: grid; place-items: center; color: #fff; background: rgba(255, 255, 255, .12); cursor: pointer; }
.g-identite { display: flex; align-items: center; gap: .85rem; margin-top: 1.3rem; position: relative; z-index: 1; }
.g-avatar { width: 52px; height: 52px; border-radius: 50%; display: grid; place-items: center; font-weight: 800; font-size: 1.1rem; color: var(--g-bleu-nuit);
  background: linear-gradient(145deg, #ffffff, #dbe9fb); box-shadow: 0 0 0 3px rgba(255, 255, 255, .22); flex: none; }
.g-identite h1 { margin: 0; font-size: 1.6rem; font-weight: 800; letter-spacing: -0.02em; color: #fff; line-height: 1.15; }
.g-identite p { margin: .15rem 0 0; color: rgba(255, 255, 255, .78); font-weight: 600; font-size: .95rem; }
.g-hero-bas { display: flex; align-items: center; justify-content: space-between; gap: .6rem; flex-wrap: wrap; margin-top: 1.1rem; position: relative; z-index: 1; font-size: .86rem; }
.g-statut { display: inline-flex; align-items: center; gap: .45rem; font-weight: 700; padding: .3rem .75rem; border-radius: 999px; background: rgba(94, 224, 143, .16); color: #b9f5cf; }
.g-point { width: 8px; height: 8px; border-radius: 50%; background: #5ee08f; box-shadow: 0 0 0 4px rgba(94, 224, 143, .25); animation: g-pulse 2.4s ease-in-out infinite; }
@keyframes g-pulse { 50% { box-shadow: 0 0 0 7px rgba(94, 224, 143, 0); } }
.g-date { color: rgba(255, 255, 255, .82); font-weight: 600; }
.g-heure { font-variant-numeric: tabular-nums; font-weight: 800; color: #fff; }
.g-resume { position: relative; z-index: 2; margin: -2.3rem 1rem 0; background: var(--surface); border-radius: 20px; box-shadow: var(--g-ombre-forte); padding: .55rem; }
.g-stats { display: grid; grid-template-columns: repeat(3, 1fr); gap: .35rem; }
.g-stat { border: 0; background: transparent; border-radius: 14px; padding: .65rem .35rem; display: flex; flex-direction: column; align-items: center; gap: .15rem; font: inherit; color: var(--texte-2); cursor: pointer; text-align: center; }
.g-stat strong { font-size: 1.45rem; font-weight: 800; color: var(--texte); line-height: 1.1; font-variant-numeric: tabular-nums; }
.g-stat span { font-size: .72rem; font-weight: 600; line-height: 1.25; }
.g-stat.actif strong { color: var(--g-bleu); }
.g-stat + .g-stat { box-shadow: inset 1px 0 0 var(--bordure); border-radius: 0; }
.g-resume-ok { margin: 0; padding: .75rem .9rem; display: flex; align-items: center; gap: .6rem; font-weight: 700; color: var(--vert); }
.g-section { font-size: 1.02rem; font-weight: 800; margin: .3rem .15rem .8rem; letter-spacing: -0.01em; }
.gardien .g-accueil { gap: .8rem; }
.gardien .g-bouton {
  border: 0; border-radius: 22px; background: var(--surface); box-shadow: var(--g-ombre); min-height: 150px;
  align-items: flex-start; justify-content: flex-start; text-align: left; padding: 1rem .95rem; gap: .1rem;
  transition: transform .12s ease, box-shadow .12s ease;
}
.gardien .g-bouton:hover { border-color: transparent; box-shadow: var(--g-ombre-forte); }
.gardien .g-bouton:active { transform: scale(.97); }
.g-pictogramme { width: 54px; height: 54px; border-radius: 16px; display: grid; place-items: center; background: var(--ton-fond); color: var(--ton); }
.gardien .g-bouton .g-pictogramme svg { width: 32px; height: 32px; color: var(--ton); }
.g-libelle { font-size: 1.02rem; font-weight: 800; color: var(--texte); line-height: 1.2; margin-top: .9rem; }
.g-sous { font-size: .78rem; font-weight: 600; color: var(--texte-2); line-height: 1.25; }
.gardien .g-compteur { top: 12px; right: 12px; min-width: 24px; height: 24px; display: grid; place-items: center; padding: 0 .45rem; font-size: .8rem; box-shadow: 0 0 0 3px var(--surface); }
.g-ton-attestation { --ton: #0a66c2; --ton-fond: #e3effb; }
.g-ton-signalement { --ton: #c2410c; --ton-fond: #fdeadf; }
.g-ton-panne { --ton: #0f766e; --ton-fond: #d9f3ef; }
.g-ton-agenda { --ton: #4338ca; --ton-fond: #e6e7fb; }
.g-ton-arrivee { --ton: #15803d; --ton-fond: #dcf5e4; }
.g-ton-main-courante { --ton: #7c3aed; --ton-fond: #eee6fd; }
[data-theme="sombre"] .g-pictogramme { background: color-mix(in srgb, var(--ton) 22%, transparent); }
[data-theme="sombre"] .g-pictogramme, [data-theme="sombre"] .gardien .g-bouton .g-pictogramme svg { color: color-mix(in srgb, var(--ton) 55%, white); }
.g-pied { display: flex; align-items: center; justify-content: center; gap: .45rem; text-align: center; color: var(--texte-2); font-size: .8rem; font-weight: 600; margin: 1.4rem .5rem .4rem; }
.g-pied span { display: flex; color: var(--g-bleu); }

/* Écrans intérieurs : même en-tête nuit, cartes et tuiles plus douces */
.gardien-ecran .g-tete {
  background: linear-gradient(160deg, #0b2545 0%, #103a6b 70%, #0a66c2 140%); color: #fff; border-bottom: 0;
  padding: calc(.85rem + env(safe-area-inset-top)) 1rem .95rem; border-radius: 0 0 22px 22px; box-shadow: 0 6px 20px rgba(11, 37, 69, .25);
}
.gardien-ecran .g-tete h1 { color: #fff; font-weight: 800; font-size: 1.2rem; }
.gardien-ecran .g-tete .bouton-icone { color: #fff; background: rgba(255, 255, 255, .14); border-radius: 50%; }
.gardien .g-etapes { color: var(--g-bleu); font-weight: 800; letter-spacing: .02em; }
.gardien .g-question { font-weight: 800; letter-spacing: -0.01em; }
.gardien .g-tuile, .gardien .g-chambre, .gardien .g-carte, .gardien .g-ligne-coche { border: 0; box-shadow: var(--g-ombre); border-radius: 18px; }
.gardien .g-tuile[aria-pressed="true"], .gardien .g-chambre[aria-pressed="true"], .gardien .g-chambre.choisi { box-shadow: 0 0 0 2.5px var(--g-bleu), var(--g-ombre); background: var(--accent-doux); }
.gardien .g-ligne-coche.coche { box-shadow: 0 0 0 2.5px var(--vert), var(--g-ombre); }
.gardien .g-barre { background: color-mix(in srgb, var(--surface) 88%, transparent); backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px); border-top: 1px solid var(--bordure); }
.gardien .g-barre .bouton { border-radius: 16px; font-weight: 800; }
.gardien .g-barre .bouton-principal { background: linear-gradient(160deg, #0a66c2, #084f96); border: 0; box-shadow: 0 8px 18px rgba(10, 102, 194, .3); }
.gardien .g-succes .rond { box-shadow: 0 0 0 10px color-mix(in srgb, currentColor 10%, transparent); }

/* ---------- Feuille de choix (photo, photothèque, fichier) ---------- */
.feuille-fond { position: fixed; inset: 0; z-index: 300; background: rgba(5, 8, 12, .5); display: flex; align-items: flex-end; justify-content: center; }
.feuille { width: min(520px, 100%); background: var(--surface); border-radius: 16px 16px 0 0; padding: .6rem .7rem calc(.7rem + env(safe-area-inset-bottom)); display: flex; flex-direction: column; gap: .4rem; box-shadow: var(--ombre); }
.feuille-option { display: flex; align-items: center; gap: .8rem; min-height: 56px; padding: .6rem .9rem; border: 1px solid var(--bordure); border-radius: 12px; background: var(--surface); color: var(--texte); font: inherit; font-size: 1.02rem; font-weight: 600; text-align: left; cursor: pointer; }
.feuille-option:active { background: var(--accent-doux); }
.feuille-icone { font-size: 1.4rem; width: 1.8rem; text-align: center; }
.feuille-annuler { min-height: 50px; border: 0; border-radius: 12px; background: var(--surface-2); color: var(--texte); font: inherit; font-weight: 700; cursor: pointer; margin-top: .2rem; }
.g-document { display: flex; align-items: center; justify-content: space-between; gap: .6rem; padding: .7rem .9rem; border: 1px solid var(--bordure); border-radius: 12px; background: var(--surface); margin-top: .5rem; font-weight: 600; }
.g-document span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

/* ---------- Connexion ---------- */
.page-connexion { min-height: 100vh; display: grid; place-items: center; padding: 1.5rem; }
.boite-connexion { width: min(980px, 100%); display: grid; grid-template-columns: 1.1fr 1fr; gap: 1.2rem; }
.boite-connexion .carte { padding: 1.6rem; }
.comptes-demo { font-size: .9rem; }
.comptes-demo td, .comptes-demo th { padding: .45rem .5rem; }
.selecteur-profil { display: grid; grid-template-columns: 1fr 1fr; gap: .6rem; margin-bottom: 1rem; }

/* ---------- Vue Gardien : gros boutons, un geste par écran ---------- */
.gardien { font-size: 15px; max-width: 640px; margin: 0 auto; min-height: 100vh; display: flex; flex-direction: column; padding-bottom: 96px; }
.g-tete { display: flex; align-items: center; gap: .6rem; padding: .8rem 1rem; background: var(--surface); border-bottom: 1px solid var(--bordure); position: sticky; top: 0; z-index: 10; }
.g-tete h1 { font-size: 1.15rem; margin: 0; flex: 1; }
.g-corps { padding: 1rem; flex: 1; }
.g-accueil { display: grid; grid-template-columns: 1fr 1fr; gap: .9rem; }
.g-bouton {
  background: var(--surface); border: 2px solid var(--bordure); border-radius: 18px; color: var(--texte);
  min-height: 136px; padding: 1rem .6rem; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: .6rem;
  font: inherit; font-size: 1.05rem; font-weight: 700; text-align: center; cursor: pointer; position: relative;
}
.g-bouton svg { width: 52px; height: 52px; color: var(--accent); }
.g-bouton:active { transform: scale(.98); }
.g-bouton:hover { border-color: var(--accent); }
.g-compteur { position: absolute; top: 10px; right: 12px; background: var(--rouge); color: #1b0b0b; border-radius: 99px; font-size: .8rem; padding: .05rem .5rem; font-weight: 800; }
[data-theme="clair"] .g-compteur { color: #fff; }
.g-question { font-size: 1.35rem; font-weight: 750; margin: .3rem 0 1rem; }
.g-chambres { display: grid; grid-template-columns: repeat(auto-fill, minmax(84px, 1fr)); gap: .6rem; }
.g-chambre { min-height: 72px; border-radius: 14px; border: 2px solid var(--bordure); background: var(--surface); color: var(--texte); font: inherit; font-size: 1.3rem; font-weight: 800; cursor: pointer; }
.g-chambre.choisi, .g-chambre[aria-pressed="true"] { border-color: var(--accent); background: var(--accent-doux); }
.g-choix { display: grid; grid-template-columns: 1fr 1fr; gap: .7rem; }
.g-tuile {
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: .45rem; text-align: center;
  min-height: 118px; padding: .7rem .5rem; border-radius: 16px; border: 2px solid var(--bordure); background: var(--surface); color: var(--texte);
  font: inherit; font-weight: 650; font-size: .98rem; cursor: pointer; position: relative;
}
.g-tuile svg { width: 42px; height: 42px; color: var(--accent); }
.g-tuile[aria-pressed="true"] { border-color: var(--accent); background: var(--accent-doux); }
.g-tuile[aria-pressed="true"]::after { content: ""; position: absolute; top: 8px; right: 8px; width: 22px; height: 22px; border-radius: 50%; background: var(--accent) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%230b1220' stroke-width='3' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M5 12.5l4.5 4.5L19 7.5'/%3E%3C/svg%3E") center / 15px no-repeat; }
.g-tuile.urgence-danger svg { color: var(--rouge); }
.g-tuile.urgence-urgente svg { color: var(--orange); }
.g-tuile.urgence-normale svg { color: var(--vert); }
.g-barre { position: fixed; left: 0; right: 0; bottom: 0; background: var(--surface); border-top: 1px solid var(--bordure); padding: .8rem 1rem calc(.8rem + env(safe-area-inset-bottom)); z-index: 15; }
.g-barre-int { max-width: 640px; margin: 0 auto; display: flex; gap: .7rem; }
.g-barre .bouton { flex: 1; min-height: 58px; font-size: 1.1rem; border-radius: 14px; }
.g-rappel { display: flex; gap: .6rem; align-items: flex-start; background: var(--orange-fond); color: var(--orange); border-radius: 12px; padding: .8rem 1rem; font-weight: 650; margin-bottom: 1rem; }
.g-rappel svg { flex: none; }
.g-photos { display: grid; grid-template-columns: repeat(3, 1fr); gap: .6rem; }
.g-photo { position: relative; aspect-ratio: 1; border-radius: 14px; overflow: hidden; border: 1px solid var(--bordure); }
.g-photo img { width: 100%; height: 100%; object-fit: cover; display: block; }
.g-photo button { position: absolute; top: 6px; right: 6px; background: rgba(0,0,0,.65); color: #fff; border: 0; border-radius: 50%; width: 34px; height: 34px; display: grid; place-items: center; cursor: pointer; }
.g-ajout-photo { aspect-ratio: 1; border-radius: 14px; border: 2px dashed var(--bordure); background: transparent; color: var(--texte); display: flex; flex-direction: column; align-items: center; justify-content: center; gap: .3rem; font: inherit; font-weight: 650; cursor: pointer; }
.g-ajout-photo svg { width: 38px; height: 38px; color: var(--accent); }
.g-etat-reseau { display: flex; align-items: center; gap: .5rem; background: var(--orange-fond); color: var(--orange); padding: .55rem 1rem; font-weight: 700; font-size: .92rem; }
.g-etat-reseau svg { width: 20px; height: 20px; }
.g-succes { text-align: center; padding: 2rem 1rem; }
.g-succes .rond { width: 96px; height: 96px; border-radius: 50%; margin: 0 auto 1rem; display: grid; place-items: center; background: var(--vert-fond); color: var(--vert); }
.g-succes .rond.attente { background: var(--orange-fond); color: var(--orange); }
.g-succes .rond svg { width: 56px; height: 56px; }
.g-succes p { font-size: 1.2rem; font-weight: 700; }
.g-carte { background: var(--surface); border: 1px solid var(--bordure); border-radius: 16px; padding: 1rem; margin-bottom: .8rem; }
.g-carte h3 { margin: 0 0 .3rem; font-size: 1.1rem; }
.g-etapes { color: var(--texte-2); font-size: .9rem; font-weight: 600; margin-bottom: .2rem; }
.g-langues { display: flex; gap: .5rem; }
.g-langues button { flex: 1; }
.g-ligne-coche { display: flex; align-items: center; gap: .8rem; padding: .9rem 1rem; border: 2px solid var(--bordure); border-radius: 14px; margin-bottom: .55rem; background: var(--surface); cursor: pointer; font-weight: 650; }
.g-ligne-coche input { width: 28px; height: 28px; flex: none; }
.g-ligne-coche.coche { border-color: var(--vert); background: var(--vert-fond); }
.pin { display: flex; gap: .7rem; justify-content: center; margin: 1rem 0; }
.pin span { width: 22px; height: 22px; border-radius: 50%; border: 2px solid var(--texte-2); }
.pin span.plein { background: var(--accent); border-color: var(--accent); }
.clavier { display: grid; grid-template-columns: repeat(3, 1fr); gap: .7rem; max-width: 340px; margin: 0 auto; }
.clavier button { min-height: 68px; font-size: 1.6rem; font-weight: 700; border-radius: 16px; border: 1px solid var(--bordure); background: var(--surface); color: var(--texte); cursor: pointer; font-family: inherit; }
.qr { background: #fff; padding: 14px; border-radius: 14px; width: min(260px, 80vw); margin: .6rem auto; }
.qr svg, .qr img { width: 100%; height: auto; display: block; }

/* ---------- Mobile ---------- */
@media (max-width: 960px) {
  /* La liste des modules forme un tiroir ; la page défile normalement. */
  .app { display: block; height: auto; overflow: visible; }
  .nav-laterale { position: fixed; top: 0; bottom: 0; left: 0; z-index: 60; width: min(330px, calc(100vw - 2.5rem)); transform: translateX(-110%); transition: transform .2s; box-shadow: var(--ombre); }
  .app.menu-ouvert .nav-laterale { transform: none; }
  .app.menu-ouvert::after { content: ""; position: fixed; inset: 0; background: rgba(0,0,0,.5); z-index: 50; }
  .principal { min-height: 100vh; }
  .bouton-menu { display: inline-flex; }
  .barre-haut { height: auto; min-height: 56px; padding: .45rem .7rem; flex-wrap: wrap; gap: .5rem; }
  .barre-haut .espace { display: none; }
  .titre-module { flex: 1; }
  .selecteur-etab { min-width: 0; max-width: none; flex: 1 1 100%; }
  .contenu { padding: 1rem; overflow: visible; }
  .deux-colonnes, .boite-connexion { grid-template-columns: 1fr; }
}
@media (max-width: 640px) {
  body { font-size: 15px; }
  h1 { font-size: 1.3rem; }
  .tableau thead { display: none; }
  .tableau, .tableau tbody, .tableau tr, .tableau td { display: block; width: 100%; }
  .tableau tr { border-bottom: 1px solid var(--bordure); padding: .5rem 0; }
  .tableau td { border: 0; padding: .3rem .9rem; display: flex; justify-content: space-between; gap: 1rem; text-align: right; }
  .tableau td::before { content: attr(data-titre); font-weight: 600; color: var(--texte-2); text-align: left; flex: none; max-width: 45%; }
  .tableau td.nombre { text-align: right; }
  .indicateurs { grid-template-columns: 1fr; }
  .indicateur-valeur { font-size: 1.25rem; }
  .calendrier { grid-template-columns: 1fr; }
  .calendrier .jour { min-height: 0; }
  .calendrier .jour.hors-mois { display: none; }
  .plan-chambres { grid-template-columns: repeat(auto-fill, minmax(130px, 1fr)); }
  .etage { grid-template-columns: 1fr; }
  .ligne-justificatif { grid-template-columns: 1fr auto; }
  .entete-lignes-registre { display: none; }
  .ligne-registre { grid-template-columns: 54px 1fr 70px; }
  .ligne-registre > select, .ligne-registre > label, .ligne-registre > .bouton { grid-column: 2 / -1; }
  .audit-choix { width: 100%; display: grid; grid-template-columns: 1fr 1fr; }
  .audit-choix .bouton { min-height: 44px; font-size: .95rem; }
  .audit-choix .bouton:nth-child(3) { grid-column: 1 / -1; }
  .case-audit { padding: .55rem .6rem; font-size: 1rem; }
  .barre-audit { margin: 1rem -1rem -1rem; border-radius: 0; padding-bottom: calc(.7rem + env(safe-area-inset-bottom)); }
  .barre-audit .bouton { flex: 1; min-height: 48px; }
  .ligne-justificatif > span:nth-child(3) { grid-column: 1 / -1; }
  .ligne-justificatif input[type=date] { grid-column: 1 / -1; }
  .etage-libelle { border-right: 0; border-bottom: 1px solid var(--bordure); padding: .35rem .7rem; }
  .carte-chambre { width: calc(50% - .25rem); }
  .en-tete-page .actions { width: 100%; }
  .barre-ligne { grid-template-columns: 90px 1fr 34px; }
  .g-bouton { min-height: 124px; font-size: 1rem; }
}
@media print {
  .nav-laterale, .barre-haut, .bandeau-demo { display: none; }
  .app { display: block; height: auto; overflow: visible; }
  .contenu { overflow: visible; }
}

/* Thème clair : coche blanche sur l'accent bleu (contraste suffisant). */
[data-theme="clair"] .g-tuile[aria-pressed="true"]::after { background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23ffffff' stroke-width='3' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M5 12.5l4.5 4.5L19 7.5'/%3E%3C/svg%3E"); }

/* Petits écrans : les boutons à libellé long passent à la ligne au lieu de déborder. */
@media (max-width: 640px) {
  .bouton { white-space: normal; text-align: center; max-width: 100%; }
}
