/*
Theme Name: Mairie d'Osmoy 2026
Theme URI:
Author: Agence WEAV
Author URI: https://weav.fr
Description: Thème officiel de la Mairie d'Osmoy (78), Yvelines. Design moderne 2026, accessible RGAA, responsive.
Version: 2.0
License: GNU General Public License v2 or later
License URI: http://www.gnu.org/licenses/gpl-2.0.html
Text Domain: osmoy
*/

/* ============================================================
   FONTS
   ============================================================ */
@import url('https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700&display=swap');

/* ============================================================
   VARIABLES
   ============================================================ */
:root {
    /* Couleurs institutionnelles */
    --primary:        #003189;
    --primary-dark:   #00236b;
    --primary-light:  #e8eef9;
    --accent:         #c1121f;
    --accent-light:   #fce8e9;

    /* Neutres */
    --white:          #ffffff;
    --light:          #f4f7fb;
    --light-mid:      #eaeff5;
    --border:         #dde3ed;
    --text:           #1c2b4a;
    --text-muted:     #5f6b84;
    --dark:           #0d1b35;

    /* Typographie */
    --font:           'Inter', system-ui, -apple-system, sans-serif;
    --font-size-base: 1rem;
    --line-height:    1.65;

    /* Formes */
    --radius-sm:  4px;
    --radius:     8px;
    --radius-lg:  16px;
    --radius-xl:  24px;

    /* Ombres */
    --shadow-sm:  0 1px 4px rgba(0, 49, 137, 0.08);
    --shadow:     0 4px 16px rgba(0, 49, 137, 0.10);
    --shadow-lg:  0 8px 32px rgba(0, 49, 137, 0.14);

    /* Transitions */
    --transition: 0.22s ease;

    /* Layout */
    --header-height: 72px;
}

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

html {
    scroll-behavior: smooth;
}

body {
    font-family: var(--font);
    font-size: var(--font-size-base);
    color: var(--text);
    background: var(--white);
    line-height: var(--line-height);
    -webkit-font-smoothing: antialiased;
}

img {
    max-width: 100%;
    height: auto;
    display: block;
}

a {
    color: var(--primary);
    text-decoration: none;
    transition: color var(--transition);
}
a:hover {
    color: var(--primary-dark);
}

ul {
    padding: 0;
    margin: 0;
    list-style: none;
}

h1, h2, h3, h4, h5, h6 {
    font-weight: 700;
    color: var(--dark);
    line-height: 1.25;
    margin-bottom: 0.5rem;
}

p {
    margin-bottom: 1rem;
}

/* ============================================================
   SKIP LINK (ACCESSIBILITE)
   ============================================================ */
.skip-link {
    position: absolute;
    top: -100px;
    left: 16px;
    z-index: 9999;
    background: var(--primary);
    color: var(--white);
    padding: 10px 18px;
    border-radius: 0 0 var(--radius) var(--radius);
    font-weight: 600;
    font-size: 0.9rem;
    transition: top 0.2s;
}
.skip-link:focus {
    top: 0;
    color: var(--white);
}

/* ============================================================
   BOUTONS
   ============================================================ */
.btn-primary-custom {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    background: var(--primary);
    color: var(--white);
    padding: 12px 28px;
    border-radius: var(--radius);
    font-weight: 600;
    font-size: 0.95rem;
    border: 2px solid var(--primary);
    cursor: pointer;
    transition: background var(--transition), border-color var(--transition), transform var(--transition), box-shadow var(--transition);
    text-decoration: none;
}
.btn-primary-custom:hover,
.btn-primary-custom:focus-visible {
    background: var(--primary-dark);
    border-color: var(--primary-dark);
    color: var(--white);
    transform: translateY(-1px);
    box-shadow: var(--shadow);
    text-decoration: none;
}

.btn-outline-custom {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    background: transparent;
    color: var(--primary);
    padding: 10px 26px;
    border-radius: var(--radius);
    font-weight: 600;
    font-size: 0.95rem;
    border: 2px solid var(--primary);
    cursor: pointer;
    transition: all var(--transition);
    text-decoration: none;
}
.btn-outline-custom:hover,
.btn-outline-custom:focus-visible {
    background: var(--primary);
    color: var(--white);
    transform: translateY(-1px);
    box-shadow: var(--shadow);
    text-decoration: none;
}

.btn-accent {
    background: var(--accent);
    border-color: var(--accent);
}
.btn-accent:hover {
    background: #9b0e19;
    border-color: #9b0e19;
}

/* ============================================================
   SECTIONS
   ============================================================ */
.section {
    padding: 80px 0;
}
.section-sm {
    padding: 48px 0;
}
.section-light {
    background: var(--light);
}
.section-primary {
    background: var(--primary);
    color: var(--white);
}
.section-primary h2,
.section-primary h3,
.section-primary p {
    color: var(--white);
}

/* ============================================================
   TITRES DE SECTIONS
   ============================================================ */
.section-title {
    text-align: center;
    margin-bottom: 48px;
}
.section-title .label {
    display: inline-block;
    background: var(--primary-light);
    color: var(--primary);
    font-size: 0.78rem;
    font-weight: 700;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    padding: 5px 14px;
    border-radius: 100px;
    margin-bottom: 12px;
}
.section-title h2 {
    font-size: clamp(1.6rem, 3vw, 2.4rem);
    color: var(--dark);
    margin-bottom: 12px;
}
.section-title p {
    color: var(--text-muted);
    max-width: 600px;
    margin: 0 auto;
    font-size: 1.05rem;
}
.section-title.left {
    text-align: left;
}
.section-title.left p {
    margin: 0;
}

/* ============================================================
   TOP BAR
   ============================================================ */
.header-topbar {
    background: var(--primary);
    color: rgba(255,255,255,0.9);
    font-size: 0.82rem;
    padding: 8px 0;
    border-bottom: 1px solid rgba(255,255,255,0.1);
}
.topbar-tagline {
    color: rgba(255,255,255,0.8);
}
.topbar-link {
    color: rgba(255,255,255,0.92);
    text-decoration: none;
    font-weight: 500;
    transition: color var(--transition);
}
.topbar-link:hover {
    color: var(--white);
}
.topbar-link i {
    font-size: 0.78rem;
}

/* ============================================================
   HEADER / NAVBAR
   ============================================================ */
.site-header {
    background: var(--white);
    box-shadow: 0 2px 16px rgba(0,49,137,0.09);
    z-index: 1000;
}

.site-header .navbar {
    padding: 0;
    min-height: var(--header-height);
}

.navbar-brand {
    display: flex;
    align-items: center;
    gap: 12px;
    text-decoration: none;
    padding: 10px 0;
}
.brand-logo {
    width: 72px;
    height: 72px;
    object-fit: contain;
    flex-shrink: 0;
}
.brand-name {
    display: flex;
    flex-direction: column;
    line-height: 1.1;
}
.brand-label {
    font-size: 0.72rem;
    font-weight: 500;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.08em;
}
.brand-title {
    font-size: 1.2rem;
    font-weight: 800;
    color: var(--primary);
    letter-spacing: -0.02em;
}

.navbar-nav .nav-item {
    position: relative;
}
.navbar-nav .nav-link {
    font-weight: 600;
    font-size: 0.9rem;
    color: var(--text);
    padding: 10px 14px !important;
    border-radius: var(--radius-sm);
    transition: color var(--transition), background var(--transition);
    white-space: nowrap;
}
.navbar-nav .nav-link:hover,
.navbar-nav .nav-link:focus-visible {
    color: var(--primary);
    background: var(--primary-light);
}
.navbar-nav .nav-link.active {
    color: var(--primary);
    font-weight: 700;
}

/* Dropdown niveau 1 */
.navbar-nav .dropdown-menu {
    border: 1px solid var(--border);
    border-radius: var(--radius);
    box-shadow: var(--shadow-lg);
    padding: 8px;
    margin-top: 4px;
    min-width: 220px;
    animation: dropIn 0.15s ease;
}
@keyframes dropIn {
    from { opacity: 0; transform: translateY(-6px); }
    to   { opacity: 1; transform: translateY(0); }
}
.navbar-nav .dropdown-item {
    font-size: 0.88rem;
    font-weight: 500;
    color: var(--text);
    padding: 9px 14px;
    border-radius: var(--radius-sm);
    transition: all var(--transition);
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
}
.navbar-nav .dropdown-item:hover,
.navbar-nav .dropdown-item:focus {
    background: var(--primary-light);
    color: var(--primary);
}
.navbar-nav .dropdown-item.active {
    background: var(--primary);
    color: var(--white);
}

/* Dropdown niveau 2+ (sous-menus)
   Le .dropdown-menu parent DOIT avoir overflow:visible pour ne pas
   couper le sous-menu positionné à left:100% */
.navbar-nav .dropdown-menu {
    overflow: visible;
}
.dropdown-submenu {
    position: relative;
}

/* Flèche indicatrice › sur les items parent */
.dropdown-submenu-toggle::after {
    content: '';
    display: inline-block;
    width: 0;
    height: 0;
    border-top: 4px solid transparent;
    border-bottom: 4px solid transparent;
    border-left: 5px solid currentColor;
    flex-shrink: 0;
    margin-left: auto;
    opacity: 0.5;
    transition: opacity var(--transition), transform var(--transition);
}
.dropdown-submenu:hover > a.dropdown-submenu-toggle::after,
.dropdown-submenu.open > a.dropdown-submenu-toggle::after {
    opacity: 1;
}

/* ── Desktop : sous-menu à droite ── */
@media (min-width: 992px) {
    /* Caché par défaut — on évite d'utiliser display:none !important
       pour ne pas bloquer l'animation ; on joue sur visibility+opacity */
    .dropdown-submenu-menu {
        position: absolute !important;
        top: 0 !important;
        left: 100% !important;
        margin: 0 !important;
        /* Bootstrap ajoute display:none via .dropdown-menu sans .show ;
           on override ici avec visibility pour garder l'animation */
        display: block !important;
        visibility: hidden;
        opacity: 0;
        pointer-events: none;
        transform: translateX(-6px);
        transition: opacity 0.15s ease, transform 0.15s ease, visibility 0s linear 0.15s;
    }
    @keyframes dropInRight {
        from { opacity: 0; transform: translateX(-6px); }
        to   { opacity: 1; transform: translateX(0); }
    }
    .dropdown-submenu:hover > .dropdown-submenu-menu,
    .dropdown-submenu:focus-within > .dropdown-submenu-menu,
    .dropdown-submenu.open > .dropdown-submenu-menu {
        visibility: visible;
        opacity: 1;
        pointer-events: auto;
        transform: translateX(0);
        transition: opacity 0.15s ease, transform 0.15s ease, visibility 0s linear 0s;
    }
}

/* ── Mobile : sous-menu en dessous, indenté ── */
@media (max-width: 991.98px) {
    .dropdown-submenu-menu {
        position: static !important;
        box-shadow: none !important;
        border-top: none !important;
        border-right: none !important;
        border-bottom: none !important;
        border-left: 3px solid var(--primary-light) !important;
        border-radius: 0 !important;
        padding: 4px 0 4px 12px !important;
        margin: 4px 0 0 16px !important;
        display: none !important;
        visibility: visible !important;
        opacity: 1 !important;
        transform: none !important;
        pointer-events: auto !important;
    }
    .dropdown-submenu.open > .dropdown-submenu-menu {
        display: block !important;
    }
    /* Flèche vers le bas sur mobile */
    .dropdown-submenu-toggle::after {
        border-left: 4px solid transparent;
        border-right: 4px solid transparent;
        border-top: 5px solid currentColor;
        border-bottom: none;
        margin-left: 6px;
    }
    .dropdown-submenu.open > a.dropdown-submenu-toggle::after {
        transform: rotate(180deg);
    }
}

.navbar-toggler {
    border: 2px solid var(--border);
    border-radius: var(--radius);
    padding: 8px 10px;
}
.navbar-toggler:focus {
    box-shadow: 0 0 0 3px rgba(0,49,137,0.2);
}

/* ============================================================
   HERO (PAGE D'ACCUEIL)
   ============================================================ */
.hero {
    position: relative;
    min-height: 520px;
    display: flex;
    align-items: center;
    background: var(--primary-dark);
    overflow: hidden;
}
.hero-bg {
    position: absolute;
    inset: 0;
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    filter: brightness(0.45);
    z-index: 0;
    transition: transform 8s ease;
}
.hero:hover .hero-bg {
    transform: scale(1.02);
}
.hero-overlay {
    position: absolute;
    inset: 0;
    background: linear-gradient(135deg, rgba(0,35,107,0.65) 0%, rgba(0,49,137,0.35) 100%);
    z-index: 1;
}
.hero-content {
    position: relative;
    z-index: 2;
    padding: 80px 0;
    max-width: 680px;
}
.hero-eyebrow {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    background: rgba(255,255,255,0.15);
    backdrop-filter: blur(8px);
    color: rgba(255,255,255,0.92);
    font-size: 0.78rem;
    font-weight: 600;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    padding: 6px 16px;
    border-radius: 100px;
    border: 1px solid rgba(255,255,255,0.25);
    margin-bottom: 20px;
}
.hero-title {
    font-size: clamp(2rem, 5vw, 3.4rem);
    font-weight: 800;
    color: var(--white);
    line-height: 1.1;
    margin-bottom: 20px;
    letter-spacing: -0.02em;
}
.hero-title span {
    color: #93b8ff;
}
.hero-text {
    color: rgba(255,255,255,0.85);
    font-size: 1.1rem;
    margin-bottom: 32px;
    max-width: 560px;
}
.hero-actions {
    display: flex;
    gap: 14px;
    flex-wrap: wrap;
}
.hero-badge {
    position: absolute;
    bottom: 32px;
    right: 32px;
    z-index: 2;
    display: flex;
    gap: 24px;
}
.hero-stat {
    text-align: center;
    background: rgba(255,255,255,0.12);
    backdrop-filter: blur(8px);
    border: 1px solid rgba(255,255,255,0.2);
    border-radius: var(--radius-lg);
    padding: 16px 24px;
    color: var(--white);
}
.hero-stat strong {
    display: block;
    font-size: 1.8rem;
    font-weight: 800;
    line-height: 1;
}
.hero-stat span {
    font-size: 0.75rem;
    opacity: 0.8;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

/* Barre tricolore */
.tricolor-bar {
    height: 5px;
    background: linear-gradient(to right, #002395 33.3%, #ffffff 33.3%, #ffffff 66.6%, #ED2939 66.6%);
}

/* ============================================================
   INFOS PRATIQUES (bandeaux rapides)
   ============================================================ */
.quick-info {
    background: var(--white);
    box-shadow: var(--shadow-lg);
    border-radius: var(--radius-lg);
    margin-top: -40px;
    position: relative;
    z-index: 10;
}
.quick-info-item {
    display: flex;
    align-items: center;
    gap: 14px;
    padding: 24px 28px;
    border-right: 1px solid var(--border);
    transition: background var(--transition);
}
.quick-info-item:last-child {
    border-right: none;
}
.quick-info-item:hover {
    background: var(--light);
}
.quick-info-icon {
    width: 48px;
    height: 48px;
    background: var(--primary-light);
    border-radius: var(--radius);
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--primary);
    font-size: 1.2rem;
    flex-shrink: 0;
}
.quick-info-text strong {
    display: block;
    font-size: 0.85rem;
    font-weight: 700;
    color: var(--dark);
}
.quick-info-text span {
    font-size: 0.82rem;
    color: var(--text-muted);
}

/* ============================================================
   SECTION SERVICES (CARTES)
   ============================================================ */
.service-card {
    background: var(--white);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    padding: 32px 24px;
    text-align: center;
    transition: all var(--transition);
    height: 100%;
    display: flex;
    flex-direction: column;
    align-items: center;
    text-decoration: none;
    color: var(--text);
}
.service-card:hover,
.service-card:focus-visible {
    border-color: var(--primary);
    box-shadow: var(--shadow-lg);
    transform: translateY(-4px);
    color: var(--text);
    text-decoration: none;
}
.service-card-icon {
    width: 64px;
    height: 64px;
    background: var(--primary-light);
    border-radius: var(--radius-lg);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.6rem;
    color: var(--primary);
    margin-bottom: 18px;
    transition: all var(--transition);
}
.service-card:hover .service-card-icon {
    background: var(--primary);
    color: var(--white);
}
.service-card h3 {
    font-size: 1rem;
    font-weight: 700;
    color: var(--dark);
    margin-bottom: 8px;
}
.service-card p {
    font-size: 0.87rem;
    color: var(--text-muted);
    margin: 0;
    flex: 1;
}
.service-card-link {
    margin-top: 16px;
    font-size: 0.82rem;
    font-weight: 600;
    color: var(--primary);
    display: flex;
    align-items: center;
    gap: 4px;
}

/* ============================================================
   SECTION ACTUALITES
   ============================================================ */
.news-card {
    background: var(--white);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    overflow: hidden;
    height: 100%;
    display: flex;
    flex-direction: column;
    transition: all var(--transition);
}
.news-card:hover {
    box-shadow: var(--shadow-lg);
    transform: translateY(-4px);
    border-color: transparent;
}
.news-card-img {
    aspect-ratio: 16/9;
    overflow: hidden;
    background: var(--light-mid);
}
.news-card-img img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.5s ease;
}
.news-card:hover .news-card-img img {
    transform: scale(1.04);
}
.news-card-img .no-img {
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--light);
}
/* Logo de la commune en image de remplacement */
.news-fallback-logo {
    width: auto;
    height: 72px;
    max-width: 55%;
    object-fit: contain;
    opacity: 0.55;
    filter: grayscale(20%);
    transition: opacity var(--transition);
}
.news-card:hover .news-fallback-logo {
    opacity: 0.75;
}
.news-card-body {
    padding: 22px 24px;
    flex: 1;
    display: flex;
    flex-direction: column;
}
.news-card-meta {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 10px;
    flex-wrap: wrap;
}
.news-card-date {
    font-size: 0.78rem;
    color: var(--text-muted);
    font-weight: 500;
    display: flex;
    align-items: center;
    gap: 5px;
}
.news-card-cat {
    display: inline-block;
    background: var(--primary-light);
    color: var(--primary);
    font-size: 0.72rem;
    font-weight: 700;
    padding: 2px 10px;
    border-radius: 100px;
    text-transform: uppercase;
    letter-spacing: 0.06em;
}
.news-card-title {
    font-size: 1rem;
    font-weight: 700;
    color: var(--dark);
    margin-bottom: 8px;
    line-height: 1.3;
}
.news-card-title a {
    color: inherit;
    text-decoration: none;
}
.news-card-title a:hover {
    color: var(--primary);
}
.news-card-excerpt {
    font-size: 0.87rem;
    color: var(--text-muted);
    flex: 1;
    margin-bottom: 18px;
}
.news-card-readmore {
    font-size: 0.85rem;
    font-weight: 600;
    color: var(--primary);
    display: flex;
    align-items: center;
    gap: 5px;
    margin-top: auto;
    text-decoration: none;
    transition: gap var(--transition), color var(--transition);
}
.news-card-readmore:hover {
    gap: 8px;
    color: var(--primary-dark);
}

/* ============================================================
   FAQ / ACCORDION
   ============================================================ */
.faq-accordion .accordion-item {
    border: 1px solid var(--border);
    border-radius: var(--radius) !important;
    margin-bottom: 10px;
    overflow: hidden;
}
.faq-accordion .accordion-button {
    font-weight: 600;
    font-size: 0.95rem;
    color: var(--dark);
    background: var(--white);
    padding: 18px 22px;
    border-radius: var(--radius) !important;
    box-shadow: none !important;
}
.faq-accordion .accordion-button:not(.collapsed) {
    color: var(--primary);
    background: var(--primary-light);
}
.faq-accordion .accordion-button::after {
    filter: none;
}
.faq-accordion .accordion-button:not(.collapsed)::after {
    filter: invert(22%) sepia(98%) saturate(1052%) hue-rotate(210deg) brightness(90%) contrast(104%);
}
.faq-accordion .accordion-body {
    font-size: 0.92rem;
    color: var(--text-muted);
    padding: 6px 22px 20px;
    line-height: 1.7;
}

/* ============================================================
   PAGE HERO (bandeau pages intérieures)
   ============================================================ */
.page-hero {
    position: relative;
    min-height: 280px;
    display: flex;
    align-items: center;
    background: var(--primary-dark);
    overflow: hidden;
    padding: 72px 0 56px;
}

/* Photo de fond */
.page-hero-bg {
    position: absolute;
    inset: 0;
    background-size: cover;
    background-position: center top;
    background-repeat: no-repeat;
    filter: brightness(0.35);
    z-index: 0;
    transition: transform 8s ease;
}
.page-hero:hover .page-hero-bg {
    transform: scale(1.03);
}

/* Dégradé pour lisibilité du texte */
.page-hero-overlay {
    position: absolute;
    inset: 0;
    background: linear-gradient(
        135deg,
        rgba(0, 35, 107, 0.75) 0%,
        rgba(0, 49, 137, 0.48) 60%,
        rgba(0, 0, 0, 0.25) 100%
    );
    z-index: 1;
}

.page-hero-content {
    position: relative;
    z-index: 2;
}
.page-hero h1 {
    font-size: clamp(1.6rem, 4vw, 2.8rem);
    font-weight: 800;
    color: var(--white);
    margin-bottom: 12px;
    letter-spacing: -0.02em;
    text-shadow: 0 2px 16px rgba(0,0,0,0.35);
}
.page-hero p {
    color: rgba(255,255,255,0.82);
    font-size: 1.05rem;
    margin: 0;
    max-width: 560px;
    text-shadow: 0 1px 8px rgba(0,0,0,0.3);
}

/* Fil d'Ariane */
.breadcrumb-wrap {
    background: var(--light);
    padding: 12px 0;
    border-bottom: 1px solid var(--border);
}
.breadcrumb {
    margin: 0;
    padding: 0;
    background: none;
    font-size: 0.82rem;
}
.breadcrumb-item a {
    color: var(--primary);
    text-decoration: none;
}
.breadcrumb-item a:hover {
    text-decoration: underline;
}
.breadcrumb-item.active {
    color: var(--text-muted);
}
.breadcrumb-item + .breadcrumb-item::before {
    color: var(--text-muted);
}

/* ============================================================
   CONTENU DE PAGE (page.php / single.php)
   ============================================================ */
.page-content {
    padding: 64px 0;
}
.entry-content h2 {
    font-size: 1.5rem;
    margin-top: 2rem;
    margin-bottom: 1rem;
    color: var(--dark);
}
.entry-content h3 {
    font-size: 1.2rem;
    margin-top: 1.5rem;
    margin-bottom: 0.75rem;
}
.entry-content ul,
.entry-content ol {
    padding-left: 1.5rem;
    margin-bottom: 1rem;
    list-style: initial;
}
.entry-content li {
    margin-bottom: 0.4rem;
}
.entry-content p {
    color: var(--text);
    line-height: 1.75;
}
.entry-content blockquote {
    border-left: 4px solid var(--primary);
    margin: 2rem 0;
    padding: 16px 24px;
    background: var(--primary-light);
    border-radius: 0 var(--radius) var(--radius) 0;
    color: var(--primary-dark);
    font-style: italic;
}

/* Post meta */
.post-meta {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 16px;
    margin-bottom: 32px;
    padding-bottom: 24px;
    border-bottom: 1px solid var(--border);
}
.post-meta span {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 0.85rem;
    color: var(--text-muted);
}

/* Post navigation */
.post-navigation {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 16px;
    margin-top: 48px;
    padding-top: 32px;
    border-top: 1px solid var(--border);
}
.post-nav-link {
    padding: 20px;
    background: var(--light);
    border-radius: var(--radius-lg);
    border: 1px solid var(--border);
    text-decoration: none;
    transition: all var(--transition);
    display: flex;
    flex-direction: column;
    gap: 4px;
}
.post-nav-link:hover {
    background: var(--primary-light);
    border-color: var(--primary);
    transform: translateY(-2px);
}
.post-nav-link .nav-label {
    font-size: 0.75rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: var(--primary);
}
.post-nav-link .nav-title {
    font-size: 0.9rem;
    font-weight: 600;
    color: var(--dark);
    line-height: 1.3;
}
.post-nav-link.next {
    text-align: right;
}

/* ============================================================
   BLOG LISTING
   ============================================================ */
.blog-header {
    margin-bottom: 40px;
}
.archive-title {
    font-size: 1.4rem;
    font-weight: 700;
    color: var(--dark);
}
.archive-description {
    color: var(--text-muted);
    margin-top: 8px;
}
.posts-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 28px;
}

/* Pagination */
.pagination-wrap {
    margin-top: 48px;
    display: flex;
    justify-content: center;
}
.pagination .page-link {
    color: var(--primary);
    border-color: var(--border);
    padding: 9px 16px;
    font-weight: 500;
    font-size: 0.9rem;
    border-radius: var(--radius) !important;
    margin: 0 3px;
}
.pagination .page-link:hover {
    background: var(--primary-light);
    border-color: var(--primary);
    color: var(--primary);
}
.pagination .page-item.active .page-link {
    background: var(--primary);
    border-color: var(--primary);
    color: var(--white);
}

/* ============================================================
   SECTION CONTACT
   ============================================================ */
.contact-card {
    background: var(--white);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    padding: 36px;
    height: 100%;
}
.contact-info-item {
    display: flex;
    align-items: flex-start;
    gap: 16px;
    margin-bottom: 24px;
    padding-bottom: 24px;
    border-bottom: 1px solid var(--border);
}
.contact-info-item:last-child {
    margin-bottom: 0;
    padding-bottom: 0;
    border-bottom: none;
}
.contact-info-icon {
    width: 44px;
    height: 44px;
    min-width: 44px;
    background: var(--primary-light);
    border-radius: var(--radius);
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--primary);
    font-size: 1.1rem;
}
.contact-info-text strong {
    display: block;
    font-size: 0.82rem;
    font-weight: 700;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.06em;
    margin-bottom: 4px;
}
.contact-info-text a,
.contact-info-text span {
    color: var(--dark);
    font-weight: 500;
    font-size: 0.95rem;
}
.contact-info-text a:hover {
    color: var(--primary);
}

/* Horaires */
.hours-table {
    width: 100%;
    font-size: 0.88rem;
}
.hours-table tr td:first-child {
    font-weight: 600;
    color: var(--dark);
    padding: 5px 0;
    width: 50%;
}
.hours-table tr td:last-child {
    color: var(--text-muted);
    text-align: right;
}
.hours-closed {
    color: var(--accent) !important;
    font-style: italic;
}

/* Formulaire de contact */
.contact-form .form-label {
    font-weight: 600;
    font-size: 0.88rem;
    color: var(--dark);
    margin-bottom: 6px;
}
.contact-form .form-control,
.contact-form .form-select {
    border: 1.5px solid var(--border);
    border-radius: var(--radius);
    padding: 11px 14px;
    font-size: 0.9rem;
    color: var(--text);
    transition: border-color var(--transition), box-shadow var(--transition);
}
.contact-form .form-control:focus,
.contact-form .form-select:focus {
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(0,49,137,0.12);
}

/* Honeypot */
.honeypot-field {
    display: none !important;
    visibility: hidden !important;
}

/* ============================================================
   RAPPORTS DU CONSEIL
   ============================================================ */
.rapport-item {
    display: flex;
    align-items: center;
    gap: 18px;
    padding: 18px 22px;
    background: var(--white);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    margin-bottom: 12px;
    transition: all var(--transition);
}
.rapport-item:hover {
    border-color: var(--primary);
    box-shadow: var(--shadow);
}
.rapport-icon {
    width: 44px;
    height: 44px;
    min-width: 44px;
    background: var(--accent-light);
    border-radius: var(--radius);
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--accent);
    font-size: 1.2rem;
}
.rapport-info {
    flex: 1;
}
.rapport-info strong {
    display: block;
    font-weight: 600;
    font-size: 0.9rem;
    color: var(--dark);
}
.rapport-info span {
    font-size: 0.8rem;
    color: var(--text-muted);
}
.rapport-download {
    font-size: 0.82rem;
    font-weight: 600;
    color: var(--primary);
    display: flex;
    align-items: center;
    gap: 6px;
    text-decoration: none;
    white-space: nowrap;
    padding: 7px 14px;
    border: 1.5px solid var(--primary);
    border-radius: var(--radius);
    transition: all var(--transition);
}
.rapport-download:hover {
    background: var(--primary);
    color: var(--white);
}

/* ============================================================
   FOOTER
   ============================================================ */
.site-footer {
    background: var(--dark);
    color: rgba(255,255,255,0.75);
    padding: 64px 0 0;
    margin-top: auto;
}
.footer-brand {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 16px;
}
.footer-brand-logo {
    width: 64px;
    height: 64px;
    object-fit: contain;
    opacity: 0.92;
    border-radius: var(--radius-sm);
}
.footer-brand-name {
    font-size: 1.15rem;
    font-weight: 800;
    color: var(--white);
}
.footer-brand-sub {
    font-size: 0.78rem;
    color: rgba(255,255,255,0.5);
}
.footer-desc {
    font-size: 0.87rem;
    line-height: 1.65;
    color: rgba(255,255,255,0.6);
    margin-bottom: 20px;
    max-width: 280px;
}
.footer-col-title {
    font-size: 0.8rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    color: rgba(255,255,255,0.45);
    margin-bottom: 18px;
}
.footer-links {
    list-style: none;
    padding: 0;
    margin: 0;
}
.footer-links li {
    margin-bottom: 10px;
}
.footer-links a {
    color: rgba(255,255,255,0.65);
    font-size: 0.88rem;
    text-decoration: none;
    transition: color var(--transition);
    display: inline-flex;
    align-items: center;
    gap: 6px;
}
.footer-links a:hover {
    color: var(--white);
}

.footer-contact-item {
    display: flex;
    gap: 12px;
    margin-bottom: 14px;
    align-items: flex-start;
    font-size: 0.87rem;
}
.footer-contact-item i {
    color: rgba(255,255,255,0.4);
    font-size: 0.9rem;
    margin-top: 2px;
    flex-shrink: 0;
}
.footer-contact-item a {
    color: rgba(255,255,255,0.65);
    text-decoration: none;
}
.footer-contact-item a:hover {
    color: var(--white);
}

.footer-bottom {
    margin-top: 48px;
    border-top: 1px solid rgba(255,255,255,0.08);
    padding: 20px 0;
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 12px;
    font-size: 0.8rem;
    color: rgba(255,255,255,0.4);
}
.footer-bottom a {
    color: rgba(255,255,255,0.55);
    text-decoration: none;
    transition: color var(--transition);
}
.footer-bottom a:hover {
    color: var(--white);
}
.footer-bottom-links {
    display: flex;
    gap: 20px;
}

/* ============================================================
   BACK TO TOP
   ============================================================ */
.back-to-top {
    position: fixed;
    bottom: 28px;
    right: 28px;
    z-index: 999;
    width: 44px;
    height: 44px;
    background: var(--primary);
    color: var(--white);
    border: none;
    border-radius: var(--radius);
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    opacity: 0;
    transform: translateY(12px);
    transition: opacity var(--transition), transform var(--transition), background var(--transition);
    box-shadow: var(--shadow);
}
.back-to-top.visible {
    opacity: 1;
    transform: translateY(0);
}
.back-to-top:hover {
    background: var(--primary-dark);
}

/* ============================================================
   PAGE 404
   ============================================================ */
.error-404-section {
    min-height: 60vh;
    display: flex;
    align-items: center;
    text-align: center;
    padding: 80px 0;
}
.error-404-code {
    font-size: clamp(6rem, 15vw, 10rem);
    font-weight: 900;
    color: var(--primary-light);
    line-height: 1;
    margin-bottom: -20px;
    user-select: none;
    letter-spacing: -0.05em;
}
.error-404-title {
    font-size: 1.8rem;
    color: var(--dark);
    margin-bottom: 12px;
}
.error-404-text {
    color: var(--text-muted);
    max-width: 420px;
    margin: 0 auto 32px;
}

/* ============================================================
   CARTE (ACF Google Map)
   ============================================================ */
.acf-map {
    width: 100%;
    height: 380px;
    border-radius: var(--radius-lg);
    overflow: hidden;
    border: 1px solid var(--border);
}

/* ============================================================
   MENTIONS LÉGALES & RGAA
   ============================================================ */
.legal-content {
    max-width: 820px;
}
.legal-content h2 {
    font-size: 1.3rem;
    margin-top: 2.5rem;
    margin-bottom: 0.75rem;
    padding-bottom: 8px;
    border-bottom: 2px solid var(--primary-light);
    color: var(--primary);
}
.legal-content h3 {
    font-size: 1.05rem;
    margin-top: 1.5rem;
    margin-bottom: 0.5rem;
}
.rgaa-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.88rem;
    margin: 20px 0;
}
.rgaa-table th {
    background: var(--primary);
    color: var(--white);
    padding: 10px 14px;
    text-align: left;
    font-weight: 600;
}
.rgaa-table td {
    padding: 10px 14px;
    border-bottom: 1px solid var(--border);
    vertical-align: top;
}
.rgaa-table tr:nth-child(even) td {
    background: var(--light);
}
.badge-conforme {
    background: #dcfce7;
    color: #166534;
    padding: 3px 10px;
    border-radius: 100px;
    font-size: 0.78rem;
    font-weight: 700;
}
.badge-partiel {
    background: #fef9c3;
    color: #854d0e;
    padding: 3px 10px;
    border-radius: 100px;
    font-size: 0.78rem;
    font-weight: 700;
}
.badge-nc {
    background: var(--accent-light);
    color: var(--accent);
    padding: 3px 10px;
    border-radius: 100px;
    font-size: 0.78rem;
    font-weight: 700;
}

.rgaa-status-banner {
    display: flex;
    align-items: flex-start;
    gap: 1rem;
    background: #eff6ff;
    border: 1px solid #bfdbfe;
    border-left: 4px solid var(--primary);
    border-radius: 8px;
    padding: 1.25rem 1.5rem;
    margin-bottom: 2rem;
}
.rgaa-status-icon {
    font-size: 2rem;
    color: var(--primary);
    line-height: 1;
    flex-shrink: 0;
}
.rgaa-status-banner strong {
    display: block;
    font-size: 1rem;
    color: var(--primary);
    margin-bottom: 0.25rem;
}
.rgaa-status-banner p {
    margin: 0;
    font-size: 0.9rem;
    color: var(--text-muted);
}

/* ============================================================
   FOCUS / ACCESSIBILITE
   ============================================================ */
:focus-visible {
    outline: 3px solid var(--primary);
    outline-offset: 2px;
    border-radius: var(--radius-sm);
}
a:focus-visible,
button:focus-visible {
    outline: 3px solid var(--primary);
    outline-offset: 3px;
}

/* ============================================================
   RESPONSIVE
   ============================================================ */
@media (max-width: 991.98px) {
    .header-topbar .topbar-tagline {
        display: none;
    }
    .hero-badge {
        display: none;
    }
    .quick-info-item {
        border-right: none;
        border-bottom: 1px solid var(--border);
        padding: 16px 20px;
    }
    .quick-info-item:last-child {
        border-bottom: none;
    }
    .post-navigation {
        grid-template-columns: 1fr;
    }
    .posts-grid {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 767.98px) {
    .section {
        padding: 56px 0;
    }
    .hero {
        min-height: 420px;
    }
    .hero-content {
        padding: 60px 0;
    }
    .hero-title {
        font-size: 2rem;
    }
    .hero-actions {
        flex-direction: column;
    }
    .hero-actions .btn-primary-custom,
    .hero-actions .btn-outline-custom {
        width: 100%;
        justify-content: center;
    }
    .footer-bottom {
        flex-direction: column;
        text-align: center;
    }
    .footer-bottom-links {
        justify-content: center;
    }
    .contact-card {
        padding: 24px 20px;
    }
}

@media (max-width: 575.98px) {
    .section-title {
        margin-bottom: 32px;
    }
    .news-card-body {
        padding: 18px;
    }
}

/* ============================================================
   DARK MODE
   ============================================================ */
@media (prefers-color-scheme: dark) {
    :root {
        --white:       #111827;
        --light:       #1a2437;
        --light-mid:   #1e2d45;
        --border:      #2c3a52;
        --text:        #e2e8f0;
        --text-muted:  #94a3b8;
        --dark:        #f1f5f9;
    }
    .site-header {
        background: #111827;
        box-shadow: 0 2px 16px rgba(0,0,0,0.4);
    }
    .navbar-nav .nav-link {
        color: #e2e8f0;
    }
    .navbar-nav .dropdown-menu {
        background: #1a2437;
        border-color: #2c3a52;
    }
    .navbar-nav .dropdown-item {
        color: #e2e8f0;
    }
    .news-card,
    .service-card,
    .contact-card {
        background: #1a2437;
        border-color: #2c3a52;
    }
    .faq-accordion .accordion-item {
        background: #1a2437;
        border-color: #2c3a52;
    }
    .faq-accordion .accordion-button {
        background: #1a2437;
        color: #e2e8f0;
    }
    .faq-accordion .accordion-button:not(.collapsed) {
        background: #1e3a6e;
    }
    .quick-info {
        background: #1a2437;
    }
    .post-nav-link {
        background: #1a2437;
        border-color: #2c3a52;
    }
    .rapport-item {
        background: #1a2437;
        border-color: #2c3a52;
    }
}

/* ============================================================
   IMPRESSION
   ============================================================ */
@media print {
    .site-header,
    .header-topbar,
    .site-footer,
    .back-to-top,
    .hero-badge {
        display: none !important;
    }
    body {
        font-size: 12pt;
        color: #000;
    }
    a {
        color: #000;
    }
    a[href]::after {
        content: " (" attr(href) ")";
        font-size: 10pt;
    }
}