@import url("https://fonts.googleapis.com/css2?family=Inter:wght@400..800&display=swap");
/* MATIA'S — espace mairie et administration, aux couleurs ONDE : du bleu au violet.
   Mise en page : barre supérieure en dégradé, bandeau d'accueil, onglets par domaine, grille de fiches ;
   espace de fonction = dossiers à gauche + conversation au centre + panneau « Aide » repliable à droite. */
:root {
  /* palette ONDE */
  --onde-bleu: #437CBF; --onde-indigo: #5D54A4; --onde-indigo-fonce: #3B3577; --onde-violet: #9452A0;
  --degrade: linear-gradient(115deg, #2E5F9E 0%, #4D5AAE 45%, #7B4FA6 100%);
  --degrade-doux: linear-gradient(115deg, #DCE9F7 0%, #E7E4F6 55%, #F1E6F4 100%);
  --nuit: #26234F;
  --accent: #5D54A4; --accent-fort: #3B3577; --accent-texte: #4A4296; --accent-clair: #B9AEEB;
  --fond: #F5F4FA; --surface: #FFFFFF; --surface-2: #F8F7FC; --encre: #1E1B3A; --encre-2: #4E4B66; --encre-3: #625F7A;
  --trait: #E2E0EE; --trait-fort: #C9C5DD; --lavande: #EFEDF8; --bleu-pale: #DCE9F7; --violet-pale: #F1E6F4;
  --ok: #2F64A5; --ok-pale: #DCE9F7; --alerte: #A23A73; --alerte-pale: #F6E3EE;
  --t1: #2F64A5; --t1-pale: #DCE9F7; --t2: #4A4296; --t2-pale: #E7E4F6; --t3: #803F8C; --t3-pale: #F1E4F3;
  --ui: "Manrope", "Segoe UI", Arial, sans-serif; --doc: "Literata", Georgia, "Times New Roman", serif;
  --degrade-texte: linear-gradient(115deg, #2E5F9E 0%, #4D5AAE 45%, #7B4FA6 100%); --anneau: #7A3F88; --bleu-ui: #437CBF; --indigo-ui: #5D54A4; --violet-ui: #9452A0;
  --rayon: 14px; --ombre: 0 1px 2px rgba(38, 35, 79, .06), 0 6px 20px rgba(38, 35, 79, .06); --ombre-forte: 0 12px 40px rgba(38, 35, 79, .18);
}
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) {
  --degrade: linear-gradient(115deg, #1F3F6E 0%, #34307A 50%, #5A2F72 100%);
  --degrade-doux: linear-gradient(115deg, #17263C 0%, #1F1D3D 55%, #2A1C33 100%);
  --nuit: #15132E; --accent: #A79CF0; --accent-fort: #C4BBF7; --accent-texte: #B9AEF5; --accent-clair: #CFC6FA;
  --fond: #100F1F; --surface: #1A1930; --surface-2: #211F3A; --encre: #ECEAF7; --encre-2: #B5B1CC; --encre-3: #8D89A8;
  --trait: #2D2A4A; --trait-fort: #403C63; --lavande: #24213F; --bleu-pale: #1B2A41; --violet-pale: #2C1F38;
  --ok: #8DB4E6; --ok-pale: #1B2A41; --alerte: #E79AC4; --alerte-pale: #3A1F31;
  --t1: #8DB4E6; --t1-pale: #1B2A41; --t2: #B3AAF2; --t2-pale: #26234A; --t3: #D7A2E0; --t3-pale: #351F3D;
  --degrade-texte: linear-gradient(115deg, #8DB4E6 0%, #B3AAF2 50%, #D7A2E0 100%); --anneau: #CFC6FA; --bleu-ui: #8DB4E6; --indigo-ui: #B3AAF2; --violet-ui: #D7A2E0;
  --ombre: none; --ombre-forte: 0 12px 40px rgba(0, 0, 0, .5); color-scheme: dark } }
:root[data-theme="dark"] {
  --degrade: linear-gradient(115deg, #1F3F6E 0%, #34307A 50%, #5A2F72 100%);
  --degrade-doux: linear-gradient(115deg, #17263C 0%, #1F1D3D 55%, #2A1C33 100%);
  --nuit: #15132E; --accent: #A79CF0; --accent-fort: #C4BBF7; --accent-texte: #B9AEF5; --accent-clair: #CFC6FA;
  --fond: #100F1F; --surface: #1A1930; --surface-2: #211F3A; --encre: #ECEAF7; --encre-2: #B5B1CC; --encre-3: #8D89A8;
  --trait: #2D2A4A; --trait-fort: #403C63; --lavande: #24213F; --bleu-pale: #1B2A41; --violet-pale: #2C1F38;
  --ok: #8DB4E6; --ok-pale: #1B2A41; --alerte: #E79AC4; --alerte-pale: #3A1F31;
  --t1: #8DB4E6; --t1-pale: #1B2A41; --t2: #B3AAF2; --t2-pale: #26234A; --t3: #D7A2E0; --t3-pale: #351F3D;
  --degrade-texte: linear-gradient(115deg, #8DB4E6 0%, #B3AAF2 50%, #D7A2E0 100%); --anneau: #CFC6FA; --bleu-ui: #8DB4E6; --indigo-ui: #B3AAF2; --violet-ui: #D7A2E0;
  --ombre: none; --ombre-forte: 0 12px 40px rgba(0, 0, 0, .5); color-scheme: dark }

* { box-sizing: border-box }
html, body { height: 100% }
html { scroll-padding-top: calc(var(--haut-barre, 60px) + 72px) }
body { margin: 0; background: var(--fond); color: var(--encre); font-family: var(--ui); font-size: 15px; line-height: 1.5; -webkit-font-smoothing: antialiased }
button, input, select, textarea { font: inherit; color: inherit }
a { color: var(--accent-texte) }
:focus-visible { outline: 2px solid var(--anneau); outline-offset: 2px }
.barre :focus-visible, .heros :focus-visible, .tiroir-tete :focus-visible, .accueil-fonction .bande :focus-visible, .btn-degrade:focus-visible, .onglet[aria-selected="true"]:focus-visible { outline: 2px solid #fff; outline-offset: 2px; box-shadow: 0 0 0 4px #26234F }
.chargement { padding: 40px 16px; text-align: center; color: var(--encre-2) }
[hidden] { display: none !important }
.sr { position: absolute; left: 0; top: 0; width: 1px; height: 1px; margin: -1px; padding: 0; border: 0; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap }

/* ---------- barre supérieure ---------- */
.barre { position: sticky; top: 0; z-index: 20; background: var(--degrade); color: #fff; padding: 0 16px; padding-top: env(safe-area-inset-top, 0px); box-shadow: 0 2px 12px rgba(38, 35, 79, .18) }
.barre-in { max-width: 1320px; margin: 0 auto; height: 60px; display: flex; align-items: center; gap: 20px }
.logo { display: flex; align-items: baseline; gap: 10px; text-decoration: none; color: #fff; white-space: nowrap }
.logo b { font-weight: 800; font-size: 21px; letter-spacing: .02em } .logo b span { color: #E3DAFF }
.logo small { font-size: 11px; font-weight: 700; letter-spacing: .14em; text-transform: uppercase; color: #fff }
.qui { display: flex; align-items: center; gap: 10px; font-size: 13px; color: rgba(255, 255, 255, .8); white-space: nowrap; margin-left: auto; min-width: 0 }
.qui .commune { color: #fff; font-weight: 700 }
.avatar { width: 30px; height: 30px; border-radius: 50%; background: rgba(255, 255, 255, .2); display: inline-grid; place-items: center; font-weight: 800; font-size: 12px; color: #fff }
.btn-barre { background: rgba(255, 255, 255, .08); border: 1px solid rgba(255, 255, 255, .3); color: #fff; border-radius: 9px; padding: 6px 10px; cursor: pointer; font-size: 13px; font-weight: 600 }
.btn-barre:hover { background: rgba(255, 255, 255, .18) }
.btn-icone { display: inline-grid; place-items: center; width: 34px; height: 32px; padding: 0 }
.btn-icone .icone { width: 17px; height: 17px }
.groupe-radio { border: 0; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: 8px }
.groupe-radio legend { font-weight: 700; font-size: 14px; margin-bottom: 6px; padding: 0 }
.choix-radio { display: inline-flex; flex-direction: row; align-items: center; gap: 8px; border: 1px solid var(--trait-fort); border-radius: 10px; padding: 8px 12px; cursor: pointer; font-weight: 600; font-size: 14px }
.choix-radio:has(input:checked) { border-color: var(--accent); background: var(--lavande) }
.choix-radio input { accent-color: var(--accent); margin: 0 }
@media (max-width: 760px) {
  .qui .nom-u, .qui .avatar, .logo small { display: none }
  .barre-in { gap: 10px; height: 52px }
  .qui .commune { max-width: 38vw; overflow: hidden; text-overflow: ellipsis }
}

/* ---------- menu latéral (bureau) / barre d'onglets en bas (téléphone) ---------- */
.coque { display: grid; grid-template-columns: var(--larg-menu, 232px) minmax(0, 1fr); min-height: calc(100dvh - var(--haut-barre, 60px)) }
.coque.replie { --larg-menu: 72px }
.contenu { min-width: 0 }
.menu-lateral { position: sticky; top: var(--haut-barre, 60px); height: calc(100dvh - var(--haut-barre, 60px)); z-index: 15; background: var(--surface); border-right: 1px solid var(--trait); display: flex; flex-direction: column; gap: 8px; padding: 14px 10px; overflow-y: auto; overflow-x: hidden }
.menu-lateral ul { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 2px; flex: 1 }
.menu-lateral a { position: relative; display: flex; align-items: center; gap: 12px; padding: 10px 12px; border-radius: 11px; color: var(--encre-2); font-weight: 700; font-size: 14.5px; text-decoration: none; white-space: nowrap; transition: background .15s, color .15s }
.menu-lateral a .icone { width: 20px; height: 20px }
.menu-lateral a:hover { background: var(--surface-2); color: var(--encre) }
.menu-lateral a[aria-current="page"] { background: var(--lavande); color: var(--accent-texte) }
.menu-lateral a[aria-current="page"]::before { content: ""; position: absolute; left: -10px; top: 8px; bottom: 8px; width: 4px; border-radius: 0 4px 4px 0; background: var(--degrade) }
.menu-lateral .lib { overflow: hidden; text-overflow: ellipsis }
.menu-lateral .lib-court { display: none }
.compteur-menu { margin-left: auto; min-width: 22px; height: 20px; padding: 0 6px; border-radius: 999px; background: var(--indigo-ui); color: var(--surface); font-size: 11.5px; font-weight: 800; display: inline-grid; place-items: center; font-variant-numeric: tabular-nums }
.compteur-menu.urgent { background: var(--alerte); color: #fff }
.replier { display: flex; align-items: center; gap: 12px; border: 0; background: transparent; color: var(--encre-3); font-weight: 600; font-size: 13px; padding: 9px 12px; border-radius: 10px; cursor: pointer; white-space: nowrap }
.replier:hover { background: var(--surface-2); color: var(--encre) }
.replier .icone { width: 18px; height: 18px; transition: transform .2s }
.coque.replie .menu-lateral .lib { display: none }
.coque.replie .menu-lateral a, .coque.replie .replier { justify-content: center; padding-inline: 0 }
.coque.replie .replier .icone { transform: rotate(180deg) }
.coque.replie .compteur-menu { position: absolute; top: 3px; right: 6px; min-width: 18px; height: 17px; font-size: 10.5px; padding: 0 4px }
@media (max-width: 1100px) and (min-width: 761px) {
  .coque { --larg-menu: 72px }
  .coque .menu-lateral .lib { display: none }
  .coque .menu-lateral a { justify-content: center; padding-inline: 0 }
  .coque .compteur-menu { position: absolute; top: 3px; right: 6px; min-width: 18px; height: 17px; font-size: 10.5px; padding: 0 4px }
  .replier { display: none }
}
@media (max-width: 760px) {
  .coque, .coque.replie { grid-template-columns: minmax(0, 1fr) }
  .contenu { padding-bottom: calc(66px + env(safe-area-inset-bottom, 0px)) }
  .menu-lateral { position: fixed; top: auto; left: 0; right: 0; bottom: 0; height: auto; z-index: 35; border-right: 0; border-top: 1px solid var(--trait); padding: 4px 4px calc(4px + env(safe-area-inset-bottom, 0px)); box-shadow: 0 -4px 18px rgba(38, 35, 79, .08); overflow: visible }
  .menu-lateral ul { flex-direction: row; gap: 0 }
  .menu-lateral li { flex: 1 1 0; min-width: 0 }
  .menu-lateral a, .coque.replie .menu-lateral a { flex-direction: column; gap: 2px; padding: 6px 0; font-size: 10px; letter-spacing: -.01em; font-weight: 700; justify-content: center }
  .menu-lateral a .icone { width: 22px; height: 22px }
  .menu-lateral .lib, .coque.replie .menu-lateral .lib { display: block; max-width: 100% }
  .menu-lateral .lib-long { display: none } .menu-lateral .lib-court { display: inline }
  .menu-lateral a[aria-current="page"] { background: transparent }
  .menu-lateral a[aria-current="page"]::before { left: 28%; right: 28%; top: -4px; bottom: auto; width: auto; height: 3px; border-radius: 0 0 3px 3px }
  .compteur-menu, .coque.replie .compteur-menu { position: absolute; top: 1px; left: calc(50% + 4px); right: auto; margin: 0; min-width: 17px; height: 16px; font-size: 10px; padding: 0 4px }
  .replier { display: none }
}

.page { max-width: 1320px; margin: 0 auto; padding: 24px 16px 64px; display: flex; flex-direction: column; gap: 22px }
.bandeau-demo { background: var(--lavande); border: 1px solid var(--trait); color: var(--encre); border-radius: 12px; padding: 10px 14px; font-size: 13.5px }
.bandeau-demo b { color: var(--accent-texte) }
h1 { font-size: clamp(24px, 3.4vw, 32px); font-weight: 800; letter-spacing: -.015em; line-height: 1.15; margin: 0; text-wrap: balance }
h2 { font-size: 18px; font-weight: 800; margin: 0 }
.sous-titre { color: var(--encre-2); margin: 6px 0 0; max-width: 72ch }
.entete-page { display: flex; justify-content: space-between; align-items: flex-end; gap: 16px; flex-wrap: wrap }

/* ---------- boutons et champs ---------- */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; border: 1px solid var(--trait-fort); background: var(--surface); border-radius: 10px; padding: 9px 14px; font-weight: 700; font-size: 14px; cursor: pointer; text-decoration: none; color: var(--encre); white-space: nowrap; transition: background .15s, border-color .15s, box-shadow .15s }
.btn:hover { border-color: var(--accent) }
.btn-danger { background: transparent; border-color: var(--alerte); color: var(--alerte) }
.btn-danger:hover { background: var(--alerte-pale) }
.zone-sensible { border-left: 4px solid var(--alerte) }
.btn-plein { background: var(--onde-indigo); border-color: var(--onde-indigo); color: #fff }
.btn-plein:hover { background: var(--onde-indigo-fonce); border-color: var(--onde-indigo-fonce) }
.btn-degrade { background: var(--degrade); border: 0; color: #fff; box-shadow: 0 4px 14px rgba(93, 84, 164, .35) }
.btn-degrade:hover { box-shadow: 0 6px 20px rgba(93, 84, 164, .5) }
:root[data-theme="dark"] .btn-plein { background: #8E83E6; border-color: #8E83E6; color: #12102A }
:root[data-theme="dark"] .btn-plein:hover { background: #A79CF0; border-color: #A79CF0 }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) .btn-plein { background: #8E83E6; border-color: #8E83E6; color: #12102A } :root:not([data-theme="light"]) .btn-plein:hover { background: #A79CF0; border-color: #A79CF0 } }
.btn-discret { background: transparent; border-color: transparent; color: var(--encre-2); padding: 6px 8px; font-weight: 600 }
.btn-discret:hover { color: var(--encre); background: var(--lavande); border-color: transparent }
.btn[disabled] { opacity: .5; cursor: not-allowed }
.btn svg, .icone { width: 16px; height: 16px; flex: none }
label { font-weight: 700; font-size: 13px; color: var(--encre-2); display: flex; flex-direction: column; gap: 6px }
input[type=text], input[type=email], input[type=password], input[type=search], input[type=number], input[type=date], textarea, select {
  border: 1px solid var(--trait-fort); background: var(--surface); border-radius: 10px; padding: 10px 12px; font-size: 15px; font-weight: 500; width: 100%; min-width: 0 }
input:not([type=checkbox]):not([type=radio]):focus, textarea:focus, select:focus { border-color: var(--accent); outline: none; box-shadow: 0 0 0 3px rgba(93, 84, 164, .18) }
textarea { resize: vertical; line-height: 1.5 }
.erreur { color: var(--alerte); background: var(--alerte-pale); border-radius: 10px; padding: 10px 12px; font-size: 14px; font-weight: 600 }
.succes { color: var(--ok); background: var(--ok-pale); border-radius: 10px; padding: 10px 12px; font-size: 14px; font-weight: 600 }

/* ---------- connexion ---------- */
.connexion { min-height: 100%; display: grid; grid-template-columns: minmax(0, 1.1fr) minmax(0, 1fr); background: var(--surface) }
.connexion-gauche { background: var(--degrade); color: #fff; padding: 56px 48px; display: flex; flex-direction: column; justify-content: space-between; gap: 32px; position: relative; overflow: hidden }
.connexion-gauche::after { content: ""; position: absolute; right: -120px; bottom: -120px; width: 420px; height: 420px; border-radius: 50%; border: 60px solid rgba(255, 255, 255, .07); pointer-events: none }
.connexion-gauche .grand { font-size: clamp(30px, 4vw, 46px); font-weight: 800; line-height: 1.08; letter-spacing: -.02em; max-width: 15ch; margin: 0 }
.connexion-gauche .grand span { color: #E3DAFF }
.connexion-gauche p { color: rgba(255, 255, 255, .85); max-width: 46ch; margin: 0 }
.connexion-droite { padding: 56px 48px; display: flex; align-items: center; justify-content: center }
.connexion form { width: 100%; max-width: 380px; display: flex; flex-direction: column; gap: 16px }
@media (max-width: 820px) { .connexion { grid-template-columns: 1fr } .connexion-gauche { padding: 32px 20px } .connexion-droite { padding: 32px 20px } }

/* ---------- accueil mairie : bandeau ---------- */
.heros { background: var(--degrade); color: #fff; border-radius: 20px; padding: 26px 28px; display: grid; grid-template-columns: minmax(0, 1.3fr) minmax(0, 1fr); gap: 24px; position: relative; overflow: hidden }
.heros::after { content: ""; position: absolute; right: -80px; top: -80px; width: 280px; height: 280px; border-radius: 50%; border: 44px solid rgba(255, 255, 255, .035); pointer-events: none }
.heros h1 { color: #fff }
.heros p { color: rgba(255, 255, 255, .88); margin: 8px 0 0; max-width: 60ch }
.chiffres { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; align-content: start; position: relative; z-index: 1 }
.chiffre { background: rgba(255, 255, 255, .07); border: 1px solid rgba(255, 255, 255, .22); border-radius: 12px; padding: 10px 14px; display: flex; flex-direction: column; text-decoration: none; color: #fff }
a.chiffre:hover, button.chiffre:hover { background: rgba(255, 255, 255, .13) }
.chiffre b { font-size: 24px; font-weight: 800; font-variant-numeric: tabular-nums; line-height: 1.1 }
.chiffre span { font-size: 12.5px; color: #fff }
.reprendre { display: flex; flex-direction: column; gap: 8px; margin-top: 16px; position: relative; z-index: 1 }
.reprendre h2 { font-size: 13px; letter-spacing: .08em; text-transform: uppercase; color: #fff }
.puces-reprendre { display: flex; gap: 8px; flex-wrap: wrap }
.puce-dossier { display: inline-flex; flex-direction: column; gap: 1px; max-width: 260px; text-decoration: none; color: #fff; background: rgba(255, 255, 255, .07); border: 1px solid rgba(255, 255, 255, .24); border-radius: 10px; padding: 7px 11px }
.puce-dossier:hover { background: rgba(255, 255, 255, .14) }
.puce-dossier b { font-size: 13px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap }
.puce-dossier span { font-size: 12px; font-weight: 600; color: #fff; overflow: hidden; text-overflow: ellipsis; white-space: nowrap }
@media (max-width: 860px) { .heros { grid-template-columns: 1fr; padding: 20px } }
@media (max-width: 560px) {
  .heros { padding: 16px; gap: 14px; border-radius: 16px }
  .heros > div > p { display: none }
  .page { gap: 14px; padding-top: 14px }
  .bandeau-demo { font-size: 12.5px; padding: 8px 12px }
  .heros { gap: 10px }
  .reprendre { margin-top: 10px }
  .segments button { padding: 5px 9px }
  .heros h1 { font-size: 22px }
  .outils .compteur, .outils .legende-pt { display: none }
  .section-titre p { font-size: 12.5px }
  .domaine-bloc { gap: 8px }
  .outils input[type=search] { flex-basis: 100% }
  .chiffres { grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 6px }
  .chiffre { padding: 8px } .chiffre b { font-size: 18px } .chiffre span { font-size: 11px; line-height: 1.25 }
}

/* ---------- onglets par domaine ---------- */
.onglets-zone { position: sticky; top: var(--haut-barre, 60px); z-index: 10; background: var(--fond); padding-block: 6px; display: flex; align-items: center; gap: 6px; border-bottom: 1px solid var(--trait) }
@media (max-height: 700px) { .onglets-zone { position: static } }
.defiler { flex: none; width: 32px; height: 32px; border-radius: 50%; border: 1px solid var(--trait); background: var(--surface); color: var(--encre-2); cursor: pointer; font-size: 18px; line-height: 1; display: grid; place-items: center }
.defiler:hover { border-color: var(--accent); color: var(--encre) }
.defiler[disabled] { opacity: .35; cursor: default }
@media (pointer: coarse) { .defiler { display: none } }
.onglets { position: relative; display: flex; gap: 6px; flex-wrap: nowrap; overflow-x: auto; padding: 4px 4px 6px; scrollbar-width: thin; scroll-behavior: smooth; flex: 1; min-width: 0 }
@media (prefers-reduced-motion: reduce) { .onglets { scroll-behavior: auto } }
.onglet { display: inline-flex; align-items: center; gap: 7px; border: 1px solid var(--trait); background: var(--surface); color: var(--encre-2); border-radius: 999px; padding: 6px 12px; font-size: 13.5px; font-weight: 700; cursor: pointer; white-space: nowrap; transition: all .15s }
.onglet:hover { border-color: var(--accent); color: var(--encre) }
.onglet[aria-selected="true"] { background: var(--degrade); border-color: transparent; color: #fff; box-shadow: 0 3px 12px rgba(93, 84, 164, .3) }
.onglet .nb { font-size: 11.5px; font-weight: 800; background: var(--lavande); color: var(--accent-texte); border-radius: 999px; padding: 1px 7px; font-variant-numeric: tabular-nums }
.onglet[aria-selected="true"] .nb { background: rgba(255, 255, 255, .12); color: #fff }
.onglet .pt, .legende-pt i { width: 7px; height: 7px; border-radius: 50%; background: var(--violet-ui); flex: none; display: inline-block }
.legende-pt { display: inline-flex; align-items: center; gap: 6px; font-size: 12.5px; color: var(--encre-2) }
.onglet[aria-selected="true"] .pt { background: #fff }
.outils { display: flex; gap: 10px; flex-wrap: wrap; align-items: center }
.outils input[type=search] { flex: 1 1 260px; max-width: 440px }
.segments { display: inline-flex; background: var(--surface); border: 1px solid var(--trait); border-radius: 10px; padding: 3px; gap: 2px }
.segments button { border: 0; background: transparent; padding: 6px 12px; border-radius: 8px; font-size: 13px; font-weight: 700; color: var(--encre-2); cursor: pointer; white-space: nowrap }
.segments button[aria-pressed="true"] { background: var(--indigo-ui); color: var(--surface) }
.segments button[disabled] { opacity: .45; cursor: not-allowed }
.compteur { font-size: 13px; color: var(--encre-2); font-weight: 600; font-variant-numeric: tabular-nums; margin-left: auto }

/* ---------- fiches de fonctions ---------- */
.section-titre { display: flex; align-items: baseline; gap: 10px; flex-wrap: wrap }
.section-titre p { margin: 0; color: var(--encre-2); font-size: 14px }
.grille { display: grid; grid-template-columns: repeat(auto-fill, minmax(270px, 1fr)); gap: 14px }
.carte { position: relative; background: var(--surface); border: 1px solid var(--trait); border-radius: var(--rayon); padding: 16px 18px 14px; display: flex; flex-direction: column; gap: 8px; color: inherit; min-width: 0; box-shadow: var(--ombre); transition: border-color .15s, transform .15s, box-shadow .15s; overflow: hidden }
.carte.active::before { content: ""; position: absolute; inset: 0 0 auto 0; height: 4px; background: var(--degrade) }
.carte.active:hover { border-color: var(--accent); transform: translateY(-2px); box-shadow: var(--ombre-forte) }
.carte-tete { display: flex; justify-content: space-between; align-items: center; gap: 8px }
.carte .dom { font-size: 11.5px; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; color: var(--encre-3) }
.carte h3 { font-size: 16.5px; font-weight: 800; line-height: 1.25; margin: 0; text-wrap: balance }
.carte h3 a { color: inherit; text-decoration: none }
.carte h3 a::after { content: ""; position: absolute; inset: 0; z-index: 0 }
.carte p { margin: 0; color: var(--encre-2); font-size: 14px }
.carte .etiquettes { display: flex; gap: 6px; flex-wrap: wrap }
.etiquette { font-size: 11.5px; font-weight: 700; border-radius: 6px; padding: 2px 8px; background: var(--lavande); color: var(--accent-texte) }
.carte .pied { margin-top: auto; display: flex; justify-content: space-between; align-items: center; gap: 8px; padding-top: 8px; border-top: 1px dashed var(--trait); font-size: 13px; color: var(--encre-2) }
.carte .pied .btn, .carte .carte-tete .btn { position: relative; z-index: 1 }
.carte .ouvrir { color: var(--accent-texte); font-weight: 800 }
.carte.verrou { background: var(--surface-2); box-shadow: none; border-style: dashed }
.carte.verrou h3 { color: var(--encre-2) }
.carte.verrou:hover { border-color: var(--trait-fort) }
.cadenas { display: inline-flex; align-items: center; gap: 6px; font-size: 12.5px; font-weight: 700; color: var(--encre-3) }
.domaine-bloc { display: flex; flex-direction: column; gap: 12px }
.domaine-bloc h3.domaine { font-size: 14px; font-weight: 800; color: var(--encre-2); margin: 4px 0 0; display: flex; gap: 8px; align-items: center }
.domaine-bloc h3.domaine::before { content: ""; width: 18px; height: 3px; border-radius: 2px; background: var(--degrade) }
.vide { background: var(--surface); border: 1px dashed var(--trait-fort); border-radius: var(--rayon); padding: 28px; text-align: center; color: var(--encre-2) }
.niv { display: inline-block; font-size: 11.5px; font-weight: 800; padding: 2px 8px; border-radius: 6px; font-variant-numeric: tabular-nums; white-space: nowrap }
.niv-T1 { color: var(--t1); background: var(--t1-pale) } .niv-T2 { color: var(--t2); background: var(--t2-pale) } .niv-T3 { color: var(--t3); background: var(--t3-pale) }

/* ---------- panneau latéral de détail ---------- */
.voile { position: fixed; inset: 0; background: rgba(20, 18, 45, .45); z-index: 40; opacity: 0; transition: opacity .2s }
.voile.ouvert { opacity: 1 }
.tiroir { position: fixed; top: 0; right: 0; bottom: 0; width: min(520px, 100%); background: var(--surface); z-index: 41; box-shadow: var(--ombre-forte); display: flex; flex-direction: column; transform: translateX(100%); transition: transform .25s ease }
.tiroir.ouvert { transform: none }
@media (prefers-reduced-motion: reduce) { .tiroir, .voile { transition: none } .carte.active:hover { transform: none } }
.tiroir-tete { background: var(--degrade); color: #fff; padding: 20px 22px; padding-top: calc(20px + env(safe-area-inset-top, 0px)); display: flex; flex-direction: column; gap: 6px }
.tiroir-tete .haut { display: flex; justify-content: space-between; align-items: flex-start; gap: 12px }
.tiroir-tete h2 { font-size: 21px; color: #fff; text-wrap: balance }
.tiroir-tete .dom { font-size: 12px; letter-spacing: .08em; text-transform: uppercase; color: rgba(255, 255, 255, .8); font-weight: 700 }
.tiroir-tete p { margin: 0; color: rgba(255, 255, 255, .88) }
.fermer { background: rgba(255, 255, 255, .15); border: 0; color: #fff; width: 34px; height: 34px; border-radius: 10px; font-size: 20px; line-height: 1; cursor: pointer; flex: none }
.fermer:hover { background: rgba(255, 255, 255, .28) }
.tiroir-corps { padding: 20px 22px; overflow-y: auto; display: flex; flex-direction: column; gap: 18px; flex: 1 }
.tiroir-corps h3 { font-size: 13px; letter-spacing: .07em; text-transform: uppercase; color: var(--encre-3); margin: 0 0 8px; font-weight: 800 }
.tiroir-corps ul { margin: 0; padding-left: 20px; display: flex; flex-direction: column; gap: 4px; color: var(--encre-2) }
.bloc-cas { border: 1px solid var(--trait); border-radius: 12px; padding: 12px 14px; display: flex; flex-direction: column; gap: 6px; background: var(--surface-2) }
.bloc-cas b { font-size: 14.5px } .bloc-cas span { font-size: 13.5px; color: var(--encre-2) }
.etapes { list-style: none; padding: 0 !important; counter-reset: e; gap: 10px !important }
.etapes li { counter-increment: e; display: grid; grid-template-columns: 28px 1fr; gap: 10px; align-items: start; color: var(--encre) }
.etapes li::before { content: counter(e); width: 28px; height: 28px; border-radius: 50%; background: var(--lavande); color: var(--accent-texte); font-weight: 800; font-size: 13px; display: grid; place-items: center }
.tiroir-pied { border-top: 1px solid var(--trait); padding: 14px 22px; padding-bottom: calc(14px + env(safe-area-inset-bottom, 0px)); display: flex; gap: 8px; justify-content: flex-end; flex-wrap: wrap }

/* ---------- espace d'une fonction ---------- */
.espace { max-width: 1320px; margin: 0 auto; display: grid; grid-template-columns: 290px minmax(0, 1fr); height: calc(100dvh - var(--haut-barre, 60px)) }
.espace.avec-aide { grid-template-columns: 290px minmax(0, 1fr) 320px }
.dossiers { border-right: 1px solid var(--trait); background: var(--surface); display: flex; flex-direction: column; min-height: 0; min-width: 0 }
.dossiers-tete { padding: 16px; display: flex; flex-direction: column; gap: 12px; border-bottom: 1px solid var(--trait) }
.retour { font-size: 13px; font-weight: 700; color: var(--encre-2); text-decoration: none }
.retour:hover { color: var(--accent-texte) }
.dossiers-tete h2 { font-size: 16px; line-height: 1.25 }
.fonction-carte { background: var(--degrade-doux); border-radius: 12px; padding: 12px 14px; display: flex; flex-direction: column; gap: 4px }
.liste-dossiers { list-style: none; margin: 0; padding: 8px; overflow-y: auto; display: flex; flex-direction: column; gap: 2px; flex: 1 }
.liste-dossiers a { display: flex; flex-direction: column; gap: 2px; padding: 10px 12px; border-radius: 10px; text-decoration: none; color: var(--encre); border-left: 3px solid transparent }
.liste-dossiers a:hover { background: var(--surface-2) }
.liste-dossiers a[aria-current="page"] { background: var(--lavande); border-left-color: var(--violet-ui) }
.liste-dossiers .t { font-weight: 700; font-size: 14px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap }
.liste-dossiers .d { font-size: 12px; color: var(--encre-3) }
.liste-vide { padding: 14px 16px; color: var(--encre-3); font-size: 13.5px }
.filtre-dossiers { padding: 8px 8px 0 }
.filtre-dossiers input { padding: 7px 10px; font-size: 13.5px }
.conv { display: flex; flex-direction: column; min-height: 0; min-width: 0 }
.conv-tete { padding: 14px 24px; border-bottom: 1px solid var(--trait); display: flex; align-items: center; justify-content: space-between; gap: 12px; background: var(--fond) }
.conv-tete h1 { font-size: 18px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap }
.conv-tete .meta { font-size: 12.5px; color: var(--encre-3) }
.fil { flex: 1; overflow-y: auto; padding: 24px; display: flex; flex-direction: column; gap: 18px; scroll-behavior: smooth }
@media (prefers-reduced-motion: reduce) { .fil { scroll-behavior: auto } }
.accueil-fonction { max-width: 700px; width: 100%; margin: 8px auto; background: var(--surface); border: 1px solid var(--trait); border-radius: 18px; overflow: hidden; display: flex; flex-direction: column; box-shadow: var(--ombre) }
.accueil-fonction .bande { background: var(--degrade); color: #fff; padding: 18px 22px; display: flex; flex-direction: column; gap: 4px }
.accueil-fonction .bande h2 { color: #fff; font-size: 20px } .accueil-fonction .bande span { font-size: 12px; letter-spacing: .08em; text-transform: uppercase; font-weight: 700; color: rgba(255, 255, 255, .82) }
.accueil-fonction .bande p { margin: 0; color: rgba(255, 255, 255, .9) }
.accueil-fonction .corps { padding: 18px 22px 20px; display: flex; flex-direction: column; gap: 14px }
.accueil-fonction h3 { font-size: 13px; letter-spacing: .07em; text-transform: uppercase; color: var(--encre-3); margin: 0; font-weight: 800 }
.accueil-fonction section { display: flex; flex-direction: column; gap: 8px }
.etapes { list-style: none; counter-reset: etape; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 10px }
.etapes li { counter-increment: etape; display: grid; grid-template-columns: 28px 1fr; gap: 10px; align-items: start; font-size: 14.5px; line-height: 1.45; color: var(--encre-2) }
.etapes li::before { content: counter(etape); width: 26px; height: 26px; border-radius: 50%; background: var(--degrade); color: #fff; font-weight: 800; font-size: 13px; display: grid; place-items: center }
.etapes b { color: var(--encre) }
.exemples .icone { width: 14px; height: 14px; vertical-align: -2px }
.choix-cas { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 8px }
.choix-cas button { text-align: left; border: 1px solid var(--trait); background: var(--surface-2); border-radius: 12px; padding: 10px 12px; cursor: pointer; display: flex; flex-direction: column; gap: 2px; transition: border-color .15s, background .15s }
.choix-cas button:hover, .choix-cas button[aria-pressed="true"] { border-color: var(--accent); background: var(--lavande) }
.choix-cas b { font-size: 14px } .choix-cas span { font-size: 12.5px; color: var(--encre-2) }
.exemples { display: flex; gap: 8px; flex-wrap: wrap }
.exemples button { border: 1px dashed var(--trait-fort); background: transparent; border-radius: 999px; padding: 6px 12px; font-size: 13px; font-weight: 600; color: var(--encre-2); cursor: pointer }
.exemples button:hover { border-color: var(--accent); color: var(--accent-texte); background: var(--lavande) }
.msg { max-width: 820px; width: 100%; margin: 0 auto; display: flex; flex-direction: column; gap: 6px }
.msg .qui-msg { font-size: 12px; font-weight: 700; color: var(--encre-3); letter-spacing: .02em; display: flex; align-items: center; gap: 6px }
.msg-assistance .qui-msg::before { content: ""; width: 16px; height: 16px; border-radius: 5px; background: var(--degrade) }
.msg-agent { align-items: flex-end }
.msg-agent .bulle { background: var(--degrade); color: #fff; border-radius: 16px 16px 4px 16px; padding: 10px 14px; max-width: 85%; white-space: pre-wrap; overflow-wrap: anywhere; box-shadow: 0 3px 10px rgba(93, 84, 164, .25) }
.pieces { display: flex; gap: 6px; flex-wrap: wrap; justify-content: flex-end }
.piece { display: inline-flex; align-items: center; gap: 6px; font-size: 12.5px; font-weight: 600; background: var(--surface); border: 1px solid var(--trait); border-radius: 999px; padding: 3px 10px; color: var(--encre-2) }
.msg-assistance .doc { background: var(--surface); border: 1px solid var(--trait); border-radius: 4px 16px 16px 16px; padding: 16px 20px; font-family: var(--doc); font-size: 15.5px; line-height: 1.62; overflow-wrap: anywhere; box-shadow: var(--ombre) }
.msg-assistance .doc h2, .msg-assistance .doc h3, .msg-assistance .doc h4 { font-family: var(--ui); line-height: 1.25; margin: 14px 0 6px; text-wrap: balance }
.msg-assistance .doc h2 { font-size: 19px; color: var(--accent-texte) } .msg-assistance .doc h3 { font-size: 16.5px } .msg-assistance .doc h4 { font-size: 15px }
.msg-assistance .doc > :first-child { margin-top: 0 }
.msg-assistance .doc p { margin: 0 0 10px } .msg-assistance .doc ul, .msg-assistance .doc ol { margin: 0 0 10px; padding-left: 22px }
.msg-assistance .doc hr { border: 0; border-top: 1px solid var(--trait); margin: 12px 0 }
.msg-assistance .doc code { font-size: 13px; background: var(--surface-2); padding: 1px 5px; border-radius: 4px }
.msg-assistance.est-document .doc { border-top: 4px solid var(--indigo-ui) }
.msg-assistance.erreur-msg .doc { border-color: var(--alerte); background: var(--alerte-pale); font-family: var(--ui); font-size: 14.5px }
/* Projet de document : une « feuille » (aspect page imprimée), puis la relecture à cocher, puis les sources dépliables */
.feuille { background: var(--surface); border: 1px solid var(--trait); border-top: 5px solid var(--indigo-ui); border-radius: 6px; box-shadow: var(--ombre-forte); padding: clamp(18px, 4vw, 44px) clamp(18px, 5vw, 56px) }
.msg-assistance .feuille .doc { background: none; border: 0; border-radius: 0; padding: 0; box-shadow: none; font-size: 16px; line-height: 1.7 }
.msg-assistance.est-document .feuille .doc { border-top: 0 }
.feuille .doc h2 { font-size: 21px; text-align: center; margin-bottom: 18px }
.verif { border: 1px solid var(--trait-fort); border-left: 4px solid var(--violet-ui); background: var(--violet-pale); border-radius: 10px; padding: 12px 16px; display: flex; flex-direction: column; gap: 8px }
.verif.complet { border-left-color: var(--ok); background: var(--ok-pale) }
.verif-tete { display: flex; justify-content: space-between; align-items: center; gap: 10px; flex-wrap: wrap }
.verif-tete b { font-size: 14.5px }
.verif-compte { font-size: 12.5px; font-weight: 800; color: var(--encre); background: var(--surface); border: 1px solid var(--trait); border-radius: 999px; padding: 2px 10px }
.verif.complet .verif-compte::before { content: "✓ " }
.verif ul { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 4px }
.verif label { display: flex; flex-direction: row; font-weight: 500; color: var(--encre); gap: 10px; align-items: flex-start; cursor: pointer; padding: 6px 8px; border-radius: 8px; font-size: 14.5px; line-height: 1.45 }
.verif label:hover { background: var(--surface) }
.verif input[type="checkbox"] { width: 18px; height: 18px; margin: 2px 0 0; flex: none; accent-color: var(--accent) }
.verif input:checked + span { color: var(--encre-2) }
.verif .petit { margin: 0 }
.sources { border: 1px solid var(--trait); border-radius: 10px; background: var(--surface-2); padding: 0 14px }
.sources summary { cursor: pointer; font-weight: 700; font-size: 14px; padding: 10px 0; color: var(--accent-texte) }
.sources[open] { padding-bottom: 10px }
.msg-assistance .sources .doc { background: none; border: 0; padding: 0; box-shadow: none; font-family: var(--ui); font-size: 13.5px; line-height: 1.5 }
.sources .doc a { overflow-wrap: anywhere }
.sources .petit { margin: 6px 0 0 }
.actions-msg { display: flex; gap: 4px; flex-wrap: wrap; align-items: center }
.badge-projet { font-size: 11.5px; font-weight: 800; color: var(--accent-texte); background: var(--lavande); border-radius: 6px; padding: 2px 8px }
.statut { font-size: 13px; color: var(--encre-3); display: flex; align-items: center; gap: 8px }
.points { display: inline-flex; gap: 4px } .points i { width: 7px; height: 7px; border-radius: 50%; background: var(--violet-ui); animation: rebond 1s infinite ease-in-out }
.points i:nth-child(2) { animation-delay: .15s; background: var(--indigo-ui) } .points i:nth-child(3) { animation-delay: .3s; background: var(--bleu-ui) }
@keyframes rebond { 0%, 80%, 100% { opacity: .3; transform: scale(.8) } 40% { opacity: 1; transform: scale(1) } }
@media (prefers-reduced-motion: reduce) { .points i { animation: none; opacity: .7 } }
.saisie { border-top: 1px solid var(--trait); padding: 14px 24px 16px; background: var(--fond) }
.saisie form { max-width: 820px; margin: 0 auto; display: flex; flex-direction: column; gap: 8px }
.zone { background: var(--surface); border: 1px solid var(--trait-fort); border-radius: 16px; padding: 8px; display: flex; flex-direction: column; gap: 6px; transition: border-color .15s, box-shadow .15s }
.zone:focus-within { border-color: var(--accent); box-shadow: 0 0 0 3px rgba(93, 84, 164, .15) }
.zone.survol { border-color: var(--violet-ui); background: var(--violet-pale) }
.zone textarea { border: 0; padding: 6px 8px; min-height: 52px; max-height: 260px; background: transparent; resize: none; box-shadow: none }
.zone textarea:focus { outline: none; box-shadow: none }
.zone-bas { display: flex; justify-content: space-between; align-items: center; gap: 8px; flex-wrap: wrap }
.jointes { display: flex; gap: 6px; flex-wrap: wrap }
.jointes .piece button { border: 0; background: transparent; cursor: pointer; color: var(--encre-3); padding: 0; font-size: 15px; line-height: 1; min-width: 24px; min-height: 24px; display: inline-grid; place-items: center; border-radius: 50% }
.jointes .piece button:hover, .jointes .piece button:focus-visible { background: var(--lavande); color: var(--encre) }
.mention { font-size: 12px; color: var(--encre-3); text-align: center; margin: 0 }
.aide { border-left: 1px solid var(--trait); background: var(--surface); overflow-y: auto; padding: 18px; display: flex; flex-direction: column; gap: 16px }
.aide h3 { font-size: 12.5px; letter-spacing: .07em; text-transform: uppercase; color: var(--encre-3); margin: 0 0 6px; font-weight: 800 }
.aide ul { margin: 0; padding-left: 18px; color: var(--encre-2); font-size: 13.5px; display: flex; flex-direction: column; gap: 4px }
.aide .regle { background: var(--degrade-doux); border-radius: 12px; padding: 12px 14px; font-size: 13.5px; color: var(--encre) }
@media (max-width: 1180px) { .espace.avec-aide { grid-template-columns: 290px minmax(0, 1fr) } .espace.avec-aide .aide { position: fixed; top: var(--haut-barre, 60px); right: 0; bottom: 0; width: min(340px, 100%); z-index: 30; box-shadow: var(--ombre-forte) } }
@media (max-width: 860px) {
  .espace, .espace.avec-aide { grid-template-columns: minmax(0, 1fr); height: auto; min-height: calc(100dvh - var(--haut-barre, 60px)) }
  .dossiers { border-right: 0; border-bottom: 1px solid var(--trait) }
  .liste-dossiers { max-height: 180px }
  .fil { padding: 16px; min-height: 50vh } .conv-tete, .saisie { padding-left: 16px; padding-right: 16px }
}

/* ---------- documents de la commune ---------- */
.tableau { width: 100%; border-collapse: collapse; background: var(--surface); border: 1px solid var(--trait); border-radius: var(--rayon); overflow: hidden; font-size: 14px }
.tableau th { text-align: left; font-size: 12px; letter-spacing: .05em; text-transform: uppercase; color: var(--encre-3); font-weight: 700; padding: 10px 14px; background: var(--surface-2); border-bottom: 1px solid var(--trait) }
.tableau td { padding: 10px 14px; border-bottom: 1px solid var(--trait); vertical-align: middle }
.tableau tr:last-child td { border-bottom: 0 }
.tableau tbody tr:hover td { background: var(--surface-2) }
.tableau .num { text-align: right; font-variant-numeric: tabular-nums; white-space: nowrap }
.defile { position: relative; overflow-x: auto; border-radius: var(--rayon) }
.depot { border: 2px dashed var(--trait-fort); border-radius: var(--rayon); padding: 24px; text-align: center; color: var(--encre-2); background: var(--surface); transition: all .15s }
.depot.survol { border-color: var(--violet-ui); background: var(--violet-pale) }
/* Documents attendus de la mairie (page Documents, D22-2) */
.attendus { background: var(--surface); border: 1px solid var(--trait); border-left: 4px solid var(--violet-ui); border-radius: var(--rayon); padding: 16px 18px; margin-bottom: 8px; box-shadow: var(--ombre) }
.attendus h2 { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; margin: 0 }
.attendus h3 { font-size: 14px; margin: 14px 0 6px }
.attendus ul { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 6px }
.attendus label { display: flex; align-items: flex-start; gap: 8px; cursor: pointer }
.attendus input[type="checkbox"] { margin-top: 3px; flex: none }
.attendus .sources { margin-top: 14px }
.attendus .sources ul { list-style: disc; padding-left: 20px; gap: 2px }
.conseils-docs { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 10px }
.conseils-docs div { background: var(--surface); border: 1px solid var(--trait); border-radius: 12px; padding: 12px 14px; font-size: 13.5px; color: var(--encre-2) }
.conseils-docs b { display: block; color: var(--encre); font-size: 14px; margin-bottom: 2px }

/* ---------- administration ---------- */
.kpis { display: grid; grid-template-columns: repeat(auto-fit, minmax(190px, 1fr)); gap: 12px }
.kpi { background: var(--surface); border: 1px solid var(--trait); border-radius: var(--rayon); padding: 14px 16px; display: flex; flex-direction: column; gap: 2px; position: relative; overflow: hidden }
.kpi::before { content: ""; position: absolute; inset: 0 auto 0 0; width: 4px; background: var(--degrade) }
.kpi span { font-size: 12px; font-weight: 700; letter-spacing: .05em; text-transform: uppercase; color: var(--encre-3) }
.kpi b { font-size: 24px; font-weight: 800; font-variant-numeric: tabular-nums }
.kpi small { color: var(--encre-2); font-size: 12.5px }
.jauge { height: 6px; border-radius: 3px; background: var(--lavande); overflow: hidden; min-width: 80px }
.jauge i { display: block; height: 100%; background: var(--degrade-texte); border-radius: 3px }
.pastille { display: inline-block; font-size: 12px; font-weight: 700; border-radius: 999px; padding: 2px 9px }
.pastille.ok { color: var(--ok); background: var(--ok-pale) } .pastille.off { color: var(--alerte); background: var(--alerte-pale) } .pastille.att { color: var(--t3); background: var(--t3-pale) }
.colonnes { display: grid; grid-template-columns: minmax(0, 1.5fr) minmax(0, 1fr); gap: 20px; align-items: start }
@media (max-width: 980px) { .colonnes { grid-template-columns: 1fr } }
.panneau { background: var(--surface); border: 1px solid var(--trait); border-radius: var(--rayon); padding: 18px 20px; display: flex; flex-direction: column; gap: 14px; min-width: 0 }
.panneau-tete { display: flex; justify-content: space-between; align-items: center; gap: 10px; flex-wrap: wrap }
.formulaire { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 12px }
.formulaire .large { grid-column: 1 / -1 }
.abo-domaine { border-top: 1px solid var(--trait); padding-top: 10px; display: flex; flex-direction: column; gap: 4px }
.abo-domaine:first-of-type { border-top: 0; padding-top: 0 }
.abo-domaine h4 { margin: 0 0 4px; font-size: 13px; font-weight: 800; color: var(--encre-2); display: flex; justify-content: space-between; align-items: center; gap: 8px }
.abo-domaine h4 .btn { font-size: 12px; padding: 3px 8px }
.abo-ligne { display: flex; align-items: center; gap: 10px; padding: 5px 6px; border-radius: 8px; font-size: 14px; font-weight: 500; color: var(--encre); cursor: pointer; flex-direction: row }
.abo-ligne:hover { background: var(--surface-2) }
.abo-ligne input { width: 16px; height: 16px; accent-color: var(--indigo-ui); flex: none }
.abo-ligne .t { flex: 1; min-width: 0 }
.tarif { position: sticky; top: 76px; display: flex; flex-direction: column; gap: 10px }
.tarif .ligne { display: flex; justify-content: space-between; gap: 10px; font-variant-numeric: tabular-nums; font-size: 14px }
.tarif .ligne b { font-weight: 800 }
.tarif .total { font-size: 22px; font-weight: 800; background: var(--degrade-texte); -webkit-background-clip: text; background-clip: text; color: transparent }
.repartition { display: flex; height: 10px; border-radius: 5px; overflow: hidden; background: var(--lavande) }
.repartition i { display: block; height: 100% }
.legende { display: flex; gap: 12px; flex-wrap: wrap; font-size: 12.5px; color: var(--encre-2) }
.legende span { display: inline-flex; align-items: center; gap: 5px } .legende i { width: 10px; height: 10px; border-radius: 3px; display: inline-block }
.mdp-provisoire { font-family: ui-monospace, Consolas, monospace; font-size: 18px; font-weight: 700; letter-spacing: .04em; background: var(--surface-2); border: 1px solid var(--trait); border-radius: 8px; padding: 8px 12px; user-select: all }
.petit { font-size: 12.5px; color: var(--encre-3) }
.ligne-actions { display: flex; gap: 8px; flex-wrap: wrap; align-items: center }

/* ---------- messages éphémères (pile) ---------- */
.toasts { position: fixed; left: 16px; right: 16px; bottom: calc(16px + env(safe-area-inset-bottom, 0px)); z-index: 60; max-width: 540px; margin: 0 auto; display: flex; flex-direction: column; gap: 8px; pointer-events: none }
.toasts > div { pointer-events: auto; box-shadow: var(--ombre-forte); display: flex; gap: 10px; align-items: flex-start; justify-content: space-between }
.toasts button { border: 0; background: transparent; color: inherit; font-size: 18px; line-height: 1; cursor: pointer; min-width: 24px; min-height: 24px; border-radius: 6px }
.alerte-fil { max-width: 820px; width: 100%; margin: 0 auto }
.indice-recherche { font-size: 13px; color: var(--encre-2); margin: 0 }
.outils-ligne { display: flex; gap: 10px; flex-wrap: wrap; align-items: center }

/* ---------- courrier de la mairie ---------- */
.liste-courrier { display: flex; flex-direction: column; gap: 12px }
.courrier { background: var(--surface); border: 1px solid var(--trait); border-radius: var(--rayon); padding: 14px 18px; display: flex; flex-direction: column; gap: 8px; box-shadow: var(--ombre); min-width: 0 }
.courrier-tete { display: flex; justify-content: space-between; gap: 10px; flex-wrap: wrap; font-size: 14px }
.courrier h3 { font-size: 16.5px; font-weight: 800; margin: 0; overflow-wrap: anywhere }
.courrier .resume { margin: 0; color: var(--encre-2); font-size: 14px }
.courrier select { padding: 8px 10px; font-size: 14px }
.texte-mail { white-space: pre-wrap; overflow-wrap: anywhere; font-family: var(--doc); font-size: 14.5px; background: var(--surface-2); border: 1px solid var(--trait); border-radius: 10px; padding: 12px 14px; margin-top: 8px; max-height: 360px; overflow-y: auto }

/* ---------- version épurée ---------- */
.heros-simple { display: flex; flex-direction: column; gap: 14px; padding: 22px 24px }
.heros-simple .puces-reprendre { position: relative; z-index: 1 }
/* page « Textes officiels » */
.recherche-textes { display: grid; grid-template-columns: 1fr minmax(180px, 280px) auto; gap: 8px; align-items: center }
@media (max-width: 760px) { .recherche-textes { grid-template-columns: 1fr } }
.liste-articles { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 8px }
.liste-articles button { width: 100%; text-align: left; background: var(--surface); border: 1px solid var(--trait); border-radius: 12px; padding: 12px 14px; cursor: pointer; display: flex; flex-direction: column; gap: 4px; color: var(--encre); font: inherit }
.liste-articles button:hover, .liste-articles button:focus-visible { border-color: var(--accent); background: var(--surface-2) }
.liste-articles .haut { display: flex; justify-content: space-between; gap: 10px; flex-wrap: wrap }
.liste-articles .plan { font-size: 12.5px; color: var(--encre-3) }
.liste-articles .extrait { font-family: var(--doc); font-size: 14.5px; line-height: 1.5; color: var(--encre-2) }
.liste-articles mark, .doc-article mark { background: var(--violet-pale); color: inherit; border-radius: 3px; padding: 0 2px }
.doc-article .doc { font-family: var(--doc); font-size: 15.5px; line-height: 1.65 }
.doc-article .doc ul { padding-left: 20px; font-family: var(--ui); font-size: 13px; color: var(--encre-3) }
/* recherche dans les dossiers (dans le bandeau) et projets à relire */
.recherche-dossiers { position: relative; z-index: 3; max-width: 640px }
.recherche-dossiers input { width: 100%; border-radius: 12px; border: 1px solid rgba(255, 255, 255, .35); background: rgba(255, 255, 255, .95); color: #1E1B3A; padding: 10px 14px }
.recherche-dossiers input::placeholder { color: #625F7A }
.resultats-dossiers { margin: 6px 0 0; padding: 6px; list-style: none; background: var(--surface); color: var(--encre); border: 1px solid var(--trait); border-radius: 12px; box-shadow: var(--ombre-forte); max-height: 60vh; overflow-y: auto }
.resultats-dossiers a { display: flex; flex-direction: column; gap: 2px; padding: 8px 10px; border-radius: 8px; text-decoration: none; color: var(--encre) }
.resultats-dossiers a:hover, .resultats-dossiers a:focus-visible { background: var(--lavande) }
.resultats-dossiers span { font-size: 12.5px; color: var(--encre-3) } .resultats-dossiers small { font-size: 12.5px; color: var(--encre-2) }
.resultats-dossiers mark { background: var(--violet-pale); color: inherit; border-radius: 3px; padding: 0 2px }
.a-relire { background: var(--surface); border: 1px solid var(--trait); border-left: 4px solid var(--violet-ui); border-radius: var(--rayon); padding: 16px 18px; display: flex; flex-direction: column; gap: 10px; box-shadow: var(--ombre) }
.a-relire h2 { display: flex; align-items: center; gap: 8px }
.compte-titre { font-size: 12.5px; font-weight: 800; background: var(--violet-pale); color: var(--encre); border-radius: 999px; padding: 1px 9px }
.a-relire ul { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 2px }
.a-relire a { display: flex; justify-content: space-between; align-items: center; gap: 12px; padding: 8px 10px; border-radius: 10px; text-decoration: none; color: var(--encre) }
.a-relire a:hover, .a-relire a:focus-visible { background: var(--lavande) }
.a-relire .t { display: flex; flex-direction: column; min-width: 0 } .a-relire .t b { overflow: hidden; text-overflow: ellipsis; white-space: nowrap } .a-relire .t span { font-size: 12.5px; color: var(--encre-3) }
.a-relire .verif-compte { flex: none }
.puce-courrier { background: rgba(255, 255, 255, .16) !important }
.carte .ligne { display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden }
.carte .pied { border-top: 0; padding-top: 2px; min-height: 30px }
.info { position: relative; z-index: 1; border: 0; background: transparent; color: var(--encre-3); width: 30px; height: 30px; border-radius: 50%; display: inline-grid; place-items: center; cursor: pointer; margin-left: auto }
.info:hover, .info:focus-visible { background: var(--lavande); color: var(--accent-texte) }
.info .icone { width: 18px; height: 18px }
.domaine-bloc > h2 { font-size: 17px }
.menu-actions { position: relative; display: inline-block }
.menu-actions > summary { list-style: none; cursor: pointer }
.menu-actions > summary::-webkit-details-marker { display: none }
.menu-actions .menu { position: absolute; right: 0; top: calc(100% + 4px); z-index: 15; background: var(--surface); border: 1px solid var(--trait); border-radius: 12px; box-shadow: var(--ombre-forte); padding: 6px; display: flex; flex-direction: column; min-width: 160px }
.actions-msg .menu-actions .menu { left: 0; right: auto; top: auto; bottom: calc(100% + 4px) }
.menu-actions .menu .btn { justify-content: flex-start }
.autre-fonction { display: inline-flex; gap: 8px; align-items: center; flex-wrap: wrap }
.autre-fonction > summary { list-style: none; display: inline-flex }
.autre-fonction > summary::-webkit-details-marker { display: none }
.autre-fonction[open] > summary .lib-ouvrir, .autre-fonction:not([open]) > summary .lib-fermer { display: none }
.lien { border: 0; background: transparent; padding: 0; color: var(--accent-texte); text-decoration: underline; cursor: pointer; font-size: 12.5px; font-weight: 600 }

/* ---------- épuration, seconde passe ---------- */
.onglets-zone #cherche { flex: 0 1 240px; min-width: 120px; padding: 7px 12px; font-size: 14px }
.liste-autres { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 6px 24px }
.liste-autres ul { list-style: none; margin: 4px 0 10px; padding: 0; display: flex; flex-direction: column }
.ligne-autre { width: 100%; text-align: left; border: 0; background: transparent; padding: 7px 8px; border-radius: 8px; font-size: 14px; font-weight: 600; color: var(--encre-2); cursor: pointer }
.ligne-autre:hover, .ligne-autre:focus-visible { background: var(--lavande); color: var(--encre) }
.accueil-vide { max-width: 560px; margin: 24px auto; text-align: center; color: var(--encre-3); font-size: 15px }
.accueil-fonction .corps h3 { margin: 0 0 8px }
@media (max-width: 560px) {
  .heros-simple .puces-reprendre { flex-wrap: nowrap; overflow-x: auto; scrollbar-width: none }
  .heros-simple .puce-dossier { flex: none; max-width: 70vw }
  .onglets-zone { flex-wrap: wrap }
  .onglets-zone #cherche { flex: 1 1 100%; order: 3 }
  .conv-tete { flex-wrap: wrap }
  .conv-tete:has(#f-titre) #tete-titre { flex: 1 1 100% }
}
.bouton-installer { position: fixed; right: 16px; bottom: 16px; z-index: 30; box-shadow: 0 4px 16px rgba(38, 35, 79, .25) }
@media (display-mode: standalone) { .bouton-installer { display: none } }
/* au-dessus de la barre d'onglets du bas, sur téléphone */
@media (max-width: 760px) { .toasts, .bouton-installer { bottom: calc(76px + env(safe-area-inset-bottom, 0px)) } }

/* ---------- statuts des dossiers ---------- */
.statut-dossier { display: inline-block; font-size: 11px; font-weight: 800; letter-spacing: .02em; border-radius: 6px; padding: 1px 7px; white-space: nowrap }
.st-en_cours { color: var(--encre-2); background: var(--lavande) }
.st-a_relire { color: var(--t3); background: var(--t3-pale) }
.st-valide { color: var(--t1); background: var(--t1-pale) }
.st-envoye { color: var(--surface); background: var(--indigo-ui) }
.liste-dossiers .d { display: flex; align-items: center; gap: 6px; flex-wrap: wrap }
.liste-dossiers .d .maj { margin-left: auto }
.filtre-statut { display: flex; gap: 4px; flex-wrap: wrap; padding: 8px 8px 0 }
.filtre-statut button { border: 1px solid var(--trait); background: var(--surface); color: var(--encre-2); border-radius: 999px; padding: 3px 10px; font-size: 12.5px; font-weight: 700; cursor: pointer }
.filtre-statut button span { font-variant-numeric: tabular-nums; color: var(--encre-3); font-weight: 600 }
.filtre-statut button:hover { border-color: var(--accent) }
.filtre-statut button[aria-pressed="true"] { background: var(--indigo-ui); border-color: transparent; color: var(--surface) }
.filtre-statut button[aria-pressed="true"] span { color: inherit }
.choix-statut { display: inline-flex; flex-direction: row; position: relative; border-radius: 999px }
.choix-statut select { width: auto; border-radius: 999px; padding: 6px 30px 6px 12px; font-size: 13px; font-weight: 800; border: 1px solid transparent; background-color: inherit; color: inherit; cursor: pointer; appearance: none; -webkit-appearance: none;
  background-image: linear-gradient(45deg, transparent 50%, currentColor 50%), linear-gradient(135deg, currentColor 50%, transparent 50%); background-position: calc(100% - 15px) 52%, calc(100% - 10px) 52%; background-size: 5px 5px; background-repeat: no-repeat }
.choix-statut.st-en_cours select { border-color: var(--trait-fort) }
.choix-statut select option { color: var(--encre); background: var(--surface) }

/* ---------- échéances ---------- */
.duo { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 380px), 1fr)); gap: 16px; align-items: start }
.lien-titre { margin-left: auto; font-size: 13px; font-weight: 700; text-decoration: none }
.lien-titre:hover { text-decoration: underline }
.bloc-echeances { border-left-color: var(--indigo-ui) }
.ech { display: flex; align-items: center; gap: 6px }
.ech > a { flex: 1; min-width: 0; justify-content: flex-start !important }
.ech .t b, .ech .t span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap }
.ech-date { flex: none; width: 92px; display: flex; flex-direction: column; align-items: flex-start; border-radius: 9px; padding: 4px 9px; background: var(--lavande); line-height: 1.25 }
.ech-date b { font-size: 13.5px; color: var(--encre) } .ech-date small { font-size: 11px; font-weight: 700; color: var(--encre-2) }
.ech-proche .ech-date { background: var(--t3-pale) } .ech-proche .ech-date small { color: var(--t3) }
.ech-retard .ech-date { background: var(--alerte-pale) } .ech-retard .ech-date small, .ech-retard .ech-date b { color: var(--alerte) }
.ech-case { flex: none; display: inline-grid; place-items: center; width: 34px; height: 34px; border-radius: 8px; cursor: pointer }
.ech-case:hover { background: var(--lavande) }
.ech-case input { width: 18px; height: 18px; accent-color: var(--accent); margin: 0 }
.mini-ech { display: inline-flex; align-items: center; gap: 3px; font-size: 11px; font-weight: 800; border-radius: 6px; padding: 1px 6px; background: var(--lavande); color: var(--encre-2); white-space: nowrap }
.mini-ech .icone { width: 12px; height: 12px }
.mini-ech.ech-proche { background: var(--t3-pale); color: var(--t3) } .mini-ech.ech-retard { background: var(--alerte-pale); color: var(--alerte) }
.liste-faites { list-style: none; margin: 0 0 4px; padding: 0; display: flex; flex-direction: column; gap: 2px; font-size: 13.5px }
.liste-faites label { flex-direction: row; align-items: center; gap: 8px; font-weight: 500; color: var(--encre-2); padding: 4px 0 }
.liste-faites input { accent-color: var(--accent) }
.page .vide .icone { width: 28px; height: 28px; color: var(--accent-texte) }
/* bande d'échéances d'un dossier, sous l'en-tête */
.bande-echeances { border-bottom: 1px solid var(--trait); background: var(--surface-2); padding: 8px 24px }
.ech-ligne { display: flex; align-items: center; gap: 8px; flex-wrap: wrap }
.ech-titre { display: inline-flex; align-items: center; gap: 6px; font-size: 12.5px; font-weight: 800; letter-spacing: .05em; text-transform: uppercase; color: var(--encre-3) }
.puce-ech { display: inline-flex; align-items: center; gap: 6px; font-size: 13px; background: var(--surface); border: 1px solid var(--trait); border-radius: 999px; padding: 2px 4px 2px 11px; max-width: 100% }
.puce-ech b { font-weight: 800; white-space: nowrap }
.puce-ech .lib-ech { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; max-width: 300px; min-width: 0 }
.puce-ech.ech-proche { border-color: var(--t3); background: var(--t3-pale) }
.puce-ech.ech-retard { border-color: var(--alerte); background: var(--alerte-pale); color: var(--alerte) }
.puce-ech button { border: 0; background: transparent; color: var(--encre-3); cursor: pointer; min-width: 24px; height: 24px; border-radius: 999px; display: inline-grid; place-items: center; font-size: 15px; line-height: 1; padding: 0 4px }
.puce-ech button:hover, .puce-ech button:focus-visible { background: var(--lavande); color: var(--encre) }
.puce-ech button.confirmer { font-size: 12px; font-weight: 800; color: var(--alerte) }
.puce-ech button .icone { width: 14px; height: 14px }
.f-ech { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 10px; padding: 12px 0 6px; max-width: 820px }
.f-ech .large { grid-column: 1 / -1 }
.f-ech .petit { margin: 0 }
@media (max-width: 860px) { .bande-echeances { padding: 8px 16px } }
/* aperçu du papier à en-tête */
.apercu-entete { background: #fff; color: #1E1B3A; border: 1px solid var(--trait); border-radius: 8px; padding: 18px 20px 12px; box-shadow: var(--ombre) }
.feuille-entete { display: flex; align-items: center; gap: 16px; border-bottom: 1.5px solid #B9AEEB; padding-bottom: 10px }
.feuille-entete img { max-height: 56px; max-width: 140px; object-fit: contain }
.feuille-entete .logo-vide { width: 56px; height: 56px; border: 1.5px dashed #C9C5DD; border-radius: 8px; display: grid; place-items: center; font-size: 11px; color: #8D89A8 }
.feuille-entete div { display: flex; flex-direction: column; font-family: Calibri, "Segoe UI", Arial, sans-serif; font-size: 12px; color: #5F6572; line-height: 1.35 }
.feuille-entete b { color: #3B3577; font-size: 15px; letter-spacing: .01em }
@media (max-width: 760px) { .espace.avec-aide .aide { bottom: calc(66px + env(safe-area-inset-bottom, 0px)) } }
.note-courrier { background: var(--surface); border: 1px solid var(--trait); border-left: 4px solid var(--indigo-ui); border-radius: 12px; padding: 10px 14px; font-size: 13.5px; color: var(--encre-2); max-width: 900px }
.note-courrier b { color: var(--encre) }
/* modification d'un projet et modèle de la commune */
.edition { display: flex; flex-direction: column; gap: 8px; background: var(--surface); border: 1px solid var(--trait-fort); border-radius: 12px; padding: 14px 16px }
.edition p { margin: 0 }
.edition > p:not(.petit) { font-size: 14px; color: var(--encre-2) }
.texte-edition { font-family: var(--doc); font-size: 15px; line-height: 1.6; min-height: 220px; resize: vertical }
.modele-form { border-left: 4px solid var(--indigo-ui) }
.qui-msg .modifie { font-weight: 600; color: var(--accent-texte) }
/* la barre du bas du téléphone garde 6 onglets : « Textes officiels » reste accessible depuis l'ordinateur */
@media (max-width: 760px) { .menu-lateral li.cache-mobile { display: none } }
/* circuit de validation */
.bande-validation { display: flex; align-items: center; justify-content: space-between; gap: 10px 16px; flex-wrap: wrap; padding: 10px 24px; border-bottom: 1px solid var(--trait); background: var(--t3-pale); font-size: 14px }
.bande-validation.val-validee { background: var(--t1-pale) }
.bande-validation.val-renvoyee, .bande-validation.val-perimee { background: var(--alerte-pale) }
.val-texte { display: flex; align-items: flex-start; gap: 10px; min-width: 0 }
.val-texte .icone { width: 20px; height: 20px; flex: none; margin-top: 1px; color: var(--accent-texte) }
.val-validee .val-texte .icone { color: var(--t1) } .val-renvoyee .val-texte .icone, .val-perimee .val-texte .icone { color: var(--alerte) }
.mot { font-style: italic; color: var(--encre-2) }
.f-renvoi { flex: 1 1 100%; display: flex; flex-direction: column; gap: 8px }
.bloc-validation { border-left-color: var(--violet-ui) }
.a-relire .t small.mot { font-size: 12.5px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap }
@media (max-width: 860px) { .bande-validation { padding: 10px 16px } }

/* =====================================================================
   NOUVELLE INTERFACE (28/10/2026) : plus lisible, plus guidée
   - pictogramme et teinte par domaine ; pastilles de domaine sur plusieurs lignes (plus de défilement horizontal)
   - « Que voulez-vous faire ? » sur l'accueil ; mail reçu affiché comme un mail ; bulles plus légères ; connexion pleine hauteur
   ===================================================================== */
.connexion { min-height: 100dvh }
.pictos { flex: none; width: 34px; height: 34px; border-radius: 10px; display: inline-grid; place-items: center }
.pictos .icone { width: 19px; height: 19px }
.pictos.t1 { background: var(--t1-pale); color: var(--t1) } .pictos.t2 { background: var(--t2-pale); color: var(--t2) } .pictos.t3 { background: var(--t3-pale); color: var(--t3) }

/* pastilles de domaine : toutes visibles, passent à la ligne */
.onglets-zone { position: static; flex-wrap: wrap; border-bottom: 0; padding-block: 0 }
.onglets { flex-wrap: wrap; overflow: visible; padding: 2px 0 }
.defiler { display: none !important }
.onglet { padding: 5px 12px 5px 6px; gap: 8px }
.onglet[data-onglet="tout"] { padding-left: 14px }
.onglet .pictos { width: 24px; height: 24px; border-radius: 7px }
.onglet .pictos .icone { width: 14px; height: 14px }
.onglet[aria-selected="true"] .pictos { background: rgba(255, 255, 255, .2); color: #fff }
#cherche { flex: 0 1 260px; margin-left: auto }

/* cartes de fonction */
.carte-haut { display: flex; align-items: center; gap: 10px }
.carte .dom { font-size: 11px }
.carte.active::before { height: 3px }
.carte.active.t1::before { background: var(--t1) } .carte.active.t2::before { background: var(--t2) } .carte.active.t3::before { background: var(--t3) }
.carte h3 { font-size: 16px }
.carte .ouvrir { font-size: 13px; font-weight: 800; color: var(--accent-texte); opacity: 0; transform: translateX(-4px); transition: opacity .15s, transform .15s; margin-left: auto }
.carte.active:hover .ouvrir, .carte.active:focus-within .ouvrir { opacity: 1; transform: none }
.carte .ouvrir + .info { margin-left: 4px }

/* « Que voulez-vous faire ? » */
.demande-rapide { background: var(--surface); border: 1px solid var(--trait); border-radius: 20px; padding: 22px 24px; box-shadow: var(--ombre); display: flex; flex-direction: column; gap: 14px; position: relative; overflow: hidden }
.demande-rapide::before { content: ""; position: absolute; inset: 0 auto 0 0; width: 5px; background: var(--degrade) }
.dr-tete h2 { margin: 0; font-size: 21px; font-weight: 800; letter-spacing: -.01em }
.dr-tete p { margin: 4px 0 0; color: var(--encre-2); font-size: 14.5px }
.dr-zone { display: flex; gap: 12px; align-items: stretch }
.dr-zone textarea { flex: 1; min-height: 76px; resize: vertical; border: 1.5px solid var(--trait-fort); border-radius: 14px; padding: 12px 14px; background: var(--surface-2); font-size: 15px; line-height: 1.45 }
.dr-zone textarea:focus { outline: none; border-color: var(--accent); background: var(--surface); box-shadow: 0 0 0 4px var(--lavande) }
.dr-zone .btn { align-self: flex-end; white-space: nowrap; padding: 12px 18px }
.dr-resultats:empty { display: none }
.dr-resultats .dr-intro { margin: 0 0 8px; font-size: 13.5px; font-weight: 700; color: var(--encre-2) }
.dr-resultats ul { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 8px }
.dr-resultats li { display: flex; align-items: center; gap: 12px; padding: 10px 12px; border: 1px solid var(--trait); border-radius: 14px; background: var(--surface-2) }
.dr-resultats li.premiere { border-color: var(--accent-clair); background: var(--lavande) }
.dr-resultats .t { display: flex; flex-direction: column; min-width: 0; flex: 1 }
.dr-resultats .t b { font-size: 15px } .dr-resultats .t span { font-size: 12.5px; color: var(--encre-3) }
@media (max-width: 760px) { .dr-zone { flex-direction: column } .dr-zone .btn { align-self: stretch } .demande-rapide { padding: 18px 16px } }

/* dossier : bulles de l'agent plus légères, mail reçu présenté comme un mail */
.msg-agent .bulle { background: var(--lavande); color: var(--encre); box-shadow: none; border: 1px solid var(--trait) }
.mail-recu { width: min(100%, 680px); background: var(--surface); border: 1px solid var(--trait); border-radius: 16px; box-shadow: var(--ombre); overflow: hidden; align-self: flex-end }
.mr-tete { display: flex; justify-content: space-between; align-items: center; gap: 10px; padding: 9px 16px; background: var(--surface-2); border-bottom: 1px solid var(--trait); font-size: 12.5px; color: var(--encre-3) }
.mr-etiquette { display: inline-flex; align-items: center; gap: 6px; font-weight: 800; color: var(--accent-texte); text-transform: uppercase; letter-spacing: .06em; font-size: 11.5px }
.mr-etiquette .icone { width: 15px; height: 15px }
.mr-de { padding: 12px 16px 0; font-size: 14px }
.mr-objet { padding: 2px 16px 0; font-size: 16px; font-weight: 800 }
.mr-corps { padding: 10px 16px 14px; white-space: pre-wrap; overflow-wrap: anywhere; font-size: 14.5px; line-height: 1.55 }
.mr-consigne { border-top: 1px dashed var(--trait); padding: 6px 16px 8px; font-size: 12.5px; color: var(--encre-3) }
.mr-consigne summary { cursor: pointer; font-weight: 700 }
.mr-consigne p { margin: 6px 0 0 }

/* bouton « Nouvelle demande » de la barre du haut et fenêtre associée */
.btn-demande { display: inline-flex; align-items: center; gap: 6px; background: #fff; color: var(--onde-indigo-fonce); border-color: #fff; font-weight: 800 }
.btn-demande:hover { background: #F1EEFF }
.btn-demande .icone { width: 15px; height: 15px }
@media (max-width: 760px) { .btn-demande span { display: none } .btn-demande { padding: 6px 8px } }
.nd-texte { width: 100%; resize: vertical; border: 1.5px solid var(--trait-fort); border-radius: 12px; padding: 10px 12px; background: var(--surface-2); font-size: 15px }
.nd-texte:focus { outline: none; border-color: var(--accent); background: var(--surface); box-shadow: 0 0 0 4px var(--lavande) }
.tiroir-demande .dr-resultats li { flex-wrap: wrap }

/* visite guidée */
.visite { position: fixed; inset: 0; z-index: 60 }
.visite-spot { position: fixed; border-radius: 16px; box-shadow: 0 0 0 9999px rgba(20, 18, 46, .62); transition: all .25s ease; pointer-events: none; outline: 2px solid rgba(255, 255, 255, .85) }
.visite:has(.visite-spot[hidden]) { background: rgba(20, 18, 46, .62) }
.visite-bulle { position: fixed; width: min(380px, calc(100vw - 24px)); background: var(--surface); color: var(--encre); border-radius: 18px; padding: 18px 20px 16px; box-shadow: var(--ombre-forte); display: flex; flex-direction: column; gap: 6px; transition: top .25s ease, left .25s ease }
.visite-bulle.centre { left: 50% !important; top: 50% !important; transform: translate(-50%, -50%) }
.visite-bulle:focus { outline: none }
.visite-etape { font-size: 11.5px; font-weight: 800; letter-spacing: .08em; text-transform: uppercase; color: var(--accent-texte) }
.visite-bulle h2 { margin: 0; font-size: 19px; font-weight: 800 }
.visite-bulle p { margin: 0; color: var(--encre-2); font-size: 14.5px; line-height: 1.5 }
.visite-actions { display: flex; align-items: center; gap: 8px; margin-top: 10px }
.visite-actions .visite-pousse { flex: 1 }
@media (prefers-reduced-motion: reduce) { .visite-spot, .visite-bulle { transition: none } }

/* =====================================================================================================
   THÈME PRO (08/11/2026) — refonte visuelle demandée par Mathias : « professionnel et facile à prendre en main ».
   Inspirations : Linear et Notion (calme, neutre), Stripe et Pennylane (cartes nettes, hiérarchie par la typographie),
   Qonto (couleur réservée aux actions), Système de design de l'État (lisibilité, contraste, confiance).
   Principes : fond neutre, couleur seulement pour l'action et l'état, une seule couleur principale (indigo ONDE),
   boutons pleins sans halo, bordures fines, ombres discrètes, texte plus contrasté, cibles cliquables généreuses.
   Couche ajoutée à la fin : elle redéfinit les variables et les composants sans toucher à la structure.
   ===================================================================================================== */
:root {
  --ui: "Inter", "Segoe UI", system-ui, -apple-system, Arial, sans-serif;
  --fond: #F6F7F9; --surface: #FFFFFF; --surface-2: #F9FAFB; --surface-3: #F2F4F7;
  --encre: #101828; --encre-2: #475467; --encre-3: #667085;
  --trait: #E4E7EC; --trait-fort: #D0D5DD;
  --primaire: #4B3FB0; --primaire-fort: #3B3191; --primaire-pale: #F1EFFD; --primaire-trait: #D9D4F7;
  --accent: #4B3FB0; --accent-fort: #3B3191; --accent-texte: #4338A8; --accent-clair: #CFC9F5; --lavande: #F1EFFD;
  --indigo-ui: #4B3FB0; --anneau: #4B3FB0;
  --rayon: 12px; --rayon-petit: 8px;
  --ombre: 0 1px 2px rgba(16, 24, 40, .05); --ombre-moy: 0 4px 12px -2px rgba(16, 24, 40, .08), 0 2px 4px -2px rgba(16, 24, 40, .04);
  --ombre-forte: 0 20px 40px -12px rgba(16, 24, 40, .22);
  --halo: 0 0 0 4px rgba(75, 63, 176, .14);
}
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) {
  --fond: #0E0F14; --surface: #16171E; --surface-2: #1B1C24; --surface-3: #22232D;
  --encre: #F2F3F7; --encre-2: #B4B8C5; --encre-3: #8B90A0; --trait: #2A2C37; --trait-fort: #383B48;
  --primaire: #9C92F2; --primaire-fort: #B6AEF6; --primaire-pale: #1F1C38; --primaire-trait: #3A3466;
  --accent: #9C92F2; --accent-fort: #B6AEF6; --accent-texte: #B6AEF6; --lavande: #1F1C38; --indigo-ui: #9C92F2; --anneau: #B6AEF6;
  --ombre: none; --ombre-moy: 0 4px 16px rgba(0, 0, 0, .4); --halo: 0 0 0 4px rgba(156, 146, 242, .22) } }
:root[data-theme="dark"] {
  --fond: #0E0F14; --surface: #16171E; --surface-2: #1B1C24; --surface-3: #22232D;
  --encre: #F2F3F7; --encre-2: #B4B8C5; --encre-3: #8B90A0; --trait: #2A2C37; --trait-fort: #383B48;
  --primaire: #9C92F2; --primaire-fort: #B6AEF6; --primaire-pale: #1F1C38; --primaire-trait: #3A3466;
  --accent: #9C92F2; --accent-fort: #B6AEF6; --accent-texte: #B6AEF6; --lavande: #1F1C38; --indigo-ui: #9C92F2; --anneau: #B6AEF6;
  --ombre: none; --ombre-moy: 0 4px 16px rgba(0, 0, 0, .4); --halo: 0 0 0 4px rgba(156, 146, 242, .22) }

body { font-size: 15px; letter-spacing: -.003em; font-feature-settings: "cv11", "ss01"; background: var(--fond) }
h1 { font-weight: 700; letter-spacing: -.022em; font-size: clamp(24px, 3vw, 30px) }
h2 { font-weight: 700; letter-spacing: -.012em }
::selection { background: var(--primaire-trait) }

/* ---------- barre supérieure : blanche, nette ---------- */
.barre { background: var(--surface); color: var(--encre); box-shadow: none; border-bottom: 1px solid var(--trait) }
.barre-in { height: 60px }
.logo b { font-weight: 800; font-size: 19px; letter-spacing: .01em; background: var(--degrade-texte); -webkit-background-clip: text; background-clip: text; color: transparent }
.logo b span { color: inherit }
.logo small { color: var(--encre-3); font-weight: 600; letter-spacing: .12em; font-size: 10.5px }
.qui { color: var(--encre-2) }
.qui .commune { color: var(--encre); font-weight: 600; padding: 5px 10px; border: 1px solid var(--trait); border-radius: 999px; background: var(--surface-2); font-size: 13px }
.avatar { background: var(--primaire-pale); color: var(--primaire); font-weight: 700 }
.btn-barre { background: var(--surface); border: 1px solid var(--trait-fort); color: var(--encre-2); border-radius: var(--rayon-petit); font-weight: 600 }
.btn-barre:hover { background: var(--surface-3); color: var(--encre) }
.btn-demande { background: var(--primaire); border-color: var(--primaire); color: #fff; font-weight: 600 }
.btn-demande:hover { background: var(--primaire-fort); border-color: var(--primaire-fort) }
.barre :focus-visible { outline: 2px solid #fff; outline-offset: 2px; box-shadow: 0 0 0 4px rgba(0,0,0,.55) }

/* ---------- menu latéral : sobre ---------- */
.menu-lateral { background: var(--surface); padding: 12px 10px }
.menu-lateral a { font-weight: 500; font-size: 14.5px; color: var(--encre-2); border-radius: var(--rayon-petit); padding: 9px 12px }
.menu-lateral a .icone { width: 19px; height: 19px; color: var(--encre-3) }
.menu-lateral a:hover { background: var(--surface-3); color: var(--encre) }
.menu-lateral a[aria-current="page"] { background: var(--primaire-pale); color: var(--primaire); font-weight: 600 }
.menu-lateral a[aria-current="page"] .icone { color: var(--primaire) }
.menu-lateral a[aria-current="page"]::before { background: var(--primaire); width: 3px }
.compteur-menu { background: var(--primaire); color: #fff; font-weight: 700 }
.replier { font-weight: 500 }

/* ---------- boutons et champs ---------- */
.btn { border-radius: var(--rayon-petit); font-weight: 600; border-color: var(--trait-fort); box-shadow: var(--ombre); padding: 9px 14px }
.btn:hover { border-color: var(--trait-fort); background: var(--surface-2) }
.btn-plein, .btn-degrade { background: var(--primaire); border: 1px solid var(--primaire); color: #fff; box-shadow: var(--ombre) }
.btn-plein:hover, .btn-degrade:hover { background: var(--primaire-fort); border-color: var(--primaire-fort); box-shadow: var(--ombre) }
:root[data-theme="dark"] .btn-plein, :root[data-theme="dark"] .btn-degrade { color: #12102A }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) .btn-plein, :root:not([data-theme="light"]) .btn-degrade { color: #12102A } }
.btn-discret { box-shadow: none; font-weight: 500 }
.btn-discret:hover { background: var(--surface-3) }
.btn-danger { box-shadow: none }
label { font-weight: 600; color: var(--encre) }
input[type=text], input[type=email], input[type=password], input[type=search], input[type=number], input[type=date], textarea, select {
  border-color: var(--trait-fort); border-radius: var(--rayon-petit); font-weight: 400; box-shadow: var(--ombre) }
input:not([type=checkbox]):not([type=radio]):focus, textarea:focus, select:focus { border-color: var(--primaire); box-shadow: var(--halo) }
.bandeau-demo { background: var(--surface); border-color: var(--trait); border-radius: var(--rayon-petit); color: var(--encre-2) }

/* ---------- connexion : panneau gauche calme ---------- */
.connexion-gauche { background: linear-gradient(160deg, #2C2A6B 0%, #3D3590 55%, #5A3F94 100%) }
.connexion-gauche::after { border-color: rgba(255, 255, 255, .05) }
.connexion-droite h1, .connexion form h1 { font-weight: 700 }

/* ---------- accueil : bandeau blanc, chiffres nets ---------- */
.heros { background: var(--surface); color: var(--encre); border: 1px solid var(--trait); border-radius: 16px; box-shadow: var(--ombre); padding: 24px 26px }
.heros::after { display: none }
.heros::before { content: ""; position: absolute; inset: 0 0 auto 0; height: 3px; background: var(--degrade) }
.heros h1 { color: var(--encre) }
.heros p { color: var(--encre-2) }
.chiffre { background: var(--surface-2); border: 1px solid var(--trait); color: var(--encre); border-radius: 10px }
a.chiffre:hover, button.chiffre:hover { background: var(--primaire-pale); border-color: var(--primaire-trait) }
.chiffre b { font-weight: 700; color: var(--encre) } .chiffre span { color: var(--encre-2) }
.reprendre h2 { color: var(--encre-3); font-weight: 600; font-size: 12px }
.puce-dossier { background: var(--surface-2); border: 1px solid var(--trait); color: var(--encre) }
.puce-dossier:hover { background: var(--primaire-pale); border-color: var(--primaire-trait) }
.puce-dossier b { font-weight: 600 } .puce-dossier span { color: var(--encre-3); font-weight: 500 }
.heros :focus-visible { outline: 2px solid #fff; outline-offset: 2px; box-shadow: 0 0 0 4px rgba(0,0,0,.55) }
.heros input[type=search], .heros input { background: var(--surface); color: var(--encre); border-color: var(--trait-fort) }

/* ---------- « Que voulez-vous faire ? » ---------- */
.demande-rapide { border-radius: 16px; box-shadow: var(--ombre-moy); border-color: var(--trait) }
.demande-rapide::before { width: 3px; background: var(--primaire) }
.dr-tete h2 { font-weight: 700; font-size: 20px }
.dr-zone textarea { border: 1px solid var(--trait-fort); border-radius: 10px; background: var(--surface) }
.dr-zone textarea:focus { box-shadow: var(--halo); border-color: var(--primaire) }
.dr-resultats li { border-radius: 10px; background: var(--surface) }
.dr-resultats li.premiere { border-color: var(--primaire-trait); background: var(--primaire-pale) }

/* ---------- onglets par domaine : pastilles neutres ---------- */
.onglets-zone { background: color-mix(in srgb, var(--fond) 92%, transparent); backdrop-filter: blur(8px) }
.onglet { font-weight: 500; border-color: var(--trait); color: var(--encre-2); padding: 6px 12px }
.onglet:hover { border-color: var(--trait-fort); background: var(--surface-2); color: var(--encre) }
.onglet[aria-selected="true"] { background: var(--encre); border-color: var(--encre); color: var(--surface); box-shadow: none }
:root[data-theme="dark"] .onglet[aria-selected="true"] { background: var(--primaire); border-color: var(--primaire); color: #12102A }
.onglet .nb { background: var(--surface-3); color: var(--encre-2); font-weight: 600 }
.onglet[aria-selected="true"] .nb { background: rgba(255, 255, 255, .16); color: inherit }
.onglet[aria-selected="true"] .pictos { background: rgba(255, 255, 255, .16); color: inherit }
.segments { border-radius: var(--rayon-petit); background: var(--surface-3); border-color: transparent }
.segments button { font-weight: 500; border-radius: 6px }
.segments button[aria-pressed="true"] { background: var(--surface); color: var(--encre); box-shadow: var(--ombre), 0 0 0 1px var(--trait) }

/* ---------- fiches de fonctions : cartes nettes ---------- */
.grille { gap: 16px }
.carte { border-radius: var(--rayon); box-shadow: var(--ombre); padding: 18px 18px 14px }
.carte.active::before { display: none }
.carte.active:hover { border-color: var(--primaire-trait); transform: translateY(-1px); box-shadow: var(--ombre-moy) }
.carte .dom { font-weight: 600; letter-spacing: .05em; color: var(--encre-3) }
.carte h3 { font-weight: 650; font-size: 16px; letter-spacing: -.01em }
.carte p { color: var(--encre-2) }
.carte .pied { border-top: 1px solid var(--trait); color: var(--encre-3) }
.carte .ouvrir { color: var(--primaire); font-weight: 600 }
.carte.verrou { border-style: solid; background: var(--surface-2) }
.domaine-bloc h3.domaine { font-weight: 600; color: var(--encre) }
.domaine-bloc h3.domaine::before { background: var(--primaire); width: 14px }
.etiquette, .badge-projet { border-radius: 999px; font-weight: 600; background: var(--primaire-pale); color: var(--primaire) }
.pictos { border-radius: 9px }
.kpi::before { width: 3px; background: var(--primaire) }
.kpi b { font-weight: 700 }
.a-relire { border-left: 1px solid var(--trait); box-shadow: var(--ombre); border-radius: var(--rayon) }
.a-relire a:hover, .a-relire a:focus-visible { background: var(--surface-3) }
.vide { border-radius: var(--rayon) }
.tableau { border-radius: var(--rayon); box-shadow: var(--ombre) }
.tableau th { background: var(--surface-2); font-weight: 600; letter-spacing: .04em }

/* ---------- panneau de détail ---------- */
.tiroir-tete { background: var(--surface); color: var(--encre); border-bottom: 1px solid var(--trait) }
.tiroir-tete h2 { color: var(--encre) }
.tiroir-tete .dom { color: var(--primaire) }
.tiroir-tete p { color: var(--encre-2) }
.fermer { background: var(--surface-3); color: var(--encre-2) }
.fermer:hover { background: var(--trait); color: var(--encre) }
.tiroir-tete :focus-visible { outline: 2px solid #fff; outline-offset: 2px; box-shadow: 0 0 0 4px rgba(0,0,0,.55) }
.voile { background: rgba(16, 24, 40, .4) }

/* ---------- espace d'une fonction ---------- */
.fonction-carte { background: var(--primaire-pale); border: 1px solid var(--primaire-trait); border-radius: 10px }
.liste-dossiers a { border-radius: var(--rayon-petit); border-left: 0 }
.liste-dossiers a[aria-current="page"] { background: var(--primaire-pale); box-shadow: inset 3px 0 0 var(--primaire) }
.liste-dossiers .t { font-weight: 600 }
.conv-tete { background: var(--surface) }
.conv-tete h1 { font-weight: 650 }
.fil { background: var(--fond) }
.accueil-fonction { border-radius: 16px; box-shadow: var(--ombre-moy) }
.accueil-fonction .bande { background: var(--surface); color: var(--encre); border-bottom: 1px solid var(--trait); padding: 20px 22px 16px }
.accueil-fonction .bande h2 { color: var(--encre); font-size: 20px }
.accueil-fonction .bande span { color: var(--primaire); font-weight: 600 }
.accueil-fonction .bande p { color: var(--encre-2) }
.accueil-fonction .bande :focus-visible { outline: 2px solid #fff; outline-offset: 2px; box-shadow: 0 0 0 4px rgba(0,0,0,.55) }
.etapes li::before { background: var(--primaire-pale); color: var(--primaire); font-weight: 700 }
.exemples button { border-style: solid; border-color: var(--trait-fort); background: var(--surface); font-weight: 500; box-shadow: var(--ombre) }
.exemples button:hover { border-color: var(--primaire-trait); background: var(--primaire-pale); color: var(--primaire) }
.choix-cas button { background: var(--surface); border-radius: 10px }
.choix-cas button:hover, .choix-cas button[aria-pressed="true"] { border-color: var(--primaire); background: var(--primaire-pale) }
.msg .qui-msg { font-weight: 600; color: var(--encre-3) }
.msg-assistance .qui-msg::before { background: var(--degrade); border-radius: 6px }
.msg-agent .bulle { background: var(--surface); color: var(--encre); border: 1px solid var(--trait); border-radius: 14px 14px 4px 14px; box-shadow: var(--ombre) }
.msg-assistance .doc { border-radius: 4px 14px 14px 14px; box-shadow: var(--ombre) }
.msg-assistance .doc h2 { color: var(--encre) }
.msg-assistance.est-document .doc, .feuille { border-top-width: 3px; border-top-color: var(--primaire) }
.feuille { border-radius: 8px; box-shadow: var(--ombre-moy) }
.verif { border-color: var(--trait); border-left: 3px solid var(--primaire); background: var(--surface); border-radius: 10px; box-shadow: var(--ombre) }
.verif.complet { border-left-color: #2F7D5B; background: var(--surface) }
.verif label:hover { background: var(--surface-2) }
.verif-compte { font-weight: 600 }
.sources { background: var(--surface); border-radius: 10px }
.sources summary { font-weight: 600; color: var(--primaire) }
.saisie { background: var(--surface); border-top-color: var(--trait) }
.zone { border-radius: 14px; border-color: var(--trait-fort); box-shadow: var(--ombre-moy) }
.zone:focus-within { border-color: var(--primaire); box-shadow: var(--halo) }
.aide .regle { background: var(--primaire-pale); border: 1px solid var(--primaire-trait) }
.mail-recu { border-radius: 14px }
.mr-etiquette { color: var(--primaire); font-weight: 700 }
.mr-objet { font-weight: 700 }

/* ---------- divers ---------- */
.visite-bulle { border-radius: 14px }
.visite-etape { color: var(--primaire) }
.toasts > * { border-radius: 10px; box-shadow: var(--ombre-moy) }
@media (prefers-reduced-motion: reduce) { .carte.active:hover { transform: none } }

/* ---------- accueil : tableau de bord (date, salutation, 4 tuiles, reprendre) ---------- */
.heros-pro { display: flex; flex-direction: column; gap: 20px; padding: 26px 28px }
.hp-tete { display: flex; align-items: center; gap: 16px }
.hp-logo { width: 56px; height: 56px; border-radius: 50%; background: #fff; object-fit: contain; flex: none; border: 1px solid var(--trait) }
.hp-date { margin: 0 0 2px; font-size: 13px; font-weight: 500; color: var(--encre-3) }
.hp-date::first-letter { text-transform: uppercase }
.hp-sous { margin: 4px 0 0 !important; color: var(--encre-2) !important; font-size: 15px }
.hp-kpis { display: grid; grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); gap: 12px }
.hp-kpi { display: flex; flex-direction: column; gap: 2px; text-align: left; text-decoration: none; color: var(--encre); background: var(--surface); border: 1px solid var(--trait); border-radius: 12px; padding: 14px 16px; cursor: pointer; font: inherit; box-shadow: var(--ombre); transition: border-color .15s, box-shadow .15s, transform .15s }
.hp-kpi:hover:not([disabled]) { border-color: var(--primaire-trait); box-shadow: var(--ombre-moy); transform: translateY(-1px) }
.hp-kpi[disabled] { cursor: default; opacity: .75 }
.hp-kpi span { display: inline-flex; align-items: center; gap: 8px; font-size: 13px; font-weight: 600; color: var(--encre-2) }
.hp-kpi span .icone { width: 16px; height: 16px; color: var(--primaire) }
.hp-kpi b { font-size: 30px; font-weight: 700; letter-spacing: -.02em; line-height: 1.15; font-variant-numeric: tabular-nums; margin-top: 4px }
.hp-kpi small { font-size: 13px; color: var(--encre-3) }
.hp-reprendre { display: flex; flex-direction: column; gap: 8px }
.hp-reprendre h2 { font-size: 12px; font-weight: 600; letter-spacing: .06em; text-transform: uppercase; color: var(--encre-3); margin: 0 }
.heros-pro .puces-reprendre { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 8px }
.heros-pro .puce-dossier { max-width: none; padding: 10px 12px; border-radius: 10px }
.heros-pro .puce-dossier b { font-size: 14px }
@media (max-width: 560px) { .heros-pro { padding: 18px 16px; gap: 14px } .hp-kpis { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px } .hp-kpi { padding: 10px 12px } .hp-kpi b { font-size: 24px } .hp-sous { display: none } }

/* ---------- courrier : liste façon messagerie ---------- */
.courrier { border-radius: var(--rayon); box-shadow: var(--ombre); border-color: var(--trait) }
.courrier-tete .exp { display: inline-flex; align-items: center; gap: 10px; min-width: 0 }
.av-exp { width: 32px; height: 32px; border-radius: 50%; background: var(--primaire-pale); color: var(--primaire); display: inline-grid; place-items: center; font-weight: 700; font-size: 13px; flex: none }
.courrier h3 { font-weight: 650; letter-spacing: -.01em }
.note-courrier { border-radius: 10px; border-left-width: 3px; background: var(--surface) }

/* ---------- téléphone : barre d'onglets du bas et barre du haut ---------- */
@media (max-width: 760px) {
  .menu-lateral a, .coque.replie .menu-lateral a { font-size: 10.5px; font-weight: 600; padding: 6px 0; border-radius: 10px }
  .menu-lateral a[aria-current="page"] { background: transparent; color: var(--primaire) }
  .menu-lateral a[aria-current="page"]::before { background: var(--primaire) }
  .qui .commune { display: none }
  .barre-in { height: 54px }
}

/* ---------- documents attendus : vraie liste de cases à cocher ---------- */
.attendus { border-left: 1px solid var(--trait); border-radius: 14px; padding: 20px 22px }
.attendus h3 { font-size: 12px; font-weight: 600; letter-spacing: .06em; text-transform: uppercase; color: var(--encre-3); margin: 18px 0 8px }
.attendus ul { gap: 6px }
.attendus label { flex-direction: row; align-items: flex-start; gap: 12px; font-weight: 500; color: var(--encre); font-size: 14.5px; padding: 10px 12px; border: 1px solid var(--trait); border-radius: 10px; background: var(--surface); transition: border-color .15s, background .15s }
.attendus label:hover { border-color: var(--primaire-trait); background: var(--surface-2) }
.attendus label:has(input:checked) { background: var(--primaire-pale); border-color: var(--primaire-trait) }
.attendus input[type="checkbox"] { width: 18px; height: 18px; margin-top: 1px; accent-color: var(--primaire) }
.attendus label .petit, .attendus label small { color: var(--encre-3); font-weight: 400 }
.raccourci { font: 600 11px/1 var(--ui); padding: 3px 6px; border-radius: 5px; background: rgba(255, 255, 255, .18); color: inherit; margin-left: 4px; letter-spacing: .02em }
@media (max-width: 1100px) { .raccourci { display: none } }

/* ---------- connexion : logo lisible et atouts ---------- */
.connexion-gauche .logo b { background: none; color: #fff; -webkit-background-clip: border-box; background-clip: border-box }
.connexion-gauche .logo small { color: rgba(255, 255, 255, .75) }
.connexion-gauche .grand { font-weight: 700; letter-spacing: -.025em }
.atouts-connexion { list-style: none; margin: 8px 0 0; padding: 0; display: flex; flex-direction: column; gap: 10px }
.atouts-connexion li { display: flex; align-items: center; gap: 10px; color: rgba(255, 255, 255, .92); font-size: 14.5px }
.atouts-connexion li::before { content: "✓"; width: 22px; height: 22px; border-radius: 50%; background: rgba(255, 255, 255, .14); display: inline-grid; place-items: center; font-size: 12px; font-weight: 700; flex: none }
.connexion-droite { background: var(--surface) }
.connexion form { gap: 18px }

/* ---------- statuts : pastilles avec point de couleur (façon Linear / Notion) ---------- */
.statut-dossier { display: inline-flex; align-items: center; gap: 5px; font-weight: 600; border-radius: 999px; padding: 2px 8px 2px 7px }
.statut-dossier::before { content: ""; width: 6px; height: 6px; border-radius: 50%; background: currentColor; flex: none }
.st-en_cours { color: var(--encre-2); background: var(--surface-3) }
.st-a_relire { color: #8A3D96; background: #F7EDF9 }
.st-valide { color: #2F6FB0; background: #EAF2FB }
.st-envoye { color: #2F7D5B; background: #E8F5EE }
:root[data-theme="dark"] .st-a_relire { color: #DDA6E8; background: #33213A } :root[data-theme="dark"] .st-valide { color: #9CC2EE; background: #1C2B3F } :root[data-theme="dark"] .st-envoye { color: #8FD3B2; background: #18302A }
.filtre-statut button { font-weight: 500 }
.filtre-statut button[aria-pressed="true"] { background: var(--encre); color: var(--surface) }
.choix-statut select { font-weight: 600 }

/* ---------- chargement : squelette animé au lieu d'un simple texte ---------- */
.chargement { color: transparent; position: relative; max-width: 720px; margin: 40px auto; height: 120px; border-radius: 14px; background: linear-gradient(90deg, var(--surface-3) 0%, var(--surface) 50%, var(--surface-3) 100%); background-size: 200% 100%; animation: squelette 1.2s ease-in-out infinite; overflow: hidden }
@keyframes squelette { 0% { background-position: 100% 0 } 100% { background-position: -100% 0 } }
@media (prefers-reduced-motion: reduce) { .chargement { animation: none } }

/* =====================================================================================================
   COULEURS (09/11/2026) — Mathias : « trop blanc ». Fond bleu-lavande, menu latéral indigo profond,
   barre et accueil légèrement teintés ; les cartes de contenu restent blanches pour la lecture.
   ===================================================================================================== */
:root {
  --fond: #E9ECF5; --surface-2: #F4F5FA; --surface-3: #E6E9F3; --trait: #DCE0EC; --trait-fort: #C9CEDF;
  --menu-fond: #221E50; --menu-texte: #C9C4F2; --menu-icone: #A39CE6; --menu-survol: rgba(255, 255, 255, .08);
  --menu-actif: rgba(255, 255, 255, .15); --menu-actif-texte: #FFFFFF; --menu-trait: #2F2A66; --menu-repere: #A99FFF;
  --barre-fond: linear-gradient(90deg, #FFFFFF 0%, #F3F1FE 70%, #ECEBFC 100%);
  --heros-fond: linear-gradient(135deg, #FFFFFF 0%, #F4F2FE 55%, #E9EEFF 100%);
}
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) {
  --menu-fond: var(--surface); --menu-texte: var(--encre-2); --menu-icone: var(--encre-3); --menu-survol: var(--surface-3);
  --menu-actif: var(--primaire-pale); --menu-actif-texte: var(--encre); --menu-trait: var(--trait); --menu-repere: var(--primaire);
  --barre-fond: var(--surface); --heros-fond: var(--surface) } }
:root[data-theme="dark"] {
  --menu-fond: var(--surface); --menu-texte: var(--encre-2); --menu-icone: var(--encre-3); --menu-survol: var(--surface-3);
  --menu-actif: var(--primaire-pale); --menu-actif-texte: var(--encre); --menu-trait: var(--trait); --menu-repere: var(--primaire);
  --barre-fond: var(--surface); --heros-fond: var(--surface) }
.barre { background: var(--barre-fond) }
.heros { background: var(--heros-fond) }
.menu-lateral { background: var(--menu-fond); border-color: var(--menu-trait) }
.menu-lateral a, .menu-lateral .replier { color: var(--menu-texte) }
.menu-lateral a .icone { color: var(--menu-icone) }
.menu-lateral a:hover, .menu-lateral .replier:hover { background: var(--menu-survol); color: var(--menu-actif-texte) }
.menu-lateral a:hover .icone { color: var(--menu-actif-texte) }
.menu-lateral a[aria-current="page"] { background: var(--menu-actif); color: var(--menu-actif-texte) }
.menu-lateral a[aria-current="page"] .icone { color: var(--menu-actif-texte) }
.menu-lateral a[aria-current="page"]::before { background: var(--menu-repere) }
@media (max-width: 760px) { .menu-lateral a[aria-current="page"] { background: transparent } }

/* =====================================================================================================
   PASTILLES ROUGES (09/11/2026) — Mathias : voir d'un coup d'œil ce qui attend (réponse prête, question de
   l'assistance, mails triés en attente, projets à valider, échéances).
   ===================================================================================================== */
:root { --notif: #D92D20; --notif-texte: #FFFFFF }
.compteur-menu, .compteur-menu.urgent { background: var(--notif); color: var(--notif-texte) }
.notif-rouge { display: inline-flex; align-items: center; height: 18px; padding: 0 7px; margin-left: 6px; border-radius: 999px; background: var(--notif); color: var(--notif-texte);
  font-size: 11px; font-weight: 700; line-height: 1; vertical-align: middle; white-space: nowrap; flex: none }
.notif-rouge.rond { min-width: 20px; justify-content: center; padding: 0 5px }
.liste-dossiers .notif-rouge { margin: 2px 0 0; align-self: flex-start }

/* =====================================================================================================
   MIXTE CLAIR / SOMBRE (09/11/2026) — Mathias : « encore trop blanc, fais un mixte entre le mode sombre et le
   mode clair ». Cadre sombre (barre du haut, menu, bandeau d'accueil en indigo profond), contenu clair sur un
   fond gris-lavande ; les cartes restent claires pour la lecture. Le mode sombre n'est pas modifié.
   ===================================================================================================== */
:root {
  --fond: #DCE0EE; --surface-2: #F1F2F8; --surface-3: #E2E5F1; --trait: #D2D7E6; --trait-fort: #BEC5DA;
  --barre-fond: linear-gradient(90deg, #1B1845 0%, #2A2466 60%, #3A3192 100%); --barre-texte: #FFFFFF; --barre-texte-2: rgba(255, 255, 255, .72);
  --barre-bord: rgba(255, 255, 255, .18); --barre-bouton: rgba(255, 255, 255, .07); --barre-bouton-survol: rgba(255, 255, 255, .15); --barre-action: #6E5FF2;
  --menu-fond: linear-gradient(180deg, #1B1845 0%, #262060 100%); --menu-trait: #2F2970;
  --heros-fond: linear-gradient(135deg, #241F5C 0%, #3A3197 58%, #5843C2 100%); --heros-texte: #FFFFFF; --heros-texte-2: rgba(255, 255, 255, .78);
}
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) {
  --barre-fond: var(--surface); --barre-texte: var(--encre); --barre-texte-2: var(--encre-2); --barre-bord: var(--trait); --barre-bouton: var(--surface);
  --barre-bouton-survol: var(--surface-3); --barre-action: var(--primaire); --heros-fond: var(--surface); --heros-texte: var(--encre); --heros-texte-2: var(--encre-2) } }
:root[data-theme="dark"] {
  --barre-fond: var(--surface); --barre-texte: var(--encre); --barre-texte-2: var(--encre-2); --barre-bord: var(--trait); --barre-bouton: var(--surface);
  --barre-bouton-survol: var(--surface-3); --barre-action: var(--primaire); --heros-fond: var(--surface); --heros-texte: var(--encre); --heros-texte-2: var(--encre-2) }
.barre { background: var(--barre-fond); color: var(--barre-texte); border-bottom-color: transparent }
.logo b, .logo b span { background: none; color: var(--barre-texte); -webkit-text-fill-color: currentColor }
.logo small, .qui, .qui .nom-u { color: var(--barre-texte-2) }
.qui .commune { color: var(--barre-texte); background: var(--barre-bouton); border-color: var(--barre-bord) }
.avatar { background: var(--barre-bouton-survol); color: var(--barre-texte) }
.btn-barre { background: var(--barre-bouton); border-color: var(--barre-bord); color: var(--barre-texte) }
.btn-barre:hover { background: var(--barre-bouton-survol); color: var(--barre-texte) }
.btn-demande, .btn-demande:hover { background: var(--barre-action); border-color: var(--barre-action); color: #fff }
.heros { background: var(--heros-fond); color: var(--heros-texte); border-color: transparent }
.heros::before { display: none }
.heros h1, .heros .hp-date { color: var(--heros-texte) }
.heros .hp-sous { color: var(--heros-texte-2) !important }
.heros .hp-reprendre h2 { color: var(--heros-texte-2) }
.heros .hp-kpi, .heros .hp-kpi.puce-courrier { background: var(--surface) !important; color: var(--encre); border-color: transparent }
.heros .hp-kpi b { color: var(--encre) }
.heros .hp-kpi span { color: var(--encre-2) }
.heros .hp-kpi small { color: var(--encre-3) }

/* ---------- ergonomie, essai sans accompagnement (16/11/2026) ---------- */
/* C1 : textes d'aide plus grands et plus foncés */
.petit { font-size: 13.5px; color: var(--encre-2) }
.statut-dossier, .mini-ech { font-size: 12px }
.mention { font-size: 13px; color: var(--encre-2) }
@media (max-width: 760px) { .menu-lateral a, .coque.replie .menu-lateral a { font-size: 11.5px } }
/* C2 : les boutons discrets sous un projet et dans la zone de saisie ressemblent à des boutons */
.actions-msg .btn-discret, .zone-bas .btn-discret, .actions-msg summary.btn-discret { border-color: var(--trait-fort); background: var(--surface) }
.actions-msg .btn-discret:hover, .zone-bas .btn-discret:hover { background: var(--lavande) }
/* G7 : sur la page d'un dossier, les messages s'affichent en haut (ils ne cachent plus « Envoyer ») */
body:has(.espace) .toasts { top: calc(var(--haut-barre, 64px) + 12px); bottom: auto }
@media (max-width: 760px) { body:has(.espace) .toasts { top: calc(var(--haut-barre, 64px) + 8px); bottom: auto } }
/* confirmation en deux clics : couleur d'alerte pendant l'attente */
.btn.confirmer, button.confirmer { border-color: var(--alerte); color: var(--alerte); background: var(--alerte-pale); white-space: normal; text-align: left }
/* B2 : session expirée */
.bandeau-session { position: fixed; left: 16px; right: 16px; bottom: calc(16px + env(safe-area-inset-bottom, 0px)); z-index: 80; max-width: 620px; margin: 0 auto; display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap;
  background: var(--alerte-pale); color: var(--encre); border: 1px solid var(--alerte); border-radius: 12px; padding: 12px 16px; font-weight: 600; box-shadow: var(--ombre-forte, 0 8px 24px rgba(0,0,0,.18)) }
@media (max-width: 760px) { .bandeau-session { bottom: calc(76px + env(safe-area-inset-bottom, 0px)) } }
/* B2 : abandon d'une modification */
.confirmer-abandon { background: var(--alerte-pale); border: 1px solid var(--alerte); border-radius: 10px; padding: 10px 12px; align-items: center }
.confirmer-abandon[hidden], .actions-edition[hidden] { display: none }
/* G9 : aperçu en direct pendant la modification */
.apercu-edition { margin-top: 4px; max-height: 60vh; overflow: auto }
/* B3 : dossier archivé */
.bande-archive { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; background: var(--lavande); border: 1px solid var(--trait-fort); border-radius: 12px; padding: 10px 14px; margin: 0 0 10px }
.bande-archive span { flex: 1; min-width: 200px }
/* B5 : mot de passe oublié */
.oubli { font-size: 14px }
.oubli summary { cursor: pointer; color: var(--accent-texte, var(--encre-2)); font-weight: 600; text-decoration: underline; text-underline-offset: 3px }
.oubli p { margin: 8px 0 0; background: var(--lavande); border-radius: 10px; padding: 10px 12px; line-height: 1.5 }
/* aide */
.contact-aide a { color: inherit }
.faq summary { font-weight: 600 }
.faq p { margin: 8px 0 0; line-height: 1.55 }
/* G15 : mot de passe provisoire, afficher le mot de passe */
.champ-mdp { display: flex; gap: 6px; align-items: stretch }
.champ-mdp input { flex: 1 }
.champ-mdp .btn-discret { border-color: var(--trait-fort); background: var(--surface) }
.hp-mdp { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; margin: 4px 0 0; background: var(--surface); color: var(--encre); border: 1px solid var(--alerte); border-radius: 12px; padding: 10px 14px; font-weight: 600 }
.hp-mdp span { flex: 1; min-width: 200px }
/* G13 : libellé visible du statut */
.choix-statut .lib-statut { font-size: 12.5px; font-weight: 600; color: var(--encre-2); margin-right: 6px }
/* G2 : durée de la rédaction ; C9 : fonction choisie */
.attente-chrono { margin: 4px 0 0 }
.bandeau-fonction { display: flex; justify-content: space-between; align-items: flex-start; gap: 10px; background: var(--ok-pale); color: var(--encre); border: 1px solid var(--trait-fort); border-radius: 10px; padding: 8px 12px; margin: 0 0 8px; font-size: 14px }
.bandeau-fonction button { border: 0; background: transparent; color: inherit; font-size: 18px; line-height: 1; cursor: pointer; min-width: 24px; min-height: 24px }

/* ---------- agenda de la mairie (18/11/2026) ---------- */
.filtres-nature { display: flex; flex-wrap: wrap; gap: 8px; margin: 0 0 14px }
.filtres-nature .chip { border: 1px solid var(--trait); background: var(--surface); border-radius: 999px; padding: 6px 14px; font: inherit; font-size: 13.5px; font-weight: 700; color: var(--encre-2); cursor: pointer }
.filtres-nature .chip.actif { background: var(--accent); border-color: var(--accent); color: #fff }
.nat { display: inline-block; font-size: 11px; font-weight: 800; border-radius: 6px; padding: 1px 7px; background: var(--lavande); color: var(--encre-2); white-space: nowrap }
.nat-voter { background: #E6EEFB; color: #1F4E9C } .nat-signer { background: #F3E8FB; color: #6B2C91 } .nat-envoyer { background: #E5F5EE; color: #1D6B48 } .nat-deposer { background: #FDF0E1; color: #8A4B0F }
.calendrier { border: 1px solid var(--trait); border-radius: 14px; background: var(--surface); padding: 12px 14px 14px; margin: 0 0 16px }
.cal-tete { display: flex; align-items: center; justify-content: space-between; margin-bottom: 8px }
.cal-tete h2 { margin: 0; font-size: 17px; text-transform: capitalize }
.cal-grille { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); gap: 4px }
.cal-jsem { font-size: 11.5px; font-weight: 800; color: var(--encre-3); text-align: center; padding: 2px 0 }
.cal-jour { min-height: 74px; border: 1px solid var(--trait); border-radius: 8px; padding: 3px 4px; display: flex; flex-direction: column; gap: 2px; min-width: 0; background: var(--surface-2) }
.cal-jour.cal-auj { border-color: var(--accent); box-shadow: inset 0 0 0 1px var(--accent) }
.cal-n { font-size: 12px; font-weight: 800; color: var(--encre-2) }
.cal-ev { font-size: 11px; line-height: 1.25; border-radius: 4px; padding: 1px 4px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; background: var(--lavande) }
.cal-plus { font-size: 11px; font-weight: 800; color: var(--encre-3) }
.bloc-legales { border-left-color: var(--accent) }
.ech-l { flex: 1; min-width: 0; display: flex; align-items: center; gap: 10px }
.ech-l .t { display: flex; flex-direction: column; min-width: 0 } .ech-l .t span { font-size: 12.5px; color: var(--encre-2) }
.sous-groupe { font-size: 12.5px; font-weight: 800; letter-spacing: .05em; text-transform: uppercase; color: var(--encre-3); margin: 10px 0 4px }
.ech-reperees { margin-top: 6px }
.puce-prop { border-style: dashed }
.alerte-volume { margin: 0 0 14px; padding: 10px 14px; border-radius: 10px; background: var(--t3-pale); color: var(--t3); font-weight: 700 }
.alerte-volume.atteint { background: var(--alerte-pale); color: var(--alerte) }
@media (max-width: 700px) { .cal-jour { min-height: 46px } .cal-ev { display: none } .cal-jour.cal-plein::after { content: ''; width: 6px; height: 6px; border-radius: 50%; background: var(--accent); align-self: center } }

/* dossier long (18/11/2026) */
.mention.mention-long { color: var(--t3); font-weight: 700 }

/* double vérification et conservation (18/11/2026) */
.qr-double { width: 200px; max-width: 100%; margin: 10px 0; background: #fff; padding: 6px; border-radius: 8px }
.qr-double svg { display: block; width: 100%; height: auto }
.etapes-double { margin: 8px 0 0; padding-left: 20px; display: flex; flex-direction: column; gap: 14px }
.liste-conservation { margin: 0; padding-left: 18px; display: flex; flex-direction: column; gap: 6px }
.pile { display: flex; flex-direction: column; gap: 10px; align-items: flex-start }

/* ---------- logo de la commune (30/11/2026) : pastille ronde pour un blason, cadre arrondi pour un logo en longueur ---------- */
.qui-logo { width: 36px; height: 36px; border-radius: 50%; background: #fff; object-fit: contain; flex: none }
.qui-logo.logo-large { width: auto; max-width: 150px; border-radius: 8px; padding: 4px 8px; box-sizing: border-box }
.hp-logo.logo-large { width: auto; max-width: 240px; border-radius: 12px; padding: 8px 14px; box-sizing: border-box }
