/* ===================== VARIABLES ET THEMES ===================== */
/* Définition des couleurs principales, polices et autres variables CSS pour le site */
:root {
  /* Couleurs pour le mode sombre par défaut */
  --bg-color: #0a0a0a;          /* Fond principal */
  --text-color: #ffffff;        /* Couleur du texte */
  --accent-color: #333333;      /* Couleur secondaire / accents */
  --panel-bg: rgba(20, 20, 20, 0.635); /* Fond des panneaux / dropdowns */
  --glow-color: rgba(255, 255, 255, 0.15); /* Couleur du glow / effets lumineux */
  --border-color: #444;         /* Couleur des bordures */
  --highlight: #fff;            /* Couleur pour surlignage et hover */

  /* Polices */
  --font-main: 'Share Tech Mono', monospace; /* Police principale */
  --font-title: 'BankGothic', 'BankGothic Bold', sans-serif; /* Titres */
}
/* Variables pour le mode clair */
body.light-mode {
  --bg-color: #e0e0e0;
  --text-color: #111111;
  --accent-color: #cccccc;
  --panel-bg: rgba(240, 240, 240, 0.95);
  --glow-color: rgba(0, 0, 0, 0.1);
  --border-color: #999;
  --highlight: #000;
}
/* ===================== RESET GLOBAL ===================== */
body {
  overflow: hidden;
}
body {
  margin: 0;
  padding: 0;
  font-family: var(--font-main);
  background-color: var(--bg-color);
  color: var(--text-color);
  overflow-x: hidden;
  display: flex;
  flex-direction: column;
  min-height: 100vh;
  transition: background-color 0.3s, color 0.3s;
  font-variant-ligatures: none;
  -webkit-font-variant-ligatures: none;
  font-feature-settings: "liga" 0; /* Désactive les ligatures pour un style technique */
}
/* ===================== BACKGROUND / EFFETS ===================== */
/* Plus visible en mode clair */
body.light-mode .background-animation {
  opacity: 0.1;
}
/* ===================== NAVBAR ===================== */
.navbar {
  position: fixed;
  top: 0;
  width: 100%;
  padding: 1rem 2rem;
  box-sizing: border-box;
  z-index: 1000;
  backdrop-filter: blur(8px); /* Flou de fond */
  border-bottom: 1px solid transparent;
}
/* Conteneur interne pour aligner les items */
.navbar-container {
  display: flex;
  justify-content: flex-end; /* Tout à droite */
  align-items: center;
  gap: 2rem; /* Espacement entre éléments */
}
/* ===================== LIENS DE NAVIGATION ===================== */
.nav-links {
  list-style: none;
  display: flex;
  gap: 2rem;
  margin: 0;
  padding: 0;
  align-items: center;
}
/* Style des liens principaux */
.nav-item {
  font-family: var(--font-title);
  color: var(--text-color);
  text-decoration: none;
  font-size: 1rem;
  display: flex;
  align-items: center;
  gap: 5px;
  cursor: pointer;
}

/* ===================== DROPDOWNS ===================== */
.dropdown-container {
  position: relative;
  padding-bottom: 10px;
  margin-bottom: -10px;
}
/* Sous-menu déroulant */
.dropdown-menu {
  position: absolute;
  top: 100%;
  left: 50%;
  transform: translateX(-50%) translateY(20px);
  background: var(--panel-bg);
  border: none;
  padding: 0.8rem;
  list-style: none;
  width: max-content;
  max-width: 320px; /* Limite largeur */
  opacity: 0;
  visibility: hidden;
  transition: all 0.3s ease;
  border-radius: 8px;
  box-shadow: 0 10px 30px rgba(0,0,0,0.2);
  text-align: center;
}
.dropdown-menu span {
  font-size: 0.9rem;
  color: var(--highlight); /* Texte lumineux */
  font-weight: normal;
  letter-spacing: 0.5px;
}
/* Affiche le dropdown au survol */
.dropdown-container:hover .dropdown-menu {
  opacity: 1;
  visibility: visible;
  transform: translateX(-50%) translateY(10px);
}
/* Flèche de dropdown qui pivote */
.chevron {
  font-size: 0.6rem;
  transition: transform 0.3s;
}
.dropdown-container:hover .chevron {
  transform: rotate(180deg);
}
/* ===================== CONTROLS ET BOUTONS ===================== */
.nav-controls {
  display: flex;
  align-items: center;
  gap: 1rem;
}
/* Style des boutons techniques (langue, thème, contact) */
.btn-tech {
  background: transparent;
  border: 1px solid var(--border-color);
  color: var(--text-color);
  font-family: var(--font-main);
  font-size: 0.9rem;
  padding: 0.4rem 0.8rem;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 8px;
  transition: all 0.3s;
  text-transform: uppercase;
  min-height: 32px; /* Remplace 32px par la hauteur de tes boutons "EN" */
  line-height: 1; /* Supprime l'espace vertical supplémentaire */
  box-sizing: border-box; /* Inclut padding et border dans la hauteur */
}

/* Hover des boutons */
.btn-tech:hover {
  border-color: var(--highlight);
  background: var(--highlight);
  color: var(--bg-color);
}
/* Bouton contact et conteneur email */
.btn-contact {
    position: relative;
}
.email-container {
    position: absolute;
    top: 100%;
    right: 0;
    transform: translateX(0);
    background: var(--panel-bg);
    padding: 0.5rem 1rem;
    border-radius: 4px;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.3s, visibility 0.3s;
    z-index: 100;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.2);
    border: 1px solid var(--border-color);
    font-size: 1rem;
    white-space: nowrap;
    margin-top: 0.3rem;
}
.btn-contact:hover .email-container {
    opacity: 1;
    visibility: visible;
}

/* Style de l'icône "copier" (noir et blanc) */
.copy-icon {
    cursor: pointer;
    color: var(--text-color); /* Couleur du texte (noir en mode clair, blanc en mode sombre) */
    font-size: 0.9rem;
    transition: opacity 0.2s;
    user-select: none;
    margin-left: 0.3rem;
    filter: grayscale(100%); /* Force le noir et blanc */
}
.copy-icon:hover {
    opacity: 0.7; /* Effet de survol subtil */
}

/* Style du texte de l'email (sélectionnable) */
.email-text {
    color: var(--highlight);
    font-family: 'Courier New', monospace;
    text-transform: lowercase;
    font-size: 0.8rem;
    user-select: text;
    cursor: text;
}

/* Conteneur de l'email */
.email-container {
    display: flex;
    align-items: center;
    gap: 0.3rem;
}

/* Tooltip pour confirmation */
.tooltip {
  position: absolute;
  bottom: -35px;
  left: 50%;
  transform: translateX(-50%);
  background: var(--highlight);
  color: var(--bg-color);
  font-size: 0.6rem;
  padding: 2px 6px;
  border-radius: 2px;
  opacity: 0;
  transition: opacity 0.3s;
  pointer-events: none;
  white-space: nowrap;
}
.tooltip.show { opacity: 1; }

/* ===================== HERO / SECTION PRINCIPALE ===================== */
.page-wrapper {
  flex: 1;
  display: flex;
  justify-content: center;
  align-items: center;
  flex-direction: column;
  padding-top: 80px; /* Décalage pour navbar fixe */
}
.hero-section {
  display: flex;
  flex-direction: column;
  align-items: center;
  margin-bottom: 7rem; /* Déplace vers le haut */
  transform: scale(1.3); /* Zoom initial */
}
.hero-content {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 1.5rem;
  margin: 1.5rem;
}
.logo-wrapper {
  width: 130px;
  height: auto;
}
/* Logo SVG adaptatif au thème */
.logo-path {
  fill: var(--text-color);
  transition: fill 0.3s;
}
.title-wrapper {
  display: flex;
  margin: 0;
  font-family: 'BankGothic Bold', sans-serif;
  line-height: 1;
  flex-direction: column;
  align-items: flex-start;
  justify-content: flex-start;
}
.word-envergure {
  font-size: 3.5rem;
  display: block;
  letter-spacing: 2px;
  text-align: left;
}
.word-technologie {
  font-size: 2.2rem;
  display: block;
  color: #888;
  letter-spacing: 5px;
  text-align: left;
  margin-left: 6px;
}
body.light-mode .word-technologie { color: #555; }
/* Slogan + ligne tricolore */
.slogan-container {
  margin-top: 2rem;
  width: 100%;
  max-width: 650px;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
}
.slogan-text {
  margin: 0 0 10px 0;
  font-size: 1rem;
  letter-spacing: 3px;
  color: #888;
  text-transform: uppercase;
  opacity: 1;
}
.bbr-line {
  width: 65%;
  height: 1.7px;
  background: linear-gradient(to right, #0c008c 33%, #ffffff 33%, #ffffff 66%, #ed2939 66%);
  opacity: 1;
}

/* ===================== ANIMATIONS ===================== */
/* Animation pour le hero (logo + ENVERGURE/TECHNOLOGIE) */
.hero-content {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 1.5rem;
    margin: 1.5rem;
    opacity: 0;
    transform: translateX(-20px); /* Départ à gauche */
    animation: slideInFromLeft 0.8s ease-out forwards;
}

@keyframes slideInFromLeft {
    to {
        opacity: 1;
        transform: translateX(0); /* Arrivée à sa position normale */
    }
}

/* Animation pour le slogan et la ligne BBR */
.slogan-container {
    margin-top: 2rem;
    width: 100%;
    max-width: 650px;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    opacity: 0;
    transform: translateX(20px); /* Départ à droite */
    animation: slideInFromRight 0.8s ease-out forwards ; /* Délai de 0.3s */
}

@keyframes slideInFromRight {
    to {
        opacity: 1;
        transform: translateX(0); /* Arrivée à sa position normale */
    }
}

/* ===================== ICÔNE THÈME ===================== */
#theme-toggle {
    color: var(--text-color) !important;
    font-size: 1rem;
    filter: grayscale(100%);
}

/* ===================== BURGER ===================== */
/* Masquer le burger par défaut (PC) */
/* Style du menu burger (trois tirets horizontaux) */
.menu-toggle {
    display: none;
    flex-direction: column;
    justify-content: space-between; /* Espace égal entre les tirets */
    width: 30px;
    height: 26px; /* Hauteur totale pour 3 tirets + espacements */
    padding: 0; /* Supprime le padding pour éviter les débordements */
    background: none;
    border: none;
    cursor: pointer;
    z-index: 2000;
}

.bar {
    width: 100%; /* Largeur maximale */
    height: 1px; /* Épaisseur des tirets */
    background: var(--text-color); /* Couleur des tirets */
    border-radius: 2px; /* Coins légèrement arrondis */
}

/* Animation optionnelle pour les tirets (si tu veux un effet au clic) */
.menu-toggle.is-active .bar:nth-child(1) {
    transform: translateY(1px); /* Légère animation pour indiquer l'état actif */
}

.menu-toggle.is-active .bar:nth-child(3) {
    transform: translateY(-1px);
}

/* ===================== MOBILE / RESPONSIVE ===================== */
@media (max-width: 600px) {
    /* Adaptation générale */
    .hero-section {
        transform: none;
        margin-top: 2rem;
    }
    /* Navbar : burger plus à gauche */
    .navbar-container {
        justify-content: space-between;
        width: 100%;
        padding: 1rem;
    }
    .menu-toggle {
        display: flex;
        position: relative;
        left: 1rem;
        margin-right: auto;
        z-index: 2000;
    }
    /* Menu plein écran */
    .nav-links {
        position: fixed;
        top: 0;
        left: 0;
        width: 100%;
        height: 100vh;
        background: var(--bg-color);
        flex-direction: column;
        justify-content: flex-start; /* Changement ici */
        align-items: center;
        padding: 5rem 0 0 0; /* Ajout d'un padding-top */
        transform: translateX(-100%);
        transition: transform 0.4s ease-in-out;
        z-index: 1500;
    }
    .nav-links.active {
        transform: translateX(0);
    }
    /* Style des onglets */
    .dropdown-container {
        width: 100%;
        text-align: center;
        margin: 1rem 0;
        padding: 0 1rem;
        /* Centre son contenu (titre + dropdown) */
        display: flex;
        flex-direction: column;
        align-items: center;
        box-sizing: border-box;
    }
    /* Liens principaux */
    .nav-item {
        font-size: 1.5rem;
        padding: 1rem 0;
        display: block;
        color: var(--text-color);
        text-decoration: none;
        cursor: pointer;
        width: 100%;
    }

    .dropdown-menu {
      position: static !important;         /* reste dans le flux mobile */
      left: auto !important;               /* annule left:50% du desktop */
      top: auto !important;                /* annule top si présent */
      transform: none !important;          /* annule translateX(-50%) du desktop */
      width: auto;                          /* ne prend pas 100% */
      max-width: 320px;                     /* largeur de la boîte (Option A) */
      margin: 0.5rem auto 0;                /* centre la boîte horizontalement */
      padding: 1rem;
      box-shadow: none;
      border-radius: 6px;
      text-align: center;
      box-sizing: border-box;
    }

    /* Affiche le sous-menu si l'onglet est actif */
    .dropdown-container.active .dropdown-menu {
        display: block;
    }
    /* Chevron (flèche) */
    .chevron {
        display: inline-block;
        transition: transform 0.3s;
    }
    .dropdown-container.active .chevron {
        transform: rotate(180deg);
    }
    /* Centrage du contenu */
    .hero-content {
        flex-direction: column;
        align-items: center;
        justify-content: center;
        text-align: center;
        gap: 1rem;
    }
    .title-wrapper {
        display: flex;
        flex-direction: column;
        align-items: center;
        text-align: center;
        width: 100%;
        margin-left: 0;
    }
    .word-envergure {
        font-size: 2.5rem;
        display: block;
        text-align: center;
    }
    .word-technologie {
        font-size: 1.8rem;
        letter-spacing: 3px;
        margin-left: 0;
        align-self: center;
        width: auto;
        text-align: center;
    }
    .bbr-line {
        width: 75%;
        height: 1.7px;
        margin-top: 10px;
    }

    /* Centre les titres des onglets */
    .nav-item {
        text-align: center;
        width: 100%;
    }
}
