/* GetTechScope — feuille de style unique (site public + admin). Aucun build nécessaire. */
:root {
  --bg: #f3f4f1;
  --surface: #ffffff;
  --ink: #14181f;
  --muted: #5d6572;
  --line: #dcdfe3;
  --accent: #0f5fff;
  --accent-ink: #ffffff;
  --best: #0e7a55;
  --best-bg: #e2f4ec;
  --warn: #a15c00;
  --warn-bg: #fff1d6;
  --danger: #b3261e;
  --font-body: "Schibsted Grotesk", system-ui, -apple-system, "Segoe UI", sans-serif;
  --font-mono: "JetBrains Mono", ui-monospace, "Cascadia Mono", Consolas, monospace;
  --radius: 6px;
  --gutter: 20px;
}

@media (prefers-color-scheme: dark) {
  :root {
    --bg: #0f1217;
    --surface: #171b22;
    --ink: #eceef1;
    --muted: #98a1ae;
    --line: #2a303a;
    --accent: #5b8cff;
    --accent-ink: #0b1020;
    --best: #4cc79a;
    --best-bg: #123428;
    --warn: #f0b24a;
    --warn-bg: #3a2c10;
    --danger: #ff8a80;
    color-scheme: dark;
  }
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: var(--font-body);
  font-size: 16px;
  line-height: 1.55;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}
main { flex: 1; }
img { max-width: 100%; display: block; }
a { color: var(--accent); }
h1, h2, h3 { line-height: 1.15; text-wrap: balance; margin: 0; letter-spacing: -0.01em; }
h1 { font-size: clamp(1.8rem, 4vw, 2.6rem); font-weight: 700; }
h2 { font-size: 1.35rem; font-weight: 650; }
h3 { font-size: 1.05rem; font-weight: 650; }
p { margin: 0; }
:focus-visible { outline: 3px solid var(--accent); outline-offset: 2px; }

.wrap {
  width: 100%;
  max-width: 1120px;
  margin-inline: auto;
  padding-inline: max(var(--gutter), env(safe-area-inset-left, 0px));
}
.stack { display: flex; flex-direction: column; gap: 1.25rem; }
.section { padding-block: 2.25rem; }
.muted { color: var(--muted); }
.mono { font-family: var(--font-mono); font-variant-numeric: tabular-nums; }
.eyebrow {
  font-family: var(--font-mono);
  font-size: 0.75rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--muted);
}

/* ---- En-tête / pied ---- */
.site-header { background: var(--surface); border-bottom: 1px solid var(--line); }
.site-header .wrap { display: flex; flex-wrap: wrap; align-items: center; gap: 0.75rem 2rem; padding-block: 0.9rem; }
.brand { font-weight: 800; font-size: 1.2rem; letter-spacing: -0.02em; color: var(--ink); text-decoration: none; }
.brand b { color: var(--accent); }
.nav { display: flex; flex-wrap: wrap; gap: 0.25rem 1.1rem; }
.nav a { color: var(--ink); text-decoration: none; font-size: 0.95rem; padding: 0.2rem 0; border-bottom: 2px solid transparent; }
.nav a:hover, .nav a[aria-current="page"] { border-bottom-color: var(--accent); }
.site-footer { border-top: 1px solid var(--line); background: var(--surface); padding-block: 2.25rem 1.5rem; font-size: 0.88rem; color: var(--muted); margin-top: 1rem; }
.footer-grid { display: grid; grid-template-columns: minmax(0, 1.6fr) repeat(3, minmax(0, 1fr)); gap: 1.75rem 2rem; }
.footer-brand p { margin: 0.6rem 0 0; max-width: 32ch; }
.footer-logo { display: block; height: 36px; width: auto; max-width: 100%; }
.footer-col h2 { font-size: 0.78rem; font-family: var(--font-mono); text-transform: uppercase; letter-spacing: 0.06em; color: var(--ink); margin-bottom: 0.6rem; }
.footer-col ul { list-style: none; margin: 0; padding: 0; display: grid; gap: 0.45rem; }
.footer-col a { color: var(--muted); text-decoration: none; }
.footer-col a:hover { color: var(--ink); text-decoration: underline; }
.footer-bottom { display: flex; flex-direction: column; gap: 0.4rem; margin-top: 1.75rem; padding-top: 1.25rem; border-top: 1px solid var(--line); font-size: 0.8rem; }
.footer-bottom p { margin: 0; }
@media (max-width: 860px) { .footer-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); } .footer-brand { grid-column: 1 / -1; } }
@media (max-width: 420px) { .footer-grid { grid-template-columns: minmax(0, 1fr); } }

/* ---- Boutons ---- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 0.4rem;
  font: inherit; font-weight: 600; font-size: 0.95rem;
  padding: 0.6rem 1rem; border-radius: var(--radius);
  border: 1px solid var(--accent); background: var(--accent); color: var(--accent-ink);
  text-decoration: none; cursor: pointer; line-height: 1.2;
}
.btn:hover { filter: brightness(1.08); }
.btn.secondary { background: transparent; color: var(--accent); }
.btn.ghost { background: transparent; border-color: var(--line); color: var(--ink); }
.btn.danger { background: transparent; border-color: var(--danger); color: var(--danger); }
.btn.small { padding: 0.35rem 0.65rem; font-size: 0.85rem; }
.btn[disabled] { opacity: 0.45; cursor: not-allowed; }

/* ---- Accueil ---- */
.hero { padding-block: 3rem 2rem; border-bottom: 1px solid var(--line); }
.hero p { max-width: 58ch; margin-top: 0.9rem; color: var(--muted); font-size: 1.1rem; }
.cat-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); gap: 1rem; }
.cat-tile {
  display: flex; flex-direction: column; gap: 0.4rem;
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius);
  padding: 1rem 1.1rem; color: var(--ink); text-decoration: none;
}
.cat-tile:hover { border-color: var(--accent); }
.cat-tile .meta { font-family: var(--font-mono); font-size: 0.78rem; color: var(--muted); }
.section-head { display: flex; flex-wrap: wrap; align-items: baseline; justify-content: space-between; gap: 0.5rem 1rem; margin-bottom: 1rem; }

/* ---- Cartes produits ---- */
.product-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(250px, 1fr)); gap: 1rem; }
.card {
  position: relative; display: flex; flex-direction: column; gap: 0.7rem;
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius);
  padding: 1rem; min-width: 0;
}
.card .thumb {
  aspect-ratio: 4 / 3; background: var(--bg); border-radius: 4px;
  display: flex; align-items: center; justify-content: center; overflow: hidden;
}
.card .thumb img { width: 100%; height: 100%; object-fit: contain; }
.card .thumb { background: var(--surface); }
.card .brand-line { font-family: var(--font-mono); font-size: 0.75rem; text-transform: uppercase; letter-spacing: 0.06em; color: var(--muted); }
.card h3 a { color: var(--ink); text-decoration: none; }
.card h3 a:hover { color: var(--accent); }
.badge {
  position: absolute; top: 0.7rem; left: 0.7rem;
  background: var(--ink); color: var(--bg);
  font-family: var(--font-mono); font-size: 0.7rem; letter-spacing: 0.06em; text-transform: uppercase;
  padding: 0.2rem 0.45rem; border-radius: 3px;
}
.key-specs { list-style: none; margin: 0; padding: 0; display: grid; gap: 0.2rem; font-size: 0.88rem; }
.key-specs li { display: flex; justify-content: space-between; gap: 0.75rem; border-bottom: 1px dotted var(--line); padding-bottom: 0.2rem; }
.key-specs li span:first-child { color: var(--muted); }
.key-specs li span:last-child { font-family: var(--font-mono); text-align: right; }
.card-actions { display: flex; flex-wrap: wrap; gap: 0.5rem; align-items: center; justify-content: space-between; margin-top: auto; }
.pick { display: inline-flex; align-items: center; gap: 0.45rem; font-size: 0.88rem; cursor: pointer; }
.pick input { width: 1.1rem; height: 1.1rem; accent-color: var(--accent); }

/* ---- Barre de comparaison ---- */
.compare-bar {
  position: sticky; bottom: 0; z-index: 5;
  background: var(--ink); color: var(--bg);
  padding: 0.7rem max(var(--gutter), env(safe-area-inset-left, 0px));
  padding-bottom: calc(0.7rem + env(safe-area-inset-bottom, 0px));
}
.compare-bar .inner { max-width: 1120px; margin-inline: auto; display: flex; flex-wrap: wrap; gap: 0.6rem 1rem; align-items: center; justify-content: space-between; }
.compare-bar .btn { background: var(--bg); color: var(--ink); border-color: var(--bg); }

/* ---- Tableau comparatif ---- */
.table-scroll { overflow-x: auto; border: 1px solid var(--line); border-radius: var(--radius); background: var(--surface); }
table.compare { border-collapse: collapse; width: 100%; min-width: 560px; }
.compare th, .compare td { padding: 0.7rem 0.9rem; text-align: left; vertical-align: top; border-bottom: 1px solid var(--line); }
.compare thead th { background: var(--surface); vertical-align: bottom; }
.compare tbody th { font-weight: 600; width: 22%; min-width: 150px; background: var(--bg); position: sticky; left: 0; }
.compare tbody th small { display: block; font-weight: 400; font-family: var(--font-mono); font-size: 0.72rem; color: var(--muted); }
.compare td { font-family: var(--font-mono); font-variant-numeric: tabular-nums; font-size: 0.92rem; }
.compare td.best { background: var(--best-bg); color: var(--best); font-weight: 700; }
.compare td.best::after { content: " ▲"; font-size: 0.7em; }
.compare td .none { color: var(--muted); }
.compare .prod-head { display: flex; flex-direction: column; gap: 0.5rem; font-family: var(--font-body); min-width: 150px; }
.compare .prod-head a.name { color: var(--ink); font-weight: 650; text-decoration: none; }
.legend { font-size: 0.85rem; color: var(--muted); display: flex; gap: 0.5rem; align-items: center; flex-wrap: wrap; }
.legend .swatch { width: 0.9rem; height: 0.9rem; border-radius: 2px; background: var(--best-bg); border: 1px solid var(--best); }

/* ---- Fiche produit ---- */
.product-layout { display: grid; grid-template-columns: minmax(0, 360px) minmax(0, 1fr); gap: 2rem; align-items: start; }
.product-layout .thumb { aspect-ratio: 1 / 1; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); display: flex; align-items: center; justify-content: center; overflow: hidden; }
.product-layout .thumb img { width: 100%; height: 100%; object-fit: contain; }
.spec-table { width: 100%; border-collapse: collapse; background: var(--surface); border: 1px solid var(--line); }
.spec-table th, .spec-table td { text-align: left; padding: 0.6rem 0.9rem; border-bottom: 1px solid var(--line); }
.spec-table th { width: 42%; font-weight: 500; color: var(--muted); }
.spec-table td { font-family: var(--font-mono); font-variant-numeric: tabular-nums; }
.breadcrumb { font-size: 0.88rem; color: var(--muted); }
.breadcrumb a { color: var(--muted); }
.notice { background: var(--warn-bg); color: var(--warn); padding: 0.7rem 1rem; border-radius: var(--radius); font-size: 0.92rem; }
.disclosure { font-size: 0.82rem; color: var(--muted); }

/* ---- Admin ---- */
.admin-bar { background: var(--ink); color: var(--bg); }
.admin-bar .wrap { display: flex; flex-wrap: wrap; align-items: center; gap: 0.5rem 1.5rem; padding-block: 0.7rem; }
.admin-bar a { color: var(--bg); text-decoration: none; font-size: 0.92rem; }
.admin-bar a:hover { text-decoration: underline; }
.admin-bar .spacer { flex: 1; }
.admin-bar button { background: none; border: 0; color: var(--bg); font: inherit; cursor: pointer; font-size: 0.92rem; padding: 0; }
.flash { background: var(--best-bg); color: var(--best); padding: 0.7rem 1rem; border-radius: var(--radius); font-size: 0.95rem; }
.panel { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 1.25rem; min-width: 0; }
.stats { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 1rem; }
.stat { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 0.9rem 1rem; }
.stat b { display: block; font-family: var(--font-mono); font-size: 1.8rem; font-weight: 600; line-height: 1.1; }
.stat span { color: var(--muted); font-size: 0.88rem; }
.data-table { width: 100%; border-collapse: collapse; }
.data-table th, .data-table td { text-align: left; padding: 0.6rem 0.7rem; border-bottom: 1px solid var(--line); vertical-align: middle; }
.data-table th { font-family: var(--font-mono); font-size: 0.72rem; text-transform: uppercase; letter-spacing: 0.06em; color: var(--muted); font-weight: 500; }
.row-actions { display: flex; gap: 0.4rem; flex-wrap: wrap; }
.pill { display: inline-block; font-family: var(--font-mono); font-size: 0.72rem; padding: 0.1rem 0.5rem; border-radius: 999px; border: 1px solid var(--line); color: var(--muted); }
.pill.on { border-color: var(--best); color: var(--best); background: var(--best-bg); }

.form-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 1rem; }
.field { display: flex; flex-direction: column; gap: 0.3rem; min-width: 0; }
.field.full { grid-column: 1 / -1; }
.field label, .field .label { font-weight: 600; font-size: 0.9rem; }
.field .hint { font-size: 0.8rem; color: var(--muted); }
.field .error, .error-text { font-size: 0.85rem; color: var(--danger); }
input[type="text"], input[type="email"], input[type="password"], input[type="url"], input[type="number"], select, textarea {
  font: inherit; color: var(--ink); background: var(--bg);
  border: 1px solid var(--line); border-radius: var(--radius);
  padding: 0.55rem 0.7rem; width: 100%; min-width: 0;
}
textarea { min-height: 5.5rem; resize: vertical; }
.check { display: flex; align-items: center; gap: 0.5rem; font-size: 0.95rem; }
.check input { width: 1.1rem; height: 1.1rem; accent-color: var(--accent); }
.form-actions { display: flex; flex-wrap: wrap; gap: 0.6rem; align-items: center; }
.inline-form { display: contents; }
.login-box { max-width: 380px; margin: 4rem auto; }
.crit-row { display: grid; grid-template-columns: repeat(auto-fit, minmax(130px, 1fr)); gap: 0.6rem; align-items: end; padding-block: 0.9rem; border-bottom: 1px solid var(--line); }
.crit-row:last-child { border-bottom: 0; }

@media (max-width: 720px) {
  .product-layout { grid-template-columns: minmax(0, 1fr); }
  .hero { padding-block: 2rem 1.5rem; }
}
@media (prefers-reduced-motion: no-preference) {
  .cat-tile, .btn { transition: border-color 0.15s, filter 0.15s; }
}

/* --- TechScore (admin) --- */
.rule-row { border: 1px solid var(--line); border-radius: var(--radius); padding: 0.9rem 1rem 1rem; margin: 0; min-width: 0; }
.rule-row legend { font-weight: 600; font-size: 0.9rem; padding: 0 0.4rem; }
details > summary { cursor: pointer; font-weight: 600; color: var(--accent); }
.score-profiles { display: flex; flex-wrap: wrap; gap: 0.6rem; }
.score-chip { display: flex; flex-direction: column; gap: 0.1rem; border: 1px solid var(--line); border-radius: var(--radius); padding: 0.5rem 0.8rem; min-width: 7.5rem; }
.score-chip strong { font-family: var(--font-mono); font-size: 1.15rem; }
.weights-table td { white-space: nowrap; }
.weights-table td .hint { display: inline-block; margin-left: 0.3rem; font-size: 0.78rem; }

/* --- Assistant de choix --- */
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; }
/* Zone de texte sur toute la largeur, bouton « Trouver » juste en dessous. */
.ask { display: flex; flex-direction: column; align-items: flex-start; gap: 0.75rem; margin-top: 1.25rem; max-width: 820px; }
.ask textarea { align-self: stretch; width: 100%; box-sizing: border-box; min-width: 0; font: inherit; font-size: 1.05rem; padding: 0.8rem 0.9rem; border: 1px solid var(--line); border-radius: var(--radius); background: var(--surface); color: var(--ink); resize: vertical; }
.ask textarea:focus { outline: 2px solid var(--accent); outline-offset: 1px; }
.ask .btn { padding: 0.8rem 1.6rem; font-size: 1rem; }
.examples { display: flex; flex-wrap: wrap; gap: 0.4rem 0.6rem; align-items: center; margin-top: 1.6rem; font-size: 0.9rem; }
.examples a { border: 1px solid var(--line); border-radius: 999px; padding: 0.25rem 0.7rem; text-decoration: none; color: var(--ink); background: var(--surface); }
.examples a:hover { border-color: var(--accent); color: var(--accent); }
.chips { list-style: none; margin: 0.7rem 0 0; padding: 0; display: flex; flex-wrap: wrap; gap: 0.5rem; }
.chips li { border: 1px solid var(--line); border-radius: 999px; padding: 0.3rem 0.8rem; font-size: 0.92rem; background: var(--bg); }
.chips li span { font-family: var(--font-mono); font-size: 0.72rem; text-transform: uppercase; letter-spacing: 0.05em; color: var(--muted); margin-right: 0.3rem; }
.refine { margin-top: 0.9rem; }
.checks { border: 0; padding: 0; margin: 0; display: flex; flex-wrap: wrap; gap: 0.4rem 1.1rem; }
.checks legend { font-weight: 600; font-size: 0.9rem; margin-bottom: 0.4rem; }
.priorities { display: flex; flex-wrap: wrap; gap: 0.3rem 0.8rem; align-items: baseline; }
.priorities ol { margin: 0; padding-left: 1.2rem; display: flex; flex-wrap: wrap; gap: 0.2rem 1.6rem; }
.picks { display: grid; grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); gap: 1rem; align-items: start; }
.pick-card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 1.1rem; display: flex; flex-direction: column; gap: 0.8rem; min-width: 0; }
.pick-card.is-best { border: 2px solid var(--accent); }
.pick-head { display: grid; grid-template-columns: 1fr auto; gap: 0.3rem 0.8rem; align-items: start; }
.pick-title { grid-column: 1 / -1; margin: 0; font-weight: 700; font-size: 0.95rem; }
.pick-name h3 { margin: 0.1rem 0 0; font-size: 1.1rem; }
.pick-name h3 a { color: var(--ink); text-decoration: none; }
.pick-name h3 a:hover { color: var(--accent); }
.pick-name .brand-line { font-family: var(--font-mono); font-size: 0.72rem; text-transform: uppercase; letter-spacing: 0.06em; color: var(--muted); }
.pick-score { text-align: right; font-family: var(--font-mono); line-height: 1; }
.pick-score strong { font-size: 2rem; color: var(--accent); }
.pick-score span { color: var(--muted); font-size: 0.85rem; }
.pick-note { margin: 0; font-size: 0.9rem; background: var(--bg); border-radius: var(--radius); padding: 0.5rem 0.7rem; }
.pick-body { display: flex; flex-direction: column; gap: 0.5rem; }
.pick-price { margin: 0; font-family: var(--font-mono); font-weight: 600; }
.pick-price .muted { font-family: var(--font-body); font-weight: 400; font-size: 0.82rem; }
.pick-label { margin: 0; font-weight: 700; font-size: 0.9rem; }
.reasons { list-style: none; margin: 0; padding: 0; display: grid; gap: 0.35rem; }
.reasons li { display: grid; grid-template-columns: 1fr auto; gap: 0 0.6rem; font-size: 0.92rem; }
.reasons li::before { content: "✓"; color: var(--best); position: absolute; margin-left: -1.1rem; }
.reasons li { position: relative; margin-left: 1.1rem; }
.reason-score { font-family: var(--font-mono); color: var(--best); font-weight: 600; }
.reason-facts { grid-column: 1 / -1; font-family: var(--font-mono); font-size: 0.78rem; color: var(--muted); }
.weak { margin: 0; font-size: 0.9rem; background: var(--warn-bg); color: var(--warn); border-radius: var(--radius); padding: 0.5rem 0.7rem; }
.legend-box { margin: 0; font-size: 0.85rem; color: var(--muted); border-top: 1px solid var(--line); padding-top: 1rem; max-width: 90ch; }
.home-ask { padding-block: 3rem 2.25rem; border-bottom: 1px solid var(--line); }
.home-ask h1 { max-width: 22ch; }
.entry-points { display: grid; grid-template-columns: repeat(auto-fit, minmax(230px, 1fr)); gap: 0.8rem; margin-top: 1.5rem; max-width: 820px; }
.entry-points a { display: block; border: 1px solid var(--line); border-radius: var(--radius); padding: 0.8rem 1rem; text-decoration: none; color: var(--ink); background: var(--surface); }
.entry-points a:hover { border-color: var(--accent); }
.entry-points strong { display: block; }
.entry-points span { font-size: 0.88rem; color: var(--muted); }

/* Meilleure offre (une seule par produit) */
.best-offer { display: flex; flex-direction: column; gap: 0.35rem; border: 1px solid var(--line); border-radius: var(--radius); padding: 0.6rem 0.75rem; background: var(--bg); }
.best-offer .offer-line { margin: 0; display: flex; flex-wrap: wrap; align-items: baseline; justify-content: space-between; gap: 0.25rem 0.75rem; }
.best-offer .offer-merchant { display: inline-flex; align-items: center; gap: 0.4rem; font-weight: 600; }
.best-offer .offer-merchant img { width: 20px; height: 20px; object-fit: contain; }
.best-offer .offer-price { font-family: var(--font-mono); font-size: 1.15rem; color: var(--ink); }
.best-offer .offer-meta { margin: 0; font-size: 0.8rem; color: var(--muted); }
.best-offer .btn { align-self: flex-start; }
.best-offer.compact { padding: 0.45rem 0.6rem; min-width: 12rem; }
.best-offer.compact .offer-price { font-size: 1rem; }
.offer-none { margin: 0; font-size: 0.88rem; color: var(--muted); border: 1px dashed var(--line); border-radius: var(--radius); padding: 0.55rem 0.75rem; }
.offer-status-ok { color: var(--best); font-weight: 600; }
.offer-status-ko { color: var(--warn); }

/* Galerie de la fiche produit (sans JavaScript) */
.gallery { display: flex; flex-direction: column; gap: 0.6rem; }
.gallery-radio { position: absolute; opacity: 0; width: 1px; height: 1px; pointer-events: none; }
.gallery-slide { display: none; }
.gallery-thumbs { display: flex; flex-wrap: wrap; gap: 0.45rem; }
.gallery-thumb { width: 64px; height: 64px; border: 1px solid var(--line); border-radius: var(--radius); background: var(--surface); display: flex; align-items: center; justify-content: center; cursor: pointer; overflow: hidden; }
.gallery-thumb img { width: 100%; height: 100%; object-fit: contain; }
.gallery-thumb:hover { border-color: var(--accent); }
#gallery-0:checked ~ .gallery-main .gallery-slide-0 { display: block; }
#gallery-0:checked ~ .gallery-thumbs .gallery-thumb-0 { border-color: var(--accent); box-shadow: 0 0 0 1px var(--accent); }
#gallery-0:focus-visible ~ .gallery-thumbs .gallery-thumb-0 { outline: 2px solid var(--accent); outline-offset: 2px; }
#gallery-1:checked ~ .gallery-main .gallery-slide-1 { display: block; }
#gallery-1:checked ~ .gallery-thumbs .gallery-thumb-1 { border-color: var(--accent); box-shadow: 0 0 0 1px var(--accent); }
#gallery-1:focus-visible ~ .gallery-thumbs .gallery-thumb-1 { outline: 2px solid var(--accent); outline-offset: 2px; }
#gallery-2:checked ~ .gallery-main .gallery-slide-2 { display: block; }
#gallery-2:checked ~ .gallery-thumbs .gallery-thumb-2 { border-color: var(--accent); box-shadow: 0 0 0 1px var(--accent); }
#gallery-2:focus-visible ~ .gallery-thumbs .gallery-thumb-2 { outline: 2px solid var(--accent); outline-offset: 2px; }
#gallery-3:checked ~ .gallery-main .gallery-slide-3 { display: block; }
#gallery-3:checked ~ .gallery-thumbs .gallery-thumb-3 { border-color: var(--accent); box-shadow: 0 0 0 1px var(--accent); }
#gallery-3:focus-visible ~ .gallery-thumbs .gallery-thumb-3 { outline: 2px solid var(--accent); outline-offset: 2px; }
#gallery-4:checked ~ .gallery-main .gallery-slide-4 { display: block; }
#gallery-4:checked ~ .gallery-thumbs .gallery-thumb-4 { border-color: var(--accent); box-shadow: 0 0 0 1px var(--accent); }
#gallery-4:focus-visible ~ .gallery-thumbs .gallery-thumb-4 { outline: 2px solid var(--accent); outline-offset: 2px; }
#gallery-5:checked ~ .gallery-main .gallery-slide-5 { display: block; }
#gallery-5:checked ~ .gallery-thumbs .gallery-thumb-5 { border-color: var(--accent); box-shadow: 0 0 0 1px var(--accent); }
#gallery-5:focus-visible ~ .gallery-thumbs .gallery-thumb-5 { outline: 2px solid var(--accent); outline-offset: 2px; }
#gallery-6:checked ~ .gallery-main .gallery-slide-6 { display: block; }
#gallery-6:checked ~ .gallery-thumbs .gallery-thumb-6 { border-color: var(--accent); box-shadow: 0 0 0 1px var(--accent); }
#gallery-6:focus-visible ~ .gallery-thumbs .gallery-thumb-6 { outline: 2px solid var(--accent); outline-offset: 2px; }
#gallery-7:checked ~ .gallery-main .gallery-slide-7 { display: block; }
#gallery-7:checked ~ .gallery-thumbs .gallery-thumb-7 { border-color: var(--accent); box-shadow: 0 0 0 1px var(--accent); }
#gallery-7:focus-visible ~ .gallery-thumbs .gallery-thumb-7 { outline: 2px solid var(--accent); outline-offset: 2px; }
#gallery-8:checked ~ .gallery-main .gallery-slide-8 { display: block; }
#gallery-8:checked ~ .gallery-thumbs .gallery-thumb-8 { border-color: var(--accent); box-shadow: 0 0 0 1px var(--accent); }
#gallery-8:focus-visible ~ .gallery-thumbs .gallery-thumb-8 { outline: 2px solid var(--accent); outline-offset: 2px; }
#gallery-9:checked ~ .gallery-main .gallery-slide-9 { display: block; }
#gallery-9:checked ~ .gallery-thumbs .gallery-thumb-9 { border-color: var(--accent); box-shadow: 0 0 0 1px var(--accent); }
#gallery-9:focus-visible ~ .gallery-thumbs .gallery-thumb-9 { outline: 2px solid var(--accent); outline-offset: 2px; }
#gallery-10:checked ~ .gallery-main .gallery-slide-10 { display: block; }
#gallery-10:checked ~ .gallery-thumbs .gallery-thumb-10 { border-color: var(--accent); box-shadow: 0 0 0 1px var(--accent); }
#gallery-10:focus-visible ~ .gallery-thumbs .gallery-thumb-10 { outline: 2px solid var(--accent); outline-offset: 2px; }

/* Galerie dans l'admin */
.gallery-admin { display: grid; grid-template-columns: repeat(auto-fill, minmax(170px, 1fr)); gap: 0.8rem; margin-top: 0.6rem; }
.gallery-admin-item { display: flex; flex-direction: column; gap: 0.35rem; border: 1px solid var(--line); border-radius: var(--radius); padding: 0.5rem; }
.gallery-admin-item img { width: 100%; aspect-ratio: 1 / 1; object-fit: contain; background: var(--surface); }

/* Pages légales */
.legal-page { max-width: 78ch; display: flex; flex-direction: column; gap: 0.8rem; }
.legal-page h2 { font-size: 1.2rem; margin-top: 1rem; }
.legal-page p, .legal-page ul { margin: 0; }
mark.todo { background: var(--warn-bg); color: var(--warn); padding: 0 0.3rem; border-radius: 3px; font-weight: 600; }
.footer-links a { color: inherit; }

/* Double authentification */
.qr-box { background: #fff; padding: 0.75rem; border-radius: var(--radius); width: max-content; max-width: 100%; }
.qr-box svg { display: block; width: 200px; height: 200px; }
.recovery-codes { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 0.4rem; font-family: var(--font-mono); font-size: 1.05rem; }
.recovery-codes li { background: var(--bg); border: 1px solid var(--line); border-radius: var(--radius); padding: 0.35rem 0.6rem; text-align: center; }
.steps { margin: 0; padding-left: 1.2rem; display: grid; gap: 0.3rem; }

/* Logo */
.brand { display: inline-flex; align-items: center; }
.brand-logo { display: block; height: 40px; width: auto; }
.login-logo { display: block; height: 44px; width: auto; max-width: 100%; margin-bottom: 1rem; }
.admin-brand { display: inline-flex; align-items: center; gap: 0.4rem; }
.admin-brand img { display: block; }
@media (max-width: 480px) { .brand-logo { height: 32px; } }
/* En mode sombre, le texte bleu foncé du logo reste lisible sur une pastille claire. */
@media (prefers-color-scheme: dark) {
  .brand-logo, .login-logo { background: #fff; padding: 4px 10px; border-radius: 8px; box-sizing: content-box; }
}

/* Petits écrans : champ de l'assistant et en-tête */
@media (max-width: 560px) {
  .home-ask { padding-block: 2rem 1.5rem; }
  .ask textarea { font-size: 1rem; }
  .ask .btn { align-self: stretch; }
  .site-header .wrap { gap: 0.6rem 1rem; }
  .nav { gap: 0.2rem 0.9rem; }
  .product-grid { grid-template-columns: minmax(0, 1fr); }
}
@media (prefers-color-scheme: dark) {
  .footer-logo { background: #fff; padding: 4px 10px; border-radius: 8px; box-sizing: content-box; }
}

/* Produit sans photo : silhouette sobre (aucun message négatif) */
.no-photo { width: 100%; height: 100%; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 0.5rem; padding: 1rem; text-align: center; color: var(--muted); background: linear-gradient(160deg, color-mix(in srgb, var(--accent) 7%, var(--surface)), var(--surface) 70%); }
.no-photo svg { width: 22%; min-width: 44px; max-width: 84px; height: auto; opacity: 0.55; }
.no-photo-name { font-size: 0.85rem; font-weight: 600; color: var(--muted); line-height: 1.25; max-width: 90%; }
.card .thumb .no-photo-name { display: none; }

/* Pas encore de lien marchand : mention neutre */
.btn-amazon { align-self: flex-start; }

/* ---------- Page Contact et messages (admin) ---------- */
.contact-page { max-width: 760px; }
.contact-privacy { font-size: 0.85rem; color: var(--muted); margin: 0; }
/* Champ piège anti-spam : placé hors de l'écran (pas display:none, que certains robots repèrent). */
.hp-field { position: absolute; left: -10000px; width: 1px; height: 1px; overflow: hidden; }
input[aria-invalid="true"], textarea[aria-invalid="true"] { border-color: var(--danger); }
.admin-bar .badge { display: inline-block; min-width: 1.3rem; padding: 0 0.35rem; margin-left: 0.2rem; border-radius: 999px; background: #b3261e; color: #fff; font-size: 0.75rem; font-weight: 700; text-align: center; line-height: 1.3rem; text-decoration: none; }
.messages-table tr.unread td { font-weight: 600; }
.message-meta { display: grid; grid-template-columns: max-content 1fr; gap: 0.3rem 1rem; margin: 0; }
.message-meta dt { color: var(--muted); font-size: 0.9rem; }
.message-meta dd { margin: 0; overflow-wrap: anywhere; }
.message-body { white-space: pre-wrap; overflow-wrap: anywhere; border-top: 1px solid var(--line); padding-top: 1rem; line-height: 1.6; }

/* Guides d'achat */
.guide-page { max-width: 820px; }
.guide-list { display: grid; gap: 1rem; }
.guide-card h2 { font-size: 1.25rem; margin: 0 0 .4rem; }
.guide-card h2 a { color: inherit; text-decoration: none; }
.guide-card h2 a:hover { text-decoration: underline; }
.guide-body { line-height: 1.65; }
.guide-body h2 { font-size: 1.35rem; margin-top: 1.2rem; }
.guide-body ul { padding-left: 1.2rem; }
.guide-body li + li { margin-top: .35rem; }
.guide-body .lead { font-size: 1.08rem; }
.guide-body .product-grid { margin: .4rem 0 .8rem; }
