@import url('https://fonts.googleapis.com/css2?family=Roboto+Condensed:ital,wght@0,400..700&display=swap');
@import url('https://fonts.googleapis.com/css2?family=IBM+Plex+Serif:ital,wght@0,200;0,400&display=swap');

:root {
    --nav-height: 70px;
    --carousel-padding: 20px; /* réduit pour mobile */
}

body {
    margin: 0;
    padding: 0;
    font-family: "Roboto Condensed", sans-serif;
    letter-spacing: 2px;
    font-size: 16px;
    background-color: #f0f0f0;
    min-height: 100vh;
    box-sizing: border-box;
}

/*** ZONE NAV ***/
nav {
    display: flex;
    justify-content: space-between;
    align-items: center;
    background-color: rgb(232, 215, 239);
    height: 70px;
    width: 100%;
    letter-spacing: 3px;
    position: fixed;
    top: 0;
    margin: 0;
    padding: 0;
    z-index: 2000;
}
nav .logo_header {
    color: #fff;
    text-decoration: none;
    margin-left: 10px;
}
#logo_collectifpow {
    height: 70px;
}
/*** Menu principal ***/
.nav_menu {
    list-style: none;
    display: flex;
    gap: 10px;
    margin-right: 10px;
}
.nav_menu li {
    position: relative;
}
.nav_hover {
    color: black;
}
.nav_menu li a {
    text-decoration: none;
    padding: 15px 20px;
    display: block;
}
#onglet_on {
    background-color: rgb(167, 139, 156);
    border-radius: 6px;
    color: white;
}
.nav_hover:hover {
    background-color:rgb(167, 139, 156);
    border-radius: 6px;
    color: white;
}
/*** Sous-menu déroulant ***/
.submenu {
    display: none;
    position: absolute;
    top: 100%;
    left: 0;
    list-style: none;
    padding: 0;
    z-index: 1000;
}
.submenu_collectif {
    width: 165px;
}
.submenu_creations {
    width: 315px;
}
.submenu_actions {
    width: 247px;
}
.submenu li a {
    text-align: center;
    display: block;
    border-radius: 6px;
    color: white;
    border-top: 1px solid #fff;
    background-color:rgb(167, 139, 156);
}
.submenu li a:hover {
    background-color:rgb(232, 215, 239);
    color: black;
    border-radius: 6px;
}
/* Affichage du sous-menu au survol */
.dropdown:hover .submenu {
    display: block;
}
.dropdown:hover > .nav_hover {
    background-color:rgb(167, 139, 156);
    color: white;
    border-radius: 6px;
}
/* Menu Burger */
.burger {
    display: none;
    cursor: pointer;
    margin-right: 20px;
    width: 28px;
    height: 22px;
    position: relative;
    z-index: 1001;
}
.burger span {
    position: absolute;
    left: 0;
    width: 100%;
    height: 3px;
    background-color: black;
    border-radius: 3px;
    transition: all 0.3s ease;
}
.burger span:nth-child(1) { top: 0; }
.burger span:nth-child(2) { top: 9px; }
.burger span:nth-child(3) { top: 18px; }

/* --- RESPONSIVE --- */
@media (max-width: 1180px) {
    .burger {
        display: block;
    }
    .nav_menu {
        position: fixed;
        top: 70px;
        right: 0;
        width: 100%;
        height: calc(100vh - 70px);
        background-color: rgb(232, 215, 239);
        flex-direction: column;
        justify-content: flex-start;
        align-items: center;
        list-style: none;
        padding-top: 20px;
        margin: 0;
        gap: 0;
        z-index: 1000;
        transform: translateX(100%);
        transition: transform 0.5s ease;
    }
    .nav_menu.active {
        transform: translateX(0);
    }
    .nav_menu li {
        width: 100%;
        text-align: center;
    }
    .nav_menu li a {
        display: block;
        width: 100%;
        padding: 15px 0;
    }
    .submenu li a {
        display: none;
    }
  /* --- animation du burger en croix --- */
    .burger.active span:nth-child(1) {
        transform: rotate(45deg);
        top: 9px;
    }
    .burger.active span:nth-child(2) {
        opacity: 0;
    }
    .burger.active span:nth-child(3) {
        transform: rotate(-45deg);
        top: 9px;
    }
}
/*** END ZONE NAV ***/

/*** ZONE GALERIE ***/
main {
    flex: 1; /* prend tout l’espace disponible */
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    width: 100%;
    min-height: calc(100dvh - var(--nav-height) - 120px); /* adapte au viewport */
    padding-top: var(--nav-height); /* laisse de l’espace sous le menu */
    box-sizing: border-box;
    position: relative;
    z-index: 1; /* reste sous le menu */
}

.carrousel {
    flex: 1;
    position: relative;
    width: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    padding: var(--carousel-padding) 0;
}

.images-wrapper {
    position: relative;
    width: 100%;
    overflow: hidden;
    display: flex;
    justify-content: center;
}

.images-container {
    display: flex;
    align-items: center;
    transition: transform 0.7s cubic-bezier(0.45, 0, 0.55, 1);
    will-change: transform;
}

.images-container img {
    max-height: calc(100vh - var(--nav-height) - 150px); /* espace pour la légende */
    width: auto;
    max-width: 100%;
    flex-shrink: 0;
    margin: 0 15px;
    border-radius: 15px;
    cursor: pointer;
    object-fit: contain;
    position: relative;
    transform-origin: center;
}

.images-container img:not(.active) {
    filter: brightness(55%);
    transform: scale(0.86);
    opacity: 0.65;
}

/* Légende */
.caption-overlay {
    position: absolute;
    bottom: 5px;
    left: 50%;
    transform: translateX(-50%);
    font-family: "IBM Plex Serif", serif;
    font-weight: 200;
    color: black;
    text-align: center;
    padding: 6px 10px;
    border-radius: 6px;
    opacity: 0;
    transition: opacity 0.5s ease, transform 0.5s ease;
    pointer-events: none;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    max-width: 90%;
    line-height: 1.2;
}
.caption-overlay.show { opacity: 1; }

/* Légende mobile : permet retour à la ligne */
.caption-overlay.allow-wrap {
    white-space: normal;
    word-break: break-word;
    overflow: hidden;
    text-overflow: ellipsis;
    max-width: 95%;
    line-height: 1.2;
}

/* Flèches */
.fleche {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    background-color: rgba(125, 59, 73, 0.85);
    border: none;
    font-size: 30px;
    color: white;
    padding: 15px;
    border-radius: 50%;
    cursor: pointer;
    z-index: 5002;
    user-select: none;
}
.fleche.gauche { left: 10px; }
.fleche.droite { right: 10px; }
.fleche:hover { background-color: rgb(125, 59, 73); }

@media (max-width: 768px) {
    .images-container img { 
        max-height: calc(100vh - var(--nav-height) - 120px); 
    }
    .images-container img:not(.active) { 
        display: none; 
    }
    .fleche { 
        padding: 10px; 
        font-size: 24px; 
    }
}
/*** END ZONE GALERIE ***/

/*** ZONE COOKIES ***/
.cookie-banner {
    position: fixed;
    bottom: 0;
    left: 0;
    width: 100%;
    background-color: rgb(232, 215, 239);
    padding-top: 7px;
    padding-bottom: 7px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    z-index: 1000;
    box-shadow: 0 -2px 5px rgb(167, 139, 156);
    flex-wrap: wrap;
}
.cookie-banner p {
    margin-left: 15px;
    flex: 1;
    box-sizing: border-box;
}
.cookie-banner a {
    color: rgb(125, 59, 73);
    text-decoration: none;
}
.cookie-buttons {
    display: flex;
    gap: 10px;
    flex-shrink: 0;
}
.cookie-banner button {
    background-color: white;
    border: none;
    padding: 8px 15px;
    margin-right: 15px;
    border-radius: 6px;
    cursor: pointer;
    color: rgb(125, 59, 73);
}
.cookie-banner button:hover {
    opacity: 0.7;
}
#lien_cookies:hover {
    color: rgb(167, 139, 156);
}
#rejectCookies {
    background-color: rgb(125, 59, 73);
    color: white;
}

@media (max-width: 650px) {
    .cookie-banner {
        flex-direction: column;
        align-items: flex-start;
        padding-left: 15px;
        padding-right: 15px;
    }

    .cookie-banner p {
        margin-left: 0;
        margin-bottom: 10px;
        width: 100%;
    }

    .cookie-buttons {
        width: 100%;
        justify-content: flex-start;
    }

    .cookie-banner button {
        margin-right: 10px;
        padding: 10px 20px;
        flex: 1 1 auto;
        min-width: 120px;
    }
}
/*** END ZONE COOKIES ***/

/*** FOOTER ***/
#footer_icons {
    background-color: rgb(232, 215, 239);
    height: 80px;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0 50px;
}
.footer_RS_contact {
    display: flex;
    align-items: center;
    margin: 0 20px;
}
.RS { height: 40px; width: 40px; padding-right: 15px; }

#footer_copyright {
    background-color: rgb(167, 139, 156);
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 12px;
}
#mentions_legales { font-size: 8px; text-decoration: none; color: black; }
#mentions_legales:hover { color: rgb(232, 215, 239); }

@media (max-width: 479px) {
    #footer_icons { padding: 0 10px; flex-wrap: wrap; }
    #footer_copyright { font-size: 10px; }
}