/* ACCAAN Solutions — Compte rendu
   Charte graphique v1.0 : Source Sans 3 · Bleu ACCAAN #005ECC · Vert ACCAAN #02B16E · Gris graphite #53575E */

@font-face { font-family: "Source Sans 3"; src: url(../fonts/SourceSans3-Regular.woff) format("woff"); font-weight: 400; font-display: swap; }
@font-face { font-family: "Source Sans 3"; src: url(../fonts/SourceSans3-Italic.woff) format("woff"); font-weight: 400; font-style: italic; font-display: swap; }
@font-face { font-family: "Source Sans 3"; src: url(../fonts/SourceSans3-SemiBold.woff) format("woff"); font-weight: 600; font-display: swap; }
@font-face { font-family: "Source Sans 3"; src: url(../fonts/SourceSans3-Bold.woff) format("woff"); font-weight: 700; font-display: swap; }

:root {
  --accent: #005ECC;                 /* Bleu ACCAAN : actions principales, titres, liens */
  --accent-ink: #004BA3;
  --accent-soft: #EAF2FC;
  --accent-line: #BCD6F5;
  --green: #02B16E;                  /* Vert ACCAAN : coche, validation, accents */
  --bg: #F3F6F9;                     /* fond secondaire */
  --surface: #FFFFFF;                /* fond principal */
  --sunk: #F8FAFC;
  --ink: #53575E;                    /* Gris graphite : textes */
  --ink-2: #5C6168;
  --muted: #737880;
  --line: #E3E8EE;
  --line-2: #CDD5DE;
  --ok: #027A4C;   --ok-soft: #E3F6EE;
  --todo: #9A5B12; --todo-soft: #FBF1E3;
  --prog: #005ECC; --prog-soft: #EAF2FC;
  --late: #B4372F; --late-soft: #FBEAE8;
  --radius: 10px;
  --shadow: 0 1px 2px rgba(30,45,65,.05), 0 6px 24px -8px rgba(30,45,65,.10);
  --sans: "Source Sans 3", Corbel, ui-sans-serif, system-ui, -apple-system, "Segoe UI", sans-serif;
  --display: var(--sans);
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0; background: var(--bg); color: var(--ink);
  font: 400 16px/1.45 var(--sans);
  -webkit-font-smoothing: antialiased;
  min-height: 100vh; display: flex; flex-direction: column;
}
a { color: inherit; text-decoration: none; }
button, input, select, textarea { font: inherit; color: inherit; }
img { max-width: 100%; display: block; }
svg { width: 1.15em; height: 1.15em; flex: none; } /* taille par défaut des icônes */
.tnum { font-variant-numeric: tabular-nums; }
.muted { color: var(--muted); }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }

/* ---------- En-tête ---------- */
.top {
  position: sticky; top: 0; z-index: 30;
  background: rgba(255,255,255,.92);
  backdrop-filter: saturate(1.4) blur(14px); -webkit-backdrop-filter: saturate(1.4) blur(14px);
  border-bottom: 1px solid transparent; transition: border-color .2s;
}
.top { border-bottom-color: var(--line); }
.top-in { max-width: 1180px; margin: 0 auto; padding: 0 28px; height: 68px; display: flex; align-items: center; gap: 28px; }
.brand { display: flex; align-items: center; gap: 10px; white-space: nowrap; }
.brand img { height: 40px; width: auto; }
.brand-txt { display: flex; flex-direction: column; line-height: 1.1; }
.brand-txt b { font-weight: 700; font-size: 17px; color: var(--ink); }
.brand-txt small { font-weight: 600; font-size: 12.5px; color: var(--accent); }
.nav { display: flex; gap: 2px; }
.nav a { padding: 7px 12px; border-radius: 8px; color: var(--ink-2); font-size: 14px; transition: background .15s, color .15s; }
.nav a:hover { background: rgba(0,0,0,.04); color: var(--ink); }
.nav a.on { color: var(--accent); background: var(--accent-soft); font-weight: 600; }
.top-right { margin-left: auto; display: flex; align-items: center; gap: 10px; }
.avatar { width: 32px; height: 32px; border-radius: 50%; background: var(--accent-soft); color: var(--accent-ink); display: grid; place-items: center; font-size: 12px; font-weight: 600; letter-spacing: .02em; border: 1px solid var(--accent-line); cursor: pointer; }
.menu { position: relative; }
.menu-pop { position: absolute; right: 0; top: 42px; min-width: 210px; background: var(--surface); border: 1px solid var(--line); border-radius: 12px; box-shadow: var(--shadow); padding: 6px; display: none; }
.menu.open .menu-pop { display: block; }
.menu-pop .who { padding: 8px 10px 10px; border-bottom: 1px solid var(--line); margin-bottom: 4px; font-size: 13px; }
.menu-pop .who b { display: block; font-weight: 600; font-size: 14px; }
.menu-pop a, .menu-pop button { display: block; width: 100%; text-align: left; padding: 8px 10px; border-radius: 7px; border: 0; background: none; font-size: 14px; cursor: pointer; }
.menu-pop a:hover, .menu-pop button:hover { background: var(--sunk); }

/* ---------- Mise en page ---------- */
main { flex: 1; width: 100%; max-width: 1180px; margin: 0 auto; padding: 36px 28px 64px; }
.narrow { max-width: 760px; }
.head { display: flex; align-items: flex-end; gap: 20px; margin-bottom: 28px; flex-wrap: wrap; }
.head h1, .h1 { font: 700 38px/1.08 var(--display); letter-spacing: -.005em; margin: 0; }
.head p { margin: 6px 0 0; color: var(--muted); }
.head .actions { margin-left: auto; display: flex; gap: 8px; }
.eyebrow { font-size: 12.5px; letter-spacing: .06em; text-transform: uppercase; color: var(--accent); font-weight: 600; }

/* ---------- Boutons & champs ---------- */
.btn { display: inline-flex; align-items: center; gap: 8px; height: 38px; padding: 0 15px; border-radius: 9px; border: 1px solid var(--line-2); background: var(--surface); font-size: 15px; font-weight: 600; cursor: pointer; white-space: nowrap; transition: background .15s, border-color .15s, transform .05s, box-shadow .15s; }
.btn:hover { border-color: #B5C0CC; background: #FAFCFE; }
.btn:active { transform: translateY(1px); }
.btn.primary { background: var(--accent); color: #fff; border-color: var(--accent); }
.btn.primary:hover { background: var(--accent-ink); border-color: var(--accent-ink); }
.btn.accent { background: var(--accent); color: #fff; border-color: var(--accent); }
.btn.accent:hover { background: var(--accent-ink); }
.btn.ghost { background: transparent; border-color: transparent; color: var(--ink-2); }
.btn.ghost:hover { background: rgba(0,0,0,.045); }
.btn.danger { color: var(--late); }
.btn.sm { height: 32px; padding: 0 11px; font-size: 13px; border-radius: 8px; }
.btn.icon { width: 32px; padding: 0; justify-content: center; }
.btn svg { width: 16px; height: 16px; flex: none; }
.btn[disabled] { opacity: .5; pointer-events: none; }

label.f { display: block; margin-bottom: 16px; }
label.f > span { display: block; font-size: 13px; color: var(--ink-2); margin-bottom: 6px; font-weight: 600; }
.in, .f input:not([type=checkbox]):not([type=radio]):not([type=color]):not([type=file]), .f select, .f textarea {
  width: 100%; height: 42px; padding: 0 13px; border-radius: 9px; border: 1px solid var(--line-2); background: var(--surface); outline: none; transition: border-color .15s, box-shadow .15s;
}
.f textarea { height: auto; padding: 10px 13px; resize: vertical; }
.in:focus, .f input:focus, .f select:focus, .f textarea:focus { border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-soft); }
.grid2 { display: grid; grid-template-columns: 1fr 1fr; gap: 0 16px; }
.grid3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 0 16px; }

.card { background: var(--surface); border: 1px solid var(--line); border-radius: 14px; box-shadow: var(--shadow); }
.card.pad { padding: 28px; }

/* ---------- Messages ---------- */
.flashes { position: fixed; z-index: 60; top: 76px; left: 50%; transform: translateX(-50%); display: grid; gap: 8px; width: min(520px, calc(100% - 32px)); }
.flash { background: var(--ink); color: #fff; padding: 12px 16px; border-radius: 10px; font-size: 14px; box-shadow: 0 10px 30px -10px rgba(0,0,0,.35); animation: drop .35s cubic-bezier(.2,.9,.3,1.2), fade .4s 5s forwards; }
.flash.error { background: var(--late); }
@keyframes drop { from { opacity: 0; transform: translateY(-8px); } }
@keyframes fade { to { opacity: 0; visibility: hidden; } }

/* ---------- Pastilles ---------- */
.pill { display: inline-flex; align-items: center; gap: 6px; height: 22px; padding: 0 9px; border-radius: 99px; font-size: 12px; font-weight: 600; white-space: nowrap; background: #EEF2F6; color: var(--ink-2); }
.pill::before { content: ""; width: 6px; height: 6px; border-radius: 50%; background: currentColor; opacity: .85; }
.pill.fait::before, .pill.diffuse::before { content: "✓"; width: auto; height: auto; background: none; color: var(--green); font-weight: 700; opacity: 1; }
.pill.plain::before { display: none; }
.pill.afaire { background: var(--todo-soft); color: var(--todo); }
.pill.encours { background: var(--prog-soft); color: var(--prog); }
.pill.fait { background: var(--ok-soft); color: var(--ok); }
.pill.late { background: var(--late-soft); color: var(--late); }
.pill.diffuse { background: var(--ok-soft); color: var(--ok); }
.pill.brouillon { background: #EEF2F6; color: var(--muted); }

/* ---------- Liste des CR ---------- */
.filters { display: flex; gap: 10px; align-items: center; margin-bottom: 18px; flex-wrap: wrap; }
.search { position: relative; flex: 1; min-width: 220px; max-width: 380px; }
.search svg { position: absolute; left: 12px; top: 50%; transform: translateY(-50%); width: 16px; color: var(--muted); }
.search input { padding-left: 36px; }
.seg { display: inline-flex; background: #E6ECF2; border-radius: 10px; padding: 3px; gap: 2px; }
.seg a, .seg label { padding: 6px 12px; border-radius: 8px; font-size: 13px; color: var(--ink-2); cursor: pointer; white-space: nowrap; }
.seg a.on, .seg input:checked + span { background: var(--surface); color: var(--ink); box-shadow: 0 1px 2px rgba(0,0,0,.08); }
.seg input { display: none; }
.seg label span { display: block; padding: 0; }
.select-in { height: 38px; padding: 0 34px 0 12px; border-radius: 9px; border: 1px solid var(--line-2); background: var(--surface) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 24 24' fill='none' stroke='%238B9097' stroke-width='2.4'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E") no-repeat right 12px center; appearance: none; font-size: 14px; }

.list { background: var(--surface); border: 1px solid var(--line); border-radius: 14px; box-shadow: var(--shadow); overflow: hidden; }
.month { padding: 22px 24px 8px; font-size: 12px; letter-spacing: .08em; text-transform: uppercase; color: var(--muted); font-weight: 600; }
.row { display: grid; grid-template-columns: 74px 1fr auto auto; gap: 20px; align-items: center; padding: 16px 24px; border-top: 1px solid var(--line); transition: background .12s; }
.month + .row { border-top: 0; }
.row:hover { background: var(--sunk); }
.row .no { font: 700 26px/1 var(--display); letter-spacing: -.005em; color: var(--ink); }
.row .no small { display: block; font: 600 10.5px/1.4 var(--sans); letter-spacing: .07em; text-transform: uppercase; color: var(--muted); margin-top: 6px; }
.row .t { min-width: 0; }
.row .t b { display: block; font-weight: 600; font-size: 15.5px; letter-spacing: -.005em; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.row .t span { display: block; color: var(--muted); font-size: 13.5px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; margin-top: 2px; }
.row .meta { display: flex; gap: 16px; color: var(--muted); font-size: 13px; align-items: center; }
.row .meta i { font-style: normal; display: inline-flex; gap: 5px; align-items: center; }
.row .meta svg { width: 14px; height: 14px; }
.row .d { text-align: right; min-width: 118px; }
.row .d b { display: block; font-weight: 600; font-size: 14px; }
.row .d .pill { margin-top: 5px; }

.empty { text-align: center; padding: 80px 24px; }
.empty .ill { width: 64px; height: 80px; margin: 0 auto 22px; border: 1.5px solid var(--line-2); border-radius: 8px; background: var(--surface); position: relative; box-shadow: 10px 10px 0 -1px var(--bg), 10px 10px 0 0 var(--line-2); }
.empty .ill::before { content: ""; position: absolute; left: 12px; right: 12px; top: 16px; height: 34px; background: repeating-linear-gradient(var(--line-2) 0 1.5px, transparent 1.5px 9px); }
.empty h2 { font: 700 22px/1.2 var(--display); letter-spacing: -.005em; margin: 0 0 8px; }
.empty p { color: var(--muted); margin: 0 0 22px; }

/* ---------- Choix du type ---------- */
.types { display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; margin-bottom: 22px; }
.type-opt input { display: none; }
.type-opt div { border: 1px solid var(--line-2); border-radius: 12px; padding: 18px; cursor: pointer; height: 100%; transition: border-color .15s, box-shadow .15s, background .15s; background: var(--surface); }
.type-opt div:hover { border-color: #B5C0CC; }
.type-opt input:checked + div { border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-soft); }
.type-opt svg { width: 22px; height: 22px; color: var(--accent); margin-bottom: 14px; }
.type-opt b { display: block; font-weight: 600; margin-bottom: 4px; }
.type-opt span { font-size: 13px; color: var(--muted); line-height: 1.45; display: block; }

/* ---------- Tableaux simples ---------- */
table.t { width: 100%; border-collapse: collapse; font-size: 14px; }
table.t th { text-align: left; font-weight: 600; font-size: 12px; letter-spacing: .06em; text-transform: uppercase; color: var(--muted); padding: 14px 20px; border-bottom: 1px solid var(--line); }
table.t td { padding: 14px 20px; border-bottom: 1px solid var(--line); vertical-align: middle; }
table.t tr:last-child td { border-bottom: 0; }
table.t tr.off td { color: var(--muted); }

/* ---------- Dialogues ---------- */
dialog { border: 0; padding: 0; border-radius: 16px; background: var(--surface); box-shadow: 0 30px 80px -20px rgba(0,0,0,.35); width: min(480px, calc(100% - 32px)); color: var(--ink); }
dialog::backdrop { background: rgba(21,24,29,.32); backdrop-filter: blur(3px); }
dialog[open] { animation: pop .22s cubic-bezier(.2,.9,.3,1.1); }
@keyframes pop { from { opacity: 0; transform: translateY(8px) scale(.98); } }
.dlg-h { padding: 24px 26px 6px; }
.dlg-h h3 { margin: 0; font: 700 20px/1.2 var(--display); letter-spacing: -.005em; }
.dlg-h p { margin: 6px 0 0; color: var(--muted); font-size: 14px; }
.dlg-b { padding: 18px 26px; }
.dlg-f { padding: 14px 26px 22px; display: flex; justify-content: flex-end; gap: 8px; }

/* ---------- Pied de page & mise à jour ---------- */
.foot { border-top: 1px solid var(--line); }
.foot-in { max-width: 1180px; margin: 0 auto; padding: 18px 28px; display: flex; align-items: center; gap: 14px; font-size: 13px; color: var(--muted); }
.foot-in .sp { flex: 1; }
.foot .ver { font-variant-numeric: tabular-nums; }
.drop { border: 1.5px dashed var(--line-2); border-radius: 12px; padding: 28px 18px; text-align: center; cursor: pointer; transition: border-color .15s, background .15s; display: block; }
.drop:hover, .drop.over { border-color: var(--accent); background: var(--accent-soft); }
.drop b { display: block; font-weight: 600; margin-bottom: 3px; }
.drop span { font-size: 13px; color: var(--muted); }
.drop input { display: none; }
.progress { height: 4px; border-radius: 4px; background: var(--line); overflow: hidden; margin-top: 16px; display: none; }
.progress i { display: block; height: 100%; width: 0; background: var(--accent); transition: width .2s; }
.upd-state { font-size: 14px; margin-top: 12px; min-height: 21px; }

/* ---------- Authentification ---------- */
.auth { min-height: 100vh; display: grid; place-items: center; padding: 24px; }
.auth .card { width: min(420px, 100%); padding: 38px 36px 30px; }
.auth h1 { font: 700 28px/1.15 var(--display); margin: 18px 0 6px; }
.auth-logo { width: 150px; height: auto; margin: -6px auto 0; }
.auth p.sub { color: var(--muted); margin: 0 0 26px; }
.auth .btn { width: 100%; justify-content: center; height: 44px; margin-top: 4px; }

/* =================================================================
   Document (vue & impression)
   ================================================================= */
.doc-bar { display: flex; align-items: center; gap: 8px; margin: -8px auto 22px; max-width: 880px; flex-wrap: wrap; }
.doc-bar .sp { flex: 1; }
.doc-bar .crumb { font-size: 14px; color: var(--muted); display: flex; align-items: center; gap: 8px; }
.doc-bar .crumb a:hover { color: var(--ink); }
.doc-bar .crumb svg { width: 16px; height: 16px; }
.share { max-width: 880px; margin: 0 auto 18px; display: flex; align-items: center; gap: 12px; background: var(--accent-soft); border: 1px solid var(--accent-line); border-radius: 12px; padding: 10px 10px 10px 16px; font-size: 14px; }
.share > svg { width: 18px; height: 18px; color: var(--accent); }
.share code { flex: 1; font: 13px ui-monospace, SFMono-Regular, Menlo, monospace; color: var(--accent-ink); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

.paper { max-width: 880px; margin: 0 auto; background: var(--surface); border: 1px solid var(--line); border-radius: 12px; box-shadow: 0 1px 2px rgba(0,0,0,.03), 0 24px 60px -24px rgba(20,22,26,.18); padding: 64px 72px 56px; position: relative; }
.doc-h { display: grid; grid-template-columns: 160px 1fr; gap: 36px; align-items: center; padding-bottom: 28px; border-bottom: 1px solid var(--line); }
.doc-logo { width: 160px; height: auto; }
.doc-head .eyebrow { display: block; margin-bottom: 6px; }
.doc-head h1 { font: 700 34px/1.12 var(--display); color: var(--ink); margin: 0; text-wrap: balance; }
.doc-head .obj { font-size: 17px; color: var(--ink-2); margin: 10px 0 0; text-wrap: pretty; }
.doc-head .no { display: inline-flex; gap: 6px; align-items: baseline; margin-top: 12px; font-size: 14px; color: var(--muted); }
.doc-head .no b { font: 700 15px/1 var(--display); color: var(--accent); font-variant-numeric: tabular-nums; }
.meta-grid { display: grid; grid-template-columns: repeat(4, 1fr); margin: 22px 0 8px; background: var(--bg); border-radius: 10px; }
.meta-grid div { padding: 14px 16px !important; }
.meta-grid div + div { border-left: 1px solid var(--line) !important; }
.meta-grid div { padding: 14px 16px 14px 0; }
.meta-grid div + div { padding-left: 16px; border-left: 1px solid var(--line); }
.meta-grid span { display: block; font-size: 11px; letter-spacing: .08em; text-transform: uppercase; color: var(--muted); margin-bottom: 3px; }
.meta-grid b { font-weight: 600; font-size: 15px; color: var(--ink); }

.dsec { margin-top: 44px; break-inside: auto; }
.dsec-h { display: flex; align-items: baseline; gap: 14px; padding-bottom: 12px; border-bottom: 1px solid var(--line); margin-bottom: 4px; break-after: avoid; }
.dsec-h .n { font: 700 21px/1.25 var(--display); color: var(--accent); font-variant-numeric: tabular-nums; letter-spacing: .02em; }
.dsec-h h2 { font: 700 21px/1.25 var(--display); color: var(--accent); margin: 0; }
.dsec-h .c { margin-left: auto; font-size: 12px; color: var(--muted); }

.people { width: 100%; border-collapse: collapse; font-size: 13.5px; }
.people th { text-align: left; font-weight: 600; font-size: 11px; letter-spacing: .07em; text-transform: uppercase; color: var(--muted); padding: 10px 10px 8px 0; }
.people td { padding: 9px 10px 9px 0; border-top: 1px solid var(--line); vertical-align: top; }
.people td:first-child { font-weight: 600; }
.people .pr { text-align: right; padding-right: 0; }
.pres { display: inline-grid; place-items: center; width: 22px; height: 22px; border-radius: 6px; font-size: 11px; font-weight: 600; background: #EEF2F6; color: var(--muted); }
.pres.P { background: var(--ink); color: #fff; }
.pres.E { background: var(--todo-soft); color: var(--todo); }
.pres.A { background: var(--late-soft); color: var(--late); }
.legend { display: flex; gap: 16px; font-size: 12px; color: var(--muted); margin-top: 12px; flex-wrap: wrap; }
.legend span { display: inline-flex; gap: 6px; align-items: center; }
.legend .pres { width: 16px; height: 16px; font-size: 9px; border-radius: 4px; }

.pt { display: grid; grid-template-columns: 48px 1fr 168px; gap: 18px; padding: 16px 0; border-bottom: 1px solid var(--line); break-inside: avoid; }
.pt:last-child { border-bottom: 0; }
.pt .ref { font: 600 13px/1.6 var(--display); color: var(--muted); font-variant-numeric: tabular-nums; }
.pt .tx { white-space: pre-wrap; font-size: 14.5px; line-height: 1.6; text-wrap: pretty; min-width: 0; overflow-wrap: anywhere; }
.pt .loc { font-size: 12.5px; color: var(--accent); font-weight: 600; margin-bottom: 4px; display: flex; gap: 5px; align-items: center; }
.pt .loc svg { width: 13px; height: 13px; }
.pt .org { font-size: 11.5px; color: var(--muted); margin-top: 6px; font-style: italic; }
.pt .side { text-align: right; font-size: 13px; display: flex; flex-direction: column; align-items: flex-end; gap: 5px; }
.pt .side .who { font-weight: 600; font-size: 12.5px; letter-spacing: .01em; text-transform: uppercase; }
.pt .side .when { color: var(--muted); font-variant-numeric: tabular-nums; font-size: 12.5px; }
.pt .side .when.late { color: var(--late); font-weight: 600; }
.ph { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 8px; margin-top: 12px; }
.ph a { display: block; aspect-ratio: 4/3; border-radius: 6px; overflow: hidden; background: var(--sunk); }
.ph img { width: 100%; height: 100%; object-fit: cover; transition: transform .3s; }
.ph a:hover img { transform: scale(1.03); }
.nopoint { color: var(--muted); font-size: 14px; padding: 14px 0 4px; font-style: italic; }

.actions-t { width: 100%; border-collapse: collapse; font-size: 13.5px; }
.actions-t th { text-align: left; font-weight: 600; font-size: 11px; letter-spacing: .07em; text-transform: uppercase; color: var(--muted); padding: 10px 12px 8px 0; }
.actions-t td { padding: 10px 12px 10px 0; border-top: 1px solid var(--line); vertical-align: top; }
.actions-t td:first-child { color: var(--muted); font-variant-numeric: tabular-nums; width: 44px; }
.actions-t .clip { display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }

.next { margin-top: 40px; display: grid; grid-template-columns: auto 1fr; gap: 24px; align-items: center; background: var(--bg); color: var(--ink); border-radius: 10px; padding: 22px 26px; break-inside: avoid; }
.next .cal { width: 64px; text-align: center; border-right: 1px solid var(--line-2); padding-right: 24px; color: var(--accent); }
.next .cal b { display: block; font: 700 34px/1 var(--display); }
.next .cal span { font-size: 12px; letter-spacing: .06em; text-transform: uppercase; font-weight: 600; }
.next p { margin: 4px 0 0; font-size: 18px; font-weight: 600; }
.next small { display: block; color: var(--muted); margin-top: 2px; font-size: 14px; }
.remarks { margin-top: 36px; font-size: 14px; color: var(--ink-2); white-space: pre-wrap; border-left: 2px solid var(--line-2); padding-left: 16px; }
.doc-f { margin-top: 48px; padding-top: 16px; border-top: 1px solid var(--line); display: flex; justify-content: space-between; gap: 20px; font-size: 11.5px; color: var(--muted); }

/* lightbox */
.lb { position: fixed; inset: 0; z-index: 80; background: rgba(12,14,17,.92); display: none; place-items: center; padding: 40px; cursor: zoom-out; }
.lb.on { display: grid; }
.lb img { max-width: 100%; max-height: 100%; border-radius: 4px; box-shadow: 0 20px 60px rgba(0,0,0,.5); }

/* =================================================================
   Éditeur
   ================================================================= */
.ed-bar { position: sticky; top: 64px; z-index: 20; max-width: 880px; margin: -8px auto 18px; display: flex; align-items: center; gap: 8px; padding: 8px 8px 8px 16px; background: color-mix(in srgb, var(--surface) 92%, transparent); backdrop-filter: blur(10px); border: 1px solid var(--line); border-radius: 12px; box-shadow: var(--shadow); }
.ed-bar .st { font-size: 13px; color: var(--muted); display: flex; align-items: center; gap: 8px; }
.ed-bar .st i { width: 7px; height: 7px; border-radius: 50%; background: var(--ok); }
.ed-bar .st.saving i { background: var(--todo); animation: blink 1s infinite; }
.ed-bar .st.err i { background: var(--late); }
.ed-bar .st.err { color: var(--late); }
@keyframes blink { 50% { opacity: .3; } }
.ed-bar .sp { flex: 1; }

.ed .paper { padding: 52px 64px 48px; }
.ed input.bare, .ed textarea.bare, .ed select.bare { border: 0; background: transparent; outline: none; width: 100%; padding: 0; border-radius: 6px; transition: background .15s, box-shadow .15s; }
.ed .bare:hover { background: var(--sunk); }
.ed .bare:focus { background: var(--accent-soft); box-shadow: 0 0 0 4px var(--accent-soft); }
.ed .bare::placeholder { color: #A3AAB3; }
.ed .doc-head h1 input { font: inherit; color: inherit; }
.ed .obj textarea { font: inherit; color: inherit; resize: none; overflow: hidden; display: block; }
.ed .meta-grid { grid-template-columns: 1.25fr 1.45fr 1.2fr .9fr; }
.ed .meta-grid input, .ed .meta-grid select { font-weight: 600; font-size: 14.5px; height: 24px; }
.ed .meta-grid select { appearance: none; cursor: pointer; }

.ed .dsec-h input { font: 700 19px/1.25 var(--display); letter-spacing: -.005em; }
.sec-tools { display: flex; gap: 2px; opacity: 0; transition: opacity .15s; }
.dsec:hover .sec-tools, .dsec:focus-within .sec-tools { opacity: 1; }

/* participants */
.pp { width: 100%; border-collapse: collapse; font-size: 13.5px; }
.pp th { text-align: left; font-weight: 600; font-size: 11px; letter-spacing: .07em; text-transform: uppercase; color: var(--muted); padding: 10px 8px 6px 0; }
.pp td { padding: 4px 8px 4px 0; border-top: 1px solid var(--line); }
.pp input.bare { height: 32px; padding: 0 6px; margin-left: -6px; width: calc(100% + 6px); }
.pp td.pr { width: 132px; }
.pp td.x { width: 34px; text-align: right; }
.pres-pick { display: inline-flex; gap: 3px; }
.pres-pick button { width: 28px; height: 26px; border-radius: 6px; border: 1px solid var(--line); background: var(--surface); font-size: 11px; font-weight: 600; color: var(--muted); cursor: pointer; padding: 0; }
.pres-pick button:hover { border-color: var(--line-2); color: var(--ink); }
.pres-pick button.on.P { background: var(--ink); color: #fff; border-color: var(--ink); }
.pres-pick button.on.E { background: var(--todo-soft); color: var(--todo); border-color: transparent; }
.pres-pick button.on.A { background: var(--late-soft); color: var(--late); border-color: transparent; }
.pres-pick button.on.D { background: #E6ECF2; color: var(--ink-2); border-color: transparent; }
.add-row { display: flex; gap: 8px; margin-top: 10px; }

/* points */
.ept { display: grid; grid-template-columns: 48px 1fr; gap: 18px; padding: 16px 0; border-bottom: 1px solid var(--line); position: relative; }
.ept .ref { font: 600 13px/1.6 var(--display); color: var(--muted); font-variant-numeric: tabular-nums; padding-top: 4px; }
.ept textarea.tx { font-size: 14.5px; line-height: 1.6; resize: none; overflow: hidden; min-height: 32px; padding: 4px 8px; margin: 0 -8px; width: calc(100% + 16px); display: block; }
.ept .loc-in { font-size: 12.5px; color: var(--accent); font-weight: 600; height: 26px; padding: 0 8px; margin: 0 -8px 2px; width: calc(100% + 16px); }
.ept .props { display: flex; gap: 8px; align-items: center; margin-top: 10px; flex-wrap: wrap; }
.chip-in { height: 30px; border: 1px solid var(--line); border-radius: 8px; padding: 0 10px; font-size: 13px; background: var(--surface); outline: none; transition: border-color .15s, box-shadow .15s; }
.chip-in:focus { border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-soft); }
.chip-in.who { width: 170px; text-transform: uppercase; font-weight: 600; letter-spacing: .01em; }
.chip-in.who::placeholder { text-transform: none; font-weight: 400; letter-spacing: 0; }
.chip-in.when { width: 140px; color: var(--ink-2); }
.etat-pick { display: inline-flex; background: #EEF2F6; border-radius: 9px; padding: 2px; gap: 1px; }
.etat-pick button { height: 26px; padding: 0 9px; border: 0; background: none; border-radius: 7px; font-size: 12px; font-weight: 600; color: var(--muted); cursor: pointer; }
.etat-pick button:hover { color: var(--ink); }
.etat-pick button.on { background: var(--surface); color: var(--ink); box-shadow: 0 1px 2px rgba(0,0,0,.1); }
.etat-pick button.on.afaire { color: var(--todo); }
.etat-pick button.on.encours { color: var(--prog); }
.etat-pick button.on.fait { color: var(--ok); }
.pt-tools { position: absolute; right: -6px; top: 12px; display: flex; gap: 1px; opacity: 0; transition: opacity .15s; background: var(--surface); border-radius: 8px; }
.ept:hover .pt-tools, .ept:focus-within .pt-tools { opacity: 1; }
.pt-tools .btn { color: var(--muted); }
.pt-tools .btn:hover { color: var(--ink); }
.ept .origine { font-size: 11.5px; color: var(--muted); font-style: italic; margin-left: 4px; }
.eph { display: grid; grid-template-columns: repeat(auto-fill, minmax(120px, 1fr)); gap: 8px; margin-top: 10px; }
.eph .th { position: relative; aspect-ratio: 4/3; border-radius: 6px; overflow: hidden; background: var(--sunk); }
.eph .th img { width: 100%; height: 100%; object-fit: cover; }
.eph .th button { position: absolute; top: 5px; right: 5px; width: 24px; height: 24px; border-radius: 50%; border: 0; background: rgba(0,0,0,.6); color: #fff; cursor: pointer; display: grid; place-items: center; opacity: 0; transition: opacity .15s; }
.eph .th:hover button { opacity: 1; }
.eph .th.up { display: grid; place-items: center; font-size: 12px; color: var(--muted); }
.add-pt { display: flex; align-items: center; gap: 8px; width: 100%; padding: 14px 0 6px 66px; border: 0; background: none; color: var(--muted); font-size: 14px; cursor: pointer; text-align: left; }
.add-pt:hover { color: var(--accent); }
.add-pt svg { width: 16px; height: 16px; }
.add-sec { margin-top: 36px; width: 100%; height: 48px; border: 1.5px dashed var(--line-2); border-radius: 10px; background: none; color: var(--muted); cursor: pointer; font-size: 14px; display: flex; align-items: center; justify-content: center; gap: 8px; transition: border-color .15s, color .15s; }
.add-sec:hover { border-color: var(--accent); color: var(--accent); }
.add-sec svg, .add-row svg, .chip-in svg { width: 16px; height: 16px; }
svg { flex: none; }
.ed .next input { background: var(--surface); border: 1px solid var(--line-2); border-radius: 8px; color: var(--ink); outline: none; font: inherit; width: 100%; height: 36px; padding: 0 10px; }
.ed .next input:focus { border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-soft); }
.ed .next .row3 { display: grid; grid-template-columns: 170px 110px 1fr; gap: 16px; margin-top: 8px; font-size: 15px; }
.ed .remarks textarea { font-size: 14px; resize: none; overflow: hidden; min-height: 44px; display: block; }

/* ---------- Responsive ---------- */
@media (max-width: 860px) {
  .top-in { padding: 0 16px; gap: 14px; }
  .nav { display: none; }
  .nav.mobile { display: flex; position: fixed; bottom: 0; left: 0; right: 0; background: var(--surface); border-top: 1px solid var(--line); justify-content: space-around; padding: 6px 6px calc(6px + env(safe-area-inset-bottom)); z-index: 40; }
  body { padding-bottom: 60px; }
  main { padding: 24px 16px 48px; }
  .head h1, .h1 { font-size: 30px; }
  .row { grid-template-columns: 52px 1fr auto; padding: 14px 16px; gap: 14px; }
  .row .meta { display: none; }
  .row .no { font-size: 22px; }
  .row .d { min-width: 0; }
  .paper, .ed .paper { padding: 32px 22px 28px; }
  .doc-h { grid-template-columns: 1fr; gap: 18px; }
  .doc-logo { width: 120px; }
  .doc-head h1 { font-size: 27px; }
  .meta-grid { grid-template-columns: 1fr 1fr; }
  .meta-grid div:nth-child(3) { border-left: 0; padding-left: 0; }
  .meta-grid div:nth-child(n+3) { border-top: 1px solid var(--line); }
  .pt { grid-template-columns: 36px 1fr; }
  .pt .side { grid-column: 2; flex-direction: row; justify-content: flex-start; flex-wrap: wrap; align-items: center; }
  .ept { grid-template-columns: 32px 1fr; gap: 10px; }
  .add-pt { padding-left: 42px; }
  .types { grid-template-columns: 1fr; }
  .ph, .eph { grid-template-columns: repeat(3, 1fr); gap: 6px; }
  .doc-f { flex-direction: column; gap: 6px; }
  .doc-h { padding-bottom: 22px; }
  .next { padding: 20px; gap: 18px; }
  .next .cal { padding-right: 18px; width: 54px; }
  .grid2, .grid3 { grid-template-columns: 1fr; }
  .people .co, .pp .co { display: none; }
  .ed .next .row3 { grid-template-columns: 1fr; }
  .pt-tools { opacity: 1; position: static; justify-content: flex-end; grid-column: 2; }
  .doc-bar, .ed-bar { margin-left: 0; margin-right: 0; }
  .foot-in { padding: 16px; flex-wrap: wrap; }
  .head .actions { margin-left: 0; }
}
@media (min-width: 861px) { .nav.mobile { display: none; } }

/* ---------- Impression / PDF ---------- */
@page { size: A4; margin: 20mm 20mm 22mm; @bottom-right { content: "Page " counter(page) " / " counter(pages); font: 9pt "Source Sans 3", Corbel, sans-serif; color: #737880; } }
@media print {
  body { background: #fff; font-size: 10.5pt; display: block; }
  .top, .foot, .doc-bar, .share, .flashes, .nav.mobile, .no-print { display: none !important; }
  main { padding: 0; max-width: none; }
  .paper { box-shadow: none; border: 0; padding: 0; max-width: none; border-radius: 0; }
  .paper::before { display: none; }
  .doc-head h1 { font-size: 24pt; }
  .doc-logo { width: 40mm; }
  .doc-h { grid-template-columns: 40mm 1fr; gap: 10mm; }
  .dsec { margin-top: 26px; }
  .pt { padding: 10px 0; grid-template-columns: 40px 1fr 150px; }
  .ph { grid-template-columns: repeat(4, 1fr); }
  .next { -webkit-print-color-adjust: exact; print-color-adjust: exact; }
  .pill, .pres { -webkit-print-color-adjust: exact; print-color-adjust: exact; }
  a[href]::after { content: none; }
}

/* Charte : tableaux à fonds alternés très clairs */
.people thead th, .actions-t thead th { background: var(--bg); padding-top: 10px; padding-bottom: 10px; }
.people thead th:first-child, .actions-t thead th:first-child { padding-left: 12px; border-radius: 8px 0 0 8px; }
.people thead th:last-child, .actions-t thead th:last-child { padding-right: 12px; border-radius: 0 8px 8px 0; }
.people td:first-child, .actions-t td:first-child { padding-left: 12px; }
.people td:last-child, .actions-t td:last-child { padding-right: 12px; }
.people tbody td, .actions-t tbody td { border-top: 0; }
.people tbody tr:nth-child(even) td, .actions-t tbody tr:nth-child(even) td { background: var(--sunk); }
.people, .actions-t { border-collapse: separate; border-spacing: 0; }

/* ---------- Diffusion & messagerie ---------- */
.sec-t { display: flex; align-items: center; gap: 12px; margin-bottom: 14px; }
.sec-t h2 { margin: 0; font: 700 20px/1.25 var(--display); color: var(--accent); }
.sec-t .muted { margin-left: auto; font-size: 14px; }
.note { background: var(--todo-soft); color: #6B3F0C; border-radius: 12px; padding: 14px 18px; margin-bottom: 16px; font-size: 15px; }
.note a { text-decoration: underline; text-underline-offset: 3px; }
.hint { font-size: 14px; color: var(--muted); margin: 12px 0 0; }
.hint a, .hint code { color: var(--accent); }
.rc-list { border: 1px solid var(--line); border-radius: 10px; overflow: hidden; }
.rc { display: grid; grid-template-columns: 22px 190px 1fr auto; gap: 14px; align-items: center; padding: 11px 14px; border-top: 1px solid var(--line); cursor: pointer; }
.rc:first-child { border-top: 0; }
.rc:nth-child(even) { background: var(--sunk); }
.rc.off { cursor: default; }
.rc input { width: 17px; height: 17px; accent-color: var(--accent); }
.rc-who b { display: block; font-weight: 600; }
.rc-who small { color: var(--muted); font-size: 13.5px; }
.rc-mail { font-size: 14.5px; overflow: hidden; text-overflow: ellipsis; }
.rc-mail .warn { color: var(--late); }
.chk { display: flex; gap: 10px; align-items: flex-start; cursor: pointer; font-size: 15px; margin: 4px 0; }
.chk input { width: 17px; height: 17px; margin-top: 3px; accent-color: var(--accent); flex: none; }
.diff-f { display: flex; gap: 8px; align-items: center; margin-top: 18px; flex-wrap: wrap; }
.diff-f .sp { flex: 1; }
.envois { max-width: 880px; margin: 22px auto 0; }
table.t.sends td, table.t.sends th { padding-left: 0; }
code { font: 13.5px ui-monospace, SFMono-Regular, Menlo, monospace; }
@media (max-width: 860px) {
  .rc { grid-template-columns: 22px 1fr; }
  .rc-mail, .rc-act { grid-column: 2; }
  .diff-f .sp { display: none; }
}

/* ---------- Suivi des actions ---------- */
.astrip { display: flex; align-items: center; gap: 12px; padding: 12px 16px; margin: -8px 0 22px; border-radius: 12px; background: var(--accent-soft); border: 1px solid var(--accent-line); color: var(--ink); font-size: 15px; transition: border-color .15s; }
.astrip:hover { border-color: var(--accent); }
.astrip .ic { color: var(--accent); display: grid; }
.astrip.alert { background: var(--late-soft); border-color: #F1C6C1; }
.astrip.alert b { color: var(--late); }
.astrip .go { margin-left: auto; color: var(--accent); font-weight: 600; display: inline-flex; gap: 6px; align-items: center; white-space: nowrap; }
.kpis { display: grid; grid-template-columns: repeat(4, 1fr); gap: 12px; margin: -6px 0 24px; }
.kpi { background: var(--surface); border: 1px solid var(--line); border-radius: 12px; padding: 16px 18px; box-shadow: var(--shadow); transition: border-color .15s; }
.kpi:hover, .kpi.on { border-color: var(--accent); }
.kpi.on { box-shadow: 0 0 0 3px var(--accent-soft); }
.kpi b { display: block; font: 700 32px/1.05 var(--display); color: var(--ink); }
.kpi span { color: var(--muted); font-size: 14px; }
.kpi.alert b { color: var(--late); }
.kpi.ok b { color: var(--ok); }
.act-layout { display: grid; grid-template-columns: minmax(0, 1fr) 270px; gap: 20px; align-items: start; }
.act-layout > * { min-width: 0; }
.alist .arow { display: grid; grid-template-columns: 78px 1fr 150px 92px auto; gap: 16px; align-items: center; padding: 14px 20px; border-top: 1px solid var(--line); }
.alist .arow:first-child { border-top: 0; }
.alist.flat .arow { grid-template-columns: 78px 1fr 92px auto; padding: 12px 0; }
.arow:hover { background: var(--sunk); }
.alist.flat .arow:hover { background: none; }
.adue b { display: block; font: 700 18px/1.1 var(--display); color: var(--ink); }
.adue b.ok { color: var(--green); }
.adue small { color: var(--muted); font-size: 12.5px; }
.arow.late .adue b, .arow.late .adue small { color: var(--late); }
.arow.done .atxt .clip2 { color: var(--muted); }
.atxt { min-width: 0; }
.atxt:hover .clip2 { color: var(--accent); }
.clip2 { display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; font-size: 15px; line-height: 1.4; }
.atxt small { display: block; color: var(--muted); font-size: 13px; margin-top: 3px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.awho { font-weight: 700; font-size: 13px; text-transform: uppercase; letter-spacing: .01em; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.awho:hover { color: var(--accent); }
.atools { display: flex; gap: 4px; justify-content: flex-end; min-width: 120px; }
.btn.solder { color: var(--ok); border-color: #BFE6D3; }
.btn.solder:hover { background: var(--ok-soft); border-color: var(--green); }
.side-co { padding: 18px 18px 14px; position: sticky; top: 88px; }
.side-co .eyebrow { margin-bottom: 8px; display: block; }
.co-row { display: flex; justify-content: space-between; gap: 10px; padding: 8px 0; border-top: 1px solid var(--line); font-size: 14.5px; }
.co-row:first-of-type { border-top: 0; }
.co-row:hover { color: var(--accent); }
.co-row span:first-child { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-weight: 600; }
.late-n { font-style: normal; display: inline-grid; place-items: center; min-width: 20px; height: 20px; padding: 0 5px; border-radius: 10px; background: var(--late-soft); color: var(--late); font-size: 12px; font-weight: 700; margin-right: 6px; }
.quick { display: flex; gap: 6px; margin-top: 10px; flex-wrap: wrap; }
.act-btns { display: flex; gap: 8px; flex-wrap: wrap; margin-top: 20px; align-items: center; }
.inline-f { display: inline-flex; gap: 6px; align-items: center; }
.inline-f .chip-in { height: 38px; }
.timeline { list-style: none; margin: 0; padding: 0 0 0 18px; border-left: 2px solid var(--line); }
.timeline li { position: relative; padding: 0 0 14px 4px; }
.timeline li::before { content: ""; position: absolute; left: -25px; top: 5px; width: 10px; height: 10px; border-radius: 50%; background: var(--surface); border: 2px solid var(--line-2); }
.timeline li.cree::before { border-color: var(--accent); }
.timeline li.solde::before { background: var(--green); border-color: var(--green); }
.timeline li.reporte::before { border-color: var(--todo); }
.timeline li.rouvre::before { border-color: var(--late); }
.timeline b { display: block; font-weight: 600; font-size: 15px; }
.timeline span { font-size: 13px; }
.apps { list-style: none; margin: 0; padding: 0; }
.apps li { padding: 9px 0; border-top: 1px solid var(--line); display: flex; justify-content: space-between; gap: 10px; font-size: 14.5px; flex-wrap: wrap; }
.apps li:first-child { border-top: 0; }
.apps a:hover { color: var(--accent); }
@media (max-width: 980px) {
  .act-layout { grid-template-columns: 1fr; }
  .side-co { position: static; }
}
@media (max-width: 860px) {
  .kpis { grid-template-columns: 1fr 1fr; }
  .alist .arow, .alist.flat .arow { grid-template-columns: 60px 1fr; gap: 6px 12px; padding: 12px 14px; }
  .alist.flat .arow { padding: 12px 0; }
  .awho, .arow .pill, .atools { grid-column: 2; justify-self: start; }
  .atools { min-width: 0; }
  .astrip { flex-wrap: wrap; }
  .astrip .go { margin-left: 0; }
}
@media (max-width: 860px) {
  .search { flex: 1 1 100%; min-width: 0; max-width: none; }
  .filters .select-in { flex: 1 1 45%; min-width: 0; }
  .seg { max-width: 100%; overflow-x: auto; scrollbar-width: none; }
  .nav.mobile a { font-size: 13px; padding: 8px 6px; white-space: nowrap; text-align: center; flex: 1; }
  .kpi b { font-size: 26px; }
  .kpi span { font-size: 13px; }
}
