/* QuizUp Go — site web. Mêmes couleurs que lib/core/theme.dart */
@font-face { font-family: Poppins; src: url(../fonts/Poppins-Regular.woff2) format('woff2'); font-weight: 400; font-display: swap; }
@font-face { font-family: Poppins; src: url(../fonts/Poppins-SemiBold.woff2) format('woff2'); font-weight: 600; font-display: swap; }
@font-face { font-family: Poppins; src: url(../fonts/Poppins-Bold.woff2) format('woff2'); font-weight: 700; font-display: swap; }
@font-face { font-family: Poppins; src: url(../fonts/Poppins-ExtraBold.woff2) format('woff2'); font-weight: 800; font-display: swap; }
@font-face { font-family: Tajawal; src: url(../fonts/Tajawal-Regular.woff2) format('woff2'); font-weight: 400; font-display: swap; }
@font-face { font-family: Tajawal; src: url(../fonts/Tajawal-Bold.woff2) format('woff2'); font-weight: 600 700; font-display: swap; }
@font-face { font-family: Tajawal; src: url(../fonts/Tajawal-ExtraBold.woff2) format('woff2'); font-weight: 800; font-display: swap; }

:root {
  --bg: #070B1F; --bg2: #0B1230; --surface: #121A40; --surface2: #1A2456; --stroke: #26326E;
  --primary: #2F6BFF; --primary-deep: #1B2FA8; --violet: #6C3BEF; --cyan: #5EE7FF;
  --text: #fff; --dim: #9AA4D4; --mute: #65709F;
  --success: #2BD18A; --danger: #FF4D5E; --gold: #F5C542;
  --grad: linear-gradient(135deg, #2F6BFF, #1B2FA8 55%, #6C3BEF);
  --radius: 22px;
  --font: Poppins, Tajawal, system-ui, -apple-system, 'Segoe UI', sans-serif;
}
html[lang="ar"] { --font: Tajawal, Poppins, system-ui, sans-serif; }

* { box-sizing: border-box; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
body {
  margin: 0; background: var(--bg); color: var(--text); font-family: var(--font);
  line-height: 1.55; overflow-x: hidden; overflow-wrap: break-word;
  -webkit-font-smoothing: antialiased;
}
html[lang="ar"] body { line-height: 1.7; }
a { color: var(--cyan); }
img { max-width: 100%; display: block; }
h1, h2, h3 { margin: 0; line-height: 1.2; }
/* Jamais de mot coupé au milieu : on laisse passer à la ligne entre les mots */
h1, h2, h3, .tile-name, .mode h3 { hyphens: manual; overflow-wrap: normal; word-break: normal; }

#stars { position: fixed; inset: 0; width: 100%; height: 100%; z-index: 0; pointer-events: none; }
.glow { position: fixed; z-index: 0; pointer-events: none; border-radius: 50%; filter: blur(90px); opacity: .45; }
.glow.g1 { width: 520px; height: 520px; background: #2F6BFF; top: -180px; inset-inline-start: -160px; }
.glow.g2 { width: 560px; height: 560px; background: #6C3BEF; bottom: -220px; inset-inline-end: -200px; opacity: .35; }
main, header, footer { position: relative; z-index: 1; }

.wrap { width: min(1160px, 100% - 40px); margin-inline: auto; }

/* ---------- Bandeau staging ---------- */
.staging-bar { position: relative; z-index: 5; background: repeating-linear-gradient(45deg, #F5C542 0 14px, #e0ac1f 14px 28px); color: #1a1400; text-align: center; font-weight: 700; font-size: 13px; padding: 6px 12px; }

/* ---------- En-tête ---------- */
header.top { position: sticky; top: 0; z-index: 10; backdrop-filter: blur(14px); -webkit-backdrop-filter: blur(14px); background: rgba(7, 11, 31, .72); border-bottom: 1px solid rgba(38, 50, 110, .6); }
.top .wrap { display: flex; align-items: center; gap: 16px; min-height: 68px; flex-wrap: wrap; padding-block: 8px; }
.brand { display: flex; align-items: center; gap: 10px; color: #fff; text-decoration: none; font-weight: 800; font-size: 20px; letter-spacing: -.2px; }
.brand img { width: 40px; height: 40px; border-radius: 11px; box-shadow: 0 4px 16px rgba(47, 107, 255, .45); }
.brand .go { color: var(--cyan); }
nav.links { display: flex; gap: 6px; margin-inline-start: auto; flex-wrap: wrap; }
nav.links a { color: var(--dim); text-decoration: none; font-weight: 600; font-size: 15px; padding: 8px 12px; border-radius: 12px; }
nav.links a:hover { color: #fff; background: var(--surface); }
.lang { position: relative; display: flex; align-items: center; gap: 6px; background: var(--surface); border: 1px solid var(--stroke); border-radius: 14px; padding-inline: 10px; }
.lang svg { flex: none; color: var(--dim); }
.lang select { appearance: none; -webkit-appearance: none; background: transparent; border: 0; color: #fff; font: 600 15px var(--font); padding: 9px 18px 9px 0; cursor: pointer; }
html[dir="rtl"] .lang select { padding: 9px 0 9px 18px; }
.lang::after { content: ''; position: absolute; inset-inline-end: 12px; top: 50%; width: 7px; height: 7px; border: solid var(--dim); border-width: 0 2px 2px 0; transform: translateY(-70%) rotate(45deg); pointer-events: none; }
.lang select option { background: var(--surface); color: #fff; }
@media (max-width: 760px) { nav.links { display: none; } .lang { margin-inline-start: auto; } }

/* ---------- Accueil ---------- */
.hero { padding: clamp(36px, 7vw, 90px) 0 clamp(40px, 6vw, 80px); }
.hero .wrap { display: grid; grid-template-columns: minmax(0, 1.15fr) minmax(0, .85fr); gap: clamp(28px, 5vw, 64px); align-items: center; }
@media (max-width: 960px) { .hero .wrap { grid-template-columns: minmax(0, 1fr); } }
.badge { display: inline-flex; align-items: center; gap: 8px; background: rgba(94, 231, 255, .1); color: var(--cyan); border: 1px solid rgba(94, 231, 255, .35); padding: 7px 14px; border-radius: 999px; font-weight: 700; font-size: 14px; }
.badge .dot { width: 8px; height: 8px; border-radius: 50%; background: var(--cyan); box-shadow: 0 0 10px var(--cyan); animation: pulse 1.6s ease-in-out infinite; flex: none; }
@keyframes pulse { 50% { opacity: .35; } }
.hero h1 { font-size: clamp(32px, 5.2vw, 58px); font-weight: 800; letter-spacing: -1px; margin: 18px 0 16px; }
html[lang="ar"] .hero h1 { letter-spacing: 0; }
.hero h1 .hl { background: linear-gradient(90deg, #5EE7FF, #8FA8FF 45%, #B794FF); -webkit-background-clip: text; background-clip: text; color: transparent; }
.hero p.sub { color: var(--dim); font-size: clamp(16px, 1.6vw, 19px); margin: 0 0 26px; max-width: 600px; }

/* Compte à rebours */
.cd-label { color: var(--mute); font-weight: 700; font-size: 13px; text-transform: uppercase; letter-spacing: 1.4px; margin-bottom: 10px; }
html[lang="ar"] .cd-label { letter-spacing: 0; font-size: 15px; }
.countdown { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 10px; max-width: 520px; }
.cd-box { background: linear-gradient(180deg, var(--surface2), var(--surface)); border: 1px solid var(--stroke); border-radius: 18px; padding: 14px 6px 10px; text-align: center; }
.cd-num { display: block; font-size: clamp(26px, 4vw, 40px); font-weight: 800; font-variant-numeric: tabular-nums; line-height: 1.1; }
.cd-unit { display: block; color: var(--dim); font-size: clamp(11px, 1.3vw, 13px); font-weight: 600; margin-top: 4px; }
.launched { font-size: 22px; font-weight: 800; color: var(--success); }

/* Boutons stores */
.stores { display: flex; flex-wrap: wrap; gap: 12px; margin: 26px 0 0; }
.store { display: inline-flex; align-items: center; gap: 12px; min-width: 200px; padding: 10px 18px; border-radius: 16px; background: #fff; color: #0B1230; text-decoration: none; border: 1px solid #fff; transition: transform .15s; }
.store:hover { transform: translateY(-2px); }
.store svg { flex: none; width: 28px; height: 28px; }
.store small { display: block; font-size: 12px; font-weight: 600; opacity: .75; line-height: 1.2; }
.store strong { display: block; font-size: 18px; font-weight: 700; line-height: 1.2; }
.store.soon { background: var(--surface); color: #fff; border-color: var(--stroke); cursor: default; }
.store.soon:hover { transform: none; }
.store .pill { margin-inline-start: auto; font-size: 11px; font-weight: 700; background: rgba(94, 231, 255, .14); color: var(--cyan); padding: 3px 9px; border-radius: 999px; }

/* Formulaire */
.notify { margin-top: 24px; background: linear-gradient(160deg, rgba(47, 107, 255, .18), rgba(108, 59, 239, .16)); border: 1px solid var(--stroke); border-radius: var(--radius); padding: clamp(18px, 3vw, 26px); max-width: 600px; }
.notify h2 { font-size: 21px; font-weight: 800; }
.notify p { color: var(--dim); margin: 6px 0 16px; font-size: 15px; }
.f-row { display: flex; gap: 10px; flex-wrap: wrap; }
.f-row input[type=email] { flex: 1 1 220px; min-width: 0; background: var(--bg2); border: 1px solid var(--stroke); color: #fff; font: 500 16px var(--font); padding: 14px 16px; border-radius: 14px; outline: none; }
.f-row input[type=email]:focus { border-color: var(--cyan); box-shadow: 0 0 0 3px rgba(94, 231, 255, .18); }
.f-row input::placeholder { color: var(--mute); }
.btn { flex: 0 0 auto; border: 0; cursor: pointer; color: #fff; font: 700 16px var(--font); padding: 14px 22px; border-radius: 14px; background: var(--grad); box-shadow: 0 8px 24px rgba(47, 107, 255, .35); transition: transform .15s, filter .15s; }
.btn:hover { filter: brightness(1.12); transform: translateY(-1px); }
.btn[disabled] { opacity: .6; cursor: wait; transform: none; }
.consent { display: flex; gap: 10px; align-items: flex-start; margin-top: 14px; color: var(--dim); font-size: 13.5px; cursor: pointer; }
.consent input { margin: 3px 0 0; width: 18px; height: 18px; accent-color: var(--primary); flex: none; }
.hp { position: absolute !important; width: 1px !important; height: 1px !important; overflow: hidden; clip-path: inset(50%); white-space: nowrap; opacity: 0; pointer-events: none; }
.f-msg { margin-top: 12px; font-weight: 600; font-size: 15px; min-height: 1px; }
.f-msg.ok { color: var(--success); } .f-msg.err { color: var(--danger); }

/* ---------- Téléphone (aperçu de l'app) ---------- */
.phone-col { display: flex; justify-content: center; }
.phone { width: min(330px, 86vw); aspect-ratio: 9 / 19; border-radius: 46px; padding: 12px; background: linear-gradient(145deg, #2a3570, #0d1333); box-shadow: 0 40px 90px rgba(0, 0, 0, .55), 0 0 0 1px #313d80, 0 0 80px rgba(108, 59, 239, .35); position: relative; transform: rotate(-2deg); }
html[dir="rtl"] .phone { transform: rotate(2deg); }
@media (max-width: 600px) { .phone { width: min(280px, 78vw); } }
.screen { width: 100%; height: 100%; border-radius: 36px; background: var(--bg); overflow: hidden; display: flex; flex-direction: column; position: relative; }
.notch { position: absolute; top: 10px; left: 50%; transform: translateX(-50%); width: 96px; height: 26px; border-radius: 20px; background: #000; z-index: 2; }
.s-body { flex: 1; padding: 46px 14px 10px; display: flex; flex-direction: column; gap: 12px; background: radial-gradient(120% 60% at 20% 0%, rgba(47, 107, 255, .25), transparent 60%), var(--bg); }
.s-pills { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 6px; }
.s-pill { background: var(--surface); border: 1px solid var(--stroke); border-radius: 12px; padding: 6px 4px; text-align: center; font-size: 12px; font-weight: 700; white-space: nowrap; }
.s-daily { border-radius: 18px; padding: 14px; background: linear-gradient(135deg, #F5C542, #F77F00); color: #2a1600; box-shadow: 0 8px 20px rgba(247, 127, 0, .35); }
.s-daily b { display: block; font-size: 16px; font-weight: 800; }
.s-daily span { font-size: 12px; font-weight: 600; opacity: .85; }
.s-title { font-size: 14px; font-weight: 800; margin-top: 2px; }
.s-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px 8px; }
.s-grid .tile-ico { border-radius: 16px; font-size: 26px; }
.s-grid .tile-name { font-size: 10.5px; }
.s-tour { margin-top: auto; border-radius: 16px; padding: 12px 14px; background: linear-gradient(135deg, #6C3BEF, #2F6BFF); display: flex; align-items: center; gap: 10px; font-size: 12px; font-weight: 700; }
.s-tour b { display: block; font-size: 14px; font-weight: 800; }
.s-tour .tr { font-size: 26px; }
.s-nav { display: grid; grid-template-columns: repeat(5, 1fr); align-items: center; padding: 8px 10px 16px; background: var(--bg2); border-top: 1px solid var(--stroke); }
.s-nav i { display: block; width: 20px; height: 20px; margin: auto; border-radius: 6px; background: var(--stroke); }
.s-nav i.on { width: 44px; height: 44px; border-radius: 50%; background: var(--grad); box-shadow: 0 0 18px rgba(47, 107, 255, .6); display: grid; place-items: center; color: #fff; font-size: 18px; font-style: normal; }
.s-nav i.on svg { width: 22px; height: 22px; }

/* ---------- Tuiles de thème (comme ThemeTile) ---------- */
.tile { text-align: center; }
.tile-ico { aspect-ratio: 1; display: grid; place-items: center; border-radius: 22px; font-size: clamp(30px, 4vw, 42px); overflow: hidden; }
.tile-ico img { width: 50%; height: 50%; object-fit: contain; }
.tile-name { display: block; margin-top: 8px; font-weight: 700; font-size: 14px; line-height: 1.25; }

/* ---------- Sections ---------- */
section.block { padding: clamp(48px, 7vw, 96px) 0; }
.sec-head { text-align: center; max-width: 720px; margin: 0 auto clamp(28px, 4vw, 46px); }
.sec-head h2 { font-size: clamp(26px, 3.6vw, 40px); font-weight: 800; letter-spacing: -.5px; }
html[lang="ar"] .sec-head h2 { letter-spacing: 0; }
.sec-head p { color: var(--dim); margin: 10px 0 0; font-size: 17px; }

.modes { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px; }
@media (max-width: 900px) { .modes { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 560px) { .modes { grid-template-columns: minmax(0, 1fr); } }
.mode { position: relative; overflow: hidden; border-radius: var(--radius); padding: 22px; min-height: 170px; color: #fff; box-shadow: 0 14px 30px rgba(0, 0, 0, .3); display: flex; flex-direction: column; gap: 10px; }
.mode::after { content: ''; position: absolute; width: 180px; height: 180px; border-radius: 50%; background: rgba(255, 255, 255, .1); top: -70px; inset-inline-end: -60px; }
.mode .ico { width: 50px; height: 50px; border-radius: 15px; background: rgba(255, 255, 255, .2); display: grid; place-items: center; }
.mode .ico svg { width: 28px; height: 28px; }
.mode h3 { font-size: 21px; font-weight: 800; }
.mode p { margin: 0; font-size: 15px; opacity: .92; }

.themes { display: grid; grid-template-columns: repeat(auto-fill, minmax(112px, 1fr)); gap: 22px 16px; }
@media (max-width: 480px) { .themes { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px 10px; } .themes .tile-name { font-size: 12.5px; } }
@media (min-width: 1100px) { .themes { grid-template-columns: repeat(10, minmax(0, 1fr)); } }
.themes .tile-ico { transition: transform .2s; }
.themes .tile:hover .tile-ico { transform: translateY(-4px) scale(1.03); }

.features { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px; }
@media (max-width: 900px) { .features { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 560px) { .features { grid-template-columns: minmax(0, 1fr); } }
.feat { background: linear-gradient(180deg, var(--surface), rgba(18, 26, 64, .6)); border: 1px solid var(--stroke); border-radius: var(--radius); padding: 22px; }
.feat .e { font-size: 30px; width: 54px; height: 54px; display: grid; place-items: center; border-radius: 16px; background: var(--surface2); margin-bottom: 14px; }
.feat h3 { font-size: 18px; font-weight: 800; }
.feat p { color: var(--dim); margin: 6px 0 0; font-size: 15px; }

.cta { text-align: center; }
.cta-card { border-radius: 30px; padding: clamp(30px, 5vw, 56px) clamp(18px, 4vw, 40px); background: var(--grad); box-shadow: 0 30px 70px rgba(47, 107, 255, .3); position: relative; overflow: hidden; }
.cta-card img { width: 96px; height: 96px; margin: 0 auto 16px; filter: drop-shadow(0 10px 20px rgba(0, 0, 0, .35)); }
.cta-card h2 { font-size: clamp(26px, 3.6vw, 40px); font-weight: 800; }
.cta-card p { margin: 10px 0 22px; font-size: 18px; opacity: .92; }
.cta-card .btn { background: #fff; color: #1B2FA8; box-shadow: none; display: inline-block; text-decoration: none; }

/* ---------- Pied de page ---------- */
footer { border-top: 1px solid var(--stroke); padding: 40px 0 34px; margin-top: 30px; background: rgba(7, 11, 31, .6); }
footer .wrap { display: flex; flex-wrap: wrap; gap: 24px; align-items: center; justify-content: space-between; }
.follow { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; }
.follow b { font-size: 15px; }
.socials { display: flex; gap: 10px; flex-wrap: wrap; }
.social { position: relative; width: 46px; height: 46px; border-radius: 14px; display: grid; place-items: center; background: var(--surface); border: 1px solid var(--stroke); color: #fff; transition: background .15s, transform .15s; }
.social svg { width: 22px; height: 22px; }
a.social:hover { background: var(--primary); transform: translateY(-2px); }
.social.off { color: var(--mute); }
.social.off::after { content: attr(data-soon); position: absolute; bottom: -9px; left: 50%; transform: translateX(-50%); font-size: 9.5px; font-weight: 700; background: var(--bg2); border: 1px solid var(--stroke); color: var(--dim); border-radius: 999px; padding: 0 6px; white-space: nowrap; }
.foot-links { display: flex; gap: 18px; flex-wrap: wrap; font-size: 14px; }
.foot-links a { color: var(--dim); text-decoration: none; }
.foot-links a:hover { color: #fff; }
.rights { width: 100%; color: var(--mute); font-size: 13px; }

/* ---------- Pages légales ---------- */
.legal-page { padding: clamp(30px, 5vw, 60px) 0 40px; }
.legal-page .card { background: var(--surface); border: 1px solid var(--stroke); border-radius: var(--radius); padding: clamp(20px, 4vw, 40px); max-width: 820px; margin: auto; }
.legal-page h1 { font-size: clamp(26px, 4vw, 36px); font-weight: 800; }
.legal-page .upd { color: var(--mute); font-size: 14px; margin: 6px 0 22px; }
.legal-page h2 { font-size: 19px; font-weight: 800; margin: 26px 0 8px; color: var(--cyan); }
.legal-page p, .legal-page li { color: #dfe4ff; font-size: 15.5px; }
.legal-page .todo { background: rgba(245, 197, 66, .16); color: var(--gold); border-radius: 6px; padding: 0 6px; font-weight: 600; }
.back { display: inline-flex; align-items: center; gap: 8px; margin-bottom: 18px; color: var(--dim); text-decoration: none; font-weight: 600; }
.back:hover { color: #fff; }
html[dir="rtl"] .back svg { transform: scaleX(-1); }

/* Apparition douce */
.reveal { opacity: 0; transform: translateY(18px); transition: opacity .6s ease, transform .6s ease; }
.reveal.in { opacity: 1; transform: none; }
@media (prefers-reduced-motion: reduce) {
  .reveal { opacity: 1; transform: none; transition: none; }
  .badge .dot { animation: none; }
  html { scroll-behavior: auto; }
}
#cd-wrap { margin-top: 28px; }
