/* ============================================================
   RESET & BASE
============================================================ */
*, *::before, *::after {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

html, body {
  width: 100%;
  min-height: 100%;
  font-family: 'Helvetica Neue', Arial, sans-serif;
  background: #fff;
}

/* ============================================================
   ÉCRAN PRINCIPAL
============================================================ */
.screen {
  position: relative;
  width: 100%;
  height: 100dvh;           /* hauteur exacte du viewport — pas de scroll */
  background: #ffffff;
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

/* ============================================================
   TITRE
============================================================ */
.titre-zone {
  flex: 0 0 auto;
  padding: clamp(6px, 1.5dvh, 14px) clamp(12px, 4%, 24px) clamp(3px, 0.6dvh, 6px);
  text-align: center;
  animation: fadeIn 0.5s ease 0.1s both;
}

.page-title {
  font-size: clamp(0.90rem, 3.5vw, 1.5rem);
  font-weight: 700;
  color: #1a56d0;           /* bleu — thème "en savoir plus" */
  line-height: 1.4;
}

/* ============================================================
   TEXTE NARRATIF
============================================================ */
.texte-zone {
  flex: 0 0 auto;
  padding: clamp(3px, 0.6dvh, 6px) clamp(16px, 5%, 36px);
  animation: fadeIn 0.5s ease 0.15s both;
}

.texte-zone p {
  font-size: clamp(0.68rem, 3vw, 1.5rem);
  color: #222222;
  line-height: 1.55;
  text-align: center;
}

/* ============================================================
   IMAGE BISSE 2 — pleine largeur, flex shrinkable
============================================================ */
.image-zone {
  flex: 1 1 0;             /* absorbe l'espace restant ET peut rétrécir */
  min-height: 0;           /* supprime le min-height:auto implicite */
  padding: clamp(4px, 1dvh, 8px) 0;
  display: flex;
  align-items: stretch;
  animation: fadeIn 0.5s ease 0.2s both;
}

.bisse-img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  cursor: default;
}

/* ============================================================
   LÉGENDE — texte bold (gauche) + vignette sign1H (droite)
   WinDev : IMG_BisseAyent1
============================================================ */
.caption-zone {
  flex: 0 0 auto;
  display: flex;
  flex-direction: row;
  align-items: center;
  gap: clamp(8px, 2vw, 18px);
  padding: clamp(4px, 0.8dvh, 8px) clamp(12px, 4%, 24px) clamp(3px, 0.6dvh, 6px);
  animation: fadeIn 0.5s ease 0.25s both;
}

.caption-text {
  flex: 1;                  /* prend la place restante à gauche */
  font-size: clamp(0.68rem, 3vw, 1.5rem);
  color: #222222;
  line-height: 1.45;
  text-align: left;
}

/* MyRMyw en rouge */
.myrmiw {
  color: #cc0000;
}

/* Vignette sign1H — cliquable → Pa_Capona_17 */
.vignette-img {
  flex-shrink: 0;
  height: clamp(55px, 10dvh, 90px);
  width: auto;
  border-radius: clamp(4px, 1vw, 8px);
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
  user-select: none;
  filter: drop-shadow(1px 2px 4px rgba(0,0,0,0.28));
}
.vignette-img:active { transform: scale(0.95); }

/* ============================================================
   BAS DE PAGE — coffre + points (pas de lézard sur cette page)
============================================================ */
.bas-zone {
  flex: 0 0 auto;
  display: flex;
  justify-content: flex-end;  /* score aligné à droite */
  align-items: center;
  padding: clamp(4px, 1dvh, 10px) clamp(12px, 4%, 24px) clamp(6px, 1.5dvh, 14px);
  animation: fadeIn 0.5s ease 0.3s both;
}

.score-zone {
  display: flex;
  flex-direction: row;
  align-items: center;
  gap: clamp(4px, 1.2vw, 10px);
}

.coffre-img {
  height: clamp(30px, 6dvh, 56px);
  width: auto;
  display: block;
}

.points-box {
  background: #cc0000;
  color: #ffffff;
  font-weight: 700;
  font-size: clamp(0.82rem, 2.8vw, 1.15rem);
  min-width: clamp(34px, 9vw, 62px);
  padding: clamp(3px, 0.7dvh, 7px) clamp(5px, 1.2vw, 10px);
  border-radius: 5px;
  text-align: center;
  line-height: 1.2;
}

/* ============================================================
   OVERLAY DE TRANSITION
============================================================ */
.transition-overlay {
  position: fixed;
  inset: 0;
  background: #000;
  z-index: 100;
  opacity: 1;
  pointer-events: all;
  transition: opacity 0.4s ease;
}

/* ============================================================
   ANIMATIONS
============================================================ */
@keyframes fadeIn {
  from { opacity: 0; }
  to   { opacity: 1; }
}

/* ============================================================
   RESPONSIVE — PORTRAIT ÉTROIT (≤ 360px)
============================================================ */
@media (max-width: 360px) {
  .page-title   { font-size: 0.72rem; }
  .texte-zone p { font-size: 0.60rem; }
  .caption-text { font-size: 0.60rem; }
  .vignette-img { height: 44px; }
  .coffre-img   { height: 26px; }
  .points-box   { font-size: 0.70rem; min-width: 28px; }
}

/* ============================================================
   RESPONSIVE — SMARTPHONE (≤ 500px)
============================================================ */
@media (max-width: 500px) {
  .page-title   { font-size: clamp(0.78rem, 3.2vw, 1rem); }
  .texte-zone p { font-size: clamp(0.62rem, 2.3vw, 0.82rem); }
  .caption-text { font-size: clamp(0.62rem, 2.3vw, 0.82rem); }
}

/* ============================================================
   RESPONSIVE — TABLETTE (≥ 600px)
   Police corps réduite à 2 vw (≈ 15 px sur 768 px)
============================================================ */
@media (min-width: 600px) {
  .page-title   { font-size: clamp(0.90rem, 2.5vw, 1.4rem); }
  .texte-zone p { font-size: clamp(0.72rem, 2vw, 1rem); }
  .caption-text { font-size: clamp(0.72rem, 2vw, 1rem); }
  .vignette-img { height: clamp(60px, 11dvh, 100px); }
  .coffre-img   { height: clamp(36px, 7dvh, 62px); }
  .points-box   { font-size: clamp(0.88rem, 2.5vw, 1.2rem); }
}

/* ============================================================
   RESPONSIVE — TABLETTE PORTRAIT CONTRAINTE (≥ 600px, ≤ 1099px h)
   Cible iPad 6e génération portrait (~900 px dvh sous Safari)
============================================================ */
@media (min-width: 600px) and (max-height: 1099px) {
  .titre-zone   { padding: clamp(4px, 0.8dvh, 8px) clamp(12px, 4%, 24px) clamp(2px, 0.4dvh, 4px); }
  .page-title   { font-size: clamp(0.82rem, 2.2vw, 1.1rem); }
  .texte-zone   { padding: clamp(2px, 0.4dvh, 4px) clamp(12px, 4%, 24px); }
  .texte-zone p { font-size: clamp(0.68rem, 1.85vw, 0.92rem); }
  .caption-zone { padding: clamp(2px, 0.4dvh, 4px) clamp(12px, 4%, 24px); gap: clamp(5px, 1.2vw, 12px); }
  .caption-text { font-size: clamp(0.68rem, 1.85vw, 0.92rem); }
  .vignette-img { height: clamp(50px, 8dvh, 80px); }
  .bas-zone     { padding: clamp(3px, 0.6dvh, 6px) clamp(12px, 4%, 24px) clamp(4px, 0.8dvh, 8px); }
}

/* ============================================================
   RESPONSIVE — TABLETTE HAUTE (≥ 600px, ≥ 1100px haut)
============================================================ */
@media (min-width: 600px) and (min-height: 1100px) {
  .coffre-img { height: clamp(40px, 6dvh, 64px); }
}

/* ============================================================
   RESPONSIVE — PAYSAGE MOBILE (hauteur ≤ 450px)
============================================================ */
@media (max-height: 450px) and (orientation: landscape) {
  .titre-zone   { padding: 3px 12px 1px; }
  .page-title   { font-size: 0.62rem; }
  .texte-zone   { padding: 2px 12px; }
  .texte-zone p { font-size: 0.56rem; }
  .image-zone   { padding: 2px 0; }
  .caption-zone { padding: 2px 10px; gap: 6px; }
  .caption-text { font-size: 0.56rem; }
  .vignette-img { height: 36px; }
  .bas-zone     { padding: 3px 10px 5px; }
  .coffre-img   { height: 22px; }
  .points-box   { font-size: 0.62rem; min-width: 26px; padding: 2px 4px; }
}
