/* ------------------ FONTS ------------------ */
@import url('https://fonts.googleapis.com/css2?family=Lato:wght@300;400;700&display=swap');

/* ------------------ RESET ------------------ */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Lato', sans-serif;
    background: #f0f0f0;
    color: #333;
    display: flex;
    flex-direction: column;
    min-height: 100vh;
    position: relative;
}

/* ------------------ LAYOUT ------------------ */
.page {
    padding: 2em;
}

main {
    flex: 1;
    padding: 20px;
}

/* ------------------ HEADER ------------------ */
header {
    background: linear-gradient(135deg, darkgreen 0%, #003d00 100%);
    color: white;
    text-align: center;
    padding: 1em;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
}
.user-info {
    display: flex;
    align-items: center; /* Centre verticalement */
}

.hautpage {
    display: flex;
    justify-content: space-between;
    align-items: center;
    max-width: 1200px;
    margin: 0 auto;
    flex-wrap: wrap;
    gap: 1em;
}

header h1 {
    font-size: 2.5em;
    font-weight: 700;
    color: #e0f2f1;
}

header h3 {
    font-size: 1.2em;
    font-weight: 400;
    font-style: italic;
    color: #e0f2f1;
    margin-top: 0.3em;
}

/* ------------------ NAVIGATION ------------------ */
#main-menu {
    margin-top: 1em;
}

#main-menu-links {
    display: flex;
    justify-content: center;
    gap: 1.5em;
    list-style: none;
    padding: 0;
}

#main-menu-links a {
    padding: 0.8em 1.5em;
    background-color: rgba(255, 255, 255, 0.15);
    border-radius: 25px;
    color: white;
    text-decoration: none;
    font-size: 1em;
    font-weight: 600;
    cursor: pointer; /* ✅ Curseur visible */
    transition: background-color 0.3s ease, transform 0.3s ease;
}

#main-menu-links a:hover {
    background-color: rgba(255, 255, 255, 0.3);
    transform: translateY(-2px);
}

.burger-menu {
    display: none;
    font-size: 2em;
    cursor: pointer;
    color: white;
}

/* ------------------ SECTIONS ------------------ */
section {
    margin: 2vh;
    padding: 2vh;
    background-color: white;
    border-radius: 8px;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
}

h1 {
    color: #003d00;
}

h2 {
    color: #003d00;
    text-align: left;
    margin: 2vh 0;
}

h3 {
    font-size: 1.2em;
    font-style: italic;
    color: #003d00;
}

p {
    word-break: break-word;
    margin: 1vh 0;
    line-height: 1.8;
    color: #333;
}

/* ------------------ LISTES ------------------ */
.no-bullets {
    list-style-type: none;
    padding-left: 0;
    margin: 0;
    color: white;
}

.no-bullets li {
    margin-bottom: 0.5em;
}

/* ------------------ IMAGES ------------------ */
#Photo_profil {
    width: 50vh;
    height: auto;
    flex: 2;
    border-radius: 50%;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2);
    transition: transform 0.3s;
}

#Photo_profil:hover {
    transform: scale(1.05);
}

#LogoENS,
#LogoENSbis {
    width: 12vh;
    height: auto;
}

#LogoENSbis {
    visibility: hidden;
}

#Linkedin {
    width: 5em;
    height: auto;
}

#phone {
    width: 3vh;
    height: auto;
}

/* ------------------ CONTAINERS ------------------ */
.container {
    display: flex;
    align-items: center;
    gap: 2vh;
}

.photo {
    flex: 1;
    padding: 2vh;
}

.corps {
    flex: 2;
}

#description {
    flex: 3;
    font-size: 1.5em;
}

#texte_haut {
    display: flex;
    justify-content: center;
    color: #003d00;
    font-weight: bold;
    font-size: 1.2em;
}

/* ------------------ CONTACT ------------------ */
.contact ul {
    list-style: none;
    margin: 1em;
    padding: 0;
    display: flex;
    align-items: center;
    gap: 10em;
}

.contact li {
    display: flex;
    align-items: center;
    gap: 1em;
}

.contact a {
    color: white;
    text-decoration: none;
    transition: color 0.3s;
}

.contact a:hover {
    color: #e0f2f1;
}

.contact2 {
    visibility: hidden;
}

/* ------------------ FOOTER ------------------ */
footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: linear-gradient(135deg, darkgreen 0%, #003d00 100%);
    color: white;
    font-size: 20px;
    padding: 1em;
    height: auto;
    flex-wrap: wrap;
}

footer p,
footer a {
    color: white; /* ✅ Liens footer en blanc */
    text-decoration: none;
}

footer a:hover {
    color: #e0f2f1;
}

/* ------------------ LOGIN ------------------ */
.login-container {
    position: relative;
    display: inline-block;
}

.login-button,
.register-button {
    background-color: rgba(255, 255, 255, 0.15);
    color: white;
    border: none;
    padding: 0.8em 1.5em;
    border-radius: 25px;
    font-size: 1em;
    font-weight: 600;
    cursor: pointer;
    transition: background-color 0.3s ease;
}

.login-button:hover,
.register-button:hover {
    background-color: #004d00;
}

.login-form {
    display: none;
    position: absolute;
    top: 100%;
    right: 0;
    background: white;
    border-radius: 8px;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2);
    padding: 1em;
    width: 250px;
    z-index: 1000;
}

.login-form form {
    display: flex;
    flex-direction: column;
}

.login-form label {
    margin-bottom: 0.5em;
    color: #003d00;
}

.login-form input {
    margin-bottom: 1em;
    padding: 0.5em;
    border: 1px solid #ccc;
    border-radius: 4px;
}

.login-form button {
    padding: 0.5em;
    border: none;
    border-radius: 4px;
    color: white;
    background-color: #003d00;
    cursor: pointer;
    transition: background-color 0.3s ease;
}

.login-form button:hover {
    background-color: #004d00;
}

.close-button {
    background-color: #d9534f;
}

.close-button:hover {
    background-color: #c9302c;
}

/* ------------------ RESPONSIVE ------------------ */
/* Tablettes */
@media (max-width: 1024px) {
    .hautpage {
        flex-direction: column;
        text-align: center;
    }

    #Photo_profil {
        width: 35vh;
    }

    .container {
        flex-direction: column;
        text-align: center;
    }

    #description {
        font-size: 1.2em;
    }

    .contact ul {
        gap: 3em;
    }
}

/* Smartphones */
@media (max-width: 768px) {

    header h1 {
        font-size: 1.8em;
    }

    header h3 {
        font-size: 1em;
    }

    .page {
        padding: 1em;
    }

    #Photo_profil {
        width: 25vh;
    }

    .container {
        flex-direction: column;
        gap: 1em;
    }

    #description {
        font-size: 1em;
    }

   #main-menu-links {
    display: none;
    flex-direction: column;
    align-items: stretch;
    gap: 0.5em;
    width: 90%;
    margin: 0 auto;
    padding: 1em;
    background: rgba(0, 61, 0, 0.95); /* fond vert sombre semi-opaque */
    position: absolute;
    top: 70px; /* ajustable selon la hauteur du header */
    left: 5%;
    border-radius: 12px;
    box-shadow: 0 8px 16px rgba(0, 0, 0, 0.25);
    z-index: 1000;
    opacity: 0;
    transform: translateY(-10px);
    transition: all 0.3s ease;
  }

  #main-menu-links.active {
    display: flex;
    opacity: 1;
    transform: translateY(0);
  }

  #main-menu-links li {
    width: 100%;
  }

  #main-menu-links li a {
    display: block;
    width: 100%;
    text-align: center;
    padding: 1em;
    background: rgba(255, 255, 255, 0.1);
    color: #e0f2f1;
    font-size: 1.1em;
    font-weight: 600;
    border-radius: 8px;
    transition: background-color 0.2s ease, transform 0.2s ease;
    text-decoration: none;
  }

  #main-menu-links li a:hover {
    background-color: rgba(255, 255, 255, 0.25);
    transform: scale(1.02);
  }

    .burger-menu {
        display: block;
    }

    .contact ul {
        flex-direction: column;
        gap: 1em;
    }

    footer {
        flex-direction: column;
        text-align: center;
        gap: 1em;
    }
}
@media (min-width: 769px) {
    #main-menu-links {
        display: flex !important;
    }
}

@media (max-width: 768px) {
    #main-menu-links {
        display: none;
        flex-direction: column;
    }

    #main-menu-links.active {
        display: flex;
    }

    .burger-menu {
        display: block;
    }
}

#main-menu-links a {
    cursor: pointer;
}
/* ------------------ RESPONSIVE MENU ------------------ */

/* Par défaut sur mobile, le menu est caché */
@media (max-width: 768px) {
    .burger-menu {
        display: block;
        font-size: 2em;
        color: white;
        cursor: pointer;
        position: absolute;
        top: 1em;
        right: 1em;
        z-index: 1001;
    }

    #main-menu-links {
        display: none;
        flex-direction: column;
        align-items: center;
        gap: 1em;
        background: linear-gradient(135deg, darkgreen 0%, #003d00 100%);
        position: absolute;
        top: 60px; /* ajuste selon ton header */
        right: 0;
        width: 100%;
        padding: 1em 0;
        z-index: 1000;
        border-radius: 0 0 8px 8px;
    }

    #main-menu-links.active {
        display: flex;
    }

    #main-menu-links li a {
        display: block;
        width: 80%;
        padding: 1em;
        background-color: rgba(255, 255, 255, 0.2);
        border-radius: 10px;
        color: white;
        font-size: 1.2em;
        text-align: center;
    }

    #main-menu-links li a:hover {
        background-color: rgba(255, 255, 255, 0.3);
    }
}

/* Desktop version */
@media (min-width: 769px) {
    .burger-menu {
        display: none;
    }

    #main-menu-links {
        display: flex !important;
        flex-direction: row;
        justify-content: center;
        gap: 1.5em;
    }
}
