:root {
    --white-smoke: #F2F4F3;
    --dark_white-smoke: #d3d3d3;
    --light_white-smoke: #ffffff;

    --pistachio: #89CF63;   
    --light_pistachio: #a0ff6c;

    --night: #0A0908;
    --light-night: #191b1b;
    --dark-night: #0f0f0f;
    
    --maron-doré: rgb(173, 151, 24);

    --dark-light-beige: #e7cfc1;
    --beige: #EAE0D5;
    --beige-doré: #C6AC8E;
    --beige-doré-plus-foncé: #c6ac8ec4;
    --brun: #5E503F;
    --dark-brun: #362f25;

    --gunmetal: #22333B;
    --light_gunmetal: #13abe7;
    --extreme_light_gunmetal: #6bb6d1;

    --purple-blue: #1d1f32;
}


/* =========================
   THEME : MODE SOMBRE
   ========================= */
.night-mode {
    --bg-color: var(--light-night);
    --Menu-bg-color: var(--dark-night);
    --Light-menu-bg-color:var(--dark-night);
    --text-color: var(--white-smoke);
    --header-bg: var(--light-night);
    --header-text: var(--light-night);
    --link-color: var(--white-smoke);
    --link-hover: var(--extreme_light_gunmetal);
    --btn-bg: var(--GUI-background-light);
}

/* ==============================
   STYLE COMMUNS À TOUTES LES PAGES
   ============================== */

/* Fond général + couleur de texte */
body {
    background-color: var(--bg-color);
    color: var(--text-color);
    font-family: 'Gill Sans', 'Gill Sans MT', Calibri, 'Trebuchet MS', sans-serif;
    margin: 0;
    padding: 0;
    position: relative;
    z-index: 1;
}

/* Ajout du fond à points blancs sur toutes les pages */
body::before {
    content: "";
    position: fixed;
    z-index: 0;
    top: 0; left: 0; right: 0; bottom: 0;
    pointer-events: none;
    width: 100vw;
    height: 100vh;
    /* Génère un motif de points blancs espacés */
    background-image: 
        radial-gradient(rgba(255,255,255,0.18) 1.2px, transparent 1.2px),
        radial-gradient(rgba(255,255,255,0.10) 1.2px, transparent 1.2px);
    background-size: 32px 32px, 64px 64px;
    background-position: 0 0, 16px 16px;
    opacity: 0.45;
}

/* Boutons d'activation des thèmes */
#dark-btn, #light-btn {
    top: 1.5rem;
    right: 1rem;
    width: 4.5%;
    height: auto;
    cursor: pointer;
    position: absolute;
    transform: translateY(-55%);
    z-index: 100;
}

/* Cache un bouton quand l'autre est actif */
.hidden {
    display: none;
}

/* Header commun */
header {
    background-color: var(--Menu-bg-color);
    padding: 1.5rem;
    position: relative;
    z-index: 10;
    display: flex;
    align-items: center;
}

/* Barre menu + nom aligné proprement */
h1 {
    display: flex;
    align-items: center;
    width: 100%;
    margin: 0;
    position: relative;
}

h1 a:hover {
    color: var(--dark-light-beige);
}

/* Modification de la nav-links pour centrer les liens */
.nav-links {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 2rem;
    margin: 0 auto;
    width: 50%;  /* Ajustez cette valeur selon vos besoins */
    z-index: 1000000;
}

.nav-links a {
    color: var(--white-smoke);
    font-family:  'Gill Sans', 'Gill Sans MT', Calibri, 'Trebuchet MS', sans-serif;
    font-style: inherit;
    text-decoration: none;
    position: relative;
    z-index: 1000000;
    white-space: nowrap; /* keep “À propos” from wrapping */
}

/* Style des liens de navigation - Modifié pour exclure spécifiquement le lien Calculator */
.nav-links a:not([href="Calculator.html"]) {
    position: relative;
    transition: color 0.3s ease;
}

.nav-links a:not([href="Calculator.html"])::after {
    content: '';
    position: absolute;
    width: 60%;
    height: 2px;
    bottom: -4px;
    left: 20%;
    background-color: var(--beige-doré);
    transform: scaleX(0);
    transform-origin: right;
    transition: transform 0.3s ease;
}

.nav-links a:not([href="Calculator.html"]):hover {
    color: var(--beige-doré);
}

.nav-links a:not([href="Calculator.html"]):hover::after {
    transform: scaleX(1);
    transform-origin: left;
}

/* Style spécifique pour le lien Calculator */
.nav-links a[href="Calculator.html"] {
    transition: none;
    background: none;
}

.nav-links a[href="Calculator.html"]:hover {
    background: none;
    color: inherit;
}

.nav-links a[href="Calculator.html"]::after {
    display: none;
}

/* Retire l'effet de transition pour le lien contenant la calculatrice */
.nav-links a[href="Calculator.html"] {
    transition: none;
}

/* Retire tous les effets de hover hérités pour le lien de la calculatrice */
.nav-links a[href="Calculator.html"]:hover {
    background: none;
    color: inherit;
}

/* Style de la calculatrice */
.Image-Calculator {
    margin-left: 77%;
    margin-top: -11.5rem;
    width: 3.3rem;
    height: 3rem;
    cursor: pointer;
    display: block;
    position: absolute;
    top: 10rem;
    right: -27rem;
}

.Image-Calculator::after {
    content: '';
    position: absolute;
    inset: -4px;
    border: 1.5px solid var(--beige-doré);
    border-radius: 6px;
    animation: none;
    opacity: 0;
}

.Image-Calculator:hover::after {
    opacity: 1;
    animation: borderDraw 0.6s ease forwards;
}

@keyframes borderDraw {
    from {
        clip-path: polygon(0 0, 0 0, 0 0);
    }
    to {
        clip-path: polygon(0 0, 100% 0, 100% 100%, 0 100%, 0 0);
    }
}

/* Nom SkillSphere */
.NameSite {
    color: var(--beige);
    position: absolute;
    left: 2rem;
    top: 50%;
    transform: translateY(-50%);
    text-align: left;
    font-size: 130%;
    transition: color 0.3s ease;
}

.NameSite::after {
    content: '';
    position: absolute;
    width: 100%;
    height: 2px;
    bottom: -4px;
    left: 0;
    background-color: var(--beige-doré);
    transform: scaleX(0);
    transform-origin: right;
    transition: transform 0.3s ease;
}

.NameSite:hover::after {
    transform: scaleX(1);
    transform-origin: left;
}

/* Liens de navigation */
h1 a {
    color: var(--link-color);
    font-weight: 600;
    font-family: 'Gill Sans', 'Gill Sans MT', Calibri, 'Trebuchet MS', sans-serif;
    padding-inline: 30px;
    font-size: 25px;
    text-decoration: none;
}

/* Style commun des liens d'action */
.cta-link, .access-course-link {
    display: inline-flex;
    align-items: center;
    padding: 12px 24px;
    background-color: var(--beige-doré);
    color: var(--night);
    border-radius: 6px;
    font-weight: 600;
    transition: all 0.3s ease;
    text-decoration: none;
}

.cta-link:hover, .access-course-link:hover {
    background-color: var(--beige-doré-plus-foncé);
    transform: translateY(-2px);
}

/* Login */
.Login {
    padding: 8px 16px;
    background-color: transparent;
    color: var(--beige-doré);
    transition: all 0.3s ease;
    text-decoration: none;
}

.Login:hover {
    color: var(--night);
}

/* Bas de pages */
footer {
    text-align: center;
    padding: 20px 0;
    margin-top: 50px;
    border-top: 1px solid var(--beige-doré);
    color: var(--text-color);
    font-size: 0.9rem;
}
/* === NAVBAR RESPONSIVE (burger sans changer le style existant) === */

/* Bouton burger (checkbox) */
.nav-check{ display:none; }

/* Icône burger (label) */
.nav-toggle{
  display:none;                      /* visible seulement en mobile */
  width:42px; height:42px; cursor:pointer;
  position:absolute; right:14px; top:50%; transform:translateY(-50%);
  border:1px solid var(--beige-doré); border-radius:8px;
  align-items:center; justify-content:center; z-index:1001;
}
.nav-toggle span,
.nav-toggle span::before,
.nav-toggle span::after{
  content:""; display:block; width:22px; height:2px; background:var(--white-smoke);
  position:relative; transition:.25s ease;
}
.nav-toggle span::before{ position:absolute; top:-7px; }
.nav-toggle span::after{ position:absolute; top:7px; }

/* Desktop : on laisse tes styles en place */

/* Mobile / Tablette */
@media (max-width: 1620px){
  /* le burger apparaît */
  .nav-toggle{
    display:flex;
    margin-top: -15px;
    z-index: 1000000;
}

.lang-switch{
    margin-right: 34rem;
}
  /* le logo reste à gauche (évite l'absolute trop rigide) */
  .NameSite{ position:relative;
            left:auto;
            top: auto;
            transform:none;
            margin-right:auto;
        }

  /* panneau déroulant pour les liens */
  .nav-links{
    position: fixed; left:0; right:0; top:64px;
    background: var(--Light-menu-bg-color);
    border-top: 1px solid var(--beige-doré);
    display:flex; flex-direction:column; gap:0;
    padding : 8px 16px;
    max-height: 0; overflow:hidden; opacity:0; pointer-events:none;
    transition: max-height .3s ease, opacity .25s ease;
    width: 100%;
    text-align:center;
    z-index: 1000000;
    margin:0;                       /* ignore le width:50% desktop */
  }
    .nav-links a {
        font-size: clamp(2rem, 3.5vw, 2em);  /* min 1rem, max 1.8rem */
        line-height: 1.4;
        z-index: 1000000;
    }
  /* ouverture via la checkbox */
  .nav-check:checked ~ .nav-links{
    max-height: 70vh; opacity:1; pointer-events:auto;
    z-index: 1000000;
  }
  
    img.logo{
    height: 40px;
    margin-top: -18%;
    margin-bottom: 15%;
    margin-left: 80%;
    }

  /* burger -> croix */
  .nav-check:checked + .nav-toggle span{ background:transparent; }
  .nav-check:checked + .nav-toggle span::before{ top:0; transform:rotate(45deg); }
  .nav-check:checked + .nav-toggle span::after{ top:0; transform:rotate(-45deg); }

  /* options pour éviter le chevauchement d'éléments positionnés */
  .Image-Calculator{ display:none; }          /* évite l’icône absolue qui gêne le header */
  #dark-btn, #light-btn{ width:36px; right:64px; top:1.5rem; transform:none; }
}

/* Hauteur fixe du header pour l'ancrage du panneau */
header{ min-height:64px; position:relative; }

.logo{
  height: 40px;
  margin-top: 30%;
  margin-left: 390%;
}
/* =====================
   CORRECTION HEADER RESPONSIVE
   ===================== */

/* En mode mobile : on aligne logo + nom + burger */
@media (max-width: 1350px){
    .NameSite{
        margin-left: -23.2%;
    }

  header{
    display: flex;
    align-items: center;
    justify-content: space-between;  /* espace entre logo/noms et burger */
    padding: 0 1rem;                 /* marges horizontales équilibrées */
  }

  .NameSite{
    position: relative;
    margin-top: 25%;
    left: auto;
    top: auto;
    transform: none;
    font-size: 1.3rem; /* un peu plus petit en mobile */
    display: flex;
    align-items: center;
    gap: .5rem;
  }

    .logo {
    height: 20px;
    margin: 0;                /* supprime les marges énormes */
    transform: translateY(-11px);  /* ajuste la valeur (-4px, -6px, etc. selon ton besoin) */
    }


  /* on centre verticalement le burger */
  .nav-toggle{
    margin-left: auto;
  }
}

.lang-switch {
    position: absolute;
    top: 0rem;
    left: 27rem;
    right: -15rem;
    color: var(--white-smoke);
    text-decoration: none;
    font-weight: 500;
    transition: color 0.3s ease;
    z-index: 1000000;
    font-size: 20px;
}

@media (max-width: 1850px){
    .lang-switch {
        left: 20rem;
        font-size: 20px;
    }
}

@media (max-width: 1650px){
    .lang-switch {
        left: 17rem;
        font-size: 20px;
    }
}