/* =========================================================
   COMPOSANTS — inspirés des composants Fluent UI (Button, Card, Badge,
   Tag, Input, TabList…). Tous les styles utilisent les tokens.
   Formes (shapes) : rectangles = 4px (boutons, champs, cartes, images, menus) · badges < 32px = 2px · barres de navigation = 0
   ========================================================= */

/* ---------- Button (taille Large = 40px, Medium = 32px) ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: var(--size60);
  min-height: var(--size320); min-width: 96px; padding: 5px var(--size120); /* Button Medium Fluent */
  border: var(--strokeWidthThin) solid transparent; border-radius: var(--borderRadiusMedium);
  font-size: var(--fontSizeBase300); line-height: var(--lineHeightBase300); font-weight: var(--fontWeightSemibold);
  cursor: pointer; white-space: nowrap;
  transition: background var(--durationFaster) var(--curveEasyEase), border-color var(--durationFaster) var(--curveEasyEase), color var(--durationFaster) var(--curveEasyEase);
}
.btn .fi, .btn i { width: 20px; height: 20px; font-size: 18px; }
/* Primary */
.btn--primary { background: var(--colorBrandBackground); color: var(--colorNeutralForegroundOnBrand); }
.btn--primary:hover { background: var(--colorBrandBackgroundHover); }
.btn--primary:active { background: var(--colorBrandBackgroundPressed); }
/* Secondary (apparence par défaut Fluent : fond blanc + contour) */
.btn--outline { background: var(--colorNeutralBackground1); border-color: var(--colorNeutralStroke1); color: var(--colorNeutralForeground1); }
.btn--outline:hover { background: var(--colorNeutralBackground1Hover); border-color: var(--colorNeutralStroke1Hover); }
.btn--outline:active { background: var(--colorNeutralBackground1Pressed); border-color: var(--colorNeutralStroke1Pressed); }
/* Sur fond de marque */
.btn--white { background: var(--colorNeutralBackground1); color: var(--colorBrandForeground1); }
.btn--white:hover { background: var(--colorNeutralBackground1Hover); }
.btn--white:active { background: var(--colorNeutralBackground1Pressed); }
.btn--ghost { background: transparent; border-color: rgba(255, 255, 255, .7); color: var(--colorNeutralForegroundOnBrand); }
.btn--ghost:hover { background: rgba(255, 255, 255, .1); border-color: var(--colorNeutralForegroundOnBrand); }
.btn--ghost:active { background: rgba(255, 255, 255, .2); }
/* WhatsApp */
/* WhatsApp : couleurs de la marque Béton Vert (le vert WhatsApp #25d366 avec texte blanc = contraste 2:1, refusé par Fluent : 4,5:1 minimum) */
.btn--wa { background: var(--colorBrandBackground); color: var(--colorNeutralForegroundOnBrand); }
.btn--wa:hover { background: var(--colorBrandBackgroundHover); }
.btn--wa:active { background: var(--colorBrandBackgroundPressed); }
.btn--block { width: 100%; }
/* Taille Large (40px) : appels à l'action principaux */
.btn--large { min-height: var(--size400); padding: var(--size80) var(--size160); font-size: var(--fontSizeBase400); line-height: var(--lineHeightBase400); }
/* Apparence pour fonds sombres / images */
.btn--inverted { background: transparent; border-color: rgba(255, 255, 255, .7); color: var(--colorNeutralForegroundOnBrand); }
.btn--inverted:hover { background: rgba(255, 255, 255, .12); border-color: var(--colorNeutralForegroundOnBrand); }
.btn--inverted:active { background: rgba(255, 255, 255, .2); }

/* Lien autonome (Link Fluent, sans point final, chevron pour indiquer la navigation) */
.link-standalone { display: inline-flex; align-items: center; gap: var(--size40); font-size: var(--fontSizeBase300); line-height: var(--lineHeightBase300); font-weight: var(--fontWeightSemibold); color: var(--colorBrandForegroundLink); text-underline-offset: 3px; }
.link-standalone:hover, .link-standalone:focus-visible { color: var(--colorBrandForegroundLinkHover); text-decoration: underline; }
.link-standalone .fi { width: 16px; height: 16px; }
/* Bouton du header : taille Medium */
.nav__cta { min-height: var(--size400); padding: var(--size80) var(--size160); font-size: var(--fontSizeBase400); line-height: var(--lineHeightBase400); }
.nav__cta .fi { width: 20px; height: 20px; }

/* ---------- Card (élévation 4 au repos, 8 au survol, 2 à l'appui) ---------- */
.feature, .product-card, .news-card, .cert {
  display: flex; flex-direction: column; height: 100%; overflow: hidden;
  background: var(--colorNeutralBackground1); border-radius: var(--borderRadiusMedium);
  box-shadow: var(--shadow4);
  transition: box-shadow var(--durationNormal) var(--curveEasyEase);
}
.feature:hover, .product-card:hover, .news-card:hover, .cert:hover { box-shadow: var(--shadow8); }
.feature:active, .product-card:active, .news-card:active { box-shadow: var(--shadow2); }
.feature h3, .product-card h3, .news-card h3, .cert h3 { font-size: var(--fontSizeBase400); line-height: var(--lineHeightBase400); } /* Subtitle 2 */
.feature p, .product-card p, .news-card p, .cert p { margin-top: var(--size80); font-size: var(--fontSizeBase300); line-height: var(--lineHeightBase300); color: var(--colorNeutralForeground3); } /* Body 1 */

/* Feature */
.feature { padding: var(--size240); }
.feature__icon {
  width: var(--size400); height: var(--size400); margin-bottom: var(--size160);
  display: grid; place-items: center; border-radius: var(--borderRadiusMedium);
  background: var(--colorBrandBackground2); color: var(--colorBrandForeground1);
}
.feature__icon .fi { width: 24px; height: 24px; }

/* Product card */
.product-card__media { position: relative; aspect-ratio: 16 / 10; flex-shrink: 0; }
.product-card__tag { /* Badge Fluent (pilule) */
  position: absolute; top: var(--size120); inset-inline-start: var(--size120); z-index: 2;
  display: inline-flex; align-items: center; min-height: var(--size200); padding: 0 var(--size80);
  border-radius: var(--borderRadiusSmall); background: var(--colorBrandBackground); color: var(--colorNeutralForegroundOnBrand);
  font-size: var(--fontSizeBase200); line-height: var(--lineHeightBase200); font-weight: var(--fontWeightSemibold);
}
.product-card__body { flex: 1; display: flex; flex-direction: column; padding: var(--size160) var(--size160) 0; }
.product-card__body p { flex: 1; }
.product-card__link { /* lien "subtle" en pied de carte */
  display: flex; align-items: center; justify-content: space-between;
  margin: var(--size160) calc(-1 * var(--size160)) 0; padding: var(--size120) var(--size160);
  border-top: var(--strokeWidthThin) solid var(--colorNeutralStroke2);
  font-size: var(--fontSizeBase300); line-height: var(--lineHeightBase300); font-weight: var(--fontWeightSemibold);
  color: var(--colorBrandForegroundLink);
  transition: background var(--durationFaster) var(--curveEasyEase), color var(--durationFaster);
}
.product-card__link:hover { background: var(--colorNeutralBackground1Hover); color: var(--colorBrandForegroundLinkHover); }
.product-card__link .fi { width: 16px; height: 16px; }

/* News card */
.news-card__media { aspect-ratio: 16 / 9; flex-shrink: 0; }
.news-card__body { flex: 1; display: flex; flex-direction: column; padding: var(--size160); }
.news-card__meta { display: flex; flex-wrap: wrap; gap: var(--size120); margin-bottom: var(--size80); font-size: var(--fontSizeBase200); line-height: var(--lineHeightBase200); color: var(--colorNeutralForeground3); }
.news-card__meta span { display: inline-flex; align-items: center; gap: var(--size40); }
.news-card__meta .fi { width: 16px; height: 16px; color: var(--colorBrandForeground1); }

/* Image dans une carte */
.media { position: relative; overflow: hidden; background: var(--colorNeutralBackground3); }
.media img { width: 100%; height: 100%; object-fit: cover; transition: transform var(--durationSlower) var(--curveDecelerateMid); }
.product-card:hover .media img, .news-card:hover .media img { transform: scale(1.03); }
.ph { width: 100%; height: 100%; display: grid; place-items: center; color: var(--colorBrandForeground1); background: var(--colorBrandBackground2); }

/* ---------- Tag (spécifications produit) ---------- */
.specs { display: flex; flex-wrap: wrap; gap: var(--size40); margin-top: var(--size120); }
.specs span {
  display: inline-flex; align-items: center; min-height: var(--size240); padding: 0 var(--size80);
  border-radius: var(--borderRadiusSmall); background: var(--colorNeutralBackground3); color: var(--colorNeutralForeground2);
  font-size: var(--fontSizeBase200); line-height: var(--lineHeightBase200);
}

/* ---------- Statistiques (police numérique Fluent) ---------- */
.stat { text-align: start; }
.stat__num { font-family: var(--fontFamilyNumeric); font-size: var(--fontSizeHero800); line-height: var(--lineHeightHero800); font-weight: var(--fontWeightSemibold); color: var(--colorBrandForeground1); }
.stat__label { margin-top: var(--size40); font-size: var(--fontSizeBase300) !important; line-height: var(--lineHeightBase300) !important; color: var(--colorNeutralForeground3) !important; }

/* ---------- Appel à l'action : carte blanche (plus de bande verte) ---------- */
.cta-band {
  display: flex; align-items: center; justify-content: space-between; gap: var(--size240); flex-wrap: wrap;
  padding: var(--size320); border-radius: var(--borderRadiusMedium);
  background: var(--surfaceCard); box-shadow: var(--shadow4);
}
.cta-band h2 { font-size: var(--fontSizeHero700); line-height: var(--lineHeightHero700); } /* Title 2 */
.cta-band p { margin-top: var(--size40); font-size: var(--fontSizeBase300); line-height: var(--lineHeightBase300); color: var(--colorNeutralForeground3); }
.cta-band__actions { display: flex; gap: var(--size120); flex-wrap: wrap; }
.cta-band .btn--white { background: var(--colorBrandBackground); border-color: transparent; color: var(--colorNeutralForegroundOnBrand); }
.cta-band .btn--white:hover { background: var(--colorBrandBackgroundHover); }
.cta-band .btn--ghost { background: var(--surfaceCard); border-color: var(--colorNeutralStroke1); color: var(--colorNeutralForeground1); }
.cta-band .btn--ghost:hover { background: var(--colorNeutralBackground1Hover); }
@media (max-width: 639px) { .cta-band { padding: var(--size240); } .cta-band h2 { font-size: var(--fontSizeBase600); line-height: var(--lineHeightBase600); } }

/* ---------- Champs de formulaire : Input Fluent ---------- */
.form { display: grid; gap: var(--size160); }
.form__row { display: grid; grid-template-columns: 1fr 1fr; gap: var(--size160); }
.form__group label { display: block; margin-bottom: var(--size40); font-size: var(--fontSizeBase300); line-height: var(--lineHeightBase300); font-weight: var(--fontWeightSemibold); color: var(--colorNeutralForeground1); }
.form__control {
  width: 100%; min-height: var(--size400); padding: var(--size80) var(--size120);
  background: var(--colorNeutralBackground1);
  border: var(--strokeWidthThin) solid var(--colorNeutralStroke1); border-bottom-color: var(--colorNeutralStrokeAccessible);
  border-radius: var(--borderRadiusMedium);
  font-size: var(--fontSizeBase300); line-height: var(--lineHeightBase300);
  transition: border-color var(--durationFaster) var(--curveEasyEase), box-shadow var(--durationNormal) var(--curveDecelerateMid);
}
.form__control::placeholder { color: var(--colorNeutralForeground3); }
.form__control:hover { border-color: var(--colorNeutralStroke1Hover); border-bottom-color: var(--colorNeutralForeground3); }
.form__control:focus { outline: none; border-bottom-color: var(--colorBrandStroke1); box-shadow: inset 0 calc(-1 * var(--strokeWidthThick)) 0 var(--colorBrandStroke1); } /* indicateur de focus Fluent */
.form__control.is-invalid { border-bottom-color: var(--colorPaletteRedBorder2); box-shadow: inset 0 calc(-1 * var(--strokeWidthThick)) 0 var(--colorPaletteRedBorder2); }
textarea.form__control { min-height: 120px; resize: vertical; }
.form__note { font-size: var(--fontSizeBase200) !important; line-height: var(--lineHeightBase200) !important; color: var(--colorNeutralForeground3); }
.form__success { /* MessageBar Fluent (succès) */
  display: none; padding: var(--size120) var(--size160); border-radius: var(--borderRadiusMedium);
  background: var(--colorPaletteGreenBackground1); border: var(--strokeWidthThin) solid var(--colorPaletteGreenBorder1); color: var(--colorNeutralForeground1);
  font-size: var(--fontSizeBase300); line-height: var(--lineHeightBase300);
}
@media (max-width: 639px) { .form__row { grid-template-columns: 1fr; } }

/* ---------- Filtres : TabList Fluent "subtle", minimaliste ----------
   Texte seul (Body 2), survol = fond neutre léger, sélection = semi-gras + indicateur 3px de marque. */
.filters { display: flex; gap: var(--size80); margin-bottom: var(--size320); border-bottom: var(--strokeWidthThin) solid var(--colorNeutralStroke2); }
.filter-btn {
  position: relative; padding: var(--size120) var(--size120) var(--size160); border: 0; background: transparent; cursor: pointer;
  border-radius: var(--borderRadiusMedium) var(--borderRadiusMedium) 0 0;
  font-size: var(--fontSizeBase400); line-height: var(--lineHeightBase400); color: var(--colorNeutralForeground2);
  transition: color var(--durationFaster) var(--curveEasyEase), background var(--durationFaster) var(--curveEasyEase);
}
.filter-btn::after {
  content: ""; position: absolute; left: var(--size120); right: var(--size120); bottom: -1px; height: var(--strokeWidthThicker);
  border-radius: var(--borderRadiusCircular); background: transparent; transition: background var(--durationNormal) var(--curveEasyEase);
}
.filter-btn:hover { color: var(--colorNeutralForeground1); background: var(--colorNeutralBackground1Hover); }
.filter-btn:hover::after { background: var(--colorNeutralStroke1); }
.filter-btn.is-active { color: var(--colorNeutralForeground1); font-weight: var(--fontWeightSemibold); }
.filter-btn.is-active::after { background: var(--colorBrandStroke1); }

/* ---------- Liste avec coches ---------- */
.check-list li { display: flex; gap: var(--size80); margin-bottom: var(--size80); font-size: var(--fontSizeBase400); line-height: var(--lineHeightBase400); color: var(--colorNeutralForeground2); }
.check-list .fi { color: var(--colorBrandForeground1); margin-top: 1px; }

/* ---------- Boîte d'icône (contact, hero) ---------- */
.icon-box {
  width: var(--size400); height: var(--size400); flex-shrink: 0; display: grid; place-items: center;
  border-radius: var(--borderRadiusMedium); background: var(--colorBrandBackground2); color: var(--colorBrandForeground1); font-size: 20px;
}
.icon-box .fi { width: 24px; height: 24px; }

/* Tablist → Dropdown sur petit écran (Fluent : "Tablists are less effective in smaller layouts… consider… a dropdown") */
.filter-select { display: none; margin-bottom: var(--size240); }
@media (max-width: 639px) {
  .filters { display: none; }
  .filter-select { display: block; }
}

/* ---------- Bouton en cours d'envoi (Spinner Fluent « extra-tiny ») ---------- */
.btn.is-loading { cursor: progress; opacity: .92; }
.btn.is-loading:disabled { pointer-events: none; }
.btn__spinner { width: 16px; height: 16px; flex-shrink: 0; border-radius: 50%; border: 2px solid currentColor; border-right-color: transparent; opacity: .9; animation: bv-spin var(--durationUltraSlow, .8s) linear infinite; animation-duration: .75s; }
@keyframes bv-spin { to { transform: rotate(360deg); } }
@media (prefers-reduced-motion: reduce) { .btn__spinner { animation-duration: 1.6s; } }

/* Bandeau cookies (Admin > SEO) */
.consent { position: fixed; z-index: 900; left: var(--size160); right: var(--size160); bottom: var(--size160); max-width: 720px; margin-inline: auto; display: flex; align-items: center; gap: var(--size160); padding: var(--size160) var(--size200); border: 1px solid var(--colorNeutralStroke2); border-radius: var(--borderRadiusLarge); background: var(--colorNeutralBackground1); box-shadow: var(--shadow16); }
.consent[hidden] { display: none; }
.consent__text { flex: 1; min-width: 0; font-size: var(--fontSizeBase300); line-height: var(--lineHeightBase300); }
.consent__text strong { display: block; margin-bottom: var(--size20); font-weight: var(--fontWeightSemibold); }
.consent__text p { margin: 0; color: var(--colorNeutralForeground2); }
.consent__text a { color: var(--colorBrandForegroundLink, #007436); }
.consent__actions { display: flex; gap: var(--size80); flex-shrink: 0; }
@media (max-width: 600px) { .consent { flex-direction: column; align-items: stretch; } .consent__actions > .btn { flex: 1; } }

/* Panneau « Ma demande de devis » : confirmation de l'article ajouté (Fluent 2 · MessageBar succès) */
.cart-drawer__added { display: flex; align-items: flex-start; gap: var(--size80); margin: var(--size160) var(--size240) 0; padding: var(--size100) var(--size120); border: 1px solid var(--brand-140, #9fd8b4); border-radius: var(--borderRadiusMedium); background: var(--colorBrandBackground2); font-size: var(--fontSizeBase300); line-height: var(--lineHeightBase300); }
.cart-drawer__added[hidden] { display: none; }
.cart-drawer__added .fi { flex-shrink: 0; margin-top: 2px; color: var(--colorBrandForeground1); }
.cart-drawer__added strong { display: block; font-weight: var(--fontWeightSemibold); }
.cart-item.is-new { margin-inline: calc(-1 * var(--size80)); padding-inline: var(--size80); border-radius: var(--borderRadiusMedium); background: var(--colorNeutralBackground2); box-shadow: inset 3px 0 0 var(--colorBrandStroke1); }
