/*
Theme Name: SIVOM
Theme URI: https://www.sivom.com
Author: SIVOM Vallée de l'Yerres et des Sénarts
Description: Thème officiel SIVOM, une colonne, design moderne inspiré de la charte graphique SIVOM.
Version: 1.3
License: GNU General Public License v2
Text Domain: sivom
Tags: one-column, custom-logo, custom-menu, full-width-template, responsive-layout
*/

/* ── Version 1.3 - typo menu identique à index.html ─────────── */

:root {
    --green:   #2c8558;
    --yellow:  #f8cb46;
    --blue:    #003D7D;
    --blue-md: #254193;
    --red:     #e30513;
    --vert:    #00973a;
    --violet:  #82358b;
    --cyan:    #009ee3;
    --bg:      #f9f9f9;
    --dark:    #333;
    --mid:     #555;
    --light:   #888;
    --border:  #e0e6f0;
    --white:   #ffffff;
    --radius:  8px;
    --shadow:  0 4px 12px rgba(0,0,0,.10);
    --shadow-h:0 8px 22px rgba(0,0,0,.14);
    --tr:      all .3s ease;
}

*,*::before,*::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }
body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background: var(--bg);
    color: var(--dark);
    line-height: 1.65;
    font-size: 16px;
    -webkit-font-smoothing: antialiased;
}
img { max-width: 100%; height: auto; display: block; }
a { color: var(--blue); text-decoration: none; transition: var(--tr); }
a:hover { color: var(--green); }

/* ── CONTAINER ─────────────────────────────────────────────── */
.container { width: 100%; max-width: 1200px; margin: 0 auto; padding: 0 20px; }

/* ── HEADER ─────────────────────────────────────────────────── */
.site-header { background: var(--white); box-shadow: 0 2px 10px rgba(0,0,0,.10); position: sticky; top: 0; z-index: 1000; }

.header-top { display: flex; justify-content: space-between; align-items: center; padding: 14px 0; gap: 20px; }

.site-logo img { height: 60px; width: auto; }

.header-tagline { flex: 1; text-align: center; padding: 0 16px; display: flex; flex-direction: column; gap: 2px; }
.header-tagline strong { font-size: 1rem; font-weight: 800; color: var(--blue); line-height: 1.2; }
.header-tagline span   { font-size: .78rem; color: var(--light); }

.header-logo-pro { flex-shrink: 0; }
.header-logo-pro img { height: 40px; width: auto; opacity: .88; transition: var(--tr); }
.header-logo-pro img:hover { opacity: 1; }

.mobile-toggle { display: none; background: none; border: 2px solid var(--blue); border-radius: 6px; color: var(--blue); font-size: 1.2rem; padding: 6px 11px; cursor: pointer; line-height: 1; }

/* ── NAVIGATION ───────────────────────────────────────────────────────── */
.site-nav { background: var(--blue); padding: 10px 0; }
.site-nav .container { display: flex; align-items: stretch; }

.nav-menu { display: flex; list-style: none; flex-wrap: wrap; width: 100%; justify-content: space-between; margin: 0; padding: 0; }

.nav-menu > li > a {
    display: block;
    color: white;
    text-decoration: none;
    padding: 6px 12px;
    border-radius: 4px;
    font-size: 14px;
    font-weight: 400;
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    white-space: nowrap;
    transition: var(--tr);
}
.nav-menu > li > a:hover,
.nav-menu > li.current-menu-item > a,
.nav-menu > li.current_page_item > a { background: rgba(255,255,255,.10); color: #fff; }

/* Flèche bas sur les items de niveau 1 ayant des enfants */
.nav-menu > li.menu-item-has-children > a::after {
    content: ' ▾';
    font-size: .7rem;
    vertical-align: middle;
    opacity: .7;
}

.nav-menu li { position: relative; }

/* ── MÉGA-MENU : panneau pleine largeur ancré sur .site-nav ── */
/* Le panneau est porté par le <li> de niveau 1 mais positionné
   via JS pour toujours rester dans les limites du nav */
.nav-menu > li > .sub-menu {
    display: none;
    position: fixed;          /* fixé pour sortir du flux et ignorer overflow parents */
    background: var(--white);
    border-top: 3px solid var(--yellow);
    border-radius: 0 0 var(--radius) var(--radius);
    box-shadow: var(--shadow-h);
    z-index: 9000;
    list-style: none;
    padding: 8px 0;
    min-width: 220px;
    /* Colonnes automatiques si beaucoup d’items */
    columns: 1;
    column-gap: 0;
    max-height: calc(100vh - 140px);
    overflow-y: auto;
    overflow-x: hidden;
    scrollbar-width: thin;
    scrollbar-color: var(--border) transparent;
}
.nav-menu > li > .sub-menu::-webkit-scrollbar { width: 4px; }
.nav-menu > li > .sub-menu::-webkit-scrollbar-thumb { background: var(--border); border-radius: 4px; }

/* Passage en multi-colonnes au-delà de 10 items (géré par JS via classe) */
.nav-menu > li > .sub-menu.sm-cols-2 { columns: 2; min-width: 420px; }
.nav-menu > li > .sub-menu.sm-cols-3 { columns: 3; min-width: 600px; }

/* Items de niveau 1 du sous-menu */
.nav-menu > li > .sub-menu > li {
    break-inside: avoid;
    border-left: 3px solid transparent;
    transition: border-color .15s;
}
.nav-menu > li > .sub-menu > li:hover { border-left-color: var(--blue); }

.nav-menu > li > .sub-menu > li > a {
    display: block;
    padding: 8px 18px;
    font-size: .855rem;
    color: var(--dark);
    white-space: nowrap;
    transition: var(--tr);
}
.nav-menu > li > .sub-menu > li > a:hover {
    background: var(--bg);
    color: var(--blue);
    padding-left: 24px;
}

/* Indicateur enfants niveau 2 */
.nav-menu > li > .sub-menu > li.menu-item-has-children > a::after {
    content: ' ›';
    float: right;
    color: var(--light);
    margin-left: 8px;
}

/* ── SOUS-SOUS-MENU (niveau 2) : flyout lateral ── */
.nav-menu .sub-menu .sub-menu {
    display: none;
    position: fixed;
    background: var(--white);
    border-top: 3px solid var(--cyan);
    border-radius: var(--radius);
    box-shadow: 4px 4px 18px rgba(0,0,0,.15);
    z-index: 9100;
    list-style: none;
    padding: 8px 0;
    min-width: 200px;
    max-height: calc(100vh - 140px);
    overflow-y: auto;
    scrollbar-width: thin;
    scrollbar-color: var(--border) transparent;
}
.nav-menu .sub-menu .sub-menu::-webkit-scrollbar { width: 4px; }
.nav-menu .sub-menu .sub-menu::-webkit-scrollbar-thumb { background: var(--border); border-radius: 4px; }

.nav-menu .sub-menu .sub-menu li { border-left: 3px solid transparent; transition: border-color .15s; }
.nav-menu .sub-menu .sub-menu li:hover { border-left-color: var(--cyan); }

.nav-menu .sub-menu .sub-menu a {
    display: block;
    padding: 8px 18px;
    font-size: .84rem;
    color: var(--dark);
    white-space: nowrap;
    transition: var(--tr);
}
.nav-menu .sub-menu .sub-menu a:hover {
    background: var(--bg);
    color: var(--blue);
    padding-left: 24px;
}

/* ── TICKER ─────────────────────────────────────────────────── */
.ticker-bar { background: var(--yellow); overflow: hidden; padding: 11px 0; }

.ticker-track { white-space: nowrap; display: inline-block; animation: ticker 35s linear infinite; padding-left: 100%; font-size: .93rem; font-weight: 700; color: var(--dark); text-transform: uppercase; letter-spacing: .03em; }
.ticker-track:hover { animation-play-state: paused; }
.ticker-track a { color: var(--dark); font-weight: 700; }
.ticker-track a:hover { color: var(--blue); }
.ticker-sep { color: var(--blue); font-weight: 900; margin: 0 18px; }

@keyframes ticker { 0% { transform: translateX(0); } 100% { transform: translateX(-100%); } }
@media (prefers-reduced-motion: reduce) { .ticker-track { animation: none; padding-left: 20px; } }

/* ── HERO ───────────────────────────────────────────────────── */
.site-hero { position: relative; height: 420px; overflow: hidden; color: #fff; }
.hero-bg { position: absolute; inset: 0; background-size: cover; background-position: center; opacity: 0; transition: opacity 1s ease-in-out; z-index: 0; }
.hero-bg.active { opacity: 1; }
.hero-overlay { position: absolute; inset: 0; background: rgba(0,0,0,.58); z-index: 1; }
.hero-body { position: relative; z-index: 2; height: 100%; display: flex; flex-direction: column; align-items: center; justify-content: center; text-align: center; padding: 30px 20px; }
.hero-body h1 { font-size: clamp(1.8rem, 4vw, 2.8rem); font-weight: 800; text-shadow: 0 2px 10px rgba(0,0,0,.4); margin-bottom: 18px; line-height: 1.2; }
.hero-body p  { font-size: clamp(.95rem, 2vw, 1.2rem); max-width: 750px; margin: 0 auto 28px; opacity: .92; text-shadow: 0 1px 4px rgba(0,0,0,.3); }
.hero-dots { position: absolute; bottom: 18px; left: 50%; transform: translateX(-50%); display: flex; gap: 8px; z-index: 3; }
.hero-dot { width: 10px; height: 10px; border-radius: 50%; background: rgba(255,255,255,.45); border: none; cursor: pointer; transition: var(--tr); }
.hero-dot.active { background: var(--yellow); transform: scale(1.25); }

/* ── BOUTONS ─────────────────────────────────────────────────── */
.cta-group { display: flex; gap: 16px; flex-wrap: wrap; justify-content: center; }
.btn { display: inline-flex; align-items: center; gap: 9px; padding: 11px 24px; border-radius: var(--radius); font-weight: 700; font-size: .9rem; cursor: pointer; border: none; transition: var(--tr); text-decoration: none; white-space: nowrap; letter-spacing: .02em; }
.btn:hover { transform: translateY(-3px); box-shadow: 0 6px 16px rgba(0,0,0,.18); }
.btn-yellow  { background: var(--yellow); color: var(--dark); }
.btn-yellow:hover { background: #e8ba2e; color: var(--dark); }
.btn-blue    { background: var(--blue); color: #fff; }
.btn-blue:hover { background: #002f6c; color: #fff; }
.btn-green   { background: var(--green); color: #fff; }
.btn-green:hover { background: #206e46; color: #fff; }
.btn-outline { background: transparent; border: 2px solid var(--blue); color: var(--blue); }
.btn-outline:hover { background: var(--blue); color: #fff; }

/* ── SECTION HEADING ─────────────────────────────────────────── */
.section-heading { display: flex; align-items: center; gap: 12px; margin-bottom: 24px; }
.section-heading i { color: var(--green); font-size: 1.2rem; }
.section-heading h2 { font-size: 1.4rem; font-weight: 800; color: var(--dark); }

/* ── APP-SECTION ─────────────────────────────────────────────── */
.app-section { background: var(--white); border-radius: var(--radius); box-shadow: var(--shadow); margin-bottom: 36px; overflow: hidden; }
.app-header { background: var(--blue); color: #fff; padding: 18px 28px; display: flex; align-items: center; gap: 14px; }
.app-header h2 { font-size: 1.25rem; font-weight: 700; margin: 0; }
.app-header i { font-size: 1.6rem; opacity: .9; }
.app-body { padding: 28px; }

/* ── FEATURE BLOCKS ──────────────────────────────────────────── */
.features-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); gap: 28px; margin-bottom: 36px; }
.feature-block { background: var(--white); border-radius: var(--radius); box-shadow: var(--shadow); padding: 28px 24px; position: relative; overflow: hidden; transition: var(--tr); }
.feature-block::before { content: ''; position: absolute; top: 0; left: 0; right: 0; height: 5px; background: linear-gradient(90deg, var(--green), var(--yellow)); }
.feature-block:hover { transform: translateY(-5px); box-shadow: var(--shadow-h); }
.feature-icon { background: var(--green); color: #fff; width: 58px; height: 58px; border-radius: 50%; display: flex; align-items: center; justify-content: center; font-size: 1.5rem; margin-bottom: 18px; box-shadow: 0 4px 14px rgba(44,133,88,.3); position: relative; z-index: 1; }
.feature-block h3 { font-size: 1.1rem; font-weight: 700; color: var(--green); margin-bottom: 10px; position: relative; z-index: 1; }
.feature-block p  { font-size: .88rem; color: var(--mid); margin-bottom: 18px; line-height: 1.65; position: relative; z-index: 1; }
.feature-link { color: var(--green); font-weight: 700; display: inline-flex; align-items: center; gap: 6px; font-size: .88rem; transition: var(--tr); position: relative; z-index: 1; }
.feature-link:hover { color: var(--blue); gap: 10px; }

/* ── NEWS GRID ───────────────────────────────────────────────── */
.news-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(290px, 1fr)); gap: 24px; margin-bottom: 36px; }
.news-card { background: var(--white); border-radius: var(--radius); box-shadow: var(--shadow); overflow: hidden; transition: var(--tr); display: flex; flex-direction: column; }
.news-card:hover { transform: translateY(-4px); box-shadow: var(--shadow-h); }
.news-card-thumb { width: 100%; height: 185px; object-fit: cover; }
.news-card-thumb-placeholder { width: 100%; height: 185px; background: linear-gradient(135deg, var(--blue) 0%, var(--green) 100%); display: flex; align-items: center; justify-content: center; color: rgba(255,255,255,.4); font-size: 2rem; }
.news-card-body { padding: 20px; flex: 1; display: flex; flex-direction: column; }
.news-card-date { font-size: .78rem; color: var(--light); margin-bottom: 8px; display: flex; align-items: center; gap: 6px; }
.news-card-cats { margin-bottom: 8px; }
.cat-badge { background: var(--blue); color: #fff; font-size: .7rem; font-weight: 700; padding: 2px 9px; border-radius: 20px; letter-spacing: .02em; display: inline-block; margin-right: 4px; }
.news-card-body h3 { font-size: 1rem; font-weight: 700; color: var(--dark); margin-bottom: 10px; line-height: 1.4; flex: 1; }
.news-card-body h3 a { color: inherit; }
.news-card-body h3 a:hover { color: var(--green); }
.news-card-body p { font-size: .855rem; color: var(--mid); margin-bottom: 14px; line-height: 1.6; }
.read-more { color: var(--green); font-weight: 700; font-size: .855rem; display: inline-flex; align-items: center; gap: 6px; transition: var(--tr); margin-top: auto; }
.read-more:hover { color: var(--blue); gap: 10px; }

/* ── SERVICES GRID ───────────────────────────────────────────── */
.services-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); gap: 24px; margin-bottom: 36px; }
.service-card { background: var(--white); border-radius: var(--radius); box-shadow: var(--shadow); padding: 28px 24px; text-align: center; transition: var(--tr); position: relative; overflow: hidden; }
.service-card::before { content: ''; position: absolute; top: 0; left: 0; right: 0; height: 5px; background: linear-gradient(90deg, var(--blue), var(--cyan)); }
.service-card:hover { transform: translateY(-5px); box-shadow: var(--shadow-h); }
.service-icon { background: var(--blue); color: #fff; width: 70px; height: 70px; border-radius: 50%; display: flex; align-items: center; justify-content: center; font-size: 1.8rem; margin: 0 auto 18px; box-shadow: 0 4px 14px rgba(0,61,125,.25); }
.service-card h3 { font-size: 1.1rem; font-weight: 700; color: var(--dark); margin-bottom: 10px; }
.service-card p  { font-size: .875rem; color: var(--mid); margin-bottom: 22px; line-height: 1.6; }
.service-btn { background: var(--blue); color: #fff; padding: 10px 24px; border-radius: 30px; font-weight: 700; font-size: .86rem; display: inline-flex; align-items: center; gap: 8px; transition: var(--tr); }
.service-btn:hover { background: #002f6c; color: #fff; transform: translateY(-2px); box-shadow: 0 6px 18px rgba(0,61,125,.3); }

/* ── PARTENAIRES ─────────────────────────────────────────────── */
.partners-grid { display: flex; flex-wrap: wrap; gap: 22px; justify-content: center; align-items: center; margin-bottom: 36px; }
.partner-logo { height: 52px; width: auto; filter: grayscale(100%); opacity: .65; transition: var(--tr); }
.partner-logo:hover { filter: grayscale(0); opacity: 1; }

/* ── ARTICLE SINGLE ──────────────────────────────────────────── */
.single-wrap { background: var(--white); border-radius: var(--radius); box-shadow: var(--shadow); overflow: hidden; margin-bottom: 36px; }
.single-hero-img { width: 100%; height: 360px; object-fit: cover; }
.single-body { padding: 36px; }
.single-meta { display: flex; gap: 14px; align-items: center; flex-wrap: wrap; margin-bottom: 16px; font-size: .82rem; color: var(--light); }
.single-title { font-size: clamp(1.5rem, 3vw, 2rem); font-weight: 800; color: var(--dark); margin-bottom: 22px; line-height: 1.25; }
.entry-content { font-size: .975rem; line-height: 1.8; color: var(--mid); }
.entry-content h2,.entry-content h3 { color: var(--blue); margin: 26px 0 10px; }
.entry-content p { margin-bottom: 16px; }
.entry-content a { color: var(--green); text-decoration: underline; }
.entry-content img { border-radius: var(--radius); margin: 20px 0; box-shadow: var(--shadow); }
.entry-content blockquote { border-left: 4px solid var(--green); padding: 14px 20px; background: var(--bg); border-radius: 0 var(--radius) var(--radius) 0; font-style: italic; color: var(--mid); margin: 20px 0; }
.entry-content ul,.entry-content ol { margin: 0 0 16px 24px; }
.entry-content li { margin-bottom: 6px; }
.post-nav { display: flex; justify-content: space-between; gap: 16px; margin-top: 28px; flex-wrap: wrap; }

/* ── ARCHIVE ─────────────────────────────────────────────────── */
.archive-header { background: linear-gradient(90deg, var(--vert) 0%, var(--vert) 75%, #5bbf7a 100%); color: #fff; padding: 32px 0; margin-bottom: 0; }
.archive-header h1 { font-size: clamp(1.4rem, 3vw, 1.9rem); font-weight: 800; }
.archive-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(290px, 1fr)); gap: 26px; margin-bottom: 36px; }

/* ── PAGE TITLE BAR ──────────────────────────────────────────── */
.page-title-bar { background: linear-gradient(90deg, var(--vert) 0%, var(--vert) 75%, #5bbf7a 100%); color: #fff; padding: 32px 0; }
.page-title-bar h1 { font-size: clamp(1.4rem, 3vw, 1.9rem); font-weight: 800; }
.page-wrap { background: var(--white); border-radius: var(--radius); box-shadow: var(--shadow); padding: 38px; margin-bottom: 36px; }

/* Image en avant dans le bandeau */
.page-title-bar.has-thumb { background-size: cover; background-position: center; position: relative; }
.page-title-overlay { position: absolute; inset: 0; background: linear-gradient(90deg, rgba(0,151,58,.88) 0%, rgba(0,151,58,.88) 75%, rgba(91,191,122,.72) 100%); }
.page-title-inner { position: relative; z-index: 1; }

/* ── PAGINATION ──────────────────────────────────────────────── */
.posts-navigation, .post-navigation { margin-bottom: 36px; }
.nav-links { display: flex; justify-content: center; gap: 8px; flex-wrap: wrap; }
.nav-links a, .nav-links span.current { display: inline-flex; align-items: center; justify-content: center; width: 42px; height: 42px; border-radius: 6px; font-weight: 700; font-size: .9rem; transition: var(--tr); background: var(--white); box-shadow: var(--shadow); color: var(--blue); border: 1px solid var(--border); }
.nav-links .current, .nav-links a:hover { background: var(--blue); color: #fff; border-color: var(--blue); }

/* ── PAGINATION SOIGNÉE ──────────────────────────────────────── */
.navigation.pagination { margin: 8px 0 36px; padding: 24px 0 0; border-top: 2px solid var(--border); }
.navigation.pagination .nav-links { display: flex; align-items: center; justify-content: space-between; gap: 6px; flex-wrap: wrap; }
.navigation.pagination .prev,
.navigation.pagination .next { display: inline-flex; align-items: center; gap: 8px; padding: 10px 20px; background: var(--blue); color: #fff !important; border-radius: var(--radius); font-weight: 700; font-size: .88rem; transition: var(--tr); border: none; width: auto; height: auto; box-shadow: var(--shadow); }
.navigation.pagination .prev:hover,
.navigation.pagination .next:hover { background: #002f6c; transform: translateY(-2px); box-shadow: var(--shadow-h); }
.navigation.pagination .page-numbers:not(.prev):not(.next) { display: inline-flex; align-items: center; justify-content: center; width: 40px; height: 40px; border-radius: 6px; font-weight: 700; font-size: .88rem; background: var(--white); color: var(--blue); border: 1.5px solid var(--border); box-shadow: var(--shadow); transition: var(--tr); }
.navigation.pagination .page-numbers.current { background: var(--vert); color: #fff; border-color: var(--vert); }
.navigation.pagination .page-numbers:not(.prev):not(.next):not(.current):not(.dots):hover { background: var(--blue); color: #fff; border-color: var(--blue); }
.navigation.pagination .page-numbers.dots { background: none; border: none; box-shadow: none; color: var(--light); font-size: 1.1rem; letter-spacing: .1em; }

/* ── COMMENTS ────────────────────────────────────────────────── */
.comments-area { background: var(--white); border-radius: var(--radius); box-shadow: var(--shadow); padding: 32px; margin-bottom: 36px; }
.comments-title { font-size: 1.15rem; font-weight: 800; color: var(--dark); margin-bottom: 22px; }
.comment-list { list-style: none; }
.comment { margin-bottom: 18px; }
.comment-body { background: var(--bg); border-radius: var(--radius); padding: 18px; }
.comment-author { font-weight: 700; color: var(--blue); font-size: .9rem; }
.comment-meta { font-size: .78rem; color: var(--light); margin-bottom: 10px; }
.comment-form label { display: block; font-weight: 600; font-size: .88rem; margin-bottom: 5px; }
.comment-form input[type="text"],.comment-form input[type="email"],.comment-form input[type="url"],.comment-form textarea { width: 100%; padding: 10px 14px; border: 1.5px solid var(--border); border-radius: 6px; font-family: inherit; font-size: .9rem; margin-bottom: 14px; color: var(--dark); transition: var(--tr); background: var(--white); }
.comment-form input:focus,.comment-form textarea:focus { outline: none; border-color: var(--blue); box-shadow: 0 0 0 3px rgba(37,65,147,.1); }
.comment-form input[type="submit"] { background: var(--blue); color: #fff; border: none; font-weight: 700; cursor: pointer; padding: 11px 28px; border-radius: var(--radius); font-size: .9rem; transition: var(--tr); width: auto; }
.comment-form input[type="submit"]:hover { background: #002f6c; }

/* ── 404 ─────────────────────────────────────────────────────── */
.error-404-wrap { text-align: center; padding: 80px 20px; background: var(--white); border-radius: var(--radius); box-shadow: var(--shadow); }
.error-code { font-size: 7rem; font-weight: 900; color: var(--border); line-height: 1; }
.error-404-wrap h2 { font-size: 1.6rem; color: var(--blue); margin-bottom: 14px; }
.error-404-wrap p  { color: var(--mid); margin-bottom: 26px; }

/* ── SEARCH ──────────────────────────────────────────────────── */
.search-form { display: flex; gap: 8px; }
.search-form input[type="search"] { flex: 1; padding: 10px 16px; border: 1.5px solid var(--border); border-radius: 6px; font-size: .9rem; font-family: inherit; color: var(--dark); transition: var(--tr); }
.search-form input[type="search"]:focus { outline: none; border-color: var(--blue); }
.search-form button { padding: 10px 20px; background: var(--blue); color: #fff; border: none; border-radius: 6px; font-weight: 700; cursor: pointer; transition: var(--tr); }
.search-form button:hover { background: #002f6c; }

/* ── FOOTER ──────────────────────────────────────────────────── */
.site-footer { background: linear-gradient(90deg, #002f6c 0%, #002f6c 75%, #1a5ca8 100%); color: #fff; padding: 52px 0 0; }
.footer-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 36px; margin-bottom: 40px; }
.footer-col h3 { font-size: .95rem; font-weight: 800; text-transform: uppercase; letter-spacing: .05em; margin-bottom: 18px; padding-bottom: 8px; position: relative; }
.footer-col h3::after { content: ''; position: absolute; bottom: 0; left: 0; width: 36px; height: 3px; background: var(--yellow); border-radius: 2px; }
.footer-links { list-style: none; }
.footer-links li { margin-bottom: 8px; }
.footer-links a { color: rgba(255,255,255,.78); font-size: .875rem; transition: var(--tr); }
.footer-links a:hover { color: var(--yellow); padding-left: 4px; }
.footer-col p { font-size: .875rem; color: rgba(255,255,255,.78); line-height: 1.65; margin-bottom: 8px; }
.contact-row { display: flex; gap: 10px; align-items: flex-start; margin-bottom: 12px; font-size: .875rem; color: rgba(255,255,255,.78); }
.contact-row i { color: var(--yellow); margin-top: 3px; flex-shrink: 0; width: 16px; }
.social-links { display: flex; gap: 10px; margin-top: 18px; }
.social-links a { width: 36px; height: 36px; background: rgba(255,255,255,.12); border-radius: 50%; display: flex; align-items: center; justify-content: center; color: #fff; font-size: .9rem; transition: var(--tr); }
.social-links a:hover { background: var(--yellow); color: var(--dark); transform: translateY(-2px); }
.footer-bottom { border-top: 1px solid rgba(255,255,255,.12); padding: 16px 0; display: flex; justify-content: space-between; align-items: center; flex-wrap: wrap; gap: 8px; font-size: .8rem; color: rgba(255,255,255,.45); }
.footer-version { font-size: .72rem; color: rgba(255,255,255,.28); }

/* ── WIDGETS ─────────────────────────────────────────────────── */
.widget { margin-bottom: 28px; }
.widget-title { font-size: .95rem; font-weight: 800; color: var(--dark); text-transform: uppercase; letter-spacing: .05em; padding-bottom: 8px; border-bottom: 3px solid var(--green); margin-bottom: 14px; }

/* ── UTILITIES ───────────────────────────────────────────────── */
.screen-reader-text { position: absolute; width: 1px; height: 1px; clip: rect(1px,1px,1px,1px); overflow: hidden; }
.skip-link:focus { position: fixed; top: 0; left: 0; background: var(--blue); color: #fff; padding: 10px 20px; z-index: 9999; width: auto; height: auto; clip: auto; }
.clearfix::after { content: ''; display: table; clear: both; }
.site-content { padding: 0; }
.content-area { padding: 36px 0; }
.site-main    { width: 100%; }
#secondary, .widget-area { display: none !important; }

/* ── RESPONSIVE ──────────────────────────────────────────────── */
@media (max-width: 992px) {
    .features-grid { grid-template-columns: repeat(2, 1fr); }
    .services-grid { grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 768px) {
    .site-hero { height: 300px; }
    .mobile-toggle { display: block; }
    .header-tagline { display: none; }
    .site-nav .nav-menu { display: none; flex-direction: column; width: 100%; gap: 0; }
    .site-nav .nav-menu.open { display: flex; }
    .nav-menu > li > a { padding: 12px 20px; border-radius: 0; border-bottom: 1px solid rgba(255,255,255,.08); }
    .nav-menu .sub-menu { position: static; border-top: none; box-shadow: none; background: rgba(0,0,0,.15); }
    .nav-menu li:hover > .sub-menu { display: block; }
    .nav-menu .sub-menu a { color: rgba(255,255,255,.85); padding: 9px 32px; }
    .features-grid { grid-template-columns: 1fr; }
    .services-grid { grid-template-columns: 1fr; }
    .news-grid     { grid-template-columns: 1fr; }
    .archive-grid  { grid-template-columns: 1fr; }
    .footer-grid   { grid-template-columns: 1fr 1fr; }
    .single-hero-img { height: 220px; }
    .single-body { padding: 22px; }
    .page-wrap   { padding: 22px; }
}

@media (max-width: 600px) {
    .navigation.pagination .page-numbers:not(.prev):not(.next) { display: none; }
    .navigation.pagination .prev,
    .navigation.pagination .next { flex: 1; justify-content: center; }
}

@media (max-width: 480px) {
    .header-logo-pro { display: none; }
    .footer-grid { grid-template-columns: 1fr; }
    .footer-bottom { flex-direction: column; text-align: center; }
    .hero-body h1 { font-size: 1.5rem; }
}

/* ── TICKER : animation d'entrée avant défilement (v1.3) ─────── */

/* 1. Le bandeau lui-même glisse depuis le haut en fondu */
.ticker-bar {
    animation: ticker-bar-in .6s ease both;
}

@keyframes ticker-bar-in {
    from { opacity: 0; transform: translateY(-8px); }
    to   { opacity: 1; transform: translateY(0); }
}

/* 2. Le texte attend 0.6s (fin de l'entrée du bandeau),
      apparaît en fondu sur 0.5s, puis le défilement prend le relais */
.ticker-track {
    /* on retarde le départ de l'animation de scroll */
    animation:
        ticker-text-in .5s ease .6s both,
        ticker 35s linear 1.1s infinite;
}

@keyframes ticker-text-in {
    from { opacity: 0; letter-spacing: .15em; }
    to   { opacity: 1; letter-spacing: .03em; }
}

/* ── BANDEAU TITRE : animation d'entrée du h1 (v1.3) ─────────── */

.page-title-bar h1,
.archive-header h1 {
    animation: title-in .7s cubic-bezier(.22,.61,.36,1) both;
}

@keyframes title-in {
    from {
        opacity: 0;
        transform: translateY(18px);
        letter-spacing: .08em;
    }
    to {
        opacity: 1;
        transform: translateY(0);
        letter-spacing: normal;
    }
}

/* Le sous-titre des archives suit avec un léger décalage */
.archive-header p {
    animation: title-in .7s cubic-bezier(.22,.61,.36,1) .15s both;
}

/* ── Surcharge : blur au départ du titre (v1.3) ──────────────── */
@keyframes title-in {
    from {
        opacity: 0;
        transform: translateY(18px);
        letter-spacing: .08em;
        filter: blur(6px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
        letter-spacing: normal;
        filter: blur(0);
    }
}

/* ── HEADER TAGLINE : balancement lent (v1.3) ────────────────── */
.header-tagline {
    animation: tagline-swing 6s ease-in-out infinite;
    transform-origin: center;
}

@keyframes tagline-swing {
    0%   { transform: translateX(0); }
    25%  { transform: translateX(4px); }
    75%  { transform: translateX(-4px); }
    100% { transform: translateX(0); }
}

/* ── HEADER TAGLINE : textes inversés + plus grands (v1.3) ───── */
.header-tagline span   { font-size: .95rem; color: var(--light); }
.header-tagline strong { font-size: 1.35rem; font-weight: 800; color: var(--blue); line-height: 1.2; }

/* ── HEADER TAGLINE : "intercommunalité" en gros (v1.3) ──────── */
.header-tagline span   { font-size: 1.35rem; font-weight: 800; color: var(--blue); line-height: 1.2; }
.header-tagline strong { font-size: .95rem; font-weight: 400; color: var(--light); }

/* ── TITRES WP dans le contenu : animation blur+slide (v1.3) ─── */
.entry-content h1,
.entry-content h2,
.entry-content h3,
.entry-content h4,
.entry-content h5,
.entry-content h6,
.page-wrap h1,
.page-wrap h2,
.page-wrap h3,
.page-wrap h4,
.page-wrap h5,
.page-wrap h6 {
    animation: title-in .7s cubic-bezier(.22,.61,.36,1) both;
}

/* Décalage progressif selon le niveau pour un effet cascade */
.entry-content h2, .page-wrap h2 { animation-delay: .05s; }
.entry-content h3, .page-wrap h3 { animation-delay: .10s; }
.entry-content h4, .page-wrap h4 { animation-delay: .15s; }
.entry-content h5, .page-wrap h5 { animation-delay: .20s; }
.entry-content h6, .page-wrap h6 { animation-delay: .25s; }

/* ── CLASSES ALIGNEMENT ÉDITEUR WP ──────────────────────────── */
.aligncenter, img.aligncenter {
    display: block;
    margin-left: auto;
    margin-right: auto;
    clear: both;
}
.alignleft, img.alignleft {
    float: left;
    margin: 0 1.5em 1em 0;
}
.alignright, img.alignright {
    float: right;
    margin: 0 0 1em 1.5em;
}
.alignnone { float: none; }

/* Blocs Gutenberg */
.wp-block-image.aligncenter { text-align: center; }
.wp-block-image.aligncenter img { margin: 0 auto; }
.wp-block-image.alignleft  { float: left;  margin-right: 1.5em; }
.wp-block-image.alignright { float: right; margin-left:  1.5em; }

/* Légendes */
.wp-caption.aligncenter { margin: 0 auto; }
.wp-caption-text { font-size: .8rem; color: var(--light); text-align: center; margin-top: 4px; }

/* ── SELECT CUSTOM ───────────────────────────────────────────── */
/* Masquer le select natif mais le garder fonctionnel */
.sivom-select-wrap {
    position: relative;
    display: inline-block;
    min-width: 200px;
}
.sivom-select-wrap select {
    position: absolute;
    opacity: 0;
    pointer-events: none;
    width: 0;
    height: 0;
}
/* Bouton déclencheur */
.sivom-select-btn {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    padding: 9px 14px;
    background: var(--white);
    border: 1.5px solid var(--border);
    border-radius: var(--radius);
    font-family: inherit;
    font-size: .9rem;
    color: var(--dark);
    cursor: pointer;
    transition: var(--tr);
    white-space: nowrap;
    user-select: none;
    width: 100%;
}
.sivom-select-btn:hover,
.sivom-select-wrap.open .sivom-select-btn {
    border-color: var(--blue);
    box-shadow: 0 0 0 3px rgba(37,65,147,.1);
}
.sivom-select-btn .sivom-select-arrow {
    flex-shrink: 0;
    width: 18px;
    height: 18px;
    background: var(--blue);
    border-radius: 4px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: transform .25s ease;
}
.sivom-select-btn .sivom-select-arrow::after {
    content: '';
    border: solid #fff;
    border-width: 0 2px 2px 0;
    display: inline-block;
    padding: 3px;
    transform: rotate(45deg) translate(-1px, -1px);
    transition: transform .25s ease;
}
.sivom-select-wrap.open .sivom-select-btn .sivom-select-arrow {
    transform: rotate(180deg);
}
/* Panneau déroulant */
.sivom-select-panel {
    display: none;
    position: absolute;
    top: calc(100% + 4px);
    left: 0;
    min-width: 100%;
    background: var(--white);
    border: 1.5px solid var(--blue);
    border-radius: var(--radius);
    box-shadow: var(--shadow-h);
    z-index: 8000;
    max-height: 280px;
    overflow-y: auto;
    overflow-x: hidden;
    padding: 5px 0;
    scrollbar-width: thin;
    scrollbar-color: var(--border) transparent;
    animation: sivom-select-in .18s ease both;
}
.sivom-select-panel::-webkit-scrollbar { width: 4px; }
.sivom-select-panel::-webkit-scrollbar-thumb { background: var(--border); border-radius: 4px; }
.sivom-select-wrap.open .sivom-select-panel { display: block; }

@keyframes sivom-select-in {
    from { opacity: 0; transform: translateY(-6px); }
    to   { opacity: 1; transform: translateY(0); }
}
/* Options */
.sivom-select-option {
    padding: 9px 16px;
    font-size: .88rem;
    color: var(--dark);
    cursor: pointer;
    transition: background .12s, color .12s;
    white-space: nowrap;
    border-left: 3px solid transparent;
}
.sivom-select-option:hover {
    background: var(--bg);
    color: var(--blue);
    border-left-color: var(--blue);
}
.sivom-select-option.selected {
    background: rgba(37,65,147,.07);
    color: var(--blue);
    font-weight: 600;
    border-left-color: var(--blue);
}
.sivom-select-option.disabled {
    color: var(--light);
    cursor: default;
    font-style: italic;
}
.sivom-select-option.disabled:hover {
    background: none;
    border-left-color: transparent;
    color: var(--light);
}
