/* =============================================================
   Naohed Sticker Game — Charte graphique naohed.fr v2
   Palette : #FFB200 | #18472B | #161715 | #FDFDF1
   Fonts   : Muro (bold caps) + James Stroker (script)
   ============================================================= */

/* ── Polices ─────────────────────────────────────────────────── */
@font-face {
  font-family: 'Muro';
  src: url('../fonts/Muro.woff2') format('woff2'),
       url('../fonts/Muro.woff')  format('woff');
  font-weight: 700 900;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: 'JamesStroker';
  src: url('../fonts/JamesStroker.woff2') format('woff2'),
       url('../fonts/JamesStroker.woff')  format('woff');
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}

/* ── Variables ───────────────────────────────────────────────── */
:root {
  --nsg-amber:       #FFB200;
  --nsg-amber-dark:  #D59C18;
  --nsg-green:       #18472B;
  --nsg-green-dark:  #12331F;
  --nsg-black:       #161715;
  --nsg-black-soft:  #282927;
  --nsg-cream:       #FDFDF1;
  --nsg-cream-dark:  #DEDEBE;

  --nsg-f-display: 'Muro', 'Impact', 'Arial Black', sans-serif;
  --nsg-f-script:  'JamesStroker', 'Brush Script MT', cursive;
  --nsg-f-body:    -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;

  --nsg-border:    3px solid var(--nsg-black);
  --nsg-shadow:    4px 4px 0 var(--nsg-black);
  --nsg-shadow-lg: 6px 6px 0 var(--nsg-black);
  --nsg-t:         0.15s ease;
}

/* ── Reset partiel ───────────────────────────────────────────── */
.nsg-wrap *, .nsg-wrap *::before, .nsg-wrap *::after { box-sizing: border-box; }
.nsg-wrap {
  font-family: var(--nsg-f-body);
  color: var(--nsg-black);
  max-width: 1100px;
  margin: 0 auto;
  padding: 0;
}

/* ── En-têtes de section (générique) ───────────────────────────
   Usage : <h2><span class="muro">Titre</span><span class="script">sous-titre</span></h2>
   ─────────────────────────────────────────────────────────────*/
.nsg-section-header { text-align: center; margin-bottom: 2.5rem; }
.nsg-section-header h2 {
  margin: 0 0 .4rem;
  line-height: 1;
  font-size: clamp(1.6rem, 3.5vw, 2.5rem);
}
.nsg-t-muro {
  display: block;
  font-family: var(--nsg-f-display);
  font-weight: 900;
  letter-spacing: .05em;
  text-transform: uppercase;
  font-size: 1em;
  line-height: 1;
}
.nsg-t-script {
  display: block;
  font-family: var(--nsg-f-script);
  font-weight: 400;
  font-size: 1.15em;
  text-transform: none;
  letter-spacing: 0;
  line-height: 1.2;
}
.nsg-section-header p { font-size: 1rem; opacity: .75; margin: 0; }

/* ════════════════════════════════════════════════════════════
   HERO — Fond #161715  |  Ambre + Crème
   ════════════════════════════════════════════════════════════ */
.nsg-hero {
  background: var(--nsg-black);
  padding: clamp(3rem,7vw,6rem) 2rem clamp(2rem,5vw,4rem);
  position: relative;
  overflow: hidden;
}

/* Caravelle nuance jaune — filigrane bas-droite */
.nsg-hero::after {
  content: '';
  position: absolute;
  bottom: -10px; right: -10px;
  width: 340px; height: 340px;
  background: url('../img/caravelle-nuancejaune.png') no-repeat bottom right / contain;
  opacity: .09;
  pointer-events: none;
}

/* Hermine nuance-jaune — filigrane haut-gauche */
.nsg-hero::before {
  content: '';
  position: absolute;
  top: -20px; left: -20px;
  width: 220px; height: 220px;
  background: url('../img/hermine-nuancejaune.png') no-repeat top left / contain;
  opacity: .06;
  pointer-events: none;
}

.nsg-hero__inner {
  position: relative;
  z-index: 1;
  max-width: 720px;
  margin: 0 auto;
  text-align: center;
  display: flex;
  flex-direction: column;
  align-items: center;
}

/* Logo hermine — version jaune sur fond noir */
.nsg-hero__logo {
  width: 68px; height: auto;
  margin-bottom: 1.4rem;
  /* SVG → filtre CSS vers #FFB200 */
  filter: brightness(0) saturate(100%)
          invert(73%) sepia(69%) saturate(700%)
          hue-rotate(2deg) brightness(103%);
}

/* Badge */
.nsg-hero__badge {
  display: inline-block;
  background: var(--nsg-amber);
  color: var(--nsg-black);
  font-family: var(--nsg-f-display);
  font-size: .68rem;
  font-weight: 900;
  letter-spacing: .14em;
  text-transform: uppercase;
  padding: 5px 14px;
  margin-bottom: 1.4rem;
}

/* Titre MURO + James Stroker */
.nsg-hero__title { margin: 0 0 .15em; }
.nsg-hero__title .nsg-t-muro   { color: var(--nsg-cream);  font-size: clamp(2.4rem,7vw,5rem); }
.nsg-hero__title .nsg-t-script { color: var(--nsg-amber);  font-size: clamp(1.7rem,4.5vw,3.3rem); }

.nsg-hero__subtitle {
  color: var(--nsg-cream-dark);
  font-size: clamp(.9rem,2vw,1.05rem);
  line-height: 1.75;
  max-width: 580px;
  margin: 1.4rem 0 2rem;
}

/* Étapes */
.nsg-hero__steps {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 10px;
  margin-bottom: 2.5rem;
  width: 100%;
}
.nsg-step {
  display: flex;
  align-items: center;
  gap: 9px;
  background: var(--nsg-black-soft);
  border: 2px solid rgba(255,178,0,.3);
  padding: 9px 16px;
  color: var(--nsg-cream);
  font-size: .82rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .04em;
  position: relative;
}
.nsg-step__num {
  position: absolute;
  top: -10px; left: 10px;
  background: var(--nsg-amber);
  color: var(--nsg-black);
  font-family: var(--nsg-f-display);
  font-size: .6rem;
  font-weight: 900;
  width: 18px; height: 18px;
  display: flex; align-items: center; justify-content: center;
}
.nsg-step__icon { font-size: 1.2rem; }

/* Mascotte (canard jaune sur fond noir) — desktop uniquement */
.nsg-hero__mascot {
  display: none;
  position: absolute;
  bottom: 0; right: 4%;
  width: 210px;
  z-index: 2;
  filter: drop-shadow(-3px 0 8px rgba(0,0,0,.5));
}
@media (min-width: 900px) { .nsg-hero__mascot { display: block; } }

/* ════════════════════════════════════════════════════════════
   BOUTONS
   ════════════════════════════════════════════════════════════ */
.nsg-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 14px 28px;
  font-family: var(--nsg-f-display);
  font-weight: 900;
  font-size: .92rem;
  letter-spacing: .07em;
  text-transform: uppercase;
  text-decoration: none;
  cursor: pointer;
  border: var(--nsg-border);
  outline: none;
  transition: transform var(--nsg-t), box-shadow var(--nsg-t), background var(--nsg-t);
}
.nsg-btn--primary {
  background: var(--nsg-amber);
  color: var(--nsg-black);
  box-shadow: var(--nsg-shadow);
}
.nsg-btn--primary:hover, .nsg-btn--primary:focus {
  background: var(--nsg-cream);
  transform: translate(-2px,-2px);
  box-shadow: var(--nsg-shadow-lg);
}
.nsg-btn--primary:active { transform: translate(0,0); box-shadow: 2px 2px 0 var(--nsg-black); }
.nsg-btn--submit { min-width: 260px; padding: 16px 36px; font-size: .98rem; }

.nsg-btn-inline {
  background: none;
  border: 2px solid var(--nsg-amber);
  color: var(--nsg-amber);
  padding: 3px 10px;
  font-size: .72rem;
  cursor: pointer;
  font-family: var(--nsg-f-display);
  font-weight: 900;
  letter-spacing: .06em;
  text-transform: uppercase;
  transition: all var(--nsg-t);
  margin-left: 8px;
  vertical-align: middle;
}
.nsg-btn-inline:hover { background: var(--nsg-amber); color: var(--nsg-black); }

/* ════════════════════════════════════════════════════════════
   CLASSEMENTS — Fond crème-dark, deux cards contrastées
   ════════════════════════════════════════════════════════════ */
.nsg-leaderboards {
  background: var(--nsg-cream-dark);
  padding: clamp(2.5rem,5vw,4rem) 2rem;
  border-top: 6px solid var(--nsg-amber);
  border-bottom: 6px solid var(--nsg-green);
}
.nsg-leaderboards .nsg-section-header h2 { color: var(--nsg-black); }
.nsg-leaderboards .nsg-t-muro   { color: var(--nsg-black); }
.nsg-leaderboards .nsg-t-script { color: var(--nsg-amber-dark); }

.nsg-leaderboards__grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 24px;
}
@media (min-width: 768px) { .nsg-leaderboards__grid { grid-template-columns: 1fr 1fr; } }

/* ── Card générique ─────────────────────────────────────────── */
.nsg-lb {
  border: var(--nsg-border);
  overflow: hidden;
  box-shadow: var(--nsg-shadow);
  position: relative;
}

/* ── Card 1 : Stickers — Fond #FFB200 / texte #161715 ────────── */
.nsg-lb--stickers {
  background: var(--nsg-amber);
  color: var(--nsg-black);
}
/* Hermine NOIR en filigrane bas-droite */
.nsg-lb--stickers::after {
  content: '';
  position: absolute;
  bottom: -15px; right: -15px;
  width: 160px; height: 160px;
  background: url('../img/hermine-noir.png') no-repeat bottom right / contain;
  opacity: .07;
  pointer-events: none;
}
/* Caravelle noir haut-gauche */
.nsg-lb--stickers::before {
  content: '';
  position: absolute;
  top: -10px; left: -10px;
  width: 100px; height: 100px;
  background: url('../img/caravelle-noir.png') no-repeat top left / contain;
  opacity: .07;
  pointer-events: none;
}

/* ── Card 2 : Distance — Fond #18472B / texte #FDFDF1 ───────── */
.nsg-lb--distance {
  background: var(--nsg-green);
  color: var(--nsg-cream);
}
/* Hermine NUANCE-BLANC en filigrane bas-droite */
.nsg-lb--distance::after {
  content: '';
  position: absolute;
  bottom: -15px; right: -15px;
  width: 160px; height: 160px;
  background: url('../img/hermine-nuanceblanc.png') no-repeat bottom right / contain;
  opacity: .09;
  pointer-events: none;
}
/* Caravelle NUANCE-BLANC haut-gauche */
.nsg-lb--distance::before {
  content: '';
  position: absolute;
  top: -10px; left: -10px;
  width: 100px; height: 100px;
  background: url('../img/caravelle-nuanceblanc.png') no-repeat top left / contain;
  opacity: .08;
  pointer-events: none;
}

/* ── En-tête de card ─────────────────────────────────────────── */
.nsg-lb__header {
  padding: 1.25rem 1.5rem 1rem;
  border-bottom: 3px solid var(--nsg-black);
}
.nsg-lb--distance .nsg-lb__header { border-bottom-color: rgba(255,255,255,.2); }

.nsg-lb__icon { font-size: 2rem; display: block; margin-bottom: 6px; line-height: 1; }

.nsg-lb__header h3 {
  font-family: var(--nsg-f-display);
  font-size: 1.2rem;
  font-weight: 900;
  letter-spacing: .05em;
  text-transform: uppercase;
  margin: 0 0 3px;
}
.nsg-lb--stickers .nsg-lb__header h3 { color: var(--nsg-black); }
.nsg-lb--distance .nsg-lb__header h3 { color: var(--nsg-amber); }

.nsg-lb__subtitle { font-size: .8rem; opacity: .7; margin: 0; }
.nsg-lb__body { padding: 0; }
.nsg-lb__empty { padding: 2rem 1.5rem; text-align: center; font-style: italic; opacity: .65; }

/* ── Table ───────────────────────────────────────────────────── */
.nsg-lb__table { width: 100%; border-collapse: collapse; font-size: .87rem; }
.nsg-lb__table thead th {
  padding: 8px 12px;
  text-align: left;
  font-family: var(--nsg-f-display);
  font-size: .62rem;
  font-weight: 900;
  letter-spacing: .1em;
  text-transform: uppercase;
}
.nsg-lb--stickers .nsg-lb__table thead { background: rgba(0,0,0,.1); }
.nsg-lb--distance .nsg-lb__table thead { background: rgba(0,0,0,.25); color: var(--nsg-cream-dark); }

.nsg-lb__table tbody tr { border-bottom: 1px solid rgba(0,0,0,.1); }
.nsg-lb--distance .nsg-lb__table tbody tr { border-color: rgba(255,255,255,.1); }
.nsg-lb__table tbody tr:last-child { border-bottom: none; }
.nsg-lb__table td { padding: 11px 12px; vertical-align: middle; position: relative; z-index: 1; }

/* Top 3 */
.nsg-lb--stickers .nsg-lb__row--rank-1 td { background: rgba(0,0,0,.13); }
.nsg-lb--stickers .nsg-lb__row--rank-2 td { background: rgba(0,0,0,.07); }
.nsg-lb--stickers .nsg-lb__row--rank-3 td { background: rgba(0,0,0,.04); }
.nsg-lb--distance .nsg-lb__row--rank-1 td { background: rgba(255,178,0,.2); }
.nsg-lb--distance .nsg-lb__row--rank-2 td { background: rgba(255,178,0,.11); }
.nsg-lb--distance .nsg-lb__row--rank-3 td { background: rgba(255,178,0,.05); }

.nsg-lb__rank { width: 44px; text-align: center; }
.nsg-medal { font-size: 1.25rem; }
.nsg-rank-num {
  display: inline-flex;
  align-items: center; justify-content: center;
  width: 26px; height: 26px;
  border: 2px solid currentColor;
  font-family: var(--nsg-f-display);
  font-weight: 900;
  font-size: .72rem;
  opacity: .5;
}
.nsg-lb__name { font-weight: 800; }
.nsg-lb--stickers .nsg-lb__name { color: var(--nsg-black); }
.nsg-lb--distance .nsg-lb__name { color: var(--nsg-cream); }
.nsg-lb__location { font-size: .8rem; opacity: .7; max-width: 110px; }
.nsg-lb__value {
  text-align: right;
  font-family: var(--nsg-f-display);
  font-weight: 900;
  font-size: 1rem;
}
.nsg-lb--stickers .nsg-lb__value { color: var(--nsg-black); }
.nsg-lb--distance .nsg-lb__value--distance { color: var(--nsg-amber); font-size: .84rem; white-space: nowrap; }

/* ════════════════════════════════════════════════════════════
   FORMULAIRE — Fond #FDFDF1 / texte #161715
   ════════════════════════════════════════════════════════════ */
.nsg-form-section {
  background: var(--nsg-cream);
  padding: clamp(2.5rem,5vw,4rem) 2rem;
  border-top: 4px solid var(--nsg-amber);
  position: relative;
  overflow: hidden;
}
/* Caravelle nuance-noir en filigrane */
.nsg-form-section::after {
  content: '';
  position: absolute;
  bottom: -20px; right: -20px;
  width: 280px; height: 280px;
  background: url('../img/caravelle-nuancenoir.png') no-repeat bottom right / contain;
  opacity: .05;
  pointer-events: none;
}
/* Mascotte nuance-noir haut-gauche, très discret */
.nsg-form-section::before {
  content: '';
  position: absolute;
  top: 0; left: -30px;
  width: 180px; height: 180px;
  background: url('../img/mascot-nuancenoir.png') no-repeat top left / contain;
  opacity: .04;
  pointer-events: none;
}

.nsg-form-section .nsg-section-header h2 { color: var(--nsg-black); }
.nsg-form-section .nsg-t-muro            { color: var(--nsg-black); }
.nsg-form-section .nsg-t-script          { color: var(--nsg-amber-dark); }
.nsg-form-section .nsg-section-header p  { color: var(--nsg-black-soft); }

.nsg-form-wrap { max-width: 680px; margin: 0 auto; position: relative; z-index: 1; }

.nsg-form-success {
  background: var(--nsg-green);
  border: 3px solid var(--nsg-amber);
  padding: 1.5rem;
  color: var(--nsg-cream);
  font-family: var(--nsg-f-display);
  font-weight: 900;
  letter-spacing: .04em;
  text-transform: uppercase;
  text-align: center;
  font-size: .92rem;
  margin-bottom: 1.5rem;
  box-shadow: var(--nsg-shadow);
}

.nsg-form { width: 100%; }
.nsg-form__grid { display: grid; grid-template-columns: 1fr; gap: 20px; }
@media (min-width: 600px) { .nsg-form__grid { grid-template-columns: 1fr 1fr; } }
.nsg-form__field { display: flex; flex-direction: column; gap: 5px; }
.nsg-form__field--full { grid-column: 1 / -1; }

.nsg-form__label {
  font-family: var(--nsg-f-display);
  font-weight: 900;
  font-size: .72rem;
  letter-spacing: .09em;
  text-transform: uppercase;
  color: var(--nsg-black);
}
.nsg-required { color: var(--nsg-amber-dark); }

.nsg-form__input {
  padding: 12px 14px;
  border: 3px solid var(--nsg-black-soft);
  background: #fff;
  font-size: .95rem;
  font-family: var(--nsg-f-body);
  color: var(--nsg-black);
  outline: none;
  width: 100%;
  transition: border-color var(--nsg-t), box-shadow var(--nsg-t);
}
.nsg-form__input:focus {
  border-color: var(--nsg-amber);
  box-shadow: 3px 3px 0 var(--nsg-amber-dark);
}
.nsg-form__input.nsg-input--error {
  border-color: #b00;
  box-shadow: 3px 3px 0 rgba(180,0,0,.25);
}
.nsg-form__hint { font-size: .77rem; color: var(--nsg-black-soft); line-height: 1.5; }
.nsg-form__error {
  font-size: .72rem;
  color: #b00;
  font-weight: 900;
  min-height: 16px;
  font-family: var(--nsg-f-display);
  letter-spacing: .05em;
  text-transform: uppercase;
}

/* Dropzone */
.nsg-dropzone {
  position: relative;
  border: 3px dashed var(--nsg-black-soft);
  padding: 2.5rem 1rem;
  text-align: center;
  cursor: pointer;
  background: rgba(255,178,0,.04);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  transition: all var(--nsg-t);
}
.nsg-dropzone:hover,
.nsg-dropzone.nsg-dropzone--over {
  border-color: var(--nsg-amber);
  background: rgba(255,178,0,.09);
  box-shadow: var(--nsg-shadow);
}
.nsg-dropzone__icon { font-size: 2.4rem; }
.nsg-dropzone__text {
  font-family: var(--nsg-f-display);
  font-weight: 900;
  font-size: .82rem;
  letter-spacing: .07em;
  text-transform: uppercase;
  color: var(--nsg-black);
}
.nsg-dropzone__hint { font-size: .77rem; color: var(--nsg-black-soft); }
.nsg-dropzone__input {
  position: absolute;
  inset: 0;
  opacity: 0;
  cursor: pointer;
  width: 100%;
  height: 100%;
}
.nsg-dropzone__preview img {
  max-height: 200px;
  max-width: 100%;
  margin-top: 12px;
  border: 3px solid var(--nsg-black);
  object-fit: cover;
}

.nsg-form__submit {
  margin-top: 2rem;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 14px;
}
.nsg-form__legal {
  font-size: .74rem;
  color: var(--nsg-black-soft);
  text-align: center;
  max-width: 480px;
  margin: 0;
  line-height: 1.6;
}

/* Spinner */
@keyframes nsg-spin { to { transform: rotate(360deg); } }
.nsg-spinner { animation: nsg-spin .7s linear infinite; vertical-align: middle; }

/* ════════════════════════════════════════════════════════════
   RÈGLES — Fond #18472B / Ambre + Crème
   ════════════════════════════════════════════════════════════ */
.nsg-rules {
  background: var(--nsg-green);
  padding: clamp(2.5rem,5vw,4rem) 2rem;
  position: relative;
  overflow: hidden;
  border-top: 6px solid var(--nsg-amber);
}
/* Hermine BLANC — grand filigrane bas-droite */
.nsg-rules::after {
  content: '';
  position: absolute;
  bottom: -30px; right: -30px;
  width: 320px; height: 320px;
  background: url('../img/hermine-blanc.png') no-repeat bottom right / contain;
  opacity: .07;
  pointer-events: none;
}
/* Caravelle NUANCE-BLANC — filigrane haut-gauche */
.nsg-rules::before {
  content: '';
  position: absolute;
  top: -20px; left: -20px;
  width: 200px; height: 200px;
  background: url('../img/caravelle-nuanceblanc.png') no-repeat top left / contain;
  opacity: .07;
  pointer-events: none;
}

.nsg-rules .nsg-section-header { position: relative; z-index: 1; }
.nsg-rules .nsg-t-muro   { color: var(--nsg-amber); }
.nsg-rules .nsg-t-script { color: var(--nsg-cream); }

.nsg-rules__content {
  position: relative;
  z-index: 1;
  max-width: 720px;
  margin: 0 auto;
}
.nsg-rules__content ol {
  padding: 0;
  margin: 0;
  list-style: none;
  counter-reset: r;
}
.nsg-rules__content li {
  counter-increment: r;
  display: flex;
  gap: 16px;
  align-items: flex-start;
  padding: 13px 0;
  border-bottom: 1px solid rgba(253,253,241,.12);
  color: var(--nsg-cream);
  line-height: 1.65;
  font-size: .95rem;
}
.nsg-rules__content li:last-child { border-bottom: none; }
.nsg-rules__content li::before {
  content: counter(r);
  flex-shrink: 0;
  width: 28px; height: 28px;
  background: var(--nsg-amber);
  color: var(--nsg-black);
  font-family: var(--nsg-f-display);
  font-weight: 900;
  font-size: .8rem;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-top: 2px;
}

/* ════════════════════════════════════════════════════════════
   RESPONSIVE
   ════════════════════════════════════════════════════════════ */
@media (max-width: 480px) {
  .nsg-hero { padding: 2.5rem 1rem 2rem; }
  .nsg-hero__steps { gap: 8px; }
  .nsg-step { font-size: .76rem; padding: 8px 11px; }
  .nsg-lb__location { display: none; }
  .nsg-btn--submit { width: 100%; }
  .nsg-leaderboards,
  .nsg-form-section,
  .nsg-rules { padding-left: 1rem; padding-right: 1rem; }
}

html { scroll-behavior: smooth; }
