/* ============================================================
   Pa_Capona_OuiNon1.css
   FEN_Pa_Capona_OuiNon1 — Vrai ou Faux (7 questions)
   ─────────────────────────────────────────────────────────
   Fond     : img/IMG_4633.jpg via screen::before (plein écran)
   Layout flex-colonne (100dvh) :
     • .content-scroll   → flex:1, scrollable
         └ .zone-intro     → fond #2F98BB, texte blanc centré
         └ .question-zone  → fond alternant #C0A35D / #2F98BB
                             texte (flex:1) + toggle (droite)
                             margin-bottom: 3px → laisse voir photo
     • .bas-zone          → retour+avant | lézard | coffre+score
   Toggle CSS :
     OFF (cercle à gauche) : piste rgba(255,255,255,0.38)
     ON  (cercle à droite) : piste #34C759 (vert iOS)
   Panel bravo : bordure #2F98BB, LIB_Bravo pre-line
============================================================ */

/* ============================================================
   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: #2a6a78;   /* fallback couleur proche de la photo */
}

/* ============================================================
   ECRAN PRINCIPAL
   ::before → img/IMG_4633.jpg (couverture totale, sans opacité)
============================================================ */
.screen {
  position: relative;
  isolation: isolate;
  width: 100%;
  height: 100dvh;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  -webkit-tap-highlight-color: transparent;
  -webkit-touch-callout: none;
  user-select: none;
  -webkit-user-select: none;
}

.screen::before {
  content: '';
  position: absolute;
  inset: 0;
  background-image: url('img/IMG_4633.jpg');
  background-size: cover;
  background-position: center center;
  z-index: -1;
  pointer-events: none;
}

/* ============================================================
   ZONE DÉFILABLE
============================================================ */
.content-scroll {
  flex: 1 1 0;
  min-height: 0;
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
  overscroll-behavior: contain;
}

.content-scroll::-webkit-scrollbar        { width: 4px; }
.content-scroll::-webkit-scrollbar-track  { background: transparent; }
.content-scroll::-webkit-scrollbar-thumb  { background: rgba(255,255,255,0.35); border-radius: 4px; }

/* ============================================================
   ZONE INTRO — fond #2F98BB, texte blanc centré
============================================================ */
.zone-intro {
  background: #2F98BB;
  color: #ffffff;
  text-align: center;
  padding: 14px 16px;
  margin-bottom: 3%;   /* filet laissant voir la photo */
  margin-top: 3%;
  margin-left: 3%;
  margin-right: 3%;
}

.zone-intro p {
  font-size: clamp(0.80rem, 3.5vw, 1.14rem);
  font-weight: 600;
  line-height: 1.45;
}

/* ============================================================
   ZONES QUESTIONS — alternance #C0A35D / #2F98BB
   Disposition : texte (flex:1) | toggle (droite)
   margin-bottom: 3px → photo visible entre les lignes
============================================================ */
.question-zone {
  display: flex;
  flex-direction: row;
  align-items: center;
  padding: 12px 14px 12px 12px;
  gap: 12px;
  margin-bottom: 2%;
  margin-left: 3%;
  margin-right: 3%;
}
#texte-haut {
  margin-top: 3%;
}

.bg-gold { background: #C0A35D; }
.bg-blue { background: #2F98BB; }

.question-text {
  flex: 1;
  color: #ffffff;
  font-size: clamp(0.80rem, 3.5vw, 1.12rem);
  font-weight: 500;
  line-height: 1.40;
}

/* ============================================================
   TOGGLE SWITCH — interrupteur natif (CSS pur)
   ─────────────────────────────────────────────────────────
   Checkbox masquée — la piste + le cercle sont dans ::before
   OFF : cercle à gauche, piste semi-transparente blanche
   ON  : cercle à droite, piste #34C759 (vert iOS)
============================================================ */
.toggle-switch {
  position: relative;
  display: inline-block;
  flex-shrink: 0;
  width: 52px;
  height: 30px;
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
}

/* Masquer la checkbox native */
.toggle-switch input[type="checkbox"] {
  position: absolute;
  opacity: 0;
  width: 0;
  height: 0;
  pointer-events: none;
}

/* Piste du toggle */
.toggle-slider {
  position: absolute;
  inset: 0;
  border-radius: 30px;
  background: rgba(255, 255, 255, 0.38);
  box-shadow: inset 0 1px 3px rgba(0, 0, 0, 0.22);
  transition: background 0.25s ease;
}

/* Cercle blanc */
.toggle-slider::before {
  content: '';
  position: absolute;
  left: 3px;
  top: 50%;
  transform: translateY(-50%);
  width: 24px;
  height: 24px;
  border-radius: 50%;
  background: #ffffff;
  box-shadow: 0 1px 5px rgba(0, 0, 0, 0.32);
  transition: transform 0.25s ease;
}

/* État ON : piste verte, cercle déplacé à droite */
.toggle-switch input:checked + .toggle-slider {
  background: #34C759;
}

.toggle-switch input:checked + .toggle-slider::before {
  transform: translateY(-50%) translateX(22px);
}

/* ============================================================
   ESPACE BAS du scroll
============================================================ */
.scroll-spacer {
  height: 72px;
}

/* ============================================================
   BARRE BAS : [retour + avant] | lézard | coffre+score
============================================================ */
.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.28);
}

/* Groupe gauche : retour + avant (côte à côte) */
.bas-gauche {
  display: flex;
  flex-direction: row;
  align-items: center;
  gap: 8px;
}

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

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

.lezard-img {
  height: clamp(46px, 10vh, 90px);
  width: auto;
  display: block;
  cursor: pointer;
  filter: drop-shadow(1px 2px 5px rgba(0, 0, 0, 0.40));
  -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: 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;
}

/* ============================================================
   PANEL OVERLAY + BOÎTE
============================================================ */
.panel-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.55);
  z-index: 60;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 16px 12px;
}

.panel-box {
  background: #ffffff;
  border-radius: 18px;
  padding: 22px 24px 18px;
  max-width: 90vw;
  max-height: 86vh;
  width: 100%;
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
  overscroll-behavior: contain;
  display: flex;
  flex-direction: column;
  gap: 16px;
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.40);
}

.panel-bravo { border: 3px solid #2F98BB; }

/* En-tête : pouce (gauche) + texte score (droite) */
.panel-header {
  display: flex;
  flex-direction: row;
  align-items: flex-start;
  gap: 14px;
}

.panel-header-img {
  flex-shrink: 0;
  height: clamp(52px, 11vh, 90px);
  width: auto;
  display: block;
  -webkit-user-drag: none;
}

/* Texte bravo — white-space: pre-line pour respecter le \n de LIB_Bravo */
.panel-bravo-text {
  flex: 1;
  font-size: clamp(0.92rem, 4vw, 1.35rem);
  font-weight: 700;
  color: #1a1a1a;
  line-height: 1.5;
  white-space: pre-line;
  padding-top: 4px;
}

/* Pied : note (gauche) + flèche (droite) */
.panel-footer {
  display: flex;
  flex-direction: row;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  border-top: 1px solid rgba(47, 152, 187, 0.25);
  padding-top: 12px;
}

.panel-note {
  flex: 1;
  font-size: clamp(0.68rem, 2.8vw, 0.95rem);
  color: #555555;
  font-style: italic;
  line-height: 1.4;
}

.panel-fleche-img {
  flex-shrink: 0;
  height: clamp(36px, 7vh, 54px);
  width: auto;
  display: block;
  cursor: pointer;
  filter: drop-shadow(1px 1px 3px rgba(0,0,0,0.18));
  -webkit-user-drag: none;
  transition: transform 0.12s ease;
}
.panel-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 ÉTROIT (≤ 360px)
============================================================ */
@media (max-width: 360px) {
  .zone-intro p,
  .question-text   { font-size: 0.8rem; }
  .question-zone   { padding: 8px 10px 8px 8px; gap: 8px; }
  .toggle-switch   { width: 44px; height: 26px; }
  .toggle-slider::before { width: 20px; height: 20px; }
  .toggle-switch input:checked + .toggle-slider::before {
    transform: translateY(-50%) translateX(18px);
  }
  .coffre-img      { height: 22px; }
  .points-box      { font-size: 0.68rem; min-width: 26px; }
  .lezard-img      { height: 36px; }
  .retour-img,
  .avant-img       { height: 28px; }
}

/* ============================================================
   RESPONSIVE — SMARTPHONES (375-430px, >= 700px)
============================================================ */
@media (min-width: 375px) and (max-width: 430px) and (min-height: 700px) {
  .zone-intro p,
  .question-text   { font-size: clamp(0.82rem, 3.6vw, 1.14rem); }
  .question-zone   { padding: 13px 14px 13px 13px; }
  .lezard-img      { height: clamp(48px, 9vh, 78px); }
}

/* ============================================================
   RESPONSIVE — TABLETTE (>= 600px)
============================================================ */
@media (min-width: 600px) {
  .zone-intro p,
  .question-text   { font-size: clamp(0.90rem, 2.3vw, 1.3rem); }
  .question-zone   { padding: 16px 18px 16px 16px; gap: 16px; }
  .toggle-switch   { width: 62px; height: 34px; }
  .toggle-slider::before { width: 28px; height: 28px; }
  .toggle-switch input:checked + .toggle-slider::before {
    transform: translateY(-50%) translateX(28px);
  }
  .coffre-img      { height: clamp(34px, 6vh, 54px); }
  .lezard-img      { height: clamp(54px, 10vh, 80px); }
  .retour-img,
  .avant-img       { height: clamp(44px, 8vh, 70px); }
  .scroll-spacer   { height: 90px; }
}

/* ============================================================
   RESPONSIVE — iPad 6 seul (768-1023px, 900-1199px)
============================================================ */
@media (min-width: 768px) and (max-width: 1023px) and (min-height: 900px) and (max-height: 1199px) {
  .zone-intro p,
  .question-text   { font-size: clamp(1.0rem, 2.5vw, 1.4rem); }
  .question-zone   { padding: 18px 20px; }
  .lezard-img      { height: clamp(54px, 10vh, 80px); }
  .toggle-switch   { width: 66px; height: 36px; }
  .toggle-slider::before { width: 30px; height: 30px; }
  .toggle-switch input:checked + .toggle-slider::before {
    transform: translateY(-50%) translateX(30px);
  }
}

/* ============================================================
   RESPONSIVE — Galaxy Tab A8 + iPad Pro (>= 768px, >= 1200px)
============================================================ */
@media (min-width: 768px) and (min-height: 1199px) {
  .zone-intro p,
  .question-text   { font-size: clamp(1.05rem, 3vw, 2rem); }
  .question-zone   { padding: 20px 22px; gap: 20px; margin-bottom: 3%; }
  .toggle-switch   { width: 70px; height: 38px; }
  .toggle-slider::before { width: 32px; height: 32px; }
  .toggle-switch input:checked + .toggle-slider::before {
    transform: translateY(-50%) translateX(32px);
  }
}

/* ============================================================
   RESPONSIVE — PAYSAGE MOBILE (hauteur ≤ 430px)
============================================================ */
@media (max-height: 430px) and (orientation: landscape) {
  .zone-intro p,
  .question-text   { font-size: 0.52rem; line-height: 1.3; }
  .zone-intro      { padding: 5px 8px; }
  .question-zone   { padding: 5px 8px; gap: 8px; margin-bottom: 2px; }
  .toggle-switch   { width: 42px; height: 22px; }
  .toggle-slider::before { width: 16px; height: 16px; }
  .toggle-switch input:checked + .toggle-slider::before {
    transform: translateY(-50%) translateX(20px);
  }
  .bas-zone        { padding: 2px 10px 3px; }
  .coffre-img      { height: 18px; }
  .points-box      { font-size: 0.58rem; min-width: 20px; padding: 1px 3px; }
  .lezard-img      { height: 28px; }
  .retour-img,
  .avant-img       { height: 22px; }
  .scroll-spacer   { height: 40px; }
}
