/* Otam — identité visuelle. Haut de gamme, calme, jamais chargé.
   DEUX couleurs principales et UNE pointe d'accent, toutes définies ICI (et seulement ici) :
   - le fond : un noir bleuté profond (thème par défaut) ou un blanc perle (thème clair) ;
   - l'ARGENT : mat pour les boutons, filets et textes ; métallique seulement pour le logo et les grands titres ;
   - le CHAMPAGNE, en petite touche (point du logo, liens, focus) : il réchauffe l'argent sans le contredire, comme
     un détail doré sur un objet bien fait. Les couleurs d'état (rouge, ambre, vert, bleu) sont volontairement
     adoucies : ce sont des signaux, pas de la décoration. */

/* ------------------------------------------------------------------ polices (embarquées, licence OFL) */
@font-face { font-family: "Cormorant Garamond"; font-style: normal; font-weight: 400; font-display: swap; src: url("/static/polices/cormorant-garamond-latin-400-normal.woff2") format("woff2"); }
@font-face { font-family: "Cormorant Garamond"; font-style: normal; font-weight: 500; font-display: swap; src: url("/static/polices/cormorant-garamond-latin-500-normal.woff2") format("woff2"); }
@font-face { font-family: "Cormorant Garamond"; font-style: normal; font-weight: 600; font-display: swap; src: url("/static/polices/cormorant-garamond-latin-600-normal.woff2") format("woff2"); }
@font-face { font-family: "Inter"; font-style: normal; font-weight: 400; font-display: swap; src: url("/static/polices/inter-latin-400-normal.woff2") format("woff2"); }
@font-face { font-family: "Inter"; font-style: normal; font-weight: 500; font-display: swap; src: url("/static/polices/inter-latin-500-normal.woff2") format("woff2"); }
@font-face { font-family: "Inter"; font-style: normal; font-weight: 600; font-display: swap; src: url("/static/polices/inter-latin-600-normal.woff2") format("woff2"); }

/* ------------------------------------------------------------------ couleurs : thème sombre (par défaut) */
:root, :root[data-theme="sombre"] {
  --fond: #07090E;
  --fond-halo: none;
  --surface: #0D1118;
  --surface-2: #131822;
  --surface-3: #1A2030;
  --trait: #1E2532;
  --trait-fort: #2C3546;
  --encre: #E9ECF1;
  --encre-2: #BDC4CF;
  --encre-3: #8A94A4;
  --argent: #C7CCD4;
  --argent-vif: #F2F4F7;
  --argent-sombre: #858D99;
  --degrade-argent: linear-gradient(110deg, #7E858F 0%, #E6E9EE 18%, #9EA5AF 34%, #FFFFFF 50%, #A3AAB4 66%, #DCE0E6 82%, #7E858F 100%);
  --bouton-fond: #D3D8DF;
  --bouton-fond-survol: #E3E7EC;
  --bouton-encre: #0A0D13;
  --filet: rgba(199, 204, 212, .12);
  --accent: #D6BE94;
  --accent-encre: #E5D2AE;
  --accent-doux: rgba(214, 190, 148, .11);
  --rouge: #E58C80;   --rouge-doux: rgba(229, 140, 128, .12);
  --orange: #E2A867;  --orange-doux: rgba(226, 168, 103, .12);
  --vert: #93C7A7;    --vert-doux: rgba(147, 199, 167, .11);
  --bleu: #9FB8D0;    --bleu-doux: rgba(159, 184, 208, .11);
  --voile: rgba(3, 4, 8, .66);
  --ombre: none;
  --ombre-flottante: 0 24px 60px rgba(0, 0, 0, .55), 0 0 0 1px rgba(199, 204, 212, .07);
  --sur-couleur: #FFFFFF;
  color-scheme: dark;
}
/* ------------------------------------------------------------------ couleurs : thème clair (sobre, perle et graphite) */
:root[data-theme="clair"] {
  --fond: #F5F5F2;
  --fond-halo: none;
  --surface: #FFFFFF;
  --surface-2: #EFEFEB;
  --surface-3: #E6E6E1;
  --trait: #E1E1DB;
  --trait-fort: #CACAC3;
  --encre: #12151B;
  --encre-2: #3A404A;
  --encre-3: #5F6671;
  --argent: #4E5661;
  --argent-vif: #2A3038;
  --argent-sombre: #8A919B;
  --degrade-argent: linear-gradient(110deg, #343A43 0%, #6E7580 20%, #262B32 38%, #7B828C 52%, #343A43 66%, #69707A 82%, #343A43 100%);
  --bouton-fond: #2B3139;
  --bouton-fond-survol: #3A414B;
  --bouton-encre: #F5F5F2;
  --filet: rgba(78, 86, 97, .14);
  --accent: #8C6C3B;
  --accent-encre: #7A5D31;
  --accent-doux: #F3ECE0;
  --rouge: #A8261B;   --rouge-doux: #FBEDEB;
  --orange: #9A4A0A;  --orange-doux: #FCF1E4;
  --vert: #1D6B45;    --vert-doux: #E8F4EC;
  --bleu: #33536F;    --bleu-doux: #EAF0F5;
  --voile: rgba(17, 17, 17, .28);
  --ombre: 0 1px 2px rgba(17, 17, 17, .05);
  --ombre-flottante: 0 18px 44px rgba(17, 17, 17, .12), 0 2px 6px rgba(17, 17, 17, .05);
  --sur-couleur: #FFFFFF;
  color-scheme: light;
}
/* « Comme l'appareil » : thème clair si l'appareil est réglé en clair */
@media (prefers-color-scheme: light) {
  :root[data-theme="auto"] {
    --fond: #F5F5F2; --fond-halo: none;
    --surface: #FFFFFF; --surface-2: #EFEFEB; --surface-3: #E6E6E1; --trait: #E1E1DB; --trait-fort: #CACAC3;
    --encre: #12151B; --encre-2: #3A404A; --encre-3: #5F6671; --argent: #4E5661; --argent-vif: #2A3038; --argent-sombre: #8A919B;
    --degrade-argent: linear-gradient(110deg, #343A43 0%, #6E7580 20%, #262B32 38%, #7B828C 52%, #343A43 66%, #69707A 82%, #343A43 100%);
    --bouton-fond: #2B3139; --bouton-fond-survol: #3A414B; --bouton-encre: #F5F5F2;
    --filet: rgba(78, 86, 97, .14);
    --accent: #8C6C3B; --accent-encre: #7A5D31; --accent-doux: #F3ECE0;
    --rouge: #A8261B; --rouge-doux: #FBEDEB; --orange: #9A4A0A; --orange-doux: #FCF1E4; --vert: #1D6B45; --vert-doux: #E8F4EC;
    --bleu: #33536F; --bleu-doux: #EAF0F5; --voile: rgba(17, 17, 17, .28); --ombre: 0 1px 2px rgba(17, 17, 17, .05);
    --ombre-flottante: 0 18px 44px rgba(17, 17, 17, .12), 0 2px 6px rgba(17, 17, 17, .05); --sur-couleur: #FFFFFF;
    color-scheme: light;
  }
}
:root {
  --rayon: 12px;
  --rayon-petit: 8px;
  --police: "Inter", "Segoe UI Variable Text", "Segoe UI", system-ui, -apple-system, sans-serif;
  --police-titre: "Cormorant Garamond", "Cormorant", Garamond, "Times New Roman", serif;
  --duree-courte: 160ms;
  --duree: 260ms;
  --duree-longue: 380ms;
  --courbe: cubic-bezier(.22, .61, .36, 1);
}

/* ------------------------------------------------------------------ base */
* { box-sizing: border-box; }
svg[aria-hidden="true"] { width: 18px; height: 18px; flex: none; }
h2 svg[aria-hidden="true"], h3 svg[aria-hidden="true"] { width: 16px; height: 16px; color: var(--encre-3); }
html { background: var(--fond); }
html, body { height: 100%; }
body {
  margin: 0; background: var(--fond-halo), var(--fond); background-attachment: fixed; color: var(--encre);
  font-family: var(--police); font-size: 15px; line-height: 1.55; -webkit-font-smoothing: antialiased; text-rendering: optimizeLegibility;
  font-feature-settings: "cv11", "ss01";
}
button, input, select, textarea { font: inherit; color: inherit; }
a { color: var(--accent-encre); text-underline-offset: 3px; text-decoration-thickness: 1px; }
h1, h2, h3 { margin: 0; font-variant-numeric: lining-nums; }
h1 { font-family: var(--police-titre); font-size: 34px; font-weight: 500; letter-spacing: .01em; line-height: 1.15; color: var(--argent-vif); }
/* L'argent métallique est réservé au logo et aux titres principaux (h1) ; partout ailleurs, argent simple et mat. */
@supports ((-webkit-background-clip: text) or (background-clip: text)) {
  h1 { background: var(--degrade-argent); background-size: 180% 100%; background-position: 30% 50%;
       -webkit-background-clip: text; background-clip: text; color: transparent; }
}
h2 { font-family: var(--police-titre); font-size: 22px; font-weight: 600; letter-spacing: .01em; line-height: 1.25; color: var(--argent-vif); }
h3 { font-size: 15px; font-weight: 600; letter-spacing: .005em; }
p { margin: 0; }
::selection { background: var(--accent-doux); color: var(--encre); }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; border-radius: 4px; }
.masque-visuel { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.muet { color: var(--encre-3); }
.petit { font-size: 13px; }
.gras { font-weight: 600; }
.chiffre { font-variant-numeric: tabular-nums; }
.droite { text-align: right; }
.ligne { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.ligne.espace { justify-content: space-between; }
.pile { display: flex; flex-direction: column; gap: 12px; }
.pile.serree { gap: 6px; }
.grille-2 { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px 18px; }
.grille-3 { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 14px; }
.plein { grid-column: 1 / -1; }
.espace-haut { margin-top: 18px; }
.preformate { white-space: pre-wrap; }
.filet { height: 1px; border: none; background: var(--filet); margin: 0; }

/* ------------------------------------------------------------------ logo : symbole + « OTAM » argenté */
.marque { display: flex; flex-direction: column; align-items: flex-start; padding: 4px 10px 26px; color: var(--argent); text-decoration: none; }
.marque .mot-ligne { display: inline-flex; align-items: center; gap: 10px; line-height: 1; }
.marque .symbole { width: 26px; height: 26px; flex: none; color: var(--argent); }
.symbole .point-accent { fill: var(--accent); }
.marque .mot, .logo-otam {
  font-family: var(--police-titre); font-size: 23px; font-weight: 500; letter-spacing: .34em; margin-right: -.34em;
  line-height: 1; color: var(--argent); text-transform: uppercase;
}
@supports ((-webkit-background-clip: text) or (background-clip: text)) {
  .marque .mot, .logo-otam {
    background: var(--degrade-argent); background-size: 260% 100%; background-position: 0% 50%;
    -webkit-background-clip: text; background-clip: text; color: transparent;
    animation: eclat 9s var(--courbe) infinite;
  }
}
@keyframes eclat { 0%, 55% { background-position: 0% 50%; } 85%, 100% { background-position: 100% 50%; } }
.marque .societe { display: block; font-size: 12px; color: var(--encre-3); margin-top: 9px; font-weight: 400; letter-spacing: .02em; }
.ecran-centre .marque, .verrou .marque { align-items: center; }

/* ------------------------------------------------------------------ structure */
.app { display: grid; grid-template-columns: 236px minmax(0, 1fr); height: 100vh; }
.barre-laterale {
  display: flex; flex-direction: column; gap: 4px; padding: 22px 14px 16px; overflow-y: auto; position: relative;
  background: var(--fond); border-right: 1px solid var(--filet);
}
.nav { display: flex; flex-direction: column; gap: 2px; }
.nav-lien {
  display: flex; align-items: center; gap: 12px; height: 40px; padding: 0 12px; border-radius: var(--rayon-petit); position: relative;
  color: var(--encre-2); text-decoration: none; border: 1px solid transparent; font-weight: 500; cursor: pointer;
  background: none; width: 100%; text-align: left;
  transition: background var(--duree-courte) var(--courbe), color var(--duree-courte) var(--courbe), border-color var(--duree-courte) var(--courbe);
}
.nav-lien svg { width: 18px; height: 18px; flex: none; color: var(--encre-3); transition: color var(--duree-courte) var(--courbe); }
.nav-lien:hover { background: var(--surface-2); color: var(--encre); }
.nav-lien:hover svg { color: var(--argent); }
.nav-lien.actif { background: var(--surface); color: var(--argent-vif); }
.nav-lien.actif::before { content: ""; position: absolute; left: -14px; top: 10px; bottom: 10px; width: 2px; border-radius: 2px; background: var(--argent); }
.nav-lien.actif svg { color: var(--accent); }
.nav-lien .compte { margin-left: auto; font-size: 12px; color: var(--encre-3); }
.nav-lien.avis { height: 32px; padding-left: 13px; gap: 13px; font-size: 13px; font-weight: 400; color: var(--encre-3); }
.nav-lien.avis svg { width: 16px; height: 16px; }
.bas-laterale { margin-top: auto; display: flex; flex-direction: column; gap: 2px; padding-top: 16px; }
.pastille-demo {
  margin: 0 10px 10px; padding: 8px 10px; border-radius: var(--rayon-petit); background: var(--accent-doux);
  color: var(--accent-encre); font-size: 12.5px; line-height: 1.35;
}
main.principal { overflow-y: auto; height: 100vh; view-transition-name: contenu; }
.page { padding: 34px 44px 64px; max-width: 1360px; margin: 0 auto; }
.page.large { max-width: none; }
.entete-page { display: flex; align-items: flex-end; justify-content: space-between; gap: 16px; margin-bottom: 24px; flex-wrap: wrap; }
.entete-page .sous-titre { color: var(--encre-3); margin-top: 6px; }

/* ------------------------------------------------------------------ boutons */
.bouton {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px; height: 38px; padding: 0 16px;
  border-radius: var(--rayon-petit); border: 1px solid var(--trait-fort); background: var(--surface); cursor: pointer;
  font-weight: 500; white-space: nowrap; color: var(--encre); text-decoration: none; position: relative; overflow: hidden;
  transition: background var(--duree-courte) var(--courbe), border-color var(--duree-courte) var(--courbe),
              color var(--duree-courte) var(--courbe), box-shadow var(--duree) var(--courbe), transform 90ms var(--courbe);
}
.bouton:hover { background: var(--surface-2); border-color: var(--argent-sombre); }
.bouton:active { transform: scale(.98); }
.bouton:disabled { opacity: .5; cursor: default; transform: none; }
.bouton svg { width: 16px; height: 16px; }
.bouton.principal { background: var(--bouton-fond); border-color: transparent; color: var(--bouton-encre); font-weight: 600; letter-spacing: .01em; }
.bouton.principal:hover { background: var(--bouton-fond-survol); border-color: transparent; }
.bouton.discret { border-color: transparent; background: transparent; color: var(--encre-2); }
.bouton.discret:hover { background: var(--surface-2); color: var(--encre); border-color: transparent; }
.bouton.danger { color: var(--rouge); border-color: var(--trait-fort); }
.bouton.danger.plein-danger { background: var(--rouge); border-color: var(--rouge); color: var(--sur-couleur); }
.bouton.petit { height: 30px; padding: 0 11px; font-size: 13.5px; }
.bouton.icone { width: 38px; padding: 0; }
.bouton.icone.petit { width: 30px; }
.groupe-boutons { display: inline-flex; border: 1px solid var(--trait-fort); border-radius: var(--rayon-petit); overflow: hidden; }
.groupe-boutons .bouton { border: none; border-radius: 0; height: 36px; }
.groupe-boutons .bouton + .bouton { border-left: 1px solid var(--trait-fort); }
.groupe-boutons .bouton.actif { background: var(--surface-3); font-weight: 600; }

.champ { display: flex; flex-direction: column; gap: 6px; min-width: 0; }
.champ > label, .champ > .etiquette { font-size: 13px; font-weight: 500; color: var(--encre-2); }
.champ .aide { font-size: 12.5px; color: var(--encre-3); }
.saisie, select.saisie, textarea.saisie {
  width: 100%; height: 40px; padding: 0 12px; border-radius: var(--rayon-petit); border: 1px solid var(--trait-fort);
  background: var(--surface); color: var(--encre); min-width: 0;
  transition: border-color var(--duree-courte) var(--courbe), box-shadow var(--duree-courte) var(--courbe);
}
textarea.saisie { height: auto; min-height: 84px; padding: 9px 12px; resize: vertical; line-height: 1.45; }
.saisie:hover { border-color: var(--argent-sombre); }
.saisie:focus { outline: none; border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-doux); }
.saisie[aria-invalid="true"] { border-color: var(--rouge); }
.case { display: inline-flex; align-items: center; gap: 8px; cursor: pointer; font-size: 14.5px; }
.case input { width: 17px; height: 17px; accent-color: var(--accent); }
.jours-semaine { display: flex; gap: 6px; flex-wrap: wrap; }
.jours-semaine label { display: inline-flex; align-items: center; gap: 5px; padding: 4px 9px; border: 1px solid var(--trait-fort); border-radius: 999px; font-size: 13px; cursor: pointer; }
.champ-protege { display: flex; align-items: center; gap: 8px; height: 38px; padding: 0 6px 0 12px; border: 1px dashed var(--trait-fort); border-radius: var(--rayon-petit); color: var(--encre-3); }
.champ-protege .points { letter-spacing: 2px; }
.champ-protege .bouton { margin-left: auto; }
.recherche { position: relative; }
.recherche svg { position: absolute; left: 11px; top: 50%; transform: translateY(-50%); width: 16px; height: 16px; color: var(--encre-3); pointer-events: none; }
.recherche .saisie { padding-left: 34px; }
.barre-outils { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; margin-bottom: 16px; }
.barre-outils .recherche { width: 300px; }
.barre-outils .saisie { width: auto; }
.barre-outils .espaceur { flex: 1; }

/* ------------------------------------------------------------------ cartes, badges, onglets */
/* Cartes sobres : un fond à peine plus clair que la page, sans cadre ni ombre ; l'espace fait la séparation. */
.carte { background: var(--surface); border-radius: var(--rayon); padding: 24px; }
.carte.serree { padding: 14px 16px; }
.carte.vide-cadre { padding: 0; overflow: hidden; }
.carte + .carte { margin-top: 18px; }
.carte h2 + *, .carte h3 + * { margin-top: 12px; }
.badge {
  display: inline-flex; align-items: center; gap: 6px; height: 22px; padding: 0 8px; border-radius: 999px;
  font-size: 12px; font-weight: 600; white-space: nowrap; background: var(--surface-3); color: var(--encre-2);
}
.badge.rouge { background: var(--rouge-doux); color: var(--rouge); }
.badge.orange { background: var(--orange-doux); color: var(--orange); }
.badge.vert { background: var(--vert-doux); color: var(--vert); }
.badge.bleu { background: var(--bleu-doux); color: var(--bleu); }
.badge.accent { background: var(--accent-doux); color: var(--accent-encre); }
.point { width: 8px; height: 8px; border-radius: 50%; display: inline-block; background: var(--encre-3); flex: none; }
.point.rouge { background: var(--rouge); } .point.orange { background: var(--orange); } .point.bleu { background: var(--bleu); } .point.vert { background: var(--vert); }
.onglets { display: flex; gap: 4px; border-bottom: 1px solid var(--trait); margin-bottom: 20px; flex-wrap: wrap; }
.onglet {
  height: 42px; padding: 0 14px; border: none; background: none; cursor: pointer; color: var(--encre-3); font-weight: 500;
  border-bottom: 2px solid transparent; margin-bottom: -1px; white-space: nowrap; letter-spacing: .01em;
  transition: color var(--duree-courte) var(--courbe), border-color var(--duree) var(--courbe);
}
.onglet:hover { color: var(--encre); }
.onglet[aria-selected="true"] { color: var(--argent-vif); border-bottom-color: var(--argent); }
.puces { display: flex; gap: 6px; flex-wrap: wrap; }
.puce {
  height: 30px; padding: 0 13px; border-radius: 999px; border: 1px solid var(--trait-fort); background: var(--surface);
  cursor: pointer; font-size: 13.5px; color: var(--encre-2);
  transition: background var(--duree-courte) var(--courbe), border-color var(--duree-courte) var(--courbe), color var(--duree-courte) var(--courbe);
}
.puce:hover { background: var(--surface-2); color: var(--encre); border-color: var(--argent-sombre); }
.puce:active { transform: scale(.98); }
.puce[aria-pressed="true"] { background: var(--bouton-fond); border-color: transparent; color: var(--bouton-encre); font-weight: 500; }

/* ------------------------------------------------------------------ tableaux */
/* position: relative : les libellés réservés aux lecteurs d'écran (.masque-visuel, en absolu) restent dans le cadre
   au lieu d'élargir la page sur téléphone */
.tableau-cadre { position: relative; background: var(--surface); border-radius: var(--rayon); overflow: auto; }
table.tableau { width: 100%; border-collapse: collapse; }
.tableau th {
  text-align: left; font-size: 11.5px; font-weight: 600; color: var(--encre-3); padding: 11px 14px; background: var(--surface);
  border-bottom: 1px solid var(--trait); position: sticky; top: 0; z-index: 1; white-space: nowrap; text-transform: uppercase; letter-spacing: .07em;
}
.tableau tbody tr { transition: background var(--duree-courte) var(--courbe); }
.tableau td { padding: 11px 14px; border-bottom: 1px solid var(--trait); vertical-align: middle; }
.tableau tr:last-child td { border-bottom: none; }
.tableau tbody tr.cliquable { cursor: pointer; }
.tableau tbody tr.cliquable:hover td { background: var(--surface-2); }
.tableau td.actions { text-align: right; white-space: nowrap; width: 1%; }
.tableau .sous, .liste-simple .sous, .choix .sous { display: block; font-size: 12.5px; color: var(--encre-3); }
.pied-tableau { padding: 10px 14px; font-size: 13px; color: var(--encre-3); border-top: 1px solid var(--trait); }

/* ------------------------------------------------------------------ états */
.etat { display: flex; flex-direction: column; align-items: center; justify-content: center; text-align: center; gap: 10px; padding: 48px 20px; color: var(--encre-3); }
.etat .rond { width: 44px; height: 44px; border-radius: 50%; display: grid; place-items: center; background: var(--surface-2); color: var(--encre-3); }
.etat .rond svg { width: 22px; height: 22px; }
.etat h3 { color: var(--encre); }
.etat p { max-width: 460px; }
.etat.erreur .rond { background: var(--rouge-doux); color: var(--rouge); }
.chargement { display: flex; align-items: center; justify-content: center; gap: 10px; padding: 40px; color: var(--encre-3); }
.rouage { width: 18px; height: 18px; border-radius: 50%; border: 2px solid var(--trait-fort); border-top-color: var(--encre-2); animation: tourner .8s linear infinite; }
@keyframes tourner { to { transform: rotate(360deg); } }
.encadre { padding: 12px 14px; border-radius: var(--rayon-petit); font-size: 14px; line-height: 1.45; display: flex; gap: 10px; }
.encadre svg { width: 18px; height: 18px; flex: none; margin-top: 1px; }
.encadre.avertissement { background: var(--orange-doux); color: var(--orange); }
.encadre.info { background: var(--bleu-doux); color: var(--bleu); }
.encadre.erreur { background: var(--rouge-doux); color: var(--rouge); }
.encadre.succes { background: var(--vert-doux); color: var(--vert); }

/* ------------------------------------------------------------------ fenêtres, tiroir, notifications */
.voile { position: fixed; inset: 0; background: var(--voile); z-index: 50; display: flex; align-items: flex-start; justify-content: center; padding: 8vh 20px 20px; }
.modale {
  background: var(--surface); border: 1px solid var(--trait); border-radius: 14px; width: 100%; max-width: 640px;
  max-height: 84vh; display: flex; flex-direction: column; box-shadow: var(--ombre-flottante);
}
.modale.large { max-width: 920px; }
.modale.etroite { max-width: 440px; }
.modale-entete { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 18px 22px 0; }
.modale-corps { padding: 16px 22px; overflow-y: auto; }
.modale-pied { display: flex; justify-content: flex-end; gap: 10px; padding: 14px 22px 18px; border-top: 1px solid var(--trait); }
.modale-pied .gauche { margin-right: auto; }
.tiroir-voile { position: fixed; inset: 0; background: var(--voile); z-index: 40; }
.tiroir {
  position: fixed; top: 0; right: 0; bottom: 0; width: min(600px, 92vw); background: var(--surface); z-index: 41;
  border-left: 1px solid var(--trait); display: flex; flex-direction: column; box-shadow: var(--ombre-flottante);
}
.tiroir-entete { padding: 20px 24px 14px; border-bottom: 1px solid var(--trait); display: flex; gap: 12px; align-items: flex-start; justify-content: space-between; }
.tiroir-corps { padding: 18px 24px 40px; overflow-y: auto; display: flex; flex-direction: column; gap: 22px; }
.section-tiroir h3 { margin-bottom: 10px; display: flex; justify-content: space-between; align-items: center; }
.definitions { display: grid; grid-template-columns: 180px minmax(0, 1fr); gap: 8px 14px; font-size: 14.5px; }
.definitions dt { color: var(--encre-3); }
.definitions dd { margin: 0; overflow-wrap: anywhere; }
.liste-simple { list-style: none; margin: 0; padding: 0; }
.liste-simple li { padding: 11px 4px; border-bottom: 1px solid var(--trait); display: flex; gap: 10px; align-items: center; justify-content: space-between; }
.liste-simple li:last-child { border-bottom: none; }
.liste-simple li.cliquable { cursor: pointer; }
.liste-simple li.cliquable:hover { background: var(--surface-2); }
.notifications { position: fixed; bottom: 22px; left: 50%; transform: translateX(-50%); z-index: 80; display: flex; flex-direction: column; gap: 8px; align-items: center; }
.notification {
  display: flex; align-items: center; gap: 14px; padding: 11px 12px 11px 16px; border-radius: 12px; background: var(--bouton-fond);
  color: var(--bouton-encre); box-shadow: var(--ombre-flottante); font-size: 14px; max-width: 560px; font-weight: 500;
}
.notification.erreur { background: var(--rouge); color: var(--sur-couleur); }
.notification button { background: none; border: none; color: inherit; font-weight: 600; cursor: pointer; text-decoration: underline; padding: 4px; }

/* jauge d'utilisation (Réglages > Assistant et licence) */
.jauge { height: 8px; border-radius: 999px; background: var(--surface-3); overflow: hidden; }
.jauge > span { display: block; height: 100%; border-radius: 999px; background: var(--accent); }
.jauge.orange > span { background: var(--orange); }
.jauge.rouge > span { background: var(--rouge); }

/* écran avant / après */
.diff { width: 100%; border-collapse: collapse; font-size: 14px; }
.diff th { text-align: left; font-size: 12.5px; color: var(--encre-3); font-weight: 600; padding: 6px 8px; border-bottom: 1px solid var(--trait); }
.diff td { padding: 9px 8px; border-bottom: 1px solid var(--trait); vertical-align: top; overflow-wrap: anywhere; }
.diff .avant { color: var(--encre-3); text-decoration: line-through; text-decoration-color: var(--trait-fort); }
.diff .apres { color: var(--encre); font-weight: 500; }
.diff .vide { color: var(--encre-3); font-style: italic; text-decoration: none; }

/* ------------------------------------------------------------------ accueil et assistant */
.accueil { max-width: 880px; margin: 0 auto; padding: 7vh 32px 60px; }
.salutation { text-align: center; margin-bottom: 26px; }
.salutation h1 { font-size: 30px; }
.salutation p { color: var(--encre-3); margin-top: 6px; }
.barre-question { position: relative; }
.barre-question .saisie {
  height: 58px; font-size: 17px; padding: 0 128px 0 50px; border-radius: 14px; background: var(--surface);
  border-color: var(--trait-fort); box-shadow: var(--ombre);
}
.barre-question > svg { position: absolute; left: 17px; top: 50%; transform: translateY(-50%); width: 20px; height: 20px; color: var(--encre-3); }
.barre-question .raccourci { position: absolute; right: 12px; top: 50%; transform: translateY(-50%); display: flex; gap: 8px; align-items: center; }
kbd { font-family: var(--police); font-size: 11.5px; padding: 2px 6px; border: 1px solid var(--trait-fort); border-bottom-width: 2px; border-radius: 5px; color: var(--encre-3); background: var(--surface); }
.exemples { display: flex; gap: 8px; flex-wrap: wrap; justify-content: center; margin-top: 14px; }
.exemples .puce { height: auto; min-height: 30px; padding: 5px 12px; line-height: 1.3; border-radius: 16px; }
.a-faire { margin-top: 40px; }
.a-faire .compteurs { display: flex; gap: 14px; align-items: center; }
.element-action {
  display: grid; grid-template-columns: 10px minmax(0, 1fr) auto; gap: 14px; align-items: center; padding: 13px 16px;
  border-bottom: 1px solid var(--trait); cursor: pointer; background: none; border-left: none; border-right: none; border-top: none;
  width: 100%; text-align: left;
}
.element-action:last-child { border-bottom: none; }
.element-action:hover { background: var(--surface-2); }
.element-action .titre { font-weight: 500; }
.element-action .detail { color: var(--encre-3); font-size: 13.5px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.element-action .categorie { font-size: 12.5px; color: var(--encre-3); display: inline-flex; align-items: center; gap: 4px; white-space: nowrap; }
.element-action .categorie svg { width: 14px; height: 14px; }
.reponse { margin-top: 18px; }
.reponse .question-echo { font-size: 13px; color: var(--encre-3); margin-bottom: 10px; }
.reponse .texte { font-size: 15.5px; line-height: 1.6; }
.reponse .texte p + p, .reponse .texte ul + p, .reponse .texte p + ul { margin-top: 8px; }
.reponse .texte ul { margin: 8px 0 0; padding-left: 20px; }
.reponse .bloc { margin-top: 16px; padding-top: 14px; border-top: 1px solid var(--trait); }
.reponse .bloc-titre { font-size: 12.5px; font-weight: 600; color: var(--encre-3); margin-bottom: 8px; text-transform: none; }
.sources { display: flex; gap: 6px; flex-wrap: wrap; }
.source {
  display: inline-flex; align-items: center; gap: 6px; height: 28px; padding: 0 10px; border-radius: 999px; font-size: 13px;
  background: var(--surface-2); border: none; cursor: pointer; color: var(--encre-2);
}
.source:hover { background: var(--surface-3); color: var(--encre); }
.source svg { width: 13px; height: 13px; }
.resultats { max-height: 320px; overflow-y: auto; border: 1px solid var(--trait); border-radius: var(--rayon-petit); }
.resultat { display: flex; justify-content: space-between; gap: 12px; padding: 9px 12px; border-bottom: 1px solid var(--trait); cursor: pointer; font-size: 14px; background: none; border-left: none; border-right: none; border-top: none; width: 100%; text-align: left; }
.resultat:last-child { border-bottom: none; }
.resultat:hover { background: var(--surface-2); }
.resultat .detail { color: var(--encre-3); text-align: right; font-size: 13px; }
.proposition { border: 1px solid var(--trait-fort); border-radius: var(--rayon-petit); padding: 12px 14px; display: flex; justify-content: space-between; gap: 12px; align-items: center; }
.transparence { margin-top: 12px; font-size: 12.5px; color: var(--encre-3); }
.transparence summary { cursor: pointer; }
.transparence code { display: block; margin-top: 6px; padding: 8px 10px; background: var(--surface-2); border-radius: 6px; white-space: pre-wrap; font-family: Consolas, monospace; font-size: 12px; }

/* palette Ctrl+K */
.palette { width: 100%; max-width: 720px; background: var(--surface); border: 1px solid var(--trait); border-radius: 16px; box-shadow: var(--ombre-flottante); overflow: hidden; display: flex; flex-direction: column; max-height: 80vh; }
.palette .barre-question .saisie { border: none; box-shadow: none; border-radius: 0; border-bottom: 1px solid var(--trait); }
.palette .barre-question .saisie:focus { box-shadow: none; }
.palette-corps { overflow-y: auto; padding: 8px; }
.palette-item { display: flex; align-items: center; gap: 12px; padding: 10px 12px; border-radius: 8px; cursor: pointer; width: 100%; background: none; border: none; text-align: left; }
.palette-item[aria-selected="true"], .palette-item:hover { background: var(--surface-2); }
.palette-item .type { font-size: 12px; color: var(--encre-3); width: 74px; flex: none; }
.palette-item .detail { margin-left: auto; color: var(--encre-3); font-size: 13px; }
.palette-item svg { width: 16px; height: 16px; color: var(--encre-3); flex: none; }
.palette .reponse { padding: 4px 12px 14px; margin-top: 0; }

/* ------------------------------------------------------------------ planning */
.grille-planning { border-collapse: separate; border-spacing: 0; width: 100%; min-width: 960px; }
.grille-planning th, .grille-planning td { border-bottom: 1px solid var(--trait); border-right: 1px solid var(--trait); padding: 6px; vertical-align: top; }
.grille-planning th { background: var(--surface); position: sticky; top: 0; z-index: 2; font-size: 12.5px; color: var(--encre-3); font-weight: 600; text-align: left; padding: 9px 8px; }
.grille-planning th.aujourdhui { color: var(--encre); box-shadow: inset 0 -2px 0 var(--encre); }
.grille-planning td.nom { position: sticky; left: 0; background: var(--surface); z-index: 1; min-width: 200px; max-width: 220px; padding: 8px 12px; }
.grille-planning td.nom .sous { font-size: 12px; color: var(--encre-3); display: block; }
.grille-planning td.case-jour { min-width: 118px; height: 54px; cursor: pointer; background: var(--surface); }
.grille-planning td.case-jour:hover { background: var(--surface-2); }
.grille-planning td.case-jour.weekend { background: var(--fond); }
.grille-planning td.total { text-align: right; white-space: nowrap; font-variant-numeric: tabular-nums; min-width: 86px; background: var(--surface); }
.grille-planning td.total.depasse { color: var(--rouge); font-weight: 600; }
.grille-planning tr.effectif td { background: var(--fond); font-size: 12.5px; color: var(--encre-3); }
.grille-planning tr.effectif td.manque { color: var(--rouge); font-weight: 600; }
.creneau {
  display: block; font-size: 12.5px; padding: 3px 7px; border-radius: 6px; background: var(--surface-3); color: var(--argent-vif);
  margin-bottom: 3px; font-variant-numeric: tabular-nums; border: none; box-shadow: inset 2px 0 0 var(--argent-sombre);
  width: 100%; text-align: left; cursor: pointer; transition: box-shadow var(--duree-courte) var(--courbe), background var(--duree-courte) var(--courbe);
}
.creneau:hover { box-shadow: inset 2px 0 0 var(--argent), 0 0 0 1px var(--trait-fort); }
.creneau.ailleurs { background: var(--surface-2); color: var(--encre-2); box-shadow: inset 2px 0 0 var(--trait-fort); }
.absence-case { display: block; font-size: 12px; padding: 3px 7px; border-radius: 6px; font-weight: 600; }
.absence-case.conge { background: var(--bleu-doux); color: var(--bleu); }
.absence-case.maladie { background: var(--rouge-doux); color: var(--rouge); }
.absence-case.formation, .absence-case.rtt, .absence-case.absence { background: var(--orange-doux); color: var(--orange); }
.absence-case.demande { background: none; border: 1px dashed var(--trait-fort); color: var(--encre-3); font-weight: 500; }
/* indisponibilité déclarée par le salarié : discrète, pour planifier sans la heurter */
.dispo-case { display: block; font-size: 11.5px; padding: 2px 7px; margin-bottom: 3px; border-radius: 6px; border: 1px dashed var(--trait-fort); color: var(--encre-3); }
/* publication du planning : une ligne par boutique */
.publication { padding: 10px 14px; border-radius: var(--rayon-petit); background: var(--surface); font-size: 14px; }
.publication svg { width: 16px; height: 16px; }
.grille-mois td.case-jour { min-width: 34px; height: 36px; text-align: center; font-size: 12px; padding: 4px 2px; }
.grille-mois th { text-align: center; padding: 6px 2px; min-width: 34px; }
.grille-mois td.case-jour .h { font-variant-numeric: tabular-nums; color: var(--encre-2); }
.conflits { display: flex; flex-direction: column; gap: 6px; margin-bottom: 16px; }
.conflit { display: flex; gap: 10px; align-items: flex-start; font-size: 14px; padding: 9px 12px; border-radius: var(--rayon-petit); background: var(--surface); border: none; }
.conflit .point { margin-top: 7px; }

.grille-planning th.ferie { color: var(--orange); }
.grille-planning td.case-jour.ferme { background: repeating-linear-gradient(-45deg, var(--fond), var(--fond) 6px, var(--surface-2) 6px, var(--surface-2) 12px); }
.grille-planning th .sous { display: block; font-weight: 400; font-size: 11.5px; }
.grille-planning td.total .sous { display: block; font-size: 11.5px; }
.creneau.propose { background: transparent; border: 1px dashed var(--accent); box-shadow: none; color: var(--accent-encre); }
.defilant { max-height: calc(100vh - 260px); }
.conflit.cliquable { cursor: pointer; text-align: left; width: 100%; font: inherit; color: inherit; }
.conflit.cliquable:hover { background: var(--surface-2); }
/* couleurs des types d'absence (profil métier) */
.teinte-bleu { background: var(--bleu-doux); color: var(--bleu); }
.teinte-rouge { background: var(--rouge-doux); color: var(--rouge); }
.teinte-jaune, .teinte-orange { background: var(--orange-doux); color: var(--orange); }
.teinte-vert { background: var(--vert-doux); color: var(--vert); }
.teinte-violet { background: var(--accent-doux); color: var(--accent-encre); }
.teinte-gris { background: var(--surface-3); color: var(--encre-2); }
/* couverture : tranches de 30 min, présents / besoin */
.couverture { display: grid; grid-template-columns: repeat(7, minmax(120px, 1fr)); gap: 10px; padding: 12px; min-width: 900px; }
.cov-jour { display: flex; flex-direction: column; gap: 8px; }
.cov-titre { display: flex; justify-content: space-between; align-items: center; gap: 6px; font-size: 13px; font-weight: 600; }
.cov-ferme { font-size: 13px; padding: 10px; border: 1px dashed var(--trait-fort); border-radius: var(--rayon-petit); }
.cov-tranches { display: flex; flex-direction: column; gap: 2px; }
.cov-tranche { display: flex; justify-content: space-between; font-size: 12px; padding: 2px 8px; border-radius: 5px; background: var(--vert-doux); color: var(--vert); font-variant-numeric: tabular-nums; }
.cov-tranche.manque { background: var(--rouge-doux); color: var(--rouge); font-weight: 600; }
.cov-tranche.exces { background: var(--bleu-doux); color: var(--bleu); }
.cov-tranche .heure { opacity: .8; }

/* ------------------------------------------------------------------ aujourd'hui */
.resume-jour { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 12px; }
.tuile {
  display: flex; flex-direction: column; gap: 2px; padding: 18px 20px; border-radius: var(--rayon);
  background: var(--surface); text-decoration: none; color: var(--encre);
  transition: background var(--duree-courte) var(--courbe);
}
.tuile:hover { background: var(--surface-2); }
.tuile:active { transform: scale(.99); }
.tuile svg { color: var(--encre-3); margin-bottom: 6px; }
.tuile .nombre { font-family: var(--police-titre); font-size: 32px; font-weight: 500; line-height: 1.05; font-variant-numeric: lining-nums tabular-nums; color: var(--argent-vif); }
.tuile .libelle { font-size: 13px; color: var(--encre-3); }
.tuile.orange .nombre { color: var(--orange); }
.tuile.rouge .nombre { color: var(--rouge); }
.grille-jour { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 18px; align-items: start; }
.grille-jour .carte + .carte { margin-top: 0; }
.carte-jour { scroll-margin-top: 20px; }
.compteur { display: inline-grid; place-items: center; min-width: 22px; height: 22px; padding: 0 6px; margin-left: 8px; border-radius: 999px; background: var(--surface-3); font-size: 12px; font-weight: 600; color: var(--encre-2); vertical-align: 2px; }
.bloc-boutique { padding: 12px 14px; border-radius: var(--rayon-petit); background: var(--surface-2); display: flex; flex-direction: column; gap: 6px; }
.liste-compacte { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 4px; font-size: 14px; }
.liste-compacte li { display: flex; justify-content: space-between; gap: 10px; }
.petit-titre { font-size: 13px; color: var(--encre-3); font-weight: 600; margin-bottom: 6px; }
.mes-jours { display: flex; flex-direction: column; margin: 10px 0; }
.mon-jour { display: grid; grid-template-columns: 172px minmax(0, 1fr); gap: 12px; align-items: center; padding: 11px 12px; border-bottom: 1px solid var(--trait); }
.mon-jour:last-child { border-bottom: none; }
.mon-jour .quand { font-weight: 600; font-size: 14px; }
.mon-jour.aujourdhui { background: var(--accent-doux); }
.mon-jour.repos .quand { color: var(--encre-3); font-weight: 500; }
.mes-jours.grand .mon-jour { padding: 14px 16px; }
.soldes { display: flex; gap: 10px; flex-wrap: wrap; margin: 6px 0 12px; }
.solde { display: flex; flex-direction: column; min-width: 150px; }
.solde .nombre, .nombre { font-family: var(--police-titre); font-size: 26px; font-weight: 500; font-variant-numeric: lining-nums tabular-nums; line-height: 1.15; color: var(--argent-vif); }

/* ------------------------------------------------------------------ équipe, échéances, annonces */
.grille-cartes { display: grid; grid-template-columns: repeat(auto-fill, minmax(320px, 1fr)); gap: 14px; align-items: start; }
.grille-cartes .carte + .carte { margin-top: 0; }
.case.fait { color: var(--encre-3); text-decoration: line-through; }
.texte-rouge { color: var(--rouge); }
.texte-orange { color: var(--orange); }
.lien-bouton { background: none; border: none; padding: 0; cursor: pointer; color: var(--accent-encre); text-align: left; display: inline-flex; align-items: center; gap: 4px; }
.lien-bouton:hover { text-decoration: underline; }
.lien-bouton svg { width: 15px; height: 15px; }
.bloc-code { display: block; padding: 10px 12px; background: var(--surface-2); border-radius: var(--rayon-petit); font-family: Consolas, monospace; font-size: 12.5px; overflow-wrap: anywhere; user-select: all; }
.liste-choix { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; }
.choix { display: flex; align-items: flex-start; gap: 10px; padding: 12px; border: 1px solid var(--trait); border-radius: var(--rayon-petit); background: var(--surface); cursor: pointer; text-align: left; transition: border-color var(--duree-courte) var(--courbe), background var(--duree-courte) var(--courbe), transform var(--duree-courte) var(--courbe); }
.choix:hover { border-color: var(--argent-sombre); background: var(--surface-2); }
.choix:active { transform: scale(.99); }
.choix .sous { display: block; font-size: 12.5px; color: var(--encre-3); }
.annonce { display: flex; flex-direction: column; gap: 8px; }
.pile > .carte + .carte { margin-top: 0; }
.annonce.non-lue { border-left: 3px solid var(--accent); }
.texte-annonce p + p { margin-top: 6px; }
.lectures summary { cursor: pointer; }
.lectures p { margin-top: 6px; }

/* ------------------------------------------------------------------ paramètres */
.disposition-parametres { display: grid; grid-template-columns: 230px minmax(0, 1fr); gap: 24px; align-items: start; }
.menu-section { display: flex; flex-direction: column; gap: 2px; position: sticky; top: 0; }
.contenu-section { min-width: 0; max-width: 900px; }
.contenu-section .carte + .carte { margin-top: 0; }
.cases-multiples { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 6px 14px; }
.jauge-ligne { display: flex; flex-direction: column; gap: 6px; }
.jauge > span.orange { background: var(--orange); }
.jauge > span.rouge { background: var(--rouge); }
hr { border: none; border-top: 1px solid var(--trait); margin: 8px 0; width: 100%; }

/* ------------------------------------------------------------------ démarrage */
.page-demarrage { max-width: 860px; }
.entete-demarrage { margin-bottom: 18px; display: flex; flex-direction: column; gap: 6px; }
.entete-demarrage .sous-titre { color: var(--encre-3); }
.progression-demarrage { display: flex; gap: 6px; margin-top: 8px; }
.progression-demarrage span { width: 48px; height: 4px; border-radius: 999px; background: var(--surface-3); }
.progression-demarrage span.actif { background: var(--argent); }
.progression-demarrage span.fait { background: var(--accent); }
.question-demarrage { display: flex; flex-direction: column; gap: 8px; padding-bottom: 16px; border-bottom: 1px solid var(--trait); }
.question-demarrage h2 { font-size: 17px; display: flex; align-items: center; gap: 10px; }
.question-demarrage .numero { display: inline-grid; place-items: center; width: 24px; height: 24px; border-radius: 50%; background: var(--surface-3); font-size: 12.5px; }
.choix-pastilles { display: flex; flex-wrap: wrap; gap: 8px; }
.pastille-choix { position: relative; cursor: pointer; }
.pastille-choix input { position: absolute; opacity: 0; pointer-events: none; }
.pastille-choix span { display: inline-flex; align-items: center; height: 34px; padding: 0 14px; border-radius: 999px; border: 1px solid var(--trait-fort); background: var(--surface); font-size: 14px; }
.pastille-choix span { transition: background var(--duree-courte) var(--courbe), border-color var(--duree-courte) var(--courbe); }
.pastille-choix:hover span { border-color: var(--argent-sombre); }
.pastille-choix input:checked + span { background: var(--bouton-fond); border-color: transparent; color: var(--bouton-encre); font-weight: 500; }
.pastille-choix input:focus-visible + span { outline: 2px solid var(--accent); outline-offset: 2px; }
.liste-recap { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 8px; }
.liste-recap li { display: flex; gap: 10px; align-items: flex-start; }
.liste-recap svg { color: var(--vert); margin-top: 2px; }

/* ------------------------------------------------------------------ bandeaux, notifications, avis */
.bandeaux:empty { display: none; }
.bandeaux { display: flex; flex-direction: column; }
.bandeau { display: flex; align-items: center; gap: 10px; padding: 8px 40px; font-size: 13.5px; background: var(--surface-2); border-bottom: 1px solid var(--trait); color: var(--encre-2); flex-wrap: wrap; }
.bandeau a { font-weight: 600; }
.bandeau.demo { background: var(--orange-doux); color: var(--orange); }
.bandeau.conseil { background: var(--bleu-doux); color: var(--bleu); }
.bandeau .bouton { margin-left: auto; color: inherit; }
.cloche { position: relative; display: inline-flex; }
.pastille-compte { position: absolute; top: -6px; right: -8px; min-width: 17px; height: 17px; padding: 0 4px; border-radius: 999px; background: var(--rouge); color: var(--sur-couleur); font-size: 10.5px; font-weight: 700; display: grid; place-items: center; }
.pastille-compte[hidden] { display: none; }
.liste-notifs { display: flex; flex-direction: column; }
.notif { display: grid; grid-template-columns: 10px minmax(0, 1fr); gap: 4px 10px; align-items: center; padding: 10px 6px; border: none; border-bottom: 1px solid var(--trait); background: none; text-align: left; cursor: pointer; }
.notif:hover { background: var(--surface-2); }
.notif .point[hidden] { visibility: hidden; display: inline-block; }
.notif .muet { grid-column: 2; }
.notif.nouvelle .texte { font-weight: 600; }
.etoiles { display: flex; gap: 4px; }
.etoile { width: 40px; height: 40px; display: grid; place-items: center; border: 1px solid var(--trait-fort); border-radius: var(--rayon-petit); background: var(--surface); cursor: pointer; color: var(--encre-3); }
.etoile svg { width: 20px; height: 20px; }
.etoile { transition: color var(--duree-courte) var(--courbe), background var(--duree-courte) var(--courbe), transform 90ms var(--courbe); }
.etoile:active { transform: scale(.94); }
.etoile.pleine { color: var(--accent); background: var(--accent-doux); border-color: transparent; }
.etoile.pleine svg { fill: currentColor; }
.menu-mobile { display: flex; flex-direction: column; gap: 2px; }
.conteneur-page { min-height: 100%; }

/* ------------------------------------------------------------------ téléphone */
.haut-mobile, .nav-mobile { display: none; }

/* ------------------------------------------------------------------ verrouillage et ouverture */
.ecran-centre { min-height: 100vh; display: grid; place-items: center; padding: 24px; }
.ecran-centre .carte { width: 100%; max-width: 420px; padding: 32px; }
.ecran-centre .marque { justify-content: center; padding-bottom: 8px; }
.verrou { position: fixed; inset: 0; z-index: 100; background: var(--fond); display: grid; place-items: center; }

@media (max-width: 1180px) {
  .app { grid-template-columns: 72px minmax(0, 1fr); }
  .barre-laterale .marque .mot, .barre-laterale .marque .societe, .pastille-demo, .nav-lien .compte { display: none; }
  /* icônes seules à l'écran, mais le libellé reste lu par les lecteurs d'écran */
  .barre-laterale .libelle-nav { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
  .barre-laterale .marque { padding-left: 0; align-items: center; }
  .barre-laterale .nav-lien { justify-content: center; padding: 0; }
  .page { padding: 24px 24px 50px; }
  .resume-jour { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .grille-jour { grid-template-columns: minmax(0, 1fr); }
  .disposition-parametres { grid-template-columns: 200px minmax(0, 1fr); }
  .bandeau { padding: 8px 24px; }
}
@media (max-width: 760px) {
  body { font-size: 15.5px; }
  .app { display: block; height: auto; min-height: 100vh; }
  .barre-laterale { display: none; }
  main.principal { height: auto; overflow: visible; padding-bottom: calc(72px + env(safe-area-inset-bottom)); }
  .haut-mobile {
    display: flex; align-items: center; justify-content: space-between; gap: 10px; position: sticky; top: 0; z-index: 30;
    padding: 10px 16px; background: var(--fond); border-bottom: 1px solid var(--trait);
  }
  .haut-mobile .marque { padding: 0; }
  .haut-mobile .libelle-nav { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
  .haut-mobile .cloche .pastille-compte { top: -4px; right: -6px; }
  .barre-question .raccourci { display: none; }
  .barre-question .saisie { padding-right: 16px; height: 52px; font-size: 16px; }
  .nav-mobile {
    display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); position: fixed; left: 0; right: 0; bottom: 0; z-index: 30;
    background: var(--surface); border-top: 1px solid var(--trait); padding: 4px 4px calc(4px + env(safe-area-inset-bottom));
  }
  .nav-mobile-lien {
    display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 2px; height: 56px; border: none; background: none;
    color: var(--encre-3); text-decoration: none; font-size: 11px; cursor: pointer; border-radius: var(--rayon-petit); min-width: 0;
  }
  .nav-mobile-lien .libelle-nav { max-width: 100%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
  .nav-mobile-lien svg { width: 22px; height: 22px; }
  .nav-mobile-lien.actif { color: var(--encre); font-weight: 600; }
  .nav-mobile-lien.actif svg { color: var(--accent); }
  .page { padding: 18px 16px 40px; }
  h1 { font-size: 28px; }
  .entete-page { margin-bottom: 14px; align-items: flex-start; }
  .bandeau { display: grid; grid-template-columns: auto minmax(0, 1fr) auto auto; align-items: center; gap: 4px 10px; padding: 8px 12px 8px 16px; font-size: 13px; line-height: 1.35; }
  .bandeau .bouton { margin-left: 0; }
  .masque-mobile { display: none; }
  .grille-2, .grille-3, .liste-choix { grid-template-columns: minmax(0, 1fr); }
  .resume-jour { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .tuile { padding: 10px 12px; }
  .tuile .nombre { font-size: 22px; }
  .barre-outils .recherche { width: 100%; }
  .barre-outils .espaceur { display: none; }
  .onglets { flex-wrap: nowrap; overflow-x: auto; scrollbar-width: none; }
  .carte { padding: 16px; }
  .mon-jour { grid-template-columns: minmax(0, 1fr); gap: 4px; }
  .definitions { grid-template-columns: minmax(0, 1fr); gap: 2px 0; }
  .definitions dd { margin-bottom: 8px; }
  .disposition-parametres { grid-template-columns: minmax(0, 1fr); }
  .menu-section { position: static; flex-direction: row; overflow-x: auto; gap: 6px; padding-bottom: 4px; scrollbar-width: none; }
  .menu-section .nav-lien { width: auto; flex: none; height: 36px; border: 1px solid var(--trait); }
  .voile { padding: 0; align-items: flex-end; }
  .modale { max-height: 92vh; border-radius: 16px 16px 0 0; max-width: none !important; }
  .modale-pied { flex-wrap: wrap; }
  .modale-pied .bouton { flex: 1 1 auto; }
  .tiroir { width: 100vw; }
  .notifications { bottom: calc(80px + env(safe-area-inset-bottom)); width: calc(100% - 24px); }
  .notification { max-width: none; width: 100%; }
  .defilant { max-height: none; }
  .couverture { grid-template-columns: repeat(7, minmax(110px, 1fr)); }
  /* tableaux : une petite carte par ligne, « intitulé : valeur » */
  /* les tableaux devenus cartes n'ont rien à faire défiler ; les grilles (planning, mois, couverture) défilent
     dans leur cadre, sans élargir la page ni la barre de navigation du bas */
  .tableau-cadre:has(> table.tableau) { overflow: visible; }
  table.tableau, .tableau tbody { display: block; }
  .tableau thead { display: none; }
  .tableau tr { display: flex; flex-direction: column; gap: 2px; padding: 10px 14px; border-bottom: 1px solid var(--trait); }
  .tableau tr:last-child { border-bottom: none; }
  .tableau td { display: flex; justify-content: space-between; align-items: baseline; gap: 12px; padding: 2px 0; border: none; text-align: right; }
  .tableau td:first-child { text-align: left; font-size: 15px; }
  .tableau td:first-child::before { content: none; }
  .tableau td[data-titre]:not(:first-child)::before { content: attr(data-titre); color: var(--encre-3); font-size: 12.5px; text-align: left; flex: none; }
  .tableau td:empty, .tableau td.actions:empty { display: none; }
  .tableau td.actions { width: auto; justify-content: flex-end; padding-top: 6px; }
  .tableau td.actions::before { content: none !important; }
  .tableau tbody tr.cliquable:hover td { background: none; }
}
.liste-points { margin: 0; padding-left: 20px; display: flex; flex-direction: column; gap: 6px; }
.rapport .encadre { flex: 1; }
@media print {
  .barre-laterale, .haut-mobile, .nav-mobile, .bandeaux, .onglets, .barre-outils, .notifications, .rapport .bouton { display: none !important; }
  .app { display: block; height: auto; }
  main.principal { height: auto; overflow: visible; }
  .carte, .tableau-cadre { break-inside: avoid; border: 1px solid #ccc; }
  body { background: #fff; color: #000; }
  h1, .marque .mot { background: none !important; color: #000 !important; }
}
/* ------------------------------------------------------------------ mouvement (150 à 400 ms, courbes naturelles) */
@keyframes entree { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: none; } }
@keyframes sortie { to { opacity: 0; transform: translateY(-4px); } }
@keyframes fondu { from { opacity: 0; } to { opacity: 1; } }
@keyframes glisse { from { opacity: 0; transform: translateX(28px); } to { opacity: 1; transform: none; } }
@keyframes monte { from { opacity: 0; transform: translateY(12px) scale(.985); } to { opacity: 1; transform: none; } }
/* Arrivée d'un écran (repli quand le navigateur ne sait pas faire de transition de vues) : l'écran entier apparaît
   d'un seul fondu, sans cascade de blocs. */
.conteneur-page.entree > * { animation: entree var(--duree-longue) var(--courbe) both; }
.voile, .tiroir-voile { animation: fondu var(--duree) var(--courbe); }
.modale, .palette { animation: monte var(--duree) var(--courbe); }
.tiroir { animation: glisse var(--duree-longue) var(--courbe); }
.notification { animation: monte var(--duree) var(--courbe); }
.reponse { animation: entree var(--duree-longue) var(--courbe); }
/* Transition de vues : le menu reste immobile, seul le contenu change (fondu + léger glissement), sans blanc. */
@view-transition { navigation: auto; }
::view-transition-old(root), ::view-transition-new(root) { animation: none; }
::view-transition-old(contenu) { animation: sortie var(--duree-courte) var(--courbe) both; }
::view-transition-new(contenu) { animation: entree var(--duree-longue) var(--courbe) both; }
/* Apparition progressive au défilement (pages publiques) : seulement si le JavaScript est actif. */
.js [data-apparition] { opacity: 0; transform: translateY(14px); transition: opacity var(--duree-longue) var(--courbe), transform var(--duree-longue) var(--courbe); }
.js [data-apparition].visible { opacity: 1; transform: none; }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; }
  ::view-transition-group(*), ::view-transition-old(*), ::view-transition-new(*) { animation: none !important; }
  .js [data-apparition] { opacity: 1; transform: none; }
}
