/* ==========================================================================
   VARIABLES & RESET
   ========================================================================== */
:root {
  --primary: #0f172a;
  --gold: #d4af37;
  --gold-hover: #b8962d;
  --text-light: #f8fafc;
  --text-dim: #94a3b8;
  --glass: rgba(15, 23, 42, 0.8);
  --glass-border: rgba(255, 255, 255, 0.1);
  --bg-dark: #020617;
  --drawer-bg: rgba(15, 23, 42, 0.98);
}

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

html {
  overflow-x: hidden; /* Empêche le scroll horizontal parasite */
  scroll-behavior: smooth;
}

body {
  font-family: 'Inter', sans-serif;
  background-color: var(--bg-dark);
  color: var(--text-light);
  overflow-x: hidden;
  line-height: 1.6;
  width: 100%;
}

/* --- EFFET DE FLOU GLOBAL LORS DE L'OUVERTURE DU MENU --- */
.no-scroll { 
  overflow: hidden; 
  height: 100vh;
}

/* L'overlay flou qui recouvre tout le site sauf le menu */
.no-scroll::after {
  content: "";
  position: fixed;
  top: 0; left: 0;
  width: 100%; height: 100%;
  background: rgba(0, 0, 0, 0.4);
  backdrop-filter: blur(8px); /* L'effet de flou intense */
  -webkit-backdrop-filter: blur(8px);
  z-index: 1040; /* Juste en dessous du menu mobile */
  animation: fadeIn 0.3s ease forwards;
}

@keyframes fadeIn {
  from { opacity: 0; }
  to { opacity: 1; }
}

.container {
  width: 90%;
  max-width: 1200px;
  margin: auto;
}

/* ==========================================================================
   NAVIGATION
   ========================================================================== */
.main-header {
  position: fixed;
  top: 0;
  width: 100%;
  padding: 15px 0;
  background: var(--glass);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  z-index: 1200;
  border-bottom: 1px solid var(--glass-border);
}

.header-flex {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.logo-brand {
  display: flex;
  align-items: center;
  gap: 12px;
  text-decoration: none;
  color: inherit;
  z-index: 1300;
}

.site-logo { height: 40px; width: auto; }
.brand-text { font-weight: 800; font-size: 1.3rem; letter-spacing: -1px; }
.accent-gold { color: var(--gold); }

.nav-links-list { display: flex; list-style: none; gap: 20px; align-items: center; }
.nav-links-list a { text-decoration: none; color: var(--text-dim); transition: 0.3s; font-weight: 500; font-size: 0.85rem; }
.nav-links-list a:hover, .nav-links-list a.active { color: var(--gold); }

.nav-cta {
  background: var(--gold);
  color: #000 !important;
  padding: 8px 18px;
  border-radius: 8px;
  font-weight: 700 !important;
}

/* --- Menu Toggle --- */
.menu-toggle { display: none; cursor: pointer; z-index: 1300; padding: 10px; }
.menu-toggle div { width: 28px; height: 2px; background: white; margin: 6px 0; transition: 0.4s; border-radius: 10px; }

.change .bar1 { transform: rotate(-45deg) translate(-5px, 6px); }
.change .bar2 { opacity: 0; }
.change .bar3 { transform: rotate(45deg) translate(-5px, -6px); }

/* --- Mobile Drawer (Ajusté pour iPhone/Android) --- */
.mobile-overlay {
  position: fixed;
  top: 0; right: -100%;
  width: 85%; max-width: 320px; height: 100vh;
  background: var(--drawer-bg);
  backdrop-filter: blur(20px);
  z-index: 1100;
  transition: all 0.5s cubic-bezier(0.77, 0, 0.175, 1);
  box-shadow: -10px 0 40px rgba(0,0,0,0.8);
  display: flex;
  flex-direction: column;
  padding: 100px 30px;
  border-left: 1px solid rgba(212, 175, 55, 0.2);
}

.mobile-overlay.open { right: 0; }
.mobile-nav-links { list-style: none; }
.mobile-nav-links li { margin: 20px 0; transform: translateX(20px); opacity: 0; transition: 0.4s ease; transition-delay: calc(0.1s * var(--i)); }
.mobile-overlay.open .mobile-nav-links li { transform: translateX(0); opacity: 1; }
.mobile-nav-links a { font-size: 1.3rem; color: white; text-decoration: none; font-weight: 700; display: block; }
.mobile-nav-links a:hover { color: var(--gold); padding-left: 8px; transition: 0.3s; }

/* ==========================================================================
   HERO & CONTENT
   ========================================================================== */
.hero-section {
  min-height: 100vh;
  display: flex;
  align-items: center;
  position: relative;
  text-align: center;
  padding: 100px 0;
}

.hero-glow {
  position: absolute;
  top: 30%; left: 50%;
  transform: translate(-50%, -50%);
  width: 60vw; height: 60vw;
  background: radial-gradient(circle, rgba(212, 171, 55, 0.1) 0%, transparent 70%);
  filter: blur(80px);
  pointer-events: none;
}

.hero-section h1 { font-size: clamp(2.2rem, 8vw, 4.5rem); font-weight: 800; line-height: 1.1; margin-bottom: 20px; }
.text-gradient { background: linear-gradient(to right, #fff, var(--gold)); -webkit-background-clip: text; -webkit-text-fill-color: transparent; }

.hero-btns { margin-top: 40px; display: flex; gap: 15px; justify-content: center; flex-wrap: wrap; }
.btn-primary { background: var(--gold); color: #000; padding: 14px 30px; border-radius: 10px; text-decoration: none; font-weight: 700; transition: 0.3s; display: inline-block; }
.btn-primary:hover { transform: translateY(-3px); box-shadow: 0 10px 20px rgba(212, 175, 55, 0.2); }
.btn-secondary { border: 1px solid rgba(255,255,255,0.2); color: #fff; padding: 14px 30px; border-radius: 10px; text-decoration: none; transition: 0.3s; display: inline-block; }

/* Grilles Responsive pour tous écrans */
.grid-layout { 
  display: grid; 
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); 
  gap: 25px; 
  padding: 60px 0; 
}

.feature-card {
  background: rgba(255,255,255,0.03);
  border: 1px solid var(--glass-border);
  padding: 35px;
  border-radius: 20px;
  transition: 0.4s;
  height: 100%;
}
.feature-card:hover { transform: translateY(-8px); border-color: var(--gold); background: rgba(255,255,255,0.05); }
.feature-card i { font-size: 2.2rem; color: var(--gold); margin-bottom: 20px; display: block; }

/* ==========================================================================
   FOOTER & WHATSAPP
   ========================================================================== */
.whatsapp-modern {
  position: fixed; bottom: 25px; right: 25px; background: #25D366; width: 55px; height: 55px;
  border-radius: 15px; display: flex; justify-content: center; align-items: center;
  color: white; font-size: 1.8rem; box-shadow: 0 10px 20px rgba(37,211,102,0.3); z-index: 1000;
  animation: float 3s ease-in-out infinite;
}
@keyframes float { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(-10px); } }

.modern-footer { padding: 60px 0 30px; border-top: 1px solid var(--glass-border); background: #01040f; }
.footer-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 30px; }
.footer-copyright { text-align: center; color: var(--text-dim); font-size: 0.8rem; margin-top: 40px; padding-top: 20px; border-top: 1px solid var(--glass-border); }
.gold { color: var(--gold); }

/* ==========================================================================
   PAGE PROJECTS & SERVICES (ADAPTATIONS)
   ========================================================================== */
.project-card-modern {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 40px;
  margin-bottom: 80px;
  align-items: center;
}

.project-visual-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 12px;
}

.img-large { grid-row: span 2; }
.project-visual-grid img { 
  width: 100%; height: 100%; object-fit: cover; 
  border-radius: 15px; border: 1px solid var(--glass-border); 
}

/* ==========================================================================
   TEAM & LEADER (MOBILE OPTIMIZED)
   ========================================================================== */
.leader-card {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid var(--glass-border);
    border-radius: 25px;
    overflow: hidden;
    margin-bottom: 50px;
}

.leader-img img { width: 100%; height: 400px; object-fit: cover; }
.leader-info { padding: 40px; }

.member-thumb { height: 300px; overflow: hidden; }
.member-thumb img { width: 100%; height: 100%; object-fit: cover; }

/* ==========================================================================
   RESPONSIVE FINAL (IPHONE / ANDROID / TABLET)
   ========================================================================== */

/* Tablettes et petits Laptops */
@media (max-width: 992px) {
  .desktop-nav { display: none; }
  .menu-toggle { display: block; }
  .nav-cta { display: none; } /* On cache le CTA bouton dans le header sur mobile */
  
  .project-card-modern, .leader-card {
    grid-template-columns: 1fr;
  }
}

/* Mobiles (iPhone 12/13/14, Samsung S-series) */
@media (max-width: 768px) {
  .hero-section { padding-top: 80px; text-align: center; }
  .hero-section h1 { font-size: 2.4rem; }
  
  .hero-btns { flex-direction: column; align-items: center; }
  .btn-primary, .btn-secondary { width: 100%; max-width: 280px; text-align: center; }
  
  .grid-layout { grid-template-columns: 1fr; }
  
  .container { width: 92%; }
  
  .feature-card { padding: 25px; }

  /* Ajustements pour la page About */
  main.container { margin-top: 20px; }
  
  /* Masquer certains détails secondaires sur petit mobile pour la clarté */
  .service-number { display: none; }
}

/* Très petits écrans */
@media (max-width: 480px) {
  .brand-text { font-size: 1.1rem; }
  .site-logo { height: 35px; }
  
  .project-text h2 { font-size: 1.6rem; }
  .leader-info h2 { font-size: 1.8rem; }
  .leader-img img { height: 300px; }
}

/* Fix pour Safari Mobile (vh units) */
@supports (-webkit-touch-callout: none) {
  .hero-section { height: -webkit-fill-available; }
}