/* ============================================
   ÉQUIPE JEAN PAIN — FEUILLE DE STYLE PRINCIPALE
   ============================================
   Sommaire :
   1. Variables (couleurs, typo, espacements)
   2. Réinitialisation de base
   3. Composants génériques (boutons, badges, tags)
   4. En-tête / navigation
   5. Section héro
   6. Chiffres clés
   7. Sections génériques + profils
   8. Gamme de produits
   9. Bande d'appel à l'action
   10. Pied de page
   11. Responsive (tablette puis mobile)
   ============================================ */


/* --- TOAST DE TRANSITION DESIGN => TEMPORAIRE --- */
.design-toast {
  position: fixed;
  top: 24px;
  left: 50%;
  transform: translateX(-50%) translateY(calc(100% + 40px));
  z-index: 9999;
 
  background: #fff;
  border: 1px solid var(--color-border);
  border-left: 4px solid var(--color-green-accent);
  border-radius: var(--radius-lg);
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.12);
 
  display: flex;
  align-items: flex-start;
  gap: 14px;
  padding: 16px 18px;
 
  max-width: min(480px, calc(100vw - 32px));
  width: max-content;
 
  opacity: 0;
  transition: transform 0.35s cubic-bezier(0.34, 1.56, 0.64, 1),
              opacity  0.35s ease;
  pointer-events: none;
}
 
.design-toast.design-toast--visible {
  transform: translateX(-50%) translateY(0);
  opacity: 1;
  pointer-events: auto;
}
 
.design-toast-icon {
  width: 36px;
  height: 36px;
  flex-shrink: 0;
  border-radius: 50%;
  background: var(--color-green-light);
  display: flex;
  align-items: center;
  justify-content: center;
}
.design-toast-icon i {
  font-size: 16px;
  color: var(--color-green-accent);
}
 
.design-toast-body {
  flex: 1;
}
 
.design-toast-title {
  font-size: 13px;
  font-weight: 600;
  color: var(--color-text);
  margin-bottom: 3px;
}
 
.design-toast-text {
  font-size: 12px;
  color: var(--color-text-muted);
  line-height: 1.55;
}
 
.design-toast-close {
  background: none;
  border: none;
  cursor: pointer;
  padding: 2px 0 0 4px;
  color: var(--color-text-muted);
  font-size: 14px;
  flex-shrink: 0;
  line-height: 1;
  transition: color 0.12s ease;
}
.design-toast-close:hover {
  color: var(--color-text);
}
 
@media (max-width: 480px) {
  .design-toast {
    bottom: 16px;
    padding: 14px 14px;
    gap: 10px;
  }
}


/* ============================================
   1. VARIABLES
   ============================================ */
:root {
  /* Couleurs de marque — Kelly Green */
  --color-green-accent: #2E7D14;   /* boutons, liens, icônes — sur fond clair */
  --color-green-light: #DFF0D6;    /* fonds de badges, tags, icônes */
  --color-green-tint: #F2F8ED;     /* fond de section très clair */
  --color-green-dark: #1F5A0D;     /* texte sur fond clair, fond héro */
  --color-green-darker: #16380A;   /* grands aplats (héro, bandeau CTA) */

  /* Texte et fonds neutres */
  --color-text: #1A1A18;
  --color-text-muted: #5C5C57;
  --color-bg: #FFFFFF;
  --color-border: #E4E2DB;

  /* Typographie */
  --font-display: 'Fraunces', Georgia, serif;
  --font-body: 'Work Sans', -apple-system, BlinkMacSystemFont, sans-serif;

  /* Rayons et espacements */
  --radius-md: 8px;
  --radius-lg: 14px;
  --container-padding: 32px;
  --max-width: 1240px;
}

/* ============================================
   2. RÉINITIALISATION DE BASE
   ============================================ */
* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  scroll-behavior: smooth;
}

body {
  font-family: var(--font-body);
  color: var(--color-text);
  background: var(--color-bg);
  font-size: 16px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

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

a {
  text-decoration: none;
  color: inherit;
}

ul {
  list-style: none;
}

h1, h2, h3 {
  font-family: var(--font-display);
  font-weight: 500;
  line-height: 1.2;
}

/* Accessibilité : focus clavier toujours visible */
a:focus-visible,
button:focus-visible {
  outline: 2px solid var(--color-green-accent);
  outline-offset: 2px;
}

/* Respect des préférences de réduction de mouvement */
@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }
  * {
    animation-duration: 0.01ms !important;
    transition-duration: 0.01ms !important;
  }
}


/* ============================================
   3. COMPOSANTS GÉNÉRIQUES
   ============================================ */

/* -- Boutons -- */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 12px 24px;
  border-radius: var(--radius-md);
  font-size: 14px;
  font-weight: 500;
  font-family: var(--font-body);
  border: none;
  cursor: pointer;
  transition: background-color 0.15s ease, opacity 0.15s ease;
  white-space: nowrap;
}

.btn-primary {
  background: var(--color-green-accent);
  color: #fff;
}
.btn-primary:hover {
  background: var(--color-green-dark);
}

.btn-secondary {
  background: transparent;
  color: var(--color-green-dark);
  border: 1px solid var(--color-green-accent);
}
.btn-secondary:hover {
  background: var(--color-green-light);
}

.btn-white {
  background: #fff;
  color: var(--color-green-darker);
}
.btn-white:hover {
  opacity: 0.9;
}

.btn-outline-white {
  background: transparent;
  color: #fff;
  border: 1px solid rgba(255, 255, 255, 0.4);
}
.btn-outline-white:hover {
  background: rgba(255, 255, 255, 0.1);
}

/* -- Badge (héro) -- */
.badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: var(--color-green-light);
  color: var(--color-green-dark);
  padding: 5px 14px;
  border-radius: 20px;
  font-size: 13px;
  font-weight: 500;
  width: fit-content;
}

/* -- Tags (sur les fiches produits) -- */
.tag {
  font-size: 12px;
  padding: 4px 10px;
  border-radius: 20px;
  background: var(--color-green-light);
  color: var(--color-green-dark);
}


/* ============================================
   4. EN-TÊTE / NAVIGATION
   ============================================ */
.site-header {
  border-bottom: 1px solid var(--color-border);
  position: sticky;
  top: 0;
  background: var(--color-bg);
  z-index: 100;
}

.navbar {
  max-width: var(--max-width);
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 14px var(--container-padding);
}

.logo {
  display: flex;
  align-items: center;
  gap: 10px;
}

.logo-mark {
  width: 40px;
  height: 40px;
  /*border-radius: var(--radius-md);
  background: var(--color-green-accent);*/
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 20px;
  flex-shrink: 0;
}

.logo-text {
  display: flex;
  flex-direction: column;
  line-height: 1.25;
}

.logo-title {
  font-family: var(--font-display);
  font-size: 16px;
  font-weight: 500;
  color: var(--color-text);
}

.logo-subtitle {
  font-size: 11px;
  color: var(--color-text-muted);
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.nav-links {
  display: flex;
  align-items: center;
  gap: 28px;
}

.nav-links a {
  font-size: 14px;
  color: var(--color-text-muted);
  transition: color 0.15s ease;
}
.nav-links a:hover {
  color: var(--color-text);
}

.nav-cta-desktop {
  display: inline-flex;
}

.nav-cta-mobile {
  display: none;
}

/* Bouton menu burger, masqué par défaut (affiché en mobile) */
.burger {
  display: none;
  background: none;
  border: none;
  font-size: 24px;
  color: var(--color-text);
  cursor: pointer;
}

/* -- Lien boutique : mis en avant en vert dans le menu -- */
.nav-shop a {
  color: var(--color-green-accent) !important;
  font-weight: 500;
}
.nav-shop a:hover {
  color: var(--color-green-dark) !important;
}

/* ============================================
   SOUS-MENU DÉROULANT — NOS BROYEURS (desktop)
   ============================================ */

/* Conteneur de l'entrée avec dropdown */
.nav-item--dropdown {
  position: relative;
}

/* Lien principal "Nos broyeurs" + chevron */
.nav-dropdown-toggle {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  cursor: pointer;
}

/* Chevron : tourne quand le dropdown est ouvert */
.nav-chevron {
  font-size: 11px;
  transition: transform 0.2s ease;
}
.nav-item--dropdown:hover .nav-chevron,
.nav-item--dropdown.nav-item--open .nav-chevron {
  transform: rotate(180deg);
}

/* Le panneau déroulant */
.nav-dropdown {
  display: none; /* masqué par défaut */
  position: absolute;
  top: 100%;
  left: 50%;
  transform: translateX(-50%);
  background: var(--color-bg);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-lg);
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.10);
  min-width: 240px;
  padding: 8px 0;
  z-index: 200;
  list-style: none;
}

/* Ouverture au survol (desktop) */
.nav-item--dropdown:hover .nav-dropdown {
  display: block;
}

/* Ouverture forcée via JS (accessibilité clavier) */
.nav-item--dropdown.nav-item--open .nav-dropdown {
  display: block;
}

/* Petite flèche décorative pointant vers le haut 
.nav-dropdown::before {
  content: "";
  position: absolute;
  top: -6px;
  left: 50%;
  transform: translateX(-50%);
  width: 12px;
  height: 12px;
  background: var(--color-bg);
  border-left: 1px solid var(--color-border);
  border-top: 1px solid var(--color-border);
  rotate: 45deg;
}*/

/* Liens dans le dropdown */
.nav-dropdown a {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  padding: 9px 18px;
  font-size: 13px;
  color: var(--color-text-muted);
  transition: background-color 0.12s ease, color 0.12s ease;
  white-space: nowrap;
}
.nav-dropdown a:hover {
  background: var(--color-green-tint);
  color: var(--color-green-dark);
}

/* Premier lien "Tous les modèles" : légèrement différencié */
.nav-dropdown li:first-child a {
  color: var(--color-green-accent);
  font-weight: 500;
  border-bottom: 1px solid var(--color-border);
  margin-bottom: 4px;
  padding-bottom: 12px;
}
.nav-dropdown li:first-child a:hover {
  color: var(--color-green-dark);
}

/* Séparateur de section "Les modèles" */
.nav-dropdown-separator {
  padding: 4px 18px 6px;
}
.nav-dropdown-separator span {
  font-size: 10px;
  font-weight: 600;
  letter-spacing: 0.07em;
  text-transform: uppercase;
  color: var(--color-text-muted);
}

/* Tag diamètre à droite du nom de modèle */
.nav-dropdown-cap {
  font-size: 11px;
  color: var(--color-text-muted);
  background: var(--color-green-light);
  padding: 2px 7px;
  border-radius: 20px;
  flex-shrink: 0;
}


/* ============================================
   5. SECTION HÉRO
   ============================================ */
.hero {
  display: grid;
  grid-template-columns: 1fr 1fr;
  background: var(--color-green-tint);
  border-bottom: 1px solid var(--color-border);
}

.hero-text {
  padding: 64px var(--container-padding);
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 22px;
  max-width: 560px;
}

.hero-title {
  font-size: 40px;
  color: var(--color-green-darker);
}

.hero-title em {
  font-style: normal;
  color: var(--color-green-accent);
}

.hero-subtitle {
  font-size: 16px;
  color: #41603A;
  max-width: 420px;
}

.hero-actions {
  display: flex;
  gap: 14px;
  flex-wrap: wrap;
  margin-top: 6px;
}

.hero-media {
  background: var(--color-green-dark);
  position: relative;
  min-height: 360px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
}

/* Emplacement de remplacement avant intégration de la vraie photo.
   À SUPPRIMER une fois l'image définitive en place : remplacer ce bloc
   par une simple balise <img src="images/broyeur-sp450.jpg" alt="..."> */
.hero-media-placeholder {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 14px;
  color: rgba(255, 255, 255, 0.5);
}
.hero-media-placeholder i {
  font-size: 64px;
  color: rgba(255, 255, 255, 0.28);
}
.hero-media-placeholder span {
  font-size: 12px;
  letter-spacing: 0.05em;
  text-transform: uppercase;
}

.hero-tag {
  position: absolute;
  bottom: 20px;
  left: 20px;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: rgba(255, 255, 255, 0.14);
  color: #fff;
  padding: 7px 14px;
  border-radius: var(--radius-md);
  font-size: 12px;
}


/* ============================================
   6. CHIFFRES CLÉS
   ============================================ */
.stats {
  max-width: var(--max-width);
  margin: 0 auto;
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  border-bottom: 1px solid var(--color-border);
}

.stat {
  padding: 28px var(--container-padding);
  border-right: 1px solid var(--color-border);
  display: flex;
  flex-direction: column;
  gap: 4px;
}
.stat:last-child {
  border-right: none;
}

.stat-number {
  font-family: var(--font-display);
  font-size: 28px;
  font-weight: 500;
  color: var(--color-green-accent);
}

.stat-label {
  font-size: 13px;
  color: var(--color-text-muted);
}


/* ============================================
   7. SECTIONS GÉNÉRIQUES + PROFILS
   ============================================ */
.section {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 72px var(--container-padding);
}

.section-tinted {
  max-width: none;
  background: var(--color-green-tint);
  border-top: 1px solid var(--color-border);
}
.section-tinted .section-header,
.section-tinted .products-grid {
  max-width: var(--max-width);
  margin-left: auto;
  margin-right: auto;
}

.section-header {
  margin-bottom: 40px;
}

.eyebrow {
  display: block;
  font-size: 12px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--color-green-accent);
  font-weight: 600;
  margin-bottom: 10px;
}

.section-title {
  font-size: 28px;
  color: var(--color-text);
}

.section-subtitle {
  font-size: 15px;
  color: var(--color-text-muted);
  margin-top: 8px;
  max-width: 520px;
}

/* -- Grille des profils -- */
.profiles-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 16px;
}

.profile-card {
  border: 1px solid var(--color-border);
  border-radius: var(--radius-lg);
  padding: 24px;
  display: flex;
  flex-direction: column;
  gap: 12px;
  transition: border-color 0.15s ease, transform 0.15s ease;
}
.profile-card:hover {
  border-color: var(--color-green-accent);
  transform: translateY(-2px);
}

.profile-icon {
  width: 44px;
  height: 44px;
  border-radius: var(--radius-md);
  background: var(--color-green-light);
  color: var(--color-green-dark);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 24px;
}

.profile-title {
  font-size: 16px;
  font-weight: 500;
  color: var(--color-text);
}

.profile-desc {
  font-size: 13px;
  color: var(--color-text-muted);
  line-height: 1.55;
  flex-grow: 1;
}

.profile-link {
  font-size: 13px;
  color: var(--color-green-accent);
  font-weight: 500;
  display: flex;
  align-items: center;
  gap: 5px;
}


/* ============================================
   8. GAMME DE PRODUITS
   ============================================ */
.products-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 20px;
}

.product-card {
  background: var(--color-bg);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-lg);
  overflow: hidden;
  display: flex;
  align-items: center;
  flex-direction: column;
}

.product-media {
  height: 300px;
  width: fit-content;
  background: var(--color-green-light);
  display: flex;
  align-items: center;
  justify-content: center;
}

.product-body {
  padding: 18px;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.product-tags {
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
}

.product-name {
  font-size: 17px;
  font-weight: 500;
  font-family: var(--font-display);
}

.product-desc {
  font-size: 13px;
  color: var(--color-text-muted);
}

.product-link {
  font-size: 13px;
  color: var(--color-green-accent);
  font-weight: 500;
  margin-top: 6px;
  display: flex;
  align-items: center;
  gap: 5px;
}

.product-badge {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  background: var(--color-green-accent);
  color: #fff;
  padding: 3px 10px;
  border-radius: 20px;
  font-size: 11px;
  width: fit-content;
}


/* ============================================
   9. BANDE D'APPEL À L'ACTION
   ============================================ */
.cta-band {
  background: var(--color-green-darker);
  padding: 56px var(--container-padding);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  flex-wrap: wrap;
}

.cta-band-title {
  font-size: 24px;
  color: #fff;
}

.cta-band-subtitle {
  font-size: 14px;
  color: rgba(255, 255, 255, 0.65);
  margin-top: 6px;
}

.cta-band-actions {
  display: flex;
  gap: 14px;
  flex-wrap: wrap;
}


/* ============================================
   10. PIED DE PAGE
   ============================================ */
.site-footer {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 28px var(--container-padding);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
  font-size: 13px;
  color: var(--color-text-muted);
}

.footer-links {
  display: flex;
  gap: 20px;
}

.footer-links a:hover {
  color: var(--color-text);
}


/* ============================================
   11. RESPONSIVE
   ============================================ */

/* ---------- TABLETTE (≤ 1024px) ---------- */
@media (max-width: 1024px) {
  .hero {
    grid-template-columns: 1fr;
  }
  .hero-media {
    min-height: 240px;
    order: -1; /* l'image passe au-dessus du texte sur tablette/mobile */
  }
  .hero-text {
    max-width: none;
    padding: 48px var(--container-padding);
  }

  .stats {
    grid-template-columns: repeat(2, 1fr);
  }
  .stat:nth-child(2) {
    border-right: none;
  }
  .stat:nth-child(1),
  .stat:nth-child(2) {
    border-bottom: 1px solid var(--color-border);
  }

  .profiles-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .products-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

/* ---------- MOBILE ET TABLETTE (≤ 1024px) — Navigation burger ---------- */
@media (max-width: 1024px) {

  .burger {
    display: block;
  }
  .nav-cta-desktop {
    display: none;
  }

  /* Menu principal : panneau plein largeur qui descend sous la navbar */
  .nav-links {
    position: absolute;
    top: 100%;
    right: 5px;
    width: max-content;
    min-width: 220px;
    max-width: min(320px, 90vw);
    background: var(--color-bg);
    border-bottom: 1px solid var(--color-border);
    flex-direction: column;
    align-items: stretch;
    gap: 0;
    padding: 8px 0;
    display: none;
    z-index: 150;
  }
  .nav-links.nav-links--open {
    display: flex;
  }

  /* Entrées de premier niveau */
  .nav-links > li {
    border-bottom: 1px solid var(--color-border);
  }
  .nav-links > li:last-child {
    border-bottom: none;
  }
  .nav-links > li > a,
  .nav-dropdown-toggle {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 12px 20px;
    font-size: 14px;
    color: var(--color-text-muted);
    width: 100%;
  }

  /* Bouton CTA mobile */
  .nav-cta-mobile {
    display: block;
    padding: 14px 20px;
  }
  .nav-cta-mobile .btn {
    width: 100%;
    justify-content: center;
    color: #fff;
  }

  /* Boutique en vert dans le menu mobile */
  .nav-shop > a {
    color: var(--color-green-accent) !important;
  }

  /* -- Sous-menu mobile : liste de second niveau -- */

  /* On neutralise le comportement dropdown desktop */
  .nav-dropdown {
    display: none;
    position: static;
    transform: none;
    box-shadow: none;
    border: none;
    border-radius: 0;
    min-width: unset;
    padding: 0;
    background: var(--color-green-tint);
    /* Pas de petite flèche décorative en mobile */
  }
  .nav-dropdown::before {
    display: none;
  }

  /* Affiché quand l'entrée parente est ouverte (via JS) */
  .nav-item--dropdown.nav-item--open .nav-dropdown {
    display: block;
  }

  /* Le survol ne doit pas ouvrir en mobile/tablette */
  .nav-item--dropdown:hover .nav-dropdown {
    display: none;
  }
  .nav-item--dropdown.nav-item--open .nav-dropdown {
    display: block;
  }

  /* Liens du sous-menu */
  .nav-dropdown a {
    padding: 10px 20px 10px 36px; /* indentation pour le second niveau */
    font-size: 13px;
    border-bottom: none;
    color: var(--color-text-muted);
  }
  .nav-dropdown a:hover {
    background: var(--color-green-light);
  }

  /* "Tous les modèles" dans le sous-menu mobile */
  .nav-dropdown li:first-child a {
    border-bottom: 1px solid var(--color-border);
    padding-bottom: 10px;
    margin-bottom: 0;
  }

  /* Séparateur de section dans le sous-menu mobile */
  .nav-dropdown-separator {
    padding: 8px 20px 4px 36px;
  }

  /* Chevron pointe vers le bas par défaut, vers le haut quand ouvert */
  .nav-item--dropdown .nav-chevron {
    transition: transform 0.2s ease;
  }
  .nav-item--dropdown.nav-item--open .nav-chevron {
    transform: rotate(180deg);
  }
}

/* ---------- MOBILE (≤ 640px) — ajustements supplémentaires ---------- */
@media (max-width: 640px) {

  :root {
    --container-padding: 20px;
  }

  /* -- Héro -- */
  .hero-title {
    font-size: 28px;
  }
  .hero-actions {
    flex-direction: column;
    align-items: stretch;
  }
  .hero-actions .btn {
    justify-content: center;
  }

  /* -- Chiffres clés : 2 colonnes conservées, padding réduit -- */
  .stat {
    padding: 20px 16px;
  }
  .stat-number {
    font-size: 22px;
  }

  /* -- Sections -- */
  .section,
  .section-tinted .section-header,
  .section-tinted .products-grid {
    padding-left: var(--container-padding);
    padding-right: var(--container-padding);
  }
  .section-title {
    font-size: 22px;
  }

  .profiles-grid {
    grid-template-columns: 1fr;
  }

  .products-grid {
    grid-template-columns: 1fr;
  }

  /* -- Bandeau CTA -- */
  .cta-band {
    flex-direction: column;
    align-items: flex-start;
  }
  .cta-band-actions {
    width: 100%;
    flex-direction: column;
  }
  .cta-band-actions .btn {
    justify-content: center;
  }

  /* -- Pied de page -- */
  .site-footer {
    flex-direction: column;
    align-items: flex-start;
  }
}