/* Auto-hébergé (RGPD) : évite de charger fonts.googleapis.com/gstatic.com à
   chaque page, qui transmettrait l'IP du visiteur à Google sans consentement.
   Fichiers variables (poids 400-800 dans un seul fichier par sous-ensemble),
   extraits une fois depuis la même famille Inter déjà utilisée. */
@font-face {
  font-family: "Inter";
  font-style: normal;
  font-weight: 400 800;
  font-display: swap;
  src: url("/css/fonts/inter-latin.woff2") format("woff2");
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}

@font-face {
  font-family: "Inter";
  font-style: normal;
  font-weight: 400 800;
  font-display: swap;
  src: url("/css/fonts/inter-latin-ext.woff2") format("woff2");
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}

:root {
  --bg: #f5f7fb;
  --surface: #ffffff;
  --surface-alt: #f6eeed;
  --surface-strong: #0f172a;
  --primary: #8b1310;
  --primary-deep: #6a0e0c;
  --primary-soft: rgba(139, 19, 16, 0.1);
  --accent: #19b38a;
  --text: #10213a;
  --muted: #5f6f8b;
  --border: rgba(16, 33, 58, 0.08);
  --shadow: 0 18px 40px rgba(16, 33, 58, 0.08);
  --radius: 22px;
  --radius-sm: 14px;
  --container: 1180px;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  font-family: "Inter", Arial, sans-serif;
  background: var(--bg);
  color: var(--text);
}

a {
  color: inherit;
  text-decoration: none;
}

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

button, input, select {
  font: inherit;
}

.container {
  width: min(var(--container), calc(100% - 32px));
  margin: 0 auto;
}

/* Header / nav */

.topbar {
  position: sticky;
  top: 0;
  z-index: 20;
  background: rgba(245, 247, 251, 0.85);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--border);
}

.nav-wrap {
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: 82px;
  gap: 16px;
}

.brand {
  display: flex;
  align-items: center;
  gap: 12px;
}

.brand-mark {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  width: 42px;
  height: 42px;
  border-radius: 12px;
  flex-shrink: 0;
  box-shadow: var(--shadow);
}

.brand-mark img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.brand-name {
  display: block;
  font-size: 1.05rem;
  font-weight: 800;
}

.brand small {
  display: block;
  color: var(--muted);
  font-size: 0.68rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.main-nav {
  display: flex;
  align-items: center;
  gap: 24px;
  color: var(--muted);
  font-weight: 600;
}

.main-nav a {
  transition: color 0.2s ease;
}

.main-nav a.is-active,
.main-nav a:hover,
.main-nav a:focus-visible {
  color: var(--text);
}

.actions {
  display: flex;
  align-items: center;
  gap: 16px;
}

.lang-switch {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px;
  border: 1px solid var(--border);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.6);
}

.lang-btn {
  border: none;
  background: transparent;
  color: var(--muted);
  padding: 8px 10px;
  border-radius: 999px;
  cursor: pointer;
  transition: all 0.2s ease;
  font-weight: 700;
  font-size: 0.78rem;
}

.lang-btn.is-active {
  background: var(--surface-strong);
  color: #fff;
}

/* Buttons */

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0.9rem 1.4rem;
  border-radius: 12px;
  border: 1px solid transparent;
  font-weight: 700;
  cursor: pointer;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.btn:hover,
.btn:focus-visible {
  transform: translateY(-1px);
}

.btn[hidden] {
  display: none;
}

.btn-primary {
  background: linear-gradient(135deg, var(--primary) 0%, #b8342c 100%);
  color: #fff;
  box-shadow: 0 12px 24px rgba(139, 19, 16, 0.23);
}

.btn-secondary {
  background: #fff;
  border-color: var(--border);
  color: var(--text);
}

/* Hero */

.hero {
  padding: 50px 0 30px;
}

.hero-grid {
  display: grid;
  grid-template-columns: 1.05fr 0.95fr;
  align-items: center;
  gap: 36px;
}

.eyebrow {
  display: inline-block;
  margin-bottom: 14px;
  font-size: 0.76rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--primary);
}

.hero-copy h1 {
  margin: 0;
  font-size: clamp(2.4rem, 4vw, 3.6rem);
  line-height: 1.05;
  letter-spacing: -0.04em;
}

.hero-copy p {
  margin-top: 20px;
  max-width: 560px;
  font-size: 1.08rem;
  line-height: 1.7;
  color: var(--muted);
}

.hero-copy .lead {
  margin-top: 14px;
  font-weight: 700;
  font-size: 1.2rem;
  color: var(--text);
}

.cta-row {
  display: flex;
  flex-wrap: wrap;
  gap: 14px;
  margin-top: 28px;
}

.hero-visual {
  position: relative;
  border-radius: 30px;
  overflow: hidden;
  box-shadow: var(--shadow);
  min-height: 420px;
}

.hero-visual img {
  width: 100%;
  height: 100%;
  min-height: 420px;
  object-fit: cover;
}

/* Bloc "Nos produits" du catalogue — volontairement compact (pas un hero
   marketing) : demande explicite du porteur de projet après un premier
   essai jugé trop haut pour une page catalogue, où la hauteur doit aller
   aux produits, pas à l'en-tête. Plus d'image ici (déplacée en pied de
   page) ni de "eyebrow" (jugé redondant avec le H1 "Nos produits"). */
.catalog-intro {
  padding: 28px 0 4px;
}

.catalog-intro h1 {
  font-size: clamp(1.7rem, 2.6vw, 2.3rem);
  line-height: 1.15;
  letter-spacing: -0.03em;
}

.catalog-intro .lead {
  margin: 10px 0 0;
  font-weight: 700;
  font-size: 1rem;
  color: var(--text);
}

.catalog-intro p:not(.lead) {
  margin: 4px 0 0;
  max-width: 640px;
  color: var(--muted);
  font-size: 0.92rem;
  line-height: 1.5;
}

/* Page produit individuelle (SEO — voir PLAN.md §1). */

.breadcrumb {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  padding: 20px 0 0;
  font-size: 0.82rem;
  color: var(--muted);
}

.breadcrumb a {
  color: var(--muted);
  text-decoration: none;
}

.breadcrumb a:hover {
  color: var(--primary);
  text-decoration: underline;
}

.breadcrumb span[aria-current] {
  color: var(--text);
  font-weight: 600;
}

.product-detail {
  max-width: 900px;
  margin: 0 auto;
}

.product-detail .product-image {
  height: 340px;
}

.back-to-catalog {
  display: inline-block;
  margin: 18px 0 0;
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--primary);
  text-decoration: none;
}

.back-to-catalog:hover {
  text-decoration: underline;
}

/* Sections */

.section {
  padding: 90px 0;
}

.section-alt {
  background: linear-gradient(180deg, rgba(238, 244, 255, 0.7), rgba(255, 255, 255, 0));
}

.section-heading {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 24px;
  margin-bottom: 28px;
}

.section-heading h1,
.section-heading h2 {
  margin: 0;
  font-size: clamp(1.9rem, 3vw, 2.7rem);
  letter-spacing: -0.04em;
}

.narrow {
  justify-content: center;
  text-align: center;
}

.text-link {
  color: var(--primary);
  font-weight: 700;
}

/* About / showcase split */

.showcase-grid {
  display: grid;
  grid-template-columns: 1fr 1.06fr;
  gap: 34px;
  align-items: center;
}

.showcase-copy h2 {
  margin: 0;
  font-size: clamp(2rem, 2.8vw, 2.8rem);
  letter-spacing: -0.04em;
}

.showcase-copy p {
  color: var(--muted);
  line-height: 1.8;
  margin: 18px 0 0;
}

.showcase-image {
  overflow: hidden;
  border-radius: 28px;
  box-shadow: var(--shadow);
}

.showcase-image img {
  width: 100%;
  height: 100%;
  min-height: 380px;
  object-fit: cover;
}

/* Feature / value grid */

.feature-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 22px;
}

.feature-grid.services {
  grid-template-columns: repeat(4, minmax(0, 1fr));
}

.feature-card {
  background: rgba(255, 255, 255, 0.82);
  border: 1px solid var(--border);
  border-radius: 22px;
  padding: 26px 22px;
}

.feature-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 52px;
  height: 52px;
  border-radius: 16px;
  background: var(--primary-soft);
  color: var(--primary);
  font-weight: 800;
}

.feature-card h3 {
  margin: 18px 0 10px;
  font-size: 1.25rem;
  letter-spacing: -0.03em;
}

.feature-card p {
  margin: 0;
  color: var(--muted);
  line-height: 1.7;
}

/* CTA banner */

.cta-banner {
  background: var(--surface-strong);
  border-radius: var(--radius);
  padding: 56px 48px;
  text-align: center;
  color: #fff;
}

.cta-banner h2 {
  margin: 0 0 12px;
  font-size: clamp(1.7rem, 2.6vw, 2.4rem);
}

.cta-banner p {
  margin: 0 auto 26px;
  max-width: 560px;
  color: rgba(255, 255, 255, 0.75);
}

/* Contact */

.contact-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 22px;
}

.contact-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 22px;
  padding: 26px;
}

.contact-card span {
  display: block;
  color: var(--muted);
  font-size: 0.8rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  margin-bottom: 8px;
}

.contact-card strong {
  font-size: 1.1rem;
}

.contact-card-action {
  display: flex;
  align-items: center;
  justify-content: center;
}

.contact-card-action .btn {
  width: 100%;
}

/* Catalog */

.type-tabs {
  display: inline-flex;
  gap: 4px;
  padding: 5px;
  margin-bottom: 22px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 999px;
  box-shadow: 0 4px 14px rgba(16, 33, 58, 0.04);
}

.type-tab {
  border: none;
  background: transparent;
  color: var(--muted);
  padding: 11px 20px;
  border-radius: 999px;
  font-weight: 700;
  font-size: 0.92rem;
  cursor: pointer;
  transition: all 0.2s ease;
}

.type-tab.is-active {
  background: var(--primary);
  color: #fff;
}

.category-filters {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-bottom: 26px;
}

.filter-btn {
  border: 1px solid var(--border);
  background: rgba(255, 255, 255, 0.65);
  color: var(--muted);
  padding: 10px 16px;
  border-radius: 999px;
  cursor: pointer;
  transition: all 0.2s ease;
}

.filter-btn.is-active {
  background: var(--text);
  color: #fff;
  border-color: var(--text);
}

.attribute-filters {
  display: flex;
  flex-wrap: wrap;
  gap: 18px;
  align-items: center;
  margin: -8px 0 26px;
  padding: 14px 18px;
  background: var(--surface-alt);
  border-radius: 14px;
}

.attribute-filters[hidden] {
  display: none;
}

.attribute-filter {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 0.85rem;
}

.attribute-filter label {
  color: var(--muted);
  font-weight: 600;
}

.attribute-filter select {
  padding: 6px 10px;
  border-radius: 8px;
  border: 1px solid var(--border);
  font: inherit;
}

.attribute-filter-checkbox {
  display: flex;
  align-items: center;
  gap: 6px;
  cursor: pointer;
}

.attribute-filter-checkbox input {
  width: auto;
}

.configurator {
  margin-top: 16px;
}

.configurator[hidden] {
  display: none;
}

.configurator-selects {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
  align-items: center;
}

.configurator-selects label {
  font-size: 0.72rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: var(--muted);
}

.configurator-select {
  padding: 8px 10px;
  border-radius: 8px;
  border: 1px solid var(--border);
  font: inherit;
  font-size: 0.85rem;
}

.configurator-result .sales-block:first-of-type {
  margin-top: 10px;
}

.configurator-hint {
  margin: 12px 0 0;
  font-size: 0.82rem;
  color: var(--muted);
  font-style: italic;
}

.product-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 22px;
}

.product-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 22px;
  overflow: hidden;
  box-shadow: 0 8px 25px rgba(16, 33, 58, 0.04);
}

.product-image {
  position: relative;
  height: 220px;
  overflow: hidden;
  background: #ffffff;
}

.product-image img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  padding: 14px;
}

.product-image.placeholder {
  height: 220px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--surface-alt);
  color: var(--muted);
  font-size: 0.85rem;
  font-weight: 600;
  text-align: center;
  padding: 12px;
}

.product-image.has-viewer {
  cursor: zoom-in;
}

.product-image.has-viewer:hover img {
  transform: scale(1.04);
}

.product-image.has-viewer img {
  transition: transform 0.2s ease;
}

.product-image.has-viewer:focus-visible {
  outline: 3px solid var(--primary);
  outline-offset: -3px;
}

.image-dots {
  position: absolute;
  top: 10px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 2;
  display: flex;
  gap: 6px;
  padding: 5px 8px;
  border-radius: 999px;
  background: rgba(9, 17, 29, 0.45);
}

.image-dot {
  width: 7px;
  height: 7px;
  padding: 0;
  border: none;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.55);
  cursor: pointer;
  transition: background 0.2s ease, transform 0.2s ease;
}

.image-dot:hover,
.image-dot:focus-visible {
  background: rgba(255, 255, 255, 0.85);
  outline: none;
}

.image-dot.is-active {
  background: #fff;
  transform: scale(1.25);
}

.gradient-swatch {
  background: linear-gradient(90deg, #8b00ff, #0000ff, #00b300, #ffe000, #ff8c00, #ff0000);
}

.color-gradient-badge {
  position: absolute;
  bottom: 8px;
  right: 8px;
  z-index: 2;
  width: 36px;
  height: 14px;
  border-radius: 4px;
  border: 1px solid rgba(255, 255, 255, 0.7);
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.25);
}

.color-gradient-badge[hidden] {
  display: none;
}

.product-body {
  padding: 18px 18px 20px;
}

.tag {
  display: inline-flex;
  align-items: center;
  padding: 7px 10px;
  border-radius: 999px;
  font-size: 0.7rem;
  font-weight: 700;
  letter-spacing: 0.02em;
  background: var(--primary-soft);
  color: var(--primary-deep);
}

.product-card h3 {
  margin: 16px 0 10px;
  font-size: 1.35rem;
  letter-spacing: -0.03em;
}

.product-card p {
  margin: 0;
  color: var(--muted);
  line-height: 1.7;
  min-height: 52px;
}

.sales-block {
  margin-top: 16px;
  padding: 12px 14px;
  border-radius: 14px;
  border: 1px solid var(--border);
}

.sales-block + .sales-block {
  margin-top: 10px;
}

.sales-stock {
  background: rgba(25, 179, 138, 0.08);
  border-color: rgba(25, 179, 138, 0.25);
}

.sales-custom {
  background: var(--primary-soft);
  border-color: rgba(139, 19, 16, 0.2);
}

.sales-badge {
  display: inline-flex;
  align-items: center;
  padding: 4px 9px;
  border-radius: 999px;
  font-size: 0.66rem;
  font-weight: 700;
  letter-spacing: 0.03em;
  text-transform: uppercase;
}

.sales-badge-stock {
  background: var(--accent);
  color: #fff;
}

.sales-badge-custom {
  background: var(--primary);
  color: #fff;
}

.sales-row {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 10px;
  margin-top: 10px;
  color: var(--muted);
  font-size: 0.88rem;
}

.sales-row strong {
  color: var(--text);
  font-size: 1.1rem;
}

.sales-note {
  margin-top: 6px;
  color: var(--muted);
  font-size: 0.8rem;
}

.quote-note {
  font-style: italic;
}

.reference-short-desc {
  white-space: pre-line;
  color: var(--text);
}

.reference-article-name {
  margin-top: 6px;
  font-weight: 700;
  color: var(--text);
}

.product-materials {
  margin-top: 12px;
  color: var(--muted);
  font-size: 0.82rem;
}

.empty-state {
  padding: 60px 24px;
  text-align: center;
  color: var(--muted);
  background: var(--surface);
  border: 1px dashed var(--border);
  border-radius: var(--radius);
}

/* Footer */

.site-footer {
  background: #09111d;
  color: rgba(255, 255, 255, 0.8);
  padding: 48px 0 32px;
}

.footer-grid {
  display: grid;
  grid-template-columns: 0.8fr 1.1fr 0.7fr 0.9fr;
  gap: 20px;
}

.footer-image-col .showcase-image {
  border-radius: 16px;
  margin: 0;
}

.footer-image-col .showcase-image img {
  min-height: 0;
  height: auto;
}

.footer-brand .brand-name,
.site-footer h4 {
  color: #fff;
}

.site-footer p,
.site-footer li {
  color: rgba(255, 255, 255, 0.7);
  line-height: 1.8;
}

.site-footer ul {
  list-style: none;
  padding: 0;
  margin: 0;
}

.footer-bottom {
  margin-top: 28px;
  padding-top: 20px;
  border-top: 1px solid rgba(255, 255, 255, 0.1);
  font-size: 0.82rem;
  color: rgba(255, 255, 255, 0.5);
  display: flex;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 10px;
}

/* Responsive */

@media (max-width: 980px) {
  .hero-grid,
  .showcase-grid {
    grid-template-columns: 1fr;
  }

  .main-nav {
    display: none;
  }

  .feature-grid,
  .feature-grid.services,
  .product-grid,
  .contact-grid,
  .footer-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 640px) {
  .section {
    padding: 64px 0;
  }

  .nav-wrap {
    flex-wrap: wrap;
    padding: 14px 0;
  }

  .actions {
    width: 100%;
    justify-content: space-between;
  }

  .lang-switch {
    flex: 1;
    justify-content: center;
  }

  .feature-grid,
  .feature-grid.services,
  .product-grid,
  .contact-grid,
  .footer-grid {
    grid-template-columns: 1fr;
  }

  .section-heading {
    display: block;
  }

  .cta-banner {
    padding: 40px 24px;
  }
}

/* Lightbox */

.lightbox {
  position: fixed;
  inset: 0;
  z-index: 100;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  background: rgba(9, 17, 29, 0.92);
  padding: 24px;
}

.lightbox[hidden] {
  display: none;
}

.lightbox-stage {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 16px;
  max-width: min(90vw, 1100px);
  max-height: 90vh;
}

.lightbox-image {
  max-width: min(90vw, 1100px);
  max-height: 76vh;
  width: auto;
  height: auto;
  object-fit: contain;
  background: #ffffff;
  border-radius: 12px;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.4);
}

.lightbox-caption {
  display: flex;
  align-items: center;
  gap: 14px;
  color: #fff;
  font-weight: 600;
  text-align: center;
}

.lightbox-counter {
  color: rgba(255, 255, 255, 0.6);
  font-weight: 500;
  font-size: 0.9rem;
}

.lightbox-close,
.lightbox-nav {
  border: none;
  background: rgba(255, 255, 255, 0.12);
  color: #fff;
  cursor: pointer;
  border-radius: 999px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  transition: background 0.2s ease;
}

.lightbox-close:hover,
.lightbox-nav:hover {
  background: rgba(255, 255, 255, 0.24);
}

.lightbox-close {
  position: absolute;
  top: 20px;
  right: 20px;
  width: 44px;
  height: 44px;
  font-size: 1.6rem;
  line-height: 1;
}

.lightbox-nav {
  width: 52px;
  height: 52px;
  font-size: 2rem;
  line-height: 1;
  flex-shrink: 0;
}

.lightbox-nav[hidden] {
  visibility: hidden;
}

@media (max-width: 640px) {
  .lightbox {
    padding: 12px;
    gap: 6px;
  }

  .lightbox-nav {
    width: 40px;
    height: 40px;
    font-size: 1.5rem;
  }

  .lightbox-close {
    top: 10px;
    right: 10px;
    width: 36px;
    height: 36px;
  }
}

/* Configurator result rows (weight, parts per pallet...) */

.info-row {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 16px;
  padding: 10px 0;
  border-bottom: 1px solid var(--border);
  font-size: 0.9rem;
}

.info-row:last-child {
  border-bottom: none;
}

.info-label {
  color: var(--muted);
  font-weight: 600;
  flex-shrink: 0;
}

.info-row span:not(.info-label) {
  text-align: right;
}

/* InMail floating contact widget */

.inmail {
  position: fixed;
  top: 50%;
  right: 0;
  transform: translateY(-50%);
  z-index: 90;
  display: flex;
  align-items: flex-start;
}

.inmail-toggle {
  writing-mode: vertical-rl;
  transform: rotate(180deg);
  background: var(--primary);
  color: #fff;
  border: none;
  padding: 16px 10px;
  border-radius: 10px 0 0 10px;
  font-weight: 700;
  font-size: 0.85rem;
  letter-spacing: 0.03em;
  cursor: pointer;
  box-shadow: -4px 0 16px rgba(16, 33, 58, 0.15);
}

.inmail-toggle:hover {
  background: var(--primary-deep);
}

.inmail-panel {
  position: absolute;
  top: 50%;
  right: 100%;
  transform: translateY(-50%);
  width: min(340px, calc(100vw - 60px));
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 16px;
  box-shadow: 0 20px 50px rgba(16, 33, 58, 0.2);
  padding: 20px;
  margin-right: 10px;
}

.inmail-panel[hidden] {
  display: none;
}

.inmail-panel-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 10px;
}

.inmail-panel-header h3 {
  margin: 0;
  font-size: 1.1rem;
}

.inmail-close {
  border: none;
  background: none;
  font-size: 1.4rem;
  line-height: 1;
  cursor: pointer;
  color: var(--muted);
}

.inmail-intro {
  margin: 0 0 14px;
  color: var(--muted);
  font-size: 0.85rem;
  line-height: 1.5;
}

.inmail-form {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.inmail-form label {
  font-size: 0.8rem;
  font-weight: 600;
  margin-top: 6px;
}

.inmail-form input,
.inmail-form textarea {
  width: 100%;
  padding: 9px 11px;
  border: 1px solid var(--border);
  border-radius: 8px;
  font: inherit;
  font-size: 0.9rem;
  box-sizing: border-box;
}

.inmail-form textarea {
  min-height: 90px;
  resize: vertical;
}

.inmail-form button {
  margin-top: 10px;
}

.inmail-hp {
  display: none;
}

.inmail-error {
  margin: 4px 0 0;
  color: var(--primary);
  font-size: 0.82rem;
}

.inmail-error[hidden] {
  display: none;
}

.inmail-success {
  text-align: center;
}

.inmail-success p {
  color: var(--text);
  font-size: 0.9rem;
  line-height: 1.6;
}

.inmail-success[hidden] {
  display: none;
}

@media (max-width: 640px) {
  .inmail-toggle {
    padding: 12px 8px;
    font-size: 0.75rem;
  }
}

/* Cart widget (header icon + dropdown panel) */

.cart-widget {
  position: relative;
}

.cart-nav-toggle {
  position: relative;
  border: 1px solid var(--border);
  background: rgba(255, 255, 255, 0.6);
  border-radius: 999px;
  width: 40px;
  height: 40px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: var(--text);
  cursor: pointer;
}

.cart-nav-toggle:hover {
  background: var(--surface);
}

.cart-nav-icon {
  display: block;
}

.cart-badge {
  position: absolute;
  top: -4px;
  right: -4px;
  min-width: 18px;
  height: 18px;
  padding: 0 4px;
  border-radius: 999px;
  background: var(--primary);
  color: #fff;
  font-size: 0.68rem;
  font-weight: 700;
  line-height: 18px;
  text-align: center;
}

/* Account link (header icon, same treatment as the cart toggle) */

.account-link {
  border: 1px solid var(--border);
  background: rgba(255, 255, 255, 0.6);
  border-radius: 999px;
  width: 40px;
  height: 40px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: var(--text);
}

.account-link:hover {
  background: var(--surface);
}

.cart-badge[hidden] {
  display: none;
}

.cart-overlay {
  position: fixed;
  inset: 0;
  background: rgba(16, 33, 58, 0.55);
  z-index: 94;
}

.cart-overlay[hidden] {
  display: none;
}

.cart-panel {
  position: fixed;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 80vw;
  height: 80vh;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 16px;
  box-shadow: 0 20px 50px rgba(16, 33, 58, 0.25);
  padding: 20px;
  z-index: 95;
  display: flex;
  flex-direction: column;
}

.cart-panel[hidden] {
  display: none;
}

.cart-panel-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 14px;
  flex-shrink: 0;
}

.cart-panel-header h3 {
  margin: 0;
  font-size: 1.2rem;
}

.cart-close {
  border: none;
  background: none;
  font-size: 1.4rem;
  line-height: 1;
  cursor: pointer;
  color: var(--muted);
}

.cart-panel-columns {
  flex: 1;
  min-height: 0;
  display: flex;
  gap: 28px;
}

.cart-panel-main {
  flex: 1 1 60%;
  min-width: 0;
  overflow-y: auto;
  padding-right: 4px;
}

.cart-panel-side {
  flex: 0 0 34%;
  min-width: 0;
  overflow-y: auto;
  border-left: 1px solid var(--border);
  padding-left: 28px;
}

.cart-panel-side h4 {
  margin: 0 0 10px;
  font-size: 1rem;
}

.cart-process-steps {
  margin: 0 0 26px;
  padding-left: 20px;
  color: var(--text);
  font-size: 0.88rem;
  line-height: 1.6;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.cart-account-teaser {
  background: rgba(255, 255, 255, 0.5);
  border: 1px dashed var(--border);
  border-radius: 12px;
  padding: 16px;
}

.cart-account-teaser p {
  margin: 0 0 14px;
  color: var(--muted);
  font-size: 0.85rem;
  line-height: 1.55;
}

.cart-account-teaser button[disabled] {
  width: 100%;
  opacity: 0.6;
  cursor: not-allowed;
}

.cart-empty {
  color: var(--muted);
  font-size: 0.85rem;
  line-height: 1.5;
}

.cart-empty[hidden] {
  display: none;
}

.cart-lines {
  list-style: none;
  margin: 0 0 14px;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.cart-line {
  display: flex;
  flex-direction: column;
  gap: 10px;
  padding-bottom: 12px;
  border-bottom: 1px solid var(--border);
}

.cart-line-main {
  display: flex;
  align-items: flex-start;
  gap: 12px;
}

.cart-line-thumb {
  position: relative;
  flex-shrink: 0;
  width: 56px;
  height: 56px;
  border-radius: 8px;
  overflow: hidden;
  background: var(--border);
}

.cart-line-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.cart-line-thumb-fill {
  width: 100%;
  height: 100%;
  background: var(--border);
}

.cart-line-thumb .color-gradient-badge {
  width: 24px;
  height: 8px;
  bottom: 4px;
  right: 4px;
  border-radius: 3px;
}

.cart-line-details {
  flex: 1;
  min-width: 0;
}

.cart-line-name {
  font-size: 0.85rem;
  font-weight: 600;
}

.cart-line-desc {
  margin-top: 4px;
  color: var(--muted);
  font-size: 0.78rem;
  line-height: 1.4;
}

.cart-line-actions {
  flex-shrink: 0;
  display: flex;
  align-items: center;
  gap: 10px;
}

.cart-line-actions input {
  width: 70px;
  padding: 6px 8px;
  border: 1px solid var(--border);
  border-radius: 8px;
  font: inherit;
  font-size: 0.85rem;
}

.cart-line-remove {
  border: none;
  background: none;
  color: var(--primary);
  font-size: 0.78rem;
  font-weight: 700;
  cursor: pointer;
  white-space: nowrap;
}

.cart-line-color {
  margin-left: 68px;
  background: rgba(255, 255, 255, 0.5);
  border: 1px dashed var(--border);
  border-radius: 10px;
  padding: 10px 12px;
}

.cart-line-color label {
  display: block;
  font-size: 0.76rem;
  font-weight: 700;
  color: var(--muted);
  margin-bottom: 6px;
}

.cart-line-color input[type="text"] {
  width: 100%;
  padding: 7px 9px;
  border: 1px solid var(--border);
  border-radius: 8px;
  font: inherit;
  font-size: 0.85rem;
  box-sizing: border-box;
}

.cart-form {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.cart-form label {
  font-size: 0.8rem;
  font-weight: 600;
  margin-top: 6px;
}

.cart-form input[type="text"],
.cart-form input[type="email"],
.cart-form select,
.cart-form textarea {
  width: 100%;
  padding: 9px 11px;
  border: 1px solid var(--border);
  border-radius: 8px;
  font: inherit;
  font-size: 0.9rem;
  box-sizing: border-box;
  background: var(--surface, #fff);
}

.cart-form textarea {
  min-height: 60px;
  resize: vertical;
}

.cart-delivery-choice {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.cart-radio,
.cart-checkbox {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 0.85rem;
  font-weight: 500;
}

.cart-form button {
  margin-top: 10px;
}

.cart-hp {
  display: none;
}

.cart-error {
  margin: 4px 0 0;
  color: var(--primary);
  font-size: 0.82rem;
}

.cart-error[hidden] {
  display: none;
}

.form-privacy-notice {
  margin: 10px 0 0;
  color: var(--muted);
  font-size: 0.78rem;
  line-height: 1.4;
}

.form-privacy-notice a {
  color: inherit;
  text-decoration: underline;
}

.cart-success {
  text-align: center;
}

.cart-success p {
  color: var(--text);
  font-size: 0.9rem;
  line-height: 1.6;
}

.cart-success[hidden] {
  display: none;
}

.btn-add-cart {
  margin-top: 8px;
}

@media (max-width: 780px) {
  .cart-panel {
    width: 92vw;
    height: 88vh;
    padding: 16px;
  }

  .cart-panel-columns {
    flex-direction: column;
    overflow-y: auto;
  }

  .cart-panel-main {
    overflow-y: visible;
    flex: 0 0 auto;
  }

  .cart-panel-side {
    flex: 0 0 auto;
    border-left: none;
    border-top: 1px solid var(--border);
    padding-left: 0;
    padding-top: 20px;
    margin-top: 16px;
    overflow-y: visible;
  }
}

/* Espace client (connexion, mot de passe oublié/changement, tableau de
   bord) — formulaires génériques réutilisant les variables de couleur du
   site plutôt que de dupliquer le style compact des widgets panier/inmail. */
.auth-card {
  max-width: 420px;
  margin: 0 auto;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 28px;
  box-shadow: var(--shadow);
}

.auth-form label {
  display: block;
  font-size: 0.82rem;
  font-weight: 600;
  margin: 14px 0 6px;
}

.auth-form input {
  width: 100%;
  padding: 10px 12px;
  border: 1px solid var(--border);
  border-radius: 8px;
  font: inherit;
  box-sizing: border-box;
}

.auth-form .btn {
  width: 100%;
  margin-top: 18px;
}

.auth-error {
  color: var(--primary);
  font-size: 0.85rem;
  margin-top: 4px;
}

.auth-status {
  color: var(--accent);
  font-size: 0.9rem;
  margin-bottom: 10px;
}

.auth-links {
  margin-top: 14px;
  font-size: 0.85rem;
  text-align: center;
}

.dashboard-section {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 20px 22px;
  margin-bottom: 18px;
}

.dashboard-section h2 {
  margin: 0 0 8px;
  font-size: 1.05rem;
}

/* Pages légales (mentions/confidentialité/CGV) : texte long, jamais centré
   malgré .narrow sur la section parente (hérité pour l'en-tête seulement). */
.legal-content {
  text-align: left;
}

.legal-content h1 {
  margin-bottom: 24px;
}

.legal-content h2 {
  margin: 32px 0 12px;
  font-size: 1.15rem;
}

.legal-content h3 {
  margin: 20px 0 8px;
  font-size: 1rem;
}

.legal-content p,
.legal-content ul {
  color: var(--text);
  line-height: 1.6;
  margin: 0 0 14px;
}

.legal-content ul {
  padding-left: 22px;
}

.legal-content li {
  margin-bottom: 6px;
}

.legal-content table {
  width: 100%;
  border-collapse: collapse;
  margin: 12px 0 20px;
}

.legal-content th,
.legal-content td {
  border: 1px solid var(--border);
  padding: 10px 12px;
  text-align: left;
  font-size: 0.9rem;
  vertical-align: top;
}

.legal-content th {
  background: var(--surface);
}
