
  :root {
    /* Charte Agorha : marine du blason, or des chevrons. */
    --navy-900: #0B1F3D;
    --navy-800: #112A4D;
    --navy-700: #1A3A66;
    --navy-600: #264B80;
    --steel: #6B7483;
    --steel-light: #AEB6C3;
    --paper: #EFF2F7;
    --white: #FFFFFF;
    --or: #C9A240;          /* or de la marque : sur fond marine */
    --gold: #9C7A2B;        /* or lisible sur fond clair (texte) */
    --gold-pale: #F6EFDC;
    --ink: #16202E;
    --line: #CDD5E2;
    --danger: #A6342A;
    --font-titre: 'Saira Semi Condensed', 'Arial Narrow', sans-serif;
  }

  * { box-sizing: border-box; }
  html, body { background: var(--paper); margin: 0; }
  #app { font-family: 'Inter', system-ui, sans-serif; color: var(--ink); }
  #app.with-sidebar { display: flex; align-items: stretch; min-height: 100vh; }
  .sidebar { width: 258px; flex-shrink: 0; background: linear-gradient(180deg, var(--navy-900), var(--navy-800)); min-height: 100vh; padding: 20px 0 16px; display: flex; flex-direction: column; position: sticky; top: 0; align-self: flex-start; }
  .sidebar-brand { display: flex; align-items: center; gap: 12px; padding: 4px 20px 20px; border-bottom: 1px solid rgba(201,162,64,0.28); margin-bottom: 14px; }
  .sidebar-brand img { height: 44px; }
  .sidebar-brand .marque-texte { display: block; height: 19px; width: auto; }
  .sidebar-brand .site-subtitle { color: var(--steel-light); font-size: 10px; text-transform: uppercase; letter-spacing: 1.4px; margin-top: 6px; }
  .sidebar-scroll { flex: 1; overflow-y: auto; padding: 0 12px; }
  .sidebar-link { display: flex; align-items: center; gap: 10px; padding: 9px 12px; border-radius: 7px; color: rgba(255,255,255,0.8); text-decoration: none; font-size: 13.5px; font-weight: 500; cursor: pointer; background: none; border: none; width: 100%; text-align: left; margin-bottom: 2px; font-family: 'Inter', sans-serif; }
  .sidebar-link:hover { background: rgba(255,255,255,0.08); color: #fff; }
  .sidebar-link.active { background: rgba(255,255,255,0.12); color: #fff; font-weight: 600; box-shadow: inset 3px 0 0 var(--or); }
  .sidebar-link .ic { width: 18px; text-align: center; flex-shrink: 0; font-size: 14px; filter: grayscale(1) brightness(0) invert(1); opacity: 0.85; }
  .sidebar-link .ic.ic-logo { filter: none; opacity: 1; }
  .sidebar-group-toggle .ic { width: 18px; text-align: center; flex-shrink: 0; font-size: 14px; filter: grayscale(1) brightness(0) invert(1); opacity: 0.85; }
  .sidebar-brand .ic { filter: none; }
  .sidebar-badge { margin-left: auto; background: var(--danger); color: #fff; font-size: 10px; font-weight: 700; border-radius: 10px; padding: 1px 6px; flex-shrink: 0; }
  .sidebar-group-toggle .sidebar-badge { margin-left: 0; }
  .sidebar-group-toggle { display: flex; align-items: center; gap: 10px; padding: 9px 12px; border-radius: 7px; color: rgba(255,255,255,0.8); cursor: pointer; background: none; border: none; width: 100%; text-align: left; font-size: 13.5px; font-weight: 500; font-family: 'Inter', sans-serif; }
  .sidebar-group-toggle:hover { background: rgba(255,255,255,0.08); color: #fff; }
  .sidebar-group-toggle .chev { margin-left: auto; font-size: 10px; transition: transform 0.15s; flex-shrink: 0; }
  .sidebar-group.open .sidebar-group-toggle .chev { transform: rotate(180deg); }
  .sidebar-group-items { display: none; padding-left: 26px; }
  .sidebar-group.open .sidebar-group-items { display: block; }
  .sidebar-group-items .sidebar-link { font-size: 13px; padding: 7px 12px; }
  .sidebar-footer { padding: 14px 12px 4px; border-top: 1px solid rgba(255,255,255,0.1); margin-top: 10px; }
  .sidebar-logout { display: flex; align-items: center; gap: 10px; width: 100%; background: rgba(255,255,255,0.06); border: 1px solid rgba(255,255,255,0.2); color: #fff; padding: 9px 12px; border-radius: 7px; cursor: pointer; font-size: 13px; font-family: 'Inter', sans-serif; }
  .sidebar-logout:hover { background: rgba(255,255,255,0.14); }
  .sidebar-outil { margin-bottom: 7px; }

  /* ===== Centre de notifications ===== */
  .sidebar-outil .sidebar-badge { margin-left: auto; }
  .centre-fond { position: fixed; inset: 0; background: rgba(11,31,61,0.45); z-index: 900; }
  .centre-notifs { position: fixed; top: 0; right: 0; bottom: 0; width: min(410px, 100vw); box-sizing: border-box; z-index: 901;
    background: var(--white); box-shadow: -12px 0 40px rgba(11,31,61,0.25); overflow-y: auto; overscroll-behavior: contain;
    padding: 0 0 calc(18px + env(safe-area-inset-bottom)); }
  .centre-tete { position: sticky; top: 0; display: flex; align-items: center; justify-content: space-between; gap: 10px;
    padding: calc(16px + env(safe-area-inset-top)) 18px 14px; background: var(--navy-900); color: #fff; z-index: 1; }
  .centre-tete h2 { margin: 0; font-family: var(--font-titre); font-size: 20px; letter-spacing: .3px; display: flex; align-items: center; gap: 9px; color: #fff; }
  .centre-tete h2 svg { width: 20px; height: 20px; color: var(--or); }
  .centre-fermer { background: rgba(255,255,255,0.08); border: 1px solid rgba(255,255,255,0.22); color: #fff; width: 36px; height: 36px; border-radius: 8px; cursor: pointer; font-size: 15px; }
  .centre-fermer:hover { background: rgba(255,255,255,0.16); }
  .centre-cat { margin: 18px 18px 8px; font-size: 11px; font-weight: 700; text-transform: uppercase; letter-spacing: .8px; color: var(--steel); }
  .centre-ligne { display: flex; align-items: center; gap: 12px; width: calc(100% - 24px); margin: 0 12px 6px; padding: 12px 12px; box-sizing: border-box;
    background: var(--white); border: 1px solid var(--line); border-radius: 10px; cursor: pointer; text-align: left; font-family: inherit; font-size: 14px; color: var(--ink); }
  .centre-ligne:hover { border-color: var(--navy-700); background: var(--paper); }
  .centre-ligne .ic { flex: 0 0 34px; height: 34px; border-radius: 9px; background: var(--paper); color: var(--navy-800); display: flex; align-items: center; justify-content: center; font-size: 16px; }
  .centre-ligne .ic svg { width: 18px; height: 18px; }
  .centre-ligne .t { flex: 1; min-width: 0; overflow-wrap: anywhere; font-weight: 500; }
  .centre-ligne .n { flex: 0 0 auto; min-width: 22px; padding: 2px 7px; border-radius: 11px; background: var(--danger); color: #fff; font-size: 12px; text-align: center; font-variant-numeric: tabular-nums; }
  .centre-ligne .f { color: var(--steel); font-size: 18px; }
  .centre-ligne.alerte { border-color: #E6C4C0; }
  .centre-ligne.alerte .ic { background: #FBEAE8; color: var(--danger); }
  .centre-onglets { display: flex; gap: 6px; padding: 12px 12px 0; border-bottom: 1px solid var(--line); }
  .centre-onglets button { flex: 1; background: none; border: none; border-bottom: 3px solid transparent; padding: 10px 8px; font-family: inherit; font-size: 14px; font-weight: 600; color: var(--steel); cursor: pointer; }
  .centre-onglets button.on { color: var(--navy-900); border-bottom-color: var(--or); }
  .centre-onglets .n { display: inline-block; min-width: 18px; padding: 0 6px; border-radius: 9px; background: var(--danger); color: #fff; font-size: 11px; line-height: 18px; margin-left: 4px; }
  .reglage { display: flex; align-items: center; gap: 14px; margin: 0 12px 6px; padding: 12px 14px; border: 1px solid var(--line); border-radius: 10px; background: var(--white); }
  .reglage.principal { margin-top: 14px; border-color: var(--navy-700); background: var(--paper); }
  .reglage.estompe { opacity: .6; }
  .reglage .txt { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 2px; }
  .reglage .txt b { font-size: 14px; color: var(--ink); font-weight: 600; }
  .reglage .txt span { font-size: 12.5px; color: var(--steel); line-height: 1.4; }
  .reglage-aide { margin: 6px 16px 10px; font-size: 12.5px; line-height: 1.45; color: var(--steel); }
  .reglage-titre { margin: 22px 16px 2px; font-family: var(--font-titre); font-size: 17px; color: var(--navy-900); letter-spacing: .2px; }
  /* Interrupteur a glissiere */
  .interrupteur { position: relative; flex: 0 0 auto; width: 46px; height: 26px; cursor: pointer; }
  .interrupteur input { position: absolute; inset: 0; width: 100%; height: 100%; margin: 0; opacity: 0; cursor: pointer; z-index: 1; }
  .interrupteur .glissiere { position: absolute; inset: 0; border-radius: 13px; background: #C3CAD6; transition: background .18s ease; }
  .interrupteur .glissiere::after { content: ""; position: absolute; top: 3px; left: 3px; width: 20px; height: 20px; border-radius: 50%; background: #fff; box-shadow: 0 1px 3px rgba(0,0,0,.25); transition: transform .18s ease; }
  .interrupteur input:checked + .glissiere { background: #2E7D4F; }
  .interrupteur input:checked + .glissiere::after { transform: translateX(20px); }
  .interrupteur input:focus-visible + .glissiere { outline: 2px solid var(--or); outline-offset: 2px; }
  .interrupteur.off { cursor: not-allowed; opacity: .5; }
  .interrupteur.off input { cursor: not-allowed; }
  .centre-cat-action { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
  .centre-lien { background: none; border: none; padding: 0; font-family: inherit; font-size: 11.5px; font-weight: 600; text-transform: none; letter-spacing: 0; color: var(--navy-700); cursor: pointer; text-decoration: underline; }
  .centre-ligne.fil .t { display: flex; flex-direction: column; gap: 2px; }
  .centre-ligne.fil .t b { font-weight: 600; color: var(--ink); }
  .centre-ligne.fil .t small { font-size: 12.5px; color: var(--steel); line-height: 1.35; }
  .centre-ligne.fil .t em { font-style: normal; font-size: 11.5px; color: var(--steel-light); }
  .centre-ligne.fil.lue { background: var(--paper); }
  .centre-ligne.fil.lue .t b { font-weight: 500; color: var(--steel); }
  .point-nonlu { flex: 0 0 auto; width: 9px; height: 9px; border-radius: 50%; background: var(--danger); }
  .centre-historique { display: block; width: calc(100% - 24px); margin: 18px 12px 8px; padding: 10px; background: none; border: 1px dashed var(--line); border-radius: 10px; font-family: inherit; font-size: 13px; color: var(--steel); cursor: pointer; }
  .centre-historique:hover { border-color: var(--navy-700); color: var(--navy-800); }
  .centre-vide { text-align: center; padding: 48px 24px; color: var(--steel); }
  .centre-vide svg { width: 34px; height: 34px; color: #2E7D4F; }
  .centre-vide .t { margin: 10px 0 2px; font-weight: 700; color: var(--ink); font-size: 15px; }
  .centre-vide .s { margin: 0; font-size: 13px; }

  /* Mode sombre : les regles html.sombre sont generees a l'ouverture (voir genererThemeSombre). */
  html.sombre { color-scheme: dark; }
  .sidebar-outil.notif-off { border-style: dashed; color: rgba(255,255,255,0.85); }
  .main-content { flex: 1; min-width: 0; max-width: 1300px; margin: 0 auto; padding: 26px 2rem 3rem; }
  #app.with-sidebar.app-wide .main-content { max-width: 100%; }
  .mobile-topbar { display: none; }
  .sidebar-backdrop { display: none; }
  #app.app-wide:not(.with-sidebar) { max-width: 1500px; margin: 0 auto; }

  h1, h2, h3 { font-family: var(--font-titre); font-weight: 600; color: var(--navy-900); }
  h2 { font-size: 21px; margin: 0 0 12px; letter-spacing: 0.2px; }
  h3 { font-size: 16px; margin: 18px 0 10px; padding-bottom: 6px; border-bottom: 1px solid var(--line); }

  .card { background: var(--white); border: 1px solid var(--line); border-top: 3px solid var(--navy-700); border-radius: 6px; padding: 1.4rem; margin-bottom: 1rem; }

  .btn { background: var(--white); border: 1px solid var(--navy-700); color: var(--navy-800); border-radius: 5px; padding: 8px 16px; cursor: pointer; font-size: 13.5px; font-family: 'Inter', sans-serif; font-weight: 500; transition: background .12s; }
  .btn:hover { background: var(--paper); }
  .signature-zone { border: 2px dashed var(--line); border-radius: 8px; background: #fff; touch-action: none; display: block; width: 100%; max-width: 460px; height: 160px; cursor: crosshair; }
  .contrat-alerte { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; background: #FBEAE8; border: 1px solid #E6C4C0; border-left: 4px solid var(--danger); border-radius: 8px; padding: 13px 16px; margin: 18px 0 16px; }
  .contrat-alerte svg { width: 20px; height: 20px; flex: 0 0 auto; color: var(--danger); }
  .contrat-alerte .txt { flex: 1; min-width: 200px; font-size: 13px; color: var(--danger); font-weight: 600; line-height: 1.45; }
  .mention-rp { font-size: 10px; line-height: 1.4; color: rgba(174,180,188,0.75); text-align: center; padding: 0 12px 10px; }
  .auth-wrap .mention-rp { color: var(--steel); padding: 0; margin: -1.1rem 0 1.6rem; }
  .section-outils { margin-left: auto; display: flex; align-items: center; gap: 9px; flex-wrap: wrap; }
  .docs-acces { font-size: 11.5px; color: var(--steel); background: var(--paper); border: 1px solid var(--line); border-radius: 20px; padding: 3px 11px; }
  .contrat-ligne { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; background: var(--paper); border: 1px solid var(--line); border-left: 4px solid var(--navy-700); border-radius: 6px; padding: 12px 15px; }
  .contrat-ligne .contrat-icone { font-size: 20px; line-height: 1; }
  .deco-barrette { display: flex; gap: 3px; flex-wrap: wrap; margin-top: 6px; }
  .deco-ruban { height: 13px; width: auto; border: 1px solid var(--line); border-radius: 1px; cursor: help; opacity: .9; }
  .deco-ruban:hover { opacity: 1; }
  .fiche-entete { background: var(--navy-900); background-image: linear-gradient(135deg, var(--navy-900) 0%, var(--navy-700) 100%); border-radius: 10px; padding: 20px 24px; margin-bottom: 12px; display: flex; align-items: center; gap: 20px; flex-wrap: wrap; position: relative; overflow: hidden; }
  .fiche-entete::after { content: ""; position: absolute; right: -30px; top: -40px; width: 170px; height: 170px; border-radius: 50%; background: rgba(255,255,255,0.05); }
  .fiche-photo { width: 76px; height: 76px; border-radius: 12px; overflow: hidden; flex-shrink: 0; background: rgba(255,255,255,0.12); border: 1px solid rgba(255,255,255,0.22); display: flex; align-items: center; justify-content: center; position: relative; z-index: 1; }
  .fiche-photo img { width: 100%; height: 100%; object-fit: cover; }
  .fiche-photo span { font-family: var(--font-titre); font-size: 25px; font-weight: 700; color: rgba(255,255,255,0.85); }
  .fiche-ident { min-width: 0; flex: 1; position: relative; z-index: 1; }
  .fiche-nom { font-family: var(--font-titre); font-size: 25px; font-weight: 700; color: #fff; line-height: 1.15; }
  .fiche-grade { font-size: 13px; color: var(--or); margin-top: 4px; letter-spacing: 0.3px; }
  .fiche-nigend { font-size: 11.5px; color: rgba(255,255,255,0.6); margin-top: 3px; }
  .fiche-postes { font-size: 12.5px; color: rgba(255,255,255,0.88); margin-top: 6px; }
  .fiche-tags { display: flex; flex-direction: column; align-items: flex-end; gap: 5px; position: relative; z-index: 1; }
  .fiche-fonctions { display: flex; gap: 6px; flex-wrap: wrap; margin-top: 11px; padding-top: 11px; border-top: 1px solid var(--line); }
  .fiche-tag { font-size: 11px; border-radius: 20px; padding: 3px 11px; background: var(--paper); border: 1px solid var(--line); color: var(--navy-800); }
  .fiche-chip { font-size: 10.5px; border-radius: 20px; padding: 3px 11px; background: rgba(255,255,255,0.12); color: rgba(255,255,255,0.85); white-space: nowrap; }
  .fiche-chip.forte { background: var(--or); color: var(--navy-900); font-weight: 700; }
  .fiche-entete .deco-barrette { margin-top: 8px; }
  .fiche-entete .deco-ruban { border-color: rgba(255,255,255,0.3); }
  .fiche-lignes { display: grid; grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); gap: 10px; }
  .fiche-lignes > div { background: var(--paper); border-radius: 7px; padding: 9px 12px; }
  .fiche-lignes .l { display: block; font-size: 9.5px; text-transform: uppercase; letter-spacing: 0.6px; color: var(--steel); font-weight: 700; }
  .fiche-lignes .v { display: block; font-size: 13px; color: var(--ink); margin-top: 2px; word-break: normal; overflow-wrap: break-word; }
  @media (max-width: 640px) { .fiche-tags { align-items: flex-start; flex-direction: row; flex-wrap: wrap; max-width: 100%; } }
  .btn-discord { width: 100%; background: #5865F2; border-color: #5865F2; color: #fff; font-weight: 600; font-size: 14px; padding: 12px 16px; display: flex; align-items: center; justify-content: center; gap: 9px; }
  .btn-discord:hover { background: #4752C4; border-color: #4752C4; color: #fff; }
  .btn-discord .ic-discord { width: 21px; height: 16px; flex: 0 0 auto; }
  .attente-carte { display: flex; align-items: center; gap: 11px; flex-wrap: wrap; background: var(--white); border: 1px solid var(--line); border-left: 3px solid var(--gold); border-radius: 7px; padding: 8px 12px; margin-bottom: 6px; transition: box-shadow .15s ease; }
  .attente-carte:hover { box-shadow: 0 2px 8px rgba(16,32,56,.09); }
  .attente-init { width: 30px; height: 30px; border-radius: 50%; background: var(--navy-800); color: #fff; display: flex; align-items: center; justify-content: center; font-weight: 700; font-size: 11px; letter-spacing: 0.3px; flex-shrink: 0; }
  .attente-nom { font-size: 13.5px; font-weight: 600; color: var(--navy-900); }
  .abs-motifs { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 5px; }
  .abs-motifs .m { display: inline-flex; align-items: center; gap: 6px; font-size: 11.5px;
    border: 1px solid var(--line); border-radius: 20px; padding: 2px 10px 2px 3px; color: var(--ink); }
  .abs-motifs .m b { font-size: 9px; font-weight: 700; letter-spacing: .4px; color: #fff;
    border-radius: 20px; padding: 2px 7px; }
  .abs-motifs .m.rp b { background: var(--navy-700); }
  .abs-motifs .m.hrp b { background: #7A4F8C; }
  .abs-decision { margin-top: 4px; font-size: 11px; color: #2E6B4F; font-weight: 600; }
  .attente-infos { display: flex; gap: 11px; flex-wrap: wrap; font-size: 11.5px; color: var(--steel); margin-top: 1px; }
  .attente-infos b { color: var(--ink); font-weight: 600; }
  .attente-depuis { display: none; }
  .attente-actions { display: flex; gap: 6px; flex-shrink: 0; margin-left: auto; }
  .attente-ok { background: #2E6B37; border-color: #2E6B37; color: #fff; padding: 4px 13px; font-size: 12px; }
  .attente-ok:hover { background: #26592E; border-color: #26592E; color: #fff; }
  .attente-ko { color: var(--danger); border-color: #E6C4C0; padding: 4px 13px; font-size: 12px; }
  .attente-ko:hover { background: #FBEAE8; }
  .abs-ligne { display: flex; align-items: center; gap: 12px; border-left: 3px solid var(--steel); border-bottom: 1px solid var(--line); padding: 7px 0 7px 10px; }
  .abs-ligne:last-child { border-bottom: none; }
  .abs-ligne:hover { background: var(--paper); }
  .abs-nom { font-size: 12.5px; font-weight: 600; color: var(--navy-900); flex: 0 0 190px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
  .abs-periode { font-size: 12px; color: var(--navy-800); flex: 0 0 auto; white-space: nowrap; }
  .abs-duree { color: var(--steel); font-size: 11px; }
  .abs-motif { font-size: 11.5px; color: var(--steel); flex: 1 1 120px; min-width: 0; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
  .abs-refus { font-size: 11.5px; color: var(--danger); flex: 0 1 200px; min-width: 0; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
  .abs-boutons { display: flex; gap: 5px; align-items: center; flex-shrink: 0; margin-left: auto; }
  @media (max-width: 760px) { .abs-ligne { flex-wrap: wrap; } .abs-nom { flex-basis: 100%; } }
  .abs-vide { text-align: center; color: var(--steel); font-size: 12.5px; padding: 14px 12px; background: var(--paper); border-radius: 7px; }
  .abs-titre { font-family: var(--font-titre); font-size: 13.5px; font-weight: 700; color: var(--navy-900); border-left: 3px solid var(--steel); padding-left: 9px; margin-bottom: 10px; }
  .abs-compte { display: inline-flex; align-items: center; justify-content: center; min-width: 18px; height: 18px; border-radius: 9px; color: #fff; font-family: 'Inter', sans-serif; font-size: 10.5px; font-weight: 700; padding: 0 6px; vertical-align: 1px; margin-left: 4px; }
  .attente-vide { text-align: center; color: var(--steel); font-size: 13.5px; line-height: 1.6; padding: 32px 14px; background: var(--paper); border: 1px dashed var(--line); border-radius: 8px; }
  .attente-note { font-size: 12px; color: var(--steel); background: var(--paper); border-radius: 6px; padding: 10px 13px; margin-top: 12px; }
  .attente-mini { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; padding: 4px 0; border-bottom: 1px solid var(--line); }
  .attente-mini:last-child { border-bottom: none; }
  .attente-mini-nom { font-size: 12px; font-weight: 600; color: var(--navy-800); }
  .attente-mini-info { font-size: 11px; color: var(--steel-light); }
  .annonce-entete { border-radius: 8px 8px 0 0; padding: 22px 28px; display: flex; align-items: center; gap: 18px; flex-wrap: wrap; }
  .annonce-type { font-size: 10.5px; text-transform: uppercase; letter-spacing: 1.4px; color: var(--or); }
  .annonce-titre { font-family: var(--font-titre); color: #fff; margin: 4px 0 0; font-size: 24px; line-height: 1.22; letter-spacing: 0.2px; }
  .annonce-meta { color: rgba(255,255,255,0.72); font-size: 12.5px; margin-top: 7px; }
  .jour-entete { background: var(--navy-900); background-image: linear-gradient(135deg, var(--navy-900) 0%, var(--navy-700) 100%); border-radius: 8px 8px 0 0; padding: 20px 26px 20px; padding-right: 58px; display: flex; align-items: center; gap: 16px; flex-wrap: wrap; }
  .jour-bloc { background: rgba(255,255,255,0.12); border-radius: 8px; padding: 8px 12px; text-align: center; line-height: 1.05; flex-shrink: 0; }
  .jour-bloc .j { display: block; font-family: var(--font-titre); font-size: 26px; font-weight: 700; color: #fff; }
  .jour-bloc .m { font-size: 10px; text-transform: uppercase; letter-spacing: 1px; color: rgba(255,255,255,0.7); }
  .jour-sem { font-size: 11px; text-transform: uppercase; letter-spacing: 1.2px; color: var(--or); }
  .jour-date { font-family: var(--font-titre); font-size: 19px; font-weight: 700; color: #fff; margin-top: 2px; }
  .jour-nb { font-size: 11.5px; color: rgba(255,255,255,0.65); margin-top: 3px; }
  .jour-evt { background: var(--white); border: 1px solid var(--line); border-left: 4px solid var(--navy-700); border-radius: 7px; padding: 13px 16px; margin-bottom: 10px; }
  .jour-evt:last-child { margin-bottom: 0; }
  .jour-evt-tete { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; margin-bottom: 5px; }
  .jour-evt-cat { font-size: 10px; font-weight: 700; text-transform: uppercase; letter-spacing: 0.5px; color: #fff; border-radius: 3px; padding: 2px 8px; }
  .jour-evt-heure { font-size: 12px; font-weight: 600; color: var(--navy-700); }
  .jour-evt-clos { font-size: 10px; text-transform: uppercase; letter-spacing: 0.4px; color: var(--steel); background: var(--paper); border: 1px solid var(--line); border-radius: 3px; padding: 1px 7px; }
  .jour-evt-titre { font-family: var(--font-titre); font-size: 15.5px; margin: 0 0 3px; color: var(--navy-900); }
  .jour-evt-corps { margin-top: 7px; line-height: 1.55; font-size: 13.5px; text-align: justify; }
  .jour-evt-meta { margin-left: auto; font-size: 11.5px; color: var(--steel); }
  .jour-evt-pied { margin-top: 12px; padding-top: 11px; border-top: 1px solid var(--line); }
  .jour-evt-insc { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
  .jour-evt-insc .nb { font-size: 12px; color: var(--steel); }
  .jour-evt-actions { display: flex; gap: 6px; justify-content: flex-end; }
  .insc-liste { display: grid; grid-template-columns: repeat(auto-fill, minmax(190px, 1fr)); gap: 4px 14px; margin-top: 10px; }
  /* Formations à places limitées : liste d'attente et rang de la personne. */
  .insc-attente { margin-top: 12px; padding-top: 10px; border-top: 1px dashed var(--line); }
  .insc-attente-titre { font-size: 11px; font-weight: 700; text-transform: uppercase; letter-spacing: .5px; color: var(--steel); margin-bottom: 4px; }
  .insc-attente ol { margin: 0; padding-left: 20px; font-size: 12.5px; line-height: 1.6; }
  .insc-rang { margin-top: 8px; font-size: 12.5px; color: #8A6100; background: #FBF3DF; border-radius: 6px; padding: 7px 10px; }
  .mdl-aide { margin: -6px 0 12px; font-size: 12px; color: var(--steel); }
  /* Brouillon du nouveau ticket */
  .ticket-brouillon-etat { font-size: 12px; color: var(--steel); margin-left: 4px; }
  .lien-discret { background: none; border: none; padding: 0; font: inherit; color: var(--navy-600); text-decoration: underline; cursor: pointer; }
  .insc-item { display: flex; align-items: baseline; gap: 7px; font-size: 12.5px; color: var(--ink, #1c2a3f); min-width: 0; }
  .insc-gr { flex: 0 0 34px; font-size: 10.5px; font-weight: 700; color: var(--navy-700); letter-spacing: .3px; }
  .insc-nom { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
  /* Effectifs : recherche, filtres, absents */
  .eff-entete { margin: 1.5rem 0 12px; }
  .eff-ligne { display: flex; align-items: center; justify-content: space-between; gap: 12px 20px; flex-wrap: wrap; margin-bottom: 14px; }
  .eff-ligne .eff-barre { flex: 1 1 320px; max-width: 440px; margin-bottom: 0; }
  .eff-ligne .eff-sug { min-width: 340px; }
  .eff-ligne .eff-rapide { justify-content: flex-end; margin: 0; flex: 0 1 auto; }
  .eff-ligne .eff-rapide .lbl { display: none; }
  @media (max-width: 900px) { .eff-entete { margin: 1rem 0 10px; } .eff-ligne { display: block; } .eff-ligne .eff-barre { max-width: none; } .eff-ligne .eff-rapide { justify-content: flex-start; margin-top: 10px; } .eff-ligne .eff-rapide .lbl { display: inline; } }
  .eff-barre { position: relative; margin-bottom: 14px; }
  .eff-champ { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; background: var(--white); border: 1px solid var(--line); border-radius: 8px; padding: 5px 10px; min-height: 42px; box-sizing: border-box; }
  .eff-champ:focus-within { border-color: var(--navy-600); box-shadow: 0 0 0 3px rgba(43,76,120,.12); }
  .eff-champ input { margin: 0 !important; height: 30px; border: 0 !important; outline: none !important; box-shadow: none !important; border-radius: 0 !important; flex: 1; min-width: 160px; font-size: 14px; background: transparent; padding: 5px 2px; width: auto; }
  .eff-chip { display: inline-flex; align-items: center; gap: 6px; background: #E8EEF7; color: var(--navy-800); border-radius: 14px; padding: 3px 5px 3px 10px; font-size: 12.5px; font-weight: 500; }
  .eff-chip b { font-weight: 700; color: var(--steel); }
  .eff-chip button { border: 0; background: rgba(0,0,0,.08); border-radius: 50%; width: 18px; height: 18px; line-height: 16px; font-size: 10px; cursor: pointer; padding: 0; color: inherit; }
  .eff-sug { position: absolute; left: 0; right: 0; top: 100%; margin-top: 4px; background: var(--white); border: 1px solid var(--line); border-radius: 8px; box-shadow: 0 8px 24px rgba(16,32,56,.14); z-index: 20; overflow: hidden; max-height: 340px; overflow-y: auto; }
  .eff-sug .grp { font-size: 10.5px; text-transform: uppercase; letter-spacing: .6px; color: var(--steel); padding: 8px 14px 3px; background: var(--paper); }
  .eff-sug .it { padding: 8px 14px; font-size: 13.5px; display: flex; justify-content: space-between; gap: 10px; cursor: pointer; }
  .eff-sug .it.on, .eff-sug .it:hover { background: #EEF3FA; }
  .eff-sug .it span { color: var(--steel); font-size: 12px; white-space: nowrap; }
  .eff-rapide { display: flex; gap: 8px; margin: 0 0 14px; flex-wrap: wrap; align-items: center; }
  .eff-pill .n { opacity: .6; margin-left: 4px; font-size: 11.5px; }
  .eff-pill.perso { border-style: dashed; color: var(--steel); }
  .eff-perso-grp { font-size: 10.5px; text-transform: uppercase; letter-spacing: .6px; color: var(--steel); margin: 12px 0 4px; }
  .eff-perso-grille { display: grid; grid-template-columns: repeat(auto-fill, minmax(210px, 1fr)); gap: 2px 14px; }
  .eff-perso-grille label { display: flex; align-items: center; gap: 8px; font-weight: 400; font-size: 13px; padding: 3px 0; cursor: pointer; }
  .eff-perso-grille input { width: auto; margin: 0; }
  .eff-rapide .lbl { font-size: 12px; color: var(--steel); }
  .eff-pill { border: 1px solid var(--line); background: var(--white); border-radius: 14px; padding: 3px 11px; font-size: 12.5px; cursor: pointer; font-family: inherit; color: var(--ink); }
  .eff-pill.on { background: var(--navy-800); color: #fff; border-color: transparent; }
  tr.eff-abs td { background: rgba(107,76,154,.06); }
  tr.eff-abs td:first-child { box-shadow: inset 3px 0 0 rgba(107,76,154,.55); }
  tr.eff-abs td:not(:nth-child(2)) { color: var(--steel); }
  .eff-abs-badge { display: inline-block; margin-left: 8px; color: #5B3F8A; background: rgba(107,76,154,.11); font-size: 10.5px; font-weight: 600; border-radius: 10px; padding: 1px 9px; white-space: nowrap; }
  .jour-vide { text-align: center; color: var(--steel); font-size: 13px; padding: 28px 10px; background: var(--paper); border: 1px dashed var(--line); border-radius: 8px; }
  .pat-horaires { display: grid; grid-template-columns: 1.4fr 1fr 1fr; gap: 12px; margin-bottom: 4px; }
  .pat-horaires label { display: block; margin-bottom: 5px; }
  .pat-horaires input { width: 100%; box-sizing: border-box; margin-bottom: 0; }
  @media (max-width: 560px) { .pat-horaires { grid-template-columns: 1fr; } }
  .pat-pagination { display: flex; align-items: center; justify-content: center; gap: 10px; margin-top: 12px; }
  .pat-format { display: inline-flex; align-items: center; justify-content: center; font-size: 10.5px; font-weight: 700; letter-spacing: 0.6px; color: #fff; background: var(--navy-700); border-radius: 4px; padding: 3px 9px; }
  .pat-ligne { display: flex; align-items: center; gap: 14px; flex-wrap: wrap; background: var(--white); border: 1px solid var(--line); border-left: 4px solid var(--navy-700); border-radius: 7px; padding: 11px 15px; margin-bottom: 8px; transition: box-shadow .15s ease, transform .15s ease; }
  .pat-ligne:hover { box-shadow: 0 2px 10px rgba(16,32,56,.10); }
  .pat-jour { min-width: 52px; text-align: center; line-height: 1.1; }
  .pat-jour .n { font-family: var(--font-titre); font-size: 20px; font-weight: 700; color: var(--navy-800); display: block; }
  .pat-jour .m { font-size: 9.5px; text-transform: uppercase; letter-spacing: 0.6px; color: var(--steel); }
  .pat-chiffres { display: flex; gap: 7px; flex-wrap: wrap; }
  .pat-puce { display: inline-flex; align-items: baseline; gap: 5px; background: var(--paper); border: 1px solid var(--line); border-radius: 20px; padding: 3px 11px; font-size: 11.5px; color: var(--steel); }
  .pat-puce b { font-size: 13px; color: var(--navy-800); }
  .pat-tuiles { display: flex; gap: 8px; flex-wrap: wrap; }
  .pat-tuile { display: inline-flex; align-items: baseline; gap: 7px; background: var(--paper); border: 1px solid var(--line); border-radius: 20px; padding: 4px 13px; }
  .pat-tuile .v { font-family: var(--font-titre); font-size: 15px; font-weight: 700; color: var(--navy-800); line-height: 1; }
  .pat-tuile .l { font-size: 10.5px; text-transform: uppercase; letter-spacing: 0.5px; color: var(--steel); }
  .pat-table th, .pat-table td { padding: 6px 9px; }
  .pat-table tbody td:first-child { font-size: 12.5px; }
  .pat-table .zero { color: #C3CAD6; }
  .pat-sous { background: var(--paper); font-size: 10px; text-transform: uppercase; letter-spacing: 0.6px; color: var(--steel); font-weight: 700; }
  .pat-zone { border: 1px dashed var(--line); border-radius: 8px; background: var(--paper); min-height: 130px; padding: 9px; }
  .pat-zone.survol { border-color: var(--navy-700); background: #E7EDF6; }
  .pat-chip { display: flex; align-items: center; gap: 7px; background: #fff; border: 1px solid var(--line); border-radius: 6px; padding: 5px 9px; margin-bottom: 6px; font-size: 12.5px; cursor: grab; user-select: none; }
  .pat-chip:active { cursor: grabbing; }
  .pat-chip.pris { opacity: .45; }
  .pat-grille { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
  @media (max-width: 720px) { .pat-grille { grid-template-columns: 1fr; } }
  .svc-modal { padding-left: 28px; padding-right: 28px; padding-bottom: 26px; background: var(--paper); border-radius: 0 0 8px 8px; }
  .svc-bloc { border: 1px solid var(--line); border-radius: 9px; padding: 16px 17px; margin-bottom: 14px; background: var(--white); }
  .svc-bloc > .t { font-size: 10.5px; text-transform: uppercase; letter-spacing: 0.7px; color: var(--steel); font-weight: 600; margin-bottom: 11px; }
  .svc-duo { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
  .svc-duo label { display: block; margin-bottom: 5px; }
  .svc-duo input, .svc-duo select { width: 100%; box-sizing: border-box; margin-bottom: 0; }
  @media (max-width: 560px) { .svc-duo { grid-template-columns: 1fr; } }
  .svc-colonne { font-size: 10.5px; text-transform: uppercase; letter-spacing: 0.6px; color: var(--steel); margin-bottom: 7px; }
  .svc-tags { display: flex; gap: 7px; flex-wrap: wrap; }
  .svc-tag { border: 1px solid var(--line); background: var(--white); border-radius: 20px; padding: 6px 14px; font-size: 12.5px; cursor: pointer; color: var(--ink); font-family: inherit; transition: background .15s, border-color .15s, color .15s; }
  .svc-tag:hover { border-color: var(--navy-600); }
  .svc-tag.on { background: var(--navy-700); border-color: var(--navy-700); color: #fff; }
  .svc-recherche { max-width: 320px; margin: 12px 0 0; font-size: 12px; padding: 5px 10px; }
  .pat-chip.hors-unite { border-style: dashed; }
  .pat-chip .hu { margin-left: 7px; font-size: 9.5px; text-transform: uppercase; letter-spacing: .5px; color: var(--gold); font-weight: 700; }
  .svc-carte { border: 1px solid var(--line); border-left: 3px solid var(--line); border-radius: 7px; background: #fff; padding: 9px 11px; margin-bottom: 7px; cursor: grab; }
  .svc-carte:active { cursor: grabbing; }
  .svc-carte.chef { border-left-color: var(--gold); background: #FFFCF4; }
  .svc-carte .h { display: flex; align-items: center; gap: 8px; }
  .svc-carte .nom { flex: 1; min-width: 0; font-size: 12.5px; font-weight: 600; }
  .svc-etoile { background: none; border: none; cursor: pointer; font-size: 16px; line-height: 1; color: #C9D2DE; padding: 0; }
  .svc-etoile.on { color: var(--gold); }
  .svc-retirer { background: none; border: none; cursor: pointer; color: var(--steel); font-size: 12px; padding: 0 2px; }
  .svc-retirer:hover { color: #B3261E; }
  /* ---- Suivis judiciaires ---- */
  .suivi-bandeau { display: flex; align-items: baseline; gap: 12px; margin-bottom: 14px; }
  .suivi-bandeau h2 { margin: 0; }
  .suivi-compte { font-size: 12px; color: var(--steel); }
  .suivi-carte { padding: 10px 14px 12px; }
  .suivi-carte th { padding: 9px 10px; border-bottom: 1px solid var(--line); }
  .suivi-carte td { padding: 5px 10px; border-bottom: 1px solid var(--line); }
  .suivi-carte tbody tr:hover td { background: var(--paper); }
  th.suivi-identite, td.suivi-identite { text-align: left; white-space: nowrap; }
  td.suivi-identite .g { display: inline-block; min-width: 44px; font-size: 11px; font-weight: 600; color: var(--steel); }
  td.suivi-identite .n { font-size: 13px; font-weight: 600; color: var(--navy-900); }
  th.suivi-date, td.suivi-date { white-space: nowrap; font-variant-numeric: tabular-nums; color: var(--steel); font-size: 12.5px; }
  th.suivi-cell, td.suivi-cell { text-align: center; }
  .compteur { display: inline-flex; align-items: center; gap: 4px; padding: 2px; border-radius: 14px; background: var(--paper); border: 1px solid var(--line); }
  .compteur .n { min-width: 22px; text-align: center; font-weight: 700; font-size: 13px; font-variant-numeric: tabular-nums; }
  .compteur .stat-btn { width: 20px; height: 20px; border: none; border-radius: 50%; cursor: pointer; font-weight: 700; line-height: 1; background: #fff; color: var(--steel); box-shadow: 0 1px 2px rgba(16,32,56,.12); }
  .compteur .stat-btn:hover { color: var(--navy-800); }
  .compteur.bon { background: #E6F2E8; border-color: #C3E0C9; }
  .compteur.bon .n { color: #2E6B37; }
  .compteur.vice { background: #FBE9E7; border-color: #F0C9C4; }
  .compteur.vice .n { color: #A3322A; }
  .compteur.vide { background: var(--paper); border-color: var(--line); }
  .compteur.vide .n { color: var(--steel); }
  .mail-avatar.vide, .avatar.vide { background: #DFE6EF; padding: 0; }
  .fiche-photo.vide, .attente-init.vide, .av.vide { background: #DFE6EF; padding: 0; overflow: hidden; }
  .fiche-photo.vide .silhouette, .attente-init.vide .silhouette, .av.vide .silhouette { width: 100%; height: 100%; }
  .attente-init img, .av img { width: 100%; height: 100%; object-fit: cover; display: block; }
  .attente-init, .av { overflow: hidden; }
  .silhouette { width: 100%; height: 100%; display: block; }
  .avatar.vide { overflow: hidden; }
  .ticket-groupe.compacte .ticket-card { min-height: 0; }
  .ticket-groupe.compacte .ticket-card .body { padding: 8px 12px; }
  .ticket-groupe.compacte .ticket-card .obj { font-size: 13px; }
  .ticket-groupe.compacte .ticket-card .meta { font-size: 11px; margin-top: 2px; gap: 10px; }
  .ticket-groupe.compacte .ticket-card .ticket-type { font-size: 9.5px; padding: 1px 6px; }
  .ticket-groupe.compacte .ticket-card .side { padding: 8px 12px; }
  .tab-pastille { display: inline-flex; align-items: center; justify-content: center; min-width: 19px; height: 19px; padding: 0 6px; margin-left: 7px; border-radius: 10px; background: var(--danger); color: #fff; font-size: 11px; font-weight: 700; line-height: 1; vertical-align: 1px; }
  .tab-btn.active .tab-pastille { background: var(--danger); }
  .dossier { display: flex; align-items: center; gap: 14px; background: var(--white); border: 1px solid var(--line); border-left: 4px solid var(--teinte, var(--steel)); border-radius: 10px; padding: 12px 16px; margin-bottom: 9px; }
  .dossier-corps { flex: 1; min-width: 0; }
  .dossier-nom { font-size: 13.5px; font-weight: 600; color: var(--navy-900); }
  .dossier-meta { font-size: 11.5px; color: var(--steel); margin-top: 2px; }
  .dossier-rdv { color: var(--gold); font-weight: 600; }
  .dossier-statut { flex: 0 0 auto; }
  .dossier-statut .statut-select { margin-bottom: 0; width: auto; display: inline-block; font-size: 12.5px; padding: 5px 10px; }
  .dossier-actions { display: flex; gap: 6px; flex: 0 0 auto; }
  .dossier-actions .btn { padding: 5px 11px; font-size: 12px; }
  @media (max-width: 860px) { .dossier { flex-wrap: wrap; } .dossier-actions { width: 100%; } }
  .ticket-filtre { display: flex; align-items: center; gap: 10px; margin-bottom: 18px; }
  .ticket-filtre label { margin: 0; font-size: 12.5px; color: var(--steel); text-transform: none; letter-spacing: 0; }
  .ticket-groupe { margin-bottom: 22px; }
  .ticket-groupe .tete { display: flex; align-items: baseline; gap: 10px; margin-bottom: 10px; padding-bottom: 7px; border-bottom: 1px solid var(--line); }
  .ticket-groupe .tete .pastille { width: 8px; height: 8px; border-radius: 50%; align-self: center; flex: 0 0 auto; }
  .ticket-groupe .tete h3 { margin: 0; font-family: var(--font-titre); font-size: 16px; font-weight: 600; color: var(--navy-900); }
  .ticket-groupe .tete .n { font-size: 11.5px; color: var(--steel); margin-left: auto; }
  .ticket-empty { text-align: center; padding: 54px 24px; border: 1px solid var(--line); border-radius: 12px; background: var(--white); }
  .ticket-empty .t { margin: 0; font-family: var(--font-titre); font-size: 18px; font-weight: 600; color: var(--navy-900); }
  .ticket-empty .s { margin: 8px auto 0; max-width: 46ch; font-size: 13px; line-height: 1.6; color: var(--steel); }
  .ticket-empty .btn { margin-top: 18px; }
  /* ---- Tutorat ---- */
  .tut-table th.tut-tuteur, .tut-table td.tut-tuteur { text-align: left; width: 55%; }
  .tut-table td.tut-tuteur select { max-width: 320px; }
  .tut-nom { display: inline-flex; align-items: center; gap: 9px; font-size: 13px; }
  .tut-nom .pastille { width: 24px; height: 24px; border-radius: 50%; background: var(--navy-700); color: #fff; display: inline-flex; align-items: center; justify-content: center; font-size: 11.5px; font-weight: 700; }
  .tut-vide { font-size: 12.5px; color: var(--gold); font-weight: 600; }
  .tut-table tr.sans-tuteur td.suivi-identite { box-shadow: inset 3px 0 0 0 var(--gold); }
  /* ---- Presences ---- */
  .pres-bandeau { display: flex; align-items: center; gap: 18px; flex-wrap: wrap; margin-bottom: 14px; }
  .pres-bandeau h2 { margin: 0; }
  .pres-semaine { display: flex; align-items: center; gap: 10px; }
  .pres-semaine span { font-weight: 600; font-size: 13.5px; white-space: nowrap; }
  .pres-semaine .btn { padding: 5px 12px; }
  .pres-regle { margin-left: auto; font-size: 12px; color: var(--steel); }
  .pres-carte { padding: 8px 10px 10px; }
  .pres-box { display: flex; align-items: stretch; margin: 0 auto; width: 128px; height: 26px; border: 1px solid; border-radius: 7px; overflow: hidden; box-sizing: border-box; }
  .pres-box select { flex: 1 1 auto; min-width: 0; width: 100%; height: 100%; margin: 0; border: 0; border-radius: 0; background: transparent;
    font-size: 11px; font-weight: 500; padding: 0 4px 0 8px; cursor: pointer; box-shadow: none; text-align: center; text-align-last: center; }
  .pres-box input.presence-heures { flex: 0 0 40px; width: 40px; height: 100%; margin: 0; border: 0; border-left: 1px solid rgba(0,0,0,.14); border-radius: 0;
    background: rgba(255,255,255,.75); color: var(--navy-900); font-size: 11.5px; font-weight: 600; text-align: center; padding: 0 2px; box-shadow: none; }
  .pres-box select:focus, .pres-box input:focus { outline: none; border-color: transparent; }
  .pres-box:focus-within { outline: 2px solid var(--navy-600); outline-offset: 1px; }
  .pres-box .pres-lib { flex: 1; display: flex; align-items: center; justify-content: center; font-size: 10.5px; font-weight: 500; white-space: nowrap; }
  .presence-table th { border-bottom: 1px solid var(--line); padding: 8px 6px; }
  .presence-table td { border-bottom: 1px solid var(--line); padding: 3px 6px; }
  .presence-table tbody tr:hover td { background: var(--paper); }
  .presence-table th.pres-jour { text-align: center; text-transform: none; letter-spacing: 0; }
  .presence-table th.pres-jour .j { display: block; font-size: 12px; color: var(--navy-800); }
  .presence-table th.pres-jour .d { display: block; font-size: 11px; font-weight: 400; color: var(--steel); margin-top: 1px; }
  .presence-table th.pres-jour.aujourdhui { border-bottom: 2px solid var(--gold); }
  .presence-table th.pres-jour.aujourdhui .j { color: var(--gold); }
  .presence-table th.pres-identite, .presence-table td.pres-identite { text-align: left; white-space: nowrap; }
  .pres-grade { display: inline-block; min-width: 42px; font-size: 11px; font-weight: 600; color: var(--steel); }
  .pres-nom { font-size: 13px; font-weight: 600; color: var(--navy-900); }
  .presence-table th.pres-total, .presence-table td.pres-total { text-align: center; }
  .pres-total span { display: inline-flex; align-items: center; justify-content: center; min-width: 28px; height: 22px; border-radius: 11px; font-weight: 700; font-size: 12.5px; background: var(--paper); color: var(--steel); }
  .pres-total span.atteint { background: #E3F1E4; color: #2E6B37; }
  /* ---- Espaces documentaires ---- */
  .doc-rubrique { background: var(--white); border: 1px solid var(--line); border-radius: 12px; padding: 22px 24px 24px; margin-bottom: 20px; }
  .doc-rubrique-tete { display: flex; align-items: baseline; gap: 12px; flex-wrap: wrap; padding-bottom: 12px; border-bottom: 2px solid var(--accent, var(--navy-700)); margin-bottom: 4px; }
  .doc-rubrique-tete h3 { margin: 0; font-family: var(--font-titre); font-size: 19px; font-weight: 600; color: var(--navy-900); letter-spacing: -0.01em; }
  .doc-compte { font-size: 12px; color: var(--steel); }
  .doc-rubrique-tete .section-outils { margin-left: auto; display: flex; align-items: center; gap: 6px; min-width: 0; }
  .doc-ajout-btn { margin-left: auto; background: none; border: none; font-family: inherit; font-size: 12.5px; font-weight: 600; color: var(--navy-700); cursor: pointer; padding: 2px 4px; border-bottom: 1px solid transparent; }
  .doc-ajout-btn:hover { border-bottom-color: var(--navy-700); }
  .doc-rubrique-tete .section-outils + .doc-ajout-btn { margin-left: 0; }
  .doc-formulaire { display: grid; grid-template-columns: 1fr 1.4fr auto; gap: 9px; margin: 16px 0 4px; }
  .doc-formulaire input { margin-bottom: 0; width: 100%; box-sizing: border-box; }
  @media (max-width: 760px) { .doc-formulaire { grid-template-columns: 1fr; } }
  .doc-liste { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 2px 26px; margin-top: 10px; }
  .doc-piece { display: flex; align-items: center; gap: 13px; padding: 13px 8px 13px 0; text-decoration: none; color: inherit; border-bottom: 1px solid var(--line); position: relative; min-width: 0; }
  .doc-piece:last-child { border-bottom: none; }
  .doc-glyphe { flex: 0 0 auto; width: 34px; height: 34px; display: flex; align-items: center; justify-content: center; font-size: 15px; color: var(--teinte, var(--navy-700)); background: color-mix(in srgb, var(--teinte, #1A3A66) 9%, #fff); border-radius: 8px; }
  .doc-corps { display: flex; flex-direction: column; min-width: 0; gap: 2px; }
  .doc-titre { font-size: 13.5px; font-weight: 600; color: var(--navy-900); line-height: 1.35; word-break: normal; overflow-wrap: break-word; }
  .doc-nature { font-size: 11.5px; color: var(--steel); }
  .doc-piece:hover .doc-titre { color: var(--teinte, var(--navy-700)); }
  .doc-piece:hover .doc-glyphe { background: color-mix(in srgb, var(--teinte, #1A3A66) 16%, #fff); }
  .doc-actions { margin-left: auto; display: flex; align-items: center; gap: 2px; opacity: 0; transition: opacity .12s ease; flex: 0 0 auto; }
  .doc-piece:hover .doc-actions, .doc-piece:focus-within .doc-actions { opacity: 1; }
  .doc-vide { margin: 16px 0 0; font-size: 12.5px; color: var(--steel); }
  .doc-piece.dragging { opacity: .4; }
  .doc-piece.drop-before { box-shadow: -3px 0 0 0 var(--navy-700); }
  .doc-piece.drop-after { box-shadow: 3px 0 0 0 var(--navy-700); }
  .docs-cat-grille .doc-liste { grid-template-columns: 1fr; }
  .docs-cat-grille { display: grid; gap: 16px; align-items: stretch; }
  .docs-cat-grille > .doc-rubrique { display: flex; flex-direction: column; }
  .docs-cat-grille .doc-liste { flex: 1 1 auto; align-content: start; }
  .docs-cat-grille > .doc-rubrique { margin: 0; min-width: 0; }
  
  
  .docs-cat-grille .doc-rubrique-tete { flex-wrap: wrap; row-gap: 8px; align-items: center; }
  .docs-cat-grille .doc-rubrique-tete h3 { flex: 1 1 100%; min-width: 0; }
  .docs-cat-grille .section-outils { flex: 1 1 100%; display: flex; align-items: center; gap: 6px; min-width: 0; }
  .docs-cat-grille .docs-acces { flex: 1 1 auto; min-width: 0; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
  .docs-cat-grille .section-outils .btn { flex: 0 0 auto; }
  @media (max-width: 1100px) { .docs-cat-grille { grid-template-columns: 1fr !important; } }
  .svc-outil { box-sizing: border-box; height: 32px; font-size: 12.5px; padding: 0 14px; }
  button.svc-outil { display: inline-flex; align-items: center; }
  select.svc-outil { padding: 0 32px 0 13px; line-height: 30px; }
  .svc-select { appearance: none; -webkit-appearance: none; background-color: var(--white); background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 10 6'%3E%3Cpath d='M1 1l4 4 4-4' fill='none' stroke='%231B3A63' stroke-width='1.6' stroke-linecap='round'/%3E%3C/svg%3E"); background-repeat: no-repeat; background-position: right 12px center; background-size: 9px; border: 1px solid var(--navy-700); color: var(--navy-800); border-radius: 5px; margin-bottom: 0; width: auto; height: auto; font-size: 12.5px; font-family: 'Inter', sans-serif; font-weight: 500; cursor: pointer; transition: background-color .12s; }
  .svc-select:hover { background-color: var(--paper); }
  .svc-select:focus { outline: none; box-shadow: 0 0 0 2px rgba(27,58,99,.15); }
  .svc-arch { display: flex; align-items: center; gap: 11px; background: var(--white); border: 1px solid var(--line); border-left: 3px solid var(--gold); border-radius: 6px; padding: 6px 12px; margin-bottom: 5px; font-size: 12.5px; cursor: pointer; transition: background .12s, box-shadow .12s; }
  .svc-arch:hover { background: var(--paper); box-shadow: 0 1px 6px rgba(16,32,56,.08); }
  .svc-arch .j { font-weight: 600; color: var(--navy-800); white-space: nowrap; min-width: 54px; }
  .svc-arch .h { color: var(--ink); white-space: nowrap; }
  .svc-arch .e { flex: 1; min-width: 0; color: var(--steel); font-size: 11.5px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
  .svc-arch .i { color: var(--steel); font-size: 11.5px; white-space: nowrap; }
  .svc-arch .c { color: var(--navy-700); font-size: 11.5px; white-space: nowrap; }
  @media (max-width: 720px) { .svc-arch .e, .svc-arch .c { display: none; } }
  .svc-mois { display: flex; align-items: baseline; gap: 10px; margin: 16px 0 9px; }
  .svc-mois .l { font-family: var(--font-titre); font-size: 15px; font-weight: 600; color: var(--navy-800); text-transform: capitalize; }
  .svc-mois .n { font-size: 11px; color: var(--steel); }
  .svc-mois::after { content: ""; flex: 1; height: 1px; background: var(--line); }
  .svc-armes { display: flex; gap: 5px; flex-wrap: wrap; margin-top: 9px; }
  .svc-arme { border: 1px solid var(--line); background: var(--white); color: var(--steel); border-radius: 5px; padding: 4px 9px; font-size: 11px; font-family: inherit; cursor: pointer; transition: background .15s, border-color .15s, color .15s; }
  .svc-arme:hover { border-color: var(--navy-600); color: var(--ink); }
  .svc-arme.on { background: var(--navy-700); border-color: var(--navy-700); color: #fff; font-weight: 500; }
  .svc-carte.chef .svc-arme.on { background: var(--gold); border-color: var(--gold); }
  .svc-chefmark { font-size: 9.5px; letter-spacing: 0.6px; text-transform: uppercase; color: var(--gold); font-weight: 700; margin-left: 4px; }
  .bs-tete { display: flex; align-items: center; gap: 12px; }
  .bs-tete > span:first-child { flex: 1; min-width: 0; }
  .bs-repressions { display: flex; flex-wrap: wrap; gap: 7px; }
  .bs-rep { display: inline-flex; align-items: center; gap: 8px; padding: 4px 6px 4px 11px; border: 1px solid var(--line); border-radius: 20px; background: var(--white); }
  .bs-rep .l { font-size: 12.5px; white-space: nowrap; }
  .bs-rep .compteur { padding: 0; border: none; background: none; gap: 2px; }
  .bs-rep .compteur .n { min-width: 18px; font-size: 12.5px; }
  .bs-rep .compteur button { width: 19px; height: 19px; }
  .sv-entete { display: flex; align-items: center; gap: 16px; flex-wrap: wrap; margin-bottom: 14px; }
  .sv-titre { display: flex; align-items: baseline; gap: 12px; }
  .sv-titre h2 { margin: 0; }
  .sv-nav { display: inline-flex; align-items: stretch; gap: 0; border: 1px solid var(--line); border-radius: 8px; overflow: hidden; }
  .sv-nav input[type="date"] { border: none; border-left: 1px solid var(--line); border-right: 1px solid var(--line);
    margin: 0; height: 32px; padding: 0 9px; font-size: 12.5px; font-family: inherit; color: var(--navy-800);
    background: var(--white); border-radius: 0; width: auto; }
  .sv-nav button { width: 30px; height: 32px; border: none; background: var(--white);
    cursor: pointer; color: var(--navy-800); font-size: 13px; }
  .sv-nav button:hover:not(:disabled) { background: var(--paper); }
  .sv-nav button:disabled { opacity: .3; cursor: default; }
  .sv-scelle { font-size: 12px; font-weight: 600; color: var(--steel); border: 1px dashed var(--line);
    border-radius: 20px; padding: 5px 13px; }
  .sv-jeton:disabled { cursor: default; opacity: .85; }
  .sv-actions { margin-left: auto; display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
  .sv-chiffres { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 12px; margin-bottom: 16px; }
  .sv-chiffre { background: var(--white); border: 1px solid var(--line); border-radius: 10px; padding: 13px 15px; position: relative; overflow: hidden; }
  .sv-chiffre::before { content: ""; position: absolute; left: 0; top: 0; bottom: 0; width: 3px; background: var(--navy-700); }
  .sv-chiffre .n { display: block; font-family: var(--font-titre); font-size: 26px; font-weight: 600; color: var(--navy-900); line-height: 1.05; }
  .sv-chiffre .l { display: block; font-size: 11px; color: var(--steel); margin-top: 2px; }
  @media (max-width: 760px) { .sv-chiffres { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
  .sv-colonnes { display: grid; grid-template-columns: 340px 1fr; gap: 16px; align-items: start; margin-bottom: 16px; }
  @media (max-width: 980px) { .sv-colonnes { grid-template-columns: 1fr; } }
  .pres-ferme { text-align: center; color: #B8BEC9; background: #F3F4F7; font-size: 16px; }
  .sv-bloc { background: var(--white); border: 1px solid var(--line); border-radius: 12px; padding: 16px 18px 18px; margin-bottom: 16px; }
  .sv-bloc > header { display: flex; align-items: center; gap: 12px; padding-bottom: 10px; margin-bottom: 14px; border-bottom: 1px solid var(--line); }
  .sv-bloc > header h3 { margin: 0; font-family: var(--font-titre); font-size: 16px; color: var(--navy-900); }
  .sv-bloc .sv-outils { margin-left: auto; display: flex; gap: 7px; align-items: center; flex-wrap: wrap; }
  .sv-perms { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 8px; }
  .sv-perm-l { display: flex; align-items: center; gap: 11px; padding: 9px 11px; border-radius: 9px;
    background: var(--paper); border: 1px solid var(--line); }
  .sv-perm-l .av { flex: 0 0 auto; width: 38px; height: 38px; border-radius: 9px; display: flex;
    align-items: center; justify-content: center; background: var(--teinte); color: #fff;
    font-size: 10.5px; font-weight: 700; letter-spacing: .2px; }
  .sv-perm-l .txt { min-width: 0; display: flex; flex-direction: column; gap: 1px; }
  .sv-perm-l .r { font-size: 10px; text-transform: uppercase; letter-spacing: .7px; color: var(--steel); font-weight: 600; }
  .sv-perm-l .n { font-size: 13px; font-weight: 600; color: var(--navy-900); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
  .sv-perm-l .sel { margin: 2px 0 0; padding: 3px 6px; font-size: 12.5px; font-weight: 600;
    color: var(--navy-900); background: var(--white); border: 1px solid var(--line); border-radius: 6px; max-width: 100%; }
  .sv-perm-l.vide { background: transparent; border-style: dashed; }
  .sv-perm-l.vide .av { background: var(--line); color: var(--steel); }
  .sv-perm-l.vide .n { color: var(--steel); font-weight: 400; font-style: italic; }
  .sv-note { margin: 12px 0 0; font-size: 11.5px; color: var(--steel); }
  .sv-perm { grid-template-columns: 1fr; gap: 9px; }
  .sv-permcase { border-left-color: var(--line); }
  .sv-permcase.ok { border-left-color: var(--navy-700); }
  /* ---- Archives des modules ---- */
  .mod-titre { display: flex; align-items: center; gap: 9px; margin: 22px 0 10px;
    font-family: var(--font-titre); font-size: 15px; color: var(--navy-900);
    padding-bottom: 7px; border-bottom: 2px solid var(--navy-700); }
  .mod-titre:first-child { margin-top: 0; }
  .mod-titre.archives { border-bottom-color: #2E6B4F; }
  .mod-titre span { font-family: 'Inter', sans-serif; font-size: 10.5px; font-weight: 700;
    color: var(--steel); background: var(--paper); border-radius: 20px; padding: 2px 9px; }
  .mod-filtres { margin-left: auto; display: flex; gap: 8px; flex-wrap: wrap; align-items: center; }
  /* Archives des formations : onglets par famille, sous-filtre, formateur */
  .mf-barre { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; margin: 0 0 12px; }
  .mf-onglets { display: inline-flex; flex-wrap: wrap; gap: 2px; background: var(--white); border: 1px solid var(--line); border-radius: 9px; padding: 3px; }
  .mf-o { display: inline-flex; align-items: center; gap: 6px; border: 0; background: none; color: var(--navy-800); border-radius: 6px; padding: 6px 12px; font: 500 13px 'Inter', sans-serif; cursor: pointer; transition: background .12s, color .12s; }
  .mf-o:hover { background: var(--paper); }
  .mf-o .n { font-size: 11px; color: var(--steel); font-weight: 600; }
  .mf-o.on { background: var(--navy-800); color: #fff; }
  .mf-o.on .n { color: rgba(255,255,255,.7); }
  .mf-form { margin-left: auto; display: inline-flex; align-items: center; gap: 8px; background: var(--white); border: 1px solid var(--line); border-radius: 9px; padding: 0 4px 0 12px; height: 38px; }
  .mf-form span { font-size: 12px; color: var(--steel); }
  .mf-form select { border: 0; background: transparent; font: 500 13px 'Inter', sans-serif; color: var(--navy-800); padding: 6px 4px; margin: 0; width: auto; max-width: 220px; cursor: pointer; }
  .mf-form select:focus { outline: none; }
  .mf-form.actif { border-color: var(--navy-800); box-shadow: inset 0 0 0 1px var(--navy-800); }
  .mf-sous { display: flex; flex-wrap: wrap; gap: 6px; margin: -2px 0 14px; }
  .mf-s { border: 0; background: none; color: var(--steel); font: 500 12.5px 'Inter', sans-serif; padding: 4px 10px; border-radius: 999px; cursor: pointer; }
  .mf-s:hover { color: var(--navy-800); background: var(--white); }
  .mf-s.on { color: var(--navy-900); background: var(--white); box-shadow: inset 0 0 0 1px var(--navy-700); }
  @media (max-width: 600px) { .mf-form { margin-left: 0; width: 100%; } .mf-form select { flex: 1; max-width: none; } }

  /* Suivi des MIP : chiffres, cartes des moniteurs, missions */
  .mip-kpi { grid-template-columns: repeat(4, minmax(0, 1fr)); }
  @media (max-width: 680px) { .mip-kpi { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
  .mip-outils { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; margin: 0 0 12px; }
  .mip-outils input[type=search] { flex: 1 1 220px; max-width: 320px; margin: 0; height: 38px; border: 1px solid var(--line); border-radius: 9px; padding: 0 12px; font: 400 13px 'Inter', sans-serif; background: var(--white); }
  .mip-outils input[type=search]:focus { outline: none; border-color: var(--navy-700); }
  .mip-carte[hidden] { display: none; }
  .mip-aucun { color: var(--steel); font-size: 13px; text-align: center; padding: 18px 0; margin: 0; }
  @media (max-width: 600px) { .mip-outils input[type=search] { max-width: none; } }
  .mip-grille { display: grid; grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); gap: 12px; }
  .mip-carte { background: var(--white); border: 1px solid var(--line); border-radius: 10px; padding: 12px 14px; display: flex; flex-direction: column; gap: 6px; }
  .mip-carte.alerte { border-color: #E9B8B3; }
  .mip-carte header { display: flex; align-items: flex-start; flex-wrap: wrap; gap: 6px 10px; }
  .mip-carte header .eff-av { width: 40px; height: 40px; }
  .mip-carte header .eff-av.vide { font-size: 13px; }
  .mip-carte header .id { flex: 1 1 110px; min-width: 0; display: flex; flex-direction: column; line-height: 1.25; padding-top: 2px; }
  .mip-carte header .n { font-weight: 600; color: var(--navy-900); font-size: 13.5px; overflow-wrap: anywhere; }
  .mip-carte header .g { font-size: 11.5px; color: var(--steel); }
  .mip-carte header .fo { margin-top: 0; }
  .mip-carte .fo, .mis-ligne .fo { font-size: 9.5px; font-weight: 700; letter-spacing: .3px; color: #fff; border-radius: 3px; padding: 2px 7px; background: var(--navy-700); }
  .mip-carte .fo.amip { background: #7A4F8C; }
  .mip-carte .fo.eip { background: var(--gold); }
  .mip-carte .fo.iip { background: var(--navy-900); }
  .mip-carte .fo.pj { background: #8B2E2E; }
  .mip-carte .fo.oapj { background: var(--gold); }
  .mip-carte header .fos { display: flex; flex: 0 0 100%; gap: 4px; flex-wrap: wrap; justify-content: flex-start; padding-left: 50px; margin-top: -2px; min-height: 18px; }
  .mip-histo { background: var(--paper); border-radius: 8px; padding: 7px 8px 5px; }
  .mip-histo-t { display: block; font-size: 10.5px; font-weight: 600; color: var(--steel); margin-bottom: 2px; }
  .mip-act { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 6px; }
  .mip-act .col { display: flex; flex-direction: column; align-items: center; gap: 2px; }
  .mip-act .v { font-size: 11px; font-weight: 700; color: var(--navy-900); line-height: 1; }
  .mip-act .v.zero { color: #A9B1BE; font-weight: 500; }
  .mip-act .barre { width: 100%; height: 30px; display: flex; align-items: flex-end; border-bottom: 1px solid #C9D1DD; }
  .mip-act .barre i { width: 100%; background: var(--navy-700); border-radius: 3px 3px 0 0; }
  .mip-act .l { font-size: 10px; color: var(--steel); white-space: nowrap; }
  .mip-chiffres { display: flex; justify-content: space-between; font-size: 12px; color: var(--steel); }
  .mip-chiffres b { color: var(--navy-900); font-size: 15px; font-weight: 700; margin-right: 2px; }
  .mip-ligne { font-size: 12px; color: var(--steel); }
  .mip-carte .pill { display: inline-block; font-size: 10.5px; font-weight: 700; border-radius: 20px; padding: 1px 9px; }
  .mip-carte .pill.ok { color: #2E6B4F; border: 1px solid #C3E0C9; }
  .mip-carte .pill.bientot { color: #9C7A2B; border: 1px solid #E8D8A8; }
  .mip-carte .pill.retard { color: #fff; background: #B3261E; }
  .mip-pills { display: flex; flex-wrap: wrap; gap: 5px; }
  .mip-pill { display: inline-block; font-size: 11px; font-weight: 600; border-radius: 999px; padding: 2px 9px; white-space: nowrap; }
  .mip-pill.vert { background: #E3EFE6; color: #1E5C3A; }
  .mip-pill.rouge { background: #FBEAEA; color: #A6342A; }
  .mip-pill.or { background: #F3EAD8; color: #6B4F1D; }
  .mip-carte footer { display: flex; gap: 6px; flex-wrap: wrap; margin-top: auto; padding-top: 10px; border-top: 1px solid var(--paper); }
  .mip-lien { display: inline-flex; align-items: center; gap: 4px; margin: 0; padding: 4px 10px; border: 1px solid #C9D3E1; background: var(--paper); border-radius: 6px; font: 600 12px 'Inter', sans-serif; color: var(--navy-800); cursor: pointer; transition: background .12s, border-color .12s, color .12s; }
  .mip-lien:hover { background: var(--navy-800); border-color: var(--navy-800); color: #fff; }
  .mip-lien.principal { background: var(--white); border-color: var(--navy-700); }
  .mis-ligne { background: var(--white); border: 1px solid var(--line); border-radius: 10px; padding: 11px 14px; display: flex; align-items: center; gap: 12px; margin-bottom: 8px; }
  .mis-ligne.retard { border-color: #E9B8B3; }
  .mis-txt { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 2px; }
  .mis-txt .t { font-weight: 600; color: var(--navy-900); font-size: 13.5px; }
  .mis-txt .t .pour { font-weight: 500; color: var(--navy-700); }
  .mis-txt .s { font-size: 12px; color: var(--steel); }
  .mis-txt .note { font-size: 12px; color: var(--navy-800); background: var(--paper); border-radius: 6px; padding: 5px 8px; margin-top: 4px; }
  .mis-etapes { display: flex; gap: 4px; flex-shrink: 0; }
  .mis-etapes span { font-size: 11px; padding: 3px 9px; border-radius: 999px; background: var(--paper); color: var(--steel); white-space: nowrap; }
  .mis-etapes span.fait { background: #DCE5F2; color: var(--navy-800); }
  .mis-etapes span.cour { background: var(--navy-800); color: #fff; }
  .mis-ligne.realisee .mis-etapes span.cour { background: #2E6B4F; }
  .mis-groupe { display: grid; grid-template-columns: 52px minmax(0,1fr); gap: 10px; align-items: start; margin: 4px 0 10px; }
  .mis-groupe-t { font-size: 10.5px; font-weight: 700; letter-spacing: .06em; color: var(--steel); padding-top: 8px; }
  .mis-groupe-t small { display: block; font-size: 10px; font-weight: 500; letter-spacing: 0; color: var(--steel); margin-top: 2px; }
  .mis-groupe[hidden] { display: none; }
  .mis-choix { display: flex; flex-wrap: wrap; gap: 6px; }
  .mis-mip { display: inline-flex; align-items: center; min-height: 32px; margin: 0; border: 1px solid var(--line); background: var(--white); color: var(--navy-800); border-radius: 999px; padding: 4px 12px; font: 500 12.5px 'Inter', sans-serif; line-height: 1.2; cursor: pointer; transition: background .12s, border-color .12s, color .12s; }
  .mis-mip:hover { border-color: var(--navy-600); }
  .mis-mip.on { background: var(--navy-800); border-color: var(--navy-800); color: #fff; }
  .mis-aide { margin: 4px 0 0; font-size: 12px; color: var(--steel); }
  @media (max-width: 600px) { .mis-groupe { grid-template-columns: 1fr; gap: 4px; } .mis-groupe-t { padding-top: 0; } }
  .mon-resume { display: flex; flex-wrap: wrap; gap: 8px 18px; font-size: 13px; color: var(--steel); margin-bottom: 10px; }
  .mon-resume b { color: var(--navy-900); font-size: 17px; margin-right: 3px; }
  .mon-formations { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 14px; }
  .mon-formations span { font-size: 12px; font-weight: 500; color: var(--navy-800); background: var(--paper); border-radius: 999px; padding: 3px 10px; }
  .mis-faites { margin: 6px 0 4px; }
  .mis-faites summary { cursor: pointer; font-size: 12.5px; color: var(--steel); margin-bottom: 8px; }
  @media (max-width: 680px) { .mis-ligne { flex-wrap: wrap; } .mis-etapes { order: 3; width: 100%; } }
  .mod-titre.recyclage { border-bottom-color: var(--gold); }
  .rec-encart { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; padding: 11px 15px;
    border-radius: 10px; border: 1px solid var(--line); border-left: 3px solid #2E6B4F;
    background: var(--white); margin-bottom: 14px; }
  .rec-encart.bientot { border-left-color: #9C7A2B; background: #FFFCF4; }
  .rec-encart.retard { border-left-color: #B3261E; background: #FDF6F5; }
  .rec-encart .t { font-size: 9.5px; font-weight: 700; letter-spacing: .4px; color: #fff;
    background: var(--navy-700); border-radius: 3px; padding: 2px 8px; }
  .rec-encart.bientot .t { background: #9C7A2B; }
  .rec-encart.retard .t { background: #B3261E; }
  .rec-encart .c { font-size: 12.5px; font-weight: 600; color: var(--navy-900); }
  .rec-encart .d { font-size: 11.5px; color: var(--steel); margin-left: auto; }
  .rec-chiffres { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; margin-bottom: 16px; }
  .rec-chiffre { background: var(--white); border: 1px solid var(--line); border-radius: 10px;
    padding: 13px 16px; position: relative; overflow: hidden; }
  .rec-chiffre::before { content: ""; position: absolute; left: 0; top: 0; bottom: 0; width: 3px; }
  .rec-chiffre.ok::before { background: #2E6B4F; }
  .rec-chiffre.bientot::before { background: #9C7A2B; }
  .rec-chiffre.retard::before { background: #B3261E; }
  .rec-chiffre .n { display: block; font-family: var(--font-titre); font-size: 26px;
    font-weight: 600; color: var(--navy-900); line-height: 1.05; }
  .rec-chiffre .l { display: block; font-size: 11px; color: var(--steel); margin-top: 2px; }
  @media (max-width: 680px) { .rec-chiffres { grid-template-columns: 1fr; } }
  table.rec-table { width: 100%; border-collapse: collapse; table-layout: fixed; min-width: 760px; }
  table.rec-table col.c-nom { width: 22%; } table.rec-table col.c-fo { width: 10%; }
  table.rec-table col.c-d1 { width: 11%; } table.rec-table col.c-d2 { width: 11%; }
  table.rec-table col.c-et { width: 11%; } table.rec-table col.c-src { width: 15%; }
  table.rec-table col.c-act { width: 20%; }
  table.rec-table td.act { padding-left: 8px; padding-right: 8px; overflow: visible; }
  table.rec-table th, table.rec-table td { overflow: hidden; text-overflow: ellipsis; }
  table.rec-table th { text-align: left; font-size: 10px; text-transform: uppercase; letter-spacing: .6px;
    color: var(--steel); font-weight: 600; padding: 11px 14px; background: var(--paper); border-bottom: 1px solid var(--line); }
  table.rec-table td { padding: 9px 14px; border-bottom: 1px solid var(--line); font-size: 12.5px; vertical-align: middle; }
  table.rec-table tbody tr:last-child td { border-bottom: none; }
  table.rec-table tbody tr { border-left: 3px solid transparent; }
  table.rec-table tbody tr.ok { border-left-color: #2E6B4F; }
  table.rec-table tbody tr.bientot { border-left-color: #9C7A2B; background: #FFFCF4; }
  table.rec-table tbody tr.retard { border-left-color: #B3261E; background: #FDF6F5; }
  table.rec-table .ident .g { display: inline-block; min-width: 40px; font-size: 9.5px; font-weight: 700;
    color: var(--steel); background: var(--paper); border-radius: 4px; padding: 2px 5px; text-align: center; margin-right: 7px; }
  table.rec-table .ident .n { font-weight: 600; color: var(--navy-900); }
  table.rec-table .num { font-variant-numeric: tabular-nums; white-space: nowrap; }
  table.rec-table .src { font-size: 11.5px; color: var(--steel); }
  .rec-table .fo { font-size: 9.5px; font-weight: 700; letter-spacing: .3px; color: #fff;
    border-radius: 3px; padding: 2px 7px; }
  .rec-table .fo.mip { background: var(--navy-700); }
  .rec-table .fo.amip { background: #7A4F8C; }
  .rec-table .pill { display: inline-block; font-size: 10.5px; font-weight: 700; border-radius: 20px;
    padding: 2px 10px; white-space: nowrap; }
  .rec-table .pill.ok { color: #2E6B4F; border: 1px solid #C3E0C9; }
  .rec-table .pill.bientot { color: #9C7A2B; border: 1px solid #E8D8A8; }
  .rec-table .pill.retard { color: #fff; background: #B3261E; }
  .rec-table .act { white-space: nowrap; }
  .rec-table .act { display: flex; align-items: center; gap: 5px; }
  .rec-table .act input { flex: 0 1 128px; min-width: 112px; width: 128px; margin: 0; padding: 4px 8px; font-size: 12px; height: 30px; box-sizing: border-box; }
  .rec-table .act .btn { flex: 0 0 auto; padding: 4px 10px; font-size: 11.5px; height: 30px; box-sizing: border-box; }
  .rec-table .act .rec-saisir { display: inline-flex; align-items: center; gap: 6px; font-weight: 600; }
  .rec-table .act .rec-saisir svg.ico { width: 14px; height: 14px; }
  .rec-rappel { background: var(--paper); border-radius: 8px; padding: 9px 12px; font-size: 12.5px; color: var(--ink); margin-bottom: 12px; }
  .rec-rappel span { color: var(--steel); }
  .rec-aide { margin: 6px 0 0; font-size: 11.5px; color: var(--steel); }
  .rec-effacer-lien { color: var(--danger); }
  /* Vue d'ensemble des formations */
  .vf-groupe { margin-bottom: 16px; }
  .vf-groupe-titre { font-size: 11px; font-weight: 700; text-transform: uppercase; letter-spacing: .7px; color: var(--steel); margin: 0 0 8px 2px; }
  .vf-grille { display: grid; grid-template-columns: repeat(auto-fill, minmax(210px, 1fr)); gap: 12px; }
  .vf-carte { --ton: #2E6B4F; --ton-clair: #E7F3EB; display: flex; align-items: center; gap: 12px; text-align: left; background: var(--white);
    border: 1px solid var(--line); border-radius: 12px; padding: 12px 14px; cursor: pointer; font: inherit; color: var(--ink);
    box-shadow: 0 1px 2px rgba(16,32,56,.04); transition: border-color .12s, box-shadow .12s, transform .12s; }
  .vf-carte.moyen { --ton: #B07A1E; --ton-clair: #FBF1DC; }
  .vf-carte.faible { --ton: #B3261E; --ton-clair: #FBE7E4; }
  .vf-carte.volontaire { --ton: #2F5A8C; --ton-clair: #E6EEF8; }
  .vf-carte:hover { border-color: var(--ton); box-shadow: 0 4px 14px rgba(16,32,56,.10); transform: translateY(-1px); }
  .vf-carte.on { border-color: var(--navy-800); box-shadow: 0 0 0 2px var(--navy-800) inset, 0 4px 14px rgba(16,32,56,.10); }
  .vf-anneau { width: 52px; height: 52px; flex-shrink: 0; }
  .vf-anneau .fond { fill: var(--ton-clair); stroke: #E7ECF3; stroke-width: 5; }
  .vf-anneau .plein { fill: none; stroke: var(--ton); stroke-width: 5; stroke-linecap: round; }
  .vf-anneau text { font: 700 12px 'Inter', sans-serif; fill: var(--ton); }
  .vf-carte-texte { display: flex; flex-direction: column; gap: 3px; min-width: 0; }
  .vf-nom { font-weight: 700; font-size: 14.5px; color: var(--navy-900); }
  .vf-chiffres { font-size: 12px; color: var(--steel); }
  .vf-chiffres b { color: var(--ink); }
  .vf-puce { align-self: flex-start; font-size: 11px; font-weight: 700; border-radius: 10px; padding: 1px 8px; }
  .vf-puce.afaire { color: var(--ton); background: var(--ton-clair); }
  .vf-puce.complet { color: #2E6B4F; background: #E7F3EB; }
  .vf-detail { margin-top: 8px; padding: 18px 20px; border-top: 3px solid var(--navy-800); }
  .vf-detail-tete { display: flex; align-items: center; gap: 14px; flex-wrap: wrap; margin-bottom: 14px; }
  .vf-detail-titre { flex: 1; min-width: 200px; }
  .vf-detail-titre h3 { margin: 0; font-size: 19px; color: var(--navy-900); }
  .vf-regle { display: block; margin-top: 3px; font-size: 12px; color: #8A6100; }
  .vf-stats { display: flex; gap: 8px; flex-wrap: wrap; }
  .vf-stat { font-size: 12px; border-radius: 8px; padding: 5px 10px; border: 1px solid var(--line); color: var(--steel); background: var(--paper); }
  .vf-stat b { font-size: 15px; margin-right: 2px; }
  .vf-stat.afaire b { color: #B3261E; } .vf-stat.ok b { color: #2E6B4F; } .vf-stat.nc b { color: var(--steel); } .vf-stat.eligible b { color: #2F5A8C; }
  .vf-detail-tete input { width: 230px; max-width: 100%; margin: 0; padding: 8px 11px; font-size: 13px; border-radius: 8px; }
  .vf-colonnes { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
  .vf-col { border: 1px solid var(--line); border-radius: 10px; overflow: hidden; background: var(--white); }
  .vf-col-titre { display: flex; align-items: center; gap: 8px; padding: 9px 14px; font-weight: 700; font-size: 13px; }
  .vf-col-titre span { font-size: 11.5px; border-radius: 10px; padding: 0 8px; color: #fff; }
  .vf-col.afaire .vf-col-titre { background: #FDF3F1; color: #9C3A2E; } .vf-col.afaire .vf-col-titre span { background: #B3261E; }
  .vf-col.eligible .vf-col-titre { background: #EEF3FA; color: #2F5A8C; } .vf-col.eligible .vf-col-titre span { background: #2F5A8C; }
  .vf-col.ok .vf-col-titre { background: #EEF7F1; color: #2E6B4F; } .vf-col.ok .vf-col-titre span { background: #2E6B4F; }
  .vf-col ul, .vf-nc ul { list-style: none; margin: 0; padding: 0; max-height: 440px; overflow-y: auto; }
  .vf-ligne { display: flex; align-items: center; gap: 10px; padding: 7px 14px; border-top: 1px solid var(--line); font-size: 13px; cursor: pointer; transition: background .1s; }
  .vf-ligne:hover { background: var(--paper); }
  .vf-ligne .mail-avatar { flex-shrink: 0; }
  .vf-qui { flex: 1; min-width: 0; display: flex; flex-direction: column; line-height: 1.25; }
  .vf-qui .n { font-weight: 600; color: var(--navy-900); overflow-wrap: break-word; }
  .vf-qui .g { font-size: 11px; color: var(--steel); }
  .vf-ligne .u { flex: 0 0 auto; font-size: 10.5px; font-weight: 600; color: var(--navy-700); background: #EEF2F8; border-radius: 8px; padding: 1px 7px; }
  .vf-ligne .d { flex: 0 0 auto; font-size: 11.5px; color: var(--steel); }
  .vf-vide { padding: 14px; font-size: 12.5px; color: var(--steel); border-top: 1px solid var(--line); }
  .vf-nc { margin-top: 14px; border: 1px dashed var(--line); border-radius: 10px; }
  .vf-nc summary { cursor: pointer; padding: 9px 14px; font-size: 12.5px; font-weight: 600; color: var(--steel); }
  .vf-nc .vf-ligne { opacity: .75; }
  @media (max-width: 700px){ .vf-colonnes { grid-template-columns: 1fr; } .vf-detail { padding: 14px; } }
  /* Fenêtre « Photo de profil obligatoire » */
  .ph-fenetre { padding: 22px 24px 18px; }
  .ph-entete h2 { margin: 6px 0 6px; font-size: 19px; color: var(--navy-900); }
  .ph-entete p { margin: 0; font-size: 13px; color: var(--ink); line-height: 1.5; }
  .ph-badge { display: inline-block; font-size: 10.5px; font-weight: 800; letter-spacing: .6px; text-transform: uppercase; color: #fff; background: #B3261E; border-radius: 10px; padding: 2px 9px; }
  .ph-corps { display: flex; gap: 18px; margin: 16px 0 14px; align-items: flex-start; }
  .ph-modele { margin: 0; flex: 0 0 140px; text-align: center; }
  .ph-modele-svg { width: 140px; height: auto; display: block; border-radius: 8px; box-shadow: 0 2px 10px rgba(16,32,56,.15); }
  .ph-modele figcaption { margin-top: 6px; font-size: 11px; font-weight: 700; text-transform: uppercase; letter-spacing: .5px; color: #2E6B4F; }
  .ph-regles { flex: 1; min-width: 0; font-size: 13px; }
  .ph-regles-titre { font-size: 11px; font-weight: 700; text-transform: uppercase; letter-spacing: .5px; margin: 0 0 4px; }
  .ph-regles-titre.ok { color: #2E6B4F; } .ph-regles-titre.non { color: #B3261E; margin-top: 10px; }
  .ph-regles ul { list-style: none; margin: 0; padding: 0; }
  .ph-regles li { position: relative; padding: 2px 0 2px 22px; line-height: 1.4; }
  .ph-regles ul.ok li::before { content: "✓"; position: absolute; left: 2px; color: #2E6B4F; font-weight: 800; }
  .ph-regles ul.non li::before { content: "✕"; position: absolute; left: 3px; color: #B3261E; font-weight: 800; }
  .ph-envoi { display: flex; align-items: center; gap: 14px; background: var(--paper); border-radius: 10px; padding: 12px 14px; }
  .ph-apercu { width: 64px; height: 64px; border-radius: 50%; overflow: hidden; flex-shrink: 0; background: #DFE6EF; display: flex; align-items: center; justify-content: center; }
  .ph-apercu img { width: 100%; height: 100%; object-fit: cover; }
  .ph-apercu svg { width: 70%; height: 70%; }
  .ph-envoi-texte { display: flex; flex-direction: column; gap: 5px; align-items: flex-start; min-width: 0; }
  .ph-envoi-texte .btn { display: inline-flex; align-items: center; gap: 6px; }
  .ph-envoi-texte .muted { font-size: 11.5px; overflow-wrap: anywhere; }
  .ph-pied { display: flex; justify-content: flex-end; gap: 8px; margin-top: 14px; }
  @media (max-width: 520px){ .ph-corps { flex-direction: column; align-items: center; } .ph-modele { flex-basis: auto; } }
  .s-pj { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; margin-top: 8px; }
  .s-pj .btn { display: inline-flex; align-items: center; gap: 6px; font-size: 12.5px; padding: 5px 12px; }
  .s-pj .btn .muted { font-size: 11.5px; }
  .s-pj-nom { font-size: 12.5px; color: var(--navy-800); font-weight: 600; overflow-wrap: anywhere; }
  .s-pj-retirer { border: none; background: none; color: var(--steel); cursor: pointer; font-size: 12px; margin-left: 4px; }
  .s-pj-retirer:hover { color: var(--danger); }
  .s-lm-note { display: inline-block; font-size: 12.5px; color: var(--steel); padding-top: 8px; }
  .apja-carte { display: flex; align-items: center; gap: 14px; flex-wrap: wrap; border-left: 3px solid var(--gold); }
  .apja-texte { flex: 1; min-width: 200px; display: flex; flex-direction: column; gap: 2px; font-size: 13px; }
  .apja-texte span { color: var(--steel); }
  .rec-table .ident .n { display: inline-block; max-width: calc(100% - 52px); overflow: hidden;
    text-overflow: ellipsis; white-space: nowrap; vertical-align: bottom; }
  @media (max-width: 900px) { .rec-table .src, .rec-table th:nth-child(6) { display: none; } }
  .mod-carte { background: var(--white); border: 1px solid var(--line); border-radius: 10px;
    margin-bottom: 7px; overflow: hidden; transition: box-shadow .14s, border-color .14s; }
  .mod-carte:hover { box-shadow: 0 2px 10px rgba(16,32,56,.08); }
  .mod-carte.ouverte { border-color: var(--navy-600); box-shadow: 0 3px 14px rgba(16,32,56,.12); }
  .mod-carte > header { display: flex; align-items: center; gap: 12px; padding: 8px 13px; cursor: pointer; }
  .mod-date { flex: 0 0 auto; width: 38px; height: 34px; border-radius: 8px; background: var(--navy-800);
    color: #fff; display: flex; flex-direction: column; align-items: center; justify-content: center; line-height: 1; }
  .mod-carte.archive .mod-date { background: #2E6B4F; }
  .mod-carte.archive.annulee .mod-date { background: #B3261E; }
  .mod-date .j { font-family: var(--font-titre); font-size: 15px; font-weight: 600; }
  .mod-date .m { font-size: 8px; text-transform: uppercase; letter-spacing: .4px; opacity: .85; margin-top: 1px; }
  .mod-carte .txt { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 1px; }
  .mod-carte .txt .t { font-family: var(--font-titre); font-size: 14px; font-weight: 600;
    color: var(--navy-900); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
  .mod-carte .txt .s { font-size: 11px; color: var(--steel); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
  .mod-carte .act { flex: 0 0 auto; font-size: 11px; font-weight: 600; color: var(--navy-700);
    border: 1px solid var(--line); border-radius: 20px; padding: 3px 11px; }
  .mod-carte.ouverte .act { background: var(--navy-800); color: #fff; border-color: var(--navy-800); }
  .mod-carte.futur { opacity: .72; }
  .mod-carte.futur > header { cursor: default; }
  .mod-carte.futur:hover { box-shadow: none; }
  .mod-carte.futur .mod-date { background: var(--steel); }
  .mod-carte.futur .act { color: var(--steel); }
  .mod-titre.avenir { border-bottom-color: var(--steel); }
  .mod-carte .etat { flex: 0 0 auto; font-size: 9.5px; font-weight: 700; letter-spacing: .3px;
    color: #2E6B4F; border: 1px solid #C3E0C9; border-radius: 20px; padding: 3px 10px; }
  .mod-carte.annulee .etat { color: #A3322A; border-color: #F0C9C4; }
  .mod-seance { background: var(--white); border: 1px solid var(--line); border-left: 4px solid var(--steel);
    border-radius: 10px; margin-bottom: 10px; overflow: hidden; }
  .mod-seance.faite { border-left-color: #2E6B4F; }
  .mod-seance > header { display: flex; align-items: center; gap: 12px; padding: 12px 15px; cursor: pointer; }
  .mod-seance > header:hover { background: var(--paper); }
  .mod-seance .j { font-size: 11.5px; color: var(--steel); font-variant-numeric: tabular-nums; white-space: nowrap; }
  .mod-seance .t { flex: 1; min-width: 0; font-family: var(--font-titre); font-size: 15px;
    font-weight: 600; color: var(--navy-900); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
  .mod-seance .m { font-size: 10px; font-weight: 700; letter-spacing: .3px; color: #fff;
    background: var(--navy-700); border-radius: 3px; padding: 2px 7px; white-space: nowrap; }
  .mod-seance .fo { font-size: 11.5px; color: var(--steel); overflow: hidden;
    text-overflow: ellipsis; white-space: nowrap; max-width: 300px; }
  .mod-seance .e { font-size: 9.5px; font-weight: 700; letter-spacing: .3px; color: var(--steel);
    border: 1px solid var(--line); border-radius: 20px; padding: 2px 9px; white-space: nowrap; }
  .mod-seance.faite .e { color: #2E6B4F; border-color: #C3E0C9; }
  .mod-seance .fl { color: var(--steel); font-size: 11px; }
  .mod-corps { padding: 4px 15px 16px; border-top: 1px solid var(--line); }
  .mod-champ { margin-top: 14px; }
  .mod-champ > label { display: block; font-size: 10.5px; text-transform: uppercase; letter-spacing: .6px;
    color: var(--steel); font-weight: 600; margin-bottom: 7px; }
  .mod-champ input, .mod-champ select, .mod-champ textarea { margin-bottom: 0; }
  .mod-duo { display: grid; grid-template-columns: 160px 1fr; gap: 14px; }
  @media (max-width: 700px) { .mod-duo { grid-template-columns: 1fr; } }
  .mod-corps .l { margin: 0 0 5px; font-size: 12.5px; color: var(--navy-900); }
  .mod-corps .l span { display: inline-block; min-width: 96px; font-size: 10px; text-transform: uppercase;
    letter-spacing: .5px; color: var(--steel); font-weight: 600; }
  .mod-corps .c { margin: 9px 0 0; font-size: 12px; color: var(--steel); font-style: italic; }
  .mod-corps .parts { display: flex; flex-wrap: wrap; gap: 5px; margin-top: 11px; padding-top: 10px; border-top: 1px dashed var(--line); }
  .mod-corps .parts.seule { margin-top: 14px; padding-top: 0; border-top: none; }
  .mod-corps .parts .p { font-size: 11.5px; border: 1px solid var(--line); border-radius: 20px; padding: 2px 9px; }
  .mod-corps .parts .p em { font-style: normal; font-size: 9.5px; font-weight: 700; letter-spacing: .3px; margin-left: 4px; }
  .mod-corps .parts .p.ok { border-color: #C3E0C9; color: #2E6B37; }
  .mod-corps .parts .p.rec { border-color: #E8D8A8; color: #9C7A2B; }
  .mod-corps .parts .p.ko { border-color: #F0C9C4; color: #A3322A; }
  .tir-saisie { display: inline-flex; gap: 10px; }
  .tir-saisie .c { display: inline-flex; align-items: center; gap: 4px; }
  .tir-saisie label { margin: 0; font-size: 9.5px; text-transform: uppercase; letter-spacing: .4px; color: var(--steel); font-weight: 600; }
  .tir-saisie input { width: 62px; margin: 0; padding: 4px 6px; font-size: 12px; text-align: center; }
  .note20 { display: inline-flex; align-items: center; gap: 3px; font-size: 11px; color: var(--steel); }
  .note20 input { width: 56px; margin: 0; padding: 4px 6px; font-size: 12px; text-align: center; }
  .cart-saisie { display: inline-flex; align-items: center; gap: 4px; font-size: 11px; color: var(--steel); }
  .cart-saisie input { width: 62px; margin: 0; padding: 4px 6px; font-size: 12px; text-align: center; }
  .cart-saisie label { margin: 0; font-size: 11px; color: var(--steel); font-weight: 500; }
  .mod-liste { display: flex; flex-direction: column; gap: 6px; margin-top: 10px; }
  .mod-mil { display: flex; align-items: center; gap: 9px; padding: 6px 9px; background: var(--white);
    border: 1px solid var(--line); border-radius: 8px; }
  .mod-mil .n { flex: 1; min-width: 0; font-size: 12.5px; font-weight: 600; color: var(--navy-900); }
  .mod-mil .n .rec { margin-left: 7px; font-size: 9px; font-weight: 700; letter-spacing: .3px;
    color: #fff; background: #9C7A2B; border-radius: 3px; padding: 1px 5px; }
  .mod-mil .res { display: inline-flex; border: 1px solid var(--line); border-radius: 7px; overflow: hidden; }
  .mod-mil .res button { border: none; background: var(--white); font-family: inherit; font-size: 11px;
    padding: 4px 9px; cursor: pointer; color: var(--steel); border-right: 1px solid var(--line); }
  .mod-mil .res button:last-child { border-right: none; }
  .mod-mil .res button.on.ok { background: #2E6B4F; color: #fff; font-weight: 600; }
  .mod-mil .res button.on.ko { background: #B3261E; color: #fff; font-weight: 600; }
  .mod-mil .note { width: 74px; margin: 0; padding: 4px 7px; font-size: 12px; text-align: center; }
  .mod-mil .x { border: none; background: none; color: var(--steel); cursor: pointer; font-size: 11px; }
  .mod-mil .x:hover { color: #B3261E; }
  .mod-fiche .parts { display: flex; flex-wrap: wrap; gap: 5px; margin-top: 10px; padding-top: 9px; border-top: 1px dashed var(--line); }
  .mod-fiche .parts .p { font-size: 11.5px; border: 1px solid var(--line); border-radius: 20px; padding: 2px 9px; }
  .mod-fiche .parts .p em { font-style: normal; font-size: 9.5px; font-weight: 700; letter-spacing: .3px; margin-left: 4px; }
  .mod-fiche .parts .p.ok { border-color: #C3E0C9; color: #2E6B37; }
  .mod-fiche .parts .p.rec { border-color: #E8D8A8; color: #9C7A2B; }
  .mod-fiche .parts .p.ko { border-color: #F0C9C4; color: #A3322A; }

  .mod-grille { display: grid; grid-template-columns: repeat(auto-fill, minmax(320px, 1fr)); gap: 14px; align-items: start; }
  .mod-fiche { background: var(--white); border: 1px solid var(--line); border-top: 3px solid #2E6B4F; border-radius: 11px; overflow: hidden; }
  .mod-fiche.annulee { border-top-color: #B3261E; }
  .mod-fiche .tete { display: flex; align-items: center; gap: 9px; padding: 11px 14px 9px; border-bottom: 1px solid var(--line); }
  .mod-fiche .tete .f { font-family: var(--font-titre); font-size: 15px; font-weight: 600; color: var(--navy-900); }
  .mod-fiche .tete .d { font-size: 11.5px; color: var(--steel); font-variant-numeric: tabular-nums; }
  .mod-fiche .tete .etat { margin-left: auto; font-size: 9.5px; font-weight: 700; letter-spacing: .3px;
    color: #fff; background: #2E6B4F; border-radius: 3px; padding: 2px 7px; }
  .mod-fiche.annulee .tete .etat { background: #B3261E; }
  .mod-fiche .corps { padding: 11px 14px 14px; }
  .mod-fiche .l { margin: 0 0 5px; font-size: 12.5px; color: var(--navy-900); }
  .mod-fiche .l span { display: inline-block; min-width: 92px; font-size: 10px; text-transform: uppercase;
    letter-spacing: .5px; color: var(--steel); font-weight: 600; }
  .mod-fiche .c { margin: 8px 0 0; font-size: 12px; color: var(--steel); font-style: italic; }
  .mod-fiche .r { margin: 10px 0 0; padding-top: 9px; border-top: 1px dashed var(--line);
    font-size: 12.5px; white-space: pre-wrap; line-height: 1.5; }
  /* ---- Feuille de service ---- */
  .sv-mode { display: inline-flex; border: 1px solid var(--navy-700); border-radius: 8px; overflow: hidden; height: 32px; }
  .sv-mode button { border: none; background: var(--white); color: var(--navy-800); font-family: inherit;
    font-size: 12px; font-weight: 500; padding: 0 12px; cursor: pointer; border-right: 1px solid var(--navy-700); }
  .sv-mode button:last-child { border-right: none; }
  .sv-mode button.on { background: var(--navy-800); color: #fff; font-weight: 600; }
  .sv-blindes { display: inline-flex; align-items: center; gap: 7px; }
  .sv-blindes label { margin: 0; font-size: 11.5px; color: var(--steel); }
  .sv-blindes input { width: 64px; margin-bottom: 0; padding: 5px 8px; font-size: 12.5px; text-align: center; }
  .sv-perm { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 14px; }
  .sv-permcase { border: 1px solid var(--line); border-left: 3px solid var(--navy-700); border-radius: 8px; padding: 10px 13px; background: var(--white); }
  .sv-permcase .l { display: block; font-size: 10.5px; text-transform: uppercase; letter-spacing: .6px; color: var(--steel); font-weight: 600; }
  .sv-permcase .v { display: block; font-size: 13px; font-weight: 600; color: var(--navy-900); margin-top: 4px; }
  @media (max-width: 860px) { .sv-perm { grid-template-columns: 1fr; } }
  .sv-jetons { display: flex; flex-wrap: wrap; gap: 6px; }
  .sv-jeton { display: inline-flex; align-items: center; gap: 6px; border: 1px solid var(--line); background: var(--paper);
    color: var(--steel); border-radius: 20px; padding: 5px 12px; font-size: 12px; font-family: inherit; cursor: pointer;
    transition: background .12s, border-color .12s, color .12s, box-shadow .12s; }
  .sv-jeton:hover { border-color: var(--navy-600); }
  .sv-jeton .g { font-size: 10px; font-weight: 700; }
  .sv-jeton .q { font-size: 9px; font-weight: 700; color: #B3261E; }
  .sv-jeton .s { font-size: 9px; color: var(--gold); font-weight: 600; }
  .sv-jeton .st { font-size: 8.5px; font-weight: 700; color: #fff; background: #7A4F8C;
    border-radius: 3px; padding: 1px 5px; letter-spacing: .3px; }
  .sv-membre .stagiaire { font-size: 8.5px; font-weight: 700; letter-spacing: .3px; color: #fff;
    background: #7A4F8C; border-radius: 3px; padding: 1px 5px; }
  .sv-jeton.present { background: var(--white); border-color: var(--navy-600); color: var(--navy-900); }
  .sv-jeton.pris { border-color: #2E7D4F; box-shadow: inset 0 -2px 0 0 #2E7D4F; }
  .sv-jeton.libre { background: #C9D7EC; border-color: #264B80; color: #112A4D; box-shadow: inset 0 0 0 1px #264B80; }
  .sv-jeton.libre:hover { background: #B9CCE8; }
  .sv-jeton.libre .g { color: #112A4D; }
  .sv-libres { display: flex; align-items: center; gap: 8px; margin: 0 0 10px; padding: 8px 12px; border-radius: 8px;
    background: #DCE6F4; border: 1px solid #A9BDDB; color: #112A4D; font-size: 12.5px; font-weight: 600; }
  .sv-grille { grid-template-columns: repeat(auto-fill, minmax(268px, 1fr)); }
  .sv-grille { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 12px; align-items: start; }
  .sv-patrouille { border: 1px solid var(--line); border-radius: 11px; background: var(--white); overflow: hidden;
    box-shadow: 0 1px 3px rgba(16,32,56,.06); transition: box-shadow .14s; }
  .sv-patrouille:hover { box-shadow: 0 3px 10px rgba(16,32,56,.1); }
  .sv-patrouille { border-top: 3px solid var(--teinte, var(--navy-700)); }
  .sv-tete { display: flex; align-items: center; gap: 9px; padding: 11px 13px 9px;
    border-bottom: 1px solid var(--line); }
  .sv-tete h3 { margin: 0; font-size: 13.5px; font-family: var(--font-titre);
    color: var(--navy-900); letter-spacing: .2px; }
  .sv-tete h3::before { content: ""; display: inline-block; width: 7px; height: 7px; border-radius: 50%;
    background: var(--teinte, var(--navy-700)); margin-right: 7px; vertical-align: 1px; }
  .sv-tete .n { margin-left: auto; font-size: 11px; font-weight: 700; color: var(--steel);
    background: var(--paper); border-radius: 10px; padding: 1px 9px; }
  .sv-x { border: none; background: none; color: var(--steel); border-radius: 5px;
    width: 20px; height: 20px; cursor: pointer; font-size: 11px; line-height: 1; }
  .sv-x:hover { background: var(--paper); color: #B3261E; }
  .sv-membres { padding: 4px 13px; }
  .sv-membre { display: flex; align-items: center; gap: 8px; padding: 6px 0; border-bottom: 1px solid var(--line); font-size: 12px; }
  .sv-membre:last-child { border-bottom: none; }
  .sv-membre .g { font-size: 9.5px; font-weight: 700; color: var(--steel); min-width: 40px;
    background: var(--paper); border-radius: 4px; padding: 2px 5px; text-align: center; }
  .sv-membre .n { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
  .sv-membre .q { font-size: 9px; font-weight: 700; color: #B3261E; }
  .sv-membre .perm { font-size: 8.5px; font-weight: 700; letter-spacing: .3px; color: #fff;
    background: var(--navy-700); border-radius: 3px; padding: 1px 5px; white-space: nowrap; }
  .sv-membre .x { border: none; background: none; color: var(--steel); cursor: pointer; font-size: 11px; }
  .sv-membre .x:hover { color: #B3261E; }
  .sv-onglets { display: flex; gap: 4px; margin: 0 0 14px; border-bottom: 1px solid var(--line); }
  .sv-onglets button { border: none; background: none; padding: 8px 16px; font-family: inherit; font-size: 13.5px; color: var(--steel);
    cursor: pointer; border-bottom: 2px solid transparent; margin-bottom: -1px; }
  .sv-onglets button.on { color: var(--navy-900); font-weight: 600; border-bottom-color: var(--navy-800); }
  .sv-onglets .n { font-size: 11px; background: var(--paper); border-radius: 10px; padding: 1px 7px; margin-left: 4px; }
  .sv-veh { display: flex; flex-wrap: wrap; gap: 5px; align-items: center; margin: 0 13px 10px; }
  .sv-veh-p { display: inline-flex; align-items: center; gap: 5px; font-size: 11.5px; background: var(--paper); border: 1px solid var(--line);
    border-radius: 12px; padding: 2px 4px 2px 9px; color: var(--navy-900); }
  .sv-veh-p button { border: none; background: none; color: var(--steel); cursor: pointer; font-size: 10px; padding: 0 4px; }
  .sv-veh-p button:hover { color: #B3261E; }
  .sv-veh-sel { font-family: inherit; font-size: 11.5px; padding: 3px 6px; border: 1px dashed var(--line); border-radius: 12px; background: var(--white); color: var(--steel); max-width: 100%; }
  .sv-cats { display: flex; flex-wrap: wrap; gap: 6px; flex: 1 1 100%; }
  .sv-cat { cursor: pointer; position: relative; }
  .sv-cat input { position: absolute; opacity: 0; pointer-events: none; }
  .sv-cat span, .sv-cat-b { display: inline-block; font-family: inherit; font-size: 11.5px; padding: 3px 10px; border: 1px solid var(--line);
    border-radius: 14px; color: var(--steel); background: var(--white); cursor: pointer; }
  .sv-cat input:checked + span, .sv-cat-b.on { background: var(--navy-800); border-color: var(--navy-800); color: #fff; }
  .sv-cat input:focus-visible + span { outline: 2px solid var(--gold); }
  .sv-veh-form { background: var(--paper); border-radius: 10px; padding: 12px; margin-bottom: 14px; }
  .sv-veh-form .champs { display: flex; gap: 8px; flex-wrap: wrap; margin-bottom: 10px; }
  .sv-veh-form input[type=text] { flex: 1 1 180px; min-width: 0; font-family: inherit; font-size: 13.5px; padding: 8px 10px; border: 1px solid var(--line); border-radius: 8px; background: var(--white); }
  .sv-veh-filtres { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 12px; }
  .sv-veh-filtres button { font-family: inherit; font-size: 12px; padding: 4px 11px; border: 1px solid var(--line); border-radius: 14px;
    background: var(--white); color: var(--steel); cursor: pointer; }
  .sv-veh-filtres button span { opacity: .6; margin-left: 3px; }
  .sv-veh-filtres button.on { background: var(--navy-800); border-color: var(--navy-800); color: #fff; }
  .sv-veh-table { border: 1px solid var(--line); border-radius: 10px; overflow: hidden; margin-bottom: 8px; }
  .sv-veh-ligne { display: grid; grid-template-columns: minmax(0, 1.3fr) 140px minmax(0, 2fr) 210px; gap: 12px; align-items: center;
    padding: 9px 14px; border-top: 1px solid var(--line); font-size: 13px; }
  .sv-veh-ligne:first-child { border-top: none; }
  .sv-veh-ligne.tete { background: var(--paper); font-size: 11px; text-transform: uppercase; letter-spacing: .5px; color: var(--steel); padding-top: 7px; padding-bottom: 7px; }
  .sv-veh-ligne .m { font-weight: 600; color: var(--navy-900); min-width: 0; }
  .sv-veh-ligne .m em { display: block; font-style: normal; font-weight: 400; font-size: 11px; color: var(--gold); }
  .sv-veh-ligne .pl b { font-family: ui-monospace, Menlo, monospace; font-weight: 500; font-size: 12.5px; letter-spacing: .4px;
    border: 1px solid var(--line); border-radius: 4px; padding: 2px 7px; background: var(--white); }
  .sv-veh-ligne .cats { display: flex; flex-wrap: wrap; gap: 4px; }
  .sv-veh-ligne .cats i { font-style: normal; font-size: 11px; color: var(--navy-800); background: #E9EEF5; border-radius: 10px; padding: 1px 8px; }
  .sv-veh-ligne .cats i.vide { background: none; color: var(--steel); font-style: italic; padding-left: 0; }
  .sv-veh-ligne .act { display: flex; gap: 12px; justify-content: flex-end; }
  .sv-veh-ligne .act button { border: none; background: none; font-family: inherit; font-size: 12px; color: var(--steel); cursor: pointer; padding: 0; }
  .sv-veh-ligne .act button:hover { color: var(--navy-800); text-decoration: underline; }
  .sv-veh-ligne .act button.dg:hover { color: #B3261E; }
  .sv-veh-ligne .edit { grid-column: 1 / -1; }
  .sv-veh-groupe { display: flex; align-items: baseline; gap: 10px; padding: 8px 14px; background: var(--paper); border-top: 1px solid var(--line);
    font-size: 12px; color: var(--navy-800); }
  .sv-veh-groupe b { font-size: 12.5px; letter-spacing: .2px; }
  .sv-veh-groupe span { color: var(--steel); font-size: 11.5px; flex: 1; }
  .sv-veh-groupe i { font-style: normal; font-size: 11px; color: var(--steel); margin-left: auto; }
  .sv-edcf { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin: 8px 0 2px; padding: 8px 10px; border-radius: 8px; background: var(--white); border: 1px dashed var(--line); }
  .sv-edcf .lib { font-size: 12px; font-weight: 600; color: var(--navy-800); margin-right: 4px; }
  .acc-liste { display: grid; gap: 3px; }
  .acc-ligne { display: flex; align-items: center; gap: 8px; padding: 3px 10px; border: 1px solid var(--line); border-left: 3px solid transparent; border-radius: 6px; font-size: 12.5px; background: var(--white); }
  .acc-ligne.a-des { border-left-color: #B3261E; background: #FDF9F8; }
  .acc-ligne .g { width: 34px; flex-shrink: 0; font-size: 11px; color: var(--steel); font-weight: 600; }
  .acc-ligne .n { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
  .acc-ligne .nig { width: 64px; flex-shrink: 0; color: var(--steel); font-size: 12px; font-variant-numeric: tabular-nums; }
  .acc-cpt { display: inline-flex; align-items: center; border: 1px solid var(--line); border-radius: 6px; overflow: hidden; background: var(--white); flex-shrink: 0; }
  .acc-cpt button { width: 28px; height: 24px; border: none; background: var(--paper); cursor: pointer; font-size: 15px; line-height: 1; color: var(--navy-800); font-family: inherit; }
  .acc-cpt button:hover:not(:disabled) { background: #E3ECF8; }
  .acc-cpt button:disabled { opacity: .35; cursor: default; }
  .acc-cpt b { min-width: 30px; text-align: center; font-variant-numeric: tabular-nums; color: var(--navy-900); }
  .acc-ligne.a-des .acc-cpt b { color: #B3261E; }
  @media (max-width: 560px) { .acc-ligne { display: grid; grid-template-columns: 1fr auto; grid-template-areas: "n c" "i c"; gap: 0 10px; } .acc-ligne .g { display: none; } .acc-ligne .n { grid-area: n; white-space: normal; } .acc-ligne .nig { grid-area: i; width: auto; } .acc-ligne .acc-cpt { grid-area: c; } }
  .sv-cats-liste { display: grid; gap: 6px; margin: 0 0 12px; }
  .sv-cat-ligne { display: flex; align-items: center; gap: 10px; padding: 8px 12px; border: 1px solid var(--line); border-radius: 8px; font-size: 13px; background: var(--white); }
  .sv-cat-ligne b { min-width: 170px; color: var(--navy-900); }
  .sv-cat-ligne .aff { flex: 1; color: var(--steel); font-size: 12px; }
  .sv-cat-ligne button { border: none; background: none; font-family: inherit; font-size: 12px; color: var(--steel); cursor: pointer; padding: 0 2px; }
  .sv-cat-ligne button:hover { color: var(--navy-800); text-decoration: underline; }
  .sv-cat-ligne button.dg:hover { color: #B3261E; }
  .sv-veh-ligne.hs { background: #FBEDEC; }
  .sv-veh-ligne.hs .m, .sv-veh-ligne.hs .pl { opacity: .6; }
  .sv-veh-ligne .cats i.asp { background: #F3EBD6; color: #6B5320; }
  .sv-veh-ligne .cats i.multi { background: #DCE6F4; color: #112A4D; font-weight: 600; }
  .sv-veh-ligne .cats i.hs-tag { background: #B3261E; color: #fff; font-weight: 700; }
  .sv-veh-ligne .act { white-space: nowrap; }
  .sv-veh-ligne .act button.hs:hover { color: #B3261E; }
  .sv-veh-form select { font-family: inherit; font-size: 13.5px; padding: 8px 10px; border: 1px solid var(--line); border-radius: 8px; background: var(--white); }
  .sv-veh-edition { margin: 4px 0 2px; }
  .sv-veh-edition .boutons { margin-top: 10px; }
  @media (max-width: 720px) {
    .sv-veh-ligne { grid-template-columns: 1fr auto; row-gap: 6px; }
    .sv-veh-ligne.tete { display: none; }
    .sv-veh-ligne .cats { grid-column: 1 / -1; order: 3; }
    .sv-veh-ligne .act { grid-column: 1 / -1; order: 4; justify-content: flex-start; }
  }
  .sv-vehicule { margin: 0 13px 10px; width: calc(100% - 26px); font-size: 12px; padding: 5px 9px; }
  .sv-consigne-btn { margin: 0 13px 11px; padding: 4px 11px; border: 1px solid var(--line); background: var(--white);
    border-radius: 20px; font-family: inherit; font-size: 11px; color: var(--steel); cursor: pointer; }
  .sv-consigne-btn:hover { border-color: var(--navy-700); color: var(--navy-800); }
  .sv-consigne-btn.perso { border-color: var(--gold); color: var(--gold); font-weight: 600; }
  .sv-veh-lu { margin: 0; padding: 0 13px 10px; font-size: 11.5px; color: var(--steel); }
  .sv-patrouille.zone { transition: box-shadow .12s, border-color .12s; }
  .sv-patrouille.survol { border-color: #2E7D4F; box-shadow: 0 0 0 2px rgba(46,125,79,.22); }
  .sv-patrouille.interdit { border-color: #B3261E; box-shadow: 0 0 0 2px rgba(179,38,30,.18); }
  .sv-refus { margin: 0; padding: 0 13px; font-size: 11px; color: #B3261E; font-weight: 600; min-height: 0; }
  .sv-refus:empty { display: none; }
  .sv-aide { margin: 0; padding: 0 13px 12px; font-size: 11px; color: var(--steel); font-style: italic; }
  .sv-jeton.porte, .sv-membre.porte { opacity: .45; }
  .sv-jeton[draggable="true"], .sv-membre[draggable="true"] { cursor: grab; }
  .sv-manque { margin: 0; padding: 0 13px 10px; font-size: 11.5px; color: #B3261E; font-weight: 600; }
  .sv-ajout { margin: 0; width: calc(100% - 26px); margin: 4px 13px 12px; font-size: 12px; padding: 6px 9px; }
  .sv-patrouille .muted { padding: 0 13px 12px; }
  /* Déplacement des patrouilles par leur en-tête */
  .sv-tete[draggable="true"] { cursor: grab; }
  .sv-tete[draggable="true"]:active { cursor: grabbing; }
  .sv-poignee { color: var(--steel); font-size: 13px; line-height: 1; margin-right: -3px; opacity: .55; }
  .sv-tete[draggable="true"]:hover .sv-poignee { opacity: 1; }
  .sv-patrouille.porte-carte { opacity: .4; }
  .sv-patrouille.cible-avant { box-shadow: -4px 0 0 0 #2E7D4F; }
  .sv-patrouille.cible-apres { box-shadow: 4px 0 0 0 #2E7D4F; }
  .sv-membre.chef .n { font-weight: 700; }
  .sv-membre .etoile { color: var(--gold); margin-right: 4px; }
  .sv-alerte { display: flex; align-items: flex-start; gap: 9px; font-size: 12.5px; padding: 5px 0; line-height: 1.5; }
  .sv-alerte .p { width: 7px; height: 7px; border-radius: 50%; margin-top: 6px; flex: 0 0 auto; }
  .sv-alerte.erreur .p { background: #B3261E; }
  .sv-alerte.info .p { background: var(--gold); }
  /* ---- Dressings ---- */
  .dr-grille-tenues { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px; align-items: start; }
  @media (max-width: 1200px) { .dr-grille-tenues { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
  @media (max-width: 820px) { .dr-grille-tenues { grid-template-columns: 1fr; } }
  .dr-carte { display: flex; align-items: flex-start; gap: 13px; text-align: left; width: 100%; cursor: pointer;
    background: var(--white); border: 1px solid var(--line); border-radius: 11px; padding: 15px 16px;
    font-family: inherit; transition: box-shadow .14s, transform .14s, border-color .14s; }
  .dr-carte:hover { box-shadow: 0 3px 12px rgba(16,32,56,.11); transform: translateY(-1px); border-color: var(--accent); }
  .dr-ic { flex: 0 0 auto; width: 40px; height: 40px; border-radius: 10px; display: flex; align-items: center;
    justify-content: center; background: var(--accent); color: #fff; }
  .dr-ic svg { width: 22px; height: 22px; }
  .dr-texte { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 4px; }
  .dr-nom { font-family: var(--font-titre); font-size: 16px; font-weight: 600; color: var(--navy-900); line-height: 1.25; }
  .dr-pied { display: flex; gap: 6px; flex-wrap: wrap; margin-top: 3px; }
  .dr-pied .jeton { font-size: 10.5px; color: var(--steel); background: var(--paper);
    border: 1px solid var(--line); border-radius: 20px; padding: 2px 9px; }
  .dr-pied .jeton.avec { color: var(--navy-800); border-color: var(--navy-600); }
  .dr-fleche { flex: 0 0 auto; color: var(--steel); font-size: 15px; align-self: center; transition: transform .14s, color .14s; }
  .dr-carte:hover .dr-fleche { color: var(--accent); transform: translateX(3px); }
  .dr-detail { display: grid; grid-template-columns: 230px 1fr; gap: 22px; align-items: start; }
  @media (max-width: 760px) { .dr-detail { grid-template-columns: 1fr; } }
  .dr-detail .dr-photo { width: 100%; border-radius: 8px; background: var(--paper);
    border: 1px solid var(--line); display: flex; align-items: center; justify-content: center;
    padding: 8px; min-height: 180px; box-sizing: border-box; }
  .dr-photo img { max-width: 100%; max-height: 62vh; width: auto; height: auto; object-fit: contain;
    display: block; border-radius: 4px; }
  .dr-photo .vide, .dr-apercu .vide { font-size: 11.5px; color: var(--steel); }
  .dr-corps { flex: 1; min-width: 0; }
  .dr-tete { display: flex; align-items: baseline; gap: 12px; margin-bottom: 6px; }
  .dr-tete h3 { margin: 0; font-family: var(--font-titre); font-size: 17px; color: var(--navy-900); }
  .dr-actions { margin-left: auto; display: flex; gap: 6px; }
  .dr-actions .btn { padding: 4px 11px; font-size: 12px; }
  .dr-desc { display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden;
    margin: 0; font-size: 12.5px; line-height: 1.45; color: var(--steel); min-height: 2.9em; }
  .dr-liste { display: block; }
  .dr-ligne { display: flex; align-items: baseline; gap: 10px; padding: 5px 0; border-bottom: 1px solid var(--line); }
  .dr-ligne .l { flex: 1; min-width: 0; font-size: 12px; color: var(--ink); }
  .dr-ligne .v { font-size: 12.5px; font-weight: 700; font-variant-numeric: tabular-nums; color: var(--navy-900); }
  .dr-ligne.vide .l, .dr-ligne.vide .v { color: var(--steel); font-weight: 400; }
  .dr-auteur { margin: 12px 0 0; font-size: 11px; color: var(--steel); }
  .dr-apercu { width: 168px; min-height: 210px; border: 1px solid var(--line); border-radius: 8px;
    background: var(--paper); display: flex; align-items: center; justify-content: center; overflow: hidden; }
  .dr-apercu img { width: 100%; height: 100%; object-fit: cover; display: block; }
  .dr-grille { display: grid; grid-template-columns: repeat(auto-fill, minmax(250px, 1fr)); gap: 8px 20px; }
  .dr-champ { display: flex; align-items: center; gap: 7px; }
  .dr-champ .l { flex: 1; min-width: 0; font-size: 12px; }
  .dr-champ input { width: 64px; margin-bottom: 0; padding: 4px 7px; font-size: 12px; text-align: center; }
  .dr-champ .sep { color: var(--steel); }
  @media (max-width: 760px) {
    .dr-photo { max-width: 240px; margin: 0 auto; }
  }
  /* ---- Carte des points ---- */
  .carte-consigne { margin: 0 0 10px; font-size: 12.5px; font-weight: 600; color: var(--navy-800);
    background: #FFF8E6; border: 1px solid #E8D8A8; border-radius: 7px; padding: 8px 12px; }
  .carte-zone { position: relative; display: block; line-height: 0; border-radius: 8px; overflow: hidden; border: 1px solid var(--line); }
  .carte-zone.posable { cursor: crosshair; }
  .carte-zone img { width: 100%; height: auto; display: block; }
  .carte-point { position: absolute; transform: translate(-50%, -100%); background: none; border: none; padding: 0;
    cursor: pointer; display: flex; flex-direction: column; align-items: center; gap: 2px; line-height: 1; }
  .carte-point .pastille { width: 32px; height: 32px; border-radius: 50%; display: flex; align-items: center; justify-content: center;
    background: var(--teinte); color: #fff; border: 2.5px solid #fff; box-shadow: 0 2px 5px rgba(0,0,0,.45); }
  .carte-point .pastille svg { width: 19px; height: 19px; }
  .svc-tag .ico { display: inline-flex; align-items: center; margin-right: 6px; vertical-align: -3px; }
  .svc-tag .ico svg { width: 15px; height: 15px; }
  .svc-tag.on .ico { color: #fff !important; }
  .carte-point .etiquette { max-width: 150px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
    background: rgba(255,255,255,.92); color: var(--navy-900); font-size: 9.5px; font-weight: 600;
    padding: 1px 5px; border-radius: 3px; opacity: 0; transition: opacity .12s; }
  .carte-point:hover { z-index: 5; }
  .carte-point:hover .etiquette { opacity: 1; }
  .carte-point:hover .pastille { box-shadow: 0 0 0 3px rgba(255,255,255,.6), 0 1px 3px rgba(0,0,0,.45); }
  .svc-tag .puce { display: inline-block; width: 8px; height: 8px; border-radius: 50%; margin-right: 6px; vertical-align: 0; }
  .stat-barre { display: flex; align-items: center; gap: 16px; flex-wrap: wrap; margin-bottom: 16px; }
  .stat-segments { display: inline-flex; border: 1px solid var(--navy-700); border-radius: 8px; overflow: hidden; }
  .stat-segments button { border: none; background: var(--white); color: var(--navy-800); font-family: inherit; font-size: 12.5px; font-weight: 500; padding: 7px 16px; cursor: pointer; border-right: 1px solid var(--navy-700); }
  .stat-segments button:last-child { border-right: none; }
  .stat-segments button.on { background: var(--navy-800); color: #fff; font-weight: 600; }
  .stat-nav { display: inline-flex; align-items: center; gap: 12px; }
  .stat-nav button { width: 30px; height: 30px; border: 1px solid var(--line); background: var(--white); border-radius: 8px; cursor: pointer; color: var(--navy-800); font-size: 13px; }
  .stat-nav button:hover:not(:disabled) { border-color: var(--navy-700); }
  .stat-nav button:disabled { opacity: .3; cursor: default; }
  .stat-nav .l { font-size: 13.5px; font-weight: 600; color: var(--navy-900); min-width: 210px; text-align: center; }
  .stat-dates { display: inline-flex; align-items: center; gap: 9px; }
  .stat-dates input { margin-bottom: 0; width: auto; padding: 6px 10px; font-size: 12.5px; }
  .stat-dates span { color: var(--steel); }
  .stat-cartes { display: grid; grid-template-columns: repeat(auto-fit, minmax(168px, 1fr)); gap: 14px; margin-bottom: 16px; }
  .stat-carte { background: var(--white); border: 1px solid var(--line); border-radius: 10px; padding: 15px 17px; position: relative; overflow: hidden; }
  .stat-carte::before { content: ""; position: absolute; left: 0; top: 0; bottom: 0; width: 3px; background: var(--navy-700); }
  .stat-carte .l { display: block; font-size: 10.5px; text-transform: uppercase; letter-spacing: .7px; font-weight: 600; color: var(--steel); }
  .stat-carte .n { display: block; font-family: var(--font-titre); font-size: 32px; font-weight: 600; color: var(--navy-900); line-height: 1.05; margin: 6px 0 2px; }
  .stat-carte .s { display: block; font-size: 11.5px; color: var(--steel); }
  .stat-carte.inter::before { background: #264B80; }
  .stat-carte.rep::before { background: #9C7A2B; }
  .stat-carte.jour::before { background: #2E6B4F; }
  .stat-duo { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; align-items: start; }
  .stat-duo > .card { margin-bottom: 0; }
  @media (max-width: 980px) { .stat-duo { grid-template-columns: 1fr; } }
  .stat-duo h3, .stat-courbe-carte h3 { margin: 0 0 14px; padding-bottom: 9px; border-bottom: 1px solid var(--line); font-size: 15px; }
  .stat-courbe { display: flex; align-items: flex-end; gap: 4px; height: 128px; }
  .stat-jour { flex: 1; min-width: 0; display: flex; flex-direction: column; align-items: center; gap: 5px; height: 100%; }
  .stat-jour .col { flex: 1; width: 100%; display: flex; align-items: flex-end; }
  .stat-jour .col span { display: block; width: 100%; background: var(--navy-700); border-radius: 3px 3px 0 0; transition: background .12s; }
  .stat-jour:hover .col span { background: var(--gold); }
  .stat-jour .d { font-size: 9.5px; color: var(--steel); font-variant-numeric: tabular-nums; }
  .stat-rep .stat-ligne .b span { background: #9C7A2B; }
  .stat-ligne { display: flex; align-items: center; gap: 12px; padding: 6px 0; }
  .stat-ligne .l { width: 210px; flex: 0 0 auto; font-size: 12.5px; }
  .stat-ligne .b { flex: 1; min-width: 60px; height: 8px; border-radius: 4px; background: var(--paper); overflow: hidden; }
  .stat-ligne .b span { display: block; height: 100%; background: var(--navy-700); border-radius: 4px; }
  .stat-ligne .v { width: 42px; text-align: right; font-weight: 700; font-size: 13px; font-variant-numeric: tabular-nums; }
  .stat-ligne .p { width: 74px; text-align: right; font-size: 11.5px; color: var(--steel); }
  @media (max-width: 680px) { .stat-ligne .l { width: 130px; } .stat-ligne .p { display: none; } }
  .bs-compteur { flex: 0 0 auto; background: var(--white); }
  .bs-compteur button { width: 22px; height: 22px; border: none; border-radius: 50%; cursor: pointer; font-weight: 700; line-height: 1; background: var(--paper); color: var(--navy-800); }
  .bs-compteur button:hover { background: var(--navy-700); color: #fff; }
  .svc-detail { border: 1px solid var(--line); border-left: 3px solid var(--navy-700); border-radius: 7px; padding: 10px 12px; margin-bottom: 8px; background: var(--paper); }
  .svc-detail .t { font-size: 12.5px; font-weight: 600; margin-bottom: 6px; }
  .svc-detail textarea { margin-bottom: 0; }
  .pat-stats input[type="number"] { width: 56px; margin-bottom: 0; text-align: center; padding: 5px 6px; font-size: 13px; }
  .pat-stats table td { padding: 4px 8px; font-size: 12.5px; }
  .pat-stats table { margin-bottom: 0; }
  .pat-stats h3 { margin: 18px 0 7px; font-size: 13.5px; color: var(--navy-800); }
  .pat-stats label { margin-top: 2px; }
  .badge-moniteur { display: inline-block; font-size: 8.5px; font-weight: 700; letter-spacing: .4px;
    border-radius: 3px; padding: 1px 5px; vertical-align: 1px; cursor: help;
    color: #fff; background: var(--navy-700); }
  .badge-moniteur.m-eip { background: var(--gold); color: var(--navy-900); }
  .badge-moniteur.m-iip { background: transparent; color: var(--navy-800); box-shadow: inset 0 0 0 1px var(--navy-700); }
  .badge-moniteur.m-amip { background: #7A4F8C; }
  .badge-moniteur.retard { background: #B3261E; color: #fff; box-shadow: none; }
  .badge-apj { display: inline-block; font-size: 8.5px; font-weight: 700; letter-spacing: .4px;
    color: #fff; background: #B3261E; border-radius: 3px; padding: 1px 5px; vertical-align: 1px; cursor: help; }
  .badge-contrat { display: inline-flex; align-items: center; justify-content: center; width: 15px; height: 15px; border-radius: 50%; background: var(--gold); color: #fff; font-size: 10px; font-weight: 700; margin-left: 6px; vertical-align: middle; cursor: help; }
  .badge-absences { display: inline-block; background: var(--danger); color: #fff; font-size: 10px; font-weight: 700; text-transform: uppercase; letter-spacing: 0.4px; border-radius: 3px; padding: 2px 7px; margin-left: 7px; vertical-align: middle; white-space: nowrap; }
  .tir-alerte { display: inline-flex; align-items: center; justify-content: center; width: 16px; height: 16px; border-radius: 50%; background: var(--danger); color: #fff; font-size: 11px; font-weight: 700; vertical-align: middle; margin-left: 5px; cursor: help; }
  .tir-compteurs { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
  @media (max-width: 640px) { .tir-compteurs { grid-template-columns: 1fr; } }
  /* Fiche : explication à la place des anciens formulaires d'ajout (formations, tir). */
  .dossier-aide { background: var(--paper); border-style: dashed; }
  .dossier-aide h3 { font-size: 14px; margin-bottom: 8px; }
  .dossier-aide ol { margin: 0 0 8px; padding-left: 20px; font-size: 13px; line-height: 1.6; }
  .dossier-aide p { margin: 0; font-size: 12.5px; color: var(--muted, #5b6472); }
  .tir-carte { background: var(--paper); border: 1px solid var(--line); border-left: 4px solid var(--steel); border-radius: 6px; padding: 12px 15px; }
  .tir-carte .tir-niveau { font-size: 11px; text-transform: uppercase; letter-spacing: 0.6px; color: var(--steel); font-weight: 700; }
  .tir-carte .tir-etat { font-size: 15px; font-weight: 700; margin: 3px 0 5px; }
  .tir-carte .tir-detail { font-size: 11.5px; color: var(--steel); line-height: 1.45; }
  .spe-candidature { margin-top: 16px; padding-top: 16px; border-top: 1px solid var(--line); }
  .icon-danger { background: none; border: 1px solid transparent; color: var(--steel); border-radius: 5px; padding: 4px 8px; font-size: 14px; line-height: 1; cursor: pointer; opacity: .55; transition: opacity .12s, color .12s, border-color .12s; }
  .icon-danger:hover { opacity: 1; color: var(--danger); border-color: var(--danger); }
  .btn-primary { background: var(--navy-800); color: var(--white); border: 1px solid var(--navy-800); }
  .btn-primary:hover { background: var(--navy-900); }

  input, select, textarea { width: 100%; box-sizing: border-box; padding: 9px 11px; border-radius: 5px; border: 1px solid var(--line); margin-bottom: 10px; font-size: 14px; background: var(--white); color: var(--ink); font-family: 'Inter', sans-serif; }
  input:focus, select:focus, textarea:focus { outline: 2px solid var(--navy-600); outline-offset: -1px; border-color: var(--navy-600); }
  label { font-size: 12.5px; color: var(--steel); display: block; margin-bottom: 4px; font-weight: 500; text-transform: uppercase; letter-spacing: 0.4px; }

  table { width: 100%; border-collapse: collapse; font-size: 14px; table-layout: fixed; }
  table.table-auto { table-layout: auto; }
  .valid-qualifs { display: block; margin-bottom: 8px; }
  .valid-qualifs .t { display: block; font-size: 10px; text-transform: uppercase; letter-spacing: .6px; color: var(--steel); font-weight: 600; margin-bottom: 5px; }
  .valid-qualifs label { display: inline-flex; align-items: center; gap: 5px; margin: 0 10px 4px 0; font-size: 11.5px; white-space: nowrap; cursor: pointer; color: #C87A16; }
  .valid-qualifs label.ok { color: #2E7D4F; font-weight: 600; }
  .valid-qualifs input { width: auto; margin: 0; }
  .ciapt-alerte { display: inline-block; width: 9px; height: 9px; border-radius: 50%; background: #B3261E;
    margin-left: 7px; vertical-align: 1px; box-shadow: 0 0 0 2px rgba(179,38,30,.18); cursor: help; }
  .qualifs { display: flex; align-items: center; gap: 8px; width: 100%; }
  .qualifs .qt { display: flex; flex-wrap: wrap; gap: 3px; flex: 1 1 auto; min-width: 0; }
  .qualifs .q.icone { display: inline-flex; align-items: center; justify-content: center; flex: 0 0 auto;
    width: 26px; height: 26px; padding: 0; background: transparent !important; }
  .qualifs .q.icone:first-of-type { margin-left: auto; }
  .qualifs .q.icone svg { width: 22px; height: 22px; }
  .qualifs .q { display: inline-block; color: #fff; font-size: 9px; font-weight: 600; letter-spacing: .2px;
                line-height: 1.3; padding: 1px 6px; border-radius: 3px; white-space: nowrap; }
  table.table-spe-effectifs td { padding-top: 5px; padding-bottom: 5px; }
  table.table-spe-effectifs { table-layout: fixed; min-width: 900px; }
  table.table-spe-effectifs td:last-child { white-space: nowrap; text-align: right; }

  td, th { word-wrap: break-word; overflow-wrap: break-word; }
  th { text-align: left; padding: 9px 8px; border-bottom: 2px solid var(--navy-800); font-family: 'Inter', sans-serif; font-weight: 600; font-size: 12.5px; text-transform: uppercase; letter-spacing: 0.4px; color: var(--navy-800); }
  td { text-align: left; padding: 9px 8px; border-bottom: 1px solid var(--line); }
  .presence-table td, .presence-table th { vertical-align: middle; white-space: nowrap; }
  tbody tr:hover { background: var(--paper); }

  .badge { display: inline-block; padding: 3px 11px; border-radius: 3px; font-size: 11.5px; font-weight: 600; text-transform: uppercase; letter-spacing: 0.3px; }
  .tag-pill { display: inline-flex; align-items: center; padding: 6px 14px; border: 1px solid var(--line); border-radius: 20px; font-size: 13px; cursor: pointer; margin: 0 6px 6px 0; background: var(--white); color: var(--ink); transition: background 0.15s, color 0.15s, border-color 0.15s; user-select: none; text-transform: none; letter-spacing: normal; font-weight: 400; }
  .tag-pill:has(input:checked) { background: var(--navy-700); color: #fff; border-color: var(--navy-700); }
  .tag-pill:has(input:disabled) { opacity: 0.4; cursor: not-allowed; }
  .tag-pill input { display: none; }
  .file-link-badge { display: inline-flex; align-items: center; gap: 6px; background: var(--paper); border: 1px solid var(--line); border-radius: 20px; padding: 4px 12px 4px 10px; color: var(--navy-700); font-weight: 600; text-decoration: none; transition: background 0.15s, border-color 0.15s; }
  .file-link-badge:hover { background: var(--navy-700); color: #fff; border-color: var(--navy-700); }
  .rte-toolbar { display: flex; gap: 6px; margin-bottom: 8px; flex-wrap: wrap; align-items: center; }
  .rte-btn { width: 36px; height: 34px; padding: 0; border: 1px solid var(--line); border-radius: 5px; background: var(--white); cursor: pointer; font-size: 14px; color: var(--ink); }
  .rte-btn:hover { background: var(--paper); }
  .rte-btn.b { font-weight: 700; }
  .rte-btn.i { font-style: italic; }
  .rte-btn.u { text-decoration: underline; }
  /* Choix de couleur : le sélecteur (invisible) remplit exactement le carré de couleur, et rien d'autre.
     Avant, il débordait sur le bouton « B » : cliquer sur Gras ouvrait la couleur. */
  .rte-btn.rte-couleur { position: relative; display: inline-block; padding: 0; overflow: hidden; vertical-align: middle; }
  .rte-couleur-choix { position: absolute; inset: 0; width: 100%; height: 100%; margin: 0; padding: 0; border: 0; opacity: 0; cursor: pointer; }
  .rte-color { -webkit-appearance: none; appearance: none; width: 36px; height: 34px; padding: 0; border: 1px solid var(--line); border-radius: 5px; cursor: pointer; box-sizing: border-box; vertical-align: middle; }
  .rte-color::-webkit-color-swatch-wrapper { padding: 3px; }
  .rte-color::-webkit-color-swatch { border: none; border-radius: 3px; }
  .rte-color::-moz-color-swatch { border: none; border-radius: 3px; }
  .rte-editor { min-height: 220px; border: 1px solid var(--line); border-radius: 5px; padding: 12px 14px; font-size: 14px; font-family: 'Inter', sans-serif; line-height: 1.6; color: var(--ink); width: 100%; box-sizing: border-box; overflow-wrap: anywhere; word-break: break-word; }
  .rte-editor:focus { outline: none; border-color: var(--navy-600); }
  .rte-editor:empty::before { content: attr(data-placeholder); color: var(--steel); }


  .hero-banner { background: linear-gradient(135deg, var(--navy-900), var(--navy-700)); box-shadow: inset 0 -3px 0 var(--or); border-radius: 8px; padding: 28px 30px; color: #fff; margin-bottom: 18px; position: relative; overflow: hidden; }
  .hero-banner::after { content: ""; position: absolute; right: -40px; top: -40px; width: 180px; height: 180px; border-radius: 50%; background: rgba(255,255,255,0.05); }
  .hero-greeting { font-family: var(--font-titre); font-size: 26px; font-weight: 600; margin: 0; }
  .hero-date { color: var(--steel-light); font-size: 13.5px; text-transform: capitalize; margin-top: 2px; }
  .hero-stats { display: flex; gap: 10px; flex-wrap: wrap; margin-top: 18px; }
  .hero-stat { background: rgba(255,255,255,0.08); border: 1px solid rgba(255,255,255,0.15); border-radius: 6px; padding: 8px 16px; }
  .hero-stat .n { font-family: var(--font-titre); font-size: 20px; font-weight: 700; display: block; line-height: 1.1; }
  .hero-stat .l { font-size: 10.5px; text-transform: uppercase; letter-spacing: 0.5px; color: var(--steel-light); }
  .hero-actions { display: flex; gap: 8px; flex-wrap: wrap; margin-top: 16px; }
  .hero-action { background: rgba(255,255,255,0.10); border: 1px solid rgba(255,255,255,0.20); color: #fff; border-radius: 20px; padding: 7px 16px; font-family: 'Inter', sans-serif; font-size: 12.5px; cursor: pointer; display: inline-flex; align-items: center; gap: 7px; transition: background .12s; }
  .hero-action:hover { background: rgba(255,255,255,0.20); }
  .hero-action .pin { background: var(--danger); border-radius: 9px; padding: 0 6px; font-size: 10.5px; font-weight: 700; }
  .home-grid { display: grid; grid-template-columns: 1.35fr 1fr; gap: 18px; align-items: start; }
  @media (max-width: 980px) { .home-grid { grid-template-columns: 1fr; } }
  .up-item { display: flex; align-items: center; gap: 12px; padding: 9px 0; border-bottom: 1px solid var(--line); cursor: pointer; }
  .up-item:last-child { border-bottom: none; }
  .up-item:hover .up-t { color: var(--navy-700); }
  .up-date { flex-shrink: 0; width: 46px; text-align: center; border: 1px solid var(--line); border-radius: 6px; overflow: hidden; background: var(--white); }
  .up-date .m { color: #fff; font-size: 9px; text-transform: uppercase; letter-spacing: .5px; padding: 2px 0; }
  .up-date .d { font-size: 16px; font-weight: 700; line-height: 1.5; }
  .up-t { font-size: 13.5px; font-weight: 600; word-break: normal; overflow-wrap: break-word; hyphens: auto; -webkit-hyphens: auto; }
  .up-s { font-size: 11.5px; color: var(--steel); margin-top: 1px; }

  .section-head { display: flex; align-items: center; gap: 10px; margin-bottom: 4px; }
  .section-icon { width: 30px; height: 30px; border-radius: 6px; display: flex; align-items: center; justify-content: center; font-size: 15px; flex-shrink: 0; color: #fff; }
  .section-card { border-radius: 10px; border: 1px solid var(--line); background: var(--white); padding: 20px 22px; margin-bottom: 18px; border-top: 3px solid var(--navy-700); box-shadow: 0 1px 3px rgba(16,32,56,.05); }

  .chip-row { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 10px; }
  .chip { display: inline-flex; align-items: center; gap: 7px; background: var(--paper); border: 1px solid var(--line); border-radius: 20px; padding: 6px 13px 6px 6px; font-size: 13px; }
  .chip .chip-date { background: var(--navy-700); color: #fff; border-radius: 14px; padding: 2px 9px; font-size: 11px; font-weight: 600; white-space: nowrap; }

  .doc-link-row { display: flex; align-items: center; gap: 10px; padding: 9px 0; border-bottom: 1px solid var(--line); }
  .doc-link-row:last-child { border-bottom: none; }
  .doc-icon { width: 30px; height: 30px; border-radius: 5px; background: var(--paper); border: 1px solid var(--line); display: flex; align-items: center; justify-content: center; font-size: 13px; flex-shrink: 0; }

  .weekend-strip { display: flex; gap: 14px; overflow-x: auto; padding: 14px 2px 2px; align-items: flex-start; }
  .weekend-item { flex: 0 0 auto; text-align: center; width: 88px; }
  .weekend-item .avatar { width: 64px; height: 64px; margin: 0 auto 6px; }
  .weekend-item .n { font-size: 12.5px; font-weight: 600; line-height: 1.25; }
  .weekend-item .g { font-size: 11px; color: var(--steel); margin-top: 1px; }

  .feed-card { background: var(--white); border: 1px solid var(--line); border-radius: 8px; padding: 20px 22px; border-top: 3px solid var(--navy-700); margin-bottom: 16px; }
  .feed-track { position: relative; padding-left: 20px; margin-top: 14px; }
  .feed-track::before { content: ""; position: absolute; left: 4px; top: 4px; bottom: 4px; width: 2px; background: var(--line); }
  .annonce-corps { text-align: justify; hyphens: auto; }
  /* Annonces reprises de Discord : écrites ligne par ligne, avec liens et signatures ; justifiées, les espaces s'étirent. */
  .annonce-corps.discord { text-align: left; hyphens: manual; }
  /* Copie de la ligne d'en-tête d'un tableau, affichée en haut de l'écran pendant le défilement. */
  .entete-flottante { position: fixed !important; z-index: 140; display: none; overflow: hidden !important; margin: 0 !important; padding: 0 !important;
    border: 0 !important; border-radius: 0 !important; min-height: 0 !important; background: var(--white); box-shadow: 0 4px 8px -5px rgba(11,31,61,0.35); pointer-events: none; }
  .entete-flottante > table { margin: 0 !important; }
  .feed-item { position: relative; padding-bottom: 20px; }
  .feed-item:last-child { padding-bottom: 0; }
  .feed-dot { position: absolute; left: -20px; top: 4px; width: 11px; height: 11px; border-radius: 50%; background: var(--navy-700); box-shadow: 0 0 0 3px var(--white), 0 0 0 4px var(--line); }

  .ticker-card { background: var(--navy-900); border-radius: 8px; padding: 20px 22px; color: #fff; height: 100%; }
  .ticker-card .muted { color: var(--steel-light); }
  .ticker-item { display: flex; gap: 12px; padding: 11px 0; border-bottom: 1px solid rgba(255,255,255,0.12); }
  .ticker-item:last-child { border-bottom: none; }
  .ticker-num { font-family: var(--font-titre); font-size: 20px; font-weight: 700; color: var(--or); flex-shrink: 0; min-width: 26px; }

  .timeline-wrap { position: relative; margin-top: 22px; padding-top: 6px; }
  .timeline-line { position: absolute; top: 6px; left: 0; right: 0; height: 2px; background: var(--line); }
  .timeline-track { display: flex; gap: 26px; overflow-x: auto; padding-bottom: 6px; }
  .timeline-stop { flex: 0 0 auto; width: 150px; position: relative; padding-top: 16px; }
  .timeline-stop::before { content: ""; position: absolute; top: 0; left: 0; width: 11px; height: 11px; border-radius: 50%; background: var(--navy-600); box-shadow: 0 0 0 3px var(--white); }
  .timeline-stop .d { font-size: 11px; font-weight: 700; color: var(--navy-700); text-transform: uppercase; letter-spacing: 0.3px; }
  .timeline-stop .t { font-size: 13.5px; margin-top: 2px; }

  .note-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(210px, 1fr)); gap: 14px; margin-top: 14px; }
  .note-card { background: #FFFDF3; border: 1px solid var(--line); border-left: 4px solid var(--gold); border-radius: 4px; padding: 14px 16px; position: relative; }
  .note-card .d { font-size: 11px; color: var(--steel); text-transform: uppercase; letter-spacing: 0.4px; }
  .note-card strong { display: block; margin: 3px 0 4px; }

  .file-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(232px, 1fr)); gap: 12px; margin-top: 16px; }
  .spe-card { display: flex; flex-direction: column; }
  .spe-header { display: flex; align-items: center; gap: 14px; margin-bottom: 16px; }
  .spe-logo { width: 56px; height: 56px; border-radius: 50%; flex-shrink: 0; display: flex; align-items: center; justify-content: center; overflow: hidden; box-shadow: 0 0 0 1px var(--line); background: var(--navy-800); }
  .spe-logo img { width: 100%; height: 100%; object-fit: cover; }
  .spe-logo span { color: #fff; font-weight: 700; font-size: 21px; font-family: var(--font-titre); }
  .spe-header h3 { margin: 0; font-size: 17px; }
  .spe-fullname { margin: 2px 0 0; font-size: 12px; line-height: 1.35; }
  .spe-leadership { background: var(--paper); border-radius: 8px; padding: 4px 14px; margin-bottom: 16px; }
  .spe-lead-row { display: flex; justify-content: space-between; align-items: center; padding: 9px 0; gap: 10px; }
  .spe-lead-row + .spe-lead-row { border-top: 1px solid var(--line); }
  .spe-lead-label { font-size: 11px; color: var(--steel); text-transform: uppercase; letter-spacing: 0.5px; font-weight: 600; }
  .spe-lead-value { font-size: 13.5px; font-weight: 600; text-align: right; color: var(--ink); }
  /* Les textes colles depuis Word ou Docs arrivent avec leurs propres polices :
     on impose celles du site sans toucher au contenu enregistre. */
  .spe-presentation, .spe-presentation *,
  .jour-evt-corps, .jour-evt-corps *,
  .annonce-corps, .annonce-corps * {
    font-family: 'Inter', system-ui, sans-serif !important;
    font-size: inherit !important;
    line-height: inherit !important;
    background: transparent !important;
    letter-spacing: normal !important;
  }
  .spe-presentation { font-size: 13.5px; line-height: 1.7; color: var(--ink); }
  .spe-presentation p { margin: 0 0 11px; }
  .spe-presentation p:last-child { margin-bottom: 0; }
  .spe-presentation ul, .spe-presentation ol { margin: 0 0 11px; padding-left: 20px; }
  .spe-presentation li { margin-bottom: 4px; }
  .spe-presentation h1, .spe-presentation h2, .spe-presentation h3, .spe-presentation h4 {
    font-family: var(--font-titre) !important;
    font-size: 15px !important; font-weight: 600; color: var(--navy-900);
    margin: 16px 0 8px; line-height: 1.35 !important;
  }
  .spe-presentation strong, .spe-presentation b { font-weight: 600; color: var(--navy-900); }
  .spe-presentation a { color: var(--navy-700); }
  .spe-presentation img { max-width: 100%; height: auto; }
  .spe-presentation { padding-top: 16px; border-top: 1px solid var(--line); text-align: justify; hyphens: auto; -webkit-hyphens: auto; }
  /* Le filet suit la presentation ; l'espace restant se place sous lui,
     et le bouton Postuler reste aligne d'une carte a l'autre. */
  .spe-card > .spe-presentation { padding-bottom: 16px; border-bottom: 1px solid var(--line); }
  .spe-card > .spe-candidature { margin-top: auto; padding-top: 16px; border-top: none; }
  .weapon-grid { display: flex; flex-direction: column; gap: 10px; }
  .weapon-row { display: flex; align-items: center; gap: 12px; padding: 10px 14px; border: 1px solid var(--line); border-radius: 7px; background: var(--paper); }
  .weapon-label { font-weight: 600; font-size: 13.5px; color: var(--navy-800); width: 90px; flex-shrink: 0; }
  .weapon-value { color: var(--ink); font-size: 14px; }
  .weapon-row input { margin-bottom: 0; background: var(--white); }
  .file-tile { border: 1px solid var(--line); border-radius: 10px; padding: 15px 16px 15px 19px; text-decoration: none; color: inherit; display: flex; align-items: center; gap: 13px; position: relative; background: linear-gradient(180deg, var(--white) 0%, var(--paper) 190%); transition: border-color .15s ease, box-shadow .15s ease, transform .15s ease; overflow: hidden; }
  .file-tile::before { content: ""; position: absolute; left: 0; top: 0; bottom: 0; width: 4px; background: var(--navy-700); opacity: .5; transition: opacity .15s ease; }
  .file-tile:hover { border-color: var(--navy-600); box-shadow: 0 3px 12px rgba(16,32,56,.11); transform: translateY(-1px); }
  .file-tile:hover::before { opacity: 1; }
  .file-tile .icon { width: 38px; height: 38px; border-radius: 9px; background: var(--paper); border: 1px solid var(--line); display: flex; align-items: center; justify-content: center; font-size: 17px; flex-shrink: 0; }
  .file-tile:hover .icon { background: #fff; border-color: var(--navy-600); }
  /* Les titres de documents vont a la ligne entre les mots, jamais au milieu. */
  .file-tile .t { font-size: 13px; font-weight: 600; line-height: 1.35; min-width: 0; color: var(--navy-900);
    word-break: normal; overflow-wrap: break-word; }
  .file-tile .del-site-entry { position: absolute; top: 2px; right: 4px; }
  .file-tile-actions { position: absolute; top: 3px; right: 4px; display: flex; align-items: center; opacity: 0; transition: opacity .15s ease; background: rgba(255,255,255,.92); border-radius: 5px; }
  .file-tile:hover .file-tile-actions { opacity: 1; }
  .file-tile-actions .del-site-entry { position: static; font-size: 11px; padding: 2px 4px; }
  .site-move-btn { background: none; border: none; color: var(--steel-light); font-size: 11px; cursor: pointer; padding: 2px 4px; display: none; }
  .site-move-btn:hover { color: var(--navy-700); }
  .file-vide { grid-column: 1 / -1; text-align: center; color: var(--steel); font-size: 12.5px; padding: 28px 12px; background: var(--paper); border: 1px dashed var(--line); border-radius: 10px; }
  .file-ajout { display: grid; grid-template-columns: 1fr 1.5fr auto; gap: 9px; margin-top: 18px; padding-top: 16px; border-top: 1px dashed var(--line); }
  .file-ajout input { margin-bottom: 0; width: 100%; box-sizing: border-box; }
  @media (max-width: 620px) { .file-ajout { grid-template-columns: 1fr; } }
  .file-tile[draggable="true"] { cursor: grab; }
  .file-tile.dragging { opacity: .4; cursor: grabbing; }
  .file-tile.drop-before { box-shadow: -3px 0 0 0 var(--navy-700); }
  .file-tile.drop-after { box-shadow: 3px 0 0 0 var(--navy-700); }
  @media (max-width: 900px) {
    .site-move-btn { display: inline-flex; }
    .file-tile[draggable="true"] { cursor: pointer; }
  }

  .feed-item, .ticker-item { cursor: pointer; }
  .modal-overlay { display: none; position: fixed; inset: 0; background: rgba(11,31,61,0.62); z-index: 999; align-items: center; justify-content: center; padding: 20px; }
  .modal-overlay.open { display: flex; }
  .modal-box { background: var(--white); border-radius: 8px; max-width: 540px; width: 100%; max-height: 90vh; overflow-y: auto; position: relative; font-family: 'Inter', system-ui, sans-serif; color: var(--ink); }
  .modal-close { position: absolute; top: 12px; right: 14px; background: none; border: none; font-size: 20px; color: var(--steel); cursor: pointer; line-height: 1; }
  .modal-close:hover { color: var(--danger); }
  .modal-box h2 { margin-top: 4px; }
  .modal-meta { color: var(--steel); font-size: 13px; margin-bottom: 14px; }

  /* Fenetres de message et de confirmation (remplacent celles du navigateur) */
  .boite-overlay { z-index: 2000; }
  .boite-overlay .modal-box { max-width: 440px; padding: 22px 22px 18px; box-shadow: 0 18px 50px rgba(11,31,61,0.35); border-top: 3px solid var(--navy-800); }
  .boite-overlay.danger .modal-box { border-top-color: var(--danger); }
  .boite-texte { font-size: 14.5px; line-height: 1.55; white-space: pre-line; overflow-wrap: anywhere; margin: 0 0 18px; }
  .boite-actions { display: flex; justify-content: flex-end; gap: 10px; flex-wrap: wrap; }
  .boite-actions .btn { min-width: 110px; }
  .btn.btn-danger-plein { background: var(--danger); border-color: var(--danger); color: #fff; }
  .btn.btn-danger-plein:hover { filter: brightness(0.9); background: var(--danger); border-color: var(--danger); color: #fff; }
  @media (max-width: 640px) {
    .boite-overlay .modal-box { padding: 22px 18px calc(18px + env(safe-area-inset-bottom)); }
    .boite-actions { flex-direction: column-reverse; }
    .boite-actions .btn { width: 100%; min-height: 44px; }
  }

  .cal-grid { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); gap: 6px; margin-top: 16px; }
  .cal-cell { min-width: 0; overflow: hidden; min-height: 86px; background: var(--white); border: 1px solid var(--line); border-radius: 7px; padding: 6px 7px; font-size: 12px; transition: border-color .15s ease, box-shadow .15s ease, transform .15s ease; }
  .cal-cell:not(.head):not(.empty):hover { border-color: var(--navy-600); box-shadow: 0 2px 10px rgba(16,32,56,.10); cursor: pointer; }
  .cal-cell.head { min-height: auto; background: none; border: none; text-align: center; font-weight: 700; color: var(--steel); text-transform: uppercase; letter-spacing: 0.8px; font-size: 10px; padding: 0 0 6px; }
  .cal-cell.empty { border: none; background: none; }
  .cal-cell.weekend { background: var(--paper); }
  .cal-cell.today { border-color: var(--navy-700); box-shadow: inset 0 0 0 1px var(--navy-700); }
  .cal-cell.today .cal-daynum { background: var(--navy-800); color: #fff; }
  .cal-daynum { display: inline-flex; align-items: center; justify-content: center; min-width: 21px; height: 21px; border-radius: 50%; font-weight: 700; font-size: 11.5px; color: var(--navy-800); margin-bottom: 4px; }
  .cal-event { border-radius: 4px; padding: 2px 6px; margin-bottom: 3px; font-size: 10.5px; font-weight: 500; color: #fff; cursor: pointer; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; box-shadow: 0 1px 2px rgba(16,32,56,.14); }
  .cal-event:hover { filter: brightness(1.12); }
  .cal-event-formation { background: var(--navy-600); }
  .cal-event-concours { background: var(--gold); }
  .cal-event-autre { background: var(--steel); }
  .cal-event-incorporation { background: #2E6B37; }
  .cal-legend { display: flex; gap: 14px; align-items: center; flex-wrap: wrap; font-size: 12px; color: var(--steel); margin-top: 12px; padding-top: 11px; border-top: 1px solid var(--line); }
  .cal-dot { display: inline-block; width: 9px; height: 9px; border-radius: 50%; margin-right: 5px; vertical-align: middle; }
  .cal-dot.formation { background: var(--navy-600); }
  .cal-dot.concours { background: var(--gold); }
  .cal-dot.autre { background: var(--steel); }
  .cal-dot.incorporation { background: #2E6B37; }

  .mail-layout { display: flex; border: 1px solid var(--line); border-radius: 12px; overflow: hidden; background: var(--white); min-height: calc(100vh - 230px); box-shadow: 0 1px 3px rgba(16,32,56,.05); }
  .mail-sidebar { width: 226px; background: linear-gradient(180deg, var(--paper) 0%, #F4F7FB 100%); border-right: 1px solid var(--line); padding: 18px 14px; flex-shrink: 0; }
  .mail-compose-btn { width: 100%; background: var(--navy-800); color: #fff; border: none; border-radius: 10px; padding: 12px 16px; font-weight: 600; font-size: 13.5px; cursor: pointer; margin-bottom: 20px; box-shadow: 0 2px 10px rgba(11,31,61,0.22); font-family: 'Inter', sans-serif; transition: transform .12s ease, box-shadow .12s ease; }
  .mail-compose-btn:hover { background: var(--navy-900); transform: translateY(-1px); box-shadow: 0 4px 14px rgba(11,31,61,0.26); }
  .mail-nav-item { display: flex; align-items: center; justify-content: space-between; padding: 9px 12px; border-radius: 8px; cursor: pointer; font-size: 13.5px; color: var(--ink); margin-bottom: 3px; border-left: 3px solid transparent; transition: background .12s ease; }
  .mail-nav-item.active { background: #fff; color: var(--navy-900); font-weight: 600; border-left-color: var(--gold); box-shadow: 0 1px 3px rgba(16,32,56,.08); }
  .mail-nav-item:hover:not(.active) { background: rgba(17,42,77,0.08); }
  .mail-dossiers-titre { display: flex; align-items: center; justify-content: space-between; margin: 16px 4px 6px; font-size: 11px; text-transform: uppercase; letter-spacing: .6px; color: var(--steel); }
  .mail-dossiers-titre button { border: none; background: none; cursor: pointer; font-size: 17px; line-height: 1; color: var(--steel); padding: 0 4px; }
  .mail-dossiers-titre button:hover { color: var(--navy-800); }
  .mail-dossier-ajout { display: block; width: 100%; box-sizing: border-box; margin-top: 4px; padding: 8px 12px; text-align: left; font-family: inherit; font-size: 13px;
    color: var(--steel); background: none; border: 1px dashed var(--line); border-radius: 8px; cursor: pointer; }
  .mail-dossier-ajout:hover { color: var(--navy-800); border-color: var(--navy-800); background: rgba(17,42,77,0.04); }
  .mail-dossiers-aide { margin: 8px 4px 0; font-size: 11.5px; line-height: 1.45; color: var(--steel); }
  .mail-dossier-carte { background: #fff; border: 1px solid var(--line); border-radius: 10px; padding: 10px; margin: 4px 0 8px; box-shadow: 0 2px 8px rgba(16,32,56,.08); }
  .mail-dossier-carte input { width: 100%; box-sizing: border-box; font-family: inherit; font-size: 13.5px; padding: 7px 9px; border: 1px solid var(--line); border-radius: 6px; margin-bottom: 9px; }
  .mail-dossier-couleurs { display: flex; gap: 7px; margin-bottom: 10px; }
  .mail-couleur { width: 20px; height: 20px; border-radius: 50%; border: 2px solid #fff; box-shadow: 0 0 0 1px var(--line); cursor: pointer; padding: 0; }
  .mail-couleur.on { box-shadow: 0 0 0 2px var(--navy-900); }
  .mail-dossier-actions { display: flex; gap: 6px; }
  .mail-dossier-actions .btn { padding: 5px 11px; font-size: 12.5px; }
  .mail-dossier-nom { display: flex; align-items: center; gap: 9px; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
  .mail-dossier-pastille { width: 11px; height: 11px; border-radius: 3px; flex-shrink: 0; }
  .mail-nav-item.drop-cible { background: #E3ECF8; outline: 2px dashed var(--navy-800); outline-offset: -2px; }
  .mail-nav-item.recu { animation: mail-recu .9s ease; }
  @keyframes mail-recu { 0% { background: #CFE8D2; } 100% { background: transparent; } }
  .mail-list-row.glisse { opacity: .45; }
  .mail-list-row[draggable="true"] { cursor: grab; }
  .mail-retirer { display: none; align-items: center; justify-content: center; padding: 12px; margin: 10px 22px 0; border: 2px dashed var(--line); border-radius: 8px; font-size: 13px; color: var(--steel); }
  body.mail-drag .mail-retirer { display: flex; }
  .mail-retirer.drop-cible { border-color: var(--navy-800); color: var(--navy-800); background: #E3ECF8; }
  .mail-dossier-entete { display: flex; align-items: center; gap: 12px; padding: 12px 22px; border-bottom: 1px solid var(--line); background: var(--paper); font-size: 14px; }
  .mail-move { font-family: inherit; font-size: 12.5px; padding: 5px 8px; border: 1px solid var(--line); border-radius: 6px; background: var(--white); color: var(--ink); max-width: 200px; }
  .mail-chip-dossier { font-size: 10.5px; color: var(--steel); background: var(--paper); border: 1px solid var(--line); border-radius: 10px; padding: 0 7px; margin-left: 6px; font-weight: 400; }
  .mail-nav-count { font-size: 11.5px; font-weight: 700; background: var(--danger); color: #fff; border-radius: 10px; padding: 1px 7px; }
  .ticket-tabs { display: flex; gap: 4px; border-bottom: 1px solid var(--line); margin-bottom: 18px; flex-wrap: wrap; }
  .ticket-tab { background: none; border: none; border-bottom: 2px solid transparent; padding: 10px 16px; font-family: 'Inter', sans-serif; font-size: 13.5px; font-weight: 500; color: var(--steel); cursor: pointer; display: inline-flex; align-items: center; gap: 7px; }
  .ticket-tab:hover { color: var(--navy-800); }
  .ticket-tab.active { color: var(--navy-800); border-bottom-color: var(--navy-800); }
  .ticket-tab .n { background: var(--paper); border-radius: 10px; padding: 1px 7px; font-size: 11px; font-weight: 700; }
  .ticket-tab.active .n { background: var(--navy-800); color: #fff; }
  .ticket-card { display: flex; align-items: stretch; gap: 0; background: var(--white); border: 1px solid var(--line); border-radius: 8px; margin-bottom: 10px; cursor: pointer; overflow: hidden; transition: box-shadow .12s, transform .12s; }
  .ticket-card:hover { box-shadow: 0 2px 10px rgba(16,32,56,.10); transform: translateY(-1px); }
  .ticket-card .bar { width: 4px; flex-shrink: 0; }
  .ticket-card .body { flex: 1; min-width: 0; padding: 14px 18px; }
  .ticket-card .head { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; margin-bottom: 5px; }
  .ticket-card .obj { font-size: 14.5px; font-weight: 600; color: var(--ink); word-break: normal; overflow-wrap: break-word; }
  .ticket-card .meta { font-size: 12px; color: var(--steel); display: flex; gap: 14px; flex-wrap: wrap; }
  .ticket-card .side { display: flex; flex-direction: column; align-items: flex-end; justify-content: center; gap: 6px; padding: 14px 18px; flex-shrink: 0; }
  .ticket-type { font-size: 10.5px; font-weight: 700; letter-spacing: .4px; text-transform: uppercase; color: #fff; border-radius: 4px; padding: 2px 8px; }
  .spe-hero { border-radius: 10px; padding: 20px 30px; margin-bottom: 20px; color: #fff; position: relative; overflow: hidden; box-shadow: 0 2px 10px rgba(16,32,56,.14); }
  .spe-hero::after { content: ""; position: absolute; right: -40px; top: -40px; width: 180px; height: 180px; border-radius: 50%; background: rgba(255,255,255,0.05); }
  .spe-hero h2 { margin: 0; font-size: 22px; letter-spacing: .3px; color: #fff; }
  .spe-hero .sub { color: rgba(255,255,255,.78); font-size: 13px; margin-top: 5px; }
  .spe-hero-stats { display: flex; gap: 30px; margin-top: 18px; flex-wrap: wrap; }
  .spe-hero-stats .s { display: flex; flex-direction: column; }
  .spe-hero-stats .n { font-size: 21px; font-weight: 700; line-height: 1.1; }
  .spe-hero-stats .l { font-size: 10.5px; text-transform: uppercase; letter-spacing: .7px; color: rgba(255,255,255,.7); margin-top: 3px; }
  .spe-hero-logo { position: absolute; right: 24px; top: 50%; transform: translateY(-50%); width: 52px; height: 52px; object-fit: cover; border-radius: 50%; border: 1px solid rgba(255,255,255,.22); box-shadow: 0 2px 8px rgba(0,0,0,.35); z-index: 1; }
  .spe-vie-grid { display: grid; grid-template-columns: 1.55fr 1fr; gap: 18px; align-items: stretch; }
  .spe-vie-grid > .feed-card { height: 100%; margin-bottom: 0; }
  .spe-vie-grid > div > .feed-card:last-child { margin-bottom: 0; }
  @media (max-width: 900px) { .spe-vie-grid { grid-template-columns: 1fr; } }
  .spe-arrivant { display: flex; align-items: center; gap: 11px; padding: 10px 0; border-bottom: 1px solid var(--line); }
  .spe-arrivant:last-child { border-bottom: none; }
  .spe-arrivant .av { width: 34px; height: 34px; border-radius: 50%; flex-shrink: 0; display: flex; align-items: center; justify-content: center; color: #fff; font-size: 11.5px; font-weight: 700; }
  .ticket-card.nouveau { border-color: var(--danger); box-shadow: 0 0 0 1px rgba(179,38,30,.12); }
  .ticket-neuf { font-size: 10.5px; font-weight: 700; letter-spacing: .3px; text-transform: uppercase; color: #fff; background: var(--danger); border-radius: 4px; padding: 2px 8px; }
  .ticket-tab .pastille { width: 7px; height: 7px; border-radius: 50%; background: var(--danger); display: inline-block; }

  .ticket-doc { display: inline-flex; align-items: center; gap: 7px; background: var(--paper); border: 1px solid var(--line); border-radius: 6px; padding: 7px 13px; margin: 0 7px 7px 0; font-size: 12.5px; text-decoration: none; color: var(--ink); }
  .ticket-doc:hover { border-color: var(--navy-700); }
  .ticket-doc-liste { display: flex; flex-wrap: wrap; gap: 7px; }
  .ticket-doc.jointe { margin: 0; padding: 5px 6px 5px 5px; gap: 8px; border-radius: 8px; background: var(--white); max-width: 100%; }
  .ticket-doc.jointe .g { width: 24px; height: 24px; flex: 0 0 auto; display: inline-flex; align-items: center; justify-content: center; border-radius: 6px; font-size: 12px; color: var(--teinte, var(--navy-700)); background: color-mix(in srgb, var(--teinte, #1A3A66) 10%, #fff); }
  .ticket-doc.jointe .nom { min-width: 0; max-width: 220px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-weight: 500; }
  .ticket-doc.jointe button { border: none; background: none; color: var(--steel); cursor: pointer; font-size: 12px; line-height: 1; padding: 2px 4px; border-radius: 4px; }
  .ticket-doc.jointe button:hover { background: var(--paper); color: #B3261E; }
  .mail-quote { border-left: 2px solid var(--line); padding-left: 14px; margin-top: 14px; }
  .mail-quote .mail-quote-head { color: var(--steel); font-size: 12.5px; margin-bottom: 6px; }
  .mail-quote .mail-quote-body { color: var(--steel); font-size: 13.5px; line-height: 1.6; white-space: pre-wrap; overflow-wrap: anywhere; word-break: break-word; }
  .mail-dots { background: var(--paper); border: 1px solid var(--line); border-radius: 12px; padding: 1px 11px; cursor: pointer; color: var(--steel); font-size: 13px; letter-spacing: 2px; line-height: 1.3; font-family: 'Inter', sans-serif; }
  .mail-dots:hover { background: #e6ecf3; color: var(--navy-800); }
  .mail-nav-item.active .mail-nav-count { background: var(--danger); }
  .mail-star { background: none; border: none; cursor: pointer; font-size: 17px; color: var(--steel-light); line-height: 1; padding: 2px 4px; flex-shrink: 0; }
  .mail-select-checkbox { flex-shrink: 0; width: 15px; height: 15px; margin: 0; padding: 0; border: none; border-radius: 0; cursor: pointer; }
  .mail-star.active { color: var(--gold); }
  .mail-chip { display: inline-flex; align-items: center; gap: 5px; background: var(--paper); border: 1px solid var(--line); border-radius: 14px; padding: 4px 6px 4px 12px; font-size: 12.5px; }
  .mail-chip button { border: none; background: none; color: var(--steel); cursor: pointer; font-size: 12px; padding: 2px; }
  .mail-chip button:hover { color: var(--danger); }
  .mail-suggestion-item:hover { background: var(--paper); }
  .mail-main { flex: 1; min-width: 0; }
  .mail-list-row { display: flex; align-items: center; gap: 14px; padding: 12px 22px; border-bottom: 1px solid var(--line); cursor: pointer; transition: background .1s; position: relative; }
  .mail-list-row:hover { background: var(--paper); }
  .mail-list-row.unread { background: #F7FAFE; }
  .mail-list-row.unread::before { content: ""; position: absolute; left: 0; top: 0; bottom: 0; width: 3px; background: var(--navy-700); }
  .mail-avatar { width: 36px; height: 36px; border-radius: 10px; background: var(--steel); color: #fff; display: flex; align-items: center; justify-content: center; font-weight: 700; font-size: 13px; flex-shrink: 0; text-transform: uppercase; letter-spacing: .3px; overflow: hidden; }
  .mail-avatar img { width: 100%; height: 100%; object-fit: cover; display: block; }
  .mail-list-row.unread .mail-avatar { background: var(--navy-800); }
  .mail-list-content { flex: 1; min-width: 0; display: flex; align-items: baseline; gap: 12px; }
  .mail-list-from { font-size: 13.5px; width: 168px; flex-shrink: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; color: var(--navy-900); font-weight: 500; }
  .mail-list-row.unread .mail-list-from, .mail-list-row.unread .mail-list-subject { font-weight: 700; color: var(--navy-900); }
  .mail-list-subjectwrap { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: 13.5px; }
  .mail-list-subject { color: var(--ink); }
  .mail-list-snippet { color: var(--steel); font-weight: 400 !important; }
  .mail-list-date { font-size: 11.5px; color: var(--steel); flex-shrink: 0; width: 88px; text-align: right; font-variant-numeric: tabular-nums; }
  .mail-empty { padding: 78px 24px; text-align: center; color: var(--steel); font-size: 13px; }
  .mail-empty .icon { font-size: 26px; display: block; margin-bottom: 12px; opacity: .35; }
  .mail-compose-card { padding: 4px 0 0; }
  .mail-field { display: flex; align-items: center; border-bottom: 1px solid var(--line); padding: 11px 22px; gap: 10px; }
  .mail-field label { width: auto; margin: 0; color: var(--steel); font-size: 12.5px; text-transform: none; letter-spacing: 0; flex-shrink: 0; min-width: 80px; }
  .mail-field select, .mail-field input { border: none; padding: 4px 0; margin: 0; font-size: 14px; background: transparent; }
  .mail-field select:focus, .mail-field input:focus { outline: none; }
  /* Cc / Cci */
  .mail-cc-liens { display: flex; gap: 4px; flex: 0 0 auto; padding-top: 4px; }
  .mail-cc-lien { border: 1px solid var(--line); background: var(--white); border-radius: 6px; padding: 3px 10px; font: inherit; font-size: 12px; font-weight: 600; color: var(--navy-700); cursor: pointer; }
  .mail-cc-lien:hover { border-color: var(--navy-600); background: var(--paper); }
  .mail-cc-fermer { flex: 0 0 auto; border: none; background: none; color: var(--steel-light); cursor: pointer; font-size: 13px; padding: 6px 4px; }
  .mail-cc-fermer:hover { color: var(--danger); }
  .mail-copie-chips { display: flex; flex-wrap: wrap; gap: 6px; }
  .mail-copie-chips:not(:empty) { margin-bottom: 6px; }
  .mail-copie-sugg { position: absolute; top: 100%; left: 0; right: 0; background: var(--white); border: 1px solid var(--line); border-radius: 6px; box-shadow: 0 6px 18px rgba(0,0,0,0.14); z-index: 10; max-height: 220px; overflow-y: auto; }
  .mail-copie-aide { font-size: 11px; color: var(--steel-light); margin-top: 2px; }
  .mail-entete-ligne { font-size: 12.5px; color: var(--steel); margin-top: 2px; overflow-wrap: anywhere; }
  .mail-cci-note { color: var(--gold); font-style: italic; }
  .mail-body-wrap { padding: 16px 22px; }
  .mail-body-wrap textarea { width: 100%; border: none; font-family: 'Inter', sans-serif; font-size: 14px; resize: vertical; padding: 0; box-sizing: border-box; }
  .mail-body-wrap textarea:focus { outline: none; }
  .mail-send-bar { padding: 14px 22px; border-top: 1px solid var(--line); display: flex; align-items: center; flex-wrap: wrap; gap: 8px; }
  .mail-nav-count.neutre, .mail-nav-item.active .mail-nav-count.neutre { background: var(--steel); }
  .mail-brouillon-tag { flex: 0 0 auto; font-size: 10.5px; font-weight: 700; text-transform: uppercase; letter-spacing: .5px;
    color: var(--danger); background: #FBEAE8; border-radius: 4px; padding: 2px 7px; margin-right: 4px; }

  /* ===== Messagerie : 3 colonnes (boîtes · conversations · lecture) ===== */
  .mx-layout { display: grid; grid-template-columns: 200px minmax(250px, 340px) minmax(0, 1fr); height: calc(100vh - 80px); min-height: 520px; }
  @media (min-width: 901px) and (max-width: 1350px){
    .mx-layout { grid-template-columns: 168px minmax(220px, 280px) minmax(0, 1fr); }
    .mx-layout .mail-sidebar { padding: 14px 10px; }
    .mx-msg-corps, .mx-msg-pieces { padding-left: 16px !important; }
  }
  /* Noms et objets : retour à la ligne entre les mots, jamais coupés au milieu ni raccourcis. */
  .mx-layout .mx-ligne-qui, .mx-layout .mx-ligne-objet, .mx-layout .mx-msg-qui, .mx-layout .mx-lecture-tete h2, .mx-layout .mail-entete-ligne { overflow-wrap: break-word; word-break: normal; }
  .mx-layout .mail-sidebar { width: auto; overflow-y: auto; }
  .mx-liste { display: flex; flex-direction: column; min-width: 0; min-height: 0; border-right: 1px solid var(--line); background: var(--white); }
  .mx-liste-tete { display: flex; align-items: center; gap: 10px; padding: 14px 16px 8px; }
  .mx-liste-tete h2 { margin: 0; font-size: 17px; color: var(--navy-900); overflow-wrap: anywhere; }
  .mx-liste-outils { margin-left: auto; display: flex; gap: 6px; }
  .mx-liste-outils .btn { padding: 4px 10px; font-size: 12px; }
  .mx-recherche { display: flex; align-items: center; gap: 8px; margin: 4px 14px 8px; padding: 0 10px; border: 1px solid var(--line); border-radius: 8px; background: var(--paper); }
  .mx-recherche svg.ico { width: 15px; height: 15px; color: var(--steel); flex-shrink: 0; }
  .mx-recherche input { border: none; background: transparent; margin: 0; padding: 8px 0; font-size: 13.5px; width: 100%; }
  .mx-recherche input:focus { outline: none; }
  .mx-selection { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; padding: 6px 16px 8px; font-size: 12.5px; color: var(--steel); border-bottom: 1px solid var(--line); }
  .mx-selection-actions { margin-left: auto; display: flex; gap: 6px; align-items: center; }
  .mx-selection-actions .btn { padding: 4px 10px; font-size: 12px; }
  .mx-liste-defile { flex: 1; overflow-y: auto; min-height: 0; }
  .mx-ligne { display: flex; align-items: flex-start; gap: 10px; padding: 11px 14px; border-bottom: 1px solid var(--line); cursor: pointer; position: relative; transition: background .1s; }
  .mx-ligne:hover { background: var(--paper); }
  .mx-ligne.actif { background: #E9F0FA; }
  .mx-ligne.nonlu::before { content: ""; position: absolute; left: 0; top: 0; bottom: 0; width: 3px; background: var(--navy-700); }
  .mx-ligne .mail-select-checkbox { margin-top: 10px; flex-shrink: 0; }
  .mx-ligne-corps { flex: 1; min-width: 0; }
  .mx-ligne-haut { display: flex; align-items: baseline; gap: 6px; }
  .mx-ligne-qui { flex: 1; min-width: 0; font-size: 13.5px; color: var(--ink); overflow-wrap: anywhere; }
  .mx-ligne-nb { flex-shrink: 0; font-size: 11px; color: var(--steel); border: 1px solid var(--line); border-radius: 9px; padding: 0 6px; }
  .mx-ligne-date { flex-shrink: 0; font-size: 11.5px; color: var(--steel); }
  .mx-ligne-objet { font-size: 13px; color: var(--ink); margin-top: 1px; overflow-wrap: anywhere; }
  .mx-ligne-apercu { font-size: 12.5px; color: var(--steel); margin-top: 2px; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; overflow-wrap: anywhere; }
  .mx-ligne.nonlu .mx-ligne-qui, .mx-ligne.nonlu .mx-ligne-objet { font-weight: 700; color: var(--navy-900); }
  .mx-ligne .del-entry { flex-shrink: 0; }
  .mx-etoile { color: var(--gold); }
  .mx-lecture { display: flex; flex-direction: column; min-width: 0; min-height: 0; background: var(--white); }
  .mx-lecture-tete { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; padding: 14px 22px; border-bottom: 1px solid var(--line); }
  .mx-lecture-tete h2 { margin: 0; flex: 1; min-width: 200px; font-size: 18px; color: var(--navy-900); overflow-wrap: anywhere; }
  .mx-lecture-outils { display: flex; gap: 8px; align-items: center; }
  .mx-lecture-outils .btn { padding: 5px 12px; font-size: 12.5px; }
  .mx-retour { display: none; }
  .mx-lecture-defile { flex: 1; overflow-y: auto; min-height: 0; }
  .mx-lecture-vide { flex: 1; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 6px; text-align: center; color: var(--steel); font-size: 13px; padding: 40px 24px; }
  .mx-lecture-vide .icon { opacity: .35; }
  .mx-lecture-vide .icon svg.ico { width: 40px; height: 40px; }
  .mx-lecture-vide b { color: var(--ink); font-size: 14px; }
  .mx-fil { padding: 14px 22px 4px; display: flex; flex-direction: column; gap: 10px; }
  .mx-msg { border: 1px solid var(--line); border-radius: 10px; background: var(--white); }
  .mx-msg.plie { display: flex; align-items: center; gap: 10px; padding: 9px 14px; cursor: pointer; background: var(--paper); }
  .mx-msg.plie:hover { border-color: var(--navy-600); }
  .mx-msg-resume { flex: 1; min-width: 0; font-size: 13px; display: flex; gap: 8px; }
  .mx-msg-resume span { color: var(--steel); overflow: hidden; white-space: nowrap; text-overflow: ellipsis; min-width: 0; }
  .mx-msg-resume b { flex-shrink: 0; }
  .mx-msg-tete { display: flex; align-items: flex-start; flex-wrap: wrap; gap: 4px 12px; padding: 14px 16px 10px; }
  .mx-msg-tete .mx-msg-qui { flex: 1 1 180px; }
  .mx-msg-tete[data-mx-plier] { cursor: pointer; }
  .mx-msg-qui { flex: 1; min-width: 0; font-size: 14px; color: var(--ink); overflow-wrap: anywhere; }
  .mx-msg-date { flex-shrink: 0; font-size: 12px; color: var(--steel); white-space: nowrap; }
  .mx-msg-corps { padding: 2px 16px 14px 68px; font-size: 14px; line-height: 1.65; color: var(--ink); overflow-wrap: anywhere; word-break: break-word; }
  .mx-texte { white-space: pre-wrap; }
  .mx-riche p { margin: 0 0 .6em; }
  .mx-riche ul, .mx-riche ol { margin: 0 0 .6em; padding-left: 22px; }
  .mx-riche blockquote, .rte-editor blockquote { margin: 8px 0; padding: 4px 0 4px 12px; border-left: 3px solid var(--line); color: var(--steel); }
  .mx-riche a { color: var(--navy-600); }
  .mx-msg-pieces { padding: 0 16px 12px 68px; display: flex; flex-wrap: wrap; gap: 6px; font-size: 12.5px; }
  .mx-piece { display: inline-flex; align-items: center; gap: 6px; background: var(--paper); border: 1px solid var(--line); border-radius: 6px; padding: 6px 12px; text-decoration: none; color: var(--ink); }
  .mx-piece:hover { border-color: var(--navy-600); }
  .mx-msg-actions { display: flex; gap: 8px; flex-wrap: wrap; padding: 10px 16px; border-top: 1px solid var(--line); }
  .mx-msg-actions .btn { padding: 4px 11px; font-size: 12px; }
  .mx-fil-actions { display: flex; gap: 8px; flex-wrap: wrap; padding: 6px 22px 22px; }
  .mx-reponse { margin: 6px 22px 22px; border: 1px solid var(--navy-600); border-radius: 10px; padding: 12px 14px; box-shadow: 0 2px 10px rgba(16,32,56,.08); }
  .mx-reponse-a { font-size: 12.5px; color: var(--steel); margin-bottom: 8px; }
  .mx-reponse .rte-editor { min-height: 120px; }
  .mx-reponse-boutons { display: flex; gap: 8px; flex-wrap: wrap; margin-top: 10px; }
  .mx-editeur { padding: 12px 22px 4px; }
  .mx-editeur .rte-editor { min-height: 200px; }
  .mx-reponse .mx-editeur { padding: 0; }
  .mx-avertissement { margin: 12px 22px 4px; padding: 7px 12px; background: #FBEAE8; border-left: 3px solid var(--danger); border-radius: 0 5px 5px 0; color: var(--danger); font-size: 11.5px; font-weight: 600; line-height: 1.4; }
  .mx-sig-zone { padding: 6px 22px 10px; }
  .mx-sig-case { display: inline-flex; align-items: center; gap: 7px; font-size: 12.5px; font-weight: 400; color: var(--steel); cursor: pointer; text-transform: none; letter-spacing: normal; margin: 4px 0 6px; width: auto; }
  .mx-sig-case input { width: auto; margin: 0; }
  #mx-sig-apercu { border: 1px dashed var(--line); border-radius: 8px; padding: 4px 14px 12px; }
  #mail-piece-trigger { display: inline-flex; align-items: center; gap: 6px; width: auto; text-transform: none; letter-spacing: normal; font-size: 13px; }
  .mail-suggestion-item { padding: 9px 12px; cursor: pointer; font-size: 13.5px; }
  .mail-suggestion-item:hover { background: var(--paper); }

  /* Signature automatique */
  .mx-signature { display: flex; align-items: center; gap: 14px; margin-top: 16px; padding-top: 12px; border-top: 1px solid var(--line); font-family: 'Inter', sans-serif; color: #1F2733; }
  .mx-sig-ministere { width: 92px; height: auto; flex-shrink: 0; background: #fff; border-radius: 4px; padding: 4px; box-sizing: content-box; }
  .mx-sig-texte { border-left: 2px solid #1F2733; padding-left: 12px; font-size: 12.5px; line-height: 1.45; min-width: 0; }
  .mx-sig-nom { font-weight: 700; font-size: 14px; color: #0B1F3D; }
  .mx-sig-grade { color: #3A4556; }
  .mx-sig-unite { display: flex; align-items: center; gap: 6px; margin-top: 3px; font-weight: 600; color: #0B1F3D; }
  .mx-sig-unite img { width: 18px; height: 18px; object-fit: contain; flex-shrink: 0; }
  .mx-sig-gris { color: #6B7587; font-size: 12px; }
  .mx-sig-lien { font-size: 12.5px; margin-left: 12px; }
  .mx-sig-nav-libelle { display: inline-flex; align-items: center; gap: 7px; }
  .mx-sig-nav-libelle svg.ico { width: 15px; height: 15px; color: var(--steel); }
  /* Fenêtre « Ma signature » : compacte */
  .sig-fenetre { padding: 18px 20px 16px; }
  .sig-entete h2 { margin: 0; font-size: 17px; color: var(--navy-900); }
  .sig-entete p { margin: 2px 0 10px; font-size: 12px; color: var(--steel); }
  .sig-apercu { background: var(--paper); border-radius: 8px; padding: 0 12px 10px; margin-bottom: 12px; }
  .sig-apercu .mx-signature { border-top: none; margin-top: 0; padding-top: 10px; }
  .sig-grille { display: grid; grid-template-columns: 1fr 1fr; gap: 8px 10px; }
  .sig-champ { display: flex; flex-direction: column; gap: 3px; margin: 0; width: auto; text-transform: none; letter-spacing: 0; }
  .sig-champ.large { grid-column: 1 / -1; }
  .sig-champ span { font-size: 11px; font-weight: 600; color: var(--steel); text-transform: uppercase; letter-spacing: .4px; }
  .sig-champ input, .sig-champ select { margin: 0; padding: 6px 9px; font-size: 13px; height: 32px; box-sizing: border-box; }
  .sig-pied { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; margin-top: 12px; }
  .sig-pied .lien-discret { font-size: 12px; }
  .sig-pied-boutons { margin-left: auto; display: flex; gap: 6px; }
  .sig-pied-boutons .btn { padding: 6px 14px; font-size: 13px; }
  @media (max-width: 480px){ .sig-grille { grid-template-columns: 1fr; } }

  /* Téléphone et petite tablette : une colonne à la fois */
  @media (max-width: 900px){
    .mx-layout { display: flex; flex-direction: column; height: auto; min-height: 0; }
    .mx-liste { border-right: none; }
    .mx-liste-defile, .mx-lecture-defile { overflow: visible; }
    .mx-layout.mx-en-lecture .mx-boites, .mx-layout.mx-en-lecture .mx-liste { display: none; }
    .mx-layout:not(.mx-en-lecture) .mx-lecture { display: none; }
    .mx-retour { display: inline-flex; }
    .mx-lecture-tete { padding: 12px 14px; }
    .mx-fil { padding: 12px 10px 4px; }
    .mx-msg-corps, .mx-msg-pieces { padding-left: 16px; }
    .mx-reponse { margin: 6px 10px 16px; }
    .mx-editeur { padding: 10px 12px 4px; }
    .mx-sig-zone { padding: 6px 12px 10px; }
    .mx-avertissement { margin: 10px 12px 4px; }
    .mx-signature { gap: 10px; }
    .mx-sig-ministere { width: 72px; }
  }
  .row { display: flex; justify-content: space-between; align-items: center; gap: 8px; flex-wrap: wrap; }
  .muted { color: var(--steel); font-size: 13px; }
  .clickable { cursor: pointer; }
  .err { color: var(--danger); font-size: 13px; margin: -4px 0 10px; }
  .top { display:flex; justify-content:space-between; align-items:center; margin: 1.5rem 0; }

  .avatar { width: 92px; height: 92px; border-radius: 5px; object-fit: cover; background: var(--paper); border: 1px solid var(--line); }
  .avatar-sm { width: 32px; height: 32px; border-radius: 3px; object-fit: cover; background: var(--paper); vertical-align: middle; margin-right: 8px; border: 1px solid var(--line); }

  .tabs { display: flex; gap: 4px; margin: 1.5rem 0 1rem; border-bottom: 1px solid var(--line); }
  .tab-btn { background: transparent; border: none; padding: 10px 18px; cursor: pointer; font-size: 13.5px; font-family: 'Inter', sans-serif; font-weight: 500; color: var(--steel); border-bottom: 2px solid transparent; margin-bottom: -1px; }
  .tab-btn.active { color: var(--navy-900); border-bottom-color: var(--navy-600); font-weight: 600; }

  .del-entry, .del-site-entry { background: none; border: none; color: var(--steel-light); font-size: 14px; cursor: pointer; padding: 2px 6px; }
  .del-entry:hover, .del-site-entry:hover { color: var(--danger); }
  .form-row { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; margin-top: 10px; }
  .form-row input, .form-row select { margin-bottom: 0; width: auto; flex: 0 0 auto; }
  .form-row input[type="date"] { width: 150px; }
  .form-row input[type="number"] { width: 120px; }
  .form-row input[type="text"], .form-row input:not([type]) { flex: 1 1 160px; }
  .form-row select { min-width: 150px; }
  .form-row button { flex: 0 0 auto; }

  .site-header { background: var(--navy-900); width: 100vw; position: relative; left: 50%; margin-left: -50vw; margin-bottom: 1.5rem; padding: 14px 0; }
  .site-header-inner { max-width: 1500px; margin: 0 auto; padding: 0 1rem; display: flex; align-items: center; justify-content: flex-start; gap: 28px; flex-wrap: wrap; }
  .site-header img { height: 40px; }
  .site-header .site-title { font-family: var(--font-titre); color: var(--white); font-size: 17px; font-weight: 600; line-height: 1.15; }
  .site-header .site-subtitle { color: var(--steel-light); font-size: 11.5px; text-transform: uppercase; letter-spacing: 0.8px; }
  .site-brand { display: flex; align-items: center; gap: 12px; flex-shrink: 0; }
  .site-nav { display: flex; align-items: center; gap: 2px; flex-wrap: wrap; }
  .nav-link { color: rgba(255,255,255,0.78); background: none; border: none; padding: 9px 13px; border-radius: 6px; font-size: 13px; font-weight: 500; cursor: pointer; text-decoration: none; display: inline-flex; align-items: center; gap: 6px; font-family: 'Inter', sans-serif; white-space: nowrap; }
  .nav-link:hover { background: rgba(255,255,255,0.1); color: #fff; }
  .nav-link.active { background: rgba(255,255,255,0.16); color: #fff; font-weight: 600; }
  .nav-badge { background: var(--danger); color: #fff; font-size: 10px; font-weight: 700; border-radius: 10px; padding: 1px 6px; }
  .nav-dropdown { position: relative; }
  .nav-dropdown-menu { display: none; position: absolute; top: 100%; right: 0; margin-top: 6px; background: var(--white); border-radius: 8px; box-shadow: 0 10px 28px rgba(0,0,0,0.22); min-width: 220px; padding: 6px; z-index: 60; }
  .nav-dropdown.open .nav-dropdown-menu { display: block; }
  .nav-dropdown-menu button { display: flex; justify-content: space-between; align-items: center; gap: 8px; width: 100%; text-align: left; padding: 9px 12px; border-radius: 6px; color: var(--ink); background: none; border: none; font-size: 13px; cursor: pointer; font-family: 'Inter', sans-serif; box-sizing: border-box; }
  .nav-dropdown-menu button:hover { background: var(--paper); }
  .nav-user { display: flex; align-items: center; gap: 10px; flex-shrink: 0; margin-left: auto; }
  .nav-logout-btn { background: rgba(255,255,255,0.08); color: #fff; border: 1px solid rgba(255,255,255,0.22); padding: 8px 15px; border-radius: 6px; font-size: 12.5px; cursor: pointer; font-family: 'Inter', sans-serif; white-space: nowrap; }
  .nav-logout-btn:hover { background: rgba(255,255,255,0.16); }
  @media (max-width: 900px) {
    #app.with-sidebar { display: block; }
    .sidebar { position: fixed; top: 0; left: 0; height: 100vh; height: 100dvh; max-height: 100dvh; z-index: 210; transform: translateX(-100%); transition: transform 0.2s ease; box-shadow: 10px 0 30px rgba(0,0,0,0.35); width: 268px; overflow-y: auto; padding-bottom: env(safe-area-inset-bottom); }
    .sidebar .sidebar-scroll { overflow-y: visible; flex: 0 0 auto; }
    .sidebar .sidebar-footer { position: sticky; bottom: 0; background: var(--navy-800); padding-bottom: 14px; }
    .sidebar.open { transform: translateX(0); }
    /* Menu replie : pas d'ombre, sinon elle depasse sur le bord gauche de la page */
    .sidebar:not(.open) { box-shadow: none; }
    /* Panneau des notifications : tout l'ecran, sans deborder sous la barre de defilement */
    .centre-notifs { left: 0; right: 0; width: auto; }
    .sidebar-backdrop { display: none; position: fixed; inset: 0; background: rgba(0,0,0,0.45); z-index: 200; }
    .sidebar-backdrop.open { display: block; }
    .main-content { max-width: 100%; padding: 0 1rem 3rem; }
    #app.with-sidebar.app-wide .main-content { max-width: 100%; }
    .mobile-topbar { display: flex; align-items: center; gap: 12px; background: var(--navy-900); padding: 12px 14px; margin: 0 -1rem 18px; }
    .mobile-topbar img { height: 30px; }
    .mobile-topbar img.marque-texte { height: 16px; }
    .sidebar-hamburger { background: none; border: 1px solid rgba(255,255,255,0.3); color: #fff; width: 34px; height: 34px; border-radius: 6px; font-size: 16px; cursor: pointer; flex-shrink: 0; }
  }

  .auth-page { min-height: 100vh; background: radial-gradient(ellipse 90% 55% at 50% 0%, rgba(201,162,64,0.10), transparent 70%), linear-gradient(180deg, var(--navy-900), var(--navy-800)); border-top: 3px solid var(--or); width: 100vw; position: relative; left: 50%; margin-left: -50vw; margin-bottom: -3rem; padding: 1px 1rem 3rem; box-sizing: border-box; }
  .auth-wrap { max-width: 360px; margin: 0 auto; }
  .auth-wrap p { margin: 10px 0 0; }
  .auth-wrap .card { margin-bottom: 0; }
  .auth-wrap img { display: block; margin: 3rem auto 1rem; height: 84px; }
  .auth-wrap img.auth-blason { height: 104px; margin: 3rem auto 1.1rem; filter: drop-shadow(0 6px 16px rgba(0,0,0,0.35)); }
  .auth-wrap .auth-marque { margin: 0 0 8px; line-height: 0; }
  .auth-wrap .auth-marque img { height: 34px; width: auto; margin: 0 auto; }
  .auth-wrap h2 { text-align: center; color: var(--white); font-size: 21px; font-weight: 700; letter-spacing: 0.3px; margin-bottom: 4px; }
  .su-section { font-family: var(--font-titre); font-size: 15px; font-weight: 600; color: var(--navy-800); padding-bottom: 6px; border-bottom: 2px solid var(--gold); margin-bottom: 8px; }
  .su-section-note { font-size: 12px; color: var(--steel); margin: 0 0 16px; }
  .su-hint { display: block; font-size: 11.5px; color: var(--steel); margin: 0 0 10px; line-height: 1.45; }
  .auth-wrap span:has(> .su-hint) > input { margin-bottom: 5px; }
  .auth-wrap .form-row { align-items: flex-start; }
  .auth-wrap .auth-sub { text-align: center; color: var(--or); font-size: 11.5px; font-weight: 600; text-transform: uppercase; letter-spacing: 2.4px; margin-bottom: 1.5rem; }
  .auth-wrap .card { border: none; border-top: 3px solid var(--or); box-shadow: 0 10px 32px rgba(0,0,0,0.32); }
  .auth-wrap > p > .btn { background: transparent; color: rgba(255,255,255,0.86); border-color: rgba(255,255,255,0.28); }
  .auth-wrap > p > .btn:hover { background: rgba(255,255,255,0.08); color: #fff; border-color: var(--or); }

  /* ---- Ajustements telephone pour les ecrans ajoutes recemment ---- */
  @media (max-width: 760px) {
    .doc-rubrique { padding: 16px 16px 18px; border-radius: 10px; }
    .doc-rubrique-tete { gap: 8px; }
    .doc-liste { grid-template-columns: 1fr; gap: 0; }
    .doc-piece { padding: 11px 4px 11px 0; }
    .svc-modal { padding-left: 16px; padding-right: 16px; }
    .svc-bloc { padding: 13px 14px; }
    .pat-grille { gap: 12px; }
    .svc-arch { flex-wrap: wrap; gap: 6px 10px; }
    .svc-arch .j { min-width: 0; }
    .dossier { gap: 10px; }
    .dossier-statut { width: 100%; }
    .dossier-statut .statut-select { width: 100%; }
    .dossier-actions { flex-wrap: wrap; }
    .dossier-actions .btn { flex: 1 1 auto; }
    .stat-barre { gap: 10px; }
    .stat-segments { width: 100%; }
    .stat-segments button { flex: 1 1 0; padding: 8px 6px; }
    .stat-nav { width: 100%; justify-content: space-between; }
    .stat-nav .l { min-width: 0; flex: 1; font-size: 12.5px; }
    .stat-dates { width: 100%; }
    .stat-dates input { flex: 1 1 0; min-width: 0; }
    .stat-cartes { grid-template-columns: 1fr 1fr; gap: 10px; }
    .stat-carte { padding: 12px 13px; }
    .stat-carte .n { font-size: 26px; }
    .stat-courbe { height: 96px; }
    .pres-bandeau { gap: 10px; }
    .pres-regle { margin-left: 0; flex-basis: 100%; }
    .ticket-empty { padding: 36px 18px; }
    .modal-box { max-height: 94vh; }
    .jour-entete { padding: 16px 18px; padding-right: 52px; }
    .bs-repressions { gap: 6px; }
    .svc-tags { gap: 6px; }
    .svc-tag { padding: 7px 13px; font-size: 12.5px; }
    .svc-carte .h { gap: 6px; }
    .suivi-bandeau { flex-wrap: wrap; gap: 6px 10px; }
    .suivi-bandeau .btn { margin-left: 0 !important; }
    .tab-btn { padding: 9px 11px; font-size: 12.5px; }
  }
  @media (max-width: 480px) {
    .stat-cartes { grid-template-columns: 1fr; }
    .svc-arch .i { display: none; }
  }
  @media (max-width: 640px) {
    #app { padding: 0 0.75rem 2rem; }
    /* Connecte : la marge vient deja du contenu ; sans ce reglage la barre du haut ne touchait pas les bords */
    #app.with-sidebar { padding-left: 0; padding-right: 0; }
    h2 { font-size: 18px; }
    h3 { font-size: 16px; }
    .top { flex-direction: column; align-items: stretch; gap: 10px; margin: 1rem 0; }
    .top > div { justify-content: flex-start !important; width: 100%; }
    .top .btn { flex: 1 1 auto; font-size: 12.5px; padding: 8px 10px; }
    .card, .section-card, .feed-card, .ticker-card { padding: 14px 15px; }
    .hero-banner { padding: 20px 18px; }
    .hero-greeting { font-size: 20px; }
    .hero-stats { gap: 8px; }
    .hero-stat { padding: 7px 12px; flex: 1 1 40%; text-align: center; }
    table { font-size: 12.5px; }
    th, td { padding: 7px 5px !important; }
    .avatar { width: 68px; height: 68px; }
    .weekend-item { width: 72px; }
    .weekend-item .avatar { width: 52px; height: 52px; }
    .tabs { overflow-x: auto; flex-wrap: nowrap; -webkit-overflow-scrolling: touch; }
    .tab-btn { white-space: nowrap; padding: 9px 12px; font-size: 12.5px; }
    .form-row { gap: 6px; }
    .form-row input[type="date"] { width: 130px; }
    .cal-grid { gap: 2px; }
    .cal-cell { min-height: 52px; padding: 3px 3px; font-size: 10px; }
    .cal-cell.head { font-size: 9px; }
    .cal-event { font-size: 0; line-height: 0; height: 6px; padding: 0; margin-bottom: 3px; border-radius: 3px; }
    .cal-daynum { min-width: 19px; height: 19px; font-size: 11px; margin-bottom: 3px; }
    .note-grid, .file-grid { grid-template-columns: repeat(auto-fill, minmax(140px, 1fr)); }
    .modal-box { max-width: 100%; }
    .site-header-inner { padding: 0 0.75rem; gap: 10px; }
    .site-header img { height: 32px; }
    .site-header .site-title { font-size: 15px; }
    .auth-wrap { max-width: 100%; padding: 0 4px; }
    .nav-link { padding: 7px 10px; font-size: 12px; }
    .nav-dropdown-menu { min-width: 180px; }
    .mail-layout { flex-direction: column; min-height: auto; }
    .mail-sidebar { width: 100%; box-sizing: border-box; display: flex; align-items: center; gap: 8px; padding: 10px; overflow-x: auto; border-right: none; border-bottom: 1px solid var(--line); -webkit-overflow-scrolling: touch; }
    .mail-compose-btn { width: auto; flex-shrink: 0; white-space: nowrap; margin-bottom: 0; }
    .mail-nav-item { flex-shrink: 0; white-space: nowrap; }
    .mail-list-row { padding: 11px 14px; gap: 10px; }
    .mail-list-content { min-width: 0; }
    .mail-list-snippet { display: none; }
    .mail-avatar { width: 32px; height: 32px; font-size: 12px; }
    .mail-field { flex-wrap: wrap; }
    .mail-field label { min-width: auto; width: 100%; margin-bottom: 3px; }
    .presence-table { font-size: 9.5px !important; }
    .presence-table select, .presence-table .badge { font-size: 9.5px !important; }
  }
      /* ---- Optimisation telephone (ajoutee en dernier pour primer) ---- */
  html { -webkit-text-size-adjust: 100%; text-size-adjust: 100%; }
  body { -webkit-tap-highlight-color: rgba(17,42,77,0.12); }
  button, .btn, .sidebar-link, .tab-btn, .mail-nav-item { touch-action: manipulation; }
  @media (max-width: 900px) {
    /* 16 px minimum : sinon Safari (iPhone) zoome la page a chaque clic dans un champ */
    input, select, textarea { font-size: 16px; }
    input[type="checkbox"], input[type="radio"] { width: auto; }
    .btn { min-height: 38px; }
    /* barre du haut collee en haut : le menu reste accessible sur les longues pages */
    .mobile-topbar { position: sticky; top: 0; z-index: 150; padding-top: calc(12px + env(safe-area-inset-top)); padding-left: calc(14px + env(safe-area-inset-left)); }
    .sidebar { width: 280px; max-width: 86vw; padding-top: calc(20px + env(safe-area-inset-top)); overscroll-behavior: contain; }
    .sidebar-link, .sidebar-group-toggle { padding-top: 11px; padding-bottom: 11px; }
    .sidebar-group-items .sidebar-link { padding-top: 10px; padding-bottom: 10px; }
    .sidebar-hamburger { width: 40px; height: 40px; font-size: 18px; }
    .main-content { padding-left: max(1rem, env(safe-area-inset-left)); padding-right: max(1rem, env(safe-area-inset-right)); padding-bottom: calc(3rem + env(safe-area-inset-bottom)); }
    /* fenetres : feuille qui monte du bas, defilement interne */
    .modal-overlay { padding: 0; align-items: flex-end; }
    .modal-box { max-width: 100%; border-radius: 16px 16px 0 0; max-height: 92vh; max-height: 92dvh; padding-bottom: env(safe-area-inset-bottom); -webkit-overflow-scrolling: touch; overscroll-behavior: contain; }
    .modal-close { top: 6px; right: 8px; width: 40px; height: 40px; font-size: 26px; display: flex; align-items: center; justify-content: center; }
    /* calendrier de l'accueil */
    .cal-actions { display: flex; flex-wrap: wrap; gap: 6px; width: 100%; }
    .cal-actions .btn { flex: 1 1 0; margin: 0 !important; white-space: nowrap; padding-left: 8px; padding-right: 8px; }
    .section-head { flex-wrap: wrap; row-gap: 10px; }
    /* messagerie : « Nouveau message » sur toute la largeur, puis tous les onglets visibles,
       qui passent a la ligne (une rangee qui defile cachait Brouillons, Favoris et les dossiers) */
    .mail-sidebar { align-items: stretch; flex-wrap: wrap; overflow-x: visible; padding: 10px; gap: 6px; }
    .mail-compose-btn { flex: 1 1 100%; width: 100%; margin-bottom: 2px; }
    .mail-nav-item { flex: 1 1 auto; justify-content: center; gap: 6px; margin-bottom: 0; padding: 8px 10px; border: 1px solid var(--line); background: #fff; border-left-width: 1px; }
    .mail-nav-item.active { border-color: var(--gold); }
    .mail-dossiers-titre { display: none; }
    .mail-dossier-ajout { flex: 1 1 auto; width: auto; text-align: center; white-space: nowrap; margin: 0; }
    .mail-dossiers-aide { display: none; }
    .mail-dossier-carte { flex: 1 1 100%; margin: 0; }
    /* lignes de la boite : l'expediteur, puis l'objet en dessous, chacun sur toute la largeur */
    .mail-list-content { flex-direction: column; align-items: stretch; gap: 2px; }
    .mail-list-from { width: auto; }
    .mail-list-subjectwrap { white-space: normal; overflow: visible; overflow-wrap: anywhere; font-size: 13px; line-height: 1.35; }
    .mail-list-date { width: auto; }
    .mail-dossier-entete { padding: 10px 14px; flex-wrap: wrap; }
    /* vehicules */
    .sv-cat-ligne { flex-wrap: wrap; gap: 4px 10px; }
    .sv-cat-ligne .aff { flex: 1 1 100%; order: 3; }
    /* tableaux : defilement horizontal dans leur carte, jamais la page entiere */
    .card:has(> table), .card:has(> .table-auto) { overflow-x: auto; -webkit-overflow-scrolling: touch; }
    table.table-auto th:first-child, table.table-auto td:first-child { white-space: nowrap; }
  }
  @media (max-width: 380px) {
    .main-content { padding-left: 0.75rem; padding-right: 0.75rem; }
    .mobile-topbar { margin-left: -0.75rem; margin-right: -0.75rem; }
    .hero-greeting { font-size: 18px; }
  }

  /* ===================================================================
     Harmonisation de la charte Agorha sur toutes les pages.
     Un seul arrondi, une seule ombre, les memes boutons, champs, onglets
     et en-tetes de page partout. Bloc place en dernier : il l'emporte.
     =================================================================== */
  :root {
    --rayon: 10px;
    --rayon-ctrl: 7px;
    --ombre: 0 1px 2px rgba(11,31,61,0.05), 0 3px 10px rgba(11,31,61,0.04);
    --ombre-survol: 0 2px 4px rgba(11,31,61,0.07), 0 8px 20px rgba(11,31,61,0.07);
  }
  body { background: var(--paper); }

  /* Conteneurs */
  .card, .feed-card, .section-card, .doc-rubrique, .sv-bloc, .ticket-empty,
  .rec-chiffre, .sv-chiffre, .stat-carte, .mail-layout, .ticker-card, .fiche-entete,
  .hero-banner, .annonce-carte { border-radius: var(--rayon); }
  .card, .feed-card, .section-card, .doc-rubrique, .sv-bloc, .ticket-empty,
  .rec-chiffre, .sv-chiffre, .stat-carte { box-shadow: var(--ombre); }
  .attente-carte, .acc-ligne, .contrat-ligne, .eff-champ { border-radius: 8px; }
  .modal-overlay > div, .modal-box, .modal { border-radius: var(--rayon); }

  /* Titres de section dans les cartes */
  .card h3, .feed-card h3, .section-card h3 { color: var(--navy-900); font-weight: 700; letter-spacing: 0.2px; }
  .section-icon { border-radius: 8px; }

  /* Boutons */
  .btn { border-radius: var(--rayon-ctrl); font-weight: 600; letter-spacing: 0.1px;
         transition: background .12s ease, border-color .12s ease, color .12s ease, box-shadow .12s ease; }
  .btn:hover { border-color: var(--navy-800); background: var(--paper); }
  .btn-primary { background: var(--navy-800); border-color: var(--navy-800); color: #fff; }
  .btn-primary:hover { background: var(--navy-900); border-color: var(--navy-900); color: #fff; box-shadow: inset 0 -2px 0 var(--or); }
  .btn-discord:hover { background: #4752C4; border-color: #4752C4; color: #fff; }
  .btn:focus-visible, .tab-btn:focus-visible, .ticket-tab:focus-visible, .sidebar-link:focus-visible,
  .sidebar-group-toggle:focus-visible, .eff-pill:focus-visible { outline: 2px solid var(--or); outline-offset: 2px; }
  .btn:disabled, .btn[disabled] { opacity: .55; cursor: not-allowed; box-shadow: none; }
  .mail-compose-btn { border-radius: var(--rayon-ctrl); }
  .eff-pill.on { background: var(--navy-800); box-shadow: inset 0 -2px 0 var(--or); }

  /* Champs de saisie */
  input, select, textarea { border-radius: var(--rayon-ctrl); }
  input:focus, select:focus, textarea:focus { outline: none; border-color: var(--navy-600); box-shadow: 0 0 0 3px rgba(201,162,64,0.22); }
  input[type="checkbox"], input[type="radio"] { accent-color: var(--navy-800); box-shadow: none; }

  /* Onglets : un seul style, souligne or */
  .tabs, .ticket-tabs { border-bottom: 1px solid var(--line); }
  .tab-btn, .ticket-tab { padding: 10px 16px; font-size: 13.5px; font-weight: 500; color: var(--steel); border-bottom: 2px solid transparent; margin-bottom: -1px; }
  .tab-btn:hover, .ticket-tab:hover { color: var(--navy-800); }
  .tab-btn.active, .ticket-tab.active { color: var(--navy-900); font-weight: 600; border-bottom: 3px solid var(--or); }
  .mail-nav-item.active { border-left-color: var(--or); }

  /* Tableaux */
  th { border-bottom-color: var(--navy-800); color: var(--navy-800); font-size: 11.5px; letter-spacing: 0.6px; }
  tbody tr.clickable:hover td, tr.clickable:hover td { background: #F6F8FC; }

  /* En-tetes de page : meme titre partout, avec le filet or de la marque */
  .main-content > :is(.top, .eff-entete, .suivi-bandeau, .pres-bandeau, .sv-entete, .page-tete) { margin-top: 4px; margin-bottom: 18px; }
  .main-content > :is(.top, .eff-entete, .suivi-bandeau, .pres-bandeau, .sv-entete, .page-tete) h2 {
    font-size: 25px; font-weight: 700; letter-spacing: 0.2px; line-height: 1.15; color: var(--navy-900);
    position: relative; padding-bottom: 9px; margin-top: 0; margin-bottom: 0 !important;
  }
  .main-content > :is(.top, .eff-entete, .suivi-bandeau, .pres-bandeau, .sv-entete, .page-tete) h2::after {
    content: ""; position: absolute; left: 0; bottom: 0; width: 34px; height: 3px; border-radius: 2px; background: var(--or);
  }
  .page-tete { display: flex; align-items: flex-end; gap: 10px 16px; flex-wrap: wrap; }
  .page-tete .page-titres { min-width: 0; }
  .page-tete .page-surtitre { color: var(--gold); font-size: 11px; font-weight: 700; text-transform: uppercase; letter-spacing: 1.6px; margin: 0 0 4px; }
  .page-tete .page-sous-titre { color: var(--steel); font-size: 13px; margin: 10px 0 0; line-height: 1.5; }
  .page-tete .page-actions { margin-left: auto; display: flex; gap: 8px; flex-wrap: wrap; }
  .eff-entete #eff-resume { display: inline-block; margin-top: 8px; }

  /* Pastilles et compteurs */
  .sidebar-badge, .tab-pastille, .mail-nav-count { font-variant-numeric: tabular-nums; }
  .badge { border-radius: 5px; }

  /* Icones du menu au trait */
  .sidebar .ic.ic-trait { filter: none; opacity: 1; display: inline-flex; align-items: center; justify-content: center; color: rgba(255,255,255,0.72); }
  .sidebar .ic.ic-trait svg { width: 17px; height: 17px; display: block; }
  .sidebar-link:hover .ic-trait, .sidebar-group-toggle:hover .ic-trait { color: #fff; }
  .sidebar-link.active .ic-trait { color: var(--or); }
  .sidebar-logout .ic-trait { color: rgba(255,255,255,0.8); }

  /* Finitions */
  /* Titre a cote d'une pastille : pas de soulignement partiel sous le seul texte */
  .section-head h3 { border-bottom: none; padding-bottom: 0; }
  /* Onglets toujours sur une ligne ; s'ils sont trop nombreux, la barre defile */
  .tabs { overflow-x: auto; overflow-y: hidden; scrollbar-width: thin; scrollbar-color: var(--line) transparent; }
  .tab-btn { white-space: nowrap; flex: 0 0 auto; }
  .tabs .tab-btn { margin-bottom: 0; }
  @media (max-width: 640px) {
    /* En-tete de fiche : photo et identite cote a cote, etiquettes en dessous sur toute la largeur */
    .fiche-entete { gap: 14px; padding: 16px; }
    .fiche-ident { flex: 1 1 160px; }
    .fiche-tags { flex: 1 1 100%; }
    .fiche-nom { font-size: 21px; }
    /* Calendrier : fleches compactes */
    .cal-actions .cal-txt { display: none; }
    .cal-actions .btn#cal-prev, .cal-actions .btn#cal-next { flex: 0 0 44px; }
  }

  /* ===== Accueil : en-tete leger, « A traiter » et acces rapides ===== */
  .acc-tete { margin: 4px 0 18px; }
  .acc-date { color: var(--gold); font-size: 11.5px; font-weight: 700; text-transform: uppercase; letter-spacing: 1.4px; }
  .acc-bonjour { font-family: var(--font-titre); font-size: 30px; font-weight: 700; color: var(--navy-900); margin: 4px 0; line-height: 1.1; border: none; padding: 0; }
  .acc-sous { color: var(--steel); font-size: 13.5px; }
  .acc-sous .sep { color: var(--line); margin: 0 6px; }
  .acc-grille { display: grid; grid-template-columns: minmax(0, 1.4fr) minmax(0, 1fr); gap: 16px; margin-bottom: 18px; }
  .acc-bloc { background: var(--white); border: 1px solid var(--line); border-radius: var(--rayon); box-shadow: var(--ombre); padding: 16px 18px; }
  .acc-bloc h3 { margin: 0 0 12px; padding: 0; border: none; font-family: 'Inter', sans-serif; font-size: 11.5px; font-weight: 700; text-transform: uppercase; letter-spacing: 1.1px; color: var(--steel); }
  .acc-liste { display: flex; flex-direction: column; gap: 6px; }
  .acc-item { display: flex; align-items: center; gap: 12px; width: 100%; text-align: left; background: var(--paper); border: 1px solid transparent; border-radius: 8px; padding: 9px 12px; cursor: pointer; font: inherit; color: var(--ink); transition: background .12s ease, border-color .12s ease; }
  .acc-item:hover { background: var(--white); border-color: var(--navy-600); }
  .acc-item .n { min-width: 28px; height: 28px; padding: 0 7px; border-radius: 14px; background: var(--navy-800); color: #fff; font-weight: 700; font-size: 12px; display: inline-flex; align-items: center; justify-content: center; flex: 0 0 auto; }
  .acc-item.alerte .n { background: var(--danger); }
  .acc-item .t { flex: 1; min-width: 0; font-size: 13.5px; font-weight: 500; }
  .acc-item .f { color: var(--steel); font-size: 20px; line-height: 1; }
  .acc-rien { display: flex; align-items: center; gap: 8px; color: #2E6B4F; font-size: 13.5px; font-weight: 500; padding: 8px 2px; }
  .acc-rien svg.ico { width: 20px; height: 20px; }
  .acc-raccourcis { display: grid; grid-template-columns: repeat(auto-fill, minmax(128px, 1fr)); gap: 8px; }
  .acc-raccourci { display: flex; flex-direction: column; align-items: flex-start; gap: 8px; background: var(--paper); border: 1px solid transparent; border-radius: 8px; padding: 12px; cursor: pointer; font: inherit; font-size: 13px; font-weight: 600; color: var(--navy-900); text-align: left; transition: background .12s ease, border-color .12s ease; }
  .acc-raccourci svg.ico { width: 20px; height: 20px; color: var(--gold); }
  .acc-raccourci:hover { background: var(--white); border-color: var(--navy-600); }
  @media (max-width: 900px) { .acc-grille { grid-template-columns: 1fr; } }
  @media (max-width: 640px) {
    .acc-bonjour { font-size: 24px; }
    .acc-raccourcis { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  }

  /* ===== Accueil : bandeau aux couleurs d'Agorha ===== */
  .acc-hero { position: relative; overflow: hidden; border-radius: 14px; margin: 2px 0 18px; color: #fff;
    background: radial-gradient(ellipse 60% 120% at 100% 0%, rgba(201,162,64,0.16), transparent 60%), linear-gradient(135deg, var(--navy-900) 0%, var(--navy-800) 55%, var(--navy-700) 100%);
    box-shadow: 0 10px 30px rgba(11,31,61,0.18); }
  .acc-hero::after { content: ""; position: absolute; right: -30px; top: -26px; width: 230px; height: 268px; background: url("assets/blason.png") center / contain no-repeat; opacity: .07; pointer-events: none; }
  .acc-hero-haut { position: relative; z-index: 1; display: flex; align-items: flex-end; justify-content: space-between; gap: 18px 28px; flex-wrap: wrap; padding: 26px 30px 20px; }
  .acc-hero .acc-date { color: var(--or); }
  .acc-hero .acc-bonjour { color: #fff; font-size: 32px; margin: 6px 0 4px; }
  .acc-hero .acc-sous { color: rgba(255,255,255,0.72); font-size: 14px; }
  .acc-stats { display: flex; gap: 10px; }
  .acc-stat { min-width: 112px; padding: 10px 16px; border-radius: 12px; background: rgba(255,255,255,0.07); border: 1px solid rgba(255,255,255,0.12); }
  .acc-stat .n { display: block; font-family: var(--font-titre); font-size: 28px; font-weight: 700; line-height: 1.05; }
  .acc-stat .l { display: block; font-size: 11px; text-transform: uppercase; letter-spacing: .8px; color: rgba(255,255,255,0.65); margin-top: 2px; }
  .acc-hero-bas { position: relative; z-index: 1; display: flex; align-items: center; gap: 8px; flex-wrap: wrap; padding: 14px 30px 18px; border-top: 1px solid rgba(255,255,255,0.10); background: rgba(0,0,0,0.12); }
  .acc-hero-label { font-size: 10.5px; font-weight: 700; text-transform: uppercase; letter-spacing: 1.3px; color: rgba(255,255,255,0.55); margin-right: 6px; }
  .acc-puce { display: inline-flex; align-items: center; gap: 8px; padding: 6px 12px 6px 6px; border-radius: 22px; font: inherit; font-size: 13px; font-weight: 600; color: #fff; background: rgba(255,255,255,0.10); border: 1px solid rgba(255,255,255,0.16); cursor: pointer; transition: background .12s ease, border-color .12s ease; }
  .acc-puce:hover { background: rgba(255,255,255,0.18); border-color: var(--or); }
  .acc-puce b { min-width: 24px; height: 24px; padding: 0 7px; border-radius: 12px; background: var(--or); color: var(--navy-900); font-size: 12px; display: inline-flex; align-items: center; justify-content: center; }
  .acc-puce.alerte b { background: #E25B4E; color: #fff; }
  .acc-puce .f { opacity: .55; font-size: 16px; line-height: 1; }
  .acc-puce.ok { cursor: default; padding: 6px 14px 6px 10px; color: rgba(255,255,255,0.85); }
  .acc-puce.ok:hover { background: rgba(255,255,255,0.10); border-color: rgba(255,255,255,0.16); }
  .acc-puce.ok svg.ico { width: 17px; height: 17px; color: #7FD49A; }

  /* Acces rapides : tuiles */
  .acc-rapides { margin-bottom: 18px; }
  .acc-rapides .acc-bloc-tete { margin-bottom: 10px; padding: 0 2px; }
  .acc-rapides .acc-bloc-tete h3 { border: none; padding: 0; font-family: 'Inter', sans-serif; font-size: 11.5px; font-weight: 700; text-transform: uppercase; letter-spacing: 1.1px; color: var(--steel); }
  .acc-rapides .acc-aide, .acc-rapides .racc-choix, .acc-rapides .racc-boutons, .acc-rapides #racc-err { padding: 0 2px; }
  .acc-tuiles { display: grid; grid-template-columns: repeat(auto-fit, minmax(132px, 1fr)); gap: 10px; }
  .acc-tuile { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 10px; text-align: center; min-height: 104px; padding: 16px 10px 14px; border-radius: 12px; background: var(--white); border: 1px solid var(--line); box-shadow: var(--ombre); font: inherit; font-size: 13px; font-weight: 600; color: var(--navy-900); cursor: pointer; transition: transform .12s ease, box-shadow .12s ease, border-color .12s ease; }
  .acc-tuile .ic { width: 42px; height: 42px; border-radius: 12px; background: var(--navy-800); display: inline-flex; align-items: center; justify-content: center; box-shadow: inset 0 -2px 0 var(--or); }
  .acc-tuile .ic svg.ico { width: 20px; height: 20px; color: var(--or); }
  .acc-tuile .t { line-height: 1.25; }
  .acc-tuile:hover { transform: translateY(-2px); border-color: var(--navy-600); box-shadow: var(--ombre-survol); }
  @media (max-width: 760px) {
    .acc-hero-haut { padding: 20px 18px 16px; }
    .acc-hero .acc-bonjour { font-size: 25px; }
    .acc-stats { width: 100%; }
    .acc-stat { flex: 1 1 0; min-width: 0; padding: 8px 12px; }
    .acc-stat .n { font-size: 22px; }
    .acc-hero-bas { padding: 12px 18px 14px; }
    .acc-hero-label { width: 100%; margin: 0 0 2px; }
    .acc-puce { max-width: 100%; }
    .acc-tuiles { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; }
    .acc-tuile { min-height: 90px; padding: 12px 6px; font-size: 12px; gap: 8px; }
    .acc-tuile .ic { width: 36px; height: 36px; border-radius: 10px; }
  }
  /* En-tete de bloc : titre a gauche, actions a droite */
  .acc-bloc-tete { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-bottom: 12px; min-height: 28px; }
  .acc-bloc-tete h3 { margin: 0; display: flex; align-items: center; gap: 8px; }
  .acc-bloc-actions { display: flex; gap: 6px; align-items: center; }
  .btn.btn-mini { padding: 4px 10px; font-size: 12px; }
  .btn.btn-mini:disabled { opacity: .35; }
  .acc-lien { background: none; border: none; color: var(--navy-700); font: inherit; font-size: 12.5px; font-weight: 600; cursor: pointer; display: inline-flex; align-items: center; gap: 5px; padding: 2px 4px; border-radius: 5px; }
  .acc-lien:hover { background: var(--paper); }
  .acc-aide { font-size: 12.5px; color: var(--steel); margin: 0 0 10px; }
  .acc-bloc + .acc-bloc, .acc-grille + .acc-bloc { margin-top: 0; }
  .ann-bloc, .cal2-bloc { margin-bottom: 18px; }

  /* Personnalisation des acces rapides */
  .racc-choix { display: flex; flex-wrap: wrap; gap: 6px; }
  .racc-option { display: inline-flex; align-items: center; gap: 6px; border: 1px solid var(--line); border-radius: 20px; padding: 5px 12px 5px 8px; font-size: 12.5px; font-weight: 500; color: var(--ink); cursor: pointer; text-transform: none; letter-spacing: normal; margin: 0; background: var(--white); transition: background .12s ease, border-color .12s ease; }
  .racc-option input { display: none; }
  .racc-option svg.ico { color: var(--steel); }
  .racc-option.on { background: var(--navy-800); border-color: var(--navy-800); color: #fff; }
  .racc-option.on svg.ico { color: var(--or); }
  .racc-boutons { display: flex; gap: 8px; flex-wrap: wrap; margin-top: 12px; }
  .racc-boutons .racc-defaut { margin-left: auto; border-color: transparent; color: var(--steel); font-weight: 500; }

  /* Annonces : la plus recente en avant, les suivantes en liste */
  .ann-compte { background: var(--danger); color: #fff; font-size: 10px; letter-spacing: .4px; border-radius: 10px; padding: 2px 8px; text-transform: none; }
  .ann-type { display: inline-block; font-size: 10px; font-weight: 700; text-transform: uppercase; letter-spacing: .8px; color: var(--teinte, var(--navy-700)); }
  .ann-une { position: relative; border-radius: 10px; padding: 16px 18px 14px; background: linear-gradient(180deg, var(--paper), var(--white)); border: 1px solid var(--line); border-left: 4px solid var(--teinte, var(--navy-700)); cursor: pointer; transition: border-color .12s ease, box-shadow .12s ease; }
  .ann-une:hover { box-shadow: var(--ombre-survol); }
  .ann-une-tete { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
  .ann-nouveau { background: var(--danger); color: #fff; font-size: 9.5px; font-weight: 700; letter-spacing: .6px; text-transform: uppercase; border-radius: 10px; padding: 2px 7px; }
  .ann-quand { color: var(--steel); font-size: 12px; }
  .ann-titre { font-family: var(--font-titre); font-size: 20px; font-weight: 700; color: var(--navy-900); margin: 6px 0 4px; line-height: 1.25; border: none; padding: 0; }
  .ann-apercu { color: var(--ink); font-size: 13.5px; line-height: 1.6; margin: 0 0 8px; }
  .ann-lire { font-size: 12.5px; font-weight: 600; color: var(--navy-700); }
  .ann-une:hover .ann-lire { color: var(--gold); }
  .ann-gestion { margin-left: auto; display: flex; gap: 4px; }
  .ann-gestion .btn { padding: 3px 8px; font-size: 12px; line-height: 1; background: var(--white); }
  .ann-liste { margin-top: 10px; display: flex; flex-direction: column; }
  .ann-ligne { display: flex; align-items: center; gap: 12px; padding: 9px 6px; border-top: 1px solid var(--line); cursor: pointer; border-radius: 6px; transition: background .12s ease; }
  .ann-ligne:hover { background: var(--paper); }
  .ann-date { flex: 0 0 auto; width: 44px; text-align: center; border-radius: 8px; background: var(--paper); padding: 4px 0; border-top: 3px solid var(--teinte, var(--navy-700)); line-height: 1.05; }
  .ann-date .j { display: block; font-family: var(--font-titre); font-weight: 700; font-size: 17px; color: var(--navy-900); }
  .ann-date .m { display: block; font-size: 10px; text-transform: uppercase; letter-spacing: .5px; color: var(--steel); }
  .ann-corps { flex: 1; min-width: 0; }
  .ann-ligne-titre { font-weight: 600; font-size: 13.5px; color: var(--navy-900); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; display: flex; align-items: center; gap: 7px; }
  .ann-ligne.non-lue .ann-ligne-titre { font-weight: 700; }
  .ann-point { display: inline-block; width: 8px; height: 8px; border-radius: 50%; background: var(--danger); flex: 0 0 auto; vertical-align: middle; box-shadow: 0 0 0 2px rgba(192,57,43,0.18); }
  .agenda-titre .ann-point { margin: -2px 7px 0 0; }
  .ann-ligne-meta { font-size: 11.5px; color: var(--steel); margin-top: 2px; }
  .ann-vide { color: var(--steel); font-size: 13px; margin: 4px 0; }

  /* Calendrier : grille du mois a gauche, prochains evenements a droite */
  .cal2 { display: grid; grid-template-columns: minmax(0, 1.5fr) minmax(0, 1fr); gap: 22px; }
  .cal2-nav { display: flex; align-items: center; justify-content: space-between; margin-bottom: 10px; }
  .cal2-titre { font-family: var(--font-titre); font-size: 17px; font-weight: 700; color: var(--navy-900); text-transform: capitalize; }
  .cal2-grille { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); gap: 4px; }
  .cal2-entete { text-align: center; font-size: 10px; font-weight: 700; text-transform: uppercase; letter-spacing: .7px; color: var(--steel); padding-bottom: 4px; }
  .cal2-jour { position: relative; aspect-ratio: 1 / 0.82; min-height: 38px; border-radius: 8px; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 3px; font-size: 13px; color: var(--ink); background: #F8FAFD; border: 1px solid transparent; }
  .cal2-jour.hors { background: none; }
  .cal2-jour.weekend { background: #F1F4F9; }
  .cal2-jour.passe { background: transparent; }
  .cal2-jour.passe .n { color: var(--steel-light); }
  .cal2-jour[data-cal-day], .cal2-jour[data-cal-new] { cursor: pointer; }
  .cal2-jour[data-cal-day]:hover, .cal2-jour[data-cal-new]:hover { border-color: var(--navy-600); }
  .cal2-jour.avec { background: #F3F6FB; font-weight: 600; }
  .cal2-jour .n { line-height: 1; }
  .cal2-jour.aujourdhui .n { background: var(--navy-800); color: #fff; border-radius: 50%; width: 24px; height: 24px; display: inline-flex; align-items: center; justify-content: center; box-shadow: 0 0 0 2px var(--or); }
  .cal2-jour .pts { display: flex; gap: 3px; align-items: center; height: 6px; }
  .cal2-jour .pts i { width: 6px; height: 6px; border-radius: 50%; display: block; }
  .cal2-jour .pts b { font-size: 9px; color: var(--steel); font-weight: 700; }
  .cal2-legende { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 12px; font-size: 11.5px; color: var(--steel); }
  .cal2-legende i, .agenda-ligne i { width: 8px; height: 8px; border-radius: 50%; display: inline-block; margin-right: 5px; }
  .cal2-agenda { border-left: 1px solid var(--line); padding-left: 20px; min-width: 0; }
  .cal2-agenda-titre { font-size: 11px; font-weight: 700; text-transform: uppercase; letter-spacing: 1px; color: var(--steel); margin: 6px 0 10px; }
  .agenda-ligne { display: flex; gap: 12px; align-items: center; padding: 8px 6px; border-radius: 8px; cursor: pointer; transition: background .12s ease; }
  .agenda-ligne:hover { background: var(--paper); }
  .agenda-date { flex: 0 0 auto; width: 44px; text-align: center; line-height: 1.05; border-radius: 8px; padding: 5px 0; background: var(--white); border: 1px solid var(--line); border-left: 3px solid var(--teinte); }
  .agenda-date .j { display: block; font-family: var(--font-titre); font-weight: 700; font-size: 17px; color: var(--navy-900); }
  .agenda-date .m { display: block; font-size: 10px; text-transform: uppercase; color: var(--steel); }
  .agenda-corps { min-width: 0; }
  .agenda-titre { font-weight: 600; font-size: 13px; color: var(--navy-900); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
  .agenda-meta { font-size: 11.5px; color: var(--steel); margin-top: 2px; text-transform: none; }
  .agenda-type { color: var(--teinte); font-weight: 700; }
  @media (max-width: 900px) {
    .cal2 { grid-template-columns: 1fr; gap: 16px; }
    .cal2-agenda { border-left: none; padding-left: 0; border-top: 1px solid var(--line); padding-top: 12px; }
  }
  @media (max-width: 640px) {
    .cal2-grille { gap: 2px; }
    .cal2-jour { min-height: 34px; font-size: 12px; border-radius: 6px; }
    .ann-une { padding: 14px; }
    .ann-titre { font-size: 18px; }
    .racc-boutons .racc-defaut { margin-left: 0; }
  }

  /* ===== Dossier militaire : carte d'identite claire + resume cliquable ===== */
  .dos-entete { display: flex; gap: 18px; align-items: flex-start; flex-wrap: wrap; background: var(--white); border: 1px solid var(--line); border-top: 3px solid var(--navy-800); border-radius: var(--rayon); box-shadow: var(--ombre); padding: 20px 22px; margin-bottom: 14px; }
  .dos-photo { width: 84px; height: 84px; border-radius: 14px; overflow: hidden; flex: 0 0 auto; background: var(--paper); border: 1px solid var(--line); }
  .dos-photo img { width: 100%; height: 100%; object-fit: cover; display: block; }
  .dos-photo.vide { background: #DFE6EF; }
  .dos-ident { flex: 1 1 260px; min-width: 0; }
  .dos-nom { font-family: var(--font-titre); font-size: 26px; font-weight: 700; color: var(--navy-900); line-height: 1.15; display: flex; align-items: center; gap: 6px 10px; flex-wrap: wrap; }
  .dos-nom .badge { font-family: 'Inter', sans-serif; font-size: 10px; letter-spacing: .6px; }
  .dos-grade { color: var(--gold); font-weight: 600; font-size: 14px; margin-top: 3px; }
  .dos-grade .sep { color: var(--line); margin: 0 3px; }
  .dos-postes { color: var(--ink); font-size: 13.5px; margin-top: 3px; }
  .dos-meta { display: flex; flex-wrap: wrap; gap: 6px 18px; margin-top: 10px; font-size: 13px; color: var(--ink); }
  .dos-meta b { color: var(--steel); font-weight: 700; font-size: 10px; text-transform: uppercase; letter-spacing: .7px; margin-right: 5px; }
  .dos-tags { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 10px; }
  .dos-entete .deco-barrette { margin-top: 10px; }
  .dos-actions { display: flex; flex-direction: column; gap: 8px; flex: 0 0 auto; }
  .dos-actions .btn { white-space: nowrap; }
  .dos-modif:not([open]) { display: none; }
  .dos-modif > summary { font-family: var(--font-titre); font-weight: 700; font-size: 16px; color: var(--navy-900); cursor: pointer; }
  .dos-resume { display: grid; grid-template-columns: repeat(auto-fit, minmax(170px, 1fr)); gap: 10px; margin-bottom: 6px; }
  .dos-kpi { text-align: left; background: var(--white); border: 1px solid var(--line); border-radius: var(--rayon); padding: 12px 14px; cursor: pointer; font: inherit; display: flex; flex-direction: column; gap: 2px; box-shadow: var(--ombre); transition: border-color .12s ease; }
  .dos-kpi:hover { border-color: var(--navy-600); }
  .dos-kpi.on { border-color: var(--or); box-shadow: inset 0 -3px 0 var(--or), var(--ombre); }
  .dos-kpi .l { font-size: 10.5px; font-weight: 700; text-transform: uppercase; letter-spacing: .8px; color: var(--steel); }
  .dos-kpi .v { font-family: var(--font-titre); font-size: 20px; font-weight: 700; color: var(--navy-900); line-height: 1.2; }
  .dos-kpi .s { font-size: 11.5px; color: var(--steel); }
  .contrat-alerte .btn { margin-left: auto; }
  @media (max-width: 640px) {
    .dos-entete { padding: 16px; gap: 14px; }
    .dos-photo { width: 64px; height: 64px; border-radius: 12px; }
    .dos-ident { flex: 1 1 160px; }
    .dos-nom { font-size: 21px; }
    .dos-actions { flex-direction: row; width: 100%; }
    .dos-actions .btn { flex: 1 1 0; }
    .dos-resume { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  }

  /* ===== Fenetres epurees (evenements, journee, annonces) ===== */
  .mdl-fermer { position: absolute; top: 14px; right: 14px; z-index: 3; width: 32px; height: 32px; border-radius: 50%; border: 1px solid var(--line); background: var(--white); color: var(--steel); font-size: 14px; cursor: pointer; display: inline-flex; align-items: center; justify-content: center; transition: background .12s ease, color .12s ease; }
  .mdl-fermer:hover { background: var(--paper); color: var(--navy-900); }
  .mdl-tete { padding: 24px 64px 16px 28px; border-bottom: 1px solid var(--line); background: var(--white); border-radius: var(--rayon) var(--rayon) 0 0; }
  .mdl-tete-jour { display: flex; align-items: center; gap: 16px; }
  .mdl-surtitre { font-size: 11px; font-weight: 700; text-transform: uppercase; letter-spacing: 1.4px; color: var(--gold); margin-bottom: 4px; }
  .mdl-surtitre.mdl-teinte { color: var(--teinte, var(--gold)); }
  .mdl-titre { font-family: var(--font-titre); font-size: 22px; font-weight: 700; color: var(--navy-900); margin: 0; line-height: 1.2; }
  .mdl-titre-grand { font-size: 26px; }
  .mdl-sous { color: var(--steel); font-size: 13px; margin-top: 4px; }
  .mdl-sous::first-letter { text-transform: uppercase; }
  .mdl-jour { flex: 0 0 auto; width: 58px; height: 62px; border-radius: 12px; background: var(--navy-800); color: #fff; display: flex; flex-direction: column; align-items: center; justify-content: center; line-height: 1; box-shadow: inset 0 -3px 0 var(--or); }
  .mdl-jour .j { font-family: var(--font-titre); font-size: 26px; font-weight: 700; }
  .mdl-jour .m { font-size: 10.5px; text-transform: uppercase; letter-spacing: 1px; color: rgba(255,255,255,.75); margin-top: 3px; }
  .mdl-corps { padding: 20px 28px; }
  .mdl-lecture { padding: 22px 32px 28px; }
  .mdl-lecture .annonce-corps { line-height: 1.75; font-size: 14.5px; overflow-wrap: anywhere; word-break: break-word; color: var(--ink); }
  .mdl-pied { display: flex; align-items: center; justify-content: flex-end; gap: 8px; flex-wrap: wrap; padding: 14px 28px; border-top: 1px solid var(--line); background: var(--paper); border-radius: 0 0 var(--rayon) var(--rayon); position: sticky; bottom: 0; z-index: 2; }
  .mdl-pied .err { margin: 0 auto 0 0; flex: 1 1 200px; }
  .mdl-pied .err:empty { flex: 1 1 0; }
  .mdl-champ { margin-bottom: 14px; min-width: 0; }
  .mdl-champ input, .mdl-champ select { margin-bottom: 0; }
  .mdl-label { display: block; font-size: 12.5px; color: var(--steel); margin-bottom: 6px; font-weight: 500; text-transform: uppercase; letter-spacing: .4px; }
  .mdl-facultatif { text-transform: none; letter-spacing: 0; font-weight: 400; color: var(--steel-light); font-size: 11.5px; margin-left: 4px; }
  .mdl-ligne { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
  .mdl-editeur { border: 1px solid var(--line); border-radius: var(--rayon-ctrl); overflow: hidden; background: var(--white); }
  .mdl-editeur:focus-within { border-color: var(--navy-600); box-shadow: 0 0 0 3px rgba(201,162,64,0.22); }
  .mdl-editeur .rte-toolbar { border: none; border-bottom: 1px solid var(--line); border-radius: 0; background: var(--paper); margin: 0; padding: 6px; }
  .mdl-editeur .rte-editor { border: none !important; border-radius: 0; box-shadow: none !important; margin: 0; }
  .mdl-option { display: flex; align-items: flex-start; gap: 10px; padding: 12px 14px; border: 1px solid var(--line); border-radius: var(--rayon-ctrl); cursor: pointer; text-transform: none; letter-spacing: normal; font-weight: 400; font-size: 13px; color: var(--ink); margin: 0 0 14px; }
  .mdl-option input { width: auto; margin: 2px 0 0; }
  .mdl-option small { color: var(--steel); }
  .mdl-docs { border: 1px dashed var(--line); border-radius: var(--rayon-ctrl); padding: 10px 14px; }
  .mdl-docs > summary { cursor: pointer; font-size: 13px; font-weight: 600; color: var(--navy-800); display: flex; align-items: center; gap: 6px; }
  .mdl-docs[open] > summary { margin-bottom: 10px; }
  .mdl-docs > label:first-of-type { display: none; }
  /* Choix de categorie en pastilles */
  .ev-cats { display: flex; flex-wrap: wrap; gap: 6px; }
  .ev-cat { display: inline-flex; align-items: center; gap: 7px; padding: 7px 14px; border-radius: 20px; border: 1px solid var(--line); background: var(--white); font: inherit; font-size: 13px; font-weight: 600; color: var(--ink); cursor: pointer; transition: background .12s ease, border-color .12s ease, color .12s ease; }
  .ev-cat i { width: 9px; height: 9px; border-radius: 50%; background: var(--teinte); }
  .ev-cat:hover { border-color: var(--teinte); }
  .ev-cat.on { background: var(--teinte); border-color: var(--teinte); color: #fff; }
  .ev-cat.on i { background: #fff; }
  /* Evenements d'une journee */
  .jevt { position: relative; border: 1px solid var(--line); border-radius: var(--rayon); padding: 14px 16px 12px 18px; margin-bottom: 12px; background: var(--white); box-shadow: var(--ombre); overflow: hidden; }
  .jevt::before { content: ""; position: absolute; left: 0; top: 0; bottom: 0; width: 4px; background: var(--teinte); }
  .jevt:last-child { margin-bottom: 0; }
  .jevt-tete { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
  .jevt-cat { font-size: 10.5px; font-weight: 700; text-transform: uppercase; letter-spacing: .7px; color: var(--teinte); background: color-mix(in srgb, var(--teinte) 12%, #fff); border-radius: 12px; padding: 3px 10px; }
  .jevt-heure { font-size: 12.5px; font-weight: 600; color: var(--navy-800); display: inline-flex; align-items: center; gap: 4px; }
  .jevt-clos { font-size: 10px; text-transform: uppercase; letter-spacing: .5px; color: var(--steel); background: var(--paper); border-radius: 12px; padding: 3px 9px; }
  .jevt-gestion { margin-left: auto; display: flex; gap: 4px; }
  .jevt-gestion .btn { padding: 4px 9px; font-size: 12px; line-height: 1; }
  .jevt-titre { font-family: var(--font-titre); font-size: 18px; font-weight: 700; color: var(--navy-900); margin: 8px 0 2px; padding: 0; border: none; }
  .jevt-corps { margin-top: 6px; line-height: 1.6; font-size: 13.5px; color: var(--ink); }
  .jevt-docs { margin-top: 10px; display: flex; flex-wrap: wrap; gap: 6px; }
  .jevt-insc { margin-top: 12px; padding-top: 12px; border-top: 1px solid var(--line); }
  .jevt-insc .jour-evt-insc .btn { padding: 6px 16px; }
  .jevt-auteur { margin-top: 10px; font-size: 11.5px; color: var(--steel); }
  .jour-vide { display: flex; flex-direction: column; align-items: center; gap: 8px; color: var(--steel); font-size: 13.5px; padding: 24px 0; }
  .jour-vide svg.ico { width: 30px; height: 30px; color: var(--steel-light); }
  @media (max-width: 640px) {
    .mdl-tete { padding: 18px 56px 14px 18px; }
    .mdl-corps, .mdl-lecture { padding: 16px 18px; }
    .mdl-pied { padding: 12px 18px; }
    .mdl-pied .btn { flex: 1 1 auto; }
    .mdl-ligne { grid-template-columns: 1fr; gap: 0; }
    .mdl-titre { font-size: 19px; }
    .mdl-titre-grand { font-size: 21px; }
    .mdl-jour { width: 50px; height: 54px; }
  }

  /* ===== Dossier militaire : contenu des onglets ===== */
  .dos-contenu { margin-top: 4px; }
  .dos-contenu .card { border-top: 1px solid var(--line); padding: 20px 22px; }
  .dos-contenu .card h3 { font-family: var(--font-titre); font-size: 17px; font-weight: 700; color: var(--navy-900); border: none; padding: 0; margin: 0 0 14px; }
  .dos-section-tete { display: flex; align-items: center; gap: 10px; margin-bottom: 16px; }
  .dos-section-tete h3 { margin: 0 !important; }
  .dos-compte { font-size: 12px; color: var(--steel); background: var(--paper); border-radius: 12px; padding: 2px 10px; }
  .dos-statut { margin-left: auto; font-size: 11px; font-weight: 700; text-transform: uppercase; letter-spacing: .7px; border-radius: 12px; padding: 3px 11px; }
  .dos-statut.ok { background: #E3F1E6; color: #2E6B4F; }
  .dos-statut.attente { background: #FBEAE8; color: var(--danger); }
  .dos-statut.neutre { background: var(--paper); color: var(--steel); }
  .dos-vide { color: var(--steel); font-size: 13px; padding: 6px 0 2px; }
  .dos-sous-titre { font-size: 11px; font-weight: 700; text-transform: uppercase; letter-spacing: .9px; color: var(--steel); margin-bottom: 10px; }
  /* Tableaux des onglets : plus legers */
  .dos-contenu table th { border-bottom: 1px solid var(--line); color: var(--steel); font-size: 10.5px; letter-spacing: .8px; padding: 8px 10px; background: var(--paper); }
  .dos-contenu table th:first-child { border-radius: 8px 0 0 8px; }
  .dos-contenu table th:last-child { border-radius: 0 8px 8px 0; }
  .dos-contenu table td { padding: 11px 10px; border-bottom: 1px solid #EEF1F6; font-size: 13.5px; }
  .dos-contenu table tbody tr:last-child td { border-bottom: none; }
  .dos-contenu table tbody tr:hover td { background: #F8FAFD; }
  /* Formulaires d'ajout : un panneau discret sous le contenu */
  .dos-ajout, .dos-contenu .card > .form-row { margin-top: 16px; padding: 14px 16px; background: var(--paper); border: 1px solid var(--line); border-radius: var(--rayon-ctrl); }
  .dos-ajout .form-row { margin: 0; padding: 0; background: none; border: none; }
  .dos-ajout + .dos-ajout { margin-top: 10px; }
  .dos-ajout-titre { display: flex; align-items: center; gap: 7px; flex-wrap: wrap; font-size: 13px; font-weight: 700; color: var(--navy-900); margin-bottom: 10px; }
  .dos-ajout-titre span { font-weight: 400; color: var(--steel); font-size: 12px; }
  .dos-ajout-titre svg.ico { color: var(--gold); }
  .dos-ajout input, .dos-ajout select, .dos-ajout textarea, .dos-contenu .card > .form-row input, .dos-contenu .card > .form-row select { background: var(--white); }
  .dos-ajout label { text-transform: none; letter-spacing: normal; font-size: 12.5px; }
  /* Frise de l'historique */
  .tl { list-style: none; margin: 0; padding: 0 0 0 4px; position: relative; }
  .tl::before { content: ""; position: absolute; left: 10px; top: 8px; bottom: 8px; width: 2px; background: var(--line); border-radius: 2px; }
  .tl-item { position: relative; display: grid; grid-template-columns: 96px minmax(0, 1fr) auto; gap: 4px 14px; align-items: start; padding: 8px 6px 10px 30px; border-radius: 8px; }
  .tl-item:hover { background: #F8FAFD; }
  .tl-point { position: absolute; left: 1px; top: 12px; width: 14px; height: 14px; border-radius: 50%; background: var(--white); border: 3px solid var(--teinte); box-shadow: 0 0 0 3px var(--white); }
  .tl-date { font-size: 12.5px; font-weight: 600; color: var(--steel); padding-top: 2px; font-variant-numeric: tabular-nums; }
  .tl-corps { min-width: 0; }
  .tl-nature { display: inline-block; font-size: 10px; font-weight: 700; text-transform: uppercase; letter-spacing: .7px; color: var(--teinte); margin-bottom: 1px; }
  .tl-texte { font-size: 13.5px; color: var(--ink); font-weight: 500; line-height: 1.45; }
  .tl-texte.sanction { color: var(--danger); font-weight: 600; }
  .tl-auteur { font-size: 11px; color: var(--steel); margin-top: 2px; }
  .tl-suppr { opacity: 0; transition: opacity .12s ease; }
  .tl-item:hover .tl-suppr, .tl-suppr:focus { opacity: 1; }
  /* Contrat */
  .contrat-carte, .contrat-archive { display: flex; align-items: center; gap: 14px; flex-wrap: wrap; padding: 14px 16px; border-radius: var(--rayon-ctrl); border: 1px solid #CFE6D6; background: linear-gradient(90deg, #F1F8F3, var(--white) 70%); }
  .contrat-archive { border-color: var(--line); background: var(--white); padding: 10px 14px; margin-bottom: 8px; }
  .contrat-sceau { flex: 0 0 auto; width: 40px; height: 40px; border-radius: 50%; background: #2E6B4F; color: #fff; display: inline-flex; align-items: center; justify-content: center; }
  .contrat-sceau svg.ico { width: 22px; height: 22px; }
  .contrat-sceau.gris { background: var(--paper); color: var(--steel); width: 34px; height: 34px; }
  .contrat-sceau.gris svg.ico { width: 18px; height: 18px; }
  .contrat-infos { flex: 1 1 200px; min-width: 0; }
  .contrat-infos .t { font-weight: 700; font-size: 14px; color: var(--navy-900); }
  .contrat-archive .contrat-infos .t { font-size: 13px; }
  .contrat-infos .s { font-size: 12px; color: var(--steel); margin-top: 2px; }
  .contrat-actions { display: flex; gap: 8px; flex-wrap: wrap; }
  .contrat-archives { margin-top: 18px; padding-top: 16px; border-top: 1px solid var(--line); }
  .btn.btn-danger-doux { color: var(--danger); border-color: #E6C4C0; }
  .btn.btn-danger-doux:hover { background: #FBEAE8; border-color: var(--danger); }
  @media (max-width: 640px) {
    .dos-contenu .card { padding: 16px; }
    .tl-item { grid-template-columns: minmax(0, 1fr) auto; padding-left: 28px; }
    .tl-date { grid-column: 1 / -1; padding-top: 0; font-size: 11.5px; }
    .tl-suppr { opacity: 1; }
    .contrat-actions { width: 100%; }
    .contrat-actions .btn { flex: 1 1 auto; }
  }

  /* ===== Vehicules : parc en cartes compactes ===== */
  .vh-resume { display: flex; flex-wrap: wrap; gap: 6px; margin: 0 0 12px; }
  .vh-resume span { font-size: 12.5px; background: var(--paper); border-radius: 8px; padding: 5px 11px; color: var(--steel); }
  .vh-resume b { font-family: var(--font-titre); font-size: 15px; color: var(--navy-900); margin-right: 3px; }
  .vh-resume .ok b { color: #2E6B4F; }
  .vh-resume .hs b { color: var(--danger); }
  .vh-parc { display: flex; flex-direction: column; gap: 16px; margin-bottom: 10px; }
  .vh-groupe-tete { display: flex; align-items: baseline; gap: 10px; margin: 0 0 8px; padding-bottom: 6px; border-bottom: 1px solid var(--line); }
  .vh-groupe-tete b { font-family: var(--font-titre); font-size: 15px; color: var(--navy-900); }
  .vh-groupe-tete span { flex: 1; font-size: 12px; color: var(--steel); }
  .vh-groupe-tete i { font-style: normal; font-size: 11.5px; font-weight: 700; color: var(--navy-800); background: var(--paper); border-radius: 10px; padding: 1px 8px; }
  .vh-grille { display: grid; grid-template-columns: repeat(auto-fill, minmax(250px, 1fr)); gap: 10px; }
  .vh-carte { background: var(--white); border: 1px solid var(--line); border-radius: 10px; padding: 11px 12px 10px; display: flex; flex-direction: column; gap: 8px; transition: border-color .12s ease, box-shadow .12s ease; }
  .vh-carte:hover { border-color: var(--navy-600); box-shadow: var(--ombre); }
  .vh-carte.hs { background: #FCF5F4; border-color: #EBCFCB; }
  .vh-carte.ouvert { grid-column: 1 / -1; border-color: var(--navy-600); }
  .vh-haut { display: flex; align-items: center; gap: 10px; }
  .vh-ic { flex: 0 0 auto; width: 34px; height: 34px; border-radius: 9px; background: var(--navy-800); color: var(--or); display: inline-flex; align-items: center; justify-content: center; }
  .vh-ic svg.ico { width: 18px; height: 18px; }
  .vh-carte.hs .vh-ic { background: #E7C9C5; color: var(--danger); }
  .vh-id { flex: 1; min-width: 0; }
  .vh-modele { font-weight: 700; font-size: 13.5px; color: var(--navy-900); overflow-wrap: break-word; }
  .vh-etat { font-size: 11px; font-weight: 600; display: inline-flex; align-items: center; gap: 5px; }
  .vh-etat::before { content: ""; width: 7px; height: 7px; border-radius: 50%; background: currentColor; }
  .vh-etat.ok { color: #2E6B4F; }
  .vh-etat.hs { color: var(--danger); }
  /* Plaque facon immatriculation francaise */
  .vh-plaque { flex: 0 0 auto; display: inline-flex; align-items: stretch; border: 1.5px solid #1C2430; border-radius: 4px; overflow: hidden; background: #fff; line-height: 1; }
  .vh-plaque i { font-style: normal; background: #1F4FA8; color: #fff; font-size: 9px; font-weight: 700; padding: 4px 3px 0; display: flex; align-items: flex-end; }
  .vh-plaque b { font-family: ui-monospace, Menlo, Consolas, monospace; font-size: 12px; font-weight: 700; letter-spacing: .6px; color: #111; padding: 4px 7px; text-transform: uppercase; }
  .vh-carte.hs .vh-plaque { opacity: .6; }
  .vh-tags { display: flex; flex-wrap: wrap; gap: 4px; }
  .vh-tags i { font-style: normal; font-size: 11px; color: var(--navy-800); background: #E9EEF5; border-radius: 10px; padding: 1px 8px; }
  .vh-tags i.asp { background: #F3EBD6; color: #6B5320; }
  .vh-tags i.multi { background: #DCE6F4; color: #112A4D; font-weight: 600; }
  .vh-tags i.vide { background: none; color: var(--steel); font-style: italic; padding-left: 0; }
  .vh-actions { display: flex; gap: 6px; padding-top: 8px; border-top: 1px solid #EEF1F6; }
  .vh-actions button { flex: 1 1 auto; border: 1px solid var(--line); background: var(--white); border-radius: 6px; font: inherit; font-size: 11.5px; font-weight: 600; color: var(--navy-800); padding: 4px 8px; cursor: pointer; }
  .vh-actions button:hover { border-color: var(--navy-600); background: var(--paper); }
  .vh-actions button.hs:hover { color: var(--danger); border-color: #E6C4C0; }
  .vh-actions button.dg { flex: 0 0 auto; color: var(--steel); }
  .vh-actions button.dg:hover { color: var(--danger); border-color: #E6C4C0; background: #FBEAE8; }
  .vh-carte .sv-veh-edition { margin: 4px 0 0; }
  .vh-vide { display: flex; align-items: center; gap: 12px; padding: 18px; border: 1px dashed var(--line); border-radius: 10px; color: var(--steel); background: var(--paper); }
  .vh-vide svg.ico { width: 26px; height: 26px; flex: 0 0 auto; }
  .vh-vide p { margin: 0; font-size: 13px; }
  /* Fenêtre d'ajout / modification d'un véhicule */
  .vhf { padding: 22px 24px 18px; }
  .vhf-tete { display: flex; align-items: center; justify-content: space-between; gap: 16px; flex-wrap: wrap; padding: 0 34px 16px 0; margin-bottom: 16px; border-bottom: 1px solid var(--line); }
  .vhf label { text-transform: none; letter-spacing: normal; }
  .vhf-champ em, .vhf-segment span, .vhf-puces span { text-transform: none; letter-spacing: normal; }
  .vhf-sur { font-size: 10.5px; font-weight: 800; letter-spacing: .7px; text-transform: uppercase; color: var(--or); }
  .vhf-tete h2 { margin: 3px 0 0; font-size: 19px; color: var(--navy-900); }
  .vhf-apercu { display: inline-flex; align-items: stretch; height: 40px; border: 2px solid #1C2430; border-radius: 6px; overflow: hidden; background: #fff; box-shadow: 0 2px 8px rgba(16,32,56,.15); }
  .vhf-apercu i { font-style: normal; width: 22px; background: #1F4FA8; color: #fff; font-size: 11px; font-weight: 800; display: flex; align-items: flex-end; justify-content: center; padding-bottom: 4px; }
  .vhf-apercu b { min-width: 150px; text-align: center; font-family: ui-monospace, Menlo, Consolas, monospace; font-size: 21px; font-weight: 800; letter-spacing: 1.5px; color: #111; padding: 0 12px; display: flex; align-items: center; justify-content: center; }
  .vhf-grille { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; margin-bottom: 14px; }
  .vhf-champ { display: flex; flex-direction: column; gap: 5px; }
  .vhf-champ > span, .vhf-lib { font-size: 12px; font-weight: 700; color: var(--navy-800); }
  .vhf-lib small { font-weight: 500; color: var(--steel); }
  .vhf-champ input { font: inherit; font-size: 14px; padding: 9px 11px; border: 1px solid var(--line); border-radius: 8px; background: var(--white); color: var(--ink); }
  .vhf-champ input:focus { outline: none; border-color: var(--navy-600); box-shadow: 0 0 0 3px rgba(31,79,168,.12); }
  .vhf-champ input.vhf-mono { font-family: ui-monospace, Menlo, Consolas, monospace; letter-spacing: 1px; text-transform: uppercase; }
  .vhf-champ em { font-style: normal; font-size: 11.5px; color: var(--steel); }
  .vhf-champ em.bon { color: #2E6B4F; }
  .vhf-champ em.ko { color: var(--danger); font-weight: 600; }
  .vhf-bloc { display: flex; flex-direction: column; gap: 7px; margin-bottom: 14px; }
  .vhf-bloc[hidden] { display: none; }
  .vhf-segment { display: inline-flex; align-self: flex-start; background: var(--paper); border: 1px solid var(--line); border-radius: 9px; padding: 3px; gap: 2px; flex-wrap: wrap; }
  .vhf-segment label, .vhf-puces label { cursor: pointer; position: relative; }
  .vhf-segment input, .vhf-puces input { position: absolute; opacity: 0; pointer-events: none; }
  .vhf-segment span { display: block; font-size: 12.5px; font-weight: 600; color: var(--steel); padding: 6px 14px; border-radius: 7px; }
  .vhf-segment input:checked + span { background: var(--white); color: var(--navy-900); box-shadow: 0 1px 3px rgba(16,32,56,.15); }
  .vhf-puces { display: flex; flex-wrap: wrap; gap: 6px; }
  .vhf-puces span { display: inline-flex; align-items: center; gap: 5px; font-size: 12px; font-weight: 600; color: var(--navy-800); padding: 5px 12px; border: 1px solid var(--line); border-radius: 16px; background: var(--white); }
  .vhf-puces span:hover { border-color: var(--navy-600); }
  .vhf-puces input:checked + span { background: var(--navy-800); border-color: var(--navy-800); color: #fff; }
  .vhf-puces input:checked + span::before { content: "✓"; font-size: 11px; }
  .vhf-segment input:focus-visible + span, .vhf-puces input:focus-visible + span { outline: 2px solid var(--gold); }
  .vhf-info { display: flex; align-items: center; gap: 8px; margin: 0 0 14px; font-size: 12.5px; color: var(--navy-800); background: #EEF3FA; border-radius: 8px; padding: 9px 12px; }
  .vhf-info svg.ico { width: 17px; height: 17px; flex: 0 0 auto; }
  @media (max-width: 560px){ .vhf-grille { grid-template-columns: 1fr; } .vhf-apercu b { min-width: 120px; font-size: 18px; } }
  @media (max-width: 640px) {
    .vh-grille { grid-template-columns: 1fr; }
  }

  /* Regle : un nom n'est jamais coupe (pas de « … ») ; il passe a la ligne si la place manque. */
  .abs-nom, .insc-nom, .sv-perm-l .n, .sv-membre .n, .acc-ligne .n, .rec-table .ident .n,
  .mod-carte .txt .t, .mod-seance .t, .mod-seance .fo, .mail-list-from, .mail-dossier-nom,
  .ann-ligne-titre, .agenda-titre, .vh-modele, .ticket-doc.jointe .nom, .carte-point .etiquette {
    white-space: normal !important; overflow: visible !important; text-overflow: clip !important;
    overflow-wrap: anywhere; max-width: none;
  }
  table.rec-table .ident { white-space: normal; overflow: visible; text-overflow: clip; }
  .vh-haut { flex-wrap: wrap; }
  .vh-id { flex: 1 1 120px; }

  /* ===== Espace documents ===== */
  .docs-barre { display: flex; align-items: center; gap: 10px 14px; flex-wrap: wrap; margin: -4px 0 18px; }
  .docs-onglets { display: flex; gap: 4px; padding: 4px; background: var(--white); border: 1px solid var(--line); border-radius: 12px; overflow-x: auto; scrollbar-width: none; }
  .docs-onglets::-webkit-scrollbar { display: none; }
  .docs-onglet { display: inline-flex; align-items: center; gap: 7px; padding: 7px 14px; border: none; border-radius: 9px; background: none; font: inherit; font-size: 13px; font-weight: 600; color: var(--steel); cursor: pointer; white-space: nowrap; transition: background .12s ease, color .12s ease; }
  .docs-onglet:hover { background: var(--paper); color: var(--navy-900); }
  .docs-onglet.on { background: var(--navy-800); color: #fff; box-shadow: inset 0 -2px 0 var(--or); }
  .docs-onglet.on svg.ico { color: var(--or); }
  .docs-recherche { flex: 1 1 220px; max-width: 360px; margin: 0 0 0 auto; display: flex; align-items: center; gap: 8px; background: var(--white); border: 1px solid var(--line); border-radius: 10px; padding: 0 12px; text-transform: none; letter-spacing: normal; color: var(--steel); }
  .docs-recherche:focus-within { border-color: var(--navy-600); box-shadow: 0 0 0 3px rgba(201,162,64,0.22); }
  .docs-recherche input { border: none !important; box-shadow: none !important; outline: none !important; margin: 0; padding: 9px 0; background: transparent; font-size: 13.5px; }
  .docs-aucun { color: var(--steel); font-size: 13.5px; text-align: center; padding: 18px 0; margin: 0; }
  /* Rubriques */
  .doc-rubrique { border-radius: var(--rayon); padding: 18px 20px 20px; box-shadow: var(--ombre); }
  .doc-rubrique-tete { align-items: center; gap: 10px; border-bottom: 1px solid var(--line); padding-bottom: 12px; margin-bottom: 14px; }
  .doc-rubrique-ic { flex: 0 0 auto; width: 32px; height: 32px; border-radius: 9px; background: color-mix(in srgb, var(--accent, var(--navy-700)) 14%, #fff); color: var(--accent, var(--navy-700)); display: inline-flex; align-items: center; justify-content: center; }
  .doc-rubrique-ic svg.ico { width: 17px; height: 17px; }
  .doc-rubrique-tete h3 { font-size: 18px; font-weight: 700; border: none; padding: 0; }
  .doc-compte { background: var(--paper); border-radius: 10px; padding: 2px 9px; font-size: 11.5px; }
  .doc-rubrique-tete .doc-ajout-btn { margin-left: auto; border-bottom: 1px solid; }
  .doc-formulaire { background: var(--paper); border: 1px solid var(--line); border-radius: var(--rayon-ctrl); padding: 12px; margin: 0 0 14px; }
  .doc-formulaire input { background: var(--white); }
  /* Documents en tuiles */
  .doc-liste { grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); gap: 10px; margin-top: 0; }
  .doc-piece { border: 1px solid var(--line); border-radius: 10px; padding: 12px; gap: 12px; align-items: flex-start; background: var(--white); transition: border-color .12s ease, box-shadow .12s ease, transform .12s ease; }
  .doc-piece:last-child { border-bottom: 1px solid var(--line); }
  .doc-piece:hover { border-color: var(--teinte, var(--navy-600)); box-shadow: var(--ombre-survol); transform: translateY(-1px); }
  .doc-piece[hidden], .doc-rubrique[hidden] { display: none !important; }
  .doc-glyphe { width: 38px; height: 38px; border-radius: 10px; color: var(--teinte, var(--navy-700)); background: color-mix(in srgb, var(--teinte, #1A3A66) 11%, #fff); }
  .doc-glyphe svg.ico { width: 19px; height: 19px; }
  .doc-corps { flex: 1; padding-top: 1px; }
  .doc-titre { font-size: 13.5px; line-height: 1.35; overflow-wrap: anywhere; }
  .doc-nature { font-size: 11px; font-weight: 600; text-transform: uppercase; letter-spacing: .5px; color: var(--teinte, var(--steel)); }
  .doc-ouvrir { color: var(--steel-light); font-weight: 400; }
  .doc-actions { position: absolute; top: 6px; right: 6px; background: var(--white); border-radius: 6px; padding: 1px; box-shadow: 0 1px 4px rgba(11,31,61,0.12); }
  .docs-cat-grille .doc-liste { grid-template-columns: 1fr; }
  .doc-vide { margin: 4px 0 0; padding: 18px; text-align: center; background: var(--paper); border-radius: 8px; }
  @media (max-width: 640px) {
    .docs-recherche { max-width: none; margin-left: 0; }
    .doc-liste { grid-template-columns: 1fr; gap: 8px; }
    .doc-actions { opacity: 1; position: static; box-shadow: none; }
  }
  /* Sections ajoutees par le Commandement */
  .section-nouvelle { display: block; width: 100%; margin: 0 0 20px; padding: 14px; border: 2px dashed var(--line); border-radius: var(--rayon); background: none; font: inherit; font-size: 13.5px; font-weight: 700; color: var(--navy-700); cursor: pointer; transition: border-color .12s ease, background .12s ease; }
  .section-nouvelle:hover { border-color: var(--or); background: var(--white); }
  .section-nouvelle-form { display: flex; gap: 8px; flex-wrap: wrap; margin: 0 0 20px; padding: 14px; background: var(--white); border: 1px solid var(--line); border-radius: var(--rayon); box-shadow: var(--ombre); }
  .section-nouvelle-form input { flex: 1 1 240px; margin: 0; }
  .doc-rubrique-tete .section-outils .btn-mini { padding: 4px 8px; }

  /* « A venir » du calendrier : plus visible */
  .cal2-agenda-titre { display: flex; align-items: center; gap: 7px; font-family: var(--font-titre); font-size: 16px; font-weight: 700; text-transform: none; letter-spacing: 0; color: var(--navy-900); margin: 2px 0 12px; }
  .cal2-agenda-titre svg.ico { color: var(--gold); width: 18px; height: 18px; }
  .cal2-agenda-titre span { font-family: 'Inter', sans-serif; font-size: 11px; font-weight: 700; background: var(--navy-800); color: #fff; border-radius: 10px; padding: 1px 8px; }
  .cal2-agenda-titre span.ann-compte { background: var(--danger); }
  .agenda-ligne { gap: 12px; padding: 9px 10px; margin-bottom: 6px; border-radius: 10px; background: color-mix(in srgb, var(--teinte) 7%, var(--white)); border: 1px solid color-mix(in srgb, var(--teinte) 22%, var(--white)); transition: transform .12s ease, box-shadow .12s ease; }
  .agenda-ligne:hover { background: color-mix(in srgb, var(--teinte) 12%, var(--white)); transform: translateX(2px); box-shadow: var(--ombre); }
  .agenda-date { width: 48px; padding: 6px 0; border: none; border-radius: 9px; background: var(--teinte); box-shadow: inset 0 -2px 0 rgba(0,0,0,0.15); }
  .agenda-date .j { color: #fff; font-size: 19px; }
  .agenda-date .m { color: rgba(255,255,255,0.85); font-weight: 600; }
  .agenda-titre { font-size: 14px; font-weight: 700; white-space: normal; }
  .agenda-meta { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; margin-top: 3px; }
  .agenda-type { font-size: 10.5px; text-transform: uppercase; letter-spacing: .6px; }
  .agenda-jour { font-size: 12px; color: var(--steel); }
  .agenda-jour::first-letter { text-transform: uppercase; }
  .agenda-bientot { font-size: 10.5px; font-weight: 700; text-transform: uppercase; letter-spacing: .5px; background: var(--navy-800); color: #fff; border-radius: 10px; padding: 2px 8px; }
  .agenda-bientot.auj { background: var(--or); color: var(--navy-900); }
  .agenda-heure { font-size: 12px; font-weight: 700; color: var(--navy-800); font-variant-numeric: tabular-nums; display: inline-flex; align-items: center; gap: 4px; }
  .agenda-heure::before { content: ""; width: 4px; height: 4px; border-radius: 50%; background: var(--steel); opacity: .6; margin-right: 2px; }

  /* Reaction immediate des boutons : enfoncement au clic, etat « en cours » pendant l'enregistrement,
     et pas de delai de double-tape sur telephone. */
  button, .btn, a, [data-nav-go], [data-open], [data-tab] { touch-action: manipulation; }
  button:not(:disabled):active, .btn:not(:disabled):active { transform: translateY(1px) scale(0.98); }
  /* Points de la carte : leur décalage (transform) les place sur la carte. L'effet « enfoncé » ci-dessus le
     remplaçait : le point sautait sous la souris pendant le clic, qui n'aboutissait jamais (impossible de
     l'ouvrir ou de le modifier). L'effet passe donc sur le rond. */
  .carte-point:not(:disabled):active { transform: translate(-50%, -100%); }
  .carte-point:not(:disabled):active .pastille { transform: scale(0.92); }
  button.en-cours, .btn.en-cours { cursor: progress; }
  .btn.en-cours:not(.btn-mini):not(.svc-outil) { position: relative; }
  .btn.btn-primary.en-cours { box-shadow: inset 0 0 0 999px rgba(255,255,255,0.12); }

  /* ===== Spécialités : présentation des unités ===== */
  .spx-grille { display: grid; grid-template-columns: repeat(auto-fit, minmax(320px, 1fr)); gap: 18px; align-items: stretch; }
  .spx-carte { background: var(--white); border: 1px solid var(--line); border-radius: var(--rayon); box-shadow: var(--ombre); overflow: hidden; display: flex; flex-direction: column; }
  .spx-banniere { position: relative; padding: 20px 20px 16px; color: #fff; display: grid; grid-template-columns: auto 1fr; gap: 6px 14px; align-items: center;
    background: linear-gradient(135deg, var(--unite) 0%, var(--navy-900) 85%); }
  .spx-banniere::after { content: ""; position: absolute; right: -50px; top: -60px; width: 190px; height: 190px; border-radius: 50%; background: rgba(255,255,255,0.06); pointer-events: none; }
  .spx-logo { width: 58px; height: 58px; border-radius: 50%; overflow: hidden; flex-shrink: 0; display: flex; align-items: center; justify-content: center;
    background: var(--navy-800); border: 2px solid rgba(255,255,255,0.35); box-shadow: 0 3px 10px rgba(0,0,0,0.3); }
  .spx-logo.grand { width: 72px; height: 72px; }
  .spx-logo img { width: 100%; height: 100%; object-fit: cover; }
  .spx-logo span { color: #fff; font-family: var(--font-titre); font-weight: 700; font-size: 24px; }
  .spx-titres { min-width: 0; position: relative; z-index: 1; }
  .spx-titres h3 { margin: 0; color: #fff; font-family: var(--font-titre); font-size: 24px; letter-spacing: .5px; border: none; padding: 0; }
  .spx-titres p { margin: 2px 0 0; font-size: 12.5px; line-height: 1.35; color: rgba(255,255,255,0.8); }
  .spx-chiffres { grid-column: 1 / -1; display: flex; flex-wrap: wrap; gap: 8px; margin-top: 10px; position: relative; z-index: 1; }
  .spx-chiffres span { font-size: 12px; background: rgba(255,255,255,0.12); border: 1px solid rgba(255,255,255,0.18); border-radius: 20px; padding: 3px 11px; color: rgba(255,255,255,0.9); }
  .spx-chiffres b { color: #fff; font-size: 13px; }
  .spx-chefs { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; padding: 14px 18px; border-bottom: 1px solid var(--line); background: var(--paper); }
  .spx-chef { display: flex; align-items: center; gap: 10px; min-width: 0; }
  .spx-chef-av { width: 38px; height: 38px; border-radius: 50%; overflow: hidden; flex-shrink: 0; display: flex; align-items: center; justify-content: center;
    background: var(--unite); box-shadow: 0 0 0 2px var(--white), 0 0 0 3px color-mix(in srgb, var(--unite) 45%, var(--white)); }
  .spx-chef-av img { width: 100%; height: 100%; object-fit: cover; }
  .spx-chef-av svg { width: 70%; height: 70%; }
  .spx-chef-txt { display: flex; flex-direction: column; min-width: 0; }
  .spx-chef-txt .r { font-size: 10.5px; font-weight: 700; text-transform: uppercase; letter-spacing: .6px; color: var(--steel); }
  .spx-chef-txt .n { font-size: 13px; font-weight: 600; color: var(--navy-900); overflow-wrap: anywhere; }
  .spe-presentation.spx-pres { border-top: none; padding: 16px 20px 16px; position: relative; }
  .spx-pres-actions { display: flex; gap: 6px; flex-wrap: wrap; margin-top: 10px; }
  .spx-pres-actions .btn { display: inline-flex; align-items: center; gap: 5px; padding: 5px 12px; font-size: 12.5px; }
  .spx-pres-actions .btn svg.ico { width: 14px; height: 14px; }
  .spx-pres .spx-pres-texte { font-size: 13.5px; }
  .spx-pied { margin: auto 20px 20px !important; padding-top: 14px !important; border-top: 1px solid var(--line) !important; display: flex; flex-direction: column; gap: 8px; }
  .spx-pied .btn { width: 100%; }
  .spx-ouvrir { background: var(--unite) !important; border-color: var(--unite) !important; color: #fff !important; }
  .spx-ouvrir:hover { filter: brightness(1.1); }

  /* ===== Spécialités : espace d'une unité ===== */
  .spx-entete { border-radius: var(--rayon); overflow: hidden; box-shadow: var(--ombre); margin-bottom: 20px; background: var(--white); border: 1px solid var(--line); }
  .spx-entete-haut { position: relative; display: flex; align-items: center; gap: 18px; flex-wrap: wrap; padding: 22px 24px; color: #fff;
    background: linear-gradient(120deg, var(--unite) 0%, var(--navy-900) 80%); }
  .spx-entete-haut::after { content: ""; position: absolute; right: 18%; top: -80px; width: 240px; height: 240px; border-radius: 50%; background: rgba(255,255,255,0.05); pointer-events: none; }
  .spx-entete .spx-titres { flex: 1 1 260px; }
  .spx-surtitre { font-size: 10.5px; font-weight: 700; text-transform: uppercase; letter-spacing: 1.4px; color: var(--or); }
  .spx-entete h1 { margin: 2px 0 0; color: #fff; font-family: var(--font-titre); font-size: 30px; line-height: 1.05; letter-spacing: .5px; }
  .spx-entete .spx-titres p { font-size: 13px; }
  .spx-kpis { display: flex; gap: 10px; position: relative; z-index: 1; }
  .spx-kpis div { min-width: 82px; text-align: center; background: rgba(255,255,255,0.1); border: 1px solid rgba(255,255,255,0.16); border-radius: 9px; padding: 8px 12px; }
  .spx-kpis b { display: block; font-family: var(--font-titre); font-size: 24px; line-height: 1.1; color: #fff; }
  .spx-kpis span { font-size: 10.5px; text-transform: uppercase; letter-spacing: .6px; color: rgba(255,255,255,0.75); }
  .spx-onglets { display: flex; gap: 4px; padding: 8px 12px; overflow-x: auto; scrollbar-width: thin; background: var(--white); }
  .spx-onglets .tab-btn { flex: 0 0 auto; border: none; border-radius: 20px; padding: 7px 14px; margin: 0; font-size: 13px; font-weight: 600; color: var(--steel); background: transparent; display: inline-flex; align-items: center; gap: 6px; }
  .spx-onglets .tab-btn:hover { background: var(--paper); color: var(--navy-900); }
  .spx-onglets .tab-btn.active { background: var(--unite); color: #fff; box-shadow: 0 2px 6px color-mix(in srgb, var(--unite) 40%, transparent); }
  .spx-onglets .tab-btn.active::after { display: none; }
  .spx-onglets .tab-btn .tab-pastille { background: var(--danger); color: #fff; }
  .spx-contenu > .suivi-bandeau h2 { font-family: var(--font-titre); font-size: 21px; color: var(--navy-900); }
  .spx-vie { display: grid; grid-template-columns: 1.6fr 1fr; gap: 18px; align-items: start; }
  .spx-vie-col { display: flex; flex-direction: column; gap: 18px; min-width: 0; }
  .spx-vie .acc-bloc-tete h3 { font-family: var(--font-titre); font-size: 18px; color: var(--navy-900); }
  .spx-vie .ann-liste { display: flex; flex-direction: column; gap: 6px; }
  .spx-page { font-size: 11.5px; color: var(--steel); }
  .spx-agenda .agenda-ligne { cursor: pointer; }
  .spx-agenda .agenda-ligne.passe { opacity: .55; }
  .spx-agenda .ann-gestion { flex-shrink: 0; }
  .spx-sous-titre { font-size: 11px; font-weight: 700; text-transform: uppercase; letter-spacing: .8px; color: var(--steel); margin: 14px 0 8px; }
  .spx-arrivants .spe-arrivant { padding: 9px 2px; }
  .spx-arrivants .spe-arrivant strong { overflow-wrap: anywhere; }
  .spx-table-carte { padding: 0 !important; overflow-x: auto; }
  .spx-table-carte table { margin: 0; }
  .spx-table-carte thead th { background: var(--paper); font-size: 11px; text-transform: uppercase; letter-spacing: .6px; color: var(--steel); padding: 11px 14px; }
  .spx-table-carte tbody td { padding: 10px 14px; vertical-align: middle; }
  .spx-table-carte td.suivi-identite { white-space: normal; }
  .spx-table-carte td.suivi-identite .g { margin-right: 6px; }
  .spx-table-carte td.suivi-identite .n { overflow-wrap: anywhere; }
  .spx-table-carte tbody tr:hover td { background: color-mix(in srgb, var(--unite) 5%, var(--white)); }
  .spx-table-carte tr.spx-chef-ligne td:first-child { box-shadow: inset 3px 0 0 0 var(--unite); }
  .spx-table-carte td.spx-date { font-size: 12.5px; color: var(--steel); }
  @media (max-width: 900px){
    .spx-vie { grid-template-columns: 1fr; }
    .spx-kpis { width: 100%; }
    .spx-kpis div { flex: 1; min-width: 0; }
    .spx-entete h1 { font-size: 25px; }
    .spx-chefs { grid-template-columns: 1fr; }
  }

  /* Icones au trait dans les pages */
  svg.ico { width: 1.05em; height: 1.05em; vertical-align: -0.17em; flex: 0 0 auto; }
  .section-icon svg.ico { width: 17px; height: 17px; vertical-align: middle; }
  .contrat-icone svg.ico { width: 22px; height: 22px; color: var(--navy-700); display: block; }
  .maintenance-icone { color: var(--danger); margin-bottom: 8px; }
  .maintenance-icone svg.ico { width: 40px; height: 40px; }
  .mail-empty .icon svg.ico { width: 34px; height: 34px; color: var(--steel-light); }
  .sv-libres svg.ico { color: #8A6100; }

  /* Barre de defilement discrete, aux couleurs du site */
  .sidebar-scroll { scrollbar-width: thin; scrollbar-color: rgba(201,162,64,0.35) transparent; }

  @media (max-width: 760px) {
    .main-content > :is(.top, .eff-entete, .suivi-bandeau, .pres-bandeau, .sv-entete, .page-tete) h2 { font-size: 21px; }
    .page-tete .page-actions { margin-left: 0; width: 100%; }
    .attente-carte > div[style*="flex:1"] { flex-basis: calc(100% - 50px) !important; }
    .attente-actions { margin-left: 41px; }
    .tab-btn, .ticket-tab { padding: 9px 12px; font-size: 12.5px; white-space: nowrap; }
  }


/* Tutorat : bandeau et cartes par tuteur */
.tut-hero { position: relative; background: linear-gradient(135deg, var(--navy-900) 0%, var(--navy-700) 100%); border-radius: 12px; padding: 22px 26px; margin-bottom: 18px; color: #fff; overflow: hidden; }
.tut-hero::after { content: ""; position: absolute; right: -60px; top: -60px; width: 220px; height: 220px; border-radius: 50%; border: 1px solid rgba(201,162,64,.25); pointer-events: none; }
.tut-hero-haut { display: flex; align-items: flex-end; justify-content: space-between; gap: 18px; flex-wrap: wrap; }
.tut-surtitre { display: block; font-size: 10.5px; text-transform: uppercase; letter-spacing: 1.6px; color: var(--or); font-weight: 600; margin-bottom: 4px; }
.tut-hero h1 { color: #fff; margin: 0; font-size: 26px; line-height: 1.1; }
.tut-kpis { display: flex; gap: 8px; position: relative; z-index: 1; }
.tut-kpis div { min-width: 82px; padding: 9px 14px; border-radius: 9px; background: rgba(255,255,255,.07); border: 1px solid rgba(255,255,255,.12); text-align: center; }
.tut-kpis b { display: block; font-family: var(--font-titre); font-size: 22px; line-height: 1; color: #fff; }
.tut-kpis span { display: block; font-size: 10.5px; text-transform: uppercase; letter-spacing: .8px; color: var(--steel-light); margin-top: 4px; }
.tut-kpis div.alerte { background: rgba(201,162,64,.16); border-color: rgba(201,162,64,.55); }
.tut-kpis div.alerte b { color: var(--or); }
.tut-mes { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 18px; padding-top: 16px; border-top: 1px solid rgba(255,255,255,.12); position: relative; z-index: 1; }
.tut-chip { display: flex; align-items: center; gap: 10px; background: #fff; border: none; border-radius: 30px; padding: 5px 16px 5px 5px; cursor: pointer; font-family: inherit; text-align: left; box-shadow: 0 2px 8px rgba(0,0,0,.18); transition: transform .12s; }
.tut-chip:hover { transform: translateY(-1px); }
.tut-hero-vide { margin: 16px 0 0; padding-top: 14px; border-top: 1px solid rgba(255,255,255,.12); color: var(--steel-light); font-size: 13px; }
.tut-designer { position: absolute; top: 16px; right: 18px; z-index: 2; background: rgba(255,255,255,.1); border-color: rgba(255,255,255,.35); color: #fff; padding: 5px 13px; font-size: 12px; }
.tut-designer:hover, .tut-designer.on { background: var(--or); border-color: var(--or); color: var(--navy-900); }
.tut-hero:has(.tut-designer) .tut-hero-haut { padding-top: 26px; }
.tut-av { flex: 0 0 32px; width: 32px; height: 32px; border-radius: 50%; background: var(--paper); color: var(--navy-800); display: inline-flex; align-items: center; justify-content: center; font-size: 11.5px; font-weight: 700; letter-spacing: .3px; overflow: hidden; }
.tut-av img { width: 100%; height: 100%; object-fit: cover; }
.tut-av.grand { flex-basis: 42px; width: 42px; height: 42px; font-size: 14px; background: var(--navy-800); color: #fff; box-shadow: 0 0 0 2px #fff, 0 0 0 4px var(--or); }
.tut-av.alerte { background: var(--or); color: var(--navy-900); font-size: 20px; box-shadow: 0 0 0 2px #fff, 0 0 0 4px rgba(201,162,64,.45); }
.tut-id { display: flex; flex-direction: column; min-width: 0; flex: 1; }
.tut-id b { font-size: 13px; font-weight: 600; color: var(--navy-900); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.tut-id small { font-size: 11.5px; color: var(--steel); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.tut-nb { flex: 0 0 auto; min-width: 30px; height: 30px; padding: 0 9px; border-radius: 15px; background: var(--navy-900); color: var(--or); font-family: var(--font-titre); font-size: 15px; font-weight: 700; display: inline-flex; align-items: center; justify-content: center; }
.tut-tableau { background: #fff; border: 1px solid var(--line); border-radius: 12px; box-shadow: var(--ombre); overflow: hidden; }
.tut-tete { display: grid; grid-template-columns: 300px 1fr; background: var(--navy-900); color: var(--steel-light); font-size: 10.5px; font-weight: 600; text-transform: uppercase; letter-spacing: 1.2px; }
.tut-tete span { padding: 10px 20px; }
.tut-ligne { display: grid; grid-template-columns: 300px 1fr; border-top: 1px solid var(--line); transition: background .12s; }
.tut-ligne:first-of-type { border-top: none; }
.tut-ligne:nth-of-type(even) { background: #FAFBFD; }
.tut-ligne:hover { background: var(--paper); }
.tut-qui { display: flex; align-items: center; gap: 12px; padding: 14px 20px; border-right: 1px solid var(--line); }
.tut-qui .tut-id b { font-family: var(--font-titre); font-size: 15px; }
.tut-suivis { display: flex; flex-wrap: wrap; align-content: center; gap: 8px; padding: 12px 16px; }
.tut-pas { display: inline-flex; align-items: center; gap: 9px; width: 218px; background: #fff; border: 1px solid var(--line); border-radius: 26px; padding: 4px 14px 4px 4px; cursor: pointer; font-family: inherit; text-align: left; transition: border-color .12s, box-shadow .12s, transform .12s; }
.tut-pas:hover { border-color: var(--navy-700); box-shadow: 0 2px 8px rgba(11,31,61,.1); transform: translateY(-1px); }
.tut-pas .tut-av { flex-basis: 30px; width: 30px; height: 30px; font-size: 11px; }
.tut-nb { margin-left: auto; flex: 0 0 auto; min-width: 28px; height: 28px; padding: 0 8px; border-radius: 14px; background: var(--navy-900); color: var(--or); font-family: var(--font-titre); font-size: 14.5px; font-weight: 700; display: inline-flex; align-items: center; justify-content: center; }
.tut-ligne.moi { background: linear-gradient(90deg, rgba(201,162,64,.12), rgba(201,162,64,.03)); box-shadow: inset 4px 0 0 var(--or); }
.tut-ligne.sans { background: var(--gold-pale); box-shadow: inset 4px 0 0 var(--or); }
.tut-ligne.sans .tut-nb { background: var(--or); color: var(--navy-900); }
.tut-ligne.libres { background: var(--paper); }
.tut-ligne.libres .tut-pas { opacity: .85; }
.tut-av.libre { background: var(--steel-light); color: var(--navy-900); font-family: var(--font-titre); font-size: 16px; box-shadow: none; }
@media (max-width: 760px) {
  .tut-tete { display: none; }
  .tut-ligne { grid-template-columns: 1fr; }
  .tut-qui { border-right: none; padding: 14px 16px 6px; }
  .tut-suivis { padding: 6px 16px 14px; }
  .tut-pas { width: 100%; }
}
@media (max-width: 640px) {
  .tut-hero { padding: 18px 16px; }
  .tut-kpis { width: 100%; }
  .tut-kpis div { flex: 1; min-width: 0; padding: 8px 6px; }
  .tut-chip { flex: 1 1 100%; }
}

  /* Séances de tir (dossier) */
  .tir-tete { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; flex-wrap: wrap; margin-bottom: 12px; }
  .tir-tete h3 { margin: 0; }
  .tir-resume { font-size: 12px; font-weight: 600; color: var(--steel); background: var(--paper); border-radius: 20px; padding: 4px 11px; }
  .tir-liste { display: flex; flex-direction: column; gap: 8px; }
  .tir-ligne { display: flex; align-items: center; gap: 14px; padding: 10px 12px; border: 1px solid var(--line); border-left: 3px solid var(--navy-700); border-radius: 10px; background: var(--white); }
  .tir-date { flex: 0 0 74px; text-align: center; line-height: 1.1; }
  .tir-date .j { display: block; font-family: var(--font-titre); font-weight: 700; font-size: 22px; color: var(--navy-900); }
  .tir-date .m { display: block; font-size: 10.5px; text-transform: uppercase; letter-spacing: .4px; color: var(--steel); }
  .tir-info { flex: 1 1 auto; min-width: 0; display: flex; flex-direction: column; align-items: flex-start; gap: 4px; }
  .tir-niv { font-size: 11px; font-weight: 700; letter-spacing: .5px; text-transform: uppercase; color: var(--navy-800); background: #E3E9F2; border-radius: 6px; padding: 3px 8px; }
  .tir-niv.n2 { color: #6B4E12; background: var(--gold-pale); }
  .tir-sig { font-size: 11.5px; color: var(--steel); overflow-wrap: anywhere; }
  .tir-nb { flex: 0 0 auto; text-align: right; line-height: 1.05; }
  .tir-nb b { display: block; font-family: var(--font-titre); font-size: 22px; color: var(--navy-900); font-variant-numeric: tabular-nums; }
  .tir-nb span { font-size: 10.5px; text-transform: uppercase; letter-spacing: .4px; color: var(--steel); }
  .tir-suppr { flex: 0 0 auto; width: 30px; height: 30px; border-radius: 8px; border: 1px solid transparent; background: none; color: var(--steel); cursor: pointer; font-size: 13px; }
  .tir-suppr:hover { color: var(--danger); border-color: var(--danger); background: rgba(166,52,42,.06); }
  .tir-vide { margin: 0; padding: 14px; text-align: center; font-size: 13px; color: var(--steel); background: var(--paper); border-radius: 10px; }
  .tir-ajout { margin-top: 16px; padding: 14px 16px; background: var(--paper); border-radius: 12px; }
  .tir-ajout-t { font-size: 11px; font-weight: 700; text-transform: uppercase; letter-spacing: .6px; color: var(--navy-700); margin-bottom: 10px; }
  .tir-ajout-champs { display: flex; align-items: flex-end; gap: 10px; flex-wrap: wrap; }
  .tir-c { display: flex; flex-direction: column; gap: 4px; flex: 1 1 150px; margin: 0; }
  .tir-c span { font-size: 11px; font-weight: 600; color: var(--steel); }
  .tir-c input, .tir-c select { margin: 0; height: 40px; }
  .tir-c-nb { flex: 0 1 120px; }
  .tir-ajout-champs .btn { height: 40px; flex: 0 0 auto; }
  .tir-ajout .err:empty { display: none; }
  .tir-ajout .err { margin-top: 8px; }
  @media (max-width: 560px){
    .tir-ligne { gap: 10px; }
    .tir-date { flex-basis: 56px; }
    .tir-ajout-champs .btn { width: 100%; }
  }

  /* Fenêtre « Unités de spécialité » : volontaires par unité */
  .sv-spe-unites { display: flex; flex-direction: column; gap: 10px; margin-bottom: 16px; max-height: 42vh; overflow-y: auto; }
  .sv-spe-u { border: 1px solid var(--line); border-radius: 10px; padding: 10px 12px; background: var(--paper); }
  .sv-spe-u.off { opacity: .55; }
  .sv-spe-u.off .sv-spe-noms, .sv-spe-u.off .sv-spe-aide { display: none; }
  .sv-spe-noms { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 9px; }
  .sv-vol { font: inherit; font-size: 12px; padding: 4px 10px; border-radius: 16px; border: 1px solid var(--line); background: var(--white); color: var(--navy-900); cursor: pointer; }
  .sv-vol b { font-size: 10.5px; color: var(--steel); margin-right: 2px; }
  .sv-vol.on { background: #E6F0E7; border-color: #2E6B37; color: #1F4D27; box-shadow: inset 0 0 0 1px #2E6B37; }
  .sv-vol.on b { color: #2E6B37; }
  .sv-vol.on::before { content: "✓ "; font-weight: 700; color: #2E6B37; }
  .sv-spe-aide { font-size: 11.5px; color: var(--steel); margin-top: 7px; }

  /* Fiche de formation CIAPT : un bloc par CIAPT (résultat + cartouches) */
  .ciapt-saisies { display: flex; flex-wrap: wrap; gap: 8px; margin-left: auto; }
  .ciapt-bloc { display: inline-flex; align-items: center; gap: 8px; padding: 4px 8px; border: 1px solid var(--line); border-radius: 8px; background: var(--paper); }
  .ciapt-bloc > b { font-size: 11px; letter-spacing: .4px; color: var(--navy-800); white-space: nowrap; }
  .ciapt-bloc.hors { font-size: 11.5px; color: var(--steel); background: none; border-style: dashed; }
  .ciapt-bloc.hors b { margin-right: 4px; }

  .mod-mil:has(.ciapt-saisies) { flex-wrap: wrap; row-gap: 8px; }
  .mod-mil:has(.ciapt-saisies) > .n { flex: 1 0 170px; }
  .ciapt-saisies { justify-content: flex-end; }

  /* Blocs CIAPT discrets */
  .ciapt-saisies { gap: 4px 14px; }
  .ciapt-bloc { padding: 0; border: none; background: none; gap: 6px; }
  .ciapt-bloc + .ciapt-bloc { padding-left: 14px; border-left: 1px solid var(--line); border-radius: 0; }
  .ciapt-bloc > b { font-size: 10.5px; font-weight: 700; color: var(--steel); display: inline-flex; align-items: center; gap: 4px; }
  .ciapt-bloc .rec { font-size: 9px; font-weight: 700; color: #9C7A2B; background: #F6EED6; border-radius: 4px; padding: 1px 4px; line-height: 1.2; }
  .ciapt-bloc .res button { font-size: 10.5px; padding: 3px 8px; }
  .ciapt-bloc .cart-saisie input { width: 46px; height: 26px; padding: 2px 4px; font-size: 11.5px; }
  .ciapt-bloc .cart-saisie label { font-size: 10px; text-transform: none; letter-spacing: 0; font-weight: 500; }
  .ciapt-bloc.hors { border: none; padding-left: 14px; font-size: 10.5px; }
  .ciapt-bloc.hors b { color: var(--steel); opacity: .7; }

  .ciapt-ajout { font: inherit; font-size: 10.5px; font-weight: 600; color: var(--navy-700); background: none; border: 1px dashed var(--line); border-radius: 6px; padding: 3px 8px; cursor: pointer; margin-left: 14px; }
  .ciapt-ajout:hover { border-color: var(--navy-700); background: var(--paper); }
  .ciapt-retirer { font: inherit; font-size: 10px; line-height: 1; color: var(--steel); background: none; border: none; padding: 0 2px; cursor: pointer; }
  .ciapt-retirer:hover { color: var(--danger); }

  /* Sélecteur d'émojis */
  .rte-btn.rte-emoji { font-size: 17px; line-height: 1; }
  .emo-panneau { position: fixed; z-index: 3000; width: 380px; max-width: calc(100vw - 16px); background: var(--white); border: 1px solid var(--line); border-radius: 12px; box-shadow: 0 14px 40px rgba(10,26,48,.22); padding: 10px; }
  .emo-recherche { width: 100%; box-sizing: border-box; margin: 0 0 8px; height: 34px; font-size: 13px; }
  .emo-cats { display: flex; gap: 1px; border-bottom: 1px solid var(--line); padding-bottom: 6px; margin-bottom: 6px; }
  .emo-cat { flex: 1 1 0; min-width: 0; padding: 0; height: 30px; border: none; border-radius: 7px; background: none; font-size: 17px; cursor: pointer; opacity: .55; }
  .emo-cat:hover, .emo-cat.on { background: var(--paper); opacity: 1; }
  .emo-titre { font-size: 10.5px; font-weight: 700; text-transform: uppercase; letter-spacing: .5px; color: var(--steel); margin: 2px 2px 4px; }
  .emo-grille { display: grid; grid-template-columns: repeat(9, 1fr); gap: 2px; max-height: 260px; overflow-y: auto; }
  .emo { height: 36px; border: none; border-radius: 7px; background: none; font-size: 21px; cursor: pointer; padding: 0; }
  .emo:hover { background: var(--paper); transform: scale(1.12); }
  .emo-vide { grid-column: 1 / -1; font-size: 12px; color: var(--steel); text-align: center; margin: 14px 0; }

  /* Émojis personnalisés du serveur Discord */
  .emoji-perso { height: 1.375em; width: auto; vertical-align: -0.3em; margin: 0 1px; }
  .emo-img { width: 22px; height: 22px; object-fit: contain; vertical-align: middle; }
  .emo-cat .emo-img { width: 18px; height: 18px; }

  /* Autres fonctions, rangées par thème : une ligne par thème, compacte */
  .fn-groupes { display: flex; flex-direction: column; margin-bottom: 14px; border: 1px solid var(--line); border-radius: 8px; overflow: hidden; }
  .fn-groupe { display: flex; align-items: center; gap: 12px; padding: 6px 10px; border-top: 1px solid var(--line); background: var(--white); }
  .fn-groupe:first-child { border-top: none; }
  .fn-titre { flex: 0 0 180px; font-size: 10px; font-weight: 700; text-transform: uppercase; letter-spacing: .5px; color: var(--steel); margin: 0; }
  .fn-groupe > div:last-child { display: flex; flex-wrap: wrap; gap: 4px; }
  .fn-groupe .tag-pill { padding: 2px 9px; font-size: 11.5px; margin: 0; }
  @media (max-width: 640px){ .fn-groupe { flex-direction: column; align-items: flex-start; gap: 5px; } .fn-titre { flex-basis: auto; } }

  /* Montées en grade lues sur Discord */
  .evo-liste { display: flex; flex-direction: column; border: 1px solid var(--line); border-radius: 8px; overflow: hidden; }
  .evo-ligne { display: flex; align-items: center; gap: 10px; padding: 8px 12px; border-top: 1px solid var(--line); margin: 0; cursor: pointer; font-size: 13px; text-transform: none; letter-spacing: 0; font-weight: 400; color: var(--ink); }
  .evo-ligne:first-child { border-top: none; }
  .evo-ligne input { margin: 0; width: auto; }
  .evo-ligne .n { flex: 1; font-weight: 600; }
  .evo-ligne .g { color: var(--navy-800); white-space: nowrap; }
  .evo-ligne .e { font-size: 11px; color: var(--steel); white-space: nowrap; }
  .evo-ligne.off { opacity: .6; cursor: default; }

  /* Ajout direct d'une formation ou d'une habilitation (dossier) */
  .fm-recyclage { flex: 0 0 auto !important; flex-direction: row !important; align-items: center; gap: 6px; align-self: flex-end; height: 40px; }
  .fm-recyclage input { width: auto; height: auto !important; margin: 0; }

  /* Filtres rapides : fenêtre Personnaliser rangée comme la fiche */
  .eff-perso-liste { max-height: 400px; overflow-y: auto; border: 1px solid var(--line); border-radius: 8px; padding: 4px 12px 10px; margin: 10px 0 14px; }
  .eff-perso-cat + .eff-perso-cat { border-top: 1px solid var(--line); margin-top: 8px; }
  .eff-perso-ligne { display: flex; align-items: baseline; gap: 10px; padding: 3px 0; }
  .eff-perso-sg { flex: 0 0 150px; font-size: 11.5px; color: var(--steel); }
  .eff-perso-cases { display: flex; flex-wrap: wrap; gap: 5px; }
  .eff-case { margin: 0; cursor: pointer; font-weight: 400; text-transform: none; letter-spacing: 0; }
  .eff-case input { position: absolute; opacity: 0; pointer-events: none; }
  .eff-case span { display: inline-flex; align-items: center; gap: 5px; border: 1px solid var(--line); border-radius: 14px; padding: 2px 10px; font-size: 12.5px; color: var(--ink); background: var(--white); }
  .eff-case span i { font-style: normal; font-size: 11px; opacity: .55; }
  .eff-case input:checked + span { background: var(--navy-800); color: #fff; border-color: transparent; }
  .eff-case input:focus-visible + span { outline: 2px solid var(--gold); outline-offset: 1px; }
  .eff-case.vide span { opacity: .55; }
  @media (max-width: 640px) { .eff-perso-ligne { flex-direction: column; gap: 3px; } .eff-perso-sg { flex: none; } }

  /* Liste des effectifs : tableau groupé par catégorie de grade */
  table.eff-table { width: 100%; border-collapse: collapse; }
  table.eff-table thead th { font-size: 11px; font-weight: 600; color: var(--steel); text-transform: none; letter-spacing: 0; background: none; border-bottom: 1px solid var(--line); padding: 4px 10px 8px; text-align: left; }
  table.eff-table td { padding: 8px 10px; border-bottom: 1px solid #EEF1F6; vertical-align: middle; }
  table.eff-table tr.eff-ligne-m:hover td { background: #F6F8FB; }
  table.eff-table tr.eff-sec td { padding: 14px 10px 5px; font-size: 11px; font-weight: 600; letter-spacing: .5px; text-transform: uppercase; color: var(--steel); border-bottom: 1px solid var(--line); background: none; cursor: default; }
  table.eff-table tr.eff-sec td span { font-weight: 400; }
  table.eff-table tr.eff-sec:first-child td { padding-top: 4px; }
  .eff-id { display: flex; align-items: center; gap: 10px; min-width: 0; }
  .eff-id-t { min-width: 0; }
  .eff-av { width: 34px; height: 34px; border-radius: 50%; object-fit: cover; flex: 0 0 auto; display: block; }
  .eff-av.vide { display: flex; align-items: center; justify-content: center; background: var(--navy-700, #1E3A5F); color: #fff; font-size: 11.5px; font-weight: 600; letter-spacing: .3px; }
  .eff-nom { font-weight: 600; color: var(--navy-900, #0A1A30); display: flex; flex-wrap: wrap; align-items: center; gap: 4px 6px; }
  .eff-sous { font-size: 11.5px; color: var(--steel); margin-top: 1px; display: flex; flex-wrap: wrap; align-items: center; gap: 6px; }
  .eff-grade { display: inline-block; font-size: 11.5px; font-weight: 600; padding: 2px 8px; border-radius: 5px; white-space: nowrap; }
  .eff-grade.g-o { background: #F3EBDA; color: #6B4E14; }
  .eff-grade.g-e { background: #142B4D; color: #fff; }
  .eff-grade.g-s { background: #E3E9F2; color: #142B4D; }
  .eff-grade.g-r { background: #EEF1F6; color: #6E7580; }
  .eff-fn { display: table-cell; }
  .eff-fn-chip { display: inline-block; font-size: 12px; line-height: 1.35; padding: 2px 9px; border-radius: 7px; border: 1px solid #D7DDE6; color: #142B4D; margin: 1px 4px 1px 0; }
  .eff-spe { display: inline-block; font-size: 11.5px; font-weight: 600; padding: 2px 9px; border-radius: 11px; color: #fff; margin: 1px 4px 1px 0; }
  .eff-qualif { display: inline-block; font-size: 11.5px; font-weight: 600; padding: 2px 8px; border-radius: 5px; background: #EEF1F6; color: #142B4D; }
  .eff-nom .eff-abs-badge { margin-left: 0; }
  @media (max-width: 640px) { table.eff-table .eff-col-q { display: none; } .eff-av { width: 30px; height: 30px; } table.eff-table td { padding: 7px 6px; } }

  /* Archives des services : colonnes alignées d'une ligne à l'autre (date, indicatif, horaire, équipe…) */
  .svc-arch { display: grid; grid-template-columns: 56px 52px 148px minmax(0, 1fr) auto auto; column-gap: 14px; row-gap: 0; }
  .svc-arch .j { min-width: 0; font-variant-numeric: tabular-nums; }
  .svc-arch .pat-format { justify-self: stretch; padding: 3px 0; }
  .svc-arch .h { font-variant-numeric: tabular-nums; }
  .svc-arch .i { text-align: right; min-width: 62px; }
  @media (max-width: 720px) { .svc-arch { grid-template-columns: 52px 48px minmax(0, 1fr) auto; column-gap: 10px; } }
  @media (max-width: 480px) { .svc-arch { grid-template-columns: 50px 46px minmax(0, 1fr); } }

  :root { --verif-css: "2611090826"; }

  /* Mes tâches */
  .taches { display: flex; flex-direction: column; gap: 6px; }
  .tache { display: flex; align-items: center; gap: 12px; background: var(--white); border: 1px solid var(--line); border-radius: 10px; padding: 10px 12px; }
  .tache.retard { border-color: #E9B8B3; }
  .tache.faite .t { text-decoration: line-through; color: var(--steel); }
  .tache-case { position: relative; flex: 0 0 22px; width: 22px; height: 22px; margin: 0; cursor: pointer; }
  .tache-case input { position: absolute; opacity: 0; width: 100%; height: 100%; margin: 0; cursor: pointer; }
  .tache-case span { display: block; width: 22px; height: 22px; border: 2px solid var(--navy-700); border-radius: 6px; background: var(--white); transition: background .12s; }
  .tache-case input:checked + span { background: #2E6B4F; border-color: #2E6B4F; }
  .tache-case input:checked + span::after { content: ""; position: absolute; left: 7px; top: 3px; width: 6px; height: 11px; border: solid #fff; border-width: 0 2px 2px 0; transform: rotate(45deg); }
  .tache-case input:focus-visible + span { box-shadow: 0 0 0 3px rgba(27,58,99,.25); }
  .tache-txt { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 2px; }
  .tache-txt .t { font-weight: 600; color: var(--navy-900); font-size: 13.5px; overflow-wrap: anywhere; }
  .tache-txt .n { font-size: 12px; color: var(--steel); white-space: pre-line; overflow-wrap: anywhere; }
  .tache-echeance { font-size: 11.5px; font-weight: 600; border-radius: 999px; padding: 3px 10px; white-space: nowrap; background: var(--paper); color: var(--navy-800); }
  .tache.retard .tache-echeance { background: #FBEAEA; color: #A6342A; }
  .tache.jour .tache-echeance { background: #F3EAD8; color: #6B4F1D; }
  .tache.faite .tache-echeance { background: #E3EFE6; color: #1E5C3A; }
  .tache-act { border: 0; background: none; color: var(--steel); font-size: 14px; padding: 4px 6px; border-radius: 6px; cursor: pointer; margin: 0; }
  .tache-act:hover { background: var(--paper); color: var(--navy-900); }
  .acc-taches-n { display: inline-block; font-size: 11px; font-weight: 700; background: var(--navy-800); color: #fff; border-radius: 999px; padding: 1px 8px; vertical-align: 2px; margin-left: 4px; }
  @media (max-width: 600px) { .tache { flex-wrap: wrap; } .tache-echeance { order: 3; margin-left: 34px; } }
