/* Bilan Minceur — fondations CSS
   Remplace les 56 fichiers CSS Elementor/Seraphinite par un seul fichier.
   Tokens extraits du site WordPress actuel le 29/08/2026 (getComputedStyle en prod). */

:root {
  /* Typo réelle du site actuel */
  --font-display: "Abhaya Libre", Georgia, "Times New Roman", serif;
  --font-body: "Nunito", -apple-system, "Segoe UI", Helvetica, Arial, sans-serif;

  /* Couleurs réelles du site actuel */
  --color-ink: #424242;          /* texte courant */
  --color-bg: #ffffff;
  --color-accent: #ab6530;       /* terracotta/caramel — nav, H2, liens */
  --color-hero-text: #fcf5f0;    /* texte sur fond image/sombre du hero */
  --color-line: #e7e0d5;
  --color-surface: #faf7f2;

  --radius: 8px;
  --max-width: 1120px;
  --gutter: 24px;
}

@media (prefers-color-scheme: dark) {
  :root {
    --color-ink: #e8e3da;
    --color-bg: #201b16;
    --color-surface: #2a231c;
    --color-line: #3a3128;
    --color-accent: #d68f52;
  }
}

/* NOTE: pas de data-theme override ici volontairement — c'est le site public,
   pas un artefact d'outil interne. Si un jour un toggle thème est ajouté sur
   le site, dupliquer le bloc dark ci-dessus sous [data-theme="dark"]. */

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  font-family: var(--font-body);
  color: var(--color-ink);
  background: var(--color-bg);
  line-height: 1.6;
  font-size: 16px;
}

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

h1, h2, h3, h4 {
  font-family: var(--font-display);
  font-weight: 800;
  line-height: 1.2;
  margin: 0 0 0.5em;
  text-wrap: balance;
}
h1 { font-size: clamp(32px, 5vw, 48px); }
h2 { font-size: clamp(24px, 3.5vw, 32px); color: var(--color-accent); }
h3 { font-size: 20px; }

p { margin: 0 0 1em; max-width: 68ch; }

a { color: var(--color-accent); text-decoration: none; }
a:hover { text-decoration: underline; }
a:focus-visible, button:focus-visible { outline: 2px solid var(--color-accent); outline-offset: 2px; }

.container {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 var(--gutter);
}

/* Espacement vertical standard des pages de contenu (articles, fiches produit).
   Toujours utiliser cette classe plutôt qu'un style inline "padding: 48px 0" —
   ce raccourci écrase aussi le padding gauche/droite hérité de .container et
   colle le texte aux bords de l'écran en mobile (bug corrigé le 30/08/2026). */
.page-pad { padding-top: 48px; padding-bottom: 48px; }

/* Header / nav */
.site-header {
  border-bottom: 1px solid var(--color-line);
  background: var(--color-bg);
}
.site-header .container {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  padding-top: 16px;
  padding-bottom: 16px;
  flex-wrap: wrap;
}
.site-header .logo img { height: 48px; width: auto; }
.site-nav { display: flex; gap: 24px; flex-wrap: wrap; list-style: none; margin: 0; padding: 0; }
.site-nav a {
  color: var(--color-ink);
  font-weight: 600;
  font-size: 15px;
}
.site-nav a:hover, .site-nav a[aria-current="page"] { color: var(--color-accent); }

/* Bouton hamburger — masqué sur desktop, affiché sous 720px */
.nav-toggle {
  display: none;
  flex-direction: column;
  justify-content: center;
  gap: 5px;
  width: 40px;
  height: 40px;
  border: none;
  background: transparent;
  cursor: pointer;
  padding: 0;
}
.nav-toggle span {
  display: block;
  width: 24px;
  height: 2px;
  background: var(--color-ink);
  border-radius: 2px;
}

@media (max-width: 720px) {
  .nav-toggle { display: flex; }
  .site-nav {
    display: none;
    width: 100%;
    flex-direction: column;
    gap: 4px;
    padding-top: 12px;
  }
  .site-nav.is-open { display: flex; }
  .site-nav a { display: block; padding: 10px 0; }
}

/* Boutons */
.btn {
  display: inline-block;
  font-family: var(--font-body);
  font-weight: 600;
  padding: 12px 28px;
  border-radius: 100px;
  background: var(--color-accent);
  color: #fff;
  border: none;
  cursor: pointer;
}
.btn:hover { opacity: 0.9; text-decoration: none; }
.btn-outline {
  background: transparent;
  color: var(--color-accent);
  border: 2px solid var(--color-accent);
}

/* Hero */
.hero {
  padding: 72px 0;
  background: var(--color-surface);
  text-align: center;
}
.hero p.lede { max-width: 60ch; margin: 0 auto 28px; font-size: 17px; }

/* Sections génériques */
section { padding: 56px 0; }
section + section { border-top: 1px solid var(--color-line); }

/* Cartes (témoignages, articles, produits) */
.card-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  gap: 24px;
}
.card {
  background: var(--color-surface);
  border: 1px solid var(--color-line);
  border-radius: var(--radius);
  padding: 20px;
}
.card img { border-radius: calc(var(--radius) - 2px); margin-bottom: 12px; }

/* Avatars équipe — taille fixe forcée (sans ça, "height:auto" de la règle img
   générale ci-dessus fait que chaque photo garde ses proportions d'origine et
   elles n'ont pas toutes la même taille à l'écran) */
.avatar { width: 120px; height: 120px; object-fit: cover; border-radius: 100%; }

/* Article (contenu long) */
.article-body { max-width: 68ch; margin: 0 auto; }
.article-meta { color: var(--color-accent); font-size: 14px; font-weight: 600; margin-bottom: 8px; }

/* Callout produit intégré dans un article — repris du pattern déjà utilisé
   sur le site actuel (icône + titre court + phrase + CTA), pas inventé. */
.product-callout {
  display: flex;
  align-items: flex-start;
  gap: 16px;
  background: var(--color-surface);
  border: 1px solid var(--color-line);
  border-radius: var(--radius);
  padding: 20px 24px;
  margin: 32px 0;
}
.product-callout .icon { font-size: 28px; line-height: 1; }
.product-callout h3 { margin: 0 0 4px; font-size: 17px; }
.product-callout p { margin: 0 0 10px; font-size: 14.5px; max-width: none; }

/* Grille produits (page /produits/) — distincte de .card-grid générique :
   image en ratio fixe (les photos produit ont des tailles très variables sur
   fitline.com), badge catégorie, mise en avant du nom plutôt que du texte. */
.product-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  gap: 20px;
}

/* Grilles à nombre d'éléments fixe (4) — évite le 4e élément qui atterrit
   seul sur une ligne quand auto-fill calcule 3 colonnes. */
.grid-4 { grid-template-columns: repeat(4, 1fr); }
@media (max-width: 900px) {
  .grid-4 { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 480px) {
  .grid-4 { grid-template-columns: 1fr; }
}

/* Icônes "Comment ça fonctionne" */
.step-icon { font-size: 32px; margin-bottom: 8px; display: block; }
.product-card {
  min-width: 0; /* évite le "grid blowout" : sans ça, l'image pousse sa colonne à s'élargir */
  background: var(--color-surface);
  border: 1px solid var(--color-line);
  border-radius: var(--radius);
  overflow: hidden;
  transition: transform 0.15s ease, box-shadow 0.15s ease;
}
.product-card:hover { transform: translateY(-3px); box-shadow: 0 8px 20px rgba(0,0,0,0.08); }
.product-card .product-thumb {
  aspect-ratio: 1 / 1;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--color-bg);
  padding: 20px;
}
.product-card .product-thumb img { max-width: 100%; max-height: 100%; width: auto; height: auto; margin: 0; }
.product-card .product-info { padding: 16px 18px 20px; }
.product-card .product-category {
  display: inline-block;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--color-accent);
  margin-bottom: 6px;
}
.product-card h3 { margin: 0 0 6px; font-size: 18px; }
.product-card p { font-size: 14px; margin: 0; }
.product-card[hidden] { display: none; }

/* Filtre catégories */
.filter-bar {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  justify-content: center;
  margin: 0 0 32px;
}
.filter-btn {
  font-family: var(--font-body);
  font-size: 14px;
  font-weight: 600;
  padding: 8px 18px;
  border-radius: 100px;
  border: 1px solid var(--color-line);
  background: var(--color-bg);
  color: var(--color-ink);
  cursor: pointer;
}
.filter-btn:hover { border-color: var(--color-accent); }
.filter-btn[aria-pressed="true"] {
  background: var(--color-accent);
  border-color: var(--color-accent);
  color: #fff;
}

/* Footer */
.site-footer {
  border-top: 1px solid var(--color-line);
  padding: 32px 0;
  font-size: 13.5px;
  color: var(--color-ink);
  text-align: center;
}
.site-footer a { color: var(--color-ink); text-decoration: underline; }

/* Utilitaire responsive tableau/large contenu */
.overflow-x { overflow-x: auto; }

/* Formulaire de contact */
.form-field { margin-bottom: 18px; }
.form-field label { display: block; font-weight: 600; margin-bottom: 6px; }
.form-field input,
.form-field textarea {
  width: 100%;
  padding: 12px 14px;
  border: 1px solid var(--color-line);
  border-radius: var(--radius);
  font-family: var(--font-body);
  font-size: 15px;
  background: var(--color-bg);
  color: var(--color-ink);
}
.form-field textarea { resize: vertical; min-height: 120px; }
.form-notice { padding: 14px 18px; border-radius: var(--radius); margin-bottom: 24px; }
.form-notice.success { background: #e6f4ea; color: #1e5631; }
.form-notice.error { background: #fbe9e7; color: #8a2c1f; }
@media (prefers-color-scheme: dark) {
  .form-notice.success { background: #1e3a26; color: #a8e6b8; }
  .form-notice.error { background: #3a201a; color: #f4b3a5; }
}

/* Accordéon FAQ */
.faq-item { border-bottom: 1px solid var(--color-line); padding: 18px 0; }
.faq-item summary { font-weight: 700; cursor: pointer; font-size: 17px; }
.faq-item p { margin: 12px 0 0; }

/* Bloc auteur (E-E-A-T) sur les fiches produits */
.author-box {
  display: flex;
  gap: 16px;
  align-items: flex-start;
  background: var(--color-surface);
  border-radius: var(--radius);
  padding: 20px;
  margin: 32px 0;
}
.author-box img.avatar { width: 56px; height: 56px; flex-shrink: 0; margin: 0; }
.author-box h3 { margin: 0 0 4px; font-size: 16px; }
.author-box p { margin: 0; font-size: 14.5px; }

@media (max-width: 640px) {
  .site-header .container { flex-direction: column; align-items: flex-start; }
  section { padding: 40px 0; }
}
