/* Boutique Caserne 29: couleurs de l'écusson (marine, rouge, jaune). */
:root {
  --navy: #0B1F3A;
  --navy-2: #142C55;
  --blue: #1D3C8F;
  --red: #D7262E;
  --red-dark: #B01B22;
  --yellow: #F5C518;
  --ink: #0B1F3A;
  --muted: #5A6A82;
  --line: #E2E7EF;
  --bg: #F5F6F9;
  --card: #FFFFFF;
  --ok: #1E7A43;
  --radius: 14px;
  --shadow: 0 1px 2px rgba(11, 31, 58, 0.06), 0 6px 18px rgba(11, 31, 58, 0.06);
  --display: 'Oswald', 'Arial Narrow', Arial, sans-serif;
  --body: 'Inter', -apple-system, 'Segoe UI', Roboto, Arial, sans-serif;
  color-scheme: light;
}
* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; background: var(--bg); color: var(--ink); font: 16px/1.55 var(--body); }
img { max-width: 100%; height: auto; display: block; }
a { color: inherit; }
button { font: inherit; }
.wrap { width: 100%; max-width: 1180px; margin: 0 auto; padding-left: max(18px, env(safe-area-inset-left, 0px)); padding-right: max(18px, env(safe-area-inset-right, 0px)); }
h1, h2, h3 { font-family: var(--display); text-transform: uppercase; letter-spacing: 0.02em; line-height: 1.1; margin: 0; text-wrap: balance; }
.eyebrow { font: 600 12px/1 var(--body); letter-spacing: 0.14em; text-transform: uppercase; color: var(--red); }
.muted { color: var(--muted); }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

/* En-tête */
.top { background: var(--navy); color: #fff; position: sticky; top: 0; z-index: 20; box-shadow: 0 1px 0 rgba(255,255,255,0.06); }
.top .wrap { display: flex; align-items: center; gap: 18px; min-height: 68px; }
.brand { display: flex; align-items: center; gap: 10px; text-decoration: none; margin-right: auto; }
.brand img { width: 44px; height: 44px; object-fit: contain; background: #fff; border-radius: 10px; padding: 3px; }
.brand strong { font: 700 22px/1 var(--display); letter-spacing: 0.04em; }
.brand small { display: block; font: 500 11px/1.2 var(--body); letter-spacing: 0.12em; text-transform: uppercase; color: #AFC0DA; margin-top: 3px; }
.nav { display: flex; gap: 4px; }
.nav a { text-decoration: none; font: 600 14px/1 var(--body); padding: 10px 12px; border-radius: 999px; color: #DCE5F3; }
.nav a:hover, .nav a[aria-current="page"] { background: rgba(255,255,255,0.1); color: #fff; }
.cart-btn { position: relative; display: inline-flex; align-items: center; gap: 8px; text-decoration: none; background: var(--red); color: #fff; font: 600 14px/1 var(--body); padding: 11px 14px; border-radius: 999px; }
.cart-btn:hover { background: var(--red-dark); }
.cart-btn .count { min-width: 22px; height: 22px; padding: 0 6px; border-radius: 999px; background: #fff; color: var(--red); display: inline-grid; place-items: center; font-size: 12px; font-weight: 700; }
@media (max-width: 760px) {
  .nav { display: none; }
  .brand small { display: none; }
  .cart-btn .label { display: none; }
}
.subnav { display: none; background: var(--navy-2); }
.subnav .wrap { display: flex; gap: 6px; overflow-x: auto; padding-top: 8px; padding-bottom: 8px; }
.subnav a { flex: none; text-decoration: none; color: #DCE5F3; font: 600 13px/1 var(--body); padding: 8px 12px; border-radius: 999px; background: rgba(255,255,255,0.06); }
@media (max-width: 760px) { .subnav { display: block; } }

/* Bandeau d'accueil */
.hero { background: radial-gradient(1200px 500px at 85% 20%, #1D3C8F 0%, transparent 60%), var(--navy); color: #fff; overflow: hidden; position: relative; }
.hero::after { content: ""; position: absolute; left: -10%; right: -10%; bottom: -1px; height: 10px; background: repeating-linear-gradient(135deg, var(--red) 0 22px, var(--yellow) 22px 44px); opacity: 0.9; }
.hero .wrap { display: grid; grid-template-columns: 1.05fr 1fr; gap: 28px; align-items: center; padding-top: 56px; padding-bottom: 64px; }
.hero h1 { font-size: clamp(38px, 6vw, 68px); }
.hero h1 span { color: var(--yellow); }
.hero p { color: #C9D6EA; font-size: 18px; max-width: 34em; margin: 16px 0 26px; }
.hero .cta { display: flex; gap: 12px; flex-wrap: wrap; }
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; text-decoration: none; border: 0; cursor: pointer; font: 700 15px/1 var(--body); padding: 15px 22px; border-radius: 999px; background: var(--red); color: #fff; }
.btn:hover { background: var(--red-dark); }
.btn.ghost { background: transparent; color: #fff; box-shadow: inset 0 0 0 2px rgba(255,255,255,0.35); }
.btn.ghost:hover { background: rgba(255,255,255,0.08); }
.btn.dark { background: var(--navy); }
.btn.dark:hover { background: var(--navy-2); }
.btn[disabled] { opacity: 0.45; cursor: not-allowed; }
.btn.block { width: 100%; }
.hero-visual { position: relative; }
.hero-visual .hero-photo { width: 100%; height: auto; border-radius: 22px; background: #fff; box-shadow: 0 30px 60px rgba(0,0,0,0.35); aspect-ratio: 3 / 2; object-fit: cover; }
.hero-badge { position: absolute; left: -18px; bottom: -22px; width: 110px; height: 110px; object-fit: contain; background: #fff; border-radius: 22px; padding: 8px; box-shadow: 0 14px 30px rgba(0,0,0,0.35); }
@media (max-width: 860px) {
  .hero .wrap { grid-template-columns: 1fr; padding-top: 36px; padding-bottom: 52px; }
  .hero-badge { width: 84px; height: 84px; left: auto; right: 12px; bottom: -18px; }
}

/* Sections */
.section { padding: 56px 0; }
.section-head { display: flex; align-items: end; justify-content: space-between; gap: 16px; margin-bottom: 22px; }
.section-head h2 { font-size: clamp(26px, 3.4vw, 36px); margin-top: 8px; }
.section-head a { font-weight: 600; text-decoration: none; color: var(--red); white-space: nowrap; }

/* Catégories */
.cats { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 18px; }
.cat { position: relative; display: block; border-radius: var(--radius); overflow: hidden; text-decoration: none; background: #fff; box-shadow: var(--shadow); aspect-ratio: 4 / 3; }
.cat img { width: 100%; height: 100%; object-fit: cover; transition: transform .35s ease; }
.cat:hover img { transform: scale(1.04); }
.cat::after { content: ""; position: absolute; inset: 0; background: linear-gradient(180deg, transparent 45%, rgba(11,31,58,0.85)); }
.cat .label { position: absolute; left: 18px; bottom: 16px; right: 18px; z-index: 1; color: #fff; display: flex; justify-content: space-between; align-items: end; gap: 10px; }
.cat .label strong { font: 700 28px/1 var(--display); letter-spacing: 0.03em; }
.cat .label span { font: 600 13px/1 var(--body); color: #DCE5F3; }
@media (max-width: 760px) { .cats { grid-template-columns: 1fr; } .cat { aspect-ratio: 16 / 9; } }

/* Produits */
.grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); gap: 18px; }
.card { display: flex; flex-direction: column; background: var(--card); border-radius: var(--radius); overflow: hidden; text-decoration: none; box-shadow: var(--shadow); transition: transform .2s ease, box-shadow .2s ease; min-width: 0; }
.card:hover { transform: translateY(-2px); box-shadow: 0 2px 4px rgba(11,31,58,.06), 0 14px 30px rgba(11,31,58,.10); }
.card .ph { position: relative; background: #fff; aspect-ratio: 3 / 2; }
.card .ph img { width: 100%; height: 100%; object-fit: contain; }
.card .body { padding: 14px 16px 18px; display: flex; flex-direction: column; gap: 4px; }
.card h3 { font-size: 18px; }
.card .price { font-weight: 700; font-size: 17px; }
.tag { position: absolute; left: 12px; top: 12px; font: 700 11px/1 var(--body); letter-spacing: 0.08em; text-transform: uppercase; padding: 7px 9px; border-radius: 999px; background: var(--navy); color: #fff; }
.tag.out { background: #6B7280; }
.tag.low { background: var(--yellow); color: var(--navy); }

/* Fiche produit */
.crumbs { font-size: 14px; color: var(--muted); padding: 22px 0 6px; }
.crumbs a { color: var(--muted); }
.product { display: grid; grid-template-columns: 1.15fr 1fr; gap: 36px; padding: 10px 0 64px; align-items: start; }
.product .ph { background: #fff; border-radius: 20px; box-shadow: var(--shadow); overflow: hidden; }
.product .ph img { width: 100%; height: auto; aspect-ratio: 3 / 2; object-fit: contain; }
.product h1 { font-size: clamp(30px, 4vw, 46px); }
.product .price { font-size: 26px; font-weight: 700; margin: 10px 0 2px; }
.product .desc { color: var(--muted); margin: 6px 0 18px; }
.field { margin: 16px 0; }
.field label, .field .lbl { display: block; font-weight: 700; font-size: 14px; margin-bottom: 8px; }
.sizes { display: flex; flex-wrap: wrap; gap: 8px; }
.size { border: 1.5px solid var(--line); background: #fff; color: var(--ink); border-radius: 10px; padding: 10px 12px; cursor: pointer; font-weight: 600; font-size: 14px; }
.size[aria-pressed="true"] { border-color: var(--navy); background: var(--navy); color: #fff; }
.size:disabled { color: #A3AEC0; background: #F1F3F7; cursor: not-allowed; text-decoration: line-through; }
.qty { display: inline-flex; align-items: center; border: 1.5px solid var(--line); border-radius: 999px; background: #fff; }
.qty button { width: 40px; height: 40px; border: 0; background: none; cursor: pointer; font-size: 18px; color: var(--navy); }
.qty input { width: 44px; text-align: center; border: 0; font: 600 16px var(--body); background: none; -moz-appearance: textfield; }
.qty input::-webkit-outer-spin-button, .qty input::-webkit-inner-spin-button { -webkit-appearance: none; margin: 0; }
.note { font-size: 14px; color: var(--muted); }
.note.ok { color: var(--ok); }
.note.err { color: var(--red-dark); }
.pickup { display: flex; gap: 12px; align-items: flex-start; background: #fff; border: 1px solid var(--line); border-radius: 12px; padding: 14px; margin-top: 18px; font-size: 14px; }
.pickup svg { flex: none; margin-top: 2px; }
@media (max-width: 860px) { .product { grid-template-columns: 1fr; gap: 20px; } }

/* Panier */
.cart { display: grid; grid-template-columns: 1fr 340px; gap: 28px; padding: 18px 0 64px; align-items: start; }
.lines { background: #fff; border-radius: var(--radius); box-shadow: var(--shadow); }
.line { display: grid; grid-template-columns: 88px minmax(0, 1fr) auto; gap: 14px; align-items: center; padding: 14px 16px; border-bottom: 1px solid var(--line); }
.line:last-child { border-bottom: 0; }
.line img { width: 88px; height: 64px; object-fit: contain; background: #fff; border-radius: 8px; }
.line h3 { font-size: 16px; }
.line .meta { font-size: 14px; color: var(--muted); }
.line .right { display: flex; flex-direction: column; align-items: end; gap: 8px; }
.link-btn { background: none; border: 0; padding: 0; color: var(--muted); text-decoration: underline; cursor: pointer; font-size: 13px; }
.summary { background: #fff; border-radius: var(--radius); box-shadow: var(--shadow); padding: 18px; position: sticky; top: 88px; }
.summary .row { display: flex; justify-content: space-between; margin: 8px 0; }
.summary .total { font-size: 20px; font-weight: 800; border-top: 1px solid var(--line); padding-top: 12px; margin-top: 12px; }
.empty { background: #fff; border-radius: var(--radius); box-shadow: var(--shadow); padding: 36px; text-align: center; }
@media (max-width: 860px) { .cart { grid-template-columns: 1fr; } .summary { position: static; } .line { grid-template-columns: 72px minmax(0, 1fr); } .line img { width: 72px; } .line .right { grid-column: 1 / -1; flex-direction: row; justify-content: space-between; align-items: center; } }

/* Infos */
.info { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 18px; }
.info div { background: #fff; border-radius: var(--radius); padding: 20px; box-shadow: var(--shadow); }
.info h3 { font-size: 18px; margin-bottom: 6px; }
.info p { margin: 0; color: var(--muted); font-size: 15px; }
@media (max-width: 760px) { .info { grid-template-columns: 1fr; } }

/* Pied de page */
.foot { background: var(--navy); color: #C9D6EA; padding: 36px 0 calc(28px + env(safe-area-inset-bottom, 0px)); margin-top: 20px; font-size: 14px; }
.foot .wrap { display: flex; flex-wrap: wrap; gap: 18px 40px; justify-content: space-between; }
.foot strong { color: #fff; font: 700 18px/1 var(--display); letter-spacing: 0.04em; display: block; margin-bottom: 8px; }
.foot a { color: #fff; }

/* États */
.skeleton { background: linear-gradient(90deg, #EEF1F6 0%, #F7F9FC 50%, #EEF1F6 100%); background-size: 200% 100%; animation: sk 1.2s infinite; border-radius: var(--radius); min-height: 220px; }
@keyframes sk { to { background-position: -200% 0; } }
.toast { position: fixed; left: 50%; bottom: calc(18px + env(safe-area-inset-bottom, 0px)); transform: translateX(-50%) translateY(20px); background: var(--navy); color: #fff; padding: 12px 18px; border-radius: 999px; box-shadow: 0 10px 30px rgba(0,0,0,.25); opacity: 0; transition: .25s; z-index: 50; font-weight: 600; font-size: 14px; max-width: calc(100% - 32px); }
.toast.show { opacity: 1; transform: translateX(-50%) translateY(0); }
.thanks { text-align: center; padding: 70px 0; }
.thanks h1 { font-size: clamp(32px, 5vw, 52px); margin: 14px 0; }
.thanks p { max-width: 36em; margin: 0 auto 22px; color: var(--muted); }
@media (prefers-reduced-motion: reduce) { * { transition: none !important; animation: none !important; } }
@media (max-width: 560px) { .grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; } .card h3 { font-size: 15px; } .card .price { font-size: 15px; } .card .body { padding: 10px 12px 14px; } .tag { left: 8px; top: 8px; font-size: 10px; padding: 6px 7px; } }
