/* ============================================================
   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 -- fond blanc, flex colonne
   Ordre :
     zone1  (auto)
     photo  (flex 1 1 0 → remplit tout l'espace disponible)
     zone2  (auto)
     bas    (auto)
============================================================ */
.screen {
  position: relative;
  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;
}

/* ============================================================
   ZONES TEXTE -- sur fond blanc, texte centré gras
============================================================ */
.zone-texte {
  flex: 0 0 auto;
  padding: clamp(10px, 2.2dvh, 22px) clamp(14px, 5%, 28px);
  text-align: center;
  background: #ffffff;
}

/* Légère séparation visuelle sous zone1 */
.zone1 {
  padding-bottom: clamp(8px, 1.5dvh, 16px);
}

/* Légère séparation visuelle au-dessus zone2 */
.zone2 {
  padding-top: clamp(8px, 1.5dvh, 16px);
}

.zone-p {
  font-size: clamp(0.72rem, 3.7vw, 1.1rem);
  font-weight: 700;
  color: #1a1a1a;
  line-height: 1.6;
}

/* Nombres / mots clés en rouge (55 cépages, 4795 hectares…) */
.rouge {
  color: #cc0000;
  font-weight: 700;
}

/* ============================================================
   PHOTO PRINCIPALE -- img/Photo_P33.png
   Prend TOUT l'espace disponible en hauteur entre les deux zones.
   object-fit: cover pour remplir sans déformer.
============================================================ */
.photo-container {
  flex: 1 1 0;
  min-height: 0;
  overflow: hidden;
  padding: 0 clamp(10px, 4%, 20px);
  cursor: pointer;
}

.photo-principale {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center center;
  border-radius: clamp(4px, 1.5vw, 10px);
  -webkit-user-drag: none;
  transition: opacity 0.12s ease;
}

.photo-principale:active {
  opacity: 0.88;
}

/* ============================================================
   BARRE BAS : coffre+score (gauche) | flèche (droite)
   Pas de bouton retour sur cette page info.
============================================================ */
.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.4dvh, 16px);
}

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

.coffre-img {
  height: clamp(30px, 6.5dvh, 50px);
  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;
}

/* Flèche suivant (droite) */
.fleche-img {
  height: clamp(40px, 9dvh, 72px);
  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.20));
  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 ETROIT (<= 360px)
============================================================ */
@media (max-width: 360px) {
  .zone-p     { font-size: 0.62rem; line-height: 1.4; }
  .coffre-img { height: 24px; }
  .points-box { font-size: 0.68rem; min-width: 26px; }
  .fleche-img { height: 32px; }
}

/* ============================================================
   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-p          { font-size: clamp(0.80rem, 3.8vw, 1.05rem); line-height: 1.65; }
  .coffre-img      { height: clamp(30px, 5dvh, 44px); }
  .fleche-img      { height: clamp(44px, 7dvh, 58px); }
  .photo-container { padding: 0 clamp(8px, 2.5%, 14px); }
}

/* ============================================================
   RESPONSIVE -- TABLETTE (>= 600px)
============================================================ */
@media (min-width: 600px) {
  .zone-p        { font-size: clamp(0.84rem, 2.4vw, 1.3rem); }
  .coffre-img    { height: clamp(36px, 6dvh, 56px); }
  .points-box    { font-size: clamp(0.9rem, 2.2vw, 1.15rem); }
  .fleche-img    { height: clamp(48px, 9dvh, 80px); }
  .photo-container { padding: 0 clamp(14px, 5%, 32px); }
}

/* ============================================================
   RESPONSIVE -- PAYSAGE MOBILE (hauteur <= 430px)
============================================================ */
@media (max-height: 430px) and (orientation: landscape) {
  .zone-texte  { padding: 4px 10px; }
  .zone-p      { font-size: 0.50rem; line-height: 1.3; }
  .photo-container { padding: 0 6px; }
  .bas-zone    { padding: 2px 10px 3px; }
  .coffre-img  { height: 20px; }
  .points-box  { font-size: 0.62rem; min-width: 24px; }
  .fleche-img  { height: 26px; }
}
