/* Réinitialisation de base */
body, h1, p, ul, li, a {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

/* Style de base pour le body */
body {
    font-family: Arial, sans-serif;
    line-height: 1.6;
    font-size: 16px; /* 1rem = 16px par défaut */
    background: url('/images/aaa.jpeg') no-repeat center center/cover;
    background-attachment: fixed; /* Rend l'image de fond fixe */
    color: #333; /* Couleur de texte foncée pour un meilleur contraste */
    padding-top: 5rem; /* Ajustez cette valeur en fonction de la hauteur du header */
}

/* Style du header et du menu de navigation */
header {
    background-color: rgba(27, 83, 148, 0.8);
    padding: 1.5rem 0;
    text-align: center;
    position: fixed;
    top: 0;
    width: 100%;
    z-index: 1000; /* Assure que le header reste au-dessus des autres éléments */
}

header nav ul {
    list-style: none;
}

header nav ul li {
    display: inline-block;
    margin: 0 0.625rem; /* 10px -> 0.625rem */
    position: relative;
    transition: transform 0.3s ease-in-out, color 0.3s ease-in-out;
}

header nav ul li a {
    color: #f0f0f0; /* Blanc cassé pour le texte non survolé */
    text-decoration: none;
    font-weight: bold;
    font-size: 1rem;
    transition: color 0.3s ease-in-out;
}

header nav ul li:hover {
    transform: translateY(-3px); /* Légère élévation au survol */
}

header nav ul li a:hover {
    color: #00d9ff; /* Cyan clair pour le texte survolé */
}

header nav ul li::after {
    content: '';
    position: absolute;
    left: 0;
    right: 0;
    bottom: 0;
    height: 2px;
    background-color: #00d9ff; /* Ligne cyan clair */
    transform: scaleX(0);
    transform-origin: left;
    transition: transform 0.3s ease-in-out;
}

header nav ul li:hover::after {
    transform: scaleX(1); /* Animation de la ligne sous l'élément */
}

/* Style de base pour le menu */
#nav-links {
    display: flex;
    justify-content: center;
    transition: transform 0.3s ease-in-out;
}

#nav-links li {
    margin: 0 0.625rem; /* 10px -> 0.625rem */
}

/* Icône du menu hamburger - cachée par défaut */
.menu-icon {
    display: none;
    cursor: pointer;
    z-index: 1001;
    width: 30px;
    height: 30px;
    position: absolute;
    right: 1rem; /* Positionne l'icône à droite */
    top: 50%;
    transform: translateY(-50%); /* Centre verticalement l'icône dans le header */
    outline: none;
}

.menu-icon:focus {
    outline: 3px solid #00f0ff; /* Contour visible au focus */
    outline-offset: 2px;
}

.menu-bar {
    width: 25px;
    height: 3px;
    background-color: rgb(128, 19, 201);
    margin: 5px 0;
    transition: 0.3s;
}

/* Transformation pour la croix */
.menu-icon.active .menu-bar:nth-child(1) {
    transform: rotate(-45deg) translate(-5px, 5px);
}

.menu-icon.active .menu-bar:nth-child(2) {
    opacity: 0;
}

.menu-icon.active .menu-bar:nth-child(3) {
    transform: rotate(45deg) translate(-5px, -5px);
}

/* CALENDRIER */
.container-cal {
    width: 100%;
    max-width: 70rem; /* 900px en rem */
    margin: 0 auto;
    background-color: white;
    box-shadow: 0 0.625rem 1.25rem rgba(0, 0, 0, 0.1);
    border-radius: 1.25rem; /* 20px en rem */
    overflow: hidden;
}

.titre-cal {
    font-size: 2.5rem;
    color: #ffffff;
    text-align: center;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    padding: 1.25rem; /* 20px en rem */
    margin-bottom: 1.25rem;
    border-radius: 1.25rem 1.25rem 0 0;
    margin: 0;
    font-weight: bold;
}

.calendrier-title {
    font-size: 3rem;
    color: #ffffff;
    text-align: center;
    margin-top: 3.125rem;
}

.header-cal {
    background: linear-gradient(135deg, #9cabf0 0%, #bd92e7 100%);
    color: white;
    padding: 1.25rem;
    text-align: center;
    font-size: 1.5rem;
    font-weight: bold;
    position: relative;
    margin: 0;
}

.nav-buttons {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0.625rem 1.25rem;
    background-color: #f8f9fa;
}

.nav-buttons button {
    background-color: transparent;
    border: none;
    color: #667eea;
    font-size: 1.5rem;
    cursor: pointer;
    padding: 0.3125rem 0.625rem;
    transition: transform 0.2s ease;
}

.nav-buttons button:hover {
    transform: scale(1.1);
}

#calendar {
    width: 100%;
    border-collapse: collapse;
}

#calendar th {
    background-color: #f8f9fa;
    color: #667eea;
    font-weight: 600;
    padding: 0.75rem 0;
    font-size: 1rem;
}

#calendar td {
    border: 0.0625rem solid #aab2bb;
    padding: 0.1rem;
    text-align: center;
    vertical-align: top;
    height: 5rem; /* 45px en rem */
    transition: background-color 0.3s ease;
    position: relative;
}

#calendar td:hover {
    background-color: #0093D3;
    cursor: pointer;
}

.date {
    font-size: 1rem;
    margin-bottom: 0.25rem;
}

.event-indicator {
    position: absolute;
    bottom: 0.125rem;
    left: 50%;
    transform: translateX(-50%);
    font-size: 1.5625rem; /* 25px en rem */
    color: #667eea;
}

.today {
    background-color: #6aee50;
    font-weight: bold;
    color: #0a0a0a;
}

.other-month {
    color: #adb5bd;
}

#eventList {
    padding: 1.25rem;
    background-color: #f8f9fa;
    border-top: 0.0625rem solid #e9ecef;
}

#eventList h3 {
    margin: 0 0 1rem 0;
    color: #000000;
    font-size: 1.125rem;
}

#upcomingEvent {
    font-weight: 600;
    color: #667eea;
    font-size: 1rem;
}

#upcomingEvent p {
    margin-bottom: 0.75rem; /* Ajuster cet espace selon tes besoins */
}

/* STYLE POUR LE MODAL */
.modal {
    display: none;
    position: fixed;
    z-index: 1;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    overflow: auto;
    background-color: rgba(0, 0, 0, 0.4);
}

.modal-content {
    background-color: rgba(150, 191, 218, 1);
    margin: 15% auto;
    padding: 1.25rem;
    border-radius: 0.625rem;
    width: 50%;
}

.close {
    color: #1a1919;
    float: right;
    font-size: 1.75rem;
    font-weight: bold;
}

.close:hover,
.close:focus {
    color: black;
    text-decoration: none;
    cursor: pointer;
}

/* STYLE POUR LE FOOTER */
footer {
    background-color: #555554;
    color: #fff;
    padding: 0px 0;
    text-align: center;
    margin-top: 2rem;
}

.footer-content {
    display: flex;
    justify-content: space-around;
    align-items: center;
    flex-wrap: wrap;
}

.footer-section {
    margin: 10px;
}

.footer-section h3 {
    margin-bottom: 10px;
    font-size: 1.2em;
}

.footer-section p {
    margin: 0;
}

.social-icon {
    width: 30px;
    height: 30px;
}

.social-icon2 {
    width: 60px;
    height: 70px;
}

.footer-section a {
    color: #fff;
    text-decoration: none;
}

.footer-section a:hover {
    text-decoration: underline;
}

.footer-section p {
    margin-top: 15px;
    font-size: 0.9em;
}

/* Styles pour la popup */
.popup {
    display: none; /* Cachée par défaut */
    position: fixed;
    z-index: 1000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    overflow: auto;
    background-color: rgba(0, 0, 0, 0.5); /* Fond noir avec opacité */
}

.popup-content {
    background-color: #fff;
    margin: 10% auto;
    padding: 20px;
    border: 1px solid #888;
    width: 80%;
    max-width: 500px;
    border-radius: 10px;
    text-align: left;
    text-align: center;
}

.close-popup {
    color: #aaa;
    float: right;
    font-size: 28px;
    font-weight: bold;
}

.popup-content p {
    text-align: right;
    text-align: justify;
}

.close-popup:hover,
.close-popup:focus {
    color: #000;
    text-decoration: none;
    cursor: pointer;
}

/* Media Queries pour les tablettes et smartphones */
@media (max-width: 768px) {
    header {
        background-color: transparent; /* Rendre le header transparent */
    }

    .menu-icon {
        display: block;
    }

    #nav-links {
        display: none;
        flex-direction: column;
        align-items: center;
        background-color: rgba(0, 0, 0, 0.9);
        position: absolute;
        top: 3.75rem;
        right: 0;
        width: 100%;
        transform: translateY(-100%);
        top: 0rem; /* Ajustez cette valeur pour rapprocher le menu du haut */
    }

    #nav-links.active {
        display: flex;
        transform: translateY(0); /* Le menu apparaît du haut vers le bas */
    }

    #nav-links li {
        margin: 1.25rem 0;
    }

    #nav-links li a:focus, 
    #nav-links li a:hover {
        outline: 3px solid #00f0ff; /* Contour visible au focus */
        outline-offset: 2px;
    }

    .container-cal{
        width: 99%;
    }
}
