/* ==========================================================================
   Sorare Lens — site public
   ========================================================================== */

:root {
  /* Fonds */
  --color-background: #07090D;
  --color-background-deep: #080B0F;
  /* Surfaces */
  --color-surface: #0D1118;
  --color-surface-raised: #121822;
  --color-surface-hover: #18202C;
  /* Bordures */
  --color-border: #252E3B;
  --color-border-strong: #344052;
  /* Texte */
  --color-text: #F4F7FB;
  --color-text-muted: #9AA5B5;
  --color-text-subtle: #697586;
  /* Marque */
  --color-brand: #C8F45D;
  --color-brand-logo: #D1F374;
  --color-brand-dark: #101408;
  /* États */
  --color-success: #55DFA5;
  --color-information: #76A9FF;
  --color-warning: #F1B963;
  --color-danger: #F07C82;
  --color-rare: #E7C5FF;

  --font: "Inter", "SF Pro Display", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --radius: 16px;
  --radius-sm: 10px;
  --container: 1160px;
  --nav-h: 72px;
}

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

html { scroll-behavior: smooth; scroll-padding-top: calc(var(--nav-h) + 16px); }

body {
  font-family: var(--font);
  background: var(--color-background);
  color: var(--color-text);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  overflow-x: hidden;
}

img { max-width: 100%; display: block; }
a { color: inherit; text-decoration: none; }
ul, ol { list-style: none; }

.container { max-width: var(--container); margin: 0 auto; padding: 0 24px; }
.container.narrow { max-width: 780px; }
.center { text-align: center; }
.muted { color: var(--color-text-muted); }

/* ---------- Typo ---------- */

h1, h2, h3 { font-weight: 800; letter-spacing: -0.02em; line-height: 1.08; }

h1 { font-size: clamp(2.4rem, 5.2vw, 4rem); }
h2 { font-size: clamp(1.8rem, 3.6vw, 2.7rem); margin-bottom: 18px; }
h3 { font-size: 1.08rem; letter-spacing: -0.01em; line-height: 1.3; }

.accent {
  color: var(--color-brand);
  text-shadow: 0 0 44px color-mix(in srgb, var(--color-brand) 45%, transparent);
}

.lede {
  font-size: clamp(1.02rem, 1.6vw, 1.18rem);
  color: var(--color-text-muted);
  max-width: 56ch;
}

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.09em;
  text-transform: uppercase;
  color: var(--color-brand);
  margin-bottom: 16px;
  white-space: nowrap;
}
@media (max-width: 560px) { .eyebrow { white-space: normal; } }
.eyebrow.center { display: block; text-align: center; }
.eyebrow .dot {
  width: 7px; height: 7px; border-radius: 50%;
  background: var(--color-brand);
  box-shadow: 0 0 12px var(--color-brand);
  animation: pulse 2.4s ease-in-out infinite;
}

@keyframes pulse { 0%,100% { opacity: 1 } 50% { opacity: .35 } }

/* ---------- Boutons ---------- */

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 11px 22px;
  border-radius: 999px;
  font-weight: 700;
  font-size: 0.95rem;
  border: 1px solid transparent;
  transition: transform .18s ease, box-shadow .18s ease, background .18s ease, border-color .18s ease;
  cursor: pointer;
}
.btn-lg { padding: 15px 30px; font-size: 1.02rem; }
.btn-brand {
  background: var(--color-brand);
  color: var(--color-brand-dark);
  box-shadow: 0 6px 28px color-mix(in srgb, var(--color-brand) 28%, transparent);
}
.btn-brand:hover { transform: translateY(-2px); box-shadow: 0 10px 36px color-mix(in srgb, var(--color-brand) 42%, transparent); }
.btn-ghost {
  background: transparent;
  color: var(--color-text);
  border-color: var(--color-border-strong);
}
.btn-ghost:hover { background: var(--color-surface-hover); border-color: var(--color-text-subtle); }

/* ---------- Nav ---------- */

.nav {
  position: fixed;
  inset: 0 0 auto 0;
  z-index: 50;
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  background: color-mix(in srgb, var(--color-background) 78%, transparent);
  border-bottom: 1px solid color-mix(in srgb, var(--color-border) 60%, transparent);
}
.nav-inner {
  max-width: var(--container);
  margin: 0 auto;
  padding: 0 24px;
  height: var(--nav-h);
  display: flex;
  align-items: center;
  gap: 32px;
}
.nav-logo { display: flex; align-items: center; gap: 11px; }
.nav-logo-text { font-weight: 800; font-size: 1.06rem; letter-spacing: -0.01em; display: flex; flex-direction: column; line-height: 1.1; }
.nav-logo-text small {
  font-size: 0.58rem; font-weight: 700; letter-spacing: 0.22em;
  text-transform: uppercase; color: var(--color-text-subtle);
}
.nav-links { display: flex; gap: 26px; margin-left: auto; }
.nav-links a {
  font-size: 0.92rem; font-weight: 600; color: var(--color-text-muted);
  transition: color .15s ease;
}
.nav-links a:hover { color: var(--color-text); }
.nav-cta { flex-shrink: 0; }

/* ---------- Hero ---------- */

.hero {
  position: relative;
  padding: calc(var(--nav-h) + 72px) 0 96px;
  background:
    radial-gradient(1000px 520px at 78% -10%, color-mix(in srgb, var(--color-brand) 9%, transparent), transparent 65%),
    radial-gradient(800px 500px at -10% 40%, color-mix(in srgb, var(--color-information) 7%, transparent), transparent 60%),
    var(--color-background);
}
.hero-glow {
  position: absolute; inset: 0; pointer-events: none;
  background-image:
    linear-gradient(color-mix(in srgb, var(--color-border) 34%, transparent) 1px, transparent 1px),
    linear-gradient(90deg, color-mix(in srgb, var(--color-border) 34%, transparent) 1px, transparent 1px);
  background-size: 56px 56px;
  mask-image: radial-gradient(720px 480px at 62% 6%, rgb(0 0 0 / .5), transparent 72%);
  -webkit-mask-image: radial-gradient(720px 480px at 62% 6%, rgb(0 0 0 / .5), transparent 72%);
}
.hero-grid {
  position: relative;
  display: grid;
  grid-template-columns: minmax(0, 1.05fr) minmax(0, 0.95fr);
  gap: 56px;
  align-items: center;
}
.hero-copy h1 { margin-bottom: 22px; }
.hero-copy .lede { margin-bottom: 32px; }
.hero-actions { display: flex; flex-wrap: wrap; gap: 14px; margin-bottom: 30px; }
.hero-badges { display: flex; flex-wrap: wrap; gap: 10px 22px; }
.hero-badges li {
  display: inline-flex; align-items: center; gap: 8px;
  font-size: 0.85rem; font-weight: 600; color: var(--color-text-muted);
}
.hero-badges svg { color: var(--color-brand); flex-shrink: 0; }

/* ---------- Maquette app ---------- */

.hero-visual { position: relative; perspective: 1400px; }
.app-frame {
  position: relative;
  background: linear-gradient(160deg, var(--color-surface-raised), var(--color-surface) 55%);
  border: 1px solid var(--color-border);
  border-radius: 20px;
  padding: 18px;
  box-shadow: 0 40px 90px -30px rgb(0 0 0 / .8), inset 0 1px 0 color-mix(in srgb, var(--color-text) 6%, transparent);
  transform: rotateY(-7deg) rotateX(3deg);
  transition: transform .5s ease;
}
.hero-visual:hover .app-frame { transform: rotateY(-3deg) rotateX(1deg); }
.frame-shadow {
  position: absolute; inset: auto 8% -34px 8%; height: 60px;
  background: radial-gradient(closest-side, rgb(0 0 0 / .55), transparent);
  filter: blur(6px);
  z-index: -1;
}
.app-topbar { display: flex; justify-content: space-between; align-items: center; margin-bottom: 16px; }
.app-brand { display: flex; align-items: center; gap: 8px; font-weight: 700; font-size: 0.85rem; }
.app-sync {
  display: flex; align-items: center; gap: 7px;
  font-size: 0.72rem; font-weight: 600; color: var(--color-text-muted);
}
.app-sync .pulse {
  width: 7px; height: 7px; border-radius: 50%;
  background: var(--color-success);
  box-shadow: 0 0 10px var(--color-success);
  animation: pulse 2s ease-in-out infinite;
}
.app-gwrail { display: flex; gap: 8px; margin-bottom: 14px; overflow: hidden; }
.gw-pill {
  flex: 1; min-width: 0;
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-sm);
  padding: 8px 10px;
  display: flex; flex-direction: column; gap: 1px;
}
.gw-pill em {
  font-style: normal; font-size: 0.56rem; font-weight: 800;
  letter-spacing: 0.12em; text-transform: uppercase; color: var(--color-text-subtle);
}
.gw-pill strong { font-size: 0.82rem; letter-spacing: -0.01em; }
.gw-pill span { font-size: 0.62rem; color: var(--color-text-subtle); white-space: nowrap; }
.gw-pill.live { border-color: color-mix(in srgb, var(--color-brand) 55%, transparent); background: color-mix(in srgb, var(--color-brand) 7%, var(--color-surface)); }
.gw-pill.live em { color: var(--color-brand); }

.app-body { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.app-card {
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-sm);
  padding: 12px;
}
.app-card header {
  display: flex; justify-content: space-between; align-items: baseline; margin-bottom: 10px;
}
.app-card header span {
  font-size: 0.6rem; font-weight: 800; letter-spacing: 0.12em;
  text-transform: uppercase; color: var(--color-text-subtle);
}
.app-card header b { font-size: 0.78rem; }
.app-card header b.ok { color: var(--color-success); }
.streak-bar {
  height: 7px; border-radius: 99px;
  background: var(--color-surface-hover);
  overflow: hidden; margin-bottom: 9px;
}
.streak-bar i {
  display: block; height: 100%;
  background: linear-gradient(90deg, color-mix(in srgb, var(--color-brand) 70%, transparent), var(--color-brand));
  border-radius: 99px;
  box-shadow: 0 0 14px color-mix(in srgb, var(--color-brand) 60%, transparent);
}
.app-card footer { font-size: 0.68rem; color: var(--color-text-muted); }
.lineup-row {
  display: flex; align-items: center; gap: 8px;
  font-size: 0.7rem; color: var(--color-text-muted);
  padding: 4px 0;
}
.lineup-row + .lineup-row { border-top: 1px solid color-mix(in srgb, var(--color-border) 55%, transparent); }
.lineup-row .pos {
  font-style: normal; flex-shrink: 0;
  width: 18px; height: 18px; border-radius: 5px;
  display: grid; place-items: center;
  background: var(--color-surface-hover);
  color: var(--color-brand);
  font-size: 0.58rem; font-weight: 800;
}
.lineup-row span { flex: 1; min-width: 0; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.lineup-row b { color: var(--color-text); font-size: 0.7rem; }
.app-stats {
  grid-column: 1 / -1;
  display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px;
}
.app-stats div {
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-sm);
  padding: 10px 12px;
}
.app-stats b { display: block; font-size: 1.15rem; font-weight: 800; letter-spacing: -0.02em; }
.app-stats span { font-size: 0.62rem; color: var(--color-text-subtle); }

/* ---------- Trustbar ---------- */

.trustbar {
  border-block: 1px solid var(--color-border);
  background: var(--color-background-deep);
}
.trustbar-inner {
  display: flex; align-items: center; gap: 28px;
  padding-block: 18px; flex-wrap: wrap;
}
.trustbar-label {
  font-size: 0.72rem; font-weight: 700; letter-spacing: 0.14em;
  text-transform: uppercase; color: var(--color-text-subtle);
}
.trustbar ul { display: flex; flex-wrap: wrap; gap: 10px; }
.comp {
  --c: var(--color-text-muted);
  display: inline-flex; align-items: center; gap: 8px;
  font-size: 0.84rem; font-weight: 700;
  padding: 8px 16px;
  border: 1px solid color-mix(in srgb, var(--c) 32%, transparent);
  border-radius: 999px;
  color: var(--color-text);
  background:
    linear-gradient(180deg, color-mix(in srgb, var(--c) 10%, var(--color-surface)), var(--color-surface) 80%);
  box-shadow: inset 0 1px 0 color-mix(in srgb, var(--c) 14%, transparent);
  transition: transform .2s ease, border-color .2s ease, box-shadow .2s ease;
}
.comp svg { color: var(--c); filter: drop-shadow(0 0 6px color-mix(in srgb, var(--c) 55%, transparent)); }
.comp:hover {
  transform: translateY(-2px);
  border-color: color-mix(in srgb, var(--c) 60%, transparent);
  box-shadow: 0 6px 18px -6px color-mix(in srgb, var(--c) 35%, transparent),
              inset 0 1px 0 color-mix(in srgb, var(--c) 20%, transparent);
}
.comp-streak   { --c: var(--color-brand); }
.comp-u23      { --c: var(--color-success); }
.comp-champion { --c: var(--color-warning); }
.comp-allstar  { --c: var(--color-information); }
.comp-s27      { --c: var(--color-rare); }

/* ---------- Sections ---------- */

.section { padding: 104px 0; }
.section h2.center { margin-bottom: 14px; }
.narrow-lede { margin: 0 auto 10px; text-align: center; }
.desktop-br { display: inline; }

/* ---------- Galerie / cartes ---------- */

.gallery {
  background:
    radial-gradient(900px 480px at 50% 115%, color-mix(in srgb, var(--color-brand) 7%, transparent), transparent 70%),
    var(--color-background);
  overflow: hidden;
}
.card-fan {
  display: flex; justify-content: center; align-items: flex-end;
  gap: clamp(-40px, -2vw, -20px);
  margin: 60px 0 34px;
}
.scard {
  --r: 0deg; --y: 0px;
  position: relative;
  width: clamp(160px, 18vw, 224px);
  transform: rotate(var(--r)) translateY(var(--y));
  transition: transform .35s cubic-bezier(.2,.8,.3,1.1);
  flex-shrink: 0;
  margin-inline: -12px;
  filter: drop-shadow(0 30px 40px rgb(0 0 0 / .6));
  border-radius: 4.5% / 3%;
  overflow: hidden;
}
.scard:hover {
  transform: rotate(0deg) translateY(calc(var(--y) - 26px)) scale(1.06);
  z-index: 5;
}
.scard img { width: 100%; height: auto; display: block; }
.scard-meta {
  position: absolute;
  left: 8%; right: 8%; bottom: 5%;
  display: flex; justify-content: space-between; align-items: center; gap: 8px;
  padding: 7px 12px;
  border-radius: 999px;
  background: color-mix(in srgb, var(--color-background) 78%, transparent);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  border: 1px solid color-mix(in srgb, var(--color-border-strong) 70%, transparent);
  font-size: 0.66rem; font-weight: 600; color: var(--color-text-muted);
  opacity: 0;
  transform: translateY(8px);
  transition: opacity .3s ease, transform .3s ease;
  white-space: nowrap;
}
.scard:hover .scard-meta { opacity: 1; transform: none; }
.scard-meta b {
  color: var(--color-brand);
  font-size: 0.6rem; font-weight: 800; letter-spacing: 0.05em; text-transform: uppercase;
}
.scard-shine {
  position: absolute; inset: 0;
  background: linear-gradient(115deg, transparent 32%, rgb(255 255 255 / .13) 46%, transparent 60%);
  transform: translateX(-120%);
  transition: transform .8s ease;
  pointer-events: none;
}
.scard:hover .scard-shine { transform: translateX(120%); }
.gallery-note {
  text-align: center;
  font-size: 0.78rem;
  color: var(--color-text-subtle);
  max-width: 62ch;
  margin: 0 auto;
}

/* ---------- Features ---------- */

.feature-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 16px;
  margin-top: 54px;
}
.feature {
  background: linear-gradient(170deg, var(--color-surface-raised), var(--color-surface) 70%);
  border: 1px solid var(--color-border);
  border-radius: var(--radius);
  padding: 26px 22px;
  transition: transform .25s ease, border-color .25s ease, background .25s ease;
}
.feature:hover {
  transform: translateY(-4px);
  border-color: color-mix(in srgb, var(--color-brand) 40%, var(--color-border));
}
.feature-icon {
  width: 44px; height: 44px;
  border-radius: 12px;
  display: grid; place-items: center;
  color: var(--color-brand);
  background: color-mix(in srgb, var(--color-brand) 9%, transparent);
  border: 1px solid color-mix(in srgb, var(--color-brand) 22%, transparent);
  margin-bottom: 18px;
}
.feature h3 { margin-bottom: 9px; }
.feature p { font-size: 0.88rem; color: var(--color-text-muted); }

/* ---------- Lecture seule ---------- */

.readonly {
  background:
    radial-gradient(760px 420px at 12% 0%, color-mix(in srgb, var(--color-brand) 6%, transparent), transparent 65%),
    var(--color-background-deep);
  border-block: 1px solid var(--color-border);
}
.readonly-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  gap: 64px;
  align-items: center;
}
.readonly .lede { margin-bottom: 16px; }
.readonly-list { display: flex; flex-direction: column; gap: 14px; }
.readonly-list li {
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-left: 3px solid var(--color-brand);
  border-radius: var(--radius-sm);
  padding: 18px 20px;
}
.readonly-list b { display: block; font-size: 0.98rem; margin-bottom: 4px; }
.readonly-list span { font-size: 0.88rem; color: var(--color-text-muted); }

/* ---------- Steps ---------- */

.steps {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 18px;
  margin-top: 54px;
  counter-reset: step;
}
.steps li {
  position: relative;
  background: linear-gradient(170deg, var(--color-surface-raised), var(--color-surface) 70%);
  border: 1px solid var(--color-border);
  border-radius: var(--radius);
  padding: 30px 26px;
}
.step-num {
  display: inline-grid; place-items: center;
  width: 40px; height: 40px;
  border-radius: 50%;
  font-weight: 800; font-size: 1.05rem;
  color: var(--color-brand-dark);
  background: var(--color-brand);
  box-shadow: 0 0 26px color-mix(in srgb, var(--color-brand) 35%, transparent);
  margin-bottom: 20px;
}
.steps h3 { margin-bottom: 9px; }
.steps p { font-size: 0.9rem; color: var(--color-text-muted); }

/* ---------- FAQ ---------- */

.faq details {
  border: 1px solid var(--color-border);
  border-radius: var(--radius-sm);
  background: var(--color-surface);
  margin-top: 12px;
  overflow: hidden;
}
.faq details:first-of-type { margin-top: 46px; }
.faq summary {
  cursor: pointer;
  list-style: none;
  padding: 18px 22px;
  font-weight: 700;
  font-size: 0.98rem;
  display: flex; align-items: center; justify-content: space-between; gap: 16px;
  transition: background .15s ease;
}
.faq summary:hover { background: var(--color-surface-hover); }
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after {
  content: "+";
  font-size: 1.3rem; font-weight: 400;
  color: var(--color-brand);
  transition: transform .2s ease;
  flex-shrink: 0;
}
.faq details[open] summary::after { transform: rotate(45deg); }
.faq details p {
  padding: 18px 22px 22px;
  font-size: 0.92rem;
  color: var(--color-text-muted);
  border-top: 1px solid color-mix(in srgb, var(--color-border) 55%, transparent);
}

/* ---------- CTA final ---------- */

.cta-final {
  background:
    radial-gradient(720px 420px at 50% 0%, color-mix(in srgb, var(--color-brand) 10%, transparent), transparent 70%),
    var(--color-background-deep);
  border-top: 1px solid var(--color-border);
  padding: 120px 0;
}
.cta-mark { margin: 0 auto 26px; filter: drop-shadow(0 0 30px color-mix(in srgb, var(--color-brand) 45%, transparent)); }
.cta-final .lede { margin: 0 auto 34px; }
.cta-note { margin-top: 16px; font-size: 0.82rem; color: var(--color-text-subtle); }

/* ---------- Footer ---------- */

.footer {
  background: var(--color-background-deep);
  border-top: 1px solid var(--color-border);
  padding: 56px 0 40px;
}
.footer-grid {
  display: flex; justify-content: space-between; gap: 40px;
  flex-wrap: wrap;
  padding-bottom: 36px;
  border-bottom: 1px solid var(--color-border);
  margin-bottom: 26px;
}
.footer-brand { max-width: 380px; }
.footer-brand img { height: 40px; width: auto; margin-bottom: 16px; }
.footer-brand p { font-size: 0.85rem; color: var(--color-text-muted); }
.footer-links { display: flex; flex-direction: column; gap: 10px; }
.footer-links a { font-size: 0.88rem; color: var(--color-text-muted); transition: color .15s ease; }
.footer-links a:hover { color: var(--color-text); }
.footer-legal p { font-size: 0.76rem; color: var(--color-text-subtle); max-width: 90ch; }
.footer-legal p + p { margin-top: 10px; }
.footer-legal strong { color: var(--color-text-muted); }

/* ---------- Reveal on scroll ---------- */

.reveal {
  opacity: 0;
  transform: translateY(22px);
  transition: opacity .6s ease, transform .6s ease;
}
.reveal.in { opacity: 1; transform: none; }

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .reveal { opacity: 1; transform: none; transition: none; }
  .eyebrow .dot, .app-sync .pulse { animation: none; }
}

/* ---------- Responsive ---------- */

@media (max-width: 1020px) {
  .feature-grid { grid-template-columns: repeat(2, 1fr); }
  .hero-grid { grid-template-columns: 1fr; gap: 60px; }
  .hero-visual { max-width: 560px; margin: 0 auto; }
  .readonly-grid { grid-template-columns: 1fr; gap: 40px; }
}

@media (max-width: 760px) {
  .nav-links { display: none; }
  .section { padding: 72px 0; }
  .steps { grid-template-columns: 1fr; }
  .desktop-br { display: none; }
  .card-fan { flex-wrap: wrap; gap: 18px; margin-top: 40px; }
  .scard { margin-inline: 0; transform: none; width: clamp(140px, 40vw, 190px); }
  .scard:hover { transform: translateY(-10px) scale(1.03); }
  .app-gwrail .gw-pill:nth-child(n+4) { display: none; }
}

@media (max-width: 480px) {
  .feature-grid { grid-template-columns: 1fr; }
  .hero-actions .btn { width: 100%; }
  .app-stats { grid-template-columns: 1fr 1fr; }
  .app-stats div:last-child { grid-column: 1 / -1; }
}
