/* ════════════════════════════════════════════════════════════════════
   PRIZAA — Core CSS (shared across all pages)
   Tokens · reset · nav · drawer · mobile menu · footer · buttons
   ════════════════════════════════════════════════════════════════════ */

:root {
  /* Brand greens (identiques light & dark) */
  --green: #18b55a;
  --green-bright: #3ed679;
  --green-soft: rgba(24,181,90,.12);
  --green-glow: rgba(24,181,90,.22);

  /* ── DARK (default) ── */
  --bg: #0a0a0c;
  --bg-2: #111114;
  --bg-3: #17171b;
  --surface: #1c1c21;

  --text: #f1eee7;
  --text-2: #b3b0a8;
  --text-3: #76746d;
  --text-4: #4a4844;

  --line: rgba(255,255,255,.07);
  --line-2: rgba(255,255,255,.14);
  --line-3: rgba(255,255,255,.22);

  --grid-line: rgba(255,255,255,.025);
  --shadow-strong: rgba(0,0,0,.6);
  --shadow-soft: rgba(0,0,0,.4);
  --backdrop: rgba(0,0,0,.75);

  --btn-primary-fg: #04140a;
  --btn-dl-bg: var(--text);
  --btn-dl-fg: var(--bg);
  --btn-dl-bg-hover: #fff;

  /* Type */
  --sans: 'Inter', -apple-system, BlinkMacSystemFont, system-ui, sans-serif;
  --mono: 'JetBrains Mono', 'SF Mono', Menlo, monospace;

  color-scheme: dark;
}

/* ── LIGHT ── */
[data-theme="light"] {
  --bg: #f7f6f1;
  --bg-2: #efece4;
  --bg-3: #e6e2d5;
  --surface: #ffffff;

  --text: #15140f;
  --text-2: #4a4844;
  --text-3: #76746d;
  --text-4: #a8a59a;

  --line: rgba(20,18,12,.08);
  --line-2: rgba(20,18,12,.16);
  --line-3: rgba(20,18,12,.28);

  --grid-line: rgba(20,18,12,.04);
  --shadow-strong: rgba(20,18,12,.18);
  --shadow-soft: rgba(20,18,12,.08);
  --backdrop: rgba(20,18,12,.45);

  --btn-primary-fg: #04140a;
  --btn-dl-bg: #15140f;
  --btn-dl-fg: #f7f6f1;
  --btn-dl-bg-hover: #2a2823;

  color-scheme: light;
}

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
body {
  font-family: var(--sans);
  background: var(--bg);
  color: var(--text);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  font-feature-settings: 'ss01', 'cv11', 'cv02';
  line-height: 1.5;
  overflow-x: hidden;
  padding-top: 60px;
}
img, svg { display: block; max-width: 100%; }
a { color: inherit; text-decoration: none; }
button { font-family: inherit; }
::selection { background: var(--green); color: var(--bg); }

/* ── NAV ──────────────────────────────────────────────────── */
nav.topnav {
  position: fixed;
  inset: 0 0 auto;
  z-index: 99;
  height: 60px;
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 0 28px;
  background: color-mix(in srgb, var(--bg) 72%, transparent);
  backdrop-filter: blur(22px) saturate(1.2);
  -webkit-backdrop-filter: blur(22px) saturate(1.2);
  border-bottom: 1px solid var(--line);
}
.logo {
  font-size: 18px;
  font-weight: 700;
  letter-spacing: -.035em;
  color: var(--text);
  display: inline-flex;
  align-items: center;
  gap: 9px;
}
.logo::before {
  content: '';
  width: 8px; height: 8px;
  background: var(--green);
  border-radius: 50%;
  box-shadow: 0 0 12px rgba(24,181,90,.6);
}

.nav-links { display: flex; align-items: center; gap: 2px; margin-left: 28px; }
.nav-link {
  font-size: 13.5px;
  font-weight: 500;
  color: var(--text-2);
  padding: 6px 12px;
  border-radius: 8px;
  transition: color .15s, background .15s;
}
.nav-link:hover { color: var(--text); background: var(--line); }
.nav-link.active { color: var(--green); }

.nav-r { display: flex; align-items: center; gap: 8px; margin-left: auto; }
.btn-signin {
  font-size: 13.5px;
  font-weight: 500;
  color: var(--text-2);
  padding: 8px 14px;
  border-radius: 8px;
  transition: color .15s, background .15s;
}
.btn-signin:hover { color: var(--text); background: var(--line); }
.btn-dl {
  font-size: 13.5px;
  font-weight: 600;
  color: var(--btn-dl-fg);
  padding: 9px 18px;
  border-radius: 9px;
  background: var(--btn-dl-bg);
  transition: background .15s, transform .12s;
  white-space: nowrap;
  display: inline-flex;
  align-items: center;
  gap: 6px;
}
.btn-dl:hover { background: var(--btn-dl-bg-hover); }
.btn-dl:active { transform: translateY(1px); }

/* ── THEME TOGGLE ───────────────────────────────────────── */
.theme-toggle {
  width: 34px;
  height: 34px;
  border-radius: 50%;
  border: 1px solid var(--line-2);
  background: var(--bg-2);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--text-2);
  transition: border-color .15s, color .15s, background .15s;
  flex-shrink: 0;
}
.theme-toggle:hover { border-color: var(--line-3); color: var(--text); background: var(--bg-3); }
.theme-toggle .icon-sun,
.theme-toggle .icon-moon { display: block; }
[data-theme="light"] .theme-toggle .icon-sun { display: none; }
:root:not([data-theme="light"]) .theme-toggle .icon-moon { display: none; }

.avatar-btn {
  width: 34px; height: 34px;
  border-radius: 50%;
  border: 1px solid var(--line-2);
  background: var(--bg-2);
  cursor: pointer;
  display: flex; align-items: center; justify-content: center;
  transition: border-color .15s;
  flex-shrink: 0;
}
.avatar-btn:hover { border-color: var(--line-3); }
.avatar-btn svg { stroke: var(--text-2); }

/* ── DRAWER ────────────────────────────────────────────────── */
.drawer-backdrop { display: none; position: fixed; inset: 0; z-index: 200; background: rgba(0,0,0,.6); }
.drawer-backdrop.open { display: block; }
.drawer {
  position: fixed; top: 0; right: 0; bottom: 0; z-index: 201;
  width: 320px; max-width: 90vw;
  background: var(--bg-2);
  color: var(--text);
  border-left: 1px solid var(--line);
  display: flex; flex-direction: column;
  transform: translateX(100%);
  transition: transform .3s cubic-bezier(.4,0,.2,1);
}
.drawer.open { transform: translateX(0); }
.drawer-header { padding: 28px 24px 20px; border-bottom: 1px solid var(--line); display: flex; align-items: center; gap: 14px; }
.drawer-avatar { width: 44px; height: 44px; border-radius: 50%; background: var(--green-soft); border: 1px solid rgba(24,181,90,.3); display: flex; align-items: center; justify-content: center; flex-shrink: 0; }
.drawer-user-name { font-size: 15px; font-weight: 700; color: var(--text); line-height: 1.2; }
.drawer-user-email { font-size: 12.5px; color: var(--text-3); margin-top: 2px; word-break: break-all; }
.drawer-close { position: absolute; top: 16px; right: 16px; width: 28px; height: 28px; border-radius: 50%; border: none; background: var(--bg-3); cursor: pointer; display: flex; align-items: center; justify-content: center; }
.drawer-close:hover { background: var(--surface); }
.drawer-close svg { stroke: var(--text-2); }
.drawer-body { flex: 1; padding: 16px 0; overflow-y: auto; }
.drawer-footer { padding: 16px 20px 28px; border-top: 1px solid var(--line); }
.drawer-signout { width: 100%; padding: 12px; border-radius: 10px; border: 1px solid rgba(220,80,40,.3); background: transparent; color: #f08060; font-size: 14px; font-weight: 600; cursor: pointer; font-family: inherit; display: flex; align-items: center; justify-content: center; gap: 8px; }
.drawer-signout:hover { background: rgba(220,80,40,.08); }

/* ── HAMBURGER / MOBILE MENU ───────────────────────────────── */
.hamburger {
  display: none;
  flex-direction: column; justify-content: center; align-items: center; gap: 5px;
  width: 40px; height: 40px; border: none; background: transparent; cursor: pointer;
  border-radius: 8px; padding: 6px; margin-left: 8px;
}
.hamburger span {
  display: block; width: 20px; height: 1.8px; background: var(--text);
  border-radius: 2px; transition: all .25s ease;
}
.hamburger.open span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.hamburger.open span:nth-child(2) { opacity: 0; }
.hamburger.open span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

.mobile-menu {
  display: none;
  position: fixed; inset: 60px 0 0; z-index: 98;
  background: var(--bg); flex-direction: column;
  padding: 24px 24px 40px;
  border-top: 1px solid var(--line);
  overflow-y: auto;
}
.mobile-menu.open { display: flex; }
.mobile-menu .m-link {
  font-size: 22px; font-weight: 600; color: var(--text);
  padding: 18px 0; border-bottom: 1px solid var(--line);
  letter-spacing: -.02em;
}
.mobile-menu .m-link.active { color: var(--green); }
.mobile-menu .m-btns { display: flex; flex-direction: column; gap: 12px; margin-top: 32px; }
.mobile-menu .m-btn-dl {
  background: var(--text); color: var(--bg); padding: 17px;
  border-radius: 12px; text-align: center; font-weight: 700; font-size: 15px;
}
.mobile-menu .m-btn-signin {
  border: 1px solid var(--line-2); color: var(--text); padding: 16px;
  border-radius: 12px; text-align: center; font-weight: 600; font-size: 15px;
}

@media (max-width: 820px) {
  .hamburger { display: flex; }
  .nav-links { display: none !important; }
  .nav-r { display: none !important; }
  nav.topnav { padding: 0 20px; }
}

/* ── COMMON UTILITIES ──────────────────────────────────────── */
.wrap { max-width: 1280px; margin: 0 auto; padding: 0 32px; }
@media (max-width: 720px) { .wrap { padding: 0 20px; } }

.micro {
  font-family: var(--mono);
  font-size: 11px;
  font-weight: 500;
  letter-spacing: .14em;
  text-transform: uppercase;
  color: var(--text-3);
}
.micro.is-green { color: var(--green); }

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  font-family: var(--sans);
  font-size: 15px;
  font-weight: 600;
  padding: 14px 24px;
  border-radius: 12px;
  cursor: pointer;
  border: 1px solid transparent;
  transition: background .15s, border-color .15s, transform .12s, color .15s, box-shadow .2s;
  white-space: nowrap;
  letter-spacing: -.005em;
}
.btn:active { transform: translateY(1px); }
.btn-primary {
  background: var(--green);
  color: var(--btn-primary-fg);
  box-shadow: 0 0 0 0 var(--green-glow), 0 10px 30px -10px rgba(24,181,90,.5);
}
.btn-primary:hover {
  background: var(--green-bright);
  box-shadow: 0 0 0 6px var(--green-glow), 0 10px 40px -10px rgba(24,181,90,.7);
}
.btn-ghost {
  background: transparent;
  color: var(--text);
  border-color: var(--line-2);
}
.btn-ghost:hover { border-color: var(--line-3); background: var(--bg-2); }
.btn-light {
  background: var(--text);
  color: var(--bg);
}
.btn-light:hover { background: var(--btn-dl-bg-hover); }

/* ── FOOTER ────────────────────────────────────────────────── */
.footer {
  border-top: 1px solid var(--line);
  padding: 80px 0 40px;
  background: var(--bg);
}
.footer-inner { max-width: 1280px; margin: 0 auto; padding: 0 32px; }
.footer-top {
  display: grid;
  grid-template-columns: minmax(0, 1.6fr) repeat(3, minmax(0, 1fr));
  gap: 48px;
  padding-bottom: 56px;
  border-bottom: 1px solid var(--line);
}
.footer-tagline {
  font-size: 14px;
  color: var(--text-3);
  line-height: 1.55;
  max-width: 280px;
  margin-top: 16px;
}
.footer-tagline strong { color: var(--text-2); font-weight: 500; }
.footer-col-title {
  font-family: var(--mono);
  font-size: 10.5px;
  font-weight: 500;
  letter-spacing: .14em;
  text-transform: uppercase;
  color: var(--text-4);
  margin-bottom: 18px;
}
.footer-col-list { list-style: none; display: flex; flex-direction: column; gap: 10px; }
.footer-col-list a { font-size: 13.5px; color: var(--text-2); transition: color .15s; }
.footer-col-list a:hover { color: var(--green); }
.footer-bottom {
  padding-top: 28px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 16px;
  font-family: var(--mono);
  font-size: 11px;
  color: var(--text-4);
  letter-spacing: .04em;
}
.footer-legal { display: flex; gap: 20px; flex-wrap: wrap; }
.footer-legal a { color: var(--text-3); transition: color .15s; }
.footer-legal a:hover { color: var(--text); }
.footer-social { display: inline-flex; align-items: center; gap: 6px; color: var(--text-3); transition: color .15s; }
.footer-social:hover { color: var(--text); }

@media (max-width: 820px) {
  .footer-top { grid-template-columns: 1fr 1fr; gap: 40px 32px; }
  .footer-brand { grid-column: 1 / -1; }
}
@media (max-width: 560px) {
  .footer { padding: 56px 0 32px; }
  .footer-top { grid-template-columns: 1fr; gap: 36px; }
  .footer-bottom { flex-direction: column; align-items: flex-start; }
}

/* ── SKIP LINK ─────────────────────────────────────────────── */
.skip-link {
  position: absolute;
  top: -40px; left: 0;
  background: var(--green);
  color: var(--bg);
  padding: 8px 16px;
  z-index: 999;
  font-size: 14px;
  font-weight: 600;
  transition: top .2s;
}
.skip-link:focus { top: 0; }

/* ── COOKIE BANNERS (dark theme) ───────────────────────────── */
#cookieBanner, #cnil-banner { font-family: var(--sans) !important; }

/* ── REDUCED MOTION ────────────────────────────────────────── */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: .01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: .01ms !important;
  }
}
