:root[data-theme="light"] {
  --main-logo-blob: rgb(10, 143, 234);
}
:root[data-theme="dark"] {
  --main-logo-blob: rgb(76, 190, 249);
}

/* ── Layout de base ── */
body {
  overflow-x: hidden;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

.page-content {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 20px;
  padding: 20px 0 32px;
  background: transparent;
  position: relative;
  z-index: 1;
}

/* ── Zone projecteur ── */
.projector-area {
  width: min(72vw, 900px);
  aspect-ratio: 16 / 9;
  border-radius: 12px;
  overflow: hidden;
  box-shadow: 0 0 80px rgba(0, 0, 0, 0.6);
  flex-shrink: 0;
}

#bg-video {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

/* ── Contrôles vidéo ── */
.video-controls-container {
  width: min(72vw, 900px);
  display: flex;
  justify-content: center;
  flex-shrink: 0;
}

.video-controls {
  width: 100%;
  padding: 12px 20px;
  display: flex;
  align-items: center;
  gap: 16px;
  backdrop-filter: blur(18px) saturate(180%);
  -webkit-backdrop-filter: blur(18px) saturate(180%);
  background: rgba(255, 255, 255, 0.08);
  box-shadow: 0 6px 24px rgba(0, 0, 0, 0.45), inset 0 0 16px rgba(255, 255, 255, 0.1);
  border-radius: 14px;
  border: 1px solid rgba(255, 255, 255, 0.12);
  color: var(--font);
}

.control-group {
  display: flex;
  align-items: center;
  gap: 4px;
  flex-shrink: 0;
}

.video-controls button {
  background: none;
  border: none;
  color: var(--font);
  font-size: 18px;
  cursor: pointer;
  padding: 4px 6px;
  border-radius: 6px;
  transition: transform 0.15s, background 0.15s;
  line-height: 1;
}

.video-controls button:hover {
  transform: scale(1.2);
  background: rgba(255, 255, 255, 0.1);
}

#video-slider {
  flex-grow: 1;
  cursor: pointer;
  accent-color: #ffffff;
  height: 4px;
  min-width: 0;
}

.video-select-custom {
  appearance: none;
  -webkit-appearance: none;
  border: none;
  outline: none;
  padding: 8px 36px 8px 16px;
  min-width: 140px;
  flex-shrink: 0;
  cursor: pointer;
  backdrop-filter: blur(18px) saturate(180%);
  background-color: rgba(255, 255, 255, 0.1);
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' fill='white' viewBox='0 0 16 16'%3E%3Cpath d='M7.247 11.14 2.451 5.658C1.885 5.013 2.345 4 3.204 4h9.592a1 1 0 0 1 .753 1.659l-4.796 5.48a1 1 0 0 1-1.506 0z'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: calc(100% - 12px) center;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.3), inset 0 0 10px rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.2);
  border-radius: 10px;
  color: white;
  font-family: 'Montserrat', sans-serif;
  font-size: 13px;
  font-weight: 600;
  transition: background-color 0.2s, border-color 0.2s, transform 0.2s;
}

.video-select-custom:hover {
  background-color: rgba(255, 255, 255, 0.18);
  border-color: rgba(255, 255, 255, 0.4);
  transform: translateY(-1px);
}

.video-select-custom option {
  background: #1a1a1a;
  color: white;
}

.video-select-custom:focus {
  box-shadow: 0 0 0 3px rgba(255, 255, 255, 0.2);
}

/* ── Tablette ── */
@media (max-width: 1024px) {
  .projector-area,
  .video-controls-container {
    width: min(88vw, 720px);
  }
}

/* ── Mobile ── */
@media (max-width: 640px) {
  .projector-area,
  .video-controls-container {
    width: 92vw;
  }

  .video-controls {
    flex-wrap: wrap;
    justify-content: center;
    gap: 10px;
    padding: 10px 14px;
  }

  #video-slider {
    width: 100%;
    order: 3;
  }

  .video-select-custom {
    min-width: 120px;
    font-size: 12px;
  }
}

/* ── Blobs décoratifs ── */
.motion-blobs {
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 0;
  overflow: hidden;
}

.motion-blob {
  position: absolute;
  border-radius: 50%;
  aspect-ratio: 1;
  transform: translate(-50%, -50%);
  background: radial-gradient(circle at 38% 38%, #0a8fea 0%, #4cbef9 52%, transparent 75%);
}

#motion-blob-1 {
  width: 55vw;
  left: 5%;
  top: 5%;
  opacity: 0.80;
  filter: blur(4px) url(#blob-filter-1);
  animation: motion-drift-1 20s ease-in-out infinite;
}

#motion-blob-2 {
  width: 35vw;
  left: 85%;
  top: 22%;
  opacity: 0.60;
  filter: blur(5px) url(#blob-filter-2);
  animation: motion-drift-2 26s ease-in-out -6s infinite;
}

#motion-blob-3 {
  width: 45vw;
  left: 20%;
  top: 45%;
  opacity: 0.40;
  filter: blur(6px) url(#blob-filter-3);
  animation: motion-drift-3 22s ease-in-out -11s infinite;
}

#motion-blob-4 {
  width: 50vw;
  left: 78%;
  top: 65%;
  opacity: 0.65;
  filter: blur(7px) url(#blob-filter-4);
  animation: motion-drift-4 28s ease-in-out -4s infinite;
}

#motion-blob-5 {
  width: 40vw;
  left: 35%;
  top: 88%;
  opacity: 0.22;
  filter: blur(4px) url(#blob-filter-5);
  animation: motion-drift-1 18s ease-in-out -9s infinite;
}


@keyframes motion-drift-1 {
  0%   { translate: 0px 0px; }
  20%  { translate: 8px -5px; }
  40%  { translate: -6px 9px; }
  60%  { translate: 10px 4px; }
  80%  { translate: -5px -8px; }
  100% { translate: 0px 0px; }
}
@keyframes motion-drift-2 {
  0%   { translate: 0px 0px; }
  25%  { translate: -9px 6px; }
  50%  { translate: 7px -10px; }
  75%  { translate: -4px 8px; }
  100% { translate: 0px 0px; }
}
@keyframes motion-drift-3 {
  0%   { translate: 0px 0px; }
  30%  { translate: 9px 5px; }
  55%  { translate: -8px -6px; }
  80%  { translate: 5px 10px; }
  100% { translate: 0px 0px; }
}
@keyframes motion-drift-4 {
  0%   { translate: 0px 0px; }
  20%  { translate: -6px -9px; }
  45%  { translate: 10px 4px; }
  70%  { translate: -5px 7px; }
  100% { translate: 0px 0px; }
}