/* --- 0. VARIABLES & RESET --- */
:root {
  --header-height: 70px; /* Hauteur de la barre de titre */
}
body, html {
  margin: 0;
  padding: 0;
  width: 100%;
  height: 100dvh; /* hauteur dynamique du viewport */
  overflow: hidden;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  background-color: black;
  color: white;
}
/* --- 1. HEADER FIXE --- */
.header {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: var(--header-height);
  backdrop-filter: blur(5px);
  background-color: #222222;
  color: #c9e1b7;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 15px;
  z-index: 100;
  border-bottom: 1px solid #83bb5c;
}
.header h1 {
  margin: 0;
  flex-grow: 1;
  text-align: center;
  font-size: 24px;
  font-weight: 700;
}
.logo {
  width: auto;
  height: calc(var(--header-height) - 20px);
}
/* --- 2. CONTENEUR DE SWIPE (SCROLL SNAP) --- */
.container {
  display: flex;
  flex-wrap: nowrap;              /* pas de retour à la ligne */
  overflow-x: auto;
  scroll-snap-type: x mandatory;
  scroll-snap-stop: always;
  width: 100%;
  height: 100dvh;
  scrollbar-width: none;
  scroll-behavior: smooth;
}
.container::-webkit-scrollbar { display: none; }
/* --- 3. LES FICHES (CARDS) --- */
.card {
  flex: 0 0 100%;                 /* chaque carte = 100% largeur viewport */
  min-width: 100%;
  height: 100dvh;                 /* pleine hauteur */
  scroll-snap-align: start;
  position: relative;             /* nécessaire pour overlay du titre */
  box-sizing: border-box;
  padding: var(--header-height) 20px 50px 20px;
}
/* Titre en overlay sur mobile */
.card h2 {
  position: absolute;
  top: var(--header-height);
  left: 0;
  width: 100%;
  margin: 0;
  padding: 8px 12px;
  text-align: center;
  z-index: 2;
  pointer-events: none;
  color: #fff;
  text-shadow: 0 2px 8px rgba(0,0,0,0.7);
  background: linear-gradient(to bottom, rgba(0,0,0,0.45), rgba(0,0,0,0));
}
.media-container {
  position: relative;
  z-index: 1;
  display: flex;
  flex-direction: column; /* empile vidéo + images sur mobile */
  gap: 0; /* pas de gap sur mobile */
}
.images-wrapper {
  display: flex;
  flex-direction: column;
  gap: 0;
}
video {
  width: 100%;
  border-radius: 12px;
  box-shadow: 0 4px 15px rgba(0,0,0,0.5);
  background: #000;
}
img {
  object-fit: cover;
}
.image-1 {
  width: 100%;
  margin-bottom: 10px;
}

.image-2 {
  width: 169px;       /* Largeur forcée */
  height: 50px;       /* Hauteur forcée */
  object-fit: contain; /* S'assure que l'image reste nette sans être rognée */
  flex-shrink: 0;     /* Empêche le flexbox de réduire l'image */
  
  /* Optionnel : pour centrer l'image si elle est seule ou petite */
  display: block; 
  margin: 0 auto; 
}
/* --- 4. POINTS DE NAVIGATION (PAGINATION MOBILE) --- */
.pagination {
  position: fixed;
  bottom: 20px;
  left: 0;
  width: 100%;
  display: flex;
  justify-content: center;
  gap: 12px;
  z-index: 10;
}
.dot {
  width: 10px;
  height: 10px;
  background-color: rgba(255, 255, 255, 0.3);
  border-radius: 50%;
  cursor: pointer;
  transition: all 0.3s ease;
}
.dot.active {
  background-color: #fff;
  transform: scale(1.3);
}
/* --- 5. BOUTONS DE NAVIGATION PC --- */
.desktop-navigation {
  display: none; /* caché par défaut */
}
/* Version desktop */
@media (min-width: 768px) {
  .card {
	padding: calc(var(--header-height) + 20px) 20px 50px 20px;
}
  /* Titre redevient classique */
  .card h2 {
    position: static;
    margin-bottom: 20px;
    padding: 0;
    background: none;
    text-shadow: none;
    pointer-events: auto;
    z-index: auto;
  }
  /* Vidéo + images côte à côte */
  .media-container {
    flex-direction: row;
    align-items: flex-start;
    justify-content: center;
    gap: 10px;
    max-width: 820px;
    margin: 0 auto;
  }
  .media-container video {
    width: 60%;
    max-width: 400px;
    height: auto;
  }
  .images-wrapper {
	  width: auto; /* au lieu de width: 40%; */
	  max-width: 300px;
	  gap: 20px;
	}
  .image-1 {
	  width: 100%;
	  max-width: 300px;
	  height: 150px;
	  margin-top: 20px;
	  margin-bottom: 20px;
	}

  /* Boutons de navigation visibles */
  .desktop-navigation {
    display: block;
  }
  .nav-button {
    position: fixed;
    top: 50%;
    transform: translateY(-50%);
    z-index: 20;
    background: rgba(0, 0, 0, 0.5);
    color: white;
    border: none;
    padding: 15px 10px;
    font-size: 24px;
    cursor: pointer;
    transition: background 0.2s;
  }
  .nav-button:hover {
    background: rgba(0, 0, 0, 0.7);
  }
  .nav-button.prev {
    left: 0;
    border-radius: 0 5px 5px 0;
  }
  .nav-button.next {
    right: 0;
    border-radius: 5px 0 0 5px;
  }
}