/* ═══════════════════════════════════════════════════════════════════════════
   home.css — Homepage Ratio
   Direction : « étiquette de rayon » — éditorial-utilitaire de supermarché.
   Papier crème, encre noire, jaune Ratio en sticker de prix, mono ticket
   de caisse pour les chiffres. Chargé uniquement par index.html, scope
   body[data-page="home"] (priorité sur les anciennes règles de styles.css).
   ═══════════════════════════════════════════════════════════════════════════ */

body[data-page="home"] {
  --paper: #faf6ec;
  --ink: #16130c;
  --ink-soft: rgba(22, 19, 12, 0.66);
  --yellow: #ffc857;
  --yellow-deep: #e8a93c;
  --promo: #d8401f;
  --ok: #1e7d4f;
  --line: rgba(22, 19, 12, 0.14);

  --font-display: "Archivo Black", "Archivo", sans-serif;
  --font-body: "Archivo", sans-serif;
  --font-mono: "Spline Sans Mono", monospace;

  background:
    radial-gradient(rgba(22, 19, 12, 0.035) 1px, transparent 1.2px) 0 0 / 22px 22px,
    var(--paper);
  color: var(--ink);
  font-family: var(--font-body);
}

body[data-page="home"] .hpContainer { max-width: 1060px; }

body[data-page="home"] .mono { font-family: var(--font-mono); }

body[data-page="home"] .hpSrOnly {
  position: absolute; width: 1px; height: 1px;
  clip: rect(0 0 0 0); overflow: hidden; white-space: nowrap;
}

/* ─── Nav ──────────────────────────────────────────────────────────────────── */
body[data-page="home"] .hpNav {
  display: flex; align-items: center; justify-content: space-between;
  padding-bottom: 18px;
  border-bottom: 2px solid var(--ink);
}
body[data-page="home"] .hpNavRight { display: flex; align-items: center; gap: 18px; }
body[data-page="home"] .hpNavLink {
  color: var(--ink); font-weight: 600; font-size: 0.95rem;
  border-bottom: 2px solid transparent;
}
body[data-page="home"] .hpNavLink:hover { border-bottom-color: var(--yellow); }
body[data-page="home"] .hpNavCta {
  background: var(--ink); color: var(--paper);
  font-weight: 700; font-size: 0.95rem;
  padding: 10px 18px; border-radius: 4px;
  box-shadow: 3px 3px 0 var(--yellow);
  transition: transform 0.12s ease, box-shadow 0.12s ease;
}
body[data-page="home"] .hpNavCta:hover {
  transform: translate(-1px, -1px);
  box-shadow: 5px 5px 0 var(--yellow);
}

/* ─── Hero ─────────────────────────────────────────────────────────────────── */
body[data-page="home"] .hp { padding: 0 0 30px; }

body[data-page="home"] .hpHero { padding: 54px 0 38px; position: relative; }

body[data-page="home"] .hpKicker {
  margin: 0 0 18px;
  font-size: 0.72rem; letter-spacing: 0.18em; text-transform: uppercase;
  color: var(--ink-soft);
}

body[data-page="home"] .hpH1 {
  margin: 0 0 18px;
  font-family: var(--font-display);
  font-weight: 400; /* Archivo Black est un poids unique */
  font-size: clamp(40px, 7vw, 78px);
  line-height: 1.02;
  letter-spacing: -0.015em;
  text-transform: none;
}

/* Sticker jaune façon étiquette promo, légèrement penché */
body[data-page="home"] .hpStick {
  display: inline-block;
  background: var(--yellow);
  color: var(--ink);
  padding: 0 0.18em;
  transform: rotate(-1.2deg);
  box-shadow: 2px 3px 0 rgba(22, 19, 12, 0.85);
}

body[data-page="home"] .hpLead {
  margin: 0 0 26px;
  font-size: 1.15rem;
  line-height: 1.5;
  color: var(--ink-soft);
  max-width: 56ch;
}

/* Barre de recherche — l'action de conversion n°1 */
body[data-page="home"] .hpSearch {
  display: flex; max-width: 620px;
  border: 2px solid var(--ink);
  border-radius: 6px;
  background: #fff;
  box-shadow: 5px 5px 0 var(--yellow);
}
body[data-page="home"] .hpSearchInput {
  flex: 1; min-width: 0;
  border: none; border-radius: 6px 0 0 6px;
  background: transparent;
  padding: 16px 18px;
  font-family: var(--font-body);
  font-size: 1.05rem;
  color: var(--ink);
}
body[data-page="home"] .hpSearchInput::placeholder { color: rgba(22, 19, 12, 0.4); }
body[data-page="home"] .hpSearchInput:focus { outline: none; }
body[data-page="home"] .hpSearch:focus-within { box-shadow: 5px 5px 0 var(--yellow-deep); }
body[data-page="home"] .hpSearchBtn {
  border: none; border-left: 2px solid var(--ink);
  border-radius: 0 4px 4px 0;
  background: var(--yellow);
  color: var(--ink);
  font-family: var(--font-body); font-weight: 700; font-size: 1rem;
  padding: 0 26px;
  cursor: pointer;
  transition: background 0.12s ease;
}
body[data-page="home"] .hpSearchBtn:hover { background: var(--yellow-deep); }

body[data-page="home"] .hpActions {
  margin-top: 16px;
  display: flex; align-items: baseline; gap: 18px; flex-wrap: wrap;
}
body[data-page="home"] .hpGhostBtn {
  background: transparent;
  border: none; border-bottom: 2px solid var(--ink);
  border-radius: 0;
  padding: 2px 0;
  font-family: var(--font-body); font-weight: 600; font-size: 0.95rem;
  color: var(--ink);
  cursor: pointer;
}
body[data-page="home"] .hpGhostBtn:hover { border-bottom-color: var(--yellow-deep); background: transparent; }
body[data-page="home"] .hpMicro { margin: 0; font-size: 0.88rem; color: var(--ink-soft); }

body[data-page="home"] .hpStats {
  list-style: none;
  margin: 30px 0 0; padding: 14px 0 0;
  border-top: 1px dashed var(--line);
  display: flex; gap: 34px; flex-wrap: wrap;
  font-size: 0.8rem; color: var(--ink-soft);
}
body[data-page="home"] .hpStats strong { color: var(--ink); font-weight: 700; font-size: 1rem; }

/* Code-barres décoratif (pur CSS) */
body[data-page="home"] .hpBarcode {
  margin-top: 26px;
  height: 34px; width: 190px;
  background:
    repeating-linear-gradient(90deg,
      var(--ink) 0 2px, transparent 2px 5px,
      var(--ink) 5px 6px, transparent 6px 12px,
      var(--ink) 12px 16px, transparent 16px 19px,
      var(--ink) 19px 20px, transparent 20px 26px);
  opacity: 0.82;
}

/* ─── Sections ─────────────────────────────────────────────────────────────── */
body[data-page="home"] .hpSection { margin-top: 58px; }

body[data-page="home"] .hpSectionHead { margin-bottom: 22px; }

body[data-page="home"] .hpSection h2 {
  margin: 0;
  font-family: var(--font-display);
  font-weight: 400;
  font-size: clamp(24px, 3.4vw, 36px);
  letter-spacing: -0.01em;
}
body[data-page="home"] .hpSectionSub {
  margin: 8px 0 0;
  color: var(--ink-soft);
  font-size: 0.95rem;
}

/* ─── Étiquettes de rayon (produits SSR) ───────────────────────────────────── */
body[data-page="home"] .hpTagGrid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 14px;
}

body[data-page="home"] .hpTag {
  display: flex; flex-direction: column;
  background: #fff;
  border: 1.5px solid var(--ink);
  border-radius: 4px;
  padding: 12px 12px 10px;
  color: var(--ink);
  position: relative;
  transition: transform 0.14s ease, box-shadow 0.14s ease;
}
/* trou de perforation d'étiquette */
body[data-page="home"] .hpTag::before {
  content: "";
  position: absolute; top: 7px; right: 9px;
  width: 8px; height: 8px;
  border: 1.5px solid var(--ink);
  border-radius: 50%;
  background: var(--paper);
}
body[data-page="home"] .hpTag:hover {
  transform: translate(-2px, -2px) rotate(-0.4deg);
  box-shadow: 4px 4px 0 var(--yellow);
}

body[data-page="home"] .hpTagImg {
  height: 96px;
  display: flex; align-items: center; justify-content: center;
  margin-bottom: 10px;
}
body[data-page="home"] .hpTagImg img { max-width: 100%; max-height: 96px; object-fit: contain; }

body[data-page="home"] .hpTagName {
  font-size: 0.85rem; font-weight: 600; line-height: 1.3;
  display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical;
  overflow: hidden;
  min-height: 2.6em;
  margin-bottom: 8px;
}

body[data-page="home"] .hpTagPriceRow {
  display: flex; align-items: baseline; gap: 6px;
  border-top: 1px dashed var(--line);
  padding-top: 8px;
}
body[data-page="home"] .hpTagFrom { font-size: 0.72rem; color: var(--ink-soft); }
body[data-page="home"] .hpTagPrice {
  font-family: var(--font-mono); font-weight: 700; font-size: 1.25rem;
}
body[data-page="home"] .hpTagMeta {
  font-family: var(--font-mono);
  font-size: 0.7rem; color: var(--ok);
  margin-top: 3px;
}

body[data-page="home"] .hpMoreLink {
  display: inline-block; margin-top: 16px;
  color: var(--ink); font-size: 0.85rem; font-weight: 500;
  border-bottom: 2px solid var(--yellow);
}
body[data-page="home"] .hpMoreLink:hover { border-bottom-color: var(--ink); }

/* ─── Étapes ───────────────────────────────────────────────────────────────── */
body[data-page="home"] .hpSteps {
  list-style: none; margin: 0; padding: 0;
  display: grid; grid-template-columns: repeat(3, 1fr); gap: 14px;
  counter-reset: step;
}
body[data-page="home"] .hpStep {
  border-top: 2px solid var(--ink);
  padding: 14px 4px 0;
  position: relative;
}
body[data-page="home"] .hpStepNum {
  font-size: 0.78rem; font-weight: 700;
  color: var(--paper);
  background: var(--ink);
  padding: 2px 7px;
  display: inline-block;
  margin-bottom: 10px;
}
body[data-page="home"] .hpStep h3 {
  margin: 0 0 6px;
  font-size: 1.05rem; font-weight: 700; letter-spacing: -0.01em;
}
body[data-page="home"] .hpStep p { margin: 0; color: var(--ink-soft); line-height: 1.5; font-size: 0.93rem; }

/* ─── Ticket de caisse ─────────────────────────────────────────────────────── */
body[data-page="home"] .hpReceiptSection {
  display: flex; justify-content: center;
  filter: drop-shadow(0 12px 18px rgba(22, 19, 12, 0.16));
}

body[data-page="home"] .hpReceipt {
  width: min(480px, 100%);
  background: #fff;
  padding: 26px 26px 20px;
  transform: rotate(0.6deg);
  /* bord déchiré bas (dents de scie) */
  -webkit-mask:
    conic-gradient(from -45deg at bottom, #000 0 90deg, transparent 90deg) 50% / 14px 100%;
          mask:
    conic-gradient(from -45deg at bottom, #000 0 90deg, transparent 90deg) 50% / 14px 100%;
}

body[data-page="home"] .hpReceiptHead {
  margin: 0 0 16px;
  text-align: center;
  font-size: 0.8rem; font-weight: 700; letter-spacing: 0.08em;
  line-height: 1.7;
}

body[data-page="home"] .hpReceiptLines { list-style: none; margin: 0; padding: 0; }
body[data-page="home"] .hpReceiptLines li { margin-bottom: 14px; }
body[data-page="home"] .hpReceiptRow {
  display: flex; justify-content: space-between; gap: 12px;
  font-size: 0.8rem; font-weight: 700; letter-spacing: 0.04em;
}
body[data-page="home"] .hpReceiptRow span:last-child { color: var(--ok); }
body[data-page="home"] .hpReceiptLines p {
  margin: 4px 0 0;
  font-size: 0.86rem; color: var(--ink-soft); line-height: 1.45;
}

body[data-page="home"] .hpReceiptTotal {
  display: flex; justify-content: space-between;
  border-top: 1px dashed var(--line);
  margin-top: 18px; padding-top: 10px;
  font-size: 0.92rem; font-weight: 700; letter-spacing: 0.05em;
}
body[data-page="home"] .hpReceiptTotal span:last-child { color: var(--promo); }

body[data-page="home"] .hpBarcode--receipt {
  margin: 16px auto 4px; width: 150px; height: 28px;
}

/* ─── Cas d'usage ──────────────────────────────────────────────────────────── */
body[data-page="home"] .hpUseGrid {
  display: grid; grid-template-columns: 1fr 1fr; gap: 14px;
}
body[data-page="home"] .hpUseCard {
  border: 1.5px solid var(--ink);
  border-radius: 4px;
  background: var(--yellow);
  padding: 22px 20px;
  transform: rotate(-0.3deg);
}
body[data-page="home"] .hpUseCard--alt { background: #fff; transform: rotate(0.3deg); }
body[data-page="home"] .hpUseCard h3 {
  margin: 0 0 8px;
  font-size: 1.1rem; font-weight: 700; letter-spacing: -0.01em;
}
body[data-page="home"] .hpUseCard p { margin: 0; line-height: 1.5; font-size: 0.93rem; color: rgba(22, 19, 12, 0.78); }

/* ─── Annuaire magasins (override du style de base) ────────────────────────── */
body[data-page="home"] .storesDirectory { margin-top: 58px; }
body[data-page="home"] .storesDirectoryTitle {
  font-family: var(--font-display); font-weight: 400;
  font-size: clamp(24px, 3.4vw, 36px); letter-spacing: -0.01em;
  color: var(--ink);
}
body[data-page="home"] .storesDirectoryLead { color: var(--ink-soft); }
body[data-page="home"] .storesDept {
  border: none; border-top: 1px solid var(--line);
  border-radius: 0; background: transparent;
}
body[data-page="home"] .storesDeptSummary:hover { background: rgba(255, 200, 87, 0.18); }
body[data-page="home"] .storesDeptList a { color: var(--ink); }
body[data-page="home"] .storesDeptList a:hover { border-bottom: 1px solid var(--yellow-deep); }
body[data-page="home"] .storesDirectoryMore {
  color: var(--ink); font-weight: 600;
  border-bottom: 2px solid var(--yellow);
}

/* ─── Reveal au chargement ─────────────────────────────────────────────────── */
@keyframes hpRise {
  from { opacity: 0; transform: translateY(16px); }
  to { opacity: 1; transform: none; }
}
body[data-page="home"] .hpHero > * {
  animation: hpRise 0.55s cubic-bezier(0.2, 0.7, 0.2, 1) both;
}
body[data-page="home"] .hpHero > *:nth-child(1) { animation-delay: 0.02s; }
body[data-page="home"] .hpHero > *:nth-child(2) { animation-delay: 0.08s; }
body[data-page="home"] .hpHero > *:nth-child(3) { animation-delay: 0.16s; }
body[data-page="home"] .hpHero > *:nth-child(4) { animation-delay: 0.24s; }
body[data-page="home"] .hpHero > *:nth-child(5) { animation-delay: 0.32s; }
body[data-page="home"] .hpHero > *:nth-child(6) { animation-delay: 0.4s; }
body[data-page="home"] .hpHero > *:nth-child(7) { animation-delay: 0.48s; }

@media (prefers-reduced-motion: reduce) {
  body[data-page="home"] * { animation: none !important; transition: none !important; }
}

/* ─── Responsive ───────────────────────────────────────────────────────────── */
@media (max-width: 900px) {
  body[data-page="home"] .hpTagGrid { grid-template-columns: repeat(2, 1fr); }
  body[data-page="home"] .hpSteps { grid-template-columns: 1fr; }
}
@media (max-width: 640px) {
  body[data-page="home"] .hpHero { padding-top: 36px; }
  body[data-page="home"] .hpSearch { flex-direction: column; box-shadow: 4px 4px 0 var(--yellow); }
  body[data-page="home"] .hpSearchInput { border-radius: 4px 4px 0 0; }
  body[data-page="home"] .hpSearchBtn { border-left: none; border-top: 2px solid var(--ink); border-radius: 0 0 4px 4px; padding: 14px; }
  body[data-page="home"] .hpUseGrid { grid-template-columns: 1fr; }
  body[data-page="home"] .hpStats { gap: 18px; }
}
@media (max-width: 480px) {
  body[data-page="home"] .hpTagGrid { grid-template-columns: 1fr 1fr; gap: 10px; }
  body[data-page="home"] .hpTagImg { height: 72px; }
}
