/* === GLOBAL RESET === */
/* Supprime les marges et paddings par défaut pour un rendu uniforme */
/* Utilise border-box pour inclure les bordures et paddings dans les dimensions */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

/* === POLICE PERSONNALISÉE === */
/* Chargement local de la police IBM Plex Mono */
@font-face {
  font-family: 'IBM';
  src: url('sources/font/IBMPlexMono-Regular.ttf') format('truetype');
  font-weight: 300;
  font-style: normal;
}

/* === STYLE GLOBAL DU BODY === */
body {
  overflow: hidden; /* Supprime le scroll pour garder l'écran fixe */
  font-family: 'IBM', sans-serif; /* Applique la police personnalisée */
}

/* === FOND DE PAGE === */
.background {
  width: 100vw;
  height: 100vh;
  position: absolute; /* Place en arrière-plan */
}

/* === BARRE DE LOGO EN HAUT DE PAGE === */
.logo {
  height: 40px;
  margin-top: 5px;
  display: flex;
  align-items: center;
  border-top: 1px solid black; /* Ligne noire fine en haut */
}

.logo a {
  text-decoration: none;
  color: black;
  font-size: 22px;
  padding-left: 20px; /* Décalage gauche */
}

/* === TEXTE DE FOND (grande typo centrée) === */
.backtext {
  width: 100%;
  height: 100%;
  display: flex;
  justify-content: center; /* Centre horizontalement */
  align-items: center;     /* Centre verticalement (optionnel si utile) */
}

.backtext p {
  width: 80%;
  font-size: 4em;
  font-weight: 700;
  letter-spacing: 3px;
}

/* === CONTENEUR DES BLOCS VIDÉO === */
.container {
  position: relative;
  width: 100vw;
  height: 100vh;
  overflow: hidden;
}

/* === STYLE DES BLOCS VIDÉO DÉPLAÇABLES === */
.draggable {
  position: absolute; /* Permet de placer librement chaque bloc */
  overflow: hidden; /* Coupe ce qui dépasse, utile si ombres ou contenu débordant */
  border: 2px solid #121212;
  border-radius: 8px;
  box-shadow: 4px 4px #121212;
  background-color: #121212;
  font-family: 'IBM Plex Sans', sans-serif;
  display: flex;
  flex-direction: column; /* Permet de placer le bouton label au-dessus de la vidéo */
  cursor: grab; /* Curseur main fermée pendant le drag */
  z-index: 1;
}

/* Effet survol des blocs pour plus de "relief" */
.draggable:hover {
  transform: translate(-2px, -2px); /* Décale légèrement vers le haut/gauche */
  box-shadow: 6px 6px #121212;     /* Accentue l'ombre */
}

/* === VIDÉO À L’INTÉRIEUR DES BLOCS === */
.draggable video {
  width: 100%;
  height: 100%;
  object-fit: contain; /* ✅ Respecte le ratio sans découper */
  background-color: black; /* Ajoute un fond si la vidéo ne remplit pas complètement */
  flex-grow: 1; /* Remplit l'espace restant sous le bouton */
  z-index: 0;
  pointer-events: none; /* Permet au drag de fonctionner même si on clique sur la vidéo */
}

/* === BOUTON LABEL CLIQUABLE EN HAUT DES BLOCS === */
.video-label-button {
  background-color: white;
  font-family: 'IBM Plex Sans', sans-serif;
  font-weight: 700;
  text-transform: uppercase;
  border-top: 2px solid #121212;
  border-radius: 4px 4px 0 0; /* Coins arrondis en haut */
  box-shadow: 0 -2px #121212 inset;
  text-align: center;
  text-decoration: none;
  width: 100%;
  pointer-events: auto; /* Permet le clic */
  cursor: pointer;
  display: block;
  position: absolute;
  top: 0;
  left: 0;
  color: black;
  padding: 12px 6px;
  font-size: 18px;
  z-index: 10;
}

.video-label-button:hover {
  transform: translate(0px, -2px); /* Décalage vers le haut au survol */
  box-shadow: -2px 6px #121212, 6px 6px #121212; /* Ombres latérales */
}

/* === SUPERPOSITION DE LA GRILLE POUR ALIGNEMENT (debug visuel) === */
.grid-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  pointer-events: none; /* Ne bloque pas les clics en dessous */
  background-image: 
    linear-gradient(to right, red 1px, transparent 1px),
    linear-gradient(to bottom, red 1px, transparent 1px);
  background-size: 50px 50px; /* Taille des cases de la grille */
  z-index: 10;
}
