/* Roustmia Eclairage & Pro (Ben Ferhat) — mini COD store
   Tokens (CRAFT-19) — contrast verified ≥4.5:1 text / ≥3:1 UI */

:root {
  --ink: #16202b;
  --ink-bg: #0e151c;
  --paper: #f5f8fa;
  --card: #ffffff;
  --line: #dde5ea;
  --muted: #52646f;
  --muted-dark: #9fb0bc;
  --blue-text: #12618c;   /* ≥4.5:1 on paper/card */
  --blue-ui: #1a7fb5;     /* ≥3:1 for icons, borders, focus */
  --blue-deep: #0d4a70;
  --gold-bright: #d9b45a; /* on dark backgrounds only — ties to the BF logo */
  --danger: #b3261e;
  --ok: #1e7d32;
  --radius-lg: 16px;
  --radius: 10px;
  --shadow-card: 0 1px 2px rgba(23, 45, 60, .06), 0 4px 14px rgba(23, 45, 60, .08);
  --shadow-dialog: 0 2px 6px rgba(14, 21, 28, .14), 0 24px 60px rgba(14, 21, 28, .28);
  --wrap: 1100px;
  --pad: 24px;
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: "Inter", "Segoe UI", system-ui, -apple-system, sans-serif;
  font-size: 16px;
  line-height: 1.6;
  -webkit-tap-highlight-color: rgba(26, 127, 181, .25); /* MOB-05 */
}

h1, h2, h3 { font-weight: 700; line-height: 1.18; letter-spacing: -0.01em; }
h1 { font-size: clamp(1.9rem, 4.4vw, 3rem); }
h2 { font-size: clamp(1.35rem, 2.6vw, 1.8rem); }
h3 { font-size: 1.05rem; line-height: 1.3; }

img { display: block; max-width: 100%; }

.wrap { max-width: var(--wrap); margin-inline: auto; padding-inline: var(--pad); }

/* Skip link — keyboard entry point */
.skip-link {
  position: absolute; left: 16px; top: -48px; z-index: 60;
  background: var(--ink-bg); color: var(--paper);
  padding: 10px 16px; border-radius: 0 0 10px 10px;
  transition: top .15s ease;
}
.skip-link:focus-visible { top: 0; }

/* ---------- Buttons (MOB-01: ≥48px targets; CRAFT-01: 4 states) ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 9px;
  min-height: 48px; padding: 12px 20px;
  border: 1px solid transparent; border-radius: 999px;
  font: inherit; font-weight: 600; font-size: .95rem;
  cursor: pointer; text-decoration: none;
  touch-action: manipulation; /* MOB-05 */
  transition: transform .15s ease, box-shadow .15s ease, background-color .15s ease, border-color .15s ease;
}
.btn:focus-visible { outline: 2px solid var(--blue-ui); outline-offset: 2px; }
.btn:active { transform: translateY(1px); }

.btn-primary { background: var(--blue-text); color: #ffffff; }
.btn-primary:hover { background: #1a7fb5; box-shadow: var(--shadow-card); }

.btn-wa { background: #e8f4ee; color: #14532d; border-color: #bfe0cd; }
.btn-wa:hover { background: #d8eee2; }

.btn-outline { background: transparent; color: var(--ink); border-color: var(--blue-ui); }
.btn-outline:hover { background: rgba(26, 127, 181, .08); }

.btn-phone { background: transparent; color: var(--paper); border-color: rgba(245, 248, 250, .35); padding: 9px 16px; min-height: 44px; }
.btn-phone:hover { border-color: var(--gold-bright); color: var(--gold-bright); }

/* ---------- Header ---------- */
.site-header {
  position: sticky; top: 0; z-index: 40;
  background: var(--ink-bg); color: var(--paper);
  box-shadow: 0 1px 0 rgba(245, 248, 250, .12);
}
.header-row { display: flex; align-items: center; gap: 20px; padding-block: 10px; }
.brand { display: inline-flex; align-items: center; gap: 12px; text-decoration: none; color: var(--paper); }
.brand-emblem { width: 44px; height: 44px; border-radius: 50%; object-fit: cover; }
.brand-name {
  display: flex; align-items: baseline; gap: 8px;
  font-weight: 700; font-size: 1.2rem; letter-spacing: .02em;
}
.brand-ar { color: var(--gold-bright); font-size: 1.25rem; line-height: 1; }
.brand-sub { display: block; color: var(--muted-dark); font-size: .74rem; font-weight: 500; letter-spacing: .06em; }
.main-nav { display: flex; gap: 4px; margin-inline-start: auto; }
.main-nav a {
  color: var(--muted-dark); text-decoration: none; font-weight: 500; font-size: .92rem;
  padding: 10px 12px; border-radius: 8px; min-height: 44px; display: inline-flex; align-items: center;
}
.main-nav a:hover { color: var(--paper); }
.main-nav a:focus-visible { outline: 2px solid var(--gold-bright); outline-offset: 1px; }

.trustline {
  display: flex; flex-wrap: wrap; gap: 4px 10px; align-items: center;
  margin: 0; padding-block: 8px;
  border-top: 1px solid rgba(245, 248, 250, .1);
  color: var(--muted-dark); font-size: .82rem;
}

/* ---------- Hero ---------- */
.hero { padding-block: clamp(40px, 7vw, 84px) clamp(32px, 5vw, 60px); }
.hero-grid {
  display: grid; grid-template-columns: 1.1fr .9fr; gap: clamp(28px, 5vw, 64px); align-items: center;
}
.hero-kicker { margin: 0 0 10px; color: var(--blue-text); font-weight: 600; font-size: .95rem; }
.hero h1 { margin: 0 0 16px; }
.hero-lead { margin: 0 0 24px; color: var(--muted); max-width: 46ch; }
.hero-actions { display: flex; flex-wrap: wrap; gap: 12px; margin-bottom: 22px; }
.hero-points { list-style: none; margin: 0; padding: 0; color: var(--muted); font-size: .92rem; display: grid; gap: 8px; }
.hero-points li { padding-inline-start: 22px; position: relative; }
.hero-points li::before {
  content: ""; position: absolute; left: 0; top: .42em;
  width: 10px; height: 10px; border-radius: 50%;
  border: 2px solid var(--blue-ui);
}

.hero-media {
  position: relative; margin: 0; justify-self: center; width: min(100%, 420px);
}
.hero-media img {
  width: 100%; height: auto; aspect-ratio: 3 / 4; object-fit: cover; /* fills without distortion */
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-card);
}
.hero-tag {
  position: absolute; inset-inline: 14px; bottom: 14px;
  display: grid; gap: 2px;
  background: rgba(14, 21, 28, .82);
  -webkit-backdrop-filter: blur(6px); backdrop-filter: blur(6px);
  color: var(--paper); padding: 12px 16px; border-radius: 12px;
}
.hero-tag-name { font-weight: 600; font-size: .92rem; }
.hero-tag-sub { font-variant-numeric: tabular-nums; color: var(--gold-bright); font-weight: 600; font-size: .88rem; } /* CRAFT-14 */

.badge {
  display: inline-flex; align-items: center;
  padding: 3px 10px; border-radius: 999px;
  background: #d9ecfa; color: var(--blue-deep);
  font-size: .74rem; font-weight: 700; letter-spacing: .04em;
}
.badge-opening { background: rgba(217, 180, 90, .18); color: var(--gold-bright); border: 1px solid rgba(217, 180, 90, .5); }

/* ---------- Sections ---------- */
.section { padding-block: clamp(44px, 6vw, 72px); }
.section-head { max-width: 60ch; margin-bottom: 14px; }
.section-head h2 { margin: 0 0 6px; }
.section-sub { margin: 0; color: var(--muted); }
.demo-note { margin: 0 0 26px; color: var(--blue-text); font-size: .84rem; }

/* ---------- Product grid (card guide: article root, source-order regions) ---------- */
.grid {
  display: grid; grid-template-columns: repeat(2, 1fr); gap: 18px;
}
@media (min-width: 900px) { .grid { grid-template-columns: repeat(4, 1fr); } }
@media (min-width: 640px) and (max-width: 899px) { .grid { grid-template-columns: repeat(3, 1fr); } }

.card {
  display: grid; grid-template-rows: auto auto auto auto; /* media / h3 / price / footer share tracks */
  background: var(--card); border: 1px solid var(--line); border-radius: var(--radius-lg);
  overflow: hidden; box-shadow: var(--shadow-card);
  transition: transform .18s ease, box-shadow .18s ease;
}
.card:hover { transform: translateY(-2px); box-shadow: 0 2px 4px rgba(23,45,60,.08), 0 12px 28px rgba(23,45,60,.14); }
.card img {
  width: 100%; height: auto; aspect-ratio: 3 / 4; object-fit: cover;
  background: var(--paper);
}
.card h3 { margin: 12px 14px 2px; }
.card .price {
  margin: 0 14px; font-weight: 700; color: var(--blue-text);
  font-variant-numeric: tabular-nums;
}
.card footer { padding: 12px 14px 16px; }
.btn-card { width: 100%; background: var(--paper); color: var(--ink); border-color: var(--line); }
.btn-card:hover { background: #eaf1f6; border-color: var(--blue-ui); }

/* ---------- Boutique ---------- */
.section-boutique { background: var(--card); border-block: 1px solid var(--line); }
.boutique-grid { display: grid; grid-template-columns: .9fr 1.1fr; gap: clamp(24px, 4vw, 56px); align-items: center; }
.boutique-media img { width: 100%; height: auto; border-radius: var(--radius-lg); box-shadow: var(--shadow-card); }
.boutique-copy h2 { margin: 0 0 12px; }
.boutique-copy > p { margin: 0 0 18px; color: var(--muted); }
.fact-list { margin: 0 0 22px; display: grid; gap: 10px; }
.fact-list div { display: grid; grid-template-columns: 110px 1fr; gap: 12px; }
.fact-list dt { color: var(--muted); font-size: .9rem; }
.fact-list dd { margin: 0; font-weight: 500; }

/* ---------- Infos ---------- */
.infos-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 18px; }
.info-card {
  background: var(--card); border: 1px solid var(--line); border-radius: var(--radius-lg);
  padding: 24px; box-shadow: var(--shadow-card);
}
.info-card h2 { margin: 0 0 14px; font-size: 1.2rem; }
.steps { margin: 0; padding-inline-start: 20px; color: var(--muted); display: grid; gap: 8px; }
.contact-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 10px; color: var(--muted); }
.contact-list a { color: var(--blue-text); text-decoration: none; font-weight: 500; }
.contact-list a:hover { text-decoration: underline; }
.contact-list a:focus-visible { outline: 2px solid var(--blue-ui); outline-offset: 2px; }

/* ---------- Footer ---------- */
.site-footer { background: var(--ink-bg); color: var(--muted-dark); padding-block: 44px 28px; }
.footer-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 28px; }
.footer-brand { font-size: 1.25rem; font-weight: 700; color: var(--paper); margin: 0 0 8px; }
.footer-h { font-size: .8rem; font-weight: 700; letter-spacing: .1em; text-transform: uppercase; color: var(--gold-bright); margin: 0 0 10px; }
.footer-grid p, .footer-links { font-size: .92rem; margin: 0; }
.footer-links { list-style: none; padding: 0; display: grid; gap: 6px; }

/* ---------- Dialogs (html guide: native <dialog>) ---------- */
.dialog {
  border: none; border-radius: var(--radius-lg);
  padding: 0; width: min(92vw, 880px); max-width: 92vw;
  background: var(--card); color: var(--ink);
  box-shadow: var(--shadow-dialog);
}
.dialog::backdrop { background: rgba(14, 21, 28, .55); }
.dialog[open] { animation: dialog-in .22s ease; }
@keyframes dialog-in {
  from { opacity: 0; transform: translateY(10px) scale(.985); }
  to { opacity: 1; transform: none; }
}
@media (prefers-reduced-motion: reduce) {
  .dialog[open] { animation: none; }
  .card, .btn, .skip-link { transition: none; }
  html { scroll-behavior: auto; }
}

.dialog-body { padding: clamp(20px, 4vw, 32px); max-height: 86vh; overflow-y: auto; }
.dialog-close {
  position: absolute; top: 10px; right: 10px; z-index: 2;
  width: 48px; height: 48px; /* MOB-01 */
  display: inline-flex; align-items: center; justify-content: center;
  border: none; border-radius: 50%;
  background: var(--paper); color: var(--ink); cursor: pointer;
}
.dialog-close:hover { background: #eaf1f6; }
.dialog-close:focus-visible { outline: 2px solid var(--blue-ui); outline-offset: 2px; }

/* Product dialog */
.pd-grid { display: grid; grid-template-columns: minmax(0, 5fr) minmax(0, 6fr); gap: clamp(18px, 3vw, 32px); }
@media (max-width: 700px) { .pd-grid { grid-template-columns: 1fr; } }
.pd-media img { width: 100%; height: auto; aspect-ratio: 3 / 4; object-fit: cover; border-radius: var(--radius); background: var(--paper); }
.pd-thumbs { display: flex; gap: 10px; margin-top: 12px; }
.pd-thumb { padding: 0; border: 2px solid var(--line); border-radius: 8px; background: none; cursor: pointer; overflow: hidden; width: 72px; height: 96px; }
.pd-thumb img { width: 100%; height: 100%; object-fit: cover; }
.pd-thumb[aria-current="true"] { border-color: var(--blue-ui); }
.pd-thumb:focus-visible { outline: 2px solid var(--blue-ui); outline-offset: 2px; }

.pd-badge-row { margin: 0 0 8px; }
.pd-info h2 { margin: 0 0 6px; }
.pd-price { margin: 0 0 18px; font-size: 1.5rem; font-weight: 700; color: var(--blue-text); font-variant-numeric: tabular-nums; }

.size-field { border: none; margin: 0 0 16px; padding: 0; }
.size-field legend { font-weight: 600; margin-bottom: 8px; }
.size-chips { display: flex; flex-wrap: wrap; gap: 10px; } /* MOB-07: ≥8px spacing */
.size-chip { position: relative; }
.size-chip input {
  position: absolute; inset: 0; opacity: 0; margin: 0; cursor: pointer; /* keep in a11y tree */
}
.size-chip span {
  display: inline-flex; align-items: center; justify-content: center;
  min-width: 52px; min-height: 48px; padding: 10px 14px; /* MOB-01 */
  border: 2px solid var(--line); border-radius: 10px;
  font-weight: 600; background: var(--card);
  transition: border-color .15s ease, background-color .15s ease;
}
.size-chip input:checked + span { border-color: var(--blue-deep); background: var(--blue-text); color: #ffffff; }
.size-chip input:hover + span { border-color: var(--blue-ui); }
.size-chip input:focus-visible + span { outline: 2px solid var(--blue-ui); outline-offset: 2px; }

.pd-perks { list-style: none; margin: 0 0 22px; padding: 14px 16px; background: var(--paper); border-radius: var(--radius); display: grid; gap: 8px; color: var(--muted); font-size: .9rem; }
.pd-perks li { padding-inline-start: 20px; position: relative; }
.pd-perks li::before {
  content: "✓"; position: absolute; left: 0; top: 0;
  color: var(--ok); font-weight: 700;
}
.btn-order { width: 100%; }

/* Order dialog */
.dialog-order { width: min(92vw, 560px); }
.od-paynote { margin: 4px 0 18px; color: var(--muted); font-size: .92rem; }

.od-summary {
  display: flex; gap: 14px; align-items: center;
  background: var(--paper); border-radius: var(--radius); padding: 12px; margin-bottom: 20px;
}
.od-summary img { width: 72px; height: 96px; object-fit: cover; border-radius: 8px; }
.od-sum-info { flex: 1; }
.od-product { margin: 0; font-weight: 600; }
.od-meta { margin: 2px 0 8px; color: var(--muted); font-size: .9rem; font-variant-numeric: tabular-nums; }
.qty-row { display: flex; align-items: center; gap: 10px; }
.qty-label { font-size: .9rem; color: var(--muted); margin-inline-end: 2px; }
.qty-btn {
  width: 44px; height: 44px; border-radius: 10px;
  border: 1px solid var(--line); background: var(--card);
  font-size: 1.2rem; font-weight: 600; cursor: pointer; line-height: 1;
}
.qty-btn:hover { border-color: var(--blue-ui); }
.qty-btn:focus-visible { outline: 2px solid var(--blue-ui); outline-offset: 2px; }
#qty-value { min-width: 28px; text-align: center; font-weight: 700; font-variant-numeric: tabular-nums; }

/* FORM-01 single column; FORM-02 labels above */
.field { display: flex; flex-direction: column; gap: 6px; margin-bottom: 16px; }
.field label, .mode-field legend { font-weight: 600; font-size: .93rem; }
.opt, .opt-why { color: var(--muted); font-weight: 400; font-size: .85rem; }
.hint { margin: 0; color: var(--muted); font-size: .82rem; }

.field input, .field select, .field textarea {
  font: inherit; font-size: max(1rem, 1em); /* MOB-02 ≥16px, no iOS zoom */
  color: var(--ink); background: var(--card); /* CRAFT-10 explicit colors */
  border: 1.5px solid #6e7d87; border-radius: var(--radius);
  padding: 12px 14px; min-height: 48px; width: 100%;
}
.field textarea { resize: vertical; min-height: 0; }
.field input:hover, .field select:hover, .field textarea:hover { border-color: var(--blue-ui); }
.field input:focus-visible, .field select:focus-visible, .field textarea:focus-visible {
  outline: 2px solid var(--blue-ui); outline-offset: 1px; border-color: var(--blue-ui);
}
.field select { appearance: none; background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='14' height='9' viewBox='0 0 14 9'%3E%3Cpath d='M1 1l6 6 6-6' fill='none' stroke='%2352646f' stroke-width='2'/%3E%3C/svg%3E"); background-repeat: no-repeat; background-position: right 16px center; padding-inline-end: 40px; }

/* FORM-05/:user-invalid — only after user touched the field */
.field input:user-invalid, .field select:user-invalid { border-color: var(--danger); }
.field .error-msg { color: var(--danger); font-size: .85rem; margin: 0; } /* FORM-06: text next to field */

.mode-field { border: none; padding: 0; margin-bottom: 16px; }
.mode-chips { display: flex; gap: 10px; margin-top: 8px; }
.mode-chip { position: relative; flex: 1; }
.mode-chip input { position: absolute; inset: 0; opacity: 0; margin: 0; cursor: pointer; }
.mode-chip span {
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  min-height: 48px; padding: 10px; border: 2px solid var(--line); border-radius: 10px;
  font-weight: 600; transition: border-color .15s ease, background-color .15s ease;
}
.mode-chip input:checked + span { border-color: var(--blue-deep); background: var(--blue-text); color: #ffffff; }
.mode-chip input:focus-visible + span { outline: 2px solid var(--blue-ui); outline-offset: 2px; }

.od-totals { border-top: 2px solid var(--ink); margin-top: 6px; padding-top: 14px; margin-bottom: 18px; }
.trow { display: flex; justify-content: space-between; gap: 12px; margin-bottom: 6px; color: var(--muted); font-variant-numeric: tabular-nums; }
.trow-total { color: var(--ink); font-weight: 700; font-size: 1.08rem; margin-top: 4px; }
.t-eta { margin: 8px 0 0; color: var(--ok); font-size: .88rem; font-weight: 500; }

.od-errors {
  background: #fbeaea; border: 1px solid var(--danger); border-radius: var(--radius);
  color: var(--danger); padding: 12px 14px; margin-bottom: 16px; font-size: .9rem;
}
.od-errors ul { margin: 0; padding-inline-start: 18px; }

.btn-submit { width: 100%; font-size: 1rem; }
.btn-submit[disabled] { opacity: .6; cursor: wait; } /* CRAFT-03: disable only in-flight */
.od-fineprint { margin: 12px 0 0; color: var(--muted); font-size: .84rem; text-align: center; }

.od-done h3 { margin: 0 0 8px; font-size: 1.3rem; }
.od-done-sub { margin: 0 0 16px; color: var(--muted); }
.od-done-recap { background: var(--paper); border-radius: var(--radius); padding: 16px; margin-bottom: 16px; font-size: .93rem; }
.od-done-recap dl { margin: 0; display: grid; gap: 6px; grid-template-columns: auto 1fr; }
.od-done-recap dt { color: var(--muted); }
.od-done-recap dd { margin: 0; font-weight: 500; font-variant-numeric: tabular-nums; }
.od-done-actions { display: grid; gap: 10px; margin-bottom: 14px; }
.od-done-note { margin: 0; color: var(--muted); font-size: .86rem; }

/* ---------- Responsive ---------- */
@media (max-width: 860px) {
  .hero-grid, .boutique-grid { grid-template-columns: 1fr; }
  .hero-media { justify-self: start; width: min(100%, 400px); }
  .infos-grid { grid-template-columns: 1fr; }
  .footer-grid { grid-template-columns: 1fr 1fr; }
  .main-nav { display: none; }
  .header-row { justify-content: space-between; }
}
@media (max-width: 480px) {
  .grid { gap: 12px; }
  .card h3 { font-size: .95rem; }
  .btn-phone span { display: none; } /* icon-only phone on small screens */
  .btn-phone { padding: 10px; }
  .brand-sub { display: none; }
  .footer-grid { grid-template-columns: 1fr; }
}
