/* EXXING — page d'accueil « immersive » (index.html uniquement).
   Complète site.css sans le modifier : mêmes variables :root (bleu nuit, vert), mêmes polices
   auto-hébergées, aucun thème sombre ajouté. Animations désactivées si prefers-reduced-motion.
   Contrastes : texte blanc sur --ink 12,4:1 ; --on-ink-2 8,5:1 ; --accent-2 sur --paper 5,0:1. */

/* ---------- Hero plein écran ---------- */
.home .hero-x {
  min-height: calc(100svh - 80px);
  display: flex; flex-direction: column; justify-content: center;
  padding: 72px 0 40px;
  background:
    radial-gradient(120% 90% at 85% 10%, var(--ink-2) 0%, transparent 60%),
    linear-gradient(160deg, var(--ink) 0%, var(--ink-deep) 100%);
  isolation: isolate;
}
.home .hero-x::after { display: none; }
.hero-canvas {
  position: absolute; inset: 0; width: 100%; height: 100%;
  z-index: 0; pointer-events: none; display: block;
}
/* Voile : garantit le contraste du texte au-dessus de l'animation, côté gauche. */
.hero-veil {
  position: absolute; inset: 0; z-index: 0; pointer-events: none;
  background: linear-gradient(90deg, var(--ink-deep) 0%, rgba(30, 39, 58, .82) 38%, rgba(30, 39, 58, .25) 75%, transparent 100%);
}
.home .hero-x .wrap { position: relative; z-index: 1; width: min(var(--max), calc(100% - 48px)); }
.home .hero-x h1 {
  font-size: clamp(46px, 6.6vw, 100px);
  line-height: .98; letter-spacing: -.025em; max-width: 19ch;
  margin-top: 6px; color: var(--on-ink);
}
.home .hero-x h1 em { display: inline-block; }
.home .hero-x .lead {
  font-size: clamp(17px, 1.5vw, 20px); line-height: 1.6; max-width: 58ch; margin-top: 30px;
  color: var(--on-ink-2);
}
.home .hero-x .cta { min-height: 50px; padding: 14px 24px; }
.home .hero-x .hero-meta {
  margin-top: clamp(48px, 9vh, 96px); border-top: 0; padding-top: 0; gap: 12px;
}
.home .hero-x .hero-meta::before { display: none; }
.home .hero-x .hero-meta > div {
  position: relative; padding: 20px 20px 22px;
  background: rgba(30, 39, 58, .62);
  border: 1px solid var(--ink-line);
  transition: border-color .3s ease, transform .3s ease, background-color .3s ease;
}
.home .hero-x .hero-meta > div::before {
  content: ""; position: absolute; left: -1px; top: -1px; height: 3px; width: 36px;
  background: var(--accent); transition: width .45s ease;
}
.home .hero-x .hero-meta > div:hover { border-color: var(--ink-edge); background: rgba(30, 39, 58, .85); transform: translateY(-3px); }
.home .hero-x .hero-meta > div:hover::before { width: calc(100% + 2px); }
.home .hero-x .hero-meta span { color: var(--on-ink-3); font-size: 13px; }
.scroll-cue {
  position: absolute; left: 50%; bottom: 18px; z-index: 1; width: 1px; height: 44px;
  background: linear-gradient(var(--ink-edge), transparent); overflow: hidden;
}
.scroll-cue::after {
  content: ""; position: absolute; left: 0; top: -20px; width: 1px; height: 20px; background: var(--accent);
  animation: cue 2.2s ease-in-out infinite;
}
@keyframes cue { to { top: 44px; } }

/* Entrée du hero : apparition échelonnée au chargement. */
.home .hero-x .kicker, .home .hero-x h1, .home .hero-x .lead, .home .hero-x .hero-sectors, .home .hero-x .actions, .home .hero-x .hero-meta > div {
  animation: rise .9s cubic-bezier(.2, .7, .2, 1) both;
}
.home .hero-x h1 { animation-delay: .08s; }
.home .hero-x .lead { animation-delay: .2s; }
.home .hero-x .hero-sectors { animation-delay: .26s; }
.home .hero-x .actions { animation-delay: .3s; }
.home .hero-x .hero-meta > div:nth-child(1) { animation-delay: .42s; }
.home .hero-x .hero-meta > div:nth-child(2) { animation-delay: .5s; }
.home .hero-x .hero-meta > div:nth-child(3) { animation-delay: .58s; }
.home .hero-x .hero-meta > div:nth-child(4) { animation-delay: .66s; }
@keyframes rise { from { opacity: 0; transform: translateY(18px); } to { opacity: 1; transform: none; } }

/* ---------- Typographie des sections ---------- */
.home section:not(.hero) { padding: clamp(80px, 11vw, 140px) 0; }
.home .sec-k { font-weight: 600; display: flex; align-items: center; gap: 12px; }
.home .sec-k::before { content: ""; width: 28px; height: 2px; background: var(--accent-2); }
.home .sec-title {
  font-size: clamp(38px, 5.4vw, 72px); line-height: 1.02; letter-spacing: -.015em;
  max-width: 18ch; margin: 14px 0 44px;
}
.home .sec-title::after { display: none; }
.home .intro { font-size: clamp(16px, 1.3vw, 19px); color: var(--body); max-width: 62ch; margin: -18px 0 48px; }

/* ---------- Cartes avec survol ---------- */
.home .grid-3 { gap: 20px; background: transparent; }
.home .diff, .home .insight, .home .sector, .sectors .sector {
  position: relative; background: var(--white);
  border: 1px solid var(--rule); padding: 34px 30px 36px;
  transition: transform .35s cubic-bezier(.2, .7, .2, 1), box-shadow .35s ease, border-color .35s ease;
  overflow: hidden;
}
.home .diff::before, .home .insight::before, .home .sector::before, .sectors .sector::before {
  content: ""; position: absolute; left: 0; top: 0; height: 3px; width: 100%;
  background: var(--accent-2); transform: scaleX(0); transform-origin: left; transition: transform .45s ease;
}
.home .diff:hover, .home .insight:hover, .home .sector:hover, .sectors .sector:hover {
  transform: translateY(-6px); border-color: var(--ink-edge);
  box-shadow: 0 18px 40px -18px var(--shadow);
}
.home .diff:hover::before, .home .insight:hover::before, .home .sector:hover::before, .sectors .sector:hover::before { transform: scaleX(1); }
.home .diff h3, .home .insight h3, .home .sector h3, .sectors .sector h3 { font-size: clamp(24px, 2.2vw, 30px); line-height: 1.12; }
.home .diff n, .home .insight n, .home .sector n, .sectors .sector n {
  font-family: "IBM Plex Sans", system-ui, sans-serif; font-size: 12px; font-weight: 600;
  letter-spacing: .16em; text-transform: uppercase; margin-bottom: 18px;
}
.home .insight h3 { font-size: clamp(22px, 2vw, 27px) !important; }

/* ---------- Schéma animé de la démarche (issu du texte « Approche ») ---------- */
.flow { position: relative; margin: 0 0 56px; }
.flow-steps {
  list-style: none; display: grid; grid-template-columns: repeat(5, 1fr);
  gap: 20px; counter-reset: step;
}
.flow-line {
  position: absolute; left: 24px; top: 23px; height: 2px; width: calc(100% - (100% - 80px) / 5); overflow: visible;
}
.flow-line line { vector-effect: non-scaling-stroke; stroke: var(--accent-2); stroke-width: 2; stroke-dasharray: 1000; stroke-dashoffset: 0; }
.flow li { position: relative; counter-increment: step; }
.flow li::before {
  content: counter(step, decimal-leading-zero);
  display: grid; place-items: center; width: 48px; height: 48px; margin-bottom: 18px;
  background: var(--ink); color: var(--on-ink); border: 2px solid var(--paper-2);
  font-family: "Cormorant Garamond", Georgia, serif; font-size: 20px; font-weight: 600;
  position: relative; z-index: 1;
  transition: background-color .3s ease, color .3s ease;
}
.flow li:hover::before { background: var(--accent-2); color: var(--white); }
.flow b { display: block; font-family: "Cormorant Garamond", Georgia, serif; font-size: 26px; font-weight: 500; color: var(--ink); line-height: 1.1; }
.flow span { display: block; margin-top: 6px; font-size: 14px; color: var(--mute); }

.home .vs { border: 0; gap: 20px; }
.home .vs h3 { line-height: 1.15; }
.home .vs article { border: 1px solid var(--rule); background: var(--white); padding: 38px 36px; }
.home .vs article + article { border: 1px solid var(--ink); background: var(--ink); }

/* ---------- Bloc contact ---------- */
.home .closing { background: var(--ink); color: var(--on-ink); position: relative; overflow: hidden; }
.home .closing::before {
  content: ""; position: absolute; right: -10%; top: -40%; width: 60%; height: 180%;
  background: radial-gradient(closest-side, var(--accent-glow), transparent 70%); pointer-events: none;
}
.home .closing .wrap { position: relative; }
.home .closing .sec-k { color: var(--accent); }
.home .closing .sec-k::before { background: var(--accent); }
.home .closing .sec-title { color: var(--on-ink); max-width: 20ch; margin-bottom: 0; }
.home .closing .cta.ghost { color: var(--on-ink); border-color: var(--ghost-line); }
.home .closing .cta.ghost:hover { background: var(--on-ink); color: var(--ink); border-color: var(--on-ink); }
.home .closing a:focus-visible { outline-color: var(--accent); }

/* Boutons : légère flèche au survol. */
.home main .cta { gap: 10px; }
.home main .cta::after { content: "\2192"; display: inline-block; transition: transform .25s ease; }
.home main .cta:hover::after { transform: translateX(4px); }

/* ---------- Révélation au défilement (activée seulement si le script tourne) ---------- */
.reveal-on [data-reveal] {
  opacity: 0; transform: translateY(28px);
  transition: opacity .8s ease, transform .8s cubic-bezier(.2, .7, .2, 1);
  transition-delay: var(--d, 0s);
}
.reveal-on [data-reveal].is-in { opacity: 1; transform: none; }
.reveal-on .flow:not(.is-in) .flow-line line { stroke-dashoffset: 1000; }
.reveal-on .flow .flow-line line { transition: stroke-dashoffset 1.6s ease .2s; }

/* ---------- Responsive ---------- */
@media (max-width: 900px) {
  .home .hero-x { min-height: calc(100svh - 64px); padding: 56px 0 64px; }
  .hero-veil { background: linear-gradient(180deg, rgba(30, 39, 58, .55) 0%, rgba(30, 39, 58, .85) 100%); }
  .flow-steps { grid-template-columns: 1fr; gap: 0; }
  .flow-line { display: none; }
  .flow li { display: grid; grid-template-columns: 48px 1fr; column-gap: 18px; padding-bottom: 24px; }
  .flow li::before { grid-row: span 2; margin: 0; }
  .flow li:not(:last-child)::after {
    content: ""; position: absolute; left: 23px; top: 48px; bottom: 0; width: 2px; background: var(--accent-2);
  }
  .flow b { align-self: end; }
  .home .vs { grid-template-columns: 1fr; }
  .home .vs article + article { border-top: 1px solid var(--ink); }
}
@media (max-width: 600px) {
  /* Chrome (bandeau + notice + en-tête) ~180 px : le min-height 100svh poussait les CTA hors écran. */
  .home .hero-x { min-height: 0; padding: 22px 0 36px; }
  .home .hero-x h1 { font-size: clamp(36px, 11vw, 48px); }
  .home .hero-x .kicker { margin-bottom: 14px; }
  .home .hero-x .lead { font-size: 16px; line-height: 1.5; margin-top: 14px; }
  .home .hero-x .hero-sectors { margin-top: 14px; }
  .home .hero-x .actions { margin-top: 12px; }
  .home .hero-x .hero-meta { margin-top: 32px; }
  .home .sec-title { font-size: clamp(34px, 9vw, 44px); }
  .home .diff, .home .insight, .home .sector, .sectors .sector { padding: 28px 22px; }
  .scroll-cue { display: none; }
}


/* ---------- Ligne de secteurs dans le hero ---------- */
.home .hero-x .kicker { max-width: min(100%, 42rem); white-space: normal; line-height: 1.45; }
.home .hero-x .hero-sectors {
  margin-top: 22px; font-size: 13px; font-weight: 600; letter-spacing: .1em;
  text-transform: uppercase; color: var(--on-ink-2); max-width: 58ch; line-height: 1.55;
}

/* ---------- Section Secteurs (accueil et page Conseil) ---------- */
.home .sectors { padding: clamp(72px, 8vw, 110px) 0; }
.sectors .sec-title { max-width: 22ch; }
.home .sectors .sec-title { font-size: clamp(34px, 4.4vw, 56px); margin: 14px 0 28px; }
.sectors-grid {
  display: grid; grid-template-columns: repeat(2, 1fr); gap: 20px; background: transparent;
}
.sector {
  position: relative; display: flex; flex-direction: column;
  background: var(--white); border: 1px solid var(--rule); padding: 34px 28px 28px;
  transition: transform .35s cubic-bezier(.2, .7, .2, 1), box-shadow .35s ease, border-color .35s ease;
  overflow: hidden;
}
.sector p { flex: 1; }
.sector-links {
  list-style: none; margin: 22px 0 0; padding: 0; display: grid; gap: 8px;
}
.sector-links a {
  color: var(--accent-2); font-size: 12px; font-weight: 600; letter-spacing: .08em;
  text-transform: uppercase; text-decoration: none; display: inline-block; line-height: 1.35;
}
.sector-links a::after { content: " \2192"; }
.sector-links a:hover { text-decoration: underline; text-underline-offset: 3px; }
.sector-links a:focus-visible { outline: 2px solid var(--accent-2); outline-offset: 3px; }

/* ---------- Bloc Fondateur (accueil) : typographie plus contenue ---------- */
.home .founder { padding-top: clamp(64px, 8vw, 100px); }
.home .founder .sec-title {
  font-size: clamp(32px, 4vw, 48px); max-width: 20ch; margin: 14px 0 18px;
}
.home .founder .intro { margin: 0; max-width: 58ch; }

@media (max-width: 700px) {
  .sectors-grid { grid-template-columns: 1fr; }
}

/* ---------- Mouvement réduit : aucun déplacement, contenu affiché d'emblée ---------- */
@media (prefers-reduced-motion: reduce) {
  .home .hero-x *, .home .hero-x .hero-meta > div { animation: none !important; }
  .scroll-cue { display: none; }
  .reveal-on [data-reveal] { opacity: 1; transform: none; transition: none; }
  .reveal-on .flow .flow-line line { stroke-dashoffset: 0; transition: none; }
  .home .diff, .home .insight, .home .sector, .sectors .sector, .home .hero-x .hero-meta > div, .home main .cta::after,
  .home .diff::before, .home .insight::before, .home .sector::before, .sectors .sector::before, .flow li::before { transition: none; }
  .home .diff:hover, .home .insight:hover, .home .sector:hover, .sectors .sector:hover, .home .hero-x .hero-meta > div:hover { transform: none; }
}
@media (forced-colors: active) {
  .hero-canvas, .hero-veil { display: none; }
}
