:root {
  --red: #e31837; --dark: #0f172a; --card: #ffffff;
  --bg: #f1f5f9; --muted: #64748b; --border: #e2e8f0;
  --green: #22c55e; --orange: #f59e0b; --blue: #0ea5e9;
  --r: 14px; --shadow: 0 4px 24px rgba(0,0,0,0.08);
}
* { margin:0; padding:0; box-sizing:border-box; }
html { scroll-behavior: smooth; }
body { font-family:'Inter',system-ui,sans-serif; background:var(--bg); color:var(--dark); line-height:1.6; }

/* ── SCROLLBAR ── */
::-webkit-scrollbar { width:6px; }
::-webkit-scrollbar-track { background:var(--bg); }
::-webkit-scrollbar-thumb { background:var(--border); border-radius:3px; }
::-webkit-scrollbar-thumb:hover { background:var(--muted); }

/* ── HEADER ── */
header {
  background:var(--dark); color:#fff;
  padding:.9rem 2rem; display:flex; align-items:center; justify-content:space-between;
  position:sticky; top:0; z-index:100;
  box-shadow:0 2px 12px rgba(0,0,0,.4);
  border-bottom:1px solid transparent; transition:border-color .3s;
}
header.scrolled { border-bottom-color:rgba(255,255,255,.08); }
.logo { display:flex; align-items:center; gap:.6rem; font-weight:700; font-size:1.1rem; }
.logo-dot { width:32px; height:32px; background:var(--red); border-radius:8px; display:grid; place-items:center; font-size:1rem; }
nav a {
  color:rgba(255,255,255,.55); text-decoration:none; margin-left:1.5rem;
  font-size:.875rem; font-weight:500; transition:color .2s;
  position:relative; padding-bottom:2px;
}
nav a::after {
  content:''; position:absolute; bottom:-2px; left:0; right:0;
  height:2px; background:var(--red); border-radius:1px;
  transform:scaleX(0); transition:transform .2s;
}
nav a:hover { color:#fff; }
nav a.active { color:#fff; }
nav a.active::after { transform:scaleX(1); }

/* ── HERO ── */
.hero {
  background:
    radial-gradient(rgba(255,255,255,.035) 1px, transparent 1px),
    linear-gradient(135deg,#0f172a 0%,#162444 60%,#1e3a5f 100%);
  background-size: 32px 32px, 100% 100%;
  color:#fff; padding:4rem 2rem 5rem;
  min-height:100vh; display:flex; flex-direction:column; justify-content:center;
  position:relative;
}
.badge {
  display:inline-block; background:rgba(227,24,55,.15); border:1px solid rgba(227,24,55,.35);
  color:#ff8099; padding:.35rem 1rem; border-radius:20px;
  font-size:.78rem; font-weight:700; letter-spacing:.08em; text-transform:uppercase;
  margin-bottom:2rem; animation:fadeUp .5s ease both;
}

/* ── HERO GRID ── */
.hero .wrap  { max-width:none; padding:0 4rem; }
.hero-grid   { display:grid; grid-template-columns:1fr 1.3fr; gap:5rem; align-items:center; }

/* ── HERO TEXT (gauche) ── */
.hero-text { text-align:left; }
.hero-text h1 { margin-bottom:1.75rem; }

.hero-num {
  display:block;
  font-size:clamp(5.5rem,10vw,9rem);
  font-weight:900; line-height:.95; letter-spacing:-4px;
  color:var(--red);
  text-shadow:0 0 80px rgba(227,24,55,.3), 0 0 160px rgba(227,24,55,.12);
  animation:fadeUp .5s ease both;
}
.hero-sub {
  display:block; font-size:clamp(1.15rem,2.2vw,1.45rem);
  font-weight:700; color:rgba(255,255,255,.9);
  margin-top:.6rem; letter-spacing:-.3px;
  animation:fadeUp .5s .1s ease both;
}
.hero-sub em { color:var(--red); font-style:normal; }

.hero-text p {
  color:rgba(255,255,255,.55); font-size:1rem; line-height:1.85;
  max-width:440px; margin-top:1.5rem;
  animation:fadeUp .5s .2s ease both;
}

/* ── HERO KPIs ── */
.hero-kpis {
  display:flex; align-items:center; gap:2rem;
  margin:2rem 0; padding:1.5rem 0;
  border-top:1px solid rgba(255,255,255,.1);
  border-bottom:1px solid rgba(255,255,255,.1);
  animation:fadeUp .5s .28s ease both;
}
.hk-item  { display:flex; flex-direction:column; gap:.3rem; }
.hk-val   { font-size:1.4rem; font-weight:800; color:#fff; line-height:1; letter-spacing:-.5px; }
.hk-lbl   { font-size:.72rem; color:rgba(255,255,255,.38); font-weight:500; letter-spacing:.02em; }
.hk-sep   { width:1px; height:2.25rem; background:rgba(255,255,255,.12); flex-shrink:0; }

/* ── HERO CTA ── */
.hero-cta { display:flex; gap:1rem; flex-wrap:wrap; animation:fadeUp .5s .36s ease both; }
.btn-primary {
  display:inline-block; background:var(--red); color:#fff; text-decoration:none;
  padding:.9rem 2rem; border-radius:8px; font-weight:700; font-size:.95rem;
  box-shadow:0 4px 24px rgba(227,24,55,.5); transition:background .2s,transform .15s,box-shadow .2s;
}
.btn-primary:hover { background:#c41530; transform:translateY(-2px); box-shadow:0 8px 32px rgba(227,24,55,.6); }
.btn-ghost {
  display:inline-block; color:rgba(255,255,255,.7); text-decoration:none;
  padding:.9rem 2rem; border-radius:8px; font-weight:600; font-size:.95rem;
  border:1px solid rgba(255,255,255,.18); transition:border-color .2s,color .2s,background .2s;
}
.btn-ghost:hover { border-color:rgba(255,255,255,.45); color:#fff; background:rgba(255,255,255,.07); }

/* ── HERO CHART (droite) ── */
.hero-chart-wrap {
  background:rgba(255,255,255,.05); border:1px solid rgba(255,255,255,.1);
  border-top:3px solid var(--red); border-radius:18px; padding:1.75rem 2rem;
  backdrop-filter:blur(20px); -webkit-backdrop-filter:blur(20px);
  box-shadow:0 8px 40px rgba(0,0,0,.25);
  animation:fadeUp .5s .12s ease both;
}
.hc-header {
  display:flex; justify-content:space-between; align-items:flex-start;
  margin-bottom:1.25rem; gap:1rem;
}
.hc-title  { font-size:.9rem; font-weight:700; color:rgba(255,255,255,.85); display:block; margin-bottom:.3rem; }
.hc-sub    { font-size:.74rem; color:rgba(255,255,255,.35); display:block; line-height:1.5; }
.hc-badge  { text-align:right; flex-shrink:0; background:rgba(227,24,55,.15); border:1px solid rgba(227,24,55,.3); border-radius:10px; padding:.5rem .85rem; }
.hc-badge-num { display:block; font-size:1.6rem; font-weight:900; color:var(--red); line-height:1; letter-spacing:-1px; }
.hc-badge-lbl { display:block; font-size:.65rem; color:rgba(255,255,255,.4); font-weight:500; margin-top:.2rem; text-align:center; }
.hc-body   { position:relative; height:340px; }
.hc-legend {
  display:flex; gap:1.5rem; flex-wrap:wrap;
  margin-top:1rem; padding-top:.9rem;
  border-top:1px solid rgba(255,255,255,.07);
  font-size:.73rem; color:rgba(255,255,255,.4);
}
.hc-dot { display:inline-block; width:9px; height:9px; border-radius:50%; margin-right:.35rem; vertical-align:middle; }
.hc-dot.g { background:rgba(34,197,94,.9); }
.hc-dot.o { background:rgba(245,158,11,.9); }
.hc-dot.r { background:rgba(227,24,55,.9); }

/* ── SCROLL HINT ── */
.scroll-hint {
  position:absolute; bottom:1.75rem; left:0; right:0; text-align:center;
  color:rgba(255,255,255,.28); font-size:1.3rem;
  text-decoration:none; transition:color .2s;
  animation:bounce 2s ease-in-out infinite;
}
.scroll-hint:hover { color:rgba(255,255,255,.6); }

/* ── ANIMATIONS ── */
@keyframes fadeUp {
  from { opacity:0; transform:translateY(18px); }
  to   { opacity:1; transform:translateY(0); }
}
@keyframes bounce {
  0%,100% { transform:translateY(0); }
  50%     { transform:translateY(7px); }
}

/* ── LAYOUT ── */
.wrap { max-width:1160px; margin:0 auto; padding:0 1.5rem; }

/* ── STATS ── */
.stats-wrap { margin-top:-3rem; padding-bottom:4rem; }
.stats-grid { display:grid; grid-template-columns:repeat(4,1fr); gap:1.5rem; }

.stat-card {
  background:var(--card); border-radius:16px; padding:2rem;
  box-shadow:var(--shadow); border-top:4px solid var(--border);
  transition:transform .25s, box-shadow .25s;
}
.stat-card:hover { transform:translateY(-5px); box-shadow:0 12px 40px rgba(0,0,0,.14); }
.stat-card:nth-child(1) { border-color:var(--red); }
.stat-card:nth-child(2) { border-color:var(--orange); }
.stat-card:nth-child(3) { border-color:var(--blue); }
.stat-card:nth-child(4) { border-color:var(--green); }
.stat-icon {
  width:52px; height:52px; border-radius:14px; font-size:1.5rem;
  display:grid; place-items:center; margin-bottom:1.25rem;
}
.stat-card:nth-child(1) .stat-icon { background:rgba(227,24,55,.1); }
.stat-card:nth-child(2) .stat-icon { background:rgba(245,158,11,.1); }
.stat-card:nth-child(3) .stat-icon { background:rgba(14,165,233,.1); }
.stat-card:nth-child(4) .stat-icon { background:rgba(34,197,94,.1); }
.stat-val  { font-size:2.5rem; font-weight:800; line-height:1; margin-bottom:.4rem; letter-spacing:-.5px; }
.stat-lbl  { color:var(--muted); font-size:.9rem; font-weight:500; }
.stat-sub  { margin-top:.9rem; padding-top:.9rem; border-top:1px solid var(--border); font-size:.8rem; color:var(--muted); line-height:1.5; }

/* ── SECTION HEADER ── */
.section-hd { text-align:center; margin-bottom:3.5rem; padding-top:5rem; }
.tag {
  display:inline-block; background:rgba(227,24,55,.1); color:var(--red);
  padding:.3rem .9rem; border-radius:20px; font-size:.75rem; font-weight:700;
  letter-spacing:.1em; text-transform:uppercase; margin-bottom:.9rem;
}
.section-hd h2 { font-size:2.1rem; font-weight:800; margin-bottom:.75rem; letter-spacing:-.3px; }
.section-hd h2::after {
  content:''; display:block; width:44px; height:4px;
  background:var(--red); border-radius:2px; margin:.7rem auto 0;
}
.section-hd p  { color:var(--muted); max-width:540px; margin:1rem auto 0; font-size:.975rem; line-height:1.7; }

/* ── STORY ── */
.story-bg { background:#fff; padding-bottom:5rem; }
.story-grid { display:grid; grid-template-columns:1fr 1fr; gap:5rem; align-items:start; }
.story-text h3 { font-size:1.5rem; font-weight:800; margin-bottom:1.1rem; letter-spacing:-.2px; }
.story-text p  { color:var(--muted); margin-bottom:1.1rem; font-size:.975rem; line-height:1.8; }
.callout {
  background:rgba(227,24,55,.06); border-left:4px solid var(--red);
  padding:1.25rem 1.5rem; border-radius:0 10px 10px 0; margin:1.5rem 0;
}
.callout p { color:var(--dark) !important; font-size:.925rem; margin:0; line-height:1.7; }

/* ── DEMO BOX ── */
.demo-box { background:var(--dark); border-radius:var(--r); color:#fff; overflow:hidden; }
.demo-winbar {
  display:flex; align-items:center; gap:.45rem;
  padding:.75rem 1.25rem; background:rgba(255,255,255,.05);
  border-bottom:1px solid rgba(255,255,255,.07);
}
.win-dot { width:11px; height:11px; border-radius:50%; }
.win-dot.wr { background:#ff5f57; }
.win-dot.wo { background:#ffbd2e; }
.win-dot.wg { background:#28c840; }
.demo-winlabel { font-size:.72rem; color:rgba(255,255,255,.35); margin-left:auto; font-weight:500; }
.demo-body  { padding:1.75rem; }
.demo-sub   { font-weight:700; font-size:1rem; margin-bottom:1.35rem; color:rgba(255,255,255,.85); }
.demo-row   { display:flex; justify-content:space-between; align-items:center; padding:1rem 0; border-bottom:1px solid rgba(255,255,255,.07); }
.demo-row:last-child { border-bottom:none; }
.demo-name  { font-size:.82rem; font-weight:600; max-width:140px; }
.demo-votes { font-size:.7rem; color:rgba(255,255,255,.35); }
.demo-ratings { display:flex; align-items:center; gap:.75rem; }
.star-row   { text-align:center; }
.star-row .stars { font-size:.95rem; letter-spacing:1px; }
.star-row .label { font-size:.65rem; margin-top:2px; }
.arrow      { color:var(--red); font-weight:700; font-size:.9rem; }

/* ── INSIGHT BANNER ── */
.insight {
  background:linear-gradient(135deg,#b01229 0%,var(--red) 50%,#e8453c 100%);
  color:#fff; border-radius:16px; padding:2.25rem 2.5rem; margin-bottom:2.5rem;
  display:flex; align-items:center; gap:2.5rem;
  box-shadow:0 12px 40px rgba(227,24,55,.35);
  position:relative; overflow:hidden;
}
.insight::before {
  content:''; position:absolute; right:-3rem; top:-3rem;
  width:220px; height:220px; border-radius:50%;
  background:rgba(255,255,255,.07); pointer-events:none;
}
.insight::after {
  content:''; position:absolute; left:-2rem; bottom:-3rem;
  width:160px; height:160px; border-radius:50%;
  background:rgba(255,255,255,.04); pointer-events:none;
}
.insight-num  { font-size:4rem; font-weight:900; white-space:nowrap; letter-spacing:-2px; }
.insight-text h4 { font-size:1.15rem; font-weight:700; margin-bottom:.4rem; }
.insight-text p  { opacity:.85; font-size:.9rem; line-height:1.6; }

/* ── CHARTS ── */
.charts-grid { display:grid; grid-template-columns:1fr 1fr; gap:2rem; }
.full { grid-column:1/-1; }
.chart-card {
  background:var(--card); border-radius:16px; padding:2rem;
  box-shadow:var(--shadow); border-left:3px solid transparent;
  transition:box-shadow .25s, border-color .25s, transform .25s;
}
.chart-card:hover { box-shadow:0 12px 40px rgba(0,0,0,.12); border-color:var(--red); transform:translateY(-3px); }
.chart-hd h3 { font-size:1.05rem; font-weight:700; margin-bottom:.35rem; }
.chart-hd p  { color:var(--muted); font-size:.825rem; margin-bottom:1.5rem; line-height:1.6; }
.chart-box   { position:relative; height:320px; }
.chart-box.short { height:270px; }

/* ── TABLE ── */
.table-bg { background:#fff; padding-bottom:5.5rem; }
.table-controls { display:flex; gap:1rem; margin-bottom:1.75rem; flex-wrap:wrap; }
.search-wrap { flex:1; min-width:200px; position:relative; }
.search-wrap input {
  width:100%; padding:.7rem 1rem .7rem 2.5rem; border:2px solid var(--border);
  border-radius:8px; font-size:.9rem; outline:none; transition:border-color .2s;
}
.search-wrap input:focus { border-color:var(--red); }
.search-icon { position:absolute; left:.8rem; top:50%; transform:translateY(-50%); color:var(--muted); font-size:.9rem; }
select.flt {
  padding:.7rem 1rem; border:2px solid var(--border); border-radius:8px;
  font-size:.875rem; outline:none; cursor:pointer; background:#fff; transition:border-color .2s;
}
select.flt:focus { border-color:var(--red); }

.tbl-wrap { overflow-x:auto; border:1px solid var(--border); border-radius:var(--r); }
table  { width:100%; border-collapse:collapse; font-size:.875rem; }
thead  { background:var(--dark); color:#fff; }
th { padding:1rem 1.25rem; text-align:left; font-weight:600; cursor:pointer; user-select:none; white-space:nowrap; font-size:.875rem; letter-spacing:.02em; }
th:hover { background:rgba(255,255,255,.08); }
th.asc::after  { content:' ↑'; }
th.desc::after { content:' ↓'; }
tbody tr { border-bottom:1px solid var(--border); transition:background .15s; }
tbody tr:hover { background:#f8faff; }
td { padding:.95rem 1.25rem; }
.film-cell  { max-width:260px; overflow:hidden; text-overflow:ellipsis; white-space:nowrap; font-weight:500; }
.stars-cell { display:flex; align-items:center; gap:.4rem; font-weight:700; }
.gap-pill   { display:inline-block; padding:.18rem .5rem; border-radius:20px; font-size:.75rem; font-weight:700; }
.g0 { background:#e2e8f0; color:#475569; }
.g1 { background:#fef3c7; color:#92400e; }
.g2 { background:#fed7aa; color:#9a3412; }
.g3 { background:#fecdd3; color:#9f1239; }

.tbl-footer { display:flex; justify-content:space-between; align-items:center; padding:.9rem 1rem; border-top:1px solid var(--border); font-size:.8rem; color:var(--muted); flex-wrap:wrap; gap:.5rem; }
.pages { display:flex; gap:.4rem; }
.pg { width:30px; height:30px; border:1px solid var(--border); border-radius:6px; background:#fff; cursor:pointer; font-size:.8rem; display:grid; place-items:center; transition:all .15s; }
.pg:hover, .pg.on { background:var(--red); color:#fff; border-color:var(--red); }

/* ── LOADER ── */
.loader { display:flex; flex-direction:column; align-items:center; gap:1rem; padding:3rem; color:var(--muted); }
.spin { width:36px; height:36px; border:3px solid var(--border); border-top-color:var(--red); border-radius:50%; animation:spin .8s linear infinite; }
@keyframes spin { to { transform:rotate(360deg); } }

/* ── REVEAL (scroll animation) ── */
.reveal { opacity:0; transform:translateY(28px); transition:opacity .65s ease, transform .65s ease; }
.reveal.visible { opacity:1; transform:none; }

/* ── FOOTER ── */
footer { background:var(--dark); color:rgba(255,255,255,.45); padding:2.5rem 1.5rem; font-size:.85rem; border-top:1px solid rgba(255,255,255,.07); }
.footer-inner { max-width:1160px; margin:0 auto; display:flex; align-items:center; justify-content:space-between; gap:1rem; flex-wrap:wrap; }
.footer-brand { display:flex; align-items:center; gap:.5rem; font-weight:700; color:rgba(255,255,255,.75); font-size:.9rem; }
.footer-copy  { color:rgba(255,255,255,.4); }
.footer-link  { color:rgba(255,255,255,.65); text-decoration:none; font-weight:500; transition:color .2s; }
.footer-link:hover { color:#fff; }

/* ── RESPONSIVE ── */
@media(max-width:900px) {
  .hero        { padding:3rem 1.5rem 4rem; }
  .hero-grid   { grid-template-columns:1fr; gap:3rem; }
  .hero-text   { text-align:center; }
  .hero-text p { max-width:100%; }
  .hero-kpis   { justify-content:center; }
  .hero-cta    { justify-content:center; }
  .hc-body     { height:240px; }
}
@media(max-width:800px) {
  .stats-grid  { grid-template-columns:repeat(2,1fr); }
  .charts-grid { grid-template-columns:1fr; }
}
@media(max-width:700px) {
  .story-grid { grid-template-columns:1fr; }
}
@media(max-width:600px) {
  .insight { flex-direction:column; text-align:center; }
  nav { display:none; }
}
@media(max-width:480px) {
  .stats-grid { grid-template-columns:1fr; }
}
