:root {
  --marine: #0F2F47; --bleu: #135E96; --bleu-h: #0D4670; --laiton: #F2C14E; --laiton-f: #C08A12;
  --fond: #F3F6F8; --surface: #FFFFFF; --bord: #D8E0E6; --bord-2: #C9D5DE; --ligne: #E9EEF2;
  --texte: #0F1E2A; --texte-2: #4A5D6C; --sel: #EDF4FA; --hover: #F4F8FB; --danger: #B23A2B;
  --champ: #FFFFFF; --lecture: #F7F9FA; --kpi4: #0F2F47;
  color-scheme: light;
  box-sizing: border-box;
  padding-top: env(safe-area-inset-top, 0px);
  padding-bottom: env(safe-area-inset-bottom, 0px);
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme]) {
    --bleu: #5AA5DB; --bleu-h: #7DB9E4; --fond: #0E1A24; --surface: #15232F; --bord: #2A3B49; --bord-2: #34495A;
    --ligne: #223240; --texte: #E6EDF2; --texte-2: #A3B5C3; --sel: #1B3347; --hover: #1A2B39; --danger: #F08A7C;
    --champ: #102029; --lecture: #192A37; --kpi4: #B9CCDB;
    color-scheme: dark;
  }
}
:root[data-mode="dark"] {
  --bleu: #5AA5DB; --bleu-h: #7DB9E4; --fond: #0E1A24; --surface: #15232F; --bord: #2A3B49; --bord-2: #34495A;
  --ligne: #223240; --texte: #E6EDF2; --texte-2: #A3B5C3; --sel: #1B3347; --hover: #1A2B39; --danger: #F08A7C;
  --champ: #102029; --lecture: #192A37; --kpi4: #B9CCDB;
  color-scheme: dark;
}
html { scroll-padding-top: env(safe-area-inset-top, 0px); }
*, *::before, *::after { box-sizing: border-box; }
[hidden] { display: none !important; }
body {
  margin: 0; background: var(--fond); color: var(--texte);
  font: 15px/1.5 "Public Sans", "Segoe UI", system-ui, -apple-system, sans-serif;
  font-variant-numeric: tabular-nums;
}
a { color: var(--bleu); text-decoration: none; }
a:hover { color: var(--bleu-h); }
:focus-visible { outline: 3px solid var(--laiton-f); outline-offset: 2px; }
img { max-width: 100%; }

/* En-tête blanc avec logo (charte) */
.top { background: #FFFFFF; border-bottom: 1px solid #D8E0E6; color: #0F1E2A; }
.top-in { max-width: 1360px; margin: 0 auto; padding: 10px clamp(16px, 3vw, 32px); display: flex; flex-wrap: wrap; gap: 12px 16px; align-items: center; justify-content: space-between; }
.brand { display: flex; gap: 14px; align-items: center; color: inherit; }
.brand:hover { color: inherit; }
.logo { height: 48px; width: auto; display: block; }
.sep { width: 1px; height: 36px; background: #D8E0E6; }
.brand-txt { display: flex; flex-direction: column; line-height: 1.25; }
.brand-txt strong { font-size: 17px; color: #1F3D6B; }
.brand-txt span { font-size: 13px; color: #4A5D6C; }
.who { display: flex; gap: 10px; align-items: center; }
.avatar { width: 38px; height: 38px; border-radius: 50%; background: #0F2F47; color: #F2C14E; font-weight: 700; font-size: 14px; display: flex; align-items: center; justify-content: center; flex: none; }
.who-txt { display: flex; flex-direction: column; line-height: 1.25; }
.who-txt span:first-child { font-weight: 600; font-size: 14px; }
.who-txt span:last-child { font-size: 12px; color: #4A5D6C; }
.top .btn-2 { background: #FFFFFF; color: #0F1E2A; border-color: #C9D5DE; }
@media (max-width: 620px) { .who-txt, .sep, .brand-txt { display: none; } .logo { height: 40px; } .top-in { flex-wrap: nowrap; } }

.demo .btn.btn-2 { margin-left: 10px; min-height: 36px; background: #FFFFFF; color: #4A3300; border-color: #E0C27A; }
.demo { background: #FBEFD9; color: #4A3300; border-bottom: 1px solid #E8CF94; padding: 10px clamp(16px, 3vw, 32px); font-size: 14px; text-align: center; }

main { max-width: 1360px; margin: 0 auto; padding: 18px clamp(16px, 3vw, 32px) 56px; outline: none; }
.loading { color: var(--texte-2); padding: 40px 0; text-align: center; }

/* Boutons : cibles de 44 px minimum */
.btn { min-height: 44px; padding: 0 16px; border-radius: 12px; border: 1px solid transparent; font: inherit; font-size: 14px; font-weight: 600; display: inline-flex; gap: 8px; align-items: center; justify-content: center; cursor: pointer; text-align: center; }
.btn-1 { background: #135E96; color: #FFFFFF; }
.btn-1:hover { background: #0D4670; color: #FFFFFF; }
.btn-2 { background: var(--surface); color: var(--texte); border-color: var(--bord-2); }
.btn-2:hover { background: var(--hover); color: var(--texte); }
.btn-sm { min-height: 40px; padding: 0 12px; font-weight: 500; }
.btn[disabled] { opacity: .55; cursor: wait; }

/* Titre de page */
.crumbs { font-size: 14px; color: var(--texte-2); display: flex; gap: 8px; flex-wrap: wrap; }
.crumbs strong { color: var(--texte); }
.page-head { margin: 10px 0 18px; display: flex; flex-wrap: wrap; gap: 12px; align-items: flex-end; justify-content: space-between; }
.page-head h1 { margin: 0; font-size: 28px; line-height: 1.2; color: var(--texte); }
.page-head p { margin: 4px 0 0; color: var(--texte-2); max-width: 70ch; }

/* Indicateurs */
.kpis { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 12px; margin-bottom: 18px; }
.kpi { background: var(--surface); border: 1px solid var(--bord); border-radius: 14px; padding: 14px 16px; display: flex; gap: 12px; align-items: center; }
.kpi .bar { width: 10px; height: 40px; border-radius: 5px; flex: none; }
.kpi b { display: block; font-size: 26px; line-height: 1.1; }
.kpi span { font-size: 13px; color: var(--texte-2); }

/* Liste + fiche */
.split { display: flex; flex-wrap: wrap; gap: 20px; align-items: flex-start; }
.panel { background: var(--surface); border: 1px solid var(--bord); border-radius: 16px; overflow: hidden; }
.list { flex: 999 1 620px; min-width: 0; }
.filters { padding: 14px; display: flex; flex-wrap: wrap; gap: 10px; align-items: center; border-bottom: 1px solid var(--ligne); }
.search { flex: 1 1 220px; display: flex; gap: 8px; align-items: center; min-height: 44px; padding: 0 12px; border: 1px solid var(--bord-2); border-radius: 12px; background: var(--champ); }
.search input { flex: 1; min-width: 0; border: none; outline: none; font: inherit; background: transparent; color: var(--texte); }
.search:focus-within { outline: 3px solid var(--laiton-f); outline-offset: 2px; }
.chips { flex-basis: 100%; display: flex; flex-wrap: wrap; gap: 8px; }
.chip { min-height: 40px; padding: 0 14px; border-radius: 20px; font: inherit; font-size: 13px; font-weight: 600; cursor: pointer; border: 1px solid var(--bord-2); background: var(--surface); color: var(--texte); }
.chip:hover { border-color: var(--bleu); }
.chip[aria-pressed="true"] { background: #0F2F47; border-color: #0F2F47; color: #FFFFFF; }
.chip small { opacity: .75; font-size: 12px; margin-left: 4px; }
.scroll { overflow-x: auto; }
table { border-collapse: collapse; width: 100%; }
th { background: var(--lecture); text-align: left; font-size: 13px; font-weight: 700; color: var(--texte-2); padding: 10px 12px; border-bottom: 1px solid var(--bord); white-space: nowrap; }
td { padding: 10px 12px; border-bottom: 1px solid var(--ligne); font-size: 14px; vertical-align: middle; }
tbody tr { cursor: pointer; }
tbody tr:hover td { background: var(--hover); }
tbody tr.on td { background: var(--sel); }
tbody tr.on td:first-child { box-shadow: inset 4px 0 0 var(--bleu); }
.num { border: none; background: none; padding: 6px 0; min-height: 36px; font: inherit; font-weight: 700; color: var(--bleu); cursor: pointer; white-space: nowrap; }
.sub { font-size: 12px; color: var(--texte-2); }
.nowrap { white-space: nowrap; }
.empty { padding: 32px 20px; text-align: center; color: var(--texte-2); }
.empty .btn { margin-top: 12px; }

.tag { display: inline-block; padding: 3px 10px; border-radius: 10px; font-size: 12px; font-weight: 600; white-space: nowrap; }
.prio { display: inline-block; min-width: 32px; text-align: center; padding: 3px 8px; border-radius: 8px; font-size: 12px; font-weight: 700; }
.p-P1 { background: #C0392B; color: #FFFFFF; } .p-P2 { background: #A85A12; color: #FFFFFF; }
.p-P3 { background: #F2C14E; color: #3A2A00; } .p-P4 { background: #E3E9EE; color: #3E4F5C; }
.s-Nouveau { background: #E3EEF7; color: #135E96; } .s-Assigné { background: #ECE7F7; color: #5B3FA6; }
.s-En-cours { background: #DFF1E6; color: #1E6B3F; } .s-En-attente { background: #FBEFD9; color: #8A5A00; }
.s-Résolu, .s-Fermé { background: #E3E9EE; color: #3E4F5C; }
.sla-ok { color: #1E6B3F; } .sla-risk, .sla-late { color: var(--danger); font-weight: 700; } .sla-pause { color: #8A5A00; } .sla-done { color: var(--texte-2); }
@media (prefers-color-scheme: dark) { :root:not([data-theme]) .sla-ok { color: #7FCB9C; } :root:not([data-theme]) .sla-pause { color: #E6B65C; } }
.unassigned { color: var(--danger); font-weight: 600; }

/* Fiche de l'incident */
.fiche { flex: 1 1 380px; min-width: 300px; max-width: 100%; }
.fiche-head { padding: 16px 18px; background: #0F2F47; color: #FFFFFF; }
.fiche-head .ids { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
.fiche-head .ids strong { color: #F2C14E; }
.fiche-head h2 { font-size: 18px; margin: 6px 0 2px; line-height: 1.3; }
.fiche-head p { margin: 0; font-size: 13px; color: #B9CCDB; }
.actions { padding: 14px 18px; display: flex; flex-wrap: wrap; gap: 8px; border-bottom: 1px solid var(--ligne); }
.form-mini { padding: 14px 18px; border-bottom: 1px solid var(--ligne); background: var(--lecture); display: flex; flex-direction: column; gap: 10px; }
.form-mini .row { display: flex; flex-wrap: wrap; gap: 8px; }
.fiche-body { padding: 4px 18px 18px; }
.calc { margin-top: 12px; padding: 10px 12px; border-radius: 10px; background: var(--lecture); font-size: 13px; color: var(--texte-2); }
.calc strong { color: var(--texte); }
.fiche-body h3 { margin: 18px 0 6px; font-size: 13px; font-weight: 700; color: var(--texte-2); }
dl.kv { margin: 0; display: grid; grid-template-columns: 120px minmax(0, 1fr); gap: 6px 12px; font-size: 14px; }
dl.kv dt { color: var(--texte-2); }
dl.kv dd { margin: 0; font-weight: 500; overflow-wrap: anywhere; }
ol.log { margin: 0; padding: 0 0 0 14px; list-style: none; display: flex; flex-direction: column; gap: 10px; border-left: 2px solid var(--bord); }
ol.log li { font-size: 14px; }
ol.log .meta { font-size: 12px; color: var(--texte-2); }

/* Formulaires */
.field { display: flex; flex-direction: column; gap: 6px; min-width: 0; }
.field label, .field legend { font-size: 14px; font-weight: 600; padding: 0; }
.req { color: var(--danger); }
.fld { min-height: 46px; padding: 10px 12px; border: 1px solid var(--bord-2); border-radius: 12px; font: inherit; font-size: 15px; background: var(--champ); color: var(--texte); width: 100%; }
textarea.fld { min-height: 110px; resize: vertical; }
.fld[aria-invalid="true"] { border-color: var(--danger); }
.err { color: var(--danger); font-size: 13px; font-weight: 600; }
.hint { color: var(--texte-2); font-size: 13px; }
.form-card { max-width: 860px; }
.form-card .inner { padding: 24px clamp(18px, 3vw, 28px); display: flex; flex-direction: column; gap: 22px; }
.grid2 { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 18px 16px; }
fieldset.choices { margin: 0; padding: 0; border: none; display: flex; flex-direction: column; gap: 8px; min-width: 0; }
fieldset.choices legend { font-size: 14px; font-weight: 600; padding: 0; margin-bottom: 6px; }
.choice { display: flex; gap: 12px; align-items: center; min-height: 48px; padding: 8px 14px; border: 1px solid var(--bord-2); border-radius: 12px; cursor: pointer; background: var(--champ); }
.choice:hover { border-color: var(--bleu); }
.choice input { width: 20px; height: 20px; accent-color: #135E96; flex: none; margin: 0; }
.choice:has(input:checked) { border-color: var(--bleu); background: var(--sel); }
.preview { display: flex; gap: 12px; align-items: center; padding: 14px 16px; border-radius: 12px; background: var(--lecture); border: 1px solid var(--bord); }
.preview p { margin: 0; font-size: 14px; color: var(--texte-2); }
.preview p strong { color: var(--texte); }
.form-foot { display: flex; flex-wrap: wrap; gap: 10px; justify-content: flex-end; padding: 16px clamp(18px, 3vw, 28px); border-top: 1px solid var(--ligne); background: var(--lecture); }

.done { max-width: 640px; margin: 24px auto; padding: 28px clamp(18px, 3vw, 32px); text-align: left; }
.done h1 { margin: 0 0 8px; font-size: 24px; }
.done .big { font-size: 34px; font-weight: 700; color: var(--bleu); margin: 4px 0 10px; }
.done p { color: var(--texte-2); margin: 0 0 10px; }
.done .row { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 18px; }

.notice { max-width: 640px; margin: 32px auto; padding: 24px clamp(18px, 3vw, 28px); }
.notice h1 { margin: 0 0 8px; font-size: 22px; }
.notice p { color: var(--texte-2); margin: 0 0 14px; }
.notice .err-box { padding: 12px 14px; border-radius: 10px; background: #FBE9E6; color: #7A2015; font-size: 14px; margin-bottom: 14px; }

.toast { position: fixed; left: 50%; bottom: calc(20px + env(safe-area-inset-bottom, 0px)); transform: translateX(-50%); max-width: calc(100% - 32px); background: #0F2F47; color: #FFFFFF; padding: 12px 18px; border-radius: 12px; font-size: 14px; font-weight: 600; box-shadow: 0 6px 24px rgba(15, 47, 71, .25); opacity: 0; pointer-events: none; transition: opacity .2s; }
.toast.show { opacity: 1; }
.toast.bad { background: #7A2015; }
@media (prefers-reduced-motion: reduce) { .toast { transition: none; } }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

td.who-cell { min-width: 120px; }
/* Sur téléphone : chaque incident devient une carte */
@media (max-width: 640px) {
  .list table, .list tbody, .list tr, .list td { display: block; }
  .list thead { display: none; }
  .list tbody tr { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 10px; padding: 12px 14px; border-bottom: 1px solid var(--ligne); }
  .list tbody tr.on { background: var(--sel); box-shadow: inset 4px 0 0 var(--bleu); }
  .list tbody tr.on td, .list tbody tr:hover td { background: transparent; }
  .list tbody tr.on td:first-child { box-shadow: none; }
  .list td { border: none; padding: 0; min-width: 0 !important; }
  .list td:nth-child(2) { flex-basis: 100%; order: -1; }
  .list .num { min-height: 32px; padding: 0; }
  .list td.hide-m { display: none; }
}

/* Choix du thème : Automatique, Clair, Sombre */
.hdr-right { display: flex; gap: 10px; align-items: center; }
.theme-wrap { position: relative; }
.theme-panel { position: absolute; right: 0; top: calc(100% + 8px); z-index: 20; width: 340px; max-width: calc(100vw - 32px); background: var(--surface); color: var(--texte); border: 1px solid var(--bord); border-radius: 16px; box-shadow: 0 12px 32px rgba(15, 47, 71, .18); padding: 12px; display: flex; flex-direction: column; gap: 8px; }
.theme-head { padding: 2px 4px 4px; }
.theme-head strong { display: block; font-size: 16px; }
.theme-head span { font-size: 13px; color: var(--texte-2); }
#theme-list { display: flex; flex-direction: column; gap: 6px; }
.theme-opt { min-height: 64px; padding: 10px 12px; border-radius: 12px; border: 1px solid var(--bord); background: var(--surface); color: var(--texte); font: inherit; display: flex; gap: 12px; align-items: center; text-align: left; cursor: pointer; transition: background-color .15s, border-color .15s; }
.theme-opt:hover { background: var(--hover); border-color: var(--bleu); }
.theme-opt[aria-checked="true"] { border: 2px solid var(--bleu); }
.theme-opt .pv { flex: none; width: 64px; height: 44px; border-radius: 10px; overflow: hidden; display: flex; flex-direction: column; border: 1px solid #C9D5DE; }
.theme-opt .pv i { height: 12px; background: #FFFFFF; border-bottom: 1px solid #D8E0E6; }
.theme-opt .pv b { flex: 1; display: flex; gap: 4px; align-items: center; padding: 0 6px; }
.theme-opt .pv b span { width: 14px; height: 14px; border-radius: 4px; }
.theme-opt .pv b em { flex: 1; height: 6px; border-radius: 3px; }
.theme-opt .txt { flex: 1; min-width: 0; }
.theme-opt .txt strong { display: block; font-size: 15px; }
.theme-opt .txt small { display: block; font-size: 13px; color: var(--texte-2); }
.theme-opt .ok { flex: none; color: var(--bleu); visibility: hidden; }
.theme-opt[aria-checked="true"] .ok { visibility: visible; }
body { transition: background-color .2s, color .2s; }
@media (prefers-reduced-motion: reduce) { body, .theme-opt { transition: none; } }
@media (max-width: 620px) { .theme-wrap .btn { padding: 0 10px; } }
:root[data-mode="dark"] .sla-ok { color: #7FCB9C; }
:root[data-mode="dark"] .sla-pause { color: #E6B65C; }
@media (max-width: 620px) { .theme-panel { position: fixed; left: 16px; right: 16px; top: calc(70px + env(safe-area-inset-top, 0px)); width: auto; max-width: none; } }

/* ---------- En-tête : raccourcis, menus et profil ---------- */
.hdr-nav { display: flex; gap: 8px; align-items: center; }
.hdr-link { color: #1F3D6B; font-size: 14px; font-weight: 600; padding: 0 6px; min-height: 40px; display: inline-flex; align-items: center; }
.hdr-link:hover { color: #0D4670; text-decoration: underline; }
.top .hdr-btn { background: #FFFFFF; color: #0F1E2A; border-color: #C9D5DE; }
.top .hdr-btn:hover { background: #F4F8FB; }
.pop-wrap { position: relative; }
.pop { position: absolute; right: 0; top: calc(100% + 8px); z-index: 20; width: 320px; max-width: calc(100vw - 32px); background: var(--surface); color: var(--texte); border: 1px solid var(--bord); border-radius: 16px; box-shadow: 0 12px 32px rgba(15, 47, 71, .18); padding: 14px; display: flex; flex-direction: column; gap: 10px; text-align: left; }
.pop strong { font-size: 16px; }
.pop-empty { margin: 0; padding: 12px; border-radius: 12px; background: var(--lecture); border: 1px dashed var(--bord-2); font-size: 14px; color: var(--texte-2); }
.pop-empty b { color: var(--texte); }
.prof-id { display: flex; flex-direction: column; gap: 2px; font-size: 13px; color: var(--texte-2); padding-bottom: 8px; border-bottom: 1px solid var(--ligne); }
.prof-id strong { color: var(--texte); font-size: 16px; }
.prof-id b { color: var(--texte); }
.pop-link { min-height: 40px; display: flex; align-items: center; padding: 0 10px; border-radius: 10px; color: var(--texte); font-weight: 600; font-size: 14px; }
.pop-link:hover { background: var(--hover); color: var(--texte); }
.avatar-btn { border: none; padding: 0; background: none; border-radius: 50%; cursor: pointer; display: block; }
.avatar-btn .avatar { width: 44px; height: 44px; }
.avatar-btn:hover .avatar { background: #1B4566; }
@media (max-width: 900px) { .hdr-btn .lbl { display: none; } .hdr-btn { padding: 0 10px; } .hdr-link { font-size: 13px; } }
@media (max-width: 620px) {
  .top-in { flex-wrap: wrap; }
  .hdr-right { flex-wrap: wrap; justify-content: flex-end; gap: 6px; }
  .hdr-link { display: none; }
  .pop { position: fixed; left: 16px; right: 16px; top: calc(70px + env(safe-area-inset-top, 0px)); width: auto; max-width: none; }
}

/* ---------- Accueil ---------- */
.hero { background: #0F2F47; color: #FFFFFF; border-radius: 18px; padding: clamp(18px, 3vw, 28px); margin: 6px 0 18px; }
.hero h1 { margin: 0; font-size: clamp(22px, 3vw, 28px); line-height: 1.2; }
.hero p { margin: 6px 0 14px; color: #DCE7F0; }
.hero-search { display: flex; gap: 10px; align-items: center; min-height: 52px; padding: 0 16px; border-radius: 14px; background: var(--surface); color: var(--texte); border: 3px solid #F2C14E; }
.hero-search input { flex: 1; min-width: 0; border: none; outline: none; background: transparent; font: inherit; font-size: 16px; color: var(--texte); }
.hero-search:focus-within { outline: 3px solid #FFFFFF; outline-offset: 2px; }
.notice-dept { padding: 12px 16px; border-radius: 12px; background: #FBEFD9; border: 1px solid #E8CF94; color: #4A3300; font-size: 14px; margin: 0 0 16px; }
.sec-tools { display: flex; justify-content: flex-end; gap: 8px; margin-bottom: 10px; }
.sec { margin-bottom: 12px; }
.sec-head { width: 100%; min-height: 60px; padding: 10px 18px; border: none; background: transparent; color: var(--texte); font: inherit; display: flex; gap: 12px; align-items: center; text-align: left; cursor: pointer; transition: background-color .15s; }
.sec-head:hover { background: var(--hover); }
.sec-head > span:nth-child(2) { flex: 1; display: flex; gap: 10px; align-items: center; flex-wrap: wrap; }
.sec-head strong { font-size: 18px; }
.sec-head .chev { color: var(--bleu); flex: none; transition: transform .15s; }
.sec-open .sec-head .chev { transform: rotate(90deg); }
.sec-open .sec-head { background: var(--lecture); border-bottom: 1px solid var(--ligne); }
.sec-adm { padding: 2px 8px; border-radius: 8px; background: #0F2F47; color: #FFFFFF; font-size: 12px; font-weight: 600; }
.sec-n { min-width: 28px; height: 28px; border-radius: 14px; background: var(--lecture); border: 1px solid var(--bord); font-size: 13px; font-weight: 700; color: var(--texte-2); display: flex; align-items: center; justify-content: center; }
.tiles { padding: 16px; display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 14px; }
.tiles-2 { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
.tiles-page { padding: 0; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); }
.tile { background: var(--surface); border: 1px solid var(--bord); border-radius: 16px; padding: 18px; color: var(--texte); display: flex; flex-direction: column; gap: 12px; min-height: 150px; transition: border-color .15s, background-color .15s; }
.tile:hover { border-color: var(--bleu); background: var(--hover); color: var(--texte); }
.tile-c { min-height: 0; flex-direction: row; align-items: center; gap: 14px; padding: 14px 16px; }
.t-top { display: flex; justify-content: space-between; align-items: flex-start; gap: 8px; }
.t-ico { flex: none; width: 48px; height: 48px; border-radius: 14px; display: flex; align-items: center; justify-content: center; }
.ic-dark { background: #0F2F47; color: #FFFFFF; }
.ic-soft { background: #E3EEF7; color: #135E96; }
.ic-warm { background: #FBEFD9; color: #8A5A00; }
:root[data-mode="dark"] .ic-soft { background: #1B3347; color: #7DB9E4; }
@media (prefers-color-scheme: dark) { :root:not([data-theme]) .ic-soft { background: #1B3347; color: #7DB9E4; } }
.t-badge { padding: 3px 9px; border-radius: 8px; border: 1px solid var(--bord-2); background: var(--lecture); color: var(--texte-2); font-size: 12px; font-weight: 600; white-space: nowrap; }
.t-txt { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.t-txt strong { font-size: 16px; }
.t-txt span { font-size: 14px; color: var(--texte-2); }
.t-txt em { font-style: normal; font-size: 12px; font-weight: 600; color: var(--bleu); margin-top: 4px; }
.t-soon { display: inline-block; align-self: flex-start; margin-top: 6px; padding: 2px 8px; border-radius: 8px; background: #E3E9EE; color: #3E4F5C !important; font-size: 12px !important; font-weight: 600; }
@media (max-width: 560px) { .tiles-2 { grid-template-columns: 1fr; } }
@media (prefers-reduced-motion: reduce) { .tile, .sec-head, .sec-head .chev { transition: none; } }

/* ---------- Factures fournisseurs ---------- */
.grid4 { display: grid; grid-template-columns: repeat(auto-fit, minmax(130px, 1fr)); gap: 12px; }
.fac-montants { gap: 10px; }
.fac-apercu { margin-top: 8px; padding: 8px; border: 1px solid var(--bord); border-radius: 12px; background: var(--lecture); max-width: 320px; }
.fac-apercu img { display: block; max-height: 240px; border-radius: 8px; margin: 0 auto; }
.fac-pdf { font-size: 14px; font-weight: 600; }
.fac-note { background: #FBEFD9; color: #4A3300; }
.fac-note strong { color: #4A3300; }
.fs-Soumise { background: #FBEFD9; color: #8A5A00; }
.fs-Autorisée { background: #E3EEF7; color: #135E96; }
.fs-Refusée { background: #E3E9EE; color: #3E4F5C; }
.fs-Traitée, .fs-Remboursée { background: #DFF1E6; color: #1E6B3F; }
.fs-Incomplète { background: #FBE9E6; color: #9A2B1E; }
input[type="file"].fld { padding: 10px; }
.fac-auto { padding: 12px 14px; border-radius: 12px; background: var(--lecture); border: 1px solid var(--bord); }

/* ---------- Listes SharePoint ---------- */
.th-sort { border: none; background: none; padding: 0; font: inherit; font-weight: 700; color: inherit; cursor: pointer; white-space: nowrap; min-height: 32px; }
.th-sort:hover { color: var(--bleu); }
.ls-table td { white-space: nowrap; }
.ls-table td.ls-first { white-space: normal; min-width: 180px; }
.ls-num { text-align: right; font-weight: 600; }

/* ---------- Bottin ---------- */
.bt-nom { display: flex; gap: 12px; align-items: center; min-width: 220px; }
.bt-nom > span:last-child { display: flex; flex-direction: column; }
.bt-av { width: 38px; height: 38px; font-size: 13px; flex: none; }
.bt-tel { font-weight: 600; white-space: nowrap; display: inline-flex; min-height: 40px; align-items: center; }
.bt-vide { color: var(--texte-2); }
@media (max-width: 640px) {
  .bt-table thead { display: none; }
  .bt-table, .bt-table tbody, .bt-table tr, .bt-table td { display: block; }
  .bt-table tr { padding: 12px 16px; border-bottom: 1px solid var(--ligne); }
  .bt-table td { border: none; padding: 2px 0 2px 50px; }
  .bt-table td:first-child { padding-left: 0; }
  .bt-table td[data-l]::before { content: attr(data-l) " : "; color: var(--texte-2); font-size: 13px; }
}
@media (max-width: 640px) {
  .list .bt-table tbody tr { display: block; }
  .list .bt-table td:nth-child(2) { order: 0; flex-basis: auto; }
  .list .bt-table td { padding: 3px 0 3px 50px; }
  .list .bt-table td:first-child { padding: 0 0 4px; }
  .bt-tel { min-height: 32px; }
}

.hero-top { display: flex; gap: 16px; align-items: center; margin-bottom: 4px; }
.hero-top p { margin-bottom: 0; }
.harvey { flex: none; width: 72px; height: 72px; border-radius: 50%; border: 3px solid #F2C14E; object-fit: cover; background: #FFFFFF; }
.hero .hero-search { margin-top: 14px; }
@media (max-width: 480px) { .harvey { width: 56px; height: 56px; } }

/* ---------- Harvey, assistant guidé ---------- */
.hv-form { display: flex; gap: 10px; flex-wrap: wrap; margin-top: 14px; }
.hv-form .hero-search { flex: 1 1 320px; margin-top: 0; }
.hv-btn { background: #F2C14E; color: #3A2A00; min-height: 52px; padding: 0 20px; border-radius: 14px; font-size: 15px; }
.hv-btn:hover { background: #E8B43A; color: #3A2A00; }
.hv-rep { display: flex; gap: 14px; align-items: flex-start; padding: 16px 18px; margin: -6px 0 18px; border-left: 4px solid #F2C14E; }
.hv-av { width: 44px; height: 44px; border-width: 2px; }
.hv-txt { flex: 1; min-width: 0; }
.hv-txt p { margin: 0 0 10px; }
.hv-q { color: var(--texte-2); font-size: 14px; font-style: italic; }
.hv-act { display: flex; flex-wrap: wrap; gap: 8px; }
.hv-note { margin: 0; padding: 10px 14px; border-radius: 12px; background: #FBEFD9; color: #4A3300; font-size: 14px; border: 1px solid #E8CF94; }
@media (max-width: 480px) { .hv-btn { width: 100%; } .hv-av { display: none; } }

.hv-mic { flex: none; width: 44px; height: 44px; border-radius: 50%; border: none; background: #0F2F47; color: #FFFFFF; display: flex; align-items: center; justify-content: center; cursor: pointer; margin-right: -6px; transition: background-color .15s; }
.hv-mic:hover { background: #1B4566; }
.hv-mic[aria-pressed="true"] { background: #C0392B; animation: hv-pulse 1.2s ease-in-out infinite; }
@keyframes hv-pulse { 0%, 100% { box-shadow: 0 0 0 0 rgba(192, 57, 43, .55); } 50% { box-shadow: 0 0 0 8px rgba(192, 57, 43, 0); } }
@media (prefers-reduced-motion: reduce) { .hv-mic[aria-pressed="true"] { animation: none; } }
.hv-ecoute { flex-basis: 100%; margin: 0; min-height: 0; color: #F2C14E; font-size: 14px; font-weight: 600; }
.hv-ecoute:empty { display: none; }

/* =====================================================================
   PEAU « JARVIS » — interface HUD moderne, uniforme sur tous les écrans.
   Jetons communs aux thèmes : Clair (Jarvis clair) et Sombre (Jarvis sombre).
   ===================================================================== */
@property --ang { syntax: "<angle>"; initial-value: 0deg; inherits: false; }
:root {
  --f-titre: "Space Grotesk", "Segoe UI", system-ui, sans-serif;
  --f-texte: "Inter", "Segoe UI", system-ui, -apple-system, sans-serif;
  --r-xl: 22px; --r-lg: 18px; --r-md: 14px; --r-pill: 999px;
  /* Jarvis clair */
  --fond: #EAF2FA; --surface: rgba(255, 255, 255, .78); --surface-pleine: #FFFFFF; --lecture: rgba(236, 244, 252, .9);
  --hover: rgba(10, 123, 194, .07); --sel: rgba(10, 123, 194, .10); --champ: #FFFFFF;
  --bord: rgba(15, 60, 110, .12); --bord-2: rgba(15, 60, 110, .22); --ligne: rgba(15, 60, 110, .08);
  --texte: #0B1B2B; --texte-2: #4B6278; --bleu: #0A7BC2; --bleu-h: #075E95; --danger: #C0392B;
  --acc-1: #0A7BC2; --acc-2: #1557D6; --sur-acc: #FFFFFF; --lueur: rgba(10, 123, 194, .28); --laiton: #F2C14E;
  --fond-img: radial-gradient(1200px 600px at 10% -10%, rgba(79, 209, 255, .25), transparent 60%),
              radial-gradient(900px 500px at 100% 0%, rgba(242, 193, 78, .14), transparent 55%),
              linear-gradient(180deg, #F4F9FF, #E4EEF8);
  --grille: rgba(15, 60, 110, .045);
  --hero: linear-gradient(135deg, #0B2340 0%, #0F3B66 55%, #145A8C 100%);
  --entete: rgba(255, 255, 255, .72);
  --ombre: 0 10px 30px rgba(11, 35, 64, .08), 0 1px 0 rgba(255, 255, 255, .6) inset;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme]) {
    --fond: #050B14; --surface: rgba(12, 28, 46, .66); --surface-pleine: #0C1C2E; --lecture: rgba(16, 36, 58, .62);
    --hover: rgba(79, 209, 255, .08); --sel: rgba(79, 209, 255, .13); --champ: rgba(4, 12, 22, .7);
    --bord: rgba(120, 200, 255, .16); --bord-2: rgba(120, 200, 255, .30); --ligne: rgba(120, 200, 255, .09);
    --texte: #E8F4FF; --texte-2: #9DB7CF; --bleu: #4FD1FF; --bleu-h: #8BE3FF; --danger: #FF8A80;
    --acc-1: #4FD1FF; --acc-2: #2B8CFF; --sur-acc: #03121F; --lueur: rgba(79, 209, 255, .35);
    --fond-img: radial-gradient(1100px 600px at 12% -10%, rgba(43, 140, 255, .28), transparent 60%),
                radial-gradient(800px 500px at 100% 5%, rgba(79, 209, 255, .14), transparent 55%),
                radial-gradient(700px 500px at 50% 110%, rgba(242, 193, 78, .08), transparent 60%),
                linear-gradient(180deg, #06101C, #040A12);
    --grille: rgba(79, 209, 255, .05);
    --hero: linear-gradient(135deg, rgba(10, 40, 70, .9), rgba(8, 26, 46, .85));
    --entete: rgba(6, 16, 28, .72);
    --ombre: 0 18px 40px rgba(0, 0, 0, .45), 0 0 0 1px rgba(120, 200, 255, .05) inset;
  }
}
:root[data-mode="dark"] {
  --fond: #050B14; --surface: rgba(12, 28, 46, .66); --surface-pleine: #0C1C2E; --lecture: rgba(16, 36, 58, .62);
  --hover: rgba(79, 209, 255, .08); --sel: rgba(79, 209, 255, .13); --champ: rgba(4, 12, 22, .7);
  --bord: rgba(120, 200, 255, .16); --bord-2: rgba(120, 200, 255, .30); --ligne: rgba(120, 200, 255, .09);
  --texte: #E8F4FF; --texte-2: #9DB7CF; --bleu: #4FD1FF; --bleu-h: #8BE3FF; --danger: #FF8A80;
  --acc-1: #4FD1FF; --acc-2: #2B8CFF; --sur-acc: #03121F; --lueur: rgba(79, 209, 255, .35);
  --fond-img: radial-gradient(1100px 600px at 12% -10%, rgba(43, 140, 255, .28), transparent 60%),
              radial-gradient(800px 500px at 100% 5%, rgba(79, 209, 255, .14), transparent 55%),
              radial-gradient(700px 500px at 50% 110%, rgba(242, 193, 78, .08), transparent 60%),
              linear-gradient(180deg, #06101C, #040A12);
  --grille: rgba(79, 209, 255, .05);
  --hero: linear-gradient(135deg, rgba(10, 40, 70, .9), rgba(8, 26, 46, .85));
  --entete: rgba(6, 16, 28, .72);
  --ombre: 0 18px 40px rgba(0, 0, 0, .45), 0 0 0 1px rgba(120, 200, 255, .05) inset;
}

/* Fond : dégradé + grille HUD discrète */
body { font-family: var(--f-texte); background: var(--fond-img) fixed, var(--fond); color: var(--texte); }
body::after { content: ""; position: fixed; inset: 0; pointer-events: none; z-index: -1;
  background-image: linear-gradient(var(--grille) 1px, transparent 1px), linear-gradient(90deg, var(--grille) 1px, transparent 1px);
  background-size: 44px 44px; mask-image: radial-gradient(circle at 50% 0%, #000 30%, transparent 85%); }
h1, h2, .page-head h1, .hero h1, .sec-head strong, .kpi b, .done .big, .fiche-head h2, .t-txt strong { font-family: var(--f-titre); letter-spacing: -.01em; }

/* En-tête en verre, collant */
.top { position: sticky; top: env(safe-area-inset-top, 0px); z-index: 30; background: var(--entete); color: var(--texte);
  border-bottom: 1px solid var(--bord); backdrop-filter: blur(16px) saturate(150%); -webkit-backdrop-filter: blur(16px) saturate(150%); }
body::before { content: ""; position: fixed; inset: 0 0 auto; height: env(safe-area-inset-top, 0px); z-index: 31; background: var(--entete); backdrop-filter: blur(16px); }
.brand-txt strong { color: var(--texte); font-family: var(--f-titre); }
.brand-txt span, .who-txt span:last-child { color: var(--texte-2); }
.sep { background: var(--bord-2); }
.logo { background: #FFFFFF; border-radius: 12px; padding: 4px 8px; box-shadow: 0 0 0 1px var(--bord); }
.hdr-link { color: var(--texte); }
.hdr-link:hover { color: var(--bleu); }
.top .hdr-btn, .top .btn-2 { background: var(--surface); color: var(--texte); border-color: var(--bord-2); }
.top .hdr-btn:hover { background: var(--hover); border-color: var(--bleu); box-shadow: 0 0 0 3px var(--lueur); }
.avatar, .bt-av { background: linear-gradient(135deg, var(--acc-2), var(--acc-1)); color: var(--sur-acc); box-shadow: 0 0 0 2px var(--surface-pleine), 0 0 16px var(--lueur); }
.avatar-btn:hover .avatar { background: linear-gradient(135deg, var(--acc-1), var(--acc-2)); }
.demo { background: rgba(242, 193, 78, .14); color: var(--texte); border-bottom: 1px solid rgba(242, 193, 78, .35); backdrop-filter: blur(8px); }
.demo .btn.btn-2 { background: var(--surface); color: var(--texte); border-color: rgba(242, 193, 78, .55); }

/* Panneaux en verre, arrondis */
.panel, .kpi, .tile, .pop, .theme-panel, .hv-rep, .notice, .done { background: var(--surface); border: 1px solid var(--bord); border-radius: var(--r-lg);
  box-shadow: var(--ombre); backdrop-filter: blur(14px) saturate(140%); -webkit-backdrop-filter: blur(14px) saturate(140%); }
.panel { border-radius: var(--r-xl); }
.filters { border-bottom-color: var(--ligne); }

/* Boutons */
.btn { border-radius: var(--r-md); font-weight: 600; transition: transform .15s, box-shadow .2s, background-color .2s, border-color .2s; }
.btn-1 { background: linear-gradient(135deg, var(--acc-1), var(--acc-2)); color: var(--sur-acc); border: none; box-shadow: 0 6px 18px var(--lueur); }
.btn-1:hover { background: linear-gradient(135deg, var(--acc-2), var(--acc-1)); color: var(--sur-acc); transform: translateY(-1px); box-shadow: 0 10px 26px var(--lueur); }
.btn-2 { background: var(--surface); color: var(--texte); border: 1px solid var(--bord-2); }
.btn-2:hover { background: var(--hover); color: var(--texte); border-color: var(--bleu); box-shadow: 0 0 0 3px var(--lueur); }
.btn:active { transform: translateY(0) scale(.98); }
:focus-visible { outline: 2px solid var(--bleu); outline-offset: 3px; box-shadow: 0 0 0 6px var(--lueur); }

/* Pastilles de filtre */
.chip { border-radius: var(--r-pill); background: var(--surface); color: var(--texte); border: 1px solid var(--bord-2); transition: all .2s; }
.chip:hover { border-color: var(--bleu); box-shadow: 0 0 0 3px var(--lueur); }
.chip[aria-pressed="true"] { background: linear-gradient(135deg, var(--acc-1), var(--acc-2)); border-color: transparent; color: var(--sur-acc); box-shadow: 0 4px 14px var(--lueur); }

/* Champs */
.fld, .search, .hero-search { border-radius: var(--r-md); background: var(--champ); border: 1px solid var(--bord-2); color: var(--texte); transition: border-color .2s, box-shadow .2s; }
.fld:focus, .search:focus-within { border-color: var(--bleu); box-shadow: 0 0 0 4px var(--lueur); outline: none; }
.choice { border-radius: var(--r-md); background: var(--champ); border-color: var(--bord-2); }
.choice:has(input:checked) { border-color: var(--bleu); background: var(--sel); box-shadow: 0 0 0 3px var(--lueur); }

/* Contour animé (dégradé conique qui tourne) */
.anime, .hero-search, .tile:hover, .hv-rep, .kpi:hover {
  border: 1px solid transparent !important;
  background: linear-gradient(var(--champ-anim, var(--surface-pleine)), var(--champ-anim, var(--surface-pleine))) padding-box,
              conic-gradient(from var(--ang), transparent 0deg, var(--acc-1) 60deg, var(--laiton) 110deg, transparent 180deg, var(--acc-2) 270deg, transparent 360deg) border-box;
  animation: tourne 6s linear infinite;
}
.hero-search { --champ-anim: var(--surface-pleine); }
@keyframes tourne { to { --ang: 360deg; } }

/* Zone d’accueil (Harvey) : dégradé, ligne de balayage, réacteur autour de la photo */
.hero { position: relative; overflow: hidden; background: var(--hero); color: #FFFFFF; border-radius: var(--r-xl); border: 1px solid rgba(120, 200, 255, .25);
  box-shadow: 0 20px 50px rgba(5, 20, 40, .35), 0 0 0 1px rgba(255, 255, 255, .05) inset; }
.hero::before { content: ""; position: absolute; inset: 0; pointer-events: none;
  background: linear-gradient(90deg, transparent, rgba(79, 209, 255, .14), transparent); width: 40%; transform: translateX(-120%); animation: balaye 7s ease-in-out infinite; }
.hero::after { content: ""; position: absolute; right: -80px; top: -80px; width: 260px; height: 260px; border-radius: 50%; pointer-events: none;
  border: 1px dashed rgba(79, 209, 255, .35); box-shadow: 0 0 0 26px rgba(79, 209, 255, .04), 0 0 0 52px rgba(79, 209, 255, .03); animation: pivote 30s linear infinite; }
@keyframes balaye { 0%, 15% { transform: translateX(-120%); } 60%, 100% { transform: translateX(320%); } }
@keyframes pivote { to { transform: rotate(360deg); } }
.hero h1 { color: #FFFFFF; } .hero p { color: #CFE6F7; }
.hero-top { position: relative; }
.reacteur { position: absolute; left: -6px; top: 50%; width: 84px; height: 84px; margin-top: -42px; border-radius: 50%; pointer-events: none;
  background: conic-gradient(from var(--ang), #4FD1FF, transparent 25%, #F2C14E 50%, transparent 75%, #4FD1FF); animation: tourne 4s linear infinite;
  -webkit-mask: radial-gradient(circle, transparent 38px, #000 39px, #000 42px, transparent 43px); mask: radial-gradient(circle, transparent 38px, #000 39px, #000 42px, transparent 43px);
  filter: drop-shadow(0 0 8px rgba(79, 209, 255, .8)); }
.harvey { border: 2px solid rgba(255, 255, 255, .85); box-shadow: 0 0 22px rgba(79, 209, 255, .55); position: relative; }
.hero-search input { color: var(--texte); }
.hv-btn { background: linear-gradient(135deg, #F2C14E, #E8A21C); color: #2A1C00; border-radius: var(--r-md); box-shadow: 0 6px 20px rgba(242, 193, 78, .35); }
.hv-btn:hover { background: linear-gradient(135deg, #FFD36A, #F2C14E); color: #2A1C00; transform: translateY(-1px); }
.hv-mic { background: linear-gradient(135deg, var(--acc-1), var(--acc-2)); color: var(--sur-acc); box-shadow: 0 0 14px var(--lueur); }
.hv-ecoute { color: #FFD36A; }
.hv-rep { --champ-anim: var(--surface-pleine); border-left-width: 1px; border-radius: var(--r-lg); }

/* Accès rapides : cartes en verre teintées par la couleur du thème */
.sec-tools { display: flex; justify-content: flex-end; align-items: center; gap: 10px; flex-wrap: wrap; margin-bottom: 12px; }
.sec-tools-r { display: flex; gap: 8px; margin-left: auto; }
.act-deck { display: grid; grid-template-columns: repeat(var(--n, 4), minmax(0, 1fr)); gap: 12px; margin: 4px 0 14px; }
.act { --c: var(--acc-1); --encre: color-mix(in srgb, var(--c) 72%, var(--texte));
  position: relative; isolation: isolate; overflow: hidden; display: flex; align-items: center; gap: 14px; min-height: 78px; padding: 14px 16px;
  border-radius: var(--r-lg); color: var(--texte); border: 1px solid color-mix(in srgb, var(--c) 22%, var(--bord));
  background: radial-gradient(160px 120px at 100% 0%, color-mix(in srgb, var(--c) 18%, transparent), transparent 70%), var(--surface);
  backdrop-filter: blur(14px); -webkit-backdrop-filter: blur(14px); box-shadow: var(--ombre);
  transition: transform .2s ease, box-shadow .2s ease, border-color .2s ease; animation: act-in .45s ease both; }
.act:nth-child(2) { animation-delay: .05s; } .act:nth-child(3) { animation-delay: .1s; } .act:nth-child(4) { animation-delay: .15s; }
/* Filet lumineux en haut et reflet qui balaie la carte au survol */
.act::before { content: ""; position: absolute; inset: 0 14px auto; height: 2px; border-radius: 2px;
  background: linear-gradient(90deg, transparent, var(--c), transparent); opacity: .75; }
.act::after { content: ""; position: absolute; inset: 0; z-index: -1; pointer-events: none;
  background: linear-gradient(115deg, transparent 35%, color-mix(in srgb, var(--c) 16%, transparent) 50%, transparent 65%);
  transform: translateX(-110%); transition: transform .7s ease; }
.act:hover, .act:focus-visible { color: var(--texte); transform: translateY(-2px); border-color: color-mix(in srgb, var(--c) 55%, var(--bord));
  box-shadow: var(--ombre), 0 12px 30px color-mix(in srgb, var(--c) 26%, transparent); }
.act:hover::after { transform: translateX(110%); }
.act:focus-visible { outline: 3px solid var(--encre); outline-offset: 3px; }
.act-ic { flex: none; width: 50px; height: 50px; border-radius: 15px; display: grid; place-items: center; color: var(--encre);
  background: linear-gradient(145deg, color-mix(in srgb, var(--c) 24%, transparent), color-mix(in srgb, var(--c) 8%, transparent));
  border: 1px solid color-mix(in srgb, var(--c) 40%, transparent);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, .18), 0 0 18px color-mix(in srgb, var(--c) 22%, transparent); transition: transform .2s ease; }
.act:hover .act-ic { transform: rotate(-6deg) scale(1.05); }
.act-txt { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 3px; }
.act-txt strong { font-family: var(--f-titre); font-size: 15.5px; font-weight: 700; letter-spacing: -.01em; }
.act-txt small { font-size: 13px; color: var(--texte-2); line-height: 1.3; }
.act-go { flex: none; color: var(--encre); opacity: .55; transition: transform .2s ease, opacity .2s ease; }
.act:hover .act-go { opacity: 1; transform: translateX(4px); }
/* Couleur propre à chaque accès, tirée du thème actif */
.act-pl { --c: var(--laiton); background: linear-gradient(135deg, color-mix(in srgb, var(--laiton) 20%, transparent), transparent 75%), var(--surface); }
.act-pl .act-ic { color: #2A1C00; border-color: transparent;
  background: linear-gradient(145deg, color-mix(in srgb, var(--laiton) 70%, #FFFFFF), var(--laiton) 55%, color-mix(in srgb, var(--laiton) 80%, #8A5A00));
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, .5), 0 6px 18px color-mix(in srgb, var(--laiton) 45%, transparent); }
.act-inc { --c: var(--danger); }
.act-dem { --c: var(--acc-1); }
.act-com { --c: var(--acc-2); }
@keyframes act-in { from { opacity: 0; transform: translateY(6px); } to { opacity: 1; transform: none; } }
@media (max-width: 1080px) { .act-deck { grid-template-columns: 1fr 1fr; } }
@media (max-width: 520px) { .act-deck { gap: 10px; } .act { flex-direction: column; align-items: flex-start; gap: 10px; min-height: 0; }
  .act-go { position: absolute; top: 14px; right: 14px; } .act-txt small { font-size: 12px; } }
@media (prefers-reduced-motion: reduce) { .act, .act::after, .act-ic, .act-go { animation: none; transition: none; } .act:hover::after { transform: translateX(-110%); } }

/* Sections repliables */
.sec { border-radius: var(--r-xl); overflow: hidden; transition: box-shadow .2s, border-color .2s; }
.sec:hover { border-color: var(--bord-2); }
.sec-head { position: relative; min-height: 58px; }
.sec-head::before { content: ""; position: absolute; left: 0; top: 14px; bottom: 14px; width: 3px; border-radius: 3px; background: linear-gradient(var(--acc-1), var(--acc-2)); opacity: .5; transition: opacity .2s; }
.sec-open .sec-head::before, .sec-head:hover::before { opacity: 1; box-shadow: 0 0 10px var(--lueur); }
.sec-open .sec-head { background: var(--lecture); }
.sec-head .chev { color: var(--bleu); }
.sec-n { background: var(--sel); border-color: transparent; color: var(--bleu); font-family: var(--f-titre); }
.sec-adm { background: linear-gradient(135deg, var(--acc-1), var(--acc-2)); color: var(--sur-acc); border-radius: var(--r-pill); }
.sec-open .tiles { animation: ouvre .25s ease-out; }
@keyframes ouvre { from { opacity: 0; transform: translateY(-6px); } to { opacity: 1; transform: none; } }

/* Tuiles */
.tile { border-radius: var(--r-lg); transition: transform .2s, box-shadow .2s; }
.tile:hover { --champ-anim: var(--surface-pleine); transform: translateY(-3px); box-shadow: 0 16px 34px var(--lueur); color: var(--texte); }
.t-ico { border-radius: 14px; position: relative; }
.ic-dark { background: linear-gradient(135deg, #0B2340, #145A8C); color: #FFFFFF; box-shadow: 0 0 0 1px rgba(79, 209, 255, .35), 0 6px 16px rgba(20, 90, 140, .35); }
.ic-soft { background: var(--sel); color: var(--bleu); box-shadow: 0 0 0 1px var(--bord); }
.ic-warm { background: rgba(242, 193, 78, .18); color: #8A5A00; box-shadow: 0 0 0 1px rgba(242, 193, 78, .4); }
:root[data-mode="dark"] .ic-warm { color: #FFD36A; } :root[data-mode="dark"] .ic-soft { background: var(--sel); color: var(--bleu); }
@media (prefers-color-scheme: dark) { :root:not([data-theme]) .ic-warm { color: #FFD36A; } :root:not([data-theme]) .ic-soft { background: var(--sel); color: var(--bleu); } }
.t-badge { border-radius: var(--r-pill); background: var(--lecture); border-color: var(--bord); color: var(--texte-2); }
.t-txt em { color: var(--bleu); }

/* Indicateurs */
.kpi { border-radius: var(--r-lg); transition: transform .2s; }
.kpi:hover { --champ-anim: var(--surface-pleine); transform: translateY(-2px); }
.kpi .bar { width: 6px; border-radius: 6px; box-shadow: 0 0 12px currentColor; }
.kpi b { background: linear-gradient(135deg, var(--texte), var(--bleu)); -webkit-background-clip: text; background-clip: text; color: transparent; }

/* Tableaux */
th { background: var(--lecture); color: var(--texte-2); border-bottom-color: var(--bord); font-family: var(--f-titre); text-transform: uppercase; font-size: 12px; letter-spacing: .06em; }
td { border-bottom-color: var(--ligne); }
tbody tr { transition: background-color .15s; }
tbody tr:hover td { background: var(--hover); }
tbody tr.on td { background: var(--sel); }
tbody tr.on td:first-child { box-shadow: inset 3px 0 0 var(--bleu); }
.num { color: var(--bleu); }
.tag, .prio { border-radius: var(--r-pill); }

/* Fiches */
.fiche { overflow: hidden; }
.fiche-head { background: var(--hero); color: #FFFFFF; position: relative; }
.fiche-head::after { content: ""; position: absolute; left: 0; right: 0; bottom: 0; height: 2px; background: linear-gradient(90deg, transparent, var(--acc-1), var(--laiton), transparent); }
.fiche-head .ids strong { color: #FFD36A; }
.fiche-head p { color: #CFE6F7; }
.form-mini, .calc, .pop-empty, .fac-auto { background: var(--lecture); border-color: var(--bord); border-radius: var(--r-md); }
.actions { border-bottom-color: var(--ligne); }

/* Menus, notifications */
.pop, .theme-panel { border-radius: var(--r-lg); background: var(--surface); }
.theme-opt { border-radius: var(--r-md); background: var(--surface); border-color: var(--bord); }
.theme-opt[aria-checked="true"] { border-color: var(--bleu); box-shadow: 0 0 0 3px var(--lueur); }
.toast { background: var(--surface-pleine); color: var(--texte); border: 1px solid var(--bord-2); border-radius: var(--r-md); box-shadow: 0 12px 30px rgba(0, 0, 0, .25), 0 0 0 1px var(--lueur); backdrop-filter: blur(14px); }
.toast.bad { background: #7A2015; color: #FFFFFF; }
.hv-note, .notice-dept, .fac-note { border-radius: var(--r-md); }
.crumbs a { color: var(--bleu); }

/* Mouvement réduit : on coupe les animations */
@media (prefers-reduced-motion: reduce) {
  .anime, .hero-search, .tile:hover, .hv-rep, .kpi:hover, .reacteur, .hero::before, .hero::after, .sec-open .tiles { animation: none !important; }
  .btn, .tile, .kpi { transition: none; }
}
.t-soon { background: var(--lecture) !important; color: var(--texte-2) !important; border: 1px solid var(--bord); border-radius: var(--r-pill); }
@media (max-width: 480px) { .reacteur { width: 66px; height: 66px; margin-top: -33px; left: -5px;
  -webkit-mask: radial-gradient(circle, transparent 29px, #000 30px, #000 33px, transparent 34px); mask: radial-gradient(circle, transparent 29px, #000 30px, #000 33px, transparent 34px); } }

/* =====================================================================
   5 THÈMES SUPPLÉMENTAIRES (même allure Jarvis). data-mode donne la base claire ou sombre.
   ===================================================================== */
:root[data-theme="mark3"] {
  --fond: #0D0606; --surface: rgba(32, 12, 12, .68); --surface-pleine: #1E0C0C; --lecture: rgba(48, 18, 18, .62);
  --hover: rgba(255, 110, 80, .09); --sel: rgba(255, 200, 87, .14); --champ: rgba(14, 4, 4, .72);
  --bord: rgba(255, 150, 120, .18); --bord-2: rgba(255, 150, 120, .32); --ligne: rgba(255, 150, 120, .10);
  --texte: #FFF1EC; --texte-2: #D9B2A8; --bleu: #FFC857; --bleu-h: #FFDD8A; --danger: #FF8A80;
  --acc-1: #FFC857; --acc-2: #E8452F; --sur-acc: #1A0500; --lueur: rgba(255, 110, 70, .38); --laiton: #FFC857;
  --fond-img: radial-gradient(1100px 600px at 10% -10%, rgba(200, 30, 30, .32), transparent 60%), radial-gradient(800px 500px at 100% 0%, rgba(255, 200, 87, .16), transparent 55%), linear-gradient(180deg, #140808, #070202);
  --grille: rgba(255, 120, 90, .05); --hero: linear-gradient(135deg, #3A0709, #7A1416 60%, #9A2A16); --entete: rgba(18, 6, 6, .74);
  --ombre: 0 18px 40px rgba(0, 0, 0, .5), 0 0 0 1px rgba(255, 150, 120, .05) inset;
}
:root[data-theme="reacteur"] {
  --fond: #000000; --surface: rgba(6, 14, 18, .74); --surface-pleine: #050C10; --lecture: rgba(8, 22, 28, .7);
  --hover: rgba(0, 229, 255, .08); --sel: rgba(0, 229, 255, .13); --champ: rgba(0, 6, 9, .8);
  --bord: rgba(0, 229, 255, .18); --bord-2: rgba(0, 229, 255, .34); --ligne: rgba(0, 229, 255, .10);
  --texte: #E6FFFF; --texte-2: #8FB9C4; --bleu: #00E5FF; --bleu-h: #7DF3FF; --danger: #FF8A80;
  --acc-1: #00E5FF; --acc-2: #00A3FF; --sur-acc: #001318; --lueur: rgba(0, 229, 255, .42); --laiton: #F2C14E;
  --fond-img: radial-gradient(900px 600px at 50% -15%, rgba(0, 229, 255, .22), transparent 60%), radial-gradient(600px 400px at 50% 50%, rgba(0, 120, 255, .06), transparent 70%), #000000;
  --grille: rgba(0, 229, 255, .07); --hero: linear-gradient(135deg, #001A22, #00303D); --entete: rgba(0, 0, 0, .78);
  --ombre: 0 0 0 1px rgba(0, 229, 255, .08) inset, 0 18px 40px rgba(0, 0, 0, .6);
}
:root[data-theme="titane"] {
  --fond: #E9ECEF; --surface: rgba(255, 255, 255, .8); --surface-pleine: #FFFFFF; --lecture: rgba(241, 243, 246, .92);
  --hover: rgba(58, 90, 122, .07); --sel: rgba(58, 90, 122, .11); --champ: #FFFFFF;
  --bord: rgba(30, 40, 52, .12); --bord-2: rgba(30, 40, 52, .22); --ligne: rgba(30, 40, 52, .08);
  --texte: #1B2128; --texte-2: #556170; --bleu: #3A5A7A; --bleu-h: #2B4560; --danger: #B23A2B;
  --acc-1: #4A5B6E; --acc-2: #2B3642; --sur-acc: #FFFFFF; --lueur: rgba(74, 91, 110, .25); --laiton: #C9A24A;
  --fond-img: radial-gradient(1100px 600px at 10% -10%, rgba(255, 255, 255, .9), transparent 60%), radial-gradient(800px 500px at 100% 0%, rgba(150, 165, 180, .25), transparent 55%), linear-gradient(180deg, #F2F4F6, #DCE1E6);
  --grille: rgba(40, 50, 60, .05); --hero: linear-gradient(135deg, #1F262E, #3A4654 60%, #56616E); --entete: rgba(255, 255, 255, .78);
  --ombre: 0 10px 28px rgba(27, 33, 40, .10), 0 1px 0 rgba(255, 255, 255, .7) inset;
}
:root[data-theme="nebuleuse"] {
  --fond: #0B0716; --surface: rgba(26, 16, 48, .66); --surface-pleine: #1A1030; --lecture: rgba(36, 22, 66, .62);
  --hover: rgba(183, 148, 255, .09); --sel: rgba(183, 148, 255, .14); --champ: rgba(8, 4, 18, .72);
  --bord: rgba(183, 148, 255, .18); --bord-2: rgba(183, 148, 255, .32); --ligne: rgba(183, 148, 255, .10);
  --texte: #F3EEFF; --texte-2: #B9AED6; --bleu: #B794FF; --bleu-h: #D4BFFF; --danger: #FF8A9A;
  --acc-1: #B794FF; --acc-2: #6B86FF; --sur-acc: #0E0620; --lueur: rgba(160, 120, 255, .38); --laiton: #F2C14E;
  --fond-img: radial-gradient(1100px 600px at 10% -10%, rgba(123, 47, 247, .32), transparent 60%), radial-gradient(800px 500px at 100% 0%, rgba(43, 140, 255, .22), transparent 55%), radial-gradient(700px 500px at 50% 110%, rgba(255, 80, 200, .10), transparent 60%), linear-gradient(180deg, #0E0820, #06030D);
  --grille: rgba(183, 148, 255, .05); --hero: linear-gradient(135deg, #2A1060, #3B2A8C 55%, #1F4FB8); --entete: rgba(12, 7, 24, .74);
  --ombre: 0 18px 40px rgba(0, 0, 0, .5), 0 0 0 1px rgba(183, 148, 255, .05) inset;
}
:root[data-theme="pe"] {
  --fond: #EEF2F8; --surface: rgba(255, 255, 255, .82); --surface-pleine: #FFFFFF; --lecture: rgba(238, 243, 250, .92);
  --hover: rgba(14, 49, 104, .06); --sel: rgba(14, 49, 104, .10); --champ: #FFFFFF;
  --bord: rgba(14, 49, 104, .13); --bord-2: rgba(14, 49, 104, .24); --ligne: rgba(14, 49, 104, .08);
  --texte: #0E1B33; --texte-2: #4A5872; --bleu: #0E3168; --bleu-h: #1A4385; --danger: #B23A2B;
  --acc-1: #0E3168; --acc-2: #1A4385; --sur-acc: #FFFFFF; --lueur: rgba(14, 49, 104, .22); --laiton: #F0A81C;
  --fond-img: radial-gradient(1100px 600px at 10% -10%, rgba(14, 49, 104, .12), transparent 60%), radial-gradient(800px 500px at 100% 0%, rgba(240, 168, 28, .18), transparent 55%), linear-gradient(180deg, #F6F8FC, #E6ECF5);
  --grille: rgba(14, 49, 104, .045); --hero: linear-gradient(135deg, #0E3168, #1A4385 60%, #2A5DA8); --entete: rgba(255, 255, 255, .78);
  --ombre: 0 10px 28px rgba(14, 49, 104, .10), 0 1px 0 rgba(255, 255, 255, .7) inset;
}
:root[data-theme="mark3"] .ic-warm, :root[data-theme="reacteur"] .ic-warm, :root[data-theme="nebuleuse"] .ic-warm { color: #FFD36A; }
:root[data-theme="pe"] .ic-dark { background: linear-gradient(135deg, #0E3168, #1A4385); }
.theme-panel { max-height: calc(100vh - 110px); overflow-y: auto; }
/* Menus déroulants opaques pour rester lisibles par-dessus le contenu */
.pop, .theme-panel { background: var(--surface-pleine) !important; backdrop-filter: none; -webkit-backdrop-filter: none; box-shadow: 0 20px 50px rgba(0, 0, 0, .28), 0 0 0 1px var(--bord-2); }
.theme-opt { background: var(--surface-pleine); }

.bt-mail { display: inline-flex; gap: 10px; align-items: center; white-space: nowrap; }
.bt-mail a { min-height: 36px; display: inline-flex; align-items: center; }
.bt-teams { font-size: 12px; font-weight: 700; padding: 2px 8px; border-radius: 999px; background: var(--sel); color: var(--bleu); min-height: 28px !important; }

/* ---------- Envoi de texto et courriel ---------- */
.cm-chips { display: flex; flex-wrap: wrap; gap: 8px; min-height: 44px; align-items: center; }
.cm-chip { display: inline-flex; flex-wrap: wrap; gap: 6px; align-items: center; padding: 6px 6px 6px 12px; border-radius: 999px; background: var(--sel); border: 1px solid var(--bord-2); font-size: 14px; }
.cm-c { font-size: 12px; color: var(--texte-2); }
.cm-x { width: 30px; height: 30px; border-radius: 50%; border: none; background: var(--surface-pleine, #fff); color: var(--texte); cursor: pointer; font-size: 18px; line-height: 1; }
.cm-x:hover { background: var(--danger); color: #fff; }
.cm-add { display: flex; gap: 8px; flex-wrap: wrap; }
.cm-add .fld { flex: 1 1 260px; }
.cm-bottin { padding: 14px; display: flex; flex-direction: column; gap: 10px; max-height: 420px; }
.cm-bottin-h { display: flex; justify-content: space-between; align-items: center; }
.cm-bl { list-style: none; margin: 0; padding: 0; overflow-y: auto; display: flex; flex-direction: column; gap: 6px; }
.cm-bp { width: 100%; display: flex; gap: 12px; align-items: center; padding: 8px 12px; border-radius: 14px; border: 1px solid var(--bord); background: var(--surface-pleine, #fff); color: var(--texte); font: inherit; text-align: left; cursor: pointer; }
.cm-bp:hover { border-color: var(--bleu); }
.cm-bp[aria-pressed="true"] { border-color: var(--bleu); background: var(--sel); }
.cm-bp-t { flex: 1; display: flex; flex-direction: column; min-width: 0; }
.cm-bp-t > span { font-size: 13px; color: var(--texte-2); }
.cm-ok { width: 30px; height: 30px; border-radius: 50%; display: flex; align-items: center; justify-content: center; background: var(--lecture); font-weight: 700; color: var(--bleu); }
.cm-bp[aria-pressed="true"] .cm-ok { background: var(--bleu); color: var(--sur-acc, #fff); }
.cm-canaux { display: flex; gap: 22px; flex-wrap: wrap; }
.cm-sw { display: inline-flex; gap: 10px; align-items: center; min-height: 44px; cursor: pointer; font-weight: 600; }
.cm-sw input { position: absolute; opacity: 0; width: 1px; height: 1px; }
.cm-sl { width: 48px; height: 28px; border-radius: 999px; background: var(--bord-2); position: relative; transition: background .2s; }
.cm-sl::after { content: ""; position: absolute; top: 3px; left: 3px; width: 22px; height: 22px; border-radius: 50%; background: #fff; box-shadow: 0 1px 3px rgba(0,0,0,.3); transition: transform .2s; }
.cm-sw input:checked + .cm-sl { background: linear-gradient(135deg, var(--acc-1, #135E96), var(--acc-2, #0D4670)); }
.cm-sw input:checked + .cm-sl::after { transform: translateX(20px); }
.cm-sw input:focus-visible + .cm-sl { outline: 2px solid var(--bleu); outline-offset: 3px; }
.cm-conf { padding: 14px 16px; border-radius: 14px; background: rgba(242, 193, 78, .14); border: 1px solid rgba(242, 193, 78, .45); }
.cm-conf p { margin: 0 0 10px; }
.cm-res { padding: 20px; margin-bottom: 18px; }
.cm-res h2 { margin: 0 0 10px; font-size: 20px; }
.cm-res ul, .cm-aud { list-style: none; margin: 0 0 12px; padding: 0; display: flex; flex-direction: column; gap: 8px; }
.cm-ko { background: #FBE9E6; color: #9A2B1E; }
@media (prefers-reduced-motion: reduce) { .cm-sl, .cm-sl::after { transition: none; } }

.cm-exp { display: flex; gap: 12px; align-items: center; min-height: 52px; padding: 8px 14px; border-radius: var(--r-md, 14px); background: var(--lecture); border: 1px dashed var(--bord-2); }
.cm-exp > span:last-child { display: flex; flex-direction: column; }

/* =====================================================================
   MON PROFIL : sections repliables, onglets d’accès, permissions sur les menus
   ===================================================================== */
.avatar img { width: 100%; height: 100%; border-radius: 50%; object-fit: cover; display: block; }
.pf-astuce { display: flex; align-items: center; gap: 12px; padding: 12px 14px; margin-bottom: 14px; border-radius: var(--r-lg);
  background: color-mix(in srgb, var(--acc-1) 12%, var(--surface)); border: 1px dashed color-mix(in srgb, var(--acc-1) 45%, transparent); color: var(--texte); }
.pf-astuce > svg { flex: none; color: var(--bleu); }
.pf-astuce p { margin: 0; flex: 1; font-size: 14px; }
.pf-sec .sec-head { min-height: 72px; }
.pf-sec .sec-head > .pf-ic { flex: none; width: 40px; height: 40px; border-radius: 12px; display: grid; gap: 0; place-items: center; color: var(--bleu); background: var(--sel); border: 1px solid var(--bord); }
.pf-sec .sec-head > .pf-ttl { flex: 1; display: flex; flex-direction: column; align-items: flex-start; gap: 2px; min-width: 0; }
.pf-ttl small { font-size: 13px; color: var(--texte-2); font-weight: 500; }
.pf-bascule { flex: none; font-size: 12.5px; font-weight: 700; color: var(--bleu); padding: 5px 10px; border-radius: 999px; border: 1px solid var(--bord-2); background: var(--surface); }
.sec-head:hover .pf-bascule { border-color: var(--bleu); }
.pf-sec .sec-head .chev { transform: rotate(0deg); }
.pf-sec.sec-open .sec-head .chev { transform: rotate(90deg); }
.pf-corps { padding: 18px; }
.pf-aide { margin: 0 0 14px; font-size: 14px; color: var(--texte-2); }
.pf-aide b { color: var(--texte); }
.pf-vide { margin: 0; padding: 18px; text-align: center; color: var(--texte-2); border: 1px dashed var(--bord-2); border-radius: var(--r-md); }
.pf-corps .err-box { padding: 12px 14px; border-radius: 10px; background: color-mix(in srgb, var(--danger) 14%, transparent); color: var(--texte); font-size: 14px; }

/* Mes informations */
.pf-info { display: grid; grid-template-columns: 220px minmax(0, 1fr); gap: 24px; align-items: start; }
.pf-photo { display: flex; flex-direction: column; align-items: center; gap: 12px; text-align: center; }
.pf-photo small { font-size: 12.5px; color: var(--texte-2); line-height: 1.4; }
.pf-avatar { width: 132px; height: 132px; border-radius: 50%; display: grid; place-items: center; overflow: hidden; font: 700 42px var(--f-titre); color: var(--sur-acc);
  background: linear-gradient(135deg, var(--acc-1), var(--acc-2)); box-shadow: 0 0 0 4px var(--surface-pleine), 0 0 0 6px color-mix(in srgb, var(--acc-1) 45%, transparent), 0 12px 30px var(--lueur); }
.pf-avatar img { width: 100%; height: 100%; object-fit: cover; }
.pf-photo-btn { cursor: pointer; position: relative; }
.pf-photo-btn:focus-within { outline: 3px solid var(--bleu); outline-offset: 2px; }
.pf-dl { margin: 0; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
.pf-dl div { padding: 12px 14px; border-radius: var(--r-md); background: var(--lecture); border: 1px solid var(--bord); min-width: 0; }
.pf-dl dt { font-size: 12px; font-weight: 700; letter-spacing: .04em; text-transform: uppercase; color: var(--texte-2); }
.pf-dl dd { margin: 3px 0 0; font-weight: 600; overflow-wrap: anywhere; }

/* Mes accès : onglets */
.pf-onglets { display: flex; gap: 4px; padding: 4px; border-radius: 14px; background: var(--lecture); border: 1px solid var(--bord); margin-bottom: 14px; width: fit-content; max-width: 100%; }
.pf-onglets button { display: flex; align-items: center; gap: 8px; min-height: 42px; padding: 0 16px; border: 0; border-radius: 11px; background: none; color: var(--texte-2); font: inherit; font-size: 14.5px; font-weight: 600; cursor: pointer; }
.pf-onglets button:hover { color: var(--texte); }
.pf-onglets button[aria-selected="true"] { background: var(--surface-pleine); color: var(--texte); box-shadow: 0 2px 10px rgba(0, 0, 0, .12), 0 0 0 1px var(--bord); }
.pf-onglets button[aria-selected="true"] svg { color: var(--bleu); }
.pf-tn { min-width: 22px; padding: 1px 7px; border-radius: 999px; font-size: 12px; background: var(--sel); color: var(--bleu); }
.pf-panneau:focus-visible { outline: 2px solid var(--bleu); outline-offset: 4px; border-radius: 8px; }
.pf-liste { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
.pf-liste a, .pf-li { display: flex; align-items: center; gap: 12px; padding: 12px 14px; border-radius: var(--r-md); background: var(--lecture); border: 1px solid var(--bord); color: var(--texte); height: 100%; }
.pf-liste a:hover { border-color: var(--bord-2); background: var(--hover); color: var(--texte); }
.pf-l-ic { flex: none; width: 40px; height: 40px; border-radius: 12px; display: grid; place-items: center; }
.pf-l-ic.sp { color: color-mix(in srgb, #038387 75%, var(--texte)); background: color-mix(in srgb, #038387 18%, transparent); }
.pf-l-ic.grp { color: color-mix(in srgb, #6264A7 70%, var(--texte)); background: color-mix(in srgb, #6264A7 20%, transparent); }
.pf-l-txt { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 2px; }
.pf-l-txt small { font-size: 12.5px; color: var(--texte-2); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.pf-ext { color: var(--bleu); font-weight: 700; }
.pf-tags { display: flex; flex-direction: column; align-items: flex-end; gap: 4px; flex: none; }
.pf-tag { font-size: 11px; font-weight: 700; padding: 2px 8px; border-radius: 999px; background: var(--sel); color: var(--bleu); white-space: nowrap; }
.pf-tag.pf-teams { background: color-mix(in srgb, #6264A7 20%, transparent); color: color-mix(in srgb, #6264A7 70%, var(--texte)); }
.pf-autoriser { display: flex; flex-direction: column; align-items: flex-start; gap: 10px; padding: 16px; border-radius: var(--r-md); border: 1px dashed var(--bord-2); }
.pf-autoriser p { margin: 0; }
.pf-autoriser small { color: var(--texte-2); }

/* Permissions sur les menus */
.pf-perms { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
.pf-perm { --c: #2FBF71; padding: 14px; border-radius: var(--r-md); background: var(--lecture); border: 1px solid var(--bord); border-left: 4px solid var(--c); }
.pf-perm.pf-partiel { --c: var(--laiton); } .pf-perm.pf-aucun { --c: var(--texte-2); }
.pf-perm-h { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.pf-niv { font-size: 11.5px; font-weight: 700; padding: 3px 9px; border-radius: 999px; white-space: nowrap; background: color-mix(in srgb, var(--c) 18%, transparent); color: color-mix(in srgb, var(--c) 60%, var(--texte)); }
.pf-perm > small { display: block; margin-top: 4px; font-size: 12.5px; color: var(--texte-2); }
.pf-tuiles { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 10px; }
.pf-tuiles span { font-size: 12px; padding: 3px 9px; border-radius: 8px; border: 1px solid var(--bord); background: var(--surface); }
.pf-tuiles .non { color: var(--texte-2); opacity: .75; }

@media (max-width: 760px) {
  .pf-info { grid-template-columns: 1fr; }
  .pf-dl, .pf-liste, .pf-perms { grid-template-columns: 1fr; }
  .pf-onglets { width: 100%; }
  .pf-onglets button { flex: 1; justify-content: center; padding: 0 8px; font-size: 13.5px; }
  .pf-corps { padding: 14px; }
  .pf-sec .sec-head { padding: 10px 12px; gap: 10px; }
  .pf-sec .sec-head > .pf-ic { display: none; }
  .pf-astuce { flex-wrap: wrap; }
  .page-head .sec-tools-r { margin-left: 0; }
}

/* =====================================================================
   NOTES DE VERSION
   ===================================================================== */
a.vn-neuf { position: relative; }
a.vn-neuf::after { content: ""; position: absolute; top: 4px; right: 4px; width: 9px; height: 9px; border-radius: 50%; background: var(--danger); box-shadow: 0 0 0 2px var(--surface-pleine); }
.pop-link.vn-neuf::after { top: 50%; right: 12px; transform: translateY(-50%); }
.vn-outils { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; justify-content: space-between; margin-bottom: 14px; }
.vn-chips { display: flex; flex-wrap: wrap; gap: 8px; }
.vn-chips .chip span { opacity: .7; margin-left: 4px; font-size: 12px; }
.vn-rech { display: flex; align-items: center; gap: 8px; min-height: 44px; padding: 0 14px; border-radius: var(--r-md); background: var(--champ); border: 1px solid var(--bord-2); color: var(--texte-2); flex: 0 1 340px; }
.vn-rech input { flex: 1; min-width: 0; border: 0; outline: 0; background: none; font: inherit; font-size: 14.5px; color: var(--texte); }
.vn-rech:focus-within { border-color: var(--bleu); box-shadow: 0 0 0 3px var(--lueur); }
.vn-table { width: 100%; border-collapse: collapse; font-size: 14.5px; }
.vn-table thead th { text-align: left; font-size: 12px; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; color: var(--texte-2); padding: 12px 16px; border-bottom: 1px solid var(--ligne); }
.vn-table thead th:first-child { width: 150px; } .vn-table thead th:nth-child(2) { width: 190px; }
.vn-table td { padding: 12px 16px; border-bottom: 1px solid var(--ligne); vertical-align: top; color: var(--texte); }
.vn-table tbody tr:not(.vn-grp):hover td { background: var(--hover); }
.vn-grp th { text-align: left; padding: 16px; background: var(--lecture); border-bottom: 1px solid var(--ligne); }
.vn-table tbody + tbody .vn-grp th { border-top: 1px solid var(--bord); }
.vn-grp th { font-weight: 400; text-transform: none; letter-spacing: normal; font-size: inherit; color: var(--texte); }
.vn-grp th, .vn-grp th > span { vertical-align: middle; }
.vn-v { display: inline-block; margin-right: 12px; padding: 4px 11px; border-radius: 999px; font: 700 13px var(--f-titre); background: var(--sel); color: var(--bleu); border: 1px solid var(--bord-2); }
.vn-v.vn-actu { background: linear-gradient(135deg, var(--acc-1), var(--acc-2)); color: var(--sur-acc); border-color: transparent; box-shadow: 0 4px 14px var(--lueur); }
.vn-titre { display: inline-flex; flex-direction: column; gap: 2px; }
.vn-titre strong { font-family: var(--f-titre); font-size: 16px; color: var(--texte); }
.vn-titre small { font-size: 12.5px; color: var(--texte-2); }
.vn-mod { font-weight: 600; }
.vn-type { --c: var(--acc-1); display: inline-block; font-size: 12px; font-weight: 700; padding: 3px 10px; border-radius: 999px; white-space: nowrap;
  background: color-mix(in srgb, var(--c) 16%, transparent); color: color-mix(in srgb, var(--c) 65%, var(--texte)); }
.vn-nouveau { --c: #2FBF71; } .vn-amelioration { --c: var(--acc-1); } .vn-reorganisation { --c: var(--laiton); } .vn-correctif { --c: var(--danger); }
@media (max-width: 700px) {
  .vn-rech { flex: 1 1 100%; }
  .vn-table thead { display: none; }
  .vn-table, .vn-table tbody, .vn-table tr, .vn-table td, .vn-table th { display: block; width: 100%; }
  .vn-grp th { display: flex; align-items: center; gap: 10px; }
  .vn-grp .vn-v { margin-right: 0; flex: none; }
  .vn-table tr:not(.vn-grp) { padding: 12px 16px; border-bottom: 1px solid var(--ligne); display: grid; grid-template-columns: auto 1fr; gap: 6px 10px; align-items: center; }
  .vn-table tr:not(.vn-grp) td { padding: 0; border: 0; }
  .vn-table tr:not(.vn-grp) td.vn-mod { font-size: 13px; color: var(--texte-2); }
  .vn-table tr:not(.vn-grp) td:last-child { grid-column: 1 / -1; }
}
.vn-genre { display: inline-block; margin-right: 12px; font-size: 11px; font-weight: 700; letter-spacing: .04em; text-transform: uppercase; color: var(--texte-2); }
.page-head p.vn-regle { margin-top: 8px; font-size: 13.5px; }
@media (max-width: 700px) { .vn-genre { display: none; } }

/* =====================================================================
   SUGGESTIONS (page Notes de version)
   ===================================================================== */
.vn-actions { align-self: flex-start; flex-wrap: wrap; }
.sg-donnees { display: flex; gap: 12px; align-items: flex-start; padding: 14px; border-radius: var(--r-md); border: 1px solid var(--bord-2); background: var(--lecture); cursor: pointer; }
.sg-donnees input { width: 20px; height: 20px; margin-top: 2px; flex: none; accent-color: var(--acc-2); }
.sg-donnees span { display: flex; flex-direction: column; gap: 4px; }
.sg-donnees small { color: var(--texte-2); font-size: 13px; font-weight: 400; }
.sg-lbl { font-size: 14px; font-weight: 600; }
.sg-statut { --c: var(--acc-1); display: inline-block; font-size: 12px; font-weight: 700; padding: 4px 11px; border-radius: 999px; white-space: nowrap;
  background: color-mix(in srgb, var(--c) 16%, transparent); color: color-mix(in srgb, var(--c) 65%, var(--texte)); border: 1px solid color-mix(in srgb, var(--c) 30%, transparent); }
.sg-proposee { --c: var(--acc-1); } .sg-en-attente { --c: var(--laiton); } .sg-acceptee { --c: #2FBF71; } .sg-refusee { --c: var(--danger); }
.sg-chips { margin-bottom: 14px; }
.sg-liste { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
.sg-carte { padding: 16px; display: flex; flex-direction: column; gap: 10px; }
.sg-h { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.sg-h small { margin-left: auto; color: var(--texte-2); font-size: 12.5px; }
.sg-don { font-size: 11.5px; font-weight: 700; padding: 3px 9px; border-radius: 999px; background: color-mix(in srgb, var(--danger) 14%, transparent); color: color-mix(in srgb, var(--danger) 70%, var(--texte)); }
.sg-desc { margin: 0; white-space: pre-wrap; overflow-wrap: anywhere; }
.sg-pied { display: flex; flex-direction: column; gap: 6px; font-size: 13.5px; color: var(--texte-2); padding-top: 10px; border-top: 1px solid var(--ligne); }
.sg-pied b { color: var(--texte); }
.sg-chg { display: flex; align-items: center; gap: 8px; font-weight: 600; color: var(--texte); }
.sg-chg .fld { min-height: 40px; max-width: 200px; }
@media (max-width: 760px) { .sg-liste { grid-template-columns: 1fr; } }

/* =====================================================================
   HISTORIQUE DES AUDITS
   ===================================================================== */
.ja-table { width: 100%; border-collapse: collapse; font-size: 14px; }
.ja-table thead th { text-align: left; font-size: 12px; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; color: var(--texte-2); padding: 12px 16px; border-bottom: 1px solid var(--ligne); }
.ja-table td { padding: 12px 16px; border-bottom: 1px solid var(--ligne); vertical-align: top; }
.ja-table tbody tr:hover td { background: var(--hover); }
.ja-table td strong { display: block; }
.ja-table td small { display: block; margin-top: 3px; color: var(--texte-2); font-size: 12.5px; }
.ja-table details { margin-top: 6px; font-size: 13px; }
.ja-table summary { cursor: pointer; color: var(--bleu); font-weight: 600; }
.ja-table details p { margin: 6px 0 0; color: var(--texte-2); white-space: pre-wrap; }
.ja-quand { white-space: nowrap; color: var(--texte-2); width: 170px; }
.ja-res { --c: var(--acc-1); display: inline-block; font-size: 12px; font-weight: 700; padding: 3px 10px; border-radius: 999px; white-space: nowrap;
  background: color-mix(in srgb, var(--c) 16%, transparent); color: color-mix(in srgb, var(--c) 65%, var(--texte)); }
.ja-succes { --c: #2FBF71; } .ja-echec { --c: var(--danger); } .ja-refuse { --c: var(--laiton); }
@media (max-width: 700px) {
  .ja-table thead { display: none; }
  .ja-table, .ja-table tbody, .ja-table tr, .ja-table td { display: block; width: 100%; }
  .ja-table tr { padding: 12px 16px; border-bottom: 1px solid var(--ligne); }
  .ja-table td { padding: 2px 0; border: 0; }
  .ja-quand { width: auto; font-size: 12.5px; }
}

/* Sous-sections de l’accueil (Infrastructure TI, Administration / Audit, Sources de données sous le Centre de services TI) */
.sous-secs { display: flex; flex-direction: column; gap: 10px; padding: 0 14px 14px; }
.sous-sec { margin: 0; border-radius: var(--r-lg); background: var(--lecture); box-shadow: none; }
.sous-sec .sec-head { min-height: 50px; }
.sous-sec .sec-head strong { font-size: 16px; }
.sous-sec .tiles { padding-top: 12px; }
@media (max-width: 620px) { .sous-secs { padding: 0 8px 10px; } }
.sec-open .sous-sec:not(.sec-open) > .sec-head .chev { transform: none; }
.sec-open .sous-sec:not(.sec-open) > .sec-head { background: transparent; border-bottom: 0; }
.sec-open .sous-sec:not(.sec-open) > .sec-head::before { opacity: .5; box-shadow: none; }

/* =====================================================================
   INCIDENTS : échanges avec le demandeur, Harvey dans le formulaire
   ===================================================================== */
.ech-badge { display: inline-block; margin-top: 5px; font-size: 11.5px; font-weight: 700; padding: 2px 9px; border-radius: 999px; }
.ech-rep { background: color-mix(in srgb, #2FBF71 18%, transparent); color: color-mix(in srgb, #2FBF71 65%, var(--texte)); }
.ech-att { background: color-mix(in srgb, var(--laiton) 22%, transparent); color: color-mix(in srgb, var(--laiton) 55%, var(--texte)); }
.log li.ech { border-radius: 14px; padding: 10px 12px; margin: 6px 0; border: 1px solid var(--bord); list-style: none; }
.log li.ech-ti { background: color-mix(in srgb, var(--acc-1) 10%, var(--surface-pleine)); margin-right: 18%; }
.log li.ech-dem { background: color-mix(in srgb, #2FBF71 10%, var(--surface-pleine)); margin-left: 18%; }
.log li.ech .meta { font-weight: 700; }
.hv-inc { max-width: 860px; padding: 20px clamp(16px, 3vw, 26px); margin-bottom: 6px; border-color: color-mix(in srgb, var(--acc-1) 35%, var(--bord));
  background: radial-gradient(420px 160px at 0% 0%, color-mix(in srgb, var(--acc-1) 14%, transparent), transparent 70%), var(--surface); }
.hi-tete { display: flex; gap: 14px; align-items: center; }
.hi-tete > img { flex: none; width: 64px; height: 64px; border-radius: 50%; object-fit: cover; }
.hi-tete h2 { margin: 0; font-size: 19px; }
.hi-tete p { margin: 3px 0 0; color: var(--texte-2); font-size: 14px; }
.hi-tete .btn { margin-left: auto; flex: none; }
.hi-fil { list-style: none; margin: 16px 0 0; padding: 0; display: flex; flex-direction: column; gap: 8px; max-height: 340px; overflow-y: auto; }
.hi-fil li { display: flex; gap: 8px; align-items: flex-end; max-width: 88%; }
.hi-fil li p { margin: 0; padding: 9px 13px; border-radius: 16px; font-size: 14.5px; line-height: 1.4; }
.hi-fil li img { width: 28px; height: 28px; border-radius: 50%; object-fit: cover; flex: none; }
.hi-h p { background: var(--surface-pleine); border: 1px solid var(--bord); border-bottom-left-radius: 4px; }
.hi-u { align-self: flex-end; }
.hi-u p { background: linear-gradient(135deg, var(--acc-1), var(--acc-2)); color: var(--sur-acc); border-bottom-right-radius: 4px; }
.hi-zone { margin-top: 14px; display: flex; flex-direction: column; gap: 10px; }
.hi-saisie { display: flex; flex-direction: column; gap: 10px; align-items: flex-end; }
.hi-saisie .fld { width: 100%; }
.hi-ligne { flex-direction: row; align-items: center; }
.hi-puces { display: flex; flex-wrap: wrap; gap: 8px; }
.hi-puces .chip.hi-sug { border-color: var(--bleu); box-shadow: 0 0 0 3px var(--lueur); font-weight: 700; }
.hi-recap { margin: 0; }
.hi-fini { display: flex; flex-direction: column; align-items: flex-start; gap: 12px; }
.hi-num { font: 700 30px var(--f-titre); letter-spacing: .02em; padding: 6px 18px; border-radius: var(--r-md); background: color-mix(in srgb, #2FBF71 16%, transparent); color: color-mix(in srgb, #2FBF71 60%, var(--texte)); }
.hi-ou { max-width: 860px; display: flex; align-items: center; gap: 12px; color: var(--texte-2); font-size: 13.5px; margin: 14px 0; }
.hi-ou::before, .hi-ou::after { content: ""; flex: 1; height: 1px; background: var(--bord-2); }
@media (max-width: 620px) { .hi-tete > img { width: 48px; height: 48px; } .hi-tete { flex-wrap: wrap; } .hi-tete .btn { margin-left: 0; } .hi-fil li { max-width: 100%; } }
/* Micro dans la boîte Harvey des incidents */
.hi-champ { position: relative; width: 100%; }
.hi-champ .fld { padding-right: 64px; }
.hi-champ .hv-mic { position: absolute; right: 10px; bottom: 10px; width: 46px; height: 46px; }
.hi-ecoute { align-self: flex-start; margin: 0; min-height: 0; font-size: 13.5px; font-weight: 600; color: var(--bleu); }

/* Bannière « nouvelle version disponible » */
.maj-dispo { position: sticky; top: 0; z-index: 60; display: flex; align-items: center; justify-content: center; gap: 14px; flex-wrap: wrap; padding: 10px 16px;
  background: linear-gradient(135deg, var(--acc-1), var(--acc-2)); color: var(--sur-acc); font-size: 14.5px; box-shadow: 0 6px 20px var(--lueur); }
.maj-dispo .btn-1 { background: var(--surface-pleine); color: var(--texte); box-shadow: none; }

/* Questions sur la paye */
.tag.pa-nouvelle { background: color-mix(in srgb, var(--laiton) 22%, transparent); color: color-mix(in srgb, var(--laiton) 55%, var(--texte)); }
.tag.pa-en-traitement { background: color-mix(in srgb, var(--acc-1) 16%, transparent); color: color-mix(in srgb, var(--acc-1) 65%, var(--texte)); }
.tag.pa-en-attente-de-l-employe { background: color-mix(in srgb, var(--danger) 14%, transparent); color: color-mix(in srgb, var(--danger) 65%, var(--texte)); }
.tag.pa-repondue { background: color-mix(in srgb, #2FBF71 18%, transparent); color: color-mix(in srgb, #2FBF71 65%, var(--texte)); }
.tag.pa-fermee { background: var(--sel); color: var(--texte-2); }
.pa-q { margin: 0 0 10px; white-space: pre-wrap; overflow-wrap: anywhere; }
/* Menu du profil : liens vers les sections, en retrait sous « Mon profil » */
.pop-link.pop-sous { padding-left: 26px; font-weight: 500; font-size: 13.5px; color: var(--texte-2); min-height: 36px; position: relative; }
.pop-link.pop-sous::before { content: ""; position: absolute; left: 13px; top: 50%; width: 5px; height: 5px; border-radius: 50%; background: var(--bleu); transform: translateY(-50%); }
.pf-sec { scroll-margin-top: 96px; }

/* =====================================================================
   MES SHAREPOINT
   ===================================================================== */
.ms-table { width: 100%; border-collapse: collapse; font-size: 14.5px; }
.ms-table thead th { text-align: left; font-size: 12px; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; color: var(--texte-2); padding: 12px 16px; border-bottom: 1px solid var(--ligne); }
.ms-table td { padding: 12px 16px; border-bottom: 1px solid var(--ligne); vertical-align: middle; }
.ms-table tbody tr:hover td { background: var(--hover); }
.ms-site { display: flex; align-items: center; gap: 10px; }
.ms-site .pf-l-ic { width: 34px; height: 34px; border-radius: 10px; }
.ms-desc { color: var(--texte-2); }
.ms-date { white-space: nowrap; color: var(--texte-2); }
.ms-lien { display: inline-flex; flex-direction: column; align-items: flex-start; gap: 1px; min-height: 0; padding: 6px 12px; }
.ms-url { font-size: 11.5px; font-weight: 500; color: var(--texte-2); max-width: 260px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
@media (max-width: 760px) {
  .ms-table thead { display: none; }
  .ms-table, .ms-table tbody, .ms-table tr, .ms-table td { display: block; width: 100%; }
  .ms-table tr { padding: 12px 16px; border-bottom: 1px solid var(--ligne); }
  .ms-table td { padding: 3px 0; border: 0; }
  .ms-table td[data-l="Modifié"]::before { content: "Modifié le "; }
  .ms-lien { margin-top: 6px; }
}

/* =====================================================================
   EN-TÊTE : contour animé des boutons (couleurs du thème)
   ===================================================================== */
@property --tour { syntax: "<angle>"; inherits: false; initial-value: 0deg; }
.top .hdr-btn {
  border: 1.5px solid transparent;
  background:
    linear-gradient(var(--surface-pleine), var(--surface-pleine)) padding-box,
    conic-gradient(from var(--tour), var(--acc-1), var(--acc-2), color-mix(in srgb, var(--acc-2) 15%, transparent) 35%, color-mix(in srgb, var(--acc-1) 15%, transparent) 65%, var(--acc-1)) border-box;
  animation: hdr-tour 7s linear infinite;
  transition: box-shadow .25s ease, transform .2s ease;
}
/* Chaque bouton démarre à un autre moment : la lumière semble glisser d’un bouton à l’autre */
.hdr-nav > :nth-child(2) .hdr-btn, .hdr-nav > .hdr-btn:nth-child(2) { animation-delay: -1.4s; }
.hdr-nav > :nth-child(3) .hdr-btn { animation-delay: -2.8s; }
.hdr-nav > :nth-child(4) .hdr-btn { animation-delay: -4.2s; }
.theme-wrap .hdr-btn { animation-delay: -5.6s; }
.top .hdr-btn:hover, .top .hdr-btn:focus-visible, .top .hdr-btn[aria-expanded="true"] {
  animation-duration: 2.2s;
  background:
    linear-gradient(var(--hover), var(--hover)) padding-box,
    linear-gradient(var(--surface-pleine), var(--surface-pleine)) padding-box,
    conic-gradient(from var(--tour), var(--acc-1), var(--acc-2), color-mix(in srgb, var(--acc-2) 30%, transparent) 35%, color-mix(in srgb, var(--acc-1) 30%, transparent) 65%, var(--acc-1)) border-box;
  box-shadow: 0 0 0 3px var(--lueur), 0 6px 18px var(--lueur);
  transform: translateY(-1px);
  border-color: transparent;
}
@keyframes hdr-tour { to { --tour: 360deg; } }
@media (prefers-reduced-motion: reduce) { .top .hdr-btn, .top .hdr-btn:hover { animation: none; transform: none; } }

/* ---------- Demandes et tâches (Embauche, Départ, Équipement, Achat) ---------- */
.tag.dt-a-faire, .tag.dt-d-en-attente, .tag.dt-d-en-approbation { background: color-mix(in srgb, var(--laiton) 22%, transparent); color: color-mix(in srgb, var(--laiton) 55%, var(--texte)); }
.tag.dt-en-cours, .tag.dt-d-en-traitement { background: color-mix(in srgb, var(--acc-1) 16%, transparent); color: color-mix(in srgb, var(--acc-1) 65%, var(--texte)); }
.tag.dt-en-attente, .tag.dt-d-refusee { background: color-mix(in srgb, var(--danger) 14%, transparent); color: color-mix(in srgb, var(--danger) 65%, var(--texte)); }
.tag.dt-terminee, .tag.dt-d-approuvee, .tag.dt-d-livree { background: color-mix(in srgb, #2FBF71 18%, transparent); color: color-mix(in srgb, #2FBF71 65%, var(--texte)); }
.tag.dt-annulee, .tag.dt-d-fermee { background: var(--sel); color: var(--texte-2); }
.dt-soeurs { margin: 0; padding: 0; list-style: none; display: flex; flex-direction: column; gap: 2px; }
.dt-soeurs li { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 2px 8px; border-radius: 10px; }
.dt-soeurs li.on { background: var(--sel); }
.dt-soeurs .num { font-weight: 600; }

/* ---------- Configuration des formulaires ---------- */
.cf-avis { margin: 0 0 16px; padding: 10px 14px; border-radius: var(--r-md, 12px); border: 1px dashed var(--bord-2); background: var(--lecture); font-size: 14px; color: var(--texte-2); }
.cf-avis strong { color: var(--texte); }
.cf-carte { margin-bottom: 18px; }
.cf-tete { display: flex; flex-wrap: wrap; gap: 10px; align-items: flex-end; justify-content: space-between; padding: 16px 18px 10px; }
.cf-tete h2 { margin: 0; font-size: 18px; }
.cf-tete p { margin: 4px 0 0; font-size: 14px; color: var(--texte-2); max-width: 70ch; }
.cf-table td { vertical-align: top; }
.cf-table .fld { min-height: 40px; padding: 6px 10px; font-size: 14px; }
.cf-table .cf-num { width: 84px; }
.cf-ico { min-width: 40px; padding: 0 8px; margin-right: 4px; }
.cf-coche { display: inline-flex; align-items: center; gap: 8px; font-size: 14px; font-weight: 600; cursor: pointer; }
.cf-coche input { width: 18px; height: 18px; accent-color: #135E96; margin: 0; }
.cf-actif { padding: 8px 14px; border: 1px solid var(--bord-2); border-radius: 12px; background: var(--champ); }
.cf-champs { margin: 0; padding: 0 18px 16px 36px; display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 6px 18px; font-size: 14px; }
.cf-pied { display: flex; flex-wrap: wrap; gap: 10px; justify-content: flex-end; margin: 4px 0 24px; }
.tag.dt-cf-actif { background: color-mix(in srgb, #2FBF71 18%, transparent); color: color-mix(in srgb, #2FBF71 65%, var(--texte)); }
.tag.dt-cf-inactif { background: var(--sel); color: var(--texte-2); }
.cf-pers { display: grid; gap: 6px; margin-top: 6px; }

/* Configuration des formulaires : sections repliables, champs et aperçu */
.cf-tete h2 { margin: 0; font-size: 18px; }
.cf-plier { display: inline-flex; align-items: center; gap: 10px; padding: 4px 0; min-height: 40px; border: none; background: none; color: var(--texte); font: inherit; font-weight: 700; cursor: pointer; text-align: left; }
.cf-plier small { font-size: 13px; font-weight: 600; color: var(--texte-2); }
.cf-plier:hover { color: var(--bleu); }
.cf-fleche { width: 10px; height: 10px; border-right: 2px solid currentColor; border-bottom: 2px solid currentColor; transform: rotate(45deg); margin: -4px 4px 0 2px; transition: transform .15s; }
.cf-plie .cf-fleche { transform: rotate(-45deg); margin-top: 0; }
.cf-plie .cf-tete { padding-bottom: 16px; }
.cf-corps { padding: 4px 18px 18px; display: flex; flex-direction: column; gap: 16px; }
.cf-etiq { font-size: 14px; font-weight: 600; }
.cf-outils { display: flex; gap: 8px; flex-wrap: wrap; }
.cf-sous-titre { margin: 8px 0 0; font-size: 14px; font-weight: 700; color: var(--texte-2); }
.cf-apercu { padding: 16px; border: 1px dashed var(--bord-2); border-radius: 12px; background: var(--lecture); display: flex; flex-direction: column; gap: 16px; }
@media (prefers-reduced-motion: reduce) { .cf-fleche { transition: none; } }

/* Gestion des menus : matrice des droits par profil */
.ga-table th[scope="row"] { text-align: left; font-weight: 600; min-width: 220px; }
.ga-table .ga-tuile { font-weight: 500; padding-left: 34px; }
.ga-table .ga-sec th, .ga-table .ga-sec td { background: var(--lecture); }
.ga-col { min-width: 120px; white-space: normal; }
.ga-c { min-width: 120px; }
.ga-d { min-height: 36px !important; padding: 4px 8px !important; font-size: 13px !important; }
.ga-d.ga-lecture { background: color-mix(in srgb, var(--acc-1) 14%, var(--champ)); }
.ga-d.ga-ecriture { background: color-mix(in srgb, #2FBF71 18%, var(--champ)); }
.ga-d.ga-aucun { color: var(--texte-2); }
.ga-regle { display: grid; grid-template-columns: minmax(200px, 1fr) minmax(180px, 1fr) auto; gap: 8px; margin-top: 8px; align-items: center; }
.ga-visibles { display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); gap: 12px; }
@media (max-width: 640px) { .ga-regle { grid-template-columns: 1fr auto; } .ga-regle > :nth-child(4) { grid-column: 1; } }
.ga-table tbody th { text-transform: none; letter-spacing: normal; font-size: 14px; color: var(--texte); vertical-align: middle; }
.ga-table tbody th .sub { font-weight: 400; }
.ga-dep { min-width: 360px; }
.ga-deps { border: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: 6px 14px; }
.ga-deps .cf-coche { font-weight: 500; }
.ga-gere { margin-top: 8px; padding-top: 8px; border-top: 1px dashed var(--bord-2); }
.ga-gere legend { float: left; margin-right: 6px; font-size: 13px; font-weight: 700; }
.ga-appliquer { padding: 14px 18px; margin-bottom: 18px; border-left: 4px solid var(--bord-2); }
.ga-appliquer.on { border-left-color: #2FBF71; }
.ga-appliquer p { margin: 6px 0 0; font-size: 14px; color: var(--texte-2); }
