* { box-sizing: border-box; margin: 0; padding: 0; }

:root {
  --or: #c9a96e;
  --fond: #111;
  --texte: #f5f0e8;
}

html, body {
  height: 100%;
  background: var(--fond);
  color: var(--texte);
  font-family: 'Lato', sans-serif;
  overflow: hidden;
}

.ecran { display: none; height: 100vh; height: 100dvh; width: 100%; }
.ecran.actif { display: flex; }

/* Accueil et fin */
#accueil, #fin {
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  gap: 1.5rem;
  padding: 2rem;
  background: radial-gradient(circle at center, #2a2420 0%, #111 75%);
}
h1 { font-family: 'Great Vibes', cursive; font-size: clamp(3rem, 10vw, 6rem); color: var(--or); font-weight: 400; }
h2 { font-family: 'Great Vibes', cursive; font-size: clamp(2rem, 6vw, 3.5rem); color: var(--or); font-weight: 400; }
.date { letter-spacing: .3em; text-transform: uppercase; font-weight: 300; }
.info { font-size: .9rem; opacity: .7; }

/* Boutons */
.btn {
  display: inline-block;
  padding: .7rem 1.4rem;
  border: 1px solid var(--or);
  border-radius: 30px;
  background: transparent;
  color: var(--or);
  font: inherit;
  text-decoration: none;
  cursor: pointer;
  transition: .25s;
}
.btn:hover { background: var(--or); color: #111; }
.btn-grand { font-size: 1.2rem; padding: 1rem 2rem; background: var(--or); color: #111; }
.btn-grand:hover { filter: brightness(1.1); }
.btn-secondaire { border-color: #666; color: #ccc; }
.btn-icone {
  width: 42px; height: 42px; border-radius: 50%;
  border: 1px solid #555; background: transparent; color: var(--texte);
  cursor: pointer; font-size: 1rem;
}

/* Diaporama */
#diaporama { flex-direction: column; }
.barre-haut {
  display: flex; justify-content: space-between; align-items: center;
  padding: .8rem 1.2rem; background: rgba(0,0,0,.6);
}
.actions { display: flex; gap: .8rem; align-items: center; }

.scene {
  position: relative; flex: 1;
  display: flex; align-items: center; justify-content: center;
  overflow: hidden;
}
#photo {
  max-width: 100%; max-height: 100%;
  object-fit: contain;
  transition: opacity .4s ease;
  user-select: none;
}
#photo.cache { opacity: 0; }

.fleche {
  position: absolute; top: 50%; transform: translateY(-50%);
  width: 56px; height: 56px; border-radius: 50%;
  border: none; background: rgba(0,0,0,.45); color: #fff;
  font-size: 2.2rem; cursor: pointer; z-index: 2; transition: .2s;
}
.fleche:hover { background: var(--or); color: #111; }
.gauche { left: 1rem; }
.droite { right: 1rem; }

.chargement {
  position: absolute; width: 40px; height: 40px;
  border: 3px solid #444; border-top-color: var(--or);
  border-radius: 50%; animation: tourne 1s linear infinite; display: none;
}
.chargement.visible { display: block; }
@keyframes tourne { to { transform: rotate(360deg); } }

/* Vignettes */
.vignettes {
  display: flex; gap: 6px; overflow-x: auto;
  padding: 8px; background: rgba(0,0,0,.6);
  scrollbar-width: thin;
}
.vignettes img {
  height: 60px; width: 90px; object-fit: cover;
  opacity: .45; cursor: pointer; border: 2px solid transparent;
  border-radius: 4px; flex-shrink: 0; transition: .2s;
}
.vignettes img:hover { opacity: .8; }
.vignettes img.active { opacity: 1; border-color: var(--or); }

@media (max-width: 600px) {
  .fleche { width: 42px; height: 42px; font-size: 1.6rem; }
  .vignettes img { height: 45px; width: 65px; }
  .btn { padding: .5rem 1rem; font-size: .9rem; }
}




/* Le bouton et le formulaire ont leur propre "display" : on force le masquage */
[hidden] { display: none !important; }

.form-mdp {
  display: flex; flex-wrap: wrap; gap: .8rem;
  justify-content: center; align-items: center;
}
.form-mdp input {
  padding: .7rem 1.2rem;
  border: 1px solid var(--or); border-radius: 30px;
  background: rgba(255,255,255,.05); color: var(--texte);
  font: inherit; outline: none; min-width: 220px;
}
.form-mdp input:focus { box-shadow: 0 0 0 2px rgba(201,169,110,.35); }
.erreur { width: 100%; min-height: 1.2em; color: #e08a7a; font-size: .9rem; }
