/* ============================================================
   ProSan24 — Effet « Scroll Expand Hero » (portage vanilla)
   Adaptation en HTML/CSS/JS du composant React ScrollExpandMedia.
   ============================================================ */

:root {
  --navy-900: #071331;
  --navy-800: #0a1a3c;
  --navy-700: #0f2350;
  --cyan-400: #22d3ee;
  --cyan-300: #67e8f9;
  --white: #ffffff;
  --gray-50: #f6f8fc;
  --muted: #5b6b82;
}

/* Reset scopé au composant (n'affecte pas le reste du site) */
.se-root, .se-root * { box-sizing: border-box; }

/* Racine du composant */
.se-root {
  transition: background-color .7s ease-in-out;
  overflow-x: hidden;
  font-family: 'Manrope', system-ui, -apple-system, sans-serif;
  color: #e8eefc;
}

.se-section {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: flex-start;
  min-height: 100dvh;
}

.se-inner {
  position: relative;
  width: 100%;
  display: flex;
  flex-direction: column;
  align-items: center;
  min-height: 100dvh;
}

/* Fond plein écran qui s'estompe au scroll */
.se-bg {
  position: absolute;
  inset: 0;
  z-index: 0;
  height: 100%;
  opacity: 0;                 /* piloté par le JS : 1 - progress */
  transition: opacity .1s linear;
}
.se-bg img {
  width: 100vw;
  height: 100vh;
  object-fit: cover;
  object-position: center;
  display: block;
}
.se-bg::after {
  content: "";
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, .1);
}

/* Conteneur central */
.se-container {
  width: 100%;
  max-width: 1200px;
  margin-inline: auto;
  padding-inline: 24px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: flex-start;
  position: relative;
  z-index: 10;
}

.se-stage {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  width: 100%;
  height: 100dvh;
  position: relative;
}

/* Média central qui s'agrandit (dimensions pilotées par le JS) */
.se-media {
  position: absolute;
  z-index: 0;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  max-width: 95vw;
  max-height: 85vh;
  border-radius: 16px;
  box-shadow: 0 0 50px rgba(0, 0, 0, .3);
}
.se-media__frame {
  position: relative;
  width: 100%;
  height: 100%;
}
.se-media__frame img,
.se-media__frame video {
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: 12px;
  display: block;
}
.se-media__tint {
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, .5);
  border-radius: 12px;
  opacity: .7;               /* piloté par le JS */
  transition: opacity .2s ease;
}

/* Date + invitation à scroller (dans le média) */
.se-media__meta {
  position: absolute;
  left: 0;
  right: 0;
  bottom: -3.5rem;
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  gap: .25rem;
  z-index: 10;
}
.se-media__date {
  font-size: clamp(1.05rem, 3.5vw, 1.5rem);
  color: var(--cyan-300);
}
.se-media__hint {
  font-size: clamp(.85rem, 2.6vw, 1rem);
  color: var(--cyan-300);
  font-weight: 500;
}

/* Titre qui se sépare en deux */
.se-title {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  gap: 1rem;
  width: 100%;
  position: relative;
  z-index: 10;
}
.se-title.se-blend { mix-blend-mode: difference; }
.se-title h2 {
  font-family: 'Sora', 'Manrope', sans-serif;
  font-size: clamp(2rem, 5.2vw, 3.25rem);
  font-weight: 800;
  line-height: 1.05;
  color: var(--cyan-300);
  letter-spacing: -.03em;
  max-width: 100%;
  padding-inline: 12px;
}

/* Sous-titre plus long : taille réduite pour qu'il tienne à
   l'intérieur de l'image et ne déborde jamais de l'écran, tout en
   gardant « ProSan24 » bien grand. */
.se-title h2.se-title__rest {
  font-size: clamp(0.9rem, 4.4vw, 2.1rem);
}

/* Contenu qui apparaît une fois le média déployé */
.se-content {
  display: flex;
  flex-direction: column;
  width: 100%;
  padding: 2.5rem 2rem;
  opacity: 0;                /* piloté par le JS */
  transition: opacity .7s ease;
}
@media (min-width: 768px) { .se-content { padding: 2.5rem 4rem; } }
@media (min-width: 1024px) { .se-content { padding-block: 5rem; } }

.se-content__wrap { max-width: 56rem; margin-inline: auto; }
.se-content h3 {
  font-family: 'Sora', sans-serif;
  font-size: clamp(1.4rem, 4.5vw, 1.875rem);
  font-weight: 700;
  line-height: 1.25;
  margin-bottom: 1.5rem;
  color: #fff;
}
.se-content p {
  font-size: clamp(1rem, 2.8vw, 1.125rem);
  line-height: 1.7;
  margin-bottom: 2rem;
  color: #cdd8ef;
}

/* Petite aide visuelle : chevron d'invitation au scroll */
.se-scroll-cue {
  position: absolute;
  bottom: 28px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 20;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  color: var(--cyan-300);
  font-size: .8rem;
  letter-spacing: .08em;
  text-transform: uppercase;
  opacity: .9;
  animation: se-bounce 1.8s infinite;
}
.se-scroll-cue svg { width: 22px; height: 22px; }
@keyframes se-bounce {
  0%, 100% { transform: translate(-50%, 0); }
  50% { transform: translate(-50%, 8px); }
}

@media (prefers-reduced-motion: reduce) {
  .se-scroll-cue { animation: none; }
}

/* ------------------------------------------------------------
   Intégration dans le site : masque le header fixe et le bouton
   d'appel flottant tant que l'intro n'est pas déployée.
   ------------------------------------------------------------ */
body.se-locked { overflow: hidden; }        /* verrouille le scroll pendant l'intro */
body.se-locked .header,
body.se-locked .fab-call {
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  transition: opacity .5s ease, visibility .5s ease, transform .5s ease;
}
body.se-locked .header { transform: translateY(-100%); }

/* Bouton « bridge » dans le contenu révélé */
.se-content .se-cta {
  display: flex;
  flex-wrap: wrap;
  gap: 14px;
  margin-top: 8px;
}

/* ------------------------------------------------------------
   Petits écrans (téléphone) uniquement : resserre les marges et
   améliore la lisibilité du texte révélé sans toucher au rendu PC
   ni casser l'animation.
   ------------------------------------------------------------ */
@media (max-width: 600px) {
  .se-content { padding: 2rem 1.25rem 2.5rem; }
  .se-content__wrap { max-width: 34rem; text-align: center; }
  .se-title { gap: .6rem; }
  .se-content .se-cta { justify-content: center; }
  .se-content .se-cta .btn { flex: 1 1 220px; text-align: center; }
}
