:root {
   background-color: #f1f5f9;
   scroll-behavior: smooth;
}

body {
   margin: 0;
}

/* ---------------------------------------------------------
   VERSION DESKTOP (Par défaut / Grands écrans)
   --------------------------------------------------------- */
main {
   margin-left: 250px;
   padding: 20px;
}

.navbar {
   display: flex;
   flex-direction: column;
   align-items: center;
   background: linear-gradient(0deg, rgb(19, 32, 75), rgb(53, 87, 199));
   width: 250px;
   height: 100vh;
   position: fixed;
   top: 0;
   left: 0;
   border-top-right-radius: 20px;
   border-bottom-right-radius: 20px;
   z-index: 1000;
}

/* Sur PC, les liens et le contact sont toujours visibles */
.nav-links {
   display: flex;
   flex-direction: column;
   gap: 20px;
   text-align: center;
   margin-top: 2em;
}

.navbar-header img {
    margin-top: 1em;
}

.nav-links a, 
.nav-links button {
   color: rgb(206, 206, 206);
   background: transparent;
   text-decoration: none;
   font-weight: bold;
   font-size: 20px;
   font-family: Arial, Helvetica, sans-serif;
   transition: all 0.3s ease-in-out;
   width: 200px;
   height: 50px;
   display: flex;
   align-items: center;
   justify-content: center;
   border: none;
   border-radius: 12px;
   cursor: pointer;
}

.nav-links a:hover, 
.nav-links button:hover {
   background-color: rgb(30, 50, 116);
   box-shadow: 3px 3px 5px rgba(0, 0, 0, 0.5);
}

.contact {
   display: flex;
   flex-direction: column;
   margin-top: auto;
   margin-bottom: 2em;
}

.contact a {
   color: rgb(206, 206, 206);
   text-decoration: none;
   font-weight: bold;
   font-size: 18px;
   font-family: Arial, Helvetica, sans-serif;
   transition: all 0.3s ease-in-out;
   width: 200px;
   height: 50px;
   display: flex;
   align-items: center;
   justify-content: center;
}

.contact a:hover {
   background-color: rgb(30, 50, 116);
   border-radius: 12px;
   box-shadow: 3px 3px 5px rgba(0, 0, 0, 0.5);
}

/* Le menu burger est masqué sur PC */
.burger-menu {
   display: none;
}


/* ---------------------------------------------------------
   VERSION MOBILE & TABLETTE (max-width: 900px)
   --------------------------------------------------------- */
@media screen and (max-width: 900px) {

    main {
        margin-left: 0 !important;
        padding: 10px !important;
        width: 100% !important;
        box-sizing: border-box !important;
    }

    /* Par défaut, le bouton burger est masqué sur PC, on l'affiche sur mobile */
    .burger-menu {
        display: flex !important;
        flex-direction: column;
        justify-content: space-around;
        width: 30px;
        height: 25px;
        background: transparent;
        border: none;
        cursor: pointer;
        padding: 0;
        z-index: 10001;
    }

    .burger-menu span {
        width: 100%;
        height: 3px;
        background-color: white;
        border-radius: 2px;
        transition: all 0.3s ease-in-out;
    }

    /* Animation de la croix quand le menu est ouvert */
    .burger-menu.open span:nth-child(1) {
        transform: translateY(8px) rotate(45deg);
    }
    .burger-menu.open span:nth-child(2) {
        opacity: 0;
    }
    .burger-menu.open span:nth-child(3) {
        transform: translateY(-8px) rotate(-45deg);
    }

    /* Transformation de la navbar en barre supérieure mobile */
    .navbar {
        width: 100%;
        height: auto;
        position: sticky;
        top: 0;
        border-radius: 0 0 15px 15px;
        flex-direction: column;
        padding: 10px 15px;
        box-sizing: border-box;
        z-index: 10000;
    }

    .navbar-header {
        display: flex;
        align-items: center;
        justify-content: space-between;
        width: 100%;
    }

    .navbar-header img {
        width: 120px !important;
        height: auto !important;
    }

    /* Masquer les liens par défaut sur mobile, ils s'ouvriront avec le burger */
    .nav-links, .contact {
        display: none;
        width: 100%;
        text-align: center;
        margin-top: 15px;
    }

    /* Quand on clique sur le burger, la classe .active les affiche */
    .nav-links.active, .contact.active {
        display: flex;
        flex-direction: column;
        align-items: center;
        gap: 10px;
    }

    .nav-links a, 
    .nav-links button,
    .contact a {
        width: 100% !important;
        max-width: 250px;
    }
}