/* =====================================================================
   L'ADHARI DISTRIBUTION — feuille de style principale
   Architecture :
   1. Polices      2. Palettes (6 × jour/nuit)      3. Modèles (6)
   4. Base         5. Composants                     6. Pages
   7. Animations   8. Responsive / mouvement réduit
   Toute combinaison data-template × data-palette × data-mode est valide.
   ===================================================================== */

/* 1. Polices (fichiers locaux, licence OFL) ----------------------------- */
@font-face { font-family: 'Cairo'; src: url('../fonts/cairo-arabic.woff2') format('woff2'); font-weight: 400 800; font-display: swap; unicode-range: U+0600-06FF, U+0750-077F, U+08A0-08FF, U+FB50-FDFF, U+FE70-FEFF, U+200C-200F; }
@font-face { font-family: 'Inter'; src: url('../fonts/inter.woff2') format('woff2'); font-weight: 100 900; font-display: swap; }
@font-face { font-family: 'DM Sans'; src: url('../fonts/dmsans.woff2') format('woff2'); font-weight: 100 1000; font-display: swap; }
@font-face { font-family: 'Playfair Display'; src: url('../fonts/playfair.woff2') format('woff2'); font-weight: 400 900; font-display: swap; }
@font-face { font-family: 'Fraunces'; src: url('../fonts/fraunces.woff2') format('woff2'); font-weight: 100 900; font-display: swap; }
@font-face { font-family: 'Barlow Condensed'; src: url('../fonts/barlow-600.woff2') format('woff2'); font-weight: 600; font-display: swap; }
@font-face { font-family: 'Barlow Condensed'; src: url('../fonts/barlow-800.woff2') format('woff2'); font-weight: 800; font-display: swap; }

/* 2. Palettes ---------------------------------------------------------- */
:root, [data-palette="ocean"] {
  --primary: #0b6bcb; --primary-strong: #0957a6; --accent: #13b5d1; --on-primary: #fff;
  --bg: #f4f8fc; --surface: #ffffff; --surface-2: #eaf2fa; --text: #0d1b2a; --muted: #52627a; --border: #d9e4ef;
  --hero-a: #0b6bcb; --hero-b: #13b5d1; --hero-c: #e8f4fd;
}
[data-palette="ocean"][data-mode="dark"] {
  --primary: #4da3ff; --primary-strong: #7cbcff; --accent: #34d0ea; --on-primary: #04121f;
  --bg: #07111f; --surface: #0d1b2e; --surface-2: #13243b; --text: #e7eef8; --muted: #9fb0c7; --border: #1f3350;
  --hero-a: #0a3a72; --hero-b: #0a6f86; --hero-c: #0a1828;
}
[data-palette="emeraude"] {
  --primary: #0f8a6a; --primary-strong: #0b6f55; --accent: #2fbf8f; --on-primary: #fff;
  --bg: #f3faf7; --surface: #ffffff; --surface-2: #e4f4ed; --text: #0d221b; --muted: #4f6b61; --border: #d3e8df;
  --hero-a: #0f8a6a; --hero-b: #3cc59a; --hero-c: #e6f6ef;
}
[data-palette="emeraude"][data-mode="dark"] {
  --primary: #3cd3a2; --primary-strong: #6ee2bc; --accent: #7be0bf; --on-primary: #03140e;
  --bg: #06140f; --surface: #0c1f19; --surface-2: #122b23; --text: #e5f5ef; --muted: #9cbfb2; --border: #1d3a31;
  --hero-a: #08503d; --hero-b: #0b6b54; --hero-c: #071a14;
}
[data-palette="marine"] {
  --primary: #1d3f8f; --primary-strong: #142f6e; --accent: #3a8dde; --on-primary: #fff;
  --bg: #f4f6fb; --surface: #ffffff; --surface-2: #e7ecf7; --text: #0e1a33; --muted: #56627e; --border: #d8deec;
  --hero-a: #16306b; --hero-b: #3a8dde; --hero-c: #eaf0fb;
}
[data-palette="marine"][data-mode="dark"] {
  --primary: #7aa7ff; --primary-strong: #a3c2ff; --accent: #5fb4ff; --on-primary: #071022;
  --bg: #080d1c; --surface: #0f1830; --surface-2: #16223f; --text: #e8edf8; --muted: #a3afca; --border: #22305a;
  --hero-a: #12245a; --hero-b: #1b4f8f; --hero-c: #0a1126;
}
[data-palette="menthe"] {
  --primary: #12866a; --primary-strong: #0d6b54; --accent: #9cc41f; --on-primary: #fff;
  --bg: #f6fbf3; --surface: #ffffff; --surface-2: #eaf5e2; --text: #142218; --muted: #55695a; --border: #dbe9d3;
  --hero-a: #1f9d7a; --hero-b: #b7d334; --hero-c: #eef8e6;
}
[data-palette="menthe"][data-mode="dark"] {
  --primary: #4fd6ac; --primary-strong: #7fe5c4; --accent: #c6e64a; --on-primary: #04140e;
  --bg: #08130f; --surface: #0f1f18; --surface-2: #162b21; --text: #e9f6ec; --muted: #a2bfa9; --border: #20392c;
  --hero-a: #0c5a45; --hero-b: #4f6b12; --hero-c: #0a1712;
}
[data-palette="lavande"] {
  --primary: #5b4bc4; --primary-strong: #4838a6; --accent: #a68bf0; --on-primary: #fff;
  --bg: #f7f6fd; --surface: #ffffff; --surface-2: #eeebfb; --text: #191433; --muted: #615a80; --border: #e1dcf4;
  --hero-a: #5b4bc4; --hero-b: #a68bf0; --hero-c: #f1eefc;
}
[data-palette="lavande"][data-mode="dark"] {
  --primary: #a99bff; --primary-strong: #c4b9ff; --accent: #d3a6ff; --on-primary: #120c2a;
  --bg: #0e0b1d; --surface: #171330; --surface-2: #201a42; --text: #eeeafd; --muted: #b0a8d4; --border: #2e2760;
  --hero-a: #33287a; --hero-b: #5a3c8f; --hero-c: #110d24;
}
[data-palette="ardoise"] {
  --primary: #26323d; --primary-strong: #161f27; --accent: #e07a12; --on-primary: #fff;
  --bg: #f6f6f4; --surface: #ffffff; --surface-2: #ecece8; --text: #1a1f24; --muted: #5d656d; --border: #dfdfda;
  --hero-a: #2c3640; --hero-b: #f08a24; --hero-c: #f1f0ec;
}
[data-palette="ardoise"][data-mode="dark"] {
  --primary: #f5a04a; --primary-strong: #ffbd78; --accent: #ffc078; --on-primary: #1a1006;
  --bg: #0f1215; --surface: #171b20; --surface-2: #1f252c; --text: #eef0f2; --muted: #a6adb5; --border: #2c333b;
  --hero-a: #1d242b; --hero-b: #6e3e0d; --hero-c: #121518;
}

/* 3. Modèles (variables de structure) ---------------------------------- */
:root, [data-template="horizon"] {
  --font-body: 'Inter', system-ui, -apple-system, 'Segoe UI', Roboto, sans-serif;
  --font-head: 'DM Sans', var(--font-body);
  --head-weight: 750; --head-transform: none; --head-spacing: -0.02em; --head-scale: 1;
  --radius-sm: 8px; --radius: 14px; --radius-lg: 22px; --radius-btn: 12px;
  --shadow: 0 1px 2px rgba(10, 30, 60, .06), 0 8px 24px -8px rgba(10, 30, 60, .14);
  --shadow-hover: 0 2px 4px rgba(10, 30, 60, .08), 0 18px 40px -12px rgba(10, 30, 60, .25);
  --card-border: 1px solid var(--border);
  --section-y: clamp(56px, 8vw, 104px);
  --grid-min: 250px;
}
[data-template="prestige"] {
  --font-head: 'Playfair Display', Georgia, 'Times New Roman', serif;
  --head-weight: 600; --head-spacing: -0.01em; --head-scale: 1.06;
  --radius-sm: 2px; --radius: 4px; --radius-lg: 6px; --radius-btn: 2px;
  --shadow: none; --shadow-hover: 0 20px 40px -24px rgba(0, 0, 0, .35);
  --section-y: clamp(64px, 9vw, 128px);
  --grid-min: 260px;
}
[data-template="industriel"] {
  --font-head: 'Barlow Condensed', 'Arial Narrow', sans-serif;
  --head-weight: 800; --head-transform: uppercase; --head-spacing: 0.01em; --head-scale: 1.12;
  --radius-sm: 0; --radius: 0; --radius-lg: 0; --radius-btn: 0;
  --shadow: none; --shadow-hover: 6px 6px 0 var(--primary);
  --card-border: 2px solid var(--border);
  --section-y: clamp(48px, 7vw, 88px);
  --grid-min: 220px;
}
[data-template="epure"] {
  --font-head: 'Inter', system-ui, sans-serif;
  --head-weight: 600; --head-spacing: -0.03em; --head-scale: .98;
  --radius-sm: 6px; --radius: 10px; --radius-lg: 14px; --radius-btn: 8px;
  --shadow: none; --shadow-hover: 0 12px 32px -16px rgba(0, 0, 0, .22);
  --card-border: 1px solid transparent;
  --section-y: clamp(64px, 10vw, 136px);
  --grid-min: 240px;
}
[data-template="vitalite"] {
  --font-body: 'DM Sans', system-ui, sans-serif;
  --font-head: 'DM Sans', system-ui, sans-serif;
  --head-weight: 850; --head-spacing: -0.035em; --head-scale: 1.04;
  --radius-sm: 14px; --radius: 24px; --radius-lg: 34px; --radius-btn: 999px;
  --shadow: 0 10px 30px -12px color-mix(in srgb, var(--primary) 35%, transparent);
  --shadow-hover: 0 24px 50px -16px color-mix(in srgb, var(--primary) 50%, transparent);
  --card-border: 0;
  --grid-min: 250px;
}
[data-template="magazine"] {
  --font-body: 'DM Sans', system-ui, sans-serif;
  --font-head: 'Fraunces', Georgia, serif;
  --head-weight: 650; --head-spacing: -0.025em; --head-scale: 1.1;
  --radius-sm: 4px; --radius: 8px; --radius-lg: 12px; --radius-btn: 6px;
  --shadow: 0 1px 0 var(--border); --shadow-hover: 0 22px 44px -20px rgba(0, 0, 0, .35);
  --grid-min: 270px;
}

/* 4. Base -------------------------------------------------------------- */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; scroll-padding-top: 90px; }
body {
  margin: 0; font-family: var(--font-body); font-size: 16px; line-height: 1.6; color: var(--text); background: var(--bg);
  -webkit-font-smoothing: antialiased; text-rendering: optimizeLegibility; overflow-x: hidden;
  transition: background-color .3s ease, color .3s ease;
}
img, svg { max-width: 100%; display: block; }
a { color: var(--primary); text-decoration: none; }
a:hover { color: var(--primary-strong); }
button, input, select, textarea { font: inherit; color: inherit; }
h1, h2, h3, h4 {
  font-family: var(--font-head); font-weight: var(--head-weight); text-transform: var(--head-transform);
  letter-spacing: var(--head-spacing); line-height: 1.12; margin: 0 0 .5em; color: var(--text);
}
h1 { font-size: calc(clamp(2.1rem, 4.6vw, 3.7rem) * var(--head-scale)); }
h2 { font-size: calc(clamp(1.6rem, 3vw, 2.45rem) * var(--head-scale)); }
h3 { font-size: calc(1.15rem * var(--head-scale)); }
p { margin: 0 0 1em; }
::selection { background: color-mix(in srgb, var(--primary) 25%, transparent); }
:focus-visible { outline: 3px solid color-mix(in srgb, var(--accent) 70%, transparent); outline-offset: 2px; border-radius: 4px; }
.container { width: min(1240px, 100% - 40px); margin-inline: auto; }
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0, 0, 0, 0); border: 0; }
.skip-link { position: absolute; inset-inline-start: 12px; top: -60px; z-index: 200; background: var(--primary); color: var(--on-primary); padding: 10px 16px; border-radius: var(--radius-sm); }
.skip-link:focus { top: 12px; color: var(--on-primary); }
.muted { color: var(--muted); }
.icon { width: 1.25em; height: 1.25em; flex: none; }

/* 5. Composants -------------------------------------------------------- */

/* Bandeau démo */
.demo-bar { background: color-mix(in srgb, var(--accent) 16%, var(--surface)); color: var(--text); font-size: .82rem; text-align: center; padding: 6px 16px; border-bottom: 1px solid var(--border); }
.demo-bar strong { color: var(--primary); }

/* En-tête */
.site-header {
  position: sticky; top: 0; z-index: 50; min-height: 72px;
  background: color-mix(in srgb, var(--bg) 82%, transparent);
  backdrop-filter: saturate(1.6) blur(14px); -webkit-backdrop-filter: saturate(1.6) blur(14px);
  border-bottom: 1px solid color-mix(in srgb, var(--border) 70%, transparent);
}
.header-inner { display: flex; align-items: center; gap: 24px; min-height: 72px; }
.brand { display: flex; align-items: center; gap: 10px; color: var(--text); font-family: var(--font-head); font-weight: 800; letter-spacing: .02em; line-height: 1; }
.brand:hover { color: var(--text); }
.brand-mark { width: 40px; height: 40px; flex: none; }
.brand-name { font-size: 1.05rem; text-transform: uppercase; }
.brand-name small { display: block; font-size: .62rem; letter-spacing: .32em; font-weight: 600; color: var(--muted); margin-top: 4px; font-family: var(--font-body); }
.main-nav { margin-inline-start: auto; }
.main-nav ul { display: flex; gap: 4px; list-style: none; margin: 0; padding: 0; }
.main-nav a { display: block; padding: 9px 14px; color: var(--muted); font-weight: 550; font-size: .95rem; border-radius: var(--radius-btn); transition: color .2s, background .2s; }
.main-nav a:hover, .main-nav a[aria-current="page"] { color: var(--text); background: color-mix(in srgb, var(--primary) 9%, transparent); }
.main-nav a[aria-current="page"] { color: var(--primary); }
.header-actions { display: flex; align-items: center; gap: 8px; }
.icon-btn {
  display: inline-grid; place-items: center; width: 42px; height: 42px; border-radius: var(--radius-btn);
  border: 1px solid var(--border); background: var(--surface); color: var(--text); cursor: pointer; transition: border-color .2s, transform .2s, background .2s;
}
.icon-btn:hover { border-color: var(--primary); color: var(--primary); }
.icon-btn .icon { width: 20px; height: 20px; }
.mode-toggle .i-sun { display: none; }
[data-mode="dark"] .mode-toggle .i-sun { display: block; }
[data-mode="dark"] .mode-toggle .i-moon { display: none; }
.menu-toggle { display: none; }

/* Boutons */
.btn {
  position: relative; display: inline-flex; align-items: center; justify-content: center; gap: .55em; overflow: hidden; isolation: isolate;
  padding: .82em 1.4em; border-radius: var(--radius-btn); border: 1.5px solid transparent; font-weight: 650; font-size: .97rem; line-height: 1.2;
  cursor: pointer; text-decoration: none; transition: transform .2s ease, box-shadow .25s ease, background .2s, color .2s, border-color .2s; white-space: nowrap;
}
.btn:hover { transform: translateY(-1px); }
.btn:active { transform: translateY(0); }
.btn-primary { background: var(--primary); color: var(--on-primary); box-shadow: 0 8px 20px -10px color-mix(in srgb, var(--primary) 70%, transparent); }
.btn-primary:hover { background: var(--primary-strong); color: var(--on-primary); }
.btn-accent { background: var(--accent); color: #0b1620; }
.btn-accent:hover { color: #0b1620; filter: brightness(1.05); }
.btn-outline { border-color: color-mix(in srgb, var(--primary) 45%, var(--border)); color: var(--primary); background: transparent; }
.btn-outline:hover { background: color-mix(in srgb, var(--primary) 8%, transparent); }
.btn-ghost { color: var(--text); background: color-mix(in srgb, var(--text) 6%, transparent); }
.btn-ghost:hover { color: var(--text); background: color-mix(in srgb, var(--text) 11%, transparent); }
.btn-light { background: #fff; color: #0d1b2a; }
.btn-light:hover { color: #0d1b2a; }
.btn-sm { padding: .55em 1em; font-size: .88rem; }
.btn-lg { padding: 1em 1.7em; font-size: 1.03rem; }
.btn[disabled] { opacity: .55; cursor: not-allowed; transform: none; }
[data-template="industriel"] .btn { text-transform: uppercase; letter-spacing: .06em; font-size: .88rem; }
[data-template="prestige"] .btn { letter-spacing: .04em; }

/* Badges / puces */
.chip {
  display: inline-flex; align-items: center; gap: 6px; padding: 5px 11px; border-radius: 999px; font-size: .8rem; font-weight: 600;
  background: color-mix(in srgb, var(--primary) 10%, transparent); color: var(--primary); border: 1px solid color-mix(in srgb, var(--primary) 18%, transparent);
}
.chip .icon { width: 14px; height: 14px; }
.chip-muted { background: var(--surface-2); color: var(--muted); border-color: var(--border); }
.badge-demo { background: color-mix(in srgb, #f59e0b 18%, transparent); color: #a15c00; border-color: color-mix(in srgb, #f59e0b 35%, transparent); }
[data-mode="dark"] .badge-demo { color: #fbbf24; }
.badge-featured { background: var(--accent); color: #0b1620; border-color: transparent; }
[data-template="industriel"] .chip { border-radius: 0; text-transform: uppercase; letter-spacing: .05em; font-size: .72rem; }

/* Sections */
.section { padding-block: var(--section-y); position: relative; }
.section-alt { background: var(--surface-2); }
.section-head { display: flex; align-items: end; justify-content: space-between; gap: 24px; margin-bottom: clamp(28px, 4vw, 48px); flex-wrap: wrap; }
.section-head p { max-width: 620px; color: var(--muted); margin: 0; }
.eyebrow { display: inline-flex; align-items: center; gap: 8px; font-size: .78rem; font-weight: 700; letter-spacing: .16em; text-transform: uppercase; color: var(--primary); margin-bottom: 12px; }
.eyebrow::before { content: ''; width: 22px; height: 2px; background: currentColor; border-radius: 2px; }
[data-template="epure"] .eyebrow::before, [data-template="magazine"] .eyebrow::before { display: none; }

/* Grille de cartes d'activités */
.term-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(170px, 1fr)); gap: 16px; }
.term-card {
  position: relative; display: flex; flex-direction: column; gap: 14px; padding: 20px; border-radius: var(--radius); background: var(--surface);
  border: var(--card-border); box-shadow: var(--shadow); color: var(--text); transition: transform .25s ease, box-shadow .25s ease, border-color .25s; overflow: hidden;
}
.term-card:hover { transform: translateY(-4px); box-shadow: var(--shadow-hover); color: var(--text); border-color: color-mix(in srgb, var(--primary) 40%, var(--border)); }
.term-card .term-icon { width: 48px; height: 48px; display: grid; place-items: center; border-radius: var(--radius-sm); background: color-mix(in srgb, var(--primary) 11%, transparent); color: var(--primary); }
.term-card .term-icon .icon { width: 26px; height: 26px; }
.term-card strong { font-family: var(--font-head); font-size: 1.05rem; text-transform: var(--head-transform); }
.term-card span.count { font-size: .82rem; color: var(--muted); }
.term-card .arrow { position: absolute; inset-inline-end: 16px; top: 20px; opacity: 0; transform: translateX(-6px); transition: .25s; color: var(--primary); }
.term-card:hover .arrow { opacity: 1; transform: none; }

/* Cartes produits */
.product-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(var(--grid-min), 1fr)); gap: clamp(16px, 2vw, 24px); }
.product-card {
  position: relative; display: flex; flex-direction: column; background: var(--surface); border: var(--card-border); border-radius: var(--radius);
  box-shadow: var(--shadow); overflow: hidden; color: var(--text); transition: transform .3s cubic-bezier(.2, .8, .2, 1), box-shadow .3s ease, border-color .3s;
}
.product-card:hover { transform: translateY(-5px); box-shadow: var(--shadow-hover); color: var(--text); }
.product-card:focus-within { border-color: var(--primary); }
.product-media {
  position: relative; aspect-ratio: 4 / 3.6; display: grid; place-items: center; overflow: hidden;
  background: radial-gradient(120% 90% at 50% 10%, color-mix(in srgb, var(--accent) 14%, var(--surface)) 0%, var(--surface-2) 70%);
}
.product-media img { width: 72%; height: 88%; object-fit: contain; transition: transform .5s cubic-bezier(.2, .8, .2, 1); filter: drop-shadow(0 12px 18px rgba(0, 0, 0, .12)); }
.product-card:hover .product-media img { transform: scale(1.06) translateY(-4px); }
.product-media .no-image { color: var(--muted); display: grid; place-items: center; gap: 6px; font-size: .85rem; }
.product-media .no-image .icon { width: 42px; height: 42px; opacity: .5; }
.product-badges { position: absolute; top: 12px; inset-inline-start: 12px; display: flex; flex-wrap: wrap; gap: 6px; z-index: 2; }
.product-body { display: flex; flex-direction: column; gap: 10px; padding: 18px 18px 20px; flex: 1; }
.product-ref { font-size: .74rem; font-weight: 700; letter-spacing: .12em; color: var(--muted); text-transform: uppercase; }
.product-card h3 { margin: 0; font-size: calc(1.08rem * var(--head-scale)); }
.product-card h3 a { color: inherit; }
.product-card h3 a::after { content: ''; position: absolute; inset: 0; z-index: 1; }
.product-card p { margin: 0; color: var(--muted); font-size: .92rem; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.product-tags { display: flex; flex-wrap: wrap; gap: 6px; margin-top: auto; padding-top: 6px; }
.product-tags .chip { font-size: .72rem; padding: 3px 9px; }
.product-foot { display: flex; align-items: center; justify-content: space-between; gap: 8px; border-top: 1px solid var(--border); padding: 12px 18px; font-size: .82rem; color: var(--muted); }
.product-foot .docs { display: flex; gap: 10px; }
.product-foot .docs span { display: inline-flex; align-items: center; gap: 4px; }
.product-foot .docs .icon { width: 15px; height: 15px; color: var(--primary); }
.product-foot .more { color: var(--primary); font-weight: 650; display: inline-flex; align-items: center; gap: 4px; }

/* Champ de recherche avec suggestions */
.search-box { position: relative; }
.search-field {
  display: flex; align-items: center; gap: 10px; background: var(--surface); border: 1.5px solid var(--border); border-radius: calc(var(--radius-btn) + 4px);
  padding: 6px 6px 6px 16px; box-shadow: var(--shadow); transition: border-color .2s, box-shadow .2s;
}
.search-field:focus-within { border-color: var(--primary); box-shadow: 0 0 0 4px color-mix(in srgb, var(--primary) 15%, transparent); }
.search-field > .icon { color: var(--muted); }
.search-field input { flex: 1; min-width: 0; border: 0; background: transparent; padding: 10px 0; font-size: 1rem; outline: none; }
.suggestions {
  position: absolute; left: 0; right: 0; top: calc(100% + 8px); z-index: 30; background: var(--surface); border: 1px solid var(--border);
  border-radius: var(--radius); box-shadow: var(--shadow-hover); padding: 6px; list-style: none; margin: 0; max-height: 380px; overflow: auto;
}
.suggestions[hidden] { display: none; }
.suggestions a { display: flex; align-items: center; gap: 12px; padding: 8px 10px; border-radius: var(--radius-sm); color: var(--text); }
.suggestions a:hover, .suggestions a.active { background: var(--surface-2); }
.suggestions img { width: 40px; height: 40px; object-fit: contain; background: var(--surface-2); border-radius: var(--radius-sm); }
.suggestions small { display: block; color: var(--muted); font-size: .78rem; }
.suggestions .all { justify-content: center; color: var(--primary); font-weight: 600; }

/* Formulaires */
.form-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.form-grid .full { grid-column: 1 / -1; }
.field label { display: block; font-weight: 600; font-size: .9rem; margin-bottom: 6px; }
.field input, .field select, .field textarea {
  width: 100%; padding: 12px 14px; border: 1.5px solid var(--border); border-radius: var(--radius-sm); background: var(--surface); color: var(--text); transition: border-color .2s, box-shadow .2s;
}
.field input:focus, .field select:focus, .field textarea:focus { outline: none; border-color: var(--primary); box-shadow: 0 0 0 4px color-mix(in srgb, var(--primary) 14%, transparent); }
.field textarea { min-height: 150px; resize: vertical; }
.field .err { color: #d14343; font-size: .82rem; margin-top: 4px; min-height: 0; }
.field.invalid input, .field.invalid textarea, .field.invalid select { border-color: #d14343; }
.check { display: flex; gap: 10px; align-items: flex-start; font-size: .9rem; color: var(--muted); }
.check input { margin-top: 4px; width: 18px; height: 18px; accent-color: var(--primary); }
.hp { position: absolute; inset-inline-start: 0; inset-block-start: 0; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; opacity: 0; pointer-events: none; }
.alert { padding: 14px 16px; border-radius: var(--radius-sm); font-size: .95rem; border: 1px solid; }
.alert-success { background: color-mix(in srgb, #16a34a 12%, var(--surface)); border-color: color-mix(in srgb, #16a34a 35%, transparent); color: var(--text); }
.alert-error { background: color-mix(in srgb, #dc2626 10%, var(--surface)); border-color: color-mix(in srgb, #dc2626 35%, transparent); color: var(--text); }
.alert-warn { background: color-mix(in srgb, #f59e0b 12%, var(--surface)); border-color: color-mix(in srgb, #f59e0b 40%, transparent); color: var(--text); }

/* Squelettes de chargement */
.skeleton { background: linear-gradient(90deg, var(--surface-2) 0%, color-mix(in srgb, var(--surface-2) 50%, var(--surface)) 50%, var(--surface-2) 100%); background-size: 200% 100%; animation: skeleton 1.3s infinite; border-radius: var(--radius); }
.skeleton-card { height: 380px; }
@keyframes skeleton { to { background-position: -200% 0; } }

/* Pied de page */
.site-footer { background: color-mix(in srgb, var(--hero-a) 92%, #000); color: #dbe6f2; padding-top: 64px; margin-top: 0; position: relative; overflow: hidden; }
[data-mode="dark"] .site-footer { background: color-mix(in srgb, var(--surface) 70%, #000); }
.site-footer a { color: #fff; opacity: .85; }
.site-footer a:hover { opacity: 1; color: #fff; }
.footer-grid { display: grid; grid-template-columns: 1.4fr 1fr 1fr 1.2fr; gap: 40px; }
.site-footer h4 { color: #fff; font-size: .95rem; letter-spacing: .08em; text-transform: uppercase; margin-bottom: 14px; font-family: var(--font-body); }
.site-footer ul { list-style: none; padding: 0; margin: 0; display: grid; gap: 8px; }
.site-footer .brand { color: #fff; }
.site-footer .brand-name small { color: #b8c7d8; }
.footer-about { color: #b8c7d8; font-size: .92rem; margin-top: 16px; max-width: 360px; }
.footer-contact li { display: flex; gap: 10px; align-items: flex-start; color: #cfdbe8; font-size: .92rem; white-space: pre-line; }
.footer-contact .icon { width: 18px; height: 18px; margin-top: 3px; opacity: .8; }
.footer-bottom { margin-top: 48px; padding-block: 20px; border-top: 1px solid rgba(255, 255, 255, .12); display: flex; justify-content: space-between; gap: 16px; flex-wrap: wrap; font-size: .85rem; color: #9fb2c7; }
.socials { display: flex; gap: 10px; margin-top: 18px; }
.socials a { display: grid; place-items: center; width: 38px; height: 38px; border-radius: 50%; background: rgba(255, 255, 255, .1); }

/* Bouton WhatsApp flottant */
.wa-float { position: fixed; inset-inline-end: 18px; bottom: 18px; z-index: 60; width: 56px; height: 56px; border-radius: 50%; background: #25d366; color: #fff; display: grid; place-items: center; box-shadow: 0 10px 24px -6px rgba(37, 211, 102, .6); transition: transform .2s; }
.wa-float:hover { transform: scale(1.07); color: #fff; }
.wa-float .icon { width: 28px; height: 28px; }

/* 6. Pages ------------------------------------------------------------- */

/* --- Héros --- */
.hero {
  position: relative; overflow: hidden; isolation: isolate;
  background:
    radial-gradient(80% 70% at 85% 15%, color-mix(in srgb, var(--hero-b) 35%, transparent) 0%, transparent 60%),
    radial-gradient(60% 60% at 10% 90%, color-mix(in srgb, var(--hero-a) 22%, transparent) 0%, transparent 60%),
    var(--hero-c);
  padding-block: clamp(56px, 9vw, 120px) clamp(90px, 12vw, 160px);
}
.hero-canvas { position: absolute; inset: 0; width: 100%; height: 100%; z-index: -1; pointer-events: none; }
.hero-inner { display: grid; grid-template-columns: 1.1fr .9fr; gap: clamp(32px, 5vw, 72px); align-items: center; }
.hero h1 { margin-bottom: 18px; }
.hero h1 .hl { background: linear-gradient(100deg, var(--primary), var(--accent)); -webkit-background-clip: text; background-clip: text; color: transparent; }
.hero-lead { font-size: clamp(1.02rem, 1.4vw, 1.18rem); color: var(--muted); max-width: 600px; margin-bottom: 28px; }
.hero .search-box { max-width: 600px; }
.hero-quick { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 18px; align-items: center; }
.hero-quick > span { font-size: .85rem; color: var(--muted); margin-inline-end: 4px; }
.hero-quick a.chip { background: var(--surface); border-color: var(--border); color: var(--text); transition: .2s; }
.hero-quick a.chip:hover { border-color: var(--primary); color: var(--primary); }
.hero-stats { display: flex; gap: clamp(20px, 4vw, 44px); margin-top: 36px; flex-wrap: wrap; }
.hero-stats div strong { display: block; font-family: var(--font-head); font-size: 1.8rem; color: var(--text); line-height: 1.1; }
.hero-stats div span { font-size: .85rem; color: var(--muted); }
.hero-visual { position: relative; aspect-ratio: 1 / 1; max-width: 520px; justify-self: center; width: 100%; }
.hero-visual .disc {
  position: absolute; inset: 6%; border-radius: 50%;
  background: radial-gradient(circle at 35% 30%, color-mix(in srgb, #fff 70%, var(--accent)) 0%, color-mix(in srgb, var(--accent) 45%, var(--primary)) 55%, var(--primary) 100%);
  box-shadow: inset -20px -30px 60px rgba(0, 0, 0, .18), 0 40px 80px -30px color-mix(in srgb, var(--primary) 60%, transparent);
}
[data-mode="dark"] .hero-visual .disc { opacity: .85; }
.hero-visual .ring { position: absolute; inset: 0; border-radius: 50%; border: 1.5px dashed color-mix(in srgb, var(--primary) 35%, transparent); animation: spin 60s linear infinite; }
.hero-visual img { position: absolute; bottom: 8%; height: 66%; width: auto; filter: drop-shadow(0 24px 24px rgba(0, 0, 0, .25)); }
.hero-visual img:nth-of-type(1) { left: 4%; height: 50%; transform: rotate(-8deg); z-index: 1; }
.hero-visual img:nth-of-type(2) { left: 50%; transform: translateX(-50%); z-index: 2; height: 64%; }
.hero-visual img:nth-of-type(3) { right: 4%; height: 48%; transform: rotate(7deg); z-index: 1; }
.hero-wave { position: absolute; left: 0; right: 0; bottom: -1px; height: clamp(50px, 7vw, 100px); z-index: 1; color: var(--bg); }
.hero-wave svg { width: 200%; max-width: none; height: 100%; }
.hero-wave path { fill: currentColor; }

/* --- Étapes --- */
.steps { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; counter-reset: step; }
.step { position: relative; padding: 28px; border-radius: var(--radius); background: var(--surface); border: var(--card-border); box-shadow: var(--shadow); }
.step::before { counter-increment: step; content: counter(step, decimal-leading-zero); font-family: var(--font-head); font-size: 2.6rem; font-weight: 800; color: color-mix(in srgb, var(--primary) 18%, transparent); position: absolute; inset-inline-end: 22px; top: 12px; }
.step .term-icon { width: 52px; height: 52px; display: grid; place-items: center; border-radius: var(--radius-sm); background: var(--primary); color: var(--on-primary); margin-bottom: 18px; }
.step p { color: var(--muted); margin: 0; }

/* --- Bandeau CTA --- */
.cta-band { position: relative; overflow: hidden; isolation: isolate; border-radius: var(--radius-lg); padding: clamp(36px, 6vw, 72px); color: #fff; background: linear-gradient(120deg, var(--hero-a), color-mix(in srgb, var(--hero-b) 80%, var(--hero-a))); }
.cta-band h2 { color: #fff; }
.cta-band p { color: rgba(255, 255, 255, .85); max-width: 560px; }
.cta-band .actions { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 24px; }
.cta-band .btn-outline { color: #fff; border-color: rgba(255, 255, 255, .5); }
.cta-band .btn-outline:hover { background: rgba(255, 255, 255, .12); color: #fff; }

/* --- En-tête de page interne --- */
.page-hero { position: relative; overflow: hidden; isolation: isolate; padding-block: clamp(40px, 6vw, 72px) clamp(32px, 4vw, 48px); background: radial-gradient(70% 90% at 90% 0%, color-mix(in srgb, var(--hero-b) 22%, transparent) 0%, transparent 60%), var(--hero-c); border-bottom: 1px solid var(--border); }
.page-hero h1 { font-size: calc(clamp(1.9rem, 3.6vw, 2.9rem) * var(--head-scale)); margin-bottom: 10px; }
.page-hero p { color: var(--muted); max-width: 680px; margin: 0; }
.breadcrumb { display: flex; flex-wrap: wrap; gap: 6px; font-size: .85rem; color: var(--muted); margin-bottom: 14px; list-style: none; padding: 0; }
.breadcrumb li + li::before { content: '/'; margin-inline-end: 6px; opacity: .5; }
.breadcrumb a { color: var(--muted); }
.breadcrumb a:hover { color: var(--primary); }

/* --- Catalogue --- */
.catalog { display: grid; grid-template-columns: 290px 1fr; gap: 32px; align-items: start; padding-block: 32px 80px; }
.filters { position: sticky; top: 92px; max-height: calc(100vh - 110px); overflow: auto; padding-inline-end: 6px; scrollbar-width: thin; }
.filters-head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 12px; }
.filters-head h2 { font-size: 1.1rem; margin: 0; font-family: var(--font-body); text-transform: none; letter-spacing: 0; }
.link-btn { background: none; border: 0; color: var(--primary); cursor: pointer; font-weight: 600; font-size: .88rem; padding: 4px; }
.link-btn:hover { text-decoration: underline; }
.filter-group { border: var(--card-border); border-color: var(--border); background: var(--surface); border-radius: var(--radius); margin-bottom: 12px; overflow: hidden; }
.filter-group > button {
  width: 100%; display: flex; align-items: center; justify-content: space-between; gap: 8px; padding: 14px 16px; background: none; border: 0; cursor: pointer;
  font-weight: 700; font-size: .95rem; text-align: start; color: var(--text);
}
.filter-group > button .sel { margin-inline-start: auto; font-size: .75rem; background: var(--primary); color: var(--on-primary); border-radius: 999px; padding: 1px 8px; }
.filter-group > button .sel:empty { display: none; }
.filter-group > button .chev { transition: transform .25s; width: 18px; height: 18px; color: var(--muted); }
.filter-group[data-open="false"] > button .chev { transform: rotate(-90deg); }
.filter-group[data-open="false"] .filter-body { display: none; }
.filter-body { padding: 0 10px 12px; }
.filter-search { width: 100%; padding: 8px 10px; margin: 0 0 8px; border: 1px solid var(--border); border-radius: var(--radius-sm); background: var(--bg); font-size: .88rem; }
.filter-option { display: flex; align-items: center; gap: 10px; padding: 7px 8px; border-radius: var(--radius-sm); cursor: pointer; font-size: .92rem; user-select: none; }
.filter-option:hover { background: var(--surface-2); }
.filter-option input { width: 17px; height: 17px; accent-color: var(--primary); margin: 0; flex: none; }
.filter-option .icon { width: 17px; height: 17px; color: var(--muted); }
.filter-option .n { margin-inline-start: auto; font-size: .78rem; color: var(--muted); background: var(--surface-2); border-radius: 999px; padding: 0 8px; min-width: 26px; text-align: center; }
.filter-option.zero { opacity: .45; }
.filter-option.hidden { display: none; }
.catalog-toolbar { display: flex; gap: 12px; align-items: center; flex-wrap: wrap; margin-bottom: 16px; }
.catalog-toolbar .search-box { flex: 1 1 320px; }
.catalog-toolbar select { padding: 12px 14px; border: 1.5px solid var(--border); border-radius: var(--radius-btn); background: var(--surface); }
.filters-btn { display: none; }
.active-filters { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 18px; align-items: center; min-height: 10px; }
.active-filters .chip button { background: none; border: 0; cursor: pointer; color: inherit; padding: 0; padding-inline-start: 2px; display: grid; place-items: center; }
.active-filters .chip button .icon { width: 14px; height: 14px; }
.results-meta { color: var(--muted); font-size: .92rem; margin-bottom: 16px; }
.results-meta strong { color: var(--text); }
.empty-state { text-align: center; padding: 64px 20px; border: 2px dashed var(--border); border-radius: var(--radius-lg); color: var(--muted); }
.empty-state .icon { width: 48px; height: 48px; margin: 0 auto 14px; opacity: .5; }
.load-more { display: flex; justify-content: center; margin-top: 32px; }
.filters-drawer-head, .filters-drawer-foot { display: none; }

/* --- Fiche produit --- */
.product-page { padding-block: 28px 80px; }
.product-layout { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.05fr); gap: clamp(28px, 4vw, 60px); align-items: start; }
.product-gallery { position: sticky; top: 92px; border-radius: var(--radius-lg); overflow: hidden; aspect-ratio: 1 / 1; display: grid; place-items: center; border: var(--card-border); border-color: var(--border);
  background: radial-gradient(100% 80% at 50% 0%, color-mix(in srgb, var(--accent) 18%, var(--surface)), var(--surface-2)); }
.product-gallery img { width: 70%; height: 80%; object-fit: contain; filter: drop-shadow(0 20px 26px rgba(0, 0, 0, .18)); }
.product-info h1 { font-size: calc(clamp(1.8rem, 3.2vw, 2.6rem) * var(--head-scale)); margin: 10px 0 12px; }
.product-info .lead { font-size: 1.08rem; color: var(--muted); }
.info-block { margin-top: 22px; }
.info-block h2 { font-size: .8rem; letter-spacing: .14em; text-transform: uppercase; color: var(--muted); margin-bottom: 10px; font-family: var(--font-body); font-weight: 700; }
.chips { display: flex; flex-wrap: wrap; gap: 8px; }
.pack { display: inline-flex; align-items: center; gap: 6px; padding: 8px 14px; border: 1.5px solid var(--border); border-radius: var(--radius-sm); background: var(--surface); font-weight: 600; font-size: .9rem; }
.docs-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.doc-card { display: flex; align-items: center; gap: 12px; padding: 14px; border-radius: var(--radius); border: 1.5px solid var(--border); background: var(--surface); color: var(--text); transition: .2s; }
a.doc-card:hover { border-color: var(--primary); color: var(--text); transform: translateY(-2px); }
.doc-card .doc-ico { width: 42px; height: 42px; border-radius: var(--radius-sm); display: grid; place-items: center; background: color-mix(in srgb, #dc2626 12%, transparent); color: #dc2626; flex: none; }
.doc-card strong { display: block; font-size: .93rem; }
.doc-card small { color: var(--muted); }
.doc-card.unavailable { opacity: .6; border-style: dashed; }
.doc-card.unavailable .doc-ico { background: var(--surface-2); color: var(--muted); }
.product-cta { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 26px; padding: 20px; border-radius: var(--radius); background: var(--surface-2); align-items: center; }
.product-cta p { margin: 0; flex: 1 1 220px; font-size: .93rem; color: var(--muted); }
.tabs { margin-top: 56px; }
.tab-list { display: flex; gap: 4px; overflow-x: auto; border-bottom: 1px solid var(--border); scrollbar-width: none; }
.tab-list button { padding: 14px 18px; background: none; border: 0; border-bottom: 2.5px solid transparent; color: var(--muted); font-weight: 650; cursor: pointer; white-space: nowrap; margin-bottom: -1px; }
.tab-list button[aria-selected="true"] { color: var(--primary); border-color: var(--primary); }
.tab-panel { padding: 28px 0; white-space: pre-line; max-width: 860px; }
.tab-panel[hidden] { display: none; }
.tab-panel .empty { color: var(--muted); font-style: normal; }
.demo-callout { display: flex; gap: 12px; align-items: flex-start; margin-top: 18px; }
.demo-callout .icon { color: #d97706; margin-top: 2px; }
.safety-note { margin-top: 16px; font-size: .88rem; }

/* --- Entreprise / contact --- */
.about-grid { display: grid; grid-template-columns: 1.1fr .9fr; gap: clamp(32px, 5vw, 64px); align-items: center; }
.about-text { white-space: pre-line; color: var(--muted); font-size: 1.04rem; }
.about-visual { position: relative; border-radius: var(--radius-lg); aspect-ratio: 4 / 3.4; overflow: hidden; background: linear-gradient(135deg, var(--hero-a), var(--hero-b)); display: grid; place-items: center; }
.about-visual .stat-bubble { position: absolute; background: var(--surface); color: var(--text); border-radius: var(--radius); padding: 14px 18px; box-shadow: var(--shadow-hover); }
.about-visual .stat-bubble strong { display: block; font-family: var(--font-head); font-size: 1.6rem; color: var(--primary); line-height: 1.1; }
.about-visual .stat-bubble span { font-size: .82rem; color: var(--muted); }
.values { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 20px; }
.value-card { padding: 28px; border-radius: var(--radius); background: var(--surface); border: var(--card-border); box-shadow: var(--shadow); }
.value-card .term-icon { width: 48px; height: 48px; display: grid; place-items: center; border-radius: var(--radius-sm); background: color-mix(in srgb, var(--accent) 18%, transparent); color: var(--primary); margin-bottom: 16px; }
.value-card p { color: var(--muted); margin: 0; }
.contact-layout { display: grid; grid-template-columns: .85fr 1.15fr; gap: clamp(28px, 4vw, 56px); align-items: start; padding-block: 48px 88px; }
.contact-cards { display: grid; gap: 14px; }
.contact-card { display: flex; gap: 14px; padding: 18px; border-radius: var(--radius); background: var(--surface); border: var(--card-border); box-shadow: var(--shadow); }
.contact-card .term-icon { width: 46px; height: 46px; flex: none; display: grid; place-items: center; border-radius: var(--radius-sm); background: color-mix(in srgb, var(--primary) 11%, transparent); color: var(--primary); }
.contact-card strong { display: block; margin-bottom: 2px; }
.contact-card span, .contact-card a { color: var(--muted); white-space: pre-line; overflow-wrap: anywhere; }
.contact-card a:hover { color: var(--primary); }
.contact-form { padding: clamp(22px, 3vw, 36px); border-radius: var(--radius-lg); background: var(--surface); border: var(--card-border); box-shadow: var(--shadow); }
.map-embed { margin-top: 14px; border-radius: var(--radius); overflow: hidden; border: 1px solid var(--border); aspect-ratio: 16 / 10; }
.map-embed iframe { width: 100%; height: 100%; border: 0; }

.notfound { text-align: center; padding-block: 120px; }
.notfound .code { font-family: var(--font-head); font-size: clamp(5rem, 14vw, 9rem); font-weight: 800; line-height: 1; background: linear-gradient(120deg, var(--primary), var(--accent)); -webkit-background-clip: text; background-clip: text; color: transparent; }

/* 7. Modèles : variations de structure ---------------------------------- */

/* Prestige : filets fins, héros sobre, cartes encadrées */
[data-template="prestige"] .product-card, [data-template="prestige"] .term-card, [data-template="prestige"] .step, [data-template="prestige"] .value-card { border: 1px solid var(--border); }
[data-template="prestige"] .product-body { padding: 22px 22px 24px; }
[data-template="prestige"] .product-media { background: var(--surface-2); }
[data-template="prestige"] .hero { background: var(--hero-c); }
[data-template="prestige"] .hero h1 .hl { background: none; color: var(--primary); font-style: italic; }
[data-template="prestige"] .hero-visual .disc { border-radius: 0; inset: 4% 10%; background: linear-gradient(160deg, color-mix(in srgb, var(--accent) 35%, var(--surface)), var(--primary)); }
[data-template="prestige"] .hero-visual .ring { border-radius: 0; inset: 0 4%; border-style: solid; border-width: 1px; animation: none; }
[data-template="prestige"] .section-head { border-bottom: 1px solid var(--border); padding-bottom: 20px; }
[data-template="prestige"] .main-nav a { text-transform: uppercase; letter-spacing: .1em; font-size: .8rem; }
[data-template="prestige"] .eyebrow { letter-spacing: .3em; }

/* Industriel : angles nets, contraste, bandeaux techniques */
[data-template="industriel"] .hero { background: linear-gradient(115deg, var(--hero-c) 0 58%, color-mix(in srgb, var(--primary) 12%, var(--hero-c)) 58% 100%); }
[data-template="industriel"] .hero-visual .disc { border-radius: 0; inset: 8%; clip-path: polygon(12% 0, 100% 0, 100% 88%, 88% 100%, 0 100%, 0 12%); }
[data-template="industriel"] .hero-visual .ring { display: none; }
[data-template="industriel"] .product-card { border-top: 4px solid var(--primary); }
[data-template="industriel"] .product-card:hover { transform: translate(-3px, -3px); }
[data-template="industriel"] .term-card { border-inline-start: 4px solid var(--primary); }
[data-template="industriel"] .term-card .term-icon, [data-template="industriel"] .step .term-icon { border-radius: 0; }
[data-template="industriel"] .search-field { border-width: 2px; }
[data-template="industriel"] .product-ref { color: var(--primary); }
[data-template="industriel"] .section-alt { background: repeating-linear-gradient(-45deg, var(--surface-2) 0 14px, color-mix(in srgb, var(--surface-2) 70%, var(--bg)) 14px 28px); }
[data-template="industriel"] .brand-name { font-size: 1.25rem; }
[data-template="industriel"] .main-nav a { text-transform: uppercase; font-family: var(--font-head); font-size: 1.05rem; letter-spacing: .05em; font-weight: 600; }

/* Épuré : à plat, beaucoup d'espace, peu d'ornements */
[data-template="epure"] .hero { background: var(--bg); text-align: center; }
[data-template="epure"] .hero-inner { grid-template-columns: 1fr; justify-items: center; }
[data-template="epure"] .hero-lead, [data-template="epure"] .hero .search-box { margin-inline: auto; }
[data-template="epure"] .hero .search-box { width: 100%; max-width: 680px; }
[data-template="epure"] .hero-quick, [data-template="epure"] .hero-stats { justify-content: center; }
[data-template="epure"] .hero-visual { display: none; }
[data-template="epure"] .hero h1 .hl { background: none; color: var(--primary); }
[data-template="epure"] .product-card, [data-template="epure"] .term-card, [data-template="epure"] .step, [data-template="epure"] .value-card { background: var(--surface-2); }
[data-template="epure"] .product-media { background: transparent; }
[data-template="epure"] .product-foot { border-top-color: transparent; }
[data-template="epure"] .section-alt { background: transparent; border-block: 1px solid var(--border); }
[data-template="epure"] .search-field { box-shadow: none; }

/* Vitalité : très arrondi, dégradés, pastilles */
[data-template="vitalite"] .hero { background:
  radial-gradient(50% 60% at 90% 10%, color-mix(in srgb, var(--hero-b) 55%, transparent), transparent 70%),
  radial-gradient(50% 60% at 0% 100%, color-mix(in srgb, var(--hero-a) 35%, transparent), transparent 70%), var(--hero-c); }
[data-template="vitalite"] .product-media { background: linear-gradient(150deg, color-mix(in srgb, var(--accent) 30%, var(--surface)), color-mix(in srgb, var(--primary) 18%, var(--surface))); margin: 10px 10px 0; border-radius: calc(var(--radius) - 8px); }
[data-template="vitalite"] .term-card .term-icon { border-radius: 50%; background: linear-gradient(135deg, var(--primary), var(--accent)); color: #fff; }
[data-template="vitalite"] .step .term-icon { border-radius: 50%; background: linear-gradient(135deg, var(--primary), var(--accent)); }
[data-template="vitalite"] .btn-primary { background: linear-gradient(120deg, var(--primary), color-mix(in srgb, var(--accent) 70%, var(--primary))); }
[data-template="vitalite"] .search-field { border-radius: 999px; }
[data-template="vitalite"] .cta-band { background: linear-gradient(120deg, var(--primary), var(--accent)); }

/* Magazine : héros centré éditorial, première carte mise en avant */
[data-template="magazine"] .hero-inner { grid-template-columns: 1fr; text-align: center; justify-items: center; }
[data-template="magazine"] .hero h1 { font-size: calc(clamp(2.4rem, 6vw, 4.8rem)); max-width: 15ch; margin-inline: auto; }
[data-template="magazine"] .hero h1 .hl { font-style: italic; }
[data-template="magazine"] .hero-lead, [data-template="magazine"] .hero .search-box { margin-inline: auto; }
[data-template="magazine"] .hero .search-box { width: 100%; }
[data-template="magazine"] .hero-quick, [data-template="magazine"] .hero-stats { justify-content: center; }
[data-template="magazine"] .hero-visual { aspect-ratio: 16 / 6; max-width: 820px; margin-top: 12px; }
[data-template="magazine"] .hero-visual .disc { inset: 22% 0 0; border-radius: 50% 50% 0 0 / 100% 100% 0 0; }
[data-template="magazine"] .hero-visual .ring { display: none; }
[data-template="magazine"] .hero-visual img { height: 92%; bottom: 0; }
[data-template="magazine"] .hero-visual img:nth-of-type(1) { left: 22%; height: 74%; }
[data-template="magazine"] .hero-visual img:nth-of-type(2) { height: 100%; }
[data-template="magazine"] .hero-visual img:nth-of-type(3) { right: 22%; height: 70%; }
@media (min-width: 900px) {
  [data-template="magazine"] .featured-grid .product-card:first-child { grid-column: span 2; grid-row: span 2; }
  [data-template="magazine"] .featured-grid .product-card:first-child .product-media { aspect-ratio: auto; flex: 1; min-height: 360px; }
  [data-template="magazine"] .featured-grid .product-card:first-child h3 { font-size: 1.7rem; }
}
[data-template="magazine"] .product-card h3 { font-weight: 600; }
[data-template="magazine"] .section-head { flex-direction: column; align-items: flex-start; }

/* 8. Animations -------------------------------------------------------- */

/* Apparition au défilement */
[data-reveal] { opacity: 0; transform: translateY(26px); transition: opacity .8s cubic-bezier(.2, .7, .2, 1), transform .8s cubic-bezier(.2, .7, .2, 1); transition-delay: var(--d, 0s); }
[data-reveal="fade"] { transform: none; }
[data-reveal="left"] { transform: translateX(-30px); }
[data-reveal="right"] { transform: translateX(30px); }
[data-reveal].is-visible { opacity: 1; transform: none; }
.no-js [data-reveal] { opacity: 1; transform: none; }

/* Effet de brillance */
.shine { position: relative; overflow: hidden; isolation: isolate; }
.shine::after {
  content: ''; position: absolute; top: -50%; left: -60%; width: 40%; height: 200%; z-index: 3; pointer-events: none;
  background: linear-gradient(100deg, transparent 0%, rgba(255, 255, 255, .55) 50%, transparent 100%); transform: rotate(18deg) translateX(-150%);
}
.shine:hover::after, .shine.shine-auto::after { animation: shine 1.1s ease; }
.shine.shine-auto::after { animation: shine 1.4s ease 1.2s, shine-loop 7s ease 4s infinite; }
@keyframes shine { to { transform: rotate(18deg) translateX(520%); } }
@keyframes shine-loop { 0%, 80% { transform: rotate(18deg) translateX(-150%); } 100% { transform: rotate(18deg) translateX(520%); } }
.product-card.shine::after { background: linear-gradient(100deg, transparent, rgba(255, 255, 255, .28), transparent); }
[data-mode="dark"] .shine::after { background: linear-gradient(100deg, transparent, rgba(255, 255, 255, .16), transparent); }

/* Bulles flottantes */
.bubbles { position: absolute; inset: 0; overflow: hidden; pointer-events: none; z-index: -1; }
.bubbles span {
  position: absolute; bottom: -80px; left: var(--x); width: var(--s); height: var(--s); border-radius: 50%;
  background: radial-gradient(circle at 32% 28%, rgba(255, 255, 255, .95) 0 8%, rgba(255, 255, 255, .25) 16%, color-mix(in srgb, var(--accent) 14%, transparent) 55%, color-mix(in srgb, var(--accent) 38%, transparent) 100%);
  border: 1px solid rgba(255, 255, 255, .45); opacity: 0; animation: bubble var(--t) ease-in var(--d) infinite; will-change: transform, opacity;
}
[data-mode="dark"] .bubbles span { border-color: rgba(255, 255, 255, .18); background: radial-gradient(circle at 32% 28%, rgba(255, 255, 255, .5) 0 8%, rgba(255, 255, 255, .08) 18%, color-mix(in srgb, var(--accent) 12%, transparent) 60%, color-mix(in srgb, var(--accent) 30%, transparent)); }
@keyframes bubble {
  0% { transform: translate3d(0, 0, 0) scale(.6); opacity: 0; }
  12% { opacity: .75; }
  50% { transform: translate3d(var(--dx), -45vh, 0) scale(1); }
  88% { opacity: .55; }
  100% { transform: translate3d(calc(var(--dx) * -1), -95vh, 0) scale(1.08); opacity: 0; }
}

/* Vague du héros */
.hero-wave svg { animation: wave 16s linear infinite; }
@keyframes wave { to { transform: translateX(-50%); } }
@keyframes spin { to { transform: rotate(360deg); } }
@keyframes floaty { 50% { transform: translateY(-10px); } }
.hero-visual img:nth-of-type(2) { animation: floaty-c 6s ease-in-out infinite; }
@keyframes floaty-c { 50% { transform: translateX(-50%) translateY(-12px); } }

/* Animations désactivées (préférence système ou réglage administrateur) */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .001ms !important; animation-iteration-count: 1 !important; transition-duration: .001ms !important; scroll-behavior: auto !important; }
  [data-reveal] { opacity: 1; transform: none; }
  .bubbles, .hero-canvas { display: none; }
  .shine::after { display: none; }
}
[data-animations="off"] *, [data-animations="off"] *::before, [data-animations="off"] *::after { animation: none !important; }
[data-animations="off"] [data-reveal] { opacity: 1; transform: none; transition: none; }
[data-animations="off"] .bubbles, [data-animations="off"] .hero-canvas, [data-animations="off"] .shine::after { display: none; }

/* 9. Responsive -------------------------------------------------------- */
@media (max-width: 1080px) {
  .footer-grid { grid-template-columns: 1fr 1fr; }
  .catalog { grid-template-columns: 250px 1fr; gap: 24px; }
}
@media (max-width: 900px) {
  .menu-toggle { display: inline-grid; }
  .main-nav { position: fixed; inset: 72px 0 auto 0; background: var(--surface); border-bottom: 1px solid var(--border); box-shadow: var(--shadow-hover); padding: 12px 20px 20px; transform: translateY(-8px); opacity: 0; visibility: hidden; transition: .25s; }
  .main-nav.open { transform: none; opacity: 1; visibility: visible; }
  .main-nav ul { flex-direction: column; }
  .main-nav a { padding: 14px; font-size: 1.05rem; }
  .header-actions { margin-inline-start: auto; }
  .header-cta { display: none; }
  .hero-inner, .about-grid, .contact-layout, .product-layout { grid-template-columns: 1fr; }
  .hero-visual { max-width: 380px; }
  .product-gallery { position: relative; top: 0; max-width: 520px; width: 100%; margin-inline: auto; }
  .steps { grid-template-columns: 1fr; }
  .catalog { grid-template-columns: 1fr; padding-top: 20px; }
  .filters-btn { display: inline-flex; }
  .filters {
    position: fixed; inset: 0; z-index: 100; max-height: none; background: var(--bg); padding: 0; transform: translateX(-100%); transition: transform .3s ease; display: flex; flex-direction: column;
  }
  .filters.open { transform: none; }
  .filters-drawer-head { display: flex; align-items: center; justify-content: space-between; padding: 14px 20px; border-bottom: 1px solid var(--border); background: var(--surface); }
  .filters-drawer-head h2 { margin: 0; font-size: 1.15rem; font-family: var(--font-body); text-transform: none; }
  .filters-scroll { flex: 1; overflow: auto; padding: 16px 20px; }
  .filters-drawer-foot { display: flex; gap: 10px; padding: 14px 20px; border-top: 1px solid var(--border); background: var(--surface); }
  .filters-drawer-foot .btn { flex: 1; }
  .filters .filters-head { display: none; }
  body.no-scroll { overflow: hidden; }
}
@media (max-width: 420px) {
  .header-actions { gap: 4px; }
  .site-header .icon-btn { width: 38px; height: 38px; }
  .brand { gap: 7px; }
  .site-header .brand-mark { width: 30px; height: 30px; }
}
@media (max-width: 380px) {
  .site-header .brand-name small { display: none; }
  .site-header .brand-name { font-size: .84rem; }
}
@media (max-width: 340px) {
  .site-header .brand-name { display: none; }
  .site-header .icon-btn { width: 36px; height: 36px; }
}
@media (max-width: 640px) {
  .container { width: min(100% - 28px, 1240px); }
  .brand-name { font-size: .92rem; }
  .brand-name small { letter-spacing: .2em; }
  .brand-mark { width: 34px; height: 34px; }
  .header-inner { gap: 10px; }
  .icon-btn { width: 40px; height: 40px; }
  .form-grid { grid-template-columns: 1fr; }
  .footer-grid { grid-template-columns: 1fr; gap: 28px; }
  .docs-grid { grid-template-columns: 1fr; }
  .product-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
  .product-body { padding: 12px; gap: 6px; }
  .product-card h3 { font-size: .98rem; }
  .product-card p { font-size: .84rem; }
  .product-tags { display: none; }
  .product-foot { padding: 10px 12px; font-size: .76rem; }
  .product-foot .docs { display: none; }
  .product-badges { top: 8px; inset-inline-start: 8px; }
  .product-badges .chip { font-size: .66rem; padding: 2px 7px; }
  .term-grid { grid-template-columns: repeat(2, 1fr); gap: 10px; }
  .term-card { padding: 14px; gap: 10px; }
  .term-card .term-icon { width: 40px; height: 40px; }
  .hero-stats div strong { font-size: 1.45rem; }
  .search-field .btn span { display: none; }
  .catalog-toolbar select { flex: 1; }
  .wa-float { width: 50px; height: 50px; inset-inline-end: 14px; bottom: 14px; }
  [data-template="magazine"] .hero-visual { aspect-ratio: 16 / 9; }
}
@media (max-width: 380px) {
  .product-grid { grid-template-columns: 1fr; }
}

/* Icônes (sprite SVG) */
.icon { fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }

/* Catalogue : pas de débordement horizontal sur petit écran */
.catalog > * { min-width: 0; }
.catalog-toolbar .search-box { min-width: 0; }
#scope { flex: 0 0 auto; max-width: 42%; }
@media (max-width: 640px) {
  .catalog-toolbar .search-box { flex-basis: 100%; }
  .catalog-toolbar #sort { flex: 1 1 0; min-width: 0; }
}

/* Les animations d’apparition latérales ne doivent jamais créer de défilement horizontal */
html, body { overflow-x: clip; }
.filters-drawer-foot .btn { min-width: 0; padding-inline: 12px; white-space: normal; line-height: 1.2; text-align: center; }
.filters-drawer-foot .btn-primary { flex: 1.6 1 0; }
.filters-drawer-foot .btn-ghost { flex: 1 1 0; }


/* ==========================================================================
   v2 : arabe (RTL), demande de devis, secteurs, références, espace client
   ========================================================================== */

/* --- Arabe / RTL --- */
html[dir="rtl"] { --font-body: 'Cairo', 'Inter', system-ui, 'Segoe UI', Tahoma, sans-serif; --font-head: 'Cairo', 'Inter', system-ui, sans-serif; --head-transform: none; }
html[dir="rtl"] body { line-height: 1.75; }
html[dir="rtl"] h1, html[dir="rtl"] h2, html[dir="rtl"] h3, html[dir="rtl"] h4,
html[dir="rtl"] .main-nav a, html[dir="rtl"] .chip, html[dir="rtl"] .site-footer h4,
html[dir="rtl"] .info-block h2, html[dir="rtl"] .eyebrow, html[dir="rtl"] .btn { letter-spacing: 0 !important; text-transform: none !important; }
html[dir="rtl"] .brand-name, html[dir="rtl"] .brand-name small { direction: ltr; unicode-bidi: isolate; }
html[dir="rtl"] use[href$="#i-arrow"], html[dir="rtl"] use[href$="#i-external"], html[dir="rtl"] use[href$="#i-logout"] { transform: scaleX(-1); transform-origin: center; transform-box: fill-box; }
html[dir="rtl"] .term-card .arrow { transform: translateX(6px); }
html[dir="rtl"] .term-card:hover .arrow { transform: none; }
html[dir="rtl"] [data-reveal="left"] { transform: translateX(30px); }
html[dir="rtl"] [data-reveal="right"] { transform: translateX(-30px); }
html[dir="rtl"] [data-reveal].is-visible { transform: none; }
html[dir="rtl"] .filter-group[data-open="false"] > button .chev { transform: rotate(90deg); }
@media (max-width: 960px) { html[dir="rtl"] .filters { transform: translateX(100%); } html[dir="rtl"] .filters.open { transform: none; } }
html[dir="rtl"] input[type="email"], html[dir="rtl"] input[type="tel"], html[dir="rtl"] input[dir="ltr"] { text-align: right; }
bdi { unicode-bidi: isolate; }

/* --- En-tête : langue, devis, espace client --- */
.lang-switch span { font-weight: 800; font-size: .92rem; line-height: 1; }
.lang-switch[lang="ar"] span { font-family: 'Cairo', sans-serif; font-size: 1.05rem; }
.quote-btn { position: relative; }
.quote-count {
  position: absolute; top: -4px; inset-inline-end: -4px; min-width: 20px; height: 20px; padding: 0 5px; border-radius: 999px;
  background: var(--accent); color: #0b1620; font-size: .72rem; font-weight: 800; display: grid; place-items: center; line-height: 1;
  border: 2px solid var(--surface); font-family: var(--font-body);
}
.quote-count.bump { animation: bump .45s ease; }
@keyframes bump { 40% { transform: scale(1.35); } }
.nav-client a { display: inline-flex; align-items: center; gap: 6px; }
.nav-client .icon { width: 17px; height: 17px; }

/* --- Carte produit : bouton « Ajouter au devis » au-dessus du lien étiré --- */
.card-quote {
  position: relative; z-index: 2; display: inline-flex; align-items: center; gap: 5px; border: 1.5px solid color-mix(in srgb, var(--primary) 45%, var(--border));
  background: var(--surface); color: var(--primary); border-radius: 999px; padding: 5px 11px; font: inherit; font-size: .78rem; font-weight: 700; cursor: pointer; transition: .2s; white-space: nowrap;
}
.card-quote .icon { width: 14px; height: 14px; }
.card-quote:hover { background: var(--primary); color: var(--on-primary); border-color: var(--primary); }
.card-quote.added { background: color-mix(in srgb, #16a34a 14%, var(--surface)); border-color: color-mix(in srgb, #16a34a 45%, transparent); color: #15803d; }
[data-mode="dark"] .card-quote.added { color: #4ade80; }
.card-quote:focus-visible { outline: 2px solid var(--primary); outline-offset: 2px; }

/* --- Toast --- */
.site-toast {
  position: fixed; inset-inline-start: 50%; bottom: 22px; z-index: 300; transform: translate(-50%, 140%); opacity: 0; transition: transform .3s ease, opacity .3s;
  display: flex; align-items: center; gap: 14px; max-width: min(92vw, 520px); padding: 12px 14px 12px 18px; border-radius: var(--radius);
  background: var(--text); color: var(--bg); box-shadow: var(--shadow-hover); font-size: .93rem; pointer-events: none;
}
html[dir="rtl"] .site-toast { transform: translate(50%, 140%); }
.site-toast.show { transform: translate(-50%, 0); opacity: 1; pointer-events: auto; }
html[dir="rtl"] .site-toast.show { transform: translate(50%, 0); }
.site-toast a { color: var(--bg); font-weight: 800; text-decoration: underline; white-space: nowrap; }
@media (prefers-reduced-motion: reduce) { .site-toast { transition: opacity .2s; } }

/* --- Bloc « Ajouter au devis » (fiche produit) --- */
.quote-add { display: flex; flex-wrap: wrap; align-items: end; gap: 12px; width: 100%; }
.qa-fields { display: flex; flex-wrap: wrap; gap: 12px; flex: 1 1 260px; }
.qa-fields label, .qi-fields label { display: grid; gap: 4px; font-size: .8rem; font-weight: 600; color: var(--muted); flex: 1 1 140px; min-width: 0; }
.qa-fields select, .qa-fields input, .qi-fields select, .qi-fields input {
  font: inherit; font-size: .95rem; color: var(--text); background: var(--surface); border: 1.5px solid var(--border); border-radius: var(--radius-sm); padding: 9px 11px; min-width: 0; width: 100%;
}
.qa-qty { flex: 0 0 120px !important; }
.alert-info { display: flex; gap: 10px; align-items: flex-start; background: color-mix(in srgb, var(--primary) 9%, var(--surface)); border-color: color-mix(in srgb, var(--primary) 30%, transparent); color: var(--text); }
.alert-info .icon, .quote-success > .icon { flex: none; width: 20px; height: 20px; color: var(--primary); margin-top: 2px; }
.quote-success { display: flex; gap: 12px; }
.quote-success > .icon { color: #16a34a; }
.quote-success p { margin: 4px 0 0; }

/* --- Page devis --- */
.quote-layout { display: grid; grid-template-columns: 1.05fr .95fr; gap: clamp(24px, 4vw, 48px); align-items: start; padding-block: clamp(32px, 5vw, 56px); }
.quote-layout > * { min-width: 0; }
.quote-list-head { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; margin-bottom: 14px; }
.quote-list-head h2 { font-size: 1.35rem; margin: 0; }
.quote-items { list-style: none; margin: 0; padding: 0; display: grid; gap: 12px; }
.quote-item { display: grid; grid-template-columns: 76px 1fr auto; gap: 14px; align-items: start; padding: 14px; border-radius: var(--radius); background: var(--surface); border: var(--card-border); box-shadow: var(--shadow); }
.qi-media { width: 76px; height: 76px; border-radius: var(--radius-sm); background: var(--surface-2); display: grid; place-items: center; overflow: hidden; color: var(--muted); }
.qi-media img { width: 86%; height: 86%; object-fit: contain; }
.qi-body { display: grid; gap: 4px; min-width: 0; }
.qi-name { font-weight: 700; color: var(--text); line-height: 1.3; }
.qi-name:hover { color: var(--primary); }
.qi-fields { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 6px; }
.qi-fields .qa-qty { flex: 0 0 150px !important; }
.stepper { display: flex; align-items: stretch; border: 1.5px solid var(--border); border-radius: var(--radius-sm); overflow: hidden; background: var(--surface); }
.stepper input { border: 0 !important; border-radius: 0 !important; text-align: center; padding-inline: 4px !important; -moz-appearance: textfield; appearance: textfield; }
.stepper input::-webkit-inner-spin-button, .stepper input::-webkit-outer-spin-button { -webkit-appearance: none; margin: 0; }
.stepper button { flex: none; width: 38px; border: 0; background: var(--surface-2); color: var(--text); cursor: pointer; display: grid; place-items: center; }
.stepper button:hover { color: var(--primary); }
.stepper .icon { width: 15px; height: 15px; }
.qi-remove { color: var(--muted); }
.qi-remove:hover { color: #dc2626; }
.quote-note { display: flex; gap: 8px; align-items: flex-start; color: var(--muted); font-size: .88rem; margin-top: 16px; }
.quote-note .icon { flex: none; width: 18px; height: 18px; margin-top: 3px; }
.quote-form { position: sticky; top: 92px; }
.quote-actions { display: flex; flex-wrap: wrap; gap: 12px; align-items: center; }
.quote-actions .btn[disabled] { opacity: .55; cursor: not-allowed; }
@media (max-width: 960px) { .quote-layout { grid-template-columns: 1fr; } .quote-form { position: static; } }
@media (max-width: 640px) {
  .quote-item { grid-template-columns: 56px 1fr auto; gap: 10px; padding: 12px; }
  .qi-media { width: 56px; height: 56px; }
  .qi-fields .qa-qty, .qi-fields label { flex: 1 1 100% !important; }
}

/* --- Résultats catalogue --- */
.results-bar { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; margin-bottom: 16px; }
.results-bar .results-meta { margin: 0; }
.pdf-link { display: inline-flex; align-items: center; gap: 6px; }
.pdf-link .icon { width: 16px; height: 16px; }
.scope-select { min-width: 0; }

/* --- Secteurs --- */
.sector-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 18px; }
.sector-card {
  position: relative; overflow: hidden; display: flex; flex-direction: column; gap: 12px; padding: 24px; border-radius: var(--radius); background: var(--surface);
  border: var(--card-border); box-shadow: var(--shadow); color: var(--text); transition: transform .3s, box-shadow .3s, border-color .3s;
}
.sector-card:hover { transform: translateY(-4px); box-shadow: var(--shadow-hover); border-color: var(--primary); color: var(--text); }
.sector-card .term-icon { width: 54px; height: 54px; display: grid; place-items: center; border-radius: var(--radius-sm); background: color-mix(in srgb, var(--primary) 11%, transparent); color: var(--primary); }
.sector-card .term-icon .icon { width: 28px; height: 28px; }
.sector-card h2 { font-size: 1.2rem; margin: 0; }
.sector-card p { color: var(--muted); margin: 0; font-size: .93rem; flex: 1; }
.sector-foot { display: flex; justify-content: space-between; align-items: center; gap: 8px; font-size: .85rem; border-top: 1px solid var(--border); padding-top: 12px; margin-top: auto; }
.sector-foot .count { color: var(--muted); }
.sector-foot .more { color: var(--primary); font-weight: 700; display: inline-flex; gap: 4px; align-items: center; }
.sector-foot .icon, .dept-title .link-btn .icon { width: 16px; height: 16px; }
.sector-hero-inner { display: flex; align-items: center; gap: 18px; }
.sector-hero-inner h1 { margin-bottom: 6px; }
.sector-icon { flex: none; width: 72px; height: 72px; display: grid; place-items: center; border-radius: var(--radius); background: var(--primary); color: var(--on-primary); box-shadow: var(--shadow-hover); }
.sector-icon .icon { width: 38px; height: 38px; }
.sector-actions { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 22px; }
.sector-hero .btn-light { border: 1px solid var(--border); }
.sector-content { max-width: 860px; }
.dept-group + .dept-group { margin-top: clamp(32px, 5vw, 52px); }
.dept-title { display: flex; align-items: center; flex-wrap: wrap; gap: 10px; font-size: 1.2rem; margin-bottom: 18px; padding-bottom: 10px; border-bottom: 2px solid var(--border); }
.dept-title > .icon { width: 24px; height: 24px; color: var(--primary); }
.dept-title small { font-size: .82rem; color: var(--muted); font-weight: 500; font-family: var(--font-body); text-transform: none; }
.dept-title .link-btn { margin-inline-start: auto; display: inline-flex; align-items: center; gap: 4px; font-family: var(--font-body); text-transform: none; letter-spacing: 0; }
@media (max-width: 640px) {
  .sector-hero-inner { align-items: flex-start; gap: 12px; }
  .sector-icon { width: 54px; height: 54px; }
  .sector-icon .icon { width: 28px; height: 28px; }
  .sector-grid { grid-template-columns: 1fr; }
  .dept-title .link-btn { margin-inline-start: 0; flex-basis: 100%; }
}

/* --- Références : logos clients/marques, certifications --- */
.logo-title { font-size: .85rem; letter-spacing: .12em; text-transform: uppercase; color: var(--muted); text-align: center; margin: 26px 0 14px; font-family: var(--font-body); }
.logo-strip { display: flex; flex-wrap: wrap; justify-content: center; gap: 14px; }
.logo-item {
  width: 172px; height: 86px; display: grid; place-items: center; padding: 14px; border-radius: var(--radius); background: var(--surface); border: var(--card-border);
  box-shadow: var(--shadow); color: var(--muted); transition: .25s;
}
.logo-item img { max-width: 100%; max-height: 100%; object-fit: contain; filter: grayscale(1); opacity: .75; transition: .25s; }
.logo-item:hover img { filter: none; opacity: 1; }
[data-mode="dark"] .logo-item { background: #f4f7fa; }
.logo-text { font-weight: 800; font-size: .95rem; text-align: center; line-height: 1.2; }
.showcase-demo { display: flex; align-items: center; justify-content: center; gap: 6px; font-size: .85rem; margin-top: 20px; }
.showcase-demo .icon { width: 16px; height: 16px; }
.cert-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); gap: 18px; }
.cert-card { display: flex; gap: 14px; align-items: flex-start; padding: 20px; border-radius: var(--radius); background: var(--surface); border: var(--card-border); box-shadow: var(--shadow); }
.cert-card img { width: 64px; height: 64px; object-fit: contain; flex: none; }
.cert-card .term-icon { flex: none; width: 52px; height: 52px; display: grid; place-items: center; border-radius: var(--radius-sm); background: color-mix(in srgb, var(--accent) 18%, transparent); color: var(--primary); }
.cert-card h3 { font-size: 1.02rem; margin: 0 0 4px; }
.cert-card p { margin: 0; color: var(--muted); font-size: .88rem; }
@media (max-width: 640px) { .logo-item { width: calc(50% - 7px); height: 74px; } }

/* --- Entreprise : bulles de chiffres --- */
.about-visual .sb-1 { top: 18px; inset-inline-start: 18px; }
.about-visual .sb-2 { bottom: 18px; inset-inline-end: 18px; }

/* --- Pied de page --- */
.footer-pdf, .footer-review { display: inline-flex; align-items: center; gap: 8px; }
.footer-pdf .icon, .footer-review .icon { width: 17px; height: 17px; }
.footer-review .icon { color: #fbbf24; }

/* --- Espace client --- */
.narrow { width: min(100% - 40px, 520px); padding-block: clamp(32px, 5vw, 56px); }
.client-hero { display: flex; justify-content: space-between; align-items: end; gap: 20px; flex-wrap: wrap; }
.client-dash { display: grid; gap: 22px; padding-block: clamp(28px, 4vw, 48px); }
.client-block { padding: clamp(18px, 3vw, 28px); border-radius: var(--radius-lg); background: var(--surface); border: var(--card-border); box-shadow: var(--shadow); min-width: 0; }
.client-block > h2, .client-block-head h2 { font-size: 1.25rem; margin-bottom: 14px; }
.client-block-head { display: flex; justify-content: space-between; align-items: start; gap: 14px; flex-wrap: wrap; margin-bottom: 8px; }
.client-block-head p { margin: -8px 0 10px; }
.client-products { display: grid; grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); gap: 16px; }
.client-product { display: grid; gap: 8px; align-content: start; }
.cp-docs { display: flex; flex-wrap: wrap; gap: 8px; }
.cp-docs .btn .icon { width: 15px; height: 15px; }
.table-wrap { overflow-x: auto; -webkit-overflow-scrolling: touch; }
.client-table { width: 100%; border-collapse: collapse; font-size: .92rem; min-width: 560px; }
.client-table th { text-align: start; font-size: .78rem; color: var(--muted); font-weight: 700; padding: 8px 10px; border-bottom: 2px solid var(--border); }
.client-table td { padding: 12px 10px; border-bottom: 1px solid var(--border); vertical-align: top; }
.mini-list { margin: 0; padding-inline-start: 18px; }
.chip.status-new { background: color-mix(in srgb, #2563eb 14%, var(--surface)); color: #1d4ed8; border-color: transparent; }
.chip.status-in_progress { background: color-mix(in srgb, #f59e0b 18%, var(--surface)); color: #b45309; border-color: transparent; }
.chip.status-answered { background: color-mix(in srgb, #16a34a 15%, var(--surface)); color: #15803d; border-color: transparent; }
.chip.status-closed { background: var(--surface-2); color: var(--muted); border-color: transparent; }
[data-mode="dark"] .chip.status-new { color: #93c5fd; }
[data-mode="dark"] .chip.status-in_progress { color: #fcd34d; }
[data-mode="dark"] .chip.status-answered { color: #86efac; }
.pwd-form { display: grid; gap: 14px; max-width: 420px; }
@media (max-width: 640px) { .client-products { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; } .client-hero .btn { width: 100%; } }

/* --- Ressources : conseils, sécurité alimentaire, laboratoire et vidéos --- */
.brand-logo { display:block; width:auto; max-width:148px; max-height:46px; object-fit:contain; }
.resource-toolbar { display:flex; flex-wrap:wrap; gap:14px; margin-bottom:22px; }
.resource-toolbar label { display:grid; gap:6px; min-width:min(100%,240px); color:var(--muted); font-size:.84rem; font-weight:700; }
.resource-toolbar select { min-width:220px; padding:11px 14px; border:1px solid var(--border); border-radius:var(--radius-sm); background:var(--surface); color:var(--text); font:inherit; }
.resource-grid { display:grid; grid-template-columns:repeat(auto-fill,minmax(min(100%,280px),1fr)); gap:20px; }
.resource-card { min-width:0; display:flex; flex-direction:column; overflow:hidden; border:var(--card-border); border-radius:var(--radius-lg); background:var(--surface); box-shadow:var(--shadow); color:inherit; transition:transform .22s,box-shadow .22s; }
.resource-card:hover { transform:translateY(-4px); box-shadow:var(--shadow-hover); }
.resource-card-media { position:relative; display:grid; place-items:center; height:180px; background:var(--surface-2); overflow:hidden; }
.resource-card-media img { width:100%; height:100%; object-fit:cover; }
.resource-symbol { color:var(--primary); font-size:3rem; }
.resource-kind { position:absolute; inset-inline-start:12px; top:12px; padding:5px 10px; border-radius:999px; background:var(--surface); color:var(--primary); font-size:.75rem; font-weight:800; }
.resource-card-body { display:flex; flex-direction:column; flex:1; padding:18px; }
.resource-category { color:var(--primary); font-size:.78rem; font-weight:800; letter-spacing:.02em; }
.resource-card h2 { margin:8px 0; font-size:1.16rem; }
.resource-card p { color:var(--muted); font-size:.9rem; line-height:1.65; margin:0 0 16px; }
.resource-card-foot { display:flex; justify-content:space-between; align-items:center; gap:12px; margin-top:auto; padding-top:12px; border-top:1px solid var(--border); color:var(--muted); font-size:.8rem; }
.resource-card-foot strong { color:var(--primary); }
.resource-empty { margin:30px 0; text-align:center; color:var(--muted); }
.resource-detail { max-width:900px; }
.resource-detail-meta { display:flex; flex-wrap:wrap; justify-content:space-between; gap:10px; margin-bottom:18px; color:var(--muted); font-size:.86rem; }
.resource-detail-image { width:100%; max-height:430px; object-fit:cover; border-radius:var(--radius-lg); margin-bottom:26px; }
.resource-video-frame { position:relative; width:100%; aspect-ratio:16/9; overflow:hidden; border-radius:var(--radius-lg); background:#0b1220; margin-bottom:26px; }
.resource-video-frame iframe,.resource-video { display:block; width:100%; aspect-ratio:16/9; border:0; border-radius:var(--radius-lg); background:#0b1220; margin-bottom:26px; }
.resource-video-frame iframe { position:absolute; inset:0; height:100%; }
.resource-article { max-width:780px; font-size:1.02rem; line-height:1.85; }
.resource-article p { margin:0 0 1.2em; }
.resource-source { margin:24px 0; padding:14px 18px; border-inline-start:3px solid var(--primary); background:var(--surface-2); }
@media(max-width:640px) { .brand-logo { max-width:112px; max-height:38px; } .resource-toolbar,.resource-toolbar label,.resource-toolbar select { width:100%; } .resource-card-media { height:155px; } }
