/* ============================================================
   Pa_Capona_Fleurs2.css
   FEN_Pa_Capona_Fleurs2
   ─────────────────────────────────────────────────────────
   Fond     : couleur plein #4D0378 (violet foncé)
   Layout flex-colonne (100dvh) :
     • .texte-haut  → texte blanc, fond violet, flex:3
     • .ensemble    → FondFleursRecadre.jpg bg + Bassin4.png
                      + panneau violet + 4 boutons, flex:4
     • .texte-bas   → texte blanc, fond violet, flex:2
     • .bas-zone    → retour (gauche) | coffre+score (droite)
                      PAS de lézard sur cette page
   Popups :
     • GR_Groupe_Bravo_tout_trouve → fond blanc
     • GR_Groupe_pas_zout_trouve   → fond blanc cassé
============================================================ */

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

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

/* ============================================================
   ZONE TEXTE HAUT — blanc sur fond violet
============================================================ */
.texte-haut {
  flex: 3 3 0;
  min-height: 0;
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
  overscroll-behavior: contain;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 14px 22px;
  background: #4D0378;
}

.texte-haut::-webkit-scrollbar        { width: 3px; }
.texte-haut::-webkit-scrollbar-track  { background: transparent; }
.texte-haut::-webkit-scrollbar-thumb  { background: rgba(255,255,255,0.28); border-radius: 3px; }

/* ============================================================
   ZONE TEXTE BAS — blanc sur fond violet
============================================================ */
.texte-bas {
  flex: 2 2 0;
  min-height: 0;
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
  overscroll-behavior: contain;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 10px 22px;
  background: #4D0378;
}

.texte-bas::-webkit-scrollbar        { width: 3px; }
.texte-bas::-webkit-scrollbar-track  { background: transparent; }
.texte-bas::-webkit-scrollbar-thumb  { background: rgba(255,255,255,0.28); border-radius: 3px; }

/* Paragraphe commun aux deux zones texte */
.texte-principal {
  color: #ffffff;
  font-size: clamp(0.83rem, 3.4vw, 1.15rem);
  font-weight: 500;
  line-height: 1.55;
  text-align: center;
  max-width: 580px;
}

/* ============================================================
   ENSEMBLE COMPOSITE
   Fond     : img/FondFleursRecadre.jpg (cover)
   Gauche   : img/Bassin4.png (avant-plan)
   Droite   : panneau #4D0378 + 4 boutons blancs
============================================================ */
.ensemble {
  flex: 4 4 0;
  min-height: 0;
  position: relative;
  display: flex;
  flex-direction: row;
  align-items: stretch;
  background: url('img/FondFleursRecadre.jpg') center center / cover no-repeat;
  overflow: hidden;
}

/* Bassin4.png — avant-plan gauche */
.bassin-img {
  flex: 0 0 42%;
  height: 100%;
  object-fit: contain;
  object-position: bottom left;
  display: block;
  -webkit-user-drag: none;
}

/* Panneau droit : label violet + 4 boutons */
.droite-zone {
  flex: 1 1 0;
  min-width: 0;
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding: 10px 10px 10px 6px;
  gap: 7px;
}

/* Label "La clé se trouve dans :" */
.question-label {
  background: #4D0378;
  color: #ffffff;
  font-weight: 700;
  text-align: center;
  padding: 8px 10px;
  font-size: clamp(0.75rem, 3.2vw, 1.05rem);
  line-height: 1.35;
  border-radius: 2px;
}

/* Boutons réponses — fond blanc, texte violet */
.btn-reponse {
  display: block;
  width: 100%;
  background: #ffffff;
  color: #4D0378;
  border: none;
  border-radius: 3px;
  padding: 8px 8px;
  font-size: clamp(0.73rem, 3.0vw, 0.98rem);
  font-weight: 600;
  font-family: inherit;
  cursor: pointer;
  text-align: center;
  -webkit-tap-highlight-color: transparent;
  user-select: none;
  -webkit-user-select: none;
  transition: background 0.12s ease;
}

.btn-reponse:active { background: #e8e0f0; }

/* ============================================================
   BARRE BAS — retour (gauche) | coffre+score (droite)
   PAS de lézard sur cette page
============================================================ */
.bas-zone {
  flex: 0 0 auto;
  display: flex;
  flex-direction: row;
  align-items: center;
  justify-content: space-between;
  padding: 6px 12px 8px;
  background: rgba(0, 0, 0, 0.30);
}

.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); }

.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;
}

/* ============================================================
   POPUPS BRAVO / FAUX
   .panel-overlay  → fond semi-transparent, centrage
   .panel-box      → cadre blanc arrondi
   .panel-row      → icône | texte | bouton (flex-row)
============================================================ */
.panel-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.65);
  z-index: 50;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 16px;
}

.panel-box {
  border-radius: 10px;
  padding: 16px 14px;
  width: 90%;
  max-width: 380px;
}

.panel-bravo { background: #ffffff; }
.panel-faux  { background: #fff8f8; }

.panel-row {
  display: flex;
  flex-direction: row;
  align-items: center;
  gap: 10px;
}

/* Icône gauche (pouce-en-lair / emoticone) */
.panel-icon {
  flex: 0 0 auto;
  height: 50px;
  width: auto;
  display: block;
  -webkit-user-drag: none;
}

/* Colonne texte centrale */
.panel-text-col {
  flex: 1 1 0;
  min-width: 0;
}

.panel-main-text {
  color: #333333;
  font-size: clamp(0.78rem, 3.2vw, 1.02rem);
  font-weight: 600;
  line-height: 1.40;
}

.panel-faux-text { color: #c0392b; }

.panel-points-text {
  color: #4D0378;
  font-size: clamp(0.68rem, 2.8vw, 0.88rem);
  font-weight: 600;
  margin-top: 5px;
}

.panel-faux-points { color: #777777; }

/* Bouton droit : Fleche_suivant ou fermer */
.panel-fleche-img,
.panel-fermer-img {
  flex: 0 0 auto;
  height: 44px;
  width: auto;
  display: block;
  cursor: pointer;
  -webkit-user-drag: none;
  transition: transform 0.12s ease;
}
.panel-fleche-img:active,
.panel-fermer-img:active { transform: scale(0.90); }

/* ============================================================
   RESPONSIVE — PORTRAIT ÉTROIT (≤ 360px)
============================================================ */
@media (max-width: 360px) {
  .texte-principal  { font-size: 0.80rem; }
  .texte-haut       { padding: 10px 14px; }
  .texte-bas        { padding: 8px 14px; }
  .question-label   { font-size: 0.8rem; padding: 6px 8px; }
  .btn-reponse      { font-size: 0.8rem; padding: 6px 6px; }
  .droite-zone      { gap: 5px; padding: 8px 8px 8px 5px; }
  .coffre-img       { height: 22px; }
  .points-box       { font-size: 0.68rem; min-width: 26px; }
  .retour-img       { height: 28px; }
  .panel-icon       { height: 38px; }
  .panel-fleche-img,
  .panel-fermer-img { height: 34px; }
  .panel-main-text  { font-size: 0.72rem; }
}

/* ============================================================
   RESPONSIVE — SMARTPHONES (375-430px, >= 700px)
============================================================ */
@media (min-width: 375px) and (max-width: 430px) and (min-height: 700px) {
  .texte-principal { font-size: clamp(0.86rem, 3.5vw, 1.12rem); }
  .retour-img      { height: clamp(38px, 8vh, 56px); }
}

/* ============================================================
   RESPONSIVE — TABLETTE (>= 600px)
============================================================ */
@media (min-width: 600px) {
  .texte-principal  { font-size: clamp(1.00rem, 3vw, 1.70rem); }
  .texte-haut       { padding: 20px 32px; }
  .texte-bas        { padding: 14px 32px; }
  .question-label   { font-size: clamp(0.90rem, 2.8vw, 1.30rem); padding: 10px 14px; }
  .btn-reponse      { font-size: clamp(0.88rem, 2.6vw, 1.20rem); padding: 10px 10px; }
  .droite-zone      { gap: 10px; padding: 14px 14px 14px 8px; }
  .coffre-img       { height: clamp(34px, 6vh, 54px); }
  .retour-img       { height: clamp(44px, 8vh, 70px); }
  .panel-icon       { height: 60px; }
  .panel-fleche-img,
  .panel-fermer-img { height: 54px; }
  .panel-main-text  { font-size: clamp(0.90rem, 2.8vw, 1.20rem); }
  .panel-points-text { font-size: clamp(0.78rem, 2.4vw, 1.00rem); }
}

/* ============================================================
   RESPONSIVE — iPad 6 seul (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.5vw, 1.45rem); }
  .btn-reponse     { font-size: clamp(0.95rem, 2.4vw, 1.35rem); }
}

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

/* ============================================================
   RESPONSIVE — PAYSAGE MOBILE (hauteur ≤ 430px)
============================================================ */
@media (max-height: 430px) and (orientation: landscape) {
  .texte-principal  { font-size: 0.56rem; line-height: 1.3; }
  .texte-haut       { padding: 5px 10px; }
  .texte-bas        { padding: 5px 10px; }
  .question-label   { font-size: 0.60rem; padding: 4px 6px; }
  .btn-reponse      { font-size: 0.58rem; padding: 4px 5px; }
  .droite-zone      { gap: 3px; padding: 5px 6px 5px 3px; }
  .bas-zone         { padding: 2px 10px 3px; }
  .coffre-img       { height: 18px; }
  .points-box       { font-size: 0.58rem; min-width: 20px; padding: 1px 3px; }
  .retour-img       { height: 22px; }
  .panel-icon       { height: 30px; }
  .panel-fleche-img,
  .panel-fermer-img { height: 28px; }
  .panel-main-text  { font-size: 0.62rem; }
}
