/* ==========================================================================
   COUCHE ANIMATIONS PREMIUM â€” partagÃ©e par les deux sites
   (les couleurs s'adaptent aux variables de chaque thÃ¨me)
   ========================================================================== */

/* --- Barre de progression de scroll --- */
.scroll-progress {
  position: fixed; top: 0; left: 0; z-index: 1400;
  height: 2px; width: 0;
  background: linear-gradient(90deg, var(--accent, var(--gold)), var(--accent-glow, var(--gold-glow)));
  border-radius: 0 99px 99px 0;
  pointer-events: none;
}

/* --- RÃ©vÃ©lations au scroll --- */
.rv { opacity: 0; transform: translateY(18px) scale(.985); transition: opacity .65s var(--ease), transform .65s var(--ease); will-change: opacity, transform; }
.rv.in-view { opacity: 1; transform: perspective(900px) rotateX(var(--rx, 0deg)) rotateY(var(--ry, 0deg)) translateY(0); }

/* --- Tilt 3D + halo lumineux sur les cartes --- */
.rf-card, .stage-card, .bento-card, .rf-autre {
  position: relative;
  transform: perspective(900px) rotateX(var(--rx, 0deg)) rotateY(var(--ry, 0deg)) translateY(var(--ty, 0px));
  transition: transform .22s var(--ease), border-color .22s, box-shadow .22s, opacity .65s var(--ease);
}
.rf-card:hover, .rf-card:focus-visible, .stage-card:hover, .bento-card:hover, .rf-autre:hover {
  --ty: -4px;
  transform: perspective(900px) rotateX(var(--rx, 0deg)) rotateY(var(--ry, 0deg)) translateY(var(--ty));
}
.rf-card:active { --ty: 1px; transform: perspective(900px) rotateX(0deg) rotateY(0deg) translateY(var(--ty)); }

.rf-card::after, .stage-card::after, .bento-card::after, .rf-autre::after {
  content: ''; position: absolute; inset: 0; z-index: 1;
  pointer-events: none; opacity: 0;
  background: radial-gradient(420px circle at var(--gx, 50%) var(--gy, 50%), var(--glow-curseur, rgba(255, 255, 255, .07)), transparent 62%);
  border-radius: inherit;
  transition: opacity .35s var(--ease);
}
.rf-card:hover::after, .stage-card:hover::after, .bento-card:hover::after, .rf-autre:hover::after { opacity: 1; }
.rf-card > *, .stage-card > *, .rf-autre > * { position: relative; z-index: 2; }

/* --- Brillance qui balaie les boutons principaux --- */
.btn-primary { position: relative; overflow: hidden; }
.btn-primary::before {
  content: ''; position: absolute; inset: 0; z-index: 1;
  background: linear-gradient(105deg, transparent 42%, rgba(255, 255, 255, .28) 50%, transparent 58%);
  transform: translateX(-130%) skewX(-8deg);
  transition: transform .65s var(--ease);
  pointer-events: none;
}
.btn-primary:hover::before { transform: translateX(130%) skewX(-8deg); }
.btn-primary > * { position: relative; z-index: 2; }

/* --- Orbes : dÃ©rive lente permanente --- */
@keyframes deriver {
  0% { transform: translate(0, 0) scale(1); }
  50% { transform: translate(-34px, 26px) scale(1.08); }
  100% { transform: translate(18px, -22px) scale(.95); }
}
.fx-orbe--a { animation: deriver 17s ease-in-out infinite alternate; }
.fx-orbe--b { animation: deriver 21s ease-in-out infinite alternate-reverse; }
.fx-orbe--c { animation: deriver 14s ease-in-out infinite alternate; }

/* --- Hero : apparition en cascade --- */
.hero-copy > .fade-in:nth-child(1) { transition-delay: .05s; }
.hero-copy > .fade-in:nth-child(2) { transition-delay: .14s; }
.hero-copy > .fade-in:nth-child(3) { transition-delay: .23s; }
.hero-copy > .fade-in:nth-child(4) { transition-delay: .32s; }
.hero-copy > .fade-in:nth-child(5) { transition-delay: .41s; }
.hero-stage.fade-in { transition-delay: .3s; }
.bento-main.fade-in { transition-delay: .05s; }
.bento-a.fade-in { transition-delay: .2s; }
.bento-b.fade-in { transition-delay: .28s; }
.bento-c.fade-in { transition-delay: .36s; }

/* --- Modale : contenu en cascade Ã  l'ouverture --- */
.rf-fiche:not([hidden]) .rf-fiche-corps > * { animation: fiche-item .55s var(--ease) backwards; }
.rf-fiche:not([hidden]) .rf-fiche-corps > *:nth-child(1) { animation-delay: .04s; }
.rf-fiche:not([hidden]) .rf-fiche-corps > *:nth-child(2) { animation-delay: .09s; }
.rf-fiche:not([hidden]) .rf-fiche-corps > *:nth-child(3) { animation-delay: .14s; }
.rf-fiche:not([hidden]) .rf-fiche-corps > *:nth-child(4) { animation-delay: .19s; }
.rf-fiche:not([hidden]) .rf-fiche-corps > *:nth-child(5) { animation-delay: .24s; }
.rf-fiche:not([hidden]) .rf-fiche-corps > *:nth-child(6) { animation-delay: .29s; }
.rf-fiche:not([hidden]) .rf-fiche-corps > *:nth-child(7) { animation-delay: .34s; }
.rf-fiche:not([hidden]) .rf-fiche-corps > *:nth-child(8) { animation-delay: .39s; }
.rf-fiche:not([hidden]) .rf-fiche-corps > *:nth-child(n+9) { animation-delay: .44s; }
@keyframes fiche-item { from { opacity: 0; transform: translateY(12px); } }

/* --- Titre du hero : soulignement animÃ© --- */
.page-hero .section-title, .hero-titre { position: relative; }

/* --- Marquee : lÃ©gÃ¨re accÃ©lÃ©ration au survol --- */
.marquee:hover .marquee-track { animation-duration: 22s; }

/* --- CTA sticky : pilotÃ© par le scroll (classe .show) --- */
@media (max-width: 760px) {
  .tg-sticky { display: none; }
  .tg-sticky.show { display: flex; }
}

/* --- Badge promo : pulsation discrÃ¨te --- */
@keyframes battre {
  0%, 100% { transform: scale(1); box-shadow: 0 4px 14px var(--gold-glow, rgba(0,0,0,.3)); }
  50% { transform: scale(1.045); box-shadow: 0 6px 20px var(--gold-glow, rgba(0,0,0,.3)); }
}
.rf-badge-promo { animation: battre 2.6s ease-in-out infinite; }

/* --- Process : numÃ©ro qui glisse au survol --- */
.process-step .step-num { transition: transform .3s var(--ease), background .3s; }
.process-step:hover .step-num { transform: translateX(4px) rotate(-4deg); }

/* --- Lien footer : flÃ¨che qui avance --- */
.footer-col a { transition: color .2s, padding-left .25s var(--ease); }

/* ==========================================================================
   DÉTAILS PRO — grain, shimmer, micro-polish
   ========================================================================== */

/* --- Titre thème : dégradé animé en vague lente (bleu LBT / doré LBA) --- */
.titre-iris {
  background-size: 220% 100%;
  animation: iris-vague 2.2s ease-in-out infinite alternate;
}
@keyframes iris-vague {
  0% { background-position: 0% 50%; }
  100% { background-position: 100% 50%; }
}

/* --- Grain cinématographique ultra-subtil --- */
body::after {
  content: ''; position: fixed; inset: 0; z-index: 2000;
  pointer-events: none; opacity: .038;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='180' height='180'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.85' numOctaves='2' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
  background-size: 180px 180px;
}

/* --- Titres équilibrés (pas de mot orphelin) --- */
h1, h2, h3, .section-title, .hero-titre { text-wrap: balance; }
.section-desc, .hero-lead, .rf-desc { text-wrap: pretty; }

/* --- Focus clavier visible et soigné --- */
:focus-visible {
  outline: 2px solid var(--accent, var(--gold));
  outline-offset: 3px;
  border-radius: 6px;
}
.btn:focus-visible, .vc-filtre:focus-visible, .rf-card:focus-visible { outline-offset: 4px; }

/* --- Boutons : appui tactile --- */
.btn:active, .btn-primary:active, .adm-btn:active { transform: scale(.97); }

/* --- Cartes : liseré lumineux qui se déploie au survol --- */
.rf-card::before {
  content: ''; position: absolute; top: 0; left: 0; right: 0; height: 2px; z-index: 3;
  background: linear-gradient(90deg, transparent, var(--accent, var(--gold)), transparent);
  transform: scaleX(.25); opacity: 0;
  transition: transform .5s var(--ease), opacity .45s var(--ease);
  pointer-events: none;
}
.rf-card:hover::before, .rf-card:focus-visible::before { transform: scaleX(1); opacity: 1; }

/* --- Champs : icône qui s'illumine au focus --- */
.ctc-input-wrap > i { transition: color .25s var(--ease); }
.ctc-input-wrap:focus-within > i { color: var(--accent, var(--gold)); }

/* --- Logos : shimmer élégant pendant le chargement --- */
@keyframes shimmer {
  0% { background-position: -180% 0; }
  100% { background-position: 180% 0; }
}
.rf-logo.is-loading::before {
  content: ''; position: absolute; inset: 0; z-index: 0;
  background: linear-gradient(100deg, transparent 32%, rgba(0, 0, 0, .06) 50%, transparent 68%);
  background-size: 200% 100%;
  animation: shimmer 1.3s linear infinite;
}
.rf-logo.is-loading b { position: relative; z-index: 1; opacity: .35; animation: shimmer-opacity 1.3s linear infinite; }
@keyframes shimmer-opacity { 50% { opacity: .7; } }
html.js .rf-logo img, html.js .bento-logos img { opacity: 0; transition: opacity .45s var(--ease); }
html.js .rf-logo img.loaded, html.js .bento-logos img.loaded { opacity: 1; }

/* --- Lignes footer : soulignement qui glisse --- */
.footer-links a, .footer-col a { position: relative; }
.footer-links a::after, .footer-col a::after {
  content: ''; position: absolute; left: 0; bottom: -2px; height: 1.5px; width: 100%;
  background: var(--accent, var(--gold));
  transform: scaleX(0); transform-origin: right;
  transition: transform .35s var(--ease);
}
.footer-links a:hover::after, .footer-col a:hover::after { transform: scaleX(1); transform-origin: left; }

/* --- Chips du hero : léger aimant au survol --- */
.rf-chips span { transition: transform .25s var(--ease), border-color .25s; }
.rf-chips span:hover { transform: translateY(-2px); border-color: var(--accent, var(--gold)); }

/* --- Compteurs stats : police tabulaire (pas de saut de largeur) --- */
.stat-num, .rf-max, .rf-fiche-chiffres b { font-variant-numeric: tabular-nums; }