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

html, body {
  width: 100%;
  height: 100%;
  overflow: hidden;
  font-family: 'Helvetica Neue', Arial, sans-serif;
  background: #1a1a2e;
}

/* ============================================================
   ÉCRAN PRINCIPAL  (= FEN_Pa_Capona_1_Debut)
   Plein écran sur tous les formats
============================================================ */
.screen {
  position: relative;
  width: 100%;
  /*height: 100vh;*/
  height: 100dvh;
  overflow: hidden;
  cursor: pointer;
  outline: none;
  user-select: none;
  -webkit-tap-highlight-color: transparent;
}

/* ============================================================
   IMAGE DE FOND — pleine page
============================================================ */
.bg-image {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center top;
  z-index: 0;
  transition: opacity 0.35s ease;
}

/* Gradient de secours si l'image est absente */
.bg-fallback {
  position: absolute;
  inset: 0;
  background:
    linear-gradient(
      165deg,
      #4a7a9b 0%,
      #5d8a5e 25%,
      #7a8b3a 50%,
      #8B7355 70%,
      #556B2F 100%
    );
  z-index: 0;
}

/* Assombrissement léger du bas pour lisibilité */
.bg-vignette {
  position: absolute;
  inset: 0;
  background: linear-gradient(
    to bottom,
    rgba(0,0,0,0.05) 0%,
    rgba(0,0,0,0.00) 40%,
    rgba(0,0,0,0.45) 85%,
    rgba(0,0,0,0.70) 100%
  );
  z-index: 1;
  pointer-events: none;
}

/* ============================================================
   TITRE PRINCIPAL  "T'as où les vignes?"
============================================================ */
.title-overlay {
  position: absolute;
  top: clamp(100px, 9vh, 150px);
  left: clamp(14px, 5vw, 40px);
  z-index: 2;
  max-width: 65%;
  animation: slideDown 0.75s cubic-bezier(.22,.68,0,1.2) 0.2s both;
  pointer-events: none;
}

.title-overlay h1 {
  font-size: clamp(2rem, 9vw, 5.5rem);
  font-weight: 900;
  color: #ffffff;
  line-height: 1.05;
  letter-spacing: -0.02em;
  text-shadow:
    0 2px 6px rgba(0,0,0,0.7),
    0 0 30px rgba(0,0,0,0.35);
}

/* ============================================================
   BANDE DU BAS
============================================================ */
.bottom-bar {
  position: absolute;
  bottom: 30px;
  left: 0;
  right: 0;
  z-index: 3;
  /*background: rgba(15, 15, 15, 0.62);
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);*/
  padding: clamp(10px, 2.5vh, 18px) clamp(12px, 4vw, 24px);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  /*animation: slideUp 0.7s cubic-bezier(.22,.68,0,1.2) 0.5s both;*/
}

/* ---- Bloc gauche ---- */
.explore-block {
  display: flex;
  flex-direction: column;
  gap: 3px;
  flex: 1;
  min-width: 0;
}

/* "Explore Game" */
.explore-title {
  font-family: Roboto, 'Times New Roman', serif;
  font-size: clamp(1.4rem, 5vw, 3rem);
  font-style: italic;
  font-weight: 700;
  color: #ffffff;
  text-shadow: 1px 1px 4px rgba(0,0,0,0.6);
  line-height: 1.1;
  text-decoration: none;
  display: block;
  cursor: pointer;
  transition: color 0.2s;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.explore-title:hover,
.explore-title:focus {
  color: #ffe0a0;
  outline: none;
}

/* "VALAIS WINE TOURS.COM" */
.explore-subtitle {
  font-size: clamp(0.5rem, 3vw, 0.85rem);
  font-weight: 700;
  letter-spacing: 0.13em;
  color: rgba(255, 255, 255, 0.82);
  text-transform: uppercase;
  text-decoration: none;
  display: block;
  white-space: nowrap;
}

/* "Conditions générales" */
.conditions-link {
  display: inline-block;
  margin-top: 5px;
  font-size: clamp(0.62rem, 1.8vw, 0.88rem);
  color: rgba(255, 255, 255);
  text-decoration: underline;
  text-underline-offset: 2px;
  cursor: pointer;
  /*transition: color 0.2s;*/
}
.conditions-link:hover,
.conditions-link:focus {
  color: #ffffff;
  outline: none;
}

/* ---- Bloc droit : Logo VWT rouge ---- */
.logo-block {
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: flex-end;
}

.logo-vwt {
  display: flex;
  align-items: center;
  justify-content: center;
  width:  clamp(150px, 15vw, 200px);
  height: clamp(68px, 15vw, 150px);
  text-decoration: none;
  cursor: pointer;
  transition: transform 0.15s;
  overflow: hidden;
}
.logo-vwt:hover,
.logo-vwt:focus {
  transform: scale(1.05);
  outline: 2px solid rgba(255,255,255,0.6);
}

/* Image du logo rouge */
.logo-img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  display: block;
}

/* ============================================================
   INDICATEUR "Appuyez pour continuer"
============================================================ */
.tap-hint {
  position: absolute;
  bottom: clamp(165px, 20vh, 190px);
  left: 50%;
  transform: translateX(-50%);
  z-index: 2;
  color: rgba(255,255,255,0.85);
  font-size: clamp(0.6rem, 3vw, 1.2rem);
  letter-spacing: 0.12em;
  /*text-transform: uppercase;*/
  animation: pulse 2.5s ease-in-out 1.5s infinite;
  pointer-events: none;
  white-space: nowrap;
}

/* ============================================================
   OVERLAY DE TRANSITION (fondu de sortie)
============================================================ */
.transition-overlay {
  position: fixed;
  inset: 0;
  background: #000;
  z-index: 100;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.35s ease;
}
.transition-overlay.active {
  opacity: 1;
  pointer-events: all;
}

/* ============================================================
   ANIMATIONS
============================================================ */
@keyframes slideDown {
  from { opacity: 0; transform: translateY(-20px); }
  to   { opacity: 1; transform: translateY(0); }
}
@keyframes slideUp {
  from { opacity: 0; transform: translateY(20px); }
  to   { opacity: 1; transform: translateY(0); }
}
@keyframes pulse {
  0%, 100% { opacity: 0.55; }
  50%       { opacity: 0.15; }
}

/* ============================================================
   RESPONSIVE — PORTRAIT ÉTROIT (≤ 360px)
============================================================ */
@media (max-width: 360px) {
  .title-overlay h1 { font-size: 1.8rem; }
  .explore-title    { font-size: 1.25rem; }
}

/* ============================================================
   RESPONSIVE — PAYSAGE MOBILE (hauteur ≤ 450px)
============================================================ */
@media (max-height: 450px) and (orientation: landscape) {
  .title-overlay {
    top: 8px;
    max-width: 55%;
  }
  .title-overlay h1 {
    font-size: clamp(1.1rem, 5.5vh, 2.2rem);
  }
  .tap-hint { display: none; }
  .bottom-bar { padding: 6px 14px; }
}

/* ============================================================
   RESPONSIVE — TABLETTE (≥ 600px)
============================================================ */
@media (min-width: 600px) {
  .title-overlay { max-width: 58%; }
}
