/* =========================================================
   TRUCKBLOCS — feuille de style principale
   Charte : orange #f97316 · noir · gris ardoise
   Polices : Barlow Condensed (titres) · Inter (texte)
   ========================================================= */
:root {
  --orange: #f97316;
  --orange-dark: #ea580c;
  --black: #000;
  --ink: #0f172a;
  --slate-800: #1e293b;
  --slate-700: #334155;
  --slate-600: #475569;
  --slate-500: #64748b;
  --slate-300: #cbd5e1;
  --slate-200: #e2e8f0;
  --slate-100: #f1f5f9;
  --slate-50: #f8fafc;
  --bg: #f5f5f5;
  --white: #fff;
  --border: #e6e6e6;
  --font-head: "Barlow Condensed", sans-serif;
  --font-body: Inter, sans-serif;
  --page: 1440px;
  --gutter: 40px;
}
@media (max-width: 749px) { :root { --gutter: 16px; } }

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
body {
  margin: 0;
  font-family: var(--font-body);
  font-size: 15px;
  line-height: 1.55;
  color: var(--black);
  background: var(--bg);
  -webkit-font-smoothing: antialiased;
}
img, video { max-width: 100%; display: block; }
a { color: inherit; text-decoration: none; }
button { font: inherit; cursor: pointer; }
h1, h2, h3, h4 { font-family: var(--font-head); font-weight: 700; line-height: 1.05; margin: 0; }
.wrap { max-width: var(--page); margin: 0 auto; padding: 0 var(--gutter); }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

/* ---------- Boutons ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  min-height: 46px; padding: 0 26px;
  font-family: var(--font-body); font-size: 13px; font-weight: 500; letter-spacing: .02em; text-transform: uppercase;
  border: 1px solid var(--orange); background: var(--orange); color: #fff;
  transition: background .2s, border-color .2s, color .2s;
}
.btn:hover { background: var(--black); border-color: var(--black); }
.btn--ghost { background: transparent; color: var(--black); }
.btn--ghost:hover { background: var(--orange); color: #fff; border-color: var(--orange); }
.btn--block { width: 100%; }
.btn[disabled] { opacity: .5; pointer-events: none; }

/* ---------- Bandeau annonce ---------- */
.announce {
  background: #000; color: #fff; text-align: center;
  font-size: 13px; padding: 9px var(--gutter); line-height: 1.35;
}
.announce b { font-weight: 700; }

/* ---------- En-tête ---------- */
.header {
  position: sticky; top: 0; z-index: 50;
  background: var(--bg);
  transition: background .25s, box-shadow .25s;
}
.header__inner {
  max-width: var(--page); margin: 0 auto; padding: 0 var(--gutter);
  height: 76px; display: grid; grid-template-columns: 1fr auto 1fr; align-items: center; gap: 24px;
}
.header__logo img { height: 30px; width: auto; }
.header__logo .logo-light { display: none; }
.nav { display: flex; gap: 22px; align-items: center; }
.nav__dd { display: flex; align-items: center; }
.nav a {
  font-family: var(--font-head); font-weight: 600; font-size: 18px; color: var(--slate-700);
  position: relative; padding: 6px 0; white-space: nowrap;
}
.nav a:hover, .nav a[aria-current="page"] { color: var(--black); }
.nav__dd { position: relative; }
.nav__dd-panel {
  position: absolute; top: 100%; left: -18px; min-width: 230px;
  background: #fff; border: 1px solid var(--border); box-shadow: 0 18px 40px rgba(0,0,0,.08);
  padding: 10px 0; display: none;
}
.nav__dd:hover .nav__dd-panel, .nav__dd:focus-within .nav__dd-panel { display: block; }
.nav__dd-panel a { display: block; padding: 8px 18px; font-size: 17px; color: var(--slate-700); }
.nav__dd-panel a:hover { color: var(--orange); }
.header__icons { display: flex; justify-content: flex-end; align-items: center; gap: 6px; }
.icon-btn {
  position: relative; width: 40px; height: 40px; display: grid; place-items: center;
  background: none; border: 0; color: inherit;
}
.icon-btn svg { width: 20px; height: 20px; }
.cart-count {
  position: absolute; top: 3px; right: 1px; min-width: 18px; height: 18px; padding: 0 5px;
  border-radius: 9px; background: var(--orange); color: #fff;
  font-size: 11px; font-weight: 700; line-height: 18px; text-align: center;
}
.cart-count[hidden] { display: none; }
.burger { display: none; }

/* En-tête transparent sur la page d'accueil */
.topbar { display: contents; }
.is-home .topbar { display: block; position: absolute; top: 0; left: 0; right: 0; z-index: 50; }
.is-home .header { position: relative; background: transparent; color: #fff; }
.is-home .header .nav a { color: #fff; }
.is-home .header .logo-light { display: block; }
.is-home .header .logo-dark { display: none; }
.is-home .header.is-solid { position: fixed; top: 0; left: 0; right: 0; background: var(--bg); color: var(--black); box-shadow: 0 1px 0 var(--border); }
.is-home .header.is-solid .nav a { color: var(--slate-700); }
.is-home .header.is-solid .logo-light { display: none; }
.is-home .header.is-solid .logo-dark { display: block; }

@media (max-width: 1100px) {
  .header__inner { grid-template-columns: auto 1fr auto; }
  .nav { display: none; }
  .burger { display: grid; }
}
.mnav {
  position: fixed; inset: 0; z-index: 90; background: rgba(0,0,0,.4);
  opacity: 0; pointer-events: none; transition: opacity .25s;
}
.mnav.is-open { opacity: 1; pointer-events: auto; }
.mnav__panel {
  position: absolute; top: 0; left: 0; bottom: 0; width: min(340px, 88vw); background: #fff; color: #000;
  padding: 22px 24px; overflow-y: auto; transform: translateX(-100%); transition: transform .3s;
}
.mnav.is-open .mnav__panel { transform: none; }
.mnav__panel a { display: block; font-family: var(--font-head); font-weight: 600; font-size: 24px; padding: 10px 0; border-bottom: 1px solid var(--border); }
.mnav__panel a.sub { font-family: var(--font-body); font-size: 15px; font-weight: 400; padding: 8px 0 8px 16px; color: var(--slate-600); }
.mnav__close { margin-left: auto; margin-bottom: 8px; }

/* ---------- Hero accueil ---------- */
.hero { position: relative; min-height: 600px; height: 72vh; max-height: 820px; color: #fff; overflow: hidden; }
.hero img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.hero::after { content: ""; position: absolute; inset: 0; background: linear-gradient(90deg, rgba(0,0,0,.35), rgba(0,0,0,0) 55%); }
.hero__inner { position: relative; z-index: 1; height: 100%; max-width: var(--page); margin: 0 auto; padding: 150px var(--gutter) 60px; display: flex; align-items: center; }
.hero h1 { font-size: clamp(52px, 7vw, 92px); font-weight: 700; max-width: 7.2em; line-height: .98; letter-spacing: -.01em; }
@media (max-width: 749px) { .hero { min-height: 520px; height: 80vh; } .hero img { object-position: 65% center; } }

.intro { text-align: center; padding: 34px var(--gutter) 44px; }
.intro p { max-width: 1180px; margin: 0 auto 30px; font-size: 15px; line-height: 1.7; }

/* ---------- Grilles produits ---------- */
.section { padding: 34px 0; }
.section__head { display: flex; justify-content: space-between; align-items: baseline; gap: 20px; margin-bottom: 18px; }
.section__head h2 { font-size: clamp(28px, 3vw, 38px); text-transform: uppercase; }
.link-orange { color: var(--orange); font-size: 14px; }
.link-orange:hover { text-decoration: underline; }
.grid { display: grid; gap: 8px; grid-template-columns: repeat(6, 1fr); }
.grid--4 { grid-template-columns: repeat(4, 1fr); }
@media (max-width: 1100px) { .grid { grid-template-columns: repeat(3, 1fr); } .grid--4 { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 600px) { .grid { grid-template-columns: repeat(2, 1fr); } }

.card { position: relative; display: flex; flex-direction: column; }
.card__media { position: relative; aspect-ratio: 1; background: #fff; overflow: hidden; }
.card__media img { width: 100%; height: 100%; object-fit: cover; transition: opacity .35s, transform .5s; }
.card__media img.alt { position: absolute; inset: 0; opacity: 0; }
.card:hover .card__media img.alt { opacity: 1; }
.card__add {
  position: absolute; left: 10px; right: 10px; top: 0;
  margin-top: calc(100% - 50px); /* % = largeur de la carte = hauteur de l'image carrée */
  min-height: 40px; border: 0; background: var(--orange); color: #fff;
  font-size: 12px; font-weight: 600; text-transform: uppercase; letter-spacing: .03em;
  opacity: 0; transform: translateY(6px); transition: opacity .2s, transform .2s, background .2s;
}
.card:hover .card__add, .card__add:focus-visible { opacity: 1; transform: none; }
.card__add:hover { background: #000; }
@media (hover: none) { .card__add { opacity: 1; transform: none; position: static; margin-top: 8px; width: 100%; } .card { justify-content: flex-start; } .card__add { margin-top: auto; } .card__price { margin-bottom: 8px; } }
.card__title { font-size: 13px; margin: 10px 0 2px; line-height: 1.35; }
.card__price { font-family: var(--font-head); font-weight: 600; font-size: 15px; }
.card__price small { font-family: var(--font-body); font-weight: 400; font-size: 11px; color: var(--slate-500); }

/* ---------- Bannière collection ---------- */
.col-banner { position: relative; background: #000; color: #fff; overflow: hidden; }
.col-banner img { width: 100%; height: 300px; object-fit: cover; opacity: .9; }
.col-banner__text { position: absolute; inset: 0; display: flex; align-items: flex-end; padding: 0 var(--gutter) 34px; max-width: var(--page); margin: 0 auto; }
.col-banner h1 { font-size: clamp(34px, 4.5vw, 58px); text-transform: uppercase; text-shadow: 0 2px 20px rgba(0,0,0,.35); }
.chips { display: flex; flex-wrap: wrap; gap: 8px; margin: 26px 0 8px; }
.chip { border: 1px solid var(--border); background: #fff; padding: 8px 16px; border-radius: 30px; font-size: 13px; }
.chip.is-active, .chip:hover { background: #000; color: #fff; border-color: #000; }

/* ---------- Page produit ---------- */
.product { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 34px; padding-top: 0; padding-bottom: 50px; }
.gallery { display: grid; grid-template-columns: 1fr 1fr; gap: 0; align-content: start; }
.gallery button { border: 0; padding: 0; background: #fff; aspect-ratio: 1; overflow: hidden; }
.gallery button:first-child { grid-column: 1 / -1; }
.gallery img { width: 100%; height: 100%; object-fit: cover; }
.pinfo { position: sticky; top: 96px; align-self: start; padding-top: 18px; }
.pinfo h1 { font-size: clamp(34px, 3.4vw, 46px); text-transform: uppercase; margin-bottom: 14px; }
.pinfo__price { font-family: var(--font-head); font-weight: 600; font-size: 22px; }
.pinfo__price small { font-family: var(--font-body); font-size: 12px; font-weight: 400; color: var(--slate-500); margin-left: 6px; }
.pinfo__sku { font-size: 12px; color: var(--slate-600); margin: 6px 0 4px; }
.buy { display: grid; grid-template-columns: auto 1fr 1fr; gap: 10px; margin-top: 26px; }
.qty { display: flex; align-items: center; border: 1px solid var(--border); background: #fff; height: 46px; }
.qty button { width: 40px; height: 100%; background: none; border: 0; font-size: 18px; }
.qty input { width: 40px; border: 0; text-align: center; font: inherit; background: transparent; -moz-appearance: textfield; }
.qty input::-webkit-outer-spin-button, .qty input::-webkit-inner-spin-button { -webkit-appearance: none; }
.reassure { margin-top: 18px; display: grid; gap: 8px; font-size: 13px; color: var(--slate-600); }
.reassure div { display: flex; gap: 10px; align-items: center; }
.reassure svg { width: 18px; height: 18px; color: var(--orange); flex: none; }
@media (max-width: 900px) {
  .product { grid-template-columns: 1fr; }
  .pinfo { position: static; }
  .buy { grid-template-columns: auto 1fr; }
  .buy .btn:last-child { grid-column: 1 / -1; }
}

/* ---------- Tiroir panier / devis ---------- */
.drawer { position: fixed; inset: 0; z-index: 100; pointer-events: none; }
.drawer__overlay { position: absolute; inset: 0; background: rgba(0,0,0,.4); opacity: 0; transition: opacity .25s; }
.drawer__panel {
  position: absolute; top: 0; right: 0; bottom: 0; width: min(440px, 100vw);
  background: #fff; display: flex; flex-direction: column;
  transform: translateX(100%); transition: transform .3s cubic-bezier(.2,.7,.2,1);
}
.drawer.is-open { pointer-events: auto; }
.drawer.is-open .drawer__overlay { opacity: 1; }
.drawer.is-open .drawer__panel { transform: none; }
.drawer__head { display: flex; align-items: center; justify-content: space-between; padding: 20px 24px; border-bottom: 1px solid var(--border); }
.drawer__head h2 { font-size: 26px; text-transform: uppercase; }
.drawer__body { flex: 1; overflow-y: auto; padding: 8px 24px; }
.drawer__foot { padding: 18px 24px 24px; border-top: 1px solid var(--border); }
.drawer__note { font-size: 12px; color: var(--slate-500); margin: 8px 0 14px; line-height: 1.45; }
.line { display: grid; grid-template-columns: 76px 1fr auto; gap: 14px; padding: 16px 0; border-bottom: 1px solid var(--border); align-items: start; }
.line img { width: 76px; height: 76px; object-fit: cover; background: var(--slate-50); }
.line__title { font-size: 14px; font-weight: 500; line-height: 1.3; }
.line__price { font-size: 13px; color: var(--slate-600); margin-top: 3px; }
.line .qty { height: 34px; width: max-content; margin-top: 8px; }
.line .qty button { width: 30px; font-size: 15px; }
.line .qty input { width: 30px; font-size: 13px; }
.line__rm { background: none; border: 0; color: var(--slate-500); font-size: 12px; text-decoration: underline; padding: 0; margin-top: 2px; }
.line__rm:hover { color: #000; }
.line__total { font-family: var(--font-head); font-weight: 600; font-size: 16px; white-space: nowrap; }
.empty { text-align: center; padding: 60px 10px; }
.empty h3 { font-size: 28px; text-transform: uppercase; margin-bottom: 18px; }
.sumrow { display: flex; justify-content: space-between; align-items: baseline; font-size: 14px; }
.sumrow strong { font-family: var(--font-head); font-size: 22px; }

/* ---------- Toast ---------- */
.toast {
  position: fixed; left: 50%; bottom: 24px; z-index: 120; transform: translate(-50%, 20px);
  background: #000; color: #fff; padding: 12px 18px; font-size: 14px; display: flex; gap: 14px; align-items: center;
  opacity: 0; pointer-events: none; transition: opacity .25s, transform .25s; max-width: calc(100vw - 32px);
}
.toast.is-on { opacity: 1; transform: translate(-50%, 0); pointer-events: auto; }
.toast a { color: var(--orange); font-weight: 600; white-space: nowrap; }

/* ---------- Page demande de devis ---------- */
.quote { display: grid; grid-template-columns: minmax(0, 1.1fr) minmax(0, .9fr); gap: 40px; padding: 40px 0 70px; align-items: start; }
.quote h1 { font-size: clamp(38px, 4vw, 54px); text-transform: uppercase; }
.quote h1 span { color: var(--orange); }
.quote__lead { color: var(--slate-600); margin: 10px 0 24px; max-width: 60ch; }
.panel { background: #fff; border: 1px solid var(--border); padding: 26px; }
.panel h2 { font-size: 24px; text-transform: uppercase; margin-bottom: 4px; }
.panel h2 + p { color: var(--slate-500); font-size: 13px; margin: 0 0 18px; }
.quote__sum { position: sticky; top: 96px; }
.quote .line:last-of-type { border-bottom: 0; }
.steps { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; margin: 0 0 26px; }
.steps div { background: #fff; border: 1px solid var(--border); border-top: 3px solid var(--orange); padding: 14px; font-size: 13px; color: var(--slate-600); }
.steps b { display: block; font-family: var(--font-head); font-size: 18px; color: #000; text-transform: uppercase; margin-bottom: 2px; }
.form { display: grid; grid-template-columns: 1fr 1fr; gap: 14px 16px; }
.form .full { grid-column: 1 / -1; }
.field label { display: block; font-size: 12px; font-weight: 600; text-transform: uppercase; letter-spacing: .04em; margin-bottom: 6px; color: var(--slate-700); }
.field label i { font-style: normal; color: var(--orange); }
.field input, .field select, .field textarea {
  width: 100%; font: inherit; font-size: 15px; padding: 12px 14px; border: 1px solid var(--slate-300); background: #fff; color: #000; border-radius: 0;
}
.field textarea { min-height: 110px; resize: vertical; }
.field input:focus, .field select:focus, .field textarea:focus { outline: 2px solid var(--orange); outline-offset: -1px; border-color: var(--orange); }
.radio-row { display: flex; gap: 10px; flex-wrap: wrap; }
.radio-row label { display: flex; align-items: center; gap: 8px; border: 1px solid var(--slate-300); background: #fff; padding: 10px 14px; font-size: 14px; text-transform: none; letter-spacing: 0; font-weight: 400; color: #000; cursor: pointer; margin: 0; }
.radio-row input { accent-color: var(--orange); width: auto; }
.consent { display: flex; gap: 10px; font-size: 12px; color: var(--slate-600); align-items: flex-start; }
.consent input { accent-color: var(--orange); margin-top: 3px; }
.form-msg { font-size: 14px; padding: 12px 14px; display: none; }
.form-msg.err { display: block; background: #fef2f2; color: #991b1b; border: 1px solid #fecaca; }
.hp { position: absolute; left: -9999px; }
.success { text-align: center; padding: 70px 20px 90px; max-width: 640px; margin: 0 auto; }
.success__icon { width: 74px; height: 74px; border-radius: 50%; background: var(--orange); color: #fff; display: grid; place-items: center; margin: 0 auto 22px; }
.success__icon svg { width: 36px; height: 36px; }
.success h1 { font-size: clamp(38px, 5vw, 56px); text-transform: uppercase; margin-bottom: 14px; }
.success p { color: var(--slate-600); }
.success .ref { display: inline-block; margin: 14px 0 26px; font-family: var(--font-head); font-size: 22px; background: #fff; border: 1px dashed var(--orange); padding: 8px 18px; }
@media (max-width: 900px) {
  .quote { grid-template-columns: 1fr; }
  .quote__sum { position: static; order: -1; }
  .form { grid-template-columns: 1fr; }
  .steps { grid-template-columns: 1fr; }
}

/* ---------- Newsletter ---------- */
.newsletter { background: #ebebeb; text-align: center; padding: 56px var(--gutter); }
.newsletter h2 { color: #000; font-size: clamp(34px, 4vw, 48px); text-transform: uppercase; }
.newsletter p { margin: 10px 0 24px; font-size: 14px; }
.newsletter form { max-width: 680px; margin: 0 auto; position: relative; }
.newsletter input { width: 100%; height: 58px; border: 1px solid #000; border-radius: 40px; padding: 0 70px 0 28px; font: inherit; background: #fff; }
.newsletter button { position: absolute; right: 8px; top: 8px; width: 42px; height: 42px; border-radius: 50%; border: 0; background: none; display: grid; place-items: center; }
.newsletter button:hover { background: var(--orange); color: #fff; }
.newsletter .ok { margin-top: 14px; font-weight: 600; color: var(--orange-dark); }

/* ---------- Pied de page bas ---------- */
.copy { background: var(--bg); font-size: 11px; padding: 18px var(--gutter); }

/* Plein écran image produit */
.lightbox { position: fixed; inset: 0; z-index: 130; background: rgba(255,255,255,.97); display: none; place-items: center; padding: 30px; }
.lightbox.is-open { display: grid; }
.lightbox img { max-height: 90vh; width: auto; }
.lightbox .icon-btn { position: absolute; top: 14px; right: 14px; }

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

/* ---------- Recherche ---------- */
.search { position: fixed; inset: 0; z-index: 110; background: rgba(0,0,0,.45); padding: 70px 16px 16px; }
.search[hidden] { display: none; }
.search__box { max-width: 720px; margin: 0 auto; background: #fff; }
.search__bar { display: flex; align-items: center; gap: 10px; padding: 8px 8px 8px 18px; border-bottom: 1px solid var(--border); }
.search__bar > svg { width: 20px; height: 20px; flex: none; }
.search__bar input { flex: 1; border: 0; font: inherit; font-size: 17px; padding: 10px 0; outline: none; }
.search__res { max-height: 60vh; overflow-y: auto; }
.search__res a { display: grid; grid-template-columns: 52px 1fr auto; gap: 14px; align-items: center; padding: 10px 18px; border-bottom: 1px solid var(--slate-100); font-size: 14px; }
.search__res a:hover { background: var(--slate-50); }
.search__res img { width: 52px; height: 52px; object-fit: cover; }
.search__res b { font-family: var(--font-head); font-size: 16px; }
.search__none { padding: 18px; color: var(--slate-500); margin: 0; }

/* Titres en capitales comme le thème d'origine */
h1, h2, h3, h4, h5, h6 { text-transform: uppercase; }
.tb-intro-text p { margin: 0 0 10px; }

/* Accueil : menu lisible sur la photo */
.is-home .header:not(.is-solid) { background: linear-gradient(180deg, rgba(0,0,0,.55) 0%, rgba(0,0,0,.25) 70%, rgba(0,0,0,0) 100%); }
.is-home .header:not(.is-solid) .nav > a,
.is-home .header:not(.is-solid) .nav__dd > a { color: #fff; text-shadow: 0 1px 8px rgba(0,0,0,.6); }
.is-home .header:not(.is-solid) .nav > a:hover,
.is-home .header:not(.is-solid) .nav__dd > a:hover { color: var(--orange); }
.is-home .header:not(.is-solid) .icon-btn { filter: drop-shadow(0 1px 4px rgba(0,0,0,.6)); }
/* Sous-menu : texte foncé sur fond blanc, partout */
.is-home .header .nav__dd-panel a { color: var(--slate-700); text-shadow: none; }
.is-home .header .nav__dd-panel a:hover { color: var(--orange); }

/* ---------- SEO / accessibilité ---------- */
.skip { position: absolute; left: -9999px; top: 0; z-index: 200; background: #000; color: #fff; padding: 10px 16px; }
.skip:focus { left: 10px; top: 10px; }
.crumbs { display: flex; flex-wrap: wrap; gap: 8px; font-size: 12px; color: var(--slate-500); padding: 16px 0 10px; }
.crumbs a:hover { color: var(--orange); }
.crumbs [aria-current] { color: var(--slate-700); }
.col-banner + .section .crumbs { padding-top: 16px; }
.col-intro { max-width: 820px; color: var(--slate-600); margin: 4px 0 0; line-height: 1.65; }
.card__title { font-family: var(--font-body); font-weight: 400; text-transform: none; }
.drawer__head .h2 { font-family: var(--font-head); font-weight: 700; font-size: 26px; text-transform: uppercase; margin: 0; line-height: 1; }

/* Bouton administrateur */
.admin-edit { position: fixed; left: 16px; bottom: 16px; z-index: 95; display: inline-flex; align-items: center; gap: 8px; background: #0f172a; color: #fff; font-size: 13px; font-weight: 600; padding: 10px 16px; border-radius: 30px; box-shadow: 0 8px 24px rgba(0,0,0,.25); }
.admin-edit:hover { background: var(--orange); }
.copy a[href="/admin/"] { color: inherit; opacity: .7; }
.copy a[href="/admin/"]:hover { opacity: 1; color: var(--orange); }

/* Devis PDF */
.devis-cta { margin: 0 auto 26px; max-width: 520px; }
.devis-cta .btn { min-height: 52px; font-size: 14px; }
.devis-note { font-size: 13px; color: var(--slate-500); margin: 10px 0 0; }
