body {
    background-color: #f8f9fa;
    margin: 0;
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    color: #212529;
    font-size: 1.15rem;
}

.en-tete {
    background-image: url("./image/vue\ montmeyan.jpg");
    object-position: center 5%; 
    background-size: cover; 
    background-position: center; 
    background-repeat: no-repeat;
    min-height: 500px;
    vertical-align: middle;
    display: flex;
    flex-direction: column;
    padding-top: 148px;
    box-sizing: border-box;
}

nav {
    padding: 1.5rem 2rem;
    position: fixed;
    top: 0;
    left: 0;
    z-index: 1000;
    display: flex;
    align-items: center;
    box-sizing: border-box;
    width: 100%;
    background-color: transparent;
    transition: padding 0.3s ease, background-color 0.3s ease;
}

nav.scrolled {
    background-color: white;
    padding: 0.5rem 2rem;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
}

nav img {
    height: 100px;
    width: auto;
    margin-right: auto;
    transition: height 0.3s ease;
    background-color: rgba(255, 255, 255, 0.5);
}

nav.scrolled img {
    height: 70px;
}

.titre-bienvenue {
    flex: 1;
    display: flex;
    align-items: flex-end; 
    justify-content: center;
    padding-bottom: 3rem; 
}

.titre-bienvenue h1 {
    color: white;
    padding: 10px 20px;
    border-radius: 8px;
    margin: 0;
    font-size: 3rem;
}

ul.menu-principal {
    display: flex;
    align-items: center;
    list-style-type: none;
    margin: 0;
    padding: 0;
}

ul.menu-principal > li {
    position: relative;
    margin-left: 1.5rem;
}

nav a {
    background-color: #267267;
    color: white;
    text-decoration: none;
    padding: 1rem 1.5rem;
    border-radius: 5px;
    transition: background-color 0.3s, color 0.3s;
    font-size: 1.2rem;
    font-weight: 600;
    display: block;
    cursor: pointer;
}

nav a:hover, .active {
    background-color: white;
    color: #267267;
}

.sous-menu {
    display: none;
    position: absolute;
    background-color: #267267;
    list-style-type: none;
    padding: 0;
    margin: 0;
    border-radius: 5px;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2);
    min-width: 220px;
    z-index: 1001;
}

ul.menu-principal > li > .sous-menu {
    top: 100%;
    left: 0;
}

li:hover > .sous-menu {
    display: block;
}

.sous-menu li {
    position: relative;
}

.sous-menu a {
    border-radius: 0;
    padding: 0.8rem 1.2rem;
    font-size: 1.1rem;
    border-bottom: 1px solid rgba(255,255,255,0.1);
}

.sous-menu .sous-menu {
    display: none;
    position: absolute; 
    top: 0;             
    left: 100%;         
    background-color: #1e5a52;
}

.sous-menu li:hover > .sous-menu {
    display: block;
}

section {
    width: 100%;
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 3rem 0;
    min-height: 80vh;
}

h1, h2, h3 {
    text-align: center;
    width: 100%;
    margin: 1.5rem 0;
    box-sizing: border-box;
}

h1 {
    color: #3EBCAA;
    font-size: 2.8rem;
}

h2 {
    color: #212529;
    font-size: 1.8rem;
}

h3 {
    color: #267267;
    font-size: 1.5rem;
    margin-top: 2rem;
    margin-bottom: 1rem;
}

.carte-elu {
    background-color: #39AD9C;
    padding: 15px 10px;
    border-radius: 8px;
    box-shadow: 0 4px 8px rgba(0,0,0,0.1);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
}

.carte-elu p {
    margin: 0;
    font-weight: bold;
    color: #212529;
}

.carte-elu img {
    width: 200px;
    height: 200px;
    object-fit: cover; 
    object-position: center 40%; 
    margin-bottom: 15px;
    box-shadow: 0 2px 5px rgba(0,0,0,0.1);
}

.elu-centre {
    display: flex;
    justify-content: center;
    width: 100%;
    margin-bottom: 2rem;
}

.elu-centre .carte-elu {
    padding: 20px 40px;
    min-width: 250px;
}

.grille-elus {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 20px;
    width: 95%;
    max-width: 1200px;
    margin: 0 auto 3rem auto;
}

.grille-elus .carte-elu {
    flex: 0 0 calc(25% - 20px);
    box-sizing: border-box;
    min-height: 100px;
}

.section-accueil {
    color: #212529;
}

.btn, .btn-custom {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0.8rem 1.5rem;
    background-color: #005122;
    color: #fff;
    border: none;
    border-radius: 5px;
    font-weight: 600;
    cursor: pointer;
    text-decoration: none;
    transition: opacity 0.3s;
    font-size: 1.1rem;
}

.btn:hover, .btn-custom:hover {
    opacity: 0.8;
}

form {
    background-color: white;
    padding: 2.5rem;
    border-radius: 10px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1); 
    width: 90%;
    max-width: 450px; 
    display: flex;
    flex-direction: column;
    gap: 1.2rem;
    margin: 1rem auto;
}

form input {
    width: 100%;
    padding: 1rem;
    border: 1px solid #ced4da;
    border-radius: 5px;
    box-sizing: border-box; 
    font-size: 1.1rem;
}

.fin-de-page {
    font-size: 1.1rem;
    flex-direction: row;
    justify-content: space-between;
    align-items: flex-start;
    min-height: auto;
    padding: 3rem 5%;
    box-sizing: border-box;
    background-color: #267267;
    color: white;
}

.fin-de-page .left, 
.fin-de-page .middle, 
.fin-de-page .right {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center; 
    text-align: center;
    width: 100%;
}

.fin-de-page h2 {
    color: white;
    margin-bottom: 1.5rem;
    width: 100%;
}

.fin-de-page a {
    color: white;
    text-decoration: none;
    font-weight: bold;
    font-size: 1.2rem;
}

.fin-de-page .middle iframe {
    width: 100%;
    max-width: 380px;
    height: 250px;
    border-radius: 8px;
    margin: 1rem 0;
}

@media (max-width: 1000px) {
    .grille-elus .carte-elu {
        flex: 0 0 calc(33.333% - 20px);
    }
}

@media (max-width: 768px) {
    .grille-elus .carte-elu {
        flex: 0 0 calc(50% - 20px);
    }
    
    .fin-de-page {
        flex-direction: column;
        gap: 40px;
    }

    h1 { font-size: 2.2rem; }

    .sous-menu, .sous-menu .sous-menu {
        position: static;
        display: none;
        width: 100%;
        box-shadow: none;
    }

    li:hover > .sous-menu {
        display: block;
    }
}

@media (max-width: 480px) {
    .grille-elus .carte-elu {
        flex: 0 0 100%;
    }
}

.lien-social {
    display: inline-flex;
    align-items: center;
    gap: 15px;
    color: #333;
    text-decoration: none;
    font-size: 1.2rem;
    font-weight: bold;
    transition: color 0.3s;
}

.lien-social i {
    font-size: 2rem;
    color: #267267;
    transition: color 0.3s;
}

.lien-social:hover, .lien-social:hover i {
    color: #3EBCAA;
}

.contact-info {
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    gap: 15px;
    margin: 15px 0;
    font-size: 1.1rem;
    color: #555;
    word-break: break-all; 
}

.contact-info a {
    color: #555;
    text-decoration: none;
}

.contact-info a:hover {
    text-decoration: underline;
}

.icone-cercle {
    display: inline-flex;
    justify-content: center;
    align-items: center;
    width: 35px;
    height: 35px;
    min-width: 35px; 
    border: 1px solid #444;
    border-radius: 50%;
    color: #444;
    font-size: 1rem;
}

.btn-fiche {
    display: block;
    width: 100%;
    background-color: #3EBCAA;
    color: white;
    text-align: center;
    text-decoration: none;
    padding: 12px 0;
    margin-top: auto;
    font-size: 1.1rem;
    font-weight: bold;
    transition: opacity 0.3s ease;
}

.btn-fiche:hover {
    opacity: 0.8;
    color: white;
    background-color: #3EBCAA;
}

.carte-elu img.img-dezoom {
    object-fit: contain; 
    background-color: transparent; 
}

.carte-elu img.img-droite {
    object-position: right 40%; 
}

.image-grande-asso {
    display: block;
    max-width: 90%;
    width: 400px;
    height: auto;
    margin: 0 auto 2rem auto;
    border-radius: 8px;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.1);
}

.bloc-texte {
    text-align: center;
    max-width: 800px;
    margin: 0 auto;
    padding: 0 20px;
    line-height: 1.6;
}