/* FMCH — animations et habillage graphique (sans photos).
   Chargé après les autres feuilles de style. Tout est désactivé si le visiteur a demandé moins de mouvement. */

/* ---------- Fond topographique animé ---------- */
.fx-topo { position: absolute; inset: 0; width: 100%; height: 100%; pointer-events: none; z-index: 0; }
.hero .fx-topo { z-index: -1; }
.page-heading { position: relative; overflow: hidden; isolation: isolate; }
.page-heading .fx-topo { z-index: -1; opacity: .8; }
.hero { background: radial-gradient(90% 70% at 85% 15%, #173a5e 0%, rgba(23,58,94,0) 60%), linear-gradient(160deg, #0b2440 0%, #071b2c 55%, #04121f 100%); }
.page-heading { background: radial-gradient(80% 120% at 95% 0%, #173a5e 0%, rgba(23,58,94,0) 60%), #071b2c; }

/* ---------- Pictogramme et arc doré (accueil) ---------- */
.hero-emblem { position: absolute; z-index: 1; right: 6vw; top: 46%; width: min(30vw, 420px); aspect-ratio: 1; transform: translateY(-50%); pointer-events: none; }
.hero-emblem img { position: absolute; inset: 12%; width: 76%; height: auto; opacity: 0; transform: scale(.86); animation: emblem-in 1.1s cubic-bezier(.2,.8,.2,1) .9s forwards; filter: drop-shadow(0 20px 60px rgba(0,0,0,.45)); }
.hero-emblem svg { position: absolute; inset: 0; width: 100%; height: 100%; overflow: visible; }
.hero-emblem .arc { fill: none; stroke: url(#fmch-gold); stroke-width: 3; stroke-linecap: round; stroke-dasharray: 1; stroke-dashoffset: 1; animation: arc-draw 1.6s cubic-bezier(.65,0,.35,1) .3s forwards; }
.hero-emblem .arc-2 { stroke-width: 1; opacity: .45; animation-delay: .6s; animation-duration: 2.2s; }
.hero-emblem .halo { fill: none; stroke: rgba(255,194,41,.12); stroke-width: 1; animation: halo 6s ease-in-out 2.4s infinite; transform-origin: 50% 50%; }
@keyframes arc-draw { to { stroke-dashoffset: 0; } }
@keyframes emblem-in { to { opacity: 1; transform: scale(1); } }
@keyframes halo { 0%, 100% { transform: scale(1); opacity: .7; } 50% { transform: scale(1.04); opacity: .2; } }
@media (max-width: 1100px) { .hero-emblem { width: 300px; right: -60px; top: 120px; transform: none; opacity: .22; } }
@media (max-width: 760px) { .hero-emblem { width: 220px; right: -70px; top: 30px; opacity: .16; } }

/* Filet or diagonal qui traverse l'écran */
.gold-sweep { position: absolute; z-index: 1; left: -20%; top: 62%; width: 140%; height: 2px; pointer-events: none;
  background: linear-gradient(90deg, transparent 0%, rgba(255,194,41,0) 20%, #ffc229 50%, rgba(255,194,41,0) 80%, transparent 100%);
  transform: rotate(-11deg) translateX(-100%); opacity: .9; animation: sweep 1.8s cubic-bezier(.65,0,.35,1) 1.2s forwards; }
@keyframes sweep { to { transform: rotate(-11deg) translateX(100%); opacity: 0; } }

/* ---------- Titres : mots qui montent un à un ---------- */
.w { display: inline-block; overflow: hidden; vertical-align: bottom; padding-bottom: .06em; margin-bottom: -.06em; }
.w > span { display: inline-block; transform: translateY(105%); animation: word-up .8s cubic-bezier(.2,.8,.2,1) forwards; animation-delay: calc(var(--i, 0) * 70ms + 150ms); }
@keyframes word-up { to { transform: none; } }
.hero .eyebrow, .hero-event-name, .hero-summary, .hero-signature, .hero-actions, .page-heading p, .page-heading > a, .page-heading > span {
  animation: fade-up .8s cubic-bezier(.2,.8,.2,1) both; }
.hero .eyebrow, .page-heading > a, .page-heading > span { animation-delay: .05s; }
.hero-event-name { animation-delay: .1s; }
.hero-summary, .page-heading p { animation-delay: .55s; }
.hero-signature { animation-delay: .65s; }
.hero-actions { animation-delay: .75s; }
@keyframes fade-up { from { opacity: 0; transform: translateY(16px); } to { opacity: 1; transform: none; } }

/* ---------- Compteur ---------- */
.countdown > div { animation: fade-up .7s cubic-bezier(.2,.8,.2,1) both; }
.countdown > div:nth-child(1) { animation-delay: .9s; } .countdown > div:nth-child(2) { animation-delay: 1s; }
.countdown > div:nth-child(3) { animation-delay: 1.1s; } .countdown > div:nth-child(4) { animation-delay: 1.2s; }
.countdown strong.tick { animation: tick .45s cubic-bezier(.2,.8,.2,1); }
@keyframes tick { from { transform: translateY(-30%); opacity: .2; } to { transform: none; opacity: 1; } }

/* ---------- Bande « thème » : reflet doré ---------- */
.hero + .theme-band { position: relative; overflow: hidden; }
.hero + .theme-band::after { content: ""; position: absolute; top: 0; bottom: 0; width: 30%; left: -40%; pointer-events: none;
  background: linear-gradient(100deg, transparent, rgba(255,255,255,.55), transparent); transform: skewX(-18deg); }
.hero + .theme-band.rv-in::after { animation: shine 1.4s cubic-bezier(.65,0,.35,1) .3s; }
@keyframes shine { to { left: 120%; } }

/* ---------- Apparition au défilement ---------- */
.rv { opacity: 0; transform: translateY(28px); transition: opacity .8s cubic-bezier(.2,.8,.2,1), transform .8s cubic-bezier(.2,.8,.2,1); transition-delay: var(--d, 0ms); }
.rv.rv-in { opacity: 1; transform: none; }
.section-kicker.rv::after { transform: scaleX(0); transform-origin: left; transition: transform 1s cubic-bezier(.2,.8,.2,1) .25s; }
.section-kicker.rv-in::after { transform: scaleX(1); }

/* ---------- Grands chiffres dorés « 01. » sur les expériences ---------- */
#formats .format-grid { counter-reset: fmt; }
#formats .format-grid article { counter-increment: fmt; position: relative; padding-top: 24px; }
#formats .format-grid article::before { content: counter(fmt, decimal-leading-zero) "."; display: block; margin: 0 24px; font: 800 44px/1 Arial, sans-serif; letter-spacing: -.04em;
  background: linear-gradient(135deg, #ffc229, #a66d16); -webkit-background-clip: text; background-clip: text; color: transparent; }
#formats .format-grid article::after, .profile-card::after, .pillars article::after { content: ""; position: absolute; left: 0; top: 0; height: 3px; width: 100%; background: #ffc229;
  transform: scaleX(0); transform-origin: left; transition: transform .5s cubic-bezier(.2,.8,.2,1); }
#formats .format-grid article:hover::after, .profile-card:hover::after { transform: scaleX(1); }
.profile-card { position: relative; }
.pillars article { position: relative; }
.pillars article.rv-in::after { transform: scaleX(.25); transition-delay: .4s; }
.pillars h3 { transition: color .3s; }
.pillars article:hover h3 { color: #805700; }

/* ---------- Boutons : reflet au survol ---------- */
.button { position: relative; overflow: hidden; }
.button-primary::after { content: ""; position: absolute; top: 0; bottom: 0; left: -60%; width: 40%; background: linear-gradient(100deg, transparent, rgba(255,255,255,.6), transparent); transform: skewX(-18deg); transition: left .6s ease; }
.button-primary:hover::after { left: 130%; }

/* ---------- Programme : la journée active s'anime ---------- */
.program-tabs button { transition: background .25s, color .25s, border-color .25s, transform .25s; }
.program-tabs button:hover { transform: translateY(-2px); }
.interactive-program li { transition: transform .3s, color .3s; }
.interactive-program li:hover { transform: translateX(6px); color: #fff; }

/* ---------- Bande de contact finale ---------- */
.contact-cta { position: relative; overflow: hidden; }
.contact-cta::before { content: ""; position: absolute; right: -120px; top: -160px; width: 420px; height: 420px; border-radius: 50%; border: 2px solid rgba(7,27,44,.18); }
.contact-cta::after { content: ""; position: absolute; right: -60px; top: -100px; width: 300px; height: 300px; border-radius: 50%; border: 1px solid rgba(7,27,44,.12); }
.contact-cta > * { position: relative; z-index: 1; }

@media (prefers-reduced-motion: reduce) {
  .w > span, .hero-emblem img, .hero-emblem .arc { animation: none !important; transform: none !important; opacity: 1 !important; stroke-dashoffset: 0 !important; }
  .gold-sweep { display: none; }
  .rv { opacity: 1 !important; transform: none !important; transition: none !important; }
}

/* Les mots découpés gardent la graisse de leur ligne (le titre d'origine met « & CAPITAL » en léger). */
.hero h1 span.w, .hero h1 span.w > span, .page-heading h1 span.w, .page-heading h1 span.w > span { font-weight: inherit; }

/* ---------- Illustrations au trait (1re édition, sans photos) ---------- */
.illu { height: 190px; background: radial-gradient(120% 90% at 100% 0%, #173a5e 0%, rgba(23,58,94,0) 60%), linear-gradient(160deg, #0b2440, #071b2c); overflow: hidden; }
.illu svg { display: block; width: 100%; height: 100%; }
.illu-wide { height: auto; aspect-ratio: 16 / 7; max-height: 420px; margin: 30px 0; }
.profile-card .illu { height: 170px; }
#formats .format-grid article .illu + * { margin-top: 0; }
#formats .format-grid article { padding-top: 0; }
#formats .format-grid article::before { margin-top: 22px; }
.illu .ln { stroke-dasharray: 1; }
.illu .dot { transform-box: fill-box; transform-origin: center; }
.rv:not(.rv-in) .illu .ln { stroke-dashoffset: 1; }
.rv-in .illu .ln { animation: illu-draw 1.8s cubic-bezier(.65,0,.35,1) both; }
.rv-in .illu .dot { animation: illu-pop .5s cubic-bezier(.2,.8,.2,1) 1.3s both; }
.format-grid article:hover .illu .dot, .profile-card:hover .illu .dot { animation: illu-pulse 1.2s ease-in-out infinite; }
@keyframes illu-draw { from { stroke-dashoffset: 1; } to { stroke-dashoffset: 0; } }
@keyframes illu-pop { from { transform: scale(0); } to { transform: scale(1); } }
@keyframes illu-pulse { 50% { transform: scale(1.6); } }
@media (max-width: 760px) { .profile-card.no-photo .illu { height: 150px; } }
@media (prefers-reduced-motion: reduce) { .illu .ln, .illu .dot { animation: none !important; stroke-dashoffset: 0 !important; transform: none !important; } }

/* ---------- Mention « 1re édition » ---------- */
.edition-badge { display: inline-flex; align-items: center; gap: 8px; padding: 6px 12px; border: 1px solid rgba(255,194,41,.6); color: #ffc229; font-size: 13px; font-weight: 800; letter-spacing: .12em; text-transform: uppercase; margin-bottom: 18px; animation: fade-up .8s cubic-bezier(.2,.8,.2,1) both; }
.edition-badge b { display: inline-grid; place-items: center; width: 22px; height: 22px; background: #ffc229; color: #071b2c; font-size: 12px; letter-spacing: 0; }
#formats .format-grid article { display: flex; flex-direction: column; }
#formats .format-grid article .illu { order: -1; }

/* ---------- Images générées (illustrations) ---------- */
.photo { position: relative; height: 190px; overflow: hidden; background: #071b2c; }
.photo img { display: block; width: 100%; height: 100%; object-fit: cover; transform: scale(1.04); transition: transform 6s cubic-bezier(.2,.8,.2,1); }
.photo::after { content: ""; position: absolute; inset: 0; background: linear-gradient(180deg, rgba(7,27,44,0) 45%, rgba(7,27,44,.55)); pointer-events: none; }
.photo small, .hero-photo small { position: absolute; z-index: 1; right: 8px; bottom: 8px; padding: 3px 7px; background: rgba(7,27,44,.78); color: #e9eef3; font-size: 11px; letter-spacing: .02em; }
.format-grid article:hover .photo img, .profile-card:hover .photo img { transform: scale(1.1); }
.profile-card .photo { height: 170px; }
#formats .format-grid article .photo { order: -1; }
.photo-wide { height: auto; aspect-ratio: 16 / 8; max-height: 460px; margin: 30px 0; }
.rv:not(.rv-in) .photo img { transform: scale(1.12); }
@media (max-width: 760px) { .profile-card.no-photo .photo { height: 150px; } }

.hero-photo { position: absolute; inset: 0; z-index: -2; background: url("img/hero.jpg") 62% 70% / cover no-repeat; opacity: .8; animation: kenburns 24s ease-out both; }
.hero-photo small { right: 14px; bottom: 140px; }
.hero.has-photo .fx-topo { opacity: .45; }
.hero.has-photo .hero-emblem { display: none; }
.hero.has-photo .hero-shade { background: linear-gradient(90deg, rgba(4,18,31,.96) 0%, rgba(4,18,31,.82) 38%, rgba(4,18,31,.25) 75%, rgba(4,18,31,.1) 100%), linear-gradient(0deg, rgba(4,18,31,.85), transparent 45%); }
@keyframes kenburns { from { transform: scale(1.05); } to { transform: scale(1.12); } }
@media (max-width: 760px) {
  .hero-photo { background-position: 72% 60%; opacity: .55; }
  .hero-photo small { bottom: 230px; }
}
@media (prefers-reduced-motion: reduce) { .hero-photo { animation: none; } .photo img { transition: none; transform: none; } }
