/* EpiCOMment — V0.1 démo UX
   Identité : charte graphique Fête du Blé et du Pain (version 1.0, septembre 2026) */

:root {
  /* Palette officielle */
  --vf: #003220;          /* vert foncé */
  --vert: #a1bc5f;
  --vc: #cfde8c;          /* vert clair */
  --jaune: #ffe730;
  --orange: #fbbc43;
  --dore: #eac055;

  /* Neutres chauds dérivés */
  --bg: #f7f5ea;
  --surface: #ffffff;
  --surface-2: #faf9f1;
  --line: #e6e2d0;
  --line-2: #d6d1b9;
  --ink: #14211a;
  --ink-2: #4c564e;
  --ink-3: #7b8378;
  --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(0, 50, 32, .06), 0 4px 14px rgba(0, 50, 32, .05);
  --shadow-lg: 0 10px 40px rgba(0, 50, 32, .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(207, 222, 140, .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 { 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(0, 50, 32, .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(0, 50, 32, .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(247, 245, 234, .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(0, 50, 32, .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: #014a31; }
.btn.accent { background: var(--jaune); border-color: var(--jaune); color: var(--vf); }
.btn.accent:hover { background: #ffee66; border-color: #ffee66; }
.btn.ghost { background: transparent; border-color: transparent; color: var(--ink-2); }
.btn.ghost:hover { background: rgba(0, 50, 32, .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(161, 188, 95, .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(0, 50, 32, .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: linear-gradient(100deg, #ffe730 0%, #cfde8c 55%, #a1bc5f 100%);
  display: flex; align-items: center; gap: 24px; min-height: 190px;
}
.hero svg.waves { position: absolute; inset: 0; width: 100%; height: 100%; opacity: .85; }
.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(0, 50, 32, .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: #f1f6df; 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(0, 32, 20, .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); transform: translateX(105%); transition: transform .22s ease; display: flex; flex-direction: column; }
.drawer.show { 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(0, 32, 20, .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: 230px; }
.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(0, 50, 32, .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(0, 50, 32, .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 { 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(0, 50, 32, .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, #eef2e0 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: #eef2e0; } .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: #d6d1b9; }
.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: #eef2e0; 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: #f1f6df; 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 #e6e2d0; }
.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(161, 188, 95, .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(161, 188, 95, .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: var(--vf); }

.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(161, 188, 95, .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: linear-gradient(120deg, #ffe730, #cfde8c 55%, #a1bc5f); display: grid; place-items: center; padding: 40px; }
.login-art svg.waves { position: absolute; inset: 0; width: 100%; height: 100%; }
.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; } }
