/* Page Trading d'adrienicolo.com — s'ajoute APRÈS site.css.
 *
 * Reprise de l'aperçu « Givre » à la demande d'Adrien. Cette feuille pose
 * la page en noir, gris et blanc ; givre.css, chargée APRÈS, remplace le
 * blanc-lumière par le cyan glacé (faisceau, bougies, carte de fin). La
 * carte « verre » vit dans givre.css, commune à tout le site.
 */

/* Au gabarit du reste du site (thomasml.com) : 1 240 px, la même verticale
   que l'en-tête et le titre. */
.trading-page { position: relative; z-index: 1; width: 100%; max-width: var(--gabarit); margin: 0 auto; padding: 0 max(var(--marge), env(safe-area-inset-right)) 40px max(var(--marge), env(safe-area-inset-left)); }

/* ============ OUVERTURE ============ */
.t-ouverture { position: relative; text-align: center; padding-top: clamp(56px, 11vh, 110px); }
/* Le faisceau : une lumière qui tombe d'en haut sur le titre. */
.t-ouverture::before {
  content: ""; position: absolute; left: 50%; top: -120px; width: min(900px, 100%); height: 620px;
  transform: translateX(-50%); pointer-events: none; z-index: -1;
  background:
    radial-gradient(40% 55% at 50% 0%, rgba(255,255,255,0.20), transparent 70%),
    conic-gradient(from 180deg at 50% 0%, transparent 160deg, rgba(255,255,255,0.07) 172deg, rgba(255,255,255,0.10) 180deg, rgba(255,255,255,0.07) 188deg, transparent 200deg);
  filter: blur(8px);
  animation: respire 7s ease-in-out infinite;
}
.t-ouverture .surtitre { animation: monte 0.9s var(--ease) both; }
.t-ouverture .titre-page {
  font-size: clamp(3rem, 13vw, 7.5rem);
  /* Un reflet de lumière passe lentement sur les lettres. */
  background: linear-gradient(100deg, #9a9a9a 0%, #ffffff 30%, #d8d8d8 45%, #ffffff 52%, #9a9a9a 80%);
  background-size: 250% 100%;
  -webkit-background-clip: text; background-clip: text; color: transparent;
  animation: monte 1s var(--ease) both, reflet 9s ease-in-out 1s infinite;
}
.t-ouverture .titre-page .point { -webkit-text-fill-color: var(--gris-doux); animation: bat 2.4s ease-in-out infinite; }
.t-ouverture .accroche { animation: monte 1s 0.15s var(--ease) both; }

/* Le faisceau est plus large que l'écran au téléphone (140vw) : sans
   bornes, il poussait la page de 60 à 80 px vers la droite. overflow-x: clip
   le coupe sur les côtés SANS couper son halo vers le haut, ce que hidden
   ferait. Là où clip n'existe pas, il reste à la largeur de la colonne. */
@supports (overflow-x: clip) {
  .trading-page { overflow-x: clip; }
  .t-ouverture::before { width: min(900px, 140vw); }
}
@keyframes respire { 50% { opacity: 0.7; } }
@keyframes reflet { 0%, 100% { background-position: 100% 0; } 50% { background-position: 0% 0; } }

/* ============ LE GRAPHIQUE ============ */
/* Pas de prix ni de pourcentage : ce serait un chiffre inventé. */
.tableau { margin-top: clamp(40px, 6vw, 64px); overflow: hidden; animation: monte 1s 0.3s var(--ease) both; }
.ecran-barre {
  position: relative; z-index: 1;
  display: flex; align-items: center; justify-content: space-between; gap: 12px;
  padding: 14px 18px; border-bottom: 1px solid rgba(243, 243, 243, 0.08);
  font-family: "General Sans", sans-serif; font-weight: 600; font-size: 12px;
  letter-spacing: 0.02em; text-transform: uppercase; color: var(--gris-doux);
}
.ecran-barre .direct { display: inline-flex; align-items: center; gap: 8px; color: var(--blanc); }
.ecran-barre .direct::before {
  content: ""; width: 7px; height: 7px; border-radius: 50%; background: var(--blanc);
  box-shadow: 0 0 10px 2px rgba(255,255,255,0.6);
  animation: bat 1.6s ease-in-out infinite;
}
.unites { display: flex; gap: 2px; }
.unites span { padding: 4px 10px; border-radius: 999px; }
.unites span.on { color: var(--blanc); background: rgba(255,255,255,0.10); box-shadow: inset 0 0 0 1px rgba(255,255,255,0.18); }

/* L'éclairage : la lumière se pose sur la fin de la courbe. */
.tableau .eclairage {
  position: absolute; inset: 0; pointer-events: none;
  background: radial-gradient(45% 70% at 82% 35%, rgba(255,255,255,0.10), transparent 70%);
}
.graphe { position: relative; display: block; width: 100%; height: clamp(240px, 38vw, 400px); cursor: crosshair; touch-action: pan-y; }
.graphe .grille line { stroke: rgba(243, 243, 243, 0.05); stroke-width: 1; vector-effect: non-scaling-stroke; }
.graphe .meche { stroke-width: 1.5; vector-effect: non-scaling-stroke; }
.graphe .monte { fill: var(--blanc); stroke: var(--blanc); filter: drop-shadow(0 0 6px rgba(255,255,255,0.35)); }
.graphe .baisse { fill: #3a3a3a; stroke: #5a5a5a; }
.graphe .bougie { transform-box: fill-box; transform-origin: center bottom; animation: pousse 0.6s var(--ease) both; }
.graphe .courbe { fill: none; stroke: rgba(243,243,243,0.5); stroke-width: 1.5; stroke-linejoin: round; vector-effect: non-scaling-stroke; }
.graphe .viseur line { stroke: rgba(243, 243, 243, 0.4); stroke-width: 1; stroke-dasharray: 4 4; vector-effect: non-scaling-stroke; }
.graphe .viseur circle { fill: #000; stroke: var(--blanc); stroke-width: 2; vector-effect: non-scaling-stroke; }
.graphe .viseur { opacity: 0; transition: opacity 0.2s var(--ease); }
.graphe.actif .viseur { opacity: 1; }

@keyframes pousse { from { opacity: 0; transform: scaleY(0.1); } }

/* ============ BANDE DÉFILANTE ============ */
/* Pas d'aplat : les mots en creux, un sur quatre éclairé. */
.bande {
  margin: clamp(64px, 10vh, 96px) -20px 0; overflow: hidden;
  -webkit-mask-image: linear-gradient(90deg, transparent, #000 15%, #000 85%, transparent);
          mask-image: linear-gradient(90deg, transparent, #000 15%, #000 85%, transparent);
}
.bande-piste { display: flex; width: max-content; animation: defile 34s linear infinite; }
.bande span {
  display: inline-flex; align-items: center; gap: 36px; padding: 6px 18px;
  font-family: "General Sans", sans-serif; font-weight: 700; text-transform: uppercase;
  font-size: clamp(2rem, 6vw, 4rem); letter-spacing: -0.05em; line-height: 1; white-space: nowrap;
  color: transparent; -webkit-text-stroke: 1.5px rgba(243,243,243,0.28);
}
.bande span:nth-child(4n+1) { color: var(--blanc); -webkit-text-stroke: 0; }
.bande span::after { content: ""; width: 9px; height: 9px; border-radius: 50%; background: rgba(243,243,243,0.35); }
@keyframes defile { to { transform: translateX(-50%); } }

/* ============ LA MÉTHODE ============ */
.methode { margin-top: clamp(72px, 11vh, 110px); text-align: center; }
.methode .etapes { text-align: left; }
.methode .etape { padding: 26px 24px 28px; border: 0; overflow: hidden; transition: transform 0.4s var(--ease); }
/* Chaque carte reçoit sa propre lumière en haut à gauche, qui monte au survol. */
.methode .etape::after {
  content: ""; position: absolute; inset: 0; pointer-events: none; border-radius: inherit;
  background: radial-gradient(70% 60% at 0% 0%, rgba(255,255,255,0.10), transparent 70%);
  opacity: 0.7; transition: opacity 0.4s var(--ease);
}
.methode .etape:hover { transform: translateY(-4px); }
.methode .etape:hover::after { opacity: 1; }
/* Le chiffre géant, en creux, comme la bande. */
.methode .etape .num { font-size: 4.2rem; color: transparent; -webkit-text-stroke: 1.5px rgba(243,243,243,0.4); }
.methode .etape h3 { margin-top: 18px; font-family: "General Sans", sans-serif; font-weight: 700; font-size: 1.2rem; letter-spacing: -0.03em; line-height: 1.2; }
.methode .etape p { margin-top: 6px; font-size: 0.95rem; color: var(--gris-doux); }
.etape .picto { position: absolute; top: 26px; right: 24px; width: 34px; height: 34px; color: rgba(243,243,243,0.5); }

/* ============ LA GRANDE CARTE ============ */
/* Le seul gris plein de la page : la carte Beacons, liseré noir, texte
   noir — la même que celle du Trading sur l'accueil. */
.t-carte {
  margin-top: clamp(72px, 11vh, 110px); text-align: center;
  padding: clamp(44px, 7vw, 72px) 24px clamp(40px, 6vw, 60px);
  border-radius: 18px; background: var(--carte); color: var(--encre); border: 2px solid var(--encre);
  position: relative; overflow: hidden;
  box-shadow: 0 0 0 1px rgba(255,255,255,0.10), 0 40px 120px -40px rgba(255,255,255,0.25);
}
.t-carte .surtitre, .t-carte .accroche { color: var(--encre); }
.t-carte .filigrane { position: absolute; inset: auto 0 0 0; width: 100%; height: 60%; opacity: 0.16; pointer-events: none; }
.t-carte > *:not(.filigrane) { position: relative; }

/* ============ AVERTISSEMENT ============ */
.risque { margin: 32px auto 0; max-width: 62ch; text-align: center; font-size: 0.85rem; color: var(--gris-doux); }
.risque strong { color: var(--blanc); font-weight: 500; }

@media (prefers-reduced-motion: reduce) {
  .t-ouverture::before, .t-ouverture .surtitre, .t-ouverture .accroche, .t-ouverture .titre-page,
  .tableau, .graphe .bougie, .bande-piste, .ecran-barre .direct::before, .t-ouverture .titre-page .point { animation: none; }
  .methode .etape { transition: none; }
}
