/* ================================================================
   TDM COMMUNITY — Landing page
   Palette stricte: #000 fond, #FFF texte, #A3A3A3 secondaire, #262626 lignes
   ================================================================ */

:root {
  --noir: #000000;
  --blanc: #FFFFFF;
  --gris: #A3A3A3;
  --ligne: #262626;
  --ease: cubic-bezier(0.22, 1, 0.36, 1);
}

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

html {
  scroll-behavior: smooth;
}

body {
  background: var(--noir);
  color: var(--blanc);
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
  font-size: 1rem;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  -webkit-tap-highlight-color: transparent;
  overflow-x: hidden;
}

::selection {
  background: var(--blanc);
  color: var(--noir);
}

.inverted ::selection {
  background: var(--noir);
  color: var(--blanc);
}

.container {
  width: 100%;
  max-width: 680px;
  margin: 0 auto;
  padding: 0 20px;
}

.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
}

/* ---------- Typographie display ---------- */

h1, h2, h3, .cta, .stat-num, .eyebrow, .counter-num, .counter-label, .stack-letter {
  font-family: 'Anton', 'Arial Narrow', sans-serif;
  font-weight: 400;
  text-transform: uppercase;
  letter-spacing: 0.01em;
}

h1 {
  font-size: clamp(2.6rem, 11vw, 4.5rem);
  line-height: 1.02;
  margin-bottom: 20px;
}

h1 .grey {
  color: var(--gris);
}

h2 {
  font-size: clamp(2rem, 8.5vw, 3.4rem);
  line-height: 1.05;
  margin-bottom: 24px;
}

h2.giant {
  font-size: clamp(2.4rem, 10vw, 4rem);
}

h3 {
  font-size: 1.15rem;
  letter-spacing: 0.03em;
  margin-bottom: 6px;
}

.eyebrow {
  font-size: 0.85rem;
  letter-spacing: 0.14em;
  color: var(--gris);
  margin-bottom: 18px;
}

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

section, .hero {
  padding: 72px 0;
  border-top: 1px solid var(--ligne);
}

.hero {
  border-top: none;
  padding-top: 56px;
  text-align: center;
}

section {
  text-align: center;
}

.sub {
  color: var(--gris);
  font-size: 1.05rem;
  max-width: 480px;
  margin: 0 auto 36px;
}

.body-copy {
  font-size: 1.05rem;
  max-width: 520px;
  margin: 0 auto 28px;
}

.small-note {
  font-size: 0.85rem;
  color: var(--gris);
  margin-bottom: 32px;
}

.small-note a {
  color: inherit;
}

/* ---------- Vidéos (loops TikTok côte à côte, section histoire) ---------- */

.video-row {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 8px;
  margin: 0 auto 32px;
  max-width: 560px;
}

.video-row video {
  width: 100%;
  aspect-ratio: 9 / 16;
  display: block;
  border: 2px solid var(--blanc);
  background: var(--ligne);
  object-fit: cover;
}

/* ---------- Stats hero ---------- */

.stats {
  display: flex;
  justify-content: center;
  gap: 0;
  margin-bottom: 36px;
  border-top: 1px solid var(--ligne);
  border-bottom: 1px solid var(--ligne);
}

.stat {
  flex: 1;
  padding: 20px 10px;
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.stat + .stat {
  border-left: 1px solid var(--ligne);
}

.stat-num {
  font-size: clamp(1.5rem, 6vw, 2.2rem);
  line-height: 1.1;
}

.stat-label {
  font-family: 'Inter', sans-serif;
  font-size: 0.8rem;
  color: var(--gris);
  text-transform: none;
  letter-spacing: 0;
}

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

.cta {
  display: block;
  width: 100%;
  max-width: 480px;
  margin: 0 auto;
  padding: 20px 28px;
  background: var(--blanc);
  color: var(--noir);
  border: 2px solid var(--blanc);
  font-size: 1.3rem;
  letter-spacing: 0.04em;
  cursor: pointer;
  transition: background 0.2s var(--ease), color 0.2s var(--ease), transform 0.12s ease;
  border-radius: 0;
  -webkit-appearance: none;
  appearance: none;
}

.cta:hover {
  background: var(--noir);
  color: var(--blanc);
}

.cta:active {
  transform: scale(0.98);
}

.cta:focus-visible {
  outline: 3px solid var(--blanc);
  outline-offset: 3px;
}

/* CTA dans la section inversée (fond blanc) */
.cta-dark {
  background: var(--noir);
  color: var(--blanc);
  border-color: var(--noir);
}

.cta-dark:hover {
  background: var(--blanc);
  color: var(--noir);
}

.cta-dark:focus-visible {
  outline: 3px solid var(--noir);
}

.trust {
  font-size: 0.85rem;
  color: var(--gris);
  margin-top: 14px;
}

/* ---------- Section 2 — Compteur ---------- */

.counter {
  padding: 28px 0;
}

.counter-row {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  margin-bottom: 12px;
  gap: 12px;
}

.counter-num {
  font-size: 1.3rem;
}

.counter-label {
  font-size: 0.8rem;
  letter-spacing: 0.14em;
  color: var(--gris);
}

.progress {
  width: 100%;
  height: 8px;
  background: var(--ligne);
}

.progress-fill {
  height: 100%;
  width: 0%;
  background: var(--blanc);
  transition: width 0.8s ease;
}

/* ---------- Bandes défilantes ---------- */

.marquee {
  overflow: hidden;
  border-top: 1px solid var(--ligne);
  padding: 14px 0;
}

.marquee-track {
  display: flex;
  width: max-content;
  animation: marquee 26s linear infinite;
}

.marquee-group {
  font-family: 'Anton', sans-serif;
  text-transform: uppercase;
  font-size: 0.9rem;
  letter-spacing: 0.14em;
  color: var(--gris);
  white-space: nowrap;
}

@keyframes marquee {
  to { transform: translateX(-50%); }
}

/* ---------- Section 3 — Tissot (inversée) ---------- */

.inverted {
  background: var(--blanc);
  color: var(--noir);
  border-top: none;
  position: relative;
  overflow: hidden;
}

.inverted .container {
  position: relative;
}

.watermark {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  font-family: 'Anton', sans-serif;
  font-size: min(70vw, 480px);
  line-height: 1;
  color: rgba(0, 0, 0, 0.045);
  pointer-events: none;
  user-select: none;
}

.inverted .eyebrow {
  color: #525252;
}

.inverted .small-note {
  color: #525252;
}

.inverted .trust {
  color: #525252;
}

.tissot-img {
  max-width: 360px;
  margin: 0 auto 28px;
}

.tissot-img img {
  width: 100%;
  height: auto;
  display: block;
  border: 2px solid var(--noir);
}

/* ---------- Section 4 — Stack ---------- */

.stack {
  text-align: left;
  margin-bottom: 48px;
  border-top: 1px solid var(--ligne);
}

.stack-row {
  display: flex;
  gap: 20px;
  padding: 28px 0;
  border-bottom: 1px solid var(--ligne);
}

.stack-letter {
  font-size: 2rem;
  line-height: 1;
  color: var(--gris);
  flex-shrink: 0;
  min-width: 36px;
}

.stack-row p {
  color: var(--gris);
  font-size: 0.98rem;
}

/* ---------- Section 5 — Histoire ---------- */

.story {
  text-align: left;
  margin-bottom: 40px;
}

.story p + p {
  margin-top: 16px;
}

/* ---------- Section 7 — FAQ ---------- */

.faq {
  text-align: left;
  border-top: 1px solid var(--ligne);
}

.faq details {
  border-bottom: 1px solid var(--ligne);
}

.faq summary {
  font-family: 'Inter', sans-serif;
  font-weight: 600;
  font-size: 1rem;
  padding: 20px 36px 20px 0;
  cursor: pointer;
  list-style: none;
  position: relative;
}

.faq summary::-webkit-details-marker {
  display: none;
}

.faq summary::after {
  content: '+';
  position: absolute;
  right: 4px;
  top: 50%;
  transform: translateY(-50%);
  font-family: 'Anton', sans-serif;
  font-size: 1.4rem;
  color: var(--gris);
}

.faq summary::after {
  transition: transform 0.25s var(--ease);
}

.faq details[open] summary::after {
  transform: translateY(-50%) rotate(45deg);
}

.faq summary:focus-visible {
  outline: 3px solid var(--blanc);
  outline-offset: 2px;
}

.faq-answer {
  overflow: hidden;
  transition: height 0.3s var(--ease);
}

.faq details p {
  color: var(--gris);
  padding: 0 0 20px;
  font-size: 0.98rem;
}

/* ---------- Section 8 — CTA final ---------- */

.final-cta {
  padding: 96px 0;
}

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

footer {
  border-top: 1px solid var(--ligne);
  padding: 48px 0 120px;
  text-align: left;
}

#reglements {
  scroll-margin-top: 24px;
}

footer h3 {
  font-size: 0.9rem;
  letter-spacing: 0.1em;
  color: var(--gris);
  margin-bottom: 12px;
}

.reglements p,
.disclaimer {
  font-size: 0.8rem;
  color: var(--gris);
  line-height: 1.7;
}

.disclaimer {
  margin-top: 24px;
  padding-top: 24px;
  border-top: 1px solid var(--ligne);
}

.copyright {
  margin-top: 24px;
  font-size: 0.8rem;
  color: var(--gris);
}

/* ---------- Sticky CTA mobile ---------- */

.sticky-cta {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  padding: 12px 16px calc(12px + env(safe-area-inset-bottom));
  background: var(--noir);
  border-top: 1px solid var(--ligne);
  transform: translateY(110%);
  transition: transform 0.3s ease;
  z-index: 100;
}

.sticky-cta.visible {
  transform: translateY(0);
}

.sticky-cta .cta {
  padding: 16px 20px;
  font-size: 1.1rem;
  max-width: 640px;
}

@media (min-width: 768px) {
  .sticky-cta {
    display: none;
  }
}

/* ---------- Animations ---------- */

.fade-up {
  opacity: 0;
  transform: translateY(16px);
  animation: fadeUp 0.6s ease forwards;
}

.fade-up.delay-1 { animation-delay: 0.1s; }
.fade-up.delay-2 { animation-delay: 0.2s; }
.fade-up.delay-3 { animation-delay: 0.3s; }
.fade-up.delay-4 { animation-delay: 0.4s; }

@keyframes fadeUp {
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.reveal {
  opacity: 0;
  transform: translateY(24px);
  transition: opacity 0.7s var(--ease), transform 0.7s var(--ease);
}

.reveal.in-view {
  opacity: 1;
  transform: translateY(0);
}

/* Cascade: les enfants arrivent un par un après leur section */
.reveal .stack-row,
.reveal .faq details,
.reveal .video-row video {
  opacity: 0;
  transform: translateY(14px);
  transition: opacity 0.55s var(--ease), transform 0.55s var(--ease);
}

.reveal.in-view .stack-row,
.reveal.in-view .faq details,
.reveal.in-view .video-row video {
  opacity: 1;
  transform: translateY(0);
}

.reveal.in-view .stack-row:nth-child(1),
.reveal.in-view .faq details:nth-child(1),
.reveal.in-view .video-row video:nth-child(1) { transition-delay: 0.08s; }
.reveal.in-view .stack-row:nth-child(2),
.reveal.in-view .faq details:nth-child(2),
.reveal.in-view .video-row video:nth-child(2) { transition-delay: 0.16s; }
.reveal.in-view .stack-row:nth-child(3),
.reveal.in-view .faq details:nth-child(3),
.reveal.in-view .video-row video:nth-child(3) { transition-delay: 0.24s; }
.reveal.in-view .stack-row:nth-child(4),
.reveal.in-view .faq details:nth-child(4) { transition-delay: 0.32s; }

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }
  .fade-up,
  .reveal,
  .reveal .stack-row,
  .reveal .faq details,
  .reveal .video-row video {
    opacity: 1;
    transform: none;
    animation: none;
    transition: none;
  }
  .marquee-track {
    animation: none;
  }
  .progress-fill,
  .sticky-cta,
  .cta,
  .faq-answer,
  .faq summary::after {
    transition: none;
  }
}
