/*
  Theme Name: BizPage (Version BIM EFFO Ultra-Responsive & Dark/Light Mode)
  Auteur: BIM EFFO
*/

/*--------------------------------------------------------------
# 1. Variables Globales & Mode Clair (Par défaut)
--------------------------------------------------------------*/
:root {
  /* Couleurs de la charte BIM EFFO */
  --green-vegetal-dark: #116b38;
  --green-vegetal-hover: #168a48;
  --green-accent: #18d26e;
  
  /* Mode Clair */
  --bg-primary: #ffffff;
  --bg-secondary: #f8f9fa;
  --bg-card: #ffffff;
  --text-primary: #212529;
  --text-secondary: #555555;
  --header-bg: rgba(0, 0, 0, 0.90);
  --header-scrolled: rgba(0, 0, 0, 0.98);
  --border-color: #e9ecef;
  --shadow-color: rgba(0, 0, 0, 0.08);

  /* Tailles fluides & dynamique */
  --header-height: clamp(60px, 8vh, 92px);
  --font-base: clamp(14px, 1.2vw, 16px);
  --h1-size: clamp(22px, 4vw, 42px);
  --h2-size: clamp(18px, 3vw, 32px);
}

/*--------------------------------------------------------------
# 2. Support Mode Sombre Automatique (Système)
--------------------------------------------------------------*/
@media (prefers-color-scheme: dark) {
  :root {
    --bg-primary: #121212;
    --bg-secondary: #1e1e1e;
    --bg-card: #242424;
    --text-primary: #f8f9fa;
    --text-secondary: #cccccc;
    --header-bg: rgba(10, 10, 10, 0.95);
    --header-scrolled: rgba(5, 5, 5, 0.99);
    --border-color: #333333;
    --shadow-color: rgba(0, 0, 0, 0.5);
  }
}

/*--------------------------------------------------------------
# 3. Réinitialisation & Anti-Chevauchement
--------------------------------------------------------------*/
html {
  scroll-behavior: smooth;
  scroll-padding-top: var(--header-height);
  font-size: 100%;
}

body {
  background-color: var(--bg-primary);
  color: var(--text-secondary);
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  font-size: var(--font-base);
  line-height: 1.6;
  padding-top: var(--header-height);
  transition: background-color 0.3s ease, color 0.3s ease;
  overflow-x: hidden;
}

a {
  color: var(--green-vegetal-dark);
  transition: all 0.3s ease;
}

a:hover, a:active, a:focus {
  color: var(--green-vegetal-hover);
  text-decoration: none;
  outline: none;
}

p {
  margin-bottom: 1.5rem;
  color: var(--text-secondary);
}

h1, h2, h3, h4, h5, h6 {
  font-family: "Montserrat", -apple-system, sans-serif;
  color: var(--text-primary);
  font-weight: 700;
  margin-bottom: 1rem;
}

/* Bouton Retour en Haut */
.back-to-top {
  position: fixed;
  display: none;
  background: var(--green-vegetal-dark);
  color: #ffffff;
  width: clamp(36px, 5vw, 48px);
  height: clamp(36px, 5vw, 48px);
  text-align: center;
  line-height: clamp(36px, 5vw, 48px);
  border-radius: 50%;
  right: 15px;
  bottom: 15px;
  z-index: 999;
  box-shadow: 0 4px 12px var(--shadow-color);
  transition: transform 0.3s ease, background 0.3s ease;
}

.back-to-top:hover {
  transform: translateY(-3px);
  background: var(--green-vegetal-hover);
}

/*--------------------------------------------------------------
# 4. Header & Logo Responsive
--------------------------------------------------------------*/
#header {
  height: var(--header-height);
  position: fixed;
  left: 0;
  top: 0;
  right: 0;
  transition: all 0.4s ease;
  z-index: 997;
  background: var(--header-bg);
  backdrop-filter: blur(8px);
  display: flex;
  align-items: center;
}

#header.header-scrolled {
  background: var(--header-scrolled);
  height: clamp(50px, 6vh, 70px);
}

#header #logo h1 {
  font-size: clamp(20px, 3vw, 32px);
  margin: 0;
  letter-spacing: 2px;
}

#header #logo h1 a {
  color: #ffffff;
  padding-left: 10px;
  border-left: 4px solid var(--green-vegetal-dark);
}

/*--------------------------------------------------------------
# 5. Navigation Menu (Actif en Vert Végétal Foncé)
--------------------------------------------------------------*/
#nav-menu-container {
  margin-left: auto;
}

.nav-menu, .nav-menu * {
  margin: 0;
  padding: 0;
  list-style: none;
}

.nav-menu > li {
  float: left;
  margin-left: 6px;
}

.nav-menu a {
  padding: clamp(6px, 1vh, 10px) clamp(10px, 1.2vw, 18px);
  text-decoration: none;
  display: inline-block;
  color: #ffffff;
  font-family: "Montserrat", sans-serif;
  font-weight: 600;
  font-size: clamp(11px, 1vw, 13px);
  text-transform: uppercase;
  border-radius: 20px;
  transition: all 0.3s ease;
}

.nav-menu li:hover > a {
  background: rgba(17, 107, 56, 0.25);
  color: #ffffff;
}

/* ÉLÉMENT ACTIF SÉLECTIONNÉ (Fond Vert Végétal Foncé) */
.nav-menu > .menu-active > a, 
.nav-menu > .menu-active > a:hover {
  background-color: var(--green-vegetal-dark) !important;
  color: #ffffff !important;
  box-shadow: 0 4px 12px rgba(17, 107, 56, 0.4);
}

/*--------------------------------------------------------------
# 6. Carrousel & Section Intro (Adapte au Portrait / Paysage)
--------------------------------------------------------------*/
#intro {
  width: 100%;
  height: calc(100vh - var(--header-height));
  min-height: 400px;
  background: #000;
  position: relative;
}

#intro .carousel-item {
  width: 100%;
  height: calc(100vh - var(--header-height));
  min-height: 400px;
  background-size: cover;
  background-position: center;
}

#intro .carousel-item::before {
  content: '';
  background-color: rgba(0, 0, 0, 0.65);
  position: absolute;
  top: 0; left: 0; right: 0; bottom: 0;
}

#intro .carousel-container {
  display: flex;
  justify-content: center;
  align-items: center;
  position: absolute;
  inset: 0;
  padding: 20px;
}

#intro h2 {
  color: #ffffff;
  font-size: var(--h1-size);
  margin-bottom: 20px;
}

#intro p {
  color: #f8f9fa;
  font-size: clamp(13px, 1.5vw, 18px);
  max-width: 800px;
  margin: 0 auto 25px auto;
}

#intro .btn-get-started {
  font-family: "Montserrat", sans-serif;
  font-weight: 600;
  font-size: clamp(12px, 1vw, 15px);
  padding: 10px 28px;
  border-radius: 50px;
  color: #ffffff;
  background: var(--green-vegetal-dark);
  box-shadow: 0 4px 15px rgba(17, 107, 56, 0.4);
}

#intro .btn-get-started:hover {
  background: #ffffff;
  color: var(--green-vegetal-dark);
}

/*--------------------------------------------------------------
# 7. Cartes & Sections Dynamiques (Mode Clair/Sombre)
--------------------------------------------------------------*/
.section-bg {
  background-color: var(--bg-secondary);
}

#main {
  background-color: var(--bg-primary);
}

.about-col, .box, .card {
  background-color: var(--bg-card) !important;
  border: 1px solid var(--border-color);
  box-shadow: 0 8px 24px var(--shadow-color);
  border-radius: 12px;
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.about-col:hover, .box:hover {
  transform: translateY(-5px);
  box-shadow: 0 12px 30px var(--shadow-color);
}

/*--------------------------------------------------------------
# 8. Media Queries Avancées (Smartphones, Tablettes, TV, Montres)
--------------------------------------------------------------*/

/* Mode Paysage Mobile (Hauteur réduite) */
@media (max-height: 500px) and (orientation: landscape) {
  #intro, #intro .carousel-item {
    min-height: 100vh;
  }
  #intro h2 {
    font-size: 20px;
    margin-bottom: 10px;
  }
  #intro p {
    font-size: 12px;
    margin-bottom: 15px;
  }
  #intro .btn-get-started {
    padding: 6px 18px;
  }
}

/* Montres Connectées & Très Petits Écrans (< 320px) */
@media (max-width: 320px) {
  :root {
    --header-height: 50px;
  }
  #header #logo h1 {
    font-size: 16px;
  }
  .btn-get-started {
    padding: 6px 14px;
    font-size: 11px;
  }
}

/* Écrans Mobiles & Tablettes en Portrait (< 992px) */
@media (max-width: 991px) {
  #nav-menu-container {
    display: none;
  }
  #mobile-nav-toggle {
    display: block;
    background: transparent;
    border: none;
    color: #ffffff;
    font-size: 26px;
    cursor: pointer;
  }
}

/* Grands Écrans & Smart TV (> 1600px) */
@media (min-width: 1600px) {
  .container {
    max-width: 1400px;
  }
  :root {
    --font-base: 18px;
  }
}
/* Correction du conteneur du header et du logo pour éviter les superpositions */
#header .container-fluid {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: nowrap;
}

#header #logo {
  float: none !important;
  flex-shrink: 0;
}

#nav-menu-container {
  float: none !important;
}

/* Espacement propre entre les liens du menu pour qu'ils ne se collent pas */
.nav-menu > li {
  margin-left: 15px !important;
  float: none;
  display: inline-block;
}

.nav-menu a {
  font-size: 12px !important; /* Réduit légèrement la taille si nécessaire pour que tout tienne sur une seule ligne */
  padding: 6px 10px !important;
}