
body {
    font-family: Arial, sans-serif;
    line-height: 1.6;
    margin: 20px;
}

/* --- STYLES DEMANDÉS POUR LES TITRES --- */
h2 {
    border: 2px solid #3498db; /* Bordure bleue */
    background-color: #eaf2f8; /* Fond bleu très clair */
    padding: 12px;
    border-radius: 8px; /* Coins arrondis */
    color: #2c3e50; /* Couleur de texte foncée */
    margin-top: 30px;
}

header {
    display: flex;
    align-items: flex-end;
    background-color: rgb(105, 64, 112);
    border-radius: 10px;
    padding: 1rem;
    position: relative; /* Nécessaire pour positionner le bouton */
}

/* Banniere */
.banniere-container {
    position: relative;
    width: 100%;
    height: 170px;
    overflow: hidden;
}

.banniere {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 170px;
    object-fit: cover;
    filter: blur(1px);
    z-index: -1;
}

.neon-title {
    position: absolute;
    top: 30%;
    left: 50%;
    transform: translate(-50%, -50%);
    font-size: 3rem;
    color: white;
    text-shadow: 0 0 10px rgb(217, 141, 217), 0 0 20px rgb(168, 73, 197), 0 0 30px rgb(59, 21, 66);
    text-align: center;
    z-index: -1;
}

/* NAVIGATION */
nav {
    max-width: 900px;
    margin: 0 auto;
    position: relative;
    z-index: 5;
}

nav ul {
    list-style: none;
    margin: 0;
    padding: 0;
}

nav > ul {
    display: flex;
    gap: 1rem;
    justify-content: center;
}

nav > ul > li {
    position: relative;
    background: rgba(213, 146, 234, 0.8);
    border: 2px solid #1d0a26;
    border-radius: 12px;
    padding: 1rem 1.5rem;
    box-shadow: 0 0 15px rgba(52, 28, 61, 0.5);
    transition: transform 0.3s, box-shadow 0.3s;
}

nav > ul > li:hover {
    transform: translateY(-5px);
    box-shadow: 0 0 25px rgba(65, 27, 72, 0.8);
}

nav a {
    color: #190523;
    text-decoration: none;
    font-weight: 500;
    display: block;
}

nav a:hover {
    color: #ffffff;
}

/* Sous-menus (1er niveau) */
nav > ul > li > ul {
    display: none;
    position: absolute;
    top: 100%;
    left: 0;
    background: rgba(25, 80, 160, 0.9);
    border: 1px solid #20b8f0;
    border-radius: 10px;
    z-index: 1000;
    padding: 0.5rem 0;
    min-width: 220px;
}

nav > ul > li:hover > ul {
    display: block;
}

nav ul li ul li {
    position: relative;
    padding: 0.5rem 1rem;
}

nav ul li ul li:hover {
    background: rgba(30, 100, 180, 0.5);
}

/* Sous-sous-menus */
nav ul li ul li ul {
    display: none;
    position: absolute;
    top: 0;
    left: 100%;
    background: rgba(20, 70, 160, 0.9);
    border: 1px solid #1eaaf0;
    border-radius: 8px;
    min-width: 200px;
    padding: 0.5rem 0;
}

nav ul li ul li:hover > ul {
    display: block;
}

nav ul li ul li ul li {
    padding: 0.5rem 1rem;
}

nav ul li ul li ul li:hover {
    background: rgba(40, 110, 200, 0.5);
}

/* Blocs de page */
aside {
    color: rgb(13, 12, 10);
    border: solid;
    width: 25%;
    font-family: 'Sedgwick Ave Display', cursive;
    background-color: #f0f0f0;
    padding: 20px;
    float: right;
    border-radius: 10px;
}

.Regroupe {
    border-radius: 10px;
    width: 60%;
    float: left;
    background-color: rgb(84, 49, 88);
    border: solid;
    padding: 10px;
}

.Projet {
    border-radius: 10px;
    width: 98.1%;
    float: left;
    background-color: rgb(150, 109, 159);
    border: solid;
    padding: 10px;
}

/* Modale */
.Mymodal {
    z-index: 2;
    display: none;
    background-color: rgb(148, 200, 210);
    border-style: solid;
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 80%;
    max-width: 600px;
}

.close {
    margin: 0;
    font-size: 35pt;
    float: right;
    top: 10px;
}

.close:hover,
.close:focus {
    color: rgb(244, 15, 15);
    text-decoration: none;
    cursor: pointer;
}

/* Formulaire stylisé */
.form-container {
    text-align: center;
    padding: 20px;
}

.styled-form {
    border: 1px solid #ccc;
    padding: 20px;
    border-radius: 10px;
    display: inline-block;
    text-align: left;
}

.styled-input {
    margin-bottom: 10px;
    width: 100%;
    box-sizing: border-box;
}

.styled-button {
    padding: 8px 16px;
    background-color: #4caf50;
    color: white;
    border: none;
    border-radius: 5px;
    cursor: pointer;
    transition: background-color 0.3s ease;
    margin-bottom: 10px;
}

.styled-button:hover {
    background-color: #45a049;
}

/* Carte */
.map-container {
    display: flex;
    flex-wrap: wrap;
    gap: 20px;
    justify-content: center;
}

.map-item {
    width: 100%;
    max-width: 600px;
    flex: 1 1 300px;
    border: 1px solid #ccc;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.map-item iframe {
    width: 100%;
    height: 300px;
    border: 0;
    display: block;
}

.map-caption {
    padding: 10px;
    background-color: #f5f5f5;
    font-weight: bold;
    text-align: center;
}

h2 {
    text-align: center;
    margin-bottom: 30px;
}

/* Bouton bien positionné */
.button {
    position: absolute;
    bottom: 10px;
    right: 10px;
    background-color: #43528f;
    color: white;
    border: none;
    border-radius: 12px;
    padding: 10px 20px;
    font-size: 16px;
    transition: background-color 0.3s ease;
    z-index: 1;
}

.button:hover {
    background-color: #52aeca;
}
/* MEDIA QUERIES - Responsive Design */

/* Tablettes et écrans moyens (≤ 900px) */
@media (max-width: 900px) {
    /* Réorganise le header en colonne pour éviter le débordement */
    header {
        flex-direction: column;
        align-items: center;
        gap: 1rem;
        
    }

    /* La navigation prend toute la largeur disponible */
    nav {
        width: 80%;
    }

    /* Les éléments du menu se replient sur plusieurs lignes */
    nav > ul {
        flex-wrap: wrap;
        justify-content: center;
        gap: 0.75rem;
        transform: translateX(-16px); /* décale vers la gauche */
    }

    /* Chaque élément de menu occupe environ 50% de la largeur */
    nav > ul > li {
        flex: 1 1 calc(50% - 1.5rem);
        min-width: 180px;
    }

    /* Réduit la taille du titre néon pour les écrans moyens */
    .neon-title {
        font-size: 2.4rem;
    }

    /* Les blocs latéraux passent en pleine largeur et s'empilent verticalement */
    .Regroupe,.Projet,
    aside {
        width: 94%;
        float: none;
        margin: 0 0 1.5rem;
    }
}

/* Smartphones et petits écrans (≤ 600px) */
@media (max-width: 600px) {
    /* Réduit le padding du header sur mobile */
    header {
        padding: 1rem 0.5rem;
    }

    /* Le menu principal devient une colonne verticale */
    nav > ul {
        flex-direction: column;
        align-items: stretch;
        gap: 0.5rem;
    }

    /* Chaque élément de menu prend toute la largeur */
    nav > ul > li {
        flex: 1 1 auto;
        width: 100%;
        padding: 0.75rem 1rem;
    }

    /* Les sous-menus passent en position statique (pas de survol flottant) */
    nav > ul > li > ul {
        position: static;
        width: 100%;
        min-width: auto;
        margin-top: 0.5rem;
    }

    /* Les sous-sous-menus également en position statique */
    nav ul li ul li ul {
        position: static;
        width: 100%;
        min-width: auto;
    }

    /* Ajuste la taille et la position du titre néon pour mobile */
    .neon-title {
        font-size: 2rem;
        top: 40%;
    }

    /* Réduit les marges entre les blocs sur mobile */
    .Regroupe,
    aside {
        margin: 0 0 1rem;
    }
}
