/* ==============================================================
   Schéma Circulation des Documents Commerciaux — CERPEG  v3
   Vue unique : Fournisseurs | Mon entreprise | Clients
   Auteur : Fabienne MAURI — Lycée Henri Brulle, Libourne
   ============================================================== */

:root {
  --bg:      #F0F4F8;
  --white:   #FFFFFF;
  --surface: #F8FAFC;
  --border:  #C8D5E0;
  --border-l:#DDE6EF;
  --text:    #0D1B2A;
  --muted:   #4A6072;
  --subtle:  #8A9BAB;

  /* Fournisseurs — vert */
  --fo:   #0B7A52;
  --fo-l: #E6F7F0;
  --fo-m: #6ECFAA;
  --fo-d: #054030;

  /* Mon entreprise — ambre */
  --en:   #B45309;
  --en-l: #FEF6E4;
  --en-m: #F2C77B;
  --en-d: #6B3405;

  /* Clients — bleu */
  --cl:   #1848B8;
  --cl-l: #EBF2FF;
  --cl-m: #85ADEF;
  --cl-d: #0F2E78;

  /* Comptabilité */
  --cpt:   #1B2D6B;
  --cpt-l: #EAF0FF;
  --cpt-m: #8FAAE8;

  /* Écriture oui / non */
  --yes:   #6B21D8;
  --yes-l: #F0EAFF;
  --yes-b: #C4A8F5;
  --no:    #607080;
  --no-l:  #EEF2F6;
  --no-b:  #B8C8D4;

  /* Hausse / baisse */
  --pos: #15803D;
  --neg: #C81E1E;

  /* Couleurs par document */
  --dv:  #8B5200; --dv-l: #FFF8EA;
  --bc:  #1848B8; --bc-l: #EBF2FF;
  --bl:  #0B7A52; --bl-l: #E6F7F0;
  --fa:  #B83A00; --fa-l: #FFF2EB;
  --av:  #A8143C; --av-l: #FFEEF3;
  --re:  #5C1CB0; --re-l: #F3EEFF;
  --pa:  #2C3E50; --pa-l: #F4F7FA;

  /* Grille 6 colonnes */
  --grid: 1fr 92px 1fr 1fr 92px 1fr;
}

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { font-size: 16px; }

body {
  font-family: 'Nunito', 'Segoe UI', system-ui, sans-serif;
  background: var(--bg);
  color: var(--text);
  padding: 1.6rem 1.6rem 0;
  line-height: 1.5;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}
.page { max-width: 1260px; width: 100%; margin: 0 auto; flex: 1; }

/* Défilement horizontal sur petit écran */
.scroll { overflow-x: auto; padding-bottom: 6px; }
.scroll-in { min-width: 1020px; }

/* ══════════════════════════════
   HEADER
   ══════════════════════════════ */
.pg-hd {
  position: relative;
  background: var(--en); color: #fff;
  border-radius: 14px; padding: 20px 70px 20px 26px;
  margin-bottom: 14px;
  display: flex; align-items: center; gap: 18px;
}
.pg-hd-ic {
  width: 52px; height: 52px;
  background: rgba(255,255,255,.18); border-radius: 12px;
  display: flex; align-items: center; justify-content: center;
  flex-shrink: 0;
}
.pg-hd-ic i { font-size: 24px; }
.pg-hd h1 { font-size: 1.3rem; font-weight: 900; }
.pg-hd p  { font-size: 0.83rem; opacity: .85; margin-top: 4px; }
.home-btn {
  position: absolute; top: 50%; right: 16px; transform: translateY(-50%);
  display: flex; align-items: center; justify-content: center;
  width: 38px; height: 38px; border-radius: 9px;
  background: rgba(255,255,255,.18); border: 1.5px solid rgba(255,255,255,.35);
  color: inherit; text-decoration: none; transition: background .18s;
}
.home-btn:hover { background: rgba(0,0,0,.10); }

/* ══════════════════════════════
   BANNIÈRE — SENS DE CIRCULATION
   ══════════════════════════════ */
.flow-banner {
  background: var(--white); border: 1px solid var(--border);
  border-radius: 14px; padding: 16px 22px; margin-bottom: 14px;
  display: grid; grid-template-columns: 1fr auto 1fr; gap: 10px 18px; align-items: center;
}
.fb-actor {
  display: flex; align-items: center; gap: 10px;
  font-weight: 900; font-size: 0.95rem; border-radius: 10px; padding: 10px 14px;
}
.fb-actor i { font-size: 22px; }
.fb-actor small { display: block; font-weight: 600; font-size: 0.75rem; opacity: .8; }
.fb-actor.fo { background: var(--fo-l); color: var(--fo-d); border: 1.5px solid var(--fo-m); }
.fb-actor.en { background: var(--en-l); color: var(--en-d); border: 2px solid var(--en); justify-content: center; text-align: center; }
.fb-actor.cl { background: var(--cl-l); color: var(--cl-d); border: 1.5px solid var(--cl-m); justify-content: flex-end; text-align: right; }
.fb-rules {
  grid-column: 1 / -1;
  display: flex; flex-wrap: wrap; justify-content: center; gap: 8px 28px;
  font-size: 0.82rem; font-weight: 700; color: var(--muted);
  padding-top: 10px; border-top: 1px dashed var(--border);
}
.fb-rules span { display: inline-flex; align-items: center; gap: 7px; }
.fb-rules i { font-size: 17px; }

/* ══════════════════════════════
   LÉGENDE
   ══════════════════════════════ */
.legend {
  display: flex; align-items: center; flex-wrap: wrap;
  gap: 8px 20px; padding: 11px 18px;
  background: var(--white); border: 1px solid var(--border);
  border-radius: 10px; margin-bottom: 18px;
  font-size: 0.83rem;
}
.li { display: flex; align-items: center; gap: 8px; color: var(--muted); font-weight: 700; }
.ldot { width: 14px; height: 14px; border-radius: 4px; flex-shrink: 0; border: 1px solid rgba(0,0,0,.14); }
.lsep { width: 1px; height: 18px; background: var(--border); }

/* ══════════════════════════════
   EN-TÊTES COLONNES
   ══════════════════════════════ */
.cg { display: grid; grid-template-columns: var(--grid); margin-bottom: 10px; align-items: stretch; }
.ch {
  padding: 12px 16px; font-size: 0.8rem; font-weight: 800;
  text-transform: uppercase; letter-spacing: .07em;
  display: flex; align-items: center; gap: 8px;
  border-radius: 12px 12px 0 0; color: #fff;
}
.ch.fo { background: var(--fo); }
.ch.cl { background: var(--cl); justify-content: flex-end; }
.ch.en {
  grid-column: span 2; background: var(--en);
  flex-direction: column; gap: 6px; padding: 10px 12px;
}
.ch.en .en-title { display: flex; align-items: center; gap: 8px; font-size: 0.92rem; font-weight: 900; }
.ch.en .en-sides { display: grid; grid-template-columns: 1fr 1fr; width: 100%; gap: 8px; }
.ch.en .en-side {
  background: rgba(255,255,255,.2); border-radius: 6px;
  padding: 3px 8px; font-size: 0.68rem; letter-spacing: .06em;
  display: flex; align-items: center; justify-content: center; gap: 5px;
}
.ch.gap { background: transparent; }

/* ══════════════════════════════
   PHASES
   ══════════════════════════════ */
.phase {
  display: flex; align-items: center; gap: 10px;
  margin: 22px 0 9px;
  font-size: 0.8rem; font-weight: 900;
  text-transform: uppercase; letter-spacing: .1em; color: var(--muted);
}
.phase i { font-size: 16px; }
.phase::after { content: ''; flex: 1; height: 1px; background: var(--border); }

/* ══════════════════════════════
   ACCORDÉON
   ══════════════════════════════ */
.acc {
  background: var(--white); border: 1px solid var(--border);
  border-radius: 14px; overflow: hidden; margin-bottom: 8px;
  transition: box-shadow .2s, transform .15s;
}
.acc:hover { box-shadow: 0 6px 24px rgba(0,0,0,.09); transform: translateY(-1px); }
.acc.open  { box-shadow: 0 6px 24px rgba(0,0,0,.11); }

.row { display: grid; grid-template-columns: var(--grid); }
.ah  { cursor: pointer; user-select: none; position: relative; }

/* Cellules */
.cell { padding: 14px 14px; display: flex; flex-direction: column; justify-content: center; gap: 8px; }
.cell.fo { background: var(--surface); }
.cell.cl { background: var(--surface); }
.cell.en { background: var(--en-l); }
.cell.en.a { border-left: 3px solid var(--en); }
.cell.en.v { border-right: 3px solid var(--en); border-left: 1px dashed var(--en-m); }

/* Fond renforcé côté émetteur */
.cell.emit.fo { background: var(--fo-l); }
.cell.emit.cl { background: var(--cl-l); }
.cell.emit.en { background: #FDEBC8; }

.acc:hover .ah .cell { filter: brightness(.98); }

/* Bloc document */
.doc { display: flex; align-items: center; gap: 11px; }
.cell.cl .doc { flex-direction: row-reverse; text-align: right; }
.di {
  width: 42px; height: 42px; border-radius: 10px;
  display: flex; align-items: center; justify-content: center; flex-shrink: 0;
}
.di i { font-size: 20px; }
.di.dv { background: var(--dv-l); color: var(--dv); }
.di.bc { background: var(--bc-l); color: var(--bc); }
.di.bl { background: var(--bl-l); color: var(--bl); }
.di.fa { background: var(--fa-l); color: var(--fa); }
.di.av { background: var(--av-l); color: var(--av); }
.di.re { background: var(--re-l); color: var(--re); }
.di.pa { background: var(--pa-l); color: var(--pa); border: 1px solid var(--border); }

.dn { font-size: 0.95rem; font-weight: 800; line-height: 1.25; }
.ds { font-size: 0.75rem; color: var(--muted); margin-top: 2px; font-weight: 600; }

/* Badges émetteur */
.tags { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; }
.cell.cl .tags { justify-content: flex-end; }
.eb {
  display: inline-flex; align-items: center; gap: 4px;
  font-size: 0.66rem; font-weight: 800;
  text-transform: uppercase; letter-spacing: .04em;
  padding: 3px 9px; border-radius: 6px; white-space: nowrap;
}
.eb.moi { background: #fff; color: var(--en); border: 2px solid var(--en); font-weight: 900; }
.eb.fo  { background: var(--fo-m); color: var(--fo-d); }
.eb.cl  { background: var(--cl-m); color: var(--cl-d); }

/* Pill écriture */
.pill {
  display: inline-flex; align-items: center; gap: 5px;
  font-size: 0.7rem; font-weight: 800;
  padding: 3px 10px; border-radius: 20px;
  white-space: nowrap; border: 1.5px solid;
}
.pill.yes { background: var(--yes-l); color: var(--yes); border-color: var(--yes-b); }
.pill.no  { background: var(--no-l);  color: var(--no);  border-color: var(--no-b); }
.pill i   { font-size: 12px; }

/* Chevron (centre de la ligne) */
.ah .cell.en.v { position: relative; }
.chev {
  position: absolute; left: 0; bottom: 2px; transform: translateX(-50%);
  font-size: 14px; color: var(--en); transition: transform .22s;
}
.acc.open .chev { transform: translateX(-50%) rotate(180deg); }

/* ══════════════════════════════
   COLONNES FLÈCHES
   ══════════════════════════════ */
.arrc {
  display: flex; flex-direction: column;
  align-items: center; justify-content: center;
  gap: 4px; padding: 10px 6px;
  background: #E8EFF6;
  border-left: 1px solid var(--border); border-right: 1px solid var(--border);
}
.ar { display: flex; flex-direction: column; align-items: center; width: 100%; gap: 1px; }
.ar + .ar { margin-top: 8px; }
.ar.c-fo { color: var(--fo); }
.ar.c-en { color: var(--en); }
.ar.c-cl { color: var(--cl); }
.arr { width: 100%; height: 22px; display: block; overflow: visible; }
.arr line, .arr polyline {
  stroke: currentColor; stroke-width: 3; fill: none;
  stroke-linecap: round; stroke-linejoin: round;
}
.arr-label {
  font-size: 0.6rem; font-weight: 800;
  letter-spacing: .04em; text-transform: uppercase;
  text-align: center; line-height: 1.15;
}

@keyframes flowAnim { from { stroke-dashoffset: 20; } to { stroke-dashoffset: 0; } }
@keyframes tipPulse { 0%, 100% { opacity: 1; } 50% { opacity: .55; } }
.arr line     { stroke-dasharray: 9 6; animation: flowAnim .75s linear infinite; }
.arr polyline { animation: tipPulse .75s ease-in-out infinite; }

/* ══════════════════════════════
   PANNEAU DE DÉTAIL
   ══════════════════════════════ */
.ab {
  display: grid; grid-template-rows: 0fr;
  transition: grid-template-rows .28s cubic-bezier(.4,0,.2,1);
}
.acc.open .ab { grid-template-rows: 1fr; }
.abi { overflow: hidden; }
.dg { border-top: 1px solid var(--border-l); }
.dg .cell { justify-content: flex-start; padding: 14px 14px 16px; gap: 0; }
.dg .cell.fo, .dg .cell.cl { background: var(--white); }

.estrip {
  display: flex; align-items: center; gap: 6px;
  font-size: 0.68rem; font-weight: 800;
  text-transform: uppercase; letter-spacing: .05em;
  padding-bottom: 8px; margin-bottom: 10px;
  border-bottom: 1px solid rgba(0,0,0,.08);
}
.estrip.fo { color: var(--fo); }
.estrip.en { color: var(--en); }
.estrip.cl { color: var(--cl); justify-content: flex-end; }

.sec { margin-bottom: 12px; }
.sec:last-child { margin-bottom: 0; }
.st {
  display: flex; align-items: center; gap: 6px;
  font-size: 0.68rem; font-weight: 800;
  text-transform: uppercase; letter-spacing: .07em; color: var(--subtle);
  margin-bottom: 6px; padding-bottom: 5px;
  border-bottom: 1px solid var(--border-l);
}
.st i { font-size: 12px; }

.sec-cpt {
  background: var(--cpt-l); border-radius: 8px; padding: 8px 10px;
  margin-bottom: 12px; border-left: 3px solid var(--cpt);
}
.sec-cpt:last-child { margin-bottom: 0; }
.sec-cpt .st { color: var(--cpt); border-bottom-color: var(--cpt-m); }
.sec-cpt .items li { color: var(--cpt); }
.sec-cpt .items li i { color: var(--cpt); }

.items { list-style: none; display: flex; flex-direction: column; gap: 1px; }
.items li {
  display: flex; align-items: flex-start; gap: 8px;
  font-size: 0.82rem; font-weight: 500; color: var(--muted);
  padding: 4px 6px; border-radius: 6px; line-height: 1.45;
}
.items li:hover { background: var(--bg); color: var(--text); }
.items li i { font-size: 14px; flex-shrink: 0; margin-top: 2px; color: var(--subtle); }
.items li strong { color: var(--text); font-weight: 700; }
.cell.cl .items li { flex-direction: row-reverse; text-align: right; }

.items li.pos, .items li.pos i, .items li.pos strong { color: var(--pos) !important; }
.items li.neg, .items li.neg i, .items li.neg strong { color: var(--neg) !important; }

/* Badge compte */
.abadge {
  display: inline-flex; align-items: center; gap: 6px;
  font-family: 'Courier New', monospace;
  font-size: 0.74rem; font-weight: 700;
  padding: 4px 11px; border-radius: 7px; margin-top: 6px; border: 1px solid;
  background: #fff;
}
.abadge.pos { color: var(--pos); border-color: #86D19F; }
.abadge.neg { color: var(--neg); border-color: #F0A0A0; }
.abadge i { font-size: 12px; }

/* Formule */
.formula {
  display: flex; align-items: center; gap: 8px;
  font-size: 0.8rem; font-weight: 700; color: var(--re);
  background: var(--re-l); border-radius: 8px;
  padding: 7px 12px; margin-top: 8px; border: 1px solid #C4A8F5;
}
.formula i { font-size: 15px; }

/* ══════════════════════════════
   TOOLTIP EFFET DE COMMERCE
   ══════════════════════════════ */
.ec-tip { position: relative; cursor: help; border-bottom: 1px dashed var(--muted); }
.ec-tip .ec-tip-box {
  display: none;
  position: absolute; bottom: calc(100% + 8px); left: 0;
  background: #1B2D3E; color: #DDE8F4;
  font-size: 0.8rem; font-weight: 500; line-height: 1.6; text-align: left;
  padding: 10px 14px; border-radius: 8px;
  width: 320px; z-index: 300;
  box-shadow: 0 6px 20px rgba(0,0,0,.28);
  pointer-events: none; white-space: normal;
}
.cell.cl .ec-tip .ec-tip-box { left: auto; right: 0; }
.ec-tip .ec-tip-box::after {
  content: ''; position: absolute; top: 100%; left: 24px;
  border: 7px solid transparent; border-top-color: #1B2D3E;
}
.cell.cl .ec-tip .ec-tip-box::after { left: auto; right: 24px; }
.ec-tip:hover .ec-tip-box { display: block; }
/* Le tooltip ne doit pas être coupé par l'accordéon ouvert */
.acc.open, .acc.open .abi { overflow: visible; }
.ah > .cell.fo { border-top-left-radius: 13px; }
.ah > .cell.cl { border-top-right-radius: 13px; }
.acc:not(.open) .ah > .cell.fo { border-bottom-left-radius: 13px; }
.acc:not(.open) .ah > .cell.cl { border-bottom-right-radius: 13px; }

/* Mesure avant impression : sans transition */
.no-anim .ab, .no-anim .cg, .no-anim .row { transition: none !important; }

/* ══════════════════════════════
   COLONNES FOURNISSEURS / CLIENTS REPLIABLES
   ══════════════════════════════ */
.page {
  --col-fo: 132px; --col-cl: 132px;
  --grid: var(--col-fo) 92px 1fr 1fr 92px var(--col-cl);
}
.page.open-fo { --col-fo: 1fr; }
.page.open-cl { --col-cl: 1fr; }
.cg, .row { transition: grid-template-columns .3s cubic-bezier(.4,0,.2,1); }

/* En-têtes cliquables */
.ch-tog { cursor: pointer; user-select: none; transition: filter .15s; }
.ch-tog:hover { filter: brightness(1.12); }
.ch-tog span { line-height: 1.2; }
.ch-tog .ico-open, .ch-tog .ico-close {
  font-size: 15px; background: rgba(255,255,255,.22); border-radius: 6px; padding: 3px;
}
.ch.fo.ch-tog .ico-open, .ch.fo.ch-tog .ico-close { margin-left: auto; }
.ch.cl.ch-tog .ico-open, .ch.cl.ch-tog .ico-close { margin-right: auto; }
.ch-tog .ico-close { display: none; }
.open-fo .ch.fo .ico-open, .open-cl .ch.cl .ico-open { display: none; }
.open-fo .ch.fo .ico-close, .open-cl .ch.cl .ico-close { display: inline-block; }

/* Boutons Achats / Ventes dans l'en-tête Mon entreprise */
.ch.en .en-tog {
  cursor: pointer; user-select: none; padding: 5px 10px; font-size: 0.72rem;
  border: 1.5px solid rgba(255,255,255,.45); transition: background .15s, color .15s;
}
.ch.en .en-tog:hover { background: rgba(255,255,255,.32); }
.open-fo .ch.en .en-tog[data-c="fo"],
.open-cl .ch.en .en-tog[data-c="cl"] { background: #fff; color: var(--en); border-color: #fff; }
.ch.en .en-tog i { font-size: 14px; }

/* Achats ou Ventes déployés : tout le côté s'ouvre (colonne + détails de chaque ligne) */
.page.open-fo .ab, .page.open-cl .ab { grid-template-rows: 1fr; }
.page.open-fo .abi, .page.open-cl .abi { overflow: visible; }
.page.open-fo .chev, .page.open-cl .chev { display: none; }
/* … mais seulement le côté demandé, sauf si la ligne a été ouverte au clic */
.page:not(.open-fo) .acc:not(.open-a) .dg > .cell.en.a > *,
.page:not(.open-fo) .acc:not(.open-a) .dg > .arrc:nth-child(2) > * { visibility: hidden; }
.page:not(.open-cl) .acc:not(.open-v) .dg > .cell.en.v > *,
.page:not(.open-cl) .acc:not(.open-v) .dg > .arrc:nth-child(5) > * { visibility: hidden; }
.page:not(.open-fo) .acc:not(.open-a) .dg > .cell.en.a,
.page:not(.open-cl) .acc:not(.open-v) .dg > .cell.en.v { background: var(--surface); }

/* Une ligne ouverte d'un seul côté : le détail fournisseur / client suit ce côté */
.page.open-fo .acc.open-a .dg > .cell.fo > *,
.page.open-cl .acc.open-v .dg > .cell.cl > * { visibility: visible; }
.ah > .cell, .ah > .arrc { cursor: pointer; }

/* Colonne repliée : en-tête compact */
.page:not(.open-fo) .ch.fo,
.page:not(.open-cl) .ch.cl { font-size: 0.68rem; padding: 10px 10px; gap: 6px; }
.page:not(.open-fo) .ch.fo > i:first-child,
.page:not(.open-cl) .ch.cl > i:last-child { display: none; }

/* Colonne repliée : ligne d'en-tête = icône + nom du document */
.page:not(.open-fo) .ah .cell.fo,
.page:not(.open-cl) .ah .cell.cl { padding: 10px 8px; align-items: center; }
.page:not(.open-fo) .ah .cell.fo .doc,
.page:not(.open-cl) .ah .cell.cl .doc { flex-direction: column; text-align: center; gap: 6px; }
.page:not(.open-fo) .ah .cell.fo .dn,
.page:not(.open-cl) .ah .cell.cl .dn { font-size: 0.72rem; }
.page:not(.open-fo) .ah .cell.fo .ds,
.page:not(.open-cl) .ah .cell.cl .ds,
.page:not(.open-fo) .ah .cell.fo .tags,
.page:not(.open-cl) .ah .cell.cl .tags { display: none; }

/* Colonne repliée : détail masqué */
.page:not(.open-fo) .dg .cell.fo > *,
.page:not(.open-cl) .dg .cell.cl > * { display: none; }
.page:not(.open-fo) .dg .cell.fo,
.page:not(.open-cl) .dg .cell.cl { background: var(--surface); }

/* ══════════════════════════════
   INFO-BULLES DES FLÈCHES
   ══════════════════════════════ */
.ar { cursor: help; border-radius: 6px; padding: 2px 0; transition: background .15s; }
.ar:hover { background: rgba(255,255,255,.75); }
.flux-tip {
  position: fixed; z-index: 2000; left: 0; top: 0;
  width: 270px; padding: 11px 14px; border-radius: 10px;
  background: #1B2D3E; color: #DDE8F4;
  font-size: 0.8rem; line-height: 1.45;
  box-shadow: 0 8px 24px rgba(0,0,0,.28);
  pointer-events: none; opacity: 0; visibility: hidden;
  transition: opacity .12s;
}
.flux-tip.on { opacity: 1; visibility: visible; }
.ft-titre { font-weight: 900; text-transform: uppercase; letter-spacing: .05em; font-size: 0.72rem; color: #fff; margin-bottom: 6px; }
.ft-sens {
  display: flex; align-items: center; gap: 6px; flex-wrap: wrap;
  font-weight: 800; color: #fff; margin-bottom: 7px;
}
.ft-sens span { background: rgba(255,255,255,.12); border-radius: 5px; padding: 1px 7px; }
.ft-sens .ft-fl { font-size: 1.05rem; line-height: 1; }
.ft-nat { display: block; border-radius: 6px; padding: 5px 9px; margin-bottom: 6px; font-size: 0.76rem; }
.ft-nat b { display: flex; align-items: center; gap: 6px; font-size: 0.8rem; }
.ft-nat span { display: block; opacity: .9; }
.ft-nat i { font-size: 15px; }
.ft-info { background: #3A2A66; color: #E4D8FF; }
.ft-phys { background: #5A3A10; color: #FFE7C2; }
.ft-fin  { background: #144A2C; color: #C9F2D6; }
.ft-txt { color: #C8D8E8; }

/* ══════════════════════════════
   FOOTER + BOUTON IMPRIMER
   ══════════════════════════════ */
footer {
  text-align: center; font-size: 0.74rem; color: var(--subtle);
  padding: 24px 24px 20px; background: transparent;
}
.btn-print {
  position: fixed; bottom: 24px; right: 24px; z-index: 1000;
  display: inline-flex; align-items: center; gap: 8px;
  padding: 11px 22px;
  background: var(--en); color: #fff;
  font-family: 'Nunito', 'Segoe UI', system-ui, sans-serif;
  font-size: 0.85rem; font-weight: 800; letter-spacing: .04em;
  border: none; border-radius: 40px; cursor: pointer;
  box-shadow: 0 4px 18px rgba(0,0,0,.22);
  transition: background .15s, transform .12s;
}
.btn-print:hover { background: var(--en-d); transform: translateY(-2px); }
.btn-print i { font-size: 18px; }

/* ══════════════════════════════
   IMPRESSION — 1 PAGE A4 PAYSAGE
   ══════════════════════════════ */
@media print {
  @page { size: A4 landscape; margin: 8mm; }
  * { -webkit-print-color-adjust: exact !important; print-color-adjust: exact !important; }

  .btn-print, footer, .chev, .ec-tip-box, .home-btn, .flux-tip,
  .ch-tog .ico-open, .ch-tog .ico-close { display: none !important; }

  html, body { background: #fff !important; padding: 0 !important; margin: 0 !important; }
  .page { max-width: 100% !important; width: 100% !important; zoom: var(--print-zoom, 0.6); }
  .scroll { overflow: visible !important; }

  .ab  { display: grid !important; grid-template-rows: 1fr !important; }
  .abi { overflow: visible !important; }

  .pg-hd { padding: 10px 16px !important; margin-bottom: 8px !important; border-radius: 8px !important; }
  .flow-banner, .legend { padding: 6px 12px !important; margin-bottom: 8px !important; }
  .phase { margin: 8px 0 3px !important; }
  .acc, .acc:hover { box-shadow: none !important; transform: none !important; margin-bottom: 3px !important; border-radius: 6px !important; }
  .cell { padding: 6px 10px !important; }
  .dg .cell { padding: 6px 10px 8px !important; }
  .items li { padding: 1px 4px !important; }
  .arr line, .arr polyline { animation: none !important; stroke-dashoffset: 0 !important; }
  .items li:hover { background: transparent !important; }
  .acc, .phase, .cg, .legend, .flow-banner, .pg-hd { break-inside: avoid; }
}
