/* =====================================================================
   DUEL MANGA V2 — page d'accueil / connexion (mêmes règles que l'appli V2)
   ===================================================================== */
html.v2:root {
  --bg: #0E0E13; --bg-2: #16161D; --panel: #16161D; --panel-2: #1E1E27;
  --line: rgba(255, 255, 255, .08); --ink: #F3F3F6; --muted: #9A9AA8;
  --accent: #8B5CF6; --accent-2: #D6336C; --gold: #E8C97A;
}
html.v2 body { background: var(--bg); background-image: radial-gradient(120% 60% at 50% 0%, rgba(139, 92, 246, .16), transparent 60%); }
html.v2 .wrap { padding-top: 18px; }
.v2i { width: 1em; height: 1em; flex: none; }

/* en-tête */
html.v2 .brand { text-align: center; margin-bottom: 16px; }
.v2g-hero-old { margin: 4px auto 6px; max-width: 300px; }
.v2g-hero-old svg { width: 100%; height: auto; display: block; filter: drop-shadow(0 14px 26px rgba(0, 0, 0, .45)); }
html.v2 .logo { font-size: 38px; }
html.v2 .logo span { color: #A78BFA; }
html.v2 .tag { margin: 6px auto 0; max-width: none; font-size: 15px; }
.v2g-feats { list-style: none; display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; margin: 16px 0 0; padding: 0; }
.v2g-feats li { display: flex; flex-direction: column; align-items: center; gap: 6px; padding: 10px 6px; border-radius: 14px; background: var(--panel); border: 1px solid var(--line); font: 600 12px/1.25 'Inter', sans-serif; color: var(--ink); text-align: center; }
.v2g-fi { width: 34px; height: 34px; border-radius: 10px; display: grid; place-items: center; background: rgba(139, 92, 246, .16); color: #B9A2FF; }
.v2g-fi .v2i { width: 18px; height: 18px; }

/* avertissement : discret mais visible */
html.v2 .notice { align-items: center; gap: 8px; padding: 8px 12px; border-radius: 12px; background: transparent; border: 1px solid var(--line); margin-bottom: 14px; }
html.v2 .notice-ic { width: 18px; height: 18px; background: none; color: var(--muted); }
html.v2 .notice-ic .v2i { width: 18px; height: 18px; }
html.v2 .notice p { font-size: 12.5px; color: var(--muted); }
html.v2 .notice .link { font-size: 12.5px; }

/* panneau */
html.v2 .panel { border-radius: 18px; box-shadow: none; padding: 18px 16px; }
html.v2 .view-title { font-size: 21px; font-weight: 800; }
html.v2 .view-sub { font-size: 14px; }
html.v2 .tabs { background: var(--panel-2); border-radius: 12px; }
html.v2 .tab[aria-selected="true"] { background: var(--bg); color: var(--ink); }
html.v2 .btn-social { border-radius: 12px; min-height: 50px; }
html.v2 .input { background: var(--bg); border-color: var(--line); }
html.v2 .input:focus { border-color: var(--accent); box-shadow: 0 0 0 3px rgba(139, 92, 246, .25); }
html.v2 .link { color: #B9A2FF; }
html.v2 .btn { border-radius: 14px; box-shadow: none; }

/* inscription par e-mail : repliée tant qu'on ne la demande pas */
.v2g-email {
  width: 100%; display: flex; align-items: center; justify-content: center; gap: 10px; min-height: 50px; margin: 4px 0 0;
  border-radius: 12px; border: 1px solid var(--line); background: var(--panel-2); color: var(--ink); font: 600 15px 'Inter', sans-serif; cursor: pointer;
}
.v2g-email .v2i { width: 20px; height: 20px; color: #B9A2FF; }
.v2g-email:hover { border-color: var(--accent); }
.v2g-email:focus-visible, .v2g-feats li:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
.v2g-email[hidden] { display: none !important; }
html.v2 #formSignup.v2g-collapsed { display: none; }

/* mot de passe : jauge toujours visible, règles seulement pendant la saisie */
html.v2 #suPass ~ .rules, html.v2 .field:not(.v2g-typing) #suRules { display: none; }
html.v2 .field.v2g-typing #suRules { display: block; animation: v2gfade .2s ease; }
@keyframes v2gfade { from { opacity: 0; transform: translateY(-3px); } to { opacity: 1; transform: none; } }

/* ===================== Animations V2 (A, B, C) ===================== */
/* dos de carte DuelManga (dessin original, aucune illustration) */
.v2g-cb {
  position: absolute; width: 74px; aspect-ratio: 290 / 460; border-radius: 8px; border: 2px solid var(--gold);
  background:
    repeating-conic-gradient(from 0deg at 50% 46%, rgba(232, 201, 122, .12) 0 4deg, transparent 4deg 20deg),
    radial-gradient(circle at 50% 46%, #4a2a8f 0%, #22153f 55%, #0f0a1d 100%);
  box-shadow: 0 10px 22px rgba(0, 0, 0, .45);
}
.v2g-cb::before { content: ""; position: absolute; inset: 5px; border-radius: 5px; border: 1px solid rgba(232, 201, 122, .4); }
.v2g-cb i { position: absolute; left: 50%; top: 46%; width: 42%; aspect-ratio: 1; transform: translate(-50%, -50%); border-radius: 50%; border: 2px solid var(--gold); background: linear-gradient(135deg, #7c4dff, #d6336c); display: grid; place-items: center; font: 400 15px/1 'Anton', Impact, sans-serif; color: #fff; font-style: normal; }
.v2g-cb em { position: absolute; left: 0; right: 0; bottom: 18%; text-align: center; font: 400 7px/1 'Anton', Impact, sans-serif; letter-spacing: .14em; color: var(--gold); font-style: normal; }

/* A. éventail vivant (haut de la page de connexion) */
.v2g-fan { position: relative; width: 210px; height: 140px; margin: 6px auto 4px; perspective: 700px; }
.v2g-fan .v2g-cb { left: 50%; top: 8px; margin-left: -37px; }
.v2g-fan .l { animation: v2gFanL 6s ease-in-out infinite; }
.v2g-fan .r { animation: v2gFanR 6s ease-in-out infinite; }
.v2g-fan .c { width: 84px; margin-left: -42px; top: 0; z-index: 2; transform-style: preserve-3d; backface-visibility: visible; animation: v2gFanC 6s ease-in-out infinite; }
@keyframes v2gFanL { 0%, 100% { transform: translateX(-48px) rotate(-14deg); } 50% { transform: translateX(-54px) translateY(-4px) rotate(-18deg); } }
@keyframes v2gFanR { 0%, 100% { transform: translateX(48px) rotate(14deg); } 50% { transform: translateX(54px) translateY(-4px) rotate(18deg); } }
@keyframes v2gFanC { 0% { transform: translateY(0) rotateY(0); } 40% { transform: translateY(-6px) rotateY(0); } 55% { transform: translateY(-6px) rotateY(180deg); } 70%, 100% { transform: translateY(0) rotateY(360deg); } }
.v2g-glow { position: absolute; left: 50%; top: 60%; width: 230px; height: 96px; transform: translate(-50%, -50%); border-radius: 50%; background: radial-gradient(rgba(155, 123, 255, .45), transparent 70%); animation: v2gGlow 6s ease-in-out infinite; }
@keyframes v2gGlow { 0%, 100% { opacity: .55; } 50% { opacity: 1; } }

/* B. cartes en apesanteur derrière le formulaire */
.v2g-drift { position: fixed; inset: 0; z-index: 0; pointer-events: none; overflow: hidden; perspective: 700px; transition: opacity .4s ease; }
html.v2 .wrap { position: relative; z-index: 1; }
.v2g-drift .v2g-cb { top: 100%; width: 48px; opacity: .32; animation: v2gRise linear infinite; transform-style: preserve-3d; }
.v2g-drift .v2g-cb i { font-size: 9px; }
.v2g-drift .v2g-cb em { display: none; }
@keyframes v2gRise {
  from { transform: translateY(40px) rotateX(20deg) rotateY(0) rotateZ(var(--rz, 0deg)); }
  to { transform: translateY(calc(-100vh - 120px)) rotateX(20deg) rotateY(360deg) rotateZ(calc(var(--rz, 0deg) + 40deg)); }
}
body.v2g-typing .v2g-drift { opacity: .35; }
body.intro-on .v2g-drift { opacity: 0; }

/* C. ouverture : distribution des cartes */
html.v2 #intro.v2g-intro { background: radial-gradient(circle at 50% 48%, #2a1b55 0%, #120d22 50%, #07050c 100%); perspective: 900px; }
.v2g-deal { position: relative; width: 1px; height: 1px; }
.v2g-deal .v2g-cb { width: 84px; left: -42px; top: -66px; opacity: 0; }
.v2g-deal .d { animation: v2gDeal 2.5s cubic-bezier(.2, .8, .2, 1) forwards; animation-delay: var(--d); }
@keyframes v2gDeal {
  0% { opacity: 0; transform: translateY(180px) scale(.7); }
  22% { opacity: 1; transform: translateY(0) scale(1); }
  50% { opacity: 1; transform: translateX(var(--x)) translateY(var(--y)) rotate(var(--r)); }
  82% { opacity: 1; transform: translateX(var(--x)) translateY(var(--y)) rotate(var(--r)); }
  100% { opacity: 0; transform: translateX(calc(var(--x) * 2.4)) translateY(calc(var(--y) - 30px)) rotate(calc(var(--r) * 2)); }
}
.v2g-deal .hero { width: 100px; left: -50px; top: -80px; z-index: 2; transform-style: preserve-3d; animation: v2gHero 2.2s ease forwards .7s; }
@keyframes v2gHero {
  0% { opacity: 0; transform: scale(.6) rotateY(-180deg); }
  35% { opacity: 1; transform: scale(1.15) rotateY(0); }
  78% { opacity: 1; transform: scale(1.15) rotateY(0); }
  100% { opacity: 0; transform: scale(3) rotateY(0); }
}
.v2g-intro-tag { position: absolute; left: 0; right: 0; top: calc(50% + 120px); text-align: center; font: 600 15px/1.3 'Inter', sans-serif; color: #d9cff5; opacity: 0; animation: v2gTag .5s ease forwards 1.35s; }
.v2g-intro-tag b { color: #fff; }
@keyframes v2gTag { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: none; } }
.v2g-flash { position: absolute; inset: 0; pointer-events: none; opacity: 0; background: radial-gradient(circle, rgba(255, 255, 255, .9), rgba(155, 123, 255, .4) 40%, transparent 70%); animation: v2gFlash 3s ease forwards; }
@keyframes v2gFlash { 0%, 82% { opacity: 0; } 88% { opacity: .85; } 100% { opacity: 0; } }

@media (prefers-reduced-motion: reduce) {
  .v2g-fan .v2g-cb, .v2g-glow, .v2g-drift, .v2g-deal .d, .v2g-flash { animation: none !important; }
  .v2g-drift { display: none; }
  .v2g-fan .l { transform: translateX(-48px) rotate(-14deg); }
  .v2g-fan .r { transform: translateX(48px) rotate(14deg); }
  .v2g-deal .hero { animation: none; opacity: 1; }
  .v2g-intro-tag { animation: none; opacity: 1; }
}

/* Choix de la langue dans la carte d'inscription */
.lang-pick { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin: 2px 0 16px; }
.lang-pick-lbl { flex: 1 0 100%; font: 700 11.5px/1.2 Inter, system-ui, sans-serif; letter-spacing: .08em; text-transform: uppercase; color: var(--muted); }
.lang-pick button { flex: 1; display: flex; align-items: center; justify-content: center; gap: 8px; padding: 11px 12px; border-radius: 12px; border: 1.5px solid var(--line); background: transparent; color: var(--ink); font: 700 14.5px/1 Inter, system-ui, sans-serif; cursor: pointer; }
.lang-pick button.active { border-color: #8b5cf6; background: rgba(139, 92, 246, .18); }
.lang-pick button:focus-visible { outline: 2px solid #fff; outline-offset: 2px; }

/* Pied de page épuré : une phrase, trois liens bien espacés, le copyright */
.foot { margin: 26px auto 8px; max-width: 420px; display: grid; gap: 10px; justify-items: center; text-align: center; color: var(--muted); font-size: 12.5px; }
.foot p { margin: 0; }
.foot-links { display: flex; flex-wrap: wrap; justify-content: center; gap: 6px 18px; }
.foot-links a { color: #c9b8ff; text-decoration: none; padding: 4px 2px; border-bottom: 1px solid transparent; }
.foot-links a:hover, .foot-links a:focus-visible { border-bottom-color: currentColor; outline: none; }
.foot-copy { font-size: 11.5px; opacity: .7; }
/* Erreurs bien visibles, avec un repère */
.form-error { display: flex; gap: 8px; align-items: flex-start; background: rgba(255, 92, 120, .16); border-color: rgba(255, 92, 120, .65); color: #ffd6de; font-weight: 600; }
.form-error::before { content: "!"; flex: none; width: 20px; height: 20px; border-radius: 50%; background: #ff5c78; color: #1a0b10; font: 800 13px/20px 'Inter', sans-serif; text-align: center; }
#codeResend:disabled { opacity: .65; }

/* Invitation d'un ami (parrainage) */
.ref-invite { margin: 10px 0 4px; padding: 10px 14px; border-radius: 14px; background: linear-gradient(135deg, rgba(124,77,255,.16), rgba(214,51,108,.14)); border: 1px solid rgba(124,77,255,.45); font: 700 14px/1.4 'Inter', sans-serif; }

/* Présentation du jeu (référencement) sous le formulaire */
.seo-about { position: relative; z-index: 5; margin: 28px auto 8px; max-width: 760px; padding: 22px 20px; border-radius: 20px; background: rgba(22,16,38,.94); border: 1px solid var(--line); color: var(--ink); }
.seo-about h2 { margin: 0 0 10px; font: 400 26px/1.15 'Anton', Impact, sans-serif; letter-spacing: .01em; }
.seo-about p { margin: 0 0 14px; font-size: 14.5px; line-height: 1.55; color: var(--muted); }
.seo-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 10px; margin: 6px 0 18px; }
.seo-item { display: flex; flex-direction: column; gap: 4px; padding: 12px 14px; border-radius: 14px; background: rgba(124,77,255,.08); border: 1px solid rgba(124,77,255,.25); }
.seo-item b { font-size: 15px; }
.seo-item span { font-size: 13.5px; line-height: 1.45; color: var(--muted); }
.seo-faq-t { font-size: 20px !important; margin-top: 4px !important; }
.seo-about details { border-top: 1px solid var(--line); padding: 10px 0; }
.seo-about summary { cursor: pointer; font-weight: 700; font-size: 14.5px; }
.seo-about details p { margin: 8px 0 0; }
