/* ============================================================
   Pa_Capona_Prune_derniers_2.css
   FEN_Pa_Capona_Prune_derniers_2
   ─────────────────────────────────────────────────────────
   Layout flex-colonne (100dvh) :
     • .zone-haut       → fond #2F98BB, texte blanc, centré
     • .image-container → flex:1, img/Fond irrigation1.png
     • .zone-bas        → fond #2F98BB, texte blanc, centré
     • .bas-zone        → coffre+score (gauche) | flèche (droite)
   Fullscreen toggle : tap sur le fond / image / zones texte
   Navigation        : uniquement IMG_SansNom1 (flèche droite)
============================================================ */

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

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

/* ============================================================
   ECRAN PRINCIPAL -- colonne flex pleine hauteur
============================================================ */
.screen {
  position: relative;
  isolation: isolate;
  width: 100%;
  height: 100dvh;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  background: #2F98BB;
  -webkit-tap-highlight-color: transparent;
  -webkit-touch-callout: none;
  user-select: none;
  -webkit-user-select: none;
}

/* ============================================================
   ZONE TEXTE HAUTE -- fond #2F98BB, texte blanc, centré
============================================================ */
.zone-haut {
  flex: 0 0 auto;
  background: #2F98BB;
  padding: clamp(8px, 1.6dvh, 18px) clamp(14px, 5%, 28px) clamp(6px, 1.2dvh, 14px);
  text-align: center;
  z-index: 2;
}

/* Titre "Irrigation" -- légèrement plus grand, gras */
.zone-titre {
  color: #ffffff;
  font-weight: 700;
  font-size: clamp(0.80rem, 4vw, 1.30rem);
  line-height: 1.4;
  margin-bottom: clamp(4px, 0.8dvh, 10px);
}

/* Texte courant des zones */
.zone-p {
  color: #ffffff;
  font-weight: 400;
  font-size: clamp(0.70rem, 3.4vw, 1.05rem);
  line-height: 1.55;
  text-align: center;
}

/* ============================================================
   IMAGE CENTRALE -- prend tout l'espace restant
============================================================ */
.image-container {
  flex: 1 1 0;
  min-height: 0;
  overflow: hidden;
  z-index: 1;
}

.fond-img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center center;
  -webkit-user-drag: none;
  pointer-events: none;
}

/* ============================================================
   ZONE TEXTE BASSE -- fond #2F98BB, texte blanc, centré
============================================================ */
.zone-bas {
  flex: 0 0 auto;
  background: #2F98BB;
  padding: clamp(6px, 1.2dvh, 14px) clamp(14px, 5%, 28px) clamp(6px, 1.2dvh, 14px);
  text-align: center;
  z-index: 2;
}

/* ============================================================
   BARRE BAS
   Gauche  : coffre + LIB_Total_Points
   Droite  : Fleche_suivant 1.png
   Pas de retour, pas de lézard
============================================================ */
.bas-zone {
  flex: 0 0 auto;
  display: flex;
  flex-direction: row;
  align-items: center;
  justify-content: space-between;
  padding: clamp(5px, 1dvh, 12px) clamp(10px, 3%, 20px) clamp(7px, 1.4dvh, 16px);
  background: #ffffff;
  z-index: 4;
}

/* -- Coffre + score (gauche) -- */
.score-zone {
  display: flex;
  flex-direction: row;
  align-items: center;
  gap: clamp(4px, 1.2vw, 10px);
}

.coffre-img {
  height: clamp(28px, 6dvh, 48px);
  width: auto;
  display: block;
  -webkit-user-drag: none;
  pointer-events: none;
}

.points-box {
  background: #cc0000;
  color: #ffffff;
  font-weight: 700;
  font-size: clamp(0.80rem, 2.8vw, 1.1rem);
  min-width: clamp(32px, 9vw, 58px);
  padding: clamp(3px, 0.6dvh, 6px) clamp(4px, 1vw, 9px);
  border-radius: 5px;
  text-align: center;
  line-height: 1.2;
  border: 2px solid #cc0000;
}

/* -- Flèche suivant (droite) -- */
.fleche-img {
  height: clamp(36px, 8dvh, 64px);
  width: auto;
  display: block;
  cursor: pointer;
  -webkit-touch-callout: none;
  -webkit-user-drag: none;
  filter: drop-shadow(1px 2px 4px rgba(0, 0, 0, 0.30));
  transition: transform 0.12s ease;
}
.fleche-img:active { transform: scale(0.90); }

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

/* ============================================================
   RESPONSIVE -- PORTRAIT ÉTROIT (<= 360px)
============================================================ */
@media (max-width: 360px) {
  .zone-titre { font-size: 1rem; }
  .zone-p     { font-size: 0.9rem; line-height: 1.4; }
  .coffre-img { height: 22px; }
  .points-box { font-size: 0.68rem; min-width: 26px; }
  .fleche-img { height: 28px; }
}

/* ============================================================
   RESPONSIVE -- SMARTPHONES (375-430px, >= 700px hauteur)
   iPhone 12 Pro (390×844), iPhone 16 Pro (402×874), S24 Ultra (412×915)
============================================================ */
@media (min-width: 375px) and (max-width: 430px) and (min-height: 700px) {
  .zone-titre { font-size: clamp(0.84rem, 4vw, 1.25rem); }
  .zone-p     { font-size: clamp(0.74rem, 3.5vw, 1.08rem); line-height: 1.6; }
  .coffre-img { height: clamp(30px, 5.5dvh, 44px); }
  .fleche-img { height: clamp(38px, 7.5dvh, 58px); }
}

/* ============================================================
   RESPONSIVE -- TABLETTE (>= 600px)
============================================================ */
@media (min-width: 600px) {
  .zone-titre { font-size: clamp(0.90rem, 3.5vw, 1.5rem); }
  .zone-p     { font-size: clamp(0.82rem, 2.5vw, 1.4rem); line-height: 1.7; }
  .coffre-img { height: clamp(34px, 6dvh, 54px); }
  .points-box { font-size: clamp(0.9rem, 2.2vw, 1.15rem); }
  .fleche-img { height: clamp(44px, 8dvh, 70px); }
}

/* ============================================================
   RESPONSIVE -- PAYSAGE MOBILE (hauteur <= 430px)
============================================================ */
@media (max-height: 430px) and (orientation: landscape) {
  .zone-haut  { padding: 3px 50px 2px 14px; }
  .zone-titre { font-size: 0.44rem; margin-bottom: 2px; }
  .zone-p     { font-size: 0.38rem; line-height: 1.3; }
  .zone-bas   { padding: 2px 14px; }
  .bas-zone   { padding: 2px 10px 3px; }
  .coffre-img { height: 18px; }
  .points-box { font-size: 0.58rem; min-width: 20px; padding: 1px 3px; }
  .fleche-img { height: 22px; }
}
