/* =========================================================
   TOP PASSAGES — Feuille de styles
   Mobile-first · variables CSS · vert dominant + accent rouge
   ========================================================= */

:root {
  /* Verts */
  --green-900: #0F2E1F;   /* fond hero très sombre */
  --green-800: #0F5132;   /* vert principal */
  --green-600: #1B7A4B;   /* vert secondaire */
  --green-500: #22A45D;   /* vert accent CTA lumineux */
  --green-50:  #EAF5EE;   /* vert très clair */

  /* Accent marque */
  --red: #D7263D;

  /* Neutres */
  --ink: #142019;         /* texte principal */
  --ink-soft: #4a5a52;    /* texte secondaire */
  --paper: #FFFFFF;
  --paper-off: #F6F8F6;   /* blanc cassé */
  --line: #e3eae5;

  /* Système */
  --radius: 16px;
  --radius-sm: 10px;
  --shadow-sm: 0 2px 10px rgba(15,46,31,.06);
  --shadow: 0 12px 34px rgba(15,46,31,.12);
  --shadow-lg: 0 24px 60px rgba(15,46,31,.18);
  --container: 1180px;
  --header-h: 74px;
  --ease: cubic-bezier(.22,.61,.36,1);

  --font-body: 'Manrope', system-ui, -apple-system, Arial, sans-serif;
  --font-head: 'Space Grotesk', var(--font-body);
}

/* ---------- Reset léger ---------- */
*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  font-family: var(--font-body);
  color: var(--ink);
  background: var(--paper);
  line-height: 1.6;
  font-size: 17px;
  overflow-x: hidden;
}
img, svg { display: block; max-width: 100%; }
a { color: inherit; text-decoration: none; }
ul { list-style: none; margin: 0; padding: 0; }
h1, h2, h3, h4 { font-family: var(--font-head); line-height: 1.15; margin: 0 0 .4em; font-weight: 700; }

.container { width: 100%; max-width: var(--container); margin-inline: auto; padding-inline: 22px; }

.accent { color: var(--red); }

/* ---------- Boutons ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: .4em;
  font-family: var(--font-head); font-weight: 600; font-size: .98rem;
  padding: .72em 1.4em; border-radius: 999px; cursor: pointer;
  border: 1.5px solid transparent; transition: transform .25s var(--ease), box-shadow .25s var(--ease), background .25s, color .25s;
  white-space: nowrap;
}
.btn-primary { background: var(--green-500); color: #fff; box-shadow: 0 8px 22px rgba(34,164,93,.35); }
.btn-primary:hover { background: var(--green-600); transform: translateY(-2px); box-shadow: 0 12px 28px rgba(34,164,93,.45); }
.btn-outline { background: transparent; border-color: currentColor; color: var(--green-800); }
.btn-outline:hover { background: var(--green-800); color: #fff; }
.btn-lg { padding: .9em 1.8em; font-size: 1.05rem; }
.btn-block { width: 100%; }
.btn-link { color: #fff; font-weight: 600; font-family: var(--font-head); padding: .72em .2em; }
.btn-link:hover { color: var(--green-500); }

/* ---------- Header ---------- */
.site-header {
  position: fixed; inset: 0 0 auto 0; z-index: 100;
  height: var(--header-h);
  display: flex; align-items: center;
  transition: background .3s var(--ease), box-shadow .3s var(--ease), height .3s var(--ease);
}
.header-inner { display: flex; align-items: center; justify-content: space-between; gap: 18px; }
/* Logo : emblème PNG (fond blanc) présenté en pastille arrondie -> propre sur fond sombre comme clair */
.brand { display: inline-flex; align-items: center; gap: 12px; }
.brand img { height: 48px; width: 48px; border-radius: 12px; object-fit: contain; background: #fff; box-shadow: var(--shadow-sm); }
.brand-name { font-family: var(--font-head); font-weight: 700; font-size: 1.12rem; letter-spacing: .02em; color: #fff; white-space: nowrap; }
.site-header.scrolled .brand-name { color: var(--green-800); }
.site-header.scrolled .brand img { box-shadow: none; }
/* Variante claire par défaut sur le hero sombre : logo lisible */
.site-header.scrolled { background: rgba(255,255,255,.92); backdrop-filter: blur(10px); box-shadow: var(--shadow-sm); height: 64px; }

.main-nav ul { display: flex; gap: 26px; }
.main-nav a { font-family: var(--font-head); font-weight: 500; color: #fff; font-size: .96rem; position: relative; }
.main-nav a::after { content: ""; position: absolute; left: 0; bottom: -5px; width: 0; height: 2px; background: var(--green-500); transition: width .25s var(--ease); }
.main-nav a:hover::after { width: 100%; }
.site-header.scrolled .main-nav a,
.site-header.scrolled .btn-outline { color: var(--green-800); }

.header-actions { display: flex; align-items: center; gap: 12px; }
.site-header:not(.scrolled) .btn-outline { color: #fff; }
.site-header:not(.scrolled) .btn-outline:hover { background: #fff; color: var(--green-800); }

/* Burger */
.nav-toggle { display: none; flex-direction: column; gap: 5px; background: none; border: 0; cursor: pointer; padding: 6px; }
.nav-toggle span { width: 26px; height: 2.5px; background: #fff; border-radius: 2px; transition: .3s var(--ease); }
.site-header.scrolled .nav-toggle span { background: var(--green-800); }
.nav-toggle[aria-expanded="true"] span:nth-child(1) { transform: translateY(7.5px) rotate(45deg); }
.nav-toggle[aria-expanded="true"] span:nth-child(2) { opacity: 0; }
.nav-toggle[aria-expanded="true"] span:nth-child(3) { transform: translateY(-7.5px) rotate(-45deg); }

.tp-mobile-menu { position: fixed; top: var(--header-h); left: 0; right: 0; background: #fff; box-shadow: var(--shadow); padding: 14px 22px 22px; z-index: 99; }
.tp-mobile-menu ul { display: flex; flex-direction: column; gap: 4px; }
.tp-mobile-menu a { display: block; padding: 14px 6px; font-family: var(--font-head); font-weight: 600; color: var(--green-800); border-bottom: 1px solid var(--line); }
.tp-mobile-menu .mobile-login { color: var(--green-500); }

/* ---------- Hero ---------- */
.hero {
  position: relative; min-height: 100svh; display: flex; align-items: center;
  /* Fallback dégradé si la 3D ne charge pas */
  background: radial-gradient(120% 120% at 70% 10%, #1B7A4B 0%, var(--green-900) 55%, #0a2016 100%);
  color: #fff; overflow: hidden; padding-top: var(--header-h);
}
.hero-canvas { position: absolute; inset: 0; z-index: 1; }
.hero-canvas canvas { display: block; width: 100% !important; height: 100% !important; }
.hero-overlay { position: absolute; inset: 0; z-index: 2; background: linear-gradient(90deg, rgba(10,32,22,.85) 0%, rgba(10,32,22,.45) 55%, rgba(10,32,22,.15) 100%); pointer-events: none; }
.hero-content { position: relative; z-index: 3; max-width: 720px; padding-block: 40px; }
.hero-eyebrow { font-family: var(--font-head); text-transform: uppercase; letter-spacing: .14em; font-size: .8rem; color: var(--green-500); margin: 0 0 14px; font-weight: 600; }
.hero-title { font-size: clamp(2.2rem, 6vw, 4rem); margin-bottom: 18px; }
.hero-subtitle { font-size: clamp(1.05rem, 2.4vw, 1.3rem); color: rgba(255,255,255,.88); max-width: 580px; margin: 0 0 32px; }
.hero-cta { display: flex; align-items: center; gap: 18px; flex-wrap: wrap; }

.scroll-hint { position: absolute; bottom: 26px; left: 50%; transform: translateX(-50%); z-index: 3; width: 26px; height: 42px; border: 2px solid rgba(255,255,255,.5); border-radius: 14px; display: flex; justify-content: center; }
.scroll-hint span { width: 4px; height: 8px; background: #fff; border-radius: 2px; margin-top: 7px; animation: scrolldot 1.6s var(--ease) infinite; }
@keyframes scrolldot { 0% { opacity: 0; transform: translateY(0); } 40% { opacity: 1; } 80% { opacity: 0; transform: translateY(12px); } 100% { opacity: 0; } }

/* ---------- Sections génériques ---------- */
.section { padding: clamp(64px, 9vw, 110px) 0; }
.section-alt { background: var(--paper-off); }
.section-head { max-width: 720px; margin: 0 auto 54px; text-align: center; }
.section-eyebrow { font-family: var(--font-head); text-transform: uppercase; letter-spacing: .14em; font-size: .8rem; color: var(--green-600); font-weight: 600; margin: 0 0 12px; }
.section-eyebrow.light { color: var(--green-500); }
.section-title { font-size: clamp(1.7rem, 4vw, 2.6rem); color: var(--green-800); }
.section-title.light { color: #fff; }
.section-lead { color: var(--ink-soft); font-size: 1.1rem; margin-top: 8px; }
.section-lead.light { color: rgba(255,255,255,.85); }

/* ---------- Réassurance ---------- */
.reassurance { background: var(--green-50); padding: 46px 0; }
.reassurance-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 26px; text-align: center; }
.stat { display: flex; flex-direction: column; gap: 4px; }
.stat-value { font-family: var(--font-head); font-weight: 700; font-size: clamp(1.5rem, 4vw, 2.1rem); color: var(--green-800); }
.stat-label { color: var(--ink-soft); font-size: .95rem; }

/* ---------- Services / cartes ---------- */
.cards-grid { display: grid; grid-template-columns: 1fr; gap: 24px; }
.card {
  background: var(--paper); border: 1px solid var(--line); border-radius: var(--radius);
  padding: 30px 26px; box-shadow: var(--shadow-sm);
  transition: transform .3s var(--ease), box-shadow .3s var(--ease), border-color .3s;
  transform-style: preserve-3d; will-change: transform;
}
.card:hover { box-shadow: var(--shadow-lg); border-color: var(--green-500); transform: translateY(-6px); }
.card-icon { width: 54px; height: 54px; border-radius: 14px; background: var(--green-50); color: var(--green-600); display: grid; place-items: center; margin-bottom: 18px; }
.card-icon svg { width: 28px; height: 28px; }
.card h3 { font-size: 1.22rem; color: var(--green-800); }
.card p { color: var(--ink-soft); font-size: .98rem; margin: 0 0 16px; }
.card-cta { font-family: var(--font-head); font-weight: 600; color: var(--green-600); font-size: .95rem; transition: gap .2s; }
.card-cta:hover { color: var(--green-500); }

/* ---------- Timeline méthode ---------- */
.timeline { max-width: 760px; margin: 0 auto; position: relative; }
/* Ligne grise (rail) + ligne verte (remplissage), centrées sur les cercles (30px) */
.timeline::before, .timeline::after {
  content: ""; position: absolute; left: 24px; width: 2px; transform: translateX(-1px);
  top: var(--track-top, 0px); border-radius: 2px;
}
.timeline::before { height: var(--track-h, calc(100% - 60px)); background: var(--line); }
.timeline::after  { height: var(--track-fill, 0px); background: var(--green-500); box-shadow: 0 0 10px rgba(34,164,93,.5); transition: height .3s linear; }
.timeline-step { position: relative; display: flex; gap: 26px; padding: 18px 0 34px; }
.step-num {
  flex: 0 0 60px; width: 60px; height: 60px; border-radius: 50%;
  background: var(--green-800); color: #fff;
  font-family: var(--font-head); font-weight: 700; font-size: 1.2rem;
  display: grid; place-items: center; z-index: 1; box-shadow: 0 6px 16px rgba(15,81,50,.3);
  transition: background .35s var(--ease), color .35s, border-color .35s, box-shadow .35s, transform .35s var(--ease);
}
/* Quand l'animation JS est active, les cercles démarrent "en attente" puis s'allument */
.timeline.is-animated .step-num { background: var(--green-50); color: var(--green-600); border: 2px solid var(--line); box-shadow: none; }
.timeline.is-animated .timeline-step.is-active .step-num { background: var(--green-800); color: #fff; border-color: var(--green-800); box-shadow: 0 6px 16px rgba(15,81,50,.3); transform: scale(1.06); }
.step-body h3 { font-size: 1.25rem; color: var(--green-800); }
.step-body p { color: var(--ink-soft); margin: 0; }

/* ---------- Pourquoi ---------- */
.pourquoi-grid { display: grid; grid-template-columns: 1fr; gap: 44px; align-items: center; }
.benefits { display: grid; gap: 14px; margin: 24px 0 30px; }
.benefits li { position: relative; padding-left: 30px; color: var(--ink-soft); }
.benefits li::before { content: "✓"; position: absolute; left: 0; top: 0; color: var(--green-500); font-weight: 700; }
.benefits strong { color: var(--ink); }
.pourquoi-visual { position: relative; min-height: 240px; }
.visual-card { background: #fff; border: 1px solid var(--line); border-radius: var(--radius-sm); padding: 16px 18px; box-shadow: var(--shadow); font-family: var(--font-head); font-weight: 500; font-size: .95rem; display: flex; align-items: center; gap: 10px; margin-bottom: 14px; }
.vc-dot { width: 10px; height: 10px; border-radius: 50%; background: var(--green-500); box-shadow: 0 0 0 4px rgba(34,164,93,.2); }
.vc-2 { margin-left: 24px; }
.vc-3 { margin-left: 12px; }

/* ---------- Contact ---------- */
.contact { background: radial-gradient(120% 120% at 80% 0%, #1B7A4B 0%, var(--green-900) 60%); color: #fff; }
.contact-inner { max-width: 760px; margin: 0 auto; }
.contact-form { display: grid; grid-template-columns: 1fr 1fr; gap: 18px; background: rgba(255,255,255,.06); border: 1px solid rgba(255,255,255,.14); border-radius: var(--radius); padding: 30px; backdrop-filter: blur(6px); }
.field { display: flex; flex-direction: column; gap: 7px; }
.field-full { grid-column: 1 / -1; }
.contact-form label { font-family: var(--font-head); font-weight: 500; font-size: .9rem; color: rgba(255,255,255,.9); }
.contact-form input, .contact-form textarea {
  font-family: var(--font-body); font-size: 1rem; color: #fff;
  background: rgba(255,255,255,.08); border: 1.5px solid rgba(255,255,255,.2);
  border-radius: var(--radius-sm); padding: 12px 14px; transition: border-color .2s, background .2s;
}
.contact-form input:focus, .contact-form textarea:focus { outline: none; border-color: var(--green-500); background: rgba(255,255,255,.14); }
.contact-form textarea { resize: vertical; }
.form-note { margin: 12px 0 0; font-size: .92rem; min-height: 1.2em; }
.form-note.ok { color: #8df0b6; }
.form-note.err { color: #ffb3bd; }

/* Bouton du formulaire Forminator dans la section Contact -> pilule verte (comme .btn-primary) */
.contact .forminator-button,
.contact button[type="submit"],
.contact .forminator-button-submit {
  background: var(--green-500) !important;
  color: #fff !important;
  border: 0 !important;
  border-radius: 999px !important;
  font-family: var(--font-head) !important;
  font-weight: 600 !important;
  font-size: 1.05rem !important;
  padding: .9em 1.9em !important;
  box-shadow: 0 8px 22px rgba(34,164,93,.35) !important;
  transition: transform .25s var(--ease), background .25s, box-shadow .25s !important;
  cursor: pointer;
}
.contact .forminator-button:hover,
.contact button[type="submit"]:hover,
.contact .forminator-button-submit:hover {
  background: var(--green-600) !important;
  transform: translateY(-2px);
  box-shadow: 0 12px 28px rgba(34,164,93,.45) !important;
}

/* ---------- Footer ---------- */
.site-footer { background: var(--green-900); color: rgba(255,255,255,.8); padding: 56px 0 24px; }
.footer-grid { display: grid; grid-template-columns: 1fr; gap: 34px; padding-bottom: 34px; border-bottom: 1px solid rgba(255,255,255,.12); }
.footer-logo { height: 56px; width: 56px; border-radius: 12px; object-fit: contain; background: #fff; margin-bottom: 14px; }
.footer-brand p { max-width: 320px; font-size: .96rem; }
.footer-col h4 { font-size: 1rem; color: #fff; margin-bottom: 14px; }
.footer-col ul { display: grid; gap: 10px; }
.footer-col a { font-size: .96rem; transition: color .2s; }
.footer-col a:hover { color: var(--green-500); }
.footer-bottom { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 10px; padding-top: 20px; font-size: .88rem; color: rgba(255,255,255,.6); }
.footer-bottom a:hover { color: #fff; }

/* ---------- Animations au scroll ---------- */
.reveal { opacity: 0; transform: translateY(24px); transition: opacity .6s var(--ease), transform .6s var(--ease); }
.reveal.is-visible { opacity: 1; transform: none; }

/* Délais en cascade pour les grilles */
.cards-grid .card:nth-child(2) { transition-delay: .06s; }
.cards-grid .card:nth-child(3) { transition-delay: .12s; }
.cards-grid .card:nth-child(4) { transition-delay: .18s; }
.cards-grid .card:nth-child(5) { transition-delay: .24s; }
.cards-grid .card:nth-child(6) { transition-delay: .30s; }

/* =========================================================
   PAGES INTÉRIEURES (modèle « Page TOP PASSAGES (layout) »)
   Header clair dès le haut + mise en forme du contenu éditeur / Forminator
   ========================================================= */
body.topp-inner { padding-top: var(--header-h); }
body.topp-inner .site-header { background: rgba(255,255,255,.95); backdrop-filter: blur(10px); box-shadow: var(--shadow-sm); }
body.topp-inner .main-nav a,
body.topp-inner .brand-name,
body.topp-inner .btn-outline { color: var(--green-800); }
body.topp-inner .main-nav a::after { background: var(--green-500); }
body.topp-inner .btn-outline:hover { background: var(--green-800); color: #fff; }
body.topp-inner .nav-toggle span { background: var(--green-800); }
body.topp-inner .brand img { box-shadow: none; }

.topp-page .topp-content { max-width: 820px; }
.topp-content > h1.section-title { margin-bottom: 26px; }
.topp-content h2 { font-size: clamp(1.5rem, 3.4vw, 2.1rem); color: var(--green-800); margin: 1.6em 0 .5em; }
.topp-content h3 { font-size: 1.3rem; color: var(--green-800); margin: 1.3em 0 .4em; }
.topp-content p { color: var(--ink-soft); margin: 0 0 1.1em; }
.topp-content a:not(.btn) { color: var(--green-600); text-decoration: underline; }
.topp-content ul, .topp-content ol { margin: 0 0 1.1em 1.2em; color: var(--ink-soft); }
.topp-content li { margin-bottom: .4em; }
.topp-content img { border-radius: var(--radius-sm); }
/* Espace autour des formulaires Forminator pour rester aéré */
.topp-content .forminator-ui { margin-top: 24px; }

/* =========================================================
   RESPONSIVE
   ========================================================= */
@media (min-width: 600px) {
  .reassurance-grid { grid-template-columns: repeat(4, 1fr); }
}
@media (min-width: 768px) {
  .cards-grid { grid-template-columns: repeat(2, 1fr); }
}
@media (min-width: 992px) {
  .cards-grid { grid-template-columns: repeat(3, 1fr); }
  .pourquoi-grid { grid-template-columns: 1.05fr .95fr; gap: 60px; }
  .footer-grid { grid-template-columns: 1.8fr 1fr; }
}

/* Header desktop vs mobile */
@media (max-width: 900px) {
  .main-nav { display: none; }
  .header-actions .btn-outline { display: none; }
  .nav-toggle { display: flex; }
}
@media (min-width: 901px) {
  .tp-mobile-menu { display: none !important; }
}
@media (max-width: 560px) {
  .contact-form { grid-template-columns: 1fr; padding: 22px; }
  .hero-cta { gap: 12px; }
}

/* =========================================================
   ACCESSIBILITÉ — prefers-reduced-motion
   ========================================================= */
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation-duration: .001ms !important; animation-iteration-count: 1 !important; transition-duration: .001ms !important; }
  .reveal { opacity: 1; transform: none; }
  .scroll-hint { display: none; }
}
