/* GD HF : identité visuelle (CLAUDE.md, docs/maquettes/) */
:root {
  --bg: #0a0d13;
  --panel: #111623;
  --panel-2: #0d1119;
  --line: #1f2736;
  --line-2: #1b2333;
  --text: #e6e9ef;
  --text-2: #cdd3df;
  --muted: #8b93a5;
  --muted-2: #aab2c3;
  --blue: #5b9dff;
  --gold: #d6a24a;
  --green: #43b581;
  --red: #e5645b;
  --sans: 'IBM Plex Sans', system-ui, sans-serif;
  --mono: 'IBM Plex Mono', ui-monospace, monospace;
  --serif: 'Source Serif 4', Georgia, serif;
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; background: var(--bg); color: var(--text); font-family: var(--sans); }
a { color: var(--blue); }
.num { font-family: var(--mono); }
.muted { color: var(--muted-2); }

/* En-tête */
.top {
  display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 12px 16px;
  padding: 14px 40px; border-bottom: 1px solid var(--line-2); background: var(--panel-2);
}
.brand { display: flex; align-items: center; gap: 12px; }
.logo { font-family: var(--mono); font-weight: 500; font-size: 15px; letter-spacing: .14em; }
.logo .dot { color: var(--gold); }
.ver { font-size: 11px; color: var(--muted); border: 1px solid #2a3448; border-radius: 4px; padding: 2px 6px; }
.nav { display: flex; flex-wrap: wrap; gap: 4px; }
.nav a, .nav .soon { font-size: 13px; padding: 7px 12px; border-radius: 6px; text-decoration: none; }
.nav a.active { color: var(--bg); background: var(--blue); font-weight: 600; }
.nav .soon { color: #5d6678; cursor: default; }

/* Contenu */
.main { max-width: 1200px; margin: 0 auto; padding: 28px 40px 56px; display: flex; flex-direction: column; gap: 22px; }
.notice { border: 1px dashed #3a4560; border-radius: 8px; padding: 10px 14px; font-size: 13px; line-height: 1.5; color: var(--muted-2); }
.notice.warn { border-color: #4d3b17; color: #e8cf9c; }
.notice.err { border-color: #4d2420; color: #f0b3ad; }

.datebar { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 10px; }
.kicker { font-family: var(--mono); font-size: 12px; letter-spacing: .14em; text-transform: uppercase; color: var(--gold); }
.pager { display: flex; gap: 6px; align-items: center; }
.pager button, .pager select {
  font: 13px var(--sans); color: var(--text); background: var(--panel); border: 1px solid var(--line);
  border-radius: 6px; padding: 6px 10px; cursor: pointer;
}
.pager button:disabled { opacity: .35; cursor: default; }
.pager button:focus-visible, .pager select:focus-visible, summary:focus-visible { outline: 2px solid var(--blue); outline-offset: 2px; }

h1 { margin: 0; font-family: var(--serif); font-weight: 600; font-size: 40px; line-height: 1.12; letter-spacing: -.01em; }
.meta { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
.label { font-size: 12px; color: var(--muted); }
.pill { font-size: 13px; border-radius: 999px; padding: 4px 12px; border: 1px solid; }
.pill.blue { color: var(--blue); background: #10213a; border-color: #1f3b66; }
.pill.gold { color: var(--gold); background: #2a2112; border-color: #4d3b17; }
.pill.red { color: var(--red); background: #2a1513; border-color: #4d2420; }
.pill.green { color: var(--green); background: #11261c; border-color: #1f4a35; }
.pill.grey { color: var(--muted-2); background: #151b28; border-color: #2a3448; }
.regime-notes { font-size: 13px; line-height: 1.55; color: var(--muted-2); margin: 0; }

/* L'essentiel */
.essentiel { background: #1a1710; border: 1px solid #4d3b17; border-radius: 10px; padding: 20px 24px; }
.essentiel .kicker { margin-bottom: 10px; letter-spacing: .12em; }
.essentiel ol { margin: 0; padding-left: 20px; display: flex; flex-direction: column; gap: 6px; font-size: 16px; line-height: 1.5; color: #f0e6d0; }

/* Devises */
.ccy-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 10px; }
.ccy { background: var(--panel-2); border: 1px solid var(--line-2); border-radius: 8px; padding: 12px 14px; }
.ccy-head { display: flex; justify-content: space-between; align-items: baseline; gap: 8px; }
.ccy-code { font-family: var(--mono); font-size: 16px; font-weight: 500; }
.bias { font-size: 13px; font-weight: 600; }
.bias.haussier { color: var(--green); }
.bias.baissier { color: var(--red); }
.bias.neutre, .bias.non_mesurable { color: var(--muted); }
.conf { font-family: var(--mono); font-size: 11px; color: var(--muted); margin-top: 2px; }
.ccy ul { margin: 8px 0 0; padding-left: 16px; font-size: 13px; line-height: 1.45; color: var(--muted-2); }

/* Sections */
.sec { background: var(--panel); border: 1px solid var(--line); border-radius: 10px; }
.sec > summary { list-style: none; cursor: pointer; display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 16px 22px; flex-wrap: wrap; }
.sec > summary::-webkit-details-marker { display: none; }
.sec > summary::after { content: "▾"; color: var(--muted); font-size: 14px; transition: transform .15s; }
.sec:not([open]) > summary::after { transform: rotate(-90deg); }
.sn { font-family: var(--mono); font-size: 12px; color: var(--blue); margin-right: 14px; }
.st { font-family: var(--serif); font-size: 22px; font-weight: 600; }
.sec-body { padding: 0 22px 20px; display: flex; flex-direction: column; gap: 14px; }

/* Rendu du Markdown des agents */
.md { font-size: 15px; line-height: 1.65; color: var(--text-2); overflow-wrap: anywhere; }
.md p { margin: 0 0 12px; }
.md p:last-child { margin-bottom: 0; }
.md strong { color: var(--text); }
.md em { color: var(--muted-2); }
.md ul, .md ol { margin: 0 0 12px; padding-left: 22px; }
.md li { margin: 3px 0; }
.md code { font-family: var(--mono); font-size: 13px; background: #0d1119; border: 1px solid var(--line-2); border-radius: 4px; padding: 1px 5px; }
.md h3, .md h4 { font-family: var(--serif); font-size: 17px; margin: 14px 0 6px; color: var(--text); }
.table-wrap { overflow-x: auto; margin: 4px 0 12px; border: 1px solid var(--line-2); border-radius: 8px; }
.md table { border-collapse: collapse; width: 100%; min-width: 520px; }
.md th { font-family: var(--mono); font-size: 11px; letter-spacing: .08em; text-transform: uppercase; color: var(--muted); text-align: left; font-weight: 500; padding: 9px 12px; border-bottom: 1px solid #232c3e; background: var(--panel-2); }
.md td { font-size: 14px; color: var(--text); padding: 10px 12px; border-bottom: 1px solid #182030; vertical-align: top; line-height: 1.5; }
.md tr:last-child td { border-bottom: 0; }

/* Sources */
.sources { border-top: 1px solid var(--line-2); padding-top: 10px; }
.sources summary { font-family: var(--mono); font-size: 11px; letter-spacing: .08em; text-transform: uppercase; color: var(--muted); cursor: pointer; }
.sources ul { margin: 8px 0 0; padding-left: 18px; font-size: 12.5px; line-height: 1.5; color: var(--muted-2); }
.sources time { font-family: var(--mono); color: var(--muted); }

/* Risque */
.risk-row { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }

.foot { max-width: 1200px; margin: 0 auto; padding: 0 40px 40px; font-size: 12px; line-height: 1.5; color: var(--muted); }

/* Téléphone et tablette */
@media (max-width: 900px) {
  .ccy-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 600px) {
  .top { padding: 12px 16px; }
  .main { padding: 20px 16px 40px; gap: 18px; }
  .foot { padding: 0 16px 32px; }
  h1 { font-size: 28px; }
  .essentiel { padding: 16px 18px; }
  .essentiel ol { font-size: 15px; }
  .sec > summary { padding: 14px 16px; }
  .sec-body { padding: 0 16px 16px; }
  .st { font-size: 19px; }
  .ccy-grid { grid-template-columns: minmax(0, 1fr); }
}
