/* =========================================================================
   OCSIA2 — espace de gestion. Calme, lisible, rapide. Couleur d'accent = couleur principale du site.
   Identité OCSIA2 : « atelier » chaleureux (papier clair, encre, formes douces et plates, titres arrondis),
   pensée d'abord pour le téléphone (app installable, barre d'onglets), jamais chargée.
   Fonctionne aussi sans theme.css (écran d'installation) grâce aux valeurs de secours.
   ========================================================================= */
:root {
  --a-accent: var(--c-primaire, #4b176f);
  --a-accent-txt: var(--c-primaire-txt, #fff);
  --a-accent-lisible: var(--c-primaire-lisible, var(--c-primaire, #4b176f));
  --a-fond: #f7f4ee; --a-surface: #fffefb; --a-surface-2: #f1ece2; --a-texte: #1d1b16; --a-doux: #625d52; --a-ligne: #e6dfd2;
  --a-ok: #1e7a46; --a-attention: #a35a00; --a-erreur: #b42318; --a-info: #1d5fa8;
  --a-rayon: 16px; --a-ombre: 0 1px 0 rgb(60 45 20 / .06), 0 6px 18px rgb(60 45 20 / .06);
  --a-police: system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  --a-titres: ui-rounded, "SF Pro Rounded", "Nunito", system-ui, -apple-system, "Segoe UI", sans-serif;
  --a-nav: 248px;
  color-scheme: light dark;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="clair"]) { --a-fond: #121211; --a-surface: #1c1c1a; --a-surface-2: #252523; --a-texte: #ecebe6; --a-doux: #a9a8a1; --a-ligne: #34332f; --a-ombre: 0 1px 2px rgb(0 0 0 / .4), 0 8px 24px rgb(0 0 0 / .35); --a-accent: color-mix(in srgb, var(--c-primaire, #4b176f) 70%, white); --a-accent-txt: #0d0d0c; --a-accent-lisible: var(--c-primaire-lisible-nuit, var(--a-accent)); }
}
:root[data-theme="sombre"] { --a-fond: #121211; --a-surface: #1c1c1a; --a-surface-2: #252523; --a-texte: #ecebe6; --a-doux: #a9a8a1; --a-ligne: #34332f; --a-accent: color-mix(in srgb, var(--c-primaire, #4b176f) 70%, white); --a-accent-txt: #0d0d0c; --a-accent-lisible: var(--c-primaire-lisible-nuit, var(--a-accent)); }

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body.admin { margin: 0; background: var(--a-fond); color: var(--a-texte); font: 15px/1.55 var(--a-police); -webkit-font-smoothing: antialiased; }
img, svg, video, iframe { max-width: 100%; }
a { color: var(--a-accent-lisible); }
h1, h2, h3 { line-height: 1.2; margin: 0 0 .6em; font-weight: 700; letter-spacing: -.01em; font-family: var(--a-titres); }
h2 { font-size: 1.12rem; } h3 { font-size: 1rem; }
p { margin: 0 0 .8em; }
code { font: .88em ui-monospace, monospace; background: var(--a-surface-2); padding: .1em .35em; border-radius: 5px; }
:focus-visible { outline: 3px solid color-mix(in srgb, var(--a-accent) 60%, transparent); outline-offset: 2px; border-radius: 6px; }
.visuellement-cache { position: absolute !important; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.lien-evitement { position: absolute; left: 1rem; top: -4rem; z-index: 200; background: var(--a-texte); color: var(--a-fond); padding: .5rem 1rem; border-radius: 8px; }
.lien-evitement:focus { top: .5rem; }
.icone { width: 1.2em; height: 1.2em; flex: none; }
.icone--texte { display: inline-grid; place-items: center; font-style: normal; line-height: 1; }

/* ---------- Structure ---------- */
.a-entete { position: sticky; top: 0; z-index: 40; display: flex; align-items: center; gap: .75rem; height: 56px; padding: 0 1rem; background: color-mix(in srgb, var(--a-surface) 90%, transparent); backdrop-filter: blur(12px); -webkit-backdrop-filter: blur(12px); border-bottom: 1px solid var(--a-ligne); }
.a-marque { font-weight: 700; color: var(--a-texte); text-decoration: none; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; display: inline-flex; align-items: center; gap: .55rem; min-width: 0; }
.a-marque > span { overflow: hidden; text-overflow: ellipsis; }
.a-marque__logo, .a-marque__logo img { height: 2rem; width: auto; max-width: 3rem; object-fit: contain; display: block; flex: none; }
.a-menu-bouton .icone, .a-cloche .icone { width: 1.25rem; height: 1.25rem; }
.telegram-relier__titre { display: flex; align-items: center; gap: .5rem; margin: 0 0 .4rem; }
.telegram-relier__qr { display: flex; align-items: center; gap: 1rem; flex-wrap: wrap; margin-top: .5rem; }
.telegram-relier__qr svg { width: 168px; height: 168px; background: #fff; padding: 6px; border-radius: 10px; }
.apercu-icones { display: flex; align-items: center; gap: .9rem; margin: .4rem 0 1rem; }
.apercu-icones img { background: repeating-conic-gradient(#eee 0 25%, #fff 0 50%) 0 0 / 12px 12px; border: 1px solid var(--a-ligne, #ddd); }
.a-voir { margin-left: .5rem; font-size: .9rem; color: var(--a-doux); text-decoration: none; white-space: nowrap; }
.a-voir:hover { color: var(--a-accent-lisible); }
.a-outils { margin-left: auto; display: flex; align-items: center; gap: .35rem; }
.a-bouton-rond, .a-moi { position: relative; display: inline-grid; place-items: center; width: 40px; height: 40px; border-radius: 50%; border: 1px solid var(--a-ligne); background: var(--a-surface); color: var(--a-texte); font: inherit; font-weight: 700; cursor: pointer; text-decoration: none; }
.a-moi { background: var(--a-accent); color: var(--a-accent-txt); border: 0; }
.a-pastille { position: absolute; top: -2px; right: -2px; min-width: 18px; height: 18px; padding: 0 4px; border-radius: 9px; background: var(--a-erreur); color: #fff; font-size: 11px; display: grid; place-items: center; }
.a-menu-bouton { display: none; width: 40px; height: 40px; border: 0; background: none; font-size: 1.4rem; color: var(--a-texte); cursor: pointer; }
.a-nav { position: fixed; top: 56px; bottom: 0; left: 0; width: var(--a-nav); overflow-y: auto; padding: 1rem .75rem 2rem; border-right: 1px solid var(--a-ligne); background: var(--a-surface); }
.a-nav__groupe { margin: 1rem .6rem .3rem; font-size: .72rem; font-weight: 700; text-transform: uppercase; letter-spacing: .08em; color: var(--a-doux); }
.a-nav ul { list-style: none; margin: 0; padding: 0; }
.a-nav a { display: flex; align-items: center; gap: .6rem; padding: .5rem .6rem; min-height: 40px; border-radius: 9px; color: var(--a-texte); text-decoration: none; }
.a-nav a:hover { background: var(--a-surface-2); }
.a-nav a[aria-current="page"] { background: color-mix(in srgb, var(--a-accent) 12%, transparent); color: var(--a-accent-lisible); font-weight: 600; }
.a-nav__sortie { margin: 1.5rem .6rem 0; }
.a-nav__version { margin: .5rem .6rem; font-size: .75rem; color: var(--a-doux); }
.a-principal { margin-left: var(--a-nav); padding: 1.5rem clamp(1rem, 3vw, 2.5rem) 6rem; max-width: 1280px; outline: none; }
.a-titre { font-size: 1.6rem; margin-bottom: 1.25rem; }
@media (max-width: 900px) {
  .a-menu-bouton { display: inline-grid; place-items: center; }
  .a-voir { display: none; }
  .a-nav { transform: translateX(-102%); transition: transform .2s ease; z-index: 39; width: min(86vw, 320px); box-shadow: var(--a-ombre); }
  .a-nav.ouvert { transform: none; }
  .a-principal { margin-left: 0; padding-inline: 1rem; }
}

/* ---------- Cartes, grilles ---------- */
.carte { background: var(--a-surface); border: 1px solid var(--a-ligne); border-radius: var(--a-rayon); padding: clamp(1rem, 2vw, 1.4rem); margin-bottom: 1rem; box-shadow: var(--a-ombre); }
.carte--accent { border-color: color-mix(in srgb, var(--a-accent) 40%, var(--a-ligne)); background: color-mix(in srgb, var(--a-accent) 5%, var(--a-surface)); }
fieldset.carte { min-width: 0; }
fieldset.carte > legend { font-weight: 650; padding: 0 .3rem; }
/* L'îlot (lot W1, R150, R151, 28/10/2026) : une .carte SEULE dans sa zone ressort (bords de 22 px, ombre légère, fond plus clair
   que la page ; jetons dans espace.css). Jamais toutes les cartes d'un coup : 281 class="carte" dans les vues. Sélecteur explicite :
   - zone = la page (#principal) ou le seul formulaire posé dans la page (les réglages rangent leurs fieldsets dans un form) ;
   - la carte est une vraie section (section, fieldset, form, article), la seule carte de sa zone, et aucun autre bloc de la zone
     ne contient de carte ; une page qui pose aussi un tableau (lui-même encadré) n'a pas de section seule ;
     une ligne d'aide (p), un volet repliable (details) et une carte d'accent gardent leur allure.
   Écran seulement : à l'impression, les cartes restent sans ombre. */
@media screen {
  #principal:has(> .carte):not(:has(> table)):not(:has(> .carte ~ .carte)):not(:has(> :not(.carte) .carte)) > :is(section, fieldset, form, article).carte:not(.carte--accent),
  #principal:not(:has(> .carte)):not(:has(> table)):not(:has(> :not(form) .carte)) > form:only-of-type:has(> .carte):not(:has(> .carte ~ .carte)):not(:has(> :not(.carte) .carte)) > :is(section, fieldset, article).carte:not(.carte--accent) {
    background: var(--surface-ilot, var(--a-surface)); border-color: transparent; border-radius: var(--rayon-ilot, 22px);
    box-shadow: var(--ombre-ilot, var(--a-ombre)), 0 0 0 1px color-mix(in srgb, var(--a-ligne) 70%, transparent);
  }
  /* Sans cadre, la légende d'un fieldset chevaucherait le bord de l'îlot : elle passe dedans, comme un titre de section. */
  #principal:has(> .carte):not(:has(> table)):not(:has(> .carte ~ .carte)):not(:has(> :not(.carte) .carte)) > fieldset.carte:not(.carte--accent) > legend,
  #principal:not(:has(> .carte)):not(:has(> table)):not(:has(> :not(form) .carte)) > form:only-of-type:has(> .carte):not(:has(> .carte ~ .carte)):not(:has(> :not(.carte) .carte)) > fieldset.carte:not(.carte--accent) > legend {
    float: left; width: 100%; padding: 0; margin: 0 0 .75rem; font-size: 1.06rem;
  }
  #principal:has(> .carte):not(:has(> table)):not(:has(> .carte ~ .carte)):not(:has(> :not(.carte) .carte)) > fieldset.carte:not(.carte--accent) > legend + *,
  #principal:not(:has(> .carte)):not(:has(> table)):not(:has(> :not(form) .carte)) > form:only-of-type:has(> .carte):not(:has(> .carte ~ .carte)):not(:has(> :not(.carte) .carte)) > fieldset.carte:not(.carte--accent) > legend + * { clear: both; }
}
.grille-2 { display: grid; gap: 1rem; } @media (min-width: 1000px) { .grille-2 { grid-template-columns: 1fr 1fr; align-items: start; } .grille-2--large { grid-template-columns: minmax(0, 1.6fr) minmax(0, 1fr); } }
.grille-chiffres { display: grid; gap: .75rem; grid-template-columns: repeat(auto-fit, minmax(170px, 1fr)); margin-bottom: 1rem; }
.chiffre-carte { background: var(--a-surface); border: 1px solid var(--a-ligne); border-radius: var(--a-rayon); padding: 1rem; text-decoration: none; color: inherit; display: block; }
.chiffre-carte__n { display: block; font-size: 1.7rem; font-weight: 700; letter-spacing: -.02em; }
.chiffre-carte--sante .chiffre-carte__n { color: var(--a-ok); }
.choix-modeles { display: grid; gap: .6rem; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); }
.carte-choix { display: block; padding: .9rem 1rem; border: 1.5px solid var(--a-ligne); border-radius: var(--a-rayon); background: var(--a-surface); cursor: pointer; text-align: left; font: inherit; color: inherit; }
.carte-choix:hover, .carte-choix:has(input:checked) { border-color: var(--a-accent); background: color-mix(in srgb, var(--a-accent) 6%, var(--a-surface)); }
.vide { padding: 1.5rem; text-align: center; color: var(--a-doux); border: 1.5px dashed var(--a-ligne); border-radius: var(--a-rayon); list-style: none; }

/* ---------- Boutons ---------- */
.bouton { display: inline-flex; align-items: center; justify-content: center; gap: .4rem; min-height: 40px; padding: .5rem 1rem; border-radius: 10px; border: 1px solid transparent; font: inherit; font-weight: 600; text-decoration: none; cursor: pointer; white-space: nowrap; transition: background .15s, box-shadow .15s, transform .1s; }
.bouton:active { transform: translateY(1px); }
.bouton:disabled { opacity: .55; cursor: not-allowed; }
.bouton--principal { background: var(--a-accent); color: var(--a-accent-txt); }
.bouton--principal:hover { box-shadow: 0 4px 14px color-mix(in srgb, var(--a-accent) 35%, transparent); }
.bouton--secondaire { background: var(--a-surface); color: var(--a-texte); border-color: var(--a-ligne); }
.bouton--secondaire:hover { border-color: var(--a-accent); color: var(--a-accent-lisible); }
.bouton--danger { background: var(--a-erreur); color: #fff; }
.bouton--lien { background: none; border: 0; padding: .25rem .4rem; min-height: 32px; color: var(--a-accent-lisible); font-weight: 500; }
.bouton--petit { min-height: 32px; padding: .3rem .7rem; font-size: .88rem; }
.bouton--large { white-space: normal; text-align: center;  width: 100%; min-height: 48px; }
.lien { background: none; border: 0; padding: 0; color: var(--a-accent-lisible); font: inherit; text-decoration: underline; cursor: pointer; }
.barre-actions { display: flex; flex-wrap: wrap; gap: .6rem; align-items: center; margin-top: 1rem; }
.barre-actions--collante { position: sticky; bottom: 0; z-index: 20; margin: 1rem calc(-1 * clamp(1rem, 2vw, 1.4rem)) 0; padding: .8rem clamp(1rem, 2vw, 1.4rem); background: color-mix(in srgb, var(--a-surface) 92%, transparent); backdrop-filter: blur(10px); border-top: 1px solid var(--a-ligne); border-radius: 0 0 var(--a-rayon) var(--a-rayon); }
form > .barre-actions--collante { border-radius: var(--a-rayon); margin-inline: 0; box-shadow: var(--a-ombre); border: 1px solid var(--a-ligne); }
.en-ligne { display: inline-flex; flex-wrap: wrap; gap: .4rem; align-items: center; margin: 0; }
.en-ligne input:not([type=checkbox]):not([type=hidden]), .en-ligne select { width: auto; min-width: 8rem; }

/* ---------- Formulaires ---------- */
.formulaire-admin { display: block; }
.champ { display: grid; gap: .3rem; margin-bottom: .9rem; }
.champ label, .c-champ > span { font-weight: 600; font-size: .92rem; }
.aide { color: var(--a-doux); font-size: .87rem; margin: 0 0 .4rem; }
.aide--longueur { margin: .3rem 0 0; }
.aide--longueur-trop { color: #9b2c2c; font-weight: 600; background: #fbe9e9; padding: .35rem .6rem; border-radius: .5rem; }
.champ-trop-long { border-color: #9b2c2c !important; }
.requis { color: var(--a-erreur); }
input:not([type=checkbox]):not([type=radio]):not([type=range]):not([type=color]):not([type=file]), select, textarea {
  width: 100%; min-height: 42px; padding: .5rem .7rem; border: 1px solid var(--a-ligne); border-radius: 9px; background: var(--a-surface); color: var(--a-texte); font: inherit; font-size: max(16px, 1rem);
}
@media (min-width: 900px) { input:not([type=checkbox]):not([type=radio]), select, textarea { font-size: .95rem !important; } }
input:focus, select:focus, textarea:focus { outline: none; border-color: var(--a-accent); box-shadow: 0 0 0 3px color-mix(in srgb, var(--a-accent) 18%, transparent); }
textarea { resize: vertical; }
input[type=color] { width: 44px; height: 40px; padding: 2px; border: 1px solid var(--a-ligne); border-radius: 8px; background: var(--a-surface); }
.couleur-champ { display: flex; gap: .4rem; align-items: center; } .couleur-champ input[type=text] { max-width: 8rem; font-family: ui-monospace, monospace; }
.ligne-champs { display: grid; gap: .75rem; grid-template-columns: repeat(auto-fit, minmax(170px, 1fr)); }
/* Plusieurs champs sur une ligne : l'aide passe sous son champ, les champs restent alignés entre eux (défaut 40, 19/10/2026). */
.ligne-champs > .champ { align-content: start; } .ligne-champs > .champ > .aide { order: 2; }
.formulaire-admin--ligne { display: grid; gap: .6rem; grid-template-columns: repeat(auto-fit, minmax(160px, 1fr)); align-items: end; }
.formulaire-admin--ligne .champ { margin: 0; }
.case { display: inline-flex; gap: .5rem; align-items: flex-start; cursor: pointer; min-height: 32px; } .case input { width: 18px; height: 18px; accent-color: var(--a-accent); margin-top: .15rem; }
.case--petite { font-size: .9rem; align-items: center; } .case--petite input { margin-top: 0; }
.champ--case { margin-bottom: .7rem; }
.interrupteur { display: inline-flex; align-items: center; gap: .6rem; cursor: pointer; }
.interrupteur input { position: absolute; opacity: 0; width: 1px; height: 1px; }
.interrupteur__piste { position: relative; width: 42px; height: 24px; border-radius: 12px; background: var(--a-ligne); transition: background .15s; flex: none; }
.interrupteur__piste::after { content: ""; position: absolute; top: 3px; left: 3px; width: 18px; height: 18px; border-radius: 50%; background: #fff; box-shadow: 0 1px 3px rgb(0 0 0 / .25); transition: transform .15s; }
.interrupteur input:checked + .interrupteur__piste { background: var(--a-accent); }
.interrupteur input:checked + .interrupteur__piste::after { transform: translateX(18px); }
.interrupteur input:focus-visible + .interrupteur__piste { outline: 3px solid color-mix(in srgb, var(--a-accent) 50%, transparent); outline-offset: 2px; }
.ligne-repetable { position: relative; display: grid; gap: .5rem; grid-template-columns: repeat(auto-fit, minmax(130px, 1fr)); padding: .6rem 2.4rem .6rem .6rem; margin-bottom: .5rem; background: var(--a-surface-2); border-radius: 10px; }
.ligne-repetable--bloc { grid-template-columns: 1fr; }
.ligne-repetable__retirer { position: absolute; top: .45rem; right: .45rem; width: 30px; height: 30px; border: 0; border-radius: 50%; background: none; color: var(--a-doux); font-size: 1.2rem; cursor: pointer; }
.ligne-repetable__retirer:hover { background: var(--a-surface); color: var(--a-erreur); }
.filtres { display: flex; flex-wrap: wrap; gap: .5rem; margin-bottom: 1rem; } .filtres input, .filtres select { width: auto; flex: 1 1 12rem; }
.onglets { display: flex; gap: .25rem; overflow-x: auto; border-bottom: 1px solid var(--a-ligne); margin-bottom: 1rem; }
.onglets a { padding: .55rem .9rem; white-space: nowrap; text-decoration: none; color: var(--a-doux); border-bottom: 2px solid transparent; }
.onglets a[aria-current="page"], .onglets a[aria-current="true"], .onglets a.actif { color: var(--a-accent-lisible); border-color: var(--a-accent); font-weight: 600; } /* 3.1.1 : Réglages marque son onglet par aria-current="true", qui n'était pas souligné */

/* ---------- Messages ---------- */
.alerte { padding: .75rem 1rem; border-radius: 10px; background: color-mix(in srgb, var(--a-info) 10%, var(--a-surface)); border: 1px solid color-mix(in srgb, var(--a-info) 25%, transparent); margin-bottom: 1rem; }
.alerte--succes, .alerte--ok { background: color-mix(in srgb, var(--a-ok) 10%, var(--a-surface)); border-color: color-mix(in srgb, var(--a-ok) 30%, transparent); }
.alerte--erreur { background: color-mix(in srgb, var(--a-erreur) 9%, var(--a-surface)); border-color: color-mix(in srgb, var(--a-erreur) 30%, transparent); }
.alerte--attention { background: color-mix(in srgb, var(--a-attention) 10%, var(--a-surface)); border-color: color-mix(in srgb, var(--a-attention) 30%, transparent); }
.alerte--flottante { position: sticky; top: 64px; z-index: 30; box-shadow: var(--a-ombre); }
.a-surligne { animation: surligne 2.4s ease; } @keyframes surligne { 0%, 40% { box-shadow: 0 0 0 4px color-mix(in srgb, var(--a-accent) 35%, transparent); } }
.badge { display: inline-block; padding: .1rem .55rem; border-radius: 999px; font-size: .78rem; font-weight: 600; background: var(--a-surface-2); color: var(--a-doux); vertical-align: middle; }
.badge--ok { background: color-mix(in srgb, var(--a-ok) 14%, transparent); color: var(--a-ok); }
.badge--attention { background: color-mix(in srgb, var(--a-attention) 14%, transparent); color: var(--a-attention); }
.badge--erreur, .badge--ko { background: color-mix(in srgb, var(--a-erreur) 12%, transparent); color: var(--a-erreur); }
.badge--info { background: color-mix(in srgb, var(--a-info) 12%, transparent); color: var(--a-info); }
.a-toasts { position: fixed; z-index: 300; right: 1rem; bottom: 1rem; display: grid; gap: .5rem; max-width: min(26rem, calc(100vw - 2rem)); }
.a-toast { margin: 0; padding: .75rem 1rem; border-radius: 10px; background: var(--a-texte); color: var(--a-fond); box-shadow: 0 10px 30px rgb(0 0 0 / .25); animation: entree .25s ease; }
.a-toast--erreur { background: var(--a-erreur); color: #fff; }
.a-toast--sortie { opacity: 0; transform: translateY(8px); transition: all .35s; }
@keyframes entree { from { opacity: 0; transform: translateY(8px); } }

/* ---------- Tableaux ---------- */
.tableau { width: 100%; border-collapse: collapse; background: var(--a-surface); border: 1px solid var(--a-ligne); border-radius: var(--a-rayon); overflow: hidden; font-size: .93rem; }
.tableau th { text-align: left; font-size: .8rem; text-transform: uppercase; letter-spacing: .04em; color: var(--a-doux); background: var(--a-surface-2); font-weight: 650; }
.tableau th, .tableau td { padding: .6rem .75rem; border-bottom: 1px solid var(--a-ligne); vertical-align: middle; }
.tableau tr:last-child td { border-bottom: 0; }
.tableau tbody tr:hover { background: color-mix(in srgb, var(--a-accent) 3%, transparent); }
.tableau th.triable { cursor: pointer; } .tableau th[aria-sort="ascending"]::after { content: " ▲"; } .tableau th[aria-sort="descending"]::after { content: " ▼"; }
.tableau-defilant { overflow-x: auto; position: relative; } /* position : le texte « visuellement caché » d'une cellule ne déborde plus de la page (compta, téléphone) */
@media (max-width: 700px) {
  /* Téléphone (18/10/2026, testeur permanent) : position relative pour que les textes « visuellement cachés » des cellules ne
     débordent plus de la page ; une ombre au bord dit qu'il reste des colonnes à faire défiler, et disparaît au bout. */
  .tableau { display: block; overflow-x: auto; white-space: nowrap; position: relative;
    background: linear-gradient(to right, var(--a-surface) 30%, transparent), linear-gradient(to left, var(--a-surface) 30%, transparent) 100% 0,
      radial-gradient(farthest-side at 0 50%, rgb(0 0 0 / .16), transparent), radial-gradient(farthest-side at 100% 50%, rgb(0 0 0 / .16), transparent) 100% 0;
    background-repeat: no-repeat; background-size: 40px 100%, 40px 100%, 14px 100%, 14px 100%; background-attachment: local, local, scroll, scroll; background-color: var(--a-surface); }
}
/* Code long (commande de la tâche planifiée, adresse de webhook…) : il se coupe au lieu d'élargir la page (18/10/2026). */
.admin code { overflow-wrap: anywhere; word-break: break-word; }
.admin pre { max-width: 100%; overflow-x: auto; }
.liste-simple { padding-left: 1.2rem; } .liste-def dt { font-weight: 600; } .liste-def dd { margin: 0 0 .5rem; color: var(--a-doux); }
.liste-barres { list-style: none; padding: 0; display: grid; gap: .45rem; }
.liste-barres li { display: grid; grid-template-columns: minmax(8rem, 1fr) 3fr auto; gap: .6rem; align-items: center; font-size: .9rem; }
.histogramme { display: flex; align-items: flex-end; gap: 2px; height: 120px; padding: .5rem 0; }
.histogramme span { flex: 1; background: color-mix(in srgb, var(--a-accent) 70%, transparent); border-radius: 3px 3px 0 0; min-height: 2px; }
.pagination { display: flex; gap: 1rem; justify-content: space-between; margin-top: 1rem; }
.note-sante { font-size: 2.6rem; font-weight: 800; } .ok { color: var(--a-ok); } .ko { color: var(--a-erreur); } .moyen { color: var(--a-attention); }
.liste-controles { list-style: none; padding: 0; } .liste-controles li { padding: .5rem 0; border-bottom: 1px solid var(--a-ligne); }
.grille-droits { display: grid; gap: .3rem 1rem; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); }
.code-gros { font: 600 1.3rem ui-monospace, monospace; letter-spacing: .1em; }
.liste-notifs li, .historique li { padding: .4rem 0; border-bottom: 1px solid var(--a-ligne); list-style: none; }
.historique { padding: 0; }

/* ---------- Panneaux (notifications, assistant), dialogues ---------- */
.a-panneau, .a-assistant { position: fixed; z-index: 60; top: 64px; right: 1rem; width: min(26rem, calc(100vw - 2rem)); max-height: calc(100dvh - 80px); display: flex; flex-direction: column; background: var(--a-surface); border: 1px solid var(--a-ligne); border-radius: 16px; box-shadow: 0 24px 60px rgb(0 0 0 / .22); overflow: hidden; }
.a-panneau__tete { display: flex; align-items: center; justify-content: space-between; gap: .5rem; padding: .8rem 1rem; border-bottom: 1px solid var(--a-ligne); }
.a-panneau__tete h2 { margin: 0; font-size: 1rem; }
.a-panneau__tete button { width: 36px; height: 36px; border: 0; background: none; font-size: 1.4rem; cursor: pointer; color: var(--a-doux); border-radius: 50%; }
.a-panneau ul { list-style: none; margin: 0; padding: .5rem 1rem; overflow-y: auto; }
.a-panneau li { padding: .55rem 0; border-bottom: 1px solid var(--a-ligne); font-size: .92rem; } .a-panneau li.non-lu { font-weight: 600; } .a-panneau li a { color: inherit; text-decoration: none; }
.a-assistant__fil { flex: 1; overflow-y: auto; padding: 1rem; display: grid; gap: .6rem; align-content: start; }
.a-bulle { max-width: 92%; padding: .6rem .8rem; border-radius: 14px; background: var(--a-surface-2); font-size: .93rem; }
.a-bulle--moi { justify-self: end; background: var(--a-accent); color: var(--a-accent-txt); }
.a-bulle ol { margin: .4rem 0; padding-left: 1.2rem; }
.a-puce { display: inline-block; margin: .2rem .2rem 0 0; padding: .3rem .7rem; border: 1px solid var(--a-ligne); border-radius: 999px; background: var(--a-surface); color: inherit; font: inherit; font-size: .85rem; cursor: pointer; }
.a-assistant__saisie { display: flex; gap: .4rem; padding: .7rem; border-top: 1px solid var(--a-ligne); }
.a-assistant__mode { margin: 0; padding: 0 1rem .7rem; font-size: .78rem; color: var(--a-doux); }
.a-dialogue { border: 0; border-radius: 16px; padding: 1.25rem; width: min(30rem, calc(100vw - 2rem)); background: var(--a-surface); color: var(--a-texte); box-shadow: 0 30px 80px rgb(0 0 0 / .3); }
.a-dialogue--large { width: min(60rem, calc(100vw - 2rem)); max-height: 86dvh; display: flex; flex-direction: column; padding: 0; }
.a-dialogue--large > :not(.a-panneau__tete) { padding-inline: 1.25rem; }
.a-dialogue--large .grille-medias { overflow-y: auto; flex: 1; }
.a-dialogue::backdrop, .a-palette::backdrop { background: rgb(0 0 0 / .35); backdrop-filter: blur(3px); }
.a-palette { border: 0; border-radius: 16px; padding: 0; width: min(36rem, calc(100vw - 2rem)); background: var(--a-surface); color: var(--a-texte); box-shadow: 0 30px 80px rgb(0 0 0 / .3); }
.a-palette input { border: 0 !important; border-bottom: 1px solid var(--a-ligne) !important; border-radius: 0 !important; padding: 1rem 1.2rem !important; font-size: 1.05rem !important; box-shadow: none !important; }
.a-palette ul { list-style: none; margin: 0; padding: .4rem; max-height: 50dvh; overflow-y: auto; }
.a-palette a { display: block; padding: .6rem .8rem; border-radius: 9px; color: var(--a-texte); text-decoration: none; } .a-palette a:hover, .a-palette a[aria-selected="true"] { background: color-mix(in srgb, var(--a-accent) 10%, transparent); }

/* ---------- Médias ---------- */
.zone-depot { text-align: center; border: 2px dashed var(--a-ligne); transition: border-color .15s, background .15s; }
.zone-depot.survol { border-color: var(--a-accent); background: color-mix(in srgb, var(--a-accent) 6%, var(--a-surface)); }
.zone-depot progress { width: 100%; accent-color: var(--a-accent); }
.grille-medias { list-style: none; margin: 0; padding: 0; display: grid; gap: .6rem; grid-template-columns: repeat(auto-fill, minmax(140px, 1fr)); }
.media-carte, .media-choix { display: flex; flex-direction: column; gap: .35rem; width: 100%; padding: .4rem; border: 1.5px solid var(--a-ligne); border-radius: 10px; background: var(--a-surface); cursor: pointer; color: inherit; font: inherit; text-align: left; }
.media-carte img, .media-choix img { width: 100%; aspect-ratio: 1; object-fit: cover; border-radius: 7px; background: var(--a-surface-2); }
.media-choix[aria-pressed="true"] { border-color: var(--a-accent); box-shadow: 0 0 0 3px color-mix(in srgb, var(--a-accent) 25%, transparent); }
.media-carte__type, .media-choix__type { display: grid; place-items: center; aspect-ratio: 1; border-radius: 7px; background: var(--a-surface-2); font-weight: 700; color: var(--a-doux); }
.media-choix__nom { font-size: .78rem; color: var(--a-doux); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.media-champ { display: flex; flex-wrap: wrap; align-items: center; gap: .5rem; }
.media-apercus { display: flex; flex-wrap: wrap; gap: .4rem; }
.media-apercu { position: relative; display: inline-block; width: 64px; height: 64px; border-radius: 8px; overflow: hidden; background: var(--a-surface-2); }
.media-apercu img { width: 100%; height: 100%; object-fit: cover; }
.media-apercu__retirer { position: absolute; top: 2px; right: 2px; width: 22px; height: 22px; border-radius: 50%; border: 0; background: rgb(0 0 0 / .6); color: #fff; cursor: pointer; line-height: 1; }

/* ---------- Texte riche ---------- */
.riche-editeur { border: 1px solid var(--a-ligne); border-radius: 10px; overflow: hidden; background: var(--a-surface); }
.riche-barre { display: flex; flex-wrap: wrap; gap: 2px; padding: .3rem; background: var(--a-surface-2); border-bottom: 1px solid var(--a-ligne); }
.riche-barre button { min-width: 34px; height: 32px; border: 0; border-radius: 6px; background: none; color: var(--a-texte); font: inherit; font-weight: 700; cursor: pointer; }
.riche-barre button:hover { background: var(--a-surface); }
.riche-zone { min-height: 8rem; padding: .7rem .9rem; outline: none; }
.riche-zone:focus { box-shadow: inset 0 0 0 2px color-mix(in srgb, var(--a-accent) 25%, transparent); }

/* ---------- Menus ---------- */
.liste-triable { list-style: none; padding: 0; margin: 0 0 .8rem; display: grid; gap: .4rem; }
.menu-item { display: flex; flex-wrap: wrap; align-items: center; gap: .4rem; padding: .5rem; border: 1px solid var(--a-ligne); border-radius: 10px; background: var(--a-surface); }
.menu-item.glisse { opacity: .5; }
.menu-item > input { flex: 1 1 10rem; width: auto; }
.menu-item .menu-item__icone { flex: 0 0 3.2rem; text-align: center; }
.menu-item small { color: var(--a-doux); flex: 1 1 8rem; }
.poignee { cursor: grab; color: var(--a-doux); padding: 0 .3rem; user-select: none; }
.menu-enfants { flex-basis: 100%; list-style: none; margin: .3rem 0 0 1.6rem; padding: 0; display: grid; gap: .3rem; }
.menu-enfants li { display: flex; flex-wrap: wrap; gap: .4rem; align-items: center; }
.ajout-menu { display: flex; gap: .4rem; } .ajout-menu select { flex: 1; }

/* ---------- Constructeurs ---------- */
.c-liste { list-style: none; margin: 0 0 1rem; padding: 0; display: grid; gap: .5rem; counter-reset: c; }
.c-element { border: 1px solid var(--a-ligne); border-radius: 12px; background: var(--a-surface); }
.c-element.ouvert { border-color: color-mix(in srgb, var(--a-accent) 35%, var(--a-ligne)); }
.c-tete { display: flex; align-items: center; gap: .5rem; padding: .4rem .5rem .4rem .8rem; }
.c-resume { flex: 1; display: flex; flex-wrap: wrap; align-items: center; gap: .5rem; min-height: 40px; border: 0; background: none; color: inherit; font: inherit; text-align: left; cursor: pointer; }
.c-type { font-size: .75rem; font-weight: 700; text-transform: uppercase; letter-spacing: .05em; color: var(--a-doux); }
.c-num { display: inline-grid; place-items: center; width: 26px; height: 26px; border-radius: 50%; background: var(--a-accent); color: var(--a-accent-txt); font-size: .8rem; font-weight: 700; }
.c-ordre { display: flex; gap: 0; margin-left: auto; } .c-retirer:hover { color: var(--a-erreur); }
.c-corps { padding: .3rem .9rem .9rem; display: grid; gap: .6rem; }
.c-ligne { display: flex; flex-wrap: wrap; gap: .5rem .8rem; align-items: flex-end; }
.c-ligne > .c-champ { flex: 1 1 10rem; }
.c-champ { display: grid; gap: .25rem; } .c-champ > span { font-size: .82rem; color: var(--a-doux); font-weight: 600; }
.c-sous-titre { font-weight: 650; margin: .3rem 0; }
.c-options { display: grid; gap: .4rem; padding: .6rem; background: var(--a-surface-2); border-radius: 10px; }
.c-avance { border-top: 1px dashed var(--a-ligne); padding-top: .5rem; } .c-avance summary { cursor: pointer; font-weight: 600; color: var(--a-accent-lisible); padding: .2rem 0; }
.c-avance[open] summary { margin-bottom: .5rem; }
.c-ajout { display: flex; gap: .5rem; padding: .7rem; border: 1.5px dashed var(--a-ligne); border-radius: 12px; } .c-ajout select { flex: 1; }
.c-dimension { border: 1px solid var(--a-ligne); border-radius: 10px; padding: .6rem; margin: 0 0 .5rem; display: grid; gap: .4rem; }
.c-variables { font-size: .88rem; color: var(--a-doux); display: flex; flex-wrap: wrap; gap: .4rem; align-items: center; } .c-variables select { width: auto; flex: 1; }
.c-etape--attendre { border-left: 4px solid var(--a-info); } .c-etape--envoyer { border-left: 4px solid var(--a-accent); } .c-etape--condition { border-left: 4px solid var(--a-attention); } .c-etape--fin { border-left: 4px solid var(--a-doux); }
.c-alertes { padding-left: 2rem; }
.apercu-mail iframe { width: 100%; min-height: 70vh; border: 1px solid var(--a-ligne); border-radius: 10px; background: #fff; }

/* ---------- Infos clés, sections ---------- */
.liste-infos, .liste-suggestions { list-style: none; padding: 0; margin: 0 0 1rem; display: grid; gap: .7rem; }
.info-cle, .suggestion { padding: .9rem; border: 1px solid var(--a-ligne); border-radius: 12px; background: var(--a-surface-2); }
.info-cle__meta { margin: .4rem 0; font-size: .85rem; color: var(--a-doux); }
.ajout > summary { list-style: none; display: inline-flex; } .ajout > summary::-webkit-details-marker { display: none; }
.ajout[open] > summary { margin-bottom: .8rem; }

/* ---------- Connexion / installation ---------- */
.admin--connexion { min-height: 100dvh; display: grid; grid-template-columns: minmax(0, 1fr); place-items: center; padding: 1rem; background: radial-gradient(circle at 30% 10%, color-mix(in srgb, var(--a-accent) 12%, var(--a-fond)), var(--a-fond) 60%); }
.a-connexion { width: min(26rem, 100%); background: var(--a-surface); border: 1px solid var(--a-ligne); border-radius: 18px; padding: 2rem; box-shadow: var(--a-ombre); }
.a-connexion--large { width: min(40rem, 100%); }
@media (max-width: 480px) { .a-connexion { padding: 1.4rem 1.1rem; } }
.a-connexion h1 { font-size: 1.4rem; text-align: center; margin-bottom: 1.4rem; }
.separateur-ou { display: flex; align-items: center; gap: .8rem; color: var(--a-doux); font-size: .85rem; } .separateur-ou::before, .separateur-ou::after { content: ""; flex: 1; border-top: 1px solid var(--a-ligne); }
.a-details { margin-top: 1rem; } .a-details summary { cursor: pointer; color: var(--a-accent-lisible); }
.a-connexion__pied { text-align: center; margin: 1.4rem 0 0; font-size: .9rem; }

/* ---------- Gestion (projets, réunions, votes…) ---------- */
.g-vues { display: flex; flex-wrap: wrap; gap: .3rem; margin-bottom: 1rem; }
.g-vues a, .g-vues button { padding: .45rem .9rem; border-radius: 999px; border: 1px solid var(--a-ligne); background: var(--a-surface); color: var(--a-texte); text-decoration: none; font: inherit; font-size: .9rem; cursor: pointer; }
.g-vues [aria-current="page"], .g-vues [aria-pressed="true"] { background: var(--a-accent); color: var(--a-accent-txt); border-color: var(--a-accent); }
.g-kanban { display: grid; grid-auto-flow: column; grid-auto-columns: minmax(250px, 1fr); gap: .8rem; overflow-x: auto; padding-bottom: 1rem; align-items: start; }
.g-colonne { background: var(--a-surface-2); border-radius: 14px; padding: .6rem; min-height: 8rem; }
.g-colonne__tete { display: flex; justify-content: space-between; align-items: center; padding: .2rem .3rem .6rem; font-weight: 650; }
.g-colonne.survol { outline: 2px dashed var(--a-accent); }
.g-carte { display: block; background: var(--a-surface); border: 1px solid var(--a-ligne); border-radius: 10px; padding: .6rem .7rem; margin-bottom: .5rem; cursor: grab; color: inherit; text-decoration: none; box-shadow: 0 1px 2px rgb(0 0 0 / .05); }
.g-carte:hover { border-color: var(--a-accent); }
.g-carte__meta { display: flex; flex-wrap: wrap; gap: .35rem; margin-top: .35rem; font-size: .78rem; color: var(--a-doux); }
.g-pastille { display: inline-flex; align-items: center; gap: .3rem; padding: .1rem .5rem; border-radius: 999px; font-size: .78rem; font-weight: 600; color: #fff; }
.g-avatar { display: inline-grid; place-items: center; width: 24px; height: 24px; border-radius: 50%; background: var(--a-accent); color: var(--a-accent-txt); font-size: .72rem; font-weight: 700; overflow: hidden; }
.g-avatar img { width: 100%; height: 100%; object-fit: cover; }
.g-table td[contenteditable] { outline: none; } .g-table td[contenteditable]:focus { box-shadow: inset 0 0 0 2px var(--a-accent); }
.g-gantt { position: relative; overflow-x: auto; border: 1px solid var(--a-ligne); border-radius: 12px; background: var(--a-surface); }
.g-gantt__ligne { display: grid; grid-template-columns: 14rem 1fr; min-height: 36px; border-bottom: 1px solid var(--a-ligne); align-items: center; }
.g-gantt__nom { padding: .3rem .6rem; font-size: .88rem; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; border-right: 1px solid var(--a-ligne); position: sticky; left: 0; background: var(--a-surface); }
.g-gantt__piste { position: relative; height: 100%; }
.g-gantt__barre { position: absolute; top: 8px; height: 20px; border-radius: 6px; background: var(--a-accent); }
.g-gantt__jalon { position: absolute; top: 9px; width: 16px; height: 16px; transform: rotate(45deg); background: var(--a-attention); }
.g-calendrier { display: grid; grid-template-columns: repeat(7, 1fr); gap: 1px; background: var(--a-ligne); border: 1px solid var(--a-ligne); border-radius: 12px; overflow: hidden; }
.g-calendrier > div { background: var(--a-surface); min-height: 6.5rem; padding: .3rem; font-size: .82rem; }
.g-calendrier .hors-mois { background: var(--a-surface-2); color: var(--a-doux); }
.g-calendrier .aujourdhui .g-jour { background: var(--a-accent); color: var(--a-accent-txt); border-radius: 50%; }
.g-jour { display: inline-grid; place-items: center; width: 24px; height: 24px; font-weight: 600; }
.g-evt { display: block; margin-top: 2px; padding: 1px 5px; border-radius: 5px; background: color-mix(in srgb, var(--a-accent) 14%, transparent); color: var(--a-texte); text-decoration: none; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.g-compteur { display: grid; gap: .3rem; } .g-compteur progress { width: 100%; height: 12px; accent-color: var(--a-accent); }
.g-organigramme { display: flex; flex-direction: column; align-items: center; gap: 1.5rem; overflow-x: auto; padding: 1rem; }
.g-organigramme ul { display: flex; gap: 1rem; justify-content: center; padding: 1.2rem 0 0; margin: 0; list-style: none; position: relative; }
.g-organigramme li { display: flex; flex-direction: column; align-items: center; position: relative; }
.g-organigramme li::before { content: ""; position: absolute; top: -1.2rem; height: 1.2rem; border-left: 2px solid var(--a-ligne); }
.g-doublons { margin-bottom: 1rem; border-left: 4px solid var(--a-accent); }
.g-doublon { padding: .8rem 0; border-top: 1px solid var(--a-ligne); display: flex; flex-wrap: wrap; align-items: flex-end; gap: .5rem .8rem; }
.g-doublon > p, .g-doublon > form:first-of-type { flex: 1 1 100%; }
.g-doublon > form:first-of-type { display: grid; gap: .5rem; }
.g-doublon__fiches { display: grid; gap: .5rem; border: 0; padding: 0; margin: 0; grid-template-columns: repeat(auto-fit, minmax(14rem, 1fr)); }
.g-doublon__fiche { display: flex; gap: .6rem; align-items: flex-start; padding: .7rem .9rem; border: 1px solid var(--a-ligne); border-radius: 12px; background: var(--a-surface); cursor: pointer; }
.g-doublon__fiche:has(input:checked) { border-color: var(--a-accent); box-shadow: 0 0 0 2px color-mix(in srgb, var(--a-accent) 25%, transparent); }
.g-fiche-liee { margin-top: 1rem; }
.g-membre { display: grid; justify-items: center; gap: .3rem; padding: .8rem; min-width: 9rem; border: 1px solid var(--a-ligne); border-radius: 14px; background: var(--a-surface); text-align: center; box-shadow: var(--a-ombre); }
.g-membre img, .g-membre .g-avatar { width: 56px; height: 56px; border-radius: 50%; object-fit: cover; font-size: 1.1rem; }
.g-membre small { color: var(--a-doux); }
.g-vote-barre { height: 10px; border-radius: 5px; background: var(--a-surface-2); overflow: hidden; } .g-vote-barre span { display: block; height: 100%; background: var(--a-accent); }
.g-carte-mentale { position: relative; min-height: 70vh; display: grid; place-items: center; }
.g-carte-mentale > svg, .g-carte__traits { position: absolute; inset: 0; width: 100%; height: 100%; pointer-events: none; }
.g-noeud { position: absolute; transform: translate(-50%, -50%); display: grid; justify-items: center; gap: .3rem; padding: .8rem 1rem; min-width: 7.5rem; border-radius: 18px; background: var(--a-surface); border: 1px solid var(--a-ligne); box-shadow: var(--a-ombre); color: var(--a-texte); text-decoration: none; font-weight: 600; transition: transform .2s, box-shadow .2s; }
.g-noeud:hover { transform: translate(-50%, -50%) scale(1.05); box-shadow: 0 16px 40px rgb(0 0 0 / .15); }
.g-noeud--centre { background: var(--a-accent); color: var(--a-accent-txt); font-size: 1.1rem; padding: 1.1rem 1.4rem; }
.g-noeud__emoji { font-size: 1.6rem; line-height: 1; }
.g-noeud--enfant { font-weight: 500; font-size: .85rem; min-width: 0; padding: .4rem .7rem; border-radius: 12px; opacity: 0; animation: apparaitre .3s ease forwards; }
@keyframes apparaitre { to { opacity: 1; } }
@media (prefers-reduced-motion: reduce) { .g-noeud, .g-noeud--enfant { transition: none; animation: none; opacity: 1; } }
.g-essentiel { display: grid; gap: 1rem; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); }
.g-essentiel a { display: grid; gap: .5rem; padding: 1.6rem 1.2rem; border-radius: 18px; background: var(--a-surface); border: 1px solid var(--a-ligne); text-decoration: none; color: var(--a-texte); font-size: 1.1rem; font-weight: 650; box-shadow: var(--a-ombre); }
.g-essentiel a span { font-size: 2rem; }
.g-essentiel a .icone { width: 2rem; height: 2rem; color: var(--a-accent-lisible); }
.g-signature { border: 1.5px dashed var(--a-ligne); border-radius: 12px; background: #fff; touch-action: none; width: 100%; max-width: 480px; height: 180px; }
.g-doc { max-width: 52rem; margin: 0 auto; background: #fff; color: #111; padding: clamp(1.5rem, 4vw, 3.5rem); border-radius: 6px; box-shadow: var(--a-ombre); min-height: 60vh; }
.g-doc:focus-within { outline: 2px solid color-mix(in srgb, var(--a-accent) 30%, transparent); }
.g-doc table { border-collapse: collapse; width: 100%; } .g-doc td, .g-doc th { border: 1px solid #ccc; padding: .4rem; }
.g-signatures { display: flex; flex-wrap: wrap; gap: 1.5rem; margin-top: 2rem; } .g-signatures figure { margin: 0; } .g-signatures img { max-height: 70px; }
.g-coffre-ligne { display: grid; grid-template-columns: 1fr auto; gap: .5rem; align-items: center; padding: .6rem 0; border-bottom: 1px solid var(--a-ligne); }
.g-secret { font-family: ui-monospace, monospace; letter-spacing: .05em; }

@media print {
  .a-entete, .a-nav, .barre-actions, .a-toasts, .ed-barre { display: none !important; }
  .a-principal { margin: 0; padding: 0; }
  .carte { box-shadow: none; border: 0; }
  body.admin { background: #fff; }
}

/* ---------- Gestion : compléments (pastilles en ligne, retards, survols, menu compact) ---------- */
.g-noeud .a-pastille, .g-essentiel .a-pastille, .liste-simple .a-pastille, .a-nav .a-pastille { position: static; display: inline-grid; margin-left: .3rem; vertical-align: middle; }
.g-table tr.retard td:first-child { box-shadow: inset 3px 0 0 var(--a-erreur); }
.g-table input, .g-table select { min-width: 7rem; border-color: transparent; background: transparent; }
.g-table input:hover, .g-table select:hover, .g-table input:focus, .g-table select:focus { border-color: var(--a-ligne); background: var(--a-surface); }
.g-table td:nth-child(2) input { min-width: 14rem; font-weight: 600; }
.g-calendrier > div.survol { outline: 2px dashed var(--a-accent); outline-offset: -2px; }
.poignee { cursor: grab; color: var(--a-doux); user-select: none; padding: 0 .2rem; }
.g-noeud[aria-expanded="true"] { outline: 3px solid color-mix(in srgb, var(--a-accent) 45%, transparent); }
button.g-noeud { font: inherit; cursor: pointer; border: 1px solid var(--a-ligne); background: var(--a-surface); color: var(--a-texte); }
.g-carte-mentale .g-noeud { text-decoration: none; color: inherit; border-radius: 18px; box-shadow: var(--a-ombre); }
.g-carte-mentale .g-noeud small { font-weight: 400; opacity: .8; }
.icone--texte { display: inline-grid; place-items: center; width: 1.4em; font-size: 1.05rem; }
.liste-barres { list-style: none; padding: 0; display: grid; gap: .5rem; } .liste-barres li { display: grid; gap: .2rem; }
.admin--nav-compacte { --a-nav: 64px; }
.admin--nav-compacte .a-nav { padding-inline: .4rem; }
.admin--nav-compacte .a-nav a span:not(.icone), .admin--nav-compacte .a-nav__groupe, .admin--nav-compacte .a-nav__version, .admin--nav-compacte .a-nav__sortie { display: none; }
.admin--nav-compacte .a-nav a { justify-content: center; }
.admin--nav-compacte .a-nav ul { border-bottom: 1px solid var(--a-ligne); padding-bottom: .4rem; margin-bottom: .4rem; }
@media (max-width: 900px) { .admin--nav-compacte { --a-nav: 248px; } .admin--nav-compacte .a-nav a span:not(.icone), .admin--nav-compacte .a-nav__groupe { display: revert; } }
@media (max-width: 700px) { .g-carte-mentale { min-height: 120vh; } .g-noeud { min-width: 0; padding: .5rem .6rem; font-size: .85rem; } }
/* Un élément masqué reste masqué, même si sa classe lui donne un display (panneaux, coffre, carte mentale…). */
[hidden] { display: none !important; }
.carte-choix strong, .carte-choix small { display: block; } .carte-choix small { color: var(--a-doux); margin-top: .2rem; }
.choix-modeles { display: grid; gap: .7rem; grid-template-columns: repeat(auto-fit, minmax(min(100%, 13rem), 1fr)); margin-bottom: 1rem; }
.histogramme { min-width: 0; } .grille-chiffres { min-width: 0; }
.bouton--lien { white-space: normal; text-align: left; }
.g-carte-mentale .g-noeud--centre { color: var(--a-accent-txt); background: var(--a-accent); }
/* Parties de la gestion : déjà dans le menu de gauche sur grand écran ; en bandeau défilant sur téléphone. */
@media (min-width: 901px) { .g-parties { display: none; } }
.g-parties .icone { width: 1.1em; height: 1.1em; vertical-align: -.2em; }
@media (max-width: 900px) { .g-parties { flex-wrap: nowrap; overflow-x: auto; scrollbar-width: none; margin-inline: -1rem; padding-inline: 1rem; } .g-parties a { white-space: nowrap; } }


/* ---------- App OCSIA2 : « Aujourd'hui », ajout rapide, barre d'onglets ---------- */
.o-jour { padding: .5rem 0 1.25rem; }
.o-jour__date { margin: 0; font-size: .78rem; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; color: var(--a-doux); }
.o-jour__titre { font-size: clamp(1.7rem, 5vw, 2.4rem); margin: .2rem 0 .3rem; }
.o-jour__resume { font-size: 1.05rem; color: var(--a-doux); margin: 0; }
.o-rapide__types { display: flex; flex-wrap: wrap; gap: .4rem; margin-bottom: .6rem; }
.o-rapide__types label { cursor: pointer; }
.o-rapide__types input { position: absolute; opacity: 0; pointer-events: none; }
.o-rapide__types span { display: inline-flex; align-items: center; min-height: 40px; padding: .35rem .9rem; border-radius: 999px; border: 1.5px solid var(--a-ligne); background: var(--a-surface); font-weight: 600; transition: background .15s, border-color .15s; }
.o-rapide__types input:checked + span { border-color: var(--a-accent); background: color-mix(in srgb, var(--a-accent) 12%, var(--a-surface)); color: var(--a-texte); }
.o-rapide__types input:focus-visible + span { outline: 3px solid color-mix(in srgb, var(--a-accent) 55%, transparent); outline-offset: 2px; }
.o-rapide__saisie { display: flex; gap: .5rem; } .o-rapide__saisie input { flex: 1; min-height: 46px; font-size: 1rem; }
.o-liste { list-style: none; margin: 0; padding: 0; } .o-liste li { display: flex; justify-content: space-between; gap: .75rem; padding: .55rem 0; border-bottom: 1px solid var(--a-ligne); } .o-liste li:last-child { border-bottom: 0; }
.o-liste small { color: var(--a-doux); white-space: nowrap; } .o-liste li.retard small { color: var(--a-erreur); font-weight: 600; }
.o-onglets { display: none; }
@media (max-width: 900px) {
  .o-onglets { position: fixed; z-index: 45; left: 0; right: 0; bottom: 0; display: grid; grid-auto-flow: column; grid-auto-columns: 1fr; padding: .35rem .4rem calc(.35rem + env(safe-area-inset-bottom)); background: color-mix(in srgb, var(--a-surface) 94%, transparent); backdrop-filter: blur(14px); -webkit-backdrop-filter: blur(14px); border-top: 1px solid var(--a-ligne); }
  .o-onglets a, .o-onglets button { display: grid; justify-items: center; gap: 2px; min-height: 52px; padding: .25rem 0; border: 0; background: none; font: 600 .7rem/1.1 var(--a-police); color: var(--a-doux); text-decoration: none; border-radius: 12px; cursor: pointer; }
  .o-onglets a span, .o-onglets button span { font-size: 1.3rem; line-height: 1.2; }
  .o-onglets .icone { width: 1.45rem; height: 1.45rem; }
  .o-onglets [aria-current="page"] { color: var(--a-accent-lisible); background: color-mix(in srgb, var(--a-accent) 10%, transparent); }
  body.admin { padding-bottom: calc(70px + env(safe-area-inset-bottom)); }
  .a-menu-bouton { display: none; }
}
@media (display-mode: standalone) { .a-voir { display: none; } }

/* ---------- Erreurs de l'espace (écran introuvable, accès refusé, page expirée, problème technique) ---------- */
.a-erreur { max-width: 38rem; padding: 0 0 2rem; }
.a-erreur__titre { display: flex; align-items: flex-start; gap: .6rem; font-size: clamp(1.45rem, 1.1rem + 1.4vw, 1.9rem); text-wrap: balance; margin-bottom: .7rem; }
.a-erreur__icone { width: 1.1em; height: 1.1em; margin-top: .08em; color: var(--a-accent-lisible); }
.a-erreur__texte { font-size: 1.05rem; color: var(--a-doux); text-wrap: pretty; }
.a-erreur__actions { margin-top: 1.5rem; }
.a-erreur__signaler { margin: 1.75rem 0 0; padding-top: 1rem; border-top: 1px solid var(--a-ligne); color: var(--a-doux); }
.a-erreur__debug { margin-top: 1.5rem; } .a-erreur__debug pre { white-space: pre-wrap; overflow-wrap: anywhere; font-size: .8rem; max-height: 22rem; overflow: auto; background: var(--a-surface-2); padding: .75rem; border-radius: 8px; }
.a-connexion--erreur { width: min(32rem, 100%); }
.a-connexion--erreur .a-erreur { padding: 0; }
.a-connexion--erreur h1 { text-align: start; font-size: 1.35rem; margin-bottom: .6rem; }
.a-connexion__site { margin: 0 0 1.25rem; font-weight: 700; color: var(--a-doux); }

/* ---------- Chargement : fine barre en haut (actions longues, changement d'écran) et bouton occupé ---------- */
.a-charge { position: fixed; z-index: 300; inset: 0 0 auto 0; height: 3px; pointer-events: none; opacity: 0; transition: opacity .2s ease-out; }
.a-charge::before { content: ""; position: absolute; inset: 0 auto 0 0; width: 40%; background: var(--a-accent); border-radius: 0 3px 3px 0; transform: translateX(-100%); }
.a-charge.actif { opacity: 1; transition-duration: .12s; }
.a-charge.actif::before { animation: a-charge 1.3s cubic-bezier(.4, 0, .2, 1) infinite; }
@keyframes a-charge { from { transform: translateX(-100%); } to { transform: translateX(250%); } }
.bouton[aria-busy="true"], .bouton[aria-busy="true"]:disabled, .es-bt[aria-busy="true"] { cursor: progress; opacity: .85; }
/* Bouton occupé : le symbole OCSIA2 qui tourne (17/10/2026, demande de Flavio : la rotation du logo est l'animation de
   chargement ; plus de rond générique). Petit : il tourne avec élan, sans se tracer, un tour en 1 s. */
/* 3.1.1 : aussi les boutons de l'espace (.es-bt), qui n'avaient rien. */
.bouton[aria-busy="true"]::after, .es-bt[aria-busy="true"]::after { content: ""; flex: none; width: 1.05em; height: 1.05em; background: currentColor; -webkit-mask: url("/assets/marque/symbole.svg") center / contain no-repeat; mask: url("/assets/marque/symbole.svg") center / contain no-repeat; animation: a-tourne 1s cubic-bezier(.65, 0, .35, 1) infinite; }
@keyframes a-tourne { to { transform: rotate(1turn); } }
/* Logo qui tourne pendant une attente qui dure (13/10/2026, demande de Flavio) : le logo du site, sinon le symbole
   OCSIA2 (assets/marque, tel quel, coloré par currentColor). Le cercle se trace puis tourne avec élan (voir plus bas) ; il apparaît
   en fondu (ease-out, 200 ms) et s'arrête à la fin de son tour quand l'attente finit (data-arret, voir admin.js) ;
   arrêté net si la personne demande moins d'animations. */
.ocsia-tourne { display: inline-grid; place-items: center; width: 56px; height: 56px; flex: none; }
.ocsia-tourne > img, .ocsia-tourne > picture, .ocsia-tourne > picture img { width: 100%; height: 100%; object-fit: contain; display: block; }
.ocsia-tourne--marque { color: var(--a-accent, #4b176f); }
.ocsia-tourne--marque::before { content: ""; width: 100%; height: 100%; background: currentColor; -webkit-mask: url("/assets/marque/symbole.svg") center / contain no-repeat; mask: url("/assets/marque/symbole.svg") center / contain no-repeat; }
/* 17/10/2026, choix de Flavio : le cercle se trace (1,1 s), puis le logo tourne avec élan (chaque tour accélère et ralentit, 1,4 s). */
@property --ocsia-trace { syntax: "<angle>"; inherits: true; initial-value: 360deg; }
.ocsia-tourne--actif { animation: ocsia-trace 1.1s cubic-bezier(.77, 0, .175, 1) both, ocsia-tourne 1.4s cubic-bezier(.65, 0, .35, 1) 1.1s infinite; }
.ocsia-tourne--marque.ocsia-tourne--actif::before { -webkit-mask: url("/assets/marque/symbole.svg") center / contain no-repeat, conic-gradient(from 160deg, #000 var(--ocsia-trace), transparent 0); -webkit-mask-composite: source-in; mask: url("/assets/marque/symbole.svg") center / contain no-repeat, conic-gradient(from 160deg, #000 var(--ocsia-trace), transparent 0); mask-composite: intersect; }
@keyframes ocsia-trace { from { --ocsia-trace: 0deg; } to { --ocsia-trace: 360deg; } }
@keyframes ocsia-tourne { to { transform: rotate(1turn); } }
.a-charge__logo { position: fixed; top: 14px; left: 50%; width: 46px; height: 46px; margin-left: -23px; padding: 8px; border-radius: 50%; background: var(--a-surface); box-shadow: 0 6px 20px rgb(36 21 43 / .16); opacity: 0; transform: translateY(-6px) scale(.96); transition: opacity 200ms cubic-bezier(.23, 1, .32, 1), transform 200ms cubic-bezier(.23, 1, .32, 1); }
.a-charge__logo .ocsia-tourne { width: 100%; height: 100%; }
.a-charge.long .a-charge__logo { opacity: 1; transform: none; }
.a-charge:not(.long) .a-charge__logo .ocsia-tourne--actif { animation-play-state: paused; }
@media (prefers-reduced-motion: reduce) {
  .ocsia-tourne--actif { animation: none; }
  .a-charge__logo { transition: opacity 120ms linear; transform: none; }
  .a-charge.actif::before { animation: none; width: 100%; transform: none; opacity: .6; }
  .bouton[aria-busy="true"]::after, .es-bt[aria-busy="true"]::after { animation: none; }
}

/* ---------- Mes options (chantier E) : une liste calme, un interrupteur par ligne, le détail sur demande ---------- */
.op-tete { display: grid; gap: .75rem; margin-bottom: 1.5rem; max-width: 62rem; }
.op-resume { margin: 0; color: var(--a-doux); max-width: 60ch; } .op-resume strong { color: var(--a-texte); }
.op-filtres { display: flex; flex-wrap: wrap; gap: .5rem; align-items: center; }
.op-filtres input { flex: 1 1 14rem; min-height: 44px; padding: .5rem .8rem; border: 1px solid var(--a-ligne); border-radius: 10px; background: var(--a-surface); color: var(--a-texte); font: inherit; }
.op-filtres .g-vues { margin: 0; }
.op-groupe { max-width: 62rem; margin-bottom: 1.75rem; } .op-groupe h2 { margin-bottom: .5rem; }
.op-liste { list-style: none; margin: 0; padding: 0; background: var(--a-surface); border: 1px solid var(--a-ligne); border-radius: var(--a-rayon); }
.op-ligne { display: flex; gap: 1rem; align-items: flex-start; padding: 1rem 1.1rem; border-top: 1px solid var(--a-ligne); scroll-margin-top: 80px; }
.op-ligne:first-child { border-top: 0; }
.op-ligne:target { background: color-mix(in srgb, var(--a-accent) 6%, var(--a-surface)); }
.op-ligne--sous { padding-left: 1.6rem; }
.op-ligne__corps { flex: 1; min-width: 0; }
.op-nom { margin: 0 0 .2rem; font-size: 1rem; display: flex; flex-wrap: wrap; gap: .4rem; align-items: center; }
.op-apporte { margin: 0; color: var(--a-doux); max-width: 62ch; }
.op-details { margin-top: .35rem; } .op-details summary { cursor: pointer; color: var(--a-accent-lisible); font-size: .9rem; padding: .35rem 0; min-height: 32px; }
.op-details dl { display: grid; grid-template-columns: max-content 1fr; gap: .3rem 1rem; margin: .4rem 0 .6rem; font-size: .92rem; }
.op-details dt { font-weight: 600; } .op-details dd { margin: 0; color: var(--a-doux); }
.op-ligne__action { flex: none; display: flex; flex-direction: column; align-items: flex-end; gap: .3rem; min-width: 7.5rem; }
.op-inter { display: inline-flex; align-items: center; gap: .55rem; min-height: 44px; padding: 0 .2rem; border: 0; background: none; color: var(--a-texte); font: inherit; font-size: .9rem; cursor: pointer; }
.op-inter__piste { position: relative; width: 44px; height: 26px; border-radius: 13px; background: var(--a-ligne); transition: background .15s ease-out; flex: none; }
.op-inter__piste::after { content: ""; position: absolute; top: 3px; left: 3px; width: 20px; height: 20px; border-radius: 50%; background: #fff; box-shadow: 0 1px 3px rgb(0 0 0 / .25); transition: transform .15s ease-out; }
.op-inter[aria-checked="true"] .op-inter__piste { background: var(--a-accent); }
.op-inter[aria-checked="true"] .op-inter__piste::after { transform: translateX(18px); }
.op-inter:active .op-inter__piste::after { width: 23px; }
.op-inter__texte { min-width: 4.2rem; text-align: left; }
.op-etat { font-size: .9rem; color: var(--a-doux); min-height: 44px; display: inline-flex; align-items: center; } .op-etat--on { color: var(--a-ok); font-weight: 600; }
.op-regler { font-size: .9rem; }
.suivi-parcours__liste { list-style: none; margin: .75rem 0 0; padding: 0; display: grid; }
.suivi-parcours__liste li { display: flex; flex-wrap: wrap; align-items: center; gap: .4rem 1rem; padding: .7rem 0; border-top: 1px solid var(--a-ligne); }
.suivi-parcours__qui { flex: 1 1 14rem; min-width: 0; overflow-wrap: anywhere; } .suivi-parcours__qui small { display: block; color: var(--a-doux); }
.suivi-parcours__ou { flex: 1 1 12rem; } .suivi-parcours__ou small { display: block; color: var(--a-doux); }
.suivi-parcours__barre { display: inline-block; vertical-align: middle; width: 5rem; height: .45rem; border-radius: 999px; background: var(--a-ligne); overflow: hidden; margin-right: .35rem; }
.suivi-parcours__barre span { display: block; height: 100%; background: var(--a-accent); border-radius: inherit; }
.op-choix { display: flex; flex-direction: column; align-items: stretch; gap: .35rem; max-width: 15rem; }
.op-choix select { min-height: 44px; font-size: .92rem; }
.op-socle { max-width: 62rem; margin: 0 0 1.75rem; padding: .9rem 1.1rem; border: 1px solid var(--a-ligne); border-radius: var(--a-rayon); background: var(--a-surface); }
.op-socle summary { cursor: pointer; font-weight: 600; min-height: 32px; }
.op-socle__liste { margin: .6rem 0 0; padding-left: 1.1rem; color: var(--a-doux); } .op-socle__liste li { margin-bottom: .4rem; } .op-socle__liste strong { color: var(--a-texte); }
.op-manque { max-width: 62rem; padding: 1.25rem 1.3rem; border-radius: var(--a-rayon); border: 1.5px dashed var(--a-ligne); }
.op-manque p:last-child { margin: 0; display: flex; flex-wrap: wrap; gap: .5rem; }
.op-retour { margin: -.5rem 0 1rem; } .op-retour a { text-decoration: none; }
.op-demande, #mes-demandes, #fait { max-width: 52rem; } #mes-demandes { margin-top: 2.5rem; } #fait { margin-bottom: 2rem; outline: none; }
.op-etapes { padding-left: 1.2rem; } .op-etapes li { margin-bottom: .35rem; }
#op-texte-claude { font: .9rem/1.5 ui-monospace, monospace; }
.op-demarches { border: 0; padding: 0; margin: 1rem 0; display: grid; gap: .75rem; } .op-demarches legend { font-weight: 700; margin-bottom: .5rem; }
.op-demarche { display: grid; gap: .45rem; }
.op-demarche__tete { display: flex; align-items: center; gap: .5rem; } .op-demarche__tete input { width: 1.1rem; height: 1.1rem; accent-color: var(--a-accent); }
.op-demarche__resume { color: var(--a-doux); }
.op-demarche__colonnes { display: grid; grid-template-columns: 1fr 1fr; gap: .4rem 1.25rem; font-size: .92rem; }
.op-demarche__colonnes em { display: block; font-style: normal; font-weight: 600; margin-bottom: .15rem; }
.op-plus, .op-moins { display: block; padding-left: 1.1rem; position: relative; }
.op-plus::before { content: "+"; position: absolute; left: 0; color: var(--a-ok); font-weight: 700; }
.op-moins::before { content: "–"; position: absolute; left: 0; color: var(--a-attention); font-weight: 700; }
.op-demarche__cout { font-size: .9rem; color: var(--a-doux); }
.op-suivi { list-style: none; margin: 0; padding: 0; display: grid; gap: .75rem; }
.op-suivi__ligne { padding: 1rem 1.1rem; border: 1px solid var(--a-ligne); border-radius: var(--a-rayon); background: var(--a-surface); scroll-margin-top: 80px; }
.op-suivi__tete { display: flex; flex-wrap: wrap; gap: .5rem; align-items: center; margin-bottom: .2rem; }
.a-resultats { list-style: none; margin: .5rem 0 0; padding: 0; display: grid; gap: .35rem; }
/* Proposition de l'assistant (écriture en deux temps) : ce qui sera touché, puis Approuver ou Laisser. */
.a-proposition ul { margin: .35rem 0 .5rem; padding-left: 1.1rem; }
.a-proposition__boutons { display: flex; flex-wrap: wrap; gap: .5rem; margin: 0; }
.a-resultats a { display: block; padding: .45rem .6rem; border-radius: 9px; text-decoration: none; color: var(--a-texte); background: var(--a-surface-2); }
.a-resultats a:hover { background: color-mix(in srgb, var(--a-accent) 10%, var(--a-surface-2)); }
.a-resultats small { display: block; color: var(--a-doux); }
.a-resultats .badge { margin-right: .35rem; }
@media (max-width: 640px) {
  .op-ligne { gap: .5rem; padding: .85rem .9rem; } .op-ligne--sous { padding-left: 1.1rem; }
  .op-ligne__action { min-width: 0; }
  .op-ligne:has(.op-choix) { flex-wrap: wrap; } .op-ligne:has(.op-choix) .op-ligne__action { width: 100%; align-items: stretch; } .op-choix { max-width: none; }
  .op-inter__texte { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }
  .op-etat { font-size: .85rem; }
  .op-demarche__colonnes { grid-template-columns: 1fr; }
}
@media (prefers-reduced-motion: reduce) { .op-inter__piste, .op-inter__piste::after { transition: none; } }

/* ---------- Compteur « à traiter » (Messages et demandes) dans le menu et la barre d'onglets ---------- */
.a-compteur { margin-left: auto; min-width: 1.5rem; height: 1.25rem; padding: 0 .4rem; border-radius: 999px; background: color-mix(in srgb, var(--a-accent) 14%, var(--a-surface)); color: var(--a-accent-lisible); font-size: .75rem; font-weight: 700; font-variant-numeric: tabular-nums; display: inline-grid; place-items: center; line-height: 1; }
.o-onglets a { position: relative; }
.o-onglets a .a-compteur--onglet { position: absolute; top: 2px; left: calc(50% + 6px); margin: 0; min-width: 1.15rem; height: 1.05rem; font-size: .66rem; background: var(--a-accent); color: var(--a-accent-txt); }

/* ---------- Reliure de l'app OCSIA2 (Mes préférences) : bouton pour cet appareil, code QR pour un autre ---------- */
.reliure { display: grid; gap: 1rem 1.5rem; align-items: center; margin: 0 0 1rem; }
.reliure__qr { margin: 0; display: grid; justify-items: center; gap: .5rem; order: 2; }
.reliure__qr .code-qr { width: min(200px, 60vw); height: auto; border-radius: 12px; border: 1px solid var(--a-ligne); }
.reliure__qr figcaption { font-size: .85rem; color: var(--a-doux); text-align: center; max-width: 26ch; }
.reliure__texte .aide { margin-bottom: 0; }
.reliure__obtenir { display: flex; flex-wrap: wrap; align-items: center; gap: .5rem 1rem; margin: 0 0 1.1rem; }
.reliure__obtenir .bouton { display: inline-flex; align-items: center; gap: .5rem; }
.reliure__obtenir .bouton .icone { width: 18px; height: 18px; }
.reliure__obtenir .aide { margin: 0; flex: 1 1 16rem; }
@media (min-width: 720px) {
  .reliure { grid-template-columns: auto 1fr; }
  .reliure__qr { order: 0; }
}

/* Préparation automatique du site (installation, nouveau paquet) */
.preparation-site { max-width: 40rem; margin: 2rem auto; }
.preparation-site__logo { margin: 0 0 1rem; }
.preparation-site__logo .ocsia-tourne { width: 64px; height: 64px; }
.preparation-site__barre { height: .5rem; border-radius: 999px; background: var(--a-surface-2); overflow: hidden; margin: 1.2rem 0 .6rem; }
.preparation-site__barre span { display: block; height: 100%; width: 35%; border-radius: inherit; background: var(--c-primaire, #333); animation: preparation-va 1.6s ease-in-out infinite; }
@keyframes preparation-va { 0% { transform: translateX(-100%); } 100% { transform: translateX(290%); } }
@media (prefers-reduced-motion: reduce) { .preparation-site__barre span { animation: none; width: 100%; opacity: .5; } }
.preparation-site__detail pre { max-height: 18rem; overflow: auto; font-size: .8rem; white-space: pre-wrap; background: var(--a-surface-2); padding: .8rem; border-radius: 8px; }

/* Carte mentale : la bulle cliquée vient au centre (13/10/2026) */
.g-carte-mentale { overflow: hidden; }
.g-carte__scene { position: absolute; inset: 0; }
.g-carte__traits { position: absolute; inset: 0; width: 100%; height: 100%; pointer-events: none; transition: opacity .2s; }
.g-carte__traits line { stroke: currentColor; stroke-opacity: .22; stroke-width: 1.5; vector-effect: non-scaling-stroke; }
.g-carte__traits--sort { opacity: 0; }
.g-carte-mentale .g-noeud { transition: left .32s cubic-bezier(.2, .8, .2, 1), top .32s cubic-bezier(.2, .8, .2, 1), opacity .2s, transform .2s, box-shadow .2s; max-width: 13rem; text-align: center; }
.g-carte-mentale .g-noeud--enfant { animation: none; opacity: 0; font-size: .9rem; }
.g-carte-mentale .g-noeud--pose { opacity: 1; }
.g-carte-mentale .g-noeud--branche { font-weight: 600; box-shadow: var(--a-ombre), 0 0 0 3px color-mix(in srgb, var(--a-accent) 18%, transparent); }
.g-carte-mentale .g-noeud--sort { opacity: 0; pointer-events: none; }
.g-carte-mentale .g-noeud--vers-centre { z-index: 2; transform: translate(-50%, -50%) scale(1.12); }
.g-carte-mentale .g-noeud--retour { font-size: .82rem; font-weight: 500; padding: .45rem .8rem; background: var(--a-surface-2); min-width: 0; }
.g-carte-mentale .g-noeud { display: grid; grid-auto-flow: row; justify-items: center; align-content: center; }
.g-noeud__icone { display: grid; place-items: center; justify-self: center; position: static; line-height: 0; }
.g-noeud__icone .icone { width: 1.35rem; height: 1.35rem; }
.g-noeud--centre .g-noeud__icone .icone { width: 1.7rem; height: 1.7rem; }
.g-carte__liste { position: relative; z-index: 1; }
@media (prefers-reduced-motion: reduce) { .g-carte-mentale .g-noeud, .g-carte__traits { transition: none; } }
@media (max-width: 640px) { .g-carte-mentale .g-noeud { max-width: 9.5rem; font-size: .8rem; } }
/* Organigramme sans « Rattaché à » : une rangée par niveau, reliée à la suivante (13/10/2026). */
.g-organigramme--niveaux { align-items: stretch; gap: 0; }
.g-niveau { display: grid; justify-items: center; gap: .6rem; padding: .9rem 0; position: relative; }
.g-niveau + .g-niveau { border-top: 1px dashed var(--a-ligne); }
.g-niveau__nom { margin: 0; font-size: .8rem; font-weight: 600; color: var(--a-doux); }
.g-niveau__fiches { display: flex; flex-wrap: wrap; justify-content: center; gap: 1rem; }
.c-code { font: 12.5px/1.45 ui-monospace, SFMono-Regular, Menlo, monospace !important; min-height: 160px; }

/* Contrôle de visibilité (Réglages › Visibilité) */
.controle-visibilite__liste { list-style: none; margin: 0 0 1rem; padding: 0; display: grid; gap: .6rem; }
.controle-visibilite__liste li { display: grid; grid-template-columns: auto 1fr; gap: .15rem .6rem; align-items: baseline; }
.controle-visibilite__detail { grid-column: 2; color: var(--a-doux); font-size: .93rem; }
@media (max-width: 520px) { .controle-visibilite__liste li { grid-template-columns: 1fr; } .controle-visibilite__detail { grid-column: 1; } }
.robots-ia__liste { list-style: none; margin: 0 0 1rem; padding: 0; display: grid; gap: .5rem; }
.robots-ia__liste li { display: grid; grid-template-columns: minmax(10rem, 13rem) 1fr auto; gap: .25rem 1rem; align-items: start; padding: .65rem .8rem; border: 1px solid var(--a-ligne); border-radius: var(--a-rayon); background: var(--a-surface); }
.robots-ia__editeur { display: block; color: var(--a-doux); font-size: .85rem; }
.robots-ia__texte { color: var(--a-doux); font-size: .9rem; }
.robots-ia__role { display: block; color: var(--a-texte, inherit); font-weight: 600; }
.robots-ia__respect { display: block; margin-top: .15rem; font-size: .82rem; }
.robots-ia__liste select { min-width: 8rem; }
@media (max-width: 720px) { .robots-ia__liste li { grid-template-columns: 1fr; } .robots-ia__liste select { width: 100%; } }

/* Commande : vignette de l'article choisi (photo de la combinaison, sinon pastille de sa couleur) (chantier AD2) */
.article-ligne { display: flex; align-items: center; gap: .75rem; }
.article-ligne .article-vignette { flex: none; display: block; width: 44px; height: 44px; object-fit: cover; border-radius: 8px; background: var(--a-surface-2); }
.article-ligne .article-vignette--teinte { display: grid; place-items: center; background: none; }
.article-ligne .article-vignette--teinte::before { content: ""; width: 22px; height: 22px; border-radius: 50%; background: var(--teinte); box-shadow: inset 0 0 0 1px rgb(0 0 0 / .15); }

/* Bibliothèque de fichiers : recherche, tri, dossiers, aperçu (17/10/2026) */
.med-outils { display: flex; flex-wrap: wrap; gap: .5rem; align-items: center; margin: 1rem 0 .5rem; }
.med-outils input[type=search] { flex: 1 1 16rem; min-width: 0; width: auto; }
.med-outils select, .med-outils .bouton { flex: none; width: auto; margin: 0; }
.med-dossiers { display: flex; flex-wrap: wrap; gap: .4rem; margin: .5rem 0 1rem; }
.med-dossiers a { display: inline-flex; align-items: center; gap: .4rem; padding: .3rem .75rem; border: 1px solid var(--a-ligne); border-radius: 999px; background: var(--a-surface); color: var(--a-texte); text-decoration: none; font-size: .92rem; margin-left: calc(var(--niveau, 0) * .75rem); }
.med-dossiers a span { color: var(--a-doux); font-size: .8rem; }
.med-dossiers a[aria-current="true"] { border-color: var(--a-accent); background: color-mix(in srgb, var(--a-accent) 10%, var(--a-surface)); font-weight: 600; }
.media-carte__ouvrir { display: block; padding: 0; border: 0; background: none; cursor: zoom-in; text-align: inherit; font: inherit; color: inherit; }
.a-dialogue--apercu { width: min(92vw, 60rem); max-height: 92vh; display: grid; gap: .75rem; }
.media-apercu-grand { max-width: 100%; max-height: 68vh; margin: 0 auto; display: block; object-fit: contain; border-radius: 10px; background: var(--a-surface-2); }
.media-apercu-grand--page { width: 100%; height: 68vh; border: 0; }

/* ---------- Fiche « personne » : le même bloc sur la fiche de membre et sur la fiche de contact ---------- */
.p-fiche { border-left: 4px solid var(--a-accent); }
.p-fiche--archivee { border-left-color: var(--a-attention); }
.p-tete { display: flex; flex-wrap: wrap; align-items: center; gap: .4rem 1rem; justify-content: space-between; }
.p-tete h2 { margin: 0; overflow-wrap: anywhere; }
.p-badges { display: flex; flex-wrap: wrap; gap: .35rem; margin: 0; }
.p-fiche h3 { margin: 1.4rem 0 .5rem; font-size: 1.05rem; }
.p-archive { margin: .8rem 0; padding: .8rem 1rem; border-radius: 12px; background: color-mix(in srgb, var(--a-attention) 10%, var(--a-surface)); }
.p-liens { list-style: none; margin: 0; padding: 0; }
.p-liens li { display: grid; grid-template-columns: 9rem minmax(0, 1fr) auto; gap: .3rem 1rem; align-items: center; padding: .6rem 0; border-top: 1px solid var(--a-ligne); }
.p-liens__quoi { font-weight: 600; }
.p-liens__etat { overflow-wrap: anywhere; }
.p-liens__gestes { display: flex; flex-wrap: wrap; gap: .4rem; justify-content: flex-end; }
.p-liens__gestes:empty { display: none; }
.p-liens select { min-height: 36px; max-width: 100%; }
.p-filtres { display: flex; flex-wrap: wrap; gap: .4rem; margin-bottom: .8rem; }
.p-filtre { position: absolute; opacity: 0; pointer-events: none; }
.p-filtres label { display: inline-flex; align-items: center; min-height: 36px; padding: 0 .85rem; border: 1px solid var(--a-ligne); border-radius: 999px; cursor: pointer; font-size: .9rem; background: var(--a-surface); }
.p-filtre:checked + label { border-color: var(--a-accent); background: color-mix(in srgb, var(--a-accent) 12%, transparent); font-weight: 600; }
.p-filtre:focus-visible + label { outline: 2px solid var(--a-accent); outline-offset: 2px; }
.p-fil { list-style: none; margin: 0; padding: 0 .5rem 0 1rem; border-left: 2px solid var(--a-ligne); max-height: 28rem; overflow-y: auto; }
.p-fil li { position: relative; display: grid; gap: .05rem; padding: 0 0 .7rem .2rem; overflow-wrap: anywhere; }
.p-fil li::before { content: ""; position: absolute; left: calc(-1rem - 5px); top: .45rem; width: 8px; height: 8px; border-radius: 50%; background: var(--a-surface); border: 2px solid var(--a-accent); }
.p-fil__date { font-size: .8rem; color: var(--a-doux); }
.p-fil small { color: var(--a-doux); }
.p-accords { list-style: none; margin: 0 0 .5rem; padding: 0; }
.p-accords li { display: flex; flex-wrap: wrap; gap: .3rem 1rem; align-items: center; justify-content: space-between; padding: .45rem 0; border-top: 1px solid var(--a-ligne); }
.p-accords__public { margin: .5rem 0; }
.p-rgpd { margin-top: 1rem; padding-top: .8rem; border-top: 1px solid var(--a-ligne); }
@media (max-width: 640px) {
  .p-liens li { grid-template-columns: 1fr; }
  .p-liens__gestes { justify-content: flex-start; }
}
.p-histo:has(#p-f-message:checked) .p-fil li:not([data-type="message"]) { display: none; }
.p-histo:has(#p-f-rdv:checked) .p-fil li:not([data-type="rdv"]) { display: none; }
.p-histo:has(#p-f-heures:checked) .p-fil li:not([data-type="heures"]) { display: none; }
.p-histo:has(#p-f-vote:checked) .p-fil li:not([data-type="vote"]) { display: none; }
.p-histo:has(#p-f-signature:checked) .p-fil li:not([data-type="signature"]) { display: none; }
.p-histo:has(#p-f-adhesion:checked) .p-fil li:not([data-type="adhesion"]) { display: none; }
.p-histo:has(#p-f-don:checked) .p-fil li:not([data-type="don"]) { display: none; }
.p-histo:has(#p-f-reunion:checked) .p-fil li:not([data-type="reunion"]) { display: none; }
.p-histo:has(#p-f-pret:checked) .p-fil li:not([data-type="pret"]) { display: none; }
.p-histo:has(#p-f-commande:checked) .p-fil li:not([data-type="commande"]) { display: none; }
.p-histo:has(#p-f-formulaire:checked) .p-fil li:not([data-type="formulaire"]) { display: none; }
.p-histo:has(#p-f-mail:checked) .p-fil li:not([data-type="mail"]) { display: none; }
.p-histo:has(#p-f-accord:checked) .p-fil li:not([data-type="accord"]) { display: none; }
.p-histo:has(#p-f-compte:checked) .p-fil li:not([data-type="compte"]) { display: none; }

/* Guide de référencement page par page et services tiers (17/10/2026) */
.guide-ref__site { display: flex; gap: .9rem; align-items: center; margin: 0 0 1rem; }
.guide-ref__score { display: inline-grid; place-items: center; min-width: 2.6rem; height: 2.6rem; padding: 0 .4rem; border-radius: 999px; font-weight: 700; font-variant-numeric: tabular-nums; background: color-mix(in srgb, var(--a-attention) 14%, transparent); color: var(--a-attention); flex: none; }
.guide-ref__site .guide-ref__score { min-width: 4.2rem; height: 4.2rem; font-size: 1.5rem; }
.guide-ref__score small { font-size: .55em; font-weight: 500; }
.guide-ref__score--bon { background: color-mix(in srgb, var(--a-ok) 14%, transparent); color: var(--a-ok); }
.guide-ref__score--faible { background: color-mix(in srgb, var(--a-erreur) 12%, transparent); color: var(--a-erreur); }
.guide-ref__liste { list-style: none; margin: 0 0 1rem; padding: 0; display: grid; gap: .5rem; }
.guide-ref__liste > li { border: 1px solid var(--a-ligne); border-radius: var(--a-rayon); background: var(--a-surface); }
.guide-ref__liste summary { display: flex; align-items: center; gap: .7rem; padding: .7rem .9rem; cursor: pointer; min-height: 44px; flex-wrap: wrap; }
.guide-ref__liste summary strong { flex: 1 1 10rem; min-width: 0; overflow-wrap: anywhere; }
.guide-ref__nb { color: var(--a-doux); font-size: .9rem; }
.guide-ref__points { margin: 0; padding: 0 .9rem .4rem 2.2rem; display: grid; gap: .7rem; }
.guide-ref__points li { display: grid; grid-template-columns: auto 1fr auto; gap: .2rem .6rem; align-items: baseline; }
.guide-ref__poids { color: var(--a-doux); font-size: .85rem; font-variant-numeric: tabular-nums; }
.guide-ref__action { grid-column: 2 / -1; }
.guide-ref__pourquoi { grid-column: 2 / -1; color: var(--a-doux); font-size: .9rem; }
.guide-ref__points li.est-ok .guide-ref__pourquoi { display: none; }
.guide-ref__liens { padding: 0 .9rem .9rem; margin: 0; display: flex; gap: .5rem; flex-wrap: wrap; }
@media (max-width: 600px) { .guide-ref__points { padding-left: .9rem; } .guide-ref__points li { grid-template-columns: 1fr auto; } .guide-ref__points li > .badge { grid-column: 1 / -1; justify-self: start; } .guide-ref__action, .guide-ref__pourquoi { grid-column: 1 / -1; } }
.tiers__liste { list-style: none; margin: 0 0 1rem; padding: 0; display: grid; gap: .6rem; }
.tiers__liste li { display: grid; gap: .15rem; padding: .7rem .9rem; border: 1px solid var(--a-ligne); border-radius: var(--a-rayon); }
.tiers__liste .tiers__quand { color: var(--a-doux); font-size: .9rem; }
#assistant-etat form .bouton { white-space: normal; text-align: start; height: auto; min-height: 44px; }
.assistant-etat__texte { margin: 0 0 .8rem; color: var(--a-doux); font-size: .93rem; }
.assistant-etat__texte summary { cursor: pointer; min-height: 44px; display: flex; align-items: center; color: var(--a-texte); }

/* Rétractation reçue en ligne, sur la fiche de la commande (17/10/2026). */
.retractation-admin { border-left: 4px solid var(--a-accent); }
.retractation-admin__demande + .retractation-admin__demande { border-top: 1px solid var(--a-ligne); margin-top: 1rem; padding-top: 1rem; }
.retractation-admin .recap { display: grid; grid-template-columns: minmax(8rem, 25%) 1fr; gap: .35rem 1rem; margin: .75rem 0 1rem; }
.retractation-admin .recap dt { color: var(--a-doux); } .retractation-admin .recap dd { margin: 0; overflow-wrap: anywhere; }
.retractation-admin form.en-ligne { display: inline-block; margin: .5rem .5rem 0 0; }
@media (max-width: 40rem) { .retractation-admin .recap { grid-template-columns: 1fr; } .retractation-admin .recap dd { margin-bottom: .4rem; } }
/* Notification d'un message : « Répondre sur … » (la bonne messagerie), et glisser vers la gauche au doigt (18/10/2026) */
.a-panneau li.notif--chez { position: relative; display: grid; gap: 4px; transition: transform .18s ease-out; }
.a-panneau li .notif-chez { justify-self: start; font-size: .82rem; font-weight: 600; color: var(--a-accent, currentColor); text-decoration: underline; text-underline-offset: 2px; }
.a-panneau li.notif--prete { box-shadow: inset -4px 0 0 var(--a-accent, currentColor); }
@media (prefers-reduced-motion: reduce) { .a-panneau li.notif--chez { transition: none; } }

/* Aide › « Que voulez-vous faire ? » (18/10/2026, testeur permanent) : le champ prend la place, le bouton reste à côté */
[data-guide-recherche] .en-ligne { display: flex; gap: 8px; align-items: center; flex-wrap: nowrap; }
[data-guide-recherche] .en-ligne input { flex: 1 1 auto; min-width: 0; width: auto; }
[data-guide-recherche] .en-ligne button { flex: none; }
/* Choix d'un fichier (18/10/2026, testeur permanent) : le bouton du navigateur prend l'allure des boutons de l'espace */
.admin input[type="file"] { font: inherit; font-size: .9rem; color: var(--a-doux); max-width: 100%; }
.admin input[type="file"]::file-selector-button { font: inherit; font-weight: 600; margin-right: .75rem; padding: .5rem .9rem; border-radius: 10px; cursor: pointer;
  border: 1px solid var(--a-ligne); background: var(--a-surface); color: var(--a-accent); transition: background .15s, border-color .15s; }
.admin input[type="file"]::file-selector-button:hover { border-color: var(--a-accent); background: color-mix(in srgb, var(--a-accent) 6%, var(--a-surface)); }
@media (prefers-reduced-motion: reduce) { .admin input[type="file"]::file-selector-button { transition: none; } }
/* Téléphone (18/10/2026, testeur permanent) : dans un tableau qui défile, la colonne des boutons (Modifier, Réglages…) reste
   collée à droite, toujours à portée du pouce. */
@media (max-width: 700px) {
  .tableau td.actions, .tableau td:last-child:has(a.bouton, button, form) { position: sticky; right: 0; }
  .tableau td.actions, .tableau tr td:last-child:has(a.bouton, button, form) { background: var(--a-surface); box-shadow: -8px 0 10px -8px rgb(0 0 0 / .18); z-index: 1; }
}
.g-sig-autres { display: flex; flex-wrap: wrap; gap: .5rem; margin: .75rem 0 1rem; } .g-sig-autres form { margin: 0; } /* autres façons de confirmer pour signer (G31) */
.pr-regime { display: flex; flex-wrap: wrap; align-items: center; gap: .4rem; min-width: 0; max-width: 100%; font-size: .9rem; font-weight: 600; } .pr-regime select { flex: 1 1 14rem; width: auto; min-width: 0; max-width: 100%; text-overflow: ellipsis; } /* régime de TVA demandé sur place (défaut 44) */
.formulaire-admin fieldset { min-width: 0; } .formulaire-admin select { max-width: 100%; } .recu-champs__bloc { margin: .75rem 0; padding: .75rem 1rem; border: 1px solid var(--a-ligne); border-radius: var(--a-rayon); } /* reçu de don : rien ne déborde au téléphone (19/10/2026) */
/* Mes préférences › App OCSIA2 : « Renommer » un appareil (§ 14.12 point 7), ouvert sur place. */
.appareil-renommer { display: inline-block; vertical-align: middle; }
.appareil-renommer[open] { display: block; margin: .4rem 0 .6rem; }
.appareil-renommer > summary { list-style: none; display: inline-flex; }
.appareil-renommer > summary::-webkit-details-marker { display: none; }
.appareil-renommer form { display: flex; flex-wrap: wrap; gap: .4rem; align-items: center; margin: .3rem 0 0; }
.appareil-renommer input[name=nom] { flex: 1 1 12rem; width: auto; min-width: 0; max-width: 24rem; }

/* Compte OCSIA2 (lot L3, maquette 14 de 522ea932) : file à gauche, détail à droite à partir de 1000 px. */
.cpa-titre { font-family: var(--a-titres, inherit); font-size: 2rem; margin: .25rem 0; }
.cpa-titre2 { font-size: 1.35rem; margin: .25rem 0 .5rem; }
.cpa-doux { color: var(--a-doux); }
.cpa-avis { padding: .75rem 1rem; border-radius: 12px; background: color-mix(in srgb, var(--a-accent) 10%, transparent); }
.cpa-filtres { display: flex; flex-wrap: wrap; gap: .25rem; margin: 1rem 0; padding: .25rem; border-radius: 12px; background: color-mix(in srgb, var(--a-accent) 7%, transparent); width: fit-content; max-width: 100%; }
.cpa-filtres a { padding: .45rem .8rem; border-radius: 9px; text-decoration: none; color: inherit; min-height: 44px; display: inline-flex; align-items: center; gap: .35rem; }
.cpa-filtres a span { color: var(--a-doux); }
.cpa-filtres a[aria-current="true"] { background: var(--a-fond, Canvas); box-shadow: 0 1px 2px rgb(0 0 0 / .08); font-weight: 600; }
.cpa-deux { display: grid; gap: 1.5rem; align-items: start; }
@media (min-width: 1000px) { .cpa-deux { grid-template-columns: minmax(0, 1.25fr) minmax(0, 1fr); } .cpa-detail { position: sticky; top: 1rem; } }
.cpa-liste { list-style: none; margin: 0; padding: 0; }
.cpa-liste > li { border-bottom: 1px solid var(--a-ligne); }
.cpa-liste > li > a, .cpa-item { display: grid; gap: .2rem; padding: .85rem 1rem; color: inherit; text-decoration: none; border-radius: 12px; }
.cpa-liste > li > a:hover { background: color-mix(in srgb, var(--a-accent) 6%, transparent); }
.cpa-liste > li.cpa-choisi > a { background: color-mix(in srgb, var(--a-accent) 14%, transparent); }
.cpa-l1 { display: flex; gap: .5rem; align-items: baseline; font-size: .85rem; color: var(--a-doux); }
.cpa-l1 time { margin-left: auto; white-space: nowrap; }
.cpa-l2 { font-weight: 600; overflow-wrap: anywhere; }
.cpa-l3 { font-size: .9rem; color: var(--a-doux); }
.cpa-type { color: var(--a-accent-lisible); font-weight: 600; }
.cpa-type--signalement { color: #9a5b00; }
.cpa-vide { padding: 1rem; color: var(--a-doux); }
.cpa-detail, .cpa-carte { border: 1px solid var(--a-ligne); border-radius: 20px; padding: 1.25rem 1.5rem; background: var(--a-fond, Canvas); }
.cpa-form { display: grid; gap: .45rem; margin: .75rem 0; }
.cpa-form label { font-weight: 600; font-size: .9rem; }
.cpa-form input, .cpa-form select, .cpa-form textarea { min-height: 44px; }
.cpa-rangee { display: flex; flex-wrap: wrap; gap: .5rem; align-items: end; }
.cpa-moments { border: 0; padding: 0; margin: 0; display: grid; gap: .5rem; }
.cpa-moments legend { font-weight: 600; margin-bottom: .4rem; }
.cpa-moments label { display: flex; gap: .6rem; align-items: center; padding: .7rem .9rem; border: 1px solid var(--a-ligne); border-radius: 12px; font-weight: 600; min-height: 44px; }
.cpa-moments label:has(input:checked) { border: 2px solid var(--a-accent); }
.cpa-moments label .cpa-doux { margin-left: auto; font-weight: 400; }
.cpa-fil { list-style: none; padding: 0; display: grid; gap: .6rem; }
.cpa-fil li { padding: .7rem .9rem; border-radius: 14px; max-width: 85%; }
.cpa-fil p { margin: 0 0 .25rem; white-space: pre-wrap; overflow-wrap: anywhere; }
.cpa-fil time { font-size: .8rem; color: var(--a-doux); }
.cpa-de-membre { background: color-mix(in srgb, var(--a-ligne) 45%, transparent); }
.cpa-de-equipe { background: color-mix(in srgb, var(--a-accent) 12%, transparent); justify-self: end; }
