/* ==========================================================================
   Feuille de style commune DIBE / KWIKTOOL
   Seuls les jetons de tokens.css (couleurs, fonds) changent d'une marque à l'autre.
   Polices auto-hébergées (Inter, Barlow Condensed : licence SIL OFL).
   ========================================================================== */

@font-face { font-family: "Inter"; font-style: normal; font-weight: 100 900; font-display: swap;
  src: url("/assets/fonts/inter-latin-wght-normal.woff2") format("woff2");
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, 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: 100 900; font-display: swap;
  src: url("/assets/fonts/inter-latin-ext-wght-normal.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; }
@font-face { font-family: "Barlow Condensed"; font-style: normal; font-weight: 600; font-display: swap;
  src: url("/assets/fonts/barlow-condensed-latin-600-normal.woff2") format("woff2");
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }
@font-face { font-family: "Barlow Condensed"; font-style: normal; font-weight: 700; font-display: swap;
  src: url("/assets/fonts/barlow-condensed-latin-700-normal.woff2") format("woff2");
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }
@font-face { font-family: "Barlow Condensed"; font-style: normal; font-weight: 600; font-display: swap;
  src: url("/assets/fonts/barlow-condensed-latin-ext-600-normal.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; }
@font-face { font-family: "Barlow Condensed"; font-style: normal; font-weight: 700; font-display: swap;
  src: url("/assets/fonts/barlow-condensed-latin-ext-700-normal.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 {
  --font-body: "Inter", system-ui, -apple-system, "Segoe UI", Roboto, Arial, sans-serif;
  --font-head: "Barlow Condensed", "Arial Narrow", Arial, sans-serif;
  --gutter: 16px;
  --max: 1600px;
  --header-h: 64px;
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; color-scheme: var(--color-scheme, light); }
body { margin: 0; background: var(--bg) var(--texture) repeat; color: var(--text); font: 400 1rem/1.6 var(--font-body); min-height: 100vh; display: flex; flex-direction: column; }
main { flex: 1 0 auto; }
img, svg { max-width: 100%; height: auto; }
a { color: var(--link); text-underline-offset: 3px; }
a:hover { text-decoration-thickness: 2px; }
.site-header { --focus: var(--focus-header); }
.hero, .site-footer { --focus: var(--focus-dark); }
:focus-visible { outline: 3px solid var(--focus); outline-offset: 2px; border-radius: 3px; }
main:focus { outline: none; }
h1, h2, h3 { font-family: var(--font-head); font-weight: 700; line-height: 1.1; letter-spacing: .01em; margin: 0 0 .5em; }
h1 { font-size: clamp(2rem, 6vw, 3.25rem); text-transform: uppercase; }
h2 { font-size: clamp(1.5rem, 4vw, 2.1rem); text-transform: uppercase; }
h3 { font-size: 1.35rem; }
p { margin: 0 0 1em; }
[hidden] { display: none !important; }
mark.todo { background: #fff3a3; color: #000; padding: 0 .25em; border-radius: 3px; font-weight: 700; }

.wrap { width: 100%; max-width: var(--max); margin-inline: auto; padding-inline: var(--gutter); }
.visually-hidden { position: absolute !important; width: 1px; height: 1px; margin: -1px; padding: 0; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; }
.skip-link { position: absolute; left: var(--gutter); top: -100px; z-index: 100; background: var(--accent); color: var(--on-accent); padding: .6rem 1rem; border-radius: 0 0 8px 8px; font-weight: 700; }
.skip-link:focus { top: 0; }

/* ----- Bandeau recette ----- */
.env-banner { background: var(--banner-bg); color: var(--banner-text); text-align: center; font-size: .8125rem; padding: .35rem var(--gutter); }

/* ----- En-tête et navigation ----- */
.site-header { background: var(--header-bg) var(--panel-texture, none) repeat; color: var(--header-text); position: sticky; top: 0; z-index: 50; border-bottom: 1px solid var(--header-line, transparent); }
.header-in { display: flex; align-items: center; justify-content: space-between; min-height: var(--header-h); gap: 1rem; }
.logo { display: block; flex: none; line-height: 0; }
.logo img { height: 40px; width: auto; }

.nav-toggle { display: inline-flex; align-items: center; gap: .6rem; background: transparent; color: var(--header-text); border: 1px solid var(--border); border-radius: 8px; padding: .55rem .85rem; font: 600 .95rem var(--font-body); cursor: pointer; min-height: 44px; }
.nav-toggle-bars, .nav-toggle-bars::before, .nav-toggle-bars::after { display: block; width: 20px; height: 2px; background: currentColor; border-radius: 2px; content: ""; position: relative; transition: transform .2s; }
.nav-toggle-bars::before { position: absolute; top: -6px; }
.nav-toggle-bars::after { position: absolute; top: 6px; }
.nav-toggle[aria-expanded="true"] .nav-toggle-bars { background: transparent; }
.nav-toggle[aria-expanded="true"] .nav-toggle-bars::before { top: 0; transform: rotate(45deg); }
.nav-toggle[aria-expanded="true"] .nav-toggle-bars::after { top: 0; transform: rotate(-45deg); }

.main-nav { display: none; position: absolute; left: 0; right: 0; top: 100%; background: var(--header-bg); border-bottom: 1px solid var(--border); max-height: calc(100vh - var(--header-h)); overflow-y: auto; padding: .5rem var(--gutter) 1rem; }
.main-nav.is-open { display: block; }
.menu, .menu ul { list-style: none; margin: 0; padding: 0; }
.menu a { color: var(--header-text); text-decoration: none; }
.menu > li { border-bottom: 1px solid var(--border); position: relative; }
.menu > li > a { display: block; padding: .85rem 0; font-weight: 600; font-size: 1.0625rem; }
.menu > li.has-sub { display: grid; grid-template-columns: 1fr 48px; }
.menu > li.has-sub > .sub { grid-column: 1 / -1; }
.menu a:hover, .menu a[aria-current="page"] { color: var(--accent); }
.menu a[aria-current="page"] { text-decoration: underline; text-decoration-thickness: 2px; }
.sub-toggle { background: transparent; border: 0; color: var(--header-text); cursor: pointer; min-height: 44px; }
.sub-toggle span { display: inline-block; width: 10px; height: 10px; border-right: 2px solid currentColor; border-bottom: 2px solid currentColor; transform: rotate(45deg) translateY(-3px); transition: transform .2s; }
.sub-toggle[aria-expanded="true"] span { transform: rotate(-135deg); }
.sub { display: none; padding: 0 0 .75rem .75rem; }
.sub.is-open { display: block; }
.sub a { display: block; padding: .5rem 0; font-size: .95rem; }
.mega-col { margin-bottom: .75rem; }
.mega-title { font-family: var(--font-head); text-transform: uppercase; font-weight: 700; font-size: 1.1rem; letter-spacing: .02em; color: var(--accent) !important; }

@media (min-width: 992px) {
  :root { --header-h: 76px; --gutter: 24px; }
  .logo img { height: 46px; }
  .nav-toggle { display: none; }
  .main-nav { display: block; position: static; background: transparent; border: 0; padding: 0; max-height: none; overflow: visible; }
  .menu { display: flex; align-items: center; gap: .25rem; }
  .menu > li { border: 0; }
  .menu > li > a { padding: .6rem .85rem; font-size: .9375rem; border-radius: 6px; }
  .menu > li.has-sub { display: flex; align-items: center; }
  .menu > li.has-sub > a { padding-right: .15rem; }
  .sub-toggle { min-height: 36px; width: 26px; padding: 0; margin-left: -.15rem; }
  .sub { position: absolute; top: 100%; left: 0; background: var(--surface); color: var(--text); border: 1px solid var(--border); border-radius: 0 0 var(--radius) var(--radius); box-shadow: var(--card-shadow); padding: .75rem 1rem; min-width: 220px; z-index: 60; }
  .sub a { color: var(--text); }
  .sub a:hover, .sub a[aria-current="page"] { color: var(--link); text-decoration: underline; }
  .has-sub:hover > .sub, .has-sub:focus-within > .sub, .sub.is-open { display: block; }
  .has-mega { position: static; }
  .mega { left: 50%; transform: translateX(-50%); width: min(1500px, calc(100vw - 48px)); top: 100%; display: none; grid-template-columns: repeat(4, 1fr); gap: 1.25rem 1.5rem; padding: 1.5rem; }
  .has-mega:hover > .mega, .has-mega:focus-within > .mega, .mega.is-open { display: grid; }
  .mega-title { color: var(--link) !important; display: block; margin-bottom: .25rem; }
  .menu > li:last-child .sub, .menu > li:nth-last-child(2) .sub { left: auto; right: 0; }
  .menu > li.has-sub:not(.has-mega) { position: relative; }
}

/* ----- Boutons ----- */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: .4rem; background: var(--accent); color: var(--on-accent); border: 2px solid var(--accent); border-radius: var(--radius); padding: .75rem 1.25rem; font: 700 1rem var(--font-body); text-decoration: none; cursor: pointer; min-height: 44px; transition: filter .15s, transform .15s; }
.btn:hover { filter: brightness(1.08); }
.btn:active { transform: translateY(1px); }
.btn-sm { padding: .55rem .9rem; font-size: .9rem; }
.btn-meta { font-weight: 500; opacity: .85; }
.btn-hero { background: var(--hero-accent); color: var(--on-hero-accent); border-color: var(--hero-accent); }
.btn-ghost { background: transparent; color: var(--hero-text); border-color: currentColor; }
.btn-ghost-surface { background: transparent; color: var(--link); border-color: currentColor; }

/* ----- Accueil ----- */
.hero { background: var(--hero-bg); color: var(--hero-text); padding: clamp(2.5rem, 8vw, 5.5rem) 0; position: relative; overflow: hidden; }
.brand-kwiktool .hero { background: linear-gradient(135deg, #1c3661 0%, #254779 100%); }
.hero-in { max-width: var(--max); }
.eyebrow { font: 700 .8125rem var(--font-body); letter-spacing: .14em; text-transform: uppercase; color: var(--hero-accent); margin: 0 0 1rem; opacity: .95; }
.hero h1 { max-width: none; margin-bottom: .6em; }
.hero-lead { font-size: clamp(1.05rem, 2.4vw, 1.3rem); max-width: 60ch; margin-bottom: 1.75rem; opacity: .95; }
.hero-actions { display: flex; flex-wrap: wrap; gap: .75rem; margin: 0; }

.figures { background: var(--figures-bg); border-bottom: 1px solid var(--border); }
.figures-in { list-style: none; margin: 0 auto; padding-block: 1.25rem; display: grid; gap: 1rem; grid-template-columns: 1fr; }
.figures-in li { display: flex; flex-direction: column; }
.figures-in strong { font: 700 2rem/1 var(--font-head); color: var(--figures-num); text-transform: uppercase; }
.figures-in span { color: var(--figures-text); font-size: .95rem; }
@media (min-width: 700px) { .figures-in { grid-template-columns: repeat(3, 1fr); padding-block: 1.75rem; } }

.block { padding-block: clamp(2rem, 5vw, 3.5rem); }
.block-head { display: flex; align-items: baseline; justify-content: space-between; gap: 1rem; flex-wrap: wrap; margin-bottom: 1rem; }
.section-title { margin-bottom: .75rem; position: relative; padding-bottom: .5rem; }
.section-title::after { content: ""; position: absolute; left: 0; bottom: 0; width: 48px; height: 4px; background: var(--accent); border-radius: 2px; }
.section-title a { color: inherit; text-decoration: none; }
.section-title a:hover { color: var(--link); }
.section-title--sub { font-size: 1.4rem; }
.more { font-weight: 600; }
.promo-teaser { text-align: left; }

/* ----- Tuiles (familles) ----- */
.tiles { list-style: none; margin: 0; padding: 0; display: grid; gap: 1rem; grid-template-columns: repeat(2, 1fr); }
@media (min-width: 700px) { .tiles { grid-template-columns: repeat(3, 1fr); } }
@media (min-width: 992px) { .tiles { grid-template-columns: repeat(4, 1fr); } }
.tile a { display: flex; flex-direction: column; align-items: center; justify-content: flex-end; height: 100%; gap: .5rem; background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); padding: 1rem .75rem; text-align: center; text-decoration: none; color: var(--text); font: 700 1.15rem/1.15 var(--font-head); text-transform: uppercase; letter-spacing: .02em; box-shadow: var(--card-shadow); border-top: 3px solid var(--accent); transition: border-color .15s, transform .15s; }
.tile a:hover { border-color: var(--accent); transform: translateY(-2px); }
.tile img { width: 100%; max-width: 220px; height: auto; object-fit: contain; }

/* ----- Cartes (catalogues, promotions) ----- */
.cards { list-style: none; margin: 0 0 2rem; padding: 0; display: grid; gap: .9rem; grid-template-columns: repeat(2, 1fr); }
@media (min-width: 560px) { .cards { grid-template-columns: repeat(auto-fill, minmax(196px, 1fr)); gap: 1rem; } }
.card { display: flex; flex-direction: column; background: var(--surface); border: 1px solid var(--border); border-top: 3px solid var(--accent); border-radius: var(--radius); overflow: hidden; box-shadow: var(--card-shadow); }
.card-thumb { display: flex; align-items: center; justify-content: center; background: var(--surface-2); aspect-ratio: 480 / 678; overflow: hidden; }
.card-thumb img { width: 100%; height: 100%; object-fit: cover; }
.card-thumb img.is-generic { object-fit: contain; background: #fff; }
.card-thumb.is-landscape { aspect-ratio: 678 / 480; }
.thumb-empty { display: flex; flex-direction: column; align-items: center; gap: .35rem; color: var(--muted); font: 700 .9rem var(--font-head); letter-spacing: .1em; }
.card-body { display: flex; flex-direction: column; gap: .5rem; padding: .7rem .8rem .85rem; flex: 1; align-items: flex-start; }
.card-title { font-size: 1.05rem; line-height: 1.15; margin: 0; text-transform: none; }
.card-desc { color: var(--muted); font-size: .85rem; margin: 0; }
.card-body .btn { margin-top: auto; }
.empty { color: var(--muted); padding: 1rem 0; }
.chips { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: .5rem; }
.chips a { display: inline-block; padding: .45rem .9rem; border: 1px solid var(--border); border-radius: 999px; text-decoration: none; background: var(--surface); }
.chips a:hover { border-color: var(--accent); }
.siblings { margin-top: 2rem; }

/* ----- Pages ----- */
.page-head { background: var(--surface); border-bottom: 1px solid var(--border); padding: 1.5rem 0 1.25rem; }
.page-head h1 { margin: .25rem 0 .25rem; }
.page-head .lead { color: var(--muted); max-width: 70ch; margin: .5rem 0 0; font-size: 1.1rem; }
.breadcrumb ol { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: .35rem; font-size: .875rem; color: var(--muted); }
.breadcrumb li + li::before { content: "›"; margin-right: .35rem; }
.breadcrumb a { color: var(--muted); }
.page-body { padding-block: 2rem 3.5rem; }
.prose { max-width: 75ch; }
.prose h2 { margin-top: 1.5em; font-size: 1.6rem; }
.prose h3 { margin-top: 1.25em; }
.prose ul { padding-left: 1.2rem; }

.toc { margin-bottom: 2rem; }
.toc ul { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: .5rem; }
.toc a { display: inline-block; padding: .4rem .85rem; border: 1px solid var(--border); border-radius: 999px; background: var(--surface); text-decoration: none; font-size: .9rem; }
.toc a:hover { border-color: var(--accent); }
.rubrique-group { margin-bottom: 2.5rem; }
.group-title { font-size: 1.9rem; border-bottom: 2px solid var(--border); padding-bottom: .4rem; margin-bottom: 1.25rem; }
.rubrique { scroll-margin-top: calc(var(--header-h) + 9rem); }
.filter { max-width: 460px; }
.filter label { display: block; font-weight: 600; margin-bottom: .25rem; font-size: .9rem; }
.filter input { width: 100%; }
.filter-status { color: var(--muted); font-size: .85rem; margin: .25rem 0 0; min-height: 1.1em; }

/* Barre flottante de la page Catalogues : recherche + filtres par rubrique, collée sous l'en-tête */
.catbar { position: sticky; top: var(--header-h); z-index: 40; margin: 0 calc(var(--gutter) * -1) 1.5rem; padding: .6rem var(--gutter) .5rem; background: var(--band-bg, var(--bg)); border-bottom: 1px solid var(--band-border, var(--border)); box-shadow: 0 6px 12px -8px rgba(0, 0, 0, .5); }
.catbar .toc { margin: .4rem 0 0; min-width: 0; }
.catbar .toc ul { flex-wrap: wrap; gap: .25rem .3rem; max-height: 5.4rem; overflow-y: auto; scrollbar-width: thin; }
.catbar .toc li[hidden] { display: none; }
.catbar .toc a { padding: .15rem .55rem; font-size: .78rem; line-height: 1.35; }
@media (min-width: 900px) { .catbar .toc ul { max-height: none; overflow: visible; } }
@media (min-width: 900px) { .catbar { display: grid; grid-template-columns: minmax(210px, 250px) minmax(0, 1fr); column-gap: 1.25rem; align-items: start; } .catbar .toc { margin: 0; align-self: center; } .filter-status { display: none; } }

.partners { list-style: none; margin: 0; padding: 0; display: grid; gap: 1.25rem; }
.partners > li { display: grid; gap: 1rem; background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); padding: 1.25rem; grid-template-columns: 1fr; align-items: start; }
.partners img { width: 180px; height: auto; background: #fff; border-radius: 6px; padding: .5rem; }
.partners h2 { font-size: 1.5rem; }
@media (min-width: 700px) { .partners > li { grid-template-columns: 220px 1fr; } }

/* ----- Formulaires ----- */
.contact-grid { display: grid; gap: 2rem; grid-template-columns: 1fr; }
@media (min-width: 900px) { .contact-grid { grid-template-columns: 1.5fr 1fr; } }
input[type="text"], input[type="email"], input[type="tel"], input[type="search"], textarea { width: 100%; font: inherit; color: var(--text); background: var(--surface); border: 1px solid var(--muted); border-radius: 8px; padding: .7rem .85rem; min-height: 44px; }
textarea { resize: vertical; }
.field { margin-bottom: 1rem; }
.field label { display: block; font-weight: 600; margin-bottom: .3rem; }
.field--check { display: grid; grid-template-columns: 24px 1fr; gap: .6rem; align-items: start; }
.field--check input { width: 22px; height: 22px; margin-top: .15rem; accent-color: var(--accent); }
.field--check label { font-weight: 400; margin: 0; }
.field-error { color: var(--error, #b3261e); font-weight: 600; margin: .3rem 0 0; font-size: .9rem; }
.hint { color: var(--muted); font-size: .875rem; }
.hp { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }
.notice { background: var(--surface-2); border-left: 4px solid var(--accent); padding: .85rem 1rem; border-radius: 6px; }
.notice--ok { border-color: #2e9d57; }
.notice--error { border-color: #d64545; }
.contact-card { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); padding: 1.25rem; align-self: start; }
.contact-card address { font-style: normal; line-height: 1.7; }

/* ----- Pied de page ----- */
.site-footer { background: var(--footer-bg) var(--panel-texture, none) repeat; color: var(--footer-text); margin-top: 2rem; }
.site-footer a { color: inherit; }
.site-footer a:hover { color: var(--footer-heading); }
.footer-grid { display: grid; gap: 2rem; padding-block: 2.5rem 1.5rem; grid-template-columns: 1fr; }
@media (min-width: 700px) { .footer-grid { grid-template-columns: 1.4fr 1fr 1fr; } }
.footer-logo { height: 44px; width: auto; margin-bottom: .75rem; }
.footer-name { font: 700 1.6rem var(--font-head); color: var(--footer-heading); margin: 0 0 .5rem; letter-spacing: .04em; }
.footer-col h2 { font-size: 1.1rem; color: var(--footer-heading); letter-spacing: .06em; }
.footer-col ul { list-style: none; margin: 0; padding: 0; }
.footer-col li { margin-bottom: .35rem; }
.site-footer address { font-style: normal; line-height: 1.7; }
.footer-bottom { border-top: 1px solid rgba(255,255,255,.15); padding-block: 1rem 1.5rem; font-size: .875rem; }
.footer-bottom p { margin: 0; }

@media (prefers-reduced-motion: reduce) {
  * { transition: none !important; scroll-behavior: auto !important; }
}
@media print {
  .site-header, .site-footer, .nav-toggle, .env-banner { display: none; }
  body { background: #fff; color: #000; }
}

/* ----- Rubriques (page Produits) : carte illustrée par la couverture d'un catalogue ----- */
.family { padding-block: 1.5rem 1rem; scroll-margin-top: calc(var(--header-h) + 12px); }
.family-title { font-size: 1.7rem; border-bottom: 2px solid var(--border); padding-bottom: .4rem; margin-bottom: 1.25rem; }
.family-summary { color: var(--muted); max-width: 90ch; margin: -.5rem 0 1.1rem; }
.rub-grid { list-style: none; margin: 0; padding: 0; display: grid; gap: 1rem; grid-template-columns: repeat(2, 1fr); }
@media (min-width: 700px) { .rub-grid { grid-template-columns: repeat(auto-fill, minmax(210px, 270px)); } }

.rub-card a { display: flex; flex-direction: column; height: 100%; background: var(--surface); border: 1px solid var(--border); border-top: 3px solid var(--accent); border-radius: var(--radius); overflow: hidden; text-decoration: none; color: var(--text); box-shadow: var(--card-shadow); transition: transform .15s, border-color .15s; }
.rub-card a:hover { transform: translateY(-2px); border-color: var(--accent); }
.rub-cover { aspect-ratio: 270 / 150; background: var(--surface-2); display: flex; align-items: center; justify-content: center; overflow: hidden; }
.rub-cover img { width: 100%; height: 100%; object-fit: cover; }
.rub-sum { display: block; padding: 0 .9rem .35rem; color: var(--muted); font-size: .85rem; line-height: 1.4; }
.rub-name { display: block; padding: .7rem .9rem .2rem; font: 700 1.15rem/1.15 var(--font-head); text-transform: uppercase; letter-spacing: .02em; }
.rub-count { display: block; padding: 0 .9rem .85rem; color: var(--muted); font-size: .875rem; }

@media (min-width: 1280px) { .mega { grid-template-columns: repeat(7, 1fr); } .tiles { grid-template-columns: repeat(6, 1fr); } }
.page-head .wrap, .page-body { max-width: var(--max); }

/* ----- Menu : finitions (survol, menus déroulants) ----- */
@media (min-width: 992px) {
  .menu > li > a { position: relative; transition: color .15s; }
  .menu > li > a::after { content: ""; position: absolute; left: .85rem; right: .85rem; bottom: .2rem; height: 3px; border-radius: 2px; background: var(--accent); transform: scaleX(0); transform-origin: left; transition: transform .2s; }
  .menu > li:hover > a::after, .menu > li:focus-within > a::after, .menu > li > a[aria-current="page"]::after, .menu > li.is-current > a::after { transform: scaleX(1); }
  .menu a[aria-current="page"] { text-decoration: none; }
  .menu > li.has-sub > a::after { right: .15rem; }
  .sub { margin-top: 0; border-top: 3px solid var(--accent); border-radius: 0 0 var(--radius) var(--radius); box-shadow: 0 16px 40px rgba(0,0,0,.35); }
  .menu > li.has-sub:not(.has-mega) > .sub { left: 0; right: auto; transform: none; min-width: 230px; padding: .5rem; }
  .menu > li.has-sub:not(.has-mega) > .sub li a { padding: .6rem .85rem; border-radius: 6px; font-weight: 600; }
  .menu > li.has-sub:not(.has-mega) > .sub li a:hover { background: var(--menu-hover); text-decoration: none; }
  .mega { padding: 1.5rem 1.75rem; }
  .mega-col a:not(.mega-title) { display: block; padding: .28rem .5rem; margin-inline: -.5rem; border-radius: 5px; font-size: .92rem; text-decoration: none !important; }
  .mega-col a:not(.mega-title):hover { background: var(--menu-hover); }
  .mega-title { padding-bottom: .35rem; margin-bottom: .4rem; border-bottom: 2px solid var(--accent); }
}

/* ----- Pied de page : liens sans soulignement, téléphone mis en avant ----- */
.site-footer a { text-decoration: none; }
.site-footer a:hover { text-decoration: underline; }
.footer-col a { display: inline-block; padding: .1rem 0; }
.site-footer .footer-phone { display: inline-block; margin-top: .6rem; font: 700 1.5rem/1.1 var(--font-head); letter-spacing: .03em; color: var(--footer-heading); }
.footer-phone:hover { text-decoration: none !important; filter: brightness(1.15); }

/* ----- Accueil ----- */
.rub-grid--fam { grid-template-columns: repeat(auto-fill, minmax(210px, 270px)); }
.seo-text .prose { max-width: 90ch; }
.cards--promo { grid-template-columns: repeat(auto-fill, minmax(196px, 1fr)); }
@media (max-width: 559px) { .cards--promo { grid-template-columns: repeat(2, 1fr); } }

/* ----- Contact : formulaire compact sur deux colonnes ----- */
.contact-grid { gap: 1.5rem; }
@media (min-width: 900px) { .contact-grid { grid-template-columns: minmax(0, 2.2fr) minmax(260px, 1fr); } }
.form-row { display: grid; gap: 0 1rem; grid-template-columns: 1fr; }
@media (min-width: 640px) { .form-row { grid-template-columns: 1fr 1fr; } }
.contact-grid .field { margin-bottom: .7rem; }
.contact-grid input[type="text"], .contact-grid input[type="email"], .contact-grid input[type="tel"], .contact-grid textarea { padding: .55rem .75rem; min-height: 40px; }
.contact-grid .field label { margin-bottom: .2rem; font-size: .9rem; }
.contact-grid .field--check label { font-size: .85rem; }
.contact-grid .page-form-actions { display: flex; align-items: center; gap: 1rem; margin: 0; }
.contact-grid .page-form-actions .hint { margin: 0; }
.contact-phone { display: block; margin: .25rem 0 .75rem; font: 700 2rem/1.1 var(--font-head); letter-spacing: .03em; text-decoration: none; }
.contact-phone:hover { text-decoration: underline; }

.card-body .btn { width: 100%; font-size: .9rem; padding: .5rem .6rem; flex-wrap: wrap; gap: .15rem .4rem; }
.btn-meta { white-space: nowrap; font-size: .8em; }

/* =====================================================================
   Refonte v2 : aplats de couleur, cartes à hauteur commune, menu à deux volets
   ===================================================================== */
.sub { --focus: var(--menu-text); }

/* ----- Cartes : même hauteur de couverture, la largeur s'adapte au format (portrait / paysage) ----- */
.cards, .cards--promo { display: flex; flex-wrap: wrap; gap: 1rem; }
.card { width: 204px; }
.card--land { width: 424px; }
.card-thumb, .card-thumb.is-landscape { height: 288px; aspect-ratio: auto; }
.card-thumb img { width: 100%; height: 100%; object-fit: cover; }
@media (max-width: 559px) {
  .cards, .cards--promo { display: grid; grid-template-columns: repeat(2, 1fr); gap: .8rem; }
  .card, .card--land { width: auto; }
  .card--land { grid-column: 1 / -1; }
  .card-thumb { height: auto; aspect-ratio: 480 / 678; }
  .card-thumb.is-landscape { height: auto; aspect-ratio: 678 / 480; }
}

/* ----- Rubriques (page Produits) : images sur fond blanc ----- */
.rub-cover { background: #fff; }

/* ----- « Voir aussi » : autres rubriques de la famille, bandeau distinct du contenu ----- */
.related { background: var(--surface-2); margin-top: 0; padding-block: 1.75rem 2.25rem; }
main:has(.related) ~ .site-footer { margin-top: 0; }
.related-eyebrow { font: 700 .8rem var(--font-body); letter-spacing: .14em; text-transform: uppercase; color: var(--muted); margin: 0 0 .15rem; }
.related-title { font-size: 1.5rem; margin-bottom: 1rem; }
.related-grid { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: .75rem; }
.related-grid a { display: flex; align-items: center; gap: .75rem; background: #fff; border: 1px solid var(--border); border-radius: var(--radius); padding: .3rem 1rem .3rem .3rem; color: var(--text); text-decoration: none; font-weight: 600; }
.related-grid a:hover { border-color: var(--text); box-shadow: var(--card-shadow); }
.related-grid img { width: 88px; height: 49px; object-fit: cover; border-radius: 3px; background: #fff; }

/* ----- Sélection / best-of ----- */
.selection-wrap { margin-bottom: 2rem; }
.selection { display: flex; gap: 1.5rem; align-items: center; background: var(--hero-bg); color: var(--hero-text); border-left: 6px solid var(--hero-accent); border-radius: var(--radius); padding: 1.25rem; }
.selection-cover { flex: none; line-height: 0; }
.selection-cover img { width: 170px; height: auto; aspect-ratio: 480 / 678; object-fit: cover; border-radius: 3px; box-shadow: 0 6px 20px rgba(0,0,0,.35); }
.selection-text h2 { font-size: clamp(1.6rem, 4vw, 2.4rem); margin-bottom: .3em; }
.selection-text p { margin: 0 0 .9rem; max-width: 60ch; }
.selection-text .eyebrow { margin-bottom: .4rem; }
@media (max-width: 559px) { .selection { flex-direction: column; align-items: flex-start; } .selection-cover img { width: 140px; } }

/* ----- Menu principal : barre sombre, majuscules, sous-menu Produits à deux volets ----- */
.menu > li > a { text-transform: uppercase; letter-spacing: .04em; font-weight: 700; }
@media (min-width: 992px) {
  .menu > li > a { font-size: .85rem; }
  .menu a[aria-current="page"] { color: var(--accent); }
  .brand-kwiktool .menu a[aria-current="page"] { color: var(--link); }
}

/* =====================================================================
   Refonte v3 : cartes de documents sur fond foncé, familles sur fond clair, menu équilibré, pied de page marqué
   ===================================================================== */
/* plus de filet jaune en haut des cartes */
.card, .rub-card a, .tile a { border-top: 1px solid var(--border); }

/* catalogues et promotions : cartes foncées (la couverture et le bouton ressortent) */
.card { background: var(--card-bg); color: var(--card-text); border-color: var(--card-border); }
.card-title { color: var(--card-text); }
.card-desc { color: var(--card-muted); }
.card-thumb { background: var(--card-border); }
.card .btn-meta { opacity: .8; }
.card-title a { color: inherit; }

/* sous-menu Produits : vignettes réparties sur toute la largeur du volet, quel que soit le nombre de rubriques */
@media (min-width: 992px) {
}

/* pied de page : plus haut, bandeau inférieur de couleur */
.site-footer { margin-top: 3rem; }
.footer-grid { padding-block: 3rem 2.25rem; }
.footer-col h2 { padding-bottom: .5rem; border-bottom: 2px solid var(--footer-heading); display: inline-block; margin-bottom: .9rem; }
.footer-bottom { background: var(--footer-bottom-bg); color: var(--footer-bottom-text); border-top: 0; padding-block: .9rem; font-weight: 600; }
.footer-bottom p { margin: 0; }
main:has(.related) ~ .site-footer { margin-top: 0; }

/* =====================================================================
   Refonte v4 : sous-menu compact en colonnes, bandes foncées sous les documents, bandeau photo, champs plus fins
   ===================================================================== */
/* ----- Menu déroulant (Société et Produits) : fond du menu, rubriques regroupées en colonnes équilibrées ----- */
.mega-title { color: var(--menu-title, var(--accent)) !important; }
@media (min-width: 992px) {
  .sub { background: var(--menu-bg); color: var(--menu-text); border: 0; border-top: 3px solid var(--accent); }
  .sub a { color: var(--menu-text); }
  .sub a:hover, .sub a[aria-current="page"] { color: var(--menu-text); background: var(--menu-hover); text-decoration: none; }
  .menu > li.has-mega { position: static; }
  .mega { display: none; position: absolute; top: 100%; left: 50%; transform: translateX(-50%); width: min(1120px, calc(100vw - 48px)); padding: 1.5rem 1.75rem 1.1rem; }
  .has-mega:hover > .mega, .has-mega:focus-within > .mega, .mega.is-open { display: block; }
  .mega-cols { column-count: 4; column-gap: 2.25rem; }
  .mega-col { break-inside: avoid; margin: 0 0 1.15rem; }
  .mega-title { display: block; font: 700 1rem/1.2 var(--font-head); text-transform: uppercase; letter-spacing: .03em; padding: 0 0 .35rem; margin: 0 0 .3rem; border-bottom: 1px solid var(--menu-line); }
  .mega-title:hover { background: transparent !important; text-decoration: underline; }
  .mega-col ul a { display: block; padding: .2rem .4rem; margin-inline: -.4rem; font-size: .9rem; line-height: 1.3; border-radius: 3px; }
}

/* ----- Bandes foncées derrière les documents (catalogues, promotions) ----- */
.band { background: var(--band-bg); color: var(--band-text); --focus: var(--focus-dark); }
.band a:not(.btn) { color: var(--band-text); }
.band .empty, .band .filter-status, .band .hint { color: var(--band-muted); }
.band .group-title { border-bottom-color: var(--band-border); }
.band .toc a, .band .chips a { background: transparent; color: var(--band-text); border-color: var(--band-border); }
.band .toc a:hover, .band .chips a:hover { border-color: var(--accent); }
.band .filter label { color: var(--band-text); }
.band .selection { background: var(--hero-bg); }
.page-body-band { padding-block: 2rem 3.5rem; }
.band.home-band { padding-block: clamp(2rem, 5vw, 3.5rem); }
.band.home-band .block { padding-block: 0; }
.band .card { box-shadow: 0 2px 8px rgba(0,0,0,.35); }
.site-footer { margin-top: 0; }

/* ----- Accueil : bandeau photo ----- */
.hero--photo { padding: 0; min-height: clamp(340px, 46vw, 560px); display: flex; align-items: center; background: var(--hero-bg); }
.hero--photo .hero-slides { position: absolute; inset: 0; }
.hero--photo .hero-slide { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; opacity: 0; transition: opacity 1.2s ease; }
.hero--photo .hero-slide.is-active { opacity: 1; }
.hero--photo::before { content: ""; position: absolute; inset: 0; z-index: 1; background: linear-gradient(90deg, rgba(var(--hero-overlay-rgb), .92) 0%, rgba(var(--hero-overlay-rgb), .78) 38%, rgba(var(--hero-overlay-rgb), .25) 75%, rgba(var(--hero-overlay-rgb), .1) 100%); }
.hero--photo .hero-in { position: relative; z-index: 2; padding-block: clamp(2rem, 6vw, 4rem); }
.hero-pause { position: absolute; z-index: 3; right: var(--gutter); bottom: 1rem; background: rgba(var(--hero-overlay-rgb), .7); color: #fff; border: 1px solid rgba(255,255,255,.5); border-radius: 999px; padding: .35rem .85rem; font: 600 .8rem var(--font-body); cursor: pointer; }
.hero-pause:hover { background: rgba(var(--hero-overlay-rgb), .95); }
@media (max-width: 700px) { .hero--photo::before { background: rgba(var(--hero-overlay-rgb), .82); } }
@media (prefers-reduced-motion: reduce) { .hero--photo .hero-slide { transition: none; } }

/* ----- Formulaire de contact : champs plus fins, dans un cadre ----- */
.contact-grid form { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); padding: 1.25rem 1.5rem 1rem; }
.contact-grid input[type="text"], .contact-grid input[type="email"], .contact-grid input[type="tel"], .contact-grid textarea { border: 1px solid var(--border); border-bottom-color: #9a9a9a; border-radius: 3px; background: #fafafa; padding: .4rem .65rem; min-height: 36px; font-size: .95rem; box-shadow: none; }
.contact-grid input:focus, .contact-grid textarea:focus { background: #fff; border-color: var(--text); outline-offset: 1px; }
.contact-grid .field label { font-size: .8rem; font-weight: 600; letter-spacing: .02em; color: var(--muted); text-transform: uppercase; }
.contact-grid .field--check label { text-transform: none; letter-spacing: 0; color: var(--text); font-weight: 400; }
.contact-grid textarea { min-height: 96px; }

/* =====================================================================
   Refonte v5 : menu sans « trou » au survol, cartes allégées (bouton au survol de l'image), pied de page noir
   ===================================================================== */
/* le menu occupe toute la hauteur de l'en-tête : la souris ne quitte jamais le menu en descendant vers le sous-menu */
@media (min-width: 992px) {
  .main-nav, .menu { height: var(--header-h); }
  .menu > li { height: 100%; display: flex; align-items: center; }
  .menu > li.has-sub > a { height: 100%; display: flex; align-items: center; }
  .sub { border-top: 0; }
}

/* ----- Cartes : image + titre ; le bouton apparaît sur l'image au survol ----- */
.card { position: relative; }
.card-thumb { position: relative; display: block; }
.card-over { position: absolute; inset: 0; display: flex; flex-direction: column; align-items: center; justify-content: flex-end; gap: .6rem; padding: 1rem .8rem; background: linear-gradient(180deg, rgba(var(--hero-overlay-rgb), .15) 0%, rgba(var(--hero-overlay-rgb), .88) 100%); color: #fff; text-align: center; opacity: 0; transition: opacity .18s; }
.card-over .card-desc { color: #fff; font-size: .8rem; line-height: 1.35; display: -webkit-box; -webkit-line-clamp: 4; -webkit-box-orient: vertical; overflow: hidden; }
.card-over .btn { width: auto; pointer-events: none; }
.card:hover .card-over, .card:focus-within .card-over { opacity: 1; }
.card-body { gap: .15rem; padding: .6rem .8rem .7rem; }
.card-title { font-size: 1rem; }
.card-title a { color: inherit; text-decoration: none; }
.card-title a:hover { text-decoration: underline; }
.card-meta { margin: 0; color: var(--card-muted); font-size: .78rem; letter-spacing: .02em; }
/* écrans tactiles : pas de survol, le bouton reste visible en bas de l'image */
@media (hover: none) {
  .card-over { opacity: 1; background: linear-gradient(180deg, transparent 55%, rgba(var(--hero-overlay-rgb), .85) 100%); padding: .6rem; }
  .card-over .card-desc { display: none; }
}

/* ----- Pied de page : bandeau noir, texte centré ----- */
.footer-bottom p { text-align: left; font-weight: 400; font-size: .85rem; }

.band .card a:not(.btn) { color: var(--card-text); }

/* =====================================================================
   Refonte v6 : pleine largeur partout, grilles homogènes, liens fléchés, contact
   ===================================================================== */
/* textes sur toute la largeur du contenu, justifiés */
.page-head .lead, .family-summary, .hero-lead, .selection-text p { max-width: none; }
.prose, .seo-text .prose { max-width: none; }
.prose p { text-align: justify; hyphens: auto; }
.hero-lead { max-width: 70ch; }
.page-head .lead { text-align: justify; hyphens: auto; }
@media (min-width: 1000px) { .seo-text .prose { column-count: 2; column-gap: 3rem; } .seo-text .prose p { break-inside: avoid-column; } }

/* liens « tout voir » : flèche */
.more { display: inline-flex; align-items: center; gap: .4rem; font-weight: 700; text-decoration: none; }
.more::after { content: "\2192"; display: inline-block; font-size: 1.15em; line-height: 1; transition: transform .15s; }
.more:hover { text-decoration: underline; }
.more:hover::after { transform: translateX(4px); }

/* familles et rubriques : boîtes sur toute la largeur de la grille (image centrée, taille d'origine 270 x 150) */
.rub-grid, .rub-grid--fam { grid-template-columns: repeat(2, 1fr); }
@media (min-width: 700px) { .rub-grid, .rub-grid--fam { grid-template-columns: repeat(auto-fill, minmax(250px, 1fr)); } }
.rub-cover { height: 150px; aspect-ratio: auto; background: #fff; }
.rub-cover img { width: auto; max-width: 100%; height: 150px; object-fit: contain; }

/* titres des documents */
.card-title, .card-title a { font-weight: 600; }

/* carte d'accueil : un seul liseré (celui de la carte), pas de pointillé de focus sur l'image décorative */
.card-thumb:focus, .card-thumb:focus-visible { outline: 0; }

/* contact : champs sans arrondi, bordure claire ; coordonnées */
.contact-grid input[type="text"], .contact-grid input[type="email"], .contact-grid input[type="tel"], .contact-grid textarea { border: 1px solid #e2e2e2; border-radius: 0; }
.contact-grid input:focus, .contact-grid textarea:focus { border-color: #bdbdbd; }
.contact-card .contact-name { margin: 0 0 .25rem; font: 700 2.4rem/1 var(--font-head); letter-spacing: .02em; color: #000; text-transform: uppercase; }
.brand-kwiktool .contact-card .contact-name { color: var(--text); }
.contact-card .contact-phone { margin: 0 0 .6rem; font: 700 1.5rem/1.1 var(--font-head); }
.contact-card address { font-weight: 400; }

/* pied de page : téléphone puis adresse */
.footer-phone { margin: .4rem 0 .6rem; }

/* ----- Partenaires : logos centrés verticalement dans leur boîte ----- */
.partners > li { align-items: center; }

/* ----- Sous-menu Produits : centré sous « Produits » (décalage éventuel calculé par nav.js pour rester dans la fenêtre) ----- */
@media (min-width: 992px) {
  .menu > li.has-mega { position: relative; }
  .mega { left: 50%; transform: translateX(calc(-50% + var(--mega-shift, 0px))); }
}

@media (min-width: 992px) {
  .mega { width: var(--mega-w, min(1120px, calc(100vw - 48px))); }
  .mega-cols { column-count: var(--mega-cols, 4); }
}

/* ----- Fil d'ariane : bandeau à part au-dessus du titre ----- */
.crumbbar { background: var(--surface-2); border-bottom: 1px solid var(--border); padding-block: .6rem; }
.crumbbar .breadcrumb ol { margin: 0; }
.page-head { padding-top: 1.75rem; }
.page-head h1 { margin-top: 0; }

/* ----- Pied de page : copyright aligné sur la grille du dessus ----- */
.footer-bottom p { margin: 0; text-align: left; }

/* ombre portée sous l en-tête : il reste distinct des fonds de même couleur quand la page défile */
.site-header { box-shadow: 0 4px 14px rgba(0, 0, 0, .35); }
