/*
Theme Name: Conques-sur-Orbiel
Theme URI: https://dev.conques-sur-orbiel.fr/
Author: Mairie de Conques-sur-Orbiel
Description: Thème institutionnel WordPress sur mesure en pleine largeur. Intègre un méga-menu responsive, un bandeau d'alertes dynamique, un slider d'en-tête personnalisable, une grille d'actualités juxtaposées avec tri par date, un agenda interactif, un espace démarches et kiosque documentaire moderne, ainsi qu'un pied de page entièrement administrable.
Version: 1.61
*/

:root {
    --cso-red: #e63316;
    --cso-blue: #007bc4;
    --cso-gray: #eee8e8;
    --cso-dark: #1d1d1b;
}

body { margin: 0; padding: 0; font-family: 'Allotrope Variable', 'Helvetica Neue', Helvetica, Arial, sans-serif; color: var(--cso-dark); background-color: #ffffff; overflow-x: hidden; }
.w-100 { width: 100vw; max-width: 100%; padding-left: 6%; padding-right: 6%; box-sizing: border-box; }
.bg-gray { background-color: var(--cso-gray); }
.bg-red { background-color: var(--cso-red); color: #ffffff; }

/* HEADER & NAVIGATION MEGA-MENU */
.site-header { position: relative; background-color: var(--cso-red); padding: 0; }
.site-header-inner { display: flex; justify-content: space-between; align-items: center; padding-top: 10px; padding-bottom: 10px; width: 100vw; max-width: 100%; padding-left: 1%; padding-right: 1%; box-sizing: border-box; }
.logo img { max-height: 70px; width: auto; }
.logo a { color: #ffffff; text-decoration: none; font-weight: 800; font-size: 1.5rem; }

.main-navigation { display: flex; align-items: center; }
.menu-wrapper { display: flex; align-items: center; }

.nav-menu { list-style: none; display: flex; gap: 15px; margin: 0; padding: 0; align-items: center; }
.nav-menu > li > a { background-color: #ffffff; color: var(--cso-red); text-decoration: none; font-weight: 800; font-size: 0.735rem; padding: 8px 25px; border-radius: 50px; border: 2px solid #ffffff; transition: all 0.3s ease; display: inline-block; cursor: pointer; }
.nav-menu > li > a:hover,
.nav-menu > li.mega-active > a,
.nav-menu > li.current-menu-item > a,
.nav-menu > li.current_page_item > a,
.nav-menu > li.current-menu-ancestor > a { background-color: transparent; color: #ffffff; font-weight: 800; border-color: #ffffff; }
.nav-menu .menu-item-has-children > a::after { content: ' ▼'; font-size: 0.7em; margin-left: 5px; }

.nav-menu .sub-menu { display: none; position: absolute; top: 100%; left: 0; width: 100vw; background-color: #ffffff; box-shadow: 0 15px 30px rgba(0,0,0,0.1); padding: 40px 6%; box-sizing: border-box; z-index: 1000; border-top: 1px solid var(--cso-gray); }
.nav-menu li.mega-active > .sub-menu { display: flex; flex-wrap: wrap; gap: 40px; align-items: flex-start; }
.nav-menu .sub-menu li { list-style: none; flex: 1 1 200px; min-width: 200px; }
.nav-menu .sub-menu li a { color: var(--cso-dark); font-weight: 700; text-decoration: none; display: block; padding: 10px 0; border-bottom: 2px solid var(--cso-gray); transition: color 0.3s ease, border-color 0.3s ease; }
.nav-menu .sub-menu li a:hover,
.nav-menu .sub-menu li.current-menu-item > a,
.nav-menu .sub-menu li.current_page_item > a { color: var(--cso-red); border-bottom-color: var(--cso-red); font-weight: 800; }
.nav-menu .sub-menu .sub-menu { position: static; display: block; box-shadow: none; padding: 10px 0 0 10px; width: 100%; border: none; }
.nav-menu .sub-menu .sub-menu li a { font-weight: normal; font-size: 0.9rem; border: none; padding: 5px 0; }

.nav-search { display: flex; align-items: center; justify-content: center; padding: 5px; margin-left: 15px; cursor: pointer; transition: opacity 0.3s ease; }
.nav-search:hover { opacity: 0.7; }

.menu-toggle { display: none; background: transparent; border: none; cursor: pointer; flex-direction: column; gap: 6px; padding: 10px; z-index: 1001; }
.menu-toggle .bar { width: 30px; height: 3px; background-color: #ffffff; transition: 0.3s; }

@media (max-width: 1024px) {
    .menu-toggle { display: flex; }
    .menu-wrapper { position: fixed; top: 0; right: -100%; width: 100vw; max-width: 400px; height: 100vh; background-color: var(--cso-red); padding: 80px 6% 40px; box-sizing: border-box; transition: right 0.4s cubic-bezier(0.77, 0, 0.175, 1); z-index: 1000; overflow-y: auto; flex-direction: column; align-items: flex-start; box-shadow: -10px 0 30px rgba(0,0,0,0.2); }
    .menu-wrapper.toggled { right: 0; }
    .menu-toggle.toggled .bar:nth-child(1) { transform: translateY(9px) rotate(45deg); }
    .menu-toggle.toggled .bar:nth-child(2) { opacity: 0; }
    .menu-toggle.toggled .bar:nth-child(3) { transform: translateY(-9px) rotate(-45deg); }
    
    .nav-menu { flex-direction: column; align-items: flex-start; width: 100%; gap: 0; }
    .nav-menu > li { width: 100%; height: auto; }
    .nav-menu > li > a { display: block; background: transparent; color: #ffffff; padding: 14px 0; font-size: 1.15rem; border-radius: 0; border: none; border-bottom: 1px solid rgba(255,255,255,0.2); font-weight: 700; }
    .nav-menu > li > a:hover,
    .nav-menu > li.mega-active > a,
    .nav-menu > li.current-menu-item > a,
    .nav-menu > li.current_page_item > a,
    .nav-menu > li.current-menu-ancestor > a { background: rgba(255,255,255,0.12); color: #ffffff; font-weight: 800; padding-left: 10px; border-bottom-color: #ffffff; }
    
    .nav-menu .sub-menu { display: none; position: static; width: 100%; height: auto; background-color: rgba(0,0,0,0.12); box-shadow: none; padding: 8px 0 8px 15px; margin: 0; border-top: none; }
    .nav-menu li.mega-active > .sub-menu { display: flex; flex-direction: column; gap: 2px; }
    .nav-menu .sub-menu li { flex: 0 0 auto !important; min-width: 0 !important; width: 100%; height: auto; margin: 0; padding: 0; }
    .nav-menu .sub-menu li a { color: #ffffff; padding: 6px 0; border-bottom: none; font-weight: 600; font-size: 1rem; }
    .nav-menu .sub-menu li a:hover,
    .nav-menu .sub-menu li.current-menu-item > a,
    .nav-menu .sub-menu li.current_page_item > a { color: #ffffff; font-weight: 800; text-decoration: underline; background: transparent; }
    .nav-menu .sub-menu .sub-menu { padding: 4px 0 4px 12px; margin: 0; background: transparent; }
    .nav-menu .sub-menu .sub-menu li a { padding: 4px 0; font-size: 0.92rem; font-weight: 400; color: rgba(255,255,255,0.9); }
    
    .nav-search { margin-top: 25px; margin-left: 0; }
}

/* Accès rapides (réduit et masqué sur le bord tant qu'on ne le survole pas) */
.acces-rapides-btn { position: fixed; top: 30vh; right: -62px; width: 84px; height: 84px; background-color: var(--cso-red); border: 3px solid #ffffff; border-radius: 50%; display: flex; flex-direction: column; justify-content: center; align-items: flex-start; padding-left: 14px; box-sizing: border-box; color: #ffffff; font-weight: 800; font-size: 0.78rem; text-decoration: none; line-height: 1.15; z-index: 9999; box-shadow: -2px 4px 12px rgba(0,0,0,0.18); opacity: 0.45; transition: right 0.3s cubic-bezier(0.25, 0.8, 0.25, 1), opacity 0.3s ease, transform 0.3s ease; }
.acces-rapides-btn:hover, .acces-rapides-btn:focus { right: -10px; opacity: 1; transform: scale(1.03); }
.acces-rapides-btn::after { content: ''; display: block; width: 32px; height: 13px; background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 240 100'%3E%3Cpath d='M 24 15 A 138 138 0 0 0 214 15 L 236 37 A 170 170 0 0 1 2 37 Z' fill='%23ffffff'/%3E%3C/svg%3E") no-repeat center / contain; border: none; border-radius: 0; margin-top: 4px; }

/* Bandeau de Notification */
.notification-banner { background-color: var(--cso-blue); padding: 10px 6%; display: flex; justify-content: space-between; align-items: center; min-height: 50px; flex-wrap: wrap; gap: 15px; }
.notif-left { display: flex; flex-grow: 1; }
.notif-left a { width: 100%; text-decoration: none; }
.notif-pill { background-color: #ffffff; color: var(--cso-dark); padding: 8px 25px; border-radius: 50px; font-size: 0.8rem; font-weight: 800; display: inline-flex; align-items: center; width: 100%; box-sizing: border-box; }
.social-icons { display: flex; gap: 10px; align-items: center; }
.social-icons .icon { width: 30px; height: 30px; background-color: #ffffff; border-radius: 50%; display: flex; align-items: center; justify-content: center; color: var(--cso-blue); text-decoration: none; transition: transform 0.2s ease; }
.social-icons .icon:hover { transform: scale(1.1); }
.social-icons .icon i { font-size: 16px; }

@media (max-width: 768px) {
    .notification-banner { flex-direction: column; align-items: stretch; }
    .notif-pill { justify-content: center; text-align: center; }
    .social-icons { justify-content: center; margin-top: 5px; }
}

/* Hero Slider — Mode Hybride : Photo entière + Fond flouté (Solution 2) & Plein cadre avec Point focal (Solution 3) */
.hero-slider-wrapper {
    position: relative;
    width: 100%;
    max-width: 100%;
    aspect-ratio: var(--hero-ratio, 16 / 6);
    min-height: 220px;
    max-height: 620px;
    display: flex;
    align-items: center;
    overflow: hidden;
    background-color: var(--cso-dark);
}
.swiper-hero {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 1;
}
.swiper-slide {
    position: relative;
    width: 100%;
    height: 100%;
    overflow: hidden;
}
/* Mode 1 : Plein cadre avec point focal (Haut / Centre / Bas) */
.swiper-slide-cover-mode {
    background-size: cover;
    background-repeat: no-repeat;
}
/* Mode 2 : Photo entière au centre + fond flouté esthétique sur les côtés */
.swiper-slide-blur-mode {
    display: flex;
    align-items: center;
    justify-content: center;
}
.swiper-slide-blur-mode .slide-bg-blur {
    position: absolute;
    top: -10%;
    left: -10%;
    width: 120%;
    height: 120%;
    background-size: cover;
    background-repeat: no-repeat;
    filter: blur(22px) brightness(0.75);
    transform: scale(1.05);
    z-index: 1;
}
.swiper-slide-blur-mode .slide-fg-contain {
    position: relative;
    z-index: 2;
    width: 100%;
    height: 100%;
    object-fit: contain;
    display: block;
    filter: drop-shadow(0 0 25px rgba(0,0,0,0.45));
}
.swiper-slide::after {
    content: "";
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0,0,0,0.22);
    z-index: 3;
    pointer-events: none;
}
.hero-content {
    position: relative;
    z-index: 10;
    display: flex;
    width: 100%;
    height: 100%;
    align-items: center;
    justify-content: flex-start;
    padding: 2% 6%;
    box-sizing: border-box;
    pointer-events: none;
}
.hero-left-logo, .hero-slogan {
    pointer-events: auto;
}
.hero-left-logo {
    flex: 0 0 clamp(90px, 18vw, 280px);
    padding-right: clamp(12px, 3vw, 40px);
}
.hero-left-logo img {
    max-width: 100%;
    height: auto;
    display: block;
}
.hero-slogan {
    flex: 1 1 auto;
    min-width: 0;
    display: flex;
    justify-content: center;
    padding: 0 2%;
    box-sizing: border-box;
}
.hero-slogan h1 {
    font-size: clamp(1.15rem, 4.2vw, var(--slogan-size, 5rem));
    font-weight: 800;
    line-height: 1.05;
    margin: 0;
    max-width: 100%;
    text-transform: uppercase;
    color: #ffffff;
    text-shadow: 2px 2px 10px rgba(0,0,0,0.55);
    text-align: center;
    overflow-wrap: break-word;
    word-break: break-word;
    box-sizing: border-box;
}

@media (max-width: 768px) {
    .hero-content {
        padding: 3% 5%;
        gap: 8px;
    }
    .hero-left-logo {
        flex: 0 0 clamp(65px, 20vw, 120px);
        padding-right: 10px;
    }
    .hero-slogan {
        padding: 0 4px;
    }
    .hero-slogan h1 {
        font-size: clamp(0.95rem, 4.5vw, 1.8rem);
        line-height: 1.1;
    }
}

/* Sections Générales */
.section-title { font-size: 1.8rem; font-weight: 800; margin-bottom: 25px; color: var(--cso-dark); text-transform: none; }
.grid-cards { display: grid; grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); gap: 30px; }
.card { background: #ffffff; display: flex; flex-direction: column; box-shadow: 0 4px 15px rgba(0,0,0,0.05); transition: transform 0.2s ease; border: none; }
.card:hover { transform: translateY(-5px); box-shadow: 0 10px 20px rgba(0,0,0,0.1); }
.card-img { width: 100%; height: 220px; object-fit: cover; border-bottom: 4px solid var(--cso-blue); background-color: #eee; }
.card-content { padding: 25px; flex-grow: 1; }
.card-content h3 { margin-top: 0; font-size: 1.3rem; font-weight: 800; color: var(--cso-dark); }
.card-content p { font-size: 0.95rem; line-height: 1.5; color: #555; }

/* AGENDA SPECIFIQUE */
.grid-agenda { display: flex; flex-wrap: nowrap; gap: 1.5%; justify-content: flex-start; }
.card-agenda { flex: 0 0 18.8%; max-width: 20%; background-color: var(--cso-gray); padding: 15px; box-sizing: border-box; box-shadow: none; border: none; border-radius: 5px; display: flex; flex-direction: column; }
.card-agenda:hover { transform: translateY(-3px); }
.agenda-date-pill { background-color: #ffffff; color: var(--cso-dark); font-weight: 800; font-size: 0.95rem; padding: 6px 16px; display: inline-flex; align-items: center; border-radius: 50px; margin-bottom: 8px; width: max-content; }
.agenda-date-pill .chevron { color: var(--cso-red); margin-right: 8px; font-weight: bold; }
.card-agenda .card-img { height: 155px; border-bottom: 0; border-radius: 5px; width: 100%; display: block; object-fit: cover; }
.agenda-cat-badge { background-color: var(--cso-red); color: #ffffff; font-size: 0.72rem; font-weight: 800; padding: 4px 12px; border-radius: 50px; display: inline-flex; align-items: center; justify-content: center; text-transform: uppercase; margin-top: 12px; margin-bottom: 8px; line-height: 1.2; text-align: center; width: fit-content; }
.card-agenda .card-content { padding: 0; background: transparent; display: flex; flex-direction: column; flex-grow: 1; }
.card-agenda .card-content h3 { font-size: 1.12rem; line-height: 1.3; margin: 0 0 8px 0; }
.card-agenda .excerpt { font-size: 0.9rem; line-height: 1.45; color: #555; margin-bottom: 12px; flex-grow: 1; }
.card-agenda .excerpt p { margin: 0; }
@media (max-width: 1024px) { .grid-agenda { flex-wrap: wrap; } .card-agenda { flex: 0 0 32%; max-width: 33.333%; margin-bottom: 20px;} }
@media (max-width: 768px) { .card-agenda { flex: 0 0 100%; max-width: 100%; } }

.btn { display: inline-block; padding: 10px 30px; border-radius: 50px; text-decoration: none; font-weight: 600; transition: all 0.3s ease; margin-top: 20px; }
.btn-outline { border: 2px solid var(--cso-dark); color: var(--cso-dark); background: transparent; }
.btn-outline:hover { background-color: var(--cso-dark); color: #ffffff; }

/* DÉMARCHES */
.demarches-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 20px; }
.demarche-card { background: #ffffff; border: 2px solid var(--cso-gray); border-radius: 10px; padding: 30px 20px; text-align: center; text-decoration: none; color: var(--cso-dark); transition: all 0.3s ease; display: flex; flex-direction: column; align-items: center; justify-content: center; box-shadow: 0 4px 10px rgba(0,0,0,0.02); }
.demarche-card:hover { border-color: var(--cso-red); transform: translateY(-5px); box-shadow: 0 10px 20px rgba(0,0,0,0.08); }
.demarche-icon { font-size: 2.5rem; color: var(--cso-blue); margin-bottom: 8px; transition: transform 0.3s ease; display: flex; align-items: center; justify-content: center; }
.demarche-icon i { line-height: 1; }
.demarche-card:hover .demarche-icon { transform: scale(1.1); color: var(--cso-red); }
.demarche-title { font-size: 1.1rem; font-weight: 800; margin: 0; line-height: 1.3; }

/* KIOSQUE MODERNE */
.kiosque-cards-container { display: grid; grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); gap: 30px; margin-bottom: 40px; }
.kiosque-card { background-color: #ffffff; border-top: 4px solid var(--cso-red); border-radius: 8px; padding: 40px 25px 30px; box-shadow: 0 4px 15px rgba(0,0,0,0.05); text-align: center; transition: transform 0.3s ease, box-shadow 0.3s ease; display: flex; flex-direction: column; justify-content: space-between; height: 100%; min-height: 350px; }
.kiosque-card:hover { transform: translateY(-8px); box-shadow: 0 15px 30px rgba(0,0,0,0.1); }
.kiosque-icon { font-size: 3.5rem; color: var(--cso-red); margin-bottom: 8px; transition: transform 0.3s ease; opacity: 0.9; }
.kiosque-card:hover .kiosque-icon { transform: scale(1.15); color: var(--cso-blue); }
.kiosque-card h3 { font-size: 1.4rem; color: var(--cso-dark); margin: 0 0 15px 0; font-weight: 800; }
.kiosque-count { background-color: var(--cso-gray); color: var(--cso-dark); font-size: 0.85rem; font-weight: bold; padding: 6px 15px; border-radius: 50px; display: inline-block; margin-bottom: 8px; }
.kiosque-latest { font-size: 0.95rem; color: #555; margin-bottom: 8px; flex-grow: 1; border-top: 1px dashed var(--cso-gray); padding-top: 20px; }
.kiosque-latest strong { color: var(--cso-dark); display: block; margin-bottom: 8px; text-transform: uppercase; font-size: 0.75rem; letter-spacing: 0.5px; }
.kiosque-latest a { color: var(--cso-blue); text-decoration: none; font-weight: 600; line-height: 1.4; display: block; }
.kiosque-latest a:hover { text-decoration: underline; color: var(--cso-red); }
.kiosque-action { display: inline-block; color: var(--cso-dark); font-weight: 800; text-decoration: none; text-transform: uppercase; font-size: 0.9rem; transition: all 0.3s ease; border: 2px solid var(--cso-dark); padding: 10px 20px; border-radius: 50px; margin-top: auto; }
.kiosque-card:hover .kiosque-action { background-color: var(--cso-dark); color: #ffffff; }

@media (max-width: 480px) {
    .kiosque-card { padding: 30px 15px; }
    .kiosque-action { font-size: 0.8rem; padding: 8px 15px; margin-bottom: 10px; }
}

.notif-listing { max-width: 800px; margin: 0 auto; padding: 40px 0; }
.notif-item { border-left: 4px solid var(--cso-red); padding: 15px; margin-bottom: 20px; background: #ffffff; box-shadow: 0 2px 10px rgba(0,0,0,0.05); }
.site-footer { padding-top: 40px; padding-bottom: 40px; text-align: center; }

/* Contenu des articles seuls (single.php) */
.single-content { max-width: 800px; margin: 0 auto; padding: 30px 6%; line-height: 1.55; font-size: 1.05rem; }
.single-content img { max-width: 100%; height: auto; border-radius: 8px; margin: 20px 0; }
.single-header { background-color: var(--cso-gray); padding: 30px 6%; text-align: center; }

.single-meta { font-size: 0.9rem; color: #666; font-weight: bold; }

/* HEADER SEARCH BAR */
.site-header-inner { position: relative; z-index: 1002; }
.header-search-container { position: absolute; top: 100%; right: 6%; background: #ffffff; padding: 15px 20px; box-shadow: 0 5px 15px rgba(0,0,0,0.2); border-radius: 0 0 10px 10px; opacity: 0; visibility: hidden; transform: translateY(-10px); transition: all 0.3s ease; z-index: 1000; border-top: 3px solid var(--cso-red); }
.header-search-container.active { opacity: 1; visibility: visible; transform: translateY(0); }
.header-search-form { display: flex; align-items: center; }
.header-search-form .search-field { padding: 10px 15px; border: 1px solid #ccc; border-radius: 50px 0 0 50px; font-size: 0.95rem; outline: none; width: 250px; }
.header-search-form .search-submit { background-color: var(--cso-red); color: #fff; border: none; padding: 10px 20px; border-radius: 0 50px 50px 0; font-weight: bold; cursor: pointer; transition: background 0.3s ease; }
.header-search-form .search-submit:hover { background-color: var(--cso-dark); }

@media (max-width: 1024px) {
    .header-search-container { position: static; opacity: 1; visibility: visible; transform: none; box-shadow: none; padding: 0; background: transparent; border: none; margin-top: 15px; display: none; }
    .header-search-container.active { display: block; }
}

/* H2 ARC ORANGE (SMILEY ROUGE EXACT) & MARGES REDUITES */
.home-section { padding-top: 35px !important; padding-bottom: 55px !important; }
.section-title {
    margin-top: 0 !important;
    margin-bottom: 30px !important;
    position: relative;
    padding-bottom: 24px;
    text-transform: none;
}
.section-title::after {
    content: "";
    position: absolute;
    bottom: 0;
    left: 0;
    width: 50px;
    height: 21px;
    background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 240 100'%3E%3Cpath d='M 24 15 A 138 138 0 0 0 214 15 L 236 37 A 170 170 0 0 1 2 37 Z' fill='%23e63316'/%3E%3C/svg%3E") no-repeat center / contain;
    border: none;
    border-radius: 0;
}

/* FOOTER CLAIR & ÉPURÉ (v1.39) */
.site-footer-modern {
    background-color: #ffffff;
    color: var(--cso-dark);
    padding-top: 40px;
    padding-bottom: 0;
    box-sizing: border-box;
    margin-top: 40px;
    border-top: 2px solid var(--cso-gray);
}
.footer-container {
    width: 100vw;
    max-width: 100%;
    padding-left: 6%;
    padding-right: 6%;
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 30px;
    margin-bottom: 30px;
}
.footer-col h3 {
    color: var(--cso-dark);
    font-size: 1.3rem;
    font-weight: 800;
    margin-top: 0;
    margin-bottom: 8px;
    text-transform: uppercase;
    position: relative;
    padding-bottom: 8px;
    letter-spacing: 1px;
}
.footer-col h3::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 40px;
    height: 4px;
    background-color: var(--cso-red);
    border-radius: 2px;
}
.footer-col p {
    font-size: 0.95rem;
    line-height: 1.6;
    color: #555;
    margin-bottom: 8px;
    display: flex;
    align-items: center;
    gap: 12px;
}
.footer-col p i {
    color: var(--cso-blue);
    background: var(--cso-gray);
    padding: 10px;
    border-radius: 50%;
    width: 16px;
    height: 16px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    transition: background 0.3s ease, color 0.3s ease, transform 0.3s ease;
}
.footer-col p:hover i {
    background: var(--cso-red);
    color: #ffffff;
    transform: scale(1.1);
}
.footer-col a {
    color: #555;
    text-decoration: none;
    transition: color 0.3s ease, padding-left 0.3s ease;
    display: inline-block;
    font-weight: 500;
}
.footer-col a:not(.footer-partners-grid a):hover {
    color: var(--cso-red);
    padding-left: 5px;
}
/* MODALE DES HORAIRES (v1.41) */
.cso-modal {
    display: none;
    position: fixed;
    z-index: 10000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    overflow: auto;
    background-color: rgba(0, 0, 0, 0.5);
    backdrop-filter: blur(4px);
    align-items: center;
    justify-content: center;
}
.cso-modal.show {
    display: flex;
    animation: fadeIn 0.3s ease;
}
.cso-modal-content {
    max-height: 90vh;
    overflow-y: auto;
    background-color: #ffffff;
    margin: auto;
    padding: 30px;
    border-radius: 8px;
    width: 90%;
    max-width: 450px;
    position: relative;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.2);
    color: var(--cso-dark);
    text-align: center;
    animation: slideUp 0.3s ease;
    border-top: 4px solid var(--cso-blue);
}
.cso-modal-close {
    position: absolute;
    top: 15px;
    right: 15px;
    background: transparent;
    border: none;
    color: #999;
    font-size: 1.5rem;
    cursor: pointer;
    transition: color 0.2s ease, transform 0.2s ease;
}
.cso-modal-close:hover {
    color: var(--cso-red);
    transform: scale(1.1);
}
.cso-modal-content h4 {
    margin-top: 0;
    font-size: 1.4rem;
    color: var(--cso-dark);
    margin-bottom: 20px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
}
.cso-modal-content h4 i {
    color: var(--cso-blue);
    font-size: 1.6rem;
}
.cso-modal-content p {
    font-size: 1.1rem;
    line-height: 1.8;
    margin: 0;
    color: #444;
    font-weight: 500;
}
@keyframes fadeIn { from { opacity: 0; } to { opacity: 1; } }
@keyframes slideUp { from { transform: translateY(20px); opacity: 0; } to { transform: translateY(0); opacity: 1; } }
.footer-legal-list, .footer-partners-list {
    list-style: none;
    padding: 0;
    margin: 0;
}
.footer-legal-list li {
    margin-bottom: 8px;
    border-bottom: 1px dashed #ddd;
    padding-bottom: 5px;
}
.footer-legal-list li:last-child {
    border-bottom: none;
    margin-bottom: 0;
}
.footer-legal-list li a {
    color: #555;
    font-size: 0.95rem;
}
.footer-bottom {
    background-color: var(--cso-gray);
    padding: 15px 6%;
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 15px;
}
.footer-bottom p {
    margin: 0;
    font-size: 0.85rem;
    color: #555;
    font-weight: 600;
}
.footer-socials a {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 35px;
    height: 35px;
    background: #ffffff;
    color: var(--cso-blue);
    border-radius: 50%;
    margin-left: 10px;
    box-shadow: 0 2px 5px rgba(0,0,0,0.05);
    transition: background 0.3s ease, color 0.3s ease, transform 0.3s ease;
}
.footer-socials a:hover {
    background: var(--cso-red);
    color: #ffffff;
    transform: translateY(-3px);
    padding-left: 0;
}
@media (max-width: 768px) {
    .site-footer-modern {
        padding-top: 40px;
    }
    .footer-container {
        grid-template-columns: 1fr;
        gap: 40px;
    }
    .footer-bottom {
        flex-direction: column;
        text-align: center;
        justify-content: center;
    }
    .footer-socials a {
        margin: 0 5px;
    }
}

/* ICÔNE MAISON (ACCUEIL) DANS LE MENU */
.nav-menu > li.menu-item-home-icon > a {
    padding: 8px 14px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 0.9rem;
}
@media (max-width: 1024px) {
    .nav-menu > li.menu-item-home-icon > a {
        padding: 15px 0;
        justify-content: flex-start;
        font-size: 1.2rem;
    }
}
/* ========================================================
   ACTUALITÉS : 4 VIGNETTES JUXTAPOSÉES
======================================================== */
.grid-news-4 {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 25px;
}
@media (max-width: 1100px) {
    .grid-news-4 { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 650px) {
    .grid-news-4 { grid-template-columns: 1fr; }
}

.card-news {
    background: #ffffff;
    display: flex;
    flex-direction: column;
    box-shadow: 0 4px 15px rgba(0,0,0,0.05);
    transition: transform 0.2s ease, box-shadow 0.2s ease;
    border-radius: 6px;
    overflow: hidden;
    height: 100%;
}
.card-news:hover {
    transform: translateY(-5px);
    box-shadow: 0 12px 24px rgba(0,0,0,0.1);
}
.card-news .card-img {
    width: 100%;
    height: 200px;
    object-fit: cover;
    border-bottom: 4px solid var(--cso-blue);
    background-color: #eee;
    display: block;
}
.card-news .card-content {
    padding: 15px;
    flex-grow: 1;
    display: flex;
    flex-direction: column;
}
.news-date {
    font-size: 0.82rem;
    font-weight: 700;
    color: var(--cso-blue);
    margin-bottom: 8px;
    display: flex;
    align-items: center;
    gap: 6px;
    text-transform: uppercase;
}
.card-news h3 {
    margin: 0 0 10px 0;
    font-size: 1.2rem;
    font-weight: 800;
    color: var(--cso-dark);
    line-height: 1.3;
}
.card-news .excerpt {
    font-size: 0.92rem;
    line-height: 1.5;
    color: #555;
    margin-bottom: 8px;
    flex-grow: 1;
}
.card-news .excerpt p {
    margin: 0;
}
.news-read-more {
    margin-top: auto;
    color: var(--cso-red);
    font-weight: 800;
    font-size: 0.9rem;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    transition: color 0.2s ease;
}
.news-read-more:hover {
    color: var(--cso-dark);
}

/* TITRES DE PAGES (H1) SANS MAJUSCULES FORCÉES AVEC ARC ORANGE EXACT */
.page-title-arc {
    font-size: 2.6rem;
    color: var(--cso-dark);
    margin: 0 0 15px 0;
    text-transform: none;
    position: relative;
    padding-bottom: 28px;
    display: inline-block;
}
.page-title-arc::after {
    content: "";
    position: absolute;
    bottom: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 56px;
    height: 23px;
    background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 240 100'%3E%3Cpath d='M 24 15 A 138 138 0 0 0 214 15 L 236 37 A 170 170 0 0 1 2 37 Z' fill='%23e63316'/%3E%3C/svg%3E") no-repeat center / contain;
    border: none;
    border-radius: 0;
}
@media (max-width: 768px) {
    .page-title-arc { font-size: 2.2rem; }
}

/* TYPOGRAPHIE & ESPACEMENTS POUR LE CONTENU (Compact & Épuré) */
.single-content p {
    margin-bottom: 1rem;
}
.single-content h2 {
    margin-top: 1.8rem;
    margin-bottom: 0.8rem;
    font-size: 1.5rem;
    color: var(--cso-dark);
}
.single-content h3 {
    margin-top: 1.4rem;
    margin-bottom: 0.6rem;
    font-size: 1.25rem;
    color: var(--cso-blue);
}
.single-content ul, .single-content ol {
    margin-bottom: 1rem;
    padding-left: 20px;
}
.single-content li {
    margin-bottom: 0.3rem;
}
.single-content a {
    color: var(--cso-red);
    text-decoration: none;
    font-weight: 600;
}
.single-content a:hover {
    text-decoration: underline;
}

/* NAVIGATION ARTICLE (PRECEDENT / SUIVANT) (v1.32) */
.single-post-navigation {
    max-width: 800px;
    margin: 40px auto 80px auto;
    padding: 0 6%;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 20px;
    flex-wrap: wrap;
}
.single-post-navigation .nav-previous, 
.single-post-navigation .nav-next {
    flex: 1;
    min-width: 120px;
}
.single-post-navigation .nav-next {
    text-align: right;
}
.single-post-navigation a:not(.btn) {
    color: var(--cso-dark);
    font-weight: 800;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    transition: color 0.3s ease;
}
.single-post-navigation a:not(.btn):hover {
    color: var(--cso-red);
}
.single-post-navigation .nav-archive {
    flex: 0 1 auto;
    text-align: center;
}
@media (max-width: 600px) {
    .single-post-navigation {
        flex-direction: column;
        text-align: center;
    }
    .single-post-navigation .nav-next {
        text-align: center;
    }
}

/* ========================================================
   AMÉLIORATIONS UX & FONCTIONNALITÉS (v1.33)
======================================================== */

/* Fil d'Ariane (Breadcrumbs) */
.cso-breadcrumbs {
    max-width: 1200px;
    margin: 20px auto;
    padding: 0 6%;
    font-size: 0.85rem;
    color: #666;
}
.cso-breadcrumbs a {
    color: var(--cso-blue);
    text-decoration: none;
    font-weight: 600;
}
.cso-breadcrumbs a:hover {
    text-decoration: underline;
}
.cso-breadcrumbs .separator {
    margin: 0 8px;
    color: #ccc;
}

/* Bouton Retour en haut (Back to top) */
#backToTopBtn {
    display: none;
    position: fixed;
    bottom: 30px;
    right: 30px;
    z-index: 999;
    border: none;
    outline: none;
    background-color: var(--cso-dark);
    color: white;
    cursor: pointer;
    width: 50px;
    height: 50px;
    border-radius: 50%;
    font-size: 1.2rem;
    box-shadow: 0 4px 10px rgba(0,0,0,0.2);
    transition: background-color 0.3s, transform 0.3s;
}
#backToTopBtn:hover {
    background-color: var(--cso-red);
    transform: translateY(-3px);
}

/* Mise en évidence du lien actif dans le menu (gras et blanc) */
.nav-menu > li.current-menu-item > a,
.nav-menu > li.current_page_item > a,
.nav-menu > li.current-menu-ancestor > a {
    background-color: transparent;
    color: #ffffff;
    font-weight: 800;
}

/* Indicateur de temps de lecture */
.reading-time {
    display: inline-block;
    margin-left: 15px;
    padding-left: 15px;
    border-left: 1px solid #ccc;
    color: #666;
    font-weight: 600;
}

/* Boutons de partage social (Articles) - Harmonisés avec l'en-tête et le menu */
.social-share-container {
    margin-top: 40px;
    padding-top: 20px;
    border-top: 1px dashed #ccc;
    display: flex;
    align-items: center;
    gap: 10px;
}
.social-share-title {
    font-weight: 800;
    color: var(--cso-dark);
    font-size: 0.95rem;
    margin-right: 5px;
}
.social-share-btn {
    width: 34px;
    height: 34px;
    background-color: #ffffff;
    border: 2px solid var(--cso-gray);
    border-radius: 50%;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    color: var(--cso-blue) !important;
    text-decoration: none !important;
    box-shadow: 0 2px 5px rgba(0,0,0,0.05);
    transition: background-color 0.25s ease, color 0.25s ease, border-color 0.25s ease, transform 0.2s ease;
}
.social-share-btn i {
    font-size: 16px;
}
.social-share-btn:hover {
    background-color: var(--cso-red);
    border-color: var(--cso-red);
    color: #ffffff !important;
    transform: scale(1.1);
    text-decoration: none !important;
}
.share-fb, .share-tw, .share-wa, .share-em { background-color: #ffffff; }

/* Articles similaires */
.related-posts-section {
    max-width: 800px;
    margin: 60px auto 0 auto;
    padding: 0 6%;
}
.related-posts-section h3 {
    font-size: 1.5rem;
    margin-bottom: 8px;
    color: var(--cso-dark);
    position: relative;
    padding-bottom: 5px;
}
.related-posts-section h3::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 40px;
    height: 3px;
    background-color: var(--cso-red);
}
.related-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 20px;
}
.related-card {
    display: block;
    text-decoration: none;
    color: var(--cso-dark);
}
.related-card:hover h4 {
    color: var(--cso-red);
}
.related-card img {
    width: 100%;
    height: 120px;
    object-fit: cover;
    border-radius: 4px;
    margin-bottom: 10px;
}
.related-card h4 {
    font-size: 0.95rem;
    margin: 0;
    line-height: 1.3;
    font-weight: 700;
    transition: color 0.2s ease;
}
@media (max-width: 768px) {
    .related-grid { grid-template-columns: 1fr; }
    .related-card img { height: 180px; }
}

/* Bandeau d'alerte fermable */
.notif-close {
    background: transparent;
    border: none;
    color: #fff;
    font-size: 1.2rem;
    cursor: pointer;
    margin-left: 15px;
    transition: color 0.2s;
}
.notif-close:hover {
    color: var(--cso-dark);
}

/* Accessibilité (RGAA Focus) */
a:focus, button:focus, input:focus, select:focus, textarea:focus {
    outline: 3px solid var(--cso-blue);
    outline-offset: 2px;
}

/* NOUVELLE GRILLE LOGOS PARTENAIRES (v1.36) */
.footer-partners-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(70px, 110px)); /* Taille intermédiaire pour les logos */
    gap: 15px;
    align-items: center;
    justify-content: flex-start; /* Aligne les petits logos à gauche */
}
.footer-partners-grid img {
    max-width: 100%;
    height: auto;
    border-radius: 4px;
    background: #fff;
    padding: 5px;
    box-sizing: border-box;
    transition: transform 0.2s ease;
}
.footer-partners-grid a {
    display: block;
}
.footer-partners-grid a:hover img {
    transform: scale(1.05);
}


/* STYLE FORMULAIRE MODALE (v1.42) */
.cso-modal-form {
    text-align: left;
    margin-top: 20px;
}
.cso-modal-form p {
    margin-bottom: 15px;
    font-size: 0.95rem;
}
.cso-modal-form label {
    font-weight: 600;
    color: var(--cso-dark);
    display: block;
    margin-bottom: 5px;
}
.cso-modal-form input[type="text"],
.cso-modal-form input[type="email"],
.cso-modal-form input[type="tel"],
.cso-modal-form textarea {
    width: 100%;
    padding: 10px 15px;
    border: 1px solid #ccc;
    border-radius: 4px;
    font-family: inherit;
    box-sizing: border-box;
}
.cso-modal-form textarea {
    min-height: 100px;
    resize: vertical;
}
.cso-modal-form input[type="submit"] {
    background-color: var(--cso-red);
    color: #fff;
    border: none;
    padding: 12px 25px;
    border-radius: 50px;
    font-weight: bold;
    cursor: pointer;
    transition: background 0.3s ease;
    width: 100%;
}
.cso-modal-form input[type="submit"]:hover {
    background-color: var(--cso-dark);
}

/* BOUTONS D'ACTION DU FOOTER (v1.43) */
.footer-action-buttons {
    display: flex;
    flex-direction: column;
    gap: 12px;
    margin-top: 25px;
}
.footer-col .footer-action-buttons a.btn-footer-action {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
    background-color: var(--cso-blue);
    color: #ffffff !important;
    padding: 12px 20px;
    border-radius: 6px;
    font-weight: 700;
    font-size: 0.95rem;
    text-decoration: none;
    transition: background-color 0.3s ease, transform 0.2s ease;
    width: fit-content;
    border: none;
    box-shadow: 0 4px 6px rgba(0,0,0,0.05);
}
.footer-col .footer-action-buttons a.btn-footer-action i {
    background: transparent;
    color: #ffffff;
    padding: 0;
    width: auto;
    height: auto;
    font-size: 1.1rem;
}
.footer-col .footer-action-buttons a.btn-footer-action:hover {
    background-color: var(--cso-red);
    transform: translateY(-3px);
    padding-left: 20px; /* Annule le décalage hover natif du footer */
    box-shadow: 0 6px 12px rgba(0,0,0,0.1);
}
.footer-col .footer-action-buttons a.btn-footer-action:hover i {
    transform: none;
    background: transparent;
}
@media (max-width: 768px) {
    .footer-col .footer-action-buttons a.btn-footer-action {
        width: 100%;
        box-sizing: border-box;
    }
}

/* ========================================================
   ENCART SOUS LE SLIDER (PHOTO GAUCHE / TEXTE DROITE) (v1.44)
======================================================== */
.cso-featured-encart {
    background-color: #ffffff;
    border-bottom: 1px solid var(--cso-gray);
}
.encart-container {
    display: flex;
    align-items: center;
    gap: 50px;
    width: 100%;
    max-width: 100%;
    margin: 0;
}
.encart-photo {
    flex: 0 0 25%;
    max-width: 25%;
}
.encart-photo img {
    width: 100%;
    height: auto;
    border-radius: 10px;
    box-shadow: 0 10px 25px rgba(0,0,0,0.08);
    display: block;
    object-fit: cover;
    border-bottom: 4px solid var(--cso-blue);
}
.encart-content {
    flex: 1;
}
.encart-text {
    font-size: 1.05rem;
    line-height: 1;
    color: #444;
}
.encart-text p {
    margin-top: 0;
    margin-bottom: 15px;
}
.encart-text p:last-child {
    margin-bottom: 0;
}
.encart-btn {
    margin-top: 25px;
    display: inline-flex;
    align-items: center;
    gap: 8px;
}
@media (max-width: 900px) {
    .encart-container {
        flex-direction: column;
        gap: 30px;
    }
    .encart-photo {
        flex: 0 0 100%;
        max-width: 100%;
        width: 100%;
    }
}

/* ========================================================
   BANDEAU DE CONSENTEMENT AUX COOKIES (RGPD) (v1.53)
======================================================== */
.cso-cookie-banner {
    display: none;
    position: fixed;
    bottom: 20px;
    left: 50%;
    transform: translateX(-50%);
    width: 92%;
    max-width: 1100px;
    background-color: #ffffff;
    color: var(--cso-dark);
    border-top: 4px solid var(--cso-blue);
    border-radius: 10px;
    box-shadow: 0 10px 35px rgba(0, 0, 0, 0.18);
    padding: 20px 25px;
    z-index: 9998;
    box-sizing: border-box;
}
.cso-cookie-banner.show {
    display: block;
    animation: slideUp 0.35s ease;
}
.cso-cookie-inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 25px;
}
.cso-cookie-text strong {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 1.05rem;
    color: var(--cso-dark);
    margin-bottom: 6px;
}
.cso-cookie-text strong i {
    color: var(--cso-red);
}
.cso-cookie-text p {
    margin: 0;
    font-size: 0.92rem;
    line-height: 1.5;
    color: #555;
}
.cso-cookie-text a {
    color: var(--cso-blue);
    font-weight: 700;
    text-decoration: underline;
}
.cso-cookie-text a:hover {
    color: var(--cso-red);
}
.cso-cookie-actions {
    display: flex;
    align-items: center;
    gap: 12px;
    flex-shrink: 0;
}
.cso-cookie-btn {
    border: none;
    border-radius: 50px;
    padding: 10px 22px;
    font-size: 0.9rem;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.25s ease;
    font-family: inherit;
}
.cso-cookie-btn-accept {
    background-color: var(--cso-blue);
    color: #ffffff;
}
.cso-cookie-btn-accept:hover {
    background-color: var(--cso-red);
    transform: translateY(-2px);
}
.cso-cookie-btn-refuse {
    background-color: var(--cso-gray);
    color: var(--cso-dark);
}
.cso-cookie-btn-refuse:hover {
    background-color: var(--cso-dark);
    color: #ffffff;
}
@media (max-width: 768px) {
    .cso-cookie-banner {
        bottom: 10px;
        width: 94%;
        padding: 18px;
    }
    .cso-cookie-inner {
        flex-direction: column;
        align-items: stretch;
        gap: 15px;
    }
    .cso-cookie-actions {
        flex-direction: column;
        width: 100%;
    }
    .cso-cookie-btn {
        width: 100%;
        text-align: center;
    }
}

/* ========================================================
   BARRE DE FILTRES (ACTUALITÉS & AGENDA) & GRILLE ARCHIVE AGENDA (v1.56)
======================================================== */
.news-filter-bar {
    background-color: #ffffff;
    padding: 15px 22px;
    border-radius: 8px;
    box-shadow: 0 4px 12px rgba(0,0,0,0.04);
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 15px;
    margin-bottom: 30px;
    border-left: 4px solid var(--cso-blue);
}
.news-filter-form {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 10px;
    font-size: 0.92rem;
}
.news-filter-form label {
    font-weight: 700;
    color: var(--cso-dark);
}
.news-filter-form label i {
    color: var(--cso-red);
    margin-right: 4px;
}
.news-filter-form select {
    padding: 8px 14px;
    border: 1px solid #ccc;
    border-radius: 50px;
    background-color: #f9f9f9;
    font-family: inherit;
    font-size: 0.9rem;
    font-weight: 600;
    color: var(--cso-dark);
    cursor: pointer;
    transition: border-color 0.2s ease, background-color 0.2s ease;
}
.news-filter-form select:hover,
.news-filter-form select:focus {
    border-color: var(--cso-blue);
    background-color: #ffffff;
}
.grid-agenda-archive {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 25px;
}
.card-agenda-archive {
    flex: initial !important;
    max-width: 100% !important;
    width: 100%;
    background-color: #ffffff;
    box-shadow: 0 4px 15px rgba(0,0,0,0.05);
}
.card-agenda-archive .agenda-date-pill {
    background-color: var(--cso-gray);
}
@media (max-width: 1100px) {
    .grid-agenda-archive { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 650px) {
    .grid-agenda-archive { grid-template-columns: 1fr; }
    .news-filter-bar { flex-direction: column; align-items: stretch; }
    .news-filter-form { flex-direction: column; align-items: stretch; }
    .news-filter-form label { margin-left: 0 !important; margin-top: 6px; }
    .news-filter-form select { width: 100%; }
}
