:root {
  --noir: #000;
  --blanc: #fff;
}

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

body {
  font-family: "Raleway", sans-serif;
  background: var(--noir);
  color: var(--blanc);
  overflow-x: hidden;
}

/* =========================
   HEADER & NAV
========================= */
.header {
  position: fixed;
  top: 0;
  width: 100%;
  background: transparent;
  z-index: 100;
  transition: background 0.4s ease, box-shadow 0.4s ease;
}

.header.scrolled {
  background: var(--noir);
  box-shadow: 0 3px 0 var(--noir);
}

.nav-container {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 25px 8%;
}

.logo {
  font-size: 0; 
  color: var(--blanc);
  letter-spacing: 1px;
  font-weight: 700;
  display: flex; 
  align-items: center;
}

.logo .logo-text {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}

.logo .logo-img {
    height: 50px; 
    width: auto;
    display: block;
}

.nav-links {
  list-style: none;
  display: flex;
  gap: 40px;
}

.nav-links a {
  color: var(--blanc);
  text-decoration: none;
  font-weight: 500;
  position: relative;
  padding-bottom: 4px;
  transition: all 0.3s ease;
}

.nav-links a::after {
  content: "";
  position: absolute;
  left: 0;
  bottom: 0;
  width: 0%;
  height: 2px;
  background: var(--blanc);
  transition: width 0.3s ease;
}

.nav-links a:hover::after {
  width: 100%;
}

.nav-links a.active::after {
  width: 100%;
}

.hamburger-menu {
  display: none; 
  cursor: pointer;
  background: none;
  border: none;
  z-index: 101; 
  padding: 0;
  width: 30px;
  height: 20px;
  position: relative;
}

.hamburger-menu .bar {
  display: block;
  width: 100%;
  height: 3px;
  background-color: var(--blanc);
  border-radius: 2px;
  margin: 4px 0;
  transition: all 0.3s ease-in-out;
}

/* =========================
   HERO VIDEO
========================= */
.hero {
  width: 100%;
  height: 100vh;
  position: relative;
  overflow: hidden;
}

.hero-video {
  width: 100%;
  height: 100%;
  object-fit: cover;
  position: absolute; 
  top: 0;
  left: 0;
}

.hero-video-mobile {
  display: none;
}

/* =========================
   PROTECTION (CORRIGÉ POUR LE CLIC)
========================= */
video, img {
    /* On enlève pointer-events:none ici pour ne pas tout bloquer par défaut */
    -webkit-user-select: none;
    user-select: none;
}

video::-webkit-media-controls {
    display:none !important;
}

/* =========================
   SECTION PRÉSENTATION
========================= */
.presentation {
  background: var(--blanc);
  color: var(--noir);
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 150px 8%;
  flex-wrap: wrap;
  gap: 60px;
}

.text-left {
  flex: 1;
  min-width: 280px;
}

.text-left h2 {
  font-size:3rem;
  font-weight: 700;
  line-height: 1.2;
  text-align: right;
}

.text-right {
  flex: 1;
  min-width: 280px;
}

.text-right p {
  font-size: 1rem;
  line-height: 1.6;
  text-align: left;
}

/* =========================
   RÉALISATIONS (CORRIGÉ)
========================= */
.realisations {
  display: flex;
  width: 100%;
  height: 100vh;
  background: var(--noir); 
}

.realisations-item {
  flex: 1;
  position: relative;
  overflow: hidden;
  cursor: pointer;
  transition: flex 0.4s ease;
  pointer-events: auto;
}

.realisations-item:hover {
  flex: 1.2;
}

.click-layer {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 50; /* Doit être au-dessus de tout */
    background: transparent;
    pointer-events: auto !important;
}

.real-img,
.real-video {
  position: absolute;
  width: 100%;
  height: 100%;
  object-fit: cover;
  top: 0;
  left: 0;
  transition: opacity 0.4s ease;
  pointer-events: none; /* Les médias de fond ne doivent pas intercepter le clic */
}

.real-video {
  opacity: 0;
}

.realisations-item h3 {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  color: var(--blanc); 
  font-size: 1.2rem;
  font-weight: 300;
  letter-spacing: 1px;
  z-index: 10;
  margin: 0;
  pointer-events: none;
}

iframe.real-video {
  width: 300%; 
  height: 100%;
  left: 50%;
  transform: translateX(-50%);
  pointer-events: none;
}

/* =========================
   MODALE / OVERLAY
========================= */
.video-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.95);
  z-index: 2000;
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.5s ease;
}

.video-overlay.active {
  opacity: 1;
  pointer-events: auto;
}

.player-container {
  width: 90%;
  max-width: 1200px;
  aspect-ratio: 16 / 9;
  background: #000;
}

.player-container iframe, 
.player-container video {
  width: 100%;
  height: 100%;
  border: none;
}

.close-overlay {
  position: absolute;
  top: 30px;
  right: 40px;
  background: none;
  border: none;
  color: white;
  font-size: 50px;
  font-weight: 300;
  cursor: pointer;
  line-height: 1;
  z-index: 2100;
  transition: transform 0.3s ease;
}

/* =========================
   SECTION GÉNÉRIQUE
========================= */
.section {
  padding: 120px 10%;
  background: var(--blanc); 
  color: var(--noir); 
  text-align: center;
}

#apropos {
  background: var(--noir);
  color: var(--blanc);
}

/* =========================
   BOUTON CONTACT
========================= */
.contact-section {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
}

.contact-section h2 {
  font-size: 1.25rem; 
  margin-bottom: 40px;
}

.btn-contact-nouveau {
    position: relative; 
    display: inline-block;
    padding: 20px 50px; 
    background-color: var(--blanc);
    border: 1px solid var(--blanc); 
    border-radius: 0; 
    color: var(--noir); 
    font-size: 2.2rem; 
    font-weight: 700;
    text-transform: uppercase;
    text-decoration: none;
    cursor: pointer;
    transition: background-color 0.3s ease, color 0.3s ease;
    z-index: 1; 
    outline: none;
}

.btn-contact-nouveau::before {
    content: '';
    position: absolute;
    top: -3px; 
    left: -3px;
    width: calc(100% + 6px); 
    height: calc(100% + 6px);
    border: 2px solid var(--noir);
    box-sizing: border-box;
    transform: scale(0.9); 
    opacity: 0;
    transition: transform 0.3s ease-out, opacity 0.3s ease-out;
    z-index: 0;
}

.btn-contact-nouveau:hover::before {
    transform: scale(1); 
    opacity: 1;
}

.btn-contact-nouveau.active-click {
    background-color: var(--noir);
    color: var(--blanc);
}

/* =========================
   SECTION CLIENTS
========================= */
.clients {
  background: var(--blanc); 
  color: var(--noir); 
  padding: 100px 8%;
  text-align: center;
}

.clients h2 {
  font-size: 2rem;
  font-weight: 700;
  margin-bottom: 50px;
}

.clients-logos {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 50px;
  align-items: center;
}

.clients-logos img {
  height: 60px;
  filter: grayscale(100%); 
  transition: filter 0.3s ease, transform 0.3s ease;
}

.clients-logos img:hover {
  filter: grayscale(0%);
  transform: translateY(-5px);
}

/* =========================
   SECTION À PROPOS DÉTAILLÉE
========================= */
.apropos-section {
    padding: 100px 10%;
}

.apropos-content {
    max-width: 900px;
    margin: 0 auto;
    text-align: left;
}

.apropos-content h3 {
    font-size: 1.8rem;
    font-weight: 700;
    margin-top: 50px;
    margin-bottom: 20px;
}

.apropos-content p {
    font-size: 1rem;
    line-height: 1.6;
    margin-bottom: 15px;
}

.equipe-expertise {
    list-style: none;
    padding: 0;
    margin-top: 30px;
    margin-bottom: 30px;
}

.equipe-expertise li {
    font-size: 1.1rem;
    line-height: 1.8;
    position: relative;
    padding-left: 20px;
}

.equipe-expertise li::before {
    content: '>>'; 
    color: var(--blanc);
    position: absolute;
    left: 0;
}

.final-motto {
    font-size: 1.4rem;
    font-weight: 700;
    margin-top: 40px;
}

hr {
    border: none;
    border-top: 1px dashed rgba(255, 255, 255, 0.3);
    margin: 60px 0;
}

/* =========================
   RESPONSIVE
========================= */
@media (max-width: 900px) {
  .hamburger-menu { display: block; }
  .nav-links {
    position: fixed; top: 0; left: 0; width: 100%; height: 100vh;
    flex-direction: column; justify-content: center; align-items: center;
    background: var(--noir); transform: translateX(100%); transition: 0.4s;
  }
  .header.menu-open .nav-links { transform: translateX(0); }
  .hero-video-desktop { display: none !important; }
  .hero-video-mobile { display: block !important; }
  .presentation { flex-direction: column; text-align: left; }
  .realisations { flex-direction: column; height: auto; }
  .realisations-item { height: 60vh; min-height: 400px; }
}