/* KAPLANTECH : design system inspiré des principes d'Amazon (sans son identité visuelle).
 *
 * Règle prioritaire : PLEINE LARGEUR ET FLUIDITÉ, de 360 à 2560 px. Mobile d'abord :
 * styles de base pour 360 px, puis points de rupture 640, 768, 1024, 1280, 1536,
 * 1920 et 2560 px. Aucun max-width sur les conteneurs de page ; fonds d'un bord à
 * l'autre ; marge latérale clamp(12px, 2.5vw, 40px). Seuls les blocs de texte long
 * gardent une largeur de lecture (75 caractères), sur un fond pleine largeur.
 * Flexbox et Grid uniquement : ni float, ni largeur fixe en px sur un bloc.
 *
 * Couleurs, tailles et marges : uniquement les variables ci-dessous. Contraste AA
 * vérifié par tests/ThemeContrastTest.php : toute nouvelle paire texte/fond y est ajoutée.
 * Jamais de texte sous 14 px ; zones tactiles de 44 px sous 1024 px et sur tout écran
 * tactile, boutons de 36 px minimum à la souris. Animations : transform et opacity. */

/* --- Police : Inter, servie par le site (OFL, assets/fonts/LICENSE-Inter.txt) ---
   Sous-ensemble latin, display: swap. Deux graisses seulement (400, 700) : le
   demi-gras (600) s'affiche en 700, un fichier de 24 Ko de moins à télécharger.
   L'italique ne sert qu'au bouton « Ma sélection » à partir de 480 px. */
@font-face { font-family: "Inter"; font-style: normal; font-weight: 400; font-display: swap; src: url("../fonts/inter-latin-400-normal.woff2") format("woff2"); }
@font-face { font-family: "Inter"; font-style: normal; font-weight: 700; font-display: swap; src: url("../fonts/inter-latin-700-normal.woff2") format("woff2"); }
@font-face { font-family: "Inter"; font-style: italic; font-weight: 700; font-display: swap; src: url("../fonts/inter-latin-700-italic.woff2") format("woff2"); }

/* --- Jetons ------------------------------------------------------------------ */
:root {
  /* Couleurs de la charte */
  --primary: #0080FF;          /* azur : titres de 24 px et plus en gras, éléments graphiques (3,8:1 sur blanc) */
  --primary-strong: #0066CC;   /* azur foncé : liens, petits titres, boutons à texte blanc (5,6:1) */
  --primary-strong-hover: #0052A3;
  --accent: #E30613;           /* rouge : promotions, badges, bouton de recherche, bande des livraisons */
  --accent-hover: #B5050F;
  --accent-on-dark: #FF5A63;   /* rouge lisible sur le bandeau sombre (« TECH » du logo) */
  --sky: #4FC3F7;              /* bleu clair : fonds de sections (titres et liens en --header dessus) */
  --ink: #0F1111;              /* texte */
  --surface: #FFFFFF;          /* fond des pages et des cartes */
  --muted: #F0F2F2;            /* fonds gris */
  --header: #0A1A3F;           /* bandeau sombre, bas de page */
  --header-2: #14285A;         /* bande du menu, pied de page */
  --header-3: #22397A;         /* bande « Retour en haut » */
  --whatsapp: #25D366;         /* bouton de commande, texte --ink */
  --whatsapp-hover: #1FB958;

  /* Couleurs dérivées */
  --on-dark: #FFFFFF;
  --text-secondary: #565959;   /* mentions (7,4:1 sur blanc) */
  --border: #D5D9D9;
  --azure: #0066CC;            /* bouton « Ma sélection » : texte blanc, gras italique, 16 px */
  --azure-hover: #0052A3;
  --royal: #4169E1;            /* sa bordure */
  --error: #B00020;
  --success: #157A3B;

  /* Police */
  --font-sans: "Inter", Arial, sans-serif;

  /* Échelle de texte fluide (clamp : minimum, croissance avec l'écran, maximum).
     xs et sm sont définis mais inutilisés pour du texte visible (plancher de 14 px). */
  --fs-xs: 11px;  --lh-xs: 15px;
  --fs-sm: 12px;  --lh-sm: 16px;
  --fs-base: clamp(14px, 0.85rem + 0.2vw, 16px); --lh-base: 1.45;  /* texte courant */
  --fs-md: 16px;  --lh-md: 1.5;
  --fs-lg: 18px;  --lh-lg: 1.35;
  --fs-xl: 24px;  --lh-xl: 1.3;
  --fs-2xl: 28px; --lh-2xl: 1.3;

  /* Rôles */
  --fs-h1: clamp(22px, 1rem + 1.5vw, 32px); --lh-h1: 1.25;   /* titre de page */
  --fs-section: clamp(20px, 1rem + 1.2vw, 28px);              /* titres de section (h2) */
  --fs-hero: clamp(28px, 1.2rem + 3vw, 56px);                 /* titre de la bannière */
  --fs-price: clamp(16px, 0.9rem + 0.5vw, 22px);              /* prix des cartes */
  --fs-price-lg: clamp(22px, 1rem + 1vw, 32px);               /* prix de la fiche */
  --fs-input: 16px;            /* champs à 16 px partout : évite le zoom d'iOS */
  --control-height: 44px;      /* boutons et champs : 44 px au doigt, 36 px à la souris */
  --field-height: 44px;

  /* Mise en page fluide : marge latérale et écart des grilles suivent la largeur */
  --gutter: clamp(12px, 2.5vw, 40px);
  --gap: clamp(8px, 1.5vw, 20px);
  --section-space: clamp(20px, 2.5vw, 40px);
  --radius: 8px;
  --bottom-nav-height: 64px;   /* barre du bas (téléphone et tablette) */

  /* Mouvement : transform et opacity uniquement, 150 à 250 ms */
  --ease: cubic-bezier(.2, .7, .3, 1);
  --duration: 200ms;
}
/* Souris (ordinateur) : commandes plus compactes. Un écran tactile garde 44 px. */
@media (min-width: 1024px) and (pointer: fine) {
  :root { --control-height: 36px; --field-height: 40px; }
}

/* --- Base ---------------------------------------------------------------------- */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
/* Hauteur d'écran en dvh (et non vh) : pas de saut quand la barre du navigateur mobile
   se replie. Le pied de page reste en bas sur une page courte. */
body {
  margin: 0;
  min-height: 100vh;
  min-height: 100dvh;
  display: flex;
  flex-direction: column;
  background: var(--surface);
  color: var(--ink);
  font-family: var(--font-sans);
  font-size: var(--fs-base);
  line-height: var(--lh-base);
  overflow-x: hidden;
}
body > main { flex: 1 0 auto; }
body:has(.kt-drawer[open]) { overflow: hidden; }
img { max-width: 100%; height: auto; display: block; }
a { color: var(--primary-strong); }
a:hover { color: var(--primary-strong-hover); }
:focus-visible { outline: 3px solid var(--primary-strong); outline-offset: 2px; }
:is(.kt-delivery, .kt-header, .kt-nav, .kt-footer) :focus-visible { outline-color: var(--sky); }

h1, h2, h3, h4 { font-family: var(--font-sans); font-weight: 700; margin: 0 0 .5em; }
/* h1 et h2 en azur : 20 px gras minimum, donc « grand texte » au sens du WCAG (3:1) */
h1 { font-size: var(--fs-h1); line-height: var(--lh-h1); color: var(--primary); }
h2 { font-size: var(--fs-section); line-height: var(--lh-xl); color: var(--primary); }
/* Sous 24 px, l'azur n'est plus assez contrasté : teinte foncée */
h3 { font-size: var(--fs-lg); line-height: var(--lh-lg); color: var(--primary-strong); }
h4 { font-size: var(--fs-md); line-height: var(--lh-md); color: var(--primary-strong); }
p { margin: 0 0 1em; }
small, .kt-small { font-size: var(--fs-base); line-height: var(--lh-base); }
.kt-muted { color: var(--text-secondary); }
.screen-reader-text {
  position: absolute !important; width: 1px; height: 1px; padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0;
}
.kt-skip:focus { position: fixed; top: 8px; left: 8px; z-index: 1000; width: auto; height: auto; clip: auto; padding: 12px 16px; background: var(--surface); }

/* Conteneur pleine largeur : aucune largeur maximale, seulement la marge intérieure */
.kt-container { width: 100%; padding-inline: var(--gutter); }
.kt-section { padding-block: var(--section-space); }
.kt-section--muted { background: var(--muted); }
.kt-section--sky { background: var(--sky); }
.kt-section--sky :is(h1, h2, .kt-section__head a) { color: var(--header); }
.kt-icon { flex-shrink: 0; }
/* Texte long : largeur de lecture, le fond reste pleine largeur */
.kt-content { max-width: 75ch; }

/* Surface tactile agrandie sans être dessinée (élément au cadre ajusté au texte) */
.kt-touch { position: relative; }
.kt-touch::after { content: ""; position: absolute; left: 50%; top: 50%; width: max(100%, 44px); height: max(100%, 44px); transform: translate(-50%, -50%); }

/* --- Boutons : principal entièrement arrondi ------------------------------------ */
.kt-btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  min-height: var(--control-height); padding: 6px 18px; border: 2px solid transparent; border-radius: 999px;
  font: 600 var(--fs-base)/var(--lh-base) var(--font-sans); text-decoration: none; cursor: pointer; text-align: center;
}
.kt-btn--primary { background: var(--primary-strong); color: var(--on-dark); }
.kt-btn--primary:hover { background: var(--primary-strong-hover); color: var(--on-dark); }
.kt-btn--accent { background: var(--accent); color: var(--on-dark); }
.kt-btn--accent:hover { background: var(--accent-hover); color: var(--on-dark); }
.kt-btn--whatsapp { background: var(--whatsapp); color: var(--ink); font-weight: 700; }
.kt-btn--whatsapp:hover { background: var(--whatsapp-hover); color: var(--ink); }
.kt-btn--outline { background: var(--surface); color: var(--primary-strong); border-color: var(--primary-strong); }
.kt-btn--outline:hover { background: var(--muted); color: var(--primary-strong-hover); }
.kt-btn--link { background: none; border: 0; border-radius: 0; color: var(--primary-strong); text-decoration: underline; padding: 6px 4px; font-weight: 400; }
.kt-btn--block { width: 100%; }

/* --- Bande des livraisons -------------------------------------------------------- */
.kt-delivery { background: var(--accent); color: var(--on-dark); }
.kt-delivery__inner { display: flex; align-items: center; justify-content: center; gap: 12px; padding: 6px var(--gutter); }
.kt-delivery__badge { display: flex; align-items: center; justify-content: center; width: 40px; height: 40px; flex-shrink: 0; border-radius: 50%; background: var(--surface); }
.kt-delivery__badge img { width: 24px; height: 34px; }
.kt-delivery p { margin: 0; font-weight: 600; }

/* --- En-tête : bande 1, bandeau sombre (60 px) ------------------------------------ */
.kt-header { background: var(--header); color: var(--on-dark); position: relative; z-index: 50; }
@media (min-width: 1024px) { .kt-sticky { position: sticky; top: 0; z-index: 50; } }
.kt-header__bar { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 12px; min-height: 60px; padding-block: 8px; }
.kt-brand { display: flex; align-items: center; gap: 8px; min-width: 0; text-decoration: none; }
.kt-brand img { width: 49px; height: 44px; padding: 2px; border-radius: 6px; background: var(--surface); flex-shrink: 0; }
.kt-brand__name { font: 700 clamp(16px, 0.8rem + 0.6vw, 22px)/1.1 var(--font-sans); color: var(--on-dark); }
.kt-brand__name span { color: var(--accent-on-dark); }
/* Téléphone : le nom passe sur deux lignes pour garder la recherche et la sélection
   sur la même ligne, puis disparaît sous 380 px (le lien garde son nom accessible) */
@media (max-width: 479px) { .kt-header__bar { gap: 8px; } .kt-brand__name { max-width: 7.5em; } }
@media (max-width: 379px) { .kt-brand__name { display: none; } }
.kt-header__actions { margin-left: auto; display: flex; align-items: center; gap: 8px; }
.kt-icon-btn {
  display: inline-flex; align-items: center; justify-content: center; width: 44px; height: 44px; padding: 0;
  border: 0; border-radius: var(--radius); background: transparent; color: var(--on-dark); cursor: pointer;
}
.kt-icon-btn:hover { background: var(--header-2); }
.kt-selection-link {
  display: inline-flex; align-items: center; justify-content: center; gap: 6px; min-height: 44px; min-width: 44px; padding: 2px 10px;
  border: 2px solid var(--royal); border-radius: var(--radius);
  background: var(--azure); color: var(--on-dark); font: italic 700 16px/1.3 var(--font-sans); text-decoration: none; white-space: nowrap;
}
.kt-selection-link:hover { background: var(--azure-hover); color: var(--on-dark); }
.kt-selection-link__count[hidden] { display: none; }
.kt-selection-link__count { display: inline-block; min-width: 22px; padding: 0 6px; border-radius: 11px; background: var(--surface); color: var(--azure); font-style: normal; text-align: center; }
/* Sous 480 px : l'icône de liste seule, le nom reste lu par les lecteurs d'écran */
@media (max-width: 479px) {
  .kt-selection-link { padding-inline: 8px; }
  /* Texte masqué : sans italique, pour ne pas télécharger la police italique sur téléphone */
  .kt-selection-link__text { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; font-style: normal; }
}
@media (min-width: 480px) { .kt-selection-link__icon { display: none; } }
@media (min-width: 1024px) and (pointer: fine) { .kt-selection-link { min-height: 36px; } }

/* Recherche : sur sa propre ligne, pleine largeur, sous 1024 px ; extensible au-delà.
   Avec JavaScript, repliée derrière l'icône sur téléphone et dépliée au toucher. */
.kt-search { order: 10; flex-basis: 100%; display: flex; min-width: 0; }
.kt-search-toggle { display: none; }
@media (max-width: 1023px) {
  .kt-js .kt-search-toggle { display: inline-flex; }
  .kt-js .kt-header:not(.is-search-open) .kt-search { display: none; }
  .kt-js .kt-header.is-search-open .kt-search { animation: kt-drop var(--duration) var(--ease); }
  .kt-header.is-search-open .kt-search-toggle { background: var(--header-2); }
}
@media (min-width: 1024px) { .kt-search { order: 0; flex: 1 1 0; } .kt-header__actions { margin-left: 0; } }
@keyframes kt-drop { from { opacity: 0; transform: translateY(-6px); } to { opacity: 1; transform: none; } }
.kt-search input[type="search"] {
  flex: 1; min-width: 0; height: var(--field-height); padding: 0 12px; border: 0; border-radius: var(--radius) 0 0 var(--radius);
  font: 400 var(--fs-input) var(--font-sans); color: var(--ink); background: var(--surface);
}
.kt-search__button {
  height: var(--field-height); padding: 0 16px; border: 0; border-radius: 0 var(--radius) var(--radius) 0;
  background: var(--accent); color: var(--on-dark); font: 600 var(--fs-base) var(--font-sans); cursor: pointer;
}
.kt-search__button:hover { background: var(--accent-hover); }

/* Menu « burger » : tiroir latéral, téléphone et tablette */
.kt-drawer > summary {
  display: flex; align-items: center; justify-content: center; width: 44px; height: 44px; border-radius: var(--radius);
  color: var(--on-dark); cursor: pointer; list-style: none;
}
.kt-drawer > summary::-webkit-details-marker { display: none; }
.kt-drawer > summary:hover { background: var(--header-2); }
.kt-drawer[open] > summary::before { content: ""; position: fixed; inset: 0; z-index: 90; background: rgba(0, 0, 0, .55); }
.kt-drawer__panel {
  position: fixed; top: 0; bottom: 0; left: 0; z-index: 100; width: min(86vw, 360px); overflow-y: auto; overscroll-behavior: contain;
  padding: 8px 0 calc(24px + env(safe-area-inset-bottom)); background: var(--surface); color: var(--ink); box-shadow: 4px 0 24px rgba(0, 0, 0, .3);
  animation: kt-slide-in var(--duration) var(--ease);
}
@keyframes kt-slide-in { from { transform: translateX(-100%); } to { transform: none; } }
.kt-drawer__title { margin: 16px 16px 4px; font-size: var(--fs-md); line-height: var(--lh-md); font-weight: 700; color: var(--primary-strong); }
.kt-drawer__title a { display: inline-flex; align-items: center; min-height: 44px; color: inherit; }
.kt-drawer__list { list-style: none; margin: 0; padding: 0; }
.kt-drawer__list a { display: flex; align-items: center; min-height: 44px; padding: 0 16px; color: var(--ink); text-decoration: none; }
.kt-drawer__list a:hover { background: var(--muted); color: var(--ink); }
@media (min-width: 1024px) { .kt-drawer { display: none; } }

/* --- En-tête : bande 2, menu (40 px, ordinateur) ----------------------------------- */
.kt-nav { display: none; background: var(--header-2); color: var(--on-dark); }
@media (min-width: 1024px) { .kt-nav { display: block; } }
.kt-nav__list { display: flex; align-items: stretch; margin: 0; padding: 0; list-style: none; }
.kt-nav__list > li { position: relative; }
.kt-nav__list > li > a, .kt-nav summary {
  display: flex; align-items: center; min-height: 40px; padding: 0 12px; color: var(--on-dark); text-decoration: none;
  font-weight: 600; white-space: nowrap; cursor: pointer; list-style: none;
}
.kt-nav__list > li:first-child > a { padding-left: 0; }
.kt-nav__list > li > a:hover, .kt-nav summary:hover, .kt-nav details[open] > summary { color: var(--on-dark); text-decoration: underline; text-underline-offset: 4px; }
.kt-nav summary::-webkit-details-marker { display: none; }
.kt-nav summary::after { content: ""; margin-left: 8px; border: 5px solid transparent; border-top-color: currentColor; transform: translateY(3px); }
.kt-megamenu {
  position: absolute; left: 0; z-index: 60; min-width: 640px; padding: 16px 0; background: var(--surface); color: var(--ink);
  border-radius: 0 0 var(--radius) var(--radius); box-shadow: 0 8px 24px rgba(0, 0, 0, .2);
  animation: kt-drop 150ms var(--ease);
}
.kt-megamenu__grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 16px; padding: 0 16px; }
.kt-megamenu h3 { font-size: var(--fs-md); line-height: var(--lh-md); margin: 0 0 4px; }
.kt-megamenu h3 a { display: inline-flex; align-items: center; min-height: 36px; color: var(--primary-strong); }
.kt-megamenu ul { list-style: none; margin: 0; padding: 0; }
.kt-megamenu li a { display: flex; align-items: center; min-height: 36px; padding: 0 4px; color: var(--ink); text-decoration: none; }
.kt-megamenu li a:hover { background: var(--muted); text-decoration: underline; }

/* --- En-tête : bande 3, sous-menu clair (33 px, 44 au doigt) ------------------------ */
.kt-subnav { background: var(--muted); border-bottom: 1px solid var(--border); }
.kt-subnav__list { display: flex; gap: 4px; margin: 0; padding: 0; list-style: none; overflow-x: auto; scrollbar-width: thin; }
.kt-subnav__list a { display: flex; align-items: center; min-height: 44px; padding: 0 10px; color: var(--ink); text-decoration: none; white-space: nowrap; }
.kt-subnav__list li:first-child a { padding-left: 0; }
.kt-subnav__list a:hover { text-decoration: underline; color: var(--ink); }
.kt-subnav__list a[aria-current="page"] { font-weight: 700; text-decoration: underline; text-decoration-color: var(--primary); text-decoration-thickness: 2px; }
@media (min-width: 1024px) and (pointer: fine) { .kt-subnav__list a { min-height: 33px; } }

/* --- Accueil -------------------------------------------------------------------------- */
/* Accroche (sans bannière) et bannières : titre fluide de 28 à 56 px, texte jamais posé sur l'image */
.kt-hero { background: var(--sky); padding-block: clamp(24px, 4vw, 64px); }
.kt-hero h1, .kt-slide :is(h1, h2) { font-size: var(--fs-hero); line-height: 1.1; max-width: 22ch; letter-spacing: -0.01em; }
.kt-hero h1 { margin-bottom: 12px; color: var(--header); }
.kt-hero__text { font-size: clamp(16px, 0.9rem + 0.4vw, 20px); line-height: 1.45; max-width: 75ch; }
.kt-hero__actions { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 16px; }
/* Carrousel au doigt (scroll-snap), sans bibliothèque : la bannière suivante dépasse
   sur téléphone pour inviter à faire défiler */
.kt-carousel {
  display: grid; grid-auto-flow: column; grid-auto-columns: 88%; gap: var(--gap);
  overflow-x: auto; overscroll-behavior-x: contain; scroll-snap-type: x mandatory; scrollbar-width: thin;
}
@media (min-width: 1024px) { .kt-carousel { grid-auto-columns: 100%; } }
.kt-carousel > * { scroll-snap-align: start; scroll-snap-stop: always; }
.kt-slide { display: grid; align-content: start; background: var(--muted); border-radius: var(--radius); overflow: hidden; }
@media (min-width: 1024px) { .kt-slide { grid-template-columns: 3fr 2fr; align-content: stretch; } }
.kt-slide__body { padding: clamp(16px, 3vw, 40px); display: flex; flex-direction: column; justify-content: center; gap: 8px; }
.kt-slide__body p { margin: 0; }
.kt-slide img { width: 100%; height: 100%; aspect-ratio: 8 / 3; max-height: 420px; object-fit: cover; background: var(--border); }
@media (max-width: 1023px) { .kt-slide img { order: -1; height: auto; } }
.kt-carousel__nav { display: flex; justify-content: center; gap: 8px; margin-top: 12px; }
.kt-tiles { display: grid; gap: var(--gap); grid-template-columns: repeat(auto-fill, minmax(min(100%, 300px), 1fr)); list-style: none; margin: 0; padding: 0; }
.kt-tile__body p { margin: 0; }
.kt-tile { display: flex; flex-direction: column; height: 100%; border: 1px solid var(--border); border-radius: var(--radius); overflow: hidden; background: var(--surface); text-decoration: none; color: var(--ink); }
.kt-tile:hover { border-color: var(--primary); color: var(--ink); }
.kt-tile__body { padding: 16px; }
.kt-tile__body h3 { margin-bottom: 4px; }
.kt-tile--promo .kt-tile__body h3 { color: var(--accent); }
.kt-tile__cta { margin: 8px 0 0; font-weight: 700; color: var(--primary-strong); }
.kt-tile img { aspect-ratio: 16 / 9; object-fit: cover; width: 100%; background: var(--border); }
.kt-section__head { display: flex; align-items: baseline; justify-content: space-between; gap: 16px; margin-bottom: 16px; }
.kt-section__head h2 { margin: 0; }
.kt-section__head a { font-weight: 600; }
.kt-categories { display: grid; gap: var(--gap); grid-template-columns: repeat(auto-fill, minmax(min(calc(50% - var(--gap) / 2), 200px), 1fr)); list-style: none; margin: 0; padding: 0; }
.kt-categories a { display: flex; align-items: center; height: 100%; min-height: 56px; padding: 8px clamp(10px, 1.5vw, 16px); overflow-wrap: anywhere; border-radius: var(--radius); background: var(--surface); border: 1px solid var(--border); color: var(--ink); font-weight: 600; text-decoration: none; }
.kt-categories a:hover { border-color: var(--primary); text-decoration: underline; }

/* --- Fil d'Ariane ------------------------------------------------------------------------ */
.kt-breadcrumb { padding-top: 8px; }
.kt-breadcrumb ol { display: flex; flex-wrap: wrap; gap: 4px; list-style: none; margin: 0; padding: 0; }
.kt-breadcrumb li { display: flex; align-items: center; min-height: 36px; }
.kt-breadcrumb li a { display: inline-flex; align-items: center; min-height: 36px; }
.kt-breadcrumb li + li::before { content: "›"; margin-right: 4px; color: var(--text-secondary); }
/* Téléphone : un seul lien de retour vers la catégorie parente */
.kt-breadcrumb ol.kt-breadcrumb__full { display: none; }
.kt-breadcrumb a.kt-breadcrumb__back { display: inline-flex; align-items: center; min-height: 44px; }
@media (min-width: 1024px) { .kt-breadcrumb ol.kt-breadcrumb__full { display: flex; } .kt-breadcrumb a.kt-breadcrumb__back { display: none; } }

/* --- Catalogue ------------------------------------------------------------------------------ */
.kt-catalog { display: grid; gap: 16px var(--gap); padding-block: 12px 40px; }
.kt-catalog > * { min-width: 0; }
/* Colonne des filtres : 240 à 300 px selon l'écran */
@media (min-width: 1024px) {
  .kt-catalog { grid-template-columns: clamp(240px, 18vw, 300px) minmax(0, 1fr); align-items: start; gap: 24px clamp(24px, 2vw, 40px); }
}
.kt-catalog__head { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 16px; }
.kt-catalog__head h1 { margin: 0; }

/* Filtres. Téléphone et tablette : bouton « Filtrer », panneau coulissant depuis la droite */
.kt-filters > summary {
  display: inline-flex; align-items: center; gap: 8px; min-height: 44px; padding: 0 16px;
  border: 1px solid var(--primary-strong); border-radius: 999px; background: var(--surface);
  font-weight: 700; color: var(--primary-strong); cursor: pointer; list-style: none;
}
.kt-filters > summary::-webkit-details-marker { display: none; }
.kt-filters__label-desktop { display: none; }
.kt-filters__count { display: inline-flex; align-items: center; justify-content: center; min-width: 24px; height: 24px; padding: 0 6px; border-radius: 12px; background: var(--primary-strong); color: var(--on-dark); }
.kt-filters__head { display: flex; align-items: center; justify-content: space-between; gap: 8px; margin: 0 -16px 12px; padding: 4px 8px 4px 16px; border-bottom: 1px solid var(--border); }
.kt-filters__title { margin: 0; font-size: var(--fs-lg); font-weight: 700; color: var(--primary-strong); }
.kt-filters__close { display: none; align-items: center; justify-content: center; width: 44px; height: 44px; border: 0; border-radius: var(--radius); background: transparent; color: var(--ink); cursor: pointer; }
.kt-filters__close:hover { background: var(--muted); }
.kt-js .kt-filters__close { display: inline-flex; }
.kt-filters__body { padding: 0 16px 16px; }
.kt-filter__apply { margin-top: 8px; }
@media (max-width: 1023px) {
  .kt-filters[open] > summary::before { content: ""; position: fixed; inset: 0; z-index: 90; background: rgba(0, 0, 0, .55); cursor: default; }
  .kt-filters__body {
    position: fixed; top: 0; right: 0; bottom: 0; z-index: 100; width: min(90vw, 400px); overflow-y: auto; overscroll-behavior: contain;
    padding-bottom: calc(24px + env(safe-area-inset-bottom)); background: var(--surface); box-shadow: -4px 0 24px rgba(0, 0, 0, .3);
    animation: kt-slide-in-right var(--duration) var(--ease);
  }
  body:has(.kt-filters[open]) { overflow: hidden; }
  body:has(.kt-filters[open]) :is(.kt-bottom-nav, .kt-floating) { display: none; }
}
@keyframes kt-slide-in-right { from { transform: translateX(100%); } to { transform: none; } }
/* Ordinateur : colonne toujours ouverte (main.js) ; sans JavaScript, le titre reste cliquable */
@media (min-width: 1024px) {
  .kt-filters { border: 1px solid var(--border); border-radius: var(--radius); background: var(--surface); }
  .kt-filters > summary { display: flex; width: 100%; border: 0; border-radius: var(--radius); padding: 0 16px; min-height: 48px; }
  .kt-js .kt-filters > summary { pointer-events: none; }
  .kt-filters > summary svg, .kt-filters__label-mobile, .kt-filters__count, .kt-filters__head { display: none; }
  .kt-filters__label-desktop { display: inline; }
}
.kt-filter { border: 0; padding: 0; margin: 0 0 20px; min-width: 0; }
.kt-filter legend, .kt-filter__title { font: 700 var(--fs-md)/var(--lh-md) var(--font-sans); color: var(--primary-strong); margin-bottom: 6px; padding: 0; }
.kt-filter ul { list-style: none; margin: 0; padding: 0; }
.kt-filter a { display: flex; align-items: center; gap: 8px; min-height: 44px; text-decoration: none; color: var(--ink); }
@media (min-width: 1024px) and (pointer: fine) { .kt-filter a { min-height: 32px; } }
.kt-filter a:hover { text-decoration: underline; }
.kt-filter a[aria-current="true"] { font-weight: 700; color: var(--primary-strong); }
.kt-check { display: inline-block; width: 18px; height: 18px; border: 2px solid var(--primary-strong); border-radius: 4px; flex-shrink: 0; }
a[aria-current="true"] > .kt-check { background: var(--primary-strong); box-shadow: inset 0 0 0 3px var(--surface); }
.kt-filter__price { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.kt-field label, .kt-label { display: block; font-weight: 600; margin-bottom: 4px; }
.kt-input, .kt-filter__price input, .kt-field input, .kt-field select, .kt-field textarea, .kt-select {
  width: 100%; min-height: var(--field-height); padding: 6px 10px; border: 1px solid #6B7680; border-radius: var(--radius);
  font: 400 var(--fs-input) var(--font-sans); color: var(--ink); background: var(--surface);
}
.kt-field textarea { min-height: 140px; resize: vertical; }
.kt-active-filters { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin-bottom: 16px; }
.kt-chip { display: inline-flex; align-items: center; gap: 6px; min-height: var(--control-height); padding: 4px 12px; border-radius: 999px; background: var(--muted); color: var(--primary-strong); text-decoration: none; font-weight: 600; }
.kt-chip:hover { background: var(--border); }
/* Tri : une seule ligne, qui défile au doigt sur téléphone */
.kt-sort { display: flex; align-items: center; gap: 8px; min-width: 0; max-width: 100%; }
.kt-sort > span { flex-shrink: 0; }
.kt-sort ul { display: flex; gap: 4px 12px; list-style: none; margin: 0; padding: 0; overflow-x: auto; scrollbar-width: none; }
.kt-sort a { display: inline-flex; align-items: center; min-height: var(--control-height); white-space: nowrap; }
.kt-sort a[aria-current="true"] { font-weight: 700; color: var(--ink); text-decoration: none; }

/* Grille de produits automatique : autant de colonnes de 180 px minimum que la place
   le permet, mais une carte ne dépasse jamais la moitié de la largeur, donc toujours
   2 colonnes au moins sur téléphone (≈ 2, 3, 5, 6, 9 puis 12 colonnes en pleine largeur). */
.kt-grid {
  display: grid; gap: var(--gap); list-style: none; margin: 0; padding: 0;
  grid-template-columns: repeat(auto-fill, minmax(min(calc(50% - var(--gap) / 2), 180px), 1fr));
}

/* Carte produit : image carrée sur fond blanc, titre sur 2 lignes, prix en gras, bouton WhatsApp.
   Requêtes de conteneur : la carte s'adapte à la place qu'elle a (grille, colonne, carrousel),
   pas seulement à la largeur de l'écran. */
.kt-grid > li { container: kt-card / inline-size; }
.kt-card { position: relative; display: flex; flex-direction: column; height: 100%; border: 1px solid var(--border); border-radius: var(--radius); background: var(--surface); overflow: hidden; transition: box-shadow 150ms var(--ease); }
.kt-card:hover { border-color: var(--primary); box-shadow: 0 2px 8px rgba(15, 17, 17, .12); }
.kt-card__media { position: relative; isolation: isolate; display: block; aspect-ratio: 1 / 1; background: var(--surface); border-bottom: 1px solid var(--muted); }
.kt-card__media img { width: 100%; height: 100%; object-fit: contain; padding: 8px; }
@container kt-card (max-width: 199px) {
  .kt-card__media img { padding: 4px; }
  .kt-card__body { padding: 8px; }
  .kt-card__actions .kt-btn { gap: 4px; padding-inline: 4px; }
  .kt-badge { top: 4px; left: 4px; padding: 0 8px; }
}
@container kt-card (min-width: 260px) {
  .kt-card__media img { padding: 12px; }
  .kt-card__body { gap: 6px; padding: 12px 16px 16px; }
}

/* Squelette de chargement : un fond qui pulse tant que la photo n'est pas arrivée
   (classe posée par main.js ; sans JavaScript, le cadre reste blanc, sans saut) */
.is-loading::before { content: ""; position: absolute; inset: 0; z-index: -1; background: var(--muted); animation: kt-pulse 900ms ease-in-out infinite alternate; }
@keyframes kt-pulse { from { opacity: 1; } to { opacity: .45; } }
.kt-card__placeholder { display: flex; align-items: center; justify-content: center; height: 100%; padding: 12px; background: var(--muted); color: var(--primary-strong); font: 700 var(--fs-lg)/var(--lh-lg) var(--font-sans); text-align: center; }
.kt-card__media:has(.kt-card__placeholder--service) { aspect-ratio: 16 / 9; }
.kt-card__placeholder--service { background: var(--muted); }
.kt-badge { position: absolute; top: 8px; left: 8px; padding: 0 10px; border-radius: 999px; font-size: var(--fs-base); line-height: var(--lh-base); font-weight: 700; }
.kt-badge--service { background: var(--primary-strong); color: var(--on-dark); }
.kt-badge--out { background: var(--accent); color: var(--on-dark); left: auto; right: 8px; }
.kt-card__body { display: flex; flex-direction: column; flex: 1; gap: 4px; padding: 10px 12px 12px; }
.kt-card__brand { font-weight: 600; color: var(--text-secondary); text-transform: uppercase; letter-spacing: .03em; }
.kt-card__title {
  margin: 0; font: 400 var(--fs-base)/var(--lh-base) var(--font-sans); color: var(--ink);
  display: -webkit-box; -webkit-box-orient: vertical; -webkit-line-clamp: 2; line-clamp: 2; overflow: hidden;
}
.kt-card__title a { color: inherit; text-decoration: none; }
.kt-card__title a:hover { text-decoration: underline; }
.kt-card__title a::after { content: ""; position: absolute; inset: 0; }
.kt-card__actions { margin-top: auto; padding-top: 8px; position: relative; z-index: 1; }
.kt-card__actions .kt-btn { width: 100%; padding-inline: 8px; }
.kt-price { margin: 0; font: 700 var(--fs-price)/1.3 var(--font-sans); color: var(--ink); }
.kt-price--hidden { font-size: var(--fs-md); line-height: var(--lh-md); }
.kt-price__unit { font-size: var(--fs-base); font-weight: 400; color: var(--text-secondary); }
.kt-price__note { display: block; font-size: var(--fs-base); font-weight: 600; color: var(--accent); }
.kt-empty { padding: 32px 16px; text-align: center; background: var(--muted); border-radius: var(--radius); }

.kt-pagination { margin-top: 24px; }
.kt-pagination ul { display: flex; flex-wrap: wrap; justify-content: center; gap: 6px; list-style: none; margin: 0; padding: 0; }
.kt-pagination a, .kt-pagination span { display: inline-flex; align-items: center; justify-content: center; min-width: 44px; min-height: 44px; padding: 0 10px; border-radius: var(--radius); border: 1px solid var(--border); text-decoration: none; }
.kt-pagination .current { background: var(--primary-strong); border-color: var(--primary-strong); color: var(--on-dark); font-weight: 700; }

/* --- Fiche article ----------------------------------------------------------------------------- */
/* Fiche : photo carrée au-dessus des infos sur téléphone, à côté dès 768 px
   (2/5 de la largeur, 640 px au plus) */
.kt-product { display: grid; gap: clamp(16px, 3vw, 48px); padding-block: 12px var(--section-space); }
.kt-product > * { min-width: 0; }
@media (min-width: 768px) { .kt-product { grid-template-columns: minmax(0, 5fr) minmax(0, 6fr); align-items: start; } }
@media (min-width: 1280px) { .kt-product { grid-template-columns: minmax(0, 640px) minmax(0, 1fr); } }
.kt-product__media { position: relative; isolation: isolate; border: 1px solid var(--border); border-radius: var(--radius); overflow: hidden; background: var(--surface); aspect-ratio: 1 / 1; }
.kt-product__media img { width: 100%; height: 100%; object-fit: contain; padding: clamp(8px, 1.5vw, 20px); }
/* Sans photo (services) : un bandeau court plutôt qu'un grand carré vide */
.kt-product__media:has(.kt-card__placeholder) { aspect-ratio: auto; height: 200px; }
.kt-product__info { display: flex; flex-direction: column; gap: 12px; min-width: 0; }
.kt-product__info h1 { margin: 0; }
.kt-product__info .kt-price { font-size: var(--fs-price-lg); line-height: 1.25; }
.kt-product__meta { display: flex; flex-wrap: wrap; gap: 6px 16px; color: var(--text-secondary); margin: 0; }
.kt-product__meta dt { display: inline; font-weight: 600; }
.kt-product__meta dd { display: inline; margin: 0 0 0 4px; }
.kt-stock { font-weight: 700; }
.kt-stock--in { color: var(--success); }
.kt-stock--out { color: var(--accent); }
.kt-order { display: grid; gap: 10px; padding: clamp(12px, 1.5vw, 20px); background: var(--muted); border-radius: var(--radius); max-width: 36rem; }
.kt-order form { display: flex; flex-wrap: wrap; align-items: end; gap: 10px; }
.kt-order .kt-field { flex: 0 0 7rem; margin: 0; }
.kt-order form .kt-btn { flex: 1 1 12rem; }
.kt-product-details { display: grid; gap: 24px; padding-bottom: var(--section-space); }
@media (min-width: 1024px) { .kt-product-details { grid-template-columns: minmax(0, 75ch) minmax(16rem, 26rem); gap: clamp(24px, 3vw, 48px); } }
.kt-content img { height: auto; border-radius: var(--radius); }
.kt-info-block { align-self: start; padding: 16px; border-left: 4px solid var(--primary); background: var(--muted); border-radius: 0 var(--radius) var(--radius) 0; }
.kt-info-block h2 { font-size: var(--fs-lg); line-height: var(--lh-lg); color: var(--primary-strong); }

/* Formulaire de demande de prestation : fond pleine largeur, formulaire à largeur de lecture */
.kt-request { scroll-margin-top: 16px; }
@media (min-width: 1024px) { .kt-request { scroll-margin-top: 112px; } } /* sous l'en-tête fixe */
.kt-request__inner { max-width: 64rem; }
.kt-form { display: grid; gap: 16px; }
/* Une colonne sur téléphone, deux dès que chaque champ peut avoir 18 rem */
.kt-form__grid { display: grid; gap: 16px clamp(16px, 2vw, 24px); grid-template-columns: repeat(auto-fit, minmax(min(100%, 18rem), 1fr)); }
.kt-field--wide { grid-column: 1 / -1; }
/* Bouton d'envoi pleine largeur sous le pouce, à sa taille naturelle sur grand écran */
.kt-form__actions .kt-btn { width: 100%; min-height: 48px; }
@media (min-width: 640px) { .kt-form__actions .kt-btn { width: auto; } }
.kt-field { margin: 0; }
.kt-field__hint { color: var(--text-secondary); margin: 4px 0 0; }
.kt-field__error { color: var(--error); font-weight: 600; margin: 4px 0 0; }
.kt-field--invalid input, .kt-field--invalid select, .kt-field--invalid textarea { border: 2px solid var(--error); }
.kt-required { color: var(--accent); }
.kt-alert { padding: 12px 16px; border-radius: var(--radius); font-weight: 600; }
.kt-alert--error { background: #FDECEE; color: var(--error); border: 1px solid var(--error); }
.kt-alert--success { background: #E7F6EC; color: #0F5F2D; border: 1px solid var(--success); }

/* --- Ma sélection -------------------------------------------------------------------------------- */
.kt-selection { padding-block: 16px 40px; }
.kt-selection__list { list-style: none; margin: 0 0 24px; padding: 0; display: grid; gap: 12px; }
.kt-line { display: grid; grid-template-columns: 1fr; gap: 10px; padding: 12px; border: 1px solid var(--border); border-radius: var(--radius); }
@media (min-width: 768px) { .kt-line { grid-template-columns: minmax(0, 1fr) auto auto; align-items: center; gap: 24px; } }
.kt-line__title { font-weight: 600; margin: 0; }
.kt-line form { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; }
.kt-line .kt-input { width: 90px; }
.kt-group { padding: 16px; background: var(--muted); border-radius: var(--radius); margin-bottom: 16px; display: grid; gap: 8px; justify-items: start; }
.kt-group__total { font-size: var(--fs-xl); line-height: var(--lh-xl); font-weight: 700; color: var(--ink); margin: 0; }

/* --- Pied de page pleine largeur ------------------------------------------------------------------- */
.kt-footer { margin-top: 40px; color: var(--on-dark); }
.kt-footer a { color: var(--on-dark); }
.kt-footer a:hover { color: var(--on-dark); }
.kt-footer__top { display: flex; align-items: center; justify-content: center; min-height: 48px; background: var(--header-3); font-weight: 600; text-decoration: none; }
.kt-footer__top:hover { text-decoration: underline; }
.kt-footer__main { background: var(--header-2); padding-block: 32px; }
.kt-footer__grid { display: grid; gap: 24px 32px; grid-template-columns: 1fr; }
@media (min-width: 640px) { .kt-footer__grid { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (min-width: 1024px) { .kt-footer__grid { grid-template-columns: repeat(4, minmax(0, 1fr)); } }
.kt-footer h2 { color: var(--on-dark); font-size: var(--fs-md); line-height: var(--lh-md); margin-bottom: 8px; }
.kt-footer ul { list-style: none; margin: 0; padding: 0; }
.kt-footer li a { display: inline-flex; align-items: center; gap: 10px; min-height: 44px; max-width: 100%; text-decoration: none; }
.kt-footer li a:hover { text-decoration: underline; }
@media (min-width: 1024px) and (pointer: fine) { .kt-footer li a { min-height: 32px; } }
.kt-footer li a > span { min-width: 0; overflow-wrap: anywhere; }
/* Bas de page : la marge basse laisse la place au bouton WhatsApp sur ordinateur */
.kt-footer__bottom { background: var(--header); padding-block: 24px; }
@media (min-width: 1024px) { .kt-footer__bottom { padding-bottom: 96px; } }
.kt-footer__bottom-inner { display: flex; flex-wrap: wrap; align-items: center; gap: 16px 32px; }
.kt-footer__bottom p { margin: 0; }
.kt-footer__tagline { font-weight: 600; }

/* --- Barre du bas (téléphone et tablette) et bouton WhatsApp ----------------------------------------
   Barre fixe : Accueil, Produits, Services, Discuter sur 78 % de la largeur, le
   bouton WhatsApp surélevé occupe le reste, à droite, à portée du pouce. Le corps
   réserve la hauteur de la barre (et la zone de sécurité des iPhone). */
.kt-bottom-nav {
  position: fixed; left: 0; right: 0; bottom: 0; z-index: 70;
  padding-bottom: env(safe-area-inset-bottom); background: var(--surface);
  border-top: 1px solid var(--border); box-shadow: 0 -2px 12px rgba(15, 17, 17, .08);
}
.kt-bottom-nav ul { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); width: 78%; margin: 0; padding: 0; list-style: none; }
.kt-bottom-nav a {
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 2px;
  min-height: var(--bottom-nav-height); padding: 6px 2px; color: var(--ink); text-decoration: none;
  font-size: 14px; line-height: 1.15; text-align: center;
}
.kt-bottom-nav a:hover { color: var(--primary-strong); }
.kt-bottom-nav a[aria-current="page"] { color: var(--primary-strong); font-weight: 700; box-shadow: inset 0 3px 0 var(--primary-strong); }
.kt-has-bottom-nav { padding-bottom: calc(var(--bottom-nav-height) + env(safe-area-inset-bottom)); }

.kt-floating {
  position: fixed; right: 0; bottom: 0; z-index: 71; width: 22%;
  display: flex; flex-direction: column; align-items: center; justify-content: flex-end; gap: 2px;
  height: calc(var(--bottom-nav-height) + 18px + env(safe-area-inset-bottom)); padding-bottom: calc(6px + env(safe-area-inset-bottom));
  color: var(--ink); font-size: 14px; line-height: 1.15; font-weight: 700; text-decoration: none;
}
.kt-floating__icon {
  display: flex; align-items: center; justify-content: center; width: 52px; height: 52px; border-radius: 50%;
  background: var(--whatsapp); color: var(--ink); box-shadow: 0 4px 14px rgba(0, 0, 0, .25);
  transition: transform 150ms var(--ease);
}
.kt-floating:hover { color: var(--ink); }
.kt-floating:hover .kt-floating__icon, .kt-floating:focus-visible .kt-floating__icon { transform: scale(1.06); }
.kt-floating__long { display: none; }
body:has(.kt-drawer[open]) :is(.kt-bottom-nav, .kt-floating) { display: none; }

@media (min-width: 1024px) {
  .kt-bottom-nav { display: none; }
  .kt-has-bottom-nav { padding-bottom: 0; }
  /* Ordinateur : rond vert de 56 px en bas à droite, compact pour masquer le moins
     de contenu possible ; son libellé reste lu par les lecteurs d'écran */
  .kt-floating { right: var(--gutter); bottom: 24px; width: auto; height: auto; padding: 0; }
  .kt-floating__icon { width: 56px; height: 56px; }
  .kt-floating:hover .kt-floating__icon { background: var(--whatsapp-hover); }
  .kt-floating__short { display: none; }
  .kt-floating__long { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
}

/* Pages simples (Contact, conditions…) : texte à largeur de lecture */
.kt-page { padding-block: var(--section-space); }
.kt-page .kt-content img { border-radius: var(--radius); }
.kt-page h2 { margin-top: var(--section-space); }
/* Contact : coordonnées en cartes tactiles, grille automatique (17 rem minimum) */
.kt-contact__cta { min-height: 48px; padding-inline: 24px; }
.kt-contact { display: grid; gap: var(--gap); grid-template-columns: repeat(auto-fill, minmax(min(100%, 17rem), 1fr)); list-style: none; margin: 0; padding: 0; }
.kt-contact__card {
  display: flex; align-items: center; gap: 12px; height: 100%; min-height: 72px; padding: 12px 16px;
  border: 1px solid var(--border); border-radius: var(--radius); background: var(--surface); color: var(--ink); text-decoration: none;
  transition: transform 150ms var(--ease);
}
.kt-contact__card:hover { border-color: var(--primary); color: var(--ink); transform: translateY(-2px); }
.kt-contact__card img { flex-shrink: 0; width: 40px; height: 40px; }
.kt-contact__card > span { display: grid; min-width: 0; }
.kt-contact__kind { font-weight: 700; color: var(--primary-strong); }
.kt-contact__value { overflow-wrap: anywhere; }
.kt-contact__delivery { margin-top: var(--section-space); max-width: 75ch; }
.kt-contact__delivery h2 { margin-top: 0; }

/* Écran tactile, quelle que soit sa largeur : zones de 44 px */
@media (pointer: coarse) {
  :is(.kt-filter a, .kt-footer li a, .kt-subnav__list a, .kt-megamenu li a, .kt-megamenu h3 a, .kt-sort a, .kt-breadcrumb li a) { min-height: 44px; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { transition: none !important; animation: none !important; }
}
