/* ============================================================
   Pa_Capona_DernierePage1.css
   FEN_Pa_Capona_DernierePage1
   ─────────────────────────────────────────────────────────
   Layout flex-colonne (100dvh) :
     • .texte-zone     → texte noir sur fond #AAB153, auto height
     • img.fond-img    → img/Img_DernierePage.jpg, flex:1
     • .bas-zone       → position absolute, transparent (→ photo)
                         retour | lézard | coffre+score
   Navigation :
     IMG_Retour   → Pa_Capona_Congratulation.html
     IMG_Lezvert  → Pa_Capona_27_Motus2.html
     lien VWT     → https://www.valaiswinetours.com/ (nouvel onglet)
============================================================ */

/* ============================================================
   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: #AAB153;
}

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

/* ============================================================
   ZONE TEXTE — noir sur fond #AAB153
============================================================ */
.texte-zone {
  flex: 0 0 auto;
  max-height: 55dvh;
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
  overscroll-behavior: contain;
  background: #AAB153;
  padding: 16px 20px 12px;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.texte-zone::-webkit-scrollbar        { width: 3px; }
.texte-zone::-webkit-scrollbar-track  { background: transparent; }
.texte-zone::-webkit-scrollbar-thumb  { background: rgba(0,0,0,0.25); border-radius: 3px; }

.texte-principal {
  color: #1a1a00;
  font-size: clamp(0.80rem, 3.2vw, 1.05rem);
  font-weight: 700;
  line-height: 1.55;
  text-align: left;
}

/* Lien Valais Wine Tours */
.lien-vwt {
  color: #0060cc;
  font-weight: 700;
  text-decoration: underline;
  cursor: pointer;
  user-select: none;
  -webkit-user-select: none;
}
.lien-vwt:active { opacity: 0.75; }

/* ============================================================
   IMAGE BASSE — img/Img_DernierePage.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;
}

/* ============================================================
   BARRE BAS — absolue, transparente (photo visible en dessous)
   retour (gauche) | lézard (centre) | 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); }

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

/* ============================================================
   RESPONSIVE — TABLETTE (>= 600px)
============================================================ */
@media (min-width: 600px) {
  .texte-principal { font-size: clamp(0.95rem, 2.6vw, 1.45rem); }
  .texte-zone      { padding: 22px 36px 16px; gap: 12px; max-height: 50dvh; }
  .coffre-img      { height: clamp(34px, 6vh, 54px); }
  .lezard-img      { height: clamp(54px, 10vh, 80px); }
  .retour-img      { height: clamp(44px, 8vh, 70px); }
}

/* ============================================================
   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.4vw, 1.40rem); }
  .texte-zone      { max-height: 48dvh; }
}

/* ============================================================
   RESPONSIVE — Galaxy Tab A8 + iPad Pro (>= 768px, >= 1200px)
============================================================ */
@media (min-width: 768px) and (min-height: 1200px) {
  .texte-principal { font-size: clamp(1.05rem, 2.6vw, 1.65rem); }
  .texte-zone      { max-height: 46dvh; }
}

/* ============================================================
   RESPONSIVE — PAYSAGE MOBILE (hauteur ≤ 430px)
============================================================ */
@media (max-height: 430px) and (orientation: landscape) {
  .texte-principal { font-size: 0.55rem; line-height: 1.3; }
  .texte-zone      { padding: 5px 10px 4px; gap: 4px; max-height: 40dvh; }
  .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; }
}
