/* Citadel — gestionnaire d'entreprise en ligne de Sébastien David
   Identité : couleurs du logo « Sebastien DAVID » (jaune, orange, bleu-vert, noir).
   Les noms de variables viennent d'Citadel (--vf, --vert, --vc…) : ne pas les renommer,
   seule leur valeur change. Ne jamais coder une couleur en dur ailleurs. */

:root {
  /* Palette Citadel (logo) */
  --vf: #1f3f47;          /* bleu-vert foncé (couleur principale, menu) */
  --vert: #568a97;        /* bleu-vert du logo */
  --vc: #a9c7ce;          /* bleu-vert clair */
  --jaune: #fcd757;       /* jaune du logo (accent) */
  --orange: #cd6120;      /* orange du logo */
  --dore: #f0b54a;        /* jaune orangé, entre les deux */
  --noir: #262626;        /* noir du logo */

  /* Neutres dérivés */
  --bg: #f6f5f1;
  --surface: #ffffff;
  --surface-2: #faf9f6;
  --line: #e4e2db;
  --line-2: #d3d0c6;
  --ink: #262626;
  --ink-2: #4f5254;
  --ink-3: #7d8083;
  --cream: #f6f2e3;

  /* Sémantique */
  --red: #b3402a;
  --red-bg: #f6d3cb;
  --orange-bg: #fde5b5;
  --orange-ink: #7a4a00;
  --green-bg: #e3edc0;
  --green-ink: #2f4a14;

  --r: 14px;
  --r-sm: 9px;
  --shadow: 0 1px 2px rgba(31, 63, 71, .06), 0 4px 14px rgba(31, 63, 71, .05);
  --shadow-lg: 0 10px 40px rgba(31, 63, 71, .18);
  --sidebar-w: 252px;
  --topbar-h: 64px;

  --font-title: "Outfit", "Avenir Next", "Segoe UI", system-ui, sans-serif;
  --font-body: "Figtree", "Avenir Next", "Segoe UI", system-ui, sans-serif;
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  font-family: var(--font-body);
  font-size: 15px;
  line-height: 1.5;
  color: var(--ink);
  background: var(--bg);
}
h1, h2, h3, h4 { font-family: var(--font-title); font-weight: 600; margin: 0; line-height: 1.2; letter-spacing: -.01em; }
p { margin: 0; }
a { color: inherit; }
button, input, select, textarea { font: inherit; color: inherit; }
button { cursor: pointer; }
img { max-width: 100%; display: block; }
:focus-visible { outline: 3px solid var(--vert); outline-offset: 2px; border-radius: 6px; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.muted { color: var(--ink-3); }
.small { font-size: 13px; }
.xs { font-size: 12px; }
.right { margin-left: auto; }
.nowrap { white-space: nowrap; }
.ico { width: 1.2em; height: 1.2em; flex: none; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }

/* ───────── Coque de l'application ───────── */
.app { display: grid; grid-template-columns: var(--sidebar-w) minmax(0, 1fr); min-height: 100vh; }
.sidebar {
  position: sticky; top: 0; height: 100vh; overflow: hidden;
  background: var(--vf); color: var(--cream);
  display: flex; flex-direction: column;
  z-index: 40;
}
.brand { padding: 22px 22px 14px; display: flex; flex-direction: column; gap: 10px; align-items: flex-start; text-decoration: none; }
.brand img { width: 132px; }
.brand-tag { font-family: var(--font-title); font-size: 13px; letter-spacing: .14em; text-transform: uppercase; color: var(--vc); }
.brand-tag b { color: var(--jaune); font-weight: 600; }
.nav { padding: 6px 12px 12px; overflow-y: auto; flex: 1; position: relative; z-index: 2; }
.nav-label { font-size: 11px; letter-spacing: .12em; text-transform: uppercase; color: rgba(169, 199, 206, .62); padding: 16px 12px 6px; font-weight: 600; }
.nav a {
  display: flex; align-items: center; gap: 12px;
  padding: 9px 12px; border-radius: 10px;
  text-decoration: none; color: rgba(246, 242, 227, .86);
  font-weight: 500; position: relative;
}
.nav a:hover { background: rgba(255, 255, 255, .07); color: #fff; }
.nav a[aria-current="page"] { background: rgba(255, 255, 255, .12); color: #fff; }
.nav a[aria-current="page"]::before { content: ""; position: absolute; left: -12px; top: 8px; bottom: 8px; width: 4px; border-radius: 0 4px 4px 0; background: var(--jaune); }
.nav .count { margin-left: auto; font-size: 12px; background: var(--jaune); color: var(--vf); border-radius: 999px; padding: 0 7px; font-weight: 700; }
.sidebar-waves { display: none; position: absolute; left: 0; right: 0; bottom: 0; height: 190px; opacity: .95; pointer-events: none; z-index: 1; }
.sidebar-user { position: relative; z-index: 2; margin: 0 12px 14px; padding: 8px 10px; border-radius: 12px; background: rgba(31, 63, 71, .82); backdrop-filter: blur(6px); display: flex; align-items: center; gap: 10px; border: 0; color: inherit; text-align: left; width: calc(100% - 24px); }
.sidebar-user:hover { background: rgba(31, 63, 71, .95); }
.sidebar-user .who { line-height: 1.2; min-width: 0; }
.sidebar-user .who b { display: block; font-weight: 600; }
.sidebar-user .who span { font-size: 12px; color: var(--vc); }

.main-col { min-width: 0; display: flex; flex-direction: column; }
.topbar {
  position: sticky; top: 0; z-index: 30; height: var(--topbar-h);
  background: rgba(246, 245, 241, .88); backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--line);
  display: flex; align-items: center; gap: 12px; padding: 0 28px;
}
.menu-btn { display: none; }
.searchbtn {
  flex: 1; max-width: 520px; display: flex; align-items: center; gap: 10px;
  background: var(--surface); border: 1px solid var(--line-2); border-radius: 999px;
  padding: 9px 16px; color: var(--ink-3); text-align: left;
}
.searchbtn:hover { border-color: var(--vert); }
.searchbtn kbd { margin-left: auto; font: 600 11px var(--font-body); background: var(--bg); border: 1px solid var(--line); border-radius: 6px; padding: 1px 6px; color: var(--ink-3); }
.topbar-actions { margin-left: auto; display: flex; align-items: center; gap: 10px; }
.iconbtn { position: relative; width: 40px; height: 40px; border-radius: 50%; display: grid; place-items: center; background: transparent; border: 0; color: var(--ink-2); }
.iconbtn:hover { background: rgba(31, 63, 71, .07); }
.iconbtn .dot { position: absolute; top: 5px; right: 4px; min-width: 18px; height: 18px; padding: 0 5px; border-radius: 999px; background: var(--red); color: #fff; font-size: 11px; font-weight: 700; display: grid; place-items: center; }

.main { padding: 28px; width: 100%; max-width: 1480px; margin: 0 auto; flex: 1; }
.page-head { display: flex; align-items: flex-end; gap: 16px; flex-wrap: wrap; margin-bottom: 22px; }
.page-head h1 { font-size: 30px; }
.page-head .sub { color: var(--ink-3); margin-top: 4px; }
.page-head .actions { margin-left: auto; display: flex; gap: 10px; flex-wrap: wrap; align-items: center; }
.crumbs { font-size: 13px; color: var(--ink-3); margin-bottom: 8px; display: flex; gap: 6px; align-items: center; flex-wrap: wrap; }
.crumbs a { text-decoration: none; }
.crumbs a:hover { text-decoration: underline; color: var(--vf); }

/* ───────── Boutons & champs ───────── */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  padding: 9px 16px; border-radius: 999px; border: 1px solid var(--line-2);
  background: var(--surface); color: var(--ink); font-weight: 600; text-decoration: none; white-space: nowrap;
  transition: background .12s, border-color .12s, transform .05s;
}
.btn:hover { border-color: var(--vf); }
.btn:active { transform: translateY(1px); }
.btn.primary { background: var(--vf); border-color: var(--vf); color: var(--cream); }
.btn.primary:hover { background: #2a5662; }
.btn.accent { background: var(--jaune); border-color: var(--jaune); color: var(--vf); }
.btn.accent:hover { background: #fde38c; border-color: #fde38c; }
.btn.ghost { background: transparent; border-color: transparent; color: var(--ink-2); }
.btn.ghost:hover { background: rgba(31, 63, 71, .07); }
.btn.danger { color: var(--red); }
.btn.sm { padding: 5px 12px; font-size: 13px; }
.btn.block { width: 100%; }
.btn[disabled] { opacity: .5; cursor: not-allowed; }

.field { display: flex; flex-direction: column; gap: 6px; margin-bottom: 14px; }
.field > label { font-size: 13px; font-weight: 600; color: var(--ink-2); }
.input, .select, .textarea {
  width: 100%; padding: 9px 12px; border-radius: 10px; border: 1px solid var(--line-2); background: #fff;
}
.textarea { min-height: 90px; resize: vertical; }
.input:focus, .select:focus, .textarea:focus { outline: 3px solid rgba(86, 138, 151, .45); border-color: var(--vert); }
.select { appearance: none; padding-right: 32px; background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' fill='none' stroke='%237b8378' stroke-width='2' stroke-linecap='round'%3E%3Cpath d='m1 1.5 5 5 5-5'/%3E%3C/svg%3E"); background-repeat: no-repeat; background-position: right 12px center; }
.row2 { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.filters { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; margin-bottom: 16px; }
.filters .select, .filters .input { width: auto; min-width: 140px; padding: 7px 12px; }
.filters .input.search { min-width: 220px; }
.chip {
  display: inline-flex; align-items: center; gap: 6px; padding: 5px 12px; border-radius: 999px;
  background: var(--surface); border: 1px solid var(--line-2); font-size: 13px; font-weight: 600; color: var(--ink-2);
}
.chip:hover { border-color: var(--vf); }
.chip[aria-pressed="true"] { background: var(--vf); border-color: var(--vf); color: var(--cream); }
.chip .n { font-size: 11px; background: var(--jaune); color: var(--vf); border-radius: 999px; padding: 0 6px; }

.seg { display: inline-flex; background: #ebe8d6; border-radius: 999px; padding: 3px; gap: 2px; flex-wrap: wrap; }
.seg button { border: 0; background: transparent; padding: 6px 14px; border-radius: 999px; font-weight: 600; font-size: 13px; color: var(--ink-2); display: inline-flex; gap: 6px; align-items: center; }
.seg button[aria-pressed="true"] { background: var(--vf); color: var(--cream); }
.seg button:not([aria-pressed="true"]):hover { background: rgba(31, 63, 71, .08); }

/* ───────── Cartes, badges ───────── */
.card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--r); box-shadow: var(--shadow); }
.card-pad { padding: 20px; }
.card-head { display: flex; align-items: center; gap: 10px; padding: 16px 20px 0; }
.card-head h2, .card-head h3 { font-size: 17px; }
.card-head .more { margin-left: auto; font-size: 13px; font-weight: 600; color: var(--vf); text-decoration: none; }
.card-head .more:hover { text-decoration: underline; }
.card-body { padding: 14px 20px 18px; }
.grid { display: grid; gap: 18px; }
.cols-2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.cols-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.cols-4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.dash-grid { grid-template-columns: minmax(0, 1.6fr) minmax(0, 1fr); align-items: start; }
.main-aside { grid-template-columns: minmax(0, 1.5fr) minmax(0, 1fr); align-items: start; }
.stack { display: flex; flex-direction: column; gap: 18px; }
.hstack { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }

.badge { display: inline-flex; align-items: center; gap: 6px; padding: 2px 10px; border-radius: 999px; font-size: 12px; font-weight: 600; white-space: nowrap; background: #efede2; color: #4a5149; }
.badge::before { content: ""; width: 7px; height: 7px; border-radius: 50%; background: currentColor; opacity: .75; }
.badge.nodot::before { display: none; }
.badge.green { background: var(--green-bg); color: var(--green-ink); }
.badge.orange { background: var(--orange-bg); color: var(--orange-ink); }
.badge.red { background: var(--red-bg); color: #8c2a17; }
.badge.dark { background: var(--vf); color: var(--cream); }
.badge.yellow { background: #fff3a0; color: #5c4b00; }
.badge.muted { background: #f3f1e8; color: var(--ink-3); }
.tag { display: inline-block; padding: 1px 9px; border-radius: 6px; background: #efede2; color: var(--ink-2); font-size: 12px; font-weight: 500; }
.tags { display: flex; flex-wrap: wrap; gap: 6px; }

.avatar { width: 30px; height: 30px; border-radius: 50%; display: inline-grid; place-items: center; font: 600 13px var(--font-title); color: var(--vf); flex: none; border: 2px solid #fff; }
.avatar { overflow: hidden; }
.avatar img { width: 100%; height: 100%; object-fit: cover; display: block; }
.avatar.sm { width: 24px; height: 24px; font-size: 11px; border-width: 1.5px; }
.avatar.lg { width: 44px; height: 44px; font-size: 18px; }
.avatar-stack { display: inline-flex; }
.avatar-stack .avatar + .avatar { margin-left: -8px; }
.avatar-stack .more { background: #efede2; font-size: 11px; }

.progress { height: 8px; border-radius: 999px; background: #ebe8d6; overflow: hidden; }
.progress > i { display: block; height: 100%; border-radius: 999px; background: linear-gradient(90deg, var(--vert), var(--vc) 60%, var(--jaune)); }
.progress.warn > i { background: linear-gradient(90deg, var(--dore), var(--orange)); }

.empty { text-align: center; padding: 44px 20px; color: var(--ink-3); }
.empty b { display: block; font-family: var(--font-title); font-size: 18px; color: var(--ink-2); margin-bottom: 6px; }
.due-late { color: var(--red); font-weight: 700; }
.due-soon { color: var(--orange-ink); font-weight: 600; }
.divider { height: 1px; background: var(--line); margin: 14px 0; border: 0; }

/* ───────── Tableaux ───────── */
.table-wrap { overflow-x: auto; }
table.t { width: 100%; border-collapse: collapse; }
.t th { text-align: left; font-size: 11px; letter-spacing: .08em; text-transform: uppercase; color: var(--ink-3); font-weight: 700; padding: 10px 14px; border-bottom: 1px solid var(--line); background: var(--surface-2); white-space: nowrap; }
.t td { padding: 11px 14px; border-bottom: 1px solid var(--line); vertical-align: middle; }
.t tbody tr { cursor: pointer; }
.t tbody tr:hover { background: var(--surface-2); }
.t tbody tr:last-child td { border-bottom: 0; }
.t .title { font-weight: 600; }
.t .ctx { font-size: 12.5px; color: var(--ink-3); }
.check { width: 20px; height: 20px; border-radius: 6px; border: 2px solid var(--line-2); display: inline-grid; place-items: center; background: #fff; padding: 0; color: transparent; flex: none; }
.check:hover { border-color: var(--vert); }
.check.on { background: var(--vf); border-color: var(--vf); color: var(--jaune); }
.check .ico { width: 13px; height: 13px; stroke-width: 3; }
tr.done .title { text-decoration: line-through; color: var(--ink-3); }

/* ───────── Tableau de bord ───────── */
.hero {
  position: relative; overflow: hidden; border-radius: 20px; padding: 28px 32px; margin-bottom: 20px;
  background: var(--cream); border: 1px solid var(--line);
  display: flex; align-items: center; gap: 24px; min-height: 190px;
}
.hero svg.waves { display: none; }
/* Bandeau diagonal aux quatre couleurs du logo */
.hero::after { content: ""; position: absolute; left: 0; right: 0; bottom: 0; height: 8px; background: linear-gradient(135deg, var(--jaune) 0 25%, var(--orange) 25% 50%, var(--vert) 50% 75%, var(--noir) 75%); }
.hero > * { position: relative; }
.hero h1 { font-size: 34px; color: var(--vf); }
.hero .eyebrow { font-family: var(--font-title); letter-spacing: .14em; text-transform: uppercase; font-size: 12px; color: var(--vf); font-weight: 600; opacity: .8; margin-bottom: 6px; }
.hero .hello { flex: 1; }
.hero .hello p { color: var(--vf); margin-top: 6px; max-width: 46ch; }
.countdown { background: rgba(255, 255, 255, .82); border-radius: 18px; padding: 14px 22px; text-align: center; backdrop-filter: blur(6px); box-shadow: var(--shadow); }
.countdown .j { font: 700 46px/1 var(--font-title); color: var(--vf); }
.countdown .j small { font-size: 22px; margin-right: 2px; }
.countdown .l { font-size: 12px; margin-top: 4px; color: var(--ink-2); font-weight: 600; letter-spacing: .04em; }
.hero-logo { width: 150px; }
.prio-tiles { display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; }
.prio-tile { border: 1px solid var(--line); border-radius: 12px; padding: 14px 16px; background: var(--surface-2); text-align: left; display: block; text-decoration: none; }
.prio-tile:hover { border-color: var(--vf); background: #fff; }
.prio-tile .n { font: 700 32px/1 var(--font-title); }
.prio-tile .l { font-size: 13px; color: var(--ink-2); margin-top: 4px; font-weight: 600; }
.prio-tile.red .n { color: var(--red); }
.prio-tile.orange .n { color: #b97600; }
.prio-tile.green .n { color: #5c7a1e; }
.list { display: flex; flex-direction: column; }
.list-item { display: flex; align-items: center; gap: 12px; padding: 10px 0; border-bottom: 1px solid var(--line); text-align: left; background: none; border-left: 0; border-right: 0; border-top: 0; width: 100%; }
.list-item:last-child { border-bottom: 0; }
button.list-item:hover, a.list-item:hover { background: var(--surface-2); }
.list-item .grow { flex: 1; min-width: 0; }
.list-item .t1 { font-weight: 600; overflow: hidden; text-overflow: ellipsis; }
.list-item .t2 { font-size: 12.5px; color: var(--ink-3); }
a.list-item { text-decoration: none; }
.datechip { width: 50px; text-align: center; border-radius: 10px; background: var(--vf); color: var(--cream); padding: 5px 0; flex: none; font-family: var(--font-title); line-height: 1.05; }
.datechip b { display: block; font-size: 20px; font-weight: 600; }
.datechip span { font-size: 11px; text-transform: uppercase; letter-spacing: .08em; color: var(--vc); }
.datechip.alt { background: var(--dore); color: var(--vf); }
.datechip.alt span { color: var(--vf); opacity: .75; }
.camp-row { display: block; padding: 10px 0; text-decoration: none; }
.camp-row .top { display: flex; justify-content: space-between; font-weight: 600; margin-bottom: 6px; }
.activity { display: flex; gap: 10px; padding: 9px 0; font-size: 14px; }
.activity .dotl { width: 8px; height: 8px; border-radius: 50%; background: var(--vert); margin-top: 7px; flex: none; }

/* ───────── Campagnes ───────── */
.camp-card { display: flex; flex-direction: column; overflow: hidden; text-decoration: none; transition: transform .12s, box-shadow .12s; }
.camp-card:hover { transform: translateY(-2px); box-shadow: var(--shadow-lg); }
.camp-art { height: 82px; position: relative; overflow: hidden; }
.camp-art svg { position: absolute; inset: 0; width: 100%; height: 100%; }
.camp-art .badge { position: absolute; top: 12px; left: 14px; background: rgba(255, 255, 255, .9); }
.camp-body { padding: 16px 18px 18px; display: flex; flex-direction: column; gap: 12px; flex: 1; }
.camp-body h3 { font-size: 19px; }
.camp-meta { display: flex; justify-content: space-between; align-items: center; color: var(--ink-3); font-size: 13px; }
.kpi-line { display: flex; justify-content: space-between; font-size: 13px; color: var(--ink-2); margin-bottom: 5px; font-weight: 600; }
.detail-hero { position: relative; overflow: hidden; border-radius: 20px; padding: 26px 30px; margin-bottom: 18px; min-height: 150px; }
.detail-hero svg.waves { position: absolute; inset: 0; width: 100%; height: 100%; }
.detail-hero > div { position: relative; }
.detail-hero h1 { font-size: 30px; color: var(--vf); }
.facts { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 14px; margin-top: 16px; }
.fact { background: rgba(255, 255, 255, .78); border-radius: 12px; padding: 10px 14px; backdrop-filter: blur(4px); }
.fact .k { font-size: 11px; letter-spacing: .08em; text-transform: uppercase; color: var(--ink-3); font-weight: 700; }
.fact .v { font-weight: 600; margin-top: 2px; font-size: 15px; }
.tabs { display: flex; gap: 4px; border-bottom: 1px solid var(--line-2); margin-bottom: 20px; overflow-x: auto; }
.tabs button { border: 0; background: none; padding: 10px 16px; font-weight: 600; color: var(--ink-3); border-bottom: 3px solid transparent; margin-bottom: -1px; white-space: nowrap; }
.tabs button:hover { color: var(--vf); }
.tabs button[aria-selected="true"] { color: var(--vf); border-bottom-color: var(--vert); }
.kv { display: grid; grid-template-columns: 150px 1fr; gap: 10px 16px; }
.kv dt { color: var(--ink-3); font-size: 13px; font-weight: 600; padding-top: 2px; }
.kv dd { margin: 0; }
.msg { padding: 8px 14px; border-left: 4px solid var(--vert); background: var(--surface-2); border-radius: 0 10px 10px 0; font-weight: 500; }
.check-list { list-style: none; padding: 0; margin: 0; display: flex; flex-direction: column; gap: 8px; }
.check-list li { display: flex; gap: 10px; align-items: flex-start; }
.check-list .ok { color: #4f7a17; }
.check-list .warn { color: #b97600; }

/* ───────── Kanban ───────── */
.kanban { display: grid; grid-auto-flow: column; grid-auto-columns: minmax(270px, 1fr); gap: 14px; overflow-x: auto; padding-bottom: 12px; align-items: start; }
.kcol { background: #efecdc; border-radius: 14px; padding: 10px; min-height: 160px; }
.kcol.over { outline: 3px dashed var(--vert); background: #e8ecd2; }
.kcol-head { display: flex; align-items: center; gap: 8px; padding: 4px 6px 10px; font-weight: 700; font-family: var(--font-title); }
.kcol-head .n { font: 600 12px var(--font-body); background: #fff; border-radius: 999px; padding: 0 8px; color: var(--ink-2); }
.kcard { background: #fff; border: 1px solid var(--line); border-radius: 12px; padding: 12px; margin-bottom: 10px; cursor: grab; box-shadow: 0 1px 2px rgba(31, 63, 71, .05); display: block; width: 100%; text-align: left; }
.kcard:hover { border-color: var(--vert); box-shadow: var(--shadow); }
.kcard.dragging { opacity: .4; }
.kcard .ct { font-weight: 600; margin-bottom: 8px; display: block; }
.kcard .cm { display: flex; align-items: center; gap: 8px; margin-top: 10px; font-size: 12.5px; color: var(--ink-3); flex-wrap: wrap; }
.kcard .cx { font-size: 12px; color: var(--ink-3); margin-bottom: 6px; }
.thumb-mini { height: 54px; border-radius: 8px; margin-bottom: 10px; overflow: hidden; position: relative; }
.thumb-mini svg { position: absolute; inset: 0; width: 100%; height: 100%; }

/* ───────── Calendrier ───────── */
.cal-head { display: flex; align-items: center; gap: 10px; margin-bottom: 14px; flex-wrap: wrap; }
.cal-head h2 { font-size: 22px; text-transform: capitalize; min-width: 180px; }
.cal { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); border: 1px solid var(--line); border-radius: var(--r); overflow: hidden; background: #fff; }
.cal-dow { padding: 8px 10px; font-size: 11px; letter-spacing: .08em; text-transform: uppercase; font-weight: 700; color: var(--ink-3); background: var(--surface-2); border-bottom: 1px solid var(--line); }
.cal-day { min-height: 118px; border-right: 1px solid var(--line); border-bottom: 1px solid var(--line); padding: 6px; display: flex; flex-direction: column; gap: 3px; min-width: 0; }
.cal-day:nth-child(7n) { border-right: 0; }
.cal-day.out { background: #fbfaf4; }
.cal-day.out .dn { color: #b4b8ad; }
.cal-day.today { background: #fffbd0; }
.cal-day .dn { font-size: 13px; font-weight: 700; color: var(--ink-2); padding: 0 3px; }
.cal-day.today .dn { background: var(--vf); color: var(--jaune); border-radius: 999px; width: 24px; height: 24px; display: grid; place-items: center; padding: 0; }
.cal.week .cal-day { min-height: 340px; }
.cal-item { display: flex; align-items: center; gap: 5px; border: 0; width: 100%; text-align: left; padding: 2px 6px; border-radius: 6px; font-size: 12px; font-weight: 600; line-height: 1.35; border-left: 3px solid var(--c, var(--vert)); background: color-mix(in srgb, var(--c, var(--vert)) 20%, white); color: var(--ink); overflow: hidden; white-space: nowrap; text-overflow: ellipsis; display: block; }
.cal-item:hover { background: color-mix(in srgb, var(--c, var(--vert)) 38%, white); }
.cal-more { font-size: 12px; color: var(--ink-3); font-weight: 600; background: none; border: 0; text-align: left; padding: 0 6px; }
.legend { display: flex; gap: 14px; flex-wrap: wrap; font-size: 13px; color: var(--ink-2); }
.legend i { display: inline-block; width: 10px; height: 10px; border-radius: 3px; margin-right: 6px; background: var(--c); }
.agenda-day { display: grid; grid-template-columns: 110px 1fr; gap: 16px; padding: 14px 0; border-bottom: 1px solid var(--line); }
.agenda-day:last-child { border-bottom: 0; }
.agenda-day .dl { font-family: var(--font-title); font-weight: 600; }
.agenda-day .dl small { display: block; color: var(--ink-3); font-family: var(--font-body); font-weight: 500; }
.agenda-day.today .dl { color: var(--vf); }
.agenda-day .items { display: flex; flex-direction: column; gap: 6px; }
.agenda-item { display: flex; align-items: center; gap: 12px; padding: 8px 12px; border-radius: 10px; background: color-mix(in srgb, var(--c) 14%, white); border-left: 4px solid var(--c); border-top: 0; border-right: 0; border-bottom: 0; text-align: left; width: 100%; }
.agenda-item:hover { background: color-mix(in srgb, var(--c) 28%, white); }
.agenda-item .kind { font-size: 11px; text-transform: uppercase; letter-spacing: .08em; font-weight: 700; color: var(--ink-2); width: 92px; flex: none; }

/* ───────── Chronologie ───────── */
.tl { overflow-x: auto; background: #fff; border: 1px solid var(--line); border-radius: var(--r); }
.tl-inner { min-width: 900px; position: relative; }
.tl-head { display: grid; grid-template-columns: 240px 1fr; background: var(--surface-2); border-bottom: 1px solid var(--line); position: sticky; top: 0; }
.tl-months { display: grid; }
.tl-months span { font-size: 12px; font-weight: 700; text-transform: capitalize; padding: 9px 8px; color: var(--ink-3); border-left: 1px solid var(--line); }
.tl-row { display: grid; grid-template-columns: 240px 1fr; border-bottom: 1px solid var(--line); min-height: 44px; }
.tl-row:last-child { border-bottom: 0; }
.tl-label { padding: 10px 14px; font-weight: 600; font-size: 14px; border-right: 1px solid var(--line); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.tl-label.group { background: var(--surface-2); font-family: var(--font-title); }
.tl-track { position: relative; overflow: hidden; }
.tl-bar { position: absolute; top: 9px; height: 26px; border-radius: 8px; padding: 0 10px; font-size: 12px; font-weight: 600; display: flex; align-items: center; overflow: visible; white-space: nowrap; border: 0; color: var(--vf); }
.tl-today { position: absolute; top: 0; bottom: 0; width: 2px; background: var(--red); z-index: 2; }

/* ───────── Médias ───────── */
.split { display: grid; grid-template-columns: 230px minmax(0, 1fr); gap: 20px; align-items: start; }
.tree { padding: 10px; position: sticky; top: calc(var(--topbar-h) + 16px); }
.tree button, .tree a { display: flex; align-items: center; gap: 10px; width: 100%; text-align: left; border: 0; background: none; padding: 8px 10px; border-radius: 9px; font-weight: 500; text-decoration: none; color: var(--ink-2); }
.tree button:hover, .tree a:hover { background: #f1efe3; }
.tree button[aria-current="true"], .tree a[aria-current="page"] { background: var(--vf); color: var(--cream); }
.tree .n { margin-left: auto; font-size: 12px; opacity: .7; }
.media-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(190px, 1fr)); gap: 14px; }
.media-tile { padding: 0; overflow: hidden; text-align: left; display: block; width: 100%; cursor: pointer; }
.media-tile:hover { border-color: var(--vert); box-shadow: var(--shadow-lg); }
.media-thumb { height: 118px; position: relative; overflow: hidden; display: grid; place-items: center; }
.media-thumb svg.bg { position: absolute; inset: 0; width: 100%; height: 100%; }
.media-thumb .ext { position: relative; font: 700 13px var(--font-title); letter-spacing: .1em; background: rgba(255, 255, 255, .88); color: var(--vf); padding: 4px 10px; border-radius: 999px; }
.media-thumb.logo { background: #fff; }
.media-thumb.logo img { position: relative; width: 70%; }
.media-info { padding: 10px 12px 12px; }
.media-info .nm { font-weight: 600; font-size: 14px; display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.media-info .mt { font-size: 12px; color: var(--ink-3); margin-top: 3px; }

/* ───────── Wiki ───────── */
.wiki-tree a .ei { width: 22px; text-align: center; }
.wiki-tree .child { padding-left: 22px; }
.doc { padding: 34px 44px 44px; max-width: 880px; }
.doc .doc-title { font-size: 34px; display: flex; gap: 12px; align-items: center; margin-bottom: 6px; }
.doc .doc-meta { color: var(--ink-3); font-size: 13px; margin-bottom: 26px; }
.doc h2 { font-size: 23px; margin: 28px 0 10px; }
.doc h3 { font-size: 18px; margin: 20px 0 8px; }
.doc p { margin: 10px 0; }
.doc ul, .doc ol { margin: 10px 0; padding-left: 22px; }
.doc li { margin: 4px 0; }
.doc blockquote { margin: 14px 0; padding: 8px 18px; border-left: 4px solid var(--dore); font-family: var(--font-title); font-size: 18px; color: var(--vf); }
.callout { display: flex; gap: 12px; padding: 14px 16px; border-radius: 12px; background: #ebf3f5; margin: 14px 0; }
.callout.warn { background: #fdf0cd; }
.callout.info { background: #e9efe6; }
.doc table { width: 100%; border-collapse: collapse; margin: 14px 0; font-size: 14px; }
.doc th { text-align: left; background: var(--surface-2); padding: 8px 12px; border: 1px solid var(--line); }
.doc td { padding: 8px 12px; border: 1px solid var(--line); vertical-align: top; }
.doc .chk { list-style: none; padding: 0; }
.doc .chk li { display: flex; gap: 10px; align-items: center; }
.swatches { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 12px; margin: 14px 0; }
.swatch { border-radius: 12px; overflow: hidden; border: 1px solid var(--line); }
.swatch .c { height: 70px; }
.swatch .i { padding: 8px 10px; font-size: 12.5px; }
.swatch b { display: block; font-size: 13.5px; }
[contenteditable="true"] { outline: 2px dashed var(--vert); outline-offset: 3px; border-radius: 4px; }
.doc-actions { display: flex; gap: 8px; margin-left: auto; }
.action-line { display: flex; align-items: center; gap: 10px; padding: 8px 0; border-bottom: 1px dashed var(--line); }
.decision { padding: 10px 14px; background: var(--surface-2); border-radius: 10px; margin: 8px 0; display: flex; gap: 12px; }
.decision b { font-family: var(--font-title); color: var(--vf); }

/* ───────── Résultats ───────── */
.kpi { padding: 18px 20px; }
.kpi .k { font-size: 13px; font-weight: 600; color: var(--ink-3); }
.kpi .v { font: 700 32px/1.1 var(--font-title); margin: 6px 0 4px; color: var(--vf); }
.kpi .d { font-size: 13px; font-weight: 600; }
.kpi .d.up { color: #4f7a17; }
.chart-svg { width: 100%; height: auto; display: block; }
.chart-svg text { font-family: var(--font-body); font-size: 11px; fill: var(--ink-3); }
.bar-row { display: grid; grid-template-columns: 130px 1fr 80px; gap: 12px; align-items: center; padding: 7px 0; font-size: 14px; }

/* ───────── Tiroir, dialogue, toasts, palette ───────── */
.backdrop { position: fixed; inset: 0; background: rgba(20, 40, 46, .35); z-index: 60; opacity: 0; pointer-events: none; transition: opacity .18s; }
.backdrop.show { opacity: 1; pointer-events: auto; }
.drawer { position: fixed; top: 0; right: 0; bottom: 0; width: min(580px, 100vw); background: var(--bg); z-index: 70; box-shadow: var(--shadow-lg); display: none; flex-direction: column; }
/* Fermé, le panneau n'existe plus dans la page (sur iPhone, un panneau fixe poussé hors de l'écran à droite élargissait la page) */
.drawer.show { display: flex; animation: drawer-in .22s ease; }
@keyframes drawer-in { from { transform: translateX(100%); } to { transform: none; } }
.drawer-head { display: flex; align-items: flex-start; gap: 12px; padding: 18px 22px; background: var(--surface); border-bottom: 1px solid var(--line); }
.drawer-head h2 { font-size: 21px; flex: 1; }
.drawer-body { padding: 20px 22px 30px; overflow-y: auto; flex: 1; }
.sec { margin-bottom: 24px; }
.sec > h3 { font-size: 13px; text-transform: uppercase; letter-spacing: .09em; color: var(--ink-3); margin-bottom: 10px; font-family: var(--font-body); font-weight: 700; display: flex; align-items: center; gap: 8px; }
.sec > h3 .btn { margin-left: auto; text-transform: none; letter-spacing: 0; }
.props { display: grid; grid-template-columns: 130px 1fr; gap: 8px 12px; align-items: center; }
.props .k { color: var(--ink-3); font-size: 13px; font-weight: 600; }
.props .select, .props .input { padding: 5px 10px; font-size: 14px; }
.sub-row { display: flex; gap: 10px; align-items: center; padding: 5px 0; }
.sub-row.done span { text-decoration: line-through; color: var(--ink-3); }
.comment { display: flex; gap: 10px; margin-bottom: 14px; }
.comment .bubble { background: #fff; border: 1px solid var(--line); border-radius: 12px; padding: 8px 12px; flex: 1; }
.comment .bubble b { font-size: 13px; }
.comment .bubble time { font-size: 12px; color: var(--ink-3); margin-left: 6px; }
.approver { display: flex; align-items: center; gap: 12px; padding: 8px 0; border-bottom: 1px solid var(--line); }
.approver:last-child { border-bottom: 0; }
.visual { height: 170px; border-radius: 14px; position: relative; overflow: hidden; margin-bottom: 18px; display: grid; place-items: center; }
.visual svg { position: absolute; inset: 0; width: 100%; height: 100%; }
.visual span { position: relative; background: rgba(255, 255, 255, .9); border-radius: 999px; padding: 6px 16px; font: 600 14px var(--font-title); color: var(--vf); }
.workflow { display: flex; gap: 4px; flex-wrap: wrap; margin-bottom: 18px; }
.workflow span { font-size: 12px; font-weight: 600; padding: 4px 10px; border-radius: 999px; background: #ebe8d6; color: var(--ink-3); }
.workflow span.past { background: var(--green-bg); color: var(--green-ink); }
.workflow span.now { background: var(--vf); color: var(--cream); }
.history { font-size: 13px; color: var(--ink-3); }
.history li { margin: 3px 0; }

dialog { border: 0; border-radius: 18px; padding: 0; width: min(560px, calc(100vw - 24px)); box-shadow: var(--shadow-lg); color: var(--ink); background: var(--bg); }
dialog::backdrop { background: rgba(20, 40, 46, .45); }
.dlg-head { padding: 18px 22px; background: var(--surface); border-bottom: 1px solid var(--line); display: flex; align-items: center; }
.dlg-head h2 { font-size: 20px; flex: 1; }
.dlg-body { padding: 20px 22px 6px; max-height: 70vh; overflow-y: auto; }
.dlg-foot { padding: 14px 22px 20px; display: flex; gap: 10px; justify-content: flex-end; }
.create-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 10px; }
.create-opt { display: flex; gap: 12px; align-items: center; padding: 14px; background: #fff; border: 1px solid var(--line); border-radius: 12px; text-align: left; font-weight: 600; }
.create-opt:hover { border-color: var(--vert); background: #fbfdf3; }
.create-opt .ico { width: 24px; height: 24px; color: var(--vf); }
.create-opt small { display: block; font-weight: 400; color: var(--ink-3); }

.toasts { position: fixed; left: 50%; bottom: 24px; transform: translateX(-50%); z-index: 100; display: flex; flex-direction: column; gap: 8px; align-items: center; }
.toast { background: var(--vf); color: var(--cream); padding: 11px 20px; border-radius: 999px; box-shadow: var(--shadow-lg); font-weight: 600; animation: pop .2s ease; display: flex; gap: 10px; align-items: center; }
.toast .ico { color: var(--jaune); }
@keyframes pop { from { opacity: 0; transform: translateY(10px); } }

.palette { position: fixed; top: 12vh; left: 50%; transform: translateX(-50%); width: min(640px, calc(100vw - 24px)); background: var(--bg); border-radius: 18px; z-index: 90; box-shadow: var(--shadow-lg); overflow: hidden; display: none; }
.palette.show { display: block; }
.palette-in { display: flex; gap: 12px; align-items: center; padding: 16px 20px; background: #fff; border-bottom: 1px solid var(--line); }
.palette-in input { flex: 1; border: 0; outline: 0; background: none; font-size: 17px; }
.palette-res { max-height: 52vh; overflow-y: auto; padding: 8px; }
.palette-res .grp { font-size: 11px; letter-spacing: .1em; text-transform: uppercase; font-weight: 700; color: var(--ink-3); padding: 10px 12px 4px; }
.palette-res button { display: flex; width: 100%; gap: 12px; align-items: center; text-align: left; padding: 9px 12px; border: 0; background: none; border-radius: 10px; }
.palette-res button.sel, .palette-res button:hover { background: #fff; box-shadow: inset 0 0 0 2px var(--vert); }
.palette-res button .s { margin-left: auto; font-size: 12px; color: var(--ink-3); }
.menu { position: absolute; right: 0; top: calc(100% + 8px); width: 340px; background: #fff; border: 1px solid var(--line); border-radius: 14px; box-shadow: var(--shadow-lg); z-index: 50; padding: 8px; display: none; }
.menu.show { display: block; }
.menu .mh { font-size: 11px; letter-spacing: .1em; text-transform: uppercase; color: var(--ink-3); font-weight: 700; padding: 8px 10px 4px; }
.menu button.mi { display: flex; align-items: center; gap: 10px; width: 100%; padding: 9px 10px; border: 0; background: none; border-radius: 9px; text-align: left; }
.menu button.mi:hover { background: var(--surface-2); }
.menu-anchor { position: relative; }
.menu.narrow { width: 250px; }

/* ───────── Planning général (Gantt maître et matrice) ─────────
   Couleurs plates du thème, aucun dégradé. Les textes restent dans la colonne de gauche. */
.pl-stats { display: flex; flex-wrap: wrap; gap: 6px 22px; margin: -6px 0 14px; font-size: 14px; color: var(--ink-2); }
.pl-stats b { font: 600 17px var(--font-title); color: var(--ink); margin-right: 3px; }
.pl-stats a { text-decoration: none; color: inherit; }
.pl-stats a.bad b { color: var(--red); }
.pl-stats a.warn b { color: #b97600; }
.pl-bar { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; margin-bottom: 12px; }
.pl-range { font: 600 15px var(--font-title); margin-left: 8px; text-transform: capitalize; }
.zoom { display: inline-flex; border: 1px solid var(--line-2); border-radius: 999px; background: #fff; overflow: hidden; }
.zoom .iconbtn { border-radius: 0; width: 34px; height: 34px; font-size: 20px; line-height: 1; }
.zoom .iconbtn + .iconbtn { border-left: 1px solid var(--line); }
.zoom .iconbtn[disabled] { opacity: .35; cursor: not-allowed; }

.gt { background: #fff; border: 1px solid var(--line); border-radius: var(--r); overflow: hidden; --lw: 320px; }
.gt-scroll { overflow-x: auto; }
.gt-inner { position: relative; }
.gt-head { display: grid; grid-template-columns: var(--lw) 1fr; border-bottom: 1px solid var(--line); background: #fff; }
.gt-head .gt-label { background: #fff; }
.gt-ruler { min-width: 0; }
.gt-cols { display: grid; }
.gt-cols span { font-size: 12px; font-weight: 600; color: var(--ink-2); padding: 8px 4px; text-align: center; white-space: nowrap; overflow: hidden; border-left: 1px solid #f0eedf; display: flex; flex-direction: column; align-items: center; gap: 1px; line-height: 1.15; }
.gt-cols span small { font-size: 10px; font-weight: 500; color: var(--ink-3); }
.gt-cols span.we { color: var(--ink-3); background: #faf9f3; }
.gt-cols span.now { color: var(--vf); }
.gt-cols span.now::after { content: ""; width: 5px; height: 5px; border-radius: 50%; background: var(--red); margin-top: 2px; }
.gt-cols.grp span { align-items: flex-start; padding: 8px 10px 2px; font: 600 13px var(--font-title); color: var(--ink); text-transform: capitalize; border-left: 1px solid #f0eedf; }
.gt-cols.grp + .gt-cols span { padding-top: 2px; }
.gt-row { display: grid; grid-template-columns: var(--lw) 1fr; border-bottom: 1px solid #f3f1e6; transition: background .12s; }
.gt-row:hover { background: #fcfbf6; }
.gt-row.grp { background: #faf9f3; }
.gt-label { display: flex; align-items: center; gap: 8px; padding: 0 12px; overflow: hidden; border-right: 1px solid var(--line); background: #fff; position: sticky; left: 0; z-index: 4; font-size: 14px; min-width: 0; }
.gt-row:hover .gt-label { background: #fcfbf6; }
.gt-row.grp .gt-label { background: #faf9f3; }
.gt-row.l0 .gt-label { font-weight: 600; }
.gt-row.l1 .gt-label { padding-left: 34px; }
.gt-row.l2 .gt-label { padding-left: 54px; font-size: 13px; color: var(--ink-2); }
.gt-label .avatar { margin-left: auto; }
.gt-title { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; text-decoration: none; color: inherit; }
a.gt-title:hover { text-decoration: underline; }
.gt-title .ico { vertical-align: -3px; margin-right: 4px; }
.gt-chev { border: 0; background: none; padding: 2px; border-radius: 6px; display: grid; color: var(--ink-3); flex: none; }
.gt-chev:hover { background: #f1efe3; color: var(--ink); }
.gt-st { width: 8px; height: 8px; border-radius: 50%; flex: none; background: #c9ccbd; }
.gt-st.on { background: var(--vert); } .gt-st.plan { background: var(--dore); } .gt-st.pause { background: var(--orange); } .gt-st.end { background: var(--vf); }
.gt-track { position: relative; min-width: 0; }

/* Barres : fines, plates, sans texte */
.gt-bar { position: absolute; top: 50%; transform: translateY(-50%); height: 14px; border-radius: 7px; border: 0; padding: 0; background: #e9e6d6; touch-action: pan-y; }
.gt-bar::before { content: ""; position: absolute; inset: -10px 0; }
.gt-bar .gt-prog { position: absolute; left: 0; top: 0; bottom: 0; border-radius: 7px; background: var(--vert); }
.gt-bar.camp { height: 16px; background: rgba(31, 63, 71, .13); border-radius: 8px; }
.gt-bar.camp .gt-prog { background: var(--vf); border-radius: 8px; }
.gt-bar.proj { height: 12px; background: #e3e9cf; border-radius: 6px; }
.gt-bar.proj .gt-prog { background: var(--vert); border-radius: 6px; }
.gt-bar.proj.st-planned { background: #fff; box-shadow: inset 0 0 0 1.5px var(--dore); }
.gt-bar.proj.st-paused { background: #ece9dc; }
.gt-bar.proj.st-done { background: var(--vert); }
.gt-bar.task { height: 10px; border-radius: 5px; background: #cfd1c4; }
.gt-bar.task.st-doing { background: var(--vert); } .gt-bar.task.st-review { background: var(--dore); }
.gt-bar.task.st-blocked { background: #d9776a; } .gt-bar.task.st-done { background: #cfdca6; }
.gt-bar.cl { border-top-left-radius: 2px; border-bottom-left-radius: 2px; }
.gt-bar.cr { border-top-right-radius: 2px; border-bottom-right-radius: 2px; }
.gt-bar.drag { cursor: grab; }
.gt-bar:hover { filter: brightness(.94); }
.gt-bar.moving { cursor: grabbing; z-index: 6; box-shadow: var(--shadow-lg); }
.gt-bar.moving::after { content: attr(data-shift); position: absolute; top: -26px; left: 0; background: var(--vf); color: #fff; border-radius: 6px; padding: 1px 8px; font-size: 11px; white-space: nowrap; }
.gt-flag { position: absolute; right: -8px; top: 50%; transform: translateY(-50%); width: 16px; height: 16px; border-radius: 50%; background: var(--red); color: #fff; font: 700 11px/16px var(--font-body); text-align: center; border: 2px solid #fff; box-sizing: content-box; margin-top: 0; }
.gt-flag.warn { background: #e0a030; }
.gt-pct { position: absolute; top: 50%; transform: translateY(-50%); font-size: 11px; font-weight: 600; color: var(--ink-3); white-space: nowrap; pointer-events: none; }
.gt-off { position: absolute; top: 50%; transform: translateY(-50%); font-size: 11px; color: var(--ink-3); font-weight: 600; }
.gt-off.l { left: 6px; } .gt-off.r { right: 6px; }
.gt-dot { position: absolute; top: 50%; width: 11px; height: 11px; border-radius: 50%; border: 0; background: #cfd1c4; transform: translate(-50%, -50%); padding: 0; }
.gt-dot::before { content: ""; position: absolute; inset: -7px; }
.gt-dot.published { background: var(--vf); } .gt-dot.planned, .gt-dot.inprod { background: var(--vert); } .gt-dot.tovalidate, .gt-dot.toreview { background: var(--dore); }
.gt-dot:hover { box-shadow: 0 0 0 3px rgba(31, 63, 71, .12); }

/* Jalons : repères alignés sur une ligne, regroupés s'ils se touchent, étiquettes dessous */
.gt-row.ms { background: #fcfbf6; }
.gt-mk { position: absolute; width: 0; height: 16px; border: 0; background: none; padding: 0; z-index: 1; }
.gt-mk::before { content: ""; position: absolute; inset: -4px -12px; }
.gt-mk i { position: absolute; left: -6px; top: 2px; width: 12px; height: 12px; background: var(--vf); transform: rotate(45deg); border-radius: 2px; transition: transform .12s; }
.gt-mk.ev i { background: var(--vert); }
.gt-mk.dl i { background: var(--dore); border-radius: 50%; transform: none; }
.gt-mk:hover i { transform: rotate(45deg) scale(1.25); }
.gt-mk.dl:hover i { transform: scale(1.25); }
.gt-mk.multi i { left: -10px; top: -1px; width: 20px; height: 18px; transform: none; border-radius: 9px; display: grid; place-items: center; background: var(--vf); }
.gt-mk.multi.ev i { background: var(--vert); } .gt-mk.multi.dl i { background: var(--dore); }
.gt-mk.multi:hover i { transform: scale(1.12); }
.gt-mk.multi b { font: 700 11px var(--font-body); color: #fff; transform: none; }
.gt-mk.multi.dl b { color: var(--vf); }
.gt-lead { position: absolute; width: 1px; background: #d8d5c3; }
.gt-mlabel { position: absolute; line-height: 17px; white-space: nowrap; font-size: 11px; font-weight: 600; color: var(--ink-2); pointer-events: none; }
.gt-fete {  /* repère de clôture de l'exercice (nom de classe hérité) */
   position: absolute; height: 18px; border-radius: 9px; background: var(--jaune); display: flex; align-items: center; justify-content: center; }
.gt-fete span { font: 700 11px var(--font-title); color: var(--vf); white-space: nowrap; }
.mk { display: inline-block; width: 9px; height: 9px; margin: 0 5px 0 12px; vertical-align: -1px; }
.mk:first-child { margin-left: 0; }
.mk.ms { background: var(--vf); transform: rotate(45deg) scale(.85); border-radius: 2px; }
.mk.ev { background: var(--vert); transform: rotate(45deg) scale(.85); border-radius: 2px; }
.mk.dl { background: var(--dore); border-radius: 50%; }

/* Calques : grille, aujourd'hui, dépendances */
.gt-rows { position: relative; }
.gt-overlay { position: absolute; left: var(--lw); right: 0; top: 0; pointer-events: none; z-index: 2; }
.gt-overlay svg { position: absolute; inset: 0; width: 100%; height: 100%; overflow: visible; }
.gt-overlay path { fill: none; stroke: #9aa38b; stroke-width: 1.3; }
.gt-overlay path.bad { stroke: var(--red); stroke-dasharray: 4 3; }
.gt-arrow { position: absolute; width: 0; height: 0; border-left: 6px solid #9aa38b; border-top: 3.5px solid transparent; border-bottom: 3.5px solid transparent; transform: translate(-100%, -50%); }
.gt-arrow.bad { border-left-color: var(--red); }
.gt-vline { position: absolute; top: 0; bottom: 0; width: 1px; background: #efede0; }
.gt-vline.minor { background: #f6f4ea; }
.gt-we { position: absolute; top: 0; bottom: 0; background: rgba(31, 63, 71, .03); }
.gt-today { position: absolute; top: 0; bottom: 0; width: 2px; margin-left: -1px; background: var(--red); opacity: .75; }
.gt-legend { display: flex; flex-wrap: wrap; gap: 6px 18px; margin: 12px 2px 0; font-size: 12.5px; color: var(--ink-2); align-items: center; }
.gt-legend .muted { color: var(--ink-3); }
.lg { display: inline-block; width: 22px; height: 8px; border-radius: 4px; margin-right: 6px; vertical-align: 1px; background: #cfd1c4; }
.lg.camp { background: var(--vf); } .lg.proj { background: var(--vert); } .lg.task { background: var(--dore); }
.lg.bad { background: none; border-top: 2px dashed var(--red); height: 0; border-radius: 0; }
.lg.heat { background: linear-gradient(90deg, #e8f0f2 0 25%, #d9e5b9 25% 50%, #b6cd7c 50% 75%, #8cae52 75%); }
.gt-tip { position: fixed; z-index: 120; display: none; max-width: 300px; background: var(--vf); color: #fff; border-radius: 10px; padding: 9px 12px; font-size: 12.5px; line-height: 1.4; box-shadow: var(--shadow-lg); pointer-events: none; }
.gt-tip b { display: block; font-size: 13px; margin-bottom: 2px; }
.gt-tip span { display: block; color: rgba(255, 255, 255, .78); }

/* Matrice : une seule teinte verte, le rouge est réservé à la surcharge */
table.mx { width: 100%; border-collapse: separate; border-spacing: 0; font-size: 13px; }
.mx th, .mx td { border-bottom: 1px solid #f0eedf; border-right: 1px solid #f6f4ea; }
.mx thead th { font-size: 12px; font-weight: 600; color: var(--ink-2); background: #fff; padding: 9px 4px; text-align: center; white-space: nowrap; }
.mx thead th small { display: block; font-size: 10px; font-weight: 500; color: var(--ink-3); }
.mx thead th.we, .mxc.we { background: #faf9f3; }
.mx tbody th { text-align: left; font-weight: 500; background: #fff; position: sticky; left: 0; z-index: 1; min-width: 220px; padding: 8px 12px; border-right: 1px solid var(--line); }
.mxl.l1 { padding-left: 20px; }
.mx tr.top th { font-weight: 600; }
.mxc { text-align: center; height: 48px; padding: 2px 4px; line-height: 1.15; }
.mxc b { display: block; font: 600 15px var(--font-title); }
.mxc small { font-size: 10.5px; color: var(--ink-2); }
.mxc.act { background: #f6f4ea; }
.mxc.l1 { background: #e8f0f2; } .mxc.l2 { background: #d9e5b9; } .mxc.l3 { background: #b6cd7c; } .mxc.l4 { background: #8cae52; color: #fff; }
.mxc.l4 small { color: rgba(255, 255, 255, .85); }
.mxc[data-action] { cursor: pointer; }
.mxc[data-action]:hover { outline: 2px solid var(--vf); outline-offset: -2px; }
.mx tr.tot td { background: #faf9f3; text-align: center; vertical-align: bottom; height: 72px; padding: 6px 4px; }
.mxbar { height: 34px; display: flex; align-items: flex-end; justify-content: center; }
.mxbar i { width: 55%; max-width: 24px; background: var(--vert); border-radius: 4px 4px 0 0; min-height: 2px; display: block; }
.mxbar i.hot { background: var(--red); }

/* Points de synchronisation : liste sobre, sans cadre */
.pl-issues { margin-top: 26px; }
.pl-issues h2 { font-size: 17px; }
.sync-item { display: grid; grid-template-columns: auto 1fr auto; gap: 12px; padding: 12px 0; border-bottom: 1px solid var(--line); align-items: start; }
.sync-item:last-child { border-bottom: 0; }
.sync-item .grow { min-width: 0; }
.sync-ic { width: 28px; height: 28px; border-radius: 50%; display: grid; place-items: center; flex: none; }
.sync-item.conflict .sync-ic { background: var(--red-bg); color: var(--red); }
.sync-item.warn .sync-ic { background: var(--orange-bg); color: var(--orange-ink); }
.sync-act { display: flex; gap: 8px; }
.sync-fix { color: var(--ink-3); margin-top: 3px; }

/* ───────── Séances : un document en blocs, avec sommaire ───────── */
.mt-row { display: flex; gap: 16px; align-items: center; padding: 14px 18px; cursor: pointer; transition: border-color .12s, box-shadow .12s; }
.mt-row:hover { border-color: var(--vert); box-shadow: var(--shadow-lg); }
.mt-row-side { display: flex; gap: 12px; align-items: center; flex: none; }
.mt-head h1 { font-size: 28px; }
.mt-steps { list-style: none; display: flex; flex-wrap: wrap; gap: 8px 0; padding: 0; margin: 0; }
.mt-steps li { display: flex; align-items: center; gap: 8px; font-weight: 600; color: var(--ink-3); padding-right: 34px; position: relative; font-size: 14px; }
.mt-steps li::after { content: ""; position: absolute; right: 8px; top: 50%; width: 18px; height: 2px; background: #d3d0c6; }
.mt-steps li:last-child { padding-right: 0; }
.mt-steps li:last-child::after { display: none; }
.mt-steps i { width: 24px; height: 24px; border-radius: 50%; background: #ebe8d6; display: grid; place-items: center; font: 600 12px var(--font-body); font-style: normal; }
.mt-steps .ico { width: 13px; height: 13px; stroke-width: 3; }
.mt-steps li.past i { background: var(--vert); color: #fff; }
.mt-steps li.now { color: var(--ink); }
.mt-steps li.now i { background: var(--vf); color: #fff; }

.mt-layout { display: grid; grid-template-columns: minmax(0, 1fr) 280px; gap: 40px; margin-top: 26px; }
.mt-doc { min-width: 0; }
.mt-side { display: flex; flex-direction: column; gap: 16px; min-width: 0; }
.side-h { font: 700 12px var(--font-body); text-transform: uppercase; letter-spacing: .09em; color: var(--ink-3); margin-bottom: 10px; }
.mt-toc { position: sticky; top: calc(var(--topbar-h) + 14px); background: #fff; border: 1px solid var(--line); border-radius: 14px; padding: 16px 12px 12px; max-height: calc(100vh - 110px); overflow: auto; }
.mt-toc .side-h { padding-left: 8px; }
.mt-toc ol { list-style: none; margin: 0; padding: 0; }
.mt-toc a { display: flex; gap: 8px; align-items: baseline; padding: 5px 8px; border-radius: 8px; text-decoration: none; color: var(--ink-2); font-size: 14px; border-left: 3px solid transparent; }
.mt-toc a:hover { background: #f6f4ea; }
.mt-toc a.on { background: #e8f0f2; color: var(--vf); font-weight: 600; border-left-color: var(--vert); }
.mt-toc a.d1 { padding-left: 24px; font-size: 13px; }
.mt-toc .n { color: var(--ink-3); font-variant-numeric: tabular-nums; min-width: 22px; }
.mt-toc .tt { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.mt-toc .mn { font-size: 11.5px; color: var(--ink-3); }
.mt-toc a.postponed .tt { color: var(--orange-ink); }
.mt-sum { display: flex; gap: 6px 12px; flex-wrap: wrap; margin: 10px 8px 0; padding-top: 10px; border-top: 1px solid var(--line); font-size: 12.5px; color: var(--ink-3); }
.mt-tip { display: flex; gap: 10px; align-items: flex-start; background: #ebf3f5; border-radius: 12px; padding: 10px 14px; font-size: 13.5px; color: var(--ink-2); margin-bottom: 18px; }
.mt-tip .ico { color: #5c7a1e; margin-top: 2px; flex: none; }

.mt-t { padding: 6px 0 10px; scroll-margin-top: 90px; }
.mt-t.d1 { margin-left: 30px; padding-left: 16px; border-left: 2px solid #e4e2db; }
.mt-th { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.mt-n { min-width: 30px; height: 28px; padding: 0 8px; border-radius: 8px; background: var(--vf); color: #fff; font: 600 14px var(--font-title); display: grid; place-items: center; flex: none; }
.mt-t.d1 .mt-n { background: #e6ecd0; color: var(--vf); }
.mt-title { flex: 1 1 260px; min-width: 150px; border: 0; background: transparent; font: 600 21px var(--font-title); padding: 4px 8px; border-radius: 8px; color: var(--ink); margin: 0; }
.mt-t.d1 .mt-title { font-size: 17px; }
input.mt-title:hover { background: #f6f4ea; }
input.mt-title:focus { background: #fff; outline: 2px solid rgba(86, 138, 151, .6); }
input.mt-title::placeholder { color: #b0b3a6; font-weight: 500; }
.mt-chips { display: inline-flex; gap: 8px; align-items: center; flex-wrap: wrap; }
.chipf { display: inline-flex; align-items: center; gap: 6px; background: #f1efe3; border-radius: 999px; padding: 3px 11px; font-size: 13px; color: var(--ink-2); }
.chipf .ico { width: 14px; height: 14px; opacity: .7; }
.chipf select, .chipf input { border: 0; background: transparent; font: inherit; color: inherit; padding: 0; outline: none; appearance: none; -webkit-appearance: none; }
.chipf select { cursor: pointer; }
.chipf .mt-min { width: 34px; text-align: right; -moz-appearance: textfield; }
.chipf .mt-min::-webkit-outer-spin-button, .chipf .mt-min::-webkit-inner-spin-button { -webkit-appearance: none; margin: 0; }
.chipf:focus-within { outline: 2px solid rgba(86, 138, 151, .6); }
.chipf.ro { background: transparent; padding-left: 0; }
.mt-status { width: auto; padding: 3px 26px 3px 10px; font-size: 13px; }
.mt-tools { margin-left: auto; display: inline-flex; opacity: 0; transition: opacity .12s; }
.mt-t:hover > .mt-th .mt-tools, .mt-th:focus-within .mt-tools { opacity: 1; }
@media (hover: none) { .mt-tools, .bk-del { opacity: 1 !important; } }
.mt-tools .iconbtn { width: 30px; height: 30px; font-size: 15px; }
.mt-body { margin: 2px 0 0 40px; }
.mt-t.postponed .mt-n { background: var(--orange); color: #fff; }

.bk { width: 100%; border: 0; background: transparent; resize: none; overflow: hidden; font: inherit; font-size: 15px; line-height: 1.55; padding: 3px 8px; border-radius: 6px; color: var(--ink); display: block; min-height: 28px; }
.bk:hover { background: #faf9f3; }
.bk:focus { background: #fff; outline: 2px solid rgba(86, 138, 151, .55); }
.bk::placeholder { color: #b0b3a6; }
.bk-view { margin: 2px 8px; font-size: 15px; line-height: 1.55; }
.bk-row { display: flex; gap: 10px; align-items: flex-start; margin: 6px 0; padding: 6px 10px; border-radius: 10px; }
.bk-d { background: #eaf0d4; }
.bk-t { background: #fff6dc; }
.bk-row .bk { font-weight: 600; }
.bk-row .bk:hover { background: rgba(255, 255, 255, .5); }
.bk-row .bk:focus { background: rgba(255, 255, 255, .85); }
.bk-tag { font: 600 13px var(--font-title); color: var(--vf); background: #fff; border-radius: 7px; padding: 2px 8px; flex: none; margin-top: 3px; }
.bk-ck { width: 20px; height: 20px; border-radius: 6px; border: 2px solid #d9b95a; background: #fff; display: grid; place-items: center; color: transparent; flex: none; margin-top: 5px; }
.bk-ck.on { background: var(--vf); border-color: var(--vf); color: var(--jaune); }
.bk-ck .ico { width: 12px; height: 12px; stroke-width: 3; }
.bk-who { display: inline-flex; align-items: center; gap: 6px; flex: none; margin-top: 3px; font-size: 13.5px; }
.bk-due { border: 0; background: rgba(255, 255, 255, .8); border-radius: 8px; padding: 3px 6px; font: inherit; font-size: 12.5px; color: var(--ink-2); flex: none; margin-top: 3px; width: auto; }
.bk-del { border: 0; background: none; color: var(--ink-3); border-radius: 6px; padding: 4px; opacity: 0; flex: none; margin-top: 3px; }
.bk-row:hover .bk-del, .bk-del:focus { opacity: 1; }
.bk-del .ico { width: 15px; height: 15px; }
.bk-txt { flex: 1; min-width: 0; padding: 3px 0; font-weight: 600; }
.bk-st { flex: none; margin-top: 3px; }
.bk-hint { position: fixed; z-index: 95; display: none; background: var(--vf); color: #fff; padding: 5px 11px; border-radius: 8px; font-size: 12.5px; pointer-events: none; box-shadow: var(--shadow-lg); }
.mt-add-sub { border: 0; background: none; color: var(--ink-3); font-weight: 600; padding: 6px 10px; border-radius: 8px; display: inline-flex; gap: 6px; align-items: center; margin: 0 0 14px 70px; font-size: 13.5px; }
.mt-add-sub:hover { background: #f1efe3; color: var(--vf); }
.mt-add-topic { width: 100%; border: 1.5px dashed var(--line-2); background: none; color: var(--ink-2); font-weight: 600; padding: 12px 16px; border-radius: 12px; display: flex; gap: 8px; align-items: center; justify-content: center; margin-top: 10px; }
.mt-add-topic:hover { border-color: var(--vert); background: #fbfdf3; color: var(--vf); }
.mt-remark { display: flex; gap: 10px; align-items: flex-start; margin: 8px 0 0 40px; padding: 8px 12px; border-left: 3px solid var(--red); background: #fdf3f0; border-radius: 0 10px 10px 0; font-size: 14px; flex-wrap: wrap; }
.mt-remark.ok { border-left-color: var(--vert); background: #f6f9ec; }
.mt-remark .grow { flex: 1; min-width: 160px; }
.mt-rem-form { margin: 8px 0 0 40px; display: flex; gap: 8px; }
.mt-rem-form .input { flex: 1; }
.card .mt-act, .card .mt-remark { margin-left: 0; }
.mt-act { display: flex; gap: 10px; align-items: center; margin: 8px 0 0; }
.mt-people summary { cursor: pointer; padding: 14px 18px; font-weight: 600; list-style: none; }
.mt-people summary::-webkit-details-marker { display: none; }
.mt-people[open] summary { border-bottom: 1px solid var(--line); }
.mt-person { display: flex; align-items: center; gap: 10px; padding: 7px 18px; border-bottom: 1px solid #f3f1e6; }
.mt-person:last-child { border-bottom: 0; }
.mt-person .grow { flex: 1; min-width: 0; }
.mt-pres { width: auto; padding: 3px 26px 3px 8px; font-size: 12.5px; }
.ok-dot { color: #4f7a17; display: grid; }

/* ───────── Presse et RP ───────── */
.mbars { display: grid; grid-auto-flow: column; grid-auto-columns: 1fr; gap: 10px; align-items: end; height: 130px; }
.mbars > div { display: flex; flex-direction: column; align-items: center; justify-content: flex-end; height: 100%; gap: 4px; font-size: 12px; color: var(--ink-3); }
.mbars b { color: var(--ink); font-size: 13px; }
.mbars i { display: block; width: 100%; max-width: 44px; min-height: 3px; border-radius: 8px 8px 3px 3px; background: linear-gradient(180deg, var(--vert), var(--vc)); }

/* ───────── Mon profil ───────── */
.profile-grid { display: grid; grid-template-columns: 300px minmax(0, 1fr); gap: 22px; align-items: start; max-width: 1040px; }
.profile-photo { text-align: center; }
.profile-avatar { width: 172px; height: 172px; border-radius: 50%; margin: 6px auto 0; background: var(--dore); display: grid; place-items: center; overflow: hidden; border: 4px solid #fff; box-shadow: var(--shadow); font: 600 70px var(--font-title); color: var(--vf); }
.profile-avatar img { width: 100%; height: 100%; object-fit: cover; }
.profile-h { font-size: 18px; margin-bottom: 14px; display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.profile-h .badge { font-family: var(--font-body); }

/* ───────── Connexion ───────── */
.login { min-height: 100vh; display: grid; grid-template-columns: 1.1fr 1fr; }
.login-art { position: relative; overflow: hidden; background: var(--cream); display: grid; place-items: center; padding: 40px; }
/* Bandeau diagonal aux quatre couleurs du logo (à la place des vagues d'EpiCOMment) */
.login-art::after { content: ""; position: absolute; left: 0; right: 0; bottom: 0; height: 18px; background: linear-gradient(135deg, var(--jaune) 0 25%, var(--orange) 25% 50%, var(--vert) 50% 75%, var(--noir) 75%); }
.login-art svg.waves { display: none; }
.login-art img { position: relative; width: min(380px, 70%); }
.login-art .tagline { position: absolute; left: 40px; bottom: 36px; right: 40px; font: 600 22px var(--font-title); color: var(--vf); }
.login-form { padding: 48px clamp(24px, 6vw, 80px); display: flex; flex-direction: column; justify-content: center; }
.login-form h1 { font-size: 32px; }
.profiles { display: grid; grid-template-columns: repeat(2, 1fr); gap: 10px; margin: 22px 0; }
.profile { display: flex; gap: 12px; align-items: center; padding: 11px 14px; border-radius: 12px; border: 1px solid var(--line-2); background: #fff; text-align: left; }
.profile:hover { border-color: var(--vf); box-shadow: var(--shadow); }
.profile b { display: block; line-height: 1.2; }
.profile span { font-size: 12.5px; color: var(--ink-3); }

/* ───────── Responsive ───────── */
@media (max-width: 1180px) {
  .cols-4 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .cols-3 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .dash-grid, .main-aside { grid-template-columns: minmax(0, 1fr); }
}
@media (max-width: 960px) {
  .app { grid-template-columns: minmax(0, 1fr); }
  .sidebar { position: fixed; left: 0; top: 0; width: min(290px, 86vw); transform: translateX(-105%); transition: transform .22s ease; box-shadow: var(--shadow-lg); }
  .sidebar.open { transform: none; }
  .menu-btn { display: grid; }
  .topbar { padding: 0 14px; }
  .main { padding: 18px 14px 40px; }
  .searchbtn kbd, .btn-create .lbl { display: none; }
  .split { grid-template-columns: minmax(0, 1fr); }
  .tree { position: static; display: flex; overflow-x: auto; gap: 4px; }
  .tree button, .tree a { width: auto; white-space: nowrap; }
  .login { grid-template-columns: 1fr; }
  .login-art { min-height: 220px; }
  .login-art .tagline { display: none; }
  .hero { flex-wrap: wrap; padding: 22px; }
  .hero-logo { display: none; }
  .doc { padding: 22px 18px; }
  .cal-day { min-height: 84px; padding: 3px; }
  .cal-item { font-size: 10.5px; padding: 1px 4px; }
}
@media (max-width: 760px) {
  .profile-grid { grid-template-columns: minmax(0, 1fr); }
}
@media (max-width: 640px) {
  .gt { --lw: 150px; }
  .mt-row { flex-wrap: wrap; }
  .mt-row-side { width: 100%; justify-content: space-between; }
  .mt-layout { grid-template-columns: minmax(0, 1fr); gap: 16px; margin-top: 18px; }
  .mt-side { display: contents; }
  .mt-toc { order: -1; position: static; max-height: none; }
  .mt-t.d1 { margin-left: 12px; padding-left: 12px; }
  .mt-body { margin-left: 0; }
  .mt-add-sub { margin-left: 24px; }
  .mt-remark, .mt-rem-form { margin-left: 0; }
  .mt-title { font-size: 18px; min-width: 120px; }
  .bk-row { flex-wrap: wrap; }
  .bk-row .bk { flex: 1 1 100%; order: 5; }
  .bk-row .bk-st, .bk-row .bk-txt { order: 4; }
  .bk-row .bk-txt { flex: 1 1 100%; }
  .bk-row .bk-due { order: 6; }
  .bk-row .bk-del { order: 7; }
  .mt-steps li { padding-right: 20px; font-size: 13px; }
  .mt-steps li::after { width: 10px; }
  .gt-label { font-size: 13px; padding: 0 8px; gap: 6px; }
  .gt-row.l1 .gt-label { padding-left: 22px; }
  .gt-row.l2 .gt-label { padding-left: 34px; }
  .gt-label .avatar { display: none; }
  .sync-item { grid-template-columns: auto 1fr; }
  .sync-act { grid-column: 2; }
  .hero { flex-direction: column; align-items: stretch; gap: 16px; }
  .countdown { align-self: stretch; }
  .searchbtn { min-width: 0; }
  .searchbtn span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: 14px; }
  .topbar-actions { gap: 4px; }
  .cols-2, .cols-3, .cols-4, .row2, .create-grid, .profiles { grid-template-columns: minmax(0, 1fr); }
  .prio-tiles { grid-template-columns: repeat(3, 1fr); gap: 8px; }
  .prio-tile { padding: 10px; }
  .page-head h1 { font-size: 24px; }
  .hero h1 { font-size: 26px; }
  .props, .kv { grid-template-columns: 1fr; }
  .agenda-day { grid-template-columns: 1fr; gap: 6px; }
  .bar-row { grid-template-columns: 90px 1fr 60px; }
  .t .hide-sm, .t th.hide-sm { display: none; }
  .cal-day .cal-item { display: none; }
  .cal-day .cal-item:nth-of-type(-n+1) { display: block; }
  .cal.week .cal-day .cal-item { display: block; }
}
@media (prefers-reduced-motion: reduce) { * { transition: none !important; animation: none !important; } }
@media print { .sidebar, .topbar { display: none; } .app { display: block; } }

/* ── Module Campagne : aperçu, public cible, mesures, KPI, équipe ── */
.grow { flex: 1; min-width: 0; }
.row3 { display: grid; grid-template-columns: 2fr 1fr 1.4fr; gap: 12px; margin-bottom: 14px; }
.tab-tools { margin-bottom: 14px; gap: 10px; }
.linkbtn { border: 0; background: none; padding: 0; color: var(--vf); font: inherit; font-weight: 600; text-decoration: underline; text-underline-offset: 3px; cursor: pointer; text-align: left; }
.linkbtn:hover { color: #4f7a17; }
.tabs button .n { margin-left: 6px; font-size: 11px; background: var(--vc); color: var(--vf); border-radius: 999px; padding: 1px 7px; }
.mini { display: flex; flex-direction: column; gap: 4px; font-size: 12px; font-weight: 600; color: var(--ink-3); }
.cell { padding: 7px 10px; font-size: 14px; font-weight: 400; color: var(--ink); min-width: 0; }
textarea.cell { resize: vertical; min-height: 64px; line-height: 1.35; }
.chk { display: inline-flex; align-items: center; gap: 6px; font-size: 13px; font-weight: 600; color: var(--ink); cursor: pointer; }
.chk input { width: 18px; height: 18px; accent-color: var(--vf); }
.ctr { text-align: center; }

/* Aperçu */
.tiles { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 12px; }
.tile { display: flex; flex-direction: column; gap: 2px; text-align: left; padding: 14px 16px; border: 1px solid var(--line); border-radius: var(--r); background: var(--surface); box-shadow: var(--shadow); cursor: pointer; font: inherit; color: var(--ink); }
.tile:hover { border-color: var(--vert); }
.tile .k { font-size: 11px; letter-spacing: .08em; text-transform: uppercase; color: var(--ink-3); font-weight: 700; }
.tile b { font-family: var(--font-title); font-size: 24px; color: var(--vf); line-height: 1.15; }
.board { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 12px; }
.bcol { background: var(--surface-2); border: 1px solid var(--line); border-radius: var(--r-sm); padding: 10px; display: flex; flex-direction: column; gap: 8px; min-width: 0; }
.bcol-h { display: flex; flex-direction: column; gap: 2px; }
.bcard { display: flex; flex-direction: column; gap: 4px; text-align: left; padding: 8px 10px; border: 1px solid var(--line); border-left: 4px solid var(--vert); border-radius: 8px; background: #fff; font: inherit; color: var(--ink); cursor: pointer; }
.bcard.late { border-left-color: var(--red); }
.bcard:hover { border-color: var(--vert); }
.bcard .t1 { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-weight: 600; }
.bempty { padding: 6px 2px; }
.list-line { display: flex; align-items: center; gap: 10px; padding: 7px 0; border-bottom: 1px solid var(--line); }
.list-line:last-child { border-bottom: 0; }
.list-line .t1 { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

/* Public cible : tableau éditable */
.xscroll { overflow-x: auto; }
table.xt { width: max-content; min-width: 100%; }
.xt th, .xt td { vertical-align: top; padding: 8px 8px; }
.xt tbody tr { cursor: default; }
.xt tbody tr:hover { background: transparent; }
.xt .sticky { position: sticky; left: 0; z-index: 1; background: var(--surface); min-width: 64px; width: 64px; box-shadow: 1px 0 0 var(--line); }
.xt th.sticky { background: var(--surface); }
.xt td.num { display: table-cell; font-size: 16px; text-align: center; }
.xt td.num .iconbtn { width: 28px; height: 28px; margin: 4px auto 0; }
.sinus-desc { margin-top: 6px; line-height: 1.35; max-width: 230px; }
.sinus-card { padding: 10px 0; border-bottom: 1px solid var(--line); }
.sinus-card:last-child { border-bottom: 0; }

/* Mesures */
.mcard { overflow: hidden; }
.mhead { display: flex; align-items: center; gap: 12px; width: 100%; padding: 12px 16px; border: 0; background: none; font: inherit; color: var(--ink); cursor: pointer; text-align: left; }
.mhead:hover { background: var(--surface-2); }
.mhead .grow { display: flex; flex-direction: column; gap: 2px; }
.mhead .t1 { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.mnum { font-family: var(--font-title); font-weight: 700; color: var(--vf); background: var(--vc); border-radius: 8px; padding: 4px 9px; }
.mcost { white-space: nowrap; }
.pdots { display: inline-flex; gap: 4px; }
.pdot { width: 10px; height: 10px; border-radius: 50%; background: #e3e0cf; }
.pdot.done { background: var(--vert); }
.pdot.now { background: var(--dore); }
.pdot.late { background: var(--red); }
.mbody { padding: 4px 16px 16px; border-top: 1px solid var(--line); display: flex; flex-direction: column; gap: 12px; padding-top: 14px; }
.chips { display: flex; flex-wrap: wrap; gap: 6px; }
.phases { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 12px; }
.phase { border: 1px solid var(--line); border-top: 4px solid #e3e0cf; border-radius: var(--r-sm); padding: 10px 12px; display: flex; flex-direction: column; gap: 10px; background: var(--surface-2); }
.phase.done { border-top-color: var(--vert); }
.phase.now { border-top-color: var(--dore); }
.phase.late { border-top-color: var(--red); }
.phase-h { display: flex; align-items: center; justify-content: space-between; gap: 6px; flex-wrap: wrap; }

/* KPI */
.grp-h { margin: 8px 0 -2px; font-size: 13px; letter-spacing: .06em; text-transform: uppercase; color: var(--ink-3); }
.kpi-row { display: flex; gap: 12px; flex-wrap: wrap; align-items: flex-end; }
.readings { margin-top: 12px; border-top: 1px solid var(--line); padding-top: 12px; }
.reading-form { display: flex; gap: 10px; flex-wrap: wrap; align-items: flex-end; margin-top: 12px; }
.cat-row { display: flex; align-items: center; gap: 12px; padding: 9px 0; border-bottom: 1px solid var(--line); }
.cat-row[hidden] { display: none; }
#kpi-list { max-height: 55vh; overflow-y: auto; }

/* Équipe */
.member-row { display: flex; align-items: center; gap: 12px; padding: 8px 0; border-bottom: 1px solid var(--line); }
.member-row .role { width: 220px; flex: none; }
.dropzone { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; border: 2px dashed var(--line-2); border-radius: var(--r-sm); padding: 12px; margin-top: 12px; }
.dropzone.over { border-color: var(--vert); background: var(--surface-2); }
.ico-sm { color: var(--ink-3); display: inline-flex; }

@media (max-width: 960px) {
  .tiles { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .board, .phases { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 640px) {
  .tiles, .board, .phases, .row3 { grid-template-columns: minmax(0, 1fr); }
  .member-row { flex-wrap: wrap; }
  .member-row .role { width: 100%; order: 3; }
  .mhead { flex-wrap: wrap; }
  .pdots { display: none; }
}
.phase .row2 { grid-template-columns: minmax(0, 1fr); gap: 10px; }
.phase .cell { width: 100%; }

/* Public cible : carte persona, formulaire, schéma Sinus */
.pgrid { display: grid; grid-template-columns: repeat(auto-fill, minmax(320px, 1fr)); gap: 16px; align-items: start; }
.pcard { display: flex; flex-direction: column; overflow: hidden; }
.pcard-h { display: flex; align-items: center; gap: 14px; padding: 16px 18px; background: linear-gradient(120deg, var(--vc), #f3efc9); }
.pcard-h h3 { font-size: 19px; }
.pcard-b { padding: 14px 18px; display: flex; flex-direction: column; gap: 12px; }
.pcard-f { padding: 10px 18px 14px; display: flex; gap: 8px; justify-content: flex-end; border-top: 1px solid var(--line); }
.pphoto { width: 64px; height: 64px; flex: none; border-radius: 50%; overflow: hidden; display: inline-grid; place-items: center; background: var(--vf); color: var(--cream); font-family: var(--font-title); font-size: 26px; font-weight: 600; border: 3px solid #fff; box-shadow: var(--shadow); }
.pphoto.lg { width: 84px; height: 84px; font-size: 32px; }
.pphoto.sm { width: 38px; height: 38px; font-size: 16px; border-width: 2px; }
.pphoto img { width: 100%; height: 100%; object-fit: cover; display: block; }
.pfacts { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px 14px; }
.pfact .k { font-size: 11px; letter-spacing: .06em; text-transform: uppercase; color: var(--ink-3); font-weight: 700; margin-bottom: 2px; }
.pfact.pos { border-left: 3px solid var(--vert); padding-left: 10px; }
.pfact.neg { border-left: 3px solid var(--red); padding-left: 10px; }
.psinus { border-radius: var(--r-sm); padding: 9px 12px; background: #f3f1e8; border-left: 4px solid #b5b5b5; }
.psinus.ref { border-left-color: #e9786d; background: #fdeeec; }
.psinus.futur { border-left-color: #6a6a6a; background: #eeeeee; }
.psinus.main { border-left-color: #e8a8a0; background: #fcf3f1; }
.tform { display: flex; flex-direction: column; gap: 4px; }
.tform-id { display: flex; gap: 18px; align-items: flex-start; flex-wrap: wrap; }
.tform-photo { display: flex; gap: 12px; align-items: center; }
.tform-id .grow { min-width: 240px; }
.row3b { display: grid; grid-template-columns: 1.4fr 1fr 1fr; gap: 12px; }
.sinus-svg { width: 100%; height: auto; display: block; }
.sinus-svg .sx { cursor: pointer; }
.sinus-svg .sx:hover ellipse { stroke-width: 3; }
.sinus-svg .sx:focus-visible ellipse { stroke: var(--vf); stroke-width: 4; }
.sinus-svg text { pointer-events: none; font-family: var(--font-body, inherit); }
.sinus-legend { display: flex; flex-wrap: wrap; gap: 8px 18px; margin: 10px 0; font-size: 13px; }
.sinus-legend .sl { display: inline-flex; align-items: center; gap: 6px; }
.sinus-legend i { width: 14px; height: 14px; border-radius: 4px; display: inline-block; }
.sinus-card.sel { background: var(--surface-2); border-left: 4px solid var(--vert); padding: 10px 12px; border-radius: 0 var(--r-sm) var(--r-sm) 0; margin: 8px 0; }
@media (max-width: 640px) { .row3b, .pfacts { grid-template-columns: minmax(0, 1fr); } .pgrid { grid-template-columns: minmax(0, 1fr); } }

/* Mesures : réalisation, description et tâches des phases */
.mpct { display: inline-flex; align-items: center; gap: 8px; min-width: 110px; }
.mpct .progress { width: 64px; flex: none; }
.mpct b { font-size: 13px; width: 38px; text-align: right; }
.phases { grid-template-columns: minmax(0, 1fr); }
.phase-grid { display: grid; grid-template-columns: 240px minmax(0, 1fr); gap: 16px; }
.phase-set, .phase-work { display: flex; flex-direction: column; gap: 10px; min-width: 0; }
.phase-work .btn { align-self: flex-start; }
.ptasks { display: flex; flex-direction: column; gap: 6px; }
.ptask { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.ptask input[type="checkbox"] { width: 18px; height: 18px; accent-color: var(--vf); flex: none; }
.ptask .ptxt { flex: 1 1 220px; }
.ptask .pwho { width: 150px; flex: none; }
.ptask .pdue { width: 140px; flex: none; }
.ptask.done .ptxt { text-decoration: line-through; color: var(--ink-3); }
@media (max-width: 760px) { .phase-grid { grid-template-columns: minmax(0, 1fr); } .mpct { min-width: 0; } .mpct .progress { display: none; } }

/* Public cible : code unique, tableau en lignes « léger », bibliothèque */
.pcode { display: inline-block; font-family: ui-monospace, SFMono-Regular, Menlo, monospace; font-weight: 700; font-size: 12.5px; letter-spacing: .04em; color: var(--vf); background: rgba(255, 255, 255, .75); border: 1px solid rgba(31, 63, 71, .18); border-radius: 6px; padding: 1px 7px; }
.pcode.sm { font-size: 11.5px; padding: 0 6px; background: var(--surface-2); }
.pick-list { max-height: 170px; overflow-y: auto; border: 1px solid var(--line); border-radius: var(--r-sm); padding: 6px 10px; display: flex; flex-direction: column; gap: 6px; }
.pick { align-items: flex-start; font-weight: 400; }
.lib-row { display: flex; align-items: center; gap: 12px; padding: 10px 0; border-bottom: 1px solid var(--line); }
.lib-row[hidden] { display: none; }
.lib-act { display: flex; align-items: center; gap: 6px; flex: none; }
#lib-list { max-height: 55vh; overflow-y: auto; }

.xscroll.soft { background: var(--surface); scrollbar-width: thin; scrollbar-color: var(--vert) transparent; }
table.xt.soft { border-collapse: separate; border-spacing: 0; width: max-content; min-width: 100%; }
.xt.soft thead tr.grp th { font-size: 10.5px; letter-spacing: .1em; text-transform: uppercase; color: var(--vert); font-weight: 700; padding: 10px 10px 0; border-bottom: 0; text-align: left; background: var(--surface); }
.xt.soft thead tr:not(.grp) th { padding: 6px 10px 10px; border-bottom: 2px solid var(--line-2); font-size: 11px; color: var(--ink-3); background: var(--surface); position: sticky; top: 0; }
.xt.soft td { padding: 12px 6px; border-bottom: 1px solid var(--line); vertical-align: top; }
.xt.soft tbody tr:last-child td { border-bottom: 0; }
.xt.soft tbody tr:hover td { background: #fbfaf2; }
.xt.soft tbody tr:hover td.sticky { background: #fbfaf2; }
.xt.soft .sticky { position: sticky; left: 0; z-index: 2; background: var(--surface); box-shadow: 6px 0 8px -6px rgba(31, 63, 71, .18); min-width: 220px; width: 220px; }
.xt.soft .who-in { display: flex; gap: 10px; align-items: center; }
.xt.soft .who-f { min-width: 0; flex: 1; }
.xt.soft .who-n { display: flex; flex-direction: column; gap: 0; }
.xt.soft .who-n .cell { font-weight: 600; }
.xt.soft .cell { border-color: transparent; background: transparent; box-shadow: none; padding: 6px 8px; border-radius: 8px; width: 100%; }
.xt.soft textarea.cell { min-height: 36px; height: 36px; resize: none; overflow: hidden; line-height: 1.4; }
.xt.soft .cell:hover:not(:disabled) { background: #f3f1e5; }
.xt.soft .cell:focus { background: #fff; border-color: var(--vert); outline: 3px solid rgba(86, 138, 151, .35); }
.xt.soft select.cell { appearance: none; -webkit-appearance: none; cursor: pointer; background-image: none; }
.xt.soft .cell::placeholder { color: #b6b9ac; }
.xt.soft .mini-pair { display: flex; flex-direction: column; gap: 2px; }
.xt.soft .sinus-cell select.cell { color: var(--ink-3); font-size: 12.5px; padding-top: 2px; }
.sx-chip { display: inline-block; margin: 0 8px 2px; padding: 3px 10px; border-radius: 999px; font-size: 12.5px; font-weight: 600; background: #eee; color: #333; }
.sx-chip.ref { background: #fbd5d0; color: #7d2a20; }
.sx-chip.futur { background: #d9d9d9; color: #333; }
.sx-chip.main { background: #fce6e3; color: #7d3a32; }
.sx-chip.bas { background: #ececec; color: #444; }
.rchips { display: flex; flex-wrap: wrap; gap: 4px; padding: 4px 6px 0; }
.rchip { cursor: pointer; }
.rchip input { position: absolute; opacity: 0; width: 0; height: 0; }
.rchip span { display: inline-block; font-size: 11.5px; font-weight: 600; padding: 2px 9px; border-radius: 999px; border: 1px solid var(--line-2); color: var(--ink-3); background: #fff; }
.rchip input:checked + span { background: var(--vc); border-color: var(--vert); color: var(--vf); }
.rchip input:focus-visible + span { outline: 3px solid rgba(86, 138, 151, .5); }
.xt.soft .row-act { white-space: nowrap; }
.xt.soft .row-act .iconbtn { width: 32px; height: 32px; opacity: .55; }
.xt.soft tr:hover .row-act .iconbtn { opacity: 1; }
.xt.soft .who-n .cell { padding: 2px 8px; line-height: 1.25; }
.xt.soft .who-f .pcode { margin-left: 8px; margin-top: 2px; }

/* Couleur de repère : un simple liseré latéral choisi par l'utilisateur */
.swatches { display: inline-flex; flex-wrap: wrap; gap: 6px; align-items: center; }
.sw { width: 20px; height: 20px; border-radius: 50%; border: 2px solid #fff; box-shadow: 0 0 0 1px var(--line-2); padding: 0; cursor: pointer; background: #fff; }
.sw.none { background: linear-gradient(135deg, #fff 45%, #d0583f 45%, #d0583f 55%, #fff 55%); }
.sw[aria-pressed="true"] { box-shadow: 0 0 0 2px var(--vf); transform: scale(1.12); }
.sw:hover:not(:disabled) { transform: scale(1.12); }
.sw:focus-visible, .sw-radio input:focus-visible + .sw { outline: 3px solid rgba(86, 138, 151, .6); outline-offset: 1px; }
.sw-radio { cursor: pointer; display: inline-flex; }
.sw-radio input { position: absolute; opacity: 0; width: 0; height: 0; }
.sw-radio input:checked + .sw { box-shadow: 0 0 0 2px var(--vf); transform: scale(1.12); }
.pcard-f { align-items: center; }
.cdot i { display: block; width: 14px; height: 14px; border-radius: 50%; box-shadow: 0 0 0 1px var(--line-2); }

/* Couleur de repère : liseré latéral de 12 px dessiné DANS la carte (il suit les coins arrondis, ne déborde jamais) */
.card[style*="--stripe"] { position: relative; overflow: hidden; padding-left: 12px; }
.card[style*="--stripe"]::before { content: ""; position: absolute; left: 0; top: 0; bottom: 0; width: 12px; background: var(--stripe); }
.xt.soft td.sticky[style*="--stripe"] { background-image: linear-gradient(var(--stripe), var(--stripe)); background-repeat: no-repeat; background-size: 12px 100%; background-position: left top; padding-left: 18px; }
.xt.soft tbody tr:hover td { background-color: #fbfaf2; }
.xt.soft tbody tr:hover td.sticky { background-color: #fbfaf2; }

/* Menu déroulant de couleur : pastille + nom, discret */
.csel { display: inline-flex; align-items: center; gap: 7px; font: inherit; font-size: 12.5px; color: var(--ink-3); cursor: pointer; padding: 3px 8px 3px 7px; border-radius: 999px; border: 1px solid transparent; background: none; }
.csel:hover:not(:disabled), .csel[aria-expanded="true"] { border-color: var(--line-2); background: var(--surface-2); color: var(--ink); }
.csel:disabled { cursor: default; }
.csel i { width: 12px; height: 12px; border-radius: 50%; box-shadow: 0 0 0 1px var(--line-2); flex: none; background: transparent; }
.csel .ico { width: 12px; height: 12px; }
.csel.dot { padding: 6px; }
.csel.dot i { width: 14px; height: 14px; }
.csel.form { border-color: var(--line-2); background: #fff; color: var(--ink); padding: 7px 12px 7px 10px; font-size: 14px; }
.csel.form i { width: 16px; height: 16px; }
.mfoot { gap: 8px; }
.cmenu { position: fixed; z-index: 2000; min-width: 190px; max-height: 70vh; overflow-y: auto; background: #fff; border: 1px solid var(--line-2); border-radius: 12px; box-shadow: var(--shadow-lg); padding: 6px; display: flex; flex-direction: column; }
.copt { display: flex; align-items: center; gap: 10px; width: 100%; padding: 7px 10px; border: 0; background: none; border-radius: 8px; font: inherit; font-size: 14px; color: var(--ink); cursor: pointer; text-align: left; }
.copt i { width: 16px; height: 16px; border-radius: 50%; box-shadow: 0 0 0 1px var(--line-2); flex: none; }
.copt:hover, .copt:focus-visible { background: var(--surface-2); outline: none; }
.copt:focus-visible { box-shadow: inset 0 0 0 2px var(--vert); }
.copt[aria-selected="true"] { font-weight: 700; background: var(--green-bg); }
.pcard-f { flex-wrap: wrap; }
.csel { flex: none; white-space: nowrap; }
.mfoot { flex-wrap: wrap; }

/* Blocs repliables : un clic sur l'en-tête réduit le contenu */
[data-fold-body][hidden] { display: none !important; }
.fold-head { cursor: pointer; user-select: none; }
.fold-head:focus-visible { outline: 3px solid rgba(86, 138, 151, .55); outline-offset: 2px; border-radius: 8px; }
.fold-chev { display: inline-flex; margin-left: auto; color: var(--ink-3); transition: transform .18s ease; flex: none; }
.fold-chev .ico { width: 18px; height: 18px; }
.fold-head[aria-expanded="false"] .fold-chev { transform: rotate(-90deg); }
.fold-head:hover .fold-chev { color: var(--vf); }
.card-head.fold-head:hover { background: var(--surface-2); border-radius: var(--r) var(--r) 0 0; }
.card-head.fold-head[aria-expanded="false"] { padding-bottom: 16px; }
h2.fold-head, h3.fold-head { display: flex; align-items: center; gap: 10px; }
.card-pad > .fold-head[aria-expanded="false"], .card-pad > h3.fold-head[aria-expanded="false"] { margin-bottom: 0 !important; }
.pcard-h.fold-head:hover { filter: brightness(.97); }
.pcard-h .fold-chev { margin-left: 4px; }
.pcard-h[aria-expanded="false"] { border-bottom: 0; }
.phase-h.fold-head { padding: 2px 0; }
.phase-h .fold-chev { margin-left: 0; margin-right: 2px; }
.phase-sum { display: none; flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.phase-h[aria-expanded="false"] .phase-sum { display: inline; }
.phase-h[aria-expanded="false"] + .phase-grid { display: none; }
.grp-h.fold-head { padding: 6px 2px; }
.grp-h.fold-head .fold-chev { margin-left: 8px; }
.fsec { border: 1px solid var(--line); border-radius: var(--r-sm); margin: 10px 0; background: var(--surface); }
.fsec > summary { cursor: pointer; padding: 10px 14px; font-weight: 600; color: var(--vf); list-style: none; display: flex; align-items: center; gap: 8px; }
.fsec > summary::-webkit-details-marker { display: none; }
.fsec > summary::before { content: "▸"; color: var(--ink-3); transition: transform .15s; }
.fsec[open] > summary::before { transform: rotate(90deg); }
.fsec > :not(summary) { margin-left: 14px; margin-right: 14px; }
.fsec[open] { padding-bottom: 6px; }
.card-head.fold-head .more { margin-left: auto; }
.card-head.fold-head .more + .fold-chev { margin-left: 12px; }
.phase-h { justify-content: flex-start; gap: 10px; }
.phase-h [data-ptcount] { margin-left: auto; white-space: nowrap; }
.phase-h .chk { flex: none; }
.hero-pdf { margin-left: auto; background: rgba(255, 255, 255, .85); }
.hero-pdf:hover { background: #fff; }

/* ── Module Projet : petit / grand ── */
.ptype { display: inline-block; font-size: 11px; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; padding: 3px 10px; border-radius: 999px; white-space: nowrap; }
.ptype.small { background: #fff3a0; color: #5c4b00; }
.ptype.large { background: var(--vf); color: var(--cream); }
.ptype-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; }
.ptype-card { border: 2px solid var(--line); border-radius: var(--r); padding: 18px; display: flex; flex-direction: column; gap: 10px; background: var(--surface); }
.ptype-card.small:hover { border-color: var(--dore); }
.ptype-card.large:hover { border-color: var(--vf); }
.ptype-card p { margin: 0; font-weight: 600; }
.ptype-card ul { margin: 0 0 6px 18px; padding: 0; color: var(--ink-2); font-size: 14px; flex: 1; }
.facts-row { display: grid; grid-template-columns: repeat(auto-fit, minmax(130px, 1fr)); gap: 14px; }
.facts-row .k, .state-grid .k, .next-ms .k, .card .k { font-size: 11px; letter-spacing: .06em; text-transform: uppercase; color: var(--ink-3); font-weight: 700; display: block; margin-bottom: 3px; }
.state-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 10px; margin-top: 14px; }
.state-grid > div { background: var(--surface-2); border: 1px solid var(--line); border-radius: var(--r-sm); padding: 10px 12px; }
.state-grid b { font-family: var(--font-title); font-size: 17px; color: var(--vf); }
.next-ms { margin-top: 12px; padding: 10px 12px; border-left: 4px solid var(--vert); background: var(--surface-2); border-radius: 0 var(--r-sm) var(--r-sm) 0; }
.hdot { display: inline-block; width: 11px; height: 11px; border-radius: 50%; background: #b8bdb0; margin-right: 2px; vertical-align: -1px; }
.hdot.ok { background: #7aa03a; } .hdot.warn { background: #f0a31a; } .hdot.bad { background: #d0583f; }
.health-main { display: flex; align-items: center; gap: 8px; font-size: 18px; margin-bottom: 10px; }
.health-main .hdot { width: 16px; height: 16px; }
.late { color: var(--red); font-weight: 600; }
.cad-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px 18px; }
.cad { display: flex; gap: 10px; align-items: flex-start; padding: 4px 0; }
.cad-ic { display: inline-flex; flex: none; margin-top: 2px; }
.cad.ok .cad-ic { color: #4f7a17; } .cad.ko .cad-ic { color: #b97600; }
.smart { display: flex; flex-wrap: wrap; gap: 8px 14px; font-size: 13px; color: var(--ink-3); }
.smart span { display: inline-flex; align-items: center; gap: 4px; } .smart span.ok { color: #3f6a0f; font-weight: 600; }
.smart .ico { width: 14px; height: 14px; }
.phasebar { display: flex; gap: 4px; flex-wrap: wrap; font-size: 12px; }
.phasebar span { display: inline-flex; align-items: center; gap: 5px; padding: 3px 9px; border-radius: 999px; background: var(--surface-2); color: var(--ink-3); border: 1px solid var(--line); }
.phasebar i { width: 8px; height: 8px; border-radius: 50%; background: #cfd3c4; }
.phasebar .past { color: var(--ink); } .phasebar .past i { background: var(--vert); }
.phasebar .now { background: var(--vc); color: var(--vf); font-weight: 700; border-color: var(--vert); } .phasebar .now i { background: var(--vf); }
.tri { width: 100%; max-width: 280px; display: block; margin: 0 auto; height: auto; }
.tri-warn { margin-top: 6px; font-size: 13px; color: var(--ink); } .tri-warn .ico { width: 14px; height: 14px; color: #b97600; vertical-align: -2px; }
.rows { display: flex; flex-direction: column; gap: 6px; }
.frow { display: flex; align-items: center; gap: 8px; flex-wrap: nowrap; }
.frow.wrap { flex-wrap: wrap; }
.frow.head { font-size: 11px; letter-spacing: .06em; text-transform: uppercase; color: var(--ink-3); font-weight: 700; }
.frow.done .cell { text-decoration: line-through; color: var(--ink-3); }
.frow .f-date { width: 150px; flex: none; }
.frow .amt { width: 110px; flex: none; }
.frow .cell { min-width: 0; width: 100%; }
.frow.bl .cell, .frow .cell { padding: 7px 10px; }
.ptl { display: flex; align-items: center; gap: 10px; padding: 7px 0; border-bottom: 1px solid var(--line); }
.ptl:last-of-type { border-bottom: 0; }
.ptl.done .linkbtn { text-decoration: line-through; color: var(--ink-3); }
.tick { width: 22px; height: 22px; border-radius: 50%; border: 2px solid var(--line-2); background: #fff; display: inline-grid; place-items: center; cursor: pointer; flex: none; color: #fff; padding: 0; }
.ptl.done .tick { background: var(--vert); border-color: var(--vert); }
.tick .ico { width: 13px; height: 13px; stroke-width: 3; }
.linkbtn.plain { text-decoration: none; font-weight: 500; color: var(--ink); text-align: left; }
.linkbtn.plain:hover { color: var(--vf); text-decoration: underline; }
.act-line { display: flex; gap: 10px; padding: 8px 0; border-bottom: 1px solid var(--line); align-items: flex-start; }
.act-line:last-child { border-bottom: 0; }
.risk-card { border: 1px solid var(--line); border-radius: var(--r-sm); padding: 12px; display: flex; flex-direction: column; gap: 10px; background: var(--surface); }
.risk-card.closed { opacity: .65; }
.risk-f { display: grid; grid-template-columns: repeat(auto-fit, minmax(130px, 1fr)); gap: 10px; }
.smap { display: grid; grid-template-columns: 28px 1fr; grid-template-rows: auto 22px; gap: 6px; }
.smap-y { writing-mode: vertical-rl; transform: rotate(180deg); text-align: center; font-size: 12px; color: var(--ink-3); font-weight: 700; }
.smap-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 6px; }
.smap-c { min-height: 70px; border: 1px dashed var(--line-2); border-radius: var(--r-sm); padding: 6px; display: flex; flex-direction: column; gap: 4px; background: var(--surface-2); }
.smap-c.on { background: #eef5d6; border-style: solid; border-color: var(--vert); }
.smap-c span { font-size: 12.5px; font-weight: 600; background: #fff; border-radius: 6px; padding: 2px 8px; }
.smap-x { grid-column: 2; text-align: center; font-size: 12px; color: var(--ink-3); font-weight: 700; }
.convert { background: #fffbe6; border-color: #f0dd7a; }
.lform { display: grid; grid-template-columns: minmax(0, 1fr) 280px; gap: 20px; align-items: start; }
.lform-side { position: sticky; top: 0; background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-sm); padding: 14px; font-size: 14px; }
.lform-side h4 { font-size: 12px; letter-spacing: .08em; text-transform: uppercase; color: var(--ink-3); margin: 0 0 6px; }
.tform .frow { margin-bottom: 6px; }
.tform .frow .pdue { width: 150px; flex: none; }
@media (max-width: 900px) { .lform { grid-template-columns: minmax(0, 1fr); } .lform-side { position: static; } .cad-grid { grid-template-columns: minmax(0, 1fr); } .state-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 640px) { .ptype-grid { grid-template-columns: minmax(0, 1fr); } .frow { flex-wrap: wrap; } .frow .f-date, .frow .amt { width: 100%; } }
/* Gantt compact (aperçu dans la vue d'ensemble) : même diagramme, hauteur réduite, légende allégée */
.gt.compact .gt-bar { height: 10px; }
.gt.compact + .gt-legend { display: none; }

/* ── Cartes de projet (liste) : en-tête, corps, pied ── */
.pjcard { display: flex; flex-direction: column; overflow: hidden; }
.pjcard-h { display: flex; flex-direction: column; gap: 6px; padding: 14px 18px 12px; background: linear-gradient(120deg, var(--vc), #f3efc9); text-decoration: none; color: var(--ink); min-height: 112px; }
.pjcard-h:hover { filter: brightness(.97); }
.pjcard-h h3 { font-size: 18px; line-height: 1.25; }
.pj-top { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.pjcard-b { padding: 14px 18px 8px; display: flex; flex-direction: column; gap: 12px; flex: 1; }
.pjfacts { display: grid; grid-template-columns: minmax(0, 1.3fr) auto auto; gap: 10px 16px; align-items: start; }
.pjfacts .k { display: block; font-size: 11px; letter-spacing: .06em; text-transform: uppercase; color: var(--ink-3); font-weight: 700; margin-bottom: 3px; }
.pjfacts .t1 { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; min-width: 0; }
.pjline { min-height: 2.6em; line-height: 1.3; color: var(--ink-2); }
.pjcard-f { padding: 8px 14px 12px 18px; display: flex; align-items: center; gap: 8px; border-top: 1px solid var(--line); }
.grid.cols-3 { align-items: stretch; }

/* ── Budget financier ── */
.bl-table .frow { gap: 8px; margin-bottom: 6px; }
.bl-table .amt { width: 110px; flex: none; }
.bl-table .gap { text-align: right; font-variant-numeric: tabular-nums; padding-right: 6px; }
.bsum { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
.bsum > div { background: var(--surface-2); border: 1px solid var(--line); border-radius: var(--r-sm); padding: 9px 12px; }
.bsum .k { display: block; font-size: 11px; letter-spacing: .06em; text-transform: uppercase; color: var(--ink-3); font-weight: 700; }
.bsum b { font-family: var(--font-title); font-size: 16px; color: var(--vf); }
.bsum b.late { color: var(--red); }
.bcat { display: flex; gap: 12px; padding: 4px 0; font-size: 14px; }
.bcat span:not(.grow) { width: 74px; text-align: right; font-variant-numeric: tabular-nums; }
.bcat.head { font-size: 11px; letter-spacing: .06em; text-transform: uppercase; color: var(--ink-3); font-weight: 700; }

/* ── Matrice des risques 5 × 5 ── */
.risks-top { align-items: stretch; }
.rmatrix { display: grid; grid-template-columns: 26px minmax(0, 1fr); grid-template-rows: auto 22px; gap: 4px; }
.rm-y { writing-mode: vertical-rl; transform: rotate(180deg); text-align: center; font-size: 12px; font-weight: 700; color: var(--ink-3); }
.rm-x { grid-column: 2; text-align: center; font-size: 12px; font-weight: 700; color: var(--ink-3); }
.rm-grid { display: grid; grid-template-columns: 64px repeat(5, minmax(0, 1fr)); gap: 4px; }
.rm-ax { display: flex; flex-direction: column; justify-content: center; align-items: center; font-weight: 700; font-size: 14px; line-height: 1.1; }
.rm-ax small { font-size: 10px; font-weight: 500; color: var(--ink-3); text-align: center; }
.rm-ax.x { min-height: 34px; }
.rm-c { min-height: 52px; border-radius: 8px; display: flex; flex-wrap: wrap; align-content: center; justify-content: center; gap: 4px; padding: 4px; }
.rm-c.ok { background: #dcebee; } .rm-c.warn { background: #fde3a6; } .rm-c.bad { background: #f5b8aa; }
.rnum { border: 0; border-radius: 999px; background: var(--vf); color: #fff; font: inherit; font-size: 12px; font-weight: 700; padding: 3px 9px; cursor: pointer; }
.rnum:hover { background: #0a4d33; transform: scale(1.06); }
.rnum.static { cursor: default; display: inline-block; }
.rnum.static:hover { transform: none; }
.rm-legend { display: flex; flex-wrap: wrap; gap: 8px 16px; margin-top: 10px; font-size: 12.5px; color: var(--ink-3); }
.rm-legend i { display: inline-block; width: 12px; height: 12px; border-radius: 3px; margin-right: 6px; vertical-align: -1px; }
.rm-legend i.ok { background: #dcebee; } .rm-legend i.warn { background: #fde3a6; } .rm-legend i.bad { background: #f5b8aa; }
.score { display: inline-grid; place-items: center; min-width: 32px; height: 26px; border-radius: 8px; font-weight: 700; font-size: 13px; }
.score.ok { background: #dcebee; color: #2f4a14; } .score.warn { background: #fde3a6; color: #6a4300; } .score.bad { background: #f5b8aa; color: #7a2412; }
table.rk td { vertical-align: middle; }
table.rk tr.closed td { opacity: .55; }
table.rk tr.flash td { background: #fff8c9 !important; transition: background .3s; }

/* ── Équipe : le rôle ne déborde plus sur le nom ── */
.member-row .grow { min-width: 0; overflow: hidden; }
.member-row .grow b, .member-row .grow .small { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.member-row select.cell, .member-row .badge { flex: none; width: 160px; }
.member-row .badge { justify-content: center; width: auto; min-width: 160px; }
@media (max-width: 640px) { .pjfacts { grid-template-columns: minmax(0, 1fr) auto; } .member-row select.cell { width: 100%; order: 3; } .bsum { grid-template-columns: minmax(0, 1fr); } .rm-grid { grid-template-columns: 46px repeat(5, minmax(0, 1fr)); } .rm-ax small { display: none; } }
.bl-table { overflow-x: auto; padding-bottom: 4px; }
.bl-table .frow { min-width: 720px; }
.bl-table .frow .grow { min-width: 200px; }
.sect-title { font-size: 18px; margin: 26px 0 12px; color: var(--vf); }
.rh-table .frow { min-width: 640px; }
.rh-table .frow .grow { min-width: 180px; }
.bcat .grow .avatar { width: 24px; height: 24px; text-align: center; vertical-align: middle; }
.bcat .grow { width: auto; text-align: left; }

/* ── Catalogue de KPI : icône (i) et infobulle de méthode d'évaluation ── */
.kpi-info { display: inline-grid; place-items: center; width: 22px; height: 22px; padding: 0; border: 0; border-radius: 50%; background: none; color: var(--ink-3); cursor: help; vertical-align: -5px; flex: none; }
.kpi-info svg { width: 18px; height: 18px; }
.kpi-info:hover, .kpi-info:focus-visible { color: var(--vf); background: var(--vc); outline: none; }
.kpi-info:focus-visible { box-shadow: 0 0 0 3px rgba(86, 138, 151, .5); }
.info-pop { position: fixed; z-index: 2100; width: min(340px, calc(100vw - 16px)); background: #fff; border: 1px solid var(--line-2); border-radius: 12px; box-shadow: var(--shadow-lg); padding: 12px 14px; font-size: 13.5px; line-height: 1.4; color: var(--ink); }
.info-pop b { display: block; font-family: var(--font-title); font-size: 15px; margin-bottom: 4px; color: var(--vf); }
.info-pop p { margin: 0 0 8px; }
.info-pop .ip-k { font-size: 11px; letter-spacing: .06em; text-transform: uppercase; color: var(--ink-3); font-weight: 700; margin-bottom: 2px; }
.info-pop .ip-meta { font-size: 12px; color: var(--ink-3); border-top: 1px solid var(--line); padding-top: 6px; }
.kpi-sum { margin-top: 10px; display: flex; align-items: flex-start; gap: 8px; color: var(--ink-2); line-height: 1.4; padding: 8px 10px; background: var(--surface-2); border-radius: var(--r-sm); }
.cat-row .grow .small { line-height: 1.35; }

/* ── Documents : liens kDrive ── */
.doc-folder { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; padding: 10px 12px; background: var(--surface-2); border: 1px solid var(--line); border-radius: var(--r-sm); margin-bottom: 12px; }
.doc-folder-form { display: flex; gap: 8px; flex-wrap: wrap; margin-bottom: 12px; }
.doc-folder-form .input { flex: 1; min-width: 200px; }
.doc-add { display: grid; grid-template-columns: minmax(0, 1.1fr) minmax(0, 1.4fr) minmax(0, .9fr) auto; gap: 8px; margin-bottom: 8px; align-items: center; }
.doc-cat { margin: 14px 0 2px; font-size: 11px; letter-spacing: .08em; text-transform: uppercase; color: var(--ink-3); font-weight: 700; }
.doc-line { flex-wrap: wrap; }
.doc-title { text-decoration: none; color: var(--vf); font-weight: 600; }
.doc-title:hover { text-decoration: underline; }
.doc-warn { margin: 8px 0; padding: 8px 10px; border-radius: var(--r-sm); background: #fff3e0; border: 1px solid #f0cf94; color: #6a4300; }
.doc-warn .ico { width: 14px; height: 14px; vertical-align: -2px; }
.legacy { margin-top: 16px; padding: 10px 12px; border: 1px dashed #d0a24a; border-radius: var(--r-sm); background: #fffaf0; }
@media (max-width: 760px) { .doc-add { grid-template-columns: minmax(0, 1fr); } }

/* ── Administration : accès aux modules ── */
.modtable th.mod-h { height: 130px; padding: 4px 2px; vertical-align: bottom; text-align: center; font-size: 11px; }
.modtable th.mod-h span { writing-mode: vertical-rl; transform: rotate(180deg); display: inline-block; white-space: nowrap; }
.modtable td.ctr { text-align: center; }
.modtable td, .modtable th { padding-left: 6px; padding-right: 6px; }
.modtable input[type="checkbox"] { width: 18px; height: 18px; accent-color: var(--vf); cursor: pointer; }
.modtable tbody tr { cursor: default; }
.modtable .mod-who { min-width: 160px; }

/* ── Module Finances ── */
.ftiles { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 12px; }
.ftiles.compact { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; }
.ftile { display: flex; flex-direction: column; gap: 2px; padding: 12px 14px; background: var(--surface); border: 1px solid var(--line); border-radius: var(--r); box-shadow: var(--shadow); }
.ftiles.compact .ftile { box-shadow: none; background: var(--surface-2); padding: 9px 12px; }
.ftile .k { font-size: 11px; letter-spacing: .07em; text-transform: uppercase; color: var(--ink-3); font-weight: 700; }
.ftile b { font-family: var(--font-title); font-size: 19px; color: var(--vf); line-height: 1.2; }
.ftile.bad b { color: var(--red); }
.sbar { display: flex; height: 16px; border-radius: 999px; overflow: hidden; background: #ebe8d6; }
.sbar i, .sbar-legend i { display: block; height: 100%; }
.s-paid { background: var(--vf); } .s-used { background: var(--vert); } .s-acc { background: var(--dore); } .s-free { background: #ebe8d6; }
.sbar-legend { display: flex; flex-wrap: wrap; gap: 6px 16px; margin-top: 8px; color: var(--ink-3); }
.sbar-legend span { display: inline-flex; align-items: center; gap: 6px; }
.sbar-legend i { width: 12px; height: 12px; border-radius: 3px; box-shadow: inset 0 0 0 1px rgba(0,0,0,.08); }
table.ovt td.n, table.fl td.n, table.sg td.n { text-align: right; font-variant-numeric: tabular-nums; white-space: nowrap; padding-right: 10px; }
table.ovt th:not(:first-child) { text-align: right; }
table.ovt th:last-child { text-align: left; }
table.ovt tr.ov td { vertical-align: middle; }
table.ovt tr.l0 td.ov-name { font-size: 15px; }
table.ovt tr.l1 { background: #fbfaf2; }
table.ovt tr.l1 td { color: var(--ink-2); }
table.ovt .ov-ind { color: var(--ink-3); margin-right: 4px; }
table.ovt tr.grp td { background: var(--surface-2); font-size: 11px; letter-spacing: .08em; text-transform: uppercase; font-weight: 700; color: var(--ink-3); padding: 8px 12px; }
table.ovt td.ov-bar { min-width: 130px; }
table.ovt .progress.bad > i { background: var(--red); }
.xt.soft .cell.n, table.ovt .cell.n { text-align: right; font-variant-numeric: tabular-nums; }
table.ovt td.env { width: 120px; }
table.fl td.gap { font-weight: 600; }
table.sg .share { height: 10px; border-radius: 999px; background: #ebe8d6; overflow: hidden; margin-bottom: 3px; }
table.sg .share i { display: block; height: 100%; background: var(--vert); border-radius: 999px; }
table.sg tr.tot td { border-top: 2px solid var(--line-2); }
.fl-scope a { font-weight: 600; text-decoration: none; color: var(--vf); }
.fl-scope a:hover { text-decoration: underline; }
.fdef dl.kv dt { font-size: 12px; }
.fdef dl.kv dd { font-size: 13px; }
@media (max-width: 640px) { .ftiles { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
table.ovt th:first-child { text-align: left; }

/* ── Planning par phases (Gantt du projet) ── */
.gt-row.l3 .gt-label { padding-left: 74px; font-size: 13px; color: var(--ink-2); }
.gt-title.gt-phase { font-weight: 700; color: var(--vf); display: inline-flex; align-items: center; gap: 6px; }
.gt-title.gt-phase .ico { width: 13px; height: 13px; color: var(--vert); }
.gt-bar.phase { height: 10px; background: #dfe3cc; border-radius: 5px; box-shadow: inset 0 0 0 1.5px #c3caa6; }
.gt-bar.phase .gt-prog { background: #7aa03a; border-radius: 5px; }
.gt-bar.phase.st-done { background: #7aa03a; }
.gt-bar.phase.st-late { box-shadow: inset 0 0 0 1.5px var(--red); }
.gt-bar.phase.st-now { box-shadow: inset 0 0 0 1.5px var(--dore); }
@media (max-width: 760px) { .gt-row.l3 .gt-label { padding-left: 46px; } }

/* ── Éditeur de séance : plus léger, sommaire en arborescence, blocs de texte blancs ── */
.mt-t { background: #f1efe1; border-radius: 14px; padding: 12px 14px 14px; margin-bottom: 12px; }
.mt-t.d1 { background: #f6f4ea; border-left: 3px solid #c4d5d9; margin-left: 26px; padding-left: 14px; }
.mt-fold { border: 0; background: none; padding: 2px; border-radius: 6px; color: var(--ink-3); cursor: pointer; display: inline-flex; flex: none; }
.mt-fold .fold-chev { margin: 0; }
.mt-fold:hover { background: rgba(31, 63, 71, .07); color: var(--vf); }
.mt-th { gap: 8px; }
.mt-chips { opacity: .8; }
.mt-chips .chipf { font-size: 12.5px; }
.mt-t:hover .mt-chips, .mt-th:focus-within .mt-chips { opacity: 1; }
.mt-body .bk-p, .mt-body .bk-view { background: #fff; border: 1px solid #e3dfcb; border-radius: 10px; padding: 9px 13px; margin: 6px 0; }
.mt-body .bk-p:hover { background: #fff; border-color: #c4d5d9; }
.mt-body .bk-p:focus { background: #fff; border-color: var(--vert); outline: 2px solid rgba(86, 138, 151, .4); }
.mt-body .bk-new { background: rgba(255, 255, 255, .6); border-style: dashed; }
.mt-tip { background: none; border: 0; padding: 0 2px; margin: 0 0 10px; font-size: 13px; color: var(--ink-3); display: flex; gap: 8px; align-items: center; }
.mt-tip .ico { width: 14px; height: 14px; color: var(--vert); }
.mt-adds { display: flex; flex-wrap: wrap; gap: 8px; }
.mt-add-topic.alt { background: transparent; }
.tr-head { display: flex; align-items: baseline; justify-content: space-between; gap: 8px; padding-right: 6px; }
.mt-toc ol.tr { padding: 0; }
.tr-row { display: flex; align-items: center; gap: 2px; }
.tr-row a { flex: 1; min-width: 0; }
.tr-chev { border: 0; background: none; padding: 2px; width: 20px; height: 20px; border-radius: 5px; color: var(--ink-3); cursor: pointer; flex: none; display: inline-flex; align-items: center; justify-content: center; }
.tr-chev.sp { cursor: default; }
.tr-chev:hover:not(.sp) { background: #ece9d8; }
.tr-chev .fold-chev { margin: 0; }
.tr-chev .fold-chev .ico { width: 15px; height: 15px; }
.mt-toc a .ico { width: 15px; height: 15px; flex: none; align-self: center; color: var(--vert); }
.mt-toc a.d1 .ico { color: var(--ink-3); }
.tr-kids { list-style: none; margin: 0 0 4px 11px; padding: 0 0 0 8px; border-left: 1.5px solid #e1ddc8; }
.mt-toc a.d1 { padding-left: 8px; }
.imp-row { display: flex; gap: 10px; align-items: flex-start; padding: 9px 4px; border-bottom: 1px solid var(--line); cursor: pointer; }
.imp-row input { margin-top: 4px; width: 17px; height: 17px; accent-color: var(--vf); }
.imp-list[hidden] { display: none; }
@media (max-width: 760px) { .mt-t.d1 { margin-left: 10px; } }
.bk-row { flex-wrap: wrap; }
.bk-row .bk { flex: 1 1 200px; min-width: 160px; width: auto; }
.bk-row .bk-txt { flex: 1 1 200px; min-width: 160px; }
.mt-t { min-width: 0; }
.mt-doc { min-width: 0; }

/* ── Planning par phases ── */
.phase-card { padding: 0; overflow: hidden; }
.phase-card.loose { padding: 16px 18px; }
.phase-hd { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; padding: 12px 16px; background: linear-gradient(120deg, var(--vc), #f3efc9); border-left: 6px solid #c4d5d9; }
.phase-card.now .phase-hd { border-left-color: var(--dore); }
.phase-card.done .phase-hd { border-left-color: var(--vert); background: #eef3dc; }
.phase-card.late .phase-hd { border-left-color: var(--red); }
.phase-hd .fold-chev { margin-left: 0; }
.ph-n { width: 26px; height: 26px; border-radius: 50%; background: var(--vf); color: #fff; display: inline-grid; place-items: center; font-weight: 700; font-size: 13px; flex: none; }
.ph-name { flex: 1 1 180px; min-width: 140px; font-weight: 700; font-size: 16px; background: transparent !important; border-color: transparent; }
.ph-name:hover:not(:disabled) { background: rgba(255, 255, 255, .6) !important; }
.ph-name:focus { background: #fff !important; }
.ph-dates { display: inline-flex; align-items: center; gap: 4px; }
.ph-dates .cell { width: 138px; background: rgba(255, 255, 255, .55); }
.ph-prog { display: inline-flex; align-items: center; gap: 8px; min-width: 120px; }
.ph-prog .progress { width: 70px; }
.ph-prog b { font-size: 13px; width: 40px; }
.ph-done { font-size: 13px; }
.phase-bd { padding: 14px 16px 16px; }
.ph-cols { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.5fr); gap: 20px; }
.ph-sub { margin-bottom: 8px; gap: 8px; }
.ptr { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; margin-bottom: 6px; }
.ptr input[type="checkbox"] { width: 18px; height: 18px; accent-color: var(--vf); flex: none; }
.ptr-t { flex: 1 1 150px; min-width: 120px; }
.ptr-w { width: 120px; flex: none; }
.ptr-d { width: 138px; flex: none; }
.ptr-p { width: 130px; flex: none; }
.ptr-flag { color: var(--dore); display: inline-flex; flex: none; }
.ptr-flag .ico { width: 15px; height: 15px; }
.ptr.done .ptr-t { text-decoration: line-through; color: var(--ink-3); }
.ph-add { display: flex; gap: 6px; margin-top: 6px; }
.ph-add .input { flex: 1; }
.phasebar .late { border-color: var(--red); color: #8c2a17; } .phasebar .late i { background: var(--red); }
.phasebar small { opacity: .75; margin-left: 2px; }
@media (max-width: 900px) { .ph-cols { grid-template-columns: minmax(0, 1fr); } }

/* ── Cadrage du projet : vue réduite = synthèse, vue développée = champs à remplir ── */
.cadre-hd { display: flex; align-items: center; gap: 10px; cursor: pointer; margin-bottom: 12px; }
.cadre-hd h3 { margin: 0; }
.cadre-hd .small { flex: 1; }
.cadre-card:has(.cadre-hd[aria-expanded="true"]) .cadre-sum { display: none; }

/* ── Ligne de tâche unique (tous les modules) ── */
.tline { display: flex; align-items: center; gap: 10px; padding: 7px 10px; margin-bottom: 5px; background: #fff; border: 1px solid var(--line); border-radius: 8px; cursor: pointer; min-height: 40px; }
.tline:hover, .tline:focus-visible { border-color: var(--vf); box-shadow: 0 1px 4px rgba(0,0,0,.07); outline: none; }
.tline[draggable="true"] { cursor: grab; }
.tline.dragging { opacity: .45; }
.tline.done .tl-t { text-decoration: line-through; color: var(--ink-3); }
.tline .tick { width: 22px; height: 22px; border-radius: 50%; border: 2px solid var(--line-2); background: #fff; display: inline-grid; place-items: center; cursor: pointer; flex: none; color: #fff; padding: 0; }
.tline.done .tick { background: var(--vert); border-color: var(--vert); }
.tline .tick .ico { width: 13px; height: 13px; stroke-width: 3; }
.tl-t { flex: 1 1 auto; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-weight: 500; }
.tl-w { display: inline-flex; align-items: center; gap: 6px; flex: none; font-size: 13px; color: var(--ink-2); max-width: 150px; overflow: hidden; white-space: nowrap; }
.tl-d { flex: none; font-size: 13px; min-width: 56px; text-align: right; }
.ph-tasks { min-height: 44px; border-radius: 8px; padding: 2px; }
.ph-tasks.over, .ph-tasks.drop-ok { outline: 2px dashed var(--vf); outline-offset: 1px; background: rgba(0,0,0,.02); }
.ph-empty-t { padding: 10px 6px; }
@media (max-width: 600px) { .tl-w .hide-sm { display: none; } }

/* ── Ligne de tâche : style « liste » (case carrée, retard, étiquette, priorité, avatar) ── */
.tline { border-radius: 6px; padding: 6px 10px; }
.tline .tick { border-radius: 4px; border-width: 1.5px; width: 20px; height: 20px; }
.tl-late { flex: none; background: #fbe1dc; color: var(--red); font-size: 12px; font-weight: 700; padding: 2px 8px; border-radius: 99px; }
.tl-ctx { flex: none; max-width: 160px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: 12px; padding: 2px 10px; border-radius: 6px; background: #fbe8ef; color: #b0245a; }
.tl-pri { flex: none; display: inline-flex; }
.tl-pri.red { color: var(--red); } .tl-pri.orange { color: #e8821a; }
.tl-pri .ico { width: 16px; height: 16px; }
.tl-w { max-width: none; }
@media (max-width: 600px) { .tl-ctx { display: none; } }

/* ── Tiroir de tâche détaillé ── */
.tk-top { display: flex; align-items: center; gap: 10px; padding: 10px 14px; border-bottom: 1px solid var(--line); }
.drawer-body.tk { padding: 16px 18px 28px; }
.tk-title { width: 100%; border: 0; resize: none; font: 600 20px/1.3 var(--font-body); color: var(--ink); background: transparent; padding: 2px 0; overflow: hidden; field-sizing: content; }
.tk-title:focus { outline: 2px solid var(--vf); border-radius: 4px; }
.tk-chips { display: flex; flex-wrap: wrap; gap: 6px; margin: 8px 0 10px; }
.tk-chip { display: inline-flex; align-items: center; gap: 6px; font-size: 13px; padding: 3px 10px; border-radius: 6px; background: #fbe8ef; color: #b0245a; }
.tk-chip.alt { background: var(--bg-2, #f0eee8); color: var(--ink-2); }
.tk-chip .ico { width: 14px; height: 14px; }
.tk-row { display: flex; align-items: center; gap: 14px; padding: 9px 2px; }
.tk-row.top { align-items: flex-start; }
.tk-ic { color: var(--ink-3); display: inline-flex; flex: none; width: 22px; justify-content: center; }
.tk-ic .ico { width: 18px; height: 18px; }
.tk-val { flex: 1; min-width: 0; display: flex; align-items: center; gap: 10px; }
.tk-lab { color: var(--ink-3); font-size: 13px; min-width: 56px; }
.tk-in { border: 0; background: transparent; font: 600 14px var(--font-body); color: var(--ink); padding: 4px 6px; border-radius: 6px; max-width: 100%; }
select.tk-in, input.tk-in { cursor: pointer; }
.tk-in:hover, .tk-in:focus { background: var(--bg-2, #f0eee8); outline: none; }
.tk-desc { width: 100%; resize: vertical; font-weight: 400; }
.tk-block { margin-top: 16px; }
.tk-h { display: flex; align-items: center; gap: 8px; font-weight: 600; font-size: 14px; margin-bottom: 8px; color: var(--ink-2); }
.tk-h .ico { width: 16px; height: 16px; }
.tk-people { padding-top: 6px; }

/* ── Séance : cartes aérées + blocs avancés (menu « / ») ── */
.mt-t.d0 { background: #fff; border: 1px solid var(--line); border-radius: 12px; box-shadow: 0 1px 3px rgba(30, 40, 44, .06); padding: 14px 20px 16px; margin-bottom: 18px; }
.mt-t.d0 > .mt-th { padding-bottom: 8px; border-bottom: 1px solid #f0eddc; margin-bottom: 8px; }
.mt-t.d1 { background: #fff; border: 1px solid var(--line); border-left: 3px solid var(--vert); border-radius: 10px; padding: 10px 16px 12px; margin-bottom: 12px; }
.mt-body { margin-left: 0; padding: 4px 4px 2px; }
.slash-menu { position: fixed; z-index: 90; display: none; width: 250px; max-height: 340px; overflow-y: auto; background: #fff; border: 1px solid var(--line); border-radius: 10px; box-shadow: 0 8px 28px rgba(0,0,0,.18); padding: 6px; }
.sm-h { font-size: 12px; font-weight: 700; color: var(--ink-3); padding: 8px 8px 4px; }
.sm-i { display: flex; align-items: center; gap: 10px; padding: 7px 8px; border-radius: 6px; cursor: pointer; font-size: 14px; }
.sm-i .ico { width: 18px; height: 18px; color: var(--vf); flex: none; }
.sm-i.on, .sm-i:hover { background: #e8f0f2; }
.bk-box { position: relative; display: flex; align-items: flex-start; gap: 10px; margin: 8px 0; padding: 8px 12px; border-radius: 10px; background: #faf9f3; border: 1px solid #ece8d4; }
.bk-box .bk { flex: 1; }
.bk-ic { color: var(--vf); flex: none; margin-top: 4px; display: inline-flex; }
.bk-note { background: #fff6c9; border-color: #efdf8a; }
.bk-quote { background: transparent; border: 0; border-left: 4px solid var(--vert); border-radius: 0; font-style: italic; padding-left: 16px; }
.bk-codebox { background: #2a2f22; border-color: #2a2f22; }
.bk-codebox .bk, .bk-codebox pre { color: #e8f0cf; font-family: ui-monospace, Menlo, monospace; font-size: 13px; margin: 0; white-space: pre-wrap; }
.bk-codebox .bk:hover, .bk-codebox .bk:focus { background: transparent; }
.bk-int { background: #fff; }
.bk-whosel { border: 1px solid var(--line); border-radius: 8px; padding: 4px 6px; font: inherit; font-size: 13px; background: #fff; flex: none; max-width: 150px; }
.bk-vote { background: #f3eefb; border-color: #dccff2; }
.vote-row { display: flex; flex-wrap: wrap; gap: 12px; align-items: center; margin-top: 6px; padding-left: 8px; }
.vote-n { display: inline-flex; gap: 6px; align-items: center; font-size: 13.5px; }
.bk-num { width: 64px; padding: 3px 6px; border: 1px solid var(--line); border-radius: 6px; font: inherit; }
.bk-list { position: relative; margin: 4px 0; }
.bk-li { display: flex; align-items: center; gap: 8px; padding: 1px 4px; }
.li-m { width: 22px; text-align: right; color: var(--ink-3); flex: none; }
.li-c { flex: none; width: 18px; height: 18px; accent-color: var(--vf); }
span.li-c { border: 2px solid var(--line-2); border-radius: 4px; display: inline-grid; place-items: center; width: 18px; height: 18px; }
span.li-c.on-true { background: var(--vert); border-color: var(--vert); color: #fff; }
span.li-c .ico { width: 12px; height: 12px; stroke-width: 3; }
.bk-it { flex: 1; border: 0; background: transparent; font: inherit; font-size: 15px; padding: 4px 6px; border-radius: 6px; color: var(--ink); }
.bk-it:hover { background: #faf9f3; } .bk-it:focus { background: #fff; outline: 2px solid rgba(86, 138, 151, .55); }
.bk-li.done .bk-it, .bk-li.done .bk-txt { text-decoration: line-through; color: var(--ink-3); }
.bk-tablewrap { margin: 8px 0; overflow-x: auto; }
.bk-table { border-collapse: collapse; width: 100%; font-size: 14px; }
.bk-table th, .bk-table td { border: 1px solid var(--line); padding: 5px 9px; text-align: left; }
.bk-table th { background: #f3f1e4; }
.bk-cell { width: 100%; border: 0; background: transparent; font: inherit; padding: 3px 4px; min-width: 70px; }
.bk-cell:focus { outline: 2px solid rgba(86, 138, 151, .55); background: #fff; }
.bk-tools { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 6px; align-items: center; }
.bk-fig { margin: 10px 0; position: relative; }
.bk-fig img { max-width: 100%; border-radius: 8px; border: 1px solid var(--line); display: block; }
.bk-fig figcaption, .bk-cap { font-size: 13px; color: var(--ink-2); margin-top: 4px; }
.bk-cap { width: 100%; border: 0; background: transparent; font: inherit; padding: 3px 6px; border-radius: 6px; }
.bk-drop { border-style: dashed; align-items: center; flex-wrap: wrap; }
.bk-fi { flex: 1 1 180px; border: 1px solid var(--line); border-radius: 8px; padding: 6px 9px; font: inherit; font-size: 14px; background: #fff; min-width: 0; }
.bk-box .bk-del, .bk-fig .bk-del, .bk-list .bk-del { opacity: 0; }
.bk-box:hover .bk-del, .bk-fig:hover .bk-del, .bk-list:hover .bk-del, .bk-box:focus-within .bk-del { opacity: 1; }
.bk-fig .bk-del, .bk-list .bk-del { position: absolute; top: 4px; right: 4px; }
.imp-tasks { max-height: 50vh; overflow-y: auto; border: 1px solid var(--line); border-radius: 10px; }
.imp-t { display: flex; gap: 10px; align-items: flex-start; padding: 8px 12px; border-bottom: 1px solid #f0eddc; cursor: pointer; }
.imp-t:last-child { border-bottom: 0; } .imp-t:hover { background: #faf9f3; }

/* ── Gouvernance : organigramme ── */
.og-wrap { overflow-x: auto; padding: 8px 4px 24px; }
.og { display: flex; justify-content: center; min-width: max-content; }
.og ul { display: flex; justify-content: center; list-style: none; margin: 0; padding: 22px 0 0; position: relative; }
.og > ul { padding-top: 0; }
.og li { display: flex; flex-direction: column; align-items: center; position: relative; padding: 22px 10px 0; }
.og > ul > li { padding-top: 0; }
.og li::before, .og li::after { content: ''; position: absolute; top: 0; width: 50%; height: 22px; border-top: 2px solid #c9d6d9; }
.og li::before { right: 50%; } .og li::after { left: 50%; border-left: 2px solid #c9d6d9; }
.og li:first-child::before, .og li:last-child::after { border-top: 0; }
.og li:last-child::before { border-right: 2px solid #c9d6d9; border-radius: 0 8px 0 0; }
.og li:first-child::after { border-radius: 8px 0 0 0; }
.og li:only-child::before, .og li:only-child::after { display: none; }
.og > ul > li::before, .og > ul > li::after { display: none; }
.og ul ul::before { content: ''; position: absolute; top: 0; left: 50%; height: 22px; border-left: 2px solid #c9d6d9; }
.og-card { width: 210px; background: #fff; border: 1px solid var(--line); border-radius: 14px; padding: 16px 12px 12px; display: flex; flex-direction: column; align-items: center; gap: 2px; text-align: center; box-shadow: 0 2px 8px rgba(30, 40, 44, .07); }
.og-card.lead { border-color: var(--vert); box-shadow: 0 2px 10px rgba(70, 120, 132, .22); }
.og-photo { width: 72px; height: 72px; border-radius: 50%; overflow: hidden; background: #e6ecd0; color: var(--vf); display: grid; place-items: center; font: 600 28px var(--font-title); margin-bottom: 8px; border: 3px solid #fff; box-shadow: 0 0 0 2px #c9d6d9; }
.og-photo img { width: 100%; height: 100%; object-fit: cover; }
.og-name { font-size: 15px; }
.og-fn { font-size: 13px; color: var(--ink-2); }
.og-mail { font-size: 12px; color: var(--vf); max-width: 100%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; margin-top: 4px; }
.og-sel { display: flex; flex-direction: column; gap: 2px; font-size: 11.5px; color: var(--ink-3); width: 100%; margin-top: 8px; text-align: left; }
.og-sel select { font: inherit; font-size: 13px; padding: 4px 6px; border: 1px solid var(--line); border-radius: 8px; background: #fff; width: 100%; }

/* ── Finances : budget de l'entreprise (simple) ── */
.bd { margin-top: 16px; }
.bd-tiles { display: grid; grid-template-columns: repeat(auto-fit, minmax(170px, 1fr)); gap: 12px; }
.bd-tile { display: flex; flex-direction: column; gap: 3px; padding: 14px 16px; background: #fff; border: 1px solid var(--line); border-radius: 12px; box-shadow: var(--shadow); }
.bd-tile .k { font-size: 12.5px; color: var(--ink-3); font-weight: 600; text-transform: uppercase; letter-spacing: .04em; }
.bd-tile b { font: 600 24px var(--font-title); font-variant-numeric: tabular-nums; }
.bd-tile.solde { background: #ebf3f5; border-color: #bcd4da; }
.neg { color: var(--red) !important; }
.bd-bar { height: 10px; background: #ece9d8; border-radius: 99px; overflow: hidden; margin-top: 14px; }
.bd-bar i { display: block; height: 100%; background: var(--vert); border-radius: 99px; transition: width .2s; }
.bd-bar i.over { background: var(--red); }
.bd-table { width: 100%; border-collapse: collapse; font-size: 14.5px; }
.bd-table th { text-align: left; font-size: 12.5px; color: var(--ink-3); font-weight: 600; padding: 6px 10px; border-bottom: 2px solid var(--line); }
.bd-table td { padding: 9px 10px; border-bottom: 1px solid #f0eddc; }
.bd-table .n, .bd-table th.n { text-align: right; font-variant-numeric: tabular-nums; }
.bd-table tr.ln td { color: var(--ink-2); font-size: 13.5px; padding-left: 28px; background: #fcfbf6; }
.bd-table tr.ln td + td { padding-left: 10px; }
.bd-table tfoot td { border-bottom: 0; border-top: 2px solid var(--line); }
.bd-table tfoot tr.sub td { border-top: 0; padding-top: 5px; padding-bottom: 5px; }
.bd-env { margin-bottom: 14px; }
.bd-env-l { display: flex; align-items: center; justify-content: space-between; gap: 14px; flex-wrap: wrap; }
.bd-money { display: inline-flex; align-items: center; gap: 8px; font-weight: 600; }
.bd-money input { width: 170px; font: 600 20px var(--font-title); text-align: right; }
.bd-cat { margin-bottom: 14px; padding: 12px 16px 14px; }
.bd-hd { display: flex; align-items: center; gap: 10px; cursor: pointer; }
.bd-name { flex: 1; min-width: 0; font: 600 17px var(--font-title); }
.bd-total { font: 600 17px var(--font-title); font-variant-numeric: tabular-nums; flex: none; }
.bd-bd { margin-top: 10px; }
.bd-line { display: grid; grid-template-columns: minmax(0, 1fr) 150px 34px; gap: 8px; align-items: center; padding: 2px 0; }
.bd-line.act { grid-template-columns: minmax(0, 1fr) 90px 130px 90px; }
.bd-line.act.head { font-size: 12px; color: var(--ink-3); font-weight: 600; }
.bd-line .n { text-align: right; font-variant-numeric: tabular-nums; }
.bd-line input.n { text-align: right; }
.bd-ref { color: var(--ink-3); }
.bd-foot { display: flex; flex-wrap: wrap; gap: 28px; justify-content: flex-end; align-items: flex-end; margin-top: 18px; padding: 14px 18px; background: #fff; border: 1px solid var(--line); border-radius: 12px; }
.bd-foot > div { display: flex; flex-direction: column; text-align: right; }
.bd-foot .k { font-size: 12px; color: var(--ink-3); font-weight: 600; text-transform: uppercase; }
.bd-foot b { font: 600 20px var(--font-title); font-variant-numeric: tabular-nums; }
.bd-foot .sol { padding-left: 24px; border-left: 2px solid var(--vert); }
.bd-foot .sol b { font-size: 26px; }
@media (max-width: 600px) { .bd-line { grid-template-columns: minmax(0, 1fr) 110px 30px; } .bd-line.act { grid-template-columns: minmax(0, 1fr) 70px 100px; } .bd-line.act .bd-gap, .bd-line.act.head span:last-child { display: none; } }
.bd-line.linked { background: #f4f8e8; border-radius: 8px; padding: 4px 8px; margin: 2px 0; font-size: 14px; }
.bd-line.linked .bd-lab .ico { width: 14px; height: 14px; vertical-align: -2px; color: var(--vf); }
.bd-todo { border-color: #e6c86e; background: #fffbea; }
.bd-line.act.todo { grid-template-columns: minmax(0, 1fr) 90px 90px 200px; }
.bd-table tr.todo td { background: #fffbea; }
.bd-lab { min-width: 0; overflow-wrap: anywhere; }

/* ═════════ Passe générale lisibilité et responsive (mobile, tablette, ordinateur) ═════════ */
/* Rien ne dépasse de sa boîte : les éléments flexibles et en grille peuvent rétrécir, les mots très longs passent à la ligne */
.card, .card-pad, .grid > *, .stack > *, .hstack > .grow, .grow, .main > *, .mt-layout > *, .split > * { min-width: 0; }
h1, h2, h3, h4, .title, .t1, .t2, .sub, p, li, dd, dt, label, .badge-wrap, .tk-title, .bd-lab, .doc-title { overflow-wrap: anywhere; }
img, svg, video, canvas { max-width: 100%; }
.badge, .btn, .chip, .tick, th { overflow-wrap: normal; }
table { max-width: 100%; }
.table-wrap, .xscroll, .og-wrap, .kanban, .gt-scroll, .tl { -webkit-overflow-scrolling: touch; overscroll-behavior-x: contain; }
.tab-tools, .page-head .actions, .filters, .hstack.wrap { flex-wrap: wrap; }
.mhead .grow, .mhead .t1 { min-width: 0; }
.mhead .small { overflow: hidden; text-overflow: ellipsis; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; white-space: normal; }
.frow .grow, .doc-line .grow { min-width: 0; }
.ellip { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; min-width: 0; max-width: 140px; display: inline-block; vertical-align: bottom; }
.chipf { max-width: 100%; }

/* Tableaux larges : un indice visuel de défilement (ombre au bord) */
.table-wrap, .xscroll { background: linear-gradient(to right, #fff 30%, transparent), linear-gradient(to left, #fff 30%, transparent) 100% 0, linear-gradient(to right, rgba(31, 63, 71,.14), transparent) 0 0, linear-gradient(to left, rgba(31, 63, 71,.14), transparent) 100% 0; background-repeat: no-repeat; background-size: 36px 100%, 36px 100%, 14px 100%, 14px 100%; background-attachment: local, local, scroll, scroll; background-color: var(--surface); }
.xscroll.soft { background-color: var(--surface); }

/* Tablette */
@media (min-width: 641px) and (max-width: 1180px) {
  .main { padding: 22px 20px 44px; }
  .bd-tiles { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .page-head h1 { font-size: 27px; }
  .tabs button { padding: 10px 14px; }
}

/* Mobile */
@media (max-width: 760px) {
  input, select, textarea, .input, .select, .textarea, .cell { font-size: 16px; }   /* évite le zoom automatique sur téléphone */
  .page-head { align-items: flex-start; }
  .page-head .actions { margin-left: 0; width: 100%; }
  .filters .select, .filters .input, .filters .input.search { flex: 1 1 140px; min-width: 0; width: auto; }
  .tab-tools > * { max-width: 100%; }
  .tab-tools .grow { flex: 1 1 100%; }
  .tabs { scrollbar-width: none; margin-left: -14px; margin-right: -14px; padding: 0 14px; }
  .tabs::-webkit-scrollbar { display: none; }
  .tabs button { padding: 10px 12px; flex: none; }
  .btn { min-height: 40px; }
  .btn.sm { min-height: 36px; }
  .iconbtn.sm { width: 36px; height: 36px; }
  .tline { min-height: 46px; }
  .tline .tick { width: 24px; height: 24px; }
  .mhead { flex-wrap: wrap; gap: 8px 10px; }
  .mhead > .grow { flex: 1 1 calc(100% - 60px); }
  .mhead .mpct, .mhead .pdots, .mhead .mcost { flex: none; }
  .frow { flex-wrap: wrap; }
  .frow > div[style*="width"], .frow > span[style*="width"] { flex: 1 1 130px; width: auto !important; }
  .frow.head { display: none; }
  .bd-line.act.todo { grid-template-columns: minmax(0, 1fr) 80px 80px; }
  .bd-line.act.todo select { grid-column: 1 / -1; }
  .bd-line.act.head span:nth-child(4) { display: none; }
  .bd-foot { justify-content: space-between; gap: 14px; }
  .bd-foot .sol { padding-left: 14px; }
  .bd-money input { width: 130px; }
  .og-card { width: 180px; }
  .doc-line .btn { flex: none; }
  .drawer { width: 100vw; max-width: 100vw; }
  dialog { max-width: calc(100vw - 16px); }
  .slash-menu { width: min(250px, calc(100vw - 16px)); }
  .kanban { scroll-snap-type: x proximity; }
  .kcol { scroll-snap-align: start; }
}
@media (max-width: 400px) {
  .main { padding: 14px 10px 36px; }
  .topbar-actions .btn-create { padding: 8px 10px; }
  .bd-tiles { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 8px; }
  .bd-tile b { font-size: 20px; }
}
.small, .muted, .grow, .hstack > span { overflow-wrap: anywhere; }
.badge.muted, .tabs button, .btn { overflow-wrap: normal; }
.bd-hd { flex-wrap: wrap; }
.bd-name { flex: 1 1 160px; }
@media (max-width: 760px) {
  .tabs { margin-left: 0; margin-right: 0; padding: 0; }
  .bd-hd > .small { flex: 1 1 100%; order: 5; }
}
/* Bandeau d'une fiche (campagne, projet) : deux colonnes de faits sur mobile pour ne pas occuper tout l'écran */
@media (max-width: 640px) {
  .facts { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; margin-top: 12px; }
  .fact { padding: 8px 10px; }
  .fact .v { font-size: 14px; }
  .detail-hero { padding: 18px 16px; }
  .detail-hero h1 { font-size: 24px; }
}
@media (max-width: 600px) {
  .bd .card-pad { padding: 14px 10px; }
  .bd-table { font-size: 13px; }
  .bd-table th, .bd-table td { padding: 8px 4px; }
  .bd-table tr.ln td { padding-left: 14px; font-size: 12.5px; }
  .bd-table td:first-child { min-width: 96px; }
}

/* ── Aide : tickets ── */
.tk-form { margin-bottom: 22px; max-width: 820px; }
.tk-form h3 { margin-bottom: 4px; }
.tk-h2 { font-size: 19px; margin: 24px 0 10px; }
.tk-card { margin-bottom: 12px; padding: 12px 16px; max-width: 920px; }
.tk-card.answered, .tk-card.resolved { border-left: 4px solid var(--vert); }
.tk-card.open { border-left: 4px solid #e8b94a; }
.tk-card.closed { opacity: .82; }
.tk-hd { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; cursor: pointer; }
.tk-ref { font: 600 12px ui-monospace, Menlo, monospace; color: var(--ink-3); background: #f3f1e8; padding: 2px 7px; border-radius: 6px; flex: none; }
.tk-title2 { flex: 1 1 200px; min-width: 0; }
.tk-meta { flex: none; }
.tk-bd { margin-top: 12px; }
.tk-thread { display: flex; flex-direction: column; gap: 10px; }
.tk-msg { display: flex; gap: 10px; align-items: flex-start; }
.tk-bub { flex: 1; min-width: 0; background: #faf9f3; border: 1px solid #ece8d4; border-radius: 12px; padding: 8px 12px; }
.tk-msg.adm .tk-bub { background: #eef4dd; border-color: #bcd4da; }
.tk-who { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; font-size: 13.5px; }
.tk-who time { color: var(--ink-3); font-size: 12px; }
.tk-text { margin-top: 4px; overflow-wrap: anywhere; }
.tk-reply { margin-top: 14px; display: flex; flex-direction: column; gap: 8px; }
.tk-adm-tools { margin-top: 12px; text-align: right; }
.bd-pick { border: 1px solid var(--line); border-radius: 10px; overflow: hidden; }
.bd-pick-h, .bd-pick-r { display: grid; grid-template-columns: minmax(0, 1fr) 70px 70px; gap: 8px; align-items: center; padding: 8px 12px; }
.bd-pick-h { background: #f3f1e4; font-size: 12.5px; font-weight: 600; color: var(--ink-3); }
.bd-pick-r { border-top: 1px solid #f0eddc; }
.bd-pick-r input[type="checkbox"], .bd-pick-h input { width: 18px; height: 18px; accent-color: var(--vf); justify-self: center; }
.bd-pick-r .chk, .bd-pick-h .chk { display: flex; gap: 8px; align-items: center; justify-self: start; }
.bd-pick-r .chk input, .bd-pick-h .chk input { justify-self: auto; }

/* ── Planning : arborescence, cases à cocher, jalons, dépendances critiques ── */
.gt-ck { flex: none; width: 20px; height: 20px; border-radius: 6px; border: 2px solid #b9c0aa; background: #fff; display: inline-grid; place-items: center; padding: 0; cursor: pointer; color: #fff; }
.gt-ck:hover:not(:disabled) { border-color: var(--vert); }
.gt-ck.on { background: #22b455; border-color: #22b455; }
.gt-ck .ico { width: 12px; height: 12px; stroke-width: 3.2; }
.gt-ck.ms { border-radius: 50%; color: var(--ink-3); }
.gt-ck.ms.on { color: #fff; }
.gt-ck.ms .ico { width: 11px; height: 11px; stroke-width: 2.4; }
.gt-dur { flex: none; margin-left: 6px; font-size: 12px; font-weight: 600; color: var(--ink-3); white-space: nowrap; min-width: 40px; text-align: right; }
.gt-n { flex: none; font-size: 11.5px; font-weight: 700; color: var(--ink-3); background: #f0eee2; padding: 1px 7px; border-radius: 99px; }
.gt-label .avatar { margin-left: 4px; }
.gt-block { flex: none; font-size: 12px; }
.gt-dia { position: absolute; top: 50%; width: 14px; height: 14px; margin: -7px 0 0 -7px; background: var(--vf); transform: rotate(45deg); border: 0; border-radius: 3px; padding: 0; cursor: pointer; z-index: 2; }
.gt-dia.done { background: #22b455; }
.gt-dia:hover { transform: rotate(45deg) scale(1.25); }
.gt-overlay svg path.crit { stroke: var(--red); stroke-width: 2.2; }
.gt-arrow.crit { border-left-color: var(--red); }
.pl-filters .input.search { min-width: 240px; }
.dep-row { display: flex; align-items: center; gap: 8px; padding: 5px 0; border-bottom: 1px solid #f0eddc; flex-wrap: wrap; }
.dep-row.crit { background: #fdf1ee; border-radius: 8px; padding-left: 6px; }
.dep-c { font-size: 13px; flex: none; }
.dep-add { margin-top: 8px; font-size: 14px; }
@media (max-width: 760px) { .pl-filters .input.search { min-width: 0; flex: 1 1 100%; } }
@media (min-width: 761px) and (max-width: 1180px) { .gt { --lw: 260px; } }
@media (min-width: 761px) { .gt.compact { --lw: 270px; } }

/* ═════════ Brand Board (Identité) : une affiche de marque, pas un formulaire ═════════ */
.brandboard { max-width: 1240px; margin: 0 auto; display: flex; flex-direction: column; gap: 22px; }
.br-bar { display: flex; align-items: center; gap: 14px; flex-wrap: wrap; }
.br-title { font: 700 13px var(--font-title); letter-spacing: .22em; text-transform: uppercase; color: var(--vf); margin: 0; }
.br-status { font-size: 13px; color: var(--ink-3); min-height: 1em; }
.br-status.err { color: var(--red); font-weight: 600; }
.br-hint { margin: -8px 0 0; }
.br-empty { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; padding: 16px 20px; border: 1.5px dashed var(--vert); border-radius: var(--r); background: #f4f8e3; }
.br-empty > div { flex: 1 1 260px; display: flex; flex-direction: column; gap: 2px; }
.br-eyebrow { display: inline-flex; align-items: center; gap: 10px; font: 700 12px var(--font-title); letter-spacing: .2em; text-transform: uppercase; color: var(--vf); margin-bottom: 8px; }
.br-eyebrow span { display: inline-grid; place-items: center; min-width: 26px; height: 26px; padding: 0 6px; border-radius: 99px; background: var(--vf); color: var(--cream); font-size: 11px; letter-spacing: .02em; }
.br-eyebrow.light { color: var(--vc); } .br-eyebrow.light span { background: var(--jaune); color: var(--vf); }
.br-eyebrow.gold { color: #6b5200; } .br-eyebrow.gold span { background: #6b5200; color: #fff; }
.br-q { margin: 0 0 10px; font-size: 14px; color: var(--ink-3); font-style: italic; }
.br-ph { color: #a4a998; font-style: italic; font-weight: 400; }
.br-k { display: block; font: 700 11px var(--font-body); letter-spacing: .12em; text-transform: uppercase; color: var(--ink-3); margin-bottom: 4px; }

/* North Star : le point focal */
.br-hero { position: relative; overflow: hidden; border-radius: 24px; background: radial-gradient(1200px 400px at 85% -10%, rgba(252, 215, 87, .16), transparent 60%), radial-gradient(700px 300px at 0% 110%, rgba(86, 138, 151, .22), transparent 60%), var(--vf); color: var(--cream); padding: clamp(32px, 6vw, 72px) clamp(22px, 6vw, 80px); box-shadow: var(--shadow-lg); }
.br-hero::after { content: ""; position: absolute; right: -60px; bottom: -80px; width: 320px; height: 320px; border-radius: 50%; border: 2px solid rgba(169, 199, 206, .25); box-shadow: 0 0 0 36px rgba(169, 199, 206, .06), 0 0 0 76px rgba(169, 199, 206, .04); }
.br-hero-in { position: relative; z-index: 1; max-width: 920px; }
.br-north { margin: 6px 0 0; font: 600 clamp(26px, 4.4vw, 52px)/1.14 var(--font-title); letter-spacing: -.01em; color: #fff; }
.br-north::before { content: ""; display: block; width: 56px; height: 4px; border-radius: 2px; background: var(--jaune); margin-bottom: 22px; }
.br-north-sub { margin: 20px 0 0; font-size: clamp(15px, 1.6vw, 19px); line-height: 1.5; color: var(--vc); max-width: 70ch; }
.br-hero .br-ph { color: rgba(246, 242, 227, .5); }

.br-duo { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 22px; }
.br-card { background: var(--surface); border: 1px solid var(--line); border-radius: 20px; padding: clamp(20px, 3vw, 34px); box-shadow: var(--shadow); min-width: 0; }
.br-lead { margin: 0; font: 500 clamp(19px, 2.2vw, 27px)/1.3 var(--font-title); color: var(--ink); }
.br-lead.big { font-size: clamp(21px, 2.6vw, 32px); }
.br-mission { border-top: 5px solid var(--vert); } .br-vision { border-top: 5px solid var(--dore); }
.br-promise { border-radius: 20px; background: linear-gradient(120deg, #fff6b8, #fff0c2 55%, #f5ebc9); border: 1px solid #ecd978; padding: clamp(22px, 3.5vw, 40px); display: flex; flex-direction: column; }
.br-promise-in { max-width: 900px; }
.br-sub { margin: 12px 0 0; font-size: 16px; color: #5f4f12; line-height: 1.5; }

/* Piliers : dominants */
.br-pillars { padding-top: 10px; }
.br-p3 { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 22px; }
.br-pillar { position: relative; display: flex; flex-direction: column; gap: 10px; background: var(--surface); border: 1px solid var(--line); border-top: 8px solid var(--acc, var(--vert)); border-radius: 22px; padding: clamp(20px, 2.6vw, 34px); box-shadow: var(--shadow); min-width: 0; }
.br-pillar.empty { border-style: dashed; border-top-style: dashed; justify-content: center; align-items: flex-start; min-height: 260px; background: transparent; box-shadow: none; }
.br-pillar-top { display: flex; align-items: center; gap: 12px; }
.br-num { font: 700 clamp(40px, 5vw, 64px)/1 var(--font-title); color: var(--acc, #cbd0bc); opacity: .9; letter-spacing: -.03em; }
.br-pillar.empty .br-num { color: #cbd0bc; }
.br-ico { margin-left: auto; display: inline-grid; place-items: center; width: 46px; height: 46px; border-radius: 14px; background: color-mix(in srgb, var(--acc, var(--vert)) 18%, #fff); color: var(--vf); }
.br-ico .ico { width: 24px; height: 24px; } .br-ico.sm { margin: 0; width: 38px; height: 38px; border-radius: 12px; background: var(--green-bg); }
.br-pname { margin: 0; font: 700 clamp(24px, 2.6vw, 34px)/1.1 var(--font-title); color: var(--vf); }
.br-tag { font: 600 13px var(--font-body); letter-spacing: .06em; text-transform: uppercase; color: var(--acc, var(--vert)); filter: brightness(.7); }
.br-pdesc { margin: 0; font-size: 17px; line-height: 1.45; color: var(--ink); }
.br-pbeh { padding: 12px 14px; border-radius: 12px; background: var(--surface-2); border-left: 4px solid var(--acc, var(--vert)); }
.br-pbeh p { margin: 0; font-size: 15px; line-height: 1.45; color: var(--ink-2); }
.br-proofs ul { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 6px; }
.br-proofs li { position: relative; padding-left: 22px; font-size: 14.5px; line-height: 1.4; display: flex; align-items: center; gap: 6px; }
.br-proofs li::before { content: "✓"; position: absolute; left: 0; top: 0; color: var(--acc, var(--vert)); font-weight: 800; filter: brightness(.75); }

/* Valeurs */
.br-vgrid { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 18px; }
.br-value { display: flex; flex-direction: column; gap: 8px; background: var(--surface); border: 1px solid var(--line); border-radius: 18px; padding: 22px; box-shadow: var(--shadow); min-width: 0; }
.br-value.empty { border-style: dashed; background: transparent; box-shadow: none; justify-content: center; align-items: flex-start; }
.br-vtop { display: flex; align-items: center; justify-content: space-between; }
.br-value h3 { margin: 0; font: 700 21px var(--font-title); color: var(--vf); }
.br-vdef { margin: 0; font-size: 16px; line-height: 1.4; }
.br-vbeh p { margin: 0; font-size: 14.5px; color: var(--ink-2); line-height: 1.45; }

/* Personnalité et Language DNA */
.br-tgrid { display: grid; grid-template-columns: repeat(auto-fit, minmax(190px, 1fr)); gap: 12px; margin-bottom: 12px; }
.br-trait { padding: 16px 18px; border-radius: 16px; background: linear-gradient(160deg, #f4f8e3, #fff); border: 1px solid #dfe8b8; min-width: 0; }
.br-trait-h { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.br-trait b { font: 700 22px var(--font-title); color: var(--vf); }
.br-trait p { margin: 6px 0 0; font-size: 14.5px; color: var(--ink-2); line-height: 1.4; }
.br-axes { display: flex; flex-direction: column; gap: 22px; margin-bottom: 12px; }
.br-axis-l { display: flex; justify-content: space-between; align-items: center; gap: 12px; font: 700 15px var(--font-title); color: var(--vf); margin-bottom: 10px; }
.br-axis-l .r { text-align: right; margin-left: auto; }
.br-gauge { position: relative; height: 8px; border-radius: 99px; background: linear-gradient(90deg, #dfe8b8, var(--vert) 50%, var(--vf)); margin: 0 12px; }
.br-dot { position: absolute; top: 50%; width: 26px; height: 26px; margin: -13px 0 0 -13px; border-radius: 50%; background: #fff; border: 4px solid var(--vf); box-shadow: 0 2px 8px rgba(31, 63, 71, .3); display: grid; place-items: center; }
.br-dot b { position: absolute; top: -26px; font: 700 12px var(--font-body); color: var(--vf); background: var(--jaune); padding: 1px 7px; border-radius: 99px; }
.br-range { width: 100%; margin-top: 14px; accent-color: var(--vf); }
.br-axis-t { margin: 10px 0 0; font-size: 14px; color: var(--ink-2); }

/* Voix */
.br-vo { display: grid; grid-template-columns: repeat(auto-fit, minmax(230px, 1fr)); gap: 16px; }
.br-vp { padding: 4px 0 4px 18px; border-left: 4px solid var(--vert); min-width: 0; }
.br-vp-h { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.br-vp b { font: 700 clamp(22px, 2.4vw, 30px) var(--font-title); color: var(--vf); }
.br-vp p { margin: 4px 0 0; font-size: 15px; color: var(--ink-2); line-height: 1.45; }
.br-vp.add { border-left-style: dashed; border-left-color: var(--line-2); display: flex; align-items: center; }

/* On dit / On évite */
.br-dd ul { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 10px; }
.br-dd li { display: flex; gap: 12px; align-items: flex-start; padding: 12px 14px; border-radius: 14px; }
.br-dd li.empty { background: none; padding-left: 0; }
.br-dd-h { display: flex; align-items: center; gap: 12px; margin-bottom: 14px; }
.br-dd-h h3 { margin: 0; font: 700 22px var(--font-title); color: var(--vf); }
.br-mark { display: inline-grid; place-items: center; width: 34px; height: 34px; border-radius: 50%; font-weight: 800; font-size: 18px; color: #fff; flex: none; }
.br-dd.do .br-mark { background: #2f8a3e; } .br-dd.dont .br-mark { background: var(--red); }
.br-dd.do li { background: #eef6e3; } .br-dd.dont li { background: #fbeae6; }
.br-lm { font-weight: 800; flex: none; margin-top: 1px; } .br-dd.do .br-lm { color: #2f8a3e; } .br-dd.dont .br-lm { color: var(--red); }
.br-ex { font-size: 16px; line-height: 1.4; }
.br-dd.dont .br-ex:not(textarea) { text-decoration: none; }

/* Marqueurs */
.br-markers { padding-top: 6px; }
.br-seg { margin-bottom: 16px; }
.br-seg .n { opacity: .65; font-size: 12px; margin-left: 4px; }
.br-mgrid { display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); gap: 16px; }
.br-marker { background: var(--surface); border: 1px solid var(--line); border-radius: 16px; padding: 18px 20px; box-shadow: var(--shadow); min-width: 0; display: flex; flex-direction: column; gap: 6px; }
.br-marker.add { border-style: dashed; background: transparent; box-shadow: none; justify-content: center; align-items: flex-start; }
.br-m-h { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.br-m-h b { font: 700 19px var(--font-title); color: var(--vf); }
.br-marker p { margin: 0; font-size: 15px; line-height: 1.45; }
.br-ex-box { margin-top: 6px; padding: 8px 12px; border-radius: 10px; background: var(--surface-2); font-size: 14px; color: var(--ink-2); font-style: italic; }
.br-ex-box .br-k { display: inline; margin-right: 6px; font-style: normal; }

/* Édition : des champs discrets, intégrés à la mise en page */
.br-in { width: 100%; box-sizing: border-box; border: 0; border-bottom: 2px dashed transparent; background: rgba(86, 138, 151, .12); font: inherit; color: inherit; line-height: inherit; letter-spacing: inherit; padding: 3px 6px; border-radius: 8px; resize: none; overflow: hidden; display: block; }
.br-in:hover { background: rgba(86, 138, 151, .22); }
.br-in:focus { outline: 2px solid var(--vert); background: #fff; color: var(--ink); }
.br-hero .br-in { color: #fff; background: rgba(255, 255, 255, .1); } .br-hero .br-in:focus { color: var(--ink); background: #fff; }
.br-in.line { text-overflow: ellipsis; }
.br-cnt { display: block; text-align: right; font-size: 11px; color: var(--ink-3); margin-top: 2px; }
.br-hero .br-cnt { color: rgba(246, 242, 227, .6); }
.br-sel { font: inherit; font-size: 13px; border: 1px solid var(--line-2); border-radius: 8px; padding: 4px 8px; background: #fff; color: var(--ink); max-width: 100%; }
.br-opts { display: flex; gap: 8px; flex-wrap: wrap; margin-top: 4px; }
.br-tools { display: inline-flex; gap: 2px; margin-left: auto; flex: none; }
.br-t { border: 0; background: rgba(31, 63, 71, .07); width: 28px; height: 28px; border-radius: 8px; cursor: pointer; font-size: 14px; color: var(--ink-2); display: inline-grid; place-items: center; padding: 0; }
.br-t:hover:not(:disabled) { background: rgba(31, 63, 71, .16); } .br-t:disabled { opacity: .3; cursor: default; }
.br-t.del:hover { background: var(--red-bg); color: var(--red); } .br-t .ico { width: 14px; height: 14px; }
.br-add { border: 1.5px dashed var(--vert); background: transparent; color: var(--vf); font: 600 14px var(--font-body); padding: 8px 14px; border-radius: 12px; cursor: pointer; display: inline-flex; gap: 6px; align-items: center; align-self: flex-start; }
.br-add:hover { background: #ebf3f5; } .br-add.sm { padding: 4px 10px; font-size: 13px; margin-top: 6px; } .br-add .ico { width: 15px; height: 15px; }
.brandboard button:focus-visible, .brandboard select:focus-visible, .brandboard a:focus-visible { outline: 3px solid var(--jaune); outline-offset: 2px; box-shadow: 0 0 0 5px var(--vf); }

@media (max-width: 1000px) { .br-p3 { grid-template-columns: minmax(0, 1fr); } .br-duo { grid-template-columns: minmax(0, 1fr); } }
@media (max-width: 640px) { .brandboard { gap: 16px; } .br-hero { border-radius: 18px; } .br-pillar, .br-card { border-radius: 16px; } .br-num { font-size: 40px; } .br-vgrid, .br-mgrid, .br-tgrid, .br-vo { grid-template-columns: minmax(0, 1fr); } }
@media print { .br-add, .br-tools, .br-bar .btn { display: none; } }
.bd-note { margin: 0 0 12px; max-width: 860px; }
.bd-aside { background: #f6f5ee; border-style: dashed; }
.bd-acts { display: flex; gap: 6px; align-items: center; flex-wrap: wrap; }
.bd-acts select { min-width: 150px; flex: 1 1 150px; }
.bd-line.act.todo { grid-template-columns: minmax(0, 1fr) 80px 110px minmax(240px, 320px); }
.bd-line.linked input.cell { text-align: right; padding: 5px 8px; }
.tabs button .n { background: var(--red-bg); color: #8c2a17; }
@media (max-width: 760px) { .bd-line.act.todo { grid-template-columns: minmax(0, 1fr) 70px 100px; } .bd-line.act.todo .bd-acts, .bd-line.act.todo.head span:nth-child(4) { grid-column: 1 / -1; } .bd-line.act.todo.head span:nth-child(4) { display: none; } .bd-line.linked input.cell { font-size: 15px; } }

/* iPhone / Safari : la page ne doit jamais dépasser en largeur */
html, body { max-width: 100%; overflow-x: clip; }
@media (max-width: 760px) {
  input, select, textarea { max-width: 100%; min-width: 0; }
  input[type="date"], input[type="time"], input[type="month"] { -webkit-appearance: none; appearance: none; min-width: 0; width: 100%; min-height: 40px; text-align: left; display: block; }
  .cell[type="date"] { min-height: 38px; }
  .select, select { text-overflow: ellipsis; }
  .app, .main, .grid > *, .stack > *, .card, .card-pad { min-width: 0; max-width: 100%; }
  .toasts { max-width: calc(100vw - 24px); } .toast { max-width: 100%; }
}

/* Mobile : le moins possible de défilement latéral. Les bandeaux d'onglets passent sur plusieurs lignes ; seuls les tableaux, plannings et organigrammes défilent. */
@media (max-width: 760px) {
  .tabs { flex-wrap: wrap; overflow: visible; gap: 6px; border-bottom: 0; margin-bottom: 16px; padding: 0; }
  .tabs button { flex: 1 1 auto; margin: 0; padding: 9px 12px; border: 1px solid var(--line-2); border-radius: 12px; background: var(--surface); color: var(--ink-2); text-align: center; white-space: normal; line-height: 1.2; }
  .tabs button[aria-selected="true"] { background: var(--vf); border-color: var(--vf); color: var(--cream); }
  .tabs button[aria-selected="true"] .n { background: var(--jaune); color: var(--vf); }
  .tree { flex-wrap: wrap; overflow: visible; }
  .tree button, .tree a { white-space: normal; flex: 1 1 auto; text-align: center; }
  .kanban { grid-auto-flow: row; grid-auto-columns: auto; grid-template-columns: minmax(0, 1fr); overflow-x: visible; scroll-snap-type: none; }
  .seg { max-width: 100%; }
}

/* ── Espace démo : bandeau toujours visible ── */
.demo-banner { position: sticky; top: 0; z-index: 45; display: flex; align-items: center; justify-content: center; gap: 12px; flex-wrap: wrap; padding: 8px 16px; background: var(--jaune); color: var(--vf); border-bottom: 2px solid var(--vf); font-size: 14px; text-align: center; }
.demo-tag { font: 800 12px var(--font-title); letter-spacing: .14em; text-transform: uppercase; background: var(--vf); color: var(--jaune); padding: 3px 10px; border-radius: 99px; }
.demo-txt { font-weight: 600; }
.demo-banner .btn { background: var(--vf); color: var(--cream); border-color: var(--vf); }
body.in-demo .topbar { top: var(--demo-h, 0px); }
body.in-demo .sidebar { box-shadow: inset 0 0 0 3px var(--jaune); }
.demo-banner .short { display: none; }
@media (max-width: 760px) { .demo-banner { padding: 6px 10px; gap: 6px 10px; justify-content: space-between; } .demo-banner .long { display: none; } .demo-banner .short { display: inline; } .demo-txt { flex: 1 1 140px; font-size: 12.5px; line-height: 1.25; text-align: left; } .demo-tag { font-size: 11px; padding: 2px 8px; } }

/* Menu de gauche : il défile toujours, mais sans barre de défilement visible */
.nav { scrollbar-width: none; -ms-overflow-style: none; }
.nav::-webkit-scrollbar { display: none; width: 0; height: 0; }

/* ── Parcours guidé ── */
#tour { position: fixed; inset: 0; z-index: 2000; pointer-events: none; }
#tour.dim { background: rgba(20, 40, 46, .62); }
.tour-blk { position: fixed; display: block; pointer-events: auto; background: transparent; }
.tour-hole { position: fixed; display: none; border-radius: 12px; pointer-events: none; box-shadow: 0 0 0 9999px rgba(20, 40, 46, .6), 0 0 0 3px var(--jaune), 0 0 24px 6px rgba(252, 215, 87, .55); animation: tour-pulse 1.6s ease-in-out infinite; transition: left .25s ease, top .25s ease, width .25s ease, height .25s ease; }
.tour-hole.info { animation: none; box-shadow: 0 0 0 9999px rgba(20, 40, 46, .6), 0 0 0 3px var(--jaune); }
@keyframes tour-pulse { 0%, 100% { box-shadow: 0 0 0 9999px rgba(20, 40, 46, .6), 0 0 0 3px var(--jaune), 0 0 14px 2px rgba(252, 215, 87, .4); } 50% { box-shadow: 0 0 0 9999px rgba(20, 40, 46, .6), 0 0 0 5px var(--jaune), 0 0 30px 10px rgba(252, 215, 87, .7); } }
.tour-card { position: fixed; pointer-events: auto; background: #fff; color: var(--ink); border-radius: 18px; padding: 16px 18px 14px; box-shadow: 0 18px 60px rgba(20, 40, 46, .45); border: 2px solid var(--vf); max-height: calc(100vh - 24px); overflow-y: auto; }
.tour-card h3 { font: 700 19px var(--font-title); color: var(--vf); margin: 8px 0 6px; }
.tour-card p { margin: 0 0 10px; font-size: 14.5px; line-height: 1.5; color: var(--ink-2); }
.tour-note { background: #fff6b8; border-radius: 10px; padding: 7px 10px; color: #5f4f12 !important; font-weight: 600; }
.tour-top { display: flex; align-items: center; justify-content: space-between; }
.tour-step { font: 700 11.5px var(--font-body); letter-spacing: .12em; text-transform: uppercase; color: var(--ink-3); }
.tour-x { border: 0; background: rgba(31, 63, 71, .08); width: 28px; height: 28px; border-radius: 50%; cursor: pointer; color: var(--ink-2); }
.tour-bar { height: 5px; background: #ece9d8; border-radius: 99px; overflow: hidden; }
.tour-bar i { display: block; height: 100%; background: var(--vert); border-radius: 99px; transition: width .3s; }
.tour-btns { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.tour-hint { font-weight: 700; font-size: 13.5px; color: var(--vf); background: var(--jaune); padding: 4px 10px; border-radius: 99px; }
.demo-banner .demo-tour { background: transparent; color: var(--vf); border-color: var(--vf); }
@media (max-width: 760px) { .demo-banner .demo-tour { display: none; } .tour-card { padding: 12px 14px 12px; } .tour-card h3 { font-size: 17px; } .tour-card p { font-size: 14px; } }
body.in-tour { overscroll-behavior: contain; }

/* ── Parcours de formation : sélecteur de chapitres, animations ── */
.tour-pts { margin: 0 0 10px; padding-left: 18px; font-size: 14px; color: var(--ink-2); line-height: 1.45; }
.tour-pts li { margin-bottom: 3px; }
.tour-ch { display: flex; flex-direction: column; gap: 2px; text-align: left; width: 100%; border: 1px solid var(--line-2); background: #fff; border-radius: 12px; padding: 9px 12px; cursor: pointer; font: inherit; color: inherit; }
.tour-ch b { font: 700 14.5px var(--font-title); color: var(--vf); }
.tour-ch span { font-size: 12.5px; color: var(--ink-3); }
.tour-ch:hover { border-color: var(--vert); background: #f6fae8; }
.tour-ch.all { background: var(--vf); border-color: var(--vf); margin: 10px 0; } .tour-ch.all b, .tour-ch.all span { color: var(--cream); }
.tour-chs { display: grid; gap: 6px; grid-template-columns: repeat(2, minmax(0, 1fr)); }
@media (max-width: 640px) { .tour-chs { grid-template-columns: minmax(0, 1fr); } }
.tour-step { max-width: 85%; line-height: 1.3; }
.tour-anim { margin: 10px 0 12px; padding: 12px; background: var(--surface-2); border: 1px solid var(--line); border-radius: 14px; overflow: hidden; }
.fl { display: flex; flex-wrap: wrap; gap: 6px; align-items: stretch; justify-content: center; }
.fl-i { flex: 1 1 84px; background: #f3f1e4; border-radius: 12px; padding: 8px 6px; text-align: center; font-size: 13px; display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.fl-i b { font: 700 13px var(--font-title); } .fl-i small { font-size: 11px; opacity: .85; line-height: 1.2; }
.fl-a { align-self: center; color: var(--ink-3); font-weight: 700; }
/* une seule base */
.an-lien { display: grid; grid-template-columns: 1fr 34px 1fr 1fr; gap: 6px; align-items: center; font-size: 12px; }
.an-src, .an-out { display: flex; flex-direction: column; gap: 6px; }
.an-src span, .an-out span { background: #fff; border: 1px solid var(--line); border-radius: 10px; padding: 6px 8px; text-align: center; line-height: 1.2; }
.an-src small { color: var(--ink-3); }
.an-src span { animation: an-pulse 5s infinite; animation-delay: var(--d); }
.an-dots { position: relative; height: 96px; }
.an-dots i { position: absolute; left: 2px; width: 10px; height: 10px; border-radius: 50%; background: var(--jaune); border: 2px solid var(--vf); opacity: 0; animation: an-fly 5s infinite; animation-delay: var(--d); }
.an-dots i:nth-child(1) { top: 8px; } .an-dots i:nth-child(2) { top: 44px; } .an-dots i:nth-child(3) { top: 80px; }
.an-core { background: var(--vf); color: var(--cream); border-radius: 12px; padding: 12px 6px; text-align: center; animation: an-glow 5s infinite; }
.an-core b { display: block; font: 700 14px var(--font-title); } .an-core small { opacity: .8; }
.an-out span { opacity: .25; animation: an-show 5s infinite; animation-delay: var(--d); }
@keyframes an-pulse { 0%, 15% { background: var(--jaune); transform: scale(1.04); } 25%, 100% { background: #fff; transform: none; } }
@keyframes an-fly { 0% { transform: translateX(0); opacity: 0; } 8% { opacity: 1; } 35% { transform: translateX(34px); opacity: 1; } 45%, 100% { transform: translateX(34px); opacity: 0; } }
@keyframes an-glow { 0%, 15% { box-shadow: none; } 25%, 60% { box-shadow: 0 0 0 4px var(--jaune); } 75%, 100% { box-shadow: none; } }
@keyframes an-show { 0%, 5% { opacity: .25; background: #fff; } 14%, 50% { opacity: 1; background: #eef6d3; } 65%, 100% { opacity: .25; background: #fff; } }
/* campagne › projet › phase › tâche */
.an-nest label { display: block; font: 700 11px var(--font-body); letter-spacing: .1em; text-transform: uppercase; margin-bottom: 4px; }
.an-nest .n1, .an-nest .n2, .an-nest .n3 { border-radius: 12px; padding: 8px 10px; opacity: 0; animation: an-in 9s infinite; animation-delay: var(--d); }
.an-nest .n1 { background: #e3edc0; border: 2px solid #b5ca70; } .an-nest .n2 { background: #fff6b8; border: 2px solid #e6cf55; margin-top: 4px; } .an-nest .n3 { background: #fff; border: 2px solid var(--line-2); margin-top: 4px; }
.an-nest .n4 { display: flex; gap: 6px; flex-wrap: wrap; } .an-nest .n4 span { background: #f3f1e4; border-radius: 8px; padding: 4px 9px; font-size: 12.5px; opacity: 0; animation: an-in 9s infinite; animation-delay: var(--d); } .an-nest .n4 .ms { background: var(--vf); color: var(--cream); }
@keyframes an-in { 0% { opacity: 0; transform: scale(.94); } 9%, 90% { opacity: 1; transform: none; } 100% { opacity: 0; } }
/* dépendance critique */
.an-dep { display: flex; align-items: center; gap: 10px; justify-content: center; flex-wrap: wrap; }
.dp { display: grid; justify-items: center; gap: 4px; background: #fff; border: 2px solid var(--line-2); border-radius: 12px; padding: 10px 12px; min-width: 130px; text-align: center; font-size: 13px; }
.dp small { grid-row: 2; grid-column: 1; font-size: 11.5px; line-height: 1.25; }
.dp.a .s1 { animation: an-hide-late 8s infinite; } .dp.a .s2 { opacity: 0; color: #2f8a3e; font-weight: 700; animation: an-show-late 8s infinite; }
.dp.b { animation: an-bborder 8s infinite; } .dp.b .s1 { color: var(--red); animation: an-hide-later 8s infinite; } .dp.b .s2 { opacity: 0; color: #2f8a3e; font-weight: 700; animation: an-show-later 8s infinite; }
.dp-link { display: grid; justify-items: center; font-size: 11px; color: var(--ink-3); } .dp-link i { font-style: normal; font-size: 22px; animation: an-lock 8s infinite; }
@keyframes an-hide-late { 0%, 40% { opacity: 1; } 50%, 100% { opacity: 0; } } @keyframes an-show-late { 0%, 40% { opacity: 0; } 50%, 100% { opacity: 1; } }
@keyframes an-hide-later { 0%, 58% { opacity: 1; } 68%, 100% { opacity: 0; } } @keyframes an-show-later { 0%, 58% { opacity: 0; } 68%, 100% { opacity: 1; } }
@keyframes an-bborder { 0%, 58% { border-color: var(--red); } 68%, 100% { border-color: #2f8a3e; } }
@keyframes an-lock { 0%, 55% { opacity: 1; transform: none; } 62% { transform: rotate(-12deg); } 70%, 100% { opacity: .2; transform: none; } }
/* Lite / Full */
.an-lf { display: grid; grid-template-columns: 1fr 1.3fr; gap: 10px; }
.lf { background: #fff; border: 1px solid var(--line); border-radius: 12px; padding: 10px 12px; } .lf.full { border-color: var(--vert); background: #f6fae8; }
.lf h4 { margin: 0 0 6px; font: 700 15px var(--font-title); } .lf ul { margin: 0; padding-left: 16px; font-size: 12.5px; line-height: 1.5; }
.lf li { opacity: 0; animation: an-li 9s infinite; animation-delay: var(--d); } .lf small { display: block; margin-top: 6px; color: var(--ink-3); font-size: 11.5px; }
@keyframes an-li { 0% { opacity: 0; transform: translateX(-6px); } 6%, 85% { opacity: 1; transform: none; } 100% { opacity: 0; } }
/* planning : un décalage crée un conflit */
.an-pl .row { display: flex; align-items: center; gap: 8px; margin-bottom: 8px; } .an-pl .tag { width: 64px; font-size: 12px; font-weight: 600; }
.an-pl .bar { display: block; height: 16px; border-radius: 8px; width: 90px; background: var(--vert); } .an-pl .bar.a { animation: an-shift 6s infinite; } .an-pl .bar.b { margin-left: 70px; background: #c4d5d9; animation: an-conf 6s infinite; }
.an-pl em { font-style: normal; font-size: 12px; color: var(--red); font-weight: 700; opacity: 0; animation: an-warn 6s infinite; } .an-pl p { font-size: 12.5px; margin: 6px 0 0; color: var(--ink-2); }
@keyframes an-shift { 0%, 20% { transform: translateX(0); } 45%, 85% { transform: translateX(120px); } 100% { transform: none; } }
@keyframes an-conf { 0%, 40% { background: #c4d5d9; outline: 0; } 50%, 85% { background: #f0b3a6; outline: 2px solid var(--red); } 100% { background: #c4d5d9; outline: 0; } }
@keyframes an-warn { 0%, 45% { opacity: 0; } 55%, 85% { opacity: 1; } 100% { opacity: 0; } }
/* budget */
.an-bud .bl { display: grid; grid-template-columns: 70px 1fr 58px; align-items: center; gap: 8px; margin-bottom: 6px; font-size: 12px; } .an-bud .bl b { text-align: right; }
.an-bud .bl i { display: block; height: 14px; border-radius: 7px; background: var(--vf); width: 0; animation: an-grow 7s infinite; animation-delay: var(--d); animation-fill-mode: both; }
.an-bud .bl i.p { background: var(--vert); } .an-bud .bl i.r { background: var(--dore); } .an-bud .bl i.s { background: #2f8a3e; }
@keyframes an-grow { 0% { width: 0; } 15% { width: var(--w); } 90% { width: var(--w); } 100% { width: 0; } }
/* ticket */
.an-tk .b { max-width: 88%; padding: 7px 10px; border-radius: 12px; margin-bottom: 6px; font-size: 12.5px; opacity: 0; animation: an-pop 9s infinite; animation-delay: var(--d); }
.an-tk .b.u { background: #fff; border: 1px solid var(--line); } .an-tk .b.a { background: #eef4dd; border: 1px solid #bcd4da; margin-left: auto; }
@keyframes an-pop { 0% { opacity: 0; transform: translateY(6px); } 6%, 88% { opacity: 1; transform: none; } 100% { opacity: 0; } }
@media (prefers-reduced-motion: reduce) { .tour-anim * { animation: none !important; opacity: 1 !important; } }
@media (max-width: 640px) { .an-lien { grid-template-columns: 1fr 24px 1fr; } .an-out { grid-column: 1 / -1; flex-direction: row; } .an-lf { grid-template-columns: minmax(0, 1fr); } }

/* ── Gouvernance : équipes en colonnes ── */
.og-team { width: 240px; background: #fff; border: 1px solid var(--line); border-top: 0; border-radius: 14px; overflow: hidden; box-shadow: 0 2px 8px rgba(30, 40, 44, .08); text-align: left; }
.og-team-h { display: flex; align-items: center; gap: 8px; background: var(--tc, var(--vert)); color: var(--tf, #fff); padding: 10px 12px; }
.og-team-name { flex: 1; min-width: 0; font: 700 15px var(--font-title); background: transparent; border: 0; color: inherit; padding: 2px 4px; overflow-wrap: anywhere; }
input.og-team-name { background: rgba(255, 255, 255, .22); border-radius: 8px; width: 100%; }
input.og-team-name:focus { outline: 2px solid #fff; background: rgba(255, 255, 255, .35); }
.og-count { flex: none; min-width: 24px; height: 24px; display: inline-grid; place-items: center; border-radius: 99px; background: rgba(255, 255, 255, .28); font: 700 12px var(--font-body); }
.og-team-body { display: flex; flex-direction: column; padding: 6px 8px; }
.og-mini { display: flex; align-items: center; gap: 10px; padding: 8px 4px; border-bottom: 1px solid #f0eddc; }
.og-mini:last-child { border-bottom: 0; }
.og-photo.sm { width: 42px; height: 42px; font-size: 16px; margin: 0; border-width: 2px; box-shadow: 0 0 0 1.5px #c9d6d9; flex: none; }
.og-mt { display: flex; flex-direction: column; min-width: 0; flex: 1; line-height: 1.25; }
.og-mt b { font-size: 14px; } .og-mt span { font-size: 12.5px; color: var(--ink-2); }
.og-mt a { font-size: 11.5px; color: var(--vf); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.og-x { border: 0; background: rgba(31, 63, 71, .08); width: 26px; height: 26px; border-radius: 8px; cursor: pointer; display: inline-grid; place-items: center; flex: none; padding: 0; color: var(--ink-2); }
.og-x:hover { background: var(--red-bg); color: var(--red); } .og-x .ico { width: 13px; height: 13px; }
.og-empty { margin: 8px 4px; font-size: 12.5px; color: var(--ink-3); font-style: italic; }
.og-team-edit { padding: 8px 10px 12px; border-top: 1px dashed var(--line-2); background: #faf9f3; display: flex; flex-direction: column; gap: 8px; }
.og-colors { display: flex; gap: 6px; flex-wrap: wrap; }
.og-dot { width: 22px; height: 22px; border-radius: 50%; border: 2px solid #fff; box-shadow: 0 0 0 1.5px var(--line-2); cursor: pointer; padding: 0; }
.og-dot.on { box-shadow: 0 0 0 2.5px var(--vf); }
@media (max-width: 760px) { .og-team { width: 210px; } }

/* ── Gouvernance : postes, job sharing, postes vacants, état-major ── */
.og-post { width: 250px; background: #fff; border: 1px solid var(--line); border-top: 5px solid var(--vert); border-radius: 14px; padding: 12px 12px 10px; box-shadow: 0 2px 8px rgba(30, 40, 44, .08); text-align: left; display: flex; flex-direction: column; gap: 6px; }
.og-post.shared { border-top-color: #7a4fb0; }
.og-post.vacant { border: 2px dashed #e0b84a; border-top: 5px dashed #e0b84a; background: #fffaf0; }
.og-ptop { display: flex; align-items: flex-start; gap: 8px; flex-wrap: wrap; }
.og-ptitle { flex: 1 1 120px; min-width: 0; font: 700 15.5px var(--font-title); color: var(--vf); overflow-wrap: anywhere; }
input.og-ptitle { border: 1px solid var(--line-2); border-radius: 8px; padding: 4px 8px; background: #fff; width: 100%; }
.og-badge { flex: none; font: 700 11px var(--font-body); letter-spacing: .04em; padding: 2px 8px; border-radius: 99px; }
.og-badge.vac { background: #ffe9a8; color: #6b4f00; } .og-badge.sh { background: #ece3f6; color: #55307f; }
.og-pdesc { margin: 0; font-size: 13px; line-height: 1.4; color: var(--ink-2); overflow-wrap: anywhere; }
.og-pdesc-in { width: 100%; font: inherit; font-size: 13px; border: 1px solid var(--line-2); border-radius: 8px; padding: 6px 8px; resize: vertical; background: #fff; box-sizing: border-box; }
.og-holders { display: flex; flex-direction: column; }
.og-vac { margin: 2px 0; padding: 8px 10px; border-radius: 10px; font-size: 12.5px; color: #6b4f00; background: #fff1c6; text-align: center; font-weight: 600; }
.og-post-edit { margin-top: 4px; padding-top: 8px; border-top: 1px dashed var(--line-2); display: flex; flex-direction: column; gap: 8px; }
.og-team-body .og-post { width: auto; border: 0; border-bottom: 1px solid #f0eddc; border-radius: 0; box-shadow: none; padding: 10px 4px; }
.og-team-body .og-post.vacant { border: 0; border-bottom: 1px solid #f0eddc; background: #fffaf0; border-radius: 8px; }
.og-team-body .og-post:last-child { border-bottom: 0; }
.og-sel { display: flex; flex-direction: column; gap: 2px; font-size: 11.5px; color: var(--ink-3); width: 100%; text-align: left; }
.og-sel select { font: inherit; font-size: 13px; padding: 4px 6px; border: 1px solid var(--line); border-radius: 8px; background: #fff; width: 100%; }
.og-em { margin: 0 0 18px; padding: 12px 16px 14px; border: 2px dashed #b8b39a; border-radius: 16px; background: repeating-linear-gradient(135deg, #f6f5f1, #f6f5f1 10px, #f3f0e2 10px, #f3f0e2 20px); }
.og-em-h { display: flex; align-items: baseline; gap: 12px; flex-wrap: wrap; margin-bottom: 8px; } .og-em-h b { font: 700 13px var(--font-title); letter-spacing: .16em; text-transform: uppercase; color: var(--vf); }
.og-em-row { display: flex; flex-wrap: wrap; gap: 10px; align-items: flex-start; }
.og-em-row .og-mini { background: #fff; border: 1px solid var(--line); border-radius: 12px; padding: 8px 12px; min-width: 230px; max-width: 300px; }
.og-em-add { max-width: 240px; }
.og-free { margin: 0 0 10px; font-size: 13px; display: flex; gap: 6px; flex-wrap: wrap; align-items: center; }
.og-chip { background: #f3f1e4; border-radius: 99px; padding: 2px 10px; font-size: 12.5px; }
.og-start { max-width: 640px; }
@media (max-width: 760px) { .og-post { width: 220px; } .og-em-row .og-mini { min-width: 0; width: 100%; max-width: none; } }

/* ── Gouvernance : arbre compact, étiquettes de poste lisibles, colonnes d'équipe assez larges ── */
.og-bar { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; margin-bottom: 12px; }
.og-search { flex: 1 1 260px; max-width: 420px; }
.og-res { margin: -4px 0 10px; }
.ot { display: flex; flex-direction: column; gap: 18px; }
.ot-node { display: flex; flex-direction: column; min-width: 0; align-items: stretch; }
.ot-card { max-width: 420px; width: 100%; min-width: 0; }
.ot-kids { margin: 0 0 4px 16px; padding: 14px 0 6px 20px; border-left: 3px solid #c9d6d9; display: grid; grid-template-columns: repeat(auto-fill, minmax(290px, 1fr)); gap: 16px; align-items: start; }
.ot-kids > .ot-node { position: relative; }
.ot-kids > .ot-node::before { content: ""; position: absolute; left: -20px; top: 28px; width: 17px; border-top: 3px solid #c9d6d9; }
.ot-fold { align-self: flex-start; display: inline-flex; align-items: center; gap: 6px; border: 0; background: #e8f0f2; color: var(--vf); border-radius: 99px; padding: 3px 12px 3px 8px; font: 600 12px var(--font-body); cursor: pointer; margin: 0 0 6px 4px; }
.ot-fold:hover { background: #e2eac9; } .ot-fold .ico { width: 15px; height: 15px; } .ot-fold span:empty { display: none; }
.ot .og-post, .ot .og-team { width: 100%; max-width: 420px; }
.ot .og-team { min-width: 290px; }
/* cartes plus lisibles, dans les deux affichages */
.og-post { width: 270px; padding: 14px 14px 12px; gap: 8px; }
.og-ptitle { font-size: 17px; line-height: 1.25; }
.og-pdesc { font-size: 14px; line-height: 1.5; color: var(--ink); }
.og-mt b { font-size: 15px; } .og-mt span { font-size: 13.5px; }
.og-mt a { font-size: 13px; white-space: normal; overflow: visible; text-overflow: clip; overflow-wrap: anywhere; }
.og-mini { align-items: flex-start; padding: 9px 4px; }
.og-photo.sm { width: 46px; height: 46px; }
.og-vac { font-size: 13.5px; padding: 10px 12px; }
.og-badge { font-size: 12px; padding: 3px 9px; }
.og-team { width: 310px; min-width: 290px; }
.og-team-name { font-size: 16.5px; line-height: 1.25; }
.og-team-h { padding: 12px 14px; }
.og-post.hit, .og-team.hit { box-shadow: 0 0 0 3px var(--jaune), 0 4px 14px rgba(31, 63, 71, .18); }
.og-em-row .og-mini { min-width: 250px; }
@media (max-width: 760px) { .ot-card, .ot .og-post, .ot .og-team { max-width: none; } .ot-kids { margin-left: 8px; padding-left: 12px; grid-template-columns: minmax(0, 1fr); } .ot-kids > .ot-node::before { left: -12px; width: 10px; } .og-post, .og-team { width: 270px; } .ot .og-team { min-width: 0; } }

/* ── Gouvernance : affichage horizontal (de gauche à droite) et matriciel (tableau) ── */
.oh { display: flex; min-width: max-content; padding: 4px 4px 12px; }
.oh ul { list-style: none; margin: 0; padding: 0 0 0 34px; display: flex; flex-direction: column; position: relative; justify-content: center; }
.oh > ul { padding-left: 0; }
.oh li { display: flex; align-items: center; position: relative; padding: 9px 0 9px 34px; }
.oh > ul > li { padding-left: 0; }
.oh li::before { content: ""; position: absolute; left: 0; top: 50%; width: 34px; border-top: 2px solid #c9d6d9; }
.oh li::after { content: ""; position: absolute; left: 0; top: 0; bottom: 0; border-left: 2px solid #c9d6d9; }
.oh li:first-child::after { top: 50%; } .oh li:last-child::after { bottom: 50%; } .oh li:only-child::after { display: none; }
.oh > ul > li::before, .oh > ul > li::after { display: none; }
.oh li > ul::before { content: ""; position: absolute; left: 0; top: 50%; width: 34px; border-top: 2px solid #c9d6d9; }
.oh .og-post { width: 280px; } .oh .og-team { width: 320px; }
.gm { width: 100%; border-collapse: collapse; font-size: 14.5px; }
.gm th { text-align: left; font-size: 12px; letter-spacing: .06em; text-transform: uppercase; color: var(--ink-3); padding: 10px 12px; border-bottom: 2px solid var(--line); white-space: nowrap; }
.gm td { padding: 10px 12px; border-bottom: 1px solid #f0eddc; vertical-align: top; }
.gm tr.hit td { background: #fff9c9; }
.gm-post { min-width: 200px; } .gm-post b { font: 700 15.5px var(--font-title); color: var(--vf); overflow-wrap: anywhere; }
.gm-ind { display: inline-block; width: calc(var(--d, 0) * 22px); vertical-align: middle; }
.gm-ind:not([style*="--d:0"])::after { content: "↳"; margin-left: calc(100% - 16px); color: #9fb06a; font-weight: 700; }
.gm-team td { background: var(--tc); color: var(--tf); padding: 8px 12px; } .gm-team b { font: 700 15px var(--font-title); } .gm-n { opacity: .85; font-size: 12.5px; margin-left: 6px; } .gm-up { opacity: .9; font-size: 12.5px; }
.gm-chip { display: inline-block; color: #fff; border-radius: 99px; padding: 2px 10px; font-size: 12.5px; font-weight: 600; }
.gm-desc { max-width: 320px; color: var(--ink-2); line-height: 1.45; }
.gm-h { display: flex; gap: 10px; align-items: flex-start; margin-bottom: 8px; } .gm-h:last-child { margin-bottom: 0; }
.gm-h > span { display: flex; flex-direction: column; min-width: 0; line-height: 1.3; } .gm-h b { font-size: 14.5px; } .gm-h span span { font-size: 13px; color: var(--ink-2); } .gm-h a { font-size: 12.5px; color: var(--vf); overflow-wrap: anywhere; }
.og-badge.ok { background: #e3edc0; color: #2f4a14; }
@media (max-width: 760px) { .gm .hide-sm { display: none; } .gm td, .gm th { padding: 8px 8px; } }

/* ── Modules en bêta ── */
.beta-tag { font-style: italic; font-weight: 300; font-size: .58em; color: #f2c200; margin-left: 4px; }
.beta-name { opacity: .62; }
.beta-note { font-size: .85rem; color: var(--muted, #5c5f61); border-left: 3px solid #f2c200; background: rgba(242,194,0,.12); padding: 6px 12px; margin: 0 0 14px; border-radius: 4px; }
.beta-note i { font-weight: 600; margin-right: 4px; }
.beta-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); gap: 8px 16px; }
.beta-opt { display: flex; align-items: center; gap: 8px; cursor: pointer; }

/* Listes déroulantes : la place de la flèche n'est jamais écrasée par un autre réglage de marges */
.select, .filters .select, .props .select, select.select { padding-right: 32px; background-position: right 12px center; background-repeat: no-repeat; }
.props .select { padding-right: 28px; background-position: right 9px center; }

/* ── Filtres repliables ── */
.filters-fold .fold-btn { gap: 6px; }
.filters-fold .fold-btn .ico { width: 15px; height: 15px; }
.filters-fold .fold-btn.on { border-color: var(--vf); color: var(--vf); font-weight: 700; }
.filters-fold .fold-btn .n { background: var(--vf); color: var(--cream); border-radius: 999px; min-width: 18px; height: 18px; font-size: 11px; display: inline-grid; place-items: center; padding: 0 5px; }
.filters-fold .fold-btn[aria-expanded="true"] { background: #ebe8d6; }
.filters-panel { flex: 1 1 100%; display: flex; flex-wrap: wrap; gap: 10px; align-items: center; padding: 10px 12px; background: rgba(235,232,214,.45); border-radius: 12px; }
.filters-panel[hidden] { display: none; }

/* Carte repliable (accueil : activité récente) */
.fold-card > summary { list-style: none; cursor: pointer; display: flex; align-items: center; }
.fold-card > summary::-webkit-details-marker { display: none; }
.fold-card > summary::after { content: ''; margin-left: auto; width: 8px; height: 8px; border-right: 2px solid var(--ink-2); border-bottom: 2px solid var(--ink-2); transform: rotate(45deg); transition: transform .15s; }
.fold-card[open] > summary::after { transform: rotate(-135deg); }

.more-kpis > summary { cursor: pointer; font-size: 13px; font-weight: 600; color: var(--ink-2); padding: 6px 0; list-style: none; }
.more-kpis > summary::-webkit-details-marker { display: none; }
.more-kpis > summary::before { content: '＋ '; }
.more-kpis[open] > summary::before { content: '− '; }

/* ── Mode lecture / édition d'un bloc (js/viewmode.js) ── */
.vm-bar { display: flex; align-items: center; justify-content: flex-end; gap: 10px; flex-wrap: wrap; }
.vm-btn { font-size: 12.5px; padding: 4px 11px; border-radius: 999px; gap: 5px; }
.vm-btn .ico { width: 14px; height: 14px; }
.vm-btn > span { display: inline-flex; align-items: center; gap: 5px; }
.vm-view .vm-edit-only, .vm-edit .vm-view-only { display: none !important; }
.vm-view .vm-empty { display: none !important; }
.vm-view .cell, .vm-view select.select.cell, .vm-view textarea.cell, .vm-view input.cell {
  border-color: transparent; background-color: transparent; background-image: none; box-shadow: none; outline: 0;
  padding: 0 !important; pointer-events: none; appearance: none; -webkit-appearance: none; resize: none; overflow: hidden; min-height: 0; height: auto; font-weight: 500;
}
.vm-view .mini { gap: 2px; }
.vm-view .chip { pointer-events: none; }
.vm-view .chip[aria-pressed="false"] { display: none; }
.vm-view .chips { gap: 6px; }
.vm-view .ph-add, .vm-view .reading-form-edit { display: none; }

.vm-text { display: none; font-weight: 500; line-height: 1.4; overflow-wrap: anywhere; }
.vm-view select.cell, .vm-view input.cell[type="text"], .vm-view input.cell:not([type]) { display: none; }
.vm-view .vm-text { display: block; }
.vm-view .vm-text.vm-empty { display: none !important; }

/* Lecture : intitulés discrets, valeurs bien lisibles */
.vm-view .mini { font-size: 11.5px; font-weight: 600; text-transform: uppercase; letter-spacing: .07em; color: var(--muted, #6b746c); }
.vm-view .mini .vm-text, .vm-view .mini .cell, .vm-view .mini textarea.cell { font-size: 15.5px; line-height: 1.5; text-transform: none; letter-spacing: 0; color: var(--ink, #1f3f47); font-weight: 500; }
.vm-view .mini textarea.cell { font-weight: 400; }
.vm-view .row2, .vm-view .row3 { display: flex; flex-wrap: wrap; gap: 14px 40px; }
.vm-view .row2 > *, .vm-view .row3 > * { flex: 0 1 auto; min-width: 140px; }
.vm-view .mbody { gap: 18px; }
.vm-view .chip[aria-pressed="true"] { background: rgba(86, 138, 151,.3); border-color: transparent; color: var(--vf, #1f3f47); font-weight: 600; font-size: 13.5px; }
.vm-view .vm-text { font-size: 15px; }

/* En-tête d'une mesure : titre net, détail lisible */
.mhead { padding: 16px 18px; gap: 14px; }
.mhead .t1 { font-family: var(--font-title); font-size: 17px; font-weight: 700; line-height: 1.25; white-space: normal; }
.mhead .small { font-size: 13.5px; line-height: 1.4; }
.mnum { font-size: 15px; padding: 5px 11px; }
.mcost { font-size: 16px; font-weight: 700; }
.mpct b { font-size: 13.5px; }

/* ── Suivi / saisie / journal (onglets Équipe et Budget d'un projet) ── */
.led-stack { gap: 16px; margin-bottom: 8px; }
.led-head { margin-bottom: 12px; gap: 12px; flex-wrap: wrap; align-items: center; }
.led-head h3 { margin: 0; }
.led-inline { display: inline-flex; align-items: center; gap: 8px; font-size: 13px; color: var(--ink-2); font-weight: 600; }
.led-inline .input { width: 110px; padding: 6px 10px; }
.led-people { margin-top: 14px; display: grid; gap: 8px; }
.led-p { display: grid; grid-template-columns: minmax(130px, 220px) 1fr 70px; gap: 12px; align-items: center; font-size: 14px; }
.led-pn { display: inline-flex; align-items: center; gap: 8px; min-width: 0; }
.led-p b { text-align: right; }
.led-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 12px 14px; align-items: end; }
.led-grid .led-wide { grid-column: span 2; }
.led-grid .led-wide2 { grid-column: span 2; }
.led-go { display: flex; justify-content: flex-end; }
.led-tools { display: inline-flex; gap: 6px; flex-wrap: wrap; }
.led-count { font-size: 14px; margin: 2px 2px 10px; }
.led-empty { padding: 22px 8px; text-align: center; color: var(--muted, #6b746c); font-size: 14px; }
.led-more { display: flex; align-items: center; gap: 12px; justify-content: center; padding: 12px 0 2px; }
.led-act { white-space: nowrap; text-align: right; }
.led-quote { display: grid; grid-template-columns: 78px 1fr; gap: 6px; }
table.led .cell { min-width: 0; }
table.led td { vertical-align: middle; }
.led-log { display: grid; gap: 2px; }
.led-l { display: grid; grid-template-columns: 150px 84px 1fr; gap: 12px; padding: 9px 2px; border-bottom: 1px solid var(--line); align-items: start; }
@media (max-width: 760px) {
  .led-grid .led-wide, .led-grid .led-wide2 { grid-column: span 1; }
  .led-p { grid-template-columns: 1fr 70px; } .led-p .led-pb { grid-column: 1 / -1; order: 3; }
  .led-l { grid-template-columns: 1fr; gap: 4px; }
  .led-go .btn { width: 100%; justify-content: center; }
}
.led-card .ftiles.compact { grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); }
table.led td { padding-top: 5px; padding-bottom: 5px; }
table.led .cell { padding-top: 6px; padding-bottom: 6px; min-height: 0; }

/* ── Journaux : tableau structuré, lignes alternées, pleine largeur ── */
.led-wrap { overflow-x: auto; border: 1px solid var(--line-2); border-radius: 10px; }
table.led { width: 100%; table-layout: fixed; border-collapse: collapse; background: #fff; }
table.led thead th { background: #efecdc; font-size: 11.5px; text-transform: uppercase; letter-spacing: .05em; color: var(--ink-2); font-weight: 700; padding: 9px 8px; border-bottom: 1px solid var(--line-2); text-align: left; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
table.led thead th.n { text-align: right; }
table.led tbody tr { border-bottom: 1px solid var(--line); background: #fff; }
table.led tbody tr:nth-child(even) { background: #f6f4e8; }
table.led tbody tr:last-child { border-bottom: 0; }
table.led td { padding: 3px 4px; border-left: 1px solid var(--line); overflow: hidden; }
table.led td:first-child { border-left: 0; }
table.led .cell { width: 100%; font-size: 13.5px; padding: 6px 6px; border-color: transparent; background-color: transparent; box-shadow: none; text-overflow: ellipsis; border-radius: 6px; }
table.led .cell:hover { border-color: var(--line-2); background-color: #fff; }
table.led .cell:focus { border-color: var(--vert); background-color: #fff; outline: 2px solid rgba(86, 138, 151,.45); }
table.led select.cell { background-image: none; padding-right: 6px; }
table.led input.n { text-align: right; }
table.led input[type="date"]::-webkit-calendar-picker-indicator, table.led input[type="time"]::-webkit-calendar-picker-indicator { opacity: 0; width: 0; margin: 0; padding: 0; }
table.led .led-quote { grid-template-columns: 1fr; gap: 0; }
table.led .led-quote select.cell { font-size: 11.5px; color: var(--ink-3); padding-top: 0; }
@media (max-width: 1300px) { table.led.led-t { min-width: 760px; } table.led.led-c { min-width: 880px; } }

/* ── Séances : code couleur et calendrier annuel ── */
:root { --mtg-soon: #5f8f24; --mtg-review: #e8821a; --mtg-archive: #6f7f93; }
.mt-row.mtg-soon { border-left: 5px solid var(--mtg-soon); }
.mt-row.mtg-review { border-left: 5px solid var(--mtg-review); background: linear-gradient(90deg, rgba(232,130,26,.07), transparent 40%), var(--surface, #fff); }
.mt-row.mtg-archive { border-left: 5px solid var(--mtg-archive); background: linear-gradient(90deg, rgba(111,127,147,.08), transparent 40%), var(--surface, #fff); }
.mt-legend { display: inline-flex; gap: 14px; flex-wrap: wrap; font-size: 12.5px; color: var(--ink-2); margin-left: auto; }
.mt-legend span { display: inline-flex; align-items: center; gap: 6px; }
.mt-legend i { width: 11px; height: 11px; border-radius: 3px; display: inline-block; }
i.mtg-soon { background: var(--mtg-soon); } i.mtg-review { background: var(--mtg-review); } i.mtg-archive { background: var(--mtg-archive); }
.ycal-bar { gap: 14px; margin-bottom: 14px; flex-wrap: wrap; align-items: center; }
.ycal-y { font-family: var(--font-title); font-size: 22px; min-width: 56px; text-align: center; }
.ycal { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 12px; }
.ym { padding: 10px 12px 12px; }
.ym h3 { font-size: 14px; margin: 0 0 6px; display: flex; align-items: center; gap: 8px; }
.ym-n { background: var(--vc, #d6e7a0); color: var(--vf); border-radius: 999px; font-size: 11px; padding: 1px 8px; font-family: var(--font-body); }
.yg { display: grid; grid-template-columns: repeat(7, 1fr); gap: 2px; }
.yh { font-size: 10px; color: var(--ink-3); text-align: center; padding-bottom: 2px; }
.yc { display: grid; place-items: center; aspect-ratio: 1; font-size: 11px; color: var(--ink-2); border-radius: 6px; border: 0; background: none; padding: 0; }
.yc.off { visibility: hidden; }
.yc.today { outline: 1.5px solid var(--vf); outline-offset: -1.5px; font-weight: 700; }
button.yc.has { color: #fff; font-weight: 700; cursor: pointer; }
button.yc.mtg-soon { background: var(--mtg-soon); } button.yc.mtg-review { background: var(--mtg-review); } button.yc.mtg-archive { background: var(--mtg-archive); }
button.yc.has:hover { filter: brightness(.9); }
@media (max-width: 1100px) { .ycal { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
@media (max-width: 760px) { .ycal { grid-template-columns: repeat(2, minmax(0, 1fr)); } .mt-legend { margin-left: 0; } }
.yc { aspect-ratio: auto; height: 22px; }
table.led input[type="date"][value=""]:not(:focus) { color: transparent; }
table.led td.led-act { white-space: nowrap; padding: 0 2px; }
table.led td.led-act .iconbtn { display: inline-grid; }

/* Calendrier annuel : une seule infobulle, celle du navigateur (attribut title), accrochée au pointeur */

/* ── Budget général maître : filtres, agrégation, référentiel ── */
.bd-filters { margin-bottom: 10px; }
.bd-per { display: inline-flex; align-items: center; gap: 6px; font-size: 13px; color: var(--ink-2); }
.bd-per .input { width: auto; padding: 6px 10px; }
.bd-note { margin: 0 0 12px; }
.bd-alerts { margin: 14px 0 0; }
.bd-agg td, .bd-agg th { white-space: nowrap; }
.bd-agg td.bd-pc { min-width: 120px; }
.bd-agg tr.off td { opacity: .6; }
.bd-agg tbody tr.cat:hover td { background: rgba(86, 138, 151,.12); }
.bd-pc .progress { height: 6px; margin-bottom: 2px; }
.bd-master { display: flex; flex-wrap: wrap; gap: 12px; align-items: flex-end; margin: 4px 0 12px; }
.bd-master .grow { flex: 1 1 200px; }
.bd-subs { margin: 0 0 12px; padding: 10px 12px; background: rgba(235,232,214,.4); border-radius: 10px; }
.bd-sub { display: grid; grid-template-columns: minmax(0, 1fr) 90px 120px 80px 34px; gap: 8px; align-items: center; padding: 2px 0; }
.bd-sub.off { opacity: .6; }
.bd-sub input.n { text-align: right; }
.bd-src td { vertical-align: top; }
@media (max-width: 760px) { .bd-sub { grid-template-columns: 1fr 1fr; } }
.bcat span:not(.grow) { min-width: 64px; text-align: right; font-variant-numeric: tabular-nums; }
table.led tr.cx td { opacity: .55; text-decoration: line-through; }
table.led tr.cx td:last-child, table.led tr.cx td select[data-path="status"] { text-decoration: none; opacity: 1; }
.bd-ctot { font: 600 20px var(--font-title); font-variant-numeric: tabular-nums; }

/* ── Budget d'un projet en lecture : texte posé, sans cadres ── */
.led-static.vm-view .led-wrap { border-color: transparent; border-radius: 0; }
.led-static.vm-view table.led { background: transparent; }
.led-static.vm-view table.led thead th { background: transparent; border-bottom: 1px solid var(--line-2); color: var(--ink-3); }
.led-static.vm-view table.led tbody tr, .led-static.vm-view table.led tbody tr:nth-child(even) { background: transparent; border-bottom: 1px solid var(--line); }
.led-static.vm-view table.led td { border-left: 0; padding: 9px 6px; }
.led-static.vm-view table.led .cell, .led-static.vm-view table.led .vm-text { font-size: 14px; }
.led-static.vm-view table.led .vm-text { white-space: normal; }
.led-static.vm-view .led-card { box-shadow: none; }
.led-static.vm-view .led-inline .input { width: auto; max-width: 110px; }

.vm-view input.cell[type="number"] { display: none; }
.vm-text.n { text-align: right; font-variant-numeric: tabular-nums; }

/* Coûts effectifs : arborescence */
.bd-tree .bd-hd { gap: 12px; flex-wrap: wrap; }
.bd-tot { font-size: 13px; color: var(--ink-2); white-space: nowrap; margin-left: 10px; }
.bd-tot b { font-variant-numeric: tabular-nums; color: var(--ink); }
.bd-grp { margin: 6px 0 2px 14px; border-left: 2px solid var(--line); padding-left: 10px; }
.bd-ghd { display: flex; align-items: center; gap: 10px; padding: 7px 4px; cursor: pointer; border-radius: 8px; }
.bd-ghd:hover { background: rgba(86, 138, 151,.12); }
.bd-gname { font-weight: 600; }
.bd-levels { margin: 14px 0 10px; gap: 10px; align-items: center; }

/* Planification en arborescence */
.bd-sub-t { grid-template-columns: minmax(0, 1fr) 90px 120px 80px 80px 34px; }
.bd-sub-t.head { font-weight: 600; font-size: 12px; }
.bd-sub-t .n, .bd-sub-t .bd-eng { text-align: right; font-variant-numeric: tabular-nums; }
@media (max-width: 760px) { .bd-sub-t { grid-template-columns: 1fr 1fr; } .bd-sub-t.head { display: none; } }

/* ── Graphiques du budget ── */
.ch-rings { display: grid; grid-template-columns: repeat(auto-fit, minmax(120px, 1fr)); gap: 12px; margin-bottom: 14px; }
.ch-ring { display: grid; justify-items: center; gap: 2px; position: relative; text-align: center; }
.ch-ring svg { width: 92px; height: 92px; }
.ch-ring circle { fill: none; stroke-width: 9; }
.ch-ring .bg { stroke: #e7e9d4; }
.ch-ring .fg { stroke-linecap: round; }
.ch-ring b { position: absolute; top: 33px; font: 600 17px var(--font-title); }
.ch-ring span { font-size: 12px; color: var(--ink-3); }
.ch-card { margin-bottom: 14px; }
.ch-card h3 { margin-bottom: 8px; }
.ch-key { display: flex; gap: 14px; flex-wrap: wrap; font-size: 12.5px; color: var(--ink-2); margin-bottom: 10px; }
.ch-key i, .ch-leg i { display: inline-block; width: 11px; height: 11px; border-radius: 3px; margin-right: 6px; vertical-align: -1px; }
.ch-row { display: grid; grid-template-columns: minmax(110px, 200px) 1fr 52px; gap: 12px; align-items: center; padding: 5px 0; }
.ch-l { font-size: 13.5px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ch-v { text-align: right; font-size: 13px; font-variant-numeric: tabular-nums; }
.ch-track { position: relative; height: 22px; background: transparent; }
.ch-track i { position: absolute; left: 0; display: block; border-radius: 4px; }
.ch-track .env { top: 0; height: 22px; background: #d6e3e6; }
.ch-track .eng { top: 3px; height: 9px; background: #f2c200; }
.ch-track .eng.over { background: #e8821a; }
.ch-track .eff { top: 13px; height: 6px; background: #1f3f47; }
.ch-two { grid-template-columns: 1fr 1fr; gap: 14px; }
.ch-donut { display: flex; gap: 20px; align-items: center; flex-wrap: wrap; }
.ch-donut svg { width: 150px; height: 150px; flex: none; }
.ch-donut circle { fill: none; stroke-width: 22; }
.ch-donut .bg { stroke: #eef0df; }
.ch-donut text { font: 600 20px var(--font-title); fill: var(--ink); }
.ch-leg { list-style: none; padding: 0; margin: 0; display: grid; gap: 5px; font-size: 13px; }
.ch-leg li { display: flex; align-items: center; gap: 4px; }
.ch-leg b { margin-left: auto; padding-left: 14px; font-variant-numeric: tabular-nums; }
.ch-time { width: 100%; height: auto; }
.ch-time .grid { stroke: #e7e9d4; stroke-width: 1; }
.ch-time .envl { stroke: #5f8f24; stroke-width: 1.5; stroke-dasharray: 5 4; }
.ch-time .a-eng { fill: rgba(242,194,0,.18); }
.ch-time .l-eng { fill: none; stroke: #f2c200; stroke-width: 2.5; }
.ch-time .l-eff { fill: none; stroke: #1f3f47; stroke-width: 2.5; }
.ch-time .d-eng { fill: #f2c200; }
.ch-time text { font-size: 11px; fill: var(--ink-3); }
@media (max-width: 900px) { .ch-two { grid-template-columns: 1fr; } .ch-row { grid-template-columns: minmax(80px, 130px) 1fr 44px; } }

/* Étiquette du calendrier annuel des séances (suit le pointeur) */
.yc-tip { position: fixed; z-index: 120; max-width: 240px; white-space: pre-line; background: var(--vf, #1f3f47); color: #fff; font-size: 12.5px; font-weight: 600; line-height: 1.35; padding: 6px 10px; border-radius: 8px; box-shadow: 0 4px 14px rgba(0,0,0,.25); pointer-events: none; }
.yc-tip[hidden] { display: none; }

/* Montant payé : toujours modifiable, même en lecture (même donnée que Finances › Coûts effectifs) */
.vm-view input.cell.vm-live[type="number"] { display: block; padding: 6px 8px !important; border: 1px solid var(--line-2); background: #fff; pointer-events: auto; border-radius: 8px; text-align: right; }
.vm-view table.led input.cell.vm-live[type="number"] { border-color: var(--line-2); background: #fff; }

/* Planification : lecture seule par défaut (colonnes stables), édition sur demande */
.bd-f { display: block; min-width: 0; }
.bd-sub-t .bd-f .vm-text { display: none; }
.vm-view .bd-sub-t .bd-f .vm-text { display: block; }
.vm-view .bd-sub .vm-empty { display: block !important; visibility: hidden; }
.vm-view .bd-static .bd-sub-t .vm-edit-only { display: none !important; }
.bd-tree.off { opacity: .65; }
.bd-static.vm-view .bd-hd .bd-name.cell { font-weight: 700; }
.bd-static.vm-view .bd-env .bd-money { display: inline-flex; align-items: center; gap: 6px; }

/* Coûts effectifs : toutes les tables de l'arborescence ont exactement les mêmes colonnes (alignées d'un groupe à l'autre) */
.bd-tree table.bd-src { table-layout: fixed; width: 100%; }
.bd-tree table.bd-src th:nth-child(1) { width: auto; }
.bd-tree table.bd-src th:nth-child(2) { width: 120px; }
.bd-tree table.bd-src th:nth-child(3) { width: 110px; }
.bd-tree table.bd-src th:nth-child(4) { width: 170px; }
.bd-tree table.bd-src td, .bd-tree table.bd-src th { vertical-align: middle; }
.bd-tree table.bd-src td:nth-child(3), .bd-tree table.bd-src th:nth-child(3) { text-align: right; }
.bd-tree table.bd-src td:nth-child(4) input.cell { display: block; width: 130px; margin-left: auto; text-align: right; }
.bd-tree table.bd-src td:nth-child(4), .bd-tree table.bd-src th:nth-child(4) { text-align: right; }
@media (max-width: 760px) { .bd-tree table.bd-src { min-width: 560px; } }

/* Brand Board en arborescence : bannières colorées, gros chiffres */
.br-accbar { display: flex; align-items: center; gap: 12px; justify-content: space-between; margin: 14px 0 8px; flex-wrap: wrap; }
.br-acc { --c: #5f8f24; border-radius: 18px; margin-bottom: 10px; overflow: hidden; background: #fff; border: 1px solid color-mix(in srgb, var(--c) 35%, #fff); }
.br-acc-h { position: relative; display: flex; align-items: center; gap: 16px; padding: 14px 20px 14px 14px; cursor: pointer; color: #fff; overflow: hidden;
  background: linear-gradient(105deg, var(--c) 0%, color-mix(in srgb, var(--c) 78%, #000) 100%); transition: filter .12s; }
.br-acc-h::after { content: ''; position: absolute; right: -40px; top: -60px; width: 190px; height: 190px; border-radius: 50%; background: rgba(255,255,255,.09); pointer-events: none; }
.br-acc-h::before { content: ''; position: absolute; right: 70px; bottom: -80px; width: 150px; height: 150px; border-radius: 50%; background: rgba(255,255,255,.06); pointer-events: none; }
.br-acc-h:hover { filter: brightness(1.08); }
.br-acc-n { font: 700 44px/1 var(--font-title); min-width: 66px; text-align: center; color: rgba(255,255,255,.92); letter-spacing: -.02em; flex: none; }
.br-acc-t { display: grid; gap: 3px; min-width: 0; flex: 1; position: relative; z-index: 1; }
.br-acc-h b { font-family: var(--font-title); font-size: 20px; line-height: 1.15; }
.br-acc-p { color: rgba(255,255,255,.82); font-size: 13.5px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.br-acc-p i { opacity: .75; }
.br-acc-h .fold-chev { position: relative; z-index: 1; color: #fff; flex: none; }
.br-acc-b { padding: 6px 16px 18px; background: color-mix(in srgb, var(--c) 6%, #fff); }
.br-acc-b > section, .br-acc-b > .br-duo { margin-top: 12px; }
@media (max-width: 760px) { .br-acc-n { font-size: 34px; min-width: 50px; } .br-acc-h b { font-size: 17px; } .br-acc-p { white-space: normal; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; } }
/* Brand Board : bandeau North Star plus compact (vue réduite) */
.brandboard .br-hero { padding: 24px 30px; border-radius: 18px; }
.brandboard .br-north { font-size: clamp(20px, 2.4vw, 30px); line-height: 1.22; }
.brandboard .br-north-sub { margin-top: 8px; font-size: 14px; }

/* ── Publications : bloc, vignettes, calendrier annuel ── */
.cb-cover { position: relative; overflow: hidden; }
.cb-cover .cb-img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.cb-cover > span { position: relative; z-index: 1; }
.cb-cover-tools { gap: 10px; flex-wrap: wrap; margin: 8px 0 6px; align-items: center; }
.thumb-mini { position: relative; overflow: hidden; }
.thumb-mini .thumb-img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.ck-tags { margin: 2px 0 0; font-size: 12px; }
:root { --ctg-draft: #6f7f93; --ctg-val: #e8821a; --ctg-plan: #5f8f24; --ctg-pub: #1f3f47; }
i.ctg-draft { background: var(--ctg-draft); } i.ctg-val { background: var(--ctg-val); } i.ctg-plan { background: var(--ctg-plan); } i.ctg-pub { background: var(--ctg-pub); }
button.yc.ctg-draft { background: var(--ctg-draft); } button.yc.ctg-val { background: var(--ctg-val); } button.yc.ctg-plan { background: var(--ctg-plan); } button.yc.ctg-pub { background: var(--ctg-pub); }
button.yc.has sup { font-size: 8px; margin-left: 1px; opacity: .9; }

/* Pastilles de statut cliquables (bloc publication) */
.workflow button { font: inherit; font-size: 12px; font-weight: 600; padding: 4px 10px; border-radius: 999px; border: 0; background: #ebe8d6; color: var(--ink-3); cursor: pointer; }
.workflow button:hover:not(:disabled) { filter: brightness(.94); outline: 2px solid rgba(86, 138, 151,.5); }
.workflow button.past { background: var(--green-bg); color: var(--green-ink); }
.workflow button.now { background: var(--vf); color: var(--cream); }
.workflow button:disabled { cursor: default; }

/* Plateformes : pastille de logo et liseré de couleur */
.plat { display: inline-grid; place-items: center; width: 22px; height: 22px; border-radius: 50%; background: var(--p, #999); flex: none; }
.plat svg { width: 14px; height: 14px; }
.kcard.pc { border-left: 4px solid var(--pc, #b8bdb0); }
tr.pc > td:first-child { box-shadow: inset 4px 0 0 var(--pc, #b8bdb0); }
.kcard .cm .plat { margin-right: 4px; }

/* Calendrier des publications : plusieurs par jour, lisible */
button.yc.has { position: relative; }
button.yc.has sup { position: absolute; top: -5px; right: -5px; min-width: 14px; height: 14px; padding: 0 3px; border-radius: 999px; background: #fff; color: #1f3f47; font-size: 9px; font-weight: 700; display: grid; place-items: center; box-shadow: 0 0 0 1px rgba(0,0,0,.18); margin: 0; opacity: 1; }
.ym h3 .linkbtn { font: inherit; color: inherit; padding: 0; text-decoration: none; }
.ym h3 .linkbtn:hover { text-decoration: underline; }
.mcal { background: #fff; border: 1px solid var(--line-2); border-radius: 14px; overflow: hidden; }
.mc-dow { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); background: #efecdc; font-size: 12px; font-weight: 700; color: var(--ink-2); text-transform: uppercase; letter-spacing: .05em; }
.mc-dow span { padding: 8px 10px; }
.mc-grid { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); }
.mc-day { min-height: 118px; padding: 6px; border-top: 1px solid var(--line); border-left: 1px solid var(--line); display: flex; flex-direction: column; gap: 3px; min-width: 0; }
.mc-day:nth-child(7n+1) { border-left: 0; }
.mc-day.out { background: #faf8ee; }
.mc-day.today { background: #fffbe0; }
.mc-n { font-size: 12px; font-weight: 700; color: var(--ink-2); }
.mc-day.today .mc-n { background: var(--vf); color: #fff; border-radius: 999px; padding: 1px 7px; align-self: flex-start; }
.mc-chip { display: flex; align-items: center; gap: 5px; width: 100%; text-align: left; border: 0; border-left: 3px solid var(--pc, #b8bdb0); background: #f5f3e6; border-radius: 6px; padding: 3px 6px 3px 4px; font-size: 12px; line-height: 1.25; cursor: pointer; min-width: 0; }
.mc-chip:hover { background: #ece9d4; }
.mc-chip .plat { width: 16px; height: 16px; } .mc-chip .plat svg { width: 10px; height: 10px; }
.mc-chip.ctg-val { background: #fdeed9; } .mc-chip.ctg-plan { background: #e9f1d9; } .mc-chip.ctg-pub { background: #e3e8e4; opacity: .85; }
.mc-t { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; min-width: 0; }
.mc-more { border: 0; background: none; color: var(--vf); font-size: 12px; font-weight: 600; text-align: left; padding: 2px 4px; cursor: pointer; }
@media (max-width: 760px) { .mc-day { min-height: 70px; padding: 3px; } .mc-t { display: none; } .mc-chip { width: auto; } .mc-dow span { padding: 6px 2px; text-align: center; } }
.mc-t { white-space: normal; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.mc-chip { align-items: flex-start; }
.mc-chip .plat { margin-top: 1px; }

/* Liste cliquable au survol d'un jour à plusieurs publications */
.pop-list { position: fixed; z-index: 130; width: min(320px, calc(100vw - 16px)); max-height: 70vh; overflow: auto; background: #fff; border: 1px solid var(--line-2); border-radius: 14px; box-shadow: 0 10px 30px rgba(31, 63, 71,.22); padding: 8px; display: grid; gap: 6px; }
.pop-list[hidden] { display: none; }
.pop-h { font-size: 12px; font-weight: 700; color: var(--ink-3); text-transform: uppercase; letter-spacing: .05em; padding: 4px 6px 2px; }
.pop-i { display: flex; align-items: flex-start; gap: 10px; text-align: left; width: 100%; border: 0; border-left: 4px solid var(--pc, #b8bdb0); background: #f6f4e8; border-radius: 8px; padding: 9px 10px; cursor: pointer; font: inherit; color: var(--ink); }
.pop-i:hover, .pop-i:focus-visible { background: #ebf0d6; outline: none; }
.pop-i .plat { margin-top: 2px; }
.pop-t { display: grid; gap: 2px; min-width: 0; }
.pop-t b { font-size: 14px; line-height: 1.3; font-weight: 600; }
.pop-list { overscroll-behavior: contain; scrollbar-width: thin; }
/* Coûts effectifs et planification sur téléphone : les totaux passent à la ligne au lieu de sortir de l'écran */
@media (max-width: 760px) {
  .bd-ghd, .bd-tree .bd-hd { flex-wrap: wrap; row-gap: 2px; }
  .bd-ghd .grow, .bd-tree .bd-hd .grow { display: none; }
  .bd-ghd .bd-tot, .bd-tree .bd-hd .bd-tot { margin-left: 0; margin-right: 12px; }
  .bd-ghd .bd-gname { flex: 1 1 auto; }
}

/* Tickets : pièces jointes */
.tk-attach { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; margin: 8px 0 10px; cursor: pointer; }
.tk-picked { color: var(--ink-2); }
.tk-files { display: flex; gap: 8px; flex-wrap: wrap; margin-top: 8px; }
.tk-img { border: 1px solid var(--line-2); border-radius: 10px; padding: 0; background: #fff; cursor: zoom-in; overflow: hidden; width: 110px; height: 80px; }
.tk-img img { width: 100%; height: 100%; object-fit: cover; display: block; }
.tk-doc { display: inline-flex; align-items: center; gap: 8px; border: 1px solid var(--line-2); border-radius: 10px; padding: 8px 12px; background: #fff; cursor: pointer; font: inherit; max-width: 100%; }
.tk-doc span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; max-width: 220px; }
.tk-doc small { color: var(--ink-3); }
