/* =========================
   PIECES EVO — styles.css (CLEAN)
   - Un seul set de règles (pas de doublons)
   - Espacement uniforme (sections + grilles)
   - Header / topbar / mobile nav stables
   - MobileBar + Modals au bon z-index
   - Cards / catégories / nouveautés / marques cohérents
   ========================= */

/* ===== Variables ===== */
:root{
  --bg:#ffffff;
  --surface:#f6f7f9;
  --text:#0f172a;
  --muted:#64748b;
  --border:rgba(15,23,42,.12);

  --accent:#f37021;   /* orange logo */
  --accent2:#0b1220;  /* bleu très foncé */

  --radius:18px;
  --shadow:0 16px 40px rgba(2,6,23,.12);
  --shadowSm:0 10px 22px rgba(2,6,23,.10);

  --max:1100px;

  /* spacing */
  --sectionPad:70px;
  --gridGap:20px;
}

/* ===== Base ===== */
*{ box-sizing:border-box; }
html{ scroll-behavior:smooth; }
html,body{ width:100%; max-width:100%; overflow-x:hidden; }

body{
  margin:0;
  font-family:ui-sans-serif,system-ui,-apple-system,"Segoe UI",Roboto,Helvetica,Arial;
  color:var(--text);
  background:var(--bg);
  line-height:1.6;
  -webkit-font-smoothing:antialiased;
  text-rendering:optimizeLegibility;
}

a{ color:inherit; text-decoration:none; }
img{ max-width:100%; height:auto; }

/* Container */
.wrap{
  width:100%;
  max-width:var(--max);
  margin:0 auto;
  padding:0 18px;
}

/* Sections */
.section{ padding:var(--sectionPad) 0; }

/* Typography */
.h1{ font-size:clamp(30px,3.4vw,52px); letter-spacing:-.03em; line-height:1.05; margin:0; }
.h2{ font-size:clamp(22px,2.3vw,34px); letter-spacing:-.02em; margin:0 0 12px; }
.lead{ color:rgba(15,23,42,.82); font-size:1.06rem; max-width:75ch; margin:10px 0 0; }
.tag{ color:var(--muted); font-weight:900; letter-spacing:-.01em; }

/* Helpers */
.centerText{ text-align:center; }
.centerText .lead{ margin-left:auto; margin-right:auto; }

/* Cards / grids */
.card{
  background:#fff;
  border:1px solid var(--border);
  border-radius:var(--radius);
  box-shadow:var(--shadowSm);
  overflow:hidden;
}

.grid{ display:grid; gap:var(--gridGap); }
.grid.cols-2{ grid-template-columns:repeat(2,minmax(0,1fr)); }
.grid.cols-3{ grid-template-columns:repeat(3,minmax(0,1fr)); }
.grid.cols-4{ grid-template-columns:repeat(4,minmax(0,1fr)); }

@media (max-width:900px){
  .grid.cols-4{ grid-template-columns:repeat(2,minmax(0,1fr)); }
  .grid.cols-3{ grid-template-columns:repeat(2,minmax(0,1fr)); }
  .grid.cols-2{ grid-template-columns:1fr; }
}
@media (max-width:520px){
  .grid.cols-4,.grid.cols-3{ grid-template-columns:1fr; }
}

/* Buttons */
.btn{
  display:inline-flex;
  align-items:center;
  justify-content:center;
  gap:10px;

  padding:12px 16px;
  border-radius:999px;
  border:1px solid transparent;

  font-weight:900;
  cursor:pointer;
  user-select:none;

  transition:transform .12s ease, box-shadow .12s ease, opacity .12s ease, background .12s ease;
  -webkit-tap-highlight-color:transparent;
}
.btn:hover{ transform:translateY(-1px); opacity:.98; }

.btn.primary{ background:var(--accent); color:#fff; box-shadow:var(--shadowSm); }
.btn.dark{ background:var(--accent2); color:#fff; box-shadow:var(--shadowSm); }
.btn.ghost{ background:transparent; border:1px solid var(--border); color:var(--text); box-shadow:none; }

/* Pills */
.pill{
  display:inline-flex;
  align-items:center;
  gap:10px;
  padding:10px 14px;
  border-radius:999px;
  border:1px solid var(--border);
  background:#fff;
}

/* =========================
   TOPBAR
   ========================= */
.topbar{
  background:var(--accent2);
  color:rgba(255,255,255,.92);
  border-bottom:1px solid rgba(255,255,255,.08);
  font-size:13px;
}
.topbarInner{
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:12px;
  padding:10px 0;
}
.topTagline{
  line-height:1.2;
  font-weight:800;
  white-space:normal; /* IMPORTANT */
}
.topbar .nousOnLa{
  color:var(--accent) !important;
  font-weight:900;
}
.topRight{
  display:flex;
  align-items:center;
  gap:10px;
  flex-wrap:wrap;
  justify-content:flex-end;
}
.topLink{
  display:inline-flex;
  align-items:center;
  gap:8px;
  padding:6px 10px;
  border-radius:999px;
  color:#fff;
  background:rgba(255,255,255,.06);
  border:1px solid rgba(255,255,255,.12);
}
.topLink:hover{
  transform:translateY(-1px);
  background:rgba(255,255,255,.10);
  border-color:rgba(255,255,255,.18);
}
.topLinkAccent{
  background:#fff;
  color:var(--accent2);
  font-weight:900;
}
.topLinkLogo{
  display:flex;
  align-items:center;
  padding:4px 10px;
  border-radius:10px;
  background:#fff;
  border:1px solid var(--border);
  transition:transform .15s ease, box-shadow .15s ease;
}
.topLinkLogo img{ height:24px; width:auto; display:block; }
.topLinkLogo:hover{ transform:translateY(-1px); box-shadow:var(--shadowSm); }

@media (max-width:860px){
  .topTagline{ display:none; } /* topbar clean sur mobile */
  .topbarInner{ padding:8px 0; }
}

/* =========================
   HEADER / NAV
   (utilise: .mainHeader .headerInner .navlinks .navcta .burger)
   ========================= */
.mainHeader{
  position:sticky;
  top:0;
  z-index:900;
  background:rgba(255,255,255,.92);
  backdrop-filter:blur(12px);
  border-bottom:1px solid var(--border);
  box-shadow:0 6px 18px rgba(2,6,23,.06);
}

.headerInner{
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:18px;
  padding:14px 0;
  position:relative;
}

.headerLogo{ display:flex; align-items:center; }
.headerLogo img{
  height:95px;         /* logo imposant */
  width:auto;
  max-width:320px;
  object-fit:contain;
  display:block;
}
@media (min-width:1100px){
  .headerLogo img{ height:95px; }
}
@media (max-width:860px){
  .headerLogo img{ height:60px; }
}

/* Menu desktop */
.navlinks{
  display:flex;
  gap:6px;
  flex-wrap:wrap;
  align-items:center;
}
.navlinks a{
  padding:10px 12px;
  border-radius:999px;
  font-weight:900;
  color:var(--text);
  transition:background .12s ease, color .12s ease;
}
.navlinks a:hover{
  background:rgba(15,23,42,.06);
  color:var(--accent);
}
.navlinks a.active{
  background:rgba(15,23,42,.08);
  color:var(--accent);
}

.navcta{
  display:flex;
  gap:10px;
  align-items:center;
  flex-wrap:wrap;
}

.burger{ display:none; }

/* Dropdown mobile */
@media (max-width:860px){
  .burger{ display:inline-flex; }

  .navlinks{
    display:none;
    position:absolute;
    left:0; right:0;
    top:calc(100% + 10px);
    background:#fff;
    border:1px solid var(--border);
    border-radius:16px;
    box-shadow:var(--shadowSm);
    padding:10px;
    flex-direction:column;
    gap:6px;
    z-index:9000;
  }
  .navlinks.isOpen{ display:flex; }
  .navlinks a{ width:100%; justify-content:flex-start; }
}

/* =========================
   HERO (Accueil)
   ========================= */
.hero{
  background:
    radial-gradient(1000px 420px at 50% -120px, rgba(243,107,33,.15), transparent 70%),
    linear-gradient(#fff,#fff);
}
.hero .wrap{ padding:44px 18px 10px; }

.heroRow{
  display:grid;
  grid-template-columns:1.25fr .75fr; /* si tu as une side card */
  gap:18px;
  align-items:stretch;
}
.home .heroRow{ grid-template-columns:1fr; } /* tu voulais 1 colonne sur home */

@media (max-width:900px){
  .heroRow{ grid-template-columns:1fr; }
}

.heroCard{
  padding:26px;
  border-radius:var(--radius);
  background:#fff;
  border:1px solid var(--border);
  box-shadow:var(--shadowSm);
}
.heroCard.centerText{ text-align:center; }
.heroCard.centerText .lead{ margin-left:auto; margin-right:auto; }

.heroActions{
  display:flex;
  gap:10px;
  flex-wrap:wrap;
  margin-top:16px;
}
.heroCard.centerText .heroActions{ justify-content:center; }

/* =========================
   CATÉGORIES (Accueil)
   HTML: <a class="card catRow"> <div class="catImg"><img> </div> <div class="catText">...</div>
   ========================= */
.categoriesSection .grid{ gap:var(--gridGap); }

.catRow{
  display:grid;
  grid-template-columns:180px 1fr; /* image | texte */
  gap:16px;
  align-items:center;
  padding:16px;
  text-align:left;
}
.catImg{
  width:100%;
  height:120px;
  border-radius:16px;
  overflow:hidden;
  border:1px solid var(--border);
  background:#f3f4f6;
  display:flex;
  align-items:center;
  justify-content:center;
}
.catImg img{
  width:100%;
  height:100%;
  object-fit:cover;
  object-position:center;
  display:block;
}
.catText{ display:flex; flex-direction:column; justify-content:center; }
.catText h3{ margin:0; font-size:1.2rem; font-weight:900; }
.catText p{ margin:6px 0 0; color:rgba(15,23,42,.75); }

.catRow:hover{ box-shadow:var(--shadow); transform:translateY(-2px); transition:.2s ease; }

@media (max-width:768px){
  .catRow{
    grid-template-columns:100px 1fr;
    gap:12px;
    padding:12px;
  }
  .catImg{ height:90px; }
  .catText h3{ font-size:1.05rem; }
  .catText p{ font-size:.95rem; }
}

/* === OPTION: centrer catégories sur desktop (si tu veux vraiment tout centré)
   Ajoute class="centerCats" sur <body> si tu veux activer.
*/
@media (min-width:861px){
  body.centerCats .catRow{ text-align:center; grid-template-columns:1fr; }
  body.centerCats .catImg{ height:160px; max-width:320px; margin:0 auto; }
  body.centerCats .catText{ align-items:center; }
}

/* =========================
   NOUVEAUTÉS (Accueil) — .newProduct
   ========================= */
.newProduct{
  display:grid;
  grid-template-columns:160px 1fr;
  gap:16px;
  padding:16px;
  align-items:center;
}
.newProductMedia{
  display:flex;
  align-items:center;
  justify-content:center;
}
.newProductMedia img{
  max-width:100%;
  max-height:160px;
  object-fit:contain;
  display:block;
}
.newProductBody h3{
  margin:6px 0 6px;
  font-size:1.15rem;
  font-weight:900;
}
.newProductBody p{
  margin:0 0 10px;
  color:rgba(15,23,42,.75);
  font-size:.95rem;
}

.newProduct:hover{ box-shadow:var(--shadow); transform:translateY(-2px); transition:.2s ease; }

@media (max-width:900px){
  .grid.cols-3{ grid-template-columns:1fr; } /* nouveautés en 1 colonne mobile */
  .newProduct{ grid-template-columns:110px 1fr; }
}
@media (max-width:700px){
  .newProduct{ grid-template-columns:1fr; text-align:center; }
  .newProductMedia img{ max-height:140px; }
}

/* =========================
   FEATURES — .featuresGrid .feature
   ========================= */
.featuresGrid{
  display:grid;
  grid-template-columns:repeat(2,1fr);
  gap:var(--gridGap);
  align-items:stretch;
}
.feature{
  padding:18px;
  display:flex;
  flex-direction:column;
  gap:6px;
}
.icon{
  width:44px;height:44px;
  border-radius:14px;
  display:grid;
  place-items:center;
  background:rgba(243,107,33,.12);
  border:1px solid rgba(243,107,33,.18);
  color:var(--accent);
  font-weight:900;
  margin-bottom:10px;
}
.feature h3{ margin:0 0 6px; letter-spacing:-.02em; }
.feature p{ margin:0; color:rgba(15,23,42,.78); }

@media (max-width:768px){
  .featuresGrid{ grid-template-columns:1fr; }
}

/* =========================
   MARQUES — .brandGrid .brandLogo
   ========================= */
.brandGrid{
  display:grid;
  grid-template-columns:repeat(auto-fill,minmax(160px,1fr));
  gap:22px;
  align-items:center;
}
.brandLogo{
  background:#fff;
  border:1px solid var(--border);
  border-radius:16px;
  padding:18px;
  min-height:120px;
  display:flex;
  align-items:center;
  justify-content:center;
  text-align:center;
}
.brandLogo img{
  display:block;
  max-width:100%;
  max-height:70px;
  width:auto;
  height:auto;
  object-fit:contain;
  opacity:.95;
  transition:transform .2s ease, opacity .2s ease;
  pointer-events:none;
  user-select:none;
  -webkit-user-drag:none;
}
.brandLogo:hover img{
  opacity:1;
  transform:scale(1.05);
}

/* =========================
   CATALOGUES — .catalogGrid .catalogCard
   ========================= */
.catalogGrid{
  display:grid;
  grid-template-columns:repeat(3,minmax(0,1fr));
  gap:14px;
  margin-top:14px;
}
@media (max-width:980px){ .catalogGrid{ grid-template-columns:repeat(2,minmax(0,1fr)); } }
@media (max-width:640px){ .catalogGrid{ grid-template-columns:1fr; } }

.catalogCard{
  padding:18px;
  display:flex;
  flex-direction:column;
  gap:12px;
}

.catTop{ display:flex; gap:12px; align-items:center; }
.catLogo{
  width:44px;height:44px;
  border-radius:12px;
  border:1px solid var(--border);
  background:#fff;
  object-fit:contain;
  flex:0 0 auto;
}
.catTitle{ font-weight:900; line-height:1.15; }
.catDesc{ margin:0; color:rgba(15,23,42,.78); }

.catActions{
  display:flex;
  gap:10px;
  flex-wrap:wrap;
  margin-top:4px;
}

@media (min-width:861px){
  /* look pro desktop: centré */
  .catalogCard{ text-align:center; }
  .catalogCard .catTop{ flex-direction:column; align-items:center; }
  .catalogCard .catActions{ justify-content:center; }
  .catalogCard .catDesc{ margin-left:auto; margin-right:auto; max-width:60ch; }
}

/* Filtres catalogues */
.catalogFilters{
  display:flex;
  gap:10px;
  flex-wrap:wrap;
  justify-content:center;
  margin:18px 0 6px;
}
.filterBtn{
  border:1px solid var(--border);
  background:#fff;
  padding:8px 14px;
  border-radius:999px;
  font-weight:800;
  cursor:pointer;
  box-shadow:var(--shadowSm);
  transition:transform .12s ease;
}
.filterBtn:hover{ transform:translateY(-1px); }
.filterBtn.active{
  background:#111;
  color:#fff;
  border-color:#111;
}

/* =========================
   FORMS / MODAL
   ========================= */
.field{ display:grid; gap:6px; margin-bottom:12px; }
.field label{ font-weight:900; font-size:.92rem; }
.field input,.field textarea,.field select{
  border:1px solid var(--border);
  border-radius:14px;
  padding:12px 12px;
  font:inherit;
  width:100%;
}

.row2{ display:grid; grid-template-columns:1fr 1fr; gap:12px; }
@media (max-width:640px){ .row2{ grid-template-columns:1fr; } }

.formStatus{
  display:none;
  padding:12px;
  border:1px solid var(--border);
  border-radius:14px;
  background:#fff;
}

/* Modal overlay */
.modalBg{
  position:fixed;
  inset:0;
  background:rgba(2,6,23,.55);
  display:none;
  align-items:center;
  justify-content:center;
  padding:14px;
  z-index:10000;
}
.modalBg.isOpen{ display:flex !important; }

.modal{
  width:100%;
  max-width:720px;
  max-height:88vh;
  overflow:hidden;
  display:flex;
  flex-direction:column;
  background:#fff;
  border-radius:22px;
  border:1px solid var(--border);
  box-shadow:var(--shadow);
}
@media (min-width:861px){ .modal{ max-height:82vh; } }

.modalHead{
  display:flex;
  align-items:center;
  justify-content:space-between;
  padding:16px 18px;
  border-bottom:1px solid var(--border);
  background:#fff;
}
.modalBody{
  overflow:auto;
  -webkit-overflow-scrolling:touch;
  padding:18px;
}
.xbtn{
  border:1px solid var(--border);
  background:#fff;
  border-radius:999px;
  padding:8px 12px;
  cursor:pointer;
  font-weight:900;
}

/* lock scroll */
html.isLocked, body.isLocked{ overflow:hidden !important; }

/* =========================
   MOBILE BAR (sticky CTA)
   ========================= */
.mobileBar{
  position:fixed;
  left:0; right:0; bottom:0;
  padding:10px 12px;
  background:#000;
  border-top:1px solid rgba(255,255,255,.12);
  box-shadow:0 -10px 20px rgba(2,6,23,.08);
  display:none;
  z-index:9500;
  pointer-events:auto;
  transform:translateZ(0);
}
.mobileBar .wrap{
  display:grid;
  grid-template-columns:1fr 1fr 1fr;
  gap:10px;
  padding:0 6px;
}
.mobileBar .btn{ width:100%; box-shadow:none; color:#fff; }
.mobileBar .btn.ghost{ border-color:rgba(255,255,255,.35); }

@media (max-width:860px){
  .mobileBar{ display:block; }
  body{ padding-bottom:78px; }
}
@media (min-width:861px){
  .mobileBar{ display:none !important; }
}

/* =========================
   FOOTER (full width)
   ========================= */
footer{
  width:100%;
  background:#000;
  color:#fff;
  border-top:1px solid rgba(255,255,255,.10);
  padding:32px 0;
  margin:0;
}
footer .wrap{
  display:flex;
  flex-direction:column;
  align-items:center;
  justify-content:center;
  text-align:center;
  gap:12px;
}
.footerLogo{
  height:70px;
  width:auto;
  max-width:340px;
  object-fit:contain;
  display:block;
  opacity:.95;
}
footer,footer p,footer div,footer span{ color:rgba(255,255,255,.85); }
@media (max-width:768px){
  .footerLogo{ height:56px; max-width:280px; }
}

/* =========================
   Z-INDEX SAFETY (clics OK)
   ========================= */
header, .mainHeader, .mobileBar, .modalBg { pointer-events:auto; }
/* dropdown nav sous la modal */
@media (max-width:860px){
  .navlinks{ z-index:9000; }
}
/* modal au dessus de tout */
.modalBg{ z-index:10000; }

/* =========================
   FIX: "home" dans toutes les pages
   => On utilise page-home seulement pour l'accueil
   ========================= */

/* HERO layout par défaut */
.heroRow{
  display:grid;
  grid-template-columns:1fr;
  gap:18px;
  align-items:stretch;
}

/* Accueil seulement (si tu veux une side card un jour) */
.page-home .heroRow{
  grid-template-columns:1fr; /* (ou 1.25fr .75fr si tu remets une side card) */
}

/* Pneus seulement (si tu veux une side card) */
.page-pneus .heroRow{
  grid-template-columns:1fr; /* ou 1.25fr .75fr */
}


/* Accueil seulement */
.page-home .heroRow{
  grid-template-columns: 1fr !important;
}

/

/* =========================================================
   PATCH PNEUS — remettre la page "comme avant"
   À COLLER TOUT EN BAS de styles.css
   ========================================================= */
.page-pneus .heroActions{ justify-content:flex-start; }
.page-pneus .card{ text-align:left; }



/* ✅ Centrer SEULEMENT les cards où tu ajoutes la classe */
.card.centerCard{ text-align:center; }
.card.centerCard p,
.card.centerCard .lead{
  margin-left:auto;
  margin-right:auto;
  max-width:70ch;
}
.card.centerCard img{
  display:block;
  margin-left:auto;
  margin-right:auto;
}
.card.centerCard .heroActions,
.card.centerCard .catActions{
  justify-content:center;
}

/* ✅ Centrer seulement un bloc texte (ex: hero) */
.centerText{ text-align:center; }
.centerText .lead{ margin-left:auto; margin-right:auto; max-width:70ch; }

/* ✅ Pneus = pas centré même si d’autres pages le sont */
.page-pneus .card{ text-align:left; }
.page-pneus .lead, 
.page-pneus p{ max-width:none; margin-left:0; margin-right:0; }
.page-pneus .heroActions{ justify-content:flex-start; }

/* ===== FAQ (pneus) – styles manquants ===== */
.faqList{ display:grid; gap:10px; margin-top:12px; }

.faqBtn{
  width:100%;
  text-align:left;
  border:1px solid var(--border);
  background:#fff;
  padding:12px 14px;
  border-radius:16px;
  box-shadow: var(--shadowSm);
  cursor:pointer;
  font-weight:800;
  transition:transform .12s ease, box-shadow .12s ease;
}
.faqBtn:hover{ transform:translateY(-1px); box-shadow:var(--shadow); }

.faqModalImg{
  width:100%;
  height:auto;
  border-radius:16px;
  border:1px solid var(--border);
  display:none;      /* montré via JS quand une image existe */
  margin:0 0 12px;
  object-fit:contain;
  background:#fff;
}

.tuxmat-banner{
  background:url('image-tuxmat.jpg') center/cover no-repeat;
  min-height:500px;
  display:flex;
  align-items:center;
  color:white;
}

.overlay{
  background:rgba(0,0,0,0.55);
  padding:60px;
  width:100%;
}

.btn{
  background:#ff5a00;
  color:white;
  padding:15px 30px;
  text-decoration:none;
  font-weight:bold;
  border-radius:5px;
}