:root { --thumb-height: 200px; }
/* --- Reset & global --- */
* { margin:0; padding:0; box-sizing:border-box; }
body {
  font-family:'Montserrat',sans-serif;
  background:#0f0f0f;
  color:#eaeaea;
  scroll-behavior:smooth;
}

/* --- Intro animation --- */
#intro {
  position:fixed; top:0; left:0; width:100%; height:100%;
  background:#0f0f0f; display:flex; justify-content:center; align-items:center;
  z-index:2000; opacity:1; transition:opacity 1s ease;
}
#intro-logo {
  width:auto; height:auto; max-width:28vw; /* réduit d’un tiers */
  opacity:0; animation:fadeInLogo 2s forwards;
}
@keyframes fadeInLogo {
  0% {opacity:0; transform:scale(0.8);}
  100% {opacity:1; transform:scale(1);}
}

/* --- Header --- */
header {
  position:fixed; top:0; width:100%; background:rgba(10,10,10,0.9);
  display:flex; justify-content:space-between; align-items:center;
  padding:10px 30px; z-index:1000;
}
.logo img { height:40px; width:auto; } /* plus petit et harmonieux */
#menu-toggle {
  display:none; background:none; border:none; font-size:2rem; color:#fff; cursor:pointer;
}
nav { display:flex; gap:20px; }
nav a { text-decoration:none; color:#eaeaea; transition:color 0.3s; }
nav a:hover { color:#00d4ff; }

/* --- Sections --- */
.section {
  padding:120px 10%;
  min-height:100vh;
  display:flex;
  flex-direction:column;
  justify-content:center;
  opacity:0;
  transform:translateY(50px);
  transition:opacity 0.8s ease, transform 0.8s ease;
  background:linear-gradient(135deg,#001f29,#0a0a0a);
  line-height:1.6; /* ✅ espace entre les lignes plus cohérent et homogène */
}

/* --- Hero --- */
.hero {
  background:linear-gradient(135deg,#001f29,#0a0a0a);
  text-align:center;
}
.hero h1 { font-size:3rem; margin-bottom:20px; }
.hero p { font-size:1.2rem; color:#bbb; margin-bottom:30px; }
.btn {
  background:#00d4ff;
  color:#0f0f0f;
  padding:12px 24px;
  border-radius:25px;
  text-decoration:none;
  font-weight:600;
  transition:background 0.3s;
}
.btn:hover { background:#00a0c6; }

/* --- À propos --- */
#about {
  text-align:left; /* pas centré par héritage */
}
#about p {
  text-align:justify;
  text-justify:inter-word;
  hyphens:auto;
  -webkit-hyphens:auto;
  -moz-hyphens:auto;
  line-height:1.7;
  max-width:800px;
  margin:20px auto 0;
  color:#ccc;
  font-size:1.05rem;
}

/* --- Services --- */
.services {
  display:flex;
  justify-content:space-around;
  flex-wrap:wrap;
  gap:20px;
  margin-top:30px;
}
.card {
  background:#1a1a1a;
  border-radius:12px;
  padding:20px;
  width:280px;
  text-align:center;
  transition:transform 0.3s, background 0.3s;
}
.card:hover {
  transform:translateY(-5px);
  background:#222;
}

/* === Portfolio: equal height thumbnails + overlay title === */
.gallery {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 18px;
  margin-top: 20px;
}

.image-thumb, .video-thumb {
  position: relative;
  width: 100%;
  height: var(--thumb-height);
  border-radius: 12px;
  overflow: hidden;
  background: #0b0b0b;
  cursor: pointer;
}

.image-thumb img, .video-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  transition: opacity 0.3s ease, transform 0.3s ease;
}

/* --- Overlay title --- */
.thumb-title {
  position: absolute;
  inset: 0;
  display: flex;
  justify-content: center;
  align-items: center;
  font-size: 1.1rem;
  font-weight: 600;
  color: #fff;
  text-align: center;
  background: rgba(0, 0, 0, 0.4);
  opacity: 0;
  transition: opacity 0.3s ease;
  pointer-events: none; /* empêche le blocage des clics */
}

/* --- Hover effect (desktop only) --- */
@media (hover: hover) and (pointer: fine) {
  .image-thumb:hover img,
  .video-thumb:hover img {
    opacity: 0.6;
    transform: scale(1.02);
  }

  .image-thumb:hover .thumb-title,
  .video-thumb:hover .thumb-title {
    opacity: 1;
  }
}


/* --- Footer --- */
footer {
  text-align:center;
  padding:20px;
  background:#0a0a0a;
  color:#777;
  font-size:0.9rem;
}

/* --- Animation visible --- */
.section.visible {
  opacity:1;
  transform:translateY(0);
}

/* --- Lightbox --- */
#lightbox {
  display:none;
  position:fixed;
  top:0; left:0; width:100%; height:100%;
  background:rgba(0,0,0,0.95);
  justify-content:center; align-items:center;
  z-index:9999;
  flex-direction:column;
}
#lightbox img, #lightbox video {
  max-width:90%;
  max-height:90%;
  border-radius:12px;
  box-shadow:0 0 20px #00d4ff;
}
#lightbox video { display:none; }
#close {
  position:absolute;
  top:20px;
  right:30px;
  color:#fff;
  font-size:3rem;
  cursor:pointer;
  user-select:none;
  transition:color 0.3s;
}
#close:hover { color:#00d4ff; }

/* --- Responsive --- */
@media screen and (max-width:1024px){
  #menu-toggle { display:block; }
  nav {
    display:none;
    flex-direction:column;
    align-items:center;
    background:#0f0f0f;
    position:absolute;
    top:60px;
    right:10px;
    width:180px;
    padding:15px;
    border-radius:0 0 8px 8px;
  }
  nav.show { display:flex; }
  nav a { margin:10px 0; font-size:1rem; }
  .services { flex-direction:column; align-items:center; }
  .image-thumb, .video-thumb { max-width:45%; }
  .hero h1 { font-size:2rem; }
  .hero p { font-size:1rem; }
}

@media screen and (max-width:480px){
  #intro-logo { max-width:60vw; }
  .logo img { height:32px; }
  .image-thumb, .video-thumb { max-width:90vw; }
  .hero h1 { font-size:1.5rem; }
  .hero p { font-size:0.9rem; }
  .btn { padding:10px 20px; }
  #about p { font-size:0.95rem; }
}

/* --- Lien contact --- */
#contact a {
  color:#00d4ff;
  text-decoration:none;
  font-weight:600;
  transition:color 0.3s;
}
#contact a:hover {
  color:#00a0c6;
  text-decoration:underline;
}
