@keyframes spin {
    0% {
        transform: rotate(0deg);
    }
    100% {
        transform: rotate(360deg);
    }
}

.spin {
    animation: spin 2s linear infinite;
}
body::before {
    content: "";
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    pointer-events: none;
    z-index: -1;
    opacity: 0;
    transition: opacity 0.7s cubic-bezier(.4,1.6,.6,1);
    background-image: linear-gradient(180deg, var(--bg4) 0%, var(--bg5) 55%, var(--bg4) 100%);
    background-color: var(--bg4);
}

.body-alt-bg::before {
    opacity: 1;
}

.navbar.scrolled-bg {
    background: #f6dd71ec !important;
    transition: background 0.7s cubic-bezier(.4,1.6,.6,1);
}
:root {
    --bg1: #c2af59;
    --bg2: #a278ad;
       --bg4: #f6dd71;
    --bg5: #e5adf3;
    --txt: #000000;
    --bg3: #278e9c57;
    --navbar-height: 64px;
  


}



body {
    margin: 0;
    padding: 0;
    font-family: "Inter", system-ui, -apple-system, "Segoe UI", Roboto, Arial, sans-serif;
    background-image: linear-gradient(180deg, var(--bg1) 0%, var(--bg2) 55%, var(--bg1) 100%);
    background-color: var(--bg1);
    /* ✅ Fond uniforme */
    color: var(--txt);
    line-height: 1.6;
    transition: all 0.3s ease;
    transition: background-image 0.7s cubic-bezier(.4,1.6,.6,1), background-color 0.7s cubic-bezier(.4,1.6,.6,1);
}

@font-face {
    font-family: 'Gliker';
    src: local('Gliker Regular'), local('Gliker-Regular'),
        url('Gliker-Regular.woff2') format('woff2'),
        url('Gliker-Regular.woff') format('woff'),
        url('Gliker-Regular.ttf') format('truetype');
    font-weight: 400;
    font-style: normal;
  }

.simple-separator {
    height: 0.5px;
    /* Épaisseur de la barre */
    background-color: #15849fd4;
    /* Couleur grise neutre et unie */
    margin: 50px auto;
    /* 50px de marge verticale, 'auto' pour centrer horizontalement */
    width: 90%;
    /* La barre prendra 70% de la largeur de la page */
    max-width: 1200px;
    /* Empêche la barre d'être trop large sur de très grands écrans */
    min-width: 200px;
    /* Empêche la barre d'être trop petite sur de petits écrans */
    border-radius: 2px;
    /* Un léger arrondi aux coins */
    /* J'ai retiré toutes les propriétés liées au texte, dégradé, flexbox, et ombre prononcée. */
}


/* ===== NAVBAR ===== */



.navbar:hover {
    box-shadow: 0 0 10px rgba(0, 0, 0, 0.567);
}

.navbar.scrolled {
    background: #c2af59ec;
    backdrop-filter: blur(30px);
    box-shadow: 0 0 50px rgba(0, 0, 0, 0.567);
    border-top-left-radius: 0;
    /* Coin supérieur gauche */
    border-top-right-radius: 0;
    /* Coin supérieur droit */
    border-bottom-left-radius: 25px;
    /* Coin inférieur gauche arrondi */
    border-bottom-right-radius: 25px;
    transition: background 0.7s cubic-bezier(.4,1.6,.6,1), box-shadow 0.7s cubic-bezier(.4,1.6,.6,1);
}

.navbar.scrolled:hover {
    background-color: #fff5cf;
    box-shadow: 0 0 20px rgba(0, 0, 0, 0.567);
    border-bottom-left-radius: 15px;
    /* Coin inférieur gauche arrondi */
    border-bottom-right-radius: 15px;
}

.navbar nav {
    display: flex;
    justify-content: space-between;
    align-items: center;
    height: var(--navbar-height);
    min-height: var(--navbar-height);
    padding: 0 24px;
    box-sizing: border-box;
}

.navbar .logo img {
    height: 50px;
    width: auto;
    user-select: none;
    display: block;
    margin: 0;
    
}



.navbar ul li {
    display: flex;
    align-items: center;
    height: var(--navbar-height);
}

.navbar ul li a {
    text-decoration: none;
    color: var(--txt);
    font-family: 'Poppins', sans-serif;
    font-weight: 500;
    transition: 0.3s;
    display: flex;
    align-items: center;
    height: 100%;
}

.navbar ul li a:hover {
    opacity: 0.7;
}

.auth-buttons {
    display: flex;
    align-items: center;
    gap: 10px;
}

.nav-auth-link {
    text-decoration: none;
    color: var(--txt);
    border: 1px solid var(--txt);
    border-radius: 999px;
    padding: 6px 12px;
    font-family: 'Poppins', sans-serif;
    font-weight: 500;
    line-height: 1;
    transition: 0.25s;
}

.nav-auth-link:hover {
    background: rgba(255, 255, 255, 0.2);
    opacity: 1;
}


/* Hamburger menu caché par défaut sur desktop */
.navbar .menu-toggle {
    display: none;
    font-size: 1.8em;
    background: none;
    border: none;
    color: var(--txt);
    cursor: pointer;
    z-index: 1100;
    margin-left: 10px;
    margin-right: 10px;
    transition: color 0.2s;
}
.navbar .menu-toggle:focus {
    outline: 2px solid var(--bg2);
}

/* Responsive : menu hamburger visible sur mobile */


.profile-container {
    position: relative;
    list-style: none;
    margin-left: 15px;
    display: flex;
    align-items: center;
    height: var(--navbar-height);
}

.profile-pic {
    width: 34px;
    height: 34px;
    border-radius: 50%;
    object-fit: cover;
    cursor: pointer;
    border: 2px solid rgba(255,255,255,0.2);
    transition: 0.2s;
}


.profile-dropdown {
    position: absolute;
    right: 0;
    top: 44px;
    background: #ffffffc8;
    border: 1px solid #24314f;
    border-radius: 12px;
    display: none;
    flex-direction: column;
    min-width: 160px;
    overflow: hidden;
    box-shadow: 0 15px 40px rgba(0,0,0,0.4);
}

.profile-dropdown a,
.profile-dropdown button {
    padding: 10px 14px;
    text-align: left;
    background: none;
    border: none;
    color: #ff4036;
    text-decoration: none;
    cursor: pointer;
    font-size: 14px;
}

.profile-dropdown a:hover,
.profile-dropdown button:hover {
    background: rgba(124,92,255,0.2);
}


main {
    max-width: 900px;
    margin: 60px auto;
    padding: 0 20px;
    text-align: center;
}

h2 {
    font-size: 1.8em;
    margin-bottom: 20px;
    margin-top: 80px;
}

.row {
    display: flex;
    justify-content: center;
    gap: 20px;
    /* espace entre les boutons */
    margin-bottom: 30px;
    /* espace avec le bouton voir plus */
}

.btn {
    background-color: var(--txt);
    border: 2px solid #e780aa;
    color: var(--bg2);
    border: none;
    padding: 12px 24px;
    font-size: 18px;
    border-radius: 50px;
    cursor: pointer;
    transition: all 0.8s;
    box-shadow: 0 0 10px transparent;
    min-width: 150px;
    align-items: center;
    margin-top: 80px;
}

.btn:hover {
    background-color: var(--text-color-btn);
    box-shadow: 0 0 15px var(--txt);
    border: 2px solid var(--txt);
    transform: translateY(-2px);
    color: #ffffff;
    align-items: center;
}

h3 {
    font-size: 1.4em;
    margin-bottom: 15px;
    text-align: left;
}

p {
    font-size: 1.0em;
    text-align: left;
}

.p2 {
    margin-top: 20px;
    font-size: 1.0em;
}

.p3 {
    font-size: 1.0em;
    text-align: left;
    margin-left: 70px;
}

.p4 {
    font-size: 0.7em;
    text-align: left;
}

.intro {
    font-size: 1.1rem;
    margin-bottom: 40px;
}

footer {
    margin-top: 60px;
    background: rgba(0, 0, 0, 0.05);
    padding: 20px;
    text-align: center;
    font-size: 0.9rem;
}

h1 {
    font-size: 1.9em;
    margin-bottom: 20px;
    text-align: left;
    margin-top: 60px;
}

.code {
    color: #1c8000;
    font-size: 1.2em;
    text-align: left;
}

.code1 {
    font-size: 1.2em;
    margin-bottom: 20px;
    text-align: left;
    color: #1c8000;
}

.code3 {
    margin-bottom: 20px;
    text-align: left;
    color: #1c8000;
    margin-left: 25px;
}

.tips {
    font-size: 1.1em;
    text-align: left;
    margin-bottom: 20px;
    margin-top: 50px;
}

.tips-titre {
    font-size: 1.5em;
    text-align: left;
    margin-bottom: 20px;
    margin-top: 50px;
}

.code code {
    color: #38761d;
    /* Une nuance de vert pour le texte du code */
    font-family: 'Consolas', 'Monaco', monospace;
    /* Utiliser une police de code */
    /* Espacement de ligne pour la lisibilité */
    /* S'assure que le contenu prend tout l'espace */
}

.titre-m-g {
    font-size: 1.0em;
    margin-bottom: 20px;
    text-align: left;
    margin-top: 65px;
}

.quatre-balise {
    font-size: 1.2em;
    text-align: left;
    color: #1c8000;
}

.quatre-explication {
    margin-top: 0%;
    margin-bottom: 45px;
}

li {
    text-align: left;
}

.glow-line {
    top: 0;
    left: 0;
    width: 100%;
    height: 1px;
    background: linear-gradient(90deg, #ff00cc, #3333ff, #00ffcc, #ffcc00, #ff00cc);
    z-index: 9999;
}

.glow-line::after {
    content: "";
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 35px;
    background: inherit;
    filter: blur(15px);
    opacity: 0.9;
    pointer-events: none;
}

.titre-ia {
    font-size: 80pt;
    margin-bottom: 20px;
    margin-top: 120px;
    text-align: center;
    margin-top: 60px;
    font-family: 'Gliker', sans-serif;
}

.titre-ia .a {
    color: #fbde59;
}

.titre-ia .b {
    color: #e2a9f1;
}

/* ===== LE SEUL ET UNIQUE MEDIA QUERY MOBILE ===== */
@media (max-width: 900px) {
    .navbar {
        height: var(--navbar-height) !important;
        display: flex;
        align-items: center;
    }

    .navbar {
        display: block !important;
        position: relative;
        z-index: 3001;
        background: none;
        border: none;
        font-size: 2.2rem;
        color: var(--txt);
        cursor: pointer;
    }

    .navbar ul.active {
        display: flex;
    }

    

   .navbar ul {
        display: none; /* Caché par défaut en mobile */
        flex-direction: column;
        position: fixed;
        top: 0;
        left: 0;
        width: 100%;
        height: 100vh;
        background: var(--bg4); /* Couleur pleine pour le menu */
        justify-content: center;
        align-items: center;
        z-index: 3000;
    }

   

    .navbar ul li {
        width: auto;
        margin: 15px 0;
    }

    .navbar ul li a {
        font-size: 2.2rem;
        font-family: 'Gliker', sans-serif;
        padding: 10px 0;
        display: block;
    }

    /* On s'assure que le premier lien ne soit pas caché par la navbar fixe */
    .navbar ul li:first-child {
        margin-top: 60px;
    }

    .profile-container, .auth-buttons {
        margin-left: 0 !important;
        margin-top: 20px;
        flex-direction: column;
        align-items: flex-start !important;
    }

    .profile-dropdown {
        position: static;
        background: transparent;
        border: none;
        box-shadow: none;
        display: block !important;
    }

    .profile-container {
        z-index: 3002;
    }

    .profile-pic {
        width: 40px;
        height: 40px;
    }

 
 
    #nav-links li {
        margin: 20px 0;
    }

    #nav-links li a {
        font-size: 2rem;
        font-family: 'Gliker', sans-serif;
    }

    .auth-buttons-desktop {
        display: none !important; /* On cache l'auth desktop sur mobile */
    }
}

.navbar {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: var(--navbar-height);
    background: transparent;
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    z-index: 2000;
    transition: 0.5s all;
}

.nav-container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 24px;
    height: 100%;
}

.nav-right {
    display: flex;
    align-items: center;
    gap: 15px;
}
/* Fix pour éviter que la liste déborde sur PC */
.navbar ul {
    display: flex;
    gap: 25px;
    margin: 0;
    padding: 0;
    list-style: none;
}
.profile-container {
    position: relative;
    display: flex;
    align-items: center;
}

@media (max-width: 900px) {
    #nav-links {
        display: flex !important;
        flex-direction: column;
        justify-content: center;
        align-items: center;
        position: fixed;
        inset: 0;
        width: 100vw;
        height: 100vh;
        background: var(--bg4);
        z-index: 4000;

        /* --- L'ANIMATION DE FERMETURE --- */
        /* On définit le point de départ (un cercle de 0% en haut à droite) */
        clip-path: circle(0% at 90% 5%);
        /* La transition s'applique ici pour le RETOUR (fermeture) */
        transition: clip-path 0.6s cubic-bezier(0.65, 0, 0.35, 1), opacity 0.4s;
        
        opacity: 0;
        pointer-events: none;
        visibility: hidden;
    }

    #nav-links.active {
        /* --- L'ANIMATION D'OUVERTURE --- */
        visibility: visible;
        opacity: 1;
        /* Le cercle s'agrandit */
        clip-path: circle(150% at 90% 5%);
        pointer-events: all;
        /* Optionnel : tu peux mettre une transition différente à l'aller si tu veux */
    }

   .menu-toggle {
        display: block !important;
        position: relative;
        z-index: 5000 !important;
        background: none;
        border: none;
        
        /* On réduit ici : 1.8rem au lieu de 2.5rem */
        font-size: 1rem; 
        
        /* On ajuste l'espacement pour que la zone de clic reste bonne */
        padding: 5px 10px;
        cursor: pointer;
        color: var(--txt);
        
        /* Transition douce pour le changement burger/croix */
        transition: transform 0.3s ease, color 0.3s ease;
    }

    /* Optionnel : petit effet au clic */
    .menu-toggle:active {
        transform: scale(0.9);
    }
}

