/* ============================================================
   RESET & BASE
============================================================ */
*, *::before, *::after {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

html, body {
  width: 100%;
  height: 100%;
  overflow: hidden;
  font-family: 'Helvetica Neue', Arial, sans-serif;
  background: #fff;
}

/* ============================================================
   ÉCRAN PRINCIPAL — fond blanc, flex colonne
============================================================ */
.screen {
  position: relative;
  width: 100%;
  height: 100dvh;
  background: #ffffff;
  display: flex;
  flex-direction: column;
  overflow-y: auto;   /* scroll de secours si contenu > écran */
}

/* ============================================================
   EN-TÊTE — titre gauche + vignette droite
============================================================ */
.header-zone {
  display: flex;
  flex-direction: row;
  align-items: flex-start;
  padding: clamp(10px, 2.5%, 22px) clamp(12px, 3%, 26px) clamp(6px, 1.5%, 14px);
  gap: clamp(8px, 2vw, 18px);
  flex-shrink: 0;
}

/* --- Titre --- */
.titre-zone {
  flex: 1;
  min-width: 0;
}

.page-title {
  font-size: clamp(0.85rem, 4.5vw, 2.5rem);
  font-weight: 700;
  color: #0a2a6e;
  line-height: 1.35;
  animation: fadeIn 0.4s ease 0.1s both;
}

/* --- Vignette + label --- */
.vignette-zone {
  display: flex;
  flex-direction: column;
  align-items: center;
  flex-shrink: 0;
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
  user-select: none;
  animation: fadeIn 0.4s ease 0.15s both;
}

.vignette-img {
  height: clamp(55px, 10dvh, 105px);
  width: auto;
  display: block;
  filter: drop-shadow(1px 2px 4px rgba(0,0,0,0.25));
}
.vignette-zone:active .vignette-img { transform: scale(0.92); }

.ou-passez {
  font-size: clamp(0.58rem, 1.8vw, 0.82rem);
  color: #555;
  margin-top: 4px;
  pointer-events: none;
  text-align: center;
}

/* ============================================================
   PHOTO GLACIER — prend tout l'espace vertical disponible
============================================================ */
.glacier-zone {
  flex: 1;           /* absorbe l'espace restant entre header et texte */
  min-height: 0;     /* indispensable pour que flex-shrink fonctionne */
  padding: 0 clamp(12px, 3%, 26px) clamp(6px, 1.5%, 14px);
  overflow: hidden;
}

.glacier-img {
  width: 100%;
  height: 100%;      /* remplit le flex-item */
  object-fit: cover;
  object-position: center 40%;
  border-radius: clamp(4px, 1vw, 8px);
  display: block;
  animation: fadeIn 0.5s ease 0.2s both;
}

/* ============================================================
   TEXTE — LIB_Libellé
============================================================ */
.texte-zone {
  flex: 0 0 auto;    /* taille naturelle, ne grandit pas */
  padding: 0 clamp(14px, 4%, 30px) clamp(10px, 2%, 20px);
  display: flex;
  flex-direction: column;
  gap: clamp(8px, 1.5dvh, 16px);
  animation: fadeIn 0.5s ease 0.25s both;
}

/* Accroche (gras, centré) */
.intro-text {
  font-size: clamp(0.78rem, 4vw, 2rem);
  font-weight: 600;
  color: #0a2a6e;
  text-align: center;
  line-height: 1.5;
}

/* "MyRulesMyWater" en rouge */
.accent {
  color: #cc2200;
}

/* Corps de texte */
.body-text {
  font-size: clamp(0.78rem, 3vw, 1.2rem);
  color: #0a2a6e;
  text-align: center;
  line-height: 1.6;
}

/* ============================================================
   OVERLAY DE TRANSITION
============================================================ */
.transition-overlay {
  position: fixed;
  inset: 0;
  background: #000;
  z-index: 100;
  opacity: 1;
  pointer-events: all;
  transition: opacity 0.4s ease;
}

/* ============================================================
   ANIMATIONS
============================================================ */
@keyframes fadeIn {
  from { opacity: 0; }
  to   { opacity: 1; }
}

/* ============================================================
   RESPONSIVE — SMARTPHONE (≤ 500px)  ex. Samsung S21
============================================================ */
@media (max-width: 500px) {
  .page-title   { font-size: clamp(0.80rem, 3.6vw, 1.05rem); }
  .intro-text   { font-size: clamp(0.74rem, 3.2vw, 0.95rem); }
  .body-text    { font-size: clamp(0.66rem, 2.8vw, 0.86rem); }
}

/* ============================================================
   RESPONSIVE — TABLETTE COURTE (≥ 600px, ≤ 1100px haut)
   ex. iPad 6ème génération
============================================================ */
@media (min-width: 600px) and (max-height: 1100px) {
  .intro-text   { font-size: clamp(0.78rem, 4vw, 2rem); }
  .body-text    { font-size: clamp(0.78rem, 3vw, 1.2rem); }
}

/* ============================================================
   RESPONSIVE — TABLETTE HAUTE (≥ 600px, ≥ 1100px haut)
   ex. Samsung Tab A8
============================================================ */
@media (min-width: 600px) and (min-height: 1100px) {
  .vignette-img { height: clamp(80px, 9dvh, 130px); }
  .page-title   { font-size: clamp(0.85rem, 4.5vw, 2.5rem); }
  .intro-text   { font-size: clamp(0.78rem, 4vw, 2rem); }
  .body-text    { font-size: clamp(0.78rem, 3vw, 1.2rem); }
}

/* ============================================================
   RESPONSIVE — PORTRAIT ÉTROIT (≤ 360px)
============================================================ */
@media (max-width: 360px) {
  .page-title  { font-size: 1rem; }
  .intro-text  { font-size: 0.68rem; }
  .body-text   { font-size: 0.62rem; }
}

/* ============================================================
   RESPONSIVE — PAYSAGE MOBILE (hauteur ≤ 450px)
============================================================ */
@media (max-height: 450px) and (orientation: landscape) {
  .header-zone  { padding: 4px 10px; }
  .page-title   { font-size: 0.72rem; }
  .vignette-img { height: 44px; }
  .ou-passez    { font-size: 0.52rem; }
  .glacier-zone { max-height: 55dvh; }  /* limite en paysage très court */
  .intro-text   { font-size: 0.58rem; line-height: 1.3; }
  .body-text    { font-size: 0.54rem; line-height: 1.3; }
}
