/* ============================================================
   Pa_Capona_Prune_derniers_1.css
   FEN_Pa_Capona_Prune_derniers_1
   ─────────────────────────────────────────────────────────
   Layout flex-colonne (100dvh) :
     • Prune2.png      → absolu, haut droite
     • .zone-texte     → fond #DFA9FF, texte noir, padding-right pour Prune
     • .photo-zone     → flex:1, Vigne_pleure.png centré
     • .choix-zone     → fond #CCC073, grille 2×2
     • .bas-zone       → retour | lézard | coffre+score
============================================================ */

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

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

/* ============================================================
   PERSONNAGE PRUNE -- absolu, haut droite
============================================================ */
.prune-img {
  position: absolute;
  height: clamp(190px, 46dvh, 520px);
  top: 0;
  right: -4%;
  z-index: 3;
  pointer-events: none;
  -webkit-user-drag: none;
}

/* ============================================================
   ZONE TEXTE -- fond #DFA9FF (violet clair), texte noir
   padding-right réservé au personnage
============================================================ */
.zone-texte {
  flex: 0 0 auto;
  background: #DFA9FF;
  border-radius: clamp(5px, 1.5vw, 10px);
  padding: clamp(8px, 1.5dvh, 18px) clamp(12px, 4%, 22px);
  /* réserve la colonne droite pour Prune2 */
  padding-right: clamp(110px, 42%, 260px);
  margin: clamp(6px, 1.2dvh, 12px) clamp(10px, 4%, 20px) 0;
  z-index: 2;
}

.zone-p {
  font-size: clamp(0.70rem, 4vw, 1.45rem);
  color: #000000;
  line-height: 1.55;
}

/* Deuxième paragraphe : léger espace au-dessus */
.zone-p2 {
  margin-top: clamp(6px, 1dvh, 12px);
}

/* "MYRMYW" en rouge vif */
.myrmyw {
  color: #cc0000;
  font-weight: 700;
}

/* ============================================================
   PHOTO ZONE -- img/Vigne_pleure.png centrée, zone flexible
============================================================ */
.photo-zone {
  flex: 1 1 0;
  min-height: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: clamp(4px, 0.8dvh, 10px) clamp(10px, 4%, 20px);
  overflow: hidden;
}

.vigne-img {
  max-height: 100%;
  max-width: 78%;
  object-fit: contain;
  display: block;
  border-radius: clamp(4px, 1.5vw, 10px);
  -webkit-user-drag: none;
}

/* ============================================================
   ZONE CHOIX -- fond #CCC073 (ocre doré), texte foncé
============================================================ */
.choix-zone {
  flex: 0 0 auto;
  background: #CCC073;
  border-radius: clamp(5px, 1.5vw, 10px);
  margin: clamp(4px, 0.8dvh, 10px) clamp(10px, 4%, 20px) 0;
  padding: clamp(7px, 1.3dvh, 16px) clamp(10px, 3%, 20px);
  z-index: 2;
}

.choix-titre {
  font-size: clamp(0.80rem, 3.8vw, 1.15rem);
  font-weight: 700;
  color: #1a1a1a;
  text-align: center;
  margin-bottom: clamp(5px, 1dvh, 10px);
}

/* Grille 2 colonnes */
.choix-grille {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: clamp(4px, 0.9dvh, 10px) clamp(6px, 2vw, 14px);
}

/* ---- Option radio ---- */
.choix-option {
  display: flex;
  align-items: center;
  gap: clamp(5px, 1.5vw, 10px);
  background: rgba(255, 255, 255, 0.30);
  border: 2px solid rgba(0, 0, 0, 0.22);
  border-radius: clamp(4px, 1.5vw, 8px);
  padding: clamp(5px, 0.9dvh, 10px) clamp(7px, 2vw, 13px);
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
  transition: background 0.15s ease, border-color 0.15s ease;
}

.choix-option:active {
  background: rgba(255, 255, 255, 0.55);
}

/* Radio natif masqué (accessible) */
.choix-option input[type="radio"] {
  position: absolute;
  opacity: 0;
  width: 0;
  height: 0;
  pointer-events: none;
}

/* Cercle radio custom */
.radio-circle {
  width: clamp(16px, 4.5vw, 24px);
  height: clamp(16px, 4.5vw, 24px);
  border-radius: 50%;
  border: 2.5px solid #555555;
  background: #ffffff;
  flex-shrink: 0;
  position: relative;
  transition: background 0.15s ease;
}

/* Point intérieur -- couleur sombre en accord avec le fond ocre */
.radio-circle::after {
  content: '';
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 46%;
  height: 46%;
  border-radius: 50%;
  background: #7a6a00;
  opacity: 0;
  transition: opacity 0.15s ease;
}

/* Coché → afficher le point */
.choix-option input[type="radio"]:checked + .radio-circle::after {
  opacity: 1;
}

/* Option sélectionnée → bordure renforcée */
.choix-option:has(input[type="radio"]:checked) {
  border-color: rgba(0, 0, 0, 0.48);
  background: rgba(255, 255, 255, 0.52);
}

.radio-label {
  font-size: clamp(0.72rem, 3.4vw, 1.05rem);
  font-weight: 700;
  color: #1a1a1a;
  line-height: 1.2;
}

/* ============================================================
   BARRE BAS : retour (gauche) | lézard (centre) | coffre+score (droite)
============================================================ */
.bas-zone {
  flex: 0 0 auto;
  display: flex;
  flex-direction: row;
  align-items: center;
  justify-content: space-between;
  padding: clamp(4px, 0.9dvh, 10px) clamp(10px, 3%, 20px) clamp(6px, 1.3dvh, 14px);
  margin-top: clamp(4px, 0.8dvh, 10px);
  z-index: 4;
}

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

.lezard-img {
  height: clamp(46px, 10dvh, 90px);
  width: auto;
  display: block;
  cursor: pointer;
  border-radius: clamp(4px, 1.5vw, 10px);
  filter: drop-shadow(1px 2px 5px rgba(0, 0, 0, 0.40));
  -webkit-touch-callout: none;
  -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: clamp(4px, 1.2vw, 10px);
}

.coffre-img {
  height: clamp(28px, 6dvh, 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: clamp(3px, 0.6dvh, 6px) clamp(4px, 1vw, 9px);
  border-radius: 5px;
  text-align: center;
  line-height: 1.2;
  border: 2px solid #cc0000;
}

/* ============================================================
   TOAST -- message temporaire
============================================================ */
.toast {
  position: fixed;
  bottom: 18%;
  left: 50%;
  transform: translateX(-50%);
  background: rgba(0, 0, 0, 0.82);
  color: #ffffff;
  padding: clamp(8px, 1.5dvh, 14px) clamp(14px, 4vw, 24px);
  border-radius: 10px;
  font-size: clamp(0.70rem, 3vw, 1rem);
  text-align: center;
  max-width: 82vw;
  line-height: 1.5;
  white-space: pre-line;
  z-index: 50;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.3s ease;
  display: none;
}
.toast.toast-visible { opacity: 1; }

/* ============================================================
   PANELS (Bravo / Erreur)
============================================================ */
.panel-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.55);
  z-index: 60;
  display: flex;
  align-items: center;
  justify-content: center;
}

.panel-box {
  background: #ffffff;
  border-radius: clamp(10px, 3vw, 20px);
  padding: clamp(16px, 3.5dvh, 32px) clamp(20px, 6vw, 44px);
  max-width: 82vw;
  text-align: center;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: clamp(8px, 1.8dvh, 18px);
  box-shadow: 0 6px 30px rgba(0, 0, 0, 0.35);
}

.panel-bravo  { border: 3px solid #22aa44; }
.panel-erreur { border: 3px solid #cc0000; }

.panel-title {
  font-size: clamp(1.1rem, 5.5vw, 2rem);
  font-weight: 900;
  color: #222222;
}

.panel-pts {
  font-size: clamp(0.82rem, 3.6vw, 1.2rem);
  color: #22aa44;
  font-weight: 700;
}

/* Texte supplémentaire dans le panel bravo */
.panel-text-bravo {
  font-size: clamp(0.78rem, 3.4vw, 1.1rem);
  color: #22aa44;
  font-weight: 600;
  font-style: italic;
  line-height: 1.5;
}

.panel-text {
  font-size: clamp(0.78rem, 3.5vw, 1.15rem);
  color: #333333;
  line-height: 1.5;
}

.panel-arrow {
  height: clamp(36px, 7dvh, 56px);
  width: auto;
  display: block;
  cursor: pointer;
  filter: drop-shadow(1px 1px 3px rgba(0, 0, 0, 0.25));
  -webkit-touch-callout: none;
  -webkit-user-drag: none;
  transition: transform 0.12s ease;
}
.panel-arrow: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 ETROIT (<= 360px)
============================================================ */
@media (max-width: 360px) {
  .zone-p      { font-size: 0.8rem; }
  .zone-texte  { padding-right: clamp(80px, 38%, 180px); }
  .choix-titre { font-size: 0.8rem; }
  .radio-label { font-size: 0.8rem; }
  .coffre-img  { height: 22px; }
  .points-box  { font-size: 0.68rem; min-width: 26px; }
  .lezard-img  { height: 38px; }
  .retour-img  { height: 28px; }
  .prune-img   { height: 230px; }
  .vigne-img   { max-width: 85%; }
}

/* ============================================================
   RESPONSIVE -- SMARTPHONES (375-430px, >= 700px hauteur)
============================================================ */
@media (min-width: 375px) and (max-width: 430px) and (min-height: 700px) {
  .zone-p     { font-size: clamp(0.68rem, 4vw, 0.96rem); }
  .prune-img  { height: clamp(180px, 44dvh, 430px); }
  .prune-img  { right: -7%;}
  .zone-texte { padding-right: clamp(100px, 40%, 220px); }
}

/* ============================================================
   RESPONSIVE -- TABLETTE (>= 600px)
============================================================ */
@media (min-width: 600px) {
  .zone-p      { font-size: clamp(0.72rem, 4vw, 1.5rem); }
  .choix-titre { font-size: clamp(0.88rem, 2.8vw, 1.25rem); }
  .radio-label { font-size: clamp(0.80rem, 2.5vw, 1.1rem); }
  .coffre-img  { height: clamp(34px, 6dvh, 54px); }
  .points-box  { font-size: clamp(0.9rem, 2.2vw, 1.15rem); }
  .lezard-img  { height: clamp(54px, 10dvh, 100px); }
  .prune-img   { height: clamp(270px, 50dvh, 620px); }
  .zone-texte  { padding-right: clamp(130px, 38%, 300px); }
  .vigne-img   { max-width: 72%; }
}

/* ============================================================
   RESPONSIVE -- PAYSAGE MOBILE (hauteur <= 450px)
============================================================ */
@media (max-height: 450px) and (orientation: landscape) {
  .zone-texte  { padding: 4px 10px; margin: 3px 8px 0; padding-right: 36%; }
  .zone-p      { font-size: 0.46rem; line-height: 1.3; }
  .zone-p2     { margin-top: 3px; }
  .choix-titre { font-size: 0.52rem; margin-bottom: 3px; }
  .radio-label { font-size: 0.48rem; }
  .choix-zone  { padding: 4px 10px; margin: 2px 8px 0; }
  .photo-zone  { padding: 2px 8px; }
  .vigne-img   { max-width: 60%; }
  .bas-zone    { padding: 2px 10px 3px; margin-top: 2px; }
  .coffre-img  { height: 20px; }
  .points-box  { font-size: 0.62rem; min-width: 24px; }
  .lezard-img  { height: 28px; }
  .retour-img  { height: 22px; }
  .prune-img   { height: 120px; }
}
