@font-face {
  font-family: 'Bebas Neue';
  src: url('/assets/BebasNeue-Regular.ttf') format('truetype');
  font-display: swap;
}

:root {
  --rouge: #CC0000;
  --noir: #161618;
  --noir2: #282828;
  --papier: #F1EFEB;
  --blanc: #FAFAFA;
  --bleu: #1F4CF3;
  --gris: #464646;
  --filet: rgba(30, 30, 30, .47);
  --filet-sombre: rgba(250, 250, 250, .25);
  --display: 'Bebas Neue', 'Arial Narrow', sans-serif;
  --texte: system-ui, -apple-system, 'Segoe UI', Roboto, sans-serif;
  --gutter: clamp(16px, 4vw, 56px);
}

* { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }
body {
  background: var(--noir);
  color: var(--blanc);
  font-family: var(--texte);
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}
img { display: block; max-width: 100%; }
button, input, textarea { font: inherit; color: inherit; }
a { color: inherit; }

.display { font-family: var(--display); text-transform: uppercase; line-height: .86; font-weight: 400; letter-spacing: .005em; }
.mention { font-family: var(--display); text-transform: uppercase; letter-spacing: .42em; font-size: clamp(11px, 1.1vw, 14px); line-height: 1; white-space: nowrap; }

/* Teinte des PNG blancs fournis */
.tint { background-color: currentColor; -webkit-mask-repeat: no-repeat; mask-repeat: no-repeat; -webkit-mask-size: contain; mask-size: contain; -webkit-mask-position: center; mask-position: center; }
.star { -webkit-mask-image: url('/assets/etoile_motif.png'); mask-image: url('/assets/etoile_motif.png'); display: inline-block; aspect-ratio: 1; }
.logo-gd { -webkit-mask-image: url('/assets/logo_gd.png'); mask-image: url('/assets/logo_gd.png'); aspect-ratio: 2048 / 1178; }
.logo-sky { -webkit-mask-image: url('/assets/logo_skyline.png'); mask-image: url('/assets/logo_skyline.png'); aspect-ratio: 1024 / 285; display: inline-block; }

.on-skyline { display: inline-flex; align-items: center; gap: .3em; font-family: var(--display); line-height: 1; }
.on-skyline .on { font-size: 1em; }
.on-skyline .logo-sky { height: 1.6em; }

/* ---------- Barre haute ---------- */
.topbar {
  position: sticky; top: 0; z-index: 20;
  display: flex; align-items: center; justify-content: space-between; gap: 16px;
  padding: 14px var(--gutter);
  background: rgba(22, 22, 24, .94);
  border-bottom: 2px solid var(--filet-sombre);
  backdrop-filter: blur(6px);
}
.topbar .brand { display: flex; align-items: center; gap: 14px; text-decoration: none; }
.topbar .brand .logo-gd { width: 64px; color: var(--rouge); }
.live-pill { display: inline-flex; align-items: center; gap: 8px; font-family: var(--display); letter-spacing: .3em; font-size: 14px; }
.live-pill::before { content: ''; width: 9px; height: 9px; border-radius: 50%; background: var(--rouge); animation: pulse 1.6s ease-in-out infinite; }
@keyframes pulse { 50% { opacity: .35; } }
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 10px;
  font-family: var(--display); text-transform: uppercase; letter-spacing: .08em; font-size: 22px; line-height: 1;
  padding: 14px 26px 12px; border: 0; cursor: pointer; text-decoration: none;
  background: var(--rouge); color: var(--blanc);
  transition: transform .12s ease, background .12s ease;
}
.btn:hover { background: #b30000; }
.btn:active { transform: translateY(1px); }
.btn:focus-visible, .chip:focus-visible, input:focus-visible, textarea:focus-visible { outline: 2px solid var(--bleu); outline-offset: 2px; }
.btn[disabled] { opacity: .5; cursor: not-allowed; }
.btn .star { width: .8em; color: var(--blanc); }
.btn.small { font-size: 18px; padding: 10px 18px 8px; }
.btn.ghost { background: transparent; border: 2px solid currentColor; }

/* ---------- Hero (style Noir) ---------- */
.hero {
  position: relative; overflow: hidden;
  padding: clamp(40px, 8vw, 110px) var(--gutter) clamp(36px, 6vw, 80px);
  background:
    radial-gradient(60% 70% at 0% 0%, rgba(31, 76, 243, .045), transparent 70%),
    var(--noir);
  text-align: center;
}
.hero .mention.top { color: var(--blanc); opacity: .9; margin-bottom: clamp(24px, 4vw, 48px); }
.hero-title { display: flex; align-items: center; justify-content: center; gap: clamp(14px, 4vw, 56px); }
.hero-title .logo-gd { width: min(640px, 66vw); color: var(--rouge); }
.hero-title .star { width: clamp(22px, 4.5vw, 54px); color: var(--blanc); animation: spin 14.4s linear infinite, breathe 3s ease-in-out infinite; }
@keyframes spin { to { rotate: 360deg; } }
@keyframes breathe { 50% { scale: 1.12; } }
.hero .mention.edition { margin-top: clamp(24px, 4vw, 44px); color: var(--blanc); }
.hero .cta-row { margin-top: clamp(28px, 4vw, 44px); display: flex; gap: 14px; justify-content: center; flex-wrap: wrap; }
.hero .side-mention { position: absolute; top: 50%; color: var(--rouge); opacity: .9; }
.hero .side-mention.left { left: calc(var(--gutter) / 2); transform: translate(-50%, -50%) rotate(-90deg); }
.hero .side-mention.right { right: calc(var(--gutter) / 2); transform: translate(50%, -50%) rotate(90deg); }

/* ---------- Bandeau défilant ---------- */
.ticker {
  background: var(--rouge); color: var(--noir);
  border-top: 2px solid rgba(22, 22, 24, .25); border-bottom: 2px solid rgba(22, 22, 24, .25);
  overflow: hidden; white-space: nowrap; padding: 10px 0 4px;
}
.ticker-track { display: inline-flex; animation: scroll 32s linear infinite; }
.ticker-track span { font-family: var(--display); font-size: clamp(34px, 5vw, 62px); line-height: .86; display: inline-flex; align-items: center; gap: .35em; padding-right: .35em; }
.ticker-track span:nth-child(odd) { color: var(--noir); }
.ticker-track span:nth-child(even) { color: var(--blanc); }
.ticker-track .star { width: .5em; color: var(--blanc); }
@keyframes scroll { to { transform: translateX(-50%); } }

/* ---------- Section live ---------- */
.section { padding: clamp(40px, 6vw, 80px) var(--gutter); }
.section-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 16px; margin-bottom: 24px; padding-bottom: 16px; border-bottom: 2px solid var(--filet-sombre); flex-wrap: wrap; }
.section-head h2 { font-size: clamp(48px, 8vw, 110px); }
.section-head h2 .r { color: var(--rouge); }
.live-grid { display: grid; grid-template-columns: minmax(0, 1fr) 360px; gap: 16px; }
.player { position: relative; aspect-ratio: 16 / 9; background: #000; border: 2px solid var(--filet-sombre); }
.player iframe, .chat iframe { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; }
.chat { position: relative; background: #0e0e10; border: 2px solid var(--filet-sombre); min-height: 420px; }
@media (max-width: 1000px) {
  .live-grid { grid-template-columns: 1fr; }
  .chat { height: 460px; }
}

/* ---------- Section don (style Papier) ---------- */
.don {
  position: relative; background: var(--papier); color: var(--noir);
  padding: clamp(48px, 7vw, 96px) var(--gutter);
}
.don::before, .don::after { content: ''; position: absolute; top: 0; bottom: 0; width: 2px; background: var(--filet); }
.don::before { left: calc(var(--gutter) * .5); }
.don::after { right: calc(var(--gutter) * .5); }
.don-grid { display: grid; grid-template-columns: minmax(0, 1.15fr) minmax(0, 1fr); gap: clamp(24px, 4vw, 56px); align-items: start; }
.don h2 { font-size: clamp(64px, 11vw, 168px); }
.don h2 .r { color: var(--rouge); }
.don .lede { font-size: 16px; line-height: 1.55; max-width: 46ch; margin: 18px 0 28px; color: var(--noir2); }
.don .mention { color: var(--rouge); }
.don .star.deco { width: 34px; color: var(--rouge); margin-bottom: 18px; }

.form-card { border-top: 2px solid var(--filet); padding-top: 22px; }
.label { font-family: var(--display); letter-spacing: .25em; font-size: 15px; display: block; margin-bottom: 10px; }
.chips { display: grid; grid-template-columns: repeat(5, 1fr); gap: 8px; margin-bottom: 12px; }
.chip {
  font-family: var(--display); font-size: 28px; line-height: 1; padding: 14px 0 10px;
  background: transparent; border: 2px solid var(--noir); color: var(--noir); cursor: pointer;
}
.chip[aria-pressed="true"] { background: var(--noir); color: var(--blanc); }
.chip:hover { border-color: var(--rouge); }
.field { margin-bottom: 16px; }
.input {
  width: 100%; background: var(--blanc); border: 2px solid var(--noir); padding: 12px 14px; font-size: 16px; color: var(--noir); border-radius: 0;
}
.input.amount { font-family: var(--display); font-size: 30px; padding: 10px 14px 6px; }
textarea.input { resize: vertical; min-height: 80px; }
.hint { font-size: 12px; color: var(--gris); margin-top: 6px; }
.form-error { color: var(--rouge); font-size: 14px; min-height: 20px; margin: 4px 0 10px; }
.don .btn { width: 100%; font-size: 30px; padding: 18px 20px 14px; }
.closed-note { background: var(--noir); color: var(--blanc); padding: 14px 16px; font-size: 14px; margin-bottom: 14px; }

/* Bloc compteur (style Rouge) */
.counter { background: var(--rouge); color: var(--blanc); position: relative; padding: 26px 24px 22px; }
.counter::before { content: ''; position: absolute; top: 0; right: 0; width: 46%; height: 10px; background: var(--papier); }
.counter .mention { color: var(--blanc); }
.counter .total { font-size: clamp(72px, 10vw, 140px); color: var(--noir); margin: 14px 0 6px; }
.counter .sub { font-family: var(--display); letter-spacing: .25em; font-size: 15px; }
.feed { margin-top: 18px; background: var(--noir); color: var(--blanc); }
.feed h3 { font-family: var(--display); font-weight: 400; letter-spacing: .3em; font-size: 15px; padding: 14px 18px 10px; border-bottom: 2px solid var(--filet-sombre); display: flex; align-items: center; gap: 10px; }
.feed h3 .star { width: 13px; color: var(--rouge); }
.feed ul { list-style: none; max-height: 380px; overflow-y: auto; }
.feed li { padding: 12px 18px; border-bottom: 1px solid rgba(250, 250, 250, .08); display: grid; grid-template-columns: 1fr auto; gap: 2px 14px; }
.feed li .who { font-family: var(--display); font-size: 24px; line-height: 1; text-transform: uppercase; overflow-wrap: anywhere; }
.feed li .amt { font-family: var(--display); font-size: 24px; line-height: 1; color: var(--rouge); }
.feed li .msg { grid-column: 1 / -1; font-size: 13px; color: rgba(250, 250, 250, .72); overflow-wrap: anywhere; }
.feed li.new { animation: flash 1.6s ease; }
@keyframes flash { from { background: rgba(204, 0, 0, .35); } }
.feed .empty { padding: 18px; font-size: 14px; color: rgba(250, 250, 250, .6); }

@media (max-width: 900px) {
  .don-grid { grid-template-columns: 1fr; }
}
@media (max-width: 480px) {
  .chips { grid-template-columns: repeat(3, 1fr); }
  .topbar .live-pill { display: none; }
  .hero .side-mention { display: none; }
}

/* ---------- Pied ---------- */
.footer { padding: 28px var(--gutter); display: flex; align-items: center; justify-content: space-between; gap: 16px; flex-wrap: wrap; border-top: 2px solid var(--filet-sombre); }
.footer .on-skyline { font-size: 20px; opacity: .8; }
.footer .mention { opacity: .6; }

/* ---------- Modale paiement ---------- */
.modal { position: fixed; inset: 0; z-index: 50; display: none; align-items: center; justify-content: center; padding: 16px; background: rgba(10, 10, 12, .82); }
.modal.open { display: flex; }
.modal-box { width: 100%; max-width: 460px; max-height: calc(100dvh - 32px); overflow-y: auto; background: var(--noir); border-top: 6px solid var(--rouge); position: relative; }
.modal-head { display: flex; align-items: center; justify-content: space-between; padding: 16px 18px 12px; border-bottom: 2px solid var(--filet-sombre); }
.modal-head .display { font-size: 34px; }
.modal-head .display .r { color: var(--rouge); }
.close { background: none; border: 0; cursor: pointer; color: var(--blanc); font-family: var(--display); font-size: 18px; letter-spacing: .2em; padding: 6px; }
.modal-body { padding: 18px; }
.pay-frame { display: block; width: 100%; max-width: 420px; height: 560px; margin: 0 auto; border: 0; background: transparent; opacity: 0; transition: opacity .18s ease; }
.pay-frame.ready { opacity: 1; }
.state { text-align: center; padding: 26px 8px 10px; }
.state .star { width: 54px; color: var(--rouge); margin-bottom: 14px; }
.state .star.spin { animation: spin 3s linear infinite, breathe 1.5s ease-in-out infinite; }
.state h3 { font-family: var(--display); font-weight: 400; font-size: 48px; line-height: .86; }
.state p { margin-top: 12px; font-size: 14px; line-height: 1.5; color: rgba(250, 250, 250, .78); }
.state .btn { margin-top: 20px; }
.status-tag { display: inline-block; margin-top: 14px; font-family: var(--display); letter-spacing: .3em; font-size: 14px; padding: 6px 10px 4px; border: 2px solid var(--filet-sombre); }
[hidden] { display: none !important; }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .001s !important; animation-iteration-count: 1 !important; }
}
.on-skyline.big { font-size: 22px; }
.mt { margin-top: 14px; }
.opt { opacity: .55; }
