/* =========================================================
   Habitat Modulaire - Design system (phase 1)
   ========================================================= */
/* Polices (hébergées sur le site) : Montserrat pour les titres, Roboto pour le texte, Roboto Condensed italique pour les prix */
@font-face { font-family: "Montserrat"; src: url("/fonts/montserrat-var.woff") format("woff"); font-weight: 500 800; font-style: normal; font-display: swap; }
@font-face { font-family: "Roboto"; src: url("/fonts/roboto-var.woff") format("woff"); font-weight: 300 700; font-style: normal; font-display: swap; }
@font-face { font-family: "CM Price"; src: url("/fonts/roboto-condensed-xbold-italic.woff") format("woff"); font-weight: 800; font-style: italic; font-display: swap; }
:root {
  --navy: #10243A;
  --anthracite: #202A33;
  --white: #FFFFFF;
  --grey: #F4F6F8;
  --green: #0b78c2;      /* couleur d'accent (anciennement verte) : bleu du site */
  --blue: #0b78c2;
  --blue-dark: #0a68a8;
  --sand: #D5B58A;
  --line: #E1E6EB;
  --muted: #5C6B79;
  --radius: 14px;
  --shadow: 0 10px 30px -12px rgba(16, 36, 58, .22);
  --font: "Roboto", system-ui, -apple-system, "Segoe UI", Arial, sans-serif;
  --font-head: "Montserrat", "Roboto", system-ui, -apple-system, "Segoe UI", Arial, sans-serif;
  --font-price: "CM Price", "Roboto Condensed", "Arial Narrow", sans-serif;
  --price-red: #E30613;
  --ease: cubic-bezier(.2, .7, .2, 1);
  --container: 1240px;
}
*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body { margin: 0; font-family: var(--font); color: var(--anthracite); background: var(--white); line-height: 1.6; -webkit-font-smoothing: antialiased; }
img { max-width: 100%; display: block; }
a { color: inherit; text-decoration: none; }
button { font: inherit; cursor: pointer; }
.container { width: min(var(--container), 100% - 2.5rem); margin-inline: auto; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
:focus-visible { outline: 3px solid var(--sand); outline-offset: 2px; }

/* Topbar */
.topbar { background: var(--navy); color: #cfd8e1; font-size: .8rem; }
.topbar .container { display: flex; justify-content: space-between; gap: 1rem; padding-block: .5rem; flex-wrap: wrap; }
.topbar a:hover { color: var(--sand); }

/* Header */
.header { position: sticky; top: 0; z-index: 50; background: rgba(255,255,255,.92); backdrop-filter: blur(12px); border-bottom: 1px solid var(--line); }
.header .container { display: flex; align-items: center; gap: 1.5rem; min-height: 72px; }
.logo { font-weight: 700; letter-spacing: .14em; text-transform: uppercase; font-size: 1.05rem; color: var(--navy); display: flex; align-items: center; gap: .6rem; }
.logo-mark { width: 26px; height: 26px; border: 2px solid var(--green); border-radius: 4px; position: relative; }
.logo-mark::after { content: ""; position: absolute; inset: 5px; background: var(--green); border-radius: 1px; }
.nav { display: flex; gap: 1.4rem; margin-left: auto; font-size: .92rem; }
.nav a { position: relative; padding-block: .4rem; color: var(--anthracite); }
.nav a::after { content: ""; position: absolute; left: 0; bottom: 0; height: 2px; width: 0; background: var(--green); transition: width .3s var(--ease); }
.nav a:hover::after { width: 100%; }
.tools { display: flex; align-items: center; gap: .5rem; }
.tools select, .icon-btn { border: 1px solid var(--line); background: var(--white); border-radius: 999px; height: 38px; padding: 0 .8rem; color: var(--anthracite); font-size: .85rem; transition: border-color .2s, transform .2s var(--ease); }
.icon-btn { width: 38px; padding: 0; display: grid; place-items: center; }
.tools select:hover, .icon-btn:hover { border-color: var(--green); transform: translateY(-1px); }
.menu-toggle { display: none; }

/* Buttons */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: .5rem; border-radius: 999px; padding: .85rem 1.6rem; font-weight: 600; border: 1.5px solid transparent; transition: transform .25s var(--ease), background .25s, color .25s, border-color .25s; min-height: 48px; }
.btn:hover { transform: translateY(-2px); }
.btn-primary { background: var(--green); color: var(--white); }
.btn-primary:hover { background: #0a68a8; }
.btn-ghost { border-color: rgba(255,255,255,.7); color: var(--white); }
.btn-ghost:hover { background: var(--white); color: var(--navy); }
.btn-outline { border-color: var(--navy); color: var(--navy); }
.btn-outline:hover { background: var(--navy); color: var(--white); }

/* Hero */
.hero { position: relative; min-height: min(86vh, 780px); display: grid; align-items: end; color: var(--white); background:
  linear-gradient(180deg, rgba(16,36,58,.25) 0%, rgba(16,36,58,.85) 100%),
  linear-gradient(135deg, #1b3a57 0%, #10243A 55%, #202A33 100%); overflow: hidden; }
.hero.has-image { background-size: cover; background-position: center; }
.hero-note { position: absolute; top: 1rem; right: 1rem; font-size: .72rem; background: rgba(255,255,255,.12); padding: .3rem .7rem; border-radius: 999px; }
.hero-inner { padding-block: 5rem 4rem; max-width: 820px; }
.hero h1 { font-size: clamp(2.2rem, 5.5vw, 4.2rem); line-height: 1.08; margin: 0 0 1.2rem; font-weight: 600; letter-spacing: -.02em; }
.hero p { font-size: clamp(1rem, 1.6vw, 1.2rem); color: #d6dee6; max-width: 640px; margin: 0 0 2rem; }
.hero-actions { display: flex; flex-wrap: wrap; gap: .8rem; margin-bottom: 2rem; }
.search { display: flex; background: var(--white); border-radius: 999px; padding: .35rem; max-width: 560px; box-shadow: var(--shadow); }
.search input { flex: 1; border: 0; background: transparent; padding: 0 1.1rem; font: inherit; color: var(--anthracite); min-width: 0; }
.search input:focus { outline: none; }
.search button { border: 0; background: var(--navy); color: var(--white); border-radius: 999px; padding: .7rem 1.3rem; font-weight: 600; }
.search-results { position: absolute; background: var(--white); color: var(--anthracite); border-radius: 12px; box-shadow: var(--shadow); margin-top: .5rem; width: min(560px, 100%); overflow: hidden; }
.search-wrap { position: relative; max-width: 560px; }
.search-results a { display: block; padding: .7rem 1.1rem; border-bottom: 1px solid var(--line); }
.search-results a:hover { background: var(--grey); }

/* Sections */
section { padding-block: clamp(3.5rem, 8vw, 6.5rem); }
.section-head { max-width: 680px; margin-bottom: 2.5rem; }
.eyebrow { color: var(--green); font-weight: 600; letter-spacing: .14em; text-transform: uppercase; font-size: .78rem; }
h2 { font-size: clamp(1.7rem, 3.4vw, 2.6rem); line-height: 1.15; margin: .5rem 0 1rem; color: var(--navy); letter-spacing: -.015em; }
.lead { color: var(--muted); font-size: 1.05rem; }
.bg-grey { background: var(--grey); }

/* Category cards */
.cat-grid { display: grid; gap: 1.2rem; grid-template-columns: repeat(12, 1fr); }
.cat-card { grid-column: span 4; position: relative; min-height: 300px; border-radius: var(--radius); overflow: hidden; color: var(--white); display: flex; flex-direction: column; justify-content: flex-end; padding: 1.6rem; background: linear-gradient(160deg, #1b3a57, #10243A); transition: transform .4s var(--ease), box-shadow .4s; isolation: isolate; }
.cat-card:nth-child(1), .cat-card:nth-child(4) { grid-column: span 6; }
.cat-card:nth-child(odd)::before { background: linear-gradient(160deg, #0b78c2 -40%, #10243A 70%); }
.cat-card::before { content: ""; position: absolute; inset: 0; background: linear-gradient(160deg, #3a5a73 -40%, #202A33 70%); z-index: -2; transition: transform .6s var(--ease); }
.cat-card::after { content: ""; position: absolute; inset: 0; background: linear-gradient(180deg, transparent 30%, rgba(16,36,58,.75)); z-index: -1; }
.cat-card:hover { transform: translateY(-4px); box-shadow: var(--shadow); }
.cat-card:hover::before { transform: scale(1.06); }
.cat-card h3 { margin: 0 0 .4rem; font-size: 1.3rem; }
.cat-card p { margin: 0 0 .8rem; color: #d6dee6; font-size: .92rem; }
.cat-card .more { color: var(--sand); font-weight: 600; font-size: .9rem; }

/* Product cards */
.tabs { display: flex; gap: .5rem; margin-bottom: 1.8rem; flex-wrap: wrap; }
.tab { border: 1px solid var(--line); background: var(--white); padding: .5rem 1.1rem; border-radius: 999px; font-size: .9rem; }
.tab[aria-selected="true"] { background: var(--navy); color: var(--white); border-color: var(--navy); }
.product-grid { display: grid; gap: 1.4rem; grid-template-columns: repeat(auto-fill, minmax(270px, 1fr)); }
.product-card { background: var(--white); border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; display: flex; flex-direction: column; transition: transform .3s var(--ease), box-shadow .3s; }
.product-card:hover { transform: translateY(-4px); box-shadow: var(--shadow); }
.product-media { aspect-ratio: 4/3; background: var(--grey); position: relative; }
.product-media img { width: 100%; height: 100%; object-fit: cover; }
.badge { position: absolute; top: .8rem; left: .8rem; background: var(--navy); color: var(--white); font-size: .72rem; padding: .2rem .6rem; border-radius: 999px; }
.badge.demo { background: var(--sand); color: var(--navy); }
.fav { position: absolute; top: .7rem; right: .7rem; }
.product-body { padding: 1.1rem 1.2rem 1.3rem; display: flex; flex-direction: column; gap: .5rem; flex: 1; }
.product-ref { font-size: .75rem; color: var(--muted); letter-spacing: .06em; }
.product-body h3 { margin: 0; font-size: 1.08rem; color: var(--navy); }
.specs { display: flex; flex-wrap: wrap; gap: .4rem; margin: 0; padding: 0; list-style: none; }
.specs li { background: var(--grey); border-radius: 6px; font-size: .78rem; padding: .15rem .5rem; }
.price { font-weight: 700; font-size: 1.15rem; color: var(--navy); margin-top: auto; }
.price small { font-weight: 500; color: var(--muted); }
.avail { font-size: .82rem; color: var(--muted); }
.empty { border: 1.5px dashed var(--line); border-radius: var(--radius); padding: 2.5rem; text-align: center; color: var(--muted); background: var(--white); }

/* Custom projects */
.split { display: grid; grid-template-columns: 1.1fr 1fr; gap: 3rem; align-items: center; }
.panel-dark { background: var(--navy); color: var(--white); border-radius: var(--radius); padding: 2.5rem; }
.panel-dark h2 { color: var(--white); }
.panel-dark .lead { color: #cfd8e1; }
.steps { counter-reset: s; list-style: none; padding: 0; margin: 0; display: grid; gap: 1rem; }
.steps li { counter-increment: s; display: flex; gap: 1rem; align-items: flex-start; }
.steps li::before { content: counter(s); flex: none; width: 34px; height: 34px; border-radius: 50%; border: 1.5px solid var(--green); color: var(--green); display: grid; place-items: center; font-weight: 600; }

/* Advantages */
.adv-grid { display: grid; gap: 1.2rem; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); }
.adv { padding: 1.6rem; border: 1px solid var(--line); border-radius: var(--radius); background: var(--white); transition: border-color .3s, transform .3s var(--ease); }
.adv:hover { border-color: var(--green); transform: translateY(-3px); }
.adv h3 { margin: .8rem 0 .4rem; color: var(--navy); font-size: 1.05rem; }
.adv p { margin: 0; color: var(--muted); font-size: .93rem; }
.adv svg { width: 28px; height: 28px; stroke: var(--green); fill: none; stroke-width: 1.5; }

/* Footer */
.footer { background: var(--anthracite); color: #b9c4cf; padding-block: 4rem 2rem; }
.footer-grid { display: grid; gap: 2rem; grid-template-columns: 1.4fr repeat(3, 1fr); }
.footer-grid > * { min-width: 0; }
.newsletter { flex-wrap: wrap; }
.footer h4 { color: var(--white); margin: 0 0 1rem; font-size: .95rem; }
.footer ul { list-style: none; padding: 0; margin: 0; display: grid; gap: .5rem; font-size: .9rem; }
.footer a:hover { color: var(--sand); }
.newsletter { display: flex; gap: .4rem; margin-top: 1rem; }
.newsletter input { flex: 1; min-width: 0; border-radius: 999px; border: 1px solid #3a4651; background: transparent; color: var(--white); padding: .7rem 1rem; }
.consent { font-size: .75rem; margin-top: .5rem; display: flex; gap: .5rem; align-items: flex-start; }
.footer-bottom { border-top: 1px solid #36424d; margin-top: 2.5rem; padding-top: 1.5rem; font-size: .8rem; display: flex; justify-content: space-between; flex-wrap: wrap; gap: 1rem; }
.status-msg { font-size: .85rem; margin-top: .5rem; }

/* Cookie banner */
/* ---------- Barre de consentement (cookies) : carte flottante sombre en verre dépoli ----------
   Sélecteur #cookie.cookie : prioritaire sur les anciennes règles et sur le mode nuit (le design est sombre dans les deux thèmes). */
#cookie.cookie { position: fixed; z-index: 120; left: 0; right: 0; bottom: 1.25rem; width: min(460px, calc(100% - 2.5rem)); max-width: none; margin: 0 auto;
  display: grid; grid-template-columns: auto 1fr; gap: .9rem 1rem; align-items: start;
  padding: 1.15rem 1.15rem 1.05rem; border-radius: 20px; border: 1px solid rgba(255,255,255,.12);
  background: linear-gradient(145deg, rgba(20,44,70,.94), rgba(10,26,44,.94)); color: #e8eef4;
  -webkit-backdrop-filter: blur(14px) saturate(140%); backdrop-filter: blur(14px) saturate(140%);
  box-shadow: 0 24px 60px rgba(4,14,26,.45), 0 2px 0 rgba(255,255,255,.06) inset; font-size: .9rem;
  opacity: 0; visibility: hidden; transform: translateY(24px) scale(.98); pointer-events: none;
  transition: opacity .35s ease, transform .45s cubic-bezier(.2,.8,.2,1), visibility 0s linear .45s; }
#cookie.cookie.show { opacity: 1; visibility: visible; transform: none; pointer-events: auto; transition: opacity .35s ease, transform .45s cubic-bezier(.2,.8,.2,1), visibility 0s; }
#cookie .cookie__icon { width: 44px; height: 44px; border-radius: 14px; display: grid; place-items: center; color: #ffd8a8;
  background: radial-gradient(circle at 30% 25%, rgba(255,214,160,.35), rgba(255,180,90,.12) 60%), rgba(255,255,255,.06); border: 1px solid rgba(255,214,160,.25); }
#cookie .cookie__body { min-width: 0; }
#cookie .cookie__title { display: block; font-family: var(--font-head, inherit); font-size: 1rem; font-weight: 700; color: #fff; margin: .1rem 0 .3rem; letter-spacing: -.01em; }
#cookie .cookie__text { margin: 0; line-height: 1.5; color: #c8d4df; }
#cookie .cookie__text a { color: #fff; font-weight: 600; text-decoration: underline; text-decoration-color: rgba(255,255,255,.4); text-underline-offset: 3px; white-space: nowrap; }
#cookie .cookie__text a:hover { text-decoration-color: #fff; }
#cookie .cookie__actions { grid-column: 1 / -1; display: grid; grid-template-columns: 1fr 1fr; gap: .6rem; }
#cookie .cookie__btn { appearance: none; font: inherit; font-weight: 700; font-size: .92rem; padding: .78rem 1rem; border-radius: 999px; cursor: pointer;
  transition: background .2s ease, color .2s ease, border-color .2s ease, transform .15s ease; }
#cookie .cookie__btn:active { transform: scale(.97); }
#cookie .cookie__btn--ghost { background: transparent; color: #fff; border: 1.5px solid rgba(255,255,255,.35); }
#cookie .cookie__btn--ghost:hover { border-color: #fff; background: rgba(255,255,255,.08); }
#cookie .cookie__btn--solid { background: #fff; color: #0f2236; border: 1.5px solid #fff; }
#cookie .cookie__btn--solid:hover { background: #e9f0f6; border-color: #e9f0f6; }
#cookie .cookie__btn:focus-visible, #cookie .cookie__text a:focus-visible { outline: 3px solid #7cc0ff; outline-offset: 2px; }
@media (max-width: 600px) {
  #cookie.cookie { left: .75rem; right: .75rem; width: auto; margin: 0; padding: 1rem; border-radius: 18px; gap: .75rem .85rem; font-size: .86rem; }
  #cookie .cookie__icon { width: 38px; height: 38px; border-radius: 12px; }
}
@media (prefers-reduced-motion: reduce) { #cookie.cookie, #cookie.cookie.show { transition: none; transform: none; } }

/* Reveal */
.reveal { opacity: 0; transform: translateY(18px); transition: opacity .7s var(--ease), transform .7s var(--ease); }
.reveal.in { opacity: 1; transform: none; }
@media (prefers-reduced-motion: reduce) { * { animation: none !important; transition: none !important; } .reveal { opacity: 1; transform: none; } }

/* Responsive */
@media (max-width: 1024px) {
  .nav { display: none; position: absolute; top: 100%; left: 0; right: 0; background: var(--white); flex-direction: column; padding: 1rem 1.5rem; border-bottom: 1px solid var(--line); gap: .8rem; }
  .nav.open { display: flex; }
  .menu-toggle { display: grid; margin-left: auto; }
  .tools { margin-left: 0; }
  .split { grid-template-columns: 1fr; }
  .footer-grid { grid-template-columns: 1fr 1fr; }
  .cat-card, .cat-card:nth-child(1), .cat-card:nth-child(4) { grid-column: span 6; }
}
@media (max-width: 640px) {
  .topbar .container { justify-content: center; text-align: center; }
  .tools select.country { display: none; }
  .cat-card, .cat-card:nth-child(1), .cat-card:nth-child(4) { grid-column: span 12; min-height: 240px; }
  .footer-grid { grid-template-columns: 1fr; }
  .hero-actions .btn { flex: 1 1 100%; }
}

/* Catégories avec image (accueil) */
.cat-grid.cat-photos { grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 1.1rem; }
.cat-grid.cat-photos .cat-card, .cat-grid.cat-photos .cat-card:nth-child(1), .cat-grid.cat-photos .cat-card:nth-child(4) { grid-column: auto; min-height: 0; padding: 0; background: var(--white); color: var(--anthracite); border: 1px solid var(--line); justify-content: flex-start; }
.cat-grid.cat-photos .cat-card::before, .cat-grid.cat-photos .cat-card::after { display: none; }
.cat-img { aspect-ratio: 4 / 3; background: linear-gradient(160deg, #3a5a73 -40%, #202A33 70%); overflow: hidden; }
.cat-img img { width: 100%; height: 100%; object-fit: cover; display: block; transition: transform .5s var(--ease); }
.cat-card.cat-photo:hover .cat-img img { transform: scale(1.05); }
.cat-body { padding: 1rem 1.1rem 1.2rem; }
.cat-grid.cat-photos .cat-card h3 { margin: 0 0 .35rem; font-size: 1.1rem; color: var(--navy); }
.cat-grid.cat-photos .cat-card p { margin: 0; color: var(--muted); font-size: .95rem; }
.eyebrow::before { content: ""; display: inline-block; width: 2.4rem; height: 2px; background: currentColor; margin-right: .8rem; vertical-align: middle; }

/* Barre d'onglets mobile */
.tabbar { display: none; }
@media (max-width: 720px) {
  .cat-grid.cat-photos { grid-template-columns: repeat(2, 1fr); gap: .9rem; }
  .cat-body { padding: .8rem .9rem 1rem; }
  .cat-grid.cat-photos .cat-card h3 { font-size: 1rem; }
  .section-head h2 { font-size: clamp(1.9rem, 8vw, 2.6rem); line-height: 1.1; }
  .logo { font-size: .8rem; letter-spacing: .06em; white-space: nowrap; gap: .5rem; }
  .header .container { gap: .5rem; }
  .tools { gap: .35rem; }
  .tools select, .icon-btn { padding: 0 .55rem; }
  .menu-toggle { width: 38px; height: 38px; padding: 0; place-items: center; }
  .tools a[data-route="account"], .tools .cart-link { display: none; }
  .tabbar { display: flex; position: fixed; left: 0; right: 0; bottom: 0; z-index: 90; background: var(--white); border-top: 1px solid var(--line); padding-bottom: env(safe-area-inset-bottom); box-shadow: 0 -4px 18px rgba(16, 36, 58, .08); }
  .tabbar a { position: relative; flex: 1; display: flex; flex-direction: column; align-items: center; gap: .2rem; padding: .55rem .25rem .5rem; color: var(--navy); font-size: .75rem; font-weight: 600; text-decoration: none; }
  .tabbar svg { width: 24px; height: 24px; fill: none; stroke: currentColor; stroke-width: 1.7; stroke-linecap: round; stroke-linejoin: round; }
  .tabbar a[aria-current="page"] { color: var(--green); }
  .tabbar .tab-badge { position: absolute; top: .25rem; left: calc(50% + .45rem); min-width: 1.15rem; height: 1.15rem; padding: 0 .25rem; border-radius: 999px; background: var(--green); color: #fff; font-size: .7rem; line-height: 1.15rem; text-align: center; }
  .tabbar .tab-badge:empty { display: none; }
  body.has-tabbar { padding-bottom: calc(66px + env(safe-area-inset-bottom)); }
  #cookie.cookie { bottom: calc(74px + env(safe-area-inset-bottom)); }
}

/* Points forts, rangées par catégorie, FAQ */
.trust { background: var(--navy); color: #fff; }
.trust-list { list-style: none; margin: 0; padding: .9rem 0; display: grid; grid-template-columns: repeat(4, 1fr); gap: 1rem; }
.trust-list li { display: flex; align-items: center; gap: .7rem; font-weight: 600; font-size: .92rem; }
.trust-list svg { flex: none; width: 28px; height: 28px; fill: none; stroke: var(--sand, #d9c7a3); stroke-width: 1.6; stroke-linecap: round; stroke-linejoin: round; }
.cat-row { padding-block: 2rem 1rem; }
.cat-row-head { display: flex; align-items: baseline; justify-content: space-between; gap: 1rem; margin-bottom: 1rem; flex-wrap: wrap; }
.cat-row-head h2 { margin: 0; font-size: 1.5rem; }
.cat-row-head a { color: var(--green); font-weight: 600; }
.faq { max-width: 820px; }
.faq-item { background: var(--white); border: 1px solid var(--line); border-radius: var(--radius); margin-bottom: .7rem; }
.faq-item summary { cursor: pointer; padding: 1rem 1.2rem; font-weight: 600; color: var(--navy); list-style: none; display: flex; justify-content: space-between; gap: 1rem; }
.faq-item summary::after { content: "+"; font-size: 1.3rem; line-height: 1; color: var(--green); }
.faq-item[open] summary::after { content: "–"; }
.faq-item summary::-webkit-details-marker { display: none; }
.faq-item p { margin: 0; padding: 0 1.2rem 1.1rem; color: var(--muted); }
@media (max-width: 720px) {
  .trust-list { grid-template-columns: 1fr 1fr; gap: .8rem; padding: .8rem 0; }
  .trust-list li { font-size: .8rem; gap: .5rem; }
  .trust-list svg { width: 22px; height: 22px; }
  .cat-row-head h2 { font-size: 1.25rem; }
}

/* ---------- Tiroir panier + animation d'ajout ---------- */
.cdrawer-overlay { position: fixed; inset: 0; background: rgba(16, 36, 58, .45); opacity: 0; transition: opacity .25s var(--ease); z-index: 200; }
.cdrawer-overlay.on { opacity: 1; }
.cdrawer { position: fixed; top: 0; right: 0; bottom: 0; width: min(420px, 100%); background: var(--white); z-index: 210; display: flex; flex-direction: column; transform: translateX(100%); transition: transform .25s var(--ease); box-shadow: var(--shadow); outline: none; }
.cdrawer.on { transform: none; }
.cdrawer[hidden], .cdrawer-overlay[hidden] { display: none; }
.cdrawer-lock { overflow: hidden; }
.cdrawer-head { display: flex; align-items: center; justify-content: space-between; padding: 1rem 1.1rem; border-bottom: 1px solid var(--line); }
.cdrawer-head h2 { margin: 0; font-size: 1.15rem; color: var(--navy); }
.cdrawer-list { list-style: none; margin: 0; padding: .5rem 1.1rem; overflow: auto; flex: 1; }
.cdrawer-item { display: flex; gap: .8rem; padding: .85rem 0; border-bottom: 1px solid var(--line); }
.cdrawer-item img, .cdrawer-noimg { width: 72px; height: 72px; object-fit: cover; border-radius: 10px; background: var(--grey); flex: none; }
.cdrawer-info { display: flex; flex-direction: column; gap: .35rem; align-items: flex-start; min-width: 0; }
.cdrawer-info strong { color: var(--navy); overflow-wrap: anywhere; }
.cdrawer-qty { display: inline-flex; align-items: center; gap: .6rem; border: 1px solid var(--line); border-radius: 999px; padding: .1rem .3rem; }
.cdrawer-qty .qty-btn { width: 30px; height: 30px; border: 0; background: transparent; font-size: 1.2rem; line-height: 1; border-radius: 50%; color: var(--navy); }
.cdrawer-qty .qty-btn:hover { background: var(--grey); }
.cdrawer-empty { padding: 2rem 1.1rem; text-align: center; display: grid; gap: 1rem; justify-items: center; flex: 1; align-content: start; }
.cdrawer-foot { padding: 1rem 1.1rem calc(1rem + env(safe-area-inset-bottom)); border-top: 1px solid var(--line); display: grid; gap: .6rem; }
.cdrawer-foot .btn { width: 100%; text-align: center; }
.cfly { position: fixed; z-index: 220; border-radius: 12px; background: var(--grey) center/cover no-repeat; box-shadow: var(--shadow); pointer-events: none; }
.fav.pop { animation: favpop .35s var(--ease); }
@keyframes favpop { 0% { transform: scale(1); } 40% { transform: scale(1.35); } 100% { transform: scale(1); } }
@media (prefers-reduced-motion: reduce) { .cdrawer, .cdrawer-overlay { transition: none; } .fav.pop { animation: none; } }

/* ---------- Récemment consultés ---------- */
.recent { padding: 1.6rem 0 2rem; border-top: 1px solid var(--line); background: var(--grey); }
.recent-head { display: flex; align-items: baseline; justify-content: space-between; gap: 1rem; }
.recent-head h2 { margin: 0 0 .8rem; font-size: 1.15rem; color: var(--navy); }
.recent-list { list-style: none; margin: 0; padding: 0 0 .4rem; display: flex; gap: .9rem; overflow-x: auto; scroll-snap-type: x proximity; }
.recent-list li { flex: 0 0 150px; scroll-snap-align: start; }
.recent-list a { display: grid; gap: .4rem; font-size: .9rem; color: var(--navy); font-weight: 600; }
.recent-list img, .recent-noimg { width: 100%; aspect-ratio: 4 / 3; object-fit: cover; border-radius: 10px; background: var(--white); }
.recent-list span { display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }

/* Logo Casa Modular (image) */
.logo-img { display: block; height: 54px; width: auto; max-width: none; }
.logo:has(.logo-img) { letter-spacing: 0; gap: 0; flex: none; }
.logo--footer .logo-img { height: 76px; }
@media (max-width: 720px) { .logo-img { height: 44px; } .logo--footer .logo-img { height: 64px; } }

/* Cœur des favoris : rouge, vide ou plein */
.fav-heart { display: block; width: 22px; height: 22px; fill: none; stroke: #e0245e; stroke-width: 2; stroke-linejoin: round; transition: transform .2s, fill .15s; }
[aria-pressed="true"] > .fav-heart { fill: #e0245e; }
[data-fav]:hover > .fav-heart { transform: scale(1.1); }
[data-fav].pop > .fav-heart { animation: fav-heartpop .4s ease; }
@keyframes fav-heartpop { 40% { transform: scale(1.35); } 100% { transform: scale(1); } }
[data-fav][aria-pressed="true"] { background: #fff0f4 !important; }

/* Barre d'onglets mobile : barre flottante arrondie, onglet actif en pastille */
@media (max-width: 720px) {
  nav#tabbar.tabbar { left: 10px; right: 10px; bottom: calc(10px + env(safe-area-inset-bottom)); padding: 6px; gap: 4px; border: 1px solid rgba(16, 36, 58, .08); border-radius: 24px;
    background: rgba(255, 255, 255, .9); -webkit-backdrop-filter: saturate(1.6) blur(16px); backdrop-filter: saturate(1.6) blur(16px); box-shadow: 0 14px 34px -14px rgba(6, 36, 64, .45), 0 2px 6px rgba(6, 36, 64, .06); }
  nav#tabbar.tabbar a { flex: 1; flex-direction: column; justify-content: center; gap: 3px; min-height: 56px; padding: 6px 4px; border-radius: 18px; color: #5c6b79; font-size: .7rem; font-weight: 700; letter-spacing: .01em; transition: background .2s, color .2s; -webkit-tap-highlight-color: transparent; }
  nav#tabbar .tab-ic { position: relative; display: flex; align-items: center; justify-content: center; width: 44px; height: 30px; border-radius: 999px; transition: background .2s, transform .2s; }
  nav#tabbar.tabbar svg { width: 23px; height: 23px; stroke-width: 1.9; }
  nav#tabbar.tabbar a[aria-current="page"] { color: #062440; }
  nav#tabbar.tabbar a[aria-current="page"] .tab-ic { background: #062440; color: #fff; }
  nav#tabbar.tabbar a:active .tab-ic { transform: scale(.92); }
  nav#tabbar.tabbar .tab-badge { top: -4px; left: auto; right: 0; min-width: 18px; height: 18px; padding: 0 5px; border: 2px solid #fff; border-radius: 999px; background: #e0245e !important; color: #fff; font-size: .65rem; font-weight: 800; line-height: 14px; box-sizing: border-box; }
  nav#tabbar.tabbar .tab-badge.is-zero, nav#tabbar.tabbar .tab-badge:empty { display: none; }
  body.has-tabbar { padding-bottom: calc(90px + env(safe-area-inset-bottom)); }
  /* le panier est déjà dans la barre : pas de bouton panier flottant en double */
  body.has-tabbar .cart-fab { display: none !important; }
  #cookie.cookie { bottom: calc(92px + env(safe-area-inset-bottom)); }
}
@media (max-width: 720px) {
  body.has-tabbar #chat-btn, body.has-tabbar #chat-panel { bottom: calc(92px + env(safe-area-inset-bottom)) !important; }
}

/* ---------- Typographie : titres en Montserrat ---------- */
h1, h2, h3, h4, .pp-title, .pc-title, .shop-card h3, .sim-slide h3 { font-family: var(--font-head); font-weight: 700; letter-spacing: .01em; }
.pc-title, .shop-card h3 { font-weight: 600; letter-spacing: .02em; }

/* ---------- Étiquette de prix ---------- */
.ptag { display: inline-flex; flex-direction: column; align-items: stretch; width: 100%; max-width: 13rem; border: 3px solid var(--price-red); border-radius: 28px; overflow: hidden; text-align: center; line-height: 1; background: linear-gradient(to top, var(--price-red) 0 30%, transparent 30%); color: #2b2f33; }
.ptag__was { display: block; padding: .5rem .8rem .42rem; font-family: var(--font); font-size: .95rem; font-weight: 500; color: inherit; white-space: nowrap; }
.ptag .ptag__was s { font-size: inherit; color: inherit; text-decoration-thickness: 1.5px; text-decoration-color: currentColor; }
.ptag .ptag__was .ptag__from + s { margin-left: .35em; }
.ptag__now { display: flex; align-items: baseline; justify-content: center; gap: .3rem; margin: 0 -1px -1px; padding: .42rem .9rem .5rem; border-radius: 999px; background: var(--price-red); color: #fff; font-family: var(--font-price); font-style: italic; font-weight: 800; font-size: 1.7rem; letter-spacing: -.01em; white-space: nowrap; font-variant-numeric: lining-nums; }
.ptag .ptag__from { font-family: var(--font); font-style: normal; font-weight: 500; font-size: inherit; color: inherit; letter-spacing: .01em; }
.ptag--solo { border: 0; background: none; }
.ptag--solo .ptag__now { margin: 0; }
.ptag--req { border: 2px solid #c9d2db; background: none; }
.ptag--req .ptag__now { margin: 0; background: transparent; color: var(--muted); font-family: var(--font); font-style: normal; font-weight: 600; font-size: .95rem; padding: .55rem .9rem; white-space: normal; }
.ptag--lg { max-width: 17rem; border-radius: 34px; }
.ptag--lg .ptag__was { font-size: 1.1rem; padding: .6rem 1rem .5rem; }
.ptag--lg .ptag__now { font-size: 2.6rem; padding: .5rem 1.2rem .6rem; }
.ptag--lg.ptag--req .ptag__now { font-size: 1.15rem; }
@media (max-width: 560px) {
  .ptag { border-radius: 22px; border-width: 2.5px; }
  .ptag__was { font-size: .82rem; padding: .4rem .5rem .34rem; }
  .ptag__now { font-size: 1.32rem; padding: .36rem .6rem .42rem; }
  .ptag--lg .ptag__now { font-size: 2.2rem; }
}

/* ---------- Bouton mode jour / nuit ---------- */
.theme-btn { display: inline-flex !important; align-items: center; justify-content: center; gap: .5rem; flex: none; width: 40px; height: 40px; padding: 0; border: 1px solid var(--line); border-radius: 50%; background: #fff; color: #10243A; cursor: pointer; transition: transform .2s, background .2s; }
.theme-btn:hover { transform: rotate(-12deg); }
.theme-btn__ico { display: flex; }
.theme-btn--wide { width: auto; height: auto; margin: 1rem 1rem 1.2rem; padding: .7rem 1rem; border-radius: 14px; font: inherit; font-weight: 600; justify-content: flex-start; }
.theme-btn--wide:hover { transform: none; }
header.header .container > .theme-btn { margin-left: .4rem; }

/* ---------- Pied de page commun à tout le site (même rendu que l'accueil) ---------- */
.site-footer { background: #031b33; color: #94a2af; padding-block: 3.5rem 2rem; }
.site-footer h4 { color: #fff; font-size: 1.3rem; font-weight: 800; margin: 0 0 1.2rem; }
.site-footer ul { list-style: none; padding: 0; margin: 0; display: grid; gap: .85rem; }
.site-footer ul a, .site-footer ul li, .site-footer .footer-contact a { color: #94a2af; font-size: 1rem; text-decoration: none; }
.site-footer ul a:hover, .site-footer .footer-contact a:hover { color: #d3dae2; }
.site-footer p, .site-footer .footer-about { color: #94a2af; margin: 1rem 0 0; line-height: 1.6; }
.site-footer .footer-contact { margin: 1rem 0 0; gap: .35rem; }
.site-footer .footer-bottom { border-top: 1px solid rgba(148,162,175,.2); color: #94a2af; margin-top: 2.5rem; padding-top: 1.5rem; }
@media (max-width: 760px) { .site-footer .footer-grid { gap: 2.5rem; } .site-footer h4 { font-size: 1.35rem; } }
html[data-theme="dark"] .site-footer { background: #020f1d; }

/* ---------- En-tête commun à tout le site (même rendu que l'accueil) ---------- */
.site-topbar { background: #062440; color: #dbe5ef; }
.site-topbar .topbar-msgs { display: flex; justify-content: center; align-items: center; gap: .8rem; padding-block: .5rem; font-size: .82rem; font-weight: 500; text-align: center; flex-wrap: wrap; }
.site-topbar .topbar-sep { opacity: .5; }
.site-header { background: #fff; backdrop-filter: none; }
.site-header .hdr-row { display: flex; align-items: center; gap: 1rem; min-height: 70px; }
.site-header .hdr-row .logo { margin-right: auto; color: #062440; }
.site-header .hdr-row .tools { display: flex; align-items: center; gap: .35rem; }
.site-header .hdr-row .tools select { max-width: 5.5rem; }
.site-header .menu-toggle { display: none; }
.site-header .hdr-nav { border-top: 1px solid var(--line); background: #fff; }
.site-header .hdr-links { display: flex; align-items: center; gap: 1.6rem; overflow-x: auto; scrollbar-width: none; white-space: nowrap; }
.site-header .hdr-links::-webkit-scrollbar { display: none; }
.site-header .hdr-cats { display: contents; }
.site-header .hdr-links a { padding: .85rem 0; font-size: .9rem; font-weight: 600; color: #062440; border-bottom: 2px solid transparent; }
.site-header .hdr-links a:hover { border-bottom-color: #062440; }
.site-header .hdr-search { border-top: 1px solid var(--line); background: #f6f8fb; padding-block: .9rem; }
.site-header .hdr-search .search { max-width: 720px; margin: 0 auto; }
.site-header .hdr-search .search-results { max-width: 720px; margin: .4rem auto 0; position: static; }
@media (max-width: 760px) {
  .site-header .menu-toggle { display: inline-flex; }
  .site-header .hdr-row { gap: .5rem; min-height: 60px; }
  .site-header .hdr-row .tools select.country { display: none; }
  .site-header .hdr-nav { display: none; }
  .site-header .hdr-nav.open { display: block; }
  .site-header .hdr-nav.open .hdr-links { flex-direction: column; align-items: stretch; gap: 0; white-space: normal; }
  .site-header .hdr-nav.open .hdr-links a { padding: .8rem 0; border-bottom: 1px solid var(--line); }
}
html[data-theme="dark"] header.header.site-header { background: #16202b; }
html[data-theme="dark"] .site-header .hdr-row .logo { color: #e7edf3; }
html[data-theme="dark"] .site-header .hdr-nav { border-top: 1px solid #2b3846; background: #16202b; }
html[data-theme="dark"] .site-header .hdr-links a { color: #e7edf3; }
html[data-theme="dark"] .site-header .hdr-search { border-top: 1px solid #2b3846; background: #16202b; }
@media (max-width: 760px) {
  html[data-theme="dark"] .site-header .hdr-nav.open .hdr-links a { border-bottom: 1px solid #2b3846; }
}

/* « Récemment consultés » en haut de l'accueil, avec défilement automatique */
.recent--top { border-top: 0; border-bottom: 1px solid var(--line); padding: 1.4rem 0 1.5rem; }
.recent-list.is-auto { scroll-snap-type: none; scrollbar-width: none; }
.recent-list.is-auto::-webkit-scrollbar { display: none; }
.recent-head .btn-link { padding-top: 0; }
html[data-theme="dark"] .recent--top { border-bottom: 1px solid #2b3846; }
.recent-head .btn-link { background: none; border: 1px solid var(--line); border-radius: 999px; padding: .35rem .9rem; font-size: .85rem; color: var(--muted); }
.recent-head .btn-link:hover { color: var(--navy); border-color: var(--navy); }
html[data-theme="dark"] .recent-head .btn-link { background: none; border-color: #34475a; color: #a9b8c6; }
html[data-theme="dark"] .recent-head .btn-link:hover { color: #fff; border-color: #a9b8c6; }

/* Sélecteur de devise (affichage indicatif) */
.tools select.currency { max-width: 5.5rem; }
.fx-note { margin: .35rem 0 0; font-size: .82rem; line-height: 1.45; color: var(--muted); }
.cm-currency-wrap { display: flex; align-items: center; justify-content: space-between; gap: .8rem; margin: 0 1rem 1.2rem; padding: .7rem 1rem; border: 1px solid var(--line); border-radius: 14px; font-weight: 600; }
.cm-currency-wrap select { border: 1px solid var(--line); border-radius: 999px; height: 36px; padding: 0 .8rem; font: inherit; background: var(--white); color: var(--anthracite); }
@media (max-width: 760px) { .site-header .hdr-row .tools select.currency { display: none; } }
html[data-theme="dark"] .cm-currency-wrap { border-color: #2b3846; color: #e7edf3; }
html[data-theme="dark"] .cm-currency-wrap select { background: #0f1a26; color: #e7edf3; border-color: #34475a; }
html[data-theme="dark"] .fx-note { color: #a9b8c6; }
