/* ==========================================================================
   Reset & base
   ========================================================================== */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

:root {
  --font-hand: 'Annie Use Your Telescope', cursive;
  --text: #ffffff;
  --accent: #D0FF00;
  --bg-fallback: #14180f;
  --content-max: 720px;
  --section-pad-v: 5rem;
  --section-pad-h: 4rem;
}

html { font-size: 17pt; scroll-behavior: smooth; }
@media (max-width: 1280px) { html { font-size: 14pt; } }
@media (max-width: 980px)  { html { font-size: 13pt; } }
@media (max-width: 736px)  { html { font-size: 13pt; } }

body {
  font-family: var(--font-hand);
  background: var(--bg-fallback);
  color: var(--text);
  line-height: 1.5;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

u { text-decoration: underline; }
strong { font-weight: bolder; }

/* ==========================================================================
   Sections
   ========================================================================== */
.screen {
  position: relative;
  min-height: 100vh;
  min-height: 100svh;
  display: flex;
  align-items: center;
  padding: var(--section-pad-v) var(--section-pad-h);
  background-color: var(--bg-fallback);
  background-size: cover, cover;
  background-position: center, center;
  background-repeat: no-repeat, no-repeat;
  isolation: isolate;
}

.screen--hero { align-items: flex-end; padding-bottom: 6rem; }

/* Overlay sombre */
.screen::before {
  content: '';
  position: absolute;
  inset: 0;
  z-index: 0;
  pointer-events: none;
}

/* Texture de bruit (SVG inline) */
.screen::after {
  content: '';
  position: absolute;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  background-size: 512px 512px;
}

/* Backgrounds par section : image + gradient fallback
   → remplacez assets/images/containerXX.png par vos propres images */
/* Backgrounds par section */
.screen[data-bg="01"] { background-image: url('../images/container1.png'); }
.screen[data-bg="02"] { background-image: url('../images/container2.png'); }
.screen[data-bg="03"] { background-image: url('../images/container3.png'); }
.screen[data-bg="04"] { background-image: url('../images/container4.png'); }
.screen[data-bg="05"] { background-image: url('../images/container5.png'); }
.screen[data-bg="06"] { background-image: url('../images/container6.png'); }
.screen[data-bg="07"] { background-image: url('../images/container7.png'); }
.screen[data-bg="08"] { background-image: url('../images/container8.png'); }
.screen[data-bg="09"] { background-image: url('../images/container9.png'); }

/* ==========================================================================
   Contenu
   ========================================================================== */
.content {
  position: relative;
  z-index: 1;
  width: 100%;
  max-width: var(--content-max);
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
  align-items: flex-start;
}

.title {
  font-family: var(--font-hand);
  font-weight: 400;
  font-size: clamp(2.5rem, 6.5vw, 4rem);
  line-height: 1.15;
  letter-spacing: 0;
}

.lead {
  font-family: var(--font-hand);
  font-weight: 400;
  font-size: clamp(1.1rem, 1.8vw, 1.5rem);
  line-height: 1.8;
  max-width: 100%;
}

.label {
  font-family: var(--font-hand);
  font-weight: 400;
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.5em;
  line-height: 1.75;
  color: rgba(255,255,255,0.9);
  padding-right: 0.5em; /* compense le letter-spacing */
}

mark { color: var(--accent); background: transparent; }

/* ==========================================================================
   Boutons
   ========================================================================== */
.arrow-btn,
.email-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 2.75rem;
  height: 2.75rem;
  padding: 0;
  border: 1px solid #fff;
  border-radius: 50%;
  background: transparent;
  color: #fff;
  cursor: pointer;
  text-decoration: none;
  transition: transform 0.25s ease, border-color 0.25s ease, background-color 0.25s ease;
}

.arrow-btn {
  margin-top: 1rem;
}

.arrow-btn:hover,
.email-btn:hover {
  transform: scale(1.08);
  border-color: rgba(255,255,255,0.72);
  background-color: rgba(255,255,255,0.04);
}

.arrow-btn:focus-visible,
.email-btn:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 3px;
}

.arrow-btn svg,
.email-btn svg {
  width: 60%;
  height: 60%;
  fill: currentColor;
}

/* ==========================================================================
   Animations
   ========================================================================== */
/* Sans JS : tout est visible */
.reveal,
[data-split] .word { opacity: 1; transform: none; }

/* Avec JS : état initial caché (appliqué avant peinture grâce au <script> head) */
.js .reveal {
  opacity: 0;
  transform: translateY(0.5rem);
  transition: opacity 1s cubic-bezier(0.22,1,0.36,1), transform 1s cubic-bezier(0.22,1,0.36,1);
  transition-delay: var(--delay, 0s);
  will-change: opacity, transform;
}
.js .reveal--down { transform: translateY(-0.5rem); }

.js .is-visible .reveal,
.js .is-visible .reveal--down {
  opacity: 1;
  transform: none;
}

/* Mot à mot pour [data-split] */
.js [data-split] .word {
  display: inline-block;
  opacity: 0;
  transform: translateY(0.5rem);
  transition: opacity 1s cubic-bezier(0.22,1,0.36,1), transform 1s cubic-bezier(0.22,1,0.36,1);
  transition-delay: calc(var(--i, 0) * 0.08s);
}
.js .is-visible [data-split] .word {
  opacity: 1;
  transform: none;
}

/* ==========================================================================
   Footer
   ========================================================================== */
.site-footer {
  display: flex;
  justify-content: center;
  padding: 1.5rem 1rem 2rem;
  background: var(--bg-fallback);
  font-family: Arial, Helvetica, sans-serif;
  font-size: 11px;
  color: rgba(255,255,255,0.3);
  letter-spacing: 0.05em;
  text-align: center;
}

/* ==========================================================================
   Responsive
   ========================================================================== */
@media (max-width: 736px) {
  :root {
    --section-pad-v: 3.5rem;
    --section-pad-h: 1.75rem;
    --content-max: 100%;
  }
  .screen--hero { padding-bottom: 4rem; }
  .content { gap: 1.15rem; }
  .label { letter-spacing: 0.35em; }
}

/* ==========================================================================
   Préférences utilisateur
   ========================================================================== */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    transition-duration: 0.01ms !important;
    animation-duration: 0.01ms !important;
    scroll-behavior: auto !important;
  }
  .js .reveal,
  .js .reveal--down,
  .js [data-split] .word {
    opacity: 1;
    transform: none;
  }
}