/* ============================================================
   Pa_Capona_Fin_Chloe_Leo_Riri.css
   FEN_Pa_Capona_Fin_Chloe_Leo_Riri
   ─────────────────────────────────────────────────────────
   Layout flex-colonne (100dvh) :
     • .texte-haut       → 2 §, blanc sur fond #2F98BB, flex:3
     • .personnages-img  → img/Chloe Leo Riri Fin 2.jpg, flex:5
                           cliquable → Pa_Capona_Resume_Fin
     • .bas-zone         → retour | lézard | coffre+score
   Navigation :
     IMG_SansNom1  (image) → Pa_Capona_Resume_Fin
     IMG_Lezvert           → Pa_Capona_Congratulation
     IMG_Retour            → Pa_Capona_Porte
============================================================ */

/* ============================================================
   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
============================================================ */
.screen {
  width: 100%;
  height: 100dvh;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  position: relative;
  background: #2F98BB;
  -webkit-tap-highlight-color: transparent;
  -webkit-touch-callout: none;
  user-select: none;
  -webkit-user-select: none;
}

/* ============================================================
   ZONE TEXTE HAUT — blanc sur fond #2F98BB
============================================================ */
.texte-haut {
  flex: 3 3 0;
  min-height: 0;
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
  overscroll-behavior: contain;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 12px;
  padding: 14px 22px;
  background: #2F98BB;
}

.texte-haut::-webkit-scrollbar        { width: 3px; }
.texte-haut::-webkit-scrollbar-track  { background: transparent; }
.texte-haut::-webkit-scrollbar-thumb  { background: rgba(255,255,255,0.30); border-radius: 3px; }

.texte-principal {
  color: #ffffff;
  font-size: clamp(0.83rem, 3.4vw, 1.15rem);
  font-weight: 500;
  line-height: 1.55;
  text-align: center;
  max-width: 580px;
}

/* ============================================================
   IMAGE PERSONNAGES — flex:5, cliquable → Resume_Fin
============================================================ */
.personnages-img {
  display: block;
  flex: 5 5 0;
  min-height: 0;
  width: 100%;
  object-fit: cover;
  object-position: top center;
  cursor: pointer;
  -webkit-user-drag: none;
  transition: opacity 0.10s;
}
.personnages-img:active { opacity: 0.90; }

/* ============================================================
   BARRE BAS : retour | lézard | coffre+score
============================================================ */
.bas-zone {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  display: flex;
  flex-direction: row;
  align-items: center;
  justify-content: space-between;
  padding: 6px 12px 8px;
  background: transparent;
}

.retour-img {
  height: clamp(36px, 8vh, 64px);
  width: auto;
  display: block;
  cursor: pointer;
  -webkit-user-drag: none;
  transition: transform 0.12s ease;
}
.retour-img:active { transform: scale(0.90); }

.lezard-img {
  height: clamp(46px, 10vh, 90px);
  width: auto;
  display: block;
  cursor: pointer;
  filter: drop-shadow(1px 2px 5px rgba(0, 0, 0, 0.40));
  -webkit-user-drag: none;
  transition: transform 0.12s ease;
}
.lezard-img:active { transform: scale(0.93); }

.score-zone {
  display: flex;
  flex-direction: row;
  align-items: center;
  gap: 6px;
}

.coffre-img {
  height: clamp(28px, 6vh, 48px);
  width: auto;
  display: block;
  -webkit-user-drag: 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: 3px 6px;
  border-radius: 5px;
  text-align: center;
  line-height: 1.2;
  border: 2px solid #cc0000;
}

/* ============================================================
   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) {
  .texte-principal { font-size: 0.80rem; }
  .texte-haut      { padding: 10px 14px; gap: 8px; }
  .coffre-img      { height: 22px; }
  .points-box      { font-size: 0.68rem; min-width: 26px; }
  .lezard-img      { height: 36px; }
  .retour-img      { height: 28px; }
}

/* ============================================================
   RESPONSIVE — SMARTPHONES (375-430px, >= 700px)
============================================================ */
@media (min-width: 375px) and (max-width: 430px) and (min-height: 700px) {
  .texte-principal { font-size: clamp(0.86rem, 3.5vw, 1.12rem); }
  .lezard-img      { height: clamp(48px, 9vh, 78px); }
}

/* ============================================================
   RESPONSIVE — TABLETTE (>= 600px)
   Image agrandie : ratio texte:image passe de 3:5 → 2:6
============================================================ */
@media (min-width: 600px) {
  .texte-principal    { font-size: clamp(1.00rem, 3vw, 1.70rem); }
  .texte-haut         { padding: 20px 32px; gap: 16px; flex: 2 2 0; }
  .personnages-img    { flex: 6 6 0; }
  .coffre-img         { height: clamp(34px, 6vh, 54px); }
  .lezard-img         { height: clamp(54px, 10vh, 80px); }
  .retour-img         { height: clamp(44px, 8vh, 70px); }
}

/* ============================================================
   RESPONSIVE — iPad 6 seul (768-1023px, 900-1199px)
   Image encore plus grande : ratio 2:7
============================================================ */
@media (min-width: 768px) and (max-width: 1023px) and (min-height: 900px) and (max-height: 1199px) {
  .texte-principal    { font-size: clamp(1.0rem, 2.5vw, 1.45rem); }
  .texte-haut         { flex: 2 2 0; }
  .personnages-img    { flex: 7 7 0; }
}

/* ============================================================
   RESPONSIVE — Galaxy Tab A8 + iPad Pro (>= 768px, >= 1200px)
   Ratio 2:7
============================================================ */
@media (min-width: 768px) and (min-height: 1199px) {
  .texte-principal    { font-size: clamp(1.05rem, 3vw, 1.75rem); }
  .texte-haut         { flex: 2 2 0; }
  .personnages-img    { flex: 7 7 0; }
}

/* ============================================================
   RESPONSIVE — PAYSAGE MOBILE (hauteur ≤ 430px)
============================================================ */
@media (max-height: 430px) and (orientation: landscape) {
  .texte-principal { font-size: 0.56rem; line-height: 1.3; }
  .texte-haut      { padding: 5px 10px; gap: 5px; }
  .bas-zone        { padding: 2px 10px 3px; }
  .coffre-img      { height: 18px; }
  .points-box      { font-size: 0.58rem; min-width: 20px; padding: 1px 3px; }
  .lezard-img      { height: 28px; }
  .retour-img      { height: 22px; }
}
