/* ============================================================
   Pa_Capona_Congratulation.css
   FEN_Pa_Capona_Congratulation
   ─────────────────────────────────────────────────────────
   Layout flex-colonne (100dvh) :
     • img.fond-img    → img/FondDernierePage.jpg, flex:1
     • .texte-zone     → blanc sur fond #828458, auto height
     • .bas-zone       → retour (gauche) | coffre+score (droite)
   Navigation :
     Clic page / IMG_SansNom1 → Pa_Capona_DernierePage1
     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: #828458;
}

/* ============================================================
   ECRAN PRINCIPAL
============================================================ */
.screen {
  width: 100%;
  height: 100dvh;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  position: relative;
  background: #828458;
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
  -webkit-touch-callout: none;
  user-select: none;
  -webkit-user-select: none;
}

/* ============================================================
   IMAGE HAUTE — img/FondDernierePage.jpg
============================================================ */
.fond-img {
  display: block;
  flex: 1 1 0;
  min-height: 0;
  width: 100%;
  object-fit: cover;
  object-position: center center;
  -webkit-user-drag: none;
}

/* ============================================================
   ZONE TEXTE — blanc sur fond #828458
============================================================ */
.texte-zone {
  flex: 0 0 auto;
  background: #828458;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
  padding: 14px 22px 12px;
}

.texte-principal {
  color: #ffffff;
  font-size: clamp(0.80rem, 3.2vw, 1.10rem);
  font-weight: 400;
  line-height: 1.55;
  text-align: center;
  max-width: 560px;
}

.texte-score {
  color: #ffffff;
  font-size: clamp(0.82rem, 3.3vw, 1.12rem);
  font-weight: 700;
  line-height: 1.45;
  text-align: center;
  max-width: 560px;
}

/* ============================================================
   BARRE BAS : retour (gauche) | coffre + score (droite)
============================================================ */
.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); }

.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.9rem; }
  .texte-score     { font-size: 1rem; }
  .texte-zone      { padding: 10px 12px 8px; gap: 7px; }
  .coffre-img      { height: 22px; }
  .points-box      { font-size: 0.68rem; min-width: 26px; }
  .retour-img      { height: 28px; }
}

/* ============================================================
   RESPONSIVE — TABLETTE (>= 600px)
   Image plus grande : texte-zone réduit
============================================================ */
@media (min-width: 600px) {
  .texte-principal { font-size: clamp(1.00rem, 2.8vw, 1.55rem); }
  .texte-score     { font-size: clamp(1.02rem, 2.9vw, 1.58rem); }
  .texte-zone      { padding: 18px 32px 14px; gap: 14px; }
  .coffre-img      { height: clamp(34px, 6vh, 54px); }
  .retour-img      { height: clamp(44px, 8vh, 70px); }
  .fond-img        { object-position: center 100%; }
}

/* ============================================================
   RESPONSIVE — iPad 6 (768-1023px, 900-1199px)
============================================================ */
@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.42rem); }
  .texte-score     { font-size: clamp(1.02rem, 2.6vw, 1.45rem); }
  .fond-img        { object-position: center 100%; }
}

/* ============================================================
   RESPONSIVE — Galaxy Tab A8 + iPad Pro (>= 768px, >= 1200px)
============================================================ */
@media (min-width: 768px) and (min-height: 1200px) {
  .texte-principal { font-size: clamp(1.05rem, 2.8vw, 1.70rem); }
  .texte-score     { font-size: clamp(1.07rem, 2.9vw, 1.72rem); }
  .fond-img        { object-position: center 100%; }
}

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