/* Trad'Art — Intro animée officielle « THE ART OF THE MARKETS » (brief CEO 2026-11-30, NON PUBLIÉE).
 * Module isolé : tous les sélecteurs sont préfixés .ta-intro / html.ta-intro-on. Aucun style du site n'est modifié.
 * Durée : 8 s maximum (signature lisible à pleine opacité de 7,0 à 7,55 s, puis fondu de sortie 7,55 → 8,0 s). Toutes les durées et tous les délais sont multipliés par --k (= durée choisie / 8 s),
 * réglé par site/js/tradart-intro.js (CONFIG.durationMs). Palette officielle de l'intro :
 *   Deep Navy #071426 (fond) · Trading Blue #123B65 (graphiques) · White #FFFFFF (texte) · Metallic Gold #C6A45A (accents).
 * Le logo officiel (assets/branding/tradart-logo-square.jpg) n'est jamais filtré ni redessiné : seuls son apparition
 * (masque, opacité, échelle) et son cadre sont animés ; à la fin il est affiché tel quel.
 * Filet de sécurité : même si le JavaScript s'arrête, l'animation CSS taIntroOut rend l'écran transparent et
 * non cliquable à 8 s (pointer-events:none + visibility:hidden) : l'accès au site n'est jamais bloqué.
 */
html.ta-intro-on, html.ta-intro-on body { overflow: hidden !important; }

.ta-intro {
  --k: 1;
  --navy: #071426; --blue: #123B65; --white: #FFFFFF; --gold: #C6A45A;
  --blue-line: rgba(18, 59, 101, .9); --blue-soft: #4E7BAA;
  position: fixed; inset: 0; z-index: 2147483000;
  background: var(--navy); color: var(--white);
  overflow: hidden; contain: strict;
  font-family: Inter, system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  -webkit-font-smoothing: antialiased;
  touch-action: none; overscroll-behavior: contain;
  animation: taIntroOut calc(.45s * var(--k)) cubic-bezier(.4, 0, .2, 1) calc(7.55s * var(--k)) forwards;
}
.ta-intro *, .ta-intro *::before, .ta-intro *::after { box-sizing: border-box; }
.ta-intro.is-closing { animation: none; opacity: 0; visibility: hidden; pointer-events: none; transition: opacity .22s ease, visibility 0s linear .22s; }

/* ---------- Scène 1 : fond, grille, caméra ---------- */
.ta-intro__bg { position: absolute; inset: 0;
  background: radial-gradient(120% 80% at 50% 45%, rgba(18, 59, 101, .38) 0%, rgba(7, 20, 38, 0) 62%), var(--navy); }
.ta-intro__stage { position: absolute; inset: 0; transform-origin: 50% 50%;
  animation: taPush calc(4.8s * var(--k)) cubic-bezier(.25, .1, .25, 1) 0s both; }
.ta-intro__chartwrap { position: absolute; inset: 0; transform-origin: 50% 50%;
  animation: taConverge calc(1.2s * var(--k)) cubic-bezier(.65, 0, .35, 1) calc(4.8s * var(--k)) both; }
.ta-intro__svg { position: absolute; inset: 0; width: 100%; height: 100%; display: block; overflow: visible; }

.ta-intro .g-grid line { stroke: #17487A; opacity: .85;
  stroke-dasharray: 1 1; stroke-dashoffset: 1;
  animation: taDraw calc(1s * var(--k)) cubic-bezier(.3, 0, .2, 1) calc(var(--d) * var(--k)) forwards; }
.ta-intro .g-grid line.major { stroke: #235C94; opacity: 1; }
/* Balayage lumineux discret (scène 1) */
.ta-intro__scan { position: absolute; left: 0; right: 0; top: 0; height: 22vh; pointer-events: none; opacity: 0;
  background: linear-gradient(180deg, rgba(78, 123, 170, 0), rgba(78, 123, 170, .16) 70%, rgba(198, 164, 90, .35) 100%);
  animation: taScan calc(1.6s * var(--k)) cubic-bezier(.4, 0, .2, 1) calc(.1s * var(--k)) forwards; }
.ta-intro__scan::after { content: ""; position: absolute; left: 0; right: 0; bottom: 0; height: 1px; background: rgba(198, 164, 90, .55); }
.ta-intro .g-ticks text, .ta-intro .g-hud-in text { fill: var(--blue-soft); font-family: "Space Grotesk", Inter, system-ui, sans-serif; letter-spacing: .12em; }
.ta-intro .g-ticks text { opacity: 0; animation: taFade calc(.6s * var(--k)) ease calc(var(--d) * var(--k)) forwards; }

/* ---------- Scène 2 : action du prix ---------- */
.ta-intro .c { opacity: 0; transform-box: fill-box; transform-origin: 50% 100%;
  animation: taCandle calc(.34s * var(--k)) cubic-bezier(.2, .8, .2, 1) calc(var(--d) * var(--k)) forwards; }
.ta-intro .c.dn { transform-origin: 50% 0%; }
.ta-intro .c line { stroke-width: 1.4; vector-effect: non-scaling-stroke; }
.ta-intro .c.up rect { fill: var(--white); }
.ta-intro .c.up line { stroke: var(--white); }
.ta-intro .c.dn rect { fill: var(--blue); stroke: var(--blue-soft); stroke-width: 1; vector-effect: non-scaling-stroke; }
.ta-intro .c.dn line { stroke: var(--blue-soft); }
.ta-intro .c.gold rect { stroke: var(--gold); stroke-width: 1.4; }
.ta-intro .c.gold line { stroke: var(--gold); }
.ta-intro .vol rect { fill: var(--blue); opacity: 0; transform-box: fill-box; transform-origin: 50% 100%;
  animation: taCandle calc(.34s * var(--k)) ease-out calc(var(--d) * var(--k)) forwards; }
.ta-intro .pline { fill: none; stroke: rgba(255, 255, 255, .28);
  stroke-dasharray: 1 1; stroke-dashoffset: 1;
  animation: taDraw calc(1.8s * var(--k)) linear calc(1.25s * var(--k)) forwards; }

/* ---------- Scène 3 : flux institutionnel (annotations) ---------- */
.ta-intro .ann { opacity: 0; animation: taAnn calc(1.75s * var(--k)) cubic-bezier(.2, .7, .2, 1) calc(var(--d) * var(--k)) forwards; }
.ta-intro .ann text { font-family: "Space Grotesk", Inter, system-ui, sans-serif; font-weight: 600; letter-spacing: .16em; }
.ta-intro .ann-liq line { stroke: rgba(255, 255, 255, .7); stroke-width: 1; stroke-dasharray: 5 5; vector-effect: non-scaling-stroke; }
.ta-intro .ann-liq text { fill: rgba(255, 255, 255, .85); }
.ta-intro .ann-ob rect { fill: rgba(18, 59, 101, .55); stroke: var(--blue-soft); stroke-width: 1; vector-effect: non-scaling-stroke; }
.ta-intro .ann-ob text { fill: #8FB0D6; }
.ta-intro .ann-fvg rect { fill: rgba(198, 164, 90, .14); stroke: rgba(198, 164, 90, .75); stroke-width: 1; vector-effect: non-scaling-stroke; }
.ta-intro .ann-fvg text { fill: var(--gold); }
.ta-intro .ann-mss line { stroke: var(--white); stroke-width: 1.2; vector-effect: non-scaling-stroke; }
.ta-intro .ann-mss text { fill: var(--white); }

/* En-tête discret (scènes 1-3) */
.ta-intro__hud { position: absolute; left: clamp(16px, 4vw, 48px); top: clamp(16px, 3.5vh, 40px); margin: 0; max-width: calc(100% - 180px);
  font: 600 11px/1.6 "Space Grotesk", Inter, system-ui, sans-serif; letter-spacing: .22em; color: #6E8FB5; text-transform: uppercase;
  opacity: 0; animation: taHud calc(4.6s * var(--k)) ease calc(.35s * var(--k)) forwards; }
.ta-intro__hud b { color: var(--gold); font-weight: 600; }
.ta-intro__hud span { display: block; }

/* ---------- Scènes 4 et 5 : symbole et révélation ---------- */
.ta-intro__brand { position: absolute; inset: 0; display: flex; flex-direction: column; align-items: center; justify-content: center;
  padding: 72px 16px 64px; text-align: center; pointer-events: none; }
.ta-intro__logo { --s: min(46vmin, 400px); position: relative; width: var(--s); height: var(--s); margin: 0; flex: none; }
.ta-intro__glow { position: absolute; inset: -32%; border-radius: 50%;
  background: radial-gradient(closest-side, rgba(18, 59, 101, .85), rgba(18, 59, 101, 0));
  opacity: 0; animation: taFade calc(1.2s * var(--k)) ease calc(4.9s * var(--k)) forwards; }
.ta-intro__frame { position: absolute; inset: -9px; border: 1px solid var(--gold); border-radius: 4%; opacity: .9;
  clip-path: inset(0 100% 100% 0);
  animation: taFrame calc(1.1s * var(--k)) cubic-bezier(.65, 0, .35, 1) calc(4.9s * var(--k)) forwards, taFrameDim calc(.8s * var(--k)) ease calc(6.6s * var(--k)) forwards; }
.ta-intro__img { position: relative; display: block; width: 100%; height: 100%; border-radius: 3%; overflow: hidden;
  box-shadow: 0 24px 60px rgba(0, 0, 0, .55), 0 0 0 1px rgba(198, 164, 90, .35);
  opacity: 0; transform: scale(.94);
  -webkit-mask-image: linear-gradient(115deg, #000 42%, rgba(0, 0, 0, 0) 58%); mask-image: linear-gradient(115deg, #000 42%, rgba(0, 0, 0, 0) 58%);
  -webkit-mask-size: 320% 100%; mask-size: 320% 100%; -webkit-mask-repeat: no-repeat; mask-repeat: no-repeat;
  -webkit-mask-position: 100% 0; mask-position: 100% 0;
  animation: taReveal calc(1.4s * var(--k)) cubic-bezier(.45, 0, .2, 1) calc(5.05s * var(--k)) forwards; }
/* Le fichier officiel est affiché sans filtre, sans recoloration ni recadrage de son contenu (object-fit: contain). */
.ta-intro__img img { display: block; width: 100%; height: 100%; object-fit: contain; }
/* Reflet doré qui balaie le cadre une fois (au-dessus du logo, jamais dans ses pixels). */
.ta-intro__img::after { content: ""; position: absolute; inset: 0; pointer-events: none;
  background: linear-gradient(115deg, rgba(198, 164, 90, 0) 40%, rgba(198, 164, 90, .28) 50%, rgba(198, 164, 90, 0) 60%);
  background-size: 320% 100%; background-position: 100% 0; opacity: 0;
  animation: taSheen calc(1.3s * var(--k)) ease calc(5.5s * var(--k)) forwards; }

/* Signature officielle reprise EN TEXTE sous le logo (décision CEO 2026-11-30) : lisibilité sur mobile ; l'image du logo n'est pas modifiée. */
.ta-intro__sig { margin: clamp(12px, 2vh, 18px) 0 0; font: 600 clamp(11px, 1.5vmin, 13px)/1.3 Inter, system-ui, sans-serif; letter-spacing: .22em; padding-left: .22em;
  color: var(--gold); opacity: 0; animation: taFadeUp calc(.4s * var(--k)) ease calc(6.1s * var(--k)) forwards; }
.ta-intro__name { margin: clamp(12px, 2.2vh, 22px) 0 0; font: 700 clamp(26px, 4.4vmin, 44px)/1 "Space Grotesk", Inter, system-ui, sans-serif;
  letter-spacing: .34em; padding-left: .34em; color: var(--white);
  opacity: 0; animation: taName calc(.6s * var(--k)) cubic-bezier(.2, .7, .2, 1) calc(6.3s * var(--k)) forwards; }
.ta-intro__rule { display: block; width: clamp(80px, 14vmin, 140px); height: 1px; margin: clamp(12px, 2vh, 18px) auto;
  background: linear-gradient(90deg, rgba(198, 164, 90, 0), var(--gold), rgba(198, 164, 90, 0));
  transform: scaleX(0); animation: taRule calc(.4s * var(--k)) ease calc(6.5s * var(--k)) forwards; }
.ta-intro__tagline { margin: 0; font: 600 clamp(12px, 1.7vmin, 15px)/1.5 Inter, system-ui, sans-serif; letter-spacing: .26em; color: rgba(255, 255, 255, .92);
  opacity: 0; animation: taFadeUp calc(.45s * var(--k)) ease calc(6.55s * var(--k)) forwards; }

/* ---------- Interface : passer, mention, progression ---------- */
.ta-intro__skip { position: absolute; top: max(14px, env(safe-area-inset-top)); right: max(14px, env(safe-area-inset-right)); z-index: 3;
  min-height: 44px; min-width: 44px; padding: 0 18px; border-radius: 999px; cursor: pointer;
  border: 1px solid rgba(198, 164, 90, .55); background: rgba(7, 20, 38, .72); color: var(--white);
  font: 600 12px/1 Inter, system-ui, sans-serif; letter-spacing: .2em;
  -webkit-backdrop-filter: blur(6px); backdrop-filter: blur(6px); transition: background .2s, border-color .2s; }
.ta-intro__skip:hover { background: rgba(18, 59, 101, .9); border-color: var(--gold); }
.ta-intro__skip:focus-visible { outline: 2px solid var(--gold); outline-offset: 3px; }
.ta-intro__note { position: absolute; left: clamp(16px, 4vw, 48px); bottom: max(18px, calc(env(safe-area-inset-bottom) + 12px)); margin: 0; z-index: 2;
  font: 500 11px/1.4 Inter, system-ui, sans-serif; letter-spacing: .06em; color: rgba(174, 196, 222, .8);
  opacity: 0; animation: taNote calc(5.2s * var(--k)) ease calc(1.1s * var(--k)) forwards; }
.ta-intro__progress { position: absolute; left: 0; right: 0; bottom: 0; height: 2px; background: rgba(18, 59, 101, .6); z-index: 2; }
.ta-intro__progress span { display: block; height: 100%; background: var(--gold); transform-origin: 0 50%; transform: scaleX(0);
  animation: taProgress calc(8s * var(--k)) linear 0s forwards; }

/* ---------- Images clés ---------- */
.ta-intro__tagline span { display: inline-block; }

@keyframes taPush { from { transform: scale(1); } to { transform: scale(1.07); } }
@keyframes taConverge { from { transform: scale(1); opacity: 1; filter: blur(0); }
  to { transform: scale(.62); opacity: .12; filter: blur(2px); } }
@keyframes taDraw { to { stroke-dashoffset: 0; } }
@keyframes taFade { to { opacity: 1; } }
@keyframes taScan { 0% { opacity: 0; transform: translateY(-22vh); } 20% { opacity: 1; } 85% { opacity: .8; } 100% { opacity: 0; transform: translateY(100vh); } }
@keyframes taCandle { from { opacity: 0; transform: scaleY(.05); } to { opacity: 1; transform: scaleY(1); } }
@keyframes taAnn { 0% { opacity: 0; transform: translateY(4px); } 18% { opacity: 1; transform: none; } 70% { opacity: 1; } 100% { opacity: .45; transform: none; } }
@keyframes taHud { 0% { opacity: 0; } 12% { opacity: 1; } 80% { opacity: 1; } 100% { opacity: 0; } }
@keyframes taNote { 0% { opacity: 0; } 8% { opacity: 1; } 85% { opacity: 1; } 100% { opacity: 0; } }
@keyframes taReveal { 0% { opacity: 0; transform: scale(.94); -webkit-mask-position: 100% 0; mask-position: 100% 0; }
  15% { opacity: 1; }
  100% { opacity: 1; transform: scale(1); -webkit-mask-position: 0 0; mask-position: 0 0; } }
@keyframes taSheen { 0% { opacity: 0; background-position: 100% 0; } 20% { opacity: 1; } 100% { opacity: 0; background-position: 0 0; } }
@keyframes taFrame { 50% { clip-path: inset(0 0 100% 0); } 100% { clip-path: inset(0 0 0 0); } }
@keyframes taFrameDim { to { opacity: .45; } }
@keyframes taName { from { opacity: 0; letter-spacing: .6em; } to { opacity: 1; letter-spacing: .34em; } }
@keyframes taRule { to { transform: scaleX(1); } }
@keyframes taFadeUp { from { opacity: 0; transform: translateY(6px); } to { opacity: 1; transform: none; } }
@keyframes taProgress { to { transform: scaleX(1); } }
@keyframes taIntroOut { to { opacity: 0; visibility: hidden; pointer-events: none; } }

/* ---------- Tablette ---------- */
@media (max-width: 1024px) {
  .ta-intro__logo { --s: min(52vmin, 360px); }
}
/* ---------- Mobile : effets coûteux retirés (flou, backdrop), identité conservée ---------- */
@media (max-width: 767px) {
  .ta-intro__logo { --s: min(84vw, 340px, 48vh); }
  .ta-intro__name { letter-spacing: .28em; padding-left: .28em; }
  @keyframes taName { from { opacity: 0; letter-spacing: .45em; } to { opacity: 1; letter-spacing: .28em; } }
  .ta-intro__tagline { letter-spacing: .14em; max-width: 300px; font-size: 12px; }
  .ta-intro__sig { font-size: 12px; letter-spacing: .14em; padding-left: .14em; }
  .ta-intro__hud span + span { display: none; }
  .ta-intro__hud { letter-spacing: .16em; font-size: 10px; }
  .ta-intro__skip { -webkit-backdrop-filter: none; backdrop-filter: none; background: rgba(7, 20, 38, .9); padding: 0 14px; font-size: 11px; }
  .ta-intro__note { right: 16px; }
  @keyframes taConverge { from { transform: scale(1); opacity: 1; } to { transform: scale(.62); opacity: .12; } }
}
@media (max-height: 520px) and (orientation: landscape) {
  .ta-intro__logo { --s: min(44vh, 300px); }
  .ta-intro__brand { padding-top: 48px; padding-bottom: 36px; }
}

/* ---------- Mouvement réduit : écran fixe (logo, nom, signature), fondu d'opacité seulement ---------- */
.ta-intro.is-reduced { animation: taIntroOut .4s ease calc(2.2s * var(--k)) forwards; }
.ta-intro.is-reduced *, .ta-intro.is-reduced *::after { animation: none !important; transition: none !important; }
.ta-intro.is-reduced .ta-intro__stage, .ta-intro.is-reduced .ta-intro__scan, .ta-intro.is-reduced .ta-intro__hud, .ta-intro.is-reduced .ta-intro__note, .ta-intro.is-reduced .ta-intro__progress { display: none; }
.ta-intro.is-reduced .ta-intro__img { opacity: 1; transform: none; -webkit-mask-image: none; mask-image: none; }
.ta-intro.is-reduced .ta-intro__sig, .ta-intro.is-reduced .ta-intro__name, .ta-intro.is-reduced .ta-intro__tagline, .ta-intro.is-reduced .ta-intro__glow { opacity: 1; }
.ta-intro.is-reduced .ta-intro__rule { transform: none; }
.ta-intro.is-reduced .ta-intro__frame { clip-path: none; opacity: .45; }
