/* =========================================================================
   home.css — page d'accueil TEGEA

   Le hero « animation du G » vit ici en entier : le logo, sa dissolution en
   lumière, puis la citation d'Erik. Ces règles venaient de static/dist/home.css
   (produit par Vite) ; le hero étant réécrit en JavaScript natif
   (static/js/home-hero.js), il n'y a plus d'étape de compilation.

   Trois états, posés par le script sur .gh-hero :
     .is-immersif  grand écran, choré pilotée par le scroll (300vh + sticky)
     .is-telephone téléphone, choré jouée automatiquement une fois
     .is-static    animation réduite / sans JavaScript : logo + citation, figés
   ========================================================================= */

/* ---- La scène ------------------------------------------------------------ */
.gh-hero{
  position:relative;
  background:
    radial-gradient(72% 54% at 50% 6%, rgba(232,132,42,.06) 0%, transparent 62%),
    radial-gradient(90% 70% at 50% 108%, rgba(35,72,97,.05) 0%, transparent 55%),
    #f7f4ee;
}
/* Le logo et la citation occupent la même cellule : l'un s'efface là où
   l'autre apparaît, sans que la page bouge d'un pixel. */
.gh-sticky{
  position:relative;display:grid;place-items:center;
  padding:clamp(84px,12vh,140px) clamp(20px,5vw,48px) clamp(56px,10vh,120px);
}
.gh-sticky > *{grid-area:1 / 1}

/* Voile de lumière : une bulle blanche qui s'ouvre et efface le fond crème. */
.gh-veil{
  position:absolute;inset:-10%;z-index:0;opacity:0;pointer-events:none;
  background:radial-gradient(closest-side at 50% 46%,
    #fff 0%, #fff 58%, rgba(255,255,255,.72) 78%, rgba(255,255,255,0) 100%);
  will-change:opacity,transform;
}

/* ---- Le logo ------------------------------------------------------------- */
.gh-svg{
  position:relative;z-index:1;
  width:min(880px,90vw);height:auto;max-width:none;
  aspect-ratio:1060 / 310;overflow:visible;pointer-events:none;
}
.gh-flat,.gh-spin{transform-box:view-box;transform-origin:600px 320px}
.gh-letters{transform-box:view-box;transform-origin:600px 320px}
.gh-stroke{
  fill:none;stroke:var(--navy,#234861);stroke-width:7.8;
  stroke-linecap:round;stroke-linejoin:round;vector-effect:non-scaling-stroke;
}
/* Le G — signature de la marque — en orange TEGEA. Épaisseur pilotable via
   --gw : le script l'affine à mesure que le G se dissout. */
.gh-stroke--g{stroke:var(--orange,#e8842a);stroke-width:var(--gw,7.8)}

/* Le logo se dessine à l'arrivée sur la page : chaque trait se tire depuis son
   origine. C'est la seule animation du hero qui ne dépend pas du scroll —
   elle donne le ton dès la première seconde. */
.gh-hero.is-immersif .gh-stroke,
.gh-hero.is-telephone .gh-stroke,
.gh-hero.is-auto .gh-stroke{
  stroke-dasharray:var(--len,260);stroke-dashoffset:var(--len,260);
  animation:gh-trace .9s var(--t,cubic-bezier(.22,.61,.36,1)) forwards;
}
.gh-hero .gh-letters .gh-stroke:nth-child(2){animation-delay:.05s}
.gh-hero .gh-letters .gh-stroke:nth-child(3){animation-delay:.10s}
.gh-hero .gh-letters .gh-stroke:nth-child(4){animation-delay:.15s}
.gh-hero .gh-letters .gh-stroke:nth-child(5){animation-delay:.20s}
.gh-hero .gh-letters .gh-stroke:nth-child(6){animation-delay:.25s}
.gh-hero .gh-letters .gh-stroke:nth-child(7){animation-delay:.30s}
.gh-hero .gh-stroke--g{--len:820px;animation-duration:1.25s;animation-delay:.12s}
@keyframes gh-trace{to{stroke-dashoffset:0}}

/* ---- La citation --------------------------------------------------------- */
.gh-quote{
  position:relative;z-index:2;margin:0;
  display:flex;flex-direction:column;align-items:center;gap:clamp(22px,3.4vh,38px);
  text-align:center;opacity:0;
}
/* Assez large pour que chaque ligne de la citation tienne sur une ligne
   d'écran en grand format ; sur téléphone elle se replie naturellement, le
   masque fonctionne de la même façon. */
.gh-quote blockquote{margin:0;max-width:min(940px,90vw)}
.gh-q-line{
  display:block;overflow:hidden;
  /* Un peu d'air sous la ligne : sans cela le masque rogne les jambages. */
  padding-bottom:.08em;margin-bottom:-.08em;
}
.gh-q-line i{
  display:block;font-style:normal;
  font-family:var(--font-display,'Playfair Display',Georgia,serif);
  font-weight:600;font-size:clamp(1.32rem,3.3vw,2.55rem);line-height:1.26;
  letter-spacing:-.012em;color:var(--navy,#234861);
  text-wrap:balance;will-change:transform;
}
.gh-quote figcaption{
  display:flex;flex-direction:column;align-items:center;gap:8px;
}
.gh-q-rule{
  display:block;width:min(120px,26vw);height:2px;border-radius:2px;
  background:linear-gradient(90deg,transparent,var(--orange,#e8842a),transparent);
  transform:scaleX(0);transform-origin:center;
}
.gh-q-name{
  font:750 .96rem/1.2 var(--font,'Inter',sans-serif);
  letter-spacing:.02em;color:var(--navy,#234861);opacity:0;
}
.gh-q-role{
  font:500 .82rem/1.2 var(--font,'Inter',sans-serif);
  letter-spacing:.14em;text-transform:uppercase;color:var(--muted,#66757f);opacity:0;
}

/* ---- Repère de défilement ------------------------------------------------ */
.gh-cue{
  position:absolute;left:50%;bottom:clamp(20px,4vh,44px);transform:translateX(-50%);
  z-index:3;display:flex;flex-direction:column;align-items:center;gap:12px;
  pointer-events:none;grid-area:auto;
  font:600 .7rem/1 var(--font,'Inter',sans-serif);letter-spacing:.3em;
  text-transform:uppercase;color:var(--muted,#66757f);
}
.gh-cue-chev{
  width:14px;height:14px;
  border-right:2px solid var(--orange,#e8842a);border-bottom:2px solid var(--orange,#e8842a);
  transform:rotate(45deg);animation:gh-bob 1.7s ease-in-out infinite;
}
@keyframes gh-bob{
  0%,100%{transform:rotate(45deg) translate(0,0);opacity:.45}
  50%{transform:rotate(45deg) translate(4px,4px);opacity:1}
}

/* ---- Mode immersif (grand écran) ---------------------------------------- */
/* 300vh de course : assez pour que la choré se lise sans que l'on ait
   l'impression de scroller dans le vide. */
.gh-hero.is-immersif{height:300vh}
.gh-hero.is-immersif .gh-sticky{
  position:sticky;top:0;height:100vh;height:100svh;overflow:hidden;
}

/* ---- Téléphone & statique : un seul écran, pas de course de scroll ------- */
.gh-hero.is-telephone,.gh-hero.is-auto,.gh-hero.is-static{height:auto}
.gh-hero.is-telephone .gh-sticky,
.gh-hero.is-auto .gh-sticky,
.gh-hero.is-static .gh-sticky{min-height:86svh}
.gh-hero.is-telephone .gh-cue,
.gh-hero.is-auto .gh-cue,
.gh-hero.is-static .gh-cue{display:none}

/* Sans JavaScript : le logo et la citation cohabitent, l'un sous l'autre. */
.gh-hero.is-static .gh-sticky{grid-auto-flow:row;gap:clamp(26px,6vh,54px)}
.gh-hero.is-static .gh-sticky > *{grid-area:auto}
.gh-hero.is-static .gh-quote{opacity:1}
.gh-hero.is-static .gh-veil{display:none}
.gh-hero.is-static .gh-svg{width:min(560px,84vw)}

/* Une fois la lumière montée, le fond est franchement blanc : l'en-tête qui
   redescend doit s'y accorder. */
.gh-hero.is-clair{background:#fff}

/* ---- Lisibilité sur téléphone -------------------------------------------
   Le trait du logo est en `vector-effect:non-scaling-stroke` : il garde son
   épaisseur À L'ÉCRAN quelle que soit la taille du logo. Dessiné pour un logo
   de 880 px, il se retrouvait à 7,8 px sur un logo de 338 px — soit 2,6 fois
   trop épais en proportion. D'où un logo lourd, serré, qui touchait les bords.
   On rétablit la proportion du grand écran (~0,9 % de la largeur du logo) et
   on redonne de la marge latérale.

   Le G garde son animation d'amincissement : le script écrit --gw de 7,8 vers
   1, on applique simplement le même facteur d'échelle. */
@media (max-width:900px){
  .gh-svg{width:min(880px,84vw)}
  .gh-hero.is-telephone .gh-stroke,
  .gh-hero.is-static .gh-stroke{stroke-width:3.2}
  .gh-hero.is-telephone .gh-stroke--g,
  .gh-hero.is-static .gh-stroke--g{stroke-width:calc(var(--gw,7.8) * .41)}

  /* La citation est la charge utile de l'écran : un cran plus grande, et des
     lignes plus aérées pour se lire d'un coup d'œil. */
  .gh-q-line i{font-size:clamp(1.42rem,5.6vw,2.1rem);line-height:1.34}
  .gh-quote{gap:clamp(18px,2.8vh,30px)}
  .gh-quote blockquote{max-width:94vw}
}

@media (prefers-reduced-motion:reduce){
  .gh-cue-chev{animation:none}
  .gh-hero .gh-stroke{animation:none;stroke-dasharray:none;stroke-dashoffset:0}
}

/* =========================================================================
   Sections de la page d'accueil
   ========================================================================= */

/* ---- Les trois leviers (Besoin → Cadence → Ce qui reste) ---------------- */
.need-card{display:flex;flex-direction:column;height:100%}
.need-card h3{margin:.35em 0 .1em;font-size:1.35rem}
.need-line{font-weight:600;color:var(--navy);margin:.45em 0 0}
.need-cadence{
  display:flex;flex-direction:column;gap:3px;margin:16px 0;
  padding:13px 0;border-top:1px solid var(--line);border-bottom:1px solid var(--line);
  color:var(--muted);font-size:.9rem;font-variant-numeric:tabular-nums;
}
.need-result-label{
  font-size:.72rem;letter-spacing:.09em;text-transform:uppercase;
  color:var(--orange-600);font-weight:800;margin-bottom:8px;
}
.need-card .checklist{margin:0;font-size:.95rem}
.need-cta{margin-top:auto;padding-top:20px;display:flex;flex-direction:column;gap:10px}
.need-cta .btn{text-align:center;justify-content:center}
/* Le second bouton porte un texte plus long (RETEX du 03/09/2026, calqué sur la V2
   d'Erik : « On en parle ? 30 min en visio, sans engagement ») que la carte, à largeur
   fixe, ne peut pas tenir sur une ligne avec `white-space:nowrap` — il se retrouvait
   tronqué (le `.btn{overflow:hidden}` global, prévu pour le reflet au survol, coupait
   net ce qui dépassait). Autorisé à passer sur deux lignes, seulement ici. */
.need-cta .btn-outline{white-space:normal;height:auto;line-height:1.3;padding-top:.75em;padding-bottom:.75em}

/* ---- Piliers (repris de la V1, encore utilisés par d'autres pages) ------- */
.pillars{gap:26px}
.pillar{
  position:relative;background:var(--paper);border:1.5px solid var(--line);
  border-left:4px solid var(--orange);border-radius:var(--radius);padding:34px 36px;
  display:flex;flex-direction:column;align-items:flex-start;
  transition:transform .32s var(--t),box-shadow .32s var(--t);
}
.pillar:hover{transform:translateY(-5px);box-shadow:var(--shadow)}
.pillar-char{width:96px;height:96px;object-fit:contain;margin-bottom:18px;
  filter:drop-shadow(0 12px 16px rgba(27,58,77,.16))}
.pillar h3{margin-bottom:.45em}
.pillar p{font-size:.97rem;color:var(--navy-700);margin-bottom:1.1rem}
.pillar .link-arrow{margin-top:auto}

/* « Paroles de dirigeants » (RETEX Raph, 02/09/2026) : échos anonymes qui
   apparaissent l'un après l'autre, à des positions dispersées, sous le carrousel.
   `.in` est posé par le mécanisme reveal-on-scroll déjà partagé par tout le site
   (main.js) — rien à ajouter côté script. */
.paroles-echoes{position:relative;min-height:300px;margin-top:30px}
.paroles-echoes span{position:absolute;max-width:300px;font-style:italic;font-weight:500;
                     line-height:1.45;color:var(--navy);opacity:0;transform:translateY(10px)}
.paroles-echoes.in span{animation:echoLoop 12s ease-in-out infinite;animation-delay:var(--d)}
@keyframes echoLoop{
  0%{opacity:0;transform:translateY(10px)}
  8%{opacity:.5;transform:none}
  40%{opacity:.5;transform:none}
  50%{opacity:0;transform:translateY(-6px)}
  100%{opacity:0;transform:translateY(10px)}
}
.paroles-echoes span:nth-child(1){top:0;left:2%}
.paroles-echoes span:nth-child(2){top:11%;right:3%;text-align:right}
.paroles-echoes span:nth-child(3){top:44%;left:33%}
.paroles-echoes span:nth-child(4){bottom:13%;left:4%}
.paroles-echoes span:nth-child(5){bottom:0;right:4%;text-align:right;max-width:260px}
@media (max-width:820px){
  .paroles-echoes{min-height:0;margin-top:22px}
  .paroles-echoes span,.paroles-echoes.in span{position:static;max-width:none;display:block;
    margin:12px auto;text-align:center;opacity:.5;transform:none;animation:none}
}
