/* Mini-outils — styles communs. Thème repris de capedinvisibilite.fr */

/* Polices hébergées dans le site (dossier polices/, licences SIL OFL jointes) : aucune
   requête vers un service tiers. Fichiers récupérés depuis Google Fonts, sous-ensembles
   latin et latin étendu ; Inter Tight et JetBrains Mono sont des polices variables,
   un même fichier sert plusieurs graisses. */
@font-face { font-family: 'Instrument Serif'; font-style: italic; font-weight: 400; font-display: swap; src: url(polices/instrument-serif-italique-latin-ext.woff2) format('woff2'); unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C4, U+2113, U+2C60-2C7F, U+A720-A7FF; }
@font-face { font-family: 'Instrument Serif'; font-style: italic; font-weight: 400; font-display: swap; src: url(polices/instrument-serif-italique-latin.woff2) format('woff2'); unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }
@font-face { font-family: 'Instrument Serif'; font-style: normal; font-weight: 400; font-display: swap; src: url(polices/instrument-serif-latin-ext.woff2) format('woff2'); unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C4, U+2113, U+2C60-2C7F, U+A720-A7FF; }
@font-face { font-family: 'Instrument Serif'; font-style: normal; font-weight: 400; font-display: swap; src: url(polices/instrument-serif-latin.woff2) format('woff2'); unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }
@font-face { font-family: 'Space Mono'; font-style: italic; font-weight: 400; font-display: swap; src: url(polices/space-mono-italique-latin-ext.woff2) format('woff2'); unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C4, U+2113, U+2C60-2C7F, U+A720-A7FF; }
@font-face { font-family: 'Space Mono'; font-style: italic; font-weight: 400; font-display: swap; src: url(polices/space-mono-italique-latin.woff2) format('woff2'); unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }
@font-face { font-family: 'Inter Tight'; font-style: normal; font-weight: 400; font-display: swap; src: url(polices/inter-tight-latin-ext.woff2) format('woff2'); unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C4, U+2113, U+2C60-2C7F, U+A720-A7FF; }
@font-face { font-family: 'Inter Tight'; font-style: normal; font-weight: 400; font-display: swap; src: url(polices/inter-tight-latin.woff2) format('woff2'); unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }
@font-face { font-family: 'Inter Tight'; font-style: normal; font-weight: 500; font-display: swap; src: url(polices/inter-tight-latin-ext.woff2) format('woff2'); unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C4, U+2113, U+2C60-2C7F, U+A720-A7FF; }
@font-face { font-family: 'Inter Tight'; font-style: normal; font-weight: 500; font-display: swap; src: url(polices/inter-tight-latin.woff2) format('woff2'); unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }
@font-face { font-family: 'Inter Tight'; font-style: normal; font-weight: 600; font-display: swap; src: url(polices/inter-tight-latin-ext.woff2) format('woff2'); unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C4, U+2113, U+2C60-2C7F, U+A720-A7FF; }
@font-face { font-family: 'Inter Tight'; font-style: normal; font-weight: 600; font-display: swap; src: url(polices/inter-tight-latin.woff2) format('woff2'); unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }
@font-face { font-family: 'Inter Tight'; font-style: normal; font-weight: 700; font-display: swap; src: url(polices/inter-tight-latin-ext.woff2) format('woff2'); unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C4, U+2113, U+2C60-2C7F, U+A720-A7FF; }
@font-face { font-family: 'Inter Tight'; font-style: normal; font-weight: 700; font-display: swap; src: url(polices/inter-tight-latin.woff2) format('woff2'); unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }
@font-face { font-family: 'JetBrains Mono'; font-style: normal; font-weight: 400; font-display: swap; src: url(polices/jetbrains-mono-latin-ext.woff2) format('woff2'); unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C4, U+2113, U+2C60-2C7F, U+A720-A7FF; }
@font-face { font-family: 'JetBrains Mono'; font-style: normal; font-weight: 400; font-display: swap; src: url(polices/jetbrains-mono-latin.woff2) format('woff2'); unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }
@font-face { font-family: 'JetBrains Mono'; font-style: normal; font-weight: 500; font-display: swap; src: url(polices/jetbrains-mono-latin-ext.woff2) format('woff2'); unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C4, U+2113, U+2C60-2C7F, U+A720-A7FF; }
@font-face { font-family: 'JetBrains Mono'; font-style: normal; font-weight: 500; font-display: swap; src: url(polices/jetbrains-mono-latin.woff2) format('woff2'); unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }
@font-face { font-family: 'JetBrains Mono'; font-style: normal; font-weight: 700; font-display: swap; src: url(polices/jetbrains-mono-latin-ext.woff2) format('woff2'); unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C4, U+2113, U+2C60-2C7F, U+A720-A7FF; }
@font-face { font-family: 'JetBrains Mono'; font-style: normal; font-weight: 700; font-display: swap; src: url(polices/jetbrains-mono-latin.woff2) format('woff2'); unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }
:root {
  --blue: #1136DB;
  --ink: #1B2450;
  --muted: #565D78;
  --cream: #F4EFE3;
  --paper: #FCF9F1;
  --chip: #EBE6D9;
  --rouge: #C62828;   /* anomalie à corriger (contrôle des 100 % d'une décomposition) */
  --line: #E0DACA;
  --on-blue: #F8F3E6;
  --on-blue-muted: #DCE1FA;
  --sans: 'Inter Tight', system-ui, sans-serif;
  /* Police des mots mis en valeur en italique (titres, encart, signature) : Instrument Serif.
     ESSAI EN RÉSERVE (Space Mono italique, publié en 1.21.15 puis retiré) : remplacer les
     trois lignes ci-dessous par celles du bloc « Variante Space Mono ». Space Mono est plus
     large : les mots y sont réduits (--serif-echelle) et resserrés (--serif-approche).
     Ses fichiers restent dans polices/ et ses @font-face plus haut. */
  --serif: 'Instrument Serif', Georgia, serif;
  --serif-echelle: 1;
  --serif-approche: 0em;
  /* Variante Space Mono :
  --serif: 'Space Mono', ui-monospace, Menlo, Consolas, monospace;
  --serif-echelle: 0.84;
  --serif-approche: -0.04em;
  */
  --mono: 'JetBrains Mono', ui-monospace, Menlo, Consolas, monospace;
}
* { box-sizing: border-box; }
[hidden] { display: none !important; }
body {
  margin: 0;
  background: var(--cream);
  color: var(--ink);
  font-family: var(--sans);
  font-size: 16px;
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
}
.conteneur { max-width: 1560px; margin: 0 auto; padding: 0 32px; }

/* ---------- Menu de gauche (rempli par commun.js) ---------- */
body { display: grid; grid-template-columns: 276px minmax(0, 1fr); min-height: 100vh; }
#menu {
  position: sticky; top: 0; height: 100vh; display: flex; flex-direction: column; min-height: 0;
  background: var(--blue); color: var(--on-blue);
}
#menu :focus-visible { outline: 2px solid var(--on-blue); outline-offset: 2px; }
.logo {
  display: flex; align-items: center; justify-content: center; gap: 10px; padding: 26px 26px 23px;
  color: var(--on-blue); font-size: 20px; font-weight: 500; letter-spacing: 0.06em; text-decoration: none;
}
/* Étiquette « Bêta » : petite pastille accrochée en haut à droite du logo du menu,
   et après le nom dans la barre mobile. */
.logo-mot { position: relative; display: inline-flex; }
.beta {
  display: inline-block; padding: 2px 6px 1px; border-radius: 999px; background: var(--on-blue); color: var(--blue);
  font-family: var(--mono); font-size: 9px; font-weight: 500; line-height: 1.3; letter-spacing: .14em; text-transform: uppercase; vertical-align: middle;
}
.logo .beta { position: absolute; top: -9px; right: -11px; padding: 1px 4px 0; font-size: 7px; letter-spacing: .1em; }
/* Bordure bleue : la pastille blanche se détache du logo blanc qu'elle chevauche. */
.beta { border: 2px solid var(--blue); }
/* Note « version bêta » de l'accueil. */
.note-beta { max-width: 760px; margin: 18px 0 0; padding: 12px 16px; border-radius: 8px; background: var(--chip); font-size: 15px; }
.note-beta strong { color: var(--blue); font-weight: 500; }
.note-beta a { color: var(--blue); text-underline-offset: 3px; }
/* Le nom du site seul, sans la clé (réservée aux icônes) : une case vaut 3 px. */
.logo svg { flex: none; }
.logo svg.mot { width: auto; height: 24px; }
#menu h2:not(:first-child) { margin-top: 22px; }
/* Titre de catégorie : un bouton qui replie ou déplie ses entrées (accordéon). */
#menu .rubrique {
  display: flex; align-items: center; justify-content: space-between; gap: 8px; width: calc(100% + 16px); margin: 0 -8px; padding: 4px 8px;
  border: 0; border-radius: 6px; background: none; cursor: pointer; color: inherit; font: inherit; letter-spacing: inherit; text-transform: inherit; text-align: left;
  transition: background .15s, color .15s;
}
#menu .rubrique:hover { background: rgba(248, 243, 230, .10); color: var(--on-blue); }
#menu .rubrique .chevron { flex: none; transition: transform .15s; }
#menu .rubrique[aria-expanded="false"] .chevron { transform: rotate(-90deg); }
.entree-vide { display: block; padding: 5px 12px; font-family: var(--mono); font-size: 11px; color: var(--on-blue-muted); opacity: .75; }
/* Recherche sans résultat : fantôme crème centré au-dessus du message. */
#menu-aucun { display: flex; flex-direction: column; align-items: center; gap: 8px; padding: 18px 12px; text-align: center; opacity: 1; }
#menu-aucun .fantome { color: var(--on-blue); }
.entree .num svg { display: block; width: 14px; height: 14px; position: relative; top: 2px; }
/* Un nom de logiciel garde sa casse, même dans un libellé en majuscules. */
.nom-propre { text-transform: none; }
/* Recherche du menu : un champ en pilule sous le logo, qui filtre les entrées à la frappe. */
.recherche-menu { position: relative; padding: 0 20px 16px; }
#recherche-menu {
  display: block; width: 100%; height: 36px; padding: 0 38px 0 14px; border-radius: 9999px;
  font-family: var(--mono); font-size: 12px; color: var(--on-blue);
  background: rgba(248, 243, 230, .10); border: 1px solid rgba(248, 243, 230, .30);
}
#recherche-menu::-webkit-search-cancel-button { -webkit-appearance: none; appearance: none; }
/* Croix crème qui annule la recherche, à droite dans le champ. */
.effacer-recherche {
  position: absolute; top: 9px; right: 29px; display: grid; place-items: center; width: 18px; height: 18px;
  padding: 0; border: 0; background: none; color: var(--on-blue); cursor: pointer; opacity: .9;
}
.effacer-recherche[hidden] { display: none; }
.effacer-recherche:hover { opacity: 1; }
.effacer-recherche:focus-visible { outline: 2px solid var(--on-blue); outline-offset: 2px; border-radius: 50%; }
/* Texte par défaut en Inter Tight, plus étroite que la mono : « Chercher un outil en cliquant Ctrl+K » tient dans le champ. */
/* Le texte d'invite est centré ; ce que l'on tape reste aligné à gauche. Champ vide : la croix est
   masquée, on rend donc à l'invite la place gardée pour elle (marges égales de 14 px), sinon la fin
   « ⌘K » est coupée. */
#recherche-menu:placeholder-shown { padding-left: 14px; padding-right: 14px; }
#recherche-menu::placeholder { color: var(--on-blue-muted); opacity: .85; font-family: var(--sans); font-size: 11.5px; text-align: center; }
#recherche-menu:focus { outline: 2px solid var(--on-blue); outline-offset: 1px; background: rgba(248, 243, 230, .16); }
#menu h2[hidden] { display: none; }
#menu .defile { flex: 1; overflow-y: auto; padding: 0 14px 12px; scrollbar-width: thin; scrollbar-color: rgba(248, 243, 230, .25) transparent; }
#menu h2 {
  margin: 6px 12px 8px; color: var(--on-blue-muted);
  font-family: var(--mono); font-size: 11px; font-weight: 500; line-height: 1.4; letter-spacing: .14em; text-transform: uppercase;
}
.entree {
  display: flex; align-items: baseline; gap: 10px; width: 100%; padding: 7px 12px; border-radius: 999px;
  color: rgba(248, 243, 230, .86); font-size: 14px; text-decoration: none; transition: background .15s, color .15s;
}
.entree .num { font-family: var(--mono); font-size: 10px; font-weight: 500; color: var(--on-blue-muted); width: 16px; flex: none; }
.entree .lib { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.entree:hover { background: rgba(248, 243, 230, .10); color: var(--on-blue); }
.entree[aria-current="page"] { background: var(--cream); color: var(--blue); font-weight: 500; box-shadow: 0 6px 18px rgba(8, 20, 90, .25); }
.entree[aria-current="page"] .num { color: var(--blue); }
/* Cadenas des pages sous code, au bout de l'entrée. */
.entree .verrou { flex: none; align-self: center; display: grid; color: var(--on-blue-muted); }
.entree[aria-current="page"] .verrou { color: var(--blue); }
#menu .pied {
  padding: 14px 26px 20px; border-top: 1px solid rgba(248, 243, 230, .16); color: var(--on-blue-muted);
  font-family: var(--mono); font-size: 11px; line-height: 2;
}
#menu .pied span { display: block; white-space: nowrap; }
/* Écritures empilées : le pied ne garde que le bouton d'installation, sans ses deux lignes de
   texte (calcul dans le navigateur, version) ; il disparaît tout à fait si l'application est installée. */
#menu:has(.pile-zone:not([hidden])) .pied > span:not(#installer-info) { display: none; }
#menu:has(.pile-zone:not([hidden])) .pied #installer { margin-bottom: 0; }
#menu:has(.pile-zone:not([hidden])) .pied:has(#installer[hidden]) { display: none; }
/* Encart slogan en bas du menu, au-dessus du trait : carré à bords arrondis, de la largeur
   du bouton d'installation, sur l'image du bandeau d'accueil. */
.encart-zone { padding: 0 26px 16px; }
.encart {
  position: relative; overflow: hidden; display: flex; flex-direction: column; justify-content: flex-end; gap: 6px;
  aspect-ratio: 1 / 1; padding: 14px; border-radius: 14px; text-decoration: none; color: var(--on-blue);
  background: #1136DB url("images/fond-tempete.webp") 78% 70% / 230% auto no-repeat;
  border: 1px solid rgba(248, 243, 230, .28);
}
/* Les catégories du menu étant repliées d'office, l'encart tient presque toujours. Il ne
   disparaît que sur un écran très peu haut, où il prendrait la place des entrées du menu. */
@media (max-height: 960px) {
  /* Pas assez de hauteur pour un carré : l'encart garde sa largeur et devient un bandeau. */
  .encart { aspect-ratio: 16 / 9; padding: 12px; gap: 5px; }
  .encart strong { font-size: 15px; }
  .encart small { font-size: 11px; }
}
@media (max-height: 840px) { .encart-zone { display: none; } }
/* L'encart n'est affiché que si toutes les catégories du menu sont repliées. */
#menu:has(.rubrique[aria-expanded="true"]) .encart-zone { display: none; }
.encart::before { content: ""; position: absolute; inset: 0; background: linear-gradient(180deg, rgba(8, 20, 110, .15) 0%, rgba(8, 20, 110, .82) 62%); }
.encart strong, .encart small { position: relative; display: block; white-space: normal; }
.encart strong { font-family: var(--sans); font-size: 17px; font-weight: 500; line-height: 1.15; letter-spacing: -0.02em; }
.encart em { font-family: var(--serif); font-style: italic; font-weight: 400; font-size: calc(1.1em * var(--serif-echelle)); letter-spacing: var(--serif-approche); }
.encart small { font-family: var(--sans); font-size: 12px; line-height: 1.35; color: var(--on-blue-muted); }
/* ---------- Écritures empilées (bloc du menu, au-dessus du bouton d'installation) ----------
   Même encadré que l'encart du bas du menu, sans l'image. */
.pile-zone { padding: 0 26px 16px; }
.pile-zone[hidden] { display: none; }
/* Fenêtre peu haute : le pied du menu (installation, version) ne bouge pas et la liste des
   pages garde de la place ; c'est le bloc de la pile qui se réduit, avec son propre défilement. */
#menu .logo, #menu .recherche-menu, #menu .pied { flex: none; }
#menu .defile { min-height: 120px; }
#menu .pile-zone { flex: 0 1 auto; min-height: 0; overflow-y: auto; scrollbar-width: thin; scrollbar-color: rgba(248, 243, 230, .25) transparent; }
/* Très peu de hauteur : la pile ne garde que l'essentiel (nombre, équilibre, boutons). */
@media (max-height: 640px) { .pile-lots { display: none; } }
/* Une pile en cours passe avant l'encart slogan, pour ne pas allonger le bas du menu. */
#menu:has(.pile-zone:not([hidden])) .encart-zone { display: none; }
.pile {
  padding: 12px 14px 14px; border-radius: 14px; color: var(--on-blue);
  background: rgba(248, 243, 230, .08); border: 1px solid rgba(248, 243, 230, .28);
}
.pile.anime { animation: pile-arrivee .6s ease; }
@keyframes pile-arrivee {
  0% { transform: scale(.96); box-shadow: 0 0 0 0 rgba(248, 243, 230, .55); }
  100% { transform: none; box-shadow: 0 0 0 12px rgba(248, 243, 230, 0); }
}
.pile-tete { display: flex; align-items: center; gap: 8px; font-size: 14px; }
.pile-tete strong { flex: 1; min-width: 0; font-weight: 500; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.pile-icone { position: relative; flex: none; margin-right: 6px; }
.pile-icone svg { display: block; width: 20px; height: 20px; }
.pile-vider {
  display: grid; place-items: center; width: 30px; height: 30px; padding: 0; flex: none; cursor: pointer;
  border-radius: 50%; border: 1px solid rgba(248, 243, 230, .35); background: transparent; color: var(--on-blue);
  transition: background .15s, color .15s;
}
.pile-vider:hover { background: var(--cream); color: var(--blue); border-color: var(--cream); }
.pile-vider:focus-visible, .pile-copier:focus-visible { outline: 2px solid var(--on-blue); outline-offset: 2px; }
.pile-lots { list-style: none; margin: 10px 0 0; padding: 0; max-height: 104px; overflow-y: auto; font-size: 13px; color: var(--on-blue-muted); }
.pile-lots li { display: flex; justify-content: space-between; gap: 10px; padding: 2px 0; }
.pile-lots li span:first-child { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.pile-lots li span:last-child { flex: none; font-family: var(--mono); font-size: 11px; }
.pile-total { margin: 8px 0 10px; padding-top: 8px; border-top: 1px solid rgba(248, 243, 230, .16); font-family: var(--mono); font-size: 11px; color: var(--on-blue-muted); }
.pile-total:empty { margin: 0 0 10px; padding: 0; border: 0; }
.pile-copier {
  display: block; width: 100%; height: 34px; padding: 0 14px; cursor: pointer; border: 0; border-radius: 9999px;
  background: var(--cream); color: var(--blue); font-family: var(--sans); font-size: 13px; font-weight: 500;
}
.pile-copier:hover { background: #ffffff; }
.pile-etat { display: block; margin-top: 6px; font-family: var(--mono); font-size: 11px; color: var(--on-blue-muted); }
.pile-etat:empty { display: none; }
.pile-nombre {
  position: absolute; top: -8px; right: -10px; min-width: 18px; height: 16px; padding: 0 4px; border-radius: 9999px;
  display: grid; place-items: center; background: var(--cream); color: var(--blue); box-shadow: 0 0 0 2px var(--blue);
  font-family: var(--mono); font-size: 10px; font-weight: 700; line-height: 1;
}
.pile-voir {
  display: block; width: 100%; height: 32px; margin-bottom: 8px; padding: 0 14px; cursor: pointer; border-radius: 9999px;
  border: 1px solid rgba(248, 243, 230, .45); background: transparent; color: var(--on-blue);
  font-family: var(--sans); font-size: 13px; font-weight: 500; transition: background .15s, color .15s;
}
.pile-voir:hover { background: rgba(248, 243, 230, .14); }
.pile-voir:focus-visible { outline: 2px solid var(--on-blue); outline-offset: 2px; }
/* Listing des écritures empilées : fenêtre au-dessus de la page. */
.pile-dialogue {
  width: min(1100px, calc(100vw - 32px)); max-height: calc(100vh - 64px); padding: 24px 26px 26px; color: var(--ink);
  background: var(--paper); border: 1px solid var(--blue); border-radius: 10px;
  box-shadow: 0 30px 60px -20px rgba(17, 54, 219, .45);
}
.pile-dialogue::backdrop { background: rgba(27, 36, 80, .45); }
.pile-dialogue .eyebrow { display: flex; align-items: center; gap: 8px; font-weight: 700; }
.pile-dialogue .eyebrow svg { width: 16px; height: 16px; }
.pile-fermer {
  display: grid; place-items: center; width: 32px; height: 32px; padding: 0; border: 0; background: none; cursor: pointer; color: var(--blue);
}
.pile-fermer:hover { color: var(--ink); }
.pile-lot td { background: var(--chip); font-weight: 500; }
.pile-lot span { margin-right: 12px; }
.pile-lot .btn.ghost { height: 26px; padding: 0 10px; font-size: 12px; }
.pile-dialogue tfoot td { font-family: var(--mono); font-size: 12px; font-weight: 700; border-top: 1px solid var(--line); padding-top: 10px; }
/* Fenêtre de confirmation au style du site (vider la pile). */
.confirmation {
  width: min(400px, calc(100vw - 32px)); padding: 26px 26px 22px; text-align: center; color: var(--ink);
  background: var(--paper); border: 1px solid var(--blue); border-radius: 10px;
  box-shadow: 0 30px 60px -20px rgba(17, 54, 219, .45);
}
.confirmation::backdrop { background: rgba(27, 36, 80, .45); }
.confirmation-icone { display: inline-grid; place-items: center; width: 48px; height: 48px; border-radius: 50%; background: var(--blue); color: var(--on-blue); }
.confirmation-icone svg { width: 24px; height: 24px; }
.confirmation-titre { margin: 14px 0 6px; font-size: 19px; font-weight: 500; letter-spacing: -0.02em; color: var(--blue); }
.confirmation-texte { margin: 0 0 20px; font-size: 14px; color: var(--muted); }
.confirmation-actions { display: flex; justify-content: center; gap: 10px; flex-wrap: wrap; }
.confirmation-actions .btn.ghost { height: 38px; padding: 0 18px; font-size: 14px; }
/* Bouton « Empiler les écritures » des outils, avec l'icône de la pile. */
.bouton-empiler svg { vertical-align: -3px; margin-right: 7px; }
#installer[hidden], [data-installer][hidden] { display: none; }
#installer {
  display: block; width: 100%; height: 36px; margin: 0 0 12px; padding: 0 14px; cursor: pointer;
  border-radius: 9999px; border: 1px solid rgba(248, 243, 230, .45); background: transparent; color: var(--on-blue);
  font-family: var(--sans); font-size: 14px; font-weight: 500; transition: background .15s, color .15s;
}
.icone-installer { vertical-align: -3px; margin-right: 8px; }
#menu .pied #installer-info { white-space: normal; line-height: 1.5; margin: -4px 0 12px; color: var(--on-blue); }
#installer:hover { background: var(--cream); color: var(--blue); border-color: var(--cream); }
#menu .pied .version { color: var(--on-blue); text-decoration: none; }
#menu .pied .version:hover { text-decoration: underline; text-underline-offset: 3px; }
/* Tout le contenu (hors menu) est affiché à 85,5 % de sa taille (90 %, puis 5 % de moins). */
#contenu { min-width: 0; zoom: 0.855; }

/* Ligne en haut de la page, sur toute la largeur, pour la détacher de la barre de titre
   de la fenêtre (application installée) ou du navigateur. Elle reste visible au défilement. */
body::before {
  content: ""; position: fixed; z-index: 50; top: 0; left: 0; right: 0; height: 1px;
  background: var(--ink); pointer-events: none;
}
/* Bouton « copier le lien de la page », en haut à droite du contenu. */
#contenu { position: relative; }
#copier-lien {
  position: absolute; z-index: 4; top: 24px; right: 32px; display: flex; align-items: center; justify-content: center; gap: 8px;
  height: 40px; padding: 0 18px 0 14px; cursor: pointer; border-radius: 9999px;
  font-family: var(--sans); font-size: 14px; font-weight: 500; white-space: nowrap;
  background: var(--paper); color: var(--blue); border: 1px solid rgba(17, 54, 219, .35);
  transition: background .15s, color .15s, border-color .15s;
}
#copier-lien:hover { background: var(--chip); }
#copier-lien:focus-visible { outline: 2px solid var(--blue); outline-offset: 2px; }
#copier-lien.fait { background: var(--blue); border-color: var(--blue); color: var(--on-blue); }
#barre-mobile { display: none; }
.mobile-info, .mobile-seul { display: none; }
#fond { display: none; }

main { padding: 56px 0 72px; }
.eyebrow {
  font-family: var(--mono); font-size: 12px; text-transform: uppercase;
  letter-spacing: 0.08em; color: var(--blue); margin: 0 0 14px;
}
h1 {
  font-size: clamp(38px, 5.2vw, 60px); line-height: 1.02; font-weight: 500;
  letter-spacing: -0.035em; color: var(--blue); margin: 0 0 16px;
}
h1 em { font-family: var(--serif); font-style: italic; font-weight: 400; letter-spacing: calc(-0.01em + var(--serif-approche)); font-size: calc(1.08em * var(--serif-echelle)); }
.lead { font-size: 18px; margin: 0 0 12px; }
.lead strong { font-weight: 500; color: var(--blue); }
.lead + .grille { margin-top: 44px; }

.grille { display: grid; grid-template-columns: 380px minmax(0, 1fr); gap: 32px; align-items: start; }
.colonne { display: grid; grid-template-columns: minmax(0, 1fr); gap: 32px; } /* un contenu large ne peut pas élargir la colonne */

/* Tous les cadres des outils portent le liseré bleu, saisie comme résultats. */
.panel {
  background: var(--paper);
  border: 1px solid var(--blue);
  border-radius: 10px;
  box-shadow: 0 30px 60px -30px rgba(17, 54, 219, .32), 0 2px 6px rgba(27, 36, 80, .05);
  padding: 24px 26px 26px;
}
/* Titres des cadres (« 01 — Configuration ») en gras, pour mieux structurer la page. */
.panel .eyebrow { margin-bottom: 8px; font-weight: 700; }

.champ {
  display: grid; grid-template-columns: 140px minmax(0, 1fr); gap: 14px; align-items: center;
  padding: 9px 0; border-bottom: 1px solid var(--line);
}
.champ:last-child { border-bottom: 0; }
/* Dernier champ d'un cadre, même suivi de la liste des alertes (souvent vide) : pas de trait en bas du cadre. */
.panel > .champ:last-of-type { border-bottom: 0; }
/* Libellés des champs à l'encre foncée ; leur aide (« Facultatif… ») en gris plein, sans transparence. */
.champ label, .champ .etiquette {
  font-family: var(--mono); font-size: 11px; text-transform: uppercase;
  letter-spacing: 0.05em; color: var(--ink); line-height: 1.4;
}
.champ .aide { display: block; text-transform: none; letter-spacing: 0; font-size: 11px; margin-top: 2px; color: var(--muted); }
.champ input[type="text"], .champ input[type="number"], .champ input[type="date"], .champ select {
  width: 100%; height: 38px; padding: 0 12px;
  font-family: var(--mono); font-size: 13px; color: var(--ink);
  background: var(--cream); border: 1px solid var(--line); border-radius: 8px;
}
.saisie {
  display: block; width: 100%; min-height: 240px; padding: 12px; resize: vertical;
  font-family: var(--mono); font-size: 12px; line-height: 1.6; color: var(--ink); white-space: pre; overflow: auto; tab-size: 12;
  background: var(--cream); border: 1px solid var(--line); border-radius: 8px;
}
.saisie:focus { outline: 2px solid var(--blue); outline-offset: 1px; border-color: var(--blue); }
.aide-bloc { font-size: 14px; color: var(--muted); margin: 0 0 12px; }
.aide-bloc strong { font-weight: 500; color: var(--ink); }
.champ input:focus, .champ select:focus { outline: 2px solid var(--blue); outline-offset: 1px; border-color: var(--blue); }
/* ---------- Copie réussie : confettis et message ---------- */
.confetti { position: fixed; z-index: 60; pointer-events: none; }
.bravo {
  position: fixed; z-index: 55; left: 50%; bottom: 32px; max-width: calc(100vw - 32px);
  padding: 12px 28px; border-radius: 9999px; background: var(--blue); color: var(--on-blue);
  font-size: 16px; font-weight: 500; text-align: center;
  box-shadow: 0 18px 40px -12px rgba(17, 54, 219, .55);
  opacity: 0; transform: translate(-50%, 16px); pointer-events: none;
  transition: opacity .25s ease, transform .25s ease;
}
.bravo strong { display: block; font-weight: 500; }
.bravo small { display: block; margin-top: 2px; font-family: var(--mono); font-size: 11px; font-weight: 400; color: var(--on-blue-muted); }
.bravo.visible { opacity: 1; transform: translate(-50%, 0); }

/* ---------- Bandeau « nouvelle version disponible » ---------- */
.maj {
  position: fixed; z-index: 58; left: 50%; top: 20px; transform: translateX(-50%); max-width: calc(100vw - 32px);
  display: flex; align-items: center; gap: 14px; padding: 8px 8px 8px 20px; border-radius: 9999px;
  background: var(--ink); color: var(--on-blue); font-size: 14px; font-weight: 500;
  box-shadow: 0 18px 40px -12px rgba(27, 36, 80, .55);
}
.maj button {
  font: inherit; height: 32px; padding: 0 14px; border-radius: 9999px; border: 0; cursor: pointer;
  background: var(--on-blue); color: var(--blue);
}

/* ---------- Calendrier maison (construit par commun.js) ---------- */
.date-champ { position: relative; display: block; }
.champ .date-champ input { padding-right: 42px; }
.cal-bouton {
  position: absolute; top: 4px; right: 4px; width: 30px; height: 30px; padding: 7px;
  border: 0; border-radius: 50%; background: transparent; color: var(--blue); cursor: pointer;
}
.cal-bouton:hover, .cal-bouton[aria-expanded="true"] { background: var(--blue); color: var(--on-blue); }
.cal-bouton svg { display: block; width: 16px; height: 16px; }
.cal {
  position: absolute; z-index: 30; top: calc(100% + 8px); right: 0; width: 292px; padding: 16px 16px 12px;
  background: var(--paper); border: 1px solid var(--line); border-radius: 10px;
  box-shadow: 0 30px 60px -20px rgba(17, 54, 219, .38), 0 4px 14px rgba(27, 36, 80, .10);
}
.cal button { font: inherit; border: 0; background: transparent; cursor: pointer; padding: 0; color: inherit; }
.cal button:focus-visible { outline: 2px solid var(--blue); outline-offset: 1px; }
.cal-tete { display: flex; align-items: center; justify-content: space-between; gap: 8px; margin-bottom: 10px; }
.cal-titre { font-family: var(--sans); font-size: 18px; font-weight: 500; letter-spacing: -0.02em; color: var(--blue); text-transform: capitalize; white-space: nowrap; }
.cal-titre em { font-family: var(--serif); font-style: italic; font-weight: 400; font-size: calc(1.12em * var(--serif-echelle)); letter-spacing: var(--serif-approche); }
.cal-nav { display: flex; gap: 2px; }
.cal-nav button { width: 26px; height: 26px; border-radius: 50%; color: var(--blue); font-size: 16px; line-height: 1; padding-bottom: 2px; }
.cal-nav button:hover { background: var(--chip); }
.cal-grille { display: grid; grid-template-columns: repeat(7, 1fr); gap: 2px; }
.cal-jour-nom {
  font-family: var(--mono); font-size: 10px; text-transform: uppercase; letter-spacing: .08em;
  color: var(--muted); text-align: center; padding: 6px 0;
}
.cal .cal-jour {
  height: 34px; border-radius: 9999px; font-family: var(--mono); font-size: 13px; color: var(--ink);
  border: 1px solid transparent; transition: background .12s;
}
.cal .cal-jour:hover { background: var(--chip); }
.cal .cal-jour.hors { color: var(--muted); opacity: .5; }
.cal .cal-jour.auj { border-color: rgba(17, 54, 219, .45); color: var(--blue); }
.cal .cal-jour.choisi { background: var(--blue); color: var(--on-blue); font-weight: 500; opacity: 1; border-color: var(--blue); }
.cal-pied { display: flex; justify-content: space-between; margin-top: 10px; padding-top: 10px; border-top: 1px solid var(--line); }
.cal-pied button { font-family: var(--sans); font-size: 13px; font-weight: 500; color: var(--blue); padding: 4px 2px; }
.cal-pied button:hover { text-decoration: underline; text-underline-offset: 3px; }

.champ input::placeholder { color: var(--muted); opacity: .6; }
/* Champ en erreur : rouge, pour ne pas se confondre avec le bleu du focus ; le message
   (commun.js, messagesErreur) se place sous le champ, dans la colonne de saisie. */
.champ input.erreur { border-color: var(--rouge); background: rgba(198, 40, 40, .06); box-shadow: inset 3px 0 0 var(--rouge); }
.champ input.erreur:focus-visible { outline-color: var(--rouge); }
.champ .msg-erreur { grid-column: 1 / -1; margin-top: -8px; font-size: 13px; line-height: 1.35; color: var(--rouge); text-align: right; }
.champ input[type="checkbox"] { width: 20px; height: 20px; margin: 9px 0; accent-color: var(--blue); justify-self: start; }
/* Interrupteur : une case à cocher (classe « bascule ») dessinée comme un bouton à glissière.
   Elle reste une vraie case : clavier, clic sur le libellé et « Réinitialiser » fonctionnent pareil. */
.champ input[type="checkbox"].bascule {
  -webkit-appearance: none; appearance: none; position: relative; width: 46px; height: 26px; margin: 6px 0; padding: 0;
  border-radius: 9999px; background: var(--chip); border: 1px solid var(--line); cursor: pointer;
  transition: background .18s ease, border-color .18s ease;
}
.champ input[type="checkbox"].bascule::before {
  content: ""; position: absolute; top: 2px; left: 2px; width: 20px; height: 20px; border-radius: 50%;
  background: var(--paper); box-shadow: 0 1px 3px rgba(27, 36, 80, .28); transition: transform .18s ease;
}
.champ input[type="checkbox"].bascule:checked { background: var(--blue); border-color: var(--blue); }
.champ input[type="checkbox"].bascule:checked::before { transform: translateX(20px); background: var(--on-blue); }
.champ input[type="checkbox"].bascule:focus-visible { outline: 2px solid var(--blue); outline-offset: 2px; }
/* Sélecteur à segments : deux choix nommés (ou plus) côte à côte, le choix actif en bleu.
   Construit par commun.js à partir d'une liste déroulante de classe « segments ». */
.champ.pleine { grid-template-columns: minmax(0, 1fr); gap: 6px; }
/* Ligne de résultat au libellé long (aide détaillée) : le libellé prend la largeur, le montant reste à droite. */
.champ.libelle-large { grid-template-columns: minmax(0, 1fr) auto; }
div.segments { display: flex; gap: 2px; padding: 3px; border-radius: 9999px; background: var(--cream); border: 1px solid var(--line); }
div.segments button {
  flex: 1 1 0; min-width: 0; min-height: 30px; padding: 4px 10px; border: 0; border-radius: 9999px; cursor: pointer;
  background: transparent; color: var(--ink); font-family: var(--sans); font-size: 13px; font-weight: 500; line-height: 1.2;
  overflow-wrap: break-word; transition: background .15s, color .15s; /* un libellé long passe sur deux lignes */
}
/* Choix précédé d'une icône (attribut « data-icone » du choix) : trait arrondi, couleur du texte.
   Sur écran étroit, l'icône passe au-dessus du libellé pour que celui-ci tienne sur une ligne. */
div.segments button.avec-icone { display: flex; align-items: center; justify-content: center; gap: 6px; }
div.segments button.avec-icone svg { flex: none; width: 18px; height: 18px; fill: none; stroke: currentColor;
                                     stroke-width: 1.6; stroke-linecap: round; stroke-linejoin: round; }
@media (max-width: 560px) {
  div.segments:has(button.avec-icone) { border-radius: 14px; }
  div.segments button.avec-icone { flex: 1 1 auto; flex-direction: column; gap: 2px; padding: 6px 4px; border-radius: 11px; font-size: 11px; } /* largeur selon le libellé */
}
div.segments button:hover { background: var(--chip); }
div.segments button[aria-pressed="true"] { background: var(--blue); color: var(--on-blue); }
div.segments button:focus-visible { outline: 2px solid var(--blue); outline-offset: 2px; }
.champ .valeur { font-family: var(--mono); font-size: 13px; color: var(--ink); }
.champ .valeur.code { color: var(--blue); }
.champ.total .valeur { font-family: var(--sans); font-size: 26px; font-weight: 500; letter-spacing: -0.02em; color: var(--blue); text-align: right; }
/* Ligne de total qui affiche un texte au lieu d'un montant (« Non provisionnées ») : taille de texte courant. */
.champ.total .valeur.sans-montant { font-size: 15px; letter-spacing: 0; }
.droite { text-align: right; }
.ok { display: inline-block; background: var(--blue); color: var(--on-blue); padding: 2px 12px; border-radius: 9999px; font-weight: 500; }
.ecart { display: inline-block; background: var(--chip); color: var(--ink); padding: 2px 12px; border-radius: 9999px; }

.alertes { margin: 16px 0 0; padding: 0; list-style: none; }
.alertes:empty { display: none; }
.alertes li { background: var(--chip); border-radius: 8px; padding: 10px 14px; font-size: 14px; }
.alertes li + li { margin-top: 6px; }

.barre { display: flex; justify-content: space-between; align-items: center; gap: 16px; flex-wrap: wrap; margin-bottom: 12px; }
.barre .eyebrow { margin: 0; }
.barre .actions { display: flex; align-items: center; gap: 14px; flex-wrap: wrap; }
.btn {
  font-family: var(--sans); font-size: 14px; font-weight: 500;
  height: 38px; padding: 0 18px; border-radius: 9999px; cursor: pointer;
  background: var(--blue); color: var(--on-blue); border: 1px solid var(--blue);
  transition: background .15s, color .15s;
}
.btn:hover:not(:disabled) { background: var(--ink); border-color: var(--ink); }
.btn.ghost { height: 32px; padding: 0 14px; font-size: 13px; background: transparent; color: var(--blue); border-color: rgba(17, 54, 219, .35); }
/* Côte à côte dans une barre d'actions, les deux boutons ont la même taille. */
.barre .actions .btn.ghost { height: 38px; padding: 0 18px; font-size: 14px; }
.btn.ghost:hover:not(:disabled) { background: var(--blue); border-color: var(--blue); color: var(--on-blue); }
.btn:focus-visible { outline: 2px solid var(--blue); outline-offset: 2px; }
.btn:disabled { background: transparent; color: var(--muted); border-color: var(--line); cursor: not-allowed; }
.etat { font-family: var(--mono); font-size: 12px; color: var(--muted); }

.cadre-table { overflow-x: auto; }

/* Étiquette du type d'outil (commun.js, etiquettesType) : à la suite du surtitre d'une page
   d'outil, et sur les cartes de l'accueil. */
.type-outil {
  display: inline-flex; align-items: center; height: 20px; padding: 0 9px; border-radius: 9999px;
  border: 1px solid rgba(17, 54, 219, .4); background: rgba(17, 54, 219, .06); color: var(--blue);
  font-family: var(--mono); font-size: 10px; font-weight: 500; letter-spacing: .06em; text-transform: uppercase;
  white-space: nowrap; vertical-align: 2px;
}
.eyebrow .type-outil { margin-left: 12px; }
.carte .type-outil { align-self: flex-start; margin-top: 4px; font-size: 10px; } /* sinon « .carte span » l'agrandit */

/* Fenêtre (élément <dialog>) : un cadre bleuté au centre, sur un fond assombri. Le contenu est
   dans .fenetre-corps, pour qu'un clic sur le fond, hors du cadre, la ferme. */
dialog.fenetre {
  width: min(620px, calc(100vw - 32px)); max-height: min(82vh, 760px); padding: 0; overflow: hidden;
  border: 1px solid var(--blue); border-radius: 10px; background: var(--paper); color: var(--ink);
  box-shadow: 0 30px 60px -20px rgba(17, 54, 219, .45);
}
dialog.fenetre[open] { display: flex; flex-direction: column; }
dialog.fenetre::backdrop { background: rgba(27, 36, 80, .4); }
.fenetre-corps { display: flex; flex-direction: column; min-height: 0; padding: 22px 26px 18px; }
.fenetre-corps .eyebrow { margin: 0; font-weight: 700; }
.fenetre-corps .segments { margin: 4px 0 10px; }
.fenetre-corps .cadre-table { overflow-y: auto; min-height: 0; flex: 1; max-height: 52vh; }
.fenetre-corps thead th { position: sticky; top: 0; background: var(--paper); }
.fenetre-corps td.trimestre-ref { color: var(--blue); }
.fenetre-corps td.retenu { font-weight: 700; background: var(--chip); }
.fenetre-corps .source-indices { margin: 12px 0 0; }
.fenetre .fermer {
  display: grid; place-items: center; width: 30px; height: 30px; padding: 0; border: 1px solid var(--line);
  border-radius: 9999px; background: transparent; color: var(--blue); font-size: 20px; line-height: 1; cursor: pointer;
}
.fenetre .fermer:hover { background: var(--chip); }
/* « Voir les indices publiés » : toute la largeur du cadre de configuration. */
.btn.lien-indices { justify-self: stretch; width: 100%; }
table { width: 100%; border-collapse: collapse; }
thead th {
  font-family: var(--mono); font-size: 11px; font-weight: 400; text-transform: uppercase;
  letter-spacing: 0.05em; color: var(--muted); text-align: left;
  padding: 4px 12px 8px 0; border-bottom: 1px solid var(--line);
}
tbody td {
  padding: 7px 12px 7px 0; font-family: var(--mono); font-size: 13px; color: var(--ink); white-space: nowrap;
}
tbody td.num { color: var(--muted); }
tbody td.compte { color: var(--blue); }
tbody td.lib { font-family: var(--sans); font-size: 15px; }
tbody tr.debut td { border-top: 1px solid var(--line); }
tbody tr:first-child.debut td { border-top: 0; }
th.droite, td.droite { text-align: right; padding-right: 0; padding-left: 12px; }
/* Tableau à cases à cocher (journaux de « TVA de l'année ») : une ligne décochée s'efface. */
/* Cases à cocher dessinées comme l'icône « CheckSquare » : un carré vide aux coins arrondis ;
   cochée, le carré plein bleu avec la coche en creux (Phosphor, graisse Fill). Le dessin sert
   de masque sur la couleur du texte. */
table.choix input[type="checkbox"] {
  -webkit-appearance: none; appearance: none; display: block; width: 22px; height: 22px; margin: 0; border: 0; padding: 0;
  cursor: pointer; background-color: var(--muted);
  -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 32 32'%3E%3Cpath d='M26 4H6a2 2 0 0 0-2 2v20a2 2 0 0 0 2 2h20a2 2 0 0 0 2-2V6a2 2 0 0 0-2-2Zm0 22H6V6h20Z'/%3E%3C/svg%3E") center / contain no-repeat;
  mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 32 32'%3E%3Cpath d='M26 4H6a2 2 0 0 0-2 2v20a2 2 0 0 0 2 2h20a2 2 0 0 0 2-2V6a2 2 0 0 0-2-2Zm0 22H6V6h20Z'/%3E%3C/svg%3E") center / contain no-repeat;
}
table.choix input[type="checkbox"]:checked {
  background-color: var(--blue);
  -webkit-mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 256 256'%3E%3Cpath d='M208,32H48A16,16,0,0,0,32,48V208a16,16,0,0,0,16,16H208a16,16,0,0,0,16-16V48A16,16,0,0,0,208,32Zm-34.34,77.66-56,56a8,8,0,0,1-11.32,0l-24-24a8,8,0,0,1,11.32-11.32L112,148.69l50.34-50.35a8,8,0,0,1,11.32,11.32Z'/%3E%3C/svg%3E");
  mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 256 256'%3E%3Cpath d='M208,32H48A16,16,0,0,0,32,48V208a16,16,0,0,0,16,16H208a16,16,0,0,0,16-16V48A16,16,0,0,0,208,32Zm-34.34,77.66-56,56a8,8,0,0,1-11.32,0l-24-24a8,8,0,0,1,11.32-11.32L112,148.69l50.34-50.35a8,8,0,0,1,11.32,11.32Z'/%3E%3C/svg%3E");
}
table.choix input[type="checkbox"]:hover { background-color: var(--ink); }
table.choix input[type="checkbox"]:checked:hover { background-color: var(--blue); }
table.choix input[type="checkbox"]:focus-visible { outline: 2px solid var(--blue); outline-offset: 2px; }
table.choix tr.exclu td { color: var(--muted); opacity: .55; }
table.choix tr.exclu td:first-child { opacity: 1; }
/* Ligne mise en avant dans un tableau de référence (par exemple le taux retenu). */
tbody tr.retenu td { color: var(--blue); font-weight: 600; }
.vide { background: var(--cream); border-radius: 8px; padding: 18px 20px; margin-top: 12px; }

.resultat { font-size: clamp(44px, 6vw, 68px); line-height: 1; font-weight: 500; letter-spacing: -0.035em; color: var(--blue); margin: 6px 0 22px; }
/* Note de calcul : les retours à la ligne du texte (une phrase, un élément de liste par ligne) sont affichés. */
.note { background: var(--cream); border-radius: 8px; padding: 18px 20px; margin: 0; font-size: 16px; white-space: pre-line; }
/* Les calculs d'une note (M.afficheNote) : en bleu gras. */
.note strong.calcul { color: var(--blue); font-weight: 700; }

.site-footer { border-top: 1px solid var(--line); }
.site-footer .conteneur {
  display: flex; justify-content: space-between; gap: 16px; flex-wrap: wrap;
  padding-top: 20px; padding-bottom: 28px;
  font-family: var(--mono); font-size: 12px; color: var(--muted);
}

.pied-commun {
  flex-basis: 100%; display: flex; justify-content: space-between; align-items: center; gap: 12px 24px; flex-wrap: wrap;
  margin-top: 6px; padding-top: 16px; border-top: 1px solid var(--line);
}
.legal { display: flex; gap: 8px 24px; flex-wrap: wrap; }
.legal a, .projet a { color: var(--ink); text-decoration: none; }
.legal a:hover, .projet a:hover { color: var(--blue); text-decoration: underline; text-underline-offset: 3px; }
.projet a { display: inline-flex; align-items: center; gap: 6px; vertical-align: middle; margin-left: 4px; }
.projet img { display: block; }

/* ---------- Page d'accueil ---------- */
.accueil h1 { font-size: clamp(42px, 6vw, 72px); }
.accueil .lead { max-width: 760px; font-size: 20px; }
.accueil h2 { font-size: 30px; font-weight: 500; letter-spacing: -0.035em; line-height: 1.1; color: var(--blue); margin: 0 0 8px; }
.accueil h2 em { font-family: var(--serif); font-style: italic; font-weight: 400; letter-spacing: calc(-0.01em + var(--serif-approche)); font-size: calc(1.08em * var(--serif-echelle)); }
.accueil section { margin-top: 64px; }
.accueil section > p { max-width: 760px; margin: 0 0 20px; }
.boutons { display: flex; align-items: center; gap: 12px 16px; flex-wrap: wrap; margin-top: 28px; }
a.btn { display: inline-flex; align-items: center; text-decoration: none; }
.btn.grand { height: 46px; padding: 0 24px; font-size: 16px; }
.btn.ghost.grand { height: 46px; padding: 0 24px; font-size: 16px; }
.info-installer { flex-basis: 100%; font-size: 14px; color: var(--muted); }
/* auto-fill : une rubrique d'une seule carte garde la largeur des autres cartes. */
.cartes { display: grid; grid-template-columns: repeat(auto-fill, minmax(250px, 1fr)); gap: 16px; }
/* Intertitre d'une rubrique de cartes : mêmes rubriques, ordre et numéros que le menu. */
.cartes-titre {
  display: flex; align-items: center; gap: 14px; margin: 36px 0 14px;
  font-family: var(--mono); font-size: 12px; font-weight: 700; text-transform: uppercase; letter-spacing: .08em; color: var(--blue);
}
.cartes-titre::after { content: ""; flex: 1; height: 1px; background: rgba(17, 54, 219, .25); }
.accueil section > p + .cartes-titre { margin-top: 28px; }
.carte {
  display: flex; flex-direction: column; gap: 6px; padding: 20px 22px 18px; text-decoration: none; color: var(--ink);
  background: var(--paper); border: 1px solid rgba(255, 255, 255, .8); border-radius: 10px;
  box-shadow: 0 20px 40px -28px rgba(17, 54, 219, .32), 0 2px 6px rgba(27, 36, 80, .05);
  transition: box-shadow .15s, transform .15s;
}
a.carte:hover { box-shadow: 0 24px 44px -24px rgba(17, 54, 219, .45), 0 2px 6px rgba(27, 36, 80, .08); transform: translateY(-2px); }
.carte .num { font-family: var(--mono); font-size: 11px; letter-spacing: .08em; color: var(--blue); }
.carte strong { font-size: 19px; font-weight: 500; letter-spacing: -0.02em; color: var(--blue); }
.carte span { font-size: 15px; }
.carte .chiffre { font-size: 40px; font-weight: 500; letter-spacing: -0.04em; line-height: 1; color: var(--blue); }
.carte .suite { margin-top: auto; padding-top: 8px; font-family: var(--mono); font-size: 12px; color: var(--blue); }
.bandeau-bleu { background: var(--blue); color: var(--on-blue); border-radius: 10px; padding: 32px 34px; }
.bandeau-bleu h2 { color: var(--on-blue); }
.bandeau-bleu p { color: var(--on-blue-muted); }
.bandeau-bleu .btn { background: var(--on-blue); color: var(--blue); border-color: var(--on-blue); }
.bandeau-bleu .btn:hover:not(:disabled) { background: var(--cream); border-color: var(--cream); color: var(--ink); }
.bandeau-bleu .info-installer { color: var(--on-blue); }
.bandeau-bleu ul { margin: 0 0 6px; padding-left: 20px; max-width: 760px; }
.bandeau-bleu li { margin: 0 0 4px; }

/* Encart illustré, en tête de l'accueil et en bas du manifeste : « Ships in Distress in a Storm » de Peter Monamy (1681-1749),
   Tate T00807, image de Wikimedia Commons passée en camaïeu bleu, dans le style de capedinvisibilite.fr.
   Le voile bleu à gauche garde le texte lisible sur la partie sombre de l'image. */
.final {
  position: relative; overflow: hidden; border-radius: 10px; min-height: 440px;
  display: flex; align-items: center; padding: 48px 44px;
  background: #1136DB url("images/fond-tempete.webp") center 78% / cover no-repeat;
  color: var(--on-blue);
}
.final::before {
  content: ""; position: absolute; inset: 0;
  background: linear-gradient(90deg, rgba(8, 20, 110, .72) 0%, rgba(8, 20, 110, .45) 45%, rgba(8, 20, 110, 0) 75%);
}
.final-texte { position: relative; max-width: 620px; }
.final .final-texte h1, .final .final-texte h2 { color: var(--on-blue); font-size: clamp(34px, 4.6vw, 56px); font-weight: 500; letter-spacing: -0.035em; line-height: 1.04; margin: 0 0 14px; }
.final .final-texte h1 em, .final .final-texte h2 em { font-family: var(--serif); font-style: italic; font-weight: 400; letter-spacing: calc(-0.01em + var(--serif-approche)); font-size: calc(1.08em * var(--serif-echelle)); }
.final .final-texte p { color: var(--on-blue); font-size: 20px; margin: 0; }
.final .final-texte .eyebrow { font-size: 12px; margin: 0 0 14px; color: var(--on-blue-muted); }
.final .info-installer { color: var(--on-blue); }
/* L'encart ouvre l'accueil et ferme le manifeste. */
.accueil > .final:first-child { margin: 0; }
.accueil > .final + .note-beta { max-width: none; margin-top: 16px; font-size: 14px; }
.manifeste > .final { margin-top: 48px; }
.final .btn { background: var(--on-blue); color: var(--blue); border-color: var(--on-blue); }
.final .btn:hover:not(:disabled) { background: var(--cream); border-color: var(--cream); color: var(--ink); }
.final .btn.ghost { background: transparent; color: var(--on-blue); border-color: rgba(248, 243, 230, .7); }
.final .btn.ghost:hover:not(:disabled) { background: var(--on-blue); border-color: var(--on-blue); color: var(--blue); }
.final .btn:focus-visible { outline-color: var(--on-blue); }

/* ---------- Pages de texte (mentions légales) ---------- */
/* La colonne de texte est centrée dans la page ; le texte lui-même reste aligné à gauche. */
.conteneur.prose { max-width: 844px; margin: 0 auto; }
.prose h2 { font-size: 24px; font-weight: 500; letter-spacing: -0.03em; line-height: 1.15; color: var(--blue); margin: 40px 0 10px; scroll-margin-top: 24px; }
.prose p { margin: 0 0 10px; }
/* Les liens du texte sont bleus ; pas les boutons, qui gardent leur propre couleur de texte. */
.prose a:not(.btn) { color: var(--blue); text-underline-offset: 3px; }
.version-bloc { padding: 4px 0 14px; border-bottom: 1px solid var(--line); }
.version-bloc h2 { display: flex; align-items: center; gap: 12px; margin: 22px 0 8px; font-family: var(--mono); font-size: 12px; font-weight: 400; letter-spacing: .05em; text-transform: uppercase; color: var(--muted); }
.version-bloc .numero { background: var(--blue); color: var(--on-blue); padding: 2px 12px; border-radius: 9999px; font-size: 13px; font-weight: 500; letter-spacing: 0; }
.version-bloc ul { margin: 0; padding-left: 20px; }
.version-bloc li { margin: 0 0 4px; }
.prose .cadre-table { margin: 6px 0 14px; }
.prose tbody td { font-family: var(--sans); font-size: 15px; white-space: normal; padding: 9px 16px 9px 0; border-bottom: 1px solid var(--line); vertical-align: top; }
.prose tbody td:last-child { font-family: var(--mono); font-size: 13px; white-space: nowrap; }
.manifeste p, .manifeste li { font-size: 18px; }
.manifeste ul { margin: 0 0 10px; padding-left: 22px; }
.manifeste li { margin: 0 0 6px; }
.manifeste .signature { margin-top: 32px; font-family: var(--serif); font-style: italic; font-size: calc(24px * var(--serif-echelle)); letter-spacing: var(--serif-approche); color: var(--blue); }
.prose .donnee { font-family: var(--mono); font-size: 14px; }
/* Page Goodies : aperçus des stickers et des fonds d'écran. */
.goodies-stickers { display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); gap: 20px 28px; margin: 18px 0 22px; max-width: 900px; }
.goodies-fonds { display: grid; grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); gap: 24px 28px; margin: 18px 0 18px; }
.goodies-stickers figure, .goodies-fonds figure { margin: 0; }
.goodies-stickers img, .goodies-fonds img { display: block; width: 100%; height: auto; }
.goodies-fonds img { border-radius: 10px; border: 1px solid var(--line); }
/* Ombre légère : le sticker crème se détache du fond crème de la page. */
.goodies-stickers img { filter: drop-shadow(0 3px 8px rgba(27, 36, 80, .18)); }
.goodies-stickers figcaption, .goodies-fonds figcaption { margin-top: 8px; font-family: var(--mono); font-size: 12px; text-transform: uppercase; letter-spacing: .1em; color: var(--muted); }
.goodies-fonds figcaption strong { display: block; font-family: var(--sans); font-size: 16px; font-weight: 500; text-transform: none; letter-spacing: 0; color: var(--ink); margin-bottom: 2px; }
.goodies-fonds figcaption span { text-transform: none; letter-spacing: 0; font-size: 13px; }

/* ---------- Plan de comptes (pcg.html) ---------- */
/* Second menu, à droite du menu principal : recherche et filtre par catégorie. */
body.avec-filtres { grid-template-columns: 276px 300px minmax(0, 1fr); }
#filtres {
  position: sticky; top: 0; height: 100vh; display: flex; flex-direction: column; min-height: 0;
  background: var(--paper); border-right: 1px solid var(--line);
}
#filtres header { padding: 26px 22px 14px; border-bottom: 1px solid var(--line); }
#filtres header div { display: flex; justify-content: space-between; align-items: baseline; gap: 10px; }
#filtres header .eyebrow { margin: 0; }
#filtres header strong { display: block; margin-top: 8px; font-size: 19px; font-weight: 500; letter-spacing: -0.03em; line-height: 1.2; color: var(--blue); }
#filtres .defile { flex: 1; overflow-y: auto; padding: 0 14px 20px; scrollbar-width: thin; scrollbar-color: var(--line) transparent; }
#filtres .titre {
  display: block; margin: 20px 8px 8px; color: var(--muted);
  font-family: var(--mono); font-size: 11px; font-weight: 500; line-height: 1.4; letter-spacing: .14em; text-transform: uppercase;
}
#filtres input[type="search"], .pcg-recherche-haut input[type="search"] {
  display: block; width: 100%; height: 40px; padding: 0 14px;
  font-family: var(--mono); font-size: 13px; color: var(--ink);
  background: var(--cream); border: 1px solid var(--line); border-radius: 9999px;
}
#filtres input[type="search"]:focus, .pcg-recherche-haut input[type="search"]:focus { outline: 2px solid var(--blue); outline-offset: 1px; border-color: var(--blue); }
#filtres input::placeholder, .pcg-recherche-haut input::placeholder { color: var(--muted); opacity: .7; }
/* Bouton qui replie le second menu, en haut à droite de sa colonne. */
#filtres header div { align-items: center; }
#filtres .replier-filtres {
  display: grid; place-items: center; width: 28px; height: 28px; margin-left: 4px; padding: 0; flex: none;
  border: 1px solid var(--line); border-radius: 9999px; background: transparent; color: var(--blue); cursor: pointer;
}
#filtres .replier-filtres:hover { background: var(--chip); }
#filtres #compteur { margin-left: auto; }
/* Second menu replié : la page reprend sa largeur, la recherche passe sous l'introduction. */
body.avec-filtres.filtres-replies { grid-template-columns: 276px minmax(0, 1fr); }
body.filtres-replies #filtres { display: none; }
.pcg-recherche-haut { margin: 22px 0 8px; }
.pcg-recherche-haut .ligne { display: flex; align-items: center; gap: 12px; }
.pcg-recherche-haut .emplacement { flex: 1; max-width: 640px; }
/* Recherche du haut : fond blanc et champ plus grand, pour qu'elle se voie sur la page. */
.pcg-recherche-haut input[type="search"] { height: 52px; padding-left: 22px; font-size: 16px; background: #fff; border-color: rgba(17, 54, 219, .35); }
.pcg-recherche-haut .recherche-ref input[type="search"] { padding-right: 48px; }
.pcg-recherche-haut .recherche-ref .effacer-recherche { top: 15px; right: 16px; width: 22px; height: 22px; }
.pcg-recherche-haut .recherche-ref .effacer-recherche svg { width: 22px; height: 22px; }
.pcg-recherche-haut .etat { font-family: var(--mono); font-size: 11px; color: var(--muted); white-space: nowrap; }
.pcg-recherche-haut .btn { display: inline-flex; align-items: center; gap: 6px; margin-left: auto; }
.pcg-recherche-haut .filtre-actif { margin: 10px 0 0; font-size: 14px; color: var(--muted); }
.pcg-recherche-haut .filtre-actif button {
  margin-left: 6px; padding: 0; border: 0; background: none; cursor: pointer;
  font: inherit; color: var(--blue); text-decoration: underline; text-underline-offset: 3px;
}
/* Croix bleue qui annule la recherche du référentiel, cachée tant que le champ est vide. */
/* Le même champ passe en haut de la page quand le second menu est replié (pcg.html). */
.recherche-ref { position: relative; }
.recherche-ref input[type="search"] { padding-right: 40px; }
.recherche-ref input::-webkit-search-cancel-button { -webkit-appearance: none; appearance: none; }
.recherche-ref .effacer-recherche { top: 11px; right: 12px; color: var(--blue); }
.recherche-ref input:placeholder-shown + .effacer-recherche { display: none; }
.recherche-ref .effacer-recherche:focus-visible { outline-color: var(--blue); }
.pcg-categories { display: flex; flex-direction: column; gap: 2px; }
.pcg-categorie {
  display: flex; align-items: baseline; gap: 10px; width: 100%; padding: 7px 12px; border: 0; border-radius: 9999px; cursor: pointer;
  background: transparent; color: var(--ink); font-family: var(--sans); font-size: 14px; text-align: left;
  transition: background .15s, color .15s;
}
.pcg-categorie .lib { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.pcg-categorie .nb { font-family: var(--mono); font-size: 11px; color: var(--muted); font-variant-numeric: tabular-nums; }
.pcg-categorie:hover { background: var(--chip); }
/* Choix qui ne donnerait aucun compte avec l'autre filtre en cours. */
.pcg-categorie.vide:not([aria-pressed="true"]) { opacity: .4; }
.pcg-categorie[aria-pressed="true"] { background: var(--blue); color: var(--on-blue); font-weight: 500; }
.pcg-categorie[aria-pressed="true"] .nb { color: var(--on-blue-muted); }
.pcg-categorie:focus-visible { outline: 2px solid var(--blue); outline-offset: 2px; }
#filtres footer { padding: 12px 22px; border-top: 1px solid var(--line); }
#filtres footer button { padding: 4px 0; border: 0; background: none; cursor: pointer; font-family: var(--sans); font-size: 13px; color: var(--blue); }
#filtres footer button:disabled { color: var(--muted); opacity: .45; cursor: default; }
#filtres footer button:not(:disabled):hover { text-decoration: underline; text-underline-offset: 3px; }

/* Le second menu reste toujours une colonne : sur un écran moins large, elle se resserre. */
@media (max-width: 1180px) {
  body.avec-filtres { grid-template-columns: 276px 240px minmax(0, 1fr); }
  body.avec-filtres .conteneur { padding: 0 22px; }
  #filtres header { padding: 26px 18px 14px; }
  #filtres .defile { padding: 0 10px 20px; }
  #filtres footer { padding: 12px 18px; }
}
@media (max-width: 1000px) {
  .pcg tbody td.compte { width: 74px; }
}
#ouvrir-filtres { display: none; }

/* Pastille de réforme du PCG 2025 à côté du libellé d'un compte. */
.pcg-reforme {
  display: inline-block; margin-left: 8px; padding: 1px 9px; border-radius: 9999px; vertical-align: 1px;
  font-family: var(--mono); font-size: 11px; line-height: 1.5; white-space: nowrap; border: 1px solid transparent;
}
.pcg-reforme.nouveau { background: var(--blue); color: var(--on-blue); }
.pcg-reforme.ancien { background: transparent; color: var(--muted); border-color: var(--line); }
.pcg-groupe h2 {
  display: flex; align-items: center; gap: 12px; margin: 34px 0 6px;
  font-family: var(--mono); font-size: 12px; font-weight: 400; letter-spacing: .05em; text-transform: uppercase; color: var(--muted);
}
.pcg-groupe .numero { background: var(--blue); color: var(--on-blue); padding: 2px 12px; border-radius: 9999px; font-size: 13px; font-weight: 500; letter-spacing: 0; }
/* Largeurs fixes : les colonnes restent alignées d'un groupe à l'autre. */
.pcg table { table-layout: fixed; }
.pcg tbody td { vertical-align: middle; }
.pcg tbody td.compte { width: 96px; font-family: var(--mono); font-size: 13px; white-space: nowrap; color: var(--blue); }
.pcg tbody td.copie { width: 36px; padding: 0; }
.pcg-copier {
  display: flex; align-items: center; justify-content: center; width: 32px; height: 32px; padding: 0; cursor: pointer;
  border: 1px solid transparent; border-radius: 50%; background: transparent; color: var(--blue);
  transition: background .15s, color .15s, border-color .15s;
}
.pcg-copier:hover { background: var(--chip); border-color: rgba(17, 54, 219, .35); }
.pcg-copier:focus-visible { outline: 2px solid var(--blue); outline-offset: 2px; }
.pcg-copier.fait { background: var(--blue); border-color: var(--blue); color: var(--on-blue); }
.pcg .vide { margin-top: 28px; }
/* Questions aux clients (questions-clients.html) : même tableau que le plan de comptes,
   avec le code à gauche, puis la situation au-dessus de sa question. */
.questions tbody td { vertical-align: top; padding-top: 12px; padding-bottom: 12px; }
.questions tbody td.compte { width: 60px; padding-top: 14px; }
.questions tbody td.copie { padding-top: 8px; }
.questions .situation { display: block; margin-bottom: 3px; font-weight: 500; color: var(--blue); }
.questions .question { display: block; white-space: pre-line; }
#message-copie {
  position: fixed; z-index: 30; right: 24px; top: 20px; max-width: min(420px, calc(100vw - 48px)); padding: 9px 16px; border-radius: 9999px;
  background: var(--blue); color: var(--on-blue); font-size: 13.5px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
  box-shadow: 0 12px 34px rgba(17, 54, 219, .3); opacity: 0; transform: translateY(-8px); transition: opacity .2s, transform .2s; pointer-events: none;
}
#message-copie.visible { opacity: 1; transform: none; }

/* Portable (1280, 1366) : les deux colonnes restent côte à côte, la saisie un peu resserrée,
   pour garder le résultat à l'écran. Une seule colonne seulement en dessous de 1100 px. */
@media (max-width: 1400px) {
  .grille { grid-template-columns: 330px minmax(0, 1fr); gap: 24px; }
}
@media (max-width: 1100px) {
  .grille { grid-template-columns: minmax(0, 1fr); }
}
@media (max-width: 820px) {
  body { grid-template-columns: minmax(0, 1fr); }
  #menu { position: fixed; z-index: 40; inset: 0 auto 0 0; width: min(300px, 86vw); transform: translateX(-102%); transition: transform .25s ease; }
  body.menu-ouvert #menu { transform: none; box-shadow: 0 0 60px rgba(8, 20, 90, .5); }
  body.menu-ouvert #fond { display: block; position: fixed; z-index: 35; inset: 0; background: rgba(27, 36, 80, .35); }
  #barre-mobile {
    display: flex; align-items: center; gap: 12px; padding: 12px 16px; border-bottom: 1px solid var(--line);
    position: sticky; top: 0; z-index: 5; background: var(--cream);
    color: var(--blue); font-weight: 500; letter-spacing: 0.06em;
  }
  #ouvrir {
    width: 42px; height: 42px; flex: none; border-radius: 50%; border: 0; cursor: pointer;
    background: var(--blue); color: var(--on-blue); font-size: 18px; line-height: 1;
  }
  .conteneur { padding: 0 16px; }
  main { padding: 36px 0 48px; }
  /* Téléphone : le bouton redevient un rond, avec l'icône seule. */
  #copier-lien { top: 84px; right: 16px; width: 40px; padding: 0; border-radius: 50%; }
  #copier-lien .texte { display: none; }

  /* Téléphone : pages d'information seulement. Les outils disparaissent du menu,
     leurs pages affichent un message, et l'accueil ne propose pas de les ouvrir. */
  #menu .outil, #installer, #installer-info, [data-installer], .info-installer, .pile-zone { display: none !important; }
  body.page-outil main { display: none; }
  body.page-outil .mobile-info { display: block; padding: 36px 0 48px; }
  body.page-outil .site-footer .conteneur > span { display: none; }
  .mobile-seul { display: block; }
  a.carte { pointer-events: none; }
  .carte .suite { display: none; }
  /* Une page de consultation reste ouvrable depuis un téléphone. */
  a.carte.consultable { pointer-events: auto; }
  .carte.consultable .suite { display: block; }
  .panel { padding: 20px 18px; }
  /* Téléphone : le second menu est un volet, comme le menu principal ; le bouton
     « Filtres » de la barre du haut l'ouvre. */
  body.avec-filtres, body.avec-filtres.filtres-replies { grid-template-columns: minmax(0, 1fr); }
  body.avec-filtres .conteneur { padding: 0 16px; }
  #filtres .replier-filtres { display: none; }
  #filtres { position: fixed; z-index: 40; inset: 0 auto 0 0; width: min(300px, 86vw); height: auto; transform: translateX(-102%); transition: transform .25s ease; }
  body.filtres-ouverts #filtres { transform: none; box-shadow: 0 0 60px rgba(8, 20, 90, .5); }
  body.filtres-ouverts #fond { display: block; position: fixed; z-index: 35; inset: 0; background: rgba(27, 36, 80, .35); }
  #ouvrir-filtres {
    display: block; margin-left: auto; height: 36px; padding: 0 16px; border-radius: 9999px; cursor: pointer;
    background: transparent; color: var(--blue); border: 1px solid rgba(17, 54, 219, .35);
    font-family: var(--sans); font-size: 14px; font-weight: 500; letter-spacing: 0;
  }
  .final { min-height: 360px; padding: 32px 22px; }
  .final::before { background: rgba(8, 20, 110, .55); }
}
/* Mini-scanner (mini-scanner.html, lecteur.js) : zone de dépôt, données lues, outils à préremplir ;
   dans les outils, champs repris du scanner et leur avis. */
.lecteur-depot { display: grid; gap: 4px; justify-items: center; text-align: center; padding: 22px 16px; border: 1.5px dashed rgba(17, 54, 219, .45);
  border-radius: 10px; background: var(--paper); cursor: pointer; transition: background .15s, border-color .15s; }
.lecteur-depot:hover, .lecteur-depot.survol { background: var(--chip); border-color: var(--blue); }
.lecteur-depot:focus-within { outline: 2px solid var(--blue); outline-offset: 2px; }
.lecteur-depot.occupe { cursor: progress; opacity: .7; }
.lecteur-fichier { position: absolute; width: 1px; height: 1px; opacity: 0; overflow: hidden; }
.lecteur-titre { font-weight: 700; color: var(--blue); font-size: 15px; }
.lecteur-sous { font-size: 12px; color: var(--muted); }
.lecteur-suivi { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-top: 10px; }
.lecteur-suivi:has(.lecteur-etat:empty):has(.btn[hidden]) { display: none; }
.lecteur-etat { margin: 0; font-size: 13px; color: var(--muted); font-family: var(--mono); }
.lecteur-etat:empty { display: none; }
.lecteur-resultat table { table-layout: fixed; width: 100%; }
.lecteur-resultat th:nth-child(1) { width: 27%; }
.lecteur-resultat th:nth-child(2) { width: 38%; }
.lecteur-resultat th, .lecteur-resultat td { white-space: normal; overflow-wrap: anywhere; }
.lecteur-resultat td { font-size: 13px; vertical-align: top; }
.lecteur-resultat .lu-extrait { font-family: var(--mono); font-size: 11px; color: var(--muted); word-break: break-word; }
.lecteur-texte { margin-top: 10px; font-size: 13px; }
.lecteur-texte summary { cursor: pointer; color: var(--blue); }
.lecteur-texte pre { max-height: 260px; overflow: auto; margin: 8px 0 0; padding: 10px; background: var(--paper); border: 1px solid var(--line);
  border-radius: 8px; font-family: var(--mono); font-size: 11px; white-space: pre-wrap; }
.scanner-cibles { display: grid; gap: 12px; }
.scanner-cible { display: grid; gap: 6px; justify-items: start; padding-top: 12px; border-top: 1px solid var(--line); }
.scanner-cible .aide-bloc { margin: 0; font-size: 13px; }
.scanner-recu { margin: 0 0 12px; padding: 10px 14px; border-radius: 8px; background: rgba(17, 54, 219, .07); box-shadow: inset 3px 0 0 var(--blue); font-size: 14px; }
.champ.prerempli { background: rgba(17, 54, 219, .07); box-shadow: inset 3px 0 0 var(--blue); border-radius: 6px; margin: 0 -10px; padding-left: 10px; padding-right: 10px; }

@media (prefers-reduced-motion: reduce) { * { transition: none !important; } }
@media print {
  body { display: block; }
  #menu, #barre-mobile, .btn { display: none !important; }
}
