/* ═══════════════════════════════════════════════════════════
   TARA Institut — Animations CSS
   Classes utilitaires + keyframes
   ═══════════════════════════════════════════════════════════ */

/* ── Classes d'état initiales (GSAP les modifie au scroll) ── */
.anim-fade-up {
  opacity: 0;
  transform: translateY(32px);
}

.anim-fade-in {
  opacity: 0;
}

.anim-fade-left {
  opacity: 0;
  transform: translateX(32px);
}

.anim-fade-right {
  opacity: 0;
  transform: translateX(-32px);
}

.anim-scale {
  opacity: 0;
  transform: scale(0.94);
}

/* ── État visible (après animation GSAP) ── */
.anim-visible {
  opacity: 1 !important;
  transform: none !important;
}

/* ── Défilement logos infini (CSS pur) ── */
.logo-strip-track {
  display: flex;
  gap: var(--space-12);
  animation: logo-scroll 28s linear infinite;
  will-change: transform;
}

.logo-strip-track:hover { animation-play-state: paused; }

.logo-strip {
  position: relative;
  overflow: hidden;
  padding-block: var(--space-4);
  border-radius: var(--radius-full);
  background:
    linear-gradient(90deg, rgba(255,255,255,0.96), rgba(248,250,252,0.72), rgba(255,255,255,0.96));
  border: 1px solid var(--border-light);
  box-shadow: 0 18px 48px rgba(26, 37, 121, 0.08);
}

.logo-strip::before,
.logo-strip::after {
  content: '';
  position: absolute;
  top: 0;
  bottom: 0;
  width: min(150px, 24vw);
  z-index: 2;
  pointer-events: none;
  backdrop-filter: blur(5px);
  -webkit-backdrop-filter: blur(5px);
}

.logo-strip::before {
  left: 0;
  background: linear-gradient(90deg, var(--bg-base) 0%, rgba(255,255,255,0.80) 38%, transparent 100%);
}

.logo-strip::after {
  right: 0;
  background: linear-gradient(270deg, var(--bg-base) 0%, rgba(255,255,255,0.80) 38%, transparent 100%);
}

.logo-strip .logo-strip-track {
  gap: 0;
}

.partner-item {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding-inline: clamp(1.8rem, 4vw, 4rem);
  font-family: var(--font-heading);
  font-size: clamp(1rem, 1.4vw, 1.18rem);
  font-weight: 800;
  color: var(--text-muted);
  white-space: nowrap;
}

.partner-item__dot {
  width: 9px;
  height: 9px;
  border-radius: 50%;
  background: var(--color-red);
  box-shadow: 0 0 0 5px rgba(212, 35, 35, 0.10);
  flex-shrink: 0;
}

[data-theme="dark"] .logo-strip {
  background: linear-gradient(90deg, rgba(15,24,41,0.92), rgba(26,37,121,0.28), rgba(15,24,41,0.92));
}

[data-theme="dark"] .logo-strip::before {
  background: linear-gradient(90deg, var(--bg-base) 0%, rgba(15,24,41,0.84) 38%, transparent 100%);
}

[data-theme="dark"] .logo-strip::after {
  background: linear-gradient(270deg, var(--bg-base) 0%, rgba(15,24,41,0.84) 38%, transparent 100%);
}

@keyframes logo-scroll {
  from { transform: translateX(0); }
  to   { transform: translateX(-50%); }
}

/* ── Pulse doux (badge certifié, places limitées) ── */
.anim-pulse {
  animation: pulse-soft 2.5s ease-in-out infinite;
}

@keyframes pulse-soft {
  0%, 100% { box-shadow: 0 0 0 0 rgba(245, 158, 11, 0); }
  50%       { box-shadow: 0 0 0 6px rgba(245, 158, 11, 0.15); }
}

/* ── Rotate douce (icône loader, spinner) ── */
.anim-spin {
  animation: spin-smooth 1s linear infinite;
}

@keyframes spin-smooth {
  to { transform: rotate(360deg); }
}

/* ── Flottement hero visuel ── */
.anim-float {
  animation: float-hero 5s ease-in-out infinite;
}

@keyframes float-hero {
  0%, 100% { transform: translateY(0); }
  50%       { transform: translateY(-12px); }
}

/* ── Underline slide (liens navbar) ── */
.nav-link-underline {
  position: relative;
}

.nav-link-underline::after {
  content: '';
  position: absolute;
  bottom: -3px;
  left: 0;
  width: 0;
  height: 2px;
  background: var(--color-blue-mid);
  border-radius: var(--radius-full);
  transition: width var(--duration-base) var(--ease-smooth);
}

.nav-link-underline:hover::after,
.nav-link-underline.active::after {
  width: 100%;
}

/* ── Hover card lift ── */
.hover-lift {
  transition: transform var(--duration-base) var(--ease-smooth),
              box-shadow var(--duration-base) var(--ease-smooth);
}

.hover-lift:hover {
  transform: translateY(-6px);
  box-shadow: var(--shadow-lg);
}

/* ── Hover icon scale ── */
.hover-icon-scale .icon-wrap,
.hover-icon-scale svg {
  transition: transform var(--duration-base) var(--ease-bounce),
              color var(--duration-fast) var(--ease-out);
}

.hover-icon-scale:hover .icon-wrap {
  transform: scale(1.1);
  background: var(--color-blue-mid);
  color: #fff;
}

/* ── SVG path draw (icônes features) ── */
.anim-draw svg path,
.anim-draw svg circle,
.anim-draw svg polyline {
  stroke-dasharray: 300;
  stroke-dashoffset: 300;
  transition: stroke-dashoffset 0.8s var(--ease-smooth);
}

.anim-draw.drawn svg path,
.anim-draw.drawn svg circle,
.anim-draw.drawn svg polyline {
  stroke-dashoffset: 0;
}

/* ── Dark mode toggle ── */
.theme-toggle-sun,
.theme-toggle-moon {
  transition: opacity var(--duration-fast) var(--ease-out),
              transform var(--duration-base) var(--ease-smooth);
}

[data-theme="light"] .theme-toggle-moon { opacity: 0; transform: rotate(90deg) scale(0); position: absolute; }
[data-theme="light"] .theme-toggle-sun  { opacity: 1; transform: rotate(0) scale(1); }
[data-theme="dark"]  .theme-toggle-sun  { opacity: 0; transform: rotate(-90deg) scale(0); position: absolute; }
[data-theme="dark"]  .theme-toggle-moon { opacity: 1; transform: rotate(0) scale(1); }

/* ── Accordion FAQ ── */
.faq-body {
  overflow: hidden;
  height: 0;
}

.faq-chevron {
  transition: transform var(--duration-base) var(--ease-smooth);
}

.faq-item.open .faq-chevron {
  transform: rotate(180deg);
}

/* ── Skeleton loader (pour cards sessions) ── */
.skeleton {
  background: linear-gradient(
    90deg,
    var(--bg-surface-2) 25%,
    var(--bg-surface-3) 50%,
    var(--bg-surface-2) 75%
  );
  background-size: 200% 100%;
  animation: skeleton-wave 1.6s ease-in-out infinite;
  border-radius: var(--radius-sm);
}

@keyframes skeleton-wave {
  from { background-position: 200% 0; }
  to   { background-position: -200% 0; }
}

/* ── Transition page (fondu global) ── */
body {
  animation: page-enter 400ms var(--ease-smooth) both;
}

/* NB : aucun transform ici. Un transform persistant sur <body> (anim en
   fill-mode "both") fait du body le bloc conteneur des elements
   position:fixed — le bouton WhatsApp se retrouvait alors ancre au bas
   du document (footer) au lieu du bas de l'ecran. On anime l'opacite. */
@keyframes page-enter {
  from { opacity: 0; }
  to   { opacity: 1; }
}

/* ── Notification toast ── */
.toast {
  position: fixed;
  bottom: 90px;
  right: 28px;
  padding: 14px 20px;
  background: var(--bg-surface);
  border: 1px solid var(--border-light);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-lg);
  font-size: var(--text-sm);
  font-weight: var(--weight-medium);
  display: flex;
  align-items: center;
  gap: var(--space-3);
  z-index: var(--z-toast);
  opacity: 0;
  transform: translateY(12px);
  transition: opacity var(--duration-base) var(--ease-smooth),
              transform var(--duration-base) var(--ease-smooth);
  pointer-events: none;
}

.toast.visible {
  opacity: 1;
  transform: translateY(0);
  pointer-events: auto;
}

/* ═══════════════════════════════════════════════════════════
   CUSTOM CURSOR
   ═══════════════════════════════════════════════════════════ */
.cursor-dot {
  position: fixed;
  pointer-events: none;
  z-index: 9998;
  width: 7px;
  height: 7px;
  background: var(--color-red);
  border-radius: 50%;
  transform: translate(-50%, -50%);
  transition: width 0.15s ease, height 0.15s ease, background 0.2s ease, opacity 0.2s ease;
  will-change: left, top;
}

.cursor-ring {
  position: fixed;
  pointer-events: none;
  z-index: 9997;
  width: 34px;
  height: 34px;
  border: 1.5px solid rgba(212, 35, 35, 0.45);
  border-radius: 50%;
  transform: translate(-50%, -50%);
  transition: width 0.4s cubic-bezier(0.16, 1, 0.3, 1),
              height 0.4s cubic-bezier(0.16, 1, 0.3, 1),
              border-color 0.3s ease,
              background 0.3s ease,
              opacity 0.3s ease;
  will-change: left, top;
}

.cursor-ring.is-hovering {
  width: 58px;
  height: 58px;
  border-color: rgba(212, 35, 35, 0.7);
  background: rgba(212, 35, 35, 0.06);
}

.cursor-ring.is-clicking {
  width: 20px;
  height: 20px;
  background: rgba(212, 35, 35, 0.2);
}

.cursor-ring.is-text {
  width: 4px;
  height: 34px;
  border-radius: 2px;
  border-color: rgba(212, 35, 35, 0.9);
  background: rgba(212, 35, 35, 0.15);
}

@media (hover: none) {
  .cursor-dot, .cursor-ring { display: none !important; }
}

/* ═══════════════════════════════════════════════════════════
   SCROLL PROGRESS BAR
   ═══════════════════════════════════════════════════════════ */
.scroll-progress {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 3px;
  background: linear-gradient(90deg, var(--color-red) 0%, #E87070 50%, var(--color-navy-light) 100%);
  transform-origin: left center;
  transform: scaleX(0);
  z-index: 9999;
  pointer-events: none;
}

/* ═══════════════════════════════════════════════════════════
   GRADIENT TEXT
   ═══════════════════════════════════════════════════════════ */
.text-gradient {
  background: linear-gradient(135deg, var(--color-navy) 0%, var(--color-red) 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.text-gradient--red {
  background: linear-gradient(135deg, var(--color-red-dark) 0%, #FF6B6B 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.text-gradient--amber {
  background: linear-gradient(135deg, #B35A00 0%, #F0920A 50%, #FFBF3F 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.text-gradient--emerald {
  background: linear-gradient(135deg, #024A36 0%, #059669 50%, #34D399 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.text-gradient--gold {
  background: linear-gradient(135deg, #8B6500 0%, #C8920A 45%, #FFD060 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  background-size: 200% 200%;
  animation: gradient-shift 4s ease-in-out infinite;
}

@keyframes gradient-shift {
  0%, 100% { background-position: 0% 50%; }
  50%       { background-position: 100% 50%; }
}

/* ═══════════════════════════════════════════════════════════
   ANIMATED ORBS (fond flottant)
   ═══════════════════════════════════════════════════════════ */
.orb {
  position: absolute;
  border-radius: 50%;
  filter: blur(64px);
  pointer-events: none;
  will-change: transform;
}

/* Charte TARA — uniquement rouge & bleu marine */
.orb--red,
.orb--amber,
.orb--gold,
.orb--rose  { background: radial-gradient(circle, rgba(212,35,35,0.50) 0%, transparent 70%);
              animation: orb-drift-1 18s ease-in-out infinite; }
.orb--navy,
.orb--emerald,
.orb--violet{ background: radial-gradient(circle, rgba(35,51,160,0.58) 0%, transparent 70%);
              animation: orb-drift-2 22s ease-in-out infinite; }
.orb--gold  { animation: orb-drift-2 24s ease-in-out infinite; }
.orb--emerald { animation: orb-drift-1 16s ease-in-out infinite reverse; }
.orb--violet  { animation: orb-drift-3 19s ease-in-out infinite; }
.orb--rose    { animation: orb-drift-1 21s ease-in-out infinite alternate; }

@keyframes orb-drift-1 {
  0%, 100% { transform: translate(0, 0) scale(1); }
  33%       { transform: translate(38px, -28px) scale(1.08); }
  66%       { transform: translate(-18px, 22px) scale(0.95); }
}
@keyframes orb-drift-2 {
  0%, 100% { transform: translate(0, 0) scale(1); }
  40%       { transform: translate(-32px, 18px) scale(1.06); }
  70%       { transform: translate(24px, -36px) scale(0.97); }
}
@keyframes orb-drift-3 {
  0%, 100% { transform: translate(0, 0) scale(1); }
  30%       { transform: translate(46px, 26px) scale(1.10); }
  65%       { transform: translate(-28px, -18px) scale(0.93); }
}

/* ═══════════════════════════════════════════════════════════
   NOISE TEXTURE OVERLAY
   ═══════════════════════════════════════════════════════════ */
.noise-overlay {
  position: absolute;
  inset: 0;
  pointer-events: none;
  opacity: 0.04;
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 256 256' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.72' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
  background-size: 180px 180px;
}

/* ═══════════════════════════════════════════════════════════
   WORD REVEAL (clip-path)
   ═══════════════════════════════════════════════════════════ */
.reveal-word {
  display: inline-block;
  overflow: hidden;
  vertical-align: bottom;
  line-height: 1.15;
}

.reveal-word__inner {
  display: inline-block;
  transform: translateY(112%);
  transition: transform 0.65s cubic-bezier(0.16, 1, 0.3, 1);
}

.reveal-word.revealed .reveal-word__inner {
  transform: translateY(0);
}

/* ═══════════════════════════════════════════════════════════
   MARQUEE INFINI
   ═══════════════════════════════════════════════════════════ */
.marquee-wrapper {
  overflow: hidden;
  -webkit-mask-image: linear-gradient(90deg, transparent 0%, #000 8%, #000 92%, transparent 100%);
  mask-image: linear-gradient(90deg, transparent 0%, #000 8%, #000 92%, transparent 100%);
}

.marquee-track {
  display: flex;
  gap: var(--space-8);
  animation: marquee-scroll 32s linear infinite;
  will-change: transform;
}

.marquee-track--reverse {
  animation-direction: reverse;
  animation-duration: 38s;
}

.marquee-wrapper:hover .marquee-track {
  animation-play-state: paused;
}

@keyframes marquee-scroll {
  from { transform: translateX(0); }
  to   { transform: translateX(-50%); }
}

/* ═══════════════════════════════════════════════════════════
   GRADIENT BORDER (carte en relief)
   ═══════════════════════════════════════════════════════════ */
.gradient-border-card {
  position: relative;
  border-radius: var(--radius-xl);
  background-clip: padding-box;
}

.gradient-border-card::before {
  content: '';
  position: absolute;
  inset: 0;
  border-radius: inherit;
  padding: 1.5px;
  background: linear-gradient(135deg, var(--color-red), var(--color-navy-light), var(--color-red-light));
  background-size: 300% 300%;
  animation: gradient-border-anim 5s ease infinite;
  -webkit-mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0);
  -webkit-mask-composite: xor;
  mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0);
  mask-composite: exclude;
  opacity: 0;
  transition: opacity var(--duration-base);
  pointer-events: none;
}

.gradient-border-card:hover::before { opacity: 1; }

@keyframes gradient-border-anim {
  0%   { background-position: 0% 50%; }
  50%  { background-position: 100% 50%; }
  100% { background-position: 0% 50%; }
}

/* ═══════════════════════════════════════════════════════════
   GLOW EFFECTS
   ═══════════════════════════════════════════════════════════ */
.glow-pulse-red  { animation: glow-pulse-r 2.8s ease-in-out infinite; }
.glow-pulse-navy { animation: glow-pulse-n 2.8s ease-in-out infinite; }
.glow-pulse-amber{ animation: glow-pulse-a 2.8s ease-in-out infinite; }

@keyframes glow-pulse-r {
  0%, 100% { box-shadow: 0 0 0 0 rgba(212,35,35,0); }
  50%       { box-shadow: 0 0 28px 8px rgba(212,35,35,0.28); }
}
@keyframes glow-pulse-n {
  0%, 100% { box-shadow: 0 0 0 0 rgba(26,37,121,0); }
  50%       { box-shadow: 0 0 28px 8px rgba(26,37,121,0.32); }
}
@keyframes glow-pulse-a {
  0%, 100% { box-shadow: 0 0 0 0 rgba(196,92,0,0); }
  50%       { box-shadow: 0 0 28px 8px rgba(196,92,0,0.28); }
}

/* ═══════════════════════════════════════════════════════════
   SHIMMER BUTTON
   ═══════════════════════════════════════════════════════════ */
.btn--shimmer {
  position: relative;
  overflow: hidden;
}

.btn--shimmer::after {
  content: '';
  position: absolute;
  top: -50%;
  left: -65%;
  width: 36%;
  height: 200%;
  background: rgba(255, 255, 255, 0.22);
  transform: skewX(-22deg);
  animation: btn-shimmer 3.5s ease-in-out infinite;
  pointer-events: none;
}

@keyframes btn-shimmer {
  0%   { left: -65%; }
  60%  { left: 125%; }
  100% { left: 125%; }
}

/* ═══════════════════════════════════════════════════════════
   CARD HOVER PREMIUM (CSS pur — robuste, ne casse rien)
   ═══════════════════════════════════════════════════════════ */
.lift-card {
  transition: transform 0.45s cubic-bezier(0.16, 1, 0.3, 1),
              box-shadow 0.45s cubic-bezier(0.16, 1, 0.3, 1),
              border-color 0.3s ease;
  will-change: transform;
}

.lift-card:hover {
  transform: translateY(-8px);
  box-shadow: var(--shadow-xl);
}

/* ═══════════════════════════════════════════════════════════
   ANIMATED UNDERLINE (liens décoratifs)
   ═══════════════════════════════════════════════════════════ */
.animated-underline {
  position: relative;
  display: inline-block;
}

.animated-underline::after {
  content: '';
  position: absolute;
  bottom: -3px;
  left: 0;
  width: 100%;
  height: 2px;
  border-radius: var(--radius-full);
  background: currentColor;
  transform: scaleX(0);
  transform-origin: right;
  transition: transform 0.4s cubic-bezier(0.16, 1, 0.3, 1);
}

.animated-underline:hover::after {
  transform: scaleX(1);
  transform-origin: left;
}

/* ═══════════════════════════════════════════════════════════
   FLOATING BADGE ANIMATION
   ═══════════════════════════════════════════════════════════ */
@keyframes badge-float {
  0%, 100% { transform: translateY(0) rotate(-2deg); }
  50%       { transform: translateY(-10px) rotate(2deg); }
}

.anim-badge-float {
  animation: badge-float 4s ease-in-out infinite;
}

.anim-badge-float-delay {
  animation: badge-float 4s ease-in-out infinite;
  animation-delay: -2s;
}

/* ═══════════════════════════════════════════════════════════
   DECORATIVE GEOMETRIC SHAPES
   ═══════════════════════════════════════════════════════════ */
.deco-ring {
  position: absolute;
  border-radius: 50%;
  border: 1px solid rgba(255,255,255,0.06);
  pointer-events: none;
}

.deco-ring--sm  { width: 120px; height: 120px; }
.deco-ring--md  { width: 220px; height: 220px; }
.deco-ring--lg  { width: 380px; height: 380px; }
.deco-ring--xl  { width: 560px; height: 560px; }

.deco-ring--spin-slow  { animation: ring-spin  40s linear infinite; }
.deco-ring--spin-med   { animation: ring-spin  25s linear infinite reverse; }
.deco-ring--spin-fast  { animation: ring-spin  15s linear infinite; }

@keyframes ring-spin {
  to { transform: rotate(360deg); }
}

/* Dot décoratif */
.deco-dot {
  position: absolute;
  border-radius: 50%;
  pointer-events: none;
}

/* ═══════════════════════════════════════════════════════════
   CARD SHINE HOVER (sans JS — pointer-events: none obligatoire)
   ═══════════════════════════════════════════════════════════ */
.shine-card {
  position: relative;
}

.shine-card::after {
  content: '';
  position: absolute;
  inset: 0;
  border-radius: inherit;
  pointer-events: none;
  background: linear-gradient(115deg, transparent 38%, rgba(255,255,255,0.10) 50%, transparent 62%);
  transform: translateX(-110%);
  transition: transform 0.7s var(--ease-smooth);
  z-index: 2;
}

.shine-card:hover::after {
  transform: translateX(110%);
}

/* ═══════════════════════════════════════════════════════════
   MAGNETIC BUTTON INDICATOR
   ═══════════════════════════════════════════════════════════ */
[data-magnetic] {
  transition: transform 0.4s cubic-bezier(0.16, 1, 0.3, 1);
}

/* ═══════════════════════════════════════════════════════════
   SECTION HEADING ACCENT LINE (animée au scroll)
   ═══════════════════════════════════════════════════════════ */
.section-accent-line {
  display: block;
  width: 0;
  height: 3px;
  border-radius: var(--radius-full);
  background: linear-gradient(90deg, var(--color-red), var(--color-navy-light));
  transition: width 0.8s cubic-bezier(0.16, 1, 0.3, 1);
  margin-top: var(--space-4);
}

.section-accent-line.revealed { width: 80px; }

/* ═══════════════════════════════════════════════════════════
   TAG TICKER (bande défilante)
   ═══════════════════════════════════════════════════════════ */
.ticker-section {
  background: var(--color-navy-dark);
  padding-block: 14px;
  overflow: hidden;
  border-top: 1px solid rgba(255,255,255,0.06);
  border-bottom: 1px solid rgba(255,255,255,0.06);
}

[data-theme="dark"] .ticker-section {
  background: #020714;
}

.ticker-item {
  display: inline-flex;
  align-items: center;
  gap: var(--space-3);
  color: rgba(241,245,249,0.55);
  font-size: 0.8rem;
  font-weight: var(--weight-semibold);
  letter-spacing: 0.06em;
  text-transform: uppercase;
  white-space: nowrap;
  flex-shrink: 0;
}

.ticker-item strong {
  color: rgba(241,245,249,0.9);
}

.ticker-sep {
  display: inline-block;
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: var(--color-red);
  flex-shrink: 0;
}
