/* =========================================================
   Pile Oussou — page de vente
   Couleurs tirées du produit : noir mat + jaune.
   ========================================================= */

:root {
  --ink: #141414;
  --paper: #FFF8EA;
  --tint: #FFF0CC;
  --card: #FFFFFF;
  --yellow: #FFC21A;
  --yellow-soft: #FFE08A;
  --muted: #5A5246;
  --on-dark-muted: #CFC8BC;
  --error: #B42318;
  --success: #146C3C;
  --focus: #1D4ED8;

  --font-head: "Rubik", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  --font-body: "Nunito Sans", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;

  --border: 2.5px solid var(--ink);
  --radius-sm: 12px;
  --radius: 20px;
  --shadow: 4px 4px 0 var(--ink);
  --shadow-lg: 7px 7px 0 var(--ink);

  --gutter: 20px;
  --max: 1140px;
  --section-y: clamp(56px, 9vw, 104px);
  --ease: cubic-bezier(.2, .8, .2, 1);

  color-scheme: light;
}

*, *::before, *::after { box-sizing: border-box; }

html {
  scroll-behavior: smooth;
  scroll-padding-top: 76px;
  -webkit-text-size-adjust: 100%;
}

body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font: 400 17px/1.6 var(--font-body);
  overflow-x: hidden;
}

img, svg { display: block; max-width: 100%; }
a { color: inherit; }
p { margin: 0; }

h1, h2, h3 {
  margin: 0;
  font-family: var(--font-head);
  font-weight: 800;
  line-height: 1.06;
  letter-spacing: -0.02em;
  text-wrap: balance;
}
h1 { font-size: clamp(42px, 11vw, 76px); }
h2 { font-size: clamp(30px, 6.4vw, 50px); max-width: 18ch; }
h3 { font-size: 20px; font-weight: 600; line-height: 1.2; letter-spacing: -0.01em; }

:focus-visible { outline: 3px solid var(--focus); outline-offset: 3px; }

.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;
}

.skip-link {
  position: absolute; left: 12px; top: -60px; z-index: 100;
  background: var(--ink); color: #fff; padding: 10px 16px; border-radius: 8px;
  text-decoration: none; font-weight: 700;
}
.skip-link:focus { top: 12px; }

.container { width: 100%; max-width: var(--max); margin-inline: auto; padding-inline: var(--gutter); }
.container--narrow { max-width: 820px; }

.ico { width: 22px; height: 22px; flex: none; }
.ico--sm { width: 18px; height: 18px; }

/* Surlignage jaune sous un mot */
.hl {
  background: linear-gradient(transparent 58%, var(--yellow) 58%, var(--yellow) 92%, transparent 92%);
  padding-inline: .06em;
}
.section--dark .hl { background: none; color: var(--yellow); padding: 0; }

/* ---------- Boutons ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 10px;
  min-height: 52px; padding: 12px 22px;
  border: var(--border); border-radius: 999px;
  background: var(--yellow); color: var(--ink);
  font: 600 17px/1.15 var(--font-head);
  text-decoration: none; text-align: center;
  box-shadow: var(--shadow);
  cursor: pointer; touch-action: manipulation;
  transition: transform .15s var(--ease), box-shadow .15s var(--ease), background-color .15s;
}
.btn:hover { transform: translate(-2px, -2px); box-shadow: 6px 6px 0 var(--ink); }
.btn:active { transform: translate(3px, 3px); box-shadow: 1px 1px 0 var(--ink); }
.btn--lg { min-height: 60px; padding: 16px 26px; font-size: 18px; }
.btn--sm { min-height: 44px; padding: 8px 16px; font-size: 16px; box-shadow: 3px 3px 0 var(--ink); }
.btn--sm:hover { box-shadow: 4px 4px 0 var(--ink); }
.btn--dark { background: var(--ink); color: #fff; box-shadow: 4px 4px 0 var(--yellow); }
.btn--dark:hover { box-shadow: 6px 6px 0 var(--yellow); }
.btn--dark .ico { color: #25D366; }
.btn--block { width: 100%; }

.link-more {
  display: inline-flex; align-items: center; gap: 6px;
  min-height: 44px; font-weight: 800; text-underline-offset: 4px;
}

/* ---------- En-tête ---------- */
.site-header {
  position: sticky; top: 0; z-index: 50;
  background: rgba(255, 248, 234, .94);
  -webkit-backdrop-filter: blur(8px); backdrop-filter: blur(8px);
  border-bottom: 2px solid var(--ink);
}
.site-header__inner { display: flex; align-items: center; justify-content: space-between; gap: 16px; min-height: 64px; }

.logo { display: inline-flex; align-items: center; gap: 10px; text-decoration: none; min-height: 44px; }
.logo__mark { width: 40px; height: 24px; }
.logo__text { font: 600 21px/1 var(--font-head); letter-spacing: -0.02em; }
.logo__text b { font-weight: 800; margin-left: 3px; }
.logo--light { color: #fff; }

.site-nav { display: none; gap: 28px; }
.site-nav a { font-weight: 700; text-decoration: none; padding: 8px 0; border-bottom: 2px solid transparent; }
.site-nav a:hover { border-bottom-color: var(--ink); }

/* ---------- Hero ---------- */
.hero { padding: 28px 0 44px; }
.hero__grid { display: grid; gap: 28px; align-items: center; }
.hero__text { display: grid; gap: 20px; justify-items: start; }

.pill {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 6px 14px; border: 2px solid var(--ink); border-radius: 999px;
  background: #fff; font-weight: 800; font-size: 14px;
}
.pill__dot { width: 9px; height: 9px; border-radius: 50%; background: #E5484D; animation: pulse 1.8s ease-in-out infinite; }
@keyframes pulse { 50% { opacity: .35; } }

.hero__lead { font-size: 18px; max-width: 34ch; }

.price-row { display: flex; align-items: center; gap: 16px; }
.price { display: flex; align-items: baseline; gap: 6px; font-family: var(--font-head); font-weight: 800; }
.price__num { font-size: clamp(38px, 9vw, 48px); line-height: 1; font-variant-numeric: tabular-nums; }
.price__cur { font-size: 20px; }
.price__note { font-size: 14px; line-height: 1.35; color: var(--muted); font-weight: 700; padding-left: 16px; border-left: 2px solid var(--ink); }

.hero__ctas { display: flex; flex-wrap: wrap; align-items: center; gap: 12px 22px; }

.trust { list-style: none; margin: 4px 0 0; padding: 0; display: grid; gap: 10px; }
.trust li { display: flex; align-items: center; gap: 10px; font-weight: 700; font-size: 16px; }
.trust .ico { width: 34px; height: 34px; padding: 6px; background: #fff; border: 2px solid var(--ink); border-radius: 10px; }

.hero__art { position: relative; width: 100%; max-width: 560px; margin-inline: auto; }
.hero__art > svg { width: 100%; height: auto; }

.tag {
  position: absolute; display: inline-flex; align-items: center; gap: 6px;
  padding: 6px 12px; background: #fff; border: 2px solid var(--ink); border-radius: 999px;
  box-shadow: 3px 3px 0 var(--ink);
  font: 600 clamp(13px, 3.4vw, 16px)/1.1 var(--font-head); white-space: nowrap;
}
.tag--led { left: 0; top: 9%; transform: rotate(-5deg); }
.tag--mwh { left: 0; top: 49%; transform: rotate(3deg); }
.tag--usb { right: 0; top: 58%; transform: rotate(-4deg); background: var(--ink); color: var(--yellow); box-shadow: 3px 3px 0 var(--yellow); border-color: var(--ink); }

.leds circle[fill^="url"] { animation: glow 2.4s ease-in-out infinite; transform-box: fill-box; transform-origin: center; }
.leds circle[fill^="url"]:nth-child(2) { animation-delay: .3s; }
.leds circle[fill^="url"]:nth-child(3) { animation-delay: .6s; }
.leds circle[fill^="url"]:nth-child(4) { animation-delay: .9s; }
@keyframes glow { 50% { opacity: .35; } }

/* ---------- Bandeau défilant ---------- */
.ticker { background: var(--ink); color: var(--yellow); overflow: hidden; border-block: var(--border); }
.ticker__track {
  display: flex; align-items: center; gap: 22px; width: max-content;
  padding: 14px 0; animation: ticker 32s linear infinite;
  font: 600 17px/1 var(--font-head); text-transform: uppercase; letter-spacing: .04em; white-space: nowrap;
}
.ticker__track i { width: 8px; height: 8px; background: var(--yellow); border-radius: 50%; }
@keyframes ticker { to { transform: translateX(-50%); } }

/* ---------- Sections ---------- */
.section { padding-block: var(--section-y); }
.section--dark { background: var(--ink); color: #fff; }
.section--tint { background: var(--tint); border-block: var(--border); }
.section--yellow { background: var(--yellow); border-top: var(--border); }

.eyebrow {
  display: inline-block; margin-bottom: 14px; padding: 4px 12px;
  background: var(--yellow); border: 2px solid var(--ink); border-radius: 8px;
  font: 600 13px/1.4 var(--font-head); text-transform: uppercase; letter-spacing: .08em;
}
.eyebrow--light { border-color: var(--yellow); }
.eyebrow--dark { background: var(--ink); color: var(--yellow); }

.split { display: grid; gap: 36px; align-items: center; }
.split--top { align-items: start; }

/* ---------- Cartes avantages ---------- */
.cards { display: grid; gap: 18px; margin-top: 36px; }
.card {
  display: grid; gap: 10px; align-content: start;
  padding: 22px; background: var(--card);
  border: var(--border); border-radius: var(--radius); box-shadow: var(--shadow);
}
.card p { color: var(--muted); }
.card__icon {
  display: grid; place-items: center; width: 54px; height: 54px; margin-bottom: 6px;
  background: var(--yellow); border: 2px solid var(--ink); border-radius: 14px;
}
.card__icon svg { width: 28px; height: 28px; }

/* ---------- Calculateur ---------- */
.lead-light { margin-top: 18px; color: var(--on-dark-muted); font-size: 18px; max-width: 42ch; }

.calc {
  display: grid; gap: 14px;
  padding: 24px; background: var(--paper); color: var(--ink);
  border: var(--border); border-radius: var(--radius); box-shadow: 7px 7px 0 var(--yellow);
}
.calc__title { font-size: 22px; }
.calc__label { font-weight: 800; font-size: 16px; padding: 0; }
.calc__label output {
  display: inline-block; min-width: 2.4ch; margin-left: 4px; padding: 0 8px;
  background: var(--yellow); border: 2px solid var(--ink); border-radius: 8px;
  font-family: var(--font-head); text-align: center; font-variant-numeric: tabular-nums;
}
.calc__prix { border: 0; margin: 0; padding: 0; display: grid; gap: 8px; }

.range { width: 100%; height: 44px; margin: 0; background: transparent; cursor: pointer; -webkit-appearance: none; appearance: none; }
.range::-webkit-slider-runnable-track { height: 12px; background: #fff; border: 2px solid var(--ink); border-radius: 999px; }
.range::-moz-range-track { height: 8px; background: #fff; border: 2px solid var(--ink); border-radius: 999px; }
.range::-webkit-slider-thumb {
  -webkit-appearance: none; width: 30px; height: 30px; margin-top: -11px;
  background: var(--yellow); border: 2.5px solid var(--ink); border-radius: 50%; box-shadow: 2px 2px 0 var(--ink);
}
.range::-moz-range-thumb { width: 26px; height: 26px; background: var(--yellow); border: 2.5px solid var(--ink); border-radius: 50%; }

.segmented { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; }
.segmented label { position: relative; cursor: pointer; }
.segmented input { position: absolute; opacity: 0; inset: 0; margin: 0; cursor: pointer; }
.segmented span {
  display: grid; place-items: center; min-height: 48px;
  background: #fff; border: 2px solid var(--ink); border-radius: var(--radius-sm);
  font: 600 16px/1 var(--font-head); transition: background-color .15s, box-shadow .15s;
}
.segmented input:checked + span { background: var(--ink); color: var(--yellow); }
.segmented input:focus-visible + span { outline: 3px solid var(--focus); outline-offset: 2px; }

.calc__result { padding: 16px; background: #fff; border: 2px dashed var(--ink); border-radius: var(--radius-sm); }
.calc__big { margin: 2px 0 4px; font: 800 clamp(30px, 8vw, 40px)/1.05 var(--font-head); font-variant-numeric: tabular-nums; }
.calc__big small { font-size: 16px; font-weight: 600; }
.calc__note { font-size: 13px; color: var(--muted); }

/* ---------- Étapes ---------- */
.steps { list-style: none; margin: 36px 0 0; padding: 0; display: grid; gap: 18px; counter-reset: none; }
.step {
  position: relative; display: grid; gap: 8px; padding: 22px 22px 22px 84px;
  background: #fff; border: var(--border); border-radius: var(--radius);
}
.step p { color: var(--muted); }
.step__num {
  position: absolute; left: 20px; top: 20px;
  display: grid; place-items: center; width: 46px; height: 46px;
  background: var(--yellow); border: 2.5px solid var(--ink); border-radius: 50%;
  font: 800 22px/1 var(--font-head);
}

.subhead { margin-top: 48px; margin-bottom: 16px; font-size: 22px; }
.chips { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: 10px; }
.chips li {
  padding: 8px 16px; background: #fff; border: 2px solid var(--ink); border-radius: 999px;
  font-weight: 700; font-size: 15px;
}

/* ---------- Encadré AA / AAA ---------- */
.aa-note {
  display: grid; gap: 22px; margin-top: 40px; padding: 24px;
  background: var(--yellow-soft); border: var(--border); border-radius: var(--radius); box-shadow: var(--shadow);
}
.aa-note__sizes { display: flex; align-items: flex-end; justify-content: center; gap: 28px; }
.size { margin: 0; display: grid; justify-items: center; gap: 10px; }
.size__pile { width: auto; }
.size__pile--aa { height: 150px; }
.size__pile--aaa { height: 133px; } /* même échelle que la AA */
.size figcaption { display: grid; justify-items: center; font: 800 18px/1.1 var(--font-head); }
.size figcaption .ico { width: 26px; height: 26px; padding: 4px; border-radius: 50%; color: #fff; margin-bottom: 4px; }
.size--ok figcaption .ico { background: var(--success); }
.size--no figcaption .ico { background: var(--error); }
.size figcaption small { font: 700 13px/1.3 var(--font-body); color: var(--muted); }
.size--no .size__pile { opacity: .75; }
.aa-note__text { display: grid; gap: 10px; }
.aa-note__text h3 { font-size: 24px; font-weight: 800; }

/* ---------- Caractéristiques ---------- */
.specs {
  width: 100%; margin-top: 28px; border-collapse: separate; border-spacing: 0;
  background: #fff; border: var(--border); border-radius: var(--radius); overflow: hidden;
}
.specs th, .specs td { padding: 14px 16px; text-align: left; vertical-align: top; border-bottom: 1.5px dashed #D9CDB4; }
.specs tr:last-child th, .specs tr:last-child td { border-bottom: 0; }
.specs th { width: 38%; font-weight: 800; color: var(--muted); font-size: 15px; }
.specs td { font-weight: 700; }

.box {
  display: grid; gap: 16px; padding: 26px;
  background: var(--yellow); border: var(--border); border-radius: var(--radius); box-shadow: var(--shadow-lg);
}
.box h3 { font-size: 24px; }
.checklist { list-style: none; margin: 0; padding: 0; display: grid; gap: 12px; }
.checklist li { display: flex; gap: 10px; align-items: flex-start; font-weight: 700; }
.checklist .ico { margin-top: 2px; padding: 3px; background: var(--ink); color: var(--yellow); border-radius: 50%; }
.box__price { font: 800 34px/1 var(--font-head); font-variant-numeric: tabular-nums; }

/* ---------- Photos ---------- */
.gallery { display: grid; grid-template-columns: repeat(2, 1fr); gap: 14px; margin-top: 32px; }
.gallery figure { margin: 0; background: #fff; border: var(--border); border-radius: 18px; overflow: hidden; }
.gallery img { width: 100%; height: auto; aspect-ratio: 4 / 5; object-fit: cover; background: #EDE6D8; }
.gallery figcaption { padding: 10px 12px; border-top: 2px solid var(--ink); font-weight: 800; font-size: 14px; line-height: 1.3; }

/* ---------- Commande ---------- */
.howto { margin: 24px 0 0; padding-left: 24px; display: grid; gap: 12px; font-size: 18px; }
.howto li::marker { font-family: var(--font-head); font-weight: 800; }
.order-alt { margin-top: 24px; font-weight: 700; }
.order-alt a { font: 800 22px/1.6 var(--font-head); text-underline-offset: 4px; }

.order {
  display: grid; gap: 18px; padding: 24px;
  background: #fff; border: var(--border); border-radius: var(--radius); box-shadow: var(--shadow-lg);
}
.field { display: grid; gap: 8px; border: 0; margin: 0; padding: 0; min-width: 0; }
.field label, .field__label { font-weight: 800; font-size: 16px; padding: 0; }
.req { color: var(--error); }
.opt { font-weight: 400; color: var(--muted); }

.order input[type="text"], .order textarea, .stepper input {
  width: 100%; min-height: 52px; padding: 12px 14px;
  font: 400 17px/1.4 var(--font-body); color: var(--ink);
  background: var(--paper); border: 2px solid var(--ink); border-radius: var(--radius-sm);
  transition: box-shadow .15s, background-color .15s;
}
.order textarea { resize: vertical; min-height: 76px; }
.order input::placeholder, .order textarea::placeholder { color: #8A8174; }
.order input:focus, .order textarea:focus { outline: none; background: #fff; box-shadow: 0 0 0 4px var(--yellow); }
.order input[aria-invalid="true"] { border-color: var(--error); box-shadow: 0 0 0 3px rgba(180, 35, 24, .18); }
.field__help { font-size: 14px; font-weight: 700; color: var(--muted); }
.field__err { display: flex; align-items: center; gap: 6px; color: var(--error); font-size: 15px; font-weight: 700; }
.field__err[hidden] { display: none; }

.stepper { display: grid; grid-template-columns: 52px 88px 52px; gap: 8px; }
.stepper input { text-align: center; font: 800 20px/1 var(--font-head); padding: 0; -moz-appearance: textfield; appearance: textfield; }
.stepper input::-webkit-outer-spin-button, .stepper input::-webkit-inner-spin-button { -webkit-appearance: none; margin: 0; }
.stepper__btn {
  display: grid; place-items: center; height: 52px;
  background: var(--yellow); border: 2px solid var(--ink); border-radius: var(--radius-sm);
  font: 800 24px/1 var(--font-head); color: var(--ink); cursor: pointer; touch-action: manipulation;
  box-shadow: 2px 2px 0 var(--ink); transition: transform .12s, box-shadow .12s;
}
.stepper__btn:active { transform: translate(2px, 2px); box-shadow: 0 0 0 var(--ink); }

.choices { display: grid; gap: 8px; }
.choice {
  display: flex; align-items: center; gap: 12px; min-height: 52px; padding: 10px 14px;
  background: var(--paper); border: 2px solid var(--ink); border-radius: var(--radius-sm);
  cursor: pointer; font-weight: 700 !important;
}
.choice span { display: inline-flex; align-items: center; gap: 10px; }
.choice input { width: 20px; height: 20px; margin: 0; accent-color: var(--ink); flex: none; }
.choice:has(input:checked) { background: var(--yellow-soft); box-shadow: 3px 3px 0 var(--ink); }

.total {
  display: flex; align-items: baseline; justify-content: space-between; gap: 12px;
  padding-top: 16px; border-top: 2px dashed var(--ink);
  font: 600 18px/1 var(--font-head);
}
.total strong { font-size: 30px; font-weight: 800; font-variant-numeric: tabular-nums; }

.order__help { font-size: 14px; color: var(--muted); text-align: center; margin-top: -6px; }
.order__ok {
  display: flex; gap: 10px; align-items: flex-start; padding: 12px 14px;
  background: #E7F6EC; color: var(--success); border: 2px solid var(--success); border-radius: var(--radius-sm);
  font-weight: 700;
}
.order__ok[hidden] { display: none; }

/* ---------- FAQ ---------- */
.faq { margin-top: 28px; border-top: var(--border); }
.faq details { border-bottom: var(--border); }
.faq summary {
  display: flex; align-items: center; justify-content: space-between; gap: 16px;
  min-height: 64px; padding: 16px 0; cursor: pointer; list-style: none;
  font: 600 19px/1.3 var(--font-head);
}
.faq summary::-webkit-details-marker { display: none; }
.faq summary .ico { transition: transform .2s var(--ease); }
.faq details[open] summary .ico { transform: rotate(180deg); }
.faq details p { padding: 0 0 20px; color: var(--muted); max-width: 62ch; }

/* ---------- Pied de page ---------- */
.site-footer { background: var(--ink); color: #fff; padding: 48px 0 24px; }
.site-footer__inner { display: grid; gap: 24px; }
.site-footer__inner p { margin-top: 12px; color: var(--on-dark-muted); }
.site-footer__contact .btn { box-shadow: 3px 3px 0 var(--yellow); border-color: var(--yellow); }
.site-footer__legal { margin-top: 32px; padding-top: 20px; border-top: 1px solid #3A3A3A; }
.site-footer__legal p { font-size: 13px; color: #A39C90; }

/* ---------- Barre fixe mobile ---------- */
.sticky-cta {
  position: fixed; left: 0; right: 0; bottom: 0; z-index: 60;
  display: flex; align-items: center; justify-content: space-between; gap: 12px;
  padding: 10px var(--gutter) calc(10px + env(safe-area-inset-bottom));
  background: var(--ink); color: #fff; border-top: 2px solid var(--yellow);
  transform: translateY(110%); transition: transform .25s var(--ease);
}
.sticky-cta.is-visible { transform: translateY(0); }
.sticky-cta__price { display: grid; font: 800 20px/1.1 var(--font-head); color: var(--yellow); font-variant-numeric: tabular-nums; }
.sticky-cta__price small { font: 700 12px/1.3 var(--font-body); color: var(--on-dark-muted); }
.sticky-cta .btn { box-shadow: none; }

@media (max-width: 899px) {
  .site-footer { padding-bottom: 96px; } /* la barre fixe ne cache pas le bas de page */
}

/* =========================================================
   Écrans plus grands
   ========================================================= */
@media (min-width: 640px) {
  :root { --gutter: 28px; }
  .cards { grid-template-columns: repeat(2, 1fr); }
  .trust { grid-auto-flow: column; justify-content: start; gap: 18px; }
  .trust li { font-size: 15px; }
  .aa-note { grid-template-columns: auto 1fr; align-items: center; gap: 36px; padding: 28px 36px; }
}

@media (min-width: 900px) {
  .site-nav { display: flex; }
  .hero { padding: 48px 0 72px; }
  .hero__grid { grid-template-columns: 1.05fr 1fr; gap: 40px; }
  .split { grid-template-columns: 1fr 1fr; gap: 56px; }
  .split--top .box { margin-top: 112px; }
  .steps { grid-template-columns: repeat(3, 1fr); }
  .step { padding: 84px 22px 24px; }
  .gallery { grid-template-columns: repeat(4, 1fr); gap: 18px; }
  .order-intro { position: sticky; top: 100px; }
  .site-footer__inner { grid-template-columns: 1fr auto; align-items: center; }
  .sticky-cta { display: none; }
}

@media (min-width: 1100px) {
  .cards { grid-template-columns: repeat(4, 1fr); }
}

@media (max-width: 380px) {
  .price-row { flex-wrap: wrap; gap: 8px 14px; }
  .btn--lg { padding-inline: 18px; font-size: 17px; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation: none !important; transition: none !important; }
}
