:root {
  --paper: #EFF0EC; --surface: #F7F8F5; --ink: #1E211C; --ink-soft: #4C5147;
  --muted: #797F71; --line: #D9DBD2; --line-soft: #E5E7DF;
  --accent: #4E5F33; --accent-mid: #6E8348; --accent-soft: #E3E8D6;
  --flag: #9C5630; --flag-soft: #F2E4DA; --track: #E1E4DA;
  --shadow: 0 1px 2px rgba(30,33,28,.05);
}
@media (prefers-color-scheme: dark) {
  :root {
    --paper: #131512; --surface: #1B1E19; --ink: #E9EBE3; --ink-soft: #B6BBAE;
    --muted: #8B917F; --line: #2C302A; --line-soft: #24271F;
    --accent: #A9BE78; --accent-mid: #8CA35C; --accent-soft: #262C1C;
    --flag: #D5946A; --flag-soft: #2E241C; --track: #262A22;
    --shadow: none;
  }
}
:root[data-theme="dark"] {
  --paper: #131512; --surface: #1B1E19; --ink: #E9EBE3; --ink-soft: #B6BBAE;
  --muted: #8B917F; --line: #2C302A; --line-soft: #24271F;
  --accent: #A9BE78; --accent-mid: #8CA35C; --accent-soft: #262C1C;
  --flag: #D5946A; --flag-soft: #2E241C; --track: #262A22;
  --shadow: none;
}
:root[data-theme="light"] {
  --paper: #EFF0EC; --surface: #F7F8F5; --ink: #1E211C; --ink-soft: #4C5147;
  --muted: #797F71; --line: #D9DBD2; --line-soft: #E5E7DF;
  --accent: #4E5F33; --accent-mid: #6E8348; --accent-soft: #E3E8D6;
  --flag: #9C5630; --flag-soft: #F2E4DA; --track: #E1E4DA;
  --shadow: 0 1px 2px rgba(30,33,28,.05);
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0; background: var(--paper); color: var(--ink);
  font-family: "Avenir Next", Avenir, "Segoe UI", system-ui, sans-serif;
  font-size: 16px; line-height: 1.55; -webkit-font-smoothing: antialiased;
}
.display { font-family: Optima, "Gill Sans", "Gill Sans MT", Candara, "Avenir Next", sans-serif; font-weight: 500; letter-spacing: -.005em; text-wrap: balance; }
.eyebrow { font-size: 11px; letter-spacing: .16em; text-transform: uppercase; color: var(--muted); font-weight: 600; }
.num { font-family: ui-monospace, "SF Mono", SFMono-Regular, Menlo, monospace; font-variant-numeric: tabular-nums; }

/* nav */
.nav { border-bottom: 1px solid var(--line); background: var(--surface); position: sticky; top: 0; z-index: 20; }
.nav .inner { max-width: 1120px; margin: 0 auto; padding: 0 clamp(18px,4vw,40px); display: flex; align-items: center; justify-content: space-between; gap: 20px; flex-wrap: wrap; }
.nav .brand { font-family: Optima, "Gill Sans", Candara, sans-serif; font-size: 16px; font-weight: 600; padding: 15px 0; letter-spacing: .01em; color: var(--ink); text-decoration: none; }
.nav .brand span { color: var(--accent); }
.nav ul { list-style: none; display: flex; gap: 4px; margin: 0; padding: 0; flex-wrap: wrap; }
.nav a.tab { display: block; padding: 15px 12px; font-size: 14px; color: var(--ink-soft); text-decoration: none; border-bottom: 2px solid transparent; margin-bottom: -1px; }
.nav a.tab:hover { color: var(--ink); }
.nav a.tab[aria-current="page"] { color: var(--accent); border-bottom-color: var(--accent); font-weight: 600; }

.wrap { max-width: 1120px; margin: 0 auto; padding: clamp(28px,5vw,56px) clamp(18px,4vw,40px) 80px; display: flex; flex-direction: column; gap: clamp(36px,5vw,56px); }

header.masthead { display: flex; flex-direction: column; gap: 13px; }
header.masthead h1 { margin: 0; font-size: clamp(29px,5vw,48px); line-height: 1.08; }
header.masthead p.lede { margin: 0; max-width: 64ch; color: var(--ink-soft); font-size: clamp(16px,1.6vw,18px); }

.section-head { display: flex; flex-direction: column; gap: 7px; margin-bottom: 20px; }
h2.section { margin: 0; font-size: clamp(21px,2.8vw,28px); }
.section-head p { margin: 0; color: var(--muted); font-size: 14.5px; max-width: 68ch; }

/* tiles */
.tiles { display: grid; grid-template-columns: repeat(auto-fit, minmax(195px,1fr)); gap: 1px; background: var(--line); border: 1px solid var(--line); border-radius: 3px; overflow: hidden; }
.tile { background: var(--surface); padding: 20px 22px; display: flex; flex-direction: column; gap: 6px; }
.tile .k { font-size: 11px; letter-spacing: .13em; text-transform: uppercase; color: var(--muted); font-weight: 600; }
.tile .v { font-size: clamp(27px,3.5vw,35px); font-weight: 600; line-height: 1.05; color: var(--accent); }
.tile .d { font-size: 13.5px; color: var(--ink-soft); line-height: 1.45; }

/* profile grid */
.profile { display: grid; grid-template-columns: repeat(auto-fit, minmax(230px,1fr)); gap: 1px; background: var(--line); border: 1px solid var(--line); border-radius: 3px; overflow: hidden; }
.profile section { background: var(--surface); padding: 20px 22px; display: flex; flex-direction: column; gap: 12px; }
.profile h2, .profile h3 { margin: 0; font-size: 12px; letter-spacing: .14em; text-transform: uppercase; color: var(--muted); font-weight: 600; }
.measures { display: flex; flex-direction: column; gap: 7px; margin: 0; }
.measures div { display: flex; justify-content: space-between; gap: 12px; align-items: baseline; }
.measures dt { color: var(--ink-soft); font-size: 14px; }
.measures dd { margin: 0; font-size: 15px; font-weight: 600; }
.swatches { display: flex; flex-wrap: wrap; gap: 8px; }
.sw { display: flex; align-items: center; gap: 7px; font-size: 13px; color: var(--ink-soft); }
.sw i { width: 15px; height: 15px; border-radius: 50%; border: 1px solid rgba(120,127,113,.45); display: block; }
ul.rules { margin: 0; padding-left: 0; list-style: none; display: flex; flex-direction: column; gap: 9px; }
ul.rules li { font-size: 14px; color: var(--ink-soft); padding-left: 15px; position: relative; line-height: 1.45; }
ul.rules li::before { content: ""; position: absolute; left: 0; top: .62em; width: 6px; height: 1px; background: var(--accent); }
.avoid { font-size: 13px; color: var(--muted); margin: 0; }
.avoid strong { color: var(--flag); font-weight: 600; }

/* blocks / baskets */
.baskets { display: flex; flex-direction: column; gap: 24px; }
.basket { border: 1px solid var(--line); border-radius: 3px; background: var(--surface); box-shadow: var(--shadow); overflow: hidden; }
.basket > header { padding: 17px 22px 15px; border-bottom: 1px solid var(--line); display: flex; flex-wrap: wrap; align-items: baseline; justify-content: space-between; gap: 6px 18px; }
.basket header .title { display: flex; flex-direction: column; gap: 4px; }
.basket header h3 { margin: 0; font-size: clamp(18px,2.3vw,23px); font-family: Optima, "Gill Sans", Candara, sans-serif; font-weight: 500; }
.basket header .why { margin: 0; font-size: 14px; color: var(--muted); max-width: 62ch; }
.subtotal { font-size: 19px; font-weight: 600; white-space: nowrap; }
.scroller { overflow-x: auto; }
table.items { border-collapse: collapse; width: 100%; min-width: 660px; }
table.items thead th { text-align: left; font-size: 11px; letter-spacing: .12em; text-transform: uppercase; color: var(--muted); font-weight: 600; padding: 11px 14px; border-bottom: 1px solid var(--line); white-space: nowrap; }
table.items thead th.r, table.items td.r { text-align: right; }
table.items tbody td { padding: 13px 14px; border-bottom: 1px solid var(--line-soft); vertical-align: top; font-size: 15px; }
table.items tbody tr:last-child td { border-bottom: 0; }
td .item { display: flex; flex-direction: column; gap: 5px; }
td .item a { color: var(--ink); text-decoration: none; border-bottom: 1px solid var(--accent); font-weight: 600; width: fit-content; }
td .item a:hover, td .item a:focus-visible { color: var(--accent); }
td .note { font-size: 13px; color: var(--muted); line-height: 1.45; }
td.r .num { font-weight: 600; }
.was { color: var(--muted); text-decoration: line-through; font-size: 13px; display: block; font-weight: 400; }
.chip { display: inline-block; font-size: 11px; letter-spacing: .06em; text-transform: uppercase; font-weight: 600; padding: 2px 7px; border-radius: 2px; background: var(--accent-soft); color: var(--accent); white-space: nowrap; }
.chip.warn { background: var(--flag-soft); color: var(--flag); }
.chips { display: flex; flex-wrap: wrap; gap: 5px; }
.size { font-weight: 600; font-size: 14px; white-space: nowrap; }
.brand { font-size: 11px; letter-spacing: .1em; text-transform: uppercase; color: var(--muted); font-weight: 600; }

.total { border: 1px solid var(--accent); border-radius: 3px; padding: 20px 24px; display: flex; flex-wrap: wrap; gap: 12px 28px; align-items: baseline; justify-content: space-between; background: var(--accent-soft); }
.total .label { display: flex; flex-direction: column; gap: 3px; }
.total .label strong { font-size: 17px; }
.total .label span { font-size: 13.5px; color: var(--ink-soft); }
.total .amount { font-size: clamp(27px,4vw,37px); font-weight: 600; color: var(--accent); }

/* charts */
.chart { border: 1px solid var(--line); border-radius: 3px; background: var(--surface); overflow: hidden; margin: 0; }
.chart figcaption { padding: 16px 20px 4px; display: flex; flex-direction: column; gap: 4px; }
.chart figcaption b { font-size: 16px; font-weight: 600; }
.chart figcaption span { font-size: 13px; color: var(--muted); }
.chart .scroller { padding: 8px 20px 20px; }
table.bars { border-collapse: collapse; width: 100%; min-width: 440px; }
table.bars th { text-align: left; font-size: 11px; letter-spacing: .12em; text-transform: uppercase; color: var(--muted); font-weight: 600; padding: 10px 0 8px; border-bottom: 1px solid var(--line); }
table.bars th.r { text-align: right; }
table.bars td { padding: 11px 0; border-bottom: 1px solid var(--line-soft); font-size: 14.5px; vertical-align: middle; }
table.bars tr:last-child td { border-bottom: 0; }
table.bars td.lab { padding-right: 16px; white-space: nowrap; color: var(--ink-soft); }
table.bars td.plot { width: 60%; }
table.bars td.val { text-align: right; padding-left: 14px; font-weight: 600; white-space: nowrap; }
.track { background: var(--track); height: 10px; border-radius: 2px; width: 100%; }
.fill { background: var(--accent); height: 10px; border-radius: 0 4px 4px 0; display: block; transition: filter .12s ease; }
table.bars tr:hover .fill { filter: brightness(1.12); }
.fill.mid { background: var(--accent-mid); }

/* verdict table */
.verdicts { border: 1px solid var(--line); border-radius: 3px; background: var(--surface); overflow: hidden; box-shadow: var(--shadow); }
table.v { border-collapse: collapse; width: 100%; min-width: 720px; }
table.v thead th { text-align: left; font-size: 11px; letter-spacing: .12em; text-transform: uppercase; color: var(--muted); font-weight: 600; padding: 13px 16px; border-bottom: 1px solid var(--line); white-space: nowrap; }
table.v tbody td { padding: 15px 16px; border-bottom: 1px solid var(--line-soft); font-size: 14.5px; vertical-align: top; line-height: 1.5; }
table.v tbody tr:last-child td { border-bottom: 0; }
table.v td.poste { font-weight: 600; white-space: nowrap; }
table.v td.why { color: var(--ink-soft); }
.verdict { display: inline-block; font-size: 11px; letter-spacing: .07em; text-transform: uppercase; font-weight: 700; padding: 3px 8px; border-radius: 2px; white-space: nowrap; }
.verdict.plus { background: var(--accent-soft); color: var(--accent); }
.verdict.moins { background: var(--flag-soft); color: var(--flag); }

/* waves */
.waves { display: flex; flex-direction: column; gap: 1px; background: var(--line); border: 1px solid var(--line); border-radius: 3px; overflow: hidden; }
.wave { background: var(--surface); padding: 20px 22px; display: grid; grid-template-columns: 64px 1fr auto; gap: 6px 20px; align-items: start; }
.wave .n { font-family: Optima, "Gill Sans", Candara, sans-serif; font-size: 34px; line-height: 1; color: var(--accent); font-weight: 500; }
.wave .body { display: flex; flex-direction: column; gap: 6px; }
.wave .body b { font-size: 16.5px; }
.wave .body p { margin: 0; font-size: 14px; color: var(--ink-soft); line-height: 1.5; max-width: 62ch; }
.wave .body .list { font-size: 13.5px; color: var(--muted); line-height: 1.5; }
.wave .amt { font-size: 19px; font-weight: 600; white-space: nowrap; }
@media (max-width: 620px) { .wave { grid-template-columns: 44px 1fr; } .wave .amt { grid-column: 2; } .wave .n { font-size: 26px; } }

.levers { display: grid; grid-template-columns: repeat(auto-fit, minmax(245px,1fr)); gap: 1px; background: var(--line); border: 1px solid var(--line); border-radius: 3px; overflow: hidden; }
.lever { background: var(--surface); padding: 18px 20px; display: flex; flex-direction: column; gap: 7px; }
.lever .amt { font-size: 21px; font-weight: 600; color: var(--accent); }
.lever .t { font-size: 14.5px; font-weight: 600; }
.lever .d { font-size: 13.5px; color: var(--muted); line-height: 1.45; }

footer.notes { display: flex; flex-direction: column; gap: 10px; padding-top: 8px; border-top: 1px solid var(--line); }
footer.notes p { margin: 0; font-size: 13.5px; color: var(--muted); max-width: 80ch; line-height: 1.5; }
footer.notes strong { color: var(--ink-soft); font-weight: 600; }
footer.notes a { color: var(--accent); }

a:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; border-radius: 1px; }
@media (prefers-reduced-motion: reduce) { * { transition: none !important; animation: none !important; } }

/* ---------- fiches pièce avec photo ---------- */
.pieces { display: flex; flex-direction: column; }
.piece { display: grid; grid-template-columns: 104px 1fr auto; gap: 4px 18px; padding: 18px 20px; border-bottom: 1px solid var(--line-soft); align-items: start; }
.piece:last-child { border-bottom: 0; }
.piece .shot { grid-row: 1 / span 3; width: 104px; aspect-ratio: 3/4; border-radius: 3px; overflow: hidden; background: var(--track); border: 1px solid var(--line); }
.piece .shot img { width: 100%; height: 100%; object-fit: cover; display: block; }
.piece .head { display: flex; flex-direction: column; gap: 4px; }
.piece .head .brand { font-size: 11px; letter-spacing: .1em; text-transform: uppercase; color: var(--muted); font-weight: 600; }
.piece .head a.name { color: var(--ink); text-decoration: none; border-bottom: 1px solid var(--accent); font-weight: 600; font-size: 15.5px; width: fit-content; }
.piece .head a.name:hover, .piece .head a.name:focus-visible { color: var(--accent); }
.piece .head .note { font-size: 13px; color: var(--muted); line-height: 1.45; max-width: 60ch; }
.piece .price { text-align: right; white-space: nowrap; font-weight: 600; font-size: 15.5px; font-family: ui-monospace, "SF Mono", Menlo, monospace; font-variant-numeric: tabular-nums; }
.piece .price .qty { display: block; font-size: 12px; color: var(--muted); font-weight: 400; letter-spacing: .04em; }
.piece .meta { grid-column: 2 / span 2; display: flex; flex-wrap: wrap; gap: 5px; align-items: center; }
.piece .alt { grid-column: 2 / span 2; margin-top: 6px; }
.piece details { border-top: 1px dashed var(--line); padding-top: 8px; }
.piece summary { cursor: pointer; font-size: 12.5px; color: var(--accent); font-weight: 600; letter-spacing: .02em; list-style: none; }
.piece summary::-webkit-details-marker { display: none; }
.piece summary::before { content: "+ "; font-weight: 700; }
.piece details[open] summary::before { content: "− "; }
.piece summary:hover { text-decoration: underline; }
.piece details ul { list-style: none; margin: 10px 0 2px; padding: 0; display: flex; flex-direction: column; gap: 7px; }
.piece details li { font-size: 13.5px; color: var(--ink-soft); display: flex; flex-wrap: wrap; gap: 4px 10px; align-items: baseline; }
.piece details li a { color: var(--ink-soft); text-decoration: none; border-bottom: 1px solid var(--line); }
.piece details li a:hover, .piece details li a:focus-visible { color: var(--accent); border-bottom-color: var(--accent); }
.piece details li .p { font-family: ui-monospace, "SF Mono", Menlo, monospace; font-variant-numeric: tabular-nums; font-weight: 600; color: var(--ink); }
.piece details li .src { font-size: 11px; letter-spacing: .09em; text-transform: uppercase; color: var(--muted); }
@media (max-width: 620px) {
  .piece { grid-template-columns: 76px 1fr; gap: 4px 14px; padding: 16px 14px; }
  .piece .shot { width: 76px; grid-row: 1 / span 2; }
  .piece .price { grid-column: 2; text-align: left; }
  .piece .meta, .piece .alt { grid-column: 1 / span 2; }
}

.tol { display: inline-block; font-size: 11px; letter-spacing: .06em; text-transform: uppercase; font-weight: 600; padding: 2px 7px; border-radius: 2px; white-space: nowrap; }
.tol.ok { background: var(--accent-soft); color: var(--accent); }
.tol.no { background: var(--flag-soft); color: var(--flag); }

/* ---------- lookbook ---------- */
.looks { display: flex; flex-direction: column; gap: 1px; background: var(--line); border: 1px solid var(--line); border-radius: 3px; overflow: hidden; }
.look { background: var(--surface); display: grid; grid-template-columns: minmax(200px, 300px) 1fr; gap: 0; align-items: stretch; }
.look .visual { position: relative; background: var(--track); min-height: 260px; }
.look .visual img { width: 100%; height: 100%; object-fit: cover; display: block; }
.look .visual .tag { position: absolute; left: 12px; top: 12px; background: var(--surface); color: var(--ink); font-size: 10.5px; letter-spacing: .12em; text-transform: uppercase; font-weight: 700; padding: 4px 9px; border-radius: 2px; opacity: .94; }
.look .body { padding: 22px 24px; display: flex; flex-direction: column; gap: 12px; }
.look .body h3 { margin: 0; font-family: Optima, "Gill Sans", Candara, sans-serif; font-weight: 500; font-size: clamp(20px,2.6vw,26px); }
.look .body > p { margin: 0; font-size: 14.5px; color: var(--ink-soft); line-height: 1.55; max-width: 60ch; }
.look .body .kicker { font-size: 13px; color: var(--muted); font-style: italic; margin: 0; }
.recipe { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 2px; }
.recipe a { font-size: 12.5px; text-decoration: none; color: var(--ink-soft); background: var(--paper); border: 1px solid var(--line); padding: 4px 9px; border-radius: 2px; }
.recipe a:hover, .recipe a:focus-visible { border-color: var(--accent); color: var(--accent); }
.recipe .plus { align-self: center; color: var(--muted); font-size: 12px; }
@media (max-width: 700px) { .look { grid-template-columns: 1fr; } .look .visual { min-height: 300px; max-height: 380px; } }

.credit { font-size: 12px; color: var(--muted); }

/* ---------- pièces d'exception ---------- */
.exc { display: flex; flex-direction: column; gap: 1px; background: var(--line); border: 1px solid var(--line); border-radius: 3px; overflow: hidden; }
.exc-item { background: var(--surface); display: grid; grid-template-columns: 210px 1fr auto; gap: 8px 24px; padding: 24px 26px; align-items: start; }
.exc-item .shot { grid-row: 1 / span 4; width: 210px; aspect-ratio: 4/5; border-radius: 3px; overflow: hidden; background: var(--track); border: 1px solid var(--line); }
.exc-item .shot img { width: 100%; height: 100%; object-fit: cover; display: block; }
.exc-item .shot.empty { display: flex; align-items: center; justify-content: center; padding: 18px; }
.exc-item .shot.empty span { font-size: 12px; color: var(--muted); text-align: center; line-height: 1.5; }
.exc-item .brandline { font-size: 11px; letter-spacing: .13em; text-transform: uppercase; color: var(--muted); font-weight: 600; }
.exc-item h3 { margin: 2px 0 0; font-family: Optima, "Gill Sans", Candara, sans-serif; font-weight: 500; font-size: clamp(20px,2.6vw,26px); }
.exc-item h3 a { color: var(--ink); text-decoration: none; border-bottom: 1px solid var(--accent); }
.exc-item h3 a:hover, .exc-item h3 a:focus-visible { color: var(--accent); }
.exc-item .why { grid-column: 2; margin: 8px 0 0; font-size: 14.5px; color: var(--ink-soft); line-height: 1.6; max-width: 58ch; }
.exc-item .why + .why { margin-top: 10px; }
.exc-item .tags { grid-column: 2; display: flex; flex-wrap: wrap; gap: 5px; margin-top: 10px; }
.exc-item .cost { text-align: right; white-space: nowrap; }
.exc-item .cost .big { font-size: 22px; font-weight: 600; font-family: ui-monospace, "SF Mono", Menlo, monospace; font-variant-numeric: tabular-nums; }
.exc-item .cost .sub { display: block; font-size: 12.5px; color: var(--muted); margin-top: 3px; }
@media (max-width: 760px) {
  .exc-item { grid-template-columns: 1fr; gap: 6px; }
  .exc-item .shot { grid-row: auto; width: 100%; max-width: 320px; aspect-ratio: 4/5; }
  .exc-item .why, .exc-item .tags, .exc-item .cost { grid-column: 1; }
  .exc-item .cost { text-align: left; margin-top: 10px; }
}
