/* ============================================================
   VARIABLES — APPARENCE DE L'IMAGE DE FOND
   ─────────────────────────────────────────
   Deux réglages indépendants, modifiables ici uniquement.
============================================================ */
:root {
  /*--bg-opacity:     0.8; */  /* Transparence  : 1 = opaque | 0 = invisible      */
  --bg-brightness:  1.2;     /* Clarté        : 1 = normale | 0.5 = sombre | 1.4 = plus clair */
}

/* ============================================================
   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
============================================================ */
.screen {
  position: relative;
  width: 100%;
  height: 100dvh;
  overflow: hidden;
}

/* ============================================================
   IMAGE DE FOND — pleine page
============================================================ */
.bg-image {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center center;
  z-index: 0;
  opacity: var(--bg-opacity);            /* ← transparence : --bg-opacity    */
  filter: brightness(var(--bg-brightness)); /* ← clarté     : --bg-brightness */
}

/* ============================================================
   FLÈCHE RETOUR — haut gauche
============================================================ */
.btn-retour {
  position: absolute;
  top:  clamp(10px, 3dvh, 28px);
  left: clamp(10px, 3vw,  24px);
  z-index: 4;
  height: clamp(38px, 9dvh, 72px);
  width: auto;
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
  user-select: none;
  filter: drop-shadow(1px 2px 4px rgba(0,0,0,0.35));
  transition: transform 0.15s;
  animation: fadeIn 0.5s ease 0.1s both;
}
.btn-retour:hover  { transform: scale(1.08); }
.btn-retour:active { transform: scale(0.92); }

/* ============================================================
   ZONE DE SAISIE (Date / Participants / Équipe)
   ─────────────────────────────────────────────
   Carte semi-transparente dans la partie haute de l'écran,
   sous la flèche retour.
============================================================ */
.form-area {
  position: absolute;
  top:   clamp(68px, 15dvh, 130px);
  left:  clamp(12px, 4vw,   36px);
  right: clamp(12px, 4vw,   36px);
  z-index: 3;

  background: rgba(255, 255, 255, 0.30);
  border-radius: clamp(10px, 1.5vw, 18px);
  padding: clamp(12px, 2.5dvh, 26px) clamp(14px, 3vw, 30px);

  display: flex;
  flex-direction: column;
  gap: clamp(10px, 2dvh, 20px);

  max-width: 580px;
  animation: fadeIn 0.55s ease 0.2s both;
}

/* ---- Ligne label + champ ---- */
.field-row {
  display: flex;
  align-items: baseline;
  gap: clamp(8px, 2vw, 16px);
  flex-wrap: nowrap;
}

/* ---- Étiquette ---- */
.field-label {
  font-size:   clamp(0.82rem, 3vw, 1.4rem);
  font-weight: 700;
  color: #1a3266;
  white-space: nowrap;
  flex-shrink: 0;
  cursor: default;
  user-select: none;
}

/* ---- Champ de saisie (style pointillés WINDEV) ---- */
.field-input {
  flex: 1 1 auto;
  min-width: clamp(50px, 14vw, 100px);
  background: transparent;
  border: none;
  border-bottom: 2px dotted #1a3266;
  outline: none;
  font-size:   clamp(0.82rem, 3vw, 1.4rem);
  font-weight: 600;
  color: #1a3266;
  padding: 2px 4px 2px 4px;
}
.field-input::placeholder {
  color: #6a88b8;
  font-weight: 400;
  letter-spacing: 1px;
}
.field-input:focus {
  border-bottom-color: #2e6fd4;
  background: rgba(46, 111, 212, 0.07);
  border-radius: 4px 4px 0 0;
}
/* Champ date : lecture seule, curseur neutre */
.field-input[readonly] {
  cursor: default;
  border-bottom-style: solid;
}
/* Champ Nom équipe : plus large */
.field-input--long {
  min-width: clamp(110px, 36vw, 260px);
}
/* Masque les flèches du champ number sur Chrome/Safari */
.field-input[type="number"]::-webkit-inner-spin-button,
.field-input[type="number"]::-webkit-outer-spin-button {
  -webkit-appearance: none;
}
.field-input[type="number"] { -moz-appearance: textfield; }

/* ============================================================
   ZONE LÉZARD — bas de page
============================================================ */
.bottom-zone {
  position: absolute;
  bottom: clamp(10px, 3dvh, 30px);
  left:   clamp(10px, 3vw,  24px);
  right:  clamp(10px, 3vw,  24px);
  z-index: 3;
  animation: slideUp 0.65s cubic-bezier(.22,.68,0,1.2) 0.35s both;
}

/* Carte turquoise */
.lezard-card {
  background: rgba(0, 176, 200, 0.90);
  border-radius: clamp(12px, 2vw, 22px);
  padding: clamp(12px, 2.5dvh, 22px) clamp(12px, 2.5vw, 22px);
  display: flex;
  align-items: center;
  gap: clamp(10px, 3vw, 20px);
}

/* Texte de présentation du lézard */
.lezard-text {
  flex: 1 1 auto;
  font-size:   clamp(0.78rem, 2.8vw, 1.2rem);
  font-weight: 700;
  color: #fff;
  line-height: 1.45;
  text-align: center;
}

/* Image du lézard (cliquable) */
.lezard-img {
  flex: 0 0 auto;
  height: clamp(72px, 18dvh, 155px);
  width: auto;
  border-radius: clamp(6px, 1vw, 12px);
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
  user-select: none;
  transition: transform 0.15s;
  filter: drop-shadow(2px 3px 5px rgba(0,0,0,0.4));
  align-self: flex-end;
}
.lezard-img:hover  { transform: scale(1.07); }
.lezard-img:active { transform: scale(0.93); }

/* ============================================================
   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; }
}
@keyframes slideUp {
  from { opacity: 0; transform: translateY(20px); }
  to   { opacity: 1; transform: translateY(0);    }
}

/* ============================================================
   RESPONSIVE — PORTRAIT TRÈS ÉTROIT (≤ 360 px)
============================================================ */
@media (max-width: 360px) {
  .field-label    { font-size: 0.72rem; }
  .field-input    { font-size: 0.72rem; }
  .lezard-text    { font-size: 0.68rem; }
  .lezard-img     { height: 56px;       }
  .btn-retour     { height: 34px;       }
}

/* ============================================================
   RESPONSIVE — PAYSAGE MOBILE (hauteur ≤ 450 px)
============================================================ */
@media (max-height: 450px) and (orientation: landscape) {
  .form-area   { top: 50px; gap: 6px; padding: 8px 14px; }
  .field-label { font-size: 0.65rem; }
  .field-input { font-size: 0.65rem; }
  .lezard-text { font-size: 0.62rem; }
  .lezard-img  { height: 46px;       }
  .btn-retour  { height: 30px;       }
}
