/* Portefeuille BRVM — feuille de style.
   Identité : encre indigo (teinture d'indigo d'Afrique de l'Ouest), papier froid, un safran pour signaler.
   Barlow (texte) et Barlow Semi Condensed (titres, chiffres, codes de titres), servies localement (licence OFL).
   Hiérarchie : le bordereau d'ordres est la seule pièce appuyée ; tout le reste reste calme. */

@font-face { font-family: "Barlow"; font-weight: 400; font-style: normal; font-display: swap; src: url("polices/barlow-400.woff2") format("woff2"); }
@font-face { font-family: "Barlow"; font-weight: 500; font-style: normal; font-display: swap; src: url("polices/barlow-500.woff2") format("woff2"); }
@font-face { font-family: "Barlow"; font-weight: 600; font-style: normal; font-display: swap; src: url("polices/barlow-600.woff2") format("woff2"); }
@font-face { font-family: "Barlow Semi Condensed"; font-weight: 500; font-style: normal; font-display: swap; src: url("polices/barlow-semi-condensed-500.woff2") format("woff2"); }
@font-face { font-family: "Barlow Semi Condensed"; font-weight: 600; font-style: normal; font-display: swap; src: url("polices/barlow-semi-condensed-600.woff2") format("woff2"); }

:root {
  --fond: #F2F4F8; --surface: #FFFFFF; --surface-2: #F7F8FB;
  --encre: #17213D; --texte: #283454; --texte-2: #55617D; --discret: #737D95;
  --trait: #DDE2EB; --trait-fort: #17213D;
  --indigo: #2F4A8A; --indigo-pale: #E8EDF7;
  --achat: #18734F; --achat-pale: #E4F1EA;
  --vente: #A8322D; --vente-pale: #F7E6E4;
  --safran: #9A6608; --safran-vif: #D9A23A; --safran-pale: #F8EFD9;
  --bande: #17213D; --bande-texte: #EEF1F7;
  /* séries des graphiques : ordre fixe, vérifié (bande de clarté, chroma, daltonismes, contraste) */
  --c1: #3B5CB4; --c2: #0E9479; --c3: #9061BE; --c4: #C46E1F; --c1-clair: #9AACDD; --gris-donnee: #C5CBD8;
  --f-texte: "Barlow", "Segoe UI", system-ui, sans-serif;
  --f-titre: "Barlow Semi Condensed", "Barlow", "Segoe UI", system-ui, sans-serif;
  color-scheme: light;
}
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) {
  --fond: #0E1426; --surface: #151D33; --surface-2: #121A2E;
  --encre: #E8ECF5; --texte: #D3DAE8; --texte-2: #A3AECA; --discret: #8590AB;
  --trait: #26304A; --trait-fort: #C9D2E6;
  --indigo: #9DB3EA; --indigo-pale: #1C2848;
  --achat: #5CC79A; --achat-pale: #12301F;
  --vente: #F0918A; --vente-pale: #3A1D1F;
  --safran: #E8B65A; --safran-vif: #E8B65A; --safran-pale: #33280F;
  --bande: #1B2747; --bande-texte: #E8ECF5;
  --c1: #6585DA; --c2: #1A9F84; --c3: #A274D0; --c4: #CC7A33; --c1-clair: #3E5596; --gris-donnee: #3A4560;
  color-scheme: dark;
} }
:root[data-theme="dark"] {
  --fond: #0E1426; --surface: #151D33; --surface-2: #121A2E;
  --encre: #E8ECF5; --texte: #D3DAE8; --texte-2: #A3AECA; --discret: #8590AB;
  --trait: #26304A; --trait-fort: #C9D2E6;
  --indigo: #9DB3EA; --indigo-pale: #1C2848;
  --achat: #5CC79A; --achat-pale: #12301F;
  --vente: #F0918A; --vente-pale: #3A1D1F;
  --safran: #E8B65A; --safran-vif: #E8B65A; --safran-pale: #33280F;
  --bande: #1B2747; --bande-texte: #E8ECF5;
  --c1: #6585DA; --c2: #1A9F84; --c3: #A274D0; --c4: #CC7A33; --c1-clair: #3E5596; --gris-donnee: #3A4560;
  color-scheme: dark;
}

/* ---------------------------------------------------------------- base */
*, *::before, *::after { box-sizing: border-box; }
[hidden] { display: none !important; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; background: var(--fond); color: var(--texte); font: 400 16px/1.55 var(--f-texte); font-variant-numeric: tabular-nums; }
h1, h2, h3 { margin: 0; color: var(--encre); font-family: var(--f-titre); font-weight: 600; line-height: 1.15; text-wrap: balance; }
h2 { font-size: 1.5rem; letter-spacing: -0.005em; }
h3 { font: 600 1.05rem/1.3 var(--f-texte); }
p { margin: 0; }
a { color: var(--indigo); text-underline-offset: 2px; text-decoration-thickness: 1px; }
a:hover { text-decoration-thickness: 2px; }
code { font: 500 0.92em/1 var(--f-titre); background: var(--indigo-pale); color: var(--encre); padding: 2px 6px; border-radius: 3px; }
:focus-visible { outline: 2px solid var(--indigo); outline-offset: 2px; }
.page { max-width: 1200px; margin: 0 auto; padding: 0 24px 64px; display: grid; gap: 56px; }
.lecture { max-width: 68ch; }
.discret { color: var(--discret); }
.petit { font-size: 0.875rem; }
.bloc { display: grid; gap: 16px; align-content: start; }
.deux { display: grid; grid-template-columns: repeat(auto-fit, minmax(320px, 1fr)); gap: 32px; align-items: start; }
.deux > * { min-width: 0; }
.tete-section { display: grid; gap: 6px; }
.tete-section p { color: var(--texte-2); }

/* ---------------------------------------------------------------- en-tête */
.entete { max-width: 1200px; margin: 0 auto; padding: 22px 24px 18px; display: flex; align-items: center; justify-content: space-between; gap: 16px; flex-wrap: wrap; }
.marque { display: flex; align-items: center; gap: 12px; text-decoration: none; color: var(--encre); }
.marque img { width: 34px; height: 34px; display: block; }
.marque h1 { font-size: 1.6rem; letter-spacing: 0.005em; }
.marque h1 span { font-weight: 500; }
.auteur { text-align: right; font-size: 0.875rem; color: var(--texte-2); line-height: 1.35; }
.auteur strong { display: block; color: var(--encre); font: 600 0.95rem/1.3 var(--f-titre); }

/* ---------------------------------------------------------------- bande défilante des règles */
.bande { position: relative; background: var(--bande); color: var(--bande-texte); display: flex; align-items: stretch; overflow: hidden; }
.bande-titre { flex: none; display: flex; align-items: center; padding: 0 16px 0 max(24px, calc((100% - 1200px) / 2 + 24px)); font: 600 0.95rem/1 var(--f-titre); color: var(--safran-vif); background: var(--bande); position: relative; z-index: 1; box-shadow: 12px 0 12px -4px var(--bande); }
.bande-fenetre { flex: 1; overflow: hidden; min-width: 0; }
.bande-piste { display: flex; width: max-content; animation: defiler 90s linear infinite; }
.bande:hover .bande-piste, .bande:focus-within .bande-piste, .bande.arretee .bande-piste { animation-play-state: paused; }
.bande-liste { display: flex; margin: 0; padding: 0; list-style: none; }
.bande-liste li { display: block; white-space: nowrap; padding: 11px 0; font: 500 1rem/1.3 var(--f-titre); }
.bande-liste li::before { content: ""; display: inline-block; vertical-align: 0.2em; width: 6px; height: 6px; background: var(--safran-vif); margin: 0 22px; transform: rotate(45deg); }
.bande-liste li strong { font-weight: 600; }
.bande-pause { flex: none; align-self: center; margin: 0 16px; padding: 5px 10px; font: 500 0.85rem/1 var(--f-texte); color: var(--bande-texte); background: transparent; border: 1px solid rgba(238, 241, 247, 0.35); border-radius: 3px; cursor: pointer; }
.bande-pause:hover { border-color: var(--bande-texte); }
@keyframes defiler { from { transform: translateX(0); } to { transform: translateX(-50%); } }
@media (prefers-reduced-motion: reduce) {
  .bande { display: block; padding: 12px max(24px, calc((100% - 1200px) / 2 + 24px)) 14px; }
  .bande-titre { padding: 0 0 6px; box-shadow: none; }
  .bande-piste { animation: none; width: auto; }
  .bande-liste { flex-direction: column; row-gap: 3px; }
  .bande-liste[aria-hidden="true"], .bande-pause { display: none; }
  .bande-liste li { white-space: normal; padding: 2px 0; }
  .bande-liste li::before { margin: 0 12px 0 2px; }
}

/* ---------------------------------------------------------------- tableau d'affichage */
.affichage { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); border-bottom: 1px solid var(--trait); margin: 28px 0 -12px; }
.affichage div { padding: 0 20px 18px 0; display: grid; gap: 2px; align-content: start; }
.affichage dt { font-size: 0.85rem; color: var(--texte-2); }
.affichage dd { margin: 0; font: 600 1.15rem/1.25 var(--f-titre); color: var(--encre); }
.affichage dd.signal { color: var(--safran); }
.affichage dd.alerte { color: var(--vente); }
.affichage dd.ok { color: var(--achat); }
.affichage dd small { display: block; font: 400 0.8rem/1.35 var(--f-texte); margin-top: 2px; }

/* ---------------------------------------------------------------- panneaux */
.travail { display: grid; grid-template-columns: minmax(0, 5fr) minmax(0, 7fr); gap: 28px; align-items: start; }
@media (max-width: 920px) { .travail { grid-template-columns: minmax(0, 1fr); } }
.panneau { background: var(--surface); border: 1px solid var(--trait); border-radius: 6px; padding: 22px; display: grid; gap: 18px; min-width: 0; }
.panneau-tete { display: flex; justify-content: space-between; align-items: baseline; gap: 12px; flex-wrap: wrap; }
.etat-sauvegarde { font-size: 0.85rem; color: var(--discret); }
.etat-sauvegarde.erreur { color: var(--vente); }

/* champs */
label { display: grid; gap: 6px; font-size: 0.875rem; color: var(--texte-2); }
input, select { font: 400 1rem/1.3 var(--f-texte); color: var(--encre); background: var(--surface-2); border: 1px solid var(--trait); border-radius: 4px; padding: 9px 10px; width: 100%; min-width: 0; }
input:hover { border-color: var(--texte-2); }
input.nombre { text-align: right; font-variant-numeric: tabular-nums; }
.lignes { display: grid; gap: 10px; }
.ligne, .lignes-tete { display: grid; grid-template-columns: minmax(0, 1.25fr) minmax(0, 0.9fr) minmax(0, 1fr) 36px; gap: 8px; align-items: end; }
.lignes-tete { font-size: 0.8rem; color: var(--discret); }
.ligne input:first-child { font: 600 1rem/1.3 var(--f-titre); letter-spacing: 0.02em; text-transform: uppercase; }
.ligne .infos { grid-column: 1 / -1; display: flex; flex-wrap: wrap; gap: 4px 14px; font-size: 0.85rem; color: var(--texte-2); margin-top: -4px; }
.ligne .infos label { display: flex; align-items: center; gap: 8px; }
.ligne .infos input { width: 120px; padding: 4px 8px; }
.vide { color: var(--texte-2); font-size: 0.925rem; }
.reglages { border-top: 1px solid var(--trait); padding-top: 14px; }
.reglages summary { cursor: pointer; font-weight: 500; color: var(--encre); }
.reglages[open] summary { margin-bottom: 14px; }
.choix { display: grid; gap: 10px; }
.choix label { display: grid; grid-template-columns: auto 1fr; gap: 10px; align-items: start; font-size: 0.925rem; color: var(--texte); }
.choix input { width: auto; margin-top: 4px; accent-color: var(--indigo); }
.choix b { color: var(--encre); font-weight: 600; }
.champs { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 12px; }

/* boutons */
button { font: 500 0.95rem/1 var(--f-texte); border-radius: 4px; padding: 11px 16px; cursor: pointer; border: 1px solid var(--trait); background: var(--surface); color: var(--encre); }
button:hover { border-color: var(--texte-2); }
button:disabled { opacity: 0.45; cursor: default; }
button.principal { background: var(--encre); border-color: var(--encre); color: var(--surface); }
button.principal:hover { background: var(--indigo); border-color: var(--indigo); }
button.lien { border: 0; background: none; padding: 4px 0; color: var(--indigo); text-decoration: underline; text-underline-offset: 2px; }
button.lien:disabled { text-decoration: none; color: var(--texte-2); opacity: 1; }
button.icone { padding: 0; width: 36px; height: 39px; display: grid; place-items: center; color: var(--discret); font-size: 1.1rem; }
.actions { display: flex; gap: 10px; flex-wrap: wrap; align-items: center; }
.retour { font-size: 0.9rem; color: var(--achat); }
.bascule { display: inline-flex; border: 1px solid var(--trait); border-radius: 4px; padding: 3px; background: var(--surface-2); }
.bascule button { border: 0; border-radius: 3px; padding: 8px 12px; background: transparent; color: var(--texte-2); }
.bascule button[aria-pressed="true"] { background: var(--surface); color: var(--encre); box-shadow: 0 0 0 1px var(--trait); font-weight: 600; }

/* ---------------------------------------------------------------- bordereau d'ordres (pièce maîtresse) */
.bordereau { border-top: 4px solid var(--encre); border-radius: 0 0 6px 6px; }
.bordereau-sous-titre { color: var(--texte-2); font-size: 0.925rem; margin-top: 4px; }
.notes { display: grid; gap: 8px; }
.note { font-size: 0.9rem; border-radius: 4px; padding: 10px 12px; border-left: 3px solid; }
.note.alerte { background: var(--vente-pale); border-color: var(--vente); color: var(--texte); }
.note.prudence { background: var(--safran-pale); border-color: var(--safran-vif); color: var(--texte); }
.note button.lien { padding: 0; margin-left: 6px; }
.ordres { display: grid; }
.ordre, .ordres-tete { display: grid; grid-template-columns: 74px minmax(0, 1fr) 76px 96px 128px; gap: 4px 14px; align-items: baseline; }
.ordres-tete { font-size: 0.8rem; color: var(--discret); padding: 0 0 8px; border-bottom: 1.5px solid var(--trait-fort); }
.ordres-tete span:nth-child(n+3) { text-align: right; }
.ordre { padding: 12px 0; border-bottom: 1px solid var(--trait); }
.sens { font: 600 0.85rem/1 var(--f-titre); padding: 5px 0; border-radius: 3px; text-align: center; letter-spacing: 0.02em; }
.ordre.achat .sens { background: var(--achat-pale); color: var(--achat); }
.ordre.vente .sens { background: var(--vente-pale); color: var(--vente); }
.ordre .titre { min-width: 0; }
.ordre .titre b { font: 600 1.1rem/1.2 var(--f-titre); color: var(--encre); letter-spacing: 0.02em; margin-right: 6px; }
.ordre .titre span { color: var(--texte-2); }
.ordre .qte, .ordre .lim, .ordre .mnt { text-align: right; font-variant-numeric: tabular-nums; }
.ordre .mnt { font-weight: 600; color: var(--encre); }
.ordre .motif { grid-column: 2 / -1; font-size: 0.85rem; color: var(--texte-2); display: flex; flex-wrap: wrap; gap: 2px 16px; }
.ordre .etiquette-mobile { display: none; }
.rien { padding: 18px 0; color: var(--texte-2); border-bottom: 1px solid var(--trait); }
.totaux { display: grid; grid-template-columns: repeat(auto-fit, minmax(130px, 1fr)); gap: 12px; }
.totaux div { display: grid; gap: 2px; }
.totaux dt { font-size: 0.8rem; color: var(--discret); }
.totaux dd { margin: 0; font: 600 1.05rem/1.2 var(--f-titre); color: var(--encre); }
.mention { font-size: 0.85rem; color: var(--discret); }
.copie-secours { width: 100%; font: 400 0.9rem/1.4 var(--f-texte); padding: 10px; border: 1px solid var(--trait); border-radius: 4px; background: var(--surface-2); color: var(--encre); }
@media (max-width: 600px) {
  .ordres-tete { display: none; }
  .ordre { grid-template-columns: 64px minmax(0, 1fr) auto; }
  .ordre .qte, .ordre .lim { grid-column: 2; text-align: left; font-size: 0.9rem; color: var(--texte-2); }
  .ordre .mnt { grid-column: 3; grid-row: 1; }
  .ordre .etiquette-mobile { display: inline; }
}

/* ---------------------------------------------------------------- relevé */
.releve { display: grid; grid-template-columns: minmax(220px, auto) 1fr; gap: 28px; align-items: end; background: var(--surface); border: 1px solid var(--trait); border-radius: 6px; padding: 22px; }
@media (max-width: 700px) { .releve { grid-template-columns: 1fr; } }
.releve-total dt { font-size: 0.9rem; color: var(--texte-2); }
.releve-total dd { margin: 4px 0 0; font: 600 2.4rem/1 var(--f-titre); color: var(--encre); letter-spacing: -0.01em; }
.releve-total .note-date { margin-top: 6px; font-size: 0.85rem; color: var(--discret); }
.releve-detail { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 14px 20px; margin: 0; }
.releve-detail div { display: grid; gap: 2px; border-left: 1px solid var(--trait); padding-left: 14px; }
.releve-detail dt { font-size: 0.85rem; color: var(--texte-2); }
.releve-detail dd { margin: 0; font: 600 1.15rem/1.25 var(--f-titre); color: var(--encre); }
.releve-detail dd small { display: block; font: 400 0.8rem/1.3 var(--f-texte); color: var(--discret); }
.pos { color: var(--achat) !important; } .neg { color: var(--vente) !important; }

/* ---------------------------------------------------------------- tableaux */
.tableau { overflow-x: auto; background: var(--surface); border: 1px solid var(--trait); border-radius: 6px; }
table { border-collapse: collapse; width: 100%; font-size: 0.925rem; font-variant-numeric: tabular-nums; }
th, td { padding: 10px 14px; text-align: right; white-space: nowrap; border-bottom: 1px solid var(--trait); vertical-align: baseline; }
th:first-child, td:first-child, th.g, td.g { text-align: left; }
thead th { font: 500 0.82rem/1.25 var(--f-texte); color: var(--texte-2); border-bottom: 1.5px solid var(--trait-fort); vertical-align: bottom; background: var(--surface); position: sticky; top: 0; }
tbody tr:last-child td { border-bottom: 0; }
tbody tr:hover td { background: var(--surface-2); }
tr.cible td { background: var(--indigo-pale); }
tr.cible:hover td { background: var(--indigo-pale); }
td .code { font: 600 1rem/1.2 var(--f-titre); color: var(--encre); letter-spacing: 0.02em; margin-right: 6px; }
td.nom { color: var(--texte-2); }
td.texte { white-space: normal; min-width: 210px; text-align: left; }
.etat { display: inline-block; font-size: 0.85rem; line-height: 1.3; color: var(--discret); }
.etat.cible, .etat.garder, .etat.vendre, .etat.alerte, .etat.prudence, .etat.annonce { padding: 3px 8px; border-radius: 3px; }
.etat.cible { background: var(--encre); color: var(--surface); }
.etat.garder { background: var(--achat-pale); color: var(--achat); }
.etat.vendre, .etat.alerte { background: var(--vente-pale); color: var(--vente); }
.etat.prudence { background: var(--safran-pale); color: var(--safran); }
.etat.annonce { background: var(--achat-pale); color: var(--achat); margin-top: 4px; }
.legende-tableau { font-size: 0.85rem; color: var(--discret); max-width: 90ch; }

/* ---------------------------------------------------------------- publications */
.pubs { display: grid; border-top: 1.5px solid var(--trait-fort); }
.pub { display: grid; grid-template-columns: 92px minmax(0, 1fr) auto; gap: 4px 16px; padding: 12px 0; border-bottom: 1px solid var(--trait); align-items: baseline; }
.pub .date { color: var(--discret); font-size: 0.875rem; }
.pub .doc a { font-weight: 500; }
.pub .meta { grid-column: 2 / -1; font-size: 0.85rem; color: var(--texte-2); display: flex; gap: 4px 14px; flex-wrap: wrap; align-items: center; }
.pub .meta b { font: 600 0.95rem/1 var(--f-titre); color: var(--encre); }
.pub.sous-alerte { background: var(--vente-pale); box-shadow: inset 3px 0 0 var(--vente); padding-left: 12px; padding-right: 10px; }
.invitation { padding: 18px; border: 1px dashed var(--trait); border-radius: 6px; color: var(--texte-2); }
@media (max-width: 560px) { .pub { grid-template-columns: minmax(0, 1fr) auto; } .pub .date { grid-column: 1 / -1; } }

/* ---------------------------------------------------------------- contexte BCEAO */
.chiffres { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 0; border-top: 1.5px solid var(--trait-fort); border-bottom: 1px solid var(--trait); }
.chiffres div { padding: 14px 14px 14px 0; display: grid; gap: 2px; }
.chiffres div + div { padding-left: 14px; border-left: 1px solid var(--trait); }
.chiffres dt { font-size: 0.85rem; color: var(--texte-2); }
.chiffres dd { margin: 0; font: 600 1.9rem/1.05 var(--f-titre); color: var(--encre); }
.chiffres dd small { display: block; font: 400 0.8rem/1.3 var(--f-texte); color: var(--discret); margin-top: 4px; }
.source { font-size: 0.85rem; color: var(--discret); }
@media (max-width: 420px) { .chiffres { grid-template-columns: 1fr; } .chiffres div + div { padding-left: 0; border-left: 0; border-top: 1px solid var(--trait); } }

/* ---------------------------------------------------------------- graphique */
.figure { margin: 0; background: var(--surface); border: 1px solid var(--trait); border-radius: 6px; padding: 18px 16px 10px; position: relative; min-width: 0; }
.legende { display: flex; flex-wrap: wrap; gap: 6px 20px; font-size: 0.875rem; color: var(--texte-2); margin-bottom: 8px; }
.legende span { display: inline-flex; align-items: center; gap: 8px; }
.cle { width: 18px; height: 2px; border-radius: 2px; display: inline-block; flex: none; }
.cle.fine { height: 1px; }
.cle.tirets { background: transparent !important; border-top: 2px dashed var(--discret); height: 0; }
.cle.bloc { width: 10px; height: 10px; border-radius: 2px; }
.graphique { width: 100%; display: block; }
.graphique text { fill: var(--discret); font: 500 12px var(--f-titre); }
.graphique text.fin { font: 500 12.5px var(--f-titre); fill: var(--texte-2); }
.graphique text.fin-valeur { font: 600 12.5px var(--f-titre); fill: var(--encre); }
.graphique .colonne:focus { outline: none; }
.graphique .colonne:focus path, .graphique .colonne:hover path { filter: brightness(1.08); }
.bulle { position: absolute; pointer-events: none; background: var(--surface); border: 1px solid var(--trait); border-radius: 4px; padding: 8px 10px; font-size: 0.85rem; box-shadow: 0 6px 18px rgba(15, 22, 40, 0.14); min-width: 220px; display: grid; gap: 3px; z-index: 3; }
.bulle .ligne-bulle { display: flex; align-items: center; gap: 10px; flex-direction: row-reverse; justify-content: space-between; }
.bulle .ligne-bulle span { display: inline-flex; align-items: center; gap: 6px; color: var(--texte-2); }
.bulle .ligne-bulle b { font-variant-numeric: tabular-nums; color: var(--encre); white-space: nowrap; }
.bulle .entete-bulle { font: 600 0.85rem/1.2 var(--f-titre); color: var(--discret); }
.conclusions { display: grid; gap: 12px; }
.conclusions p b { color: var(--encre); }

/* ---------------------------------------------------------------- mise à jour, journal */
.journal { display: grid; border-top: 1.5px solid var(--trait-fort); }
.operation { display: grid; grid-template-columns: 96px 82px minmax(0, 1fr) auto; gap: 12px; padding: 11px 0; border-bottom: 1px solid var(--trait); font-size: 0.925rem; align-items: baseline; }
.operation .type { font: 600 0.8rem/1 var(--f-titre); color: var(--texte-2); text-transform: uppercase; letter-spacing: 0.04em; }
.operation.versement .type, .operation.dividende .type { color: var(--achat); }
.operation.retrait .type { color: var(--vente); }
@media (max-width: 560px) { .operation { grid-template-columns: 80px minmax(0, 1fr) auto; } .operation .type { display: none; } }
.operation .date { color: var(--discret); font-size: 0.875rem; }
.suivi { font: 400 0.85rem/1.5 var(--f-texte); background: var(--surface-2); border: 1px solid var(--trait); border-radius: 4px; padding: 10px 12px; white-space: pre-wrap; max-height: 260px; overflow: auto; margin: 0; color: var(--texte); }
input[type="file"] { padding: 8px; }

/* ---------------------------------------------------------------- méthode, pied de page */
.methode { border-top: 1px solid var(--trait); padding-top: 18px; }
.methode summary { cursor: pointer; font: 600 1.15rem/1.3 var(--f-titre); color: var(--encre); }
.methode[open] summary { margin-bottom: 14px; }
.methode ol { margin: 0; padding-left: 1.2em; display: grid; gap: 10px; max-width: 75ch; }
.pied { border-top: 1.5px solid var(--trait-fort); padding: 20px 0 40px; max-width: 1152px; width: calc(100% - 48px); margin: 0 auto; display: flex; justify-content: space-between; gap: 18px; flex-wrap: wrap; font-size: 0.875rem; color: var(--texte-2); }
.pied .signature { display: flex; gap: 12px; align-items: center; }
.pied .signature img { width: 26px; height: 26px; }
.pied .signature strong { color: var(--encre); font: 600 0.95rem/1.2 var(--f-titre); display: block; }
.pied .verification { text-align: right; }
.pied .verification .ok { color: var(--achat); }
.pied .verification .modifie { color: var(--safran); }
.pied .avertissement { flex-basis: 100%; color: var(--discret); }

/* ---------------------------------------------------------------- version 2 : navigation, tuiles, graphiques, dialogues */
.evitement { position: absolute; left: 12px; top: -60px; background: var(--encre); color: var(--surface); padding: 10px 14px; border-radius: 4px; z-index: 10; }
.evitement:focus { top: 12px; }
.entete-droite { display: flex; align-items: center; gap: 18px; flex-wrap: wrap; }
.outils { display: flex; gap: 8px; }
button.outil { padding: 7px 11px; font-size: 0.85rem; color: var(--texte-2); background: transparent; }
.sommaire { position: sticky; top: 0; z-index: 4; background: var(--fond); border-bottom: 1px solid var(--trait); display: flex; gap: 2px; overflow-x: auto; scrollbar-width: none;
  padding: 0 max(16px, calc((100% - 1200px) / 2 + 16px)); }
.sommaire::-webkit-scrollbar { display: none; }
.sommaire a { flex: none; padding: 10px 10px; font: 500 0.92rem/1 var(--f-titre); color: var(--texte-2); text-decoration: none; border-bottom: 2px solid transparent; }
.sommaire a:hover, .sommaire a:focus-visible { color: var(--encre); border-bottom-color: var(--indigo); }
html { scroll-padding-top: 52px; }
.incidents { display: grid; gap: 8px; }
.incidents:empty { display: none; }
.premiers-pas ol { margin: 6px 0 0; padding-left: 1.3em; }
.figure figcaption { display: flex; justify-content: space-between; gap: 6px 14px; flex-wrap: wrap; margin-bottom: 12px; font-size: 0.875rem; color: var(--texte-2); }
.figure figcaption b { color: var(--encre); font: 600 1rem/1.3 var(--f-titre); }
.figure.compacte { padding: 12px 10px 4px; }
.trois { display: grid; grid-template-columns: minmax(0, 1.4fr) minmax(0, 1fr) minmax(0, 1fr); gap: 16px; align-items: start; }
@media (max-width: 980px) { .trois { grid-template-columns: minmax(0, 1fr); } }
.tuiles { display: grid; grid-template-columns: repeat(auto-fit, minmax(170px, 1fr)); gap: 0; margin: 0; background: var(--surface); border: 1px solid var(--trait); border-radius: 6px; }
.tuiles div { padding: 14px 16px; display: grid; gap: 3px; border-right: 1px solid var(--trait); border-bottom: 1px solid var(--trait); align-content: start; }
.tuiles dt { font-size: 0.85rem; color: var(--texte-2); }
.tuiles dd { margin: 0; font: 600 1.45rem/1.15 var(--f-titre); color: var(--encre); font-variant-numeric: normal; }
.tuiles dd small { display: block; font: 400 0.8rem/1.35 var(--f-texte); color: var(--discret); margin-top: 3px; }
.tuiles dd.discret { color: var(--texte-2); }
.tuiles.compactes dd { font-size: 1.15rem; }
.vide-graphique { color: var(--texte-2); padding: 26px 8px; text-align: center; }
.donnees-graphique summary { cursor: pointer; font-size: 0.9rem; color: var(--indigo); }
.donnees-graphique[open] summary { margin-bottom: 10px; }
.donnees-graphique .tableau { max-height: 360px; overflow: auto; }

/* barres horizontales */
.barres { --col-libelle: 132px; --col-valeur: 64px; display: grid; gap: 2px; position: relative; }
.barre { display: grid; grid-template-columns: var(--col-libelle) minmax(0, 1fr) var(--col-valeur); align-items: center; gap: 10px; padding: 5px 4px; border-radius: 4px; }
.barre:hover, .barre:focus-visible { background: var(--surface-2); }
.barre.cliquable { cursor: pointer; }
.barre .libelle { display: grid; min-width: 0; line-height: 1.2; }
.barre .libelle b { font: 600 0.95rem/1.2 var(--f-titre); color: var(--encre); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.barre .libelle small { font-size: 0.78rem; color: var(--discret); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.barre .piste { position: relative; height: 14px; }
.barre .plein { position: absolute; left: 0; top: 0; bottom: 0; background: var(--c1); border-radius: 0 4px 4px 0; min-width: 2px; }
.barre.attenue .plein { background: var(--gris-donnee); }
.barre .repere { position: absolute; top: -6px; bottom: -6px; width: 0; border-left: 1px solid var(--texte-2); }
.barre .valeur { font: 600 0.9rem/1 var(--f-titre); color: var(--encre); text-align: right; font-variant-numeric: tabular-nums; }
.barre.attenue .valeur { color: var(--texte-2); }
.repere-tete { position: relative; height: 18px; }
.repere-tete span { position: absolute; transform: translateX(-50%); font-size: 0.75rem; color: var(--texte-2); white-space: nowrap; }
@media (max-width: 560px) { .barres { --col-libelle: 96px; --col-valeur: 54px; } }

/* performance, opérations */
.operation-form fieldset { border: 1px solid var(--trait); border-radius: 6px; padding: 14px 16px 16px; margin: 0; display: grid; grid-template-columns: repeat(auto-fit, minmax(160px, 1fr)); gap: 12px; align-items: end; background: var(--surface); }
.operation-form legend { font: 600 1rem/1 var(--f-titre); color: var(--encre); padding: 0 6px; }
.operation-form .large { grid-column: span 2; }
@media (max-width: 560px) { .operation-form .large { grid-column: auto; } }
label.case { display: flex; align-items: center; gap: 8px; color: var(--texte); }
label.case input { width: auto; accent-color: var(--indigo); }
select { appearance: auto; }

/* simulateur */
.simu-controles { display: flex; flex-wrap: wrap; gap: 12px 16px; align-items: end; }
.simu-controles label { min-width: 170px; flex: 1 1 170px; max-width: 240px; }
.simu-controles .bascule { align-self: end; margin-bottom: 1px; }
.etude-tete { margin-top: 18px; }
.etude-tete h3 { font: 600 1.2rem/1.3 var(--f-titre); }

/* données, sauvegarde */
.sante { display: grid; grid-template-columns: repeat(auto-fit, minmax(140px, 1fr)); gap: 0; margin: 0; border-top: 1.5px solid var(--trait-fort); border-bottom: 1px solid var(--trait); }
.sante div { padding: 10px 12px 10px 0; display: grid; gap: 2px; }
.sante dt { font-size: 0.8rem; color: var(--texte-2); }
.sante dd { margin: 0; font: 600 1.05rem/1.25 var(--f-titre); color: var(--encre); }
.sante dd.signal { color: var(--safran); } .sante dd.ok { color: var(--achat); }
.sante dd small { display: block; font: 400 0.78rem/1.3 var(--f-texte); color: var(--discret); }
.bouton-fichier { display: inline-flex; position: relative; align-items: center; font: 500 0.95rem/1 var(--f-texte); color: var(--encre); border: 1px solid var(--trait); border-radius: 4px; padding: 11px 16px; background: var(--surface); cursor: pointer; }
.bouton-fichier:hover { border-color: var(--texte-2); }
.bouton-fichier:focus-within { outline: 2px solid var(--indigo); outline-offset: 2px; }
.bouton-fichier input { position: absolute; inset: 0; opacity: 0; cursor: pointer; width: 100%; }
.auto { display: grid; gap: 6px; border-left: 3px solid var(--indigo); padding: 2px 0 2px 12px; }
.coffre-reglage { border-top: 1px solid var(--trait); padding-top: 14px; display: grid; gap: 10px; }
.coffre-reglage h3 { font: 600 1.05rem/1.3 var(--f-titre); }
.coffre-form { display: grid; gap: 10px; max-width: 420px; }
button.danger { color: var(--vente); border-color: var(--vente); }
.retour.erreur, .erreur { color: var(--vente); }
.lien-code { border: 0; background: none; padding: 0; cursor: pointer; text-decoration: underline; text-decoration-color: var(--trait); text-underline-offset: 3px; }
.lien-code:hover { text-decoration-color: currentColor; }
.lien-code:disabled { text-decoration: none; cursor: default; opacity: 1; }
.ordre .motif .cher { color: var(--safran); }
.liste-simple { margin: 6px 0 0; padding-left: 1.1em; display: grid; gap: 4px; font-size: 0.9rem; }
.liste-simple .annonce { color: var(--achat); font-weight: 500; }

/* dialogues */
dialog.fiche { width: min(860px, calc(100% - 24px)); max-height: calc(100% - 24px); border: 1px solid var(--trait); border-radius: 8px; padding: 22px; background: var(--fond); color: var(--texte); box-shadow: 0 18px 60px rgba(10, 16, 32, 0.35); }
dialog.fiche[open] { display: grid; gap: 16px; }
dialog.fiche.petite { width: min(480px, calc(100% - 24px)); }
dialog::backdrop { background: rgba(10, 16, 32, 0.55); }
.fiche-tete { display: flex; justify-content: space-between; gap: 12px; align-items: start; }
.fiche-tete p { color: var(--texte-2); margin-top: 4px; }
.deux.serre { gap: 20px; }
.execution-lignes { display: grid; gap: 8px; }
.execution-ligne { display: grid; grid-template-columns: minmax(0, 1.5fr) minmax(0, 1fr) minmax(0, 1fr); gap: 10px; align-items: center; }
.execution-ligne.tete { font-size: 0.8rem; color: var(--discret); }
.etroit { max-width: 280px; }

/* pied */
.liens-pied { flex-basis: 100%; display: flex; flex-wrap: wrap; gap: 6px 18px; }
.liens-pied a { color: var(--texte-2); }

/* ---------------------------------------------------------------- page d'aide et d'informations */
.info { max-width: 1200px; margin: 8px auto 0; padding: 0 24px 56px; display: grid; grid-template-columns: 230px minmax(0, 1fr); gap: 40px; align-items: start; }
.info-sommaire { position: sticky; top: 16px; display: grid; gap: 2px; border-left: 1.5px solid var(--trait); }
.info-sommaire a { padding: 6px 12px; color: var(--texte-2); text-decoration: none; font: 500 0.95rem/1.3 var(--f-titre); border-left: 2px solid transparent; margin-left: -1.5px; }
.info-sommaire a:hover, .info-sommaire a:focus-visible { color: var(--encre); border-left-color: var(--indigo); }
.info-texte { display: grid; gap: 52px; max-width: 76ch; }
.info-texte section { display: grid; gap: 12px; scroll-margin-top: 16px; }
.info-texte h2 { font-size: 1.7rem; }
.info-texte h3 { font: 600 1.1rem/1.3 var(--f-titre); color: var(--encre); margin-top: 10px; }
.info-texte ul, .info-texte ol { margin: 0; padding-left: 1.3em; display: grid; gap: 8px; }
.info-texte details { border-bottom: 1px solid var(--trait); padding: 10px 0; }
.info-texte details summary { cursor: pointer; font-weight: 500; color: var(--encre); }
.info-texte details[open] summary { margin-bottom: 8px; }
.info-texte details p { color: var(--texte); }
.encadre { border-left: 3px solid var(--safran-vif); background: var(--safran-pale); padding: 12px 14px; border-radius: 4px; color: var(--texte); }
.info-dl { margin: 0; display: grid; gap: 14px; }
.info-dl div { display: grid; grid-template-columns: 220px minmax(0, 1fr); gap: 16px; border-top: 1px solid var(--trait); padding-top: 12px; }
.info-dl dt { font-weight: 600; color: var(--encre); }
.info-dl dd { margin: 0; }
.articles { counter-reset: none; }
@media (max-width: 820px) { .info { grid-template-columns: minmax(0, 1fr); gap: 20px; } .info-sommaire { position: static; display: flex; flex-wrap: wrap; border-left: 0; gap: 4px 0; } .info-sommaire a { border-left: 0; margin: 0; padding: 4px 10px 4px 0; } .info-dl div { grid-template-columns: 1fr; gap: 4px; } }
.informations-autonome { border-top: 1.5px solid var(--trait-fort); padding-top: 24px; }
.informations-autonome .info { padding: 0; margin: 0; }

/* ---------------------------------------------------------------- écrans d'attente et de session */
.ecran { max-width: 560px; margin: 16vh auto; padding: 0 24px; display: grid; gap: 14px; }
.ecran img { width: 40px; height: 40px; }
.ecran h1 { font-size: 2rem; }
.ecran p { color: var(--texte-2); }

@media (max-width: 560px) {
  .page { padding: 0 16px 48px; gap: 44px; }
  .entete { padding: 16px 16px 14px; }
  .auteur { text-align: left; }
  .bande-titre { padding-left: 16px; }
  .panneau, .releve { padding: 16px; }
  .ligne, .lignes-tete { grid-template-columns: minmax(0, 1.1fr) minmax(0, 0.8fr) minmax(0, 1fr) 36px; gap: 6px; }
  .releve-total dd { font-size: 2rem; }
  .pied { padding: 18px 0 32px; width: calc(100% - 32px); }
  #t-rang .nom { display: none; }
  .pied .verification { text-align: left; }
}
@media (prefers-reduced-motion: reduce) { * { transition: none !important; scroll-behavior: auto !important; } }
@media print {
  .bande, .actions, .bascule, #maj, .methode, .reglages, .sommaire, .outils, .operation-form, .donnees-graphique, #simulateur .simu-controles { display: none !important; }
  body { background: #fff; }
  .impression-bordereau .page > *:not(.travail):not(.affichage), .impression-bordereau #portefeuille, .impression-bordereau .pied nav { display: none !important; }
  .impression-bordereau .travail { grid-template-columns: 1fr; }
}

/* ---------------------------------------------------------------- version à plusieurs comptes */
.compte { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; font-size: 0.85rem; }
.compte-nom { color: var(--texte-2); }
a.outil { display: inline-flex; align-items: center; padding: 7px 11px; font: 500 0.85rem/1 var(--f-texte); color: var(--texte-2); border: 1px solid var(--trait); border-radius: 4px; text-decoration: none; }
a.outil:hover, a.outil:focus-visible { border-color: var(--texte-2); color: var(--encre); }
.ecran.acces { margin: 10vh auto 48px; }
.ecran.acces .coffre-form { max-width: none; }
.ecran.acces a { color: var(--indigo); }
.admin-page { max-width: 1200px; margin: 0 auto; padding: 0 24px 64px; display: grid; gap: 40px; }
.admin-tableau td, .admin-tableau th { white-space: nowrap; }
table.gauche th, table.gauche td { text-align: left; }
.admin-page > .retour:empty { display: none; }
#detail-actions .actions button { padding: 8px 12px; font-size: 0.875rem; }
.admin-tableau button { padding: 6px 9px; font-size: 0.82rem; }
.lien-genere { display: grid; gap: 8px; padding: 14px; border: 1px solid var(--indigo); border-radius: 6px; background: var(--indigo-pale); }
.lien-genere input { font-size: 0.85rem; }
.pastille { display: inline-block; padding: 2px 8px; border-radius: 10px; font-size: 0.8rem; background: var(--surface-2); border: 1px solid var(--trait); color: var(--texte-2); }
.pastille.ok { color: var(--achat); border-color: var(--achat); }
.pastille.alerte { color: var(--vente); border-color: var(--vente); }

/* ---------------------------------------------------------------- page de connexion */
.page-acces { min-height: 100vh; }
.acces-grille { min-height: 100vh; display: grid; grid-template-columns: minmax(320px, 5fr) minmax(0, 6fr); }
.acces-marque { background: var(--bande); color: var(--bande-texte); padding: 40px clamp(24px, 5vw, 64px); display: flex; flex-direction: column; justify-content: space-between; gap: 40px; }
.acces-logo { display: flex; align-items: center; gap: 12px; font: 500 1.35rem/1 var(--f-titre); }
.acces-logo img { width: 36px; height: 36px; border-radius: 6px; box-shadow: 0 0 0 1px rgba(238, 241, 247, 0.25); }
.acces-logo b { font-weight: 600; color: var(--safran-vif); }
.acces-accroche { font: 600 clamp(1.6rem, 2.6vw, 2.2rem)/1.2 var(--f-titre); margin: 0 0 28px; max-width: 22ch; }
.acces-promesse ul { list-style: none; margin: 0; padding: 0; display: grid; gap: 18px; max-width: 46ch; }
.acces-promesse li { padding-left: 22px; position: relative; color: rgba(238, 241, 247, 0.82); line-height: 1.5; }
.acces-promesse li::before { content: ""; position: absolute; left: 0; top: 0.55em; width: 7px; height: 7px; background: var(--safran-vif); transform: rotate(45deg); }
.acces-promesse li b { color: var(--bande-texte); font-weight: 600; }
.acces-pied { margin: 0; font-size: 0.85rem; color: rgba(238, 241, 247, 0.6); }
.acces-pied a { color: inherit; }
.page-acces .ecran.acces { margin: auto; width: 100%; max-width: 460px; padding: 48px 24px; align-self: center; }
.page-acces .ecran h1 { font-size: 1.9rem; }
.acces-avertissement { margin-top: 12px; border-top: 1px solid var(--trait); padding-top: 14px; }
@media (max-width: 860px) {
  .acces-grille { grid-template-columns: 1fr; }
  .acces-marque { padding: 24px; gap: 18px; }
  .acces-accroche { font-size: 1.35rem; margin-bottom: 0; }
  .acces-promesse ul, .acces-pied { display: none; }
  .page-acces .ecran.acces { padding-top: 28px; }
}
.bloc-csv { display: grid; gap: 8px; justify-items: start; }


/* Mon compte : adresse, alertes, mot de passe */
.acces .sous-titre { font: 600 1.05rem/1.3 var(--f-texte); color: var(--encre); margin: 0; }
#f-email:not([hidden]) ~ .coffre-form:not([hidden]) { margin-top: 26px; padding-top: 22px; border-top: 1px solid var(--trait); }
#t-consigne button { padding: 6px 10px; margin-left: 4px; }
a.bouton { display: inline-flex; align-items: center; font: 500 0.95rem/1 var(--f-texte); color: var(--encre); border: 1px solid var(--trait); border-radius: 4px; padding: 11px 16px; background: var(--surface); text-decoration: none; }
a.bouton:hover { border-color: var(--texte-2); }
