/* ============================================================
   Pa_Capona_Explique_les_couleurs_des_vins.css
   FEN_Pa_Capona_Explique_les_couleurs_des_vins
   ─────────────────────────────────────────────────────────
   Layout flex-colonne (100dvh) :
     • .contenu-scroll  → flex:1, scrollable
         ├ .img-verres-zone  → "Ligne verres 2.png" en haut
         └ .textes-zone      → 9 blocs de texte colorés
     • .bas-zone        → score (gauche) | lézard (centre)
   Pas de bouton retour sur cette page.
============================================================ */

/* ============================================================
   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 PRINCIPAL -- colonne flex pleine hauteur
============================================================ */
.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;
}

/* ============================================================
   ZONE SCROLLABLE
   flex:1 + min-height:0 pour que le overflow-y fonctionne
   dans un parent flex-colonne.
============================================================ */
.contenu-scroll {
  flex: 1 1 0;
  min-height: 0;
  overflow-y: auto;
  overflow-x: hidden;
  -webkit-overflow-scrolling: touch;
  overscroll-behavior: contain;
  background: #ffffff;
}

/* ── Scrollbar discrète (desktop Webkit) ── */
.contenu-scroll::-webkit-scrollbar        { width: 4px; }
.contenu-scroll::-webkit-scrollbar-track  { background: transparent; }
.contenu-scroll::-webkit-scrollbar-thumb  { background: #cccccc; border-radius: 4px; }

/* ============================================================
   IMAGE EN TÊTE -- "Ligne verres 2.png"
   Centrée, pleine largeur, hauteur proportionnelle
============================================================ */
.img-verres-zone {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: clamp(8px, 1.5dvh, 18px) clamp(10px, 3%, 20px) clamp(4px, 0.8dvh, 10px);
  background: #ffffff;
}

.img-verres {
  width: 100%;
  max-width: 520px;
  height: auto;
  display: block;
  -webkit-user-drag: none;
  pointer-events: none;
}

/* ============================================================
   ZONE DES 9 TEXTES
   Padding horizontal pour aérer ; séparateur léger entre zones
============================================================ */
.textes-zone {
  padding: 0 clamp(12px, 4%, 28px) clamp(12px, 2dvh, 24px);
}

/* ── Chaque bloc de texte ── */
.vin-bloc {
  padding: clamp(6px, 1.1dvh, 12px) 0;
  border-bottom: 1px solid #e8e8e8;
}

.vin-bloc:last-child {
  border-bottom: none;
}

/* ── Paragraphe de texte ── */
.vin-texte {
  font-size: clamp(0.74rem, 3.8vw, 1.12rem);
  line-height: 1.55;
  text-align: left;
}

.vin-texte strong {
  font-weight: 700;
}

/* ── Couleurs des 9 vins ── */
.c-noir   { color: #000000; }
.c-rouge  { color: #FD0303; }
.c-rose   { color: #FF81C1; }
.c-orange { color: #FF8500; }
.c-vert   { color: #20BF03; }
.c-bleu   { color: #1077F8; }
.c-jaune  { color: #FDD900; }
.c-gris   { color: #696969; }

/* ============================================================
   BARRE BAS
   Disposition : score (gauche) | lézard (centre) | spacer (droite)
   Le spacer est de même largeur que le bloc score pour centrer
   parfaitement le lézard.
============================================================ */
.bas-zone {
  flex: 0 0 auto;
  display: flex;
  flex-direction: row;
  align-items: center;
  justify-content: space-between;
  padding: clamp(5px, 1dvh, 12px) clamp(10px, 3%, 20px) clamp(7px, 1.4dvh, 16px);
  background: #ffffff;
  border-top: 1px solid #e8e8e8;
  z-index: 4;
}

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

.coffre-img {
  height: clamp(28px, 6dvh, 48px);
  width: auto;
  display: block;
  -webkit-user-drag: none;
  pointer-events: 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;
}

/* -- Lézard (centre) -- */
.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;
  flex: 0 0 auto;
}
.lezard-img:active { transform: scale(0.93); }

/* -- Spacer symétrique (droite) : même largeur que .score-zone -- */
.spacer-droit {
  /* Pour centrer le lézard, on réserve une zone symétrique à droite.
     Sa largeur est estimée à la même valeur que le bloc score.
     Si le total score change de taille, ajuster ici. */
  flex: 0 0 auto;
  min-width: clamp(64px, 18vw, 110px);
}

/* ============================================================
   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) {
  .vin-texte  { font-size: 0.64rem; }
  .coffre-img { height: 22px; }
  .points-box { font-size: 0.68rem; min-width: 26px; }
  .lezard-img { height: 38px; }
  .spacer-droit { min-width: 50px; }
}

/* ============================================================
   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) {
  .vin-texte  { font-size: clamp(0.80rem, 3.9vw, 0.9rem); line-height: 1; }
  .lezard-img { height: clamp(50px, 9dvh, 80px); }
  .coffre-img { height: clamp(30px, 5.5dvh, 44px); }
}

/* ============================================================
   RESPONSIVE -- TABLETTE (>= 600px)
============================================================ */
@media (min-width: 600px) {
  .vin-texte  { font-size: clamp(0.82rem, 2.8vw, 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); }
}

/* ============================================================
   RESPONSIVE -- PAYSAGE MOBILE (hauteur <= 450px)
============================================================ */
@media (max-height: 450px) and (orientation: landscape) {
  .img-verres-zone { padding: 4px 8px 2px; }
  .vin-texte       { font-size: 0.52rem; line-height: 1.35; }
  .vin-bloc        { padding: 3px 0; }
  .bas-zone        { padding: 2px 10px 3px; }
  .coffre-img      { height: 20px; }
  .points-box      { font-size: 0.62rem; min-width: 24px; }
  .lezard-img      { height: 28px; }
}
