﻿/* ==================== */
/* VARIABLES ET GÉNÉRAL */
/* ==================== */
:root {
    --light-color: #f0f0f0;
    --dark-color: #333;
    --ufolep-color: #ff6b6b;
    --asso-color: #4a90e2;

    /* Hauteurs dynamiques (JS sur l'accueil) */
    --ufolep-menu-height: 120px;
    --ufolep-ticker-height: 34px;
    --ufolep-ticker-top: 120px;
}

*,
*::before,
*::after {
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
    min-height: 900px;
}

body {
    font-family: Arial, sans-serif;
    margin: 0 auto;
    box-sizing: border-box;
    background-color: var(--light-color);
    background: linear-gradient(-40deg, #834680, #78a8df, #cce7f3, #f0f0f0);
}

/* Quand le bandeau d'info est présent (accueil), éviter qu'il recouvre le contenu. */
.info-ticker ~ .boite {
    margin-top: var(--ufolep-ticker-height, 0px);
}

/* ==========================
   HOME (index.php) ANIMATIONS
   - Scopées via body.is-home
   - Progressive enhancement (JS ajoute .ufo-reveal)
   - Accessibilité: désactivation si prefers-reduced-motion
   ========================== */

.is-home .ufo-reveal {
    opacity: 0;
    transform: translateY(14px);
    transition:
        opacity 700ms cubic-bezier(0.2, 0.8, 0.2, 1),
        transform 700ms cubic-bezier(0.2, 0.8, 0.2, 1);
    will-change: opacity, transform;
}

.is-home .ufo-reveal.is-in {
    opacity: 1;
    transform: translateY(0);
}

@media (prefers-reduced-motion: reduce) {
    .is-home .ufo-reveal,
    .is-home .ufo-reveal.is-in {
        opacity: 1;
        transform: none;
        transition: none;
    }
}

/* Micro-interactions globales home */
.is-home .carousel-slide,
.is-home .social-section,
.is-home .events-upcoming,
.is-home .calendar,
.is-home .partenaires-grid-section {
    transition: transform 220ms ease, box-shadow 220ms ease, filter 220ms ease;
}

@media (hover: hover) and (pointer: fine) {
    .is-home .carousel-slide:hover {
        transform: translateY(-4px);
        box-shadow: 0 18px 40px rgba(0, 0, 0, 0.12);
    }

    .is-home .social-section:hover,
    .is-home .events-upcoming:hover,
    .is-home .calendar:hover {
        transform: translateY(-2px);
        box-shadow: 0 16px 38px rgba(0, 0, 0, 0.10);
    }
}

/* Boutons "Voir plus" + flèches carrousel */
.is-home .view-more-btn,
.is-home .carousel-btn,
.is-home .nav-arrow {
    transform: translateZ(0);
    transition: transform 180ms ease, box-shadow 180ms ease, background-color 180ms ease, filter 180ms ease;
}

@media (hover: hover) and (pointer: fine) {
    .is-home .view-more-btn:hover {
        transform: translateY(-1px) scale(1.03);
        filter: saturate(1.05);
        box-shadow: 0 10px 22px rgba(0, 0, 0, 0.18);
    }

    .is-home .carousel-btn:hover {
        transform: scale(1.08);
        box-shadow: 0 10px 22px rgba(0, 0, 0, 0.18);
    }

    .is-home .nav-arrow:hover {
        transform: translateY(-1px);
        filter: brightness(1.05);
    }
}

.is-home .view-more-btn:active,
.is-home .carousel-btn:active,
.is-home .nav-arrow:active {
    transform: scale(0.98);
}

/* Petites pulsations douces sur les compteurs d'événements (sans agressivité) */
@keyframes ufo-pulse {
    0%, 100% { transform: scale(1); opacity: 1; }
    50% { transform: scale(1.06); opacity: 0.95; }
}

@media (prefers-reduced-motion: no-preference) {
    .is-home .nav-arrow .event-count {
        display: inline-block;
        animation: ufo-pulse 2.4s ease-in-out infinite;
        animation-delay: 400ms;
    }
}

@media (prefers-reduced-motion: reduce) {
    .is-home .nav-arrow .event-count {
        animation: none;
    }
}

/* ========================== */
/* ARTICLE & VIE ASSO ANIMATIONS */
/* ========================== */

/* Fade-in animation pour les articles */
@keyframes articleFadeIn {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.actu-card {
    animation: articleFadeIn 0.6s ease-out;
}

.actu-card:nth-child(2) {
    animation-delay: 0.1s;
}

.actu-card:nth-child(3) {
    animation-delay: 0.2s;
}

.actu-card:nth-child(n+4) {
    animation-delay: 0.3s;
}

@media (prefers-reduced-motion: reduce) {
    .actu-card {
        animation: none;
    }
}

/* Subtle underline animation for article titles */
@keyframes underlineExpand {
    from {
        width: 0;
        left: 0;
    }
    to {
        width: 100%;
        left: 0;
    }
}

/* ============= */
/* HEADER & MENU */
/* ============= */
header {
    height: 120px;
    width: 100%;
    position: relative; /* Pour positionner le pseudo-élément */
}

/* Création du fondu gris à transparent */
header::after {
    content: "";
    position: fixed;
    top: var(--ufolep-menu-height, 120px); /* suit la hauteur du header */
    left: 0;
    right: 0;
    height: 50px; /* Hauteur augmentée */
    background: linear-gradient(to bottom, 
        #ffffff 0%, 
        rgba(255, 255, 255, 0.9) 20%,
        rgba(255, 255, 255, 0.7) 40%,
        rgba(255, 255, 255, 0.5) 60%,
        rgba(255, 255, 255, 0.3) 80%,
        rgba(255, 255, 255, 0) 100%);
    z-index: 1;
    pointer-events: none; /* Permet de cliquer à travers */
}

header p {
    color: #000000; /* Changé en clair pour contraste */
    font-size: 11px;
    text-align: left;
    margin: auto auto auto 300px; /* Ajusté pour centrer le texte */
    left: 20px;
    max-width: 300px;
    position: absolute;
    z-index: 2;
}

/* ============= */
/* INFO TICKER   */
/* ============= */
.info-ticker {
    position: fixed;
    top: var(--ufolep-ticker-top, 120px);
    left: 0;
    right: 0;
    height: var(--ufolep-ticker-height, 34px);
    background: rgba(255, 255, 255, 0.92);
    border-bottom: 1px solid rgba(0, 0, 0, 0.08);
    z-index: 999;
    backdrop-filter: blur(6px);
}

.info-ticker__viewport {
    height: 100%;
    overflow: hidden;
}

.info-ticker__track {
    height: 100%;
    display: flex;
    width: max-content;
    will-change: transform;
    animation: ufolep-ticker-scroll 45s linear infinite;
}

/* Pause optionnelle uniquement si explicitement activée */
.info-ticker[data-pause-on-hover="1"]:hover .info-ticker__track {
    animation-play-state: paused;
}

.info-ticker__items {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    padding: 0 16px;
    white-space: nowrap;
}

.info-ticker__label {
    font-weight: 700;
    color: #333;
    font-size: 13px;
}

.info-ticker__link {
    color: #224dc4;
    text-decoration: none;
    font-size: 13px;
    font-weight: 600;
}

.info-ticker__link:hover {
    text-decoration: underline;
}

.info-ticker__dot,
.info-ticker__sep {
    color: rgba(0, 0, 0, 0.35);
    font-size: 14px;
}

@keyframes ufolep-ticker-scroll {
    from { transform: translateX(0); }
    to { transform: translateX(-50%); }
}

@media (prefers-reduced-motion: reduce) {
    .info-ticker__track {
        animation: none;
    }

    /* L'utilisateur a demandé une animation: on peut la forcer via data-force-motion */
    .info-ticker[data-force-motion="1"] .info-ticker__track {
        animation: ufolep-ticker-scroll 45s linear infinite;
    }
}

.menu {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    width: 100%;
    height: 120px;
    display: flex;
    background-color: #ffffff;
    z-index: 1000;
}

.logo {
    height: 100%;
    width: auto;
    display: flex;
    margin-right: auto;
    margin-left: 20px;
}



/* Items de menu */
#nav, #navlast {
    padding: 20px 15px;
    text-decoration: none;
    color: var(--dark-color);
    font-weight: bold;
    font-size: 1.2rem;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 8px;
    transition: background-color 0.3s ease, color 0.3s ease;
    margin: auto 10px;
}

#nav:hover, #navlast:hover {
    background-color: var(--ufolep-color);
    color: white;
}

/* ============= */
/* CONTENU PRINCIPAL */
/* ============= */
main {
    padding: 5px;
    background-color: #f9f9f96c;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 2px 5px rgba(0,0,0,0.1);
    display: flex;
    flex-direction: column;
    gap: 20px;
    box-sizing: border-box;
    width: 100%;
    max-width: 1800px;
    margin: 10px auto;
}

main h1 {
    text-align: center;
    color: var(--ufolep-color);
    margin-bottom: 20px;
}

main h2 {
    color: rgb(34, 77, 196);
    font-size: 25px;
    margin-bottom: 1rem;
    padding: 2px 10px;
}
.boite {
    width: auto;
    max-width: 1800px;
    /* Décalage sous le header + bandeau (les variables sont ajustées en JS sur l'accueil) */
    margin: 20px auto 0;
    padding: 20px;
    box-sizing: border-box;

}

.boite main {
  padding: 20px;
  box-sizing: border-box;
}

.main-carrousels {
    display: flex;
    flex-direction: column;
    height: auto;
}

.calendrier-events {
  height: auto;
}
.partenaires-grid-section {
  height: auto;
}
.droite {
    width: 40%;
    display: flex;
    flex-direction: column;
    height: 100%;
}
.association-logo img {
    max-width: 250px;
    height: auto;
    border-radius: 8px;
    display: flex;
    margin: 0 auto;
}
.association-card {
    background: rgba(255, 255, 255, 0.226);
    border-radius: 8px;
    box-shadow: 0 2px 5px rgba(0,0,0,0.1);
    padding: 20px;
    margin-bottom: 1rem;
}

.association-info h2 a{
    color: rgb(70, 1, 97);
    font-size: 30px;
    margin-bottom: 0.5rem;
    text-decoration: none;
    font-family: 'Arial', sans-serif;
    font-weight: bolder;
}

.association-info h2 a:hover {
    color: rgb(70, 1, 97);
    text-decoration: underline;
}

.association-info p {
    color: #535252;
    font-size: 1rem;
    margin-bottom: 1rem;
    line-height: 1.5;
    text-align: center;
}

/* ============= */
/* CARROUSELS */
/* ============= */

.carrousel-section {
    display: flex;
    flex-direction: column;
    margin: 0;
    padding: 25px;
    box-sizing: border-box;
    background: linear-gradient(135deg, rgba(255, 255, 255, 0.95) 0%, rgba(248, 248, 248, 0.9) 100%);
    border-radius: 16px;
    box-shadow: 0 8px 24px rgba(0,0,0,0.12);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255,255,255,0.3);
    transition: all 0.3s ease;
}

.carrousel-section:hover {
    transform: translateY(-2px);
    box-shadow: 0 12px 32px rgba(0,0,0,0.15);
}

.carrousel-section h2 {
    font-size: 2rem;
    margin-bottom: 1.5rem;
    text-align: center;
    font-weight: 800;
    letter-spacing: -0.5px;
}
.carrousel-section h2 a {
    text-decoration: none;
    width: auto;
    color: var(--ufolep-color);
    transition: all 0.3s ease;
}
.carrousel-section h2:hover {
    background: linear-gradient(135deg, var(--ufolep-color) 0%, #e55a5a 100%);
    color: white;
    transition: all 0.3s ease;
    border-radius: 12px;
    padding: 8px 16px;
    box-shadow: 0 4px 12px rgba(255, 107, 107, 0.3);
}
.carrousel-section h2 a:hover{
    text-decoration: none;
    width: auto;
    color: white;
}

.carrousel-title {
    font-size: 3rem;
    position: relative;
    color: var(--asso-color);
    text-align: center;
}

.carrousel-container {
    position: relative;
    display: flex;
    flex: 1;
    gap: 1rem;
    overflow: hidden; /* Important */
}

.carrousel-content {
    display: flex;
    gap: 0; /* Changé de 1.5rem à 0 */
    padding: 1rem 0;
    transition: transform 0.5s ease;
    will-change: transform;
    width: 100%;
}

.carrousel-group {
    display: flex;
    flex: 0 0 100%;
    gap: 1.5rem;
    justify-content: center;
    min-width: 100%;
    box-sizing: border-box;
}

.carrousel-item {
    flex: 0 0 calc(33.333% - 1rem);
    max-width: calc(33.333% - 1rem);
    box-sizing: border-box;
    scroll-snap-align: start;
    background: rgba(255, 255, 255, 0);
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 4px 6px rgba(0,0,0,0.1);
    transition: transform 0.3s ease;
    animation: fadeSlide 0.5s ease forwards;
}

/* Navigation carrousel */
.carrousel-nav {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    z-index: 10;
    background: white;
    border: none;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    box-shadow: 0 2px 5px rgba(0,0,0,0.2);
    cursor: pointer;
    font-size: 1.2rem;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
}

.carrousel-nav:hover {
    background: var(--ufolep-color);
    color: white;
}

.carrousel-nav.left {
    left: 10px;
}

.carrousel-nav.right {
    right: 10px;
}

.carrousel-nav.right:hover {
    background: var(--asso-color);
}

/* Indicateurs carrousel */
.carrousel-indicators {
    display: flex;
    justify-content: center;
    gap: 0.5rem;
    margin-top: 1rem;
}

.carrousel-indicator {
    width: 12px;
    height: 12px;
    border-radius: 50%;
    background-color: #ccc;
    cursor: pointer;
    transition: background-color 0.3s ease;
}

.carrousel-indicator.active {
    background-color: var(--ufolep-color);
}

/* Contenu des items carrousel */
.image-wrapper {
    position: relative;
    height: 200px;
    overflow: hidden;
    width: auto;
    justify-items: center;
}

.image-wrapper img {
    max-width: 100%;
    width: auto;
    height: 100%;
    transition: transform 0.3s ease;
    display: block;
    object-fit: cover;
}

.add-icon {
    position: absolute;
    top: 1rem;
    right: 1rem;
    height: 30px;
    background: rgba(0,0,0,0.6);
    color: white;
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: bold;
    cursor: pointer;
    padding: 0 0.5rem;
}

.text-content {
    padding: 1.5rem;
}

.text-content h3 {
    margin-bottom: 0.5rem;
    color: var(--dark-color);
}

.text-content p {
    color: #666;
    margin-bottom: 1rem;
    font-size: 0.9rem;
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
    line-clamp: 3;
}

.text-content .date {
    font-size: 0.8rem;
    color: #999;
    display: block;
    margin-top: 0.5rem;
}

.text-content .asso {
    display: block;
    font-size: 0.9rem;
    color: var(--asso-color);
    font-weight: bold;
    margin-bottom: 0.5rem;
}

.read-more {
    display: inline-block;
    margin-top: 10px;
    padding: 8px 12px;
    background-color: var(--ufolep-color);
    color: white;
    text-decoration: none;
    border-radius: 4px;
    font-size: 0.9rem;
    transition: background-color 0.3s ease;
}

.read-more:hover {
    background-color: darken(var(--ufolep-color), 5%);
}

/* ============= */
/* social medias */
/* ============= */

.main-layout {
    display: flex;
    gap: 20px;
    max-width: 1600px;
    margin: 0 auto;
}

.main-column {
    flex: 2;
    display: flex;
    flex-direction: column;
    gap: 20px;
    max-width: 900px;
    min-width: 0;
}

.social-column {
    flex: 1;
    min-width: 350px;
    max-width: 450px;
}

.social-feed {
    position: relative;
    top: 25px;
    display: flex;
    flex-direction: column;
    gap: 20px;
    width: 100%;
    max-width: 450px;
}

.social-title {
    color: var(--ufolep-color);
    font-size: 1.5rem;
    margin-bottom: 1rem;
    text-align: center;
    padding-bottom: 10px;
    border-bottom: 2px solid var(--ufolep-color);
}

.social-section {
    background: linear-gradient(135deg, rgba(255, 255, 255, 0.95) 0%, rgba(248, 248, 248, 0.9) 100%);
    border-radius: 16px;
    box-shadow: 0 8px 24px rgba(0,0,0,0.12);
    overflow: hidden;
    font-family: Arial, Helvetica, sans-serif;
    height: 500px;
    border: 1px solid rgba(255,255,255,0.3);
    backdrop-filter: blur(10px);
    transition: all 0.3s ease;
}

.social-section:hover {
    transform: translateY(-4px);
    box-shadow: 0 12px 32px rgba(0,0,0,0.15);
}

.social-header {
    display: flex;
    align-items: center;
    padding: 18px;
    background: linear-gradient(135deg, #f9f9f9 0%, #eaeaea 100%);
    border-bottom: 2px solid #ddd;
}

.social-header i {
    font-size: 1.5rem;
    margin-right: 12px;
}

.social-header h3 {
    margin: 0;
    font-size: 1.3rem;
    color: #333;
    text-decoration: none;
    font-weight: 700;
}
.social-header a {
    color: #333;
    text-decoration: none;
    transition: color 0.3s ease;
}
.social-header h3:hover a:hover {
    color: var(--ufolep-color);
}

.instagram-feed .social-header i {
    color: #E1306C;
}

.facebook-feed .social-header i {
    color: #3b5998;
}

.youtube-feed .social-header i {
    color: #FF0000;
}

/* Style pour les posts Instagram */
.instagram-posts, .facebook-posts, .youtube-videos {
    padding: 15px;
    max-height: 400px;
    overflow-y: auto;
}

.instagram-post, .facebook-post, .youtube-video {
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
    transition: transform 0.3s ease;
}

.instagram-post:hover, .facebook-post:hover, .youtube-video:hover {
    transform: translateY(-3px);
    box-shadow: 0 4px 8px rgba(0,0,0,0.15);
}

.instagram-image, .facebook-image {
    width: 100%;
    height: auto;
    display: block;
}

.instagram-caption, .facebook-message {
    padding: 10px;
    background: white;
    font-size: 0.9rem;
    line-height: 1.4;
}

.instagram-date, .facebook-date {
    font-size: 0.8rem;
    color: #777;
    margin-top: 5px;
}


/* Style pour les vidéos YouTube */
.youtube-video {
    position: relative;
    padding-bottom: 56.25%; /* Ratio 16:9 */
    height: 0;
    overflow: hidden;
}

.youtube-video iframe {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    border: none;
}

.youtube-info {
    padding: 10px;
    background: white;
}

.youtube-title {
    font-weight: bold;
    margin-bottom: 5px;
    font-size: 0.9rem;
}

.youtube-date {
    font-size: 0.8rem;
    color: #777;
}

.loading {
    text-align: center;
    padding: 20px;
    color: #777;
    font-style: italic;
}

.error {
    text-align: center;
    padding: 20px;
    color: #e74c3c;
    background: rgba(231, 76, 60, 0.1);
    border-radius: 4px;
}

.youtube-video-item {
    margin-bottom: 20px;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
    transition: transform 0.3s ease;
}

.youtube-video-item:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0,0,0,0.15);
}

.youtube-video {
    position: relative;
    padding-bottom: 56.25%; /* Ratio 16:9 */
    height: 0;
    overflow: hidden;
}

.youtube-video iframe {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    border: none;
}

.youtube-info {
    padding: 12px;
    background: white;
}

.youtube-title {
    font-weight: 600;
    font-size: 0.9rem;
    line-height: 1.3;
    margin-bottom: 5px;
    color: #333;
}

.youtube-date {
    font-size: 0.8rem;
    color: #666;
}

/* Responsive */
@media (max-width: 992px) {
    .main-layout {
        flex-direction: column;
    }
    
    .social-column {
        min-width: 100%;
    }
    

    /* Sur petit écran, on masque complètement le bandeau */
    .info-ticker {
        display: none !important;
    }

    :root {
        --ufolep-ticker-height: 0px;
    }
    .social-feed {
        position: static;
    }
}


/* ============= */
/* CARTE DES ASSOCIATIONS */
/* ============= */

.map-associations-section {
    margin: 30px auto;
    padding: 30px 20px;
    background: linear-gradient(135deg, rgba(255, 255, 255, 0.95) 0%, rgba(248, 248, 248, 0.9) 100%);
    border-radius: 16px;
    box-shadow: 0 8px 24px rgba(0,0,0,0.12);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255,255,255,0.3);
    max-width: 1400px;
    transition: all 0.3s ease;
}

.map-associations-section:hover {
    transform: translateY(-2px);
    box-shadow: 0 12px 32px rgba(0,0,0,0.15);
}

.map-associations-inner {
    max-width: 100%;
}

.map-associations-title {
    text-align: center;
    color: #2c3e50;
    font-size: 2.2rem;
    font-weight: 800;
    letter-spacing: -0.5px;
    margin-bottom: 25px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
    padding-bottom: 15px;
    border-bottom: 3px solid var(--asso-color);
}

.map-associations-title i {
    color: var(--asso-color);
    font-size: 2rem;
}

.map-associations-frame {
    border-radius: 16px;
    overflow: hidden;
    box-shadow: 0 8px 24px rgba(0,0,0,0.15);
    transition: all 0.3s ease;
}

.map-associations-frame:hover {
    box-shadow: 0 12px 32px rgba(0,0,0,0.2);
}

.map-associations-frame iframe {
    width: 100%;
    height: 500px;
    border: 0;
    border-radius: 16px;
}

.map-associations-fullscreen {
    text-align: center;
    margin-top: 20px;
}

.map-associations-fullscreen a {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    padding: 12px 24px;
    background: linear-gradient(135deg, var(--asso-color) 0%, #357ab8 100%);
    color: white;
    text-decoration: none;
    border-radius: 25px;
    font-weight: 700;
    font-size: 0.95rem;
    transition: all 0.3s ease;
    box-shadow: 0 4px 15px rgba(74, 144, 226, 0.3);
}

.map-associations-fullscreen a:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 25px rgba(74, 144, 226, 0.5);
    background: linear-gradient(135deg, #357ab8 0%, var(--asso-color) 100%);
}

.map-associations-fullscreen a i {
    font-size: 1.1rem;
    transition: transform 0.3s ease;
}

.map-associations-fullscreen a:hover i {
    transform: scale(1.2);
}

/* Responsive carte associations */
@media (max-width: 768px) {
    .map-associations-section {
        padding: 20px 15px;
        margin: 20px auto;
    }
    
    .map-associations-title {
        font-size: 1.6rem;
        flex-direction: column;
        gap: 8px;
    }
    
    .map-associations-frame iframe {
        height: 400px;
    }
    
    .map-associations-fullscreen a {
        padding: 10px 20px;
        font-size: 0.9rem;
    }
}

/* ============= */
/* PARTENAIRES GRID */
/* ============= */



.partenaires-grid-section {
    padding: 30px 20px;
    background: linear-gradient(135deg, rgba(255, 255, 255, 0.95) 0%, rgba(248, 248, 248, 0.9) 100%);
    border-radius: 16px;
    box-shadow: 0 8px 24px rgba(0,0,0,0.12);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255,255,255,0.3);
    margin: 20px auto;
    max-width: 1400px;
    transition: all 0.3s ease;
}

.partenaires-grid-section:hover {
    transform: translateY(-2px);
    box-shadow: 0 12px 32px rgba(0,0,0,0.15);
}

.partenaires-grid-section h2 {
    text-align: center;
    margin-bottom: 2.5rem;
    color: #2c3e50;
    font-size: 2.2rem;
    font-weight: 800;
    letter-spacing: -0.5px;
    padding-bottom: 15px;
    border-bottom: 3px solid var(--ufolep-color);
    width: fit-content;
    margin-left: auto;
    margin-right: auto;
}

.partenaires-grid-container {
    display: grid;
    grid-template-columns: repeat(8, 1fr);
    grid-template-rows: repeat(3, 1fr);
    gap: 1rem;
    width: 95%;
    margin: 0 auto;
}

.partenaire-card {
    position: relative;
    aspect-ratio: 1/1;
    background: white;
    border-radius: 16px;
    overflow: hidden;
    box-shadow: 0 4px 20px rgba(0,0,0,0.1);
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    border: 2px solid transparent;
}

.partenaire-card:hover {
    transform: translateY(-8px) scale(1.02);
    box-shadow: 0 12px 40px rgba(0, 0, 0, 0.2);
    border-color: var(--ufolep-color);
}

.partenaire-front,
.partenaire-back {
    position: absolute;
    width: 100%;
    height: 100%;
    backface-visibility: hidden;
    transition: opacity 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 1rem;
    box-sizing: border-box;
}

.partenaire-front {
    opacity: 1;
}

.partenaire-back {
    opacity: 0;
    flex-direction: column;
    text-align: center;
    color: rgb(255, 255, 255);
    background-color: rgba(44, 62, 80, 0.849);
}

.partenaire-card:hover .partenaire-front {
    opacity: 0;
}

.partenaire-card:hover .partenaire-back {
    opacity: 1;
}

.partenaire-front img {
    max-width: 90%;
    max-height: 90%;
    object-fit: contain;
}

.partenaire-back h3 {
    margin-bottom: 0.5rem;
    font-size: 12px;
}

.partenaire-back p {
    font-size: 0.8rem;
    margin-bottom: 1rem;
    display: -webkit-box;
    -webkit-line-clamp: 3;
    line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.partenaire-back .btn {
    padding: 0.4rem 0.8rem;
    background-color: #ff6b6b;
    color: white;
    text-decoration: none;
    border-radius: 4px;
    font-size: 0.8rem;
    transition: background-color 0.3s ease;
}

.partenaire-back .btn:hover {
    background-color: #e55a5a;
}

/* Responsive */
@media (max-width: 1200px) {
    .partenaires-grid-container {
        grid-template-columns: repeat(4, 1fr);
        grid-template-rows: repeat(5, 1fr);
    }
}

@media (max-width: 768px) {
    .partenaires-grid-container {
        grid-template-columns: repeat(3, 1fr);
        grid-template-rows: repeat(6, 1fr);

    }

    /* Sur mobile, on ne veut pas des “Accès rapide” dans le bandeau */
    .info-ticker__quick {
        display: none !important;
    }
}

@media (max-width: 480px) {
    .partenaires-grid-container {
        grid-template-columns: repeat(2, 1fr);
    }
}


/* ============= */
/* FULL CONTENT */
/* ============= */
.full-content {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.9);
    z-index: 10000;
    overflow-y: auto;
    padding: 2rem;
    box-sizing: border-box;
}

.full-content img {
    max-width: 80%;
    max-height: 50vh;
    display: block;
    margin: 0 auto 2rem;
}

.full-content h3 {
    color: white;
    font-size: 2rem;
    text-align: center;
    margin-bottom: 1rem;
}

.full-content p {
    color: #ddd;
    font-size: 1.2rem;
    line-height: 1.6;
    max-width: 800px;
    margin: 0 auto 1.5rem;
}
td {
    border: black;
    border-block: black;
    border-style: solid;
}


.full-content .date {
    color: #aaa;
    font-size: 1rem;
    text-align: center;
    display: block;
    margin-top: 1rem;
}

.close-icon {
    position: absolute;
    top: 20px;
    right: 30px;
    font-size: 3rem;
    color: white;
    cursor: pointer;
    z-index: 10001;
}

.close-icon:hover {
    color: var(--ufolep-color);
}

/* ============= */
/* ARTICLES & VIE ASSO */
/* ============= */

.actus-list {
    display: flex;
    flex-direction: column;
    gap: 24px;
    padding: 0;
    list-style: none;
}

.actu-card {
    background: linear-gradient(135deg, rgba(255, 255, 255, 0.98) 0%, rgba(255, 255, 255, 0.95) 100%);
    border-radius: 16px;
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.08);
    padding: 32px;
    margin-bottom: 0;
    transition: all 0.3s cubic-bezier(0.2, 0.8, 0.2, 1);
    border: 1px solid rgba(255, 255, 255, 0.4);
    backdrop-filter: blur(8px);
    position: relative;
    overflow: hidden;
}

.actu-card::before {
    content: "";
    position: absolute;
    top: 0;
    left: 0;
    height: 4px;
    width: 100%;
    background: linear-gradient(90deg, var(--ufolep-color) 0%, var(--asso-color) 100%);
}

@media (hover: hover) and (pointer: fine) {
    .actu-card:hover {
        transform: translateY(-8px);
        box-shadow: 0 12px 32px rgba(0, 0, 0, 0.12);
        border-color: rgba(255, 255, 255, 0.6);
    }
}

.actu-card:active {
    transform: translateY(-4px);
}

.actu-content {
    position: relative;
    z-index: 1;
}

.actu-content h2 {
    font-size: 2rem;
    color: var(--ufolep-color);
    margin: 0 0 16px 0;
    padding-bottom: 12px;
    border-bottom: 2px solid rgba(255, 107, 107, 0.2);
    font-weight: 800;
    letter-spacing: -0.5px;
    line-height: 1.3;
    transition: color 0.3s ease;
}

@media (hover: hover) and (pointer: fine) {
    .actu-card:hover .actu-content h2 {
        color: var(--asso-color);
    }
}

.actu-content time {
    display: block;
    font-size: 0.95rem;
    color: #666;
    font-weight: 600;
    margin-bottom: 20px;
    padding: 8px 12px;
    background: rgba(74, 144, 226, 0.08);
    border-left: 3px solid var(--asso-color);
    border-radius: 4px;
    font-style: italic;
}

.article-content {
    font-size: 1.05rem;
    color: #333;
    line-height: 1.8;
    margin: 20px 0;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Arial, sans-serif;
}

.article-content p {
    margin-bottom: 16px;
    text-align: justify;
}

.article-content h3 {
    font-size: 1.5rem;
    color: var(--asso-color);
    margin: 24px 0 12px 0;
    font-weight: 700;
    border-left: 4px solid var(--ufolep-color);
    padding-left: 12px;
}

.article-content h4 {
    font-size: 1.2rem;
    color: #444;
    margin: 20px 0 10px 0;
    font-weight: 700;
}

.article-content ul,
.article-content ol {
    margin: 16px 0 16px 24px;
    padding-left: 12px;
}

.article-content li {
    margin-bottom: 8px;
    color: #333;
}

.article-content strong {
    color: var(--ufolep-color);
    font-weight: 700;
}

.article-content em {
    color: var(--asso-color);
    font-style: italic;
}

.article-content blockquote {
    border-left: 4px solid var(--asso-color);
    padding-left: 20px;
    margin: 20px 0;
    color: #555;
    font-style: italic;
    background: rgba(74, 144, 226, 0.05);
    padding: 16px 20px;
    border-radius: 4px;
}

.actu-attachments,
.article-attachments {
    margin-top: 28px;
    padding-top: 20px;
    border-top: 2px dashed rgba(74, 144, 226, 0.3);
}

.actu-attachments h3,
.article-attachments h3 {
    font-size: 1.2rem;
    color: var(--asso-color);
    margin: 0 0 16px 0;
    padding-bottom: 8px;
    border-bottom: 2px solid var(--asso-color);
    font-weight: 700;
    display: flex;
    align-items: center;
    gap: 8px;
}

.actu-attachments h3::before,
.article-attachments h3::before {
    content: "📎";
    font-size: 1.3rem;
}

.actu-attachments ul,
.article-attachments ul {
    list-style: none;
    padding: 0;
    margin: 0;
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.actu-attachments li,
.article-attachments li {
    padding: 12px 16px;
    background: linear-gradient(135deg, rgba(255, 107, 107, 0.05) 0%, rgba(74, 144, 226, 0.05) 100%);
    border-radius: 8px;
    border-left: 3px solid var(--ufolep-color);
    transition: all 0.3s ease;
}

@media (hover: hover) and (pointer: fine) {
    .actu-attachments li:hover,
    .article-attachments li:hover {
        transform: translateX(8px);
        background: linear-gradient(135deg, rgba(255, 107, 107, 0.1) 0%, rgba(74, 144, 226, 0.1) 100%);
        border-left-width: 5px;
    }
}

.actu-attachments a,
.article-attachments a {
    color: var(--asso-color);
    text-decoration: none;
    font-weight: 600;
    font-size: 0.95rem;
    transition: color 0.3s ease;
    display: flex;
    align-items: center;
    gap: 8px;
}

.actu-attachments a::before,
.article-attachments a::before {
    content: "📥";
    font-size: 1.1rem;
}

@media (hover: hover) and (pointer: fine) {
    .actu-attachments a:hover,
    .article-attachments a:hover {
        color: var(--ufolep-color);
        text-decoration: underline;
    }
}

/* ============= */
/*  CALENDRIER   */
/* ============= */

.calendrier-events {
    padding: 25px;
    background: linear-gradient(135deg, rgba(249, 249, 249, 0.95) 0%, rgba(255, 255, 255, 0.9) 100%);
    border-radius: 16px;
    overflow: visible;
    box-shadow: 0 8px 24px rgba(0,0,0,0.12);
    display: flex;
    flex-direction: column;
    gap: 30px;
    box-sizing: border-box;
    width: 100%;
    max-width: 1400px;
    margin: 20px auto;
    min-height: auto;
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255,255,255,0.3);
}

.calendrier-events h2 {
    color: rgb(34, 77, 196);
    font-size: 1.8rem;
    margin-bottom: 1.5rem;
    padding: 8px 15px;
    text-align: center;
    font-weight: 800;
    letter-spacing: -0.5px;
}

/* Conteneur principal - disposition en ligne pour calendrier et événements */
.calendrier-container {
    display: block;
    width: 100%;
    max-width: 100%;
    margin: 20px 0;
}

/* Section des événements à venir à droite du calendrier */
/* ============= */
/* ÉVÉNEMENTS À VENIR */
/* ============= */

.events-upcoming {
    flex: 0 0 280px;
    background: linear-gradient(135deg, rgba(255, 255, 255, 0.98) 0%, rgba(248, 249, 250, 0.95) 100%);
    border-radius: 20px;
    padding: 28px;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.12);
    height: fit-content;
    max-height: 650px;
    overflow-y: auto;
    overflow-x: hidden;
    border: 1px solid rgba(216, 31, 77, 0.15);
    transition: all 0.3s cubic-bezier(0.2, 0.8, 0.2, 1);
    position: relative;
    backdrop-filter: blur(10px);
}

.events-upcoming::before {
    content: "";
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: linear-gradient(90deg, #d81f4d 0%, #ff6b6b 50%, #e85a1e 100%);
    border-radius: 20px 20px 0 0;
}

@media (hover: hover) and (pointer: fine) {
    .events-upcoming:hover {
        transform: translateY(-8px);
        box-shadow: 0 16px 48px rgba(0, 0, 0, 0.16);
        border-color: rgba(216, 31, 77, 0.25);
    }
}

.events-upcoming h3 {
    margin: 0 0 20px 0;
    color: #d81f4d;
    font-size: 1.4rem;
    padding-bottom: 14px;
    border-bottom: 3px solid #d81f4d;
    text-align: center;
    font-weight: 900;
    letter-spacing: -0.5px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
}

.events-upcoming h3::before {
    content: "📅";
    font-size: 1.5rem;
}

.events-upcoming table {
    width: 100%;
    border-collapse: collapse;
    border-spacing: 0;
}

.events-upcoming thead {
    background: linear-gradient(135deg, #d81f4d 0%, #e85a1e 100%);
}

.events-upcoming td {
    padding: 12px 14px;
    border: 1px solid rgba(0, 0, 0, 0.06);
    text-align: left;
    font-size: 0.9rem;
    background: white;
    transition: all 0.2s ease;
}

.events-upcoming tr {
    transition: all 0.2s ease;
}

.events-upcoming tbody tr {
    border-bottom: 1px solid rgba(0, 0, 0, 0.04);
}

@media (hover: hover) and (pointer: fine) {
    .events-upcoming tbody tr:hover {
        background: linear-gradient(90deg, rgba(216, 31, 77, 0.08) 0%, rgba(232, 90, 30, 0.05) 100%);
        transform: translateX(4px);
    }
    
    .events-upcoming tbody tr:hover td {
        border-color: rgba(216, 31, 77, 0.3);
    }
}

.events-upcoming th {
    padding: 14px 14px;
    border: none;
    text-align: left;
    background-color: #d81f4d;
    color: white;
    font-weight: 800;
    font-size: 0.95rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.events-upcoming th:first-child {
    border-radius: 4px 0 0 0;
}

.events-upcoming th:last-child {
    border-radius: 0 4px 0 0;
}

.events-upcoming tbody tr:last-child td {
    border-bottom: none;
}

.events-upcoming td a {
    color: #e85a1e;
    text-decoration: none;
    transition: all 0.3s ease;
    font-weight: 700;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 4px 6px;
    border-radius: 4px;
}

.events-upcoming td a::before {
    content: "▶";
    font-size: 0.7rem;
    opacity: 0.6;
    transition: all 0.3s ease;
}

@media (hover: hover) and (pointer: fine) {
    .events-upcoming td a:hover {
        color: white;
        background: linear-gradient(135deg, #e85a1e 0%, #d81f4d 100%);
        padding: 4px 10px;
        border-radius: 6px;
    }
    
    .events-upcoming td a:hover::before {
        opacity: 1;
        transform: translateX(2px);
    }
}

.events-upcoming td a:active {
    transform: scale(0.98);
}

/* Scrollbar personnalisée */
.events-upcoming::-webkit-scrollbar {
    width: 8px;
}

.events-upcoming::-webkit-scrollbar-track {
    background: rgba(0, 0, 0, 0.05);
    border-radius: 10px;
}

.events-upcoming::-webkit-scrollbar-thumb {
    background: linear-gradient(180deg, #d81f4d 0%, #e85a1e 100%);
    border-radius: 10px;
    transition: background 0.3s ease;
}

@media (hover: hover) and (pointer: fine) {
    .events-upcoming::-webkit-scrollbar-thumb:hover {
        background: linear-gradient(180deg, #e85a1e 0%, #d81f4d 100%);
    }
}

/* ============= */
/* LISTE D'ÉVÉNEMENTS (uev) */
/* ============= */

.uev-list {
    list-style: none;
    padding: 0;
    margin: 0;
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.uev-card {
    margin: 0;
    padding: 0;
}

.uev-link {
    max-height: 150px;
    display: flex;
    align-items: center;
    gap: 16px;
    padding: 18px;
    background: linear-gradient(135deg, rgba(255, 255, 255, 0.98) 0%, rgba(248, 249, 250, 0.95) 100%);
    border-radius: 14px;
    border-left: 5px solid var(--ufolep-color);
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.08);
    text-decoration: none;
    color: inherit;
    transition: all 0.3s cubic-bezier(0.2, 0.8, 0.2, 1);
    position: relative;
    overflow: hidden;
}

.uev-link::before {
    content: "";
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.3), transparent);
    transition: left 0.6s ease;
    pointer-events: none;
}

@media (hover: hover) and (pointer: fine) {
    .uev-link:hover {
        transform: translateY(-6px);
        box-shadow: 0 12px 32px rgba(255, 107, 107, 0.2);
        border-left-color: var(--asso-color);
        border-left-width: 7px;
        padding-left: 16px;
    }
    
    .uev-link:hover::before {
        left: 100%;
    }
}

.uev-date-badge {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    min-width: 56px;
    height: 56px;
    background: linear-gradient(135deg, var(--ufolep-color) 0%, #e85a1e 100%);
    color: white;
    border-radius: 10px;
    font-weight: 900;
    box-shadow: 0 4px 12px rgba(255, 107, 107, 0.3);
    flex-shrink: 0;
    transition: all 0.3s ease;
}

@media (hover: hover) and (pointer: fine) {
    .uev-link:hover .uev-date-badge {
        transform: scale(1.1) rotate(-5deg);
        box-shadow: 0 8px 20px rgba(255, 107, 107, 0.4);
    }
}

.uev-day {
    font-size: 1.3rem;
    line-height: 1;
    display: block;
}

.uev-month {
    font-size: 0.75rem;
    opacity: 0.9;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    display: block;
    margin-top: 2px;
}

.uev-body {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 6px;
    min-width: 0;
}

.uev-title {
    display: block;
    font-size: 1.05rem;
    font-weight: 700;
    color: var(--dark-color);
    line-height: 1.3;
    word-break: break-word;
    transition: color 0.3s ease;
}

@media (hover: hover) and (pointer: fine) {
    .uev-link:hover .uev-title {
        color: var(--ufolep-color);
    }
}

.uev-meta {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 0.9rem;
    color: #666;
    line-height: 1.2;
    word-break: break-word;
}

.uev-meta i {
    flex-shrink: 0;
    color: var(--asso-color);
    font-size: 0.95rem;
}

.uev-chevron {
    flex-shrink: 0;
    width: 24px;
    height: 24px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--asso-color);
    font-size: 1rem;
    transition: all 0.3s ease;
    opacity: 0.6;
}

@media (hover: hover) and (pointer: fine) {
    .uev-link:hover .uev-chevron {
        opacity: 1;
        transform: translateX(4px);
        color: var(--ufolep-color);
    }
}

/* Section calendrier + événements en ligne horizontale */
.calendar-section {
    display: flex;
    flex-direction: row;
    gap: 20px;
    align-items: flex-start;
    margin-bottom: 20px;
}

.calendar {
    flex: 1;
    min-width: 0;
    background: #fff;
    border-radius: 16px;
    overflow: hidden;
    box-shadow: 0 8px 24px rgba(0,0,0,0.12);
    border: 1px solid rgba(216, 31, 77, 0.1);
    transition: all 0.3s ease;
}

.calendar:hover {
    box-shadow: 0 12px 32px rgba(0,0,0,0.15);
}

.calendar-header {
    text-align: center;
    background: linear-gradient(135deg, #d81f4d 0%, #a61b3e 100%);
    color: white;
    padding: 1.5rem;
    font-size: 1.5rem;
    position: relative;
    box-shadow: 0 4px 12px rgba(216, 31, 77, 0.3);
}

.calendar-navigation {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 10px;
}

.nav-arrow {
    display: flex;
    align-items: center;
    text-decoration: none;
    color: white;
    font-weight: bold;
    padding: 10px 16px;
    border-radius: 8px;
    transition: all 0.3s ease;
    position: relative;
    background: rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(10px);
}

.nav-arrow:hover {
    background: rgba(255, 255, 255, 0.25);
    transform: scale(1.05);
    box-shadow: 0 4px 12px rgba(0,0,0,0.2);
}

.nav-arrow .arrow {
    font-size: 2rem;
    font-weight: bold;
}

.nav-arrow .event-count {
    position: absolute;
    top: -8px;
    background: linear-gradient(135deg, #ffcc00 0%, #ff9900 100%);
    color: #333;
    border-radius: 50%;
    width: 24px;
    height: 24px;
    font-size: 0.75rem;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 800;
    box-shadow: 0 2px 8px rgba(255, 204, 0, 0.5);
    animation: pulse-count 2s ease-in-out infinite;
}

@keyframes pulse-count {
    0%, 100% {
        transform: scale(1);
        box-shadow: 0 2px 8px rgba(255, 204, 0, 0.5);
    }
    50% {
        transform: scale(1.1);
        box-shadow: 0 4px 16px rgba(255, 204, 0, 0.7);
    }
}

.prev .event-count {
    right: -8px;
}

.next .event-count {
    left: -8px;
}

.today-info {
    font-size: 0.9rem;
    color: rgba(255, 255, 255, 0.9);
    margin-top: 5px;
}

.calendar-grid {
    display: grid;
    grid-template-columns: repeat(7, 1fr);
    grid-template-rows: repeat(7, 1fr);
    background: #f7f7f7;
    gap: 1px;
}

.day-header {
    padding: 10px;
    text-align: center;
    font-weight: bold;
    background: #eaeaea;
    display: flex;
    align-items: center;
    justify-content: center;
}

.calendar-day {
    border: 1px solid #e9ecef;
    padding: 10px;
    position: relative;
    background: #fff;
    transition: all 0.3s ease;
    display: flex;
    flex-direction: column;
    overflow: hidden;
    min-height: 120px;
}

.calendar-day:hover {
    background: linear-gradient(135deg, rgba(52, 152, 219, 0.05) 0%, rgba(102, 126, 234, 0.05) 100%);
    transform: scale(1.02);
    box-shadow: 0 4px 12px rgba(0,0,0,0.1);
    z-index: 10;
}

.calendar-day.faded {
    background: #f8f9fa;
    color: #adb5bd;
}

.calendar-day.jour {
    background: linear-gradient(135deg, rgba(132, 36, 211, 0.1) 0%, rgba(102, 126, 234, 0.1) 100%);
    border: 2px solid #8424d3;
    box-shadow: 0 4px 12px rgba(132, 36, 211, 0.2);
}

.calendar-day.other-month {
    background: #f5f5f5;
    color: #999;
    opacity: 0.6;
}

.day-number {
    font-weight: 800;
    margin-bottom: 8px;
    font-size: 1.2rem;
    align-self: flex-start;
    color: #2c3e50;
}

.events-upcoming {
    font-size: 0.9rem;
    color: #555;
    margin-top: 5px;
}

.events-list {
    font-size: 0.75rem;
    flex-grow: 1;
    overflow-y: auto;
    max-height: 80px;
}

.event-item, .event-more {
    margin-bottom: 2px;
}

/* Couleurs dynamiques par événement (si variables CSS définies en inline) */
.event-item {
    --event-bg: rgba(46, 204, 113, 0.15);
    --event-bg-hover: #2ecc71;
    --event-fg: #333;
    --event-fg-hover: #ffffff;
}

.event-item a, .event-more a {
    display: block;
    padding: 3px 5px;
    border-radius: 3px;
    background-color: var(--event-bg, rgba(46, 204, 113, 0.15));
    color: var(--event-fg, #333);
    text-decoration: none;
    transition: background-color 0.3s ease;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    font-size: 0.7rem;
}

.event-item a:hover {
    background-color: var(--event-bg-hover, #2ecc71);
    color: var(--event-fg-hover, #ffffff);
}

/* Calendrier (vue mois) : titre à gauche, organisateur à droite */
.calendar-grid .event-item a {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 6px;
}

.calendar-grid .event-item a .event-title {
    flex: 1;
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

/* Badge organisateur (logo/nom) */
.event-org {
    flex: 0 0 auto;
    display: inline-flex;
    align-items: center;
    gap: 4px;
    max-width: 90px;
}

.event-org-logo {
    width: 14px;
    height: 14px;
    border-radius: 2px;
    object-fit: contain;
    background: rgba(255, 255, 255, 0.65);
}

.event-org-name {
    font-size: 0.65rem;
    opacity: 0.9;
    color: inherit;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.event-more a {
    background-color: rgba(231, 76, 60, 0.15);
    font-weight: bold;
}

.event-more a:hover {
    background-color: #e74c3c;
    color: white;
}

/* Responsive */
@media (max-width: 992px) {
    .calendrier-container {
        margin: 15px 0;
    }
    
    .calendar-section {
        flex-direction: column;
    }
    
    .events-upcoming {
        flex: 0 0 auto;
        width: 100%;
        max-width: 100%;
        order: 2;
    }
    
    .calendar {
        order: 1;
        width: 100%;
    }
    
    .calendar-grid {
        grid-template-columns: repeat(7, 1fr);
    }
    
    .calendar-day {
        min-height: 100px;
    }
    
    /* Liste d'événements responsive */
    .uev-link {
        padding: 16px;
        gap: 14px;
    }
    
    .uev-date-badge {
        min-width: 52px;
        height: 52px;
    }
    
    .uev-title {
        font-size: 1rem;
    }
    
    .uev-meta {
        font-size: 0.85rem;
    }
}

@media (max-width: 768px) {
    .calendrier-events {
        padding: 10px;
        gap: 20px;
    }
    
    /* Liste d'événements - tablet */
    .uev-list {
        gap: 14px;
    }
    
    .uev-link {
        padding: 14px;
        gap: 12px;
    }
    
    .uev-date-badge {
        min-width: 50px;
        height: 50px;
        font-size: 0.95rem;
    }
    
    .uev-day {
        font-size: 1.2rem;
    }
    
    .uev-month {
        font-size: 0.7rem;
    }
    
    .uev-title {
        font-size: 0.95rem;
    }
    
    .uev-meta {
        font-size: 0.8rem;
    }
    
    .calendar-grid {
        grid-template-columns: repeat(7, 1fr);
    }
    
    .calendar-day {
        min-height: 80px;
        padding: 5px;
    }
    
    .day-number {
        font-size: 0.9rem;
    }
    
    .events-list {
        font-size: 0.65rem;
    }
    
    .events-upcoming th, .events-upcoming td {
        padding: 10px 12px;
        font-size: 0.85rem;
    }
    
    .events-upcoming h3 {
        font-size: 1.2rem;
        margin-bottom: 16px;
    }
    
    .calendar-navigation h3 {
        font-size: 1.2rem;
    }
    
    .nav-arrow .arrow {
        font-size: 1.4rem;
    }
}

@media (max-width: 576px) {
    .calendrier-events {
        padding: 10px;
    }
    
    /* Liste d'événements - mobile */
    .uev-list {
        gap: 12px;
    }
    
    .uev-card {
        margin: 0;
    }
    
    .uev-link {
        padding: 12px;
        gap: 10px;
        flex-wrap: wrap;
    }
    
    .uev-date-badge {
        min-width: 48px;
        height: 48px;
        font-size: 0.9rem;
        order: -1;
    }
    
    .uev-day {
        font-size: 1.1rem;
    }
    
    .uev-month {
        font-size: 0.65rem;
    }
    
    .uev-body {
        flex: 1 100%;
        order: 0;
        gap: 4px;
    }
    
    .uev-title {
        font-size: 0.9rem;
        font-weight: 600;
    }
    
    .uev-meta {
        font-size: 0.75rem;
    }
    
    .uev-chevron {
        width: 20px;
        height: 20px;
        font-size: 0.9rem;
        order: 1;
    }
    
    .calendar-grid {
        grid-template-columns: repeat(7, 1fr);
    }
    
    .day-header {
        padding: 5px;
        font-size: 0.8rem;
    }
    
    .calendar-day {
        min-height: 70px;
    }
    
    .event-item a, .event-more a {
        padding: 2px 4px;
        font-size: 0.6rem;
    }
    
    .events-upcoming {
        padding: 18px 12px;
        flex: 0 0 auto;
        max-height: 500px;
    }
    
    .events-upcoming h3 {
        font-size: 1rem;
        margin-bottom: 12px;
        padding-bottom: 8px;
    }
    
    .events-upcoming th, .events-upcoming td {
        padding: 8px 10px;
        font-size: 0.8rem;
    }
    
    .events-upcoming td a {
        font-size: 0.8rem;
        padding: 3px 5px;
    }
    
    .events-upcoming td a::before {
        font-size: 0.6rem;
    }
    
    /* Pour les très petits écrans, rendre le tableau défilable */
    .events-upcoming {
        overflow-x: auto;
    }
    
    .calendar-navigation h3 {
        font-size: 1rem;
    }
    
    .today-info {
        font-size: 0.8rem;
    }
}

/* Accueil: cartes d'equipe et evenements lisibles sur toutes les largeurs. */
.team-grid-container {
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    align-items: stretch;
    gap: 1.25rem;
}

.team-member-card {
    aspect-ratio: auto;
    min-height: 0;
    height: auto;
    overflow: hidden;
    display: flex;
    flex-direction: column;
}

.team-member-front,
.team-member-back {
    position: static;
    min-height: 0;
    height: auto;
}

.team-member-front {
    flex: 1;
}

.tmc-header {
    padding: 1.5rem 1rem 1rem;
}

.tmc-name,
.tmc-role,
.tmc-desc {
    overflow-wrap: anywhere;
}

.tmc-name {
    line-height: 1.2;
}

.tmc-role {
    max-width: 100%;
}

.tmc-body {
    flex: 1;
    display: flex;
    flex-direction: column;
}

.tmc-desc {
    overflow: visible;
}

.events-upcoming {
    flex: 0 0 auto;
    min-width: 0;
    width: 100%;
    max-height: none;
    overflow: visible;
}

/* Sur l'accueil, le calendrier garde toute la largeur et les evenements
   prennent place dessous pour eviter une colonne trop etroite. */
.calendar-section {
    display: flex;
    flex-direction: column;
    width: 100%;
    gap: 24px;
}

.calendar-section .calendar {
    order: 1;
    width: 100%;
    min-width: 0;
}

.calendar-section .events-upcoming {
    order: 2;
}

.uev-link {
    min-height: 92px;
    max-height: none;
    align-items: center;
}

.uev-logo {
    width: 48px;
    height: 48px;
    object-fit: contain;
    flex: 0 0 48px;
    border-radius: 8px;
    background: #fff;
    padding: 4px;
    border: 1px solid rgba(0, 0, 0, .08);
}

.uev-meta {
    flex-wrap: wrap;
}

@media (max-width: 768px) {
    .team-grid-container {
        grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    }

    .team-member-card {
        min-height: 0;
    }

    .events-upcoming {
        padding: 20px 16px;
    }

    .uev-link {
        display: grid;
        grid-template-columns: 52px minmax(0, 1fr) 24px;
        gap: 12px;
        padding: 14px;
    }

    .uev-body {
        min-width: 0;
    }

    .uev-logo {
        grid-column: 2;
        grid-row: 2;
        width: 36px;
        height: 36px;
        flex-basis: auto;
    }
}

@media (max-width: 480px) {
    .team-grid-container {
        grid-template-columns: 1fr;
    }

    .uev-link {
        grid-template-columns: 48px minmax(0, 1fr) 20px;
        gap: 10px;
    }

    .uev-logo {
        display: none;
    }
}

.calendar-grid.loading {
    opacity: 0.6;
    position: relative;
    min-height: 200px;
}

.calendar-grid.loading::after {
    content: 'Chargement...';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    background: rgba(255,255,255,0.9);
    padding: 10px 20px;
    border-radius: 5px;
    font-size: 14px;
}

.nav-arrow {
    cursor: pointer;
    transition: background-color 0.3s;
}

.nav-arrow:hover {
    background-color: #f0f0f0;
}


/* ============= */
/* FOOTER */
/* ============= */
footer {
    margin-top: auto;
    margin-bottom: 0;
    background-color: #2c3e50;
    color: white;
    text-align: center;
    position: relative;
    bottom: 0;
    width: 100%;
    backdrop-filter: blur(10px);
    display: flex;
    flex-direction: row;
    align-items: center;
    justify-content: center;
    flex-wrap: nowrap;
}

footer a {
    color: white;
    text-decoration: none;
    font-weight: bold;
    padding: 0.1rem 0.5rem;

}

footer a:hover {
    background-color: #34495e;
}

footer div {
    margin: 0 auto;
}

/* ============= */
/*      VTA      */
/* ============= */
.vta-container {
    display: flex;
    flex-direction: row;
    height: auto;
}

.vta1 {
  width: 50%;
  background-color: #f0a; /* juste pour visualiser */
    display: flex;
    flex-direction: column;
    height: 100%;
}

.vtaright {
  width: 50%;
  display: flex;
  flex-direction: column;
    height: 100%;
}

.vta2 {
  height: 50%;
  background-color: #0af;
}

.vta3 {
  height: 50%;
  background-color: #0fa;
}

.vta {
  padding: 20px;
  box-sizing: border-box;
}

.vta-container h2 {
    font-size: 2rem;
    color: #2c3e50;
    margin-bottom: 1rem;
}
.vta-container p {
    font-size: 1.2rem;
    color: #7f8c8d;
    text-align: center;
    max-width: 600px;
    margin-bottom: 2rem;
}
.vta-container .vta-button {
    background-color: #e67e22;
    color: white;
    padding: 0.5rem 1rem;
    border-radius: 4px;
    text-decoration: none;
    font-size: 1.2rem;
    transition: background-color 0.3s ease;
}
.vta-container .vta-button:hover {
    background-color: #d35400;
}

/* ============= */
/* ANIMATIONS */
/* ============= */
@keyframes fadeSlide {
    from {
        opacity: 0;
        transform: translateX(20px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

/* ============= */
/* RESPONSIVE */
/* ============= */
.partenaires-list .carrousel-container .carrousel-content .carrousel-item {
    scroll-snap-align: start;
    background: rgba(255, 255, 255, 0);
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 4px 6px rgba(0,0,0,0.1);
    transition: transform 0.3s ease;
    width: 200px;
    animation: fadeSlide 0.5s ease forwards;
    padding: 0;
    margin: 0;
}


.boite h2 {
    font-size: 2rem;
    color: var(--ufolep-color);
    margin-bottom: 1rem;
    text-align: center;
    position: relative;
    padding: 10px 0;
    margin: 20px auto 10px 20px;
    display: inline-block;
    border-bottom: 2px solid transparent;
    transition: border-color 0.3s ease;
    /* laisser le titre tout le temps à gauche */
    text-align: left;
    border-bottom: 2px solid var(--ufolep-color);
}
.boite h2::after {
    content: "";
    position: absolute;
    left: 0;
    right: 0;
    bottom: 0;
    height: 2px;
    background: var(--ufolep-color);
    transform: scaleX(1);
    transition: transform 0.3s ease;
}

/* ============= */
/* page formations */
/* ============= */
.formations-page {
    padding: 20px;
    background: #f9f9f96c;
    border-radius: 8px;
    box-shadow: 0 2px 5px rgba(0,0,0,0.1);
    max-width: 1200px;
    margin: 60px auto 20px auto;
}

section.formations-list {
    display: flex;
    flex-direction: column;
    gap: 20px;
    margin-bottom: 40px;
    }
.formation-card {
    background: rgba(255, 255, 255, 0.219);
    border: 1px solid rgba(0, 0, 0, 0.1);
    border-radius: 8px;
    padding: 20px;
    transition: transform 0.3s ease;
}
.formation-card:hover {
    transform: translateY(-5px);
}
.formation-card h3 {
    margin-top: 0;
    color: #2c3e50;
}
.formation-card p {
    color: #555;
    line-height: 1.5;
}
.formation-card .details {
    margin-top: 10px;
    font-size: 0.9rem;
    color: #777;
}
.formation-card a.btn {
    display: inline-block;
    margin-top: 15px;
    padding: 10px 15px;
    background-color: #ff6b6b;
    color: white;
    text-decoration: none;
    border-radius: 5px;
    transition: background-color 0.3s ease;
}
.formation-card a.btn:hover {
    background-color: #e55a5a;
}

/* ============= */
/* page association (vie asso) */
/* ============= */
.associations-page {
    padding: 40px 32px;
    background: linear-gradient(135deg, rgba(255, 255, 255, 0.95) 0%, rgba(248, 248, 248, 0.9) 100%);
    border-radius: 20px;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.1);
    max-width: 1400px;
    margin: 60px auto 40px auto;
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.5);
}

.associations-page h1 {
    text-align: center;
    color: white;
    background: linear-gradient(135deg, var(--ufolep-color) 0%, var(--asso-color) 100%);
    padding: 24px 32px;
    margin: -40px -32px 32px -32px;
    border-radius: 20px 20px 0 0;
    font-size: 2.8rem;
    font-weight: 900;
    letter-spacing: -1px;
    text-transform: uppercase;
    box-shadow: 0 4px 16px rgba(255, 107, 107, 0.2);
}

.associations-page h2 {
    text-align: center;
    color: var(--ufolep-color);
    margin-bottom: 32px;
    font-size: 1.8rem;
    font-weight: 800;
    padding-bottom: 16px;
    border-bottom: 3px solid var(--asso-color);
    display: inline-block;
    position: relative;
    left: 50%;
    transform: translateX(-50%);
}

.associations-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 28px;
    margin-top: 40px;
}

.association-card {
    background: linear-gradient(135deg, rgba(255, 255, 255, 0.98) 0%, rgba(255, 255, 255, 0.95) 100%);
    border-radius: 16px;
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.08);
    padding: 32px 24px;
    text-align: center;
    transition: all 0.3s cubic-bezier(0.2, 0.8, 0.2, 1);
    border: 1px solid rgba(255, 255, 255, 0.4);
    position: relative;
    overflow: hidden;
}

.association-card::before {
    content: "";
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 4px;
    background: linear-gradient(90deg, var(--asso-color) 0%, var(--ufolep-color) 100%);
}

@media (hover: hover) and (pointer: fine) {
    .association-card:hover {
        transform: translateY(-12px) scale(1.02);
        box-shadow: 0 16px 40px rgba(0, 0, 0, 0.15);
        border-color: rgba(74, 144, 226, 0.3);
    }
}

.association-card img {
    max-width: 120px;
    height: auto;
    border-radius: 12px;
    margin-bottom: 20px;
    transition: transform 0.3s ease;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
    border: 3px solid var(--asso-color);
}

@media (hover: hover) and (pointer: fine) {
    .association-card:hover img {
        transform: scale(1.08) rotate(2deg);
    }
}

.association-card span {
    display: block;
    font-size: 1.4rem;
    color: var(--ufolep-color);
    margin-bottom: 12px;
    font-weight: 900;
    text-decoration: none;
    transition: color 0.3s ease;
}

@media (hover: hover) and (pointer: fine) {
    .association-card:hover span {
        color: var(--asso-color);
    }
}

.association-card p {
    color: #555;
    font-size: 0.95rem;
    line-height: 1.6;
    margin-bottom: 16px;
}

.association-card a.btn {
    display: inline-block;
    margin-top: 16px;
    padding: 12px 24px;
    background: linear-gradient(135deg, var(--asso-color) 0%, #357ab8 100%);
    color: white;
    text-decoration: none;
    border-radius: 8px;
    font-weight: 600;
    font-size: 0.95rem;
    transition: all 0.3s ease;
    box-shadow: 0 4px 12px rgba(74, 144, 226, 0.3);
}

@media (hover: hover) and (pointer: fine) {
    .association-card a.btn:hover {
        transform: translateY(-2px);
        box-shadow: 0 6px 20px rgba(74, 144, 226, 0.5);
        background: linear-gradient(135deg, #357ab8 0%, var(--asso-color) 100%);
    }
}

.association-card a.btn:active {
    transform: translateY(0);
}

/* ============= */
/* CHAT GÉNÉRAL */
/* ============= */
.chat-section {
    background: rgba(255, 255, 255, 0.8);
    border-radius: 8px;
    box-shadow: 0 2px 5px rgba(0,0,0,0.1);
    overflow: hidden;
    font-family: Arial, Helvetica, sans-serif;
    max-height: 1000px;
    margin-top: 50px;
    display: flex;
    flex-direction: column;
}

.chat-section .social-header {
    display: flex;
    align-items: center;
    padding: 15px;
    background: linear-gradient(to right, #f9f9f9, #eaeaea);
    border-bottom: 1px solid #ddd;
}

.chat-section .social-header i {
    font-size: 1.5rem;
    margin-right: 10px;
    color: #25D366; /* Vert WhatsApp */
}

.chat-section .social-header h3 {
    margin: 0;
    font-size: 1.2rem;
    color: #333;
}

/* Interface d'inscription */
.chat-registration {
    padding: 20px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    height: 100%;
}

.registration-form {
    background: white;
    padding: 25px;
    border-radius: 10px;
    box-shadow: 0 4px 12px rgba(0,0,0,0.1);
    width: 90%;
    max-width: 400px;
}

.registration-form h4 {
    margin-top: 0;
    color: #25D366;
    text-align: center;
    font-size: 1.5rem;
}

.registration-form p {
    text-align: center;
    color: #666;
    margin-bottom: 20px;
}

.form-group {
    margin-bottom: 15px;
}

.form-group label {
    display: block;
    margin-bottom: 5px;
    font-weight: bold;
    color: #333;
}

.form-group input, .form-group select {
    width: 100%;
    padding: 10px;
    border: 1px solid #ddd;
    border-radius: 5px;
    font-size: 1rem;
    box-sizing: border-box;
}

.btn-join {
    width: 100%;
    padding: 12px;
    background-color: #25D366;
    color: white;
    border: none;
    border-radius: 5px;
    font-size: 1rem;
    font-weight: bold;
    cursor: pointer;
    transition: background-color 0.3s ease;
}

.btn-join:hover {
    background-color: #128C7E;
}

/* Interface de chat */
.chat-interface {
    display: flex;
    flex-direction: column;
    height: 100%;
}

/* Onglets */
.chat-tabs {
    display: flex;
    background-color: #f0f0f0;
    border-bottom: 1px solid #ddd;
}

.chat-tab {
    flex: 1;
    padding: 12px;
    background: none;
    border: none;
    cursor: pointer;
    font-size: 0.9rem;
    transition: background-color 0.3s;
}

.chat-tab.active {
    background-color: white;
    border-bottom: 3px solid #25D366;
    font-weight: bold;
}

.chat-tab:hover:not(.active) {
    background-color: #e6e6e6;
}

/* Zone de messages */
.chat-messages {
    flex: 1;
    padding: 15px;
    overflow-y: auto;
    background-color: #e5ddd5; /* Fond WhatsApp */
    background-image: url("data:image/svg+xml,%3Csvg width='100' height='100' viewBox='0 0 100 100' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M11 18c3.866 0 7-3.134 7-7s-3.134-7-7-7-7 3.134-7 7 3.134 7 7 7zm48 25c3.866 0 7-3.134 7-7s-3.134-7-7-7-7 3.134-7 7 3.134 7 7 7zm-43-7c1.657 0 3-1.343 3-3s-1.343-3-3-3-3 1.343-3 3 1.343 3 3 3zm63 31c1.657 0 3-1.343 3-3s-1.343-3-3-3-3 1.343-3 3 1.343 3 3 3zM34 90c1.657 0 3-1.343 3-3s-1.343-3-3-3-3 1.343-3 3 1.343 3 3 3zm56-76c1.657 0 3-1.343 3-3s-1.343-3-3-3-3 1.343-3 3 1.343 3 3 3zM12 86c2.21 0 4-1.79 4-4s-1.79-4-4-4-4 1.79-4 4 1.79 4 4 4zm28-65c2.21 0 4-1.79 4-4s-1.79-4-4-4-4 1.79-4 4 1.79 4 4 4zm23-11c2.76 0 5-2.24 5-5s-2.24-5-5-5-5 2.24-5 5 2.24 5 5 5zm-6 60c2.21 0 4-1.79 4-4s-1.79-4-4-4-4 1.79-4 4 1.79 4 4 4zm29 22c2.76 0 5-2.24 5-5s-2.24-5-5-5-5 2.24-5 5 2.24 5 5 5zM32 63c2.76 0 5-2.24 5-5s-2.24-5-5-5-5 2.24-5 5 2.24 5 5 5zm57-13c2.76 0 5-2.24 5-5s-2.24-5-5-5-5 2.24-5 5 2.24 5 5 5zm-9-21c1.105 0 2-.895 2-2s-.895-2-2-2-2 .895-2 2 .895 2 2 2zM60 91c1.105 0 2-.895 2-2s-.895-2-2-2-2 .895-2 2 .895 2 2 2zM35 41c1.105 0 2-.895 2-2s-.895-2-2-2-2 .895-2 2 .895 2 2 2zM12 60c1.105 0 2-.895 2-2s-.895-2-2-2-2 .895-2 2 .895 2 2 2z' fill='%2391c788' fill-opacity='0.1' fill-rule='evenodd'/%3E%3C/svg%3E");
}

/* Style des messages */
.message {
    margin-bottom: 15px;
    display: flex;
    flex-direction: column;
    max-width: 80%;
}

.message.own {
    align-self: flex-end;
    align-items: flex-end;
}

.message.other {
    align-self: flex-start;
    align-items: flex-start;
}

.message-header {
    display: flex;
    align-items: center;
    margin-bottom: 5px;
    font-size: 0.8rem;
}

.message.own .message-header {
    flex-direction: row-reverse;
}

.user-name {
    font-weight: bold;
    margin: 0 5px;
    color: #075E54;
}

.user-category {
    color: #666;
    font-size: 0.7rem;
    background-color: #e0e0e0;
    padding: 2px 6px;
    border-radius: 10px;
}

.message-bubble {
    padding: 10px 15px;
    border-radius: 18px;
    position: relative;
    word-wrap: break-word;
}

.message.own .message-bubble {
    background-color: #DCF8C6; /* Vert clair WhatsApp pour ses propres messages */
    border-top-right-radius: 5px;
}

.message.other .message-bubble {
    background-color: white; /* Blanc pour les autres messages */
    border-top-left-radius: 5px;
}

.message-time {
    font-size: 0.7rem;
    color: #999;
    text-align: right;
    margin-top: 3px;
}

/* Zone de saisie */
.chat-input-container {
    padding: 15px;
    background-color: #f0f0f0;
    border-top: 1px solid #ddd;
}

.chat-input-wrapper {
    display: flex;
    align-items: center;
    background-color: white;
    border-radius: 20px;
    padding: 5px 15px;
    border: 1px solid #ddd;
}

#chat-input {
    flex: 1;
    border: none;
    outline: none;
    padding: 10px 0;
    font-size: 1rem;
}

.send-btn {
    background: none;
    border: none;
    color: #25D366;
    cursor: pointer;
    font-size: 1.2rem;
    padding: 5px;
    transition: color 0.3s;
}

.send-btn:hover {
    color: #128C7E;
}

.char-counter {
    text-align: right;
    font-size: 0.7rem;
    color: #999;
    margin-top: 5px;
}

/* Responsive */
@media (max-width: 768px) {
    .chat-section {
        height: 500px;
    }
    
    .message {
        max-width: 90%;
    }
}
/* ============= */
/* CHAT GÉNÉRAL - Version BD */
/* ============= */
.chat-section {
    background: rgba(255, 255, 255, 0.8);
    border-radius: 8px;
    box-shadow: 0 2px 5px rgba(0,0,0,0.1);
    overflow: hidden;
    font-family: Arial, Helvetica, sans-serif;
    max-height: 1500px;
    margin-top: 50px;
    display: flex;
    flex-direction: column;
}

.chat-section .social-header {
    display: flex;
    align-items: center;
    padding: 15px;
    background: linear-gradient(to right, #f9f9f9, #eaeaea);
    border-bottom: 1px solid #ddd;
    position: relative;
}

.chat-section .social-header i {
    font-size: 1.5rem;
    margin-right: 10px;
    color: #25D366;
}

.chat-section .social-header h3 {
    margin: 0;
    font-size: 1.2rem;
    color: #333;
    flex-grow: 1;
}

.online-indicator {
    display: flex;
    align-items: center;
    font-size: 0.8rem;
    color: #666;
}

.dot {
    width: 8px;
    height: 8px;
    background-color: #25D366;
    border-radius: 50%;
    margin-right: 5px;
    animation: pulse 2s infinite;
}

@keyframes pulse {
    0% { opacity: 1; }
    50% { opacity: 0.5; }
    100% { opacity: 1; }
}

/* Indicateurs d'onglets */
.tab-notification {
    background: #e74c3c;
    color: white;
    border-radius: 10px;
    padding: 2px 6px;
    font-size: 0.7rem;
    margin-left: 5px;
}

/* Reste du CSS identique à précédemment... */
/* [Le reste de votre CSS précédent reste inchangé] */

.loading-messages {
    text-align: center;
    padding: 20px;
    color: #666;
    font-style: italic;
}

/* ==================== */
/* RESPONSIVITÉ AVANCÉE */
/* ==================== */

/* Grands écrans (1920px et plus) */
@media (min-width: 1920px) {
    .boite, .admin-container, .associations-page, .formations-page {
        max-width: 1800px;
        margin: 0 auto;
    }
    
    .main-layout {
        max-width: 1600px;
    }
    
    .carrousel-item {
        flex: 0 0 calc(25% - 1rem);
        max-width: calc(25% - 1rem);
    }
}

/* Tablettes paysage (1024px - 1366px) */
@media (max-width: 1366px) and (min-width: 1024px) {
    .main-layout {
        gap: 15px;
    }
    
    .main-column {
        width: 900px;
    }
    
    .social-column {
        width: 350px;
    }
    
    .carrousel-item {
        flex: 0 0 calc(50% - 1rem);
        max-width: calc(50% - 1rem);
    }
    
    .partenaires-grid-container {
        grid-template-columns: repeat(6, 1fr);
        grid-template-rows: repeat(4, 1fr);
    }
}

/* Tablettes portrait (768px - 1023px) */
@media (max-width: 1023px) and (min-width: 768px) {
    .main-layout {
        flex-direction: column;
        gap: 20px;
    }
    
    .main-column, .social-column {
        width: 100%;
    }
    
    .social-feed {
        position: static;
        width: 100%;
        display: grid;
        grid-template-columns: repeat(2, 1fr);
        gap: 20px;
    }
    
    .carrousel-item {
        flex: 0 0 calc(50% - 1rem);
        max-width: calc(50% - 1rem);
    }
    
    .partenaires-grid-container {
        grid-template-columns: repeat(4, 1fr);
        grid-template-rows: repeat(5, 1fr);
    }
    
    .calendrier-container {
        flex-direction: column;
    }
    
    .calendar-section {
        order: 1;
    }
    
    .events-upcoming {
        order: 2;
        width: 100%;
        max-height: none;
    }
    
    header .menu {
        flex-wrap: wrap;
        justify-content: center;
    }
    
    #nav, #navlast {
        font-size: 1rem;
        padding: 15px 10px;
    }
}

/* Smartphones paysage (568px - 767px) */
@media (max-width: 767px) and (min-width: 568px) {
    body {
        font-size: 14px;
    }
    
    .main-layout {
        flex-direction: column;
    }
    
    .social-feed {
        grid-template-columns: 1fr;
    }
    
    .carrousel-container {
        padding: 0 10px;
    }
    
    .carrousel-item {
        flex: 0 0 100%;
        max-width: 100%;
    }
    
    .carrousel-nav {
        width: 35px;
        height: 35px;
    }
    
    .partenaires-grid-container {
        grid-template-columns: repeat(3, 1fr);
        grid-template-rows: repeat(6, 1fr);
    }
    
    .calendrier-events {
        padding: 10px;
        margin: 10px auto;
    }
    
    .calendar-grid {
        grid-template-columns: repeat(7, 1fr);
    }
    
    .calendar-day {
        min-height: 80px;
        padding: 5px;
        font-size: 0.8rem;
    }
    
    .day-number {
        font-size: 0.9rem;
    }
    
    .event-item a, .event-more a {
        font-size: 0.6rem;
        padding: 2px 4px;
    }
    
    header {
        height: auto;
        min-height: 100px;
    }
    
    header::after {
        top: 100px;
        height: 30px;
    }
    
    .menu {
        flex-direction: column;
        height: auto;
        padding: 10px 0;
    }
    
    .logo {
        height: 60px;
        margin: 0 auto;
    }
    
    header p {
        position: static;
        margin: 10px auto;
        text-align: center;
        max-width: 90%;
    }
    
    #nav, #navlast {
        width: 90%;
        margin: 5px auto;
        font-size: 0.9rem;
        padding: 10px;
    }
}

/* Smartphones portrait (320px - 567px) */
@media (max-width: 567px) {
    body {
        font-size: 13px;
    }
    
    .boite {
        padding: 5px;
    }
    
    .main-layout {
        flex-direction: column;
        gap: 15px;
    }
    
    .social-feed {
        grid-template-columns: 1fr;
        gap: 15px;
    }
    
    .carrousel-section {
        padding: 5px;
    }
    
    .carrousel-container {
        padding: 0 5px;
    }
    
    .carrousel-item {
        flex: 0 0 100%;
        max-width: 100%;
        margin: 0 5px;
    }
    
    .carrousel-nav {
        width: 30px;
        height: 30px;
        font-size: 1rem;
    }
    
    .carrousel-title {
        font-size: 1.5rem;
    }
    
    .partenaires-grid-container {
        grid-template-columns: repeat(2, 1fr);
        grid-template-rows: repeat(8, 1fr);
        gap: 0.5rem;
    }
    
    .partenaire-card {
        aspect-ratio: 1/1;
    }
    
    .calendrier-events {
        padding: 5px;
        margin: 5px auto;
    }
    
    .calendar {
        border-radius: 5px;
    }
    
    .calendar-header {
        padding: 0.8rem;
    }
    
    .calendar-navigation h3 {
        font-size: 1.1rem;
    }
    
    .calendar-grid {
        grid-template-columns: repeat(7, 1fr);
    }
    
    .day-header {
        padding: 5px;
        font-size: 0.7rem;
    }
    
    .calendar-day {
        min-height: 60px;
        padding: 3px;
    }
    
    .day-number {
        font-size: 0.8rem;
    }
    
    
    .events-upcoming table {
        font-size: 0.8rem;
    }
    
    .events-upcoming th, 
    .events-upcoming td {
        padding: 6px 8px;
    }
    
    header {
        height: auto;
        min-height: 80px;
    }
    
    header::after {
        top: 80px;
        height: 20px;
    }
    
    .menu {
        flex-direction: column;
        height: auto;
        padding: 5px 0;
    }
    
    .logo {
        height: 50px;
    }
    
    header p {
        display: none; /* Cacher la description sur mobile très petit */
    }
    
    #nav, #navlast {
        width: 95%;
        margin: 2px auto;
        font-size: 0.8rem;
        padding: 8px;
    }
    
    /* Amélioration de l'accessibilité tactile */
    button, .btn, a {
        min-height: 44px;
        min-width: 44px;
        display: flex;
        align-items: center;
        justify-content: center;
    }
    
    /* Correction du viewport pour iOS */
    @supports (-webkit-touch-callout: none) {
        .calendar-day {
            min-height: 70px;
        }
    }
}

/* Très petits écrans (moins de 320px) */
@media (max-width: 319px) {
    body {
        font-size: 12px;
    }
    
    .boite {
        padding: 2px;
    }
    
    .carrousel-title {
        font-size: 1.2rem;
    }
    
    .partenaires-grid-container {
        grid-template-columns: 1fr;
        grid-template-rows: repeat(12, 1fr);
    }
    
    .calendar-day {
        min-height: 50px;
    }
    
    .day-number {
        font-size: 0.7rem;
    }
    
    #nav, #navlast {
        font-size: 0.7rem;
        padding: 6px;
    }
}

/* Orientation paysage sur mobile */
@media (max-height: 500px) and (orientation: landscape) {
    header {
        height: 60px;
    }
    
    header::after {
        top: 60px;
    }
    
    .menu {
        flex-direction: row;
        height: 60px;
    }
    
    .logo {
        height: 40px;
    }
    
    #nav, #navlast {
        padding: 5px 8px;
        font-size: 0.8rem;
    }
    
    .carrousel-section {
        padding: 5px;
    }
    
    .calendrier-events {
        min-height: auto;
    }
}


/* Réduction de mouvement pour accessibilité */
@media (prefers-reduced-motion: reduce) {
    * {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
    
    .loading-screen {
        transition: none;
    }
}

/* Hauteur d'écran limitée */
@media (max-height: 600px) {
    .social-section {
        height: 300px;
    }
    
    .calendrier-events {
        min-height: auto;
    }
}


/* Carrousel responsive (ajoute à assets/css/style.css) */
.carrousel-container {
  position: relative;
  overflow: hidden;
  width: 100%;
}

.carrousel-content {
  width: 100%;
  box-sizing: border-box;
}

/* track gère le translateX */
.carrousel-track {
  display: flex;
  gap: 1rem;
}

.carrousel-group {
  display: flex;
  align-items: stretch;
  justify-content: center;
  gap: 1rem;
  width: 100%;
}

.carrousel-item {
  background: white;
  box-shadow: 0 6px 18px rgba(0,0,0,0.06);
  border-radius: 8px;
  overflow: hidden;
  display: flex;
  flex-direction: column;
}

/* Nav buttons */
.carrousel-nav {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  z-index: 5;
  border: none;
  background: rgba(0,0,0,0.5);
  color: white;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  cursor: pointer;
}
.carrousel-nav.left { left: 8px; }
.carrousel-nav.right { right: 8px; }

/* Indicators */
.carrousel-indicators {
  display:flex;
  gap: .5rem;
  justify-content:center;
  margin-top: .8rem;
}
.carrousel-indicator {
  width:10px;
  height:10px;
  border-radius:50%;
  background:#ddd;
  border:none;
  cursor:pointer;
}
.carrousel-indicator.active {
  background: var(--accent-color, #3498db);
}


/* Small screens */
@media (max-width: 600px) {
  .carrousel-nav { width:36px; height:36px; }
  .carrousel-item { padding: .6rem; }
}

/* Accessibility: focus states */
.carrousel-container:focus { outline: 2px solid rgba(52,152,219,.25); }

/* Calendar responsive fixes */
.calendar-grid {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  gap: 6px;
}
.calendar-day {
  min-height: 90px; /* plus grand pour mobile */
  padding: .5rem;
  box-sizing: border-box;
  display:flex;
  flex-direction:column;
  justify-content: flex-start;
}
.day-number { font-size: .9rem; font-weight:600; }
@media (max-width: 768px) {
  .calendar-day { min-height: 68px; padding: .45rem; }
  .day-number { font-size: .75rem; }
}

/* ============= */
/* HEADER RESPONSIVE */
/* ============= */

/* Tablettes (768px - 1024px) */
@media (max-width: 1615px) {
    header {
        height: auto;
        min-height: 100px;
    }
    
    
    .menu {
        flex-wrap: wrap;
        justify-content: center;
        height: auto;
        padding: 10px 0;
    }
    
    .logo {
        height: 80px;
        margin: 0 auto;
        order: 1;
    }
    
    header p {
        position: static;
        margin: 10px auto;
        text-align: center;
        max-width: 90%;
        order: 2;
        flex: 1 0 100%; /* Prend 100% de la largeur et passe à la ligne */
    }
    
    #nav, #navlast {
        font-size: 1rem;
        padding: 12px 10px;
        margin: 3px 5px;
        order: 3;
    }
}

/* Mobiles paysage (568px - 767px) */
@media (max-width: 767px) {
    header {
        height: auto;
        min-height: 80px;
    }
    
    header::after {
        top: 80px;
        height: 20px;
    }
    
    .menu {
        flex-direction: column;
        height: auto;
        padding: 5px 0;
    }
    
    .logo {
        height: 60px;
        margin: 0 auto 5px auto;
    }
    
    header p {
        font-size: 10px;
        margin: 5px auto 10px auto;
        max-width: 95%;
    }
    
    #nav, #navlast {
        width: 95%;
        margin: 2px auto;
        font-size: 0.9rem;
        padding: 8px;
        text-align: center;
    }
}

/* Mobiles portrait (320px - 567px) */
@media (max-width: 567px) {
    header {
        min-height: 70px;
    }
    
    header::after {
        top: 70px;
        height: 15px;
    }
    
    .logo {
        height: 50px;
    }
    
    header p {
        font-size: 9px;
        display: none; /* Optionnel : cacher la description sur très petits écrans */
    }
    
    #nav, #navlast {
        font-size: 0.8rem;
        padding: 6px;
    }
    
    .menu {
        padding: 3px 0;
    }
}

/* Orientation paysage sur mobile */
@media (max-height: 500px) and (orientation: landscape) {
    header {
        height: 60px;
    }
    
    header::after {
        top: 60px;
    }
    
    .menu {
        flex-direction: row;
        height: 60px;
        padding: 5px 0;
    }
    
    .logo {
        height: 40px;
        margin: 0 10px 0 0;
    }
    
    header p {
        display: none; /* Cacher en paysage pour gagner de l'espace */
    }
    
    #nav, #navlast {
        padding: 5px 8px;
        font-size: 0.8rem;
        margin: 0 2px;
    }
}

/* Menu burger pour mobiles */
.menu-toggle {
    display: none;
    background: var(--ufolep-color);
    color: white;
    border: none;
    padding: 10px 15px;
    border-radius: 4px;
    cursor: pointer;
    font-size: 1rem;
    margin: 10px auto;
    width: 90%;
}

.menu-toggle-icon {
    position: relative;
    display: inline-flex;
    flex-direction: column;
    justify-content: space-between;
    width: 22px;
    height: 18px;
    flex: 0 0 22px;
}

.menu-toggle-icon span {
    display: block;
    width: 100%;
    height: 2px;
    background: currentColor;
    border-radius: 2px;
    transition: transform .2s ease, opacity .2s ease;
}

.menu-toggle[aria-expanded="true"] .menu-toggle-icon span:first-child {
    transform: translateY(8px) rotate(45deg);
}

.menu-toggle[aria-expanded="true"] .menu-toggle-icon span:nth-child(2) {
    opacity: 0;
}

.menu-toggle[aria-expanded="true"] .menu-toggle-icon span:last-child {
    transform: translateY(-8px) rotate(-45deg);
}

/* Cacher les éléments du menu sur mobile par défaut */
@media (max-width: 767px) {
    .menu {
        flex-direction: column;
        align-items: center;
    }
    
    .menu > *:not(.logo):not(.menu-toggle) {
        display: none;
    }

    .menu.active > #nav,
    .menu.active > #navlast {
        display: flex;
    }
    
    .menu.active > * {
        width: 100%;
    }
    
    .menu-toggle {
        display: block;
        order: 2;
    }

    
    .logo {
        order: 1;
    }
    
    header p {
        order: 3;
    }
    
    #nav, #navlast {
        order: 4;
    }
}
/* ==================== */
/* RESPONSIVE COMPLET */
/* ==================== */

/* Grands écrans 4K */
@media (min-width: 1921px) {
    .boite, .admin-container {
        max-width: 1800px;
        margin: 0 auto;
    }
    
    .main-layout {
        max-width: 1600px;
    }
    
    .carrousel-item {
        flex: 0 0 calc(25% - 1rem);
        max-width: calc(25% - 1rem);
    }
}

/* Écrans larges (1201px - 1920px) */
@media (max-width: 1615px)  {
header .menu {
        flex-wrap: wrap;
        justify-content: center;
        height: auto;
        padding: 10px 0;
    }
    
    #nav, #navlast {
        font-size: 1rem;
        padding: 12px 10px;
        margin: 5px;
    }
    
    .logo {
        height: 80px;
        margin: 0 auto;
    }
    
    header p {
        text-align: center;
        margin: 10px auto;
        position: static;
        max-width: 100%;
    }
    
    .header ::after {
        top: 184px;
        height: 30px;
    }
    .boite, .admin-container, .associations-page, .formations-page {
        margin-bottom: 60px;
        position: relative;
    }
}

/* Tablettes paysage (1024px - 1200px) */
@media (max-width: 1200px) and (min-width: 1024px) {
    .main-layout {
        gap: 15px;
    }
    
    .main-column {
        width: 700px;
    }
    
    .social-column {
        width: 300px;
    }
    
    .carrousel-item {
        flex: 0 0 calc(50% - 1rem);
        max-width: calc(50% - 1rem);
    }
    
    .partenaires-grid-container {
        grid-template-columns: repeat(4, 1fr);
        grid-template-rows: repeat(4, 1fr);
    }
    
    .association-info h2 a {
        font-size: 1.5rem;
    }
}
.associations-page{
    width: 65%;
}
.liasto{
    width: 30%;
}
/* Tablettes portrait (768px - 1023px) */
@media (max-width: 1250px)  {
    .main-layout {
        flex-direction: column;
        gap: 20px;
    }
    
    .associations-page{
        width: 95%;
    }

    .main-column, .social-column {
        width: 100%;
    }
    
    .social-feed {
        position: static;
        width: 100%;
        display: grid;
        grid-template-columns: repeat(2, 1fr);
        gap: 20px;
    }
    
    .carrousel-item {
        flex: 0 0 calc(50% - 1rem);
        max-width: calc(50% - 1rem);
    }
    
    .partenaires-grid-container {
        grid-template-columns: repeat(3, 1fr);
        grid-template-rows: repeat(5, 1fr);
    }
    
    .calendrier-container {
        margin: 10px 0;
    }
    
    .calendar-section {
        flex-direction: column;
    }
    
    .events-upcoming {
        flex: 0 0 auto;
        width: 100%;
        max-width: 100%;
        max-height: none;
    }
    
    .calendar {
        width: 100%;
    }
    
    
    .association-info h2 a {
        font-size: 1.3rem;
    }
    
    /* Articles responsive */
    .actu-card {
        padding: 24px;
    }
    
    .actu-content h2 {
        font-size: 1.6rem;
    }
    
    .article-content {
        font-size: 1rem;
    }
    
    .associations-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 20px;
    }
}

/* Smartphones paysage (568px - 767px) */
@media (max-width: 767px) {
    body {
        font-size: 14px;
    }
    
    .main-layout {
        flex-direction: column;
    }
    
    .social-feed {
        grid-template-columns: 1fr;
    }
    
    .carrousel-container {
        padding: 0 10px;
    }
    
    .carrousel-item {
        flex: 0 0 100%;
        max-width: 100%;
        margin: 0 5px;
    }
    
    .carrousel-nav {
        width: 35px;
        height: 35px;
        font-size: 1rem;
    }
    
    .partenaires-grid-container {
        grid-template-columns: repeat(2, 1fr);
        grid-template-rows: repeat(6, 1fr);
        gap: 0.8rem;
    }
    
    .calendrier-events {
        padding: 10px;
        margin: 10px auto;
    }
    
    .calendar-grid {
        grid-template-columns: repeat(7, 1fr);
    }
    
    .calendar-day {
        min-height: 70px;
        padding: 5px;
        font-size: 0.8rem;
    }
    
    .day-number {
        font-size: 0.9rem;
    }
    
    .event-item a, .event-more a {
        font-size: 0.6rem;
        padding: 2px 4px;
    }
    
    header {
        height: auto;
        min-height: 100px;
    }
    
    header::after {
        top: 100px;
        height: 30px;
    }
    
    .menu {
        flex-direction: column;
        height: auto;
        padding: 10px 0;
    }
    
    .logo {
        height: 70px;
        margin: 0 auto;
    }
    
    header p {
        display: block;
        position: static;
        margin: 10px auto;
        text-align: center;
        max-width: 90%;
        font-size: 0.9rem;
    }
    
    #nav, #navlast {
        width: 90%;
        margin: 3px auto;
        font-size: 0.9rem;
        padding: 10px;
    }
    
    .association-info h2 a {
        font-size: 1.2rem;
    }
    
    /* Articles responsive - tablets */
    .actu-card {
        padding: 20px;
    }
    
    .actu-content h2 {
        font-size: 1.4rem;
    }
    
    .article-content {
        font-size: 0.95rem;
        line-height: 1.7;
    }
    
    .associations-grid {
        grid-template-columns: 1fr;
        gap: 16px;
    }
    
    .associations-page {
        padding: 20px;
    }
    
    .associations-page h1 {
        font-size: 2rem;
        padding: 16px;
        margin: -20px -20px 20px -20px;
    }
}

/* Smartphones portrait (320px - 567px) */
@media (max-width: 567px) {
    body {
        font-size: 13px;
        min-height: auto;
    }
    
    .boite {
        padding: 5px;
    }
    
    .main-layout {
        flex-direction: column;
        gap: 15px;
    }
    
    .social-feed {
        grid-template-columns: 1fr;
        gap: 15px;
    }
    
    
    .carrousel-container {
        padding: 0 5px;
    }
    
    .carrousel-item {
        flex: 0 0 100%;
        max-width: 100%;
        margin: 0 2px;
    }
    
    .carrousel-nav {
        width: 30px;
        height: 30px;
        font-size: 0.9rem;
    }
    
    .carrousel-title {
        font-size: 1.3rem;
    }
    
    .partenaires-grid-container {
        grid-template-columns: repeat(2, 1fr);
        grid-template-rows: repeat(8, 1fr);
        gap: 0.5rem;
    }
    
    .partenaire-card {
        aspect-ratio: 1/1;
    }
    
    .calendrier-events {
        padding: 5px;
        margin: 5px auto;
        min-height: auto;
    }
    
    .calendar {
        border-radius: 5px;
    }
    
    .calendar-header {
        padding: 0.8rem;
    }
    
    .calendar-navigation h3 {
        font-size: 1.1rem;
    }
    
    .calendar-grid {
        grid-template-columns: repeat(7, 1fr);
        gap: 3px;
    }
    
    .day-header {
        padding: 5px;
        font-size: 0.7rem;
    }
    
    .calendar-day {
        min-height: 60px;
        padding: 3px;
    }
    
    .day-number {
        font-size: 0.8rem;
    }
    

    
    .events-upcoming table {
        font-size: 0.8rem;
    }
    
    .events-upcoming th, 
    .events-upcoming td {
        padding: 6px 8px;
    }
    
    header {
        height: auto;
        min-height: 80px;
    }
    
    header::after {
        top: 80px;
        height: 20px;
    }
    
    .logo {
        height: 60px;
    }
    
    header p {
        display: none;
    }
    
    #nav, #navlast {
        width: 95%;
        margin: 2px auto;
        font-size: 0.8rem;
        padding: 8px;
    }
    
    .association-info h2 a {
        font-size: 1.1rem;
    }
    
    /* Articles responsive - mobile */
    .actu-card {
        padding: 16px;
        margin-bottom: 16px;
    }
    
    .actu-content h2 {
        font-size: 1.3rem;
        margin-bottom: 12px;
    }
    
    .actu-content time {
        font-size: 0.85rem;
        margin-bottom: 16px;
    }
    
    .article-content {
        font-size: 0.9rem;
        line-height: 1.6;
    }
    
    .article-content h3 {
        font-size: 1.2rem;
        margin: 16px 0 8px 0;
    }
    
    .actu-attachments h3,
    .article-attachments h3 {
        font-size: 1rem;
    }
    
    .associations-page {
        padding: 16px;
        margin: 40px auto 20px auto;
    }
    
    .associations-page h1 {
        font-size: 1.6rem;
        padding: 12px;
        margin: -16px -16px 16px -16px;
    }
    
    .associations-grid {
        grid-template-columns: 1fr;
        gap: 12px;
    }
    
    .association-card {
        padding: 16px 12px;
    }
    
    .association-card img {
        max-width: 100px;
    }
    
    .association-card span {
        font-size: 1.1rem;
    }
    
    /* Amélioration de l'accessibilité tactile */
    button, .btn, a, .carrousel-nav, .nav-arrow {
        min-height: 44px;
        min-width: 44px;
        display: flex;
        align-items: center;
        justify-content: center;
    }
    
    .carrousel-indicator {
        width: 10px;
        height: 10px;
    }
}

/* Très petits écrans (moins de 320px) */
@media (max-width: 319px) {
    body {
        font-size: 12px;
    }
    
    .boite {
        padding: 2px;
    }
    
    .carrousel-title {
        font-size: 1.1rem;
    }
    
    .partenaires-grid-container {
        grid-template-columns: 1fr;
        grid-template-rows: repeat(12, 1fr);
    }
    
    .calendar-day {
        min-height: 50px;
    }
    
    .day-number {
        font-size: 0.7rem;
    }
    
    #nav, #navlast {
        font-size: 0.7rem;
        padding: 6px;
    }
    
    .association-info h2 a {
        font-size: 1rem;
    }
}

/* Orientation paysage sur mobile */
@media (max-height: 500px) and (orientation: landscape) {
    header {
        height: 60px;
    }
    
    header::after {
        top: 60px;
    }
    
    .menu {
        flex-direction: row;
        height: 60px;
        flex-wrap: nowrap;
        overflow-x: auto;
    }
    
    .logo {
        height: 40px;
        margin-right: 10px;
    }
    
    #nav, #navlast {
        padding: 5px 8px;
        font-size: 0.8rem;
        white-space: nowrap;
    }
    
    .carrousel-section {
        padding: 5px;
    }
    
    .calendrier-events {
        min-height: auto;
    }
    
    .social-section {
        height: 250px;
    }
}

/* Correction hauteur pour iOS */
@supports (-webkit-touch-callout: none) {
    .calendar-day {
        min-height: 70px;
    }
    
    .loading-screen {
        height: -webkit-fill-available;
    }
}

/* Réduction de mouvement pour accessibilité */
@media (prefers-reduced-motion: reduce) {
    * {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
    
    .carrousel-content {
        transition: none;
    }
    
    .loading-screen {
        transition: none;
    }
}

/* Header responsive amélioré */
@media (max-width: 767px) {
    header {
        position: relative;
    }
    
    .menu {
        flex-direction: column;
        height: auto;
        padding: 10px 0;
    }
    
    .logo {
        height: 70px;
        margin: 0 auto 10px;
    }
    
    header p {
        display: block;
        position: static;
        margin: 0 auto 10px;
        text-align: center;
        max-width: 90%;
        font-size: 0.9rem;
    }
    
    #nav, #navlast {
        width: 90%;
        margin: 3px auto;
        font-size: 0.9rem;
        padding: 12px;
        text-align: center;
    }
}

/* Pour les très petits écrans, simplifier le header */
@media (max-width: 380px) {
    #nav, #navlast {
        font-size: 0.8rem;
        padding: 10px 8px;
    }
    
    .logo {
        height: 60px;
    }
    
    header p {
        font-size: 0.8rem;
    }
}

/* Amélioration du focus pour accessibilité */
#nav:focus, #navlast:focus {
    outline: 2px solid #ff6b6b;
    outline-offset: 2px;
}

/* Transition fluide pour les interactions */
#nav, #navlast {
    transition: all 0.3s ease;
}

/* Styles modernisés pour les sections */
.carrousel-section {
    background: linear-gradient(135deg, rgba(255,255,255,0.9) 0%, rgba(240,240,240,0.8) 100%);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255,255,255,0.2);
    box-shadow: 0 8px 32px rgba(0,0,0,0.1);
}

.partenaires-grid-section {
    background: linear-gradient(135deg, rgba(255,255,255,0.95) 0%, rgba(248,248,248,0.9) 100%);
}

.calendrier-events {
    background: linear-gradient(135deg, rgba(255,255,255,0.95) 0%, rgba(249,249,249,0.9) 100%) !important;
    backdrop-filter: blur(10px);
}

/* Effets de hover modernes */
.carrousel-item {
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    background: white;
    border: 1px solid rgba(0,0,0,0.05);
}

.carrousel-item:hover {
    transform: translateY(-8px);
    box-shadow: 0 20px 40px rgba(0,0,0,0.15);
}

.partenaire-card {
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    background: white;
    border: 1px solid rgba(0,0,0,0.05);
}

.partenaire-card:hover {
    transform: scale(1.05) rotate(1deg);
    box-shadow: 0 15px 30px rgba(0,0,0,0.2);
}

@media (max-width: 767px) {
    .menu-toggle {
        display: block;
        order: 2;
    }
    #nav, #navlast {
        display: none;
    }

}

/* IMPORTANT: règle corrigée (pas de nesting CSS en vanilla). */
.menu.active #nav,
.menu.active #navlast {
    display: block;
    width: 100%;
    text-align: center;
    margin: 5px 0;
}

/* ================================ */
/* NAV MOBILE - STABILISATION FINALE */
/* ================================ */
@media (max-width: 768px) {
    header {
        position: relative;
        height: var(--ufolep-menu-height, 120px);
    }

    header::after {
        top: var(--ufolep-menu-height, 120px);
    }

    .menu {
        flex-direction: column;
        align-items: stretch;
        justify-content: flex-start;
        height: auto;
        min-height: 72px;
        padding: 10px;
        gap: 6px;
    }

    .logo {
        height: 60px;
        margin: 0 auto;
    }

    header p {
        display: none !important;
    }

    .menu-toggle {
        display: block;
        width: 100%;
        margin: 8px 0;
        order: 2;
    }

    .menu #nav,
    .menu #navlast {
        display: none;
        width: 100%;
        text-align: center;
        margin: 6px 0;
        order: 3;
    }

    .menu.active #nav,
    .menu.active #navlast {
        display: block;
    }

    .menu.active {
        max-height: 100vh;
        overflow-y: auto;
        -webkit-overflow-scrolling: touch;
    }
}

/* CORRECTION MOBILE - À AJOUTER EN PREMIER */
@media (max-width: 568px) {
    /* Reset et organisation générale */
    body {
        font-size: 14px;
        min-height: auto;
        overflow-x: hidden;
    }
    
    /* Header simplifié */
    header {
        height: auto;
        min-height: 70px;
        position: fixed;
        top: 0;
        z-index: 1000;
    }
    
    header::after {
        top: 70px;
        height: 15px;
    }
    
    .menu {
        flex-direction: column;
        height: auto;
        padding: 5px 0;
        flex-wrap: nowrap;
    }
    
    .logo {
        height: 50px;
        margin: 0 auto;
    }
    
    header p {
        display: none; /* Cache la description */
    }
    
    #nav, #navlast {
        width: 95%;
        margin: 2px auto;
        font-size: 0.8rem;
        padding: 8px;
        text-align: center;
        order: 3;
    }
    
    /* Layout principal */
    .main-layout {
        flex-direction: column;
        gap: 10px;
        width: 100%;
        padding: 0 5px;
    }
    
    .main-column, .social-column {
        width: 100%;
    }
    
    /* Carrousel mobile */
    .carrousel-container {
        padding: 0;
    }
    
    .carrousel-item {
        flex: 0 0 95% !important;
        max-width: 95% !important;
        margin: 0 2.5%;
    }
    
    .carrousel-nav {
        width: 30px;
        height: 30px;
        font-size: 0.8rem;
    }
    
    /* Grille partenaires */
    .partenaires-grid-container {
        grid-template-columns: repeat(2, 1fr) !important;
        grid-template-rows: auto;
        gap: 8px;
        width: 100%;
        padding: 0 5px;
    }
    
    .partenaire-card {
        aspect-ratio: 1/1;
        min-height: 0;
    }
    
    /* Calendrier mobile */
    .calendrier-events {
        padding: 5px;
        margin: 5px auto;
        min-height: auto;
        width: 100%;
        overflow-x: hidden;
    }
    
    .calendar-grid {
        grid-template-columns: repeat(7, 1fr);
        gap: 2px;
    }
    
    .calendar-day {
        min-height: 50px;
        padding: 2px;
        font-size: 0.7rem;
    }
    
    .day-number {
        font-size: 0.7rem;
    }
    
    
    /* Social feeds */
    .social-feed {
        grid-template-columns: 1fr;
        gap: 10px;
        width: 100%;
    }
    
    /* Assurez-vous que tout tient dans l'écran */
    * {
        box-sizing: border-box;
        max-width: 100%;
    }
    img.logo-img {
        height: 90px;
    }
}
/* ============= */
/* SECTION ÉQUIPE */
/* ============= */

.team-section {
    margin-top: 50px;
    padding: 20px;
    background: linear-gradient(135deg, rgba(255,255,255,0.95) 0%, rgba(248,248,248,0.9) 100%);
    border-radius: 12px;
    box-shadow: 0 8px 32px rgba(0,0,0,0.1);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255,255,255,0.2);
}

.team-title {
    text-align: center;
    color: #d81f4d;
    font-size: 2rem;
    margin-bottom: 2rem;
    padding-bottom: 10px;
    border-bottom: 2px solid #d81f4d;
    font-weight: bold;
}

.team-grid-container {
    /* Utilisation de la grille pour une disposition réactive et max de 2 items par ligne */
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(165px, 1fr));
    grid-auto-rows: 1fr;
    gap: 1.5rem;
    width: 100%;
    margin: 20px auto;
}

.team-member-card {
    position: relative;
    aspect-ratio: 3/4;
    background: white;
    border-radius: 16px;
    overflow: hidden;
    box-shadow: 0 8px 24px rgba(0,0,0,0.12);
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    cursor: pointer;
    min-height: 320px;
    height: auto;
}

.team-member-card:hover {
    transform: translateY(-10px) scale(1.02);
    box-shadow: 0 15px 35px rgba(0,0,0,0.2);
}

.team-member-front,
.team-member-back {
    position: absolute;
    width: 100%;
    height: 100%;
    min-height: 320px;
    backface-visibility: hidden;
    transition: opacity 0.4s ease;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 2rem 1.5rem;
    box-sizing: border-box;
}

.team-member-front {
    opacity: 1;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
}

.team-member-back {
    opacity: 0;
    background: linear-gradient(135deg, #d81f4d 0%, #a61b3e 100%);
    color: white;
    text-align: center;
    justify-content: flex-start;
    padding-top: 25px;
    overflow-y: auto;
}

.team-member-card:hover .team-member-front {
    opacity: 0;
}

.team-member-card:hover .team-member-back {
    opacity: 1;
}

.team-member-front img {
    width: 140px;
    height: 140px;
    border-radius: 50%;
    object-fit: cover;
    border: 5px solid white;
    box-shadow: 0 6px 20px rgba(0,0,0,0.25);
    margin-bottom: 1.2rem;
}

.team-member-back h3 {
    font-size: 1.4rem;
    margin-bottom: 0.8rem;
    color: white;
    font-weight: 800;
    letter-spacing: -0.5px;
}

.team-role {
    font-size: 1.05rem;
    font-weight: 700;
    margin-bottom: 0.8rem;
    color: #ffeb3b;
    text-shadow: 0 2px 4px rgba(0,0,0,0.2);
}

.team-contact {
    font-size: 0.95rem;
    margin-bottom: 1rem;
    color: rgba(255,255,255,0.95);
    line-height: 1.5;
}

.team-desc {
    font-size: 0.9rem;
    line-height: 1.6;
    color: rgba(255,255,255,0.9);
    margin-top: auto;
    padding: 0 0.5rem;
}

/* Responsive */
@media (max-width: 1200px) {
    .team-grid-container {
        grid-template-columns: repeat(auto-fit, 165px);
    }
}

@media (max-width: 768px) {
    .team-section {
        padding: 15px;
        margin-top: 20px;
    }
    
    .team-title {
        font-size: 1.5rem;
    }
    
    .team-grid-container {
        gap: 1rem;
    }
    
    .team-member-card {
        aspect-ratio: 4/3;
    }
    
    .team-member-front img {
        width: 100px;
        height: 100px;
    }
}

@media (max-width: 480px) {
    .team-section {
        padding: 10px;
    }
    
    .team-title {
        font-size: 1.3rem;
        margin-bottom: 1rem;
    }
    
    .team-member-front,
    .team-member-back {
        padding: 1rem;
    }
    
    .team-member-back h3 {
        font-size: 1.1rem;
    }
    
    .team-role {
        font-size: 0.9rem;
    }
    
    .team-contact,
    .team-desc {
        font-size: 0.8rem;
    }
}

/* Animation au chargement */
@keyframes teamFadeIn {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.team-member-card {
    animation: teamFadeIn 0.6s ease forwards;
}

@media (max-width: 880px) {
    footer {
        flex-wrap: wrap;
    }
}

/* ============= */
/* CORRECTIONS RESPONSIVE CARROUSEL */
/* ============= */

/* Assurer que les éléments restent cliquables */
.carrousel-item {
    position: relative;
    z-index: 1;
}

.add-icon {
    position: absolute;
    top: 1rem;
    right: 1rem;
    height: 30px;
    background: rgba(0,0,0,0.6);
    color: white;
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: bold;
    cursor: pointer;
    padding: 0 0.5rem;
    z-index: 10; /* Important pour mobile */
    min-width: 44px; /* Taille minimale pour tactile */
    min-height: 44px;
    font-size: 0.8rem;
}

/* Correction pour les écrans mobiles */
@media (max-width: 768px) {
    .add-icon {
        top: 0.5rem;
        right: 0.5rem;
        height: 25px;
        min-width: 40px;
        min-height: 40px;
        font-size: 0.7rem;
        padding: 0 0.3rem;
    }
    
    /* S'assurer que le carrousel reste utilisable */
    .carrousel-container {
        touch-action: pan-y pinch-zoom;
    }
    
    .carrousel-item {
        pointer-events: auto;
    }
}

/* Pour les très petits écrans */
@media (max-width: 480px) {
    .add-icon {
        top: 0.3rem;
        right: 0.3rem;
        height: 22px;
        min-width: 36px;
        min-height: 36px;
        font-size: 0.6rem;
    }
}

/* S'assurer que la modal reste fonctionnelle */
.full-content {
    z-index: 10000 !important;
}

.close-icon {
    z-index: 10001 !important;
    min-width: 44px;
    min-height: 44px;
    display: flex;
    align-items: center;
    justify-content: center;
}

/* Améliorations tactiles */
@media (hover: none) and (pointer: coarse) {
    .add-icon {
        background: rgba(0,0,0,0.8); /* Plus visible sur mobile */
    }
    
    .carrousel-item {
        -webkit-tap-highlight-color: transparent;
    }
}

/* Empêcher le zoom sur les éléments interactifs */
.add-icon, .close-icon {
    touch-action: manipulation;
}

/* ============= */
/* SWIPE MOBILE CARROUSEL */
/* ============= */

.carrousel-container {
    position: relative;
    overflow: hidden;
    width: 100%;
    touch-action: pan-y; /* Permet le scroll vertical mais bloque le horizontal */
}

.carrousel-content {
    display: flex;
    transition: transform 0.5s ease;
    will-change: transform;
    width: 100%;
    height: 100%;
}

.carrousel-group {
    display: flex;
    flex: 0 0 100%;
    gap: 1.5rem;
    justify-content: center;
    min-width: 100%;
    box-sizing: border-box;
}

/* Pour mobile - optimisation tactile */
@media (max-width: 768px) {
    .carrousel-container {
        -webkit-overflow-scrolling: touch; /* Scroll fluide iOS */
        overflow-x: auto; /* Permet le scroll horizontal natif */
        scroll-snap-type: x mandatory;
        scroll-behavior: smooth;
    }
    
    .carrousel-content {
        scroll-snap-type: x mandatory;
        overflow-x: auto;
        overflow-y: hidden;
    }
    
    .carrousel-group {
        scroll-snap-align: start;
    }
    
    /* Cacher les flèches sur mobile très petit */
    @media (max-width: 480px) {
        .carrousel-nav {
            display: none !important;
        }
    }
}

/* Désactiver la sélection de texte pendant le swipe */
.carrousel-content {
    -webkit-user-select: none;
    -moz-user-select: none;
    -ms-user-select: none;
    user-select: none;
}
/* Amélioration du feedback tactile */
.carrousel-content:active {
    cursor: grabbing;
}

/* Animation de rebond pour mobile */
@media (max-width: 768px) {
    .carrousel-content {
        scroll-snap-type: x mandatory;
        -webkit-overflow-scrolling: touch;
    }
    
    .carrousel-group {
        scroll-snap-align: start;
        flex-shrink: 0;
    }
}

/* Indicateur visuel pendant le swipe */
.carrousel-container.swiping .carrousel-content {
    transition: none;
}
/* ============= */
/* HEADER CORRIGÉ */
/* ============= */
header {
    height: auto;
    min-height: 120px;
    width: 100%;
    position: relative;
    background: white;
}

/* Supprimez ou corrigez le ::after problématique */
header::after {
    display: none; /* À supprimer car cause des problèmes */
}

.menu {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 10px 20px;
    background-color: #ffffff;
    flex-wrap: wrap;
    position: relative;
    width: 100%;
    box-sizing: border-box;
}

.logo {
    height: 100px;
    width: auto;
    z-index: 1001;
}

/* Menu items corrigés */
#nav, #navlast {
    padding: 12px 15px;
    text-decoration: none;
    color: var(--dark-color);
    font-weight: bold;
    font-size: 1.1rem;
    border-radius: 8px;
    transition: background-color 0.3s ease, color 0.3s ease;
    margin: 5px;
    white-space: nowrap;
}

#nav:hover, #navlast:hover {
    background-color: var(--ufolep-color);
    color: white;
}

/* Menu responsive */
.menu-toggle {
    display: none;
    background: var(--ufolep-color);
    color: white;
    border: none;
    padding: 10px 15px;
    border-radius: 4px;
    cursor: pointer;
    font-size: 1rem;
}

/* Mobile */
@media (max-width: 768px) {
    .menu {
        flex-direction: column;
        padding: 10px;
    }
    
    .menu-toggle {
        display: block;
        order: 2;
        width: 100%;
        margin: 10px 0;
    }
    
    #nav, #navlast {
        display: none;
        width: 100%;
        text-align: center;
        margin: 5px 0;
        order: 3;
    }
    
    .menu.active #nav,
    .menu.active #navlast {
        display: block;
    }
    
    header p {
        display: none; /* Cache la description sur mobile */
    }
    
    .logo {
        height: 60px;
        margin: 0 auto;
    }
}
/* Correction carrousel mobile */
@media (max-width: 768px) {
    .carrousel-container {
        overflow-x: auto;
        scroll-snap-type: x mandatory;
        -webkit-overflow-scrolling: touch;
        scrollbar-width: none; /* Firefox */
        -ms-overflow-style: none; /* IE/Edge */
    }
    
    .carrousel-container::-webkit-scrollbar {
        display: none; /* Chrome/Safari */
    }
    
    .carrousel-content {
        display: flex;
        scroll-snap-type: x mandatory;
        overflow-x: auto;
        overflow-y: hidden;
    }
    
    .carrousel-group {
        scroll-snap-align: start;
        flex-shrink: 0;
        width: 100%;
    }
    
    .carrousel-item {
        scroll-snap-align: start;
        flex: 0 0 90%;
        max-width: 90%;
        margin: 0 5%;
    }
    
    /* Cacher les flèches sur mobile */
    .carrousel-nav {
        display: none !important;
    }
}

/* Améliorations tactiles */
.carrousel-container {
    touch-action: pan-y pinch-zoom;
}

.carrousel-item {
    -webkit-tap-highlight-color: transparent;
}

/* Empêcher la sélection de texte pendant le swipe */
.carrousel-content {
    -webkit-user-select: none;
    -moz-user-select: none;
    -ms-user-select: none;
    user-select: none;
}
/* assets/css/ enhancements.css */
/* Styles pour les nouvelles fonctionnalités JS */

/* Bouton scroll to top */
.scroll-top-btn {
    position: fixed;
    bottom: 20px;
    right: 20px;
    width: 50px;
    height: 50px;
    background: var(--ufolep-color);
    color: white;
    border: none;
    border-radius: 50%;
    cursor: pointer;
    font-size: 1.2rem;
    z-index: 1000;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
    box-shadow: 0 2px 10px rgba(0,0,0,0.2);
}

.scroll-top-btn:hover {
    background: var(--primary-dark);
    transform: translateY(-2px);
}

/* Messages d'erreur formulaires */
.field-error {
    display: block;
    color: #e74c3c;
    font-size: 0.8rem;
    margin-top: 5px;
}

.form-error {
    background: #ffeaa7;
    color: #e17055;
    padding: 10px 15px;
    border-radius: 5px;
    margin-bottom: 15px;
    border-left: 4px solid #e17055;
}

input.error, select.error {
    border-color: #e74c3c !important;
    background-color: #ffeaa7;
}

/* Tooltips */
.tooltip {
    position: absolute;
    bottom: 100%;
    left: 50%;
    transform: translateX(-50%);
    background: #333;
    color: white;
    padding: 5px 10px;
    border-radius: 4px;
    font-size: 0.8rem;
    white-space: nowrap;
    z-index: 1000;
    visibility: hidden;
    opacity: 0;
    transition: all 0.3s ease;
    margin-bottom: 5px;
}

.tooltip::after {
    content: '';
    position: absolute;
    top: 100%;
    left: 50%;
    transform: translateX(-50%);
    border: 5px solid transparent;
    border-top-color: #333;
}

/* Animations */
.animate-in {
    animation: fadeInUp 0.6s ease forwards;
}

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Loading states */
.loading {
    opacity: 0.6;
    pointer-events: none;
    position: relative;
}

.loading::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 20px;
    height: 20px;
    margin: -10px 0 0 -10px;
    border: 2px solid #f3f3f3;
    border-top: 2px solid #3498db;
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* Améliorations accessibilité */
@media (prefers-reduced-motion: reduce) {
    * {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
}

/* Focus visible pour accessibilité */
button:focus-visible,
a:focus-visible,
input:focus-visible,
select:focus-visible {
    outline: 2px solid #3498db;
    outline-offset: 2px;
}

/* États de chargement */
.sr-only {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}
/* ============= */
/* FOOTER STYLES */
/* ============= */

.site-footer {
    background: linear-gradient(135deg, #2c3e50 0%, #34495e 100%);
    color: white;
    margin-top: 60px;
    position: relative;
    overflow: hidden;
}

.site-footer::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 3px;
    background: linear-gradient(90deg, var(--ufolep-color), var(--asso-color));
}

.footer-content {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 30px;
    max-width: 1200px;
    margin: 0 auto 30px;
}

.footer-section h3 {
    color: var(--ufolep-color);
    font-size: 1.3rem;
    margin-bottom: 15px;
    padding-bottom: 8px;
    border-bottom: 2px solid rgba(255,255,255,0.1);
    position: relative;
}

.footer-section h3::after {
    content: '';
    position: absolute;
    bottom: -2px;
    left: 0;
    width: 50px;
    height: 2px;
    background: var(--ufolep-color);
}

.footer-section p {
    line-height: 1.6;
    margin-bottom: 10px;
    color: #bdc3c7;
}

.footer-section address p {
    margin-bottom: 8px;
}

.footer-section a {
    color: #ecf0f1;
    text-decoration: none;
    transition: all 0.3s ease;
    display: inline-block;
}

.footer-section a:hover {
    color: var(--ufolep-color);
    transform: translateX(5px);
}

.social-links {
    display: flex;
    gap: 15px;
    flex-wrap: wrap;
}

.social-icon {
    background: rgba(255,255,255,0.1);
    padding: 10px 20px;
    border-radius: 25px;
    border: 1px solid rgba(255,255,255,0.2);
    transition: all 0.3s ease;
    font-size: 0.9rem;
}

.social-icon:hover {
    background: var(--ufolep-color);
    transform: translateY(-3px);
    box-shadow: 0 5px 15px rgba(255,107,107,0.3);
    border-color: var(--ufolep-color);
    color: white;
}

.footer-bottom {
    border-top: 1px solid rgba(255,255,255,0.1);
    padding-top: 20px;
    text-align: center;
    max-width: 1200px;
    margin: 0 auto;
}

.footer-bottom p {
    color: #95a5a6;
    margin-bottom: 15px;
    font-size: 0.9rem;
}

.footer-nav {
    display: flex;
    justify-content: center;
    flex-wrap: wrap;
    gap: 20px;
    margin-bottom: 15px;
}

.footer-nav a {
    color: #bdc3c7;
    text-decoration: none;
    font-size: 0.85rem;
    transition: color 0.3s ease;
    position: relative;
}

.footer-nav a::after {
    content: '';
    position: absolute;
    bottom: -2px;
    left: 0;
    width: 0;
    height: 1px;
    background: var(--ufolep-color);
    transition: width 0.3s ease;
}

.footer-nav a:hover {
    color: white;
}

.footer-nav a:hover::after {
    width: 100%;
}

.footer-nav a:last-child {
    color: var(--ufolep-color);
    font-weight: bold;
}

/* Responsive Design */
@media (max-width: 768px) {
    .site-footer {
        padding: 30px 15px 15px;
        margin-top: 40px;
    }
    
    .footer-content {
        grid-template-columns: 1fr;
        gap: 25px;
        text-align: center;
    }
    
    .footer-section h3::after {
        left: 50%;
        transform: translateX(-50%);
    }
    
    .social-links {
        justify-content: center;
    }
    
    .social-icon {
        padding: 8px 16px;
        font-size: 0.85rem;
    }
    
    .footer-nav {
        gap: 15px;
    }
    
    .footer-nav a {
        font-size: 0.8rem;
    }
}

@media (max-width: 480px) {
    .site-footer {
        padding: 25px 10px 10px;
    }
    
    .footer-section h3 {
        font-size: 1.1rem;
    }
    
    .footer-section p {
        font-size: 0.9rem;
    }
    
    .social-links {
        flex-direction: column;
        align-items: center;
    }
    
    .social-icon {
        width: 160px;
        text-align: center;
    }
    
    .footer-nav {
        flex-direction: column;
        gap: 10px;
    }
    
    .footer-bottom p {
        font-size: 0.8rem;
    }
}

/* Animation d'apparition */
@keyframes footerSlideUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.footer-section {
    animation: footerSlideUp 0.6s ease forwards;
}

.footer-section:nth-child(1) { animation-delay: 0.1s; }
.footer-section:nth-child(2) { animation-delay: 0.2s; }
.footer-section:nth-child(3) { animation-delay: 0.3s; }

/* Mode sombre/clair respectueux */
@media (prefers-color-scheme: light) {
    .site-footer {
        background: linear-gradient(135deg, #34495e 0%, #2c3e50 100%);
    }
}

/* Réduction de mouvement pour accessibilité */
@media (prefers-reduced-motion: reduce) {
    .footer-section,
    .social-icon,
    .footer-nav a {
        animation: none;
        transition: none;
    }
}

/* Amélioration du contraste pour accessibilité */
.footer-section a:focus,
.social-icon:focus,
.footer-nav a:focus {
    outline: 2px solid var(--ufolep-color);
    outline-offset: 2px;
}

.footer-section .social-links a:hover {
    color: #ffffff;
}

/* Corrections carrousel */
.carrousel-container {
    position: relative;
    overflow: hidden;
    width: 100%;
}

.carrousel-content {
    display: flex;
    transition: transform 0.5s ease;
    width: 100%;
}

.carrousel-group {
    display: flex;
    flex-shrink: 0;
    width: 100%;
    gap: 1.5rem;
    justify-content: center;
    padding: 0 1rem;
    box-sizing: border-box;
}

.carrousel-item {
    background: white;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 4px 6px rgba(0,0,0,0.1);
    transition: transform 0.3s ease;
}

.carrousel-item:hover {
    transform: translateY(-5px);
}

/* Navigation */
.carrousel-nav {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    background: rgba(0,0,0,0.5);
    color: white;
    border: none;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    cursor: pointer;
    z-index: 10;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.2rem;
}

.carrousel-nav.left {
    left: 10px;
}

.carrousel-nav.right {
    right: 10px;
}

.carrousel-nav:hover {
    background: rgba(0,0,0,0.7);
}

/* Indicateurs */
.carrousel-indicators {
    display: flex;
    justify-content: center;
    gap: 8px;
    margin-top: 15px;
}

.carrousel-indicator {
    width: 12px;
    height: 12px;
    border-radius: 50%;
    background: #ccc;
    cursor: pointer;
    border: none;
    transition: background 0.3s ease;
}

.carrousel-indicator.active {
    background: var(--ufolep-color);
}

.carrousel-indicator:hover {
    background: #999;
}
/* ============= */
/* NOUVEAU CARROUSEL SIMPLE */
/* ============= */

.simple-carousel {
    position: relative;
    width: 100%;
    margin: 0 auto;
    overflow: hidden;
    border-radius: 16px;
}

.carousel-track {
    display: flex;
    transition: transform 0.5s cubic-bezier(0.4, 0, 0.2, 1);
    gap: 20px;
    padding: 10px;
}

.carousel-slide {
    flex: 0 0 calc(33.333% - 14px);
    background: white;
    border-radius: 16px;
    overflow: hidden;
    box-shadow: 0 4px 20px rgba(0,0,0,0.1);
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    border: 2px solid transparent;
}

.carousel-slide:hover {
    transform: translateY(-8px) scale(1.02);
    box-shadow: 0 12px 40px rgba(0,0,0,0.18);
    border-color: rgba(102, 126, 234, 0.3);
}

.slide-image {
    position: relative;
    height: 200px;
    overflow: hidden;
}

.slide-image img {
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s ease;
}

.carousel-slide:hover .slide-image img {
    transform: scale(1.05);
}

.view-more-btn {
    position: absolute;
    top: 10px;
    right: 10px;
    background: rgba(255,255,255,0.9);
    border: none;
    padding: 8px 12px;
    border-radius: 20px;
    cursor: pointer;
    font-size: 0.8rem;
    font-weight: 600;
    transition: all 0.3s ease;
    backdrop-filter: blur(10px);
}

.view-more-btn:hover {
    background: var(--ufolep-color);
    color: white;
    transform: scale(1.05);
}

/* Miniatures de galerie à côté de l'image principale */
.slide-image:has(.slide-thumbs) {
    display: flex;
    gap: 4px;
}

.slide-image:has(.slide-thumbs) > img:first-child {
    flex: 2;
    min-width: 0;
    height: 100%;
}

.slide-image .slide-thumbs {
    flex: 1;
    min-width: 0;
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.slide-image .slide-thumbs img {
    flex: 1 1 0;
    min-height: 0;
    width: 100%;
    height: auto;
    object-fit: cover;
}

.slide-content {
    padding: 20px;
}

.slide-content h3 {
    margin: 0 0 10px 0;
    color: #2c3e50;
    font-size: 1.1rem;
    line-height: 1.3;
}

.slide-content p {
    color: #666;
    font-size: 0.9rem;
    line-height: 1.4;
    margin-bottom: 10px;
    display: -webkit-box;
    -webkit-line-clamp: 3;
    line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.slide-content .date {
    color: #999;
    font-size: 0.8rem;
}

/* Boutons de navigation */
.carousel-btn {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    background: rgba(255,255,255,0.9);
    border: none;
    width: 50px;
    height: 50px;
    border-radius: 50%;
    cursor: pointer;
    font-size: 1.5rem;
    font-weight: bold;
    color: #333;
    box-shadow: 0 2px 10px rgba(0,0,0,0.2);
    transition: all 0.3s ease;
    z-index: 10;
    display: flex;
    align-items: center;
    justify-content: center;
}

.carousel-btn:hover {
    background: var(--ufolep-color);
    color: white;
    transform: translateY(-50%) scale(1.1);
}

.prev-btn {
    left: 15px;
}

.next-btn {
    right: 15px;
}

/* Points indicateurs */
.carousel-dots {
    display: flex;
    justify-content: center;
    gap: 8px;
    margin-top: 20px;
    padding: 10px;

}

/* Espace sportif (associations / commissions) */
.sportive-space {
    max-width: 1320px;
    margin: 0 auto;
}

.sportive-space-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 20px;
    margin-bottom: 20px;
    background: #fff;
    border: 1px solid #eee;
    border-radius: 12px;
    padding: 16px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.08);
}

.sportive-space-title h1 {
    margin: 0;
}

.sportive-space-logo {
    width: 110px;
    height: 110px;
    object-fit: contain;
    border-radius: 8px;
    border: 1px solid #eee;
    background: #fff;
    padding: 6px;
}

.sportive-space-desc {
    margin: 6px 0 0;
    color: #666;
}

.sportive-space-layout {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 380px;
    gap: 20px;
    align-items: start;
}

.sportive-space-side {
    position: sticky;
    top: 20px;
}

.sportive-space-main {
    min-width: 0;
}

.sportive-block {
    background: #fff;
    border: 1px solid #eee;
    border-radius: 10px;
    padding: 16px;
    margin-bottom: 20px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.06);
}

.sportive-block-wide {
    grid-column: 1 / -1;
}

.sportive-block h2 {
    margin-top: 0;
    border-bottom: 2px solid var(--ufolep-color);
    padding-bottom: 8px;
}

/* Bloc Contact (espace sportif) */
.sportive-contact-body {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.sportive-contact-row {
    display: grid;
    grid-template-columns: 90px minmax(0, 1fr);
    gap: 10px;
    align-items: start;
}

.sportive-contact-label {
    font-weight: 700;
    color: #333;
}

.sportive-contact-value a {
    color: var(--ufolep-color);
    text-decoration: none;
    word-break: break-word;
}

.sportive-contact-value a:hover {
    text-decoration: underline;
}

.sportive-contact-links {
    display: grid;
    grid-template-columns: 1fr;
    gap: 8px;
    margin-top: 4px;
}

.sportive-contact-link {
    display: block;
    padding: 10px 12px;
    border: 1px solid #eee;
    border-radius: 10px;
    background: #fafafa;
    color: #222;
    text-decoration: none;
    font-weight: 600;
}

.sportive-contact-link:hover {
    border-color: var(--ufolep-color);
    background: #fff;
}

/* Galerie modulable (type masonry) */
.sportive-gallery {
    columns: 2 260px;
    column-gap: 12px;
}

/* Variante sidebar: minimum 2 colonnes si la largeur le permet */
.sportive-gallery--side {
    columns: auto;
    column-gap: 0;
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 10px;
}

.sportive-gallery--side .sportive-gallery-item {
    margin: 0;
    border-radius: 12px;
}

.sportive-gallery--side .sportive-gallery-media img,
.sportive-gallery--side .sportive-gallery-media video {
    width: 100%;
    aspect-ratio: 1 / 1;
    height: auto;
    object-fit: cover;
}

@media (min-width: 1024px) {
    .sportive-gallery {
        columns: 3 260px;
    }
}

@media (max-width: 520px) {
    .sportive-gallery {
        columns: 1 260px;
    }
}

.sportive-gallery-item {
    margin: 0 0 12px;
    break-inside: avoid;
    position: relative;
    border-radius: 12px;
    overflow: hidden;
    border: 1px solid #eee;
    background: #000;
    cursor: pointer;
}

.sportive-gallery-media img,
.sportive-gallery-media video {
    width: 100%;
    height: auto;
    display: block;
}

.sportive-gallery-media video {
    background: #000;
}

.sportive-gallery-overlay {
    position: absolute;
    inset: 0;
    display: flex;
    align-items: flex-end;
    opacity: 0;
    transition: opacity 0.2s ease;
}

.sportive-gallery-meta {
    width: 100%;
    padding: 10px 12px;
    background: rgba(120, 120, 120, 0.35);
    color: #fff;
}

.sportive-gallery-title {
    font-weight: 800;
}

.sportive-gallery-type {
    font-size: 0.9rem;
    opacity: 0.9;
}

.sportive-gallery-item:hover .sportive-gallery-overlay,
.sportive-gallery-item:focus .sportive-gallery-overlay {
    opacity: 1;
}

.sportive-gallery-item:focus {
    outline: 2px solid var(--ufolep-color);
    outline-offset: 2px;
}

.sportive-events {
    list-style: none;
    padding: 0;
    margin: 0;
}

.sportive-events li {
    padding: 10px 0;
    border-bottom: 1px solid #f0f0f0;
}

.sportive-events li.is-highlighted {
    background: #fafafa;
    border-bottom-color: #e7e7e7;
    border-radius: 10px;
    padding-left: 10px;
    padding-right: 10px;
}

.sportive-events li:last-child {
    border-bottom: none;
}

.sportive-event-date {
    font-weight: bold;
    color: var(--ufolep-color);
}

.sportive-event-title {
    margin-top: 2px;
    display: flex;
    align-items: center;
    gap: 8px;
}

.sportive-event-dot {
    width: 10px;
    height: 10px;
    border-radius: 999px;
    flex: 0 0 auto;
}

.sportive-event-place {
    margin-top: 2px;
    color: #666;
    font-size: 0.95rem;
}

.sportive-events-wrap {
    display: grid;
    gap: 10px;
}

.sportive-events-more {
    appearance: none;
    border: 1px solid #eee;
    background: #fff;
    border-radius: 10px;
    padding: 10px 12px;
    font-weight: 700;
    cursor: pointer;
}

.sportive-events-more:hover {
    border-color: #ddd;
}

/* Mini calendrier (sidebar) */
.sportive-mini-cal {
    margin-top: 14px;
    padding-top: 14px;
    border-top: 1px solid #f0f0f0;
}

.sportive-mini-cal-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 8px;
}

.sportive-mini-cal-title {
    font-weight: 800;
}

.sportive-mini-cal-weekdays {
    display: grid;
    grid-template-columns: repeat(7, 1fr);
    gap: 6px;
    font-size: 0.8rem;
    color: #666;
    margin-bottom: 6px;
    text-align: center;
}

.sportive-mini-cal-grid {
    display: grid;
    grid-template-columns: repeat(7, 1fr);
    gap: 6px;
}

.sportive-mini-day {
    appearance: none;
    border: 1px solid #eee;
    background: #fff;
    border-radius: 10px;
    padding: 8px 6px 6px;
    min-height: 46px;
    cursor: pointer;
    display: grid;
    align-content: start;
    justify-items: center;
    gap: 6px;
    transition: border-color 0.15s ease, background-color 0.15s ease, transform 0.05s ease;
}

.sportive-mini-day:hover {
    border-color: #ddd;
    background: #fafafa;
}

.sportive-mini-day.has-events {
    border-color: #ddd;
}

.sportive-mini-day:active {
    transform: translateY(1px);
}

.sportive-mini-day.is-out {
    opacity: 0.45;
}

.sportive-mini-day.is-today {
    border-color: #ddd;
    background: #fafafa;
}

.sportive-mini-day.is-selected {
    border-color: #d6d6d6;
    background: #f7f7f7;
}

.mini-day-number {
    font-weight: 800;
    line-height: 1;
}

.mini-dots {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 4px;
    min-height: 10px;
}

.mini-dot {
    width: 7px;
    height: 7px;
    border-radius: 999px;
    background: var(--ufolep-color);
}

.mini-dot.more {
    width: auto;
    height: auto;
    font-size: 0.75rem;
    line-height: 1;
    background: transparent;
    color: #666;
}

.sportive-mini-cal-help {
    display: block;
    margin-top: 8px;
    color: #666;
}

/* Modal galerie */
.gallery-modal-content {
    max-width: 920px;
    width: 92%;
}

.gallery-modal-media img,
.gallery-modal-media video {
    width: 100%;
    height: auto;
    display: block;
    border-radius: 10px;
}

.gallery-modal-media video {
    background: #000;
}

.gallery-modal-caption {
    margin-top: 12px;
    color: #666;
    font-weight: 700;
}

@media (max-width: 1024px) {
    .sportive-gallery {
        columns: 2 240px;
    }

    .sportive-space-layout {
        grid-template-columns: 1fr;
    }

    .sportive-space-side {
        position: static;
        top: auto;
    }
}

@media (max-width: 520px) {
    .sportive-gallery {
        columns: 1 240px;
    }
}

.carousel-dot {
    min-width: 0%;
    min-height: 0%;
    width: 10px;
    height: 10px;
    border-radius: 50%;
    background: #ddd;
    border: none;
    cursor: pointer;
    transition: all 0.3s ease;

}

.carousel-dot.active {
    background: var(--ufolep-color);
    transform: scale(1.2);
}

.carousel-dot:hover {
    background: #999;
}

/* Modal amélioré */
.modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0,0,0,0.85);
    display: none; /* Caché par défaut */
    justify-content: center;
    align-items: center;
    z-index: 10000;
    padding: 20px;
    box-sizing: border-box;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.3s ease;
}

.modal[style*="display: flex"],
.modal[style*="display:flex"],
.modal[style*="display: block"],
.modal[style*="display:block"] {
    display: flex !important;
    opacity: 1 !important;
    pointer-events: all !important;
}

@keyframes fadeIn {
    from {
        opacity: 0;
    }
    to {
        opacity: 1;
    }
}

.modal-content {
    background: white;
    border-radius: 16px;
    padding: 35px;
    max-width: 800px;
    width: 90%;
    max-height: 85vh;
    overflow-y: auto;
    position: relative;
    box-shadow: 0 25px 70px rgba(0,0,0,0.4);
    animation: slideUp 0.4s ease;
}

@keyframes slideUp {
    from {
        transform: translateY(30px);
        opacity: 0;
    }
    to {
        transform: translateY(0);
        opacity: 1;
    }
}

.close-modal {
    position: absolute;
    top: 15px;
    right: 20px;
    font-size: 2.5rem;
    cursor: pointer;
    color: #999;
    transition: all 0.3s ease;
    z-index: 10;
    line-height: 1;
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
}

.close-modal:hover {
    color: white;
    background: var(--ufolep-color);
    transform: rotate(90deg);
}

.modal-content img {
    width: 100%;
    height: auto;
    border-radius: 8px;
    margin-bottom: 20px;
}

.modal-content h2 {
    color: #2c3e50;
    margin-bottom: 15px;
}

.modal-content p {
    color: #666;
    line-height: 1.6;
    margin-bottom: 15px;
}

#modal-association {
    display: block;
    color: var(--asso-color);
    font-weight: bold;
    margin-bottom: 10px;
}

/* ============= */
/* POPUP ÉVÉNEMENT EN BAS À DROITE */
/* ============= */

.ev-popup {
    position: fixed;
    bottom: 20px;
    right: 20px;
    z-index: 9999;
    max-width: 380px;
    animation: slideInFromRight 0.5s ease-out;
    opacity: 0;
    transform: translateX(100%);
    pointer-events: none;
}

.ev-popup.is-open {
    opacity: 1;
    transform: translateX(0);
    pointer-events: all;
}

@keyframes slideInFromRight {
    from {
        opacity: 0;
        transform: translateX(100%);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

.ev-popup-box {
    background: linear-gradient(135deg, #ffffff 0%, #f8f9fa 100%);
    border-radius: 16px;
    box-shadow: 0 12px 40px rgba(0,0,0,0.25), 0 0 0 1px rgba(216, 31, 77, 0.1);
    padding: 20px;
    position: relative;
    border: 2px solid rgba(216, 31, 77, 0.2);
    backdrop-filter: blur(10px);
}

.ev-popup-close {
    position: absolute;
    top: 12px;
    right: 12px;
    background: rgba(255,255,255,0.9);
    border: none;
    width: 32px;
    height: 32px;
    border-radius: 50%;
    cursor: pointer;
    font-size: 1.2rem;
    color: #666;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
    z-index: 10;
}

.ev-popup-close:hover {
    background: #d81f4d;
    color: white;
    transform: rotate(90deg);
    box-shadow: 0 4px 12px rgba(216, 31, 77, 0.4);
}

.ev-popup-header {
    margin-bottom: 15px;
}

.ev-popup-badge {
    display: inline-block;
    padding: 6px 14px;
    border-radius: 20px;
    font-size: 0.85rem;
    font-weight: 700;
    margin-bottom: 10px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.ev-badge--prochain {
    background: linear-gradient(135deg, #4CAF50 0%, #45a049 100%);
    color: white;
    box-shadow: 0 3px 10px rgba(76, 175, 80, 0.3);
}

.ev-badge--urgent {
    background: linear-gradient(135deg, #ff5722 0%, #e64a19 100%);
    color: white;
    box-shadow: 0 3px 10px rgba(255, 87, 34, 0.3);
}

.ev-popup-title {
    font-size: 1.15rem;
    font-weight: 800;
    color: #2c3e50;
    margin: 0;
    line-height: 1.4;
    letter-spacing: -0.3px;
}

.ev-popup-body {
    color: #555;
}

.ev-popup-meta {
    display: flex;
    align-items: center;
    gap: 8px;
    margin: 8px 0;
    font-size: 0.95rem;
    color: #666;
    font-weight: 600;
}

.ev-popup-icon {
    font-size: 1.1rem;
    color: #d81f4d;
}

.ev-popup-desc {
    margin-top: 12px;
    padding: 12px;
    background: rgba(248, 249, 250, 0.8);
    border-radius: 8px;
    font-size: 0.9rem;
    line-height: 1.6;
    color: #555;
    border-left: 3px solid #d81f4d;
}

/* Responsive pour le popup */
@media (max-width: 768px) {
    .ev-popup {
        right: 10px;
        bottom: 10px;
        max-width: calc(100vw - 20px);
    }
    
    .ev-popup-box {
        padding: 16px;
    }
    
    .ev-popup-title {
        font-size: 1rem;
    }
}

/* ============= */

/* Responsive */
@media (max-width: 1024px) {
    .carousel-slide {
        flex: 0 0 calc(50% - 10px);
    }
}

@media (max-width: 768px) {
    .carousel-slide {
        flex: 0 0 calc(100% - 10px);
    }
    
    .carousel-btn {
        width: 40px;
        height: 40px;
        font-size: 1.2rem;
    }
    
    .prev-btn {
        left: 5px;
    }
    
    .next-btn {
        right: 5px;
    }
    
    .modal-content {
        padding: 20px;
        width: 95%;
    }
}

/* Espace sportif: 2 actus par vue sur desktop (miniatures plus grandes) */
@media (min-width: 1025px) {
    #carousel-sportive-actus .carousel-slide {
        flex: 0 0 calc(50% - 10px);
    }
}

/* Support tactile */
@media (hover: none) and (pointer: coarse) {
    .carousel-btn {
        width: 44px;
        height: 44px;
    }
    
    .view-more-btn {
        padding: 10px 15px;
        min-height: 44px;
    }
}
/* ============= */
/* SECTION FORMATIONS & ÉVÉNEMENTS */
/* ============= */

.formations-section {
    margin: 20px auto;
    padding: 30px 20px;
    background: linear-gradient(135deg, rgba(255,255,255,0.95) 0%, rgba(248,248,248,0.9) 100%);
    border-radius: 16px;
    box-shadow: 0 8px 32px rgba(0,0,0,0.12);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255,255,255,0.3);
    max-width: 1400px;
}

.formations-header {
    text-align: center;
    margin-bottom: 30px;
}

.formations-kicker {
    display: inline-block;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    padding: 8px 20px;
    border-radius: 20px;
    font-size: 0.85rem;
    font-weight: 700;
    letter-spacing: 0.5px;
    margin-bottom: 15px;
    box-shadow: 0 4px 12px rgba(102, 126, 234, 0.3);
    animation: pulse-glow 2s ease-in-out infinite;
}

@keyframes pulse-glow {
    0%, 100% {
        box-shadow: 0 4px 12px rgba(102, 126, 234, 0.3);
        transform: scale(1);
    }
    50% {
        box-shadow: 0 6px 20px rgba(102, 126, 234, 0.5);
        transform: scale(1.02);
    }
}

.formations-title {
    font-size: 2.2rem;
    color: #2c3e50;
    font-weight: 800;
    margin: 0;
    text-transform: uppercase;
    letter-spacing: -0.5px;
}

.formations-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 25px;
    margin-top: 30px;
}

/* Cartes de formation individuelles */
.fcard {
    background: white;
    border-radius: 16px;
    overflow: hidden;
    box-shadow: 0 4px 20px rgba(0,0,0,0.08);
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    border: 2px solid transparent;
    position: relative;
}

.fcard::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 5px;
    background: linear-gradient(90deg, #667eea, #764ba2);
    transform: scaleX(0);
    transition: transform 0.4s ease;
}

.fcard:hover {
    transform: translateY(-8px) scale(1.02);
    box-shadow: 0 12px 40px rgba(0,0,0,0.15);
    border-color: rgba(102, 126, 234, 0.3);
}

.fcard:hover::before {
    transform: scaleX(1);
}

/* Image de la carte (affiche admin) */
.fcard__image {
    display: block;
    width: 100%;
    height: 180px;
    object-fit: cover;
}

/* En-tête de carte */
.fcard__top {
    background: var(--fcard-accent, #667eea);
    padding: 20px;
    display: flex;
    align-items: center;
    gap: 12px;
    position: relative;
    overflow: hidden;
}

.fcard__top::after {
    content: '';
    position: absolute;
    top: -50%;
    right: -20%;
    width: 200px;
    height: 200px;
    background: rgba(255,255,255,0.1);
    border-radius: 50%;
}

.fcard--psc .fcard__top {
    background: var(--fcard-accent, #e74c3c);
}

.fcard--gqs .fcard__top {
    background: var(--fcard-accent, #3498db);
}

.fcard--cqp .fcard__top {
    background: var(--fcard-accent, #f39c12);
}

.fcard--ufostreet .fcard__top {
    background: var(--fcard-accent, #9b59b6);
}

.fcard__icon {
    font-size: 2rem;
    line-height: 1;
    z-index: 1;
    animation: bounce 2s ease-in-out infinite;
}

@keyframes bounce {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-5px); }
}

.fcard__label {
    color: white;
    font-size: 0.85rem;
    font-weight: 600;
    letter-spacing: 0.3px;
    z-index: 1;
    line-height: 1.3;
}

/* Corps de carte */
.fcard__body {
    padding: 25px;
}

.fcard__title {
    font-size: 1.8rem;
    color: #2c3e50;
    font-weight: 800;
    margin: 0 0 12px 0;
    letter-spacing: -0.5px;
}

.fcard__desc {
    color: #475569;
    font-size: 0.96rem;
    line-height: 1.7;
    margin: 0 0 20px;
    min-height: 96px;
    padding-left: 14px;
    border-left: 3px solid var(--fcard-accent, #667eea);
}

/* Sessions */
.fcard__sessions {
    margin-bottom: 20px;
    min-height: 100px;
}

.fcard__sessions-list {
    list-style: none;
    padding: 0;
    margin: 0;
}

.fcard__sessions-list li {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 12px;
    background: #f8f9fa;
    border-radius: 10px;
    margin-bottom: 10px;
    transition: all 0.3s ease;
    flex-wrap: wrap;
}

.fcard__sessions-list li:hover {
    background: #e9ecef;
    transform: translateX(5px);
}

.fcard__sdate,
.fcard__slieu {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    font-size: 0.9rem;
    color: #495057;
    font-weight: 500;
}

.fcard__sdate i,
.fcard__slieu i {
    color: #667eea;
}

.fcard__splaces {
    margin-left: auto;
    padding: 4px 12px;
    border-radius: 12px;
    font-size: 0.85rem;
    font-weight: 700;
    white-space: nowrap;
}

.fcard__splaces--ok {
    background: #d4edda;
    color: #155724;
}

.fcard__splaces--limited {
    background: #fff3cd;
    color: #856404;
}

.fcard__splaces--urgent {
    background: #f8d7da;
    color: #721c24;
    animation: pulse-urgent 1.5s ease-in-out infinite;
}

@keyframes pulse-urgent {
    0%, 100% {
        transform: scale(1);
    }
    50% {
        transform: scale(1.05);
    }
}

.fcard__no-session,
.fcard__on-demand {
    color: #6c757d;
    font-style: italic;
    font-size: 0.9rem;
    padding: 15px;
    background: #f8f9fa;
    border-radius: 10px;
    text-align: center;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
}

.fcard__on-demand i {
    color: #667eea;
}

/* Bouton CTA */
.fcard__cta {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 12px 24px;
    background: var(--fcard-accent, #667eea);
    color: white;
    text-decoration: none;
    border-radius: 25px;
    font-weight: 700;
    font-size: 0.95rem;
    transition: all 0.3s ease;
    box-shadow: 0 5px 16px color-mix(in srgb, var(--fcard-accent, #667eea) 30%, transparent);
    width: 100%;
    justify-content: center;
}

.fcard__cta:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 24px color-mix(in srgb, var(--fcard-accent, #667eea) 45%, transparent);
    filter: brightness(0.92);
}

.fcard__cta i {
    transition: transform 0.3s ease;
}

.fcard__cta:hover i {
    transform: translateX(3px);
}

/* Responsive pour formations */
@media (max-width: 768px) {
    .formations-section {
        padding: 20px 15px;
    }
    
    .formations-title {
        font-size: 1.6rem;
    }
    
    .formations-grid {
        grid-template-columns: 1fr;
        gap: 20px;
    }
    
    .fcard__desc {
        min-height: auto;
    }
    
    .fcard__sessions-list li {
        flex-direction: column;
        align-items: flex-start;
    }
    
    .fcard__splaces {
        margin-left: 0;
    }
}

/* ============= */
/* NOUVELLES CARTES D'ÉQUIPE (TMC) */
/* ============= */

.tmc-header {
    text-align: center;
    padding: 20px 15px 15px;
}

.tmc-avatar {
    width: 95px;
    height: 95px;
    margin: 0 auto 15px;
    border-radius: 50%;
    overflow: hidden;
    border: 4px solid rgba(255,255,255,0.4);
    box-shadow: 0 6px 16px rgba(0,0,0,0.25);
    background: linear-gradient(135deg, rgba(255,255,255,0.2), rgba(255,255,255,0.05));
}

.tmc-avatar img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.tmc-avatar-initials {
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 2rem;
    font-weight: 800;
    color: white;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    text-transform: uppercase;
}

.tmc-name {
    font-size: 1.2rem;
    font-weight: 800;
    color: gray;
    margin: 0 0 8px 0;
    text-shadow: 0 2px 6px rgba(0,0,0,0.3);
    letter-spacing: -0.3px;
}

.tmc-role {
    display: inline-block;
    font-size: 0.85rem;
    color: black;
    background: rgba(255,255,255,0.15);
    padding: 4px 12px;
    border-radius: 12px;
    font-weight: 600;
    backdrop-filter: blur(10px);
}

.tmc-body {
    padding: 15px;
    background: linear-gradient(135deg, #f5f7fa 0%, #ffffff 100%);
}

.tmc-desc {
    font-size: 0.95rem;
    color: #555;
    line-height: 1.6;
    margin: 0 0 15px 0;
    text-align: center;
}

.tmc-contact-btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 10px 16px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    text-decoration: none;
    border-radius: 20px;
    font-size: 0.85rem;
    font-weight: 600;
    transition: all 0.3s ease;
    box-shadow: 0 3px 12px rgba(102, 126, 234, 0.3);
    width: 100%;
    justify-content: center;
}

.tmc-contact-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 5px 20px rgba(102, 126, 234, 0.5);
}

.tmc-contact-btn i {
    font-size: 0.9rem;
}

/* Animation pour les cartes d'équipe */
.team-member-card {
    animation: teamCardSlideIn 0.6s ease-out backwards;
}

.team-member-card:nth-child(1) { animation-delay: 0.1s; }
.team-member-card:nth-child(2) { animation-delay: 0.2s; }
.team-member-card:nth-child(3) { animation-delay: 0.3s; }
.team-member-card:nth-child(4) { animation-delay: 0.4s; }
.team-member-card:nth-child(5) { animation-delay: 0.5s; }
.team-member-card:nth-child(6) { animation-delay: 0.6s; }

@keyframes teamCardSlideIn {
    from {
        opacity: 0;
        transform: translateY(30px) scale(0.95);
    }
    to {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

/* Responsive cartes équipe */
@media (max-width: 768px) {
    .team-grid-container {
        grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
    }
    
    .tmc-avatar {
        width: 60px;
        height: 60px;
    }
    
    .tmc-avatar-initials {
        font-size: 1.5rem;
    }
    
    .tmc-name {
        font-size: 1rem;
    }
    
    .tmc-role {
        font-size: 0.75rem;
    }
}

/* Styles avancés pour les articles */
.article-content {
    white-space: normal;
    line-height: 1.6;
    color: var(--dark-color);
    font-size: 1rem;
    font-family: inherit;
    margin: 1rem 0;
}

.article-content p {
    margin: 0 0 1rem 0;
}

.article-content h1,
.article-content h2,
.article-content h3,
.article-content h4,
.article-content h5,
.article-content h6 {
    color: var(--dark-color);
    margin: 1.5rem 0 0.75rem 0;
    padding: 0;
    text-align: left;
}

.article-content h1 { font-size: 1.75rem; }
.article-content h2 { font-size: 1.5rem; }
.article-content h3 { font-size: 1.3rem; }
.article-content h4 { font-size: 1.15rem; }
.article-content h5 { font-size: 1.05rem; }
.article-content h6 { font-size: 1rem; }

.article-content img {
    max-width: 100%;
    height: auto;
}

.article-content figure {
    margin: 1rem 0;
}

.article-content figcaption {
    font-size: 0.95em;
    opacity: 0.9;
}

/* Pour les titres dans le contenu */
.article-content h2,
.article-content h3 {
    font-weight: 700;
    border-bottom: 1px solid var(--light-color);
    padding-bottom: 0.35rem;
}

/* Pour les citations */
.article-content blockquote {
    border-left: 4px solid var(--asso-color);
    padding: 1rem 1.5rem;
    margin: 1.5rem 0;
    background: var(--light-color);
    font-style: italic;
    border-radius: 0 8px 8px 0;
}

/* Pour les listes */
.article-content ul {
    margin: 0 0 1rem 1.5rem;
    list-style-type: disc;
}

.article-content ol {
    margin: 0 0 1rem 1.5rem;
}

.article-content li {
    margin-bottom: 0.5rem;
    line-height: 1.6;
}

/* Pour les liens */
.article-content a {
    color: var(--asso-color);
    text-decoration: underline;
    border-bottom: 0;
}

.article-content a:hover {
    color: var(--ufolep-color);
}

/* Pour les séparateurs visuels */
.article-content hr {
    border: 0;
    height: 1px;
    background: var(--light-color);
    margin: 2rem 0;
}

/* Pour les emojis et espaces */
.article-content .emoji {
    font-size: 1.2em;
    margin: 0 3px;
}

/* Classes utilitaires */
.article-content .text-center { text-align: center; }
.article-content .text-right { text-align: right; }
.article-content .highlight { background: var(--light-color); padding: 0.2em 0.4em; border-radius: 3px; }
.article-content .badge {
    display: inline-block;
    padding: 0.25em 0.6em;
    background: var(--asso-color);
    color: white;
    border-radius: 12px;
    font-size: 0.85em;
    margin: 0 0.2em;
}

/* Pièces jointes (Vie associative / Actus) */
.article-attachments h3 {
    margin: 1rem 0 0.5rem 0;
    font-size: 1.1rem;
}

.article-attachments ul {
    margin: 0;
    padding-left: 1.25rem;
}

/* Styles pour le modal d'article */
#actu-modal .modal-content {
    max-width: 800px;
    max-height: 90vh;
    overflow-y: auto;
    padding: 30px;
}

#modal-image {
    max-width: 100%;
    max-height: 300px;
    object-fit: contain;
    margin-bottom: 20px;
    border-radius: 8px;
}

#modal-title {
    color: #2c3e50;
    font-size: 1.8rem;
    margin-bottom: 15px;
    padding-bottom: 10px;
    border-bottom: 2px solid #3498db;
}

/* Styles pour le contenu du modal */
#modal-description,
#modal-content {
    white-space: pre-wrap !important;
    line-height: 1.7;
    color: #333;
    font-size: 16px;
    margin: 1.5rem 0;
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
}

/* Paragraphes dans le modal */
#modal-description p,
#modal-content p {
    margin-bottom: 1rem;
}

/* Listes dans le modal */
#modal-description ul,
#modal-content ul,
#modal-description ol,
#modal-content ol {
    margin: 1rem 0 1rem 2rem;
}

#modal-description li,
#modal-content li {
    margin-bottom: 0.5rem;
}

/* Liens dans le modal */
#modal-description a,
#modal-content a {
    color: #0066cc;
    text-decoration: underline;
    font-weight: 500;
    display: inline-block;
    margin: 5px 0;
}

#modal-description a:hover,
#modal-content a:hover {
    color: #e74c3c;
    text-decoration: none;
}

/* Emojis dans le modal */
#modal-description .article-emoji,
#modal-content .article-emoji {
    margin-right: 5px;
    font-size: 1.1em;
}

/* Date et association */
#modal-date {
    display: block;
    color: #7f8c8d;
    font-size: 0.9rem;
    margin-top: 20px;
    padding-top: 15px;
    border-top: 1px solid #eee;
}

#modal-association {
    display: block;
    color: #3498db;
    font-weight: 500;
    margin: 10px 0;
}

/* Bouton du modal */
#modal-link {
    display: inline-block;
    background: linear-gradient(135deg, #667eea, #764ba2);
    color: white;
    padding: 10px 20px;
    border-radius: 5px;
    text-decoration: none;
    margin-top: 20px;
    font-weight: 600;
    transition: all 0.3s ease;
}

#modal-link:hover {
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(102, 126, 234, 0.4);
}

/* Responsive pour le modal */
@media (max-width: 768px) {
    #actu-modal .modal-content {
        max-width: 95%;
        padding: 20px;
    }
    
    #modal-title {
        font-size: 1.5rem;
    }
    
    #modal-description,
    #modal-content {
        font-size: 15px;
    }
}

.slide-description {
    white-space: pre-wrap;
    line-height: 1.5;
    overflow: hidden;
    text-overflow: ellipsis;
    display: -webkit-box;
    -webkit-line-clamp: 3;
    line-clamp: 3;
    -webkit-box-orient: vertical;
    max-height: 4.5em;
}

/* Styles pour les événements multi-jours */
.event-item.multi-day-start {
    background: linear-gradient(90deg, rgba(52, 152, 219, 0.2) 0%, rgba(52, 152, 219, 0.1) 100%);
    border-left: 3px solid #3498db;
    margin-left: -8px;
    padding-left: 5px;
}

.event-item.multi-day-middle {
    background: rgba(52, 152, 219, 0.1);
    margin-left: -8px;
    padding-left: 8px;
}

.event-item.multi-day-end {
    background: linear-gradient(90deg, rgba(52, 152, 219, 0.1) 0%, transparent 100%);
    margin-left: -8px;
    padding-left: 8px;
    border-right: 3px solid #3498db;
}

.event-item .event-duration {
    font-size: 0.7em;
    opacity: 0.7;
    margin-left: 3px;
}

/* Amélioration de l'affichage des événements */
.event-item a {
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    display: block;
    padding: 2px 5px;
    border-radius: 3px;
    transition: all 0.2s;
}

.event-item.multi-day-start a {
    border-top-left-radius: 0;
    border-bottom-left-radius: 0;
}

.event-item.multi-day-end a {
    border-top-right-radius: 0;
    border-bottom-right-radius: 0;
}

/* Survol */
.event-item:hover {
    background-color: rgba(46, 204, 113, 0.2);
}

.event-item.multi-day-start:hover {
    background: linear-gradient(90deg, rgba(46, 204, 113, 0.3) 0%, rgba(46, 204, 113, 0.2) 100%);
}

.event-item.multi-day-middle:hover {
    background: rgba(46, 204, 113, 0.2);
}

.event-item.multi-day-end:hover {
    background: linear-gradient(90deg, rgba(46, 204, 113, 0.2) 0%, transparent 100%);
}

/* Nouveau design pour le calendrier */
.calendar {
    background: white;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 10px 40px rgba(0,0,0,0.1);
}

.calendar-header {
    background: linear-gradient(135deg, #d81f4d 0%, #a61b3e 100%);
    color: white;
    padding: 1.5rem;
    text-align: center;
    position: relative;
}

.calendar-navigation {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 10px;
}

.calendar-navigation h3 {
    font-size: 1.8rem;
    font-weight: 700;
    margin: 0;
    color: white;
}

.nav-arrow {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px 15px;
    background: rgba(255,255,255,0.15);
    border-radius: 8px;
    text-decoration: none;
    color: white;
    transition: all 0.3s ease;
    font-weight: 600;
}

.nav-arrow:hover {
    background: rgba(255,255,255,0.25);
    transform: translateY(-2px);
}

.day-header {
    background: #f8f9fa;
    color: #6c757d;
    font-weight: 600;
    padding: 12px 0;
    border-bottom: 2px solid #dee2e6;
}

.calendar-day {
    min-height: 120px;
    border: 1px solid #f0f0f0;
    padding: 10px;
    transition: all 0.2s;
    position: relative;
}

.calendar-day:hover {
    background: #f8f9fa;
    z-index: 2;
}

.calendar-day.jour {
    background: linear-gradient(135deg, rgba(216, 31, 77, 0.1) 0%, rgba(166, 27, 62, 0.05) 100%);
    border: 2px solid #d81f4d;
}

.calendar-day.other-month {
    background: #fafafa;
    color: #adb5bd;
}

.day-number {
    font-weight: 700;
    font-size: 1.1rem;
    margin-bottom: 8px;
    color: #495057;
}

.calendar-day.other-month .day-number {
    color: #adb5bd;
}

.calendar-day.jour .day-number {
    background: #d81f4d;
    color: white;
    width: 30px;
    height: 30px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: -5px -5px 5px -5px;
}

/* Mobile first pour le calendrier */
.calendar-container {
    width: 100%;
    margin: 0 auto;
    transition: all 0.3s ease;
}

/* Vue mois (par défaut sur desktop) */
.calendar-container.month-view .calendar-grid {
    display: grid;
    grid-template-columns: repeat(7, 1fr);
    gap: 1px;
    background: #e0e0e0;
    border: 1px solid #e0e0e0;
}

/* Vue semaine (par défaut sur mobile) */
.calendar-container.week-view .calendar-week {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.calendar-container.week-view .week-day {
    border: 1px solid #ddd;
    border-radius: 8px;
    padding: 10px;
    background: white;
}

.week-day-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 10px;
    padding-bottom: 8px;
    border-bottom: 1px solid #eee;
}

.week-date-full {
    font-weight: bold;
    font-size: 1rem;
    color: #333;
}

.today-badge {
    background: var(--ufolep-color);
    color: white;
    border-radius: 999px;
    padding: 4px 10px;
    font-size: 0.85rem;
    font-weight: bold;
    white-space: nowrap;
}

.calendar-container.week-view .week-day.jour {
    border-color: var(--ufolep-color);
    box-shadow: 0 2px 8px rgba(0,0,0,0.08);
    background: rgba(255, 255, 255, 0.95);
}

.calendar-container.week-view .week-day.jour .week-day-header {
    border-bottom-color: var(--ufolep-color);
}

.day-name {
    font-weight: bold;
    font-size: 0.9em;
    color: #666;
}

.day-date {
    display: flex;
    align-items: center;
    gap: 4px;
    font-size: 1.2em;
    font-weight: bold;
}

.month-indicator {
    font-size: 0.7em;
    color: #888;
    font-weight: normal;
}

.week-events {
    min-height: 60px;
}

.week-event-item {
    margin: 4px 0;
    padding: 6px 8px;
    background: var(--event-bg, #f8f9fa);
    border-radius: 4px;
    border-left: 3px solid var(--event-accent, #007bff);
}

.week-event-item .event-link {
    display: flex;
    align-items: center;
    gap: 8px;
    text-decoration: none;
    color: var(--event-fg, #333);
}

.event-time {
    font-size: 0.8em;
    color: #666;
    min-width: 45px;
}

.event-title {
    flex: 1;
    font-size: 0.9em;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.no-events {
    font-size: 0.9em;
    color: #999;
    font-style: italic;
    text-align: center;
    padding: 10px;
}

/* Contrôles du calendrier */
.calendar-controls {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 15px;
    padding: 10px;
    background: white;
    border-radius: 8px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

.calendar-title {
    font-size: 1.2em;
    font-weight: bold;
    text-align: center;
    flex: 1;
}

.calendar-nav {
    display: flex;
    gap: 10px;
}

.nav-btn {
    padding: 8px 15px;
    border: none;
    background: #007bff;
    color: white;
    border-radius: 4px;
    cursor: pointer;
    transition: background 0.3s;
    font-size: 0.9em;
}

.nav-btn:hover {
    background: #0056b3;
}

.nav-btn:disabled {
    background: #ccc;
    cursor: not-allowed;
}

.switch-view-btn {
    padding: 8px 15px;
    background: #28a745;
    color: white;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 5px;
    font-size: 0.9em;
}

.switch-view-btn:hover {
    background: #218838;
}

/* Responsive */
@media (max-width: 768px) {
    .calendar-container.month-view .calendar-grid {
        grid-template-columns: repeat(7, 1fr);
        font-size: 0.9em;
    }
    
    .calendar-controls {
        flex-direction: column;
        gap: 10px;
    }
    
    .calendar-nav {
        order: 2;
    }
    
    .switch-view-btn {
        order: 1;
        width: 100%;
        justify-content: center;
    }
    
    .calendar-title {
        order: 3;
        margin-top: 10px;
    }
}

@media (min-width: 769px) {
    .calendar-container.week-view {
        display: none; /* Masquer la vue semaine sur desktop */
    }
}

@media (max-width: 480px) {
    .calendar-container.week-view .week-day {
        padding: 8px;
    }
    
    .event-title {
        font-size: 0.85em;
    }
    
    .nav-btn, .switch-view-btn {
        padding: 6px 12px;
        font-size: 0.85em;
    }
}

/* =====================================================
   Mobile + Safari/iOS friendly overrides (public pages)
   Ajouté en fin de fichier pour ne pas casser l'existant.
   ===================================================== */

html {
    -webkit-text-size-adjust: 100%;
    text-size-adjust: 100%;
}

*, *::before, *::after {
    box-sizing: border-box;
}

img, video, iframe {
    max-width: 100%;
    height: auto;
}

html, body {
    max-width: 100%;
    overflow-x: hidden;
}

/* iOS Safari: scrolling plus fluide dans les zones overflow */
@supports (-webkit-overflow-scrolling: touch) {
    .calendar-container,
    .job-cards,
    main {
        -webkit-overflow-scrolling: touch;
    }
}

/* Backdrop-filter: prefix Safari */
.info-ticker {
    -webkit-backdrop-filter: blur(6px);
    backdrop-filter: blur(6px);
}

/* Safe-area (iPhone avec encoche) */
body {
    padding-left: env(safe-area-inset-left);
    padding-right: env(safe-area-inset-right);
}

@media (max-width: 900px) {
    header {
        height: auto;
    }

    header p {
        display: none;
    }

    .menu {
        height: auto;
        min-height: 72px;
        flex-wrap: wrap;
        padding: 8px 6px;
    }

    .logo {
        height: 64px;
        margin-left: 12px;
    }

    #nav, #navlast {
        font-size: 1rem;
        padding: 12px 10px;
        margin: 6px 6px;
        border-radius: 10px;
    }

    main {
        width: calc(100% - 16px);
        margin: 10px auto;
        border-radius: 12px;
    }

    .boite {
        width: calc(100% - 16px);
        padding: 12px;
    }

    /* Tables: éviter le débordement horizontal */
    table {
        display: block;
        max-width: 100%;
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
    }
}

@media (max-width: 480px) {
    #nav, #navlast {
        font-size: 0.95rem;
        padding: 10px 8px;
    }
}

/* ============================== */
/* LAYOUT GLOBAL - OVERRIDES FINAL */
/* ============================== */

/* Éviter les débordements horizontaux causés par des largeurs fixes. */
body {
    overflow-x: hidden;
}

html {
    min-height: 100%;
}

img,
video,
canvas,
svg {
    max-width: 100%;
}

/* Colonnes accueil: ne jamais dépasser la largeur écran */
.main-layout {
    width: 100%;
}

.main-column,
.social-column,
.social-feed {
    width: auto;
    max-width: 100%;
}

/* À partir des écrans “moyens”, on empile pour supprimer l’overflow (1200/400). */
@media (max-width: 1200px) {
    .main-layout {
        flex-direction: column;
    }
}

@media (max-width: 768px) {
    .boite {
        width: calc(100% - 16px);
        padding: 12px;
        margin-top: 12px;
    }

    main {
        width: calc(100% - 16px);
        margin: 10px auto;
    }

    /* Accueil: calendrier/événements plus lisible en colonne */
    .calendrier-events {
        flex-direction: column;
        gap: 12px;
        max-width: 100%;
        min-height: auto;
        padding: 12px;
    }

    .events-upcoming {
        max-height: none;
        width: 100%;
        margin: 0;
    }

    .full-content {
        padding: 1rem;
    }
}

/* Header/Menu: bloc final pour coller à main.js (toggle .menu.active) */
@media (max-width: 768px) {
    header {
        position: relative !important;
        top: auto !important;
        height: var(--ufolep-menu-height, 120px);
        min-height: 0 !important;
        z-index: auto !important;
    }

    .menu {
        position: fixed;
        top: 0;
        left: 0;
        right: 0;
        height: auto;
        min-height: 72px;
        flex-direction: column;
        align-items: stretch;
        justify-content: flex-start;
        padding: 10px;
        gap: 6px;
    }

    header p {
        display: none !important;
    }

    .menu-toggle {
        display: block;
        width: 100%;
        margin: 8px 0;
        order: 2;
    }

    .menu #nav,
    .menu #navlast {
        display: none;
        width: 100%;
        text-align: center;
        margin: 6px 0;
        order: 3;
    }

    .menu.active #nav,
    .menu.active #navlast {
        display: block;
    }

    .menu.active {
        max-height: 100vh;
        overflow-y: auto;
        -webkit-overflow-scrolling: touch;
    }
}