/* 
  ==========================================================================
  MAWYDO SRL - Réinitialisation & Système de Présentation (UTF-8 Standard)
  Fichier: styles/base.css
  Description: Configuration du défilement snap slide-par-slide, barres de progression
               et normalisation des conteneurs.
  ==========================================================================
*/

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

html {
  scroll-behavior: smooth;
  scroll-snap-type: y proximity;
  font-family: var(--police-principale);
  background-color: var(--couleur-fond-sombre);
  color: var(--couleur-texte-clair-corps);
  font-size: 16px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

body {
  overflow-x: hidden;
  width: 100%;
  min-height: 100vh;
  margin: 0;
  user-select: none; /* Désactivation sélection involontaire lors des slides */
}

/* --- Système de Slides Full-Screen Deck --- */
.deck-presentation {
  width: 100%;
}

.slide {
  position: relative;
  min-height: 100vh;
  scroll-snap-align: start;
  overflow: hidden;
  display: flex;
  align-items: center;
  isolation: isolate;
  background: linear-gradient(135deg, #F9FBFC 0%, #EEF4F5 100%);
  color: var(--couleur-texte-clair-corps);
}

.slide.theme-sombre {
  color: #FFFFFF;
  background: radial-gradient(circle at 70% 30%, #164f66 0%, #0b3044 38%, #071c2b 72%);
}

/* Orbes lumineux d'ambiance */
.orbe-ambiance {
  position: absolute;
  border-radius: 50%;
  filter: blur(4px);
  opacity: 0.5;
  pointer-events: none;
}

.orbe-ambiance.orbe-a {
  width: 380px;
  height: 380px;
  right: -80px;
  top: 10%;
  background: radial-gradient(circle at 35% 35%, rgba(102, 214, 201, 0.4), rgba(31, 97, 126, 0) 70%);
}

.orbe-ambiance.orbe-b {
  width: 300px;
  height: 300px;
  left: -90px;
  bottom: 8%;
  background: radial-gradient(circle at 50% 50%, rgba(231, 184, 92, 0.35), rgba(231, 184, 92, 0) 72%);
}

/* Conteneur Interne de Slide */
.conteneur-slide {
  width: min(1240px, calc(100% - 64px));
  margin: 0 auto;
  padding: 90px 0 60px;
  position: relative;
  z-index: 3;
}

/* Typographie des Titres */
h1, h2, h3 {
  letter-spacing: -0.04em;
  line-height: 1.05;
}

.titre-slide {
  font-size: clamp(2.4rem, 5vw, 4.5rem);
  font-weight: 800;
  max-width: 980px;
}

.soustitre-eyebrow {
  font-size: 0.82rem;
  font-weight: 900;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--couleur-accent-cyan);
  margin-bottom: 1.25rem;
}

.theme-sombre .soustitre-eyebrow {
  color: var(--couleur-accent-cyan-brillant);
}

.texte-lead {
  font-size: clamp(1.1rem, 1.8vw, 1.4rem);
  line-height: 1.5;
  color: var(--couleur-texte-clair-muter);
  max-width: 860px;
  margin-top: 1.25rem;
  margin-bottom: 2rem;
}

.theme-sombre .texte-lead {
  color: var(--couleur-texte-sombre-corps);
}

/* Animations de Révélation Progressives au Scroll */
.element-revelation {
  opacity: 0;
  transform: translateY(24px) scale(0.98);
  transition: opacity 0.7s cubic-bezier(0.2, 0.7, 0.2, 1), transform 0.7s cubic-bezier(0.2, 0.7, 0.2, 1);
}

.slide.actif .element-revelation {
  opacity: 1;
  transform: none;
}

.slide.actif .delai-1 { transition-delay: 0.08s; }
.slide.actif .delai-2 { transition-delay: 0.16s; }
.slide.actif .delai-3 { transition-delay: 0.24s; }
.slide.actif .delai-4 { transition-delay: 0.32s; }
.slide.actif .delai-5 { transition-delay: 0.40s; }

/* Masquage Accessibilité */
.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  border: 0;
}

/*
  ========================================================================== 
  Lecture mobile : typographie, respiration et révélation progressive
  ========================================================================== 
*/
@media (max-width: 900px) {
  html {
    scroll-snap-type: none;
    font-size: 15px;
  }

  body {
    user-select: auto;
  }

  .slide,
  .slide.theme-sombre {
    min-height: auto;
    align-items: flex-start;
    overflow: clip;
  }

  .conteneur-slide {
    width: min(560px, calc(100% - 32px));
    padding: 88px 0 48px;
  }

  .titre-slide {
    max-width: 100%;
    font-size: clamp(2.15rem, 10.2vw, 3.25rem);
    line-height: 1.02;
    overflow-wrap: anywhere;
  }

  .soustitre-eyebrow {
    max-width: 100%;
    margin-bottom: 0.9rem;
    font-size: 0.68rem;
    line-height: 1.45;
    letter-spacing: 0.13em;
  }

  .texte-lead {
    max-width: 100%;
    margin-top: 1rem;
    margin-bottom: 1.35rem;
    font-size: 1rem;
    line-height: 1.55;
  }

  .compteur-slide {
    right: 16px;
    bottom: 12px;
    font-size: 0.66rem;
  }

  /*
    Les longues sections peuvent être traversées rapidement par un geste tactile.
    Leur contenu reste donc toujours rendu sur mobile : aucune zone blanche ne peut
    apparaître si IntersectionObserver ne reçoit pas une étape intermédiaire.
  */
  .element-revelation,
  .slide.actif .element-revelation {
    opacity: 1;
    transform: none;
    transition: none;
  }
}

@media (max-width: 390px) {
  .conteneur-slide {
    width: calc(100% - 24px);
  }

  .titre-slide {
    font-size: clamp(2rem, 9.7vw, 2.65rem);
  }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    scroll-behavior: auto !important;
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
}
