:root {
  --bg: #0F1117; --bar: #12141B; --card: #181B24; --card2: #20242F; --line: #2A2F3C;
  --text: #ECEEF3; --soft: #C9CEDA; --muted: #A3A9B8;
  --pink: #FF5FA2; --pink-soft: #FF8CBF; --teal: #34D0BA; --teal-soft: #9FF0E3; --teal-bg: #143A35;
  --amber: #FFC46B; --amber-bg: #3A2A12; --violet: #CBBDFF; --violet-bg: #2A2347; --blue: #7FB2FF;
  --radius: 16px;
}
* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0; background: var(--bg); color: var(--text);
  font-family: Inter, system-ui, -apple-system, "Segoe UI", sans-serif; font-size: 15px; line-height: 1.5;
}
h1, h2, h3, .brand-name { font-family: "Space Grotesk", Inter, sans-serif; }
h2 { margin: 0; font-size: 20px; font-weight: 700; }
a { color: #7FE3D4; } a:hover { color: #B5F0E7; }
code { background: var(--card2); padding: 1px 6px; border-radius: 6px; }
.wrap { max-width: 1360px; margin: 0 auto; padding: 0 32px; }
.muted { color: var(--muted); margin: 0; }
.small { font-size: 13px; }
.visually-hidden { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.skip { position: absolute; left: -999px; top: 8px; background: var(--pink); color: var(--bg); padding: 8px 12px; border-radius: 8px; z-index: 10; }
.skip:focus { left: 8px; }
:focus-visible { outline: 2px solid var(--pink-soft); outline-offset: 2px; }

/* Barre du haut */
.topbar { border-bottom: 1px solid var(--line); background: var(--bar); }
.topbar-in { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 16px; padding-top: 16px; padding-bottom: 16px; }
.brand { display: flex; align-items: center; gap: 12px; color: var(--text); text-decoration: none; }
.brand:hover { color: var(--text); }
.logo { width: 40px; height: 40px; border-radius: 10px; background: var(--pink); display: flex; align-items: center; justify-content: center; flex: 0 0 40px; }
.brand-name { display: block; font-weight: 700; font-size: 20px; letter-spacing: -0.01em; }
.brand-sub { display: block; font-size: 13px; color: var(--muted); }
.pills { display: flex; flex-wrap: wrap; gap: 8px; }
.pill { display: inline-flex; align-items: center; gap: 8px; padding: 6px 12px; border-radius: 999px; background: var(--card2); color: var(--soft); font-size: 13px; font-weight: 500; }
.pill-ok { background: var(--teal-bg); color: #7FE3D4; font-weight: 600; }
.pill-warn { background: var(--amber-bg); color: var(--amber); font-weight: 600; }
.dot { width: 8px; height: 8px; border-radius: 999px; background: currentColor; }

main { display: flex; flex-direction: column; gap: 32px; padding-top: 32px; padding-bottom: 48px; outline: none; }
#view-dashboard, #view-product { display: flex; flex-direction: column; gap: 32px; }
[hidden] { display: none !important; }
.card { border-radius: var(--radius); background: var(--card); border: 1px solid var(--line); padding: 20px; display: flex; flex-direction: column; gap: 14px; }

/* Compte à rebours */
.hero { padding: 32px; flex-direction: row; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 32px; border-radius: 20px; }
.hero-text { display: flex; flex-direction: column; gap: 8px; flex: 1 1 360px; }
.eyebrow { font-size: 13px; font-weight: 600; letter-spacing: 0.08em; text-transform: uppercase; color: var(--pink-soft); }
.hero h1 { margin: 0; font-size: clamp(30px, 5vw, 44px); line-height: 1.1; font-weight: 700; letter-spacing: -0.02em; }
.countdown { display: flex; gap: 12px; flex-wrap: wrap; }
.unit { min-width: 92px; padding: 16px 12px; border-radius: 14px; background: var(--card2); text-align: center; }
.unit b { display: block; font-family: "Space Grotesk", sans-serif; font-size: 40px; line-height: 1; }
.unit span { display: block; margin-top: 6px; font-size: 13px; color: var(--muted); }
.hero-rush { flex: 1 1 100%; display: flex; flex-wrap: wrap; gap: 12px; align-items: center; padding-top: 20px; border-top: 1px solid var(--line); color: var(--soft); font-size: 14px; }
.rush-badge { display: inline-flex; align-items: center; gap: 8px; padding: 6px 12px; border-radius: 999px; background: var(--amber-bg); color: var(--amber); font-size: 13px; font-weight: 600; }
.rush-badge.on { background: var(--amber); color: var(--bg); }

/* Chiffres clés */
.kpis { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 16px; }
.kpi { border-radius: var(--radius); background: var(--card); border: 1px solid var(--line); padding: 20px; display: flex; flex-direction: column; gap: 4px; }
.kpi-label, .kpi-hint { font-size: 14px; color: var(--muted); }
.kpi-hint { font-size: 13px; }
.kpi-value { font-family: "Space Grotesk", sans-serif; font-size: 36px; font-weight: 700; line-height: 1.1; }
.c-teal { color: #7FE3D4; } .c-amber { color: var(--amber); } .c-violet { color: var(--violet); }

/* Colonnes */
.columns { display: flex; flex-wrap: wrap; gap: 32px; align-items: flex-start; }
.col-main { flex: 999 1 640px; min-width: 0; display: flex; flex-direction: column; gap: 16px; }
.col-side { flex: 1 1 340px; min-width: 0; display: flex; flex-direction: column; gap: 24px; }
.section-head { display: flex; flex-wrap: wrap; gap: 12px; align-items: center; justify-content: space-between; }
.section-head h2 { font-size: 24px; }
.card .section-head h2 { font-size: 20px; }

/* Filtres et boutons */
.filters { display: flex; flex-wrap: wrap; gap: 8px; }
.filter { min-height: 44px; padding: 8px 14px; border-radius: 10px; font: inherit; font-size: 14px; font-weight: 600; cursor: pointer; border: 1px solid var(--line); background: var(--card); color: var(--text); }
.filter[aria-pressed="true"] { background: var(--pink); border-color: var(--pink); color: var(--bg); }
.filter .n { opacity: 0.8; margin-left: 4px; }
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 44px; padding: 10px 14px; border-radius: 10px; font-size: 14px; font-weight: 600; text-decoration: none; }
.btn-primary { background: var(--pink); color: var(--bg); font-weight: 700; }
.btn-primary:hover { background: var(--pink-soft); color: var(--bg); }
.btn-ghost { background: var(--card2); color: var(--text); }
.btn-ghost:hover { background: var(--line); color: var(--text); }
.back { align-self: flex-start; border: 1px solid var(--line); background: var(--card); }
.search input, .select-small select { width: 100%; min-height: 44px; padding: 8px 14px; border-radius: 10px; border: 1px solid var(--line); background: var(--card); color: var(--text); font: inherit; }
.select-small select { width: auto; min-height: 36px; padding: 6px 10px; background: var(--card2); }

/* Produits */
.grid-products { display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 16px; }
.product { border-radius: var(--radius); background: var(--card); border: 1px solid var(--line); padding: 16px; display: flex; flex-direction: column; gap: 12px; }
.product-top { display: flex; gap: 14px; align-items: flex-start; }
.thumb { flex: 0 0 72px; width: 72px; height: 72px; border-radius: 12px; background: var(--card2); object-fit: cover; }
.product-meta { min-width: 0; display: flex; flex-direction: column; gap: 6px; }
.product h3 { margin: 0; font-size: 15px; font-weight: 600; line-height: 1.35; font-family: Inter, sans-serif; }
.price { font-size: 14px; color: var(--soft); }
.badge { align-self: flex-start; padding: 3px 8px; border-radius: 6px; font-size: 12px; font-weight: 600; }
.b-in { background: var(--teal-bg); color: var(--teal-soft); }
.b-low { background: var(--amber-bg); color: var(--amber); }
.b-out { background: var(--line); color: var(--soft); }
.b-preorder { background: var(--violet-bg); color: var(--violet); }
.b-promo { background: var(--pink); color: var(--bg); }
.chips { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: 6px; }
.chip { padding: 5px 10px; border-radius: 8px; font-size: 13px; }
.chip b { font-weight: 700; margin-right: 4px; }
.chip.in { background: var(--teal-bg); color: var(--teal-soft); }
.chip.low { background: var(--amber-bg); color: var(--amber); }
.chip.out { background: var(--card2); color: var(--muted); text-decoration: line-through; }
.chip.preorder { background: var(--violet-bg); color: var(--violet); }
.product-actions { display: flex; gap: 8px; flex-wrap: wrap; }
.product-actions .btn { flex: 1 1 auto; }
.empty { padding: 24px; border-radius: var(--radius); border: 1px dashed var(--line); color: var(--muted); text-align: center; }

/* Alertes, vérifications */
.alerts { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 12px; }
.alert { display: flex; gap: 12px; align-items: flex-start; }
.alert .bullet { flex: 0 0 10px; width: 10px; height: 10px; margin-top: 6px; border-radius: 999px; }
.alert-kind { font-size: 12px; font-weight: 600; text-transform: uppercase; letter-spacing: 0.06em; }
.alert-title { font-size: 14px; color: var(--text); overflow-wrap: anywhere; }
.alert-title a { color: var(--text); text-decoration: none; }
.alert-title a:hover { text-decoration: underline; color: var(--text); }
.checks, .rows { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; }
.checks li, .rows li { display: flex; justify-content: space-between; gap: 12px; padding: 10px 0; border-top: 1px solid var(--line); font-size: 14px; }
.check-name { display: flex; gap: 10px; align-items: center; font-weight: 600; }
.check-name .dot { color: var(--teal); }
.check-name.bad .dot { color: var(--amber); }
.check-detail { color: var(--muted); font-size: 13px; text-align: right; }

/* Visuels */
.visuals { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; }
.visuals a { display: block; border-radius: 10px; overflow: hidden; background: var(--card2); aspect-ratio: 16 / 10; }
.visuals img { width: 100%; height: 100%; object-fit: cover; display: block; transition: transform .2s; }
.visuals a:hover img { transform: scale(1.04); }

/* Fiche produit */
.product-head { display: flex; flex-wrap: wrap; gap: 24px; align-items: flex-start; }
.p-image { flex: 0 0 180px; width: 180px; height: 180px; border-radius: 20px; background: var(--card2); overflow: hidden; }
.p-image img { width: 100%; height: 100%; object-fit: cover; }
.p-info { flex: 1 1 420px; min-width: 0; display: flex; flex-direction: column; gap: 10px; }
.p-info h1 { margin: 0; font-size: clamp(24px, 3.5vw, 34px); line-height: 1.15; }
.p-info .chip { padding: 8px 12px; font-size: 14px; border-radius: 10px; }
.p-actions { display: flex; gap: 8px; flex-wrap: wrap; margin-top: 4px; }
.chart svg { width: 100%; height: auto; display: block; }
.legend { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: 16px; font-size: 13px; color: var(--soft); }
.legend li { display: flex; gap: 8px; align-items: center; }
.legend .swatch { width: 14px; height: 4px; border-radius: 2px; }

.footer { border-top: 1px solid var(--line); color: var(--muted); font-size: 13px; }
.footer-in { display: flex; flex-wrap: wrap; gap: 12px; justify-content: space-between; padding-top: 20px; padding-bottom: 20px; }

@media (max-width: 640px) {
  .wrap { padding: 0 16px; }
  .hero { padding: 20px; }
  .unit { min-width: 76px; }
  .unit b { font-size: 32px; }
  .visuals { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .visuals img { transition: none; }
}

/* Navigation */
.mainnav { display: flex; gap: 4px; flex-wrap: wrap; }
.mainnav a { padding: 10px 14px; border-radius: 8px; color: var(--soft); text-decoration: none; font-weight: 500; font-size: 14px; }
.mainnav a:hover { color: var(--text); background: var(--card2); }
.mainnav a[aria-current="page"] { background: var(--card2); color: var(--text); font-weight: 600; }
.page-title { margin: 0; font-size: clamp(26px, 4vw, 36px); }

/* Galerie */
.gallery { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 16px; }
.shot { margin: 0; border-radius: 14px; overflow: hidden; background: var(--card); border: 1px solid var(--line); display: flex; flex-direction: column; }
.shot a.img { display: block; aspect-ratio: 16 / 9; background: var(--card2); overflow: hidden; }
.shot img { width: 100%; height: 100%; object-fit: cover; display: block; transition: transform .2s; }
.shot a.img:hover img { transform: scale(1.03); }
.shot figcaption { padding: 10px 12px; display: flex; flex-direction: column; gap: 4px; font-size: 13px; }
.shot .shot-name { color: var(--text); font-weight: 600; font-size: 14px; overflow-wrap: anywhere; }
.shot .new { align-self: flex-start; padding: 2px 8px; border-radius: 6px; font-size: 12px; font-weight: 600; background: var(--pink); color: var(--bg); }
.gallery-more { display: flex; justify-content: center; }
@media (prefers-reduced-motion: reduce) { .shot img { transition: none; } }
.shot .formats { color: var(--muted); }
