/* =========================================================================
   CCMESD — SYSTÈME DE MOUVEMENT
   Philosophie : 80 % calme, 20 % mouvement. Transform, opacity et filter
   uniquement. Tout le décoratif est neutralisé par prefers-reduced-motion.
   ========================================================================= */
:root {
  --ease-out-expo: cubic-bezier(.22, 1, .36, 1);
  --ease-soft: cubic-bezier(.4, 0, .2, 1);
}

/* Révélation au scroll — l'état masqué n'est posé que si JS est actif */
.js [data-reveal] {
  opacity: 0; transform: translateY(22px);
  transition: opacity .7s var(--ease-out-expo), transform .7s var(--ease-out-expo);
}
.js [data-reveal].is-in { opacity: 1; transform: none; }

/* Entrée séquencée du hero */
.js .hero-anim { opacity: 0; }
.js .hero-ready .hero-anim {
  animation: heroIn .85s var(--ease-out-expo) both;
  animation-delay: var(--d, 0ms);
}
@keyframes heroIn {
  from { opacity: 0; transform: translateY(26px); filter: blur(6px); }
  to   { opacity: 1; transform: none; filter: blur(0); }
}

/* =========================================================================
   HERO — FOND EN COUCHES
   ========================================================================= */
.hero-x {
  position: relative; isolation: isolate; overflow: clip;
  min-height: min(92vh, 900px);
  display: flex; align-items: center;
  padding-block: clamp(var(--s7), 4.5vw, var(--s9)) clamp(var(--s7), 4vw, var(--s8));
  background: var(--ink); color: #fff;
}
@media (max-width: 1080px) { .hero-x { min-height: 0; padding-block: var(--s8) var(--s7); } }

/* Couche 1 — dégradé de base */
.hero-x::before {
  content: ""; position: absolute; inset: 0; z-index: -3;
  background: linear-gradient(168deg, #102F47 0%, #175080 55%, #1F6795 100%);
}
/* Couche 2 — deux halos radiaux en dérive lente */
.hero-halo { position: absolute; inset: -20%; z-index: -2; pointer-events: none; }
.hero-halo span { position: absolute; border-radius: 50%; filter: blur(70px); opacity: .5; }
.hero-halo span:nth-child(1) {
  width: 46vw; height: 46vw; right: 4%; top: -6%;
  background: radial-gradient(circle, rgba(176,112,60,.5), transparent 68%);
  animation: drift1 22s var(--ease-soft) infinite alternate;
}
.hero-halo span:nth-child(2) {
  width: 40vw; height: 40vw; left: -6%; bottom: -12%;
  background: radial-gradient(circle, rgba(74,147,196,.42), transparent 68%);
  animation: drift2 26s var(--ease-soft) infinite alternate;
}
@keyframes drift1 { from { transform: translate3d(0,0,0) scale(1); }
                    to   { transform: translate3d(-4%, 5%, 0) scale(1.09); } }
@keyframes drift2 { from { transform: translate3d(0,0,0) scale(1.04); }
                    to   { transform: translate3d(5%, -4%, 0) scale(1); } }

/* Couche 3 — réseau abstrait. Aucune donnée géographique : c'est un motif de
   connexions, pas une carte. Aucune implantation n'est suggérée. */
.hero-net { position: absolute; inset: 0; z-index: -2; pointer-events: none; opacity: .32; }
.hero-net svg { width: 100%; height: 100%; }
.hero-net line { stroke: rgba(255,255,255,.22); stroke-width: .4; }
.hero-net circle.node { fill: rgba(255,255,255,.38); }
.hero-net circle.pulse { fill: #B0703C; opacity: 0; animation: netPulse 9s var(--ease-soft) infinite; }
.hero-net circle.pulse:nth-of-type(2) { animation-delay: 3s; }
.hero-net circle.pulse:nth-of-type(3) { animation-delay: 6s; }
@keyframes netPulse { 0%, 100% { opacity: 0; } 8%, 26% { opacity: .9; } 42% { opacity: 0; } }

/* Couche 4 — poussière : six points, jamais plus */
.hero-dust { position: absolute; inset: 0; z-index: -2; pointer-events: none; }
.hero-dust i {
  position: absolute; width: 2px; height: 2px; border-radius: 50%;
  background: rgba(255,255,255,.5); animation: dust 26s linear infinite;
}
@keyframes dust {
  from { transform: translate3d(0, 14vh, 0); opacity: 0; }
  12%, 78% { opacity: .5; }
  to { transform: translate3d(2vw, -24vh, 0); opacity: 0; }
}

.hero-x > .container { position: relative; z-index: 1; width: 100%; }
.hero-x-grid {
  display: grid; grid-template-columns: minmax(0, 1.02fr) minmax(0, .98fr);
  gap: clamp(var(--s7), 5vw, var(--s10)); align-items: center;
}
.hero-x-grid > * { min-width: 0; }
@media (max-width: 1080px) { .hero-x-grid { grid-template-columns: 1fr; gap: var(--s7); } }

/* =========================================================================
   HERO — TYPOGRAPHIE
   ========================================================================= */
.hero-badge {
  display: inline-flex; align-items: center; gap: var(--s3);
  padding: 7px var(--s4); border-radius: var(--r-full);
  background: rgba(255,255,255,.08); border: 1px solid rgba(255,255,255,.2);
  font-size: var(--fs-xs); font-weight: 700; letter-spacing: .13em;
  text-transform: uppercase; color: rgba(255,255,255,.94);
  backdrop-filter: blur(8px);
}
.hero-badge .spark {
  width: 6px; height: 6px; border-radius: 50%; background: var(--accent); flex-shrink: 0;
  animation: sparkle 4.5s var(--ease-soft) infinite;
}
@keyframes sparkle {
  0%, 70%, 100% { box-shadow: 0 0 0 0 rgba(176,112,60,.55); }
  35% { box-shadow: 0 0 0 7px rgba(176,112,60,0); }
}

.hero-title {
  font-size: clamp(2.1rem, 1.05rem + 3.9vw, 4.05rem);
  line-height: 1.07; letter-spacing: -.022em; color: #fff;
  margin-block: var(--s5) 0;
}
.hero-title .l { display: block; }
.hero-title .soft { color: rgba(255,255,255,.84); }
.hero-title .mark { position: relative; white-space: nowrap; }
.hero-title .mark::after {
  content: ""; position: absolute; left: 0; right: 0; bottom: .04em; height: 3px;
  border-radius: 2px; transform-origin: left; transform: scaleX(0);
  background: linear-gradient(90deg, var(--accent), rgba(176,112,60,0));
}
.js .hero-ready .hero-title .mark::after { animation: underline 1.1s var(--ease-out-expo) 1.4s both; }
html:not(.js) .hero-title .mark::after { transform: scaleX(1); }
@keyframes underline { to { transform: scaleX(1); } }

.hero-lead {
  max-width: 52ch; margin-top: var(--s5);
  font-size: clamp(1rem, .95rem + .35vw, 1.18rem);
  line-height: 1.62; color: rgba(255,255,255,.92);
}
.hero-lead-2 {
  max-width: 52ch; margin-top: var(--s4);
  font-size: var(--fs-base); line-height: 1.6; color: rgba(255,255,255,.86);
}
.hero-cta { display: flex; flex-wrap: wrap; gap: var(--s3); margin-top: var(--s6); }
.hero-note { margin-top: var(--s5); font-size: var(--fs-sm); color: rgba(255,255,255,.84); }
.hero-note a { color: rgba(255,255,255,.9); text-underline-offset: 4px; }
.hero-note a:hover { color: #fff; }

/* =========================================================================
   BOUTONS — FLÈCHE, LUEUR, MAGNÉTISME
   ========================================================================= */
.btn .arw { transition: transform .25s var(--ease-out-expo); flex-shrink: 0; }
.btn:hover .arw { transform: translateX(4px); }
.btn-shine { position: relative; overflow: hidden; }
.btn-shine::after {
  content: ""; position: absolute; top: 0; bottom: 0; width: 42%; left: -60%;
  pointer-events: none; transform: skewX(-18deg);
  background: linear-gradient(100deg, transparent, rgba(255,255,255,.26), transparent);
}
.btn-shine:hover::after { animation: shine .68s var(--ease-soft) 1; }
@keyframes shine { to { left: 130%; } }
.btn-mag { will-change: transform; }

/* =========================================================================
   HERO — CARTES FLOTTANTES
   ========================================================================= */
.hero-stage { position: relative; perspective: 1200px; }
.hero-deck {
  display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: var(--s4);
  transform-style: preserve-3d; transition: transform .45s var(--ease-out-expo);
}
.hcard {
  position: relative; display: block; overflow: hidden; text-decoration: none;
  border-radius: var(--r-xl); border: 1px solid rgba(255,255,255,.16);
  background: rgba(255,255,255,.05); box-shadow: 0 18px 44px rgba(0,0,0,.34);
  transform-style: preserve-3d;
  transition: transform .35s var(--ease-out-expo), box-shadow .35s var(--ease-out-expo),
              opacity .35s var(--ease-out-expo), border-color .35s var(--ease-out-expo);
  animation: float 7s var(--ease-soft) infinite alternate;
}
.hcard:nth-child(1) { --fy: -8px;  --fr: -1deg;  animation-duration: 7s;   animation-delay: 0s; }
.hcard:nth-child(2) { --fy: 10px;  --fr: 1deg;   animation-duration: 8.4s; animation-delay: -2.1s; }
.hcard:nth-child(3) { --fy: 6px;   --fr: -.7deg; animation-duration: 6.2s; animation-delay: -3.4s; margin-top: calc(var(--s5) * -1); }
.hcard:nth-child(4) { --fy: -5px;  --fr: .8deg;  animation-duration: 7.8s; animation-delay: -1.2s; margin-top: var(--s5); }
@keyframes float {
  from { transform: translate3d(0,0,0) rotate(0deg); }
  to   { transform: translate3d(0, var(--fy), 0) rotate(var(--fr)); }
}
.hcard-media { position: relative; aspect-ratio: 4/3; overflow: hidden; }
.hcard-media img { width: 100%; height: 100%; object-fit: cover; transition: transform .45s var(--ease-out-expo); }
.hcard-media::after {
  content: ""; position: absolute; inset: 0;
  background: linear-gradient(180deg, rgba(7,21,34,.16) 0%, rgba(7,21,34,.6) 52%, rgba(7,21,34,.94) 100%);
}
.hcard-body { position: absolute; inset: auto 0 0 0; padding: var(--s4); }
.hcard-cat {
  display: block; font-size: 10px; font-weight: 700; letter-spacing: .12em;
  text-transform: uppercase; color: #D9945C; margin-bottom: 5px;
}
.hcard-title {
  font-family: var(--font-body); font-size: var(--fs-sm); font-weight: 650;
  line-height: 1.32; color: #fff; margin: 0;
  display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden;
}
.hcard-meta {
  margin-top: var(--s3); font-size: 11px; color: rgba(255,255,255,.62);
  display: flex; align-items: center; gap: 6px;
}
.hcard-go {
  position: absolute; top: var(--s3); right: var(--s3); z-index: 2;
  width: 30px; height: 30px; border-radius: 50%; display: grid; place-items: center;
  background: rgba(255,255,255,.14); border: 1px solid rgba(255,255,255,.24); color: #fff;
  opacity: 0; transform: translateY(-4px) scale(.9); backdrop-filter: blur(6px);
  transition: opacity .3s var(--ease-out-expo), transform .3s var(--ease-out-expo);
}
.hcard-flag {
  position: absolute; top: var(--s3); left: var(--s3); z-index: 2;
  padding: 4px 10px; border-radius: var(--r-full);
  background: rgba(176,112,60,.94); color: #fff;
  font-size: 9.5px; font-weight: 800; letter-spacing: .1em; text-transform: uppercase;
}
.hcard:hover, .hcard:focus-visible {
  transform: translate3d(0,0,22px) scale(1.03);
  box-shadow: 0 26px 60px rgba(0,0,0,.46);
  border-color: rgba(255,255,255,.34);
  animation-play-state: paused;
}
.hcard:hover .hcard-media img { transform: scale(1.045); }
.hcard:hover .hcard-go, .hcard:focus-visible .hcard-go { opacity: 1; transform: none; }
.hero-deck:hover .hcard:not(:hover) { opacity: .72; transform: scale(.985); }

/* Carte principale : même largeur que les autres, mais plus haute et plus
   présente. Une grille 2×2 tient dans la hauteur d'un portable ; une carte
   pleine largeur imposait une troisième rangée et 250 px de plus. */
.hcard-lead .hcard-media { aspect-ratio: 4/4.6; }
.hcard-lead { box-shadow: 0 22px 54px rgba(0,0,0,.42); border-color: rgba(255,255,255,.24); }
.hcard-lead .hcard-title { font-size: var(--fs-base); -webkit-line-clamp: 3; }

/* =========================================================================
   INDICATEUR D'EXPLORATION
   ========================================================================= */
.hero-scroll {
  display: inline-flex; align-items: center; gap: var(--s3);
  margin-top: clamp(var(--s6), 3vw, var(--s7));
  font-size: var(--fs-xs); letter-spacing: .12em; text-transform: uppercase;
  color: rgba(255,255,255,.84); text-decoration: none;
}
.hero-scroll:hover { color: #fff; }
.hero-scroll svg { animation: nudge 2.2s var(--ease-soft) infinite; flex-shrink: 0; }
@keyframes nudge { 0%,100% { transform: translateY(0); } 50% { transform: translateY(5px); } }

/* =========================================================================
   BANDEAU DÉFILANT
   ========================================================================= */
.ticker {
  overflow: hidden; background: var(--ink-2); color: rgba(255,255,255,.52);
  border-block: 1px solid rgba(255,255,255,.08); padding-block: var(--s4);
  -webkit-mask-image: linear-gradient(90deg, transparent, #000 9%, #000 91%, transparent);
          mask-image: linear-gradient(90deg, transparent, #000 9%, #000 91%, transparent);
}
.ticker-track { display: flex; width: max-content; animation: ticker 46s linear infinite; }
.ticker-track > span {
  display: inline-flex; align-items: center; gap: var(--s6); padding-inline: var(--s5);
  font-family: var(--font-display); font-size: clamp(.95rem, .85rem + .35vw, 1.25rem);
  letter-spacing: .07em; text-transform: uppercase; white-space: nowrap;
}
.ticker-track b { color: #D9945C; font-weight: 400; }
@keyframes ticker { to { transform: translateX(-50%); } }

/* =========================================================================
   COMPTEURS
   ========================================================================= */
.stat-x { text-align: center; padding: var(--s6) var(--s4); }
.stat-x .num {
  font-family: var(--font-display); font-weight: 600; line-height: 1;
  font-size: clamp(2.4rem, 1.6rem + 2.8vw, 3.8rem); color: var(--brand);
  font-variant-numeric: tabular-nums;
}
.stat-x .num sup { font-size: .4em; vertical-align: super; color: var(--accent); margin-left: 2px; }
.stat-x .lbl {
  margin-top: var(--s3); font-size: var(--fs-xs); font-weight: 700;
  letter-spacing: .13em; text-transform: uppercase; color: var(--text-faint);
}
.stat-x + .stat-x { border-left: 1px solid var(--border); }
@media (max-width: 860px) {
  .stat-x + .stat-x { border-left: 0; }
  .stat-x:nth-child(n+2) { border-top: 1px solid var(--border); }
}

/* =========================================================================
   PARCOURS & PILIERS
   ========================================================================= */
.path {
  display: block; padding: var(--s6); text-decoration: none; color: inherit;
  border: 1px solid var(--border); border-radius: var(--r-lg); background: var(--surface);
  transition: transform .3s var(--ease-out-expo), box-shadow .3s var(--ease-out-expo), border-color .3s;
}
.path:hover { transform: translateY(-4px); box-shadow: var(--shadow-md); border-color: var(--brand-400); }
.path .who {
  font-size: var(--fs-xs); font-weight: 700; letter-spacing: .12em;
  text-transform: uppercase; color: var(--accent);
}
.path h3 { font-size: var(--fs-lg); margin-block: var(--s3) var(--s2); }
.path p { color: var(--text-muted); font-size: var(--fs-sm); }
.path .go {
  display: inline-flex; align-items: center; gap: 7px; margin-top: var(--s5);
  font-weight: 650; color: var(--brand);
}
.path:hover .go .arw { transform: translateX(4px); }

.pillar { padding-top: var(--s5); border-top: 2px solid var(--accent); }
.pillar .n { font-family: var(--font-display); font-size: var(--fs-sm); color: var(--accent); letter-spacing: .1em; }
.pillar h3 { font-size: var(--fs-md); margin-block: var(--s3) var(--s2); }
.pillar p { color: var(--text-muted); font-size: var(--fs-sm); }

/* =========================================================================
   SÉMINAIRES INTERNATIONAUX — historique daté
   ========================================================================= */
.semi { display: grid; gap: var(--s4); }
.semi-row {
  display: grid; grid-template-columns: minmax(0, 200px) minmax(0, 1fr) minmax(0, 190px);
  gap: var(--s5); align-items: center;
  padding: var(--s5); border: 1px solid var(--border); border-radius: var(--r-lg);
  background: var(--surface);
}
.semi-row > * { min-width: 0; }
@media (max-width: 900px) { .semi-row { grid-template-columns: 1fr; gap: var(--s4); } }
.semi-city { font-family: var(--font-display); font-size: var(--fs-xl); line-height: 1.1; }
.semi-when { font-size: var(--fs-sm); color: var(--text-faint); margin-top: 3px; }
.semi-list { list-style: none; padding: 0; display: grid; gap: 6px; font-size: var(--fs-sm); }
.semi-list li { display: flex; gap: var(--s3); }
.semi-list li::before { content: "—"; color: var(--accent); flex-shrink: 0; }
.semi-thumbs { display: flex; gap: 8px; }
.semi-thumbs .media { width: 54px; aspect-ratio: 3/4; border-radius: var(--r-md); flex-shrink: 0; }

/* =========================================================================
   EN-TÊTE — ÉTAT AU DÉFILEMENT
   ========================================================================= */
.site-header {
  background: color-mix(in srgb, var(--bg) 80%, transparent);
  transition: background .38s var(--ease-soft), box-shadow .38s var(--ease-soft);
}
/* Le header dispose de plus de largeur que le corps du site : à 1220 px, la
   somme marque + menu + bouton dépassait de 82 px et le menu se superposait
   au bouton « Demander un devis ». */
.site-header .container { max-width: 1320px; min-height: 80px; transition: min-height .38s var(--ease-soft); }
/* Marque et bouton ne se laissent jamais écraser : sans cela, un dépassement
   se traduit par un chevauchement au lieu d'un débordement visible. */
.site-header .brand, .site-header .header-cta { flex-shrink: 0; }
/* Logo agrandi et rapproché du bord : le fichier porte une marge interne
   qui le faisait paraître petit et trop rentré.
   La taille est échelonnée — à 56 px le logo fait 167 px de large et faisait
   déborder l'en-tête sous 375 px. Ces règles vivent ici, après ccmesd.css,
   donc elles doivent porter elles-mêmes leurs paliers. */
.brand-logo { height: 56px; }
.site-header.is-stuck .brand-logo { height: 44px; }
@media (min-width: 481px) { .site-header .brand { margin-left: -14px; } }
@media (max-width: 1024px) { .brand-logo, .site-header.is-stuck .brand-logo { height: 48px; } }
@media (max-width: 768px)  { .brand-logo, .site-header.is-stuck .brand-logo { height: 42px; } }
@media (max-width: 480px)  { .brand-logo, .site-header.is-stuck .brand-logo { height: 34px; } }
/* Aucune compression du menu : sinon les libellés débordent de leur boîte
   au lieu de pousser, ce qui produit un chevauchement silencieux. */
.site-header .nav { flex-shrink: 0; min-width: max-content; }
.site-header .header-cta { margin-left: var(--s2); }
@media (min-width: 1360px) { .site-header .nav-link { padding-inline: 11px; } }
.site-header.is-stuck { background: color-mix(in srgb, var(--bg) 96%, transparent); box-shadow: 0 1px 20px rgba(10,24,38,.09); }
.site-header.is-stuck .container { min-height: 62px; }
.site-header.is-stuck .brand-logo { height: 34px; }
.brand-logo { transition: height .38s var(--ease-soft); }

/* =========================================================================
   WHATSAPP — PULSE DISCRET
   ========================================================================= */
/* La pulsation est portée par la pastille verte, définie dans annonce.css. */
@keyframes waPulse {
  0%, 82%, 100% { box-shadow: 0 0 0 0 rgba(31,168,85,.45); }
  91% { box-shadow: 0 0 0 10px rgba(31,168,85,0); }
}

/* Écrans desktop peu hauts (portables 1366×768, 1440×900) : le hero doit
   tenir sans imposer de défilement pour atteindre l'indicateur d'exploration. */
@media (min-width: 1081px) and (max-height: 860px) {
  .hero-x { padding-block: var(--s6); min-height: min(96vh, 820px); }
  .hero-title { font-size: clamp(1.9rem, .85rem + 2.5vw, 3.05rem); margin-top: var(--s4); }
  .hero-lead { margin-top: var(--s4); font-size: 1rem; max-width: 48ch; }
  .hero-cta { margin-top: var(--s5); }
  .hero-note { margin-top: var(--s4); }
  .hero-scroll { margin-top: var(--s5); }
}

/* =========================================================================
   HERO — MOBILE : composition verticale, carrousel tactile
   ========================================================================= */
@media (max-width: 1080px) {
  .hero-stage { perspective: none; margin-top: var(--s6); }
  .hero-deck {
    display: flex; gap: var(--s4); overflow-x: auto; overscroll-behavior-x: contain;
    scroll-snap-type: x mandatory; scroll-padding-left: var(--s5);
    padding-bottom: var(--s4); margin-inline: calc(var(--s5) * -1); padding-inline: var(--s5);
    scrollbar-width: none; transform: none !important;
  }
  .hero-deck::-webkit-scrollbar { display: none; }
  .hcard {
    flex: 0 0 76%;            /* la carte suivante reste visible : invite au balayage */
    margin-top: 0 !important; scroll-snap-align: start;
    animation: none;          /* pas de flottement continu sur mobile */
  }
  .hcard-lead { flex-basis: 84%; }
  .hcard-lead .hcard-media { aspect-ratio: 4/3.4; }
  .hero-deck:hover .hcard:not(:hover) { opacity: 1; transform: none; }
  .hero-cta .btn { flex: 1 1 auto; }
}
@media (max-width: 560px) {
  .hero-cta { flex-direction: column; align-items: stretch; }
  .hcard { flex-basis: 82%; }
}

/* =========================================================================
   MOUVEMENT RÉDUIT — neutralisation complète du décoratif
   ========================================================================= */
@media (prefers-reduced-motion: reduce) {
  .hero-halo span, .hero-net circle.pulse, .hcard, .ticker-track,
  .hero-scroll svg, .hero-badge .spark, .wa-fab::before, .btn-shine::after {
    animation: none !important;
  }
  .hero-dust, .hero-net { display: none !important; }
  .js .hero-anim, .js [data-reveal] {
    opacity: 1 !important; transform: none !important; filter: none !important;
    animation: none !important; transition: none !important;
  }
  .hero-title .mark::after { transform: scaleX(1); animation: none !important; }
  .btn-shine::after { display: none; }
  .hcard:hover, .path:hover { transform: none; }
  .hero-deck:hover .hcard:not(:hover) { opacity: 1; transform: none; }
  .hero-deck { transform: none !important; }
}
