/* ============================================================
   ALGOLOTO — STYLESHEET
   Design : Dark Premium · Syne + IBM Plex Mono
   ============================================================ */

:root {
  --bg:          #080E1C;
  --bg2:         #0D1527;
  --bg3:         #111D35;
  --border:      rgba(56, 189, 248, 0.12);
  --border-soft: rgba(255,255,255,0.06);
  --cyan:        #38BDF8;
  --cyan-dim:    rgba(56,189,248,0.15);
  --gold:        #D4AF37;
  --gold-dim:    rgba(212,175,55,0.15);
  --text:        #E8EDF5;
  --text-muted:  #7A8BA8;
  --text-dim:    #4A5A72;
  --danger:      #F87171;
  --success:     #4ADE80;
  --warn:        #FBBF24;
  --radius:      12px;
  --radius-lg:   20px;
}

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

html { scroll-behavior: smooth; }

body {
  background: var(--bg);
  color: var(--text);
  font-family: 'IBM Plex Mono', monospace;
  font-size: 15px;
  line-height: 1.6;
  overflow-x: hidden;
}

/* GRAIN */
.grain {
  position: fixed; inset: 0; pointer-events: none; z-index: 999;
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 256 256' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='noise'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23noise)' opacity='1'/%3E%3C/svg%3E");
  opacity: 0.025;
}

/* TYPOGRAPHY */
h1, h2, h3 { font-family: 'Syne', sans-serif; line-height: 1.1; letter-spacing: -0.02em; }
.accent { color: var(--cyan); }

/* LAYOUT */
.container { max-width: 1100px; margin: 0 auto; padding: 0 24px; }

/* HEADER */
.header {
  position: sticky; top: 0; z-index: 100;
  display: flex; align-items: center; justify-content: space-between;
  padding: 18px 40px;
  background: rgba(8,14,28,0.85);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--border-soft);
}

.logo {
  font-family: 'Syne', sans-serif;
  font-weight: 800; font-size: 20px;
  letter-spacing: 0.08em;
  color: var(--text);
}
.logo span { color: var(--cyan); }

.nav-pills { display: flex; align-items: center; gap: 12px; }
.nav-pills a {
  font-family: 'IBM Plex Mono', monospace;
  font-size: 13px; color: var(--text-muted);
  text-decoration: none; padding: 8px 14px;
  border-radius: 8px; transition: all .2s;
}
.nav-pills a:hover { color: var(--text); background: var(--bg3); }
.nav-pills .nav-cta {
  color: var(--cyan); border: 1px solid var(--border);
  background: var(--cyan-dim);
}
.nav-pills .nav-cta:hover { background: rgba(56,189,248,0.25); }

/* HERO */
.hero {
  position: relative; overflow: hidden;
  padding: 120px 0 100px;
  text-align: center;
}

.hero-bg-grid {
  position: absolute; inset: 0; pointer-events: none;
  background-image:
    linear-gradient(rgba(56,189,248,0.04) 1px, transparent 1px),
    linear-gradient(90deg, rgba(56,189,248,0.04) 1px, transparent 1px);
  background-size: 60px 60px;
  mask-image: radial-gradient(ellipse 80% 60% at 50% 50%, black, transparent);
}

.hero-label {
  display: inline-block;
  font-size: 11px; letter-spacing: 0.12em; text-transform: uppercase;
  color: var(--cyan); border: 1px solid var(--border);
  padding: 6px 16px; border-radius: 20px;
  background: var(--cyan-dim); margin-bottom: 28px;
  animation: fadeUp .6s ease both;
}

.hero-title {
  font-size: clamp(36px, 6vw, 72px);
  font-weight: 800; margin-bottom: 24px;
  animation: fadeUp .6s .1s ease both;
}

.hero-sub {
  max-width: 580px; margin: 0 auto 40px;
  color: var(--text-muted); font-size: 15px; line-height: 1.7;
  animation: fadeUp .6s .2s ease both;
}

.hero-ctas {
  display: flex; gap: 14px; justify-content: center; flex-wrap: wrap;
  animation: fadeUp .6s .3s ease both;
}

.hero-stats {
  display: flex; align-items: center; justify-content: center;
  gap: 0; margin-top: 64px;
  border: 1px solid var(--border-soft);
  border-radius: var(--radius-lg);
  background: var(--bg2); overflow: hidden;
  max-width: 480px; margin-left: auto; margin-right: auto;
  animation: fadeUp .6s .4s ease both;
}
.hstat {
  flex: 1; padding: 20px 24px; text-align: center;
  display: flex; flex-direction: column; gap: 4px;
}
.hstat-num {
  font-family: 'Syne', sans-serif;
  font-size: 26px; font-weight: 700; color: var(--cyan);
}
.hstat-label { font-size: 11px; color: var(--text-muted); letter-spacing: .04em; }
.hstat-sep { width: 1px; background: var(--border-soft); align-self: stretch; }

/* BUTTONS */
.btn-primary {
  display: inline-flex; align-items: center; justify-content: center;
  background: var(--cyan); color: #080E1C;
  font-family: 'Syne', sans-serif; font-weight: 700; font-size: 14px;
  padding: 14px 28px; border-radius: var(--radius);
  border: none; cursor: pointer; text-decoration: none;
  transition: all .2s; letter-spacing: .02em;
}
.btn-primary:hover { background: #7DD3FA; transform: translateY(-1px); box-shadow: 0 8px 24px rgba(56,189,248,0.3); }
.btn-primary.gold { background: var(--gold); color: #080E1C; }
.btn-primary.gold:hover { background: #E8C84A; box-shadow: 0 8px 24px rgba(212,175,55,0.3); }
.btn-primary.full { width: 100%; }
.btn-primary.sm { padding: 11px 20px; font-size: 13px; }

.btn-ghost {
  display: inline-flex; align-items: center; justify-content: center;
  background: transparent; color: var(--text-muted);
  font-family: 'IBM Plex Mono', monospace; font-size: 14px;
  padding: 14px 24px; border-radius: var(--radius);
  border: 1px solid var(--border-soft); cursor: pointer;
  text-decoration: none; transition: all .2s;
}
.btn-ghost:hover { color: var(--text); border-color: var(--border); background: var(--bg3); }
.btn-ghost.sm { padding: 11px 18px; font-size: 13px; }

.btn-analyze {
  display: flex; align-items: center; justify-content: center;
  width: 100%; padding: 15px;
  background: var(--cyan); color: #080E1C;
  font-family: 'Syne', sans-serif; font-weight: 700; font-size: 15px;
  border: none; border-radius: var(--radius); cursor: pointer;
  transition: all .2s; margin-top: 8px;
}
.btn-analyze:hover { background: #7DD3FA; transform: translateY(-1px); }
.btn-analyze:disabled { opacity: .5; cursor: not-allowed; transform: none; }

/* SECTIONS */
.section { padding: 100px 0; }
.dark-section { background: var(--bg2); }

.section-label {
  font-size: 11px; letter-spacing: .12em; text-transform: uppercase;
  color: var(--cyan); margin-bottom: 16px;
}
.section-title {
  font-size: clamp(28px, 4vw, 48px);
  font-weight: 700; margin-bottom: 16px;
}
.section-sub {
  color: var(--text-muted); max-width: 520px; margin-bottom: 48px; line-height: 1.7;
}

/* ANALYZER CARD */
.analyzer-card {
  background: var(--bg2);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 40px;
  max-width: 680px;
  margin: 0 auto;
}

.input-group { margin-bottom: 24px; }
.input-group label {
  display: block; font-size: 12px; letter-spacing: .08em;
  text-transform: uppercase; color: var(--text-muted); margin-bottom: 12px;
}

.balls-row { display: flex; gap: 10px; flex-wrap: wrap; }

.ball-input {
  width: 64px; height: 64px;
  background: var(--bg3); border: 1px solid var(--border-soft);
  border-radius: 50%; color: var(--text);
  font-family: 'Syne', sans-serif; font-size: 20px; font-weight: 700;
  text-align: center; outline: none;
  transition: all .2s;
  -moz-appearance: textfield;
}
.ball-input::-webkit-outer-spin-button,
.ball-input::-webkit-inner-spin-button { -webkit-appearance: none; }
.ball-input:focus { border-color: var(--cyan); background: var(--cyan-dim); box-shadow: 0 0 0 3px rgba(56,189,248,0.15); }
.ball-input.chance { background: var(--gold-dim); border-color: rgba(212,175,55,0.3); }
.ball-input.chance:focus { border-color: var(--gold); }
.ball-input.error { border-color: var(--danger); }

/* RESULT PANEL */
.result-panel {
  margin-top: 32px;
  padding-top: 32px;
  border-top: 1px solid var(--border-soft);
  animation: fadeUp .4s ease both;
}

.result-header { display: flex; gap: 28px; align-items: center; margin-bottom: 28px; }

.result-score-wrap { position: relative; width: 80px; height: 80px; flex-shrink: 0; }
.score-ring { width: 80px; height: 80px; transform: rotate(-90deg); }
.ring-bg { fill: none; stroke: var(--bg3); stroke-width: 6; }
.ring-fill { fill: none; stroke: var(--cyan); stroke-width: 6; stroke-linecap: round; transition: stroke-dashoffset 1s ease; }
.score-center {
  position: absolute; inset: 0;
  display: flex; flex-direction: column; align-items: center; justify-content: center;
}
.score-num {
  font-family: 'Syne', sans-serif; font-size: 22px; font-weight: 800; color: var(--cyan);
  line-height: 1;
}
.score-label { font-size: 10px; color: var(--text-muted); }

.verdict-badge {
  display: inline-block; font-size: 12px; font-weight: 600;
  padding: 4px 14px; border-radius: 20px; margin-bottom: 8px;
  font-family: 'Syne', sans-serif; letter-spacing: .04em;
}
.verdict-badge.good { background: rgba(74,222,128,.15); color: var(--success); border: 1px solid rgba(74,222,128,.3); }
.verdict-badge.medium { background: rgba(251,191,36,.15); color: var(--warn); border: 1px solid rgba(251,191,36,.3); }
.verdict-badge.bad { background: rgba(248,113,113,.15); color: var(--danger); border: 1px solid rgba(248,113,113,.3); }

.verdict-text { font-size: 13px; color: var(--text-muted); line-height: 1.5; }

.result-metrics {
  display: grid; grid-template-columns: 1fr 1fr;
  gap: 10px; margin-bottom: 28px;
}
.metric-item {
  background: var(--bg3); border: 1px solid var(--border-soft);
  border-radius: var(--radius); padding: 14px 16px;
}
.metric-label { font-size: 10px; text-transform: uppercase; letter-spacing: .08em; color: var(--text-dim); margin-bottom: 4px; }
.metric-value { font-family: 'Syne', sans-serif; font-size: 16px; font-weight: 700; }
.metric-value.ok { color: var(--success); }
.metric-value.warn { color: var(--warn); }
.metric-value.bad { color: var(--danger); }

.result-cta-block {
  background: var(--bg3); border: 1px solid var(--border);
  border-radius: var(--radius-lg); padding: 24px;
}
.result-cta-text { font-size: 13px; color: var(--text-muted); margin-bottom: 16px; }
.result-cta-row { display: flex; gap: 10px; flex-wrap: wrap; margin-bottom: 16px; }
.result-affil { font-size: 12px; color: var(--text-dim); }
.result-affil a { color: var(--cyan); text-decoration: none; }
.anj-mini {
  display: block; margin-top: 6px;
  font-size: 11px; color: var(--text-dim);
  border: 1px solid rgba(248,113,113,.2);
  padding: 4px 10px; border-radius: 6px; display: inline-block;
  background: rgba(248,113,113,.05);
}

/* OFFERS GRID */
.offers-grid {
  display: grid; grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 20px;
}

.offer-card {
  background: var(--bg3); border: 1px solid var(--border-soft);
  border-radius: var(--radius-lg); padding: 32px;
  display: flex; flex-direction: column; gap: 16px;
  transition: border-color .2s;
}
.offer-card:hover { border-color: var(--border); }
.offer-card.featured {
  border-color: var(--gold);
  background: linear-gradient(160deg, rgba(212,175,55,0.06) 0%, var(--bg3) 60%);
}

.offer-badge {
  font-size: 11px; letter-spacing: .1em; text-transform: uppercase;
  color: var(--text-muted); font-family: 'IBM Plex Mono', monospace;
}
.offer-badge.best { color: var(--gold); }

.offer-price {
  font-family: 'Syne', sans-serif; font-size: 40px; font-weight: 800;
  color: var(--text); line-height: 1;
}
.offer-price span { font-size: 16px; color: var(--text-muted); font-weight: 400; }

.offer-name {
  font-family: 'Syne', sans-serif; font-size: 18px; font-weight: 600;
  color: var(--text);
}

.offer-features {
  list-style: none; display: flex; flex-direction: column; gap: 10px;
  flex: 1;
}
.offer-features li {
  font-size: 13px; color: var(--text-muted); padding-left: 20px; position: relative;
}
.offer-features li::before {
  content: '→'; position: absolute; left: 0; color: var(--cyan); font-size: 12px;
}
.offer-note { font-size: 11px; color: var(--text-dim); text-align: center; }

/* METHOD GRID */
.method-grid {
  display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 20px; margin-bottom: 40px;
}
.method-card {
  background: var(--bg2); border: 1px solid var(--border-soft);
  border-radius: var(--radius-lg); padding: 28px;
  transition: border-color .2s;
}
.method-card:hover { border-color: var(--border); }
.method-icon { font-size: 28px; margin-bottom: 14px; }
.method-card h3 {
  font-family: 'Syne', sans-serif; font-size: 16px; font-weight: 600;
  margin-bottom: 10px;
}
.method-card p { font-size: 13px; color: var(--text-muted); line-height: 1.6; }

.disclaimer-box {
  background: rgba(248,113,113,0.06); border: 1px solid rgba(248,113,113,0.2);
  border-radius: var(--radius); padding: 20px 24px;
  font-size: 13px; color: var(--text-muted); line-height: 1.6;
}
.disclaimer-box strong { color: var(--danger); }

/* FOOTER */
.footer {
  background: var(--bg2); border-top: 1px solid var(--border-soft);
  padding: 48px 0 32px;
}
.footer-top {
  display: flex; justify-content: space-between; align-items: center;
  margin-bottom: 32px; flex-wrap: wrap; gap: 16px;
}
.footer-logo { font-size: 18px; }
.footer-nav { display: flex; gap: 24px; }
.footer-nav a { font-size: 13px; color: var(--text-muted); text-decoration: none; }
.footer-nav a:hover { color: var(--text); }

.anj-block {
  display: flex; gap: 14px; align-items: flex-start;
  background: rgba(248,113,113,0.05); border: 1px solid rgba(248,113,113,0.15);
  border-radius: var(--radius); padding: 16px 20px;
  margin-bottom: 24px;
}
.anj-icon { font-size: 18px; flex-shrink: 0; margin-top: 2px; }
.anj-block p { font-size: 13px; color: var(--text-muted); line-height: 1.6; }
.anj-block strong { color: var(--text); }

.footer-legal { font-size: 11px; color: var(--text-dim); line-height: 1.7; margin-bottom: 12px; }
.footer-copy { font-size: 11px; color: var(--text-dim); }

/* ANIMATIONS */
@keyframes fadeUp {
  from { opacity: 0; transform: translateY(20px); }
  to   { opacity: 1; transform: translateY(0); }
}

/* Toast notification */
.toast {
  position: fixed; bottom: 24px; left: 50%; transform: translateX(-50%);
  background: var(--bg2); border: 1px solid var(--border);
  padding: 14px 24px; border-radius: var(--radius);
  font-size: 13px; color: var(--text);
  box-shadow: 0 8px 32px rgba(0,0,0,0.4);
  z-index: 9999; animation: fadeUp .3s ease both;
}
.toast.error { border-color: rgba(248,113,113,.4); color: var(--danger); }
.toast.success { border-color: rgba(74,222,128,.4); color: var(--success); }

/* RESPONSIVE */
@media (max-width: 640px) {
  .header { padding: 16px 20px; }
  .hero { padding: 80px 0 60px; }
  .hero-ctas { flex-direction: column; align-items: center; }
  .result-header { flex-direction: column; align-items: flex-start; }
  .result-metrics { grid-template-columns: 1fr; }
  .result-cta-row { flex-direction: column; }
  .footer-top { flex-direction: column; }
  .analyzer-card { padding: 24px; }
  .ball-input { width: 52px; height: 52px; font-size: 17px; }
}

/* ============================================================
   PATCH v1.1 — Tabs, FAQ, Corrections UX
   ============================================================ */

/* GAME TABS */
.game-tabs {
  display: flex; gap: 10px; margin-bottom: 28px;
  border-bottom: 1px solid var(--border-soft); padding-bottom: 0;
}
.game-tab {
  display: flex; flex-direction: column; align-items: flex-start;
  padding: 12px 20px 14px; background: transparent;
  border: 1px solid var(--border-soft); border-bottom: none;
  border-radius: var(--radius) var(--radius) 0 0;
  cursor: pointer; transition: all .2s;
  color: var(--text-muted); font-family: 'IBM Plex Mono', monospace;
  position: relative; bottom: -1px;
}
.game-tab:hover { background: var(--bg3); color: var(--text); }
.game-tab.active {
  background: var(--bg2); border-color: var(--border);
  border-bottom-color: var(--bg2); color: var(--text);
}
.tab-icon { font-size: 18px; margin-bottom: 2px; }
.tab-label { font-family: 'Syne', sans-serif; font-size: 14px; font-weight: 600; }
.tab-sub { font-size: 10px; color: var(--text-dim); letter-spacing: .04em; }
.game-tab.active .tab-sub { color: var(--cyan); }

/* LABEL RANGE */
.label-range { color: var(--text-dim); font-size: 11px; font-weight: 400; }

/* HIDDEN PANEL */
.hidden { display: none !important; }

/* ERROR BANNER */
.error-banner {
  margin-top: 12px; padding: 10px 16px;
  background: rgba(248,113,113,.08); border: 1px solid rgba(248,113,113,.3);
  border-radius: var(--radius); font-size: 13px; color: var(--danger);
  animation: fadeUp .2s ease both;
}

/* FAQ BLOCK */
.faq-block {
  margin-top: 48px; border-top: 1px solid var(--border-soft); padding-top: 40px;
}
.faq-title {
  font-family: 'Syne', sans-serif; font-size: 20px; font-weight: 600;
  margin-bottom: 20px;
}
.faq-item {
  border: 1px solid var(--border-soft); border-radius: var(--radius);
  margin-bottom: 10px; overflow: hidden;
  transition: border-color .2s;
}
.faq-item:hover { border-color: var(--border); }
.faq-item[open] { border-color: var(--border); }
.faq-item summary {
  padding: 16px 20px; cursor: pointer;
  font-family: 'Syne', sans-serif; font-size: 15px; font-weight: 500;
  color: var(--text); list-style: none;
  display: flex; justify-content: space-between; align-items: center;
}
.faq-item summary::-webkit-details-marker { display: none; }
.faq-item summary::after {
  content: '+'; color: var(--cyan); font-size: 20px; font-weight: 300;
  transition: transform .2s; flex-shrink: 0;
}
.faq-item[open] summary::after { transform: rotate(45deg); }
.faq-item p {
  padding: 0 20px 16px; font-size: 14px; color: var(--text-muted); line-height: 1.7;
}

/* MOBILE : stack tabs vertically on very small screens */
@media (max-width: 400px) {
  .game-tabs { flex-direction: column; border-bottom: none; }
  .game-tab { border-radius: var(--radius); border-bottom: 1px solid var(--border-soft); bottom: 0; }
  .game-tab.active { border-color: var(--border); border-bottom-color: var(--border); }
}

/* ── Grille offres 2 colonnes pour one-shots ── */
.offers-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 20px;
}

/* Combo card — highlight spécial */
.offer-card.featured .offer-badge.best {
  font-size: 13px;
}

/* Note économie en vert */
.offer-note.saving {
  color: var(--success);
  font-weight: 500;
}
