/* =====================================================================
   yildirim.icu — COSMOS
   Thème sombre naturel · éditorial · art CSS des planètes
   ===================================================================== */

/* ---- Police d'affichage (Orbitron, auto-hébergée) ----------------- */
@font-face { font-family:'Orbitron'; src:url('../fonts/orbitron-700.woff2') format('woff2'); font-weight:700; font-display:swap; }
@font-face { font-family:'Orbitron'; src:url('../fonts/orbitron-900.woff2') format('woff2'); font-weight:900; font-display:swap; }

/* ---- Variables ---------------------------------------------------- */
:root {
  --bg:        #0a0d13;
  --bg-2:      #080a10;
  --surface:   #131822;
  --surface-2: #1a2030;
  --surface-3: #212838;

  --line:      rgba(233,229,221,.09);
  --line-2:    rgba(233,229,221,.17);

  --text:      #e9e5dc;        /* blanc cassé chaud */
  --text-dim:  #9aa0ab;        /* gris neutre */
  --muted:     #6e7682;

  --accent:     #d8b673;       /* sable / lumière d'étoile */
  --accent-2:   #e7cd96;
  --accent-ink: #1c1608;       /* texte sur fond accent */
  --accent-soft: rgba(216,182,115,.12);

  --radius:    14px;
  --radius-sm: 10px;
  --radius-lg: 22px;

  --shadow:    0 20px 45px -24px rgba(0,0,0,.85);

  --container: 1180px;
  --gap:       clamp(1rem, 2.4vw, 1.8rem);

  --font-display: 'Orbitron', 'Segoe UI', system-ui, sans-serif;
  --font-body: system-ui, -apple-system, 'Segoe UI', Roboto, Helvetica, Arial, sans-serif;
}

/* ---- Reset -------------------------------------------------------- */
*, *::before, *::after { box-sizing: border-box; }
* { margin: 0; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
body {
  font-family: var(--font-body);
  color: var(--text);
  background: var(--bg);
  line-height: 1.7;
  min-height: 100vh;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
}
img, svg, canvas { display: block; max-width: 100%; }
img { height: auto; }
a { color: inherit; text-decoration: none; }
button { font: inherit; color: inherit; cursor: pointer; }
h1, h2, h3, h4 { font-family: var(--font-display); font-weight: 700; line-height: 1.2; letter-spacing: .4px; }
ul { list-style: none; padding: 0; }
::selection { background: var(--accent); color: var(--accent-ink); }

/* ---- Fond : ciel nocturne sobre (étoiles via canvas) -------------- */
.space-bg {
  position: fixed; inset: 0; z-index: -2; overflow: hidden;
  background:
    radial-gradient(120% 85% at 50% -15%, #121826 0%, transparent 55%),
    radial-gradient(90% 70% at 85% 115%, #0c1119 0%, transparent 50%),
    linear-gradient(180deg, var(--bg) 0%, var(--bg-2) 100%);
}
/* Photos spatiales en fond (assombries, fondu lent entre elles) */
.nebula { position: absolute; inset: 0; background-size: cover; background-position: center;
  opacity: 0; filter: brightness(.82) saturate(.95); will-change: opacity; }
.nebula-1 { background-image: url('../img/bg/bg-milkyway.webp');  animation: bgfade 50s ease-in-out infinite; }
.nebula-2 { background-image: url('../img/bg/bg-deepfield.webp'); animation: bgfade 50s ease-in-out infinite -25s; }
.nebula-3 { display: none; }
@keyframes bgfade { 0%,38% { opacity: .36; } 50%,88% { opacity: 0; } 100% { opacity: .36; } }
#starfield { position: absolute; inset: 0; width: 100%; height: 100%; }
@media (prefers-reduced-motion: reduce) {
  .nebula-1 { animation: none; opacity: .3; }
  .nebula-2 { display: none; }
}

/* ---- Layout ------------------------------------------------------- */
.container { width: 100%; max-width: var(--container); margin-inline: auto; padding-inline: clamp(1.1rem, 4vw, 2rem); }
.narrow { max-width: 760px; }
.section { padding-block: clamp(3rem, 6.5vw, 5.5rem); }
.text-center { text-align: center; }

.eyebrow {
  font-family: var(--font-display); font-weight: 700;
  text-transform: uppercase; letter-spacing: .2em; font-size: .7rem;
  color: var(--accent);
}
.display { font-family: var(--font-display); font-weight: 900;
  font-size: clamp(2rem, 5.2vw, 3.4rem); letter-spacing: .5px; line-height: 1.14; }
.lead { font-size: clamp(1.05rem, 1.5vw, 1.24rem); color: var(--text-dim); max-width: 62ch; line-height: 1.7; }
.muted { color: var(--text-dim); }
.small { font-size: .85rem; }
.grad-text { color: var(--accent); }

.section-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 1rem; margin-bottom: clamp(1.5rem, 3vw, 2.4rem); flex-wrap: wrap; }
.section-head h2 { font-size: clamp(1.7rem, 3.2vw, 2.3rem); }
.link-more { color: var(--accent); font-weight: 600; white-space: nowrap; transition: .2s; }
.link-more:hover { color: var(--accent-2); }

/* ---- Boutons ------------------------------------------------------ */
.btn {
  display: inline-flex; align-items: center; gap: .5rem;
  padding: .82rem 1.5rem; border-radius: 10px; font-weight: 600; font-size: .98rem;
  border: 1px solid transparent; transition: transform .15s, background .2s, border-color .2s; white-space: nowrap;
}
.btn:active { transform: translateY(1px); }
.btn-primary { background: var(--accent); color: var(--accent-ink); }
.btn-primary:hover { background: var(--accent-2); transform: translateY(-2px); }
.btn-ghost { background: transparent; border-color: var(--line-2); color: var(--text); }
.btn-ghost:hover { border-color: var(--accent); background: var(--surface); }

/* ---- Puces & badges ---------------------------------------------- */
.chip {
  display: inline-block; font-size: .72rem; font-weight: 600; letter-spacing: .03em;
  padding: .28rem .68rem; border-radius: 7px;
  background: var(--surface-2); border: 1px solid var(--line); color: var(--text-dim);
}
.badge {
  position: absolute; top: .8rem; left: .8rem; z-index: 2;
  background: rgba(10,13,19,.72); color: var(--accent); font-weight: 600; font-size: .72rem;
  padding: .3rem .7rem; border-radius: 7px; border: 1px solid var(--line-2);
}

/* ---- En-tête / nav ------------------------------------------------ */
.skip-link { position: absolute; left: -999px; top: 0; background: var(--accent); color: var(--accent-ink); padding: .6rem 1rem; z-index: 200; }
.skip-link:focus { left: 1rem; top: 1rem; border-radius: 8px; }

.site-header {
  position: sticky; top: 0; z-index: 100;
  backdrop-filter: blur(10px);
  background: rgba(10,13,19,.55);
  border-bottom: 1px solid transparent;
  transition: background .25s, border-color .25s;
}
.site-header.scrolled { background: rgba(8,10,16,.9); border-bottom-color: var(--line); }
.nav-wrap { display: flex; align-items: center; justify-content: space-between; height: 68px; }
.brand { display: inline-flex; align-items: center; gap: .5rem; font-family: var(--font-display); font-weight: 600; font-size: clamp(1rem, 3.2vw, 1.2rem); letter-spacing: .3px; }
.brand-mark { color: var(--accent); }
.brand-text i { color: var(--muted); font-style: normal; font-weight: 600; font-size: .72em; }

.primary-nav { display: flex; gap: .3rem; align-items: center; }
.primary-nav a {
  padding: .5rem .9rem; border-radius: 8px; color: var(--text-dim);
  font-weight: 600; font-size: .96rem; transition: .2s; position: relative;
}
.primary-nav a:hover { color: var(--text); }
.primary-nav a.active { color: var(--text); }
.primary-nav a.active::after {
  content: ""; position: absolute; left: .9rem; right: .9rem; bottom: .2rem; height: 2px;
  background: var(--accent); border-radius: 2px;
}

/* Menu déroulant « Système solaire » */
.nav-group { position: relative; display: flex; align-items: center; }
.nav-group-top::after { content: "▾"; margin-left: .35em; font-size: .7em; opacity: .65; }
.nav-group::before { content: ""; position: absolute; top: 100%; left: 0; right: 0; height: 12px; } /* pont de survol */
.nav-menu {
  position: absolute; top: calc(100% + 8px); left: 0; min-width: 230px; z-index: 60;
  display: flex; flex-direction: column; gap: .1rem; padding: .4rem;
  background: rgba(8,10,16,.98); border: 1px solid var(--line-2); border-radius: var(--radius-sm);
  box-shadow: var(--shadow);
  opacity: 0; visibility: hidden; transform: translateY(-6px); transition: opacity .18s, transform .18s, visibility .18s;
}
.nav-group:hover .nav-menu, .nav-group:focus-within .nav-menu { opacity: 1; visibility: visible; transform: none; }
.nav-menu a { white-space: nowrap; }

.nav-toggle { display: none; flex-direction: column; gap: 5px; background: none; border: 0; padding: 8px; }
.nav-toggle span { width: 24px; height: 2px; background: var(--text); border-radius: 2px; transition: .25s; }
.nav-toggle[aria-expanded="true"] span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.nav-toggle[aria-expanded="true"] span:nth-child(2) { opacity: 0; }
.nav-toggle[aria-expanded="true"] span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

/* ---- Hero --------------------------------------------------------- */
.hero { padding-block: clamp(2.5rem, 7vw, 5.5rem) clamp(2rem, 5vw, 3.5rem); }
.hero-inner { display: grid; grid-template-columns: 1.05fr .95fr; gap: clamp(1.5rem, 4vw, 3rem); align-items: center; }
.hero-text .display { margin: .7rem 0 1.1rem; }
.hero-actions { display: flex; gap: .9rem; margin-top: 1.8rem; flex-wrap: wrap; }
.hero-visual { display: grid; place-items: center; min-height: 280px; }

/* ---- Stats -------------------------------------------------------- */
.stats { padding-block: .5rem 1.5rem; }
.stats-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: var(--gap);
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius);
  padding: clamp(1.3rem, 3vw, 2rem); }
.stat { text-align: center; }
.stat-num { display: block; font-family: var(--font-display); font-weight: 600; font-size: clamp(1.7rem, 3.6vw, 2.5rem); color: var(--text); }
.stat-unit { font-size: .5em; color: var(--text-dim); }
.stat-label { color: var(--text-dim); font-size: .85rem; }

/* ---- Cartes ------------------------------------------------------- */
.card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); }

/* ====================  ART DES PLANÈTES (SVG procédural)  ========= */
.planet { position: relative; display: grid; place-items: center; }
.planet-sm { width: 86px; }
.planet-md { width: clamp(150px, 21vw, 200px); }
.planet-lg { width: clamp(240px, 38vw, 380px); }
.planet-svg { width: 100%; height: auto; display: block; overflow: visible; }
/* Planète détourée (PNG transparent) — flotte sur le fond du site */
.planet-photo { width: 100%; height: auto; display: block;
  filter: drop-shadow(0 14px 26px rgba(0,0,0,.5)); }

@media (prefers-reduced-motion: no-preference) {
  .hero-visual .planet, .planet-hero-art .planet { animation: floaty 10s ease-in-out infinite; }
  @keyframes floaty { 0%,100% { transform: translateY(0); } 50% { transform: translateY(-12px); } }
}

/* ---- Grille des planètes (accueil) ------------------------------- */
.planet-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(244px, 1fr)); gap: var(--gap); }
.planet-card {
  display: flex; flex-direction: column; align-items: center; text-align: center;
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius);
  padding: 1.8rem 1.4rem 1.5rem; transition: transform .25s, border-color .25s, box-shadow .25s;
}
.planet-card:hover { transform: translateY(-5px); border-color: var(--line-2); box-shadow: var(--shadow); }
.planet-card-art { margin-bottom: 1.1rem; }
.planet-card-body h3 { font-size: 1.35rem; margin: .5rem 0 .25rem; font-family: var(--font-display); font-weight: 600; }
.mini-stats { display: flex; gap: .6rem; justify-content: center; margin-top: .9rem; color: var(--text-dim); font-size: .8rem; flex-wrap: wrap; }
.mini-stats span { background: var(--surface-2); padding: .25rem .6rem; border-radius: 7px; }

/* ---- Liste détaillée des planètes (page /planetes) --------------- */
.planet-grid--list { grid-template-columns: repeat(auto-fill, minmax(min(100%, 450px), 1fr)); gap: clamp(1.2rem, 2.5vw, 1.8rem); }
.planet-card--lg { flex-direction: row; align-items: center; text-align: left; gap: 1.6rem; padding: 1.6rem 1.7rem; }
.planet-card--lg .planet-card-art { margin: 0; flex: 0 0 auto; }
.planet-card--lg .planet-card-body { flex: 1; min-width: 0; }
.planet-card--lg h2 { font-size: 1.6rem; margin: .3rem 0 .2rem; }
.planet-pos { position: absolute; top: 1rem; right: 1.2rem; font-family: var(--font-display); font-weight: 600; color: var(--line-2); font-size: 1.4rem; }
.kv { display: grid; grid-template-columns: 1fr 1fr; gap: .55rem 1.1rem; margin: 1rem 0; }
.kv div { display: flex; flex-direction: column; }
.kv dt { font-size: .68rem; text-transform: uppercase; letter-spacing: .07em; color: var(--muted); }
.kv dd { font-weight: 600; font-size: .95rem; }
.planet-card--lg .planet-pos { position: static; }
.planet-card--lg { position: relative; }

/* ---- Page hero (sous-pages) -------------------------------------- */
.page-hero { padding-block: clamp(2.5rem, 6vw, 4.5rem) 1rem; text-align: center; }
.page-hero .lead { margin: 1rem auto 0; }

/* ---- Détail planète ---------------------------------------------- */
.planet-hero { padding-block: clamp(2rem, 5vw, 4rem) 1rem; }
.planet-hero-inner { display: grid; grid-template-columns: auto 1fr; gap: clamp(1.5rem, 5vw, 4rem); align-items: center; }
.planet-en { color: var(--text-dim); letter-spacing: .2em; text-transform: uppercase; font-size: .78rem; margin-top: .3rem; }
.planet-hero-text .lead { margin-top: 1rem; }
.planet-layout { display: grid; grid-template-columns: 1.65fr 1fr; gap: clamp(1.5rem, 4vw, 3rem); align-items: start; }
.planet-main h2 { font-size: 1.6rem; margin: 1.8rem 0 .8rem; }
.planet-main h2:first-child { margin-top: 0; }
.prose p { color: var(--text-dim); margin-bottom: 1rem; line-height: 1.8; }
.factbox { display: flex; gap: 1rem; background: var(--surface); border: 1px solid var(--line); border-left: 3px solid var(--accent);
  border-radius: var(--radius-sm); padding: 1.2rem 1.4rem; margin: 1.8rem 0; }
.factbox-icon { font-size: 1.5rem; }
.factbox h3 { font-size: 1rem; margin-bottom: .3rem; color: var(--accent); }
.factbox p { color: var(--text-dim); }

.data-card { padding: 1.5rem; position: sticky; top: 88px; }
.data-card h3 { font-size: 1.15rem; margin-bottom: 1rem; font-family: var(--font-display); font-weight: 600; }
.datasheet div { display: flex; justify-content: space-between; gap: 1rem; padding: .6rem 0; border-bottom: 1px solid var(--line); }
.datasheet div:last-child { border-bottom: 0; }
.datasheet dt { color: var(--text-dim); font-size: .9rem; }
.datasheet dd { text-align: right; font-weight: 600; }

.planet-nav { display: grid; grid-template-columns: 1fr auto 1fr; align-items: center; gap: 1rem; margin-top: 3rem;
  padding-top: 2rem; border-top: 1px solid var(--line); }
.planet-nav-link { display: flex; flex-direction: column; }
.planet-nav-link.next { text-align: right; }
.planet-nav-link span { font-size: .78rem; color: var(--text-dim); }
.planet-nav-link strong { font-family: var(--font-display); font-weight: 600; font-size: 1.1rem; }
.planet-nav-link:hover strong { color: var(--accent); }
.planet-nav-all { color: var(--text-dim); border: 1px solid var(--line); padding: .5rem 1rem; border-radius: 8px; }
.planet-nav-all:hover { background: var(--surface); border-color: var(--line-2); }

/* ---- Galerie (grille fiable de tuiles 4:3) ----------------------- */
.gallery-grid { display: grid; gap: 14px; }
.gallery-grid--preview { grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); }
.gallery-masonry      { grid-template-columns: repeat(auto-fill, minmax(258px, 1fr)); }
.gallery-grid--planet { grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); }
.gallery-item {
  position: relative; border-radius: var(--radius-sm); overflow: hidden; cursor: pointer;
  border: 1px solid var(--line); background: var(--surface); margin: 0;
  transition: transform .35s ease, box-shadow .35s ease, border-color .35s ease;
}
.gallery-item img { width: 100%; aspect-ratio: 4 / 3; object-fit: cover; transition: transform .6s ease, filter .35s ease; }
.gallery-item:hover { transform: translateY(-5px); box-shadow: 0 18px 38px -16px rgba(0,0,0,.7); border-color: var(--line-2); }
.gallery-item:hover img { transform: scale(1.07); filter: saturate(1.08) brightness(1.05); }
.gallery-item:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; }
/* Apparition au défilement (activée par main.js ; sans JS tout reste visible) */
.reveal-on .gallery-item { opacity: 0; transform: translateY(22px) scale(.97);
  transition: opacity .6s ease, transform .6s ease, box-shadow .35s ease, border-color .35s ease; }
.reveal-on .gallery-item.is-in { opacity: 1; transform: none; }
.gallery-item figcaption, .gallery-cap {
  position: absolute; left: 0; right: 0; bottom: 0; padding: .9rem .8rem .7rem; font-size: .86rem; font-weight: 600;
  background: linear-gradient(transparent, rgba(0,0,0,.86)); display: flex; flex-direction: column; gap: .3rem; color: #fff;
}
.gallery-tag { align-self: flex-start; font-size: .68rem; font-weight: 600; background: var(--accent-soft); color: var(--accent); padding: .12rem .5rem; border-radius: 6px; border: 1px solid var(--line-2); }
/* Mise en évidence d'une photo ciblée (#photo-ID) à l'arrivée sur la galerie */
.gallery-item.photo-highlight { animation: photo-pulse 2.6s ease both; }
@keyframes photo-pulse {
  0% { box-shadow: 0 0 0 0 rgba(216,182,115,0); }
  18%, 55% { box-shadow: 0 0 0 3px var(--accent), 0 0 26px -4px var(--accent); }
  100% { box-shadow: 0 0 0 0 rgba(216,182,115,0); }
}
.empty-note { text-align: center; color: var(--text-dim); padding: 3rem 1rem; }

/* ---- Constellations : décor ambiant transparent, éparpillé sur les bords ---- */
.sky-decor { position: fixed; inset: 0; z-index: 4; pointer-events: none; display: none; }
@media (min-width: 1100px) { .sky-decor { display: block; } }
.sky-constellation { position: absolute; width: clamp(112px, 9vw, 150px); pointer-events: none; }
.constellation-svg { width: 100%; height: auto; display: block; overflow: visible; opacity: .9; pointer-events: none; }
.c-hit { fill: transparent; pointer-events: auto; cursor: pointer; }
.c-line { stroke: var(--accent); stroke-width: .7; fill: none; opacity: .85; stroke-linecap: round; pointer-events: none;
  stroke-dasharray: 200; stroke-dashoffset: 200; transition: stroke-dashoffset .7s ease; transition-delay: calc(var(--d) * .08s); }
.c-star { fill: #ffffff; opacity: 0; pointer-events: none; transition: opacity .45s ease; transition-delay: calc(var(--i) * .05s); }
.c-main { opacity: 1; fill: var(--accent-2); filter: drop-shadow(0 0 3px var(--accent)); }
.sky-constellation:hover .c-line { stroke-dashoffset: 0; }
.sky-constellation:hover .c-star { opacity: 1; }
.sky-constellation:hover .c-main { animation: none; }
.c-name { display: block; text-align: center; margin-top: .25rem; font-family: var(--font-display); font-weight: 600;
  font-size: .8rem; letter-spacing: .04em; color: #ece9e1; opacity: .9; pointer-events: auto; cursor: pointer;
  text-shadow: 0 1px 5px rgba(0,0,0,.9), 0 0 2px rgba(0,0,0,.7); transition: color .3s, opacity .3s; }
.sky-constellation:hover .c-name { color: var(--accent); opacity: 1; }
@media (prefers-reduced-motion: no-preference) {
  .c-main { animation: cstar-tw 2.8s ease-in-out infinite; transform-box: fill-box; transform-origin: center; }
  @keyframes cstar-tw { 0%,100% { opacity: 1; transform: scale(1); } 50% { opacity: .5; transform: scale(.8); } }
}

/* ---- Page Constellations (cartes) ---- */
.page-constellations .sky-decor { display: none; }
.constellation-cards { display: grid; grid-template-columns: repeat(auto-fill, minmax(270px, 1fr)); gap: var(--gap); }
.constellation-card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden;
  transition: transform .25s, border-color .25s, box-shadow .25s; }
.constellation-card:hover { transform: translateY(-4px); border-color: var(--line-2); box-shadow: var(--shadow); }
.cc-fig { aspect-ratio: 1.25 / 1; background: radial-gradient(circle at 50% 42%, #111a2c, #080a11); display: grid; place-items: center; }
.cc-fig .constellation-svg { width: 82%; height: auto; opacity: 1; }
.cc-body { padding: 1.1rem 1.3rem 1.4rem; }
.cc-body h2 { font-size: 1.3rem; margin-bottom: .1rem; }
.cc-latin { color: var(--accent); font-style: italic; font-size: .85rem; letter-spacing: .03em; margin-bottom: .6rem; }
.cc-body .muted { font-size: .92rem; line-height: 1.6; }
.cc-star { margin-top: .8rem; font-size: .85rem; color: var(--text-dim); }
.cc-star strong { color: var(--text); }
.cc-fig .c-line { stroke-dashoffset: 0; animation: c-draw 1.3s ease both; animation-delay: calc(var(--d) * .09s); }
.cc-fig .c-star:not(.c-main) { opacity: 1; animation: c-fade .6s ease both; animation-delay: calc(var(--i) * .05s + .25s); }
.cc-fig .c-main { opacity: 1; }
@keyframes c-draw { from { stroke-dashoffset: 200; } to { stroke-dashoffset: 0; } }
@keyframes c-fade { from { opacity: 0; } to { opacity: 1; } }
a.constellation-card { display: block; color: inherit; }
.constellation-card .link-more { display: inline-block; margin-top: .8rem; }
/* Fiche d'une constellation */
.constellation-detail { display: grid; grid-template-columns: .9fr 1.1fr; gap: clamp(1.5rem, 4vw, 3rem); align-items: center; margin-bottom: 1rem; }
.cd-fig { aspect-ratio: 1.1 / 1; border-radius: var(--radius); }
.cd-fig .constellation-svg { width: 88%; }
.cd-facts { max-width: 440px; margin: 1.3rem 0; }
@media (max-width: 800px) { .constellation-detail { grid-template-columns: 1fr; } }

/* Lightbox */
.lightbox { position: fixed; inset: 0; z-index: 300; display: none; place-items: center;
  background: rgba(5,6,10,.94); backdrop-filter: blur(6px); padding: 4vw; }
.lightbox.open { display: grid; }
.lightbox-fig { max-width: min(1100px, 92vw); max-height: 88vh; text-align: center; }
.lightbox-fig img { max-height: 74vh; width: auto; margin: 0 auto; border-radius: var(--radius-sm); box-shadow: var(--shadow); }
.lightbox-fig figcaption { margin-top: 1rem; display: flex; flex-direction: column; gap: .35rem; }
.lightbox-fig strong { font-family: var(--font-display); font-weight: 600; font-size: 1.25rem; }
.lightbox-credit { color: var(--accent); font-size: .8rem; }
.lightbox-gallery { display: inline-block; margin-top: .7rem; color: var(--accent); font-weight: 600; }
.lightbox-gallery:hover { color: var(--accent-2); text-decoration: underline; }
.lightbox-gallery[hidden] { display: none; }
.lightbox-close, .lightbox-prev, .lightbox-next {
  position: absolute; background: var(--surface-2); border: 1px solid var(--line-2); color: var(--text);
  width: 46px; height: 46px; border-radius: 50%; font-size: 1.4rem; display: grid; place-items: center; transition: .2s;
}
.lightbox-close:hover, .lightbox-prev:hover, .lightbox-next:hover { background: var(--accent); color: var(--accent-ink); border-color: var(--accent); }
.lightbox-close { top: 4vw; right: 4vw; }
.lightbox-prev { left: 3vw; top: 50%; transform: translateY(-50%); }
.lightbox-next { right: 3vw; top: 50%; transform: translateY(-50%); }

/* ---- Boutique ----------------------------------------------------- */
.shop-filters { display: flex; flex-wrap: wrap; gap: .55rem; margin-bottom: 1.6rem; }
.filter-chip { padding: .5rem 1rem; border-radius: 8px; background: var(--surface); border: 1px solid var(--line); color: var(--text-dim); font-weight: 600; font-size: .9rem; transition: .2s; }
.filter-chip:hover { background: var(--surface-2); color: var(--text); }
.filter-chip.is-active { background: var(--accent); color: var(--accent-ink); border-color: transparent; }
.shop-cat-desc { margin-bottom: 1.5rem; }
.shop-note { margin-top: 2.5rem; text-align: center; }

.product-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(252px, 1fr)); gap: var(--gap); }
.product-card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden;
  transition: transform .25s, border-color .25s, box-shadow .25s; display: flex; flex-direction: column; }
.product-card:hover { transform: translateY(-5px); border-color: var(--line-2); box-shadow: var(--shadow); }
.product-card-media { position: relative; aspect-ratio: 4/3; overflow: hidden; }
.product-card-media img, .product-card-media .product-visual { width: 100%; height: 100%; object-fit: cover; }
.product-card-body { padding: 1.1rem 1.2rem 1.3rem; display: flex; flex-direction: column; gap: .35rem; flex: 1; }
.product-card-body h3 { font-size: 1.08rem; margin-top: .2rem; }
.product-card-foot { margin-top: auto; padding-top: .7rem; display: flex; align-items: center; justify-content: space-between; }
.price { font-family: var(--font-display); font-weight: 600; font-size: 1.2rem; color: var(--text); }
.price-lg { font-size: 1.9rem; }
.rating { color: var(--accent); font-weight: 600; font-size: .9rem; }

.breadcrumb { display: flex; gap: .5rem; flex-wrap: wrap; color: var(--text-dim); font-size: .9rem; margin-bottom: 1.5rem; }
.breadcrumb a:hover { color: var(--accent); }
.breadcrumb .current { color: var(--text); }
.product-detail { display: grid; grid-template-columns: 1.4fr 1fr; gap: clamp(1.5rem, 4vw, 3rem); align-items: start; }
.product-detail-media { position: relative; border-radius: var(--radius); overflow: hidden; border: 1px solid var(--line); }
.product-detail-media img, .product-detail-media .product-visual { width: 100%; aspect-ratio: 4/3; object-fit: cover; }
.product-detail-info h1 { font-size: clamp(1.7rem, 4vw, 2.4rem); margin: .6rem 0 1rem; }
.product-detail-meta { display: flex; align-items: center; gap: 1.2rem; flex-wrap: wrap; margin-bottom: 1.2rem; }
.stock { font-size: .82rem; font-weight: 600; padding: .25rem .7rem; border-radius: 999px; }
.stock.in { background: rgba(98,180,130,.14); color: #86d3a3; }
.stock.out { background: rgba(240,169,143,.16); color: #f0a98f; }
.stock.low { background: rgba(240,201,125,.18); color: #f0c97d; }
/* étiquette de stock dans une carte produit */
.stock-mini { align-self: flex-start; margin-top: .1rem; }
/* « Épuisé » à la place du bouton d'ajout */
.badge-out { font-size: .82rem; font-weight: 600; color: var(--muted); padding: .35rem .2rem; }
.product-actions { display: flex; gap: 1rem; align-items: center; margin: 1.6rem 0 .6rem; flex-wrap: wrap; }
.qty { display: flex; align-items: center; border: 1px solid var(--line-2); border-radius: 8px; overflow: hidden; }
.qty-btn { width: 42px; height: 42px; background: var(--surface); border: 0; font-size: 1.2rem; }
.qty-btn:hover { background: var(--surface-2); }
.qty input { width: 44px; text-align: center; background: transparent; border: 0; color: var(--text); }
.btn-cart:disabled { opacity: .5; cursor: not-allowed; }

/* ---- Bande CTA ---------------------------------------------------- */
.cta-band { text-align: center; }
.cta-band .container { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius-lg);
  padding: clamp(2.5rem, 6vw, 4.5rem); margin-block: clamp(2rem, 5vw, 4rem); }
.cta-band h2 { font-size: clamp(1.8rem, 4vw, 2.6rem); }
.cta-band .lead { margin: 1rem auto 1.8rem; }

/* ---- 404 ---------------------------------------------------------- */
.error-page { padding-block: clamp(3rem, 8vw, 6rem); }
.error-planet { font-size: 3.6rem; margin-bottom: 1rem; }
.error-page .btn { margin: .4rem; }

/* ---- Pied de page ------------------------------------------------- */
.site-footer { margin-top: 4rem; border-top: 1px solid var(--line); background: rgba(8,10,16,.6); }
.footer-grid { display: grid; grid-template-columns: 1.6fr repeat(3, 1fr); gap: 2rem; padding-block: clamp(2.5rem, 5vw, 3.5rem); }
.footer-brand .brand { margin-bottom: .8rem; }
.footer-brand p { max-width: 40ch; }
.footer-col h3 { font-size: .8rem; text-transform: uppercase; letter-spacing: .12em; color: var(--text); margin-bottom: 1rem; }
.footer-col a, .footer-col p { display: block; color: var(--text-dim); padding: .2rem 0; transition: .2s; }
.footer-col a:hover { color: var(--accent); }
.footer-bottom { display: flex; justify-content: space-between; gap: 1rem; flex-wrap: wrap; padding-block: 1.4rem; border-top: 1px solid var(--line); font-size: .85rem; color: var(--text-dim); }

/* ---- Responsive --------------------------------------------------- */
@media (max-width: 900px) {
  .hero-inner { grid-template-columns: 1fr; text-align: center; }
  .hero-text { order: 2; }
  .hero-visual { order: 1; }
  .hero-actions { justify-content: center; }
  .planet-hero-inner { grid-template-columns: 1fr; text-align: center; justify-items: center; }
  .planet-layout { grid-template-columns: 1fr; }
  .data-card { position: static; }
  .product-detail { grid-template-columns: 1fr; }
  .stats-grid { grid-template-columns: repeat(2, 1fr); }
  .footer-grid { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 860px) {
  .nav-toggle { display: flex; }
  .primary-nav {
    position: absolute; top: 68px; right: 0; left: 0;
    flex-direction: column; align-items: stretch; gap: .15rem; padding: 1rem;
    background: rgba(8,10,16,.98); border-bottom: 1px solid var(--line);
    transform: translateY(-12px); opacity: 0; pointer-events: none; transition: .25s;
  }
  .primary-nav.open { transform: none; opacity: 1; pointer-events: auto; }
  .primary-nav a { padding: .8rem 1rem; }
  .primary-nav a.active::after { display: none; }
  /* Le menu déroulant devient une liste indentée dans le menu mobile */
  .nav-group { display: block; position: static; }
  .nav-group::before { display: none; }
  .nav-menu { position: static; opacity: 1; visibility: visible; transform: none;
    background: transparent; border: 0; box-shadow: none; padding: 0 0 0 1rem; min-width: 0; }
  .nav-menu a { font-size: .9rem; color: var(--muted); }
  .planet-card--lg { flex-direction: column; text-align: center; }
  .planet-nav { grid-template-columns: 1fr; gap: 1.2rem; text-align: center; }
  .planet-nav-link.next { text-align: center; }
  .footer-grid { grid-template-columns: 1fr; }
}

/* ---- Mouvement réduit -------------------------------------------- */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .001ms !important; animation-iteration-count: 1 !important; transition-duration: .001ms !important; scroll-behavior: auto !important; }
}

/* =====================================================================
   Comparateur cosmique
   ===================================================================== */
.cmp-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 1.2rem 2rem; flex-wrap: wrap; margin-bottom: clamp(1.4rem, 3vw, 2.2rem); }
.cmp-head h2 { font-size: clamp(1.5rem, 3vw, 2.1rem); }
.cmp-field label { display: block; font-size: .72rem; letter-spacing: 1.4px; text-transform: uppercase; color: var(--text-dim); margin-bottom: .45rem; }
.cmp-input { display: inline-flex; align-items: center; gap: .5rem; background: var(--surface); border: 1px solid var(--line-2); border-radius: var(--radius-sm); padding: .55rem .9rem; transition: border-color .2s, box-shadow .2s; }
.cmp-input:focus-within { border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-soft); }
.cmp-input input { background: transparent; border: 0; outline: 0; color: var(--text); font: 600 1.15rem var(--font-display); width: 6.5ch; }
.cmp-input input[type="date"] { width: auto; font-size: 1rem; }
.cmp-input input::-webkit-calendar-picker-indicator { filter: invert(.8) sepia(.4); cursor: pointer; }
.cmp-unit { color: var(--text-dim); font-weight: 600; }

.cmp-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: clamp(.8rem, 1.6vw, 1.2rem); }
.cmp-card { display: flex; flex-direction: column; align-items: center; text-align: center; gap: .35rem;
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 1.2rem 1rem 1.1rem; transition: transform .2s, border-color .2s, box-shadow .2s; }
a.cmp-card:hover { transform: translateY(-4px); border-color: var(--line-2); box-shadow: var(--shadow); }
.cmp-thumb { width: 84px; height: 84px; display: grid; place-items: center; margin-bottom: .3rem; }
.cmp-thumb img { width: 100%; height: 100%; object-fit: contain; filter: drop-shadow(0 6px 14px rgba(0,0,0,.5)); }
.cmp-dot { width: 60px; height: 60px; border-radius: 50%; box-shadow: inset -8px -8px 16px rgba(0,0,0,.45); }
.cmp-name { font-family: var(--font-display); font-weight: 600; font-size: 1rem; color: var(--text); }
a.cmp-name { transition: color .2s; }
a.cmp-name:hover { color: var(--accent); }
.cmp-weight, .cmp-age { font-family: var(--font-display); font-weight: 700; font-size: clamp(1.15rem, 2.4vw, 1.5rem); color: var(--accent-2); line-height: 1.1; }
.cmp-bar { width: 100%; height: 6px; background: var(--surface-3); border-radius: 99px; overflow: hidden; margin: .15rem 0 .1rem; }
.cmp-bar-fill { display: block; height: 100%; border-radius: 99px; background: linear-gradient(90deg, var(--accent), var(--accent-2)); transition: width .35s ease; }
.cmp-sub { font-size: .78rem; color: var(--text-dim); }
.cmp-bday { font-size: .74rem; min-height: 1em; color: var(--accent); opacity: .85; }
.cmp-note, .cmp-hint { text-align: center; margin-top: 1.4rem; font-size: .9rem; }

.cmp-explain { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius-lg); padding: clamp(1.6rem, 3.5vw, 2.6rem); }
.cmp-explain-grid { display: grid; grid-template-columns: 1fr 1fr; gap: clamp(1.4rem, 3vw, 2.4rem); }
.cmp-explain h3 { color: var(--accent); font-size: 1.15rem; margin-bottom: .5rem; }
.cmp-explain p { color: var(--text-dim); }
@media (max-width: 640px) { .cmp-explain-grid { grid-template-columns: 1fr; } }

/* =====================================================================
   Système solaire interactif
   ===================================================================== */
.nowrap { white-space: nowrap; }
.solar { position: relative; width: min(92vw, 640px); aspect-ratio: 1; margin-inline: auto; overflow: visible; }

@keyframes so-spin { from { transform: translate(-50%, -50%) rotate(0); } to { transform: translate(-50%, -50%) rotate(360deg); } }

/* Anneaux d'orbite (décoratifs) */
.so-orbit { position: absolute; top: 50%; left: 50%; transform: translate(-50%, -50%);
  border: 1px solid var(--line-2); border-radius: 50%; pointer-events: none; }

/* Bras tournant qui porte la planète */
.so-rev { position: absolute; top: 50%; left: 50%; transform: translate(-50%, -50%) rotate(var(--a, 0deg));
  border-radius: 50%; pointer-events: none;
  animation: so-spin var(--dur, 30s) linear infinite; animation-delay: var(--delay, 0s); }

/* La planète : ancrée en haut de l'anneau, contre-rotation pour rester droite */
.so-body { position: absolute; top: 0; left: 50%; transform: translate(-50%, -50%);
  display: grid; place-items: center; pointer-events: auto; z-index: 2;
  animation: so-spin var(--dur, 30s) linear infinite reverse; animation-delay: var(--delay, 0s); }
.so-body img { width: 100%; height: 100%; object-fit: contain; filter: drop-shadow(0 4px 10px rgba(0,0,0,.55)); transition: transform .2s; }
.so-body:hover img, .so-body:focus-visible img { transform: scale(1.18); }
.so-body:focus-visible { outline: none; }

/* Étiquette au survol / focus */
.so-label { position: absolute; top: calc(100% + 4px); left: 50%; transform: translateX(-50%);
  font: 600 .72rem/1 var(--font-display); letter-spacing: .5px; white-space: nowrap; color: var(--text);
  background: rgba(10,13,19,.82); border: 1px solid var(--line-2); padding: .25em .5em; border-radius: 6px;
  opacity: 0; transition: opacity .2s; pointer-events: none; }
.so-body:hover .so-label, .so-body:focus-visible .so-label, .so-sun:hover .so-label { opacity: 1; }

/* Soleil au centre */
.so-sun { position: absolute; top: 50%; left: 50%; transform: translate(-50%, -50%);
  width: clamp(56px, 12vw, 78px); aspect-ratio: 1; display: grid; place-items: center; z-index: 3;
  border-radius: 50%; animation: so-pulse 5s ease-in-out infinite; }
.so-sun img { width: 100%; height: 100%; object-fit: contain; filter: drop-shadow(0 0 16px rgba(255,176,31,.6)); }
.so-label--sun { top: auto; bottom: calc(100% + 4px); }
@keyframes so-pulse {
  0%, 100% { box-shadow: 0 0 26px 2px rgba(255,176,31,.32); }
  50%      { box-shadow: 0 0 44px 10px rgba(255,176,31,.5); }
}

/* Pause au survol / focus pour lire et cliquer */
.solar:hover .so-rev, .solar:hover .so-body,
.solar:focus-within .so-rev, .solar:focus-within .so-body { animation-play-state: paused; }

.solar-hint { margin-top: 1.7rem; max-width: 640px; margin-inline: auto; }

@media (prefers-reduced-motion: reduce) {
  .so-rev, .so-body, .so-sun { animation: none !important; }
}

/* =====================================================================
   Newsletter
   ===================================================================== */
.newsletter { padding-block: clamp(2.6rem, 5vw, 4.2rem);
  background: radial-gradient(120% 140% at 50% 0%, var(--accent-soft), transparent 58%), var(--bg-2);
  border-top: 1px solid var(--line); }
.newsletter h2 { font-size: clamp(1.5rem, 3vw, 2.1rem); margin: .35rem 0 .55rem; }
.nl-form { display: flex; gap: .6rem; justify-content: center; flex-wrap: wrap; margin-top: 1.3rem; }
.nl-form input[type="email"] { flex: 1 1 280px; max-width: 360px; background: var(--surface);
  border: 1px solid var(--line-2); border-radius: var(--radius-sm); padding: .8rem 1rem; color: var(--text); font-size: 1rem; }
.nl-form input[type="email"]:focus { outline: none; border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-soft); }
.nl-form .btn { padding-inline: 1.7rem; }
.nl-hp { position: absolute !important; left: -9999px !important; width: 1px; height: 1px; opacity: 0; }
.visually-hidden { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; }
.nl-msg { min-height: 1.4em; margin-top: .9rem; font-weight: 600; }
.nl-msg.is-ok { color: #7ddca0; }
.nl-msg.is-err { color: #f0a98f; }

/* =====================================================================
   Blog / Actualités
   ===================================================================== */
.article-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 320px), 1fr)); gap: clamp(1.2rem, 2.6vw, 2rem); }
.article-card { display: flex; flex-direction: column; background: var(--surface); border: 1px solid var(--line);
  border-radius: var(--radius); overflow: hidden; transition: transform .2s, border-color .2s, box-shadow .2s; }
.article-card:hover { transform: translateY(-5px); border-color: var(--line-2); box-shadow: var(--shadow); }
.article-cover { display: block; aspect-ratio: 16 / 10; background: var(--surface-2); overflow: hidden; }
.article-cover img { width: 100%; height: 100%; object-fit: cover; transition: transform .4s ease; }
.article-card:hover .article-cover img { transform: scale(1.05); }
.article-card-body { display: flex; flex-direction: column; gap: .5rem; padding: 1.2rem 1.3rem 1.4rem; }
.article-date { font-size: .72rem; letter-spacing: 1.2px; text-transform: uppercase; color: var(--accent); }
.article-card h2 { font-size: 1.22rem; font-weight: 600; line-height: 1.3; }
.article-card .link-more { margin-top: .3rem; }

.pagination { display: flex; align-items: center; justify-content: center; gap: 1.2rem; margin-top: clamp(2rem, 4vw, 3rem); }
.pagination-info { color: var(--text-dim); font-size: .9rem; }

/* Détail d'un article */
.article-head { padding-top: clamp(2rem, 5vw, 3.4rem); }
.article-head .eyebrow a { color: var(--accent); }
.article-head h1 { font-size: clamp(1.8rem, 4vw, 2.8rem); margin: .4rem 0 .7rem; }
.article-byline { font-size: .92rem; }
.article-hero { margin: clamp(1.4rem, 3vw, 2.2rem) auto; }
.article-hero img { width: 100%; max-height: 460px; object-fit: cover; border-radius: var(--radius-lg); border: 1px solid var(--line); }
.article-body { font-size: 1.06rem; padding-bottom: 1rem; }
.article-lead { font-size: 1.22rem; line-height: 1.6; color: var(--text); font-weight: 500; margin-bottom: 1.5rem; }
.article-body h2 { font-size: clamp(1.3rem, 2.6vw, 1.7rem); margin: 2.1rem 0 .7rem; }
.article-body p { margin-bottom: 1.1rem; color: var(--text-dim); }
.article-body a { color: var(--accent); text-decoration: underline; text-underline-offset: 2px; }
.article-body a:hover { color: var(--accent-2); }
.article-body ul.article-list { margin: 0 0 1.2rem; padding-left: 1.25rem; list-style: disc; color: var(--text-dim); }
.article-body ul.article-list li { margin-bottom: .45rem; }
.article-body strong { color: var(--text); }

.article-nav { display: grid; grid-template-columns: 1fr 1fr; gap: 1rem; margin-top: 1.5rem; }
.article-nav-link { display: flex; flex-direction: column; gap: .3rem; background: var(--surface); border: 1px solid var(--line);
  border-radius: var(--radius); padding: 1rem 1.2rem; transition: border-color .2s, transform .2s; }
.article-nav-link:hover { border-color: var(--accent); transform: translateY(-2px); }
.article-nav-link span:last-child { font-family: var(--font-display); font-weight: 600; font-size: .98rem; }
.article-nav-link.next { text-align: right; }
.article-nav-link .muted { font-size: .8rem; }
@media (max-width: 640px) { .article-nav { grid-template-columns: 1fr; } .article-nav-link.next { text-align: left; } }

/* =====================================================================
   Boutique : boutons, icône panier, page panier, toast, flash
   ===================================================================== */
.btn-sm { padding: .45rem .95rem; font-size: .88rem; }
.btn-block { display: block; width: 100%; text-align: center; margin-top: 1rem; }

/* Icône panier (en-tête) + placement nav/icône/burger */
.cart-link { position: relative; display: inline-flex; align-items: center; justify-content: center; color: var(--text-dim); padding: .3rem; transition: color .2s; }
.cart-link:hover { color: var(--accent); }
.cart-badge { position: absolute; top: -3px; right: -6px; min-width: 18px; height: 18px; padding: 0 5px; border-radius: 99px;
  background: var(--accent); color: var(--accent-ink); font: 700 .7rem/18px var(--font-body); text-align: center; }
.cart-badge.pulse { animation: cart-pop .4s ease; }
@keyframes cart-pop { 0% { transform: scale(.6); } 50% { transform: scale(1.25); } 100% { transform: scale(1); } }
.primary-nav { order: 2; }
.cart-link { order: 3; }
.nav-toggle { order: 4; }
@media (min-width: 861px) { .primary-nav { margin-left: auto; } .cart-link { margin-left: .5rem; } }
@media (max-width: 860px) { .cart-link { margin-left: auto; margin-right: .3rem; } }

/* Ajout au panier (carte produit) */
.product-card-foot .add-to-cart { margin: 0; }
.product-card-foot .add-to-cart .btn { white-space: nowrap; }
.product-card-body h3 a { color: var(--text); transition: color .2s; }
.product-card-body h3 a:hover { color: var(--accent); }

/* Toast */
.shop-toast { position: fixed; left: 50%; bottom: 24px; transform: translate(-50%, 20px); z-index: 200;
  display: flex; align-items: center; gap: .85rem; max-width: 90vw;
  background: var(--surface-2); border: 1px solid var(--line-2); border-radius: var(--radius); padding: .8rem 1.1rem;
  box-shadow: var(--shadow); opacity: 0; visibility: hidden; transition: opacity .25s, transform .25s, visibility .25s; }
.shop-toast.show { opacity: 1; visibility: visible; transform: translate(-50%, 0); }
.shop-toast.is-ok { border-left: 3px solid var(--accent); }
.shop-toast.is-err { border-left: 3px solid #f0a98f; }
.shop-toast a { color: var(--accent); font-weight: 600; white-space: nowrap; }

/* Messages flash */
.flash { padding: .8rem 1.1rem; border-radius: var(--radius-sm); margin-bottom: 1.4rem; font-weight: 600; }
.flash.is-ok { background: rgba(125,220,160,.12); color: #7ddca0; border: 1px solid rgba(125,220,160,.3); }
.flash.is-err { background: rgba(240,169,143,.12); color: #f0a98f; border: 1px solid rgba(240,169,143,.3); }

/* Page panier */
.cart-empty { text-align: center; padding: 3rem 1rem; }
.cart-layout { display: grid; grid-template-columns: 1fr 340px; gap: clamp(1.5rem, 3vw, 2.5rem); align-items: start; }
.cart-table { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: .2rem 1.2rem; }
.cart-row { display: grid; grid-template-columns: 2.4fr .8fr .9fr .9fr auto; align-items: center; gap: 1rem; padding: 1rem 0; border-bottom: 1px solid var(--line); }
.cart-row:last-of-type { border-bottom: 0; }
.cart-head { font-size: .72rem; letter-spacing: 1px; text-transform: uppercase; color: var(--text-dim); }
.cart-prod { display: flex; align-items: center; gap: .9rem; }
.cart-thumb { flex: 0 0 auto; width: 64px; height: 64px; border-radius: var(--radius-sm); overflow: hidden; background: var(--surface-2); }
.cart-thumb img, .cart-thumb .product-visual { width: 100%; height: 100%; object-fit: cover; }
.cart-name { font-weight: 600; }
.cart-name:hover { color: var(--accent); }
.cart-qty { width: 64px; background: var(--bg-2); border: 1px solid var(--line-2); border-radius: 8px; padding: .45rem .5rem; color: var(--text); text-align: center; }
.cart-line-total { font-weight: 600; }
.cart-remove { background: none; border: 0; color: var(--muted); font-size: 1.05rem; padding: .3rem; transition: color .2s; }
.cart-remove:hover { color: #f0a98f; }
.cart-actions-row { display: flex; align-items: center; justify-content: space-between; padding: 1rem 0 .5rem; gap: 1rem; flex-wrap: wrap; }

.cart-summary { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 1.4rem 1.5rem; position: sticky; top: 90px; }
.cart-summary h2 { font-size: 1.2rem; margin-bottom: 1rem; }
.cart-totals { display: flex; flex-direction: column; gap: .6rem; margin-bottom: 1rem; }
.cart-totals > div { display: flex; justify-content: space-between; align-items: baseline; }
.cart-totals dt { color: var(--text-dim); }
.cart-totals .is-discount dd { color: #7ddca0; }
.cart-grand { border-top: 1px solid var(--line); padding-top: .8rem; margin-top: .3rem; }
.cart-grand dt { color: var(--text); font-weight: 600; }
.cart-grand dd { font-family: var(--font-display); font-weight: 700; font-size: 1.4rem; color: var(--accent-2); }
.coupon-form { display: flex; gap: .5rem; margin-bottom: 1rem; }
.coupon-form input { flex: 1; min-width: 0; background: var(--bg-2); border: 1px solid var(--line-2); border-radius: 8px; padding: .55rem .7rem; color: var(--text); }
.coupon-applied { display: flex; justify-content: space-between; align-items: center; gap: .5rem; margin-bottom: 1rem; font-size: .9rem; color: var(--text-dim); }
.coupon-applied button { background: none; border: 0; padding: 0; }

@media (max-width: 820px) {
  .cart-layout { grid-template-columns: 1fr; }
  .cart-summary { position: static; }
  .cart-head { display: none; }
  .cart-row { grid-template-columns: 1fr 1fr; gap: .5rem 1rem; }
  .cart-prod { grid-column: 1 / -1; }
  .cart-row > div[data-label]::before { content: attr(data-label) " : "; color: var(--text-dim); font-size: .8rem; margin-right: .3rem; }
}

/* =====================================================================
   Commande (checkout) + confirmation
   ===================================================================== */
.checkout-login-hint { margin-bottom: 1.4rem; }
.checkout-layout { display: grid; grid-template-columns: 1fr 360px; gap: clamp(1.5rem, 3vw, 2.5rem); align-items: start; }
.checkout-main { display: flex; flex-direction: column; gap: 1.2rem; }
.checkout-block { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 1.3rem 1.4rem; }
.checkout-block legend { font-family: var(--font-display); font-weight: 600; font-size: 1.05rem; padding: 0 .5rem; color: var(--accent); }
.field-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 1rem; }
.field { display: flex; flex-direction: column; gap: .35rem; }
.field-wide { grid-column: 1 / -1; }
.field span { font-size: .82rem; color: var(--text-dim); }
.field input, .field select, .field textarea {
  background: var(--bg-2); border: 1px solid var(--line-2); border-radius: 8px; padding: .65rem .8rem; color: var(--text); font: inherit; width: 100%; }
.field input:focus, .field select:focus, .field textarea:focus { outline: none; border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-soft); }

.pay-option { display: flex; align-items: flex-start; gap: .7rem; padding: .9rem 1rem; border: 1px solid var(--line-2);
  border-radius: var(--radius-sm); margin-bottom: .7rem; cursor: pointer; transition: border-color .2s, background .2s; }
.pay-option:hover { border-color: var(--accent); }
.pay-option:has(input:checked) { border-color: var(--accent); background: var(--accent-soft); }
.pay-option input { margin-top: .25rem; accent-color: var(--accent); }

.checkout-summary { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 1.4rem 1.5rem; position: sticky; top: 90px; }
.checkout-summary h2 { font-size: 1.15rem; margin-bottom: 1rem; }
.checkout-items { display: flex; flex-direction: column; gap: .55rem; margin-bottom: 1rem; padding-bottom: 1rem; border-bottom: 1px solid var(--line); }
.checkout-items li { display: flex; justify-content: space-between; gap: 1rem; font-size: .92rem; }

/* Confirmation */
.order-confirm { text-align: center; margin-bottom: 2rem; }
.order-check { width: 64px; height: 64px; margin: 0 auto 1rem; border-radius: 50%; display: grid; place-items: center;
  background: var(--accent-soft); color: var(--accent); font-size: 1.8rem; border: 2px solid var(--accent); }
.order-box { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: clamp(1.3rem, 3vw, 2rem); }
.order-table { width: 100%; border-collapse: collapse; }
.order-table td { padding: .55rem 0; border-bottom: 1px solid var(--line); }
.order-table .num { text-align: right; white-space: nowrap; }
.order-table tfoot td { border-bottom: 0; padding-top: .7rem; }
.order-table tfoot .grand td { font-family: var(--font-display); font-weight: 700; font-size: 1.15rem; color: var(--accent-2); border-top: 1px solid var(--line); }
.order-pay { margin-top: 1.5rem; padding-top: 1.3rem; border-top: 1px solid var(--line); }
.order-pay h2 { font-size: 1.15rem; margin-bottom: .6rem; }
.bank-details { background: var(--bg-2); border: 1px solid var(--line-2); border-radius: 8px; padding: 1rem; white-space: pre-wrap; font-family: ui-monospace, monospace; }

@media (max-width: 820px) {
  .checkout-layout { grid-template-columns: 1fr; }
  .checkout-summary { position: static; }
}
@media (max-width: 520px) { .field-grid { grid-template-columns: 1fr; } }

/* =====================================================================
   Comptes clients : icône compte, connexion/inscription, tableau de bord
   ===================================================================== */
.account-link { position: relative; display: inline-flex; align-items: center; justify-content: center; color: var(--text-dim); padding: .3rem; transition: color .2s; }
.account-link:hover { color: var(--accent); }
/* Ordre définitif en-tête : marque · (nav) · compte · panier · burger */
.primary-nav { order: 2; }
.account-link { order: 3; }
.notif { order: 4; }
.cart-link { order: 5; }
.nav-toggle { order: 6; }
@media (min-width: 861px) { .primary-nav { margin-left: auto; } .account-link { margin-left: .5rem; } .notif, .cart-link { margin-left: .1rem; } }
@media (max-width: 860px) { .account-link { margin-left: auto; } .notif, .cart-link { margin-left: .1rem; margin-right: 0; } }

/* Cloche de notification (offre de bienvenue) */
.notif { position: relative; display: inline-flex; align-items: center; }
.notif-btn { position: relative; display: inline-flex; align-items: center; justify-content: center; background: none; border: 0; color: var(--text-dim); padding: .3rem; cursor: pointer; transition: color .2s; }
.notif-btn:hover { color: var(--accent); }
.notif-badge { position: absolute; top: -2px; right: -3px; min-width: 17px; height: 17px; padding: 0 4px; border-radius: 99px;
  background: #e0564a; color: #fff; font: 700 .68rem/17px var(--font-body); text-align: center; }
.notif-dropdown { position: absolute; top: calc(100% + 10px); right: -6px; width: 300px; max-width: 86vw; z-index: 70;
  background: rgba(12,16,24,.99); border: 1px solid var(--line-2); border-radius: var(--radius); box-shadow: var(--shadow); overflow: hidden; }
.notif-dropdown::before { content: ""; position: absolute; top: -6px; right: 13px; width: 12px; height: 12px; background: rgba(12,16,24,.99);
  border-left: 1px solid var(--line-2); border-top: 1px solid var(--line-2); transform: rotate(45deg); }
.notif-head { padding: .7rem 1rem; font-size: .72rem; letter-spacing: 1px; text-transform: uppercase; color: var(--text-dim); border-bottom: 1px solid var(--line); }
.notif-item { display: flex; align-items: center; gap: .8rem; width: 100%; text-align: left; background: none; border: 0; padding: .9rem 1rem; cursor: pointer; transition: background .2s; }
.notif-item:hover { background: var(--surface-2); }
.notif-thumb { width: 48px; height: 48px; border-radius: 10px; object-fit: cover; flex: 0 0 auto; }
.notif-text { display: flex; flex-direction: column; gap: .15rem; flex: 1; min-width: 0; }
.notif-title { font-weight: 600; color: var(--text); font-size: .95rem; }
.notif-sub { color: var(--text-dim); font-size: .82rem; line-height: 1.35; }
.notif-chevron { color: var(--muted); flex: 0 0 auto; }

.auth-grid { display: grid; grid-template-columns: 1fr 1fr; gap: clamp(1.2rem, 3vw, 2rem); }
.auth-card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: clamp(1.4rem, 3vw, 2rem); }
.auth-card h2 { font-size: 1.2rem; margin-bottom: 1rem; }
.auth-form { display: flex; flex-direction: column; gap: .9rem; }
.auth-form .field-grid { gap: .9rem; }
@media (max-width: 680px) { .auth-grid { grid-template-columns: 1fr; } }

.account-grid { display: grid; grid-template-columns: 1fr 1fr; gap: clamp(1.4rem, 3vw, 2rem); align-items: start; }
.account-block { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: clamp(1.3rem, 3vw, 1.8rem); }
.account-block h2 { font-size: 1.2rem; margin-bottom: 1rem; }
.account-orders { width: 100%; border-collapse: collapse; font-size: .92rem; }
.account-orders th { text-align: left; font-size: .72rem; letter-spacing: 1px; text-transform: uppercase; color: var(--text-dim); padding-bottom: .6rem; }
.account-orders td { padding: .6rem 0; border-top: 1px solid var(--line); }
.account-orders .num, .account-orders th.num { text-align: right; }
.account-orders a { color: var(--accent); }
@media (max-width: 860px) { .account-grid { grid-template-columns: 1fr; } }

.status-tag { display: inline-block; padding: .2em .65em; border-radius: 99px; font-size: .74rem; font-weight: 600; white-space: nowrap; }
.status-en_attente { background: rgba(216,182,115,.15); color: var(--accent-2); }
.status-payee { background: rgba(125,220,160,.15); color: #7ddca0; }
.status-expediee { background: rgba(130,170,240,.15); color: #9ab8f0; }
.status-annulee { background: rgba(240,169,143,.15); color: #f0a98f; }

/* Liens légaux (pied de page) */
.footer-legal { display: flex; gap: 1.2rem; flex-wrap: wrap; }
.footer-legal a { color: var(--text-dim); font-size: .85rem; transition: color .2s; }
.footer-legal a:hover { color: var(--accent); }
.legal-body { max-width: 760px; }

/* Réseaux sociaux (pied de page) */
.footer-social { margin-top: 1.2rem; }
.footer-social-label { display: block; font-size: .72rem; letter-spacing: 1.4px; text-transform: uppercase; color: var(--text-dim); margin-bottom: .55rem; }
.footer-social-icons { display: flex; gap: .55rem; flex-wrap: wrap; }
.footer-social-icons a { display: inline-flex; width: 38px; height: 38px; align-items: center; justify-content: center;
  border: 1px solid var(--line-2); border-radius: 10px; color: var(--text-dim); transition: color .2s, border-color .2s, transform .2s; }
.footer-social-icons a:hover { color: var(--accent); border-color: var(--accent); transform: translateY(-2px); }
.footer-social-icons svg { width: 20px; height: 20px; }

/* Page /reseaux : liste des réseaux sociaux */
.social-list { display: flex; flex-direction: column; gap: .9rem; max-width: 520px; margin: 0 auto; }
.social-row { display: flex; align-items: center; gap: 1.1rem; padding: 1.1rem 1.3rem; background: var(--surface);
  border: 1px solid var(--line); border-radius: var(--radius); transition: transform .2s, border-color .2s, box-shadow .2s; }
.social-row:hover { border-color: var(--accent); transform: translateY(-2px); box-shadow: var(--shadow); }
.social-row-icon { display: inline-flex; width: 46px; height: 46px; flex: 0 0 auto; align-items: center; justify-content: center;
  border-radius: 12px; background: var(--accent-soft); color: var(--accent); }
.social-row-icon svg { width: 26px; height: 26px; }
.social-row-text { display: flex; flex-direction: column; flex: 1; min-width: 0; }
.social-row-name { font-family: var(--font-display); font-weight: 600; font-size: 1.05rem; color: var(--text); }
.social-row-handle { color: var(--text-dim); font-size: .9rem; }
.social-row-arrow { width: 22px; height: 22px; flex: 0 0 auto; color: var(--text-dim); transition: color .2s, transform .2s; }
.social-row:hover .social-row-arrow { color: var(--accent); transform: translate(3px, -3px); }

/* Galerie produit (fiche) : photos empilées de haut en bas, loupe au survol */
.product-detail-gallery { display: flex; flex-direction: column; gap: .8rem; }
.pd-photo { display: block; width: 100%; padding: 0; margin: 0; border: 1px solid var(--line); background: var(--surface-2);
  border-radius: var(--radius); overflow: hidden; cursor: zoom-in; position: relative; }
.pd-photo img { width: 100%; height: auto; display: block; transition: transform .3s ease; }
.pd-photo:hover img { transform: scale(1.02); }
/* photos secondaires : grille 2 par 2 (tuiles carrées) */
.pd-grid { display: grid; grid-template-columns: 1fr 1fr; gap: .8rem; }
.pd-grid .pd-photo img { aspect-ratio: 1 / 1; object-fit: cover; }
.pd-zoom { position: absolute; bottom: .8rem; right: .8rem; width: 44px; height: 44px; display: grid; place-items: center;
  border-radius: 50%; background: rgba(10,13,19,.72); color: #fff; opacity: 0; transform: scale(.85);
  transition: opacity .2s, transform .2s; pointer-events: none; backdrop-filter: blur(2px); }
.pd-photo:hover .pd-zoom, .pd-photo:focus-visible .pd-zoom { opacity: 1; transform: scale(1); }
.pd-zoom svg { width: 21px; height: 21px; }
/* La fiche d'achat reste visible pendant le défilement des photos (bureau) */
@media (min-width: 861px) { .product-detail-info { position: sticky; top: 90px; } }

/* Lightbox produit */
.pd-lightbox { position: fixed; inset: 0; z-index: 300; display: none; align-items: center; justify-content: center;
  background: rgba(5,7,12,.93); padding: clamp(1rem, 4vw, 3rem); }
.pd-lightbox.open { display: flex; }
.pd-lb-img { max-width: 92vw; max-height: 88vh; object-fit: contain; border-radius: 8px; box-shadow: 0 20px 60px rgba(0,0,0,.6); }
.pd-lb-close, .pd-lb-nav { position: absolute; background: rgba(255,255,255,.08); border: 1px solid rgba(255,255,255,.18);
  color: #fff; cursor: pointer; border-radius: 50%; display: grid; place-items: center; transition: background .2s; }
.pd-lb-close:hover, .pd-lb-nav:hover { background: rgba(255,255,255,.2); }
.pd-lb-close { top: 1rem; right: 1.2rem; width: 44px; height: 44px; font-size: 1.3rem; }
.pd-lb-nav { top: 50%; transform: translateY(-50%); width: 52px; height: 52px; font-size: 2rem; line-height: 1; }
.pd-lb-prev { left: 1rem; } .pd-lb-next { right: 1rem; }
.pd-lightbox.single .pd-lb-nav { display: none; }
@media (max-width: 600px) { .pd-lb-nav { width: 42px; height: 42px; font-size: 1.6rem; } }

/* =====================================================================
   Pop-up promo de bienvenue (-5 € contre email)
   ===================================================================== */
.promo-popup { position: fixed; inset: 0; z-index: 250; display: flex; align-items: center; justify-content: center;
  padding: 1rem; background: rgba(5,7,12,.72); opacity: 0; transition: opacity .3s; }
.promo-popup[hidden] { display: none; }   /* l'attribut hidden masque vraiment (sinon overlay invisible bloquant) */
.promo-popup.open { opacity: 1; }
body.promo-open { overflow: hidden; }
.promo-card { position: relative; display: grid; grid-template-columns: .85fr 1fr; max-width: 640px; width: 100%;
  background: var(--surface); border: 1px solid var(--line-2); border-radius: var(--radius-lg); overflow: hidden;
  box-shadow: var(--shadow); transform: translateY(14px) scale(.98); transition: transform .3s ease; }
.promo-popup.open .promo-card { transform: none; }
.promo-visual { display: grid; place-items: center; padding: 1.5rem; color: var(--accent-ink);
  background: radial-gradient(130% 130% at 28% 18%, var(--accent-2), var(--accent) 72%); }
.promo-amount { font-family: var(--font-display); font-weight: 900; font-size: clamp(2.4rem, 7vw, 3.4rem); line-height: 1; }
.promo-body { padding: clamp(1.4rem, 3vw, 2rem); }
.promo-brand { font-family: var(--font-display); font-weight: 600; font-size: .9rem; margin-bottom: .5rem; }
.promo-brand .brand-mark { color: var(--accent); }
.promo-body h2 { font-size: clamp(1.3rem, 3vw, 1.65rem); margin-bottom: .5rem; line-height: 1.2; }
.promo-form { display: flex; flex-direction: column; gap: .6rem; margin: 1.1rem 0 .8rem; }
.promo-form input[type="email"] { background: var(--bg-2); border: 1px solid var(--line-2); border-radius: var(--radius-sm);
  padding: .75rem .9rem; color: var(--text); font-size: 1rem; }
.promo-form input[type="email"]:focus { outline: none; border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-soft); }
.promo-form .btn-block { margin-top: 0; }
.promo-consent { font-size: .72rem; color: var(--muted); line-height: 1.5; }
.promo-success { font-weight: 600; margin: .6rem 0 1rem; }
.promo-code { display: inline-block; font-family: var(--font-display); font-weight: 700; letter-spacing: 3px; font-size: 1.5rem;
  color: var(--accent-2); background: var(--accent-soft); padding: .4rem 1rem; border-radius: 8px; margin: .55rem 0; }
.promo-close { position: absolute; top: .6rem; right: .7rem; z-index: 2; width: 32px; height: 32px; border: 0; border-radius: 50%;
  background: rgba(0,0,0,.3); color: #fff; cursor: pointer; font-size: 1rem; line-height: 1; }
.promo-close:hover { background: rgba(0,0,0,.5); }
@media (max-width: 540px) {
  .promo-card { grid-template-columns: 1fr; }
  .promo-visual { padding: 1rem; }
  .promo-amount { font-size: 2.1rem; }
}
@media (prefers-reduced-motion: reduce) { .promo-popup, .promo-card { transition: none; } }

/* Fiche produit enrichie (style boutique moderne) */
.product-rating { display: flex; align-items: center; gap: .5rem; margin-bottom: .8rem; font-size: .92rem; }
.product-rating .stars { color: var(--accent); letter-spacing: 1px; font-size: 1.05rem; }
.product-rating .rating-val { font-weight: 600; }
.price-block { display: flex; align-items: baseline; gap: .8rem; flex-wrap: wrap; margin-bottom: .5rem; }
.price-old { color: var(--muted); text-decoration: line-through; font-size: 1.15rem; }
.price-save { background: rgba(125,220,160,.16); color: #7ddca0; font-weight: 600; font-size: .82rem; padding: .2em .65em; border-radius: 999px; }
.badge-promo { background: #d96a5b; color: #fff; }
.product-highlights { display: flex; flex-direction: column; gap: .55rem; margin: 1.3rem 0; }
.product-highlights li { position: relative; padding-left: 1.7rem; color: var(--text-dim); }
.product-highlights li::before { content: "✓"; position: absolute; left: 0; top: 0; color: var(--accent); font-weight: 700; }
.reassurance { display: flex; flex-direction: column; gap: .55rem; margin: 1.4rem 0 .9rem; padding: 1rem 1.2rem; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius-sm); }
.reassurance li { display: flex; align-items: center; gap: .6rem; font-size: .9rem; color: var(--text-dim); }
.benefits-row { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: clamp(1rem, 2.5vw, 1.6rem); text-align: center; }
.benefit { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 1.7rem 1.3rem; }
.benefit-ico { font-size: 2.1rem; display: block; margin-bottom: .6rem; }
.benefit h3 { font-size: 1.1rem; margin-bottom: .4rem; }
.benefit p { color: var(--text-dim); font-size: .92rem; }
.product-sections h2 { font-size: clamp(1.4rem, 3vw, 1.9rem); margin: 2.2rem 0 1rem; }
.product-sections h2:first-child { margin-top: 0; }
