﻿/* ==========================================================================
   Mairie de Champs (63440) - Site officiel
   PYRTECH INFORMATIQUE (c) 2026
   Stack: CSS3 (Grid, Flexbox, Custom Properties) - Zero dependance
   ========================================================================== */

/* ---------- CANVAS PARTICULES ---------- */
#particleGrid {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 0;
    pointer-events: none;
}

/* ---------- VARIABLES ---------- */
:root {
    --color-primary: #222222;
    --color-primary-dark: #111111;
    --color-primary-light: #555555;
    --color-accent: #8B6F5E;
    --color-white: #ffffff;
    --color-bg: #fdf6ee;
    --color-bg-alt: #f5f5f5;
    --color-bg-dark: #A89080;
    --color-text: #1a1a1a;
    --color-text-light: #555555;
    --color-text-inv: #ffffff;
    --color-border: #e0e0e0;
    --color-border-light: #f0f0f0;
    --color-success: #15803d;
    --color-error: #dc2626;

    --font-family: 'Segoe UI', system-ui, -apple-system, sans-serif;
    --font-size-base: 1rem;
    --font-size-sm: 1rem;
    --font-size-lg: 1.125rem;
    --font-size-xl: 1.5rem;
    --font-size-2xl: 2rem;
    --font-size-3xl: 2.5rem;

    --spacing-xs: 0.25rem;
    --spacing-sm: 0.5rem;
    --spacing-md: 1rem;
    --spacing-lg: 1.5rem;
    --spacing-xl: 2rem;
    --spacing-2xl: 3rem;
    --spacing-3xl: 4rem;

    --radius-sm: 4px;
    --radius-md: 8px;
    --radius-lg: 12px;
    --radius-full: 50%;

    --shadow-sm: 0 1px 3px rgba(0,0,0,0.08);
    --shadow-md: 0 4px 12px rgba(0,0,0,0.1);
    --shadow-lg: 0 8px 24px rgba(0,0,0,0.12);

    --container-max: 1200px;
    --clock-bar-height: 36px;
    --header-height: 72px;
    --dev-banner-height: 0px;
    --transition: 0.2s ease;
}

/* ---------- DEGRADE ANIME MARRON ---------- */
@-webkit-keyframes brownShift {
    0%   { background-position: 0% 50%; }
    50%  { background-position: 100% 50%; }
    100% { background-position: 0% 50%; }
}
@keyframes colorShift {
    0%   { background-position: 0% 50%; }
    50%  { background-position: 100% 50%; }
    100% { background-position: 0% 50%; }
}
.brown-gradient {
    background: linear-gradient(270deg, #152E4A, #5C1E2B, #143528, #1A3A3A, #3A1850, #152E4A);
    background-size: 600% 600%;
    animation: colorShift 45s ease infinite;
}
/* Header */
.site-header { background: linear-gradient(270deg, #152E4A, #5C1E2B, #143528, #1A3A3A, #3A1850, #152E4A); background-size: 600% 600%; animation: colorShift 45s ease infinite; border-bottom: 1px solid #0a1520; }
.logo { color: #ffffff; text-shadow: 0 2px 6px rgba(0,0,0,0.8), 0 0 12px rgba(0,0,0,0.4); }
.logo-subtitle { color: #ffffff; text-shadow: 0 2px 6px rgba(0,0,0,0.8), 0 0 12px rgba(0,0,0,0.4); }
.nav-link { color: #ffffff; text-shadow: 0 2px 6px rgba(0,0,0,0.8), 0 0 12px rgba(0,0,0,0.4); }
.nav-link:hover { background: rgba(255,255,255,0.15); color: #ffffff; }
.menu-bar { background: #ffffff !important; box-shadow: 0 1px 3px rgba(0,0,0,0.5); }
/* Footer */
.site-footer { background: linear-gradient(270deg, #152E4A, #5C1E2B, #143528, #1A3A3A, #3A1850, #152E4A); background-size: 600% 600%; animation: colorShift 45s ease infinite; }
.footer-col h4, .footer-col .footer-title { color: #ffffff; text-shadow: 0 2px 6px rgba(0,0,0,0.8), 0 0 12px rgba(0,0,0,0.4); }
.footer-links a { color: #ffffff; text-shadow: 0 2px 4px rgba(0,0,0,0.7); }
.footer-links a:hover { color: #ffffff; text-decoration: underline; }
.footer-bottom { background: rgba(0,0,0,0.3); }
/* Horloge */
.live-clock-bar { background: linear-gradient(270deg, #152E4A, #5C1E2B, #143528, #1A3A3A, #3A1850, #152E4A); background-size: 600% 600%; animation: colorShift 45s ease infinite; }
/* Dropdown blanc */
.dropdown-menu { background: #ffffff; border: 1px solid #e0e0e0; box-shadow: 0 8px 24px rgba(0,0,0,0.15); }
.dropdown-menu a { color: #1a1a1a; }
.dropdown-menu a:hover { background: #f5f5f5; color: #000000; }
/* Hero — overlay sombre leger pour lire le texte, photo naturelle */
.hero-overlay { background: rgba(0,0,0,0.55); }
/* Info cards */
.info-card:nth-child(1) { border-top-color: #8B6F5E; }
.info-card:nth-child(1) h3 { color: #1a1a1a; }
.info-card:nth-child(2) { border-top-color: #666666; }
.info-card:nth-child(2) h3 { color: #1a1a1a; }
.info-card:nth-child(3) { border-top-color: #999999; }
.info-card:nth-child(3) h3 { color: #1a1a1a; }
/* Lieux-dits */
.lieu-dit-card { background: #ffffff; border: 1px solid #e0e0e0; }
.lieu-dit-card:hover { box-shadow: 0 12px 32px rgba(0,0,0,0.1); border-color: #cccccc; }
.lieu-dit-card h3 { color: #1a1a1a; }
.lieu-dit-card p { color: #555555; }
/* Horaire note */
.horaire-note { background: #f5f5f5; color: #1a1a1a; }
/* Form */
input, textarea, select { background: #ffffff; color: #1a1a1a; border-color: #cccccc; }
input:focus, textarea:focus, select:focus { box-shadow: 0 0 0 3px rgba(0,0,0,0.08); border-color: #999999; }
/* Geographie */
.geographie { border-top: 1px solid #e0e0e0; }

/* ---------- RESET ---------- */
*,
*::before,
*::after {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

html {
    scroll-behavior: smooth;
    scroll-padding-top: calc(var(--header-height) + var(--clock-bar-height) + var(--dev-banner-height));
    -webkit-text-size-adjust: 100%;
}

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

/* Garde anti-debordement horizontal UNIQUEMENT sur telephone (le menu off-canvas
   en translateX(100%) creait un scroll lateral). Volontairement PAS sur desktop :
   un overflow-x sur body casserait le position:sticky du formulaire de reservation. */
@media (max-width: 768px) {
    html, body { overflow-x: hidden; max-width: 100%; }
    /* aucun contenu ne doit deborder la largeur de l'ecran */
    img, table, pre, iframe, video { max-width: 100%; }
}

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

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

a:hover {
    color: var(--color-primary-light);
}

a:focus-visible {
    outline: 3px solid var(--color-primary-light);
    outline-offset: 2px;
    border-radius: var(--radius-sm);
}

ul, ol {
    list-style: none;
}

table {
    border-collapse: collapse;
    width: 100%;
}

button, input, select, textarea {
    font: inherit;
    color: inherit;
}

/* ---------- BANDEAU VERSION DE DEVELOPPEMENT ---------- */
.dev-banner {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 1100;
    box-sizing: border-box;
    background: #F59E0B;
    color: #3a2606;
    text-align: center;
    font-weight: 700;
    font-size: 0.9rem;
    line-height: 1.35;
    padding: 8px 16px;
    border-bottom: 2px solid #b45309;
    box-shadow: 0 2px 6px rgba(0,0,0,0.25);
    letter-spacing: 0.01em;
}
/* Page admin : bandeau en flux normal (pousse le contenu, header admin sticky) */
.page-admin .dev-banner {
    position: static;
    box-shadow: none;
}
@media (max-width: 768px) {
    .dev-banner {
        font-size: 0.78rem;
        padding: 7px 12px;
    }
}

/* ---------- SKIP LINK (accessibilite) ---------- */
.skip-link {
    position: absolute;
    top: -100%;
    left: var(--spacing-md);
    background: var(--color-primary);
    color: var(--color-white);
    padding: var(--spacing-sm) var(--spacing-md);
    border-radius: 0 0 var(--radius-md) var(--radius-md);
    z-index: 1000;
    font-weight: 600;
}

.skip-link:focus {
    top: 0;
    color: var(--color-white);
}

/* ---------- SR-ONLY (accessibilite) ---------- */
.sr-only {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}

/* ---------- CONTAINER ---------- */
.container {
    max-width: var(--container-max);
    margin: 0 auto;
    padding: 0 var(--spacing-lg);
}

/* ---------- HEADER ---------- */
.live-clock-bar {
    position: fixed;
    top: var(--dev-banner-height);
    left: 0;
    right: 0;
    height: var(--clock-bar-height);
    background: linear-gradient(270deg, #152E4A, #5C1E2B, #143528, #1A3A3A, #3A1850, #152E4A);
    background-size: 600% 600%;
    animation: colorShift 45s ease infinite;
    color: #ffffff;
    text-shadow: 0 2px 6px rgba(0,0,0,0.8), 0 0 12px rgba(0,0,0,0.4);
    display: flex;
    align-items: center;
    padding: 0 var(--spacing-lg);
    font-size: 1.05rem;
    font-weight: 600;
    letter-spacing: 0.03em;
    font-variant-numeric: tabular-nums;
    z-index: 101;
}
.live-clock-bar .clock-icon { margin-right: 6px; }

.site-header {
    position: fixed;
    top: calc(var(--clock-bar-height) + var(--dev-banner-height));
    left: 0;
    right: 0;
    height: var(--header-height);
    background: linear-gradient(270deg,
        rgba(21,46,74,0.85), rgba(92,30,43,0.85), rgba(20,53,40,0.85),
        rgba(26,58,58,0.85), rgba(58,24,80,0.85), rgba(21,46,74,0.85));
    background-size: 600% 600%;
    animation: colorShift 45s ease infinite;
    border-bottom: 1px solid rgba(10,21,32,0.5);
    z-index: 100;
    transition: box-shadow var(--transition), backdrop-filter var(--transition);
    -webkit-backdrop-filter: blur(12px);
    backdrop-filter: blur(12px);
}

.site-header.scrolled {
    box-shadow: 0 4px 20px rgba(0,0,0,0.25);
    -webkit-backdrop-filter: blur(16px);
    backdrop-filter: blur(16px);
}

.header-inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    height: 100%;
}

/* Logo */
.logo {
    display: flex;
    align-items: center;
    gap: var(--spacing-sm);
    color: var(--color-primary);
    font-weight: 700;
    text-decoration: none;
    flex-shrink: 0;
}

.logo:hover {
    color: #ffffff;
}

.logo-icon svg {
    display: block;
}

.logo-title {
    display: block;
    font-size: 1.4rem;
    line-height: 1.2;
    font-weight: 700;
    color: #ffffff !important;
    text-shadow: 0 2px 6px rgba(0,0,0,0.8), 0 0 12px rgba(0,0,0,0.4);
}

.logo-subtitle {
    display: block;
    font-size: var(--font-size-sm);
    font-weight: 400;
    color: #ffffff !important;
    text-shadow: 0 2px 6px rgba(0,0,0,0.8), 0 0 12px rgba(0,0,0,0.4);
}

/* Nav */
.nav-list {
    display: flex;
    align-items: center;
    gap: 0.15rem;
    flex-wrap: nowrap;
}

.nav-link {
    display: block;
    padding: var(--spacing-sm) 0.6rem;
    color: #ffffff !important;
    text-shadow: 0 2px 6px rgba(0,0,0,0.8), 0 0 12px rgba(0,0,0,0.4);
    font-size: 1rem;
    font-weight: 600;
    border-radius: var(--radius-md);
    transition: background var(--transition), color var(--transition);
    white-space: nowrap;
}

.nav-link:hover {
    background: rgba(255,255,255,0.15);
    color: #ffffff !important;
}
.nav-link.active {
    border-bottom: 2px solid #ffffff;
    color: #ffffff !important;
    background: transparent;
}

/* Dropdown Services */
.nav-dropdown {
    position: relative;
}
.dropdown-toggle {
    display: flex;
    align-items: center;
    gap: 4px;
    cursor: pointer;
}
.dropdown-arrow {
    font-size: 0.8em;
    transition: transform 0.2s ease;
}
.nav-dropdown.open .dropdown-arrow {
    transform: rotate(180deg);
}
.dropdown-menu {
    position: absolute;
    top: 100%;
    left: 0;
    background: #ffffff;
    border: 1px solid #e2e8f0;
    border-radius: 8px;
    min-width: 200px;
    padding: 6px 0;
    box-shadow: 0 8px 24px rgba(0,0,0,0.15);
    z-index: 50;
    list-style: none;
    opacity: 0;
    visibility: hidden;
    transform: translateY(-8px);
    transition: opacity 0.25s ease, transform 0.25s ease, visibility 0.25s;
    pointer-events: none;
}
.nav-dropdown.open .dropdown-menu {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
    pointer-events: auto;
}
.dropdown-menu a {
    display: block;
    padding: 8px 16px;
    color: #1a1a1a;
    font-size: 1rem;
    font-weight: 500;
    transition: background 0.2s ease, color 0.2s ease;
}
.dropdown-menu a:hover,
.dropdown-menu a.active {
    background: #f5f5f5;
    color: #333333;
}

/* Menu burger */
.menu-toggle {
    display: none;
    flex-direction: column;
    justify-content: center;
    gap: 6px;
    width: 48px;
    height: 48px;
    padding: 10px;
    background: none;
    border: none;
    cursor: pointer;
    border-radius: var(--radius-md);
    transition: background var(--transition);
}

.menu-toggle:hover {
    background: var(--color-bg-alt);
}

.menu-bar {
    display: block;
    width: 100%;
    height: 2px;
    background: var(--color-text);
    border-radius: 1px;
    transition: transform var(--transition), opacity var(--transition);
}

.menu-toggle[aria-expanded="true"] .menu-bar:nth-child(1) {
    transform: translateY(7px) rotate(45deg);
}

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

.menu-toggle[aria-expanded="true"] .menu-bar:nth-child(3) {
    transform: translateY(-7px) rotate(-45deg);
}

/* ---------- HERO ---------- */
@keyframes kenBurns {
    0%   { transform: scale(1); }
    50%  { transform: scale(1.08); }
    100% { transform: scale(1); }
}
.hero {
    position: relative;
    min-height: 500px;
    display: flex;
    align-items: center;
    margin-top: calc(var(--header-height) + var(--clock-bar-height) + var(--dev-banner-height));
    overflow: hidden;
}
.hero::after {
    content: '';
    position: absolute;
    inset: -5%;
    background: url('../images/hero-mairie.jpg') center/cover no-repeat;
    animation: kenBurns 30s ease-in-out infinite;
    z-index: -1;
}

.hero::before {
    content: '';
    position: absolute;
    inset: 0;
    background: rgba(0,0,0,0.45);
    z-index: 0;
}

.hero-overlay {
    position: absolute;
    inset: 0;
    z-index: 0;
    background: url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 100 100"><defs><pattern id="g" width="20" height="20" patternUnits="userSpaceOnUse"><circle cx="10" cy="10" r="0.5" fill="rgba(255,255,255,0.1)"/></pattern></defs><rect fill="url(%23g)" width="100" height="100"/></svg>');
}

.hero-content {
    position: relative;
    z-index: 1;
    text-align: center;
    color: var(--color-white);
    padding: var(--spacing-3xl) 0;
    text-shadow: 0 2px 8px rgba(0,0,0,0.6);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    width: 100%;
}

.hero h1 {
    font-size: clamp(2.8rem, 6vw, 4rem);
    font-weight: 700;
    margin-bottom: var(--spacing-md);
    letter-spacing: -0.02em;
    color: #ffffff;
    text-shadow: 0 2px 12px rgba(0,0,0,0.7), 0 0 4px rgba(0,0,0,0.5);
}

.hero-subtitle {
    font-size: clamp(1.1rem, 2.5vw, 1.4rem);
    color: #ffffff;
    margin-bottom: var(--spacing-xl);
    text-shadow: 0 2px 12px rgba(0,0,0,0.7), 0 0 4px rgba(0,0,0,0.5);
}

.hero-actions {
    display: flex;
    gap: var(--spacing-md);
    justify-content: center;
    flex-wrap: wrap;
}

/* ---------- BOUTONS ---------- */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0.75rem 1.5rem;
    font-size: var(--font-size-sm);
    font-weight: 600;
    border-radius: var(--radius-md);
    border: 2px solid transparent;
    cursor: pointer;
    transition: all var(--transition);
    text-decoration: none;
    line-height: 1;
}

.btn-primary {
    background: transparent;
    color: var(--color-white);
    border-color: rgba(255,255,255,0.8);
}

.btn-primary:hover {
    background: rgba(255,255,255,0.2);
    color: var(--color-white);
    border-color: #ffffff;
}

.btn-outline {
    background: transparent;
    color: var(--color-white);
    border-color: rgba(255,255,255,0.5);
}

.btn-outline:hover {
    background: var(--color-white);
    color: var(--color-primary);
    border-color: var(--color-white);
}

.btn-secondary {
    background: linear-gradient(135deg, #8B6F5E, #A08070);
    color: var(--color-white);
    border-color: #8B6F5E;
    transition: all 0.3s ease;
}

.btn-secondary:hover {
    background: linear-gradient(135deg, #A89080, #B8A090);
    border-color: var(--color-primary-dark);
    color: var(--color-white);
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(139,111,94,0.3);
}

/* ---------- PROCHAIN RDV (dans le hero) ---------- */
.hero-rdv {
    margin-top: 0.5rem;
    font-size: clamp(1.2rem, 3vw, 1.6rem);
    font-weight: 600;
}

.hero-rdv[hidden] {
    display: none;
}

/* ---------- INFOS RAPIDES ---------- */
.infos-rapides {
    margin-top: -40px;
    position: relative;
    z-index: 10;
    padding-bottom: var(--spacing-2xl);
}

.infos-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: var(--spacing-lg);
}

.info-card {
    background: var(--color-white);
    padding: var(--spacing-xl);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-lg);
    text-align: center;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    border-top: 4px solid var(--color-primary);
}

.info-card:nth-child(1) {
    border-top-color: #2563eb;
}

.info-card:nth-child(2) {
    border-top-color: #15803d;
}

.info-card:nth-child(3) {
    border-top-color: #e53e3e;
}

.info-card:nth-child(4) {
    border-top-color: #f59e0b;
}

.info-card:hover {
    transform: translateY(-6px) scale(1.03);
    box-shadow: 0 12px 32px rgba(0,0,0,0.15), 0 0 0 1px rgba(0,0,0,0.03);
}

.info-icon {
    width: 56px;
    height: 56px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: var(--radius-full);
    margin-bottom: var(--spacing-md);
}

.info-card:nth-child(1) .info-icon {
    background: #eff6ff;
    color: #2563eb;
}

.info-card:nth-child(2) .info-icon {
    background: #f0fdf4;
    color: #15803d;
}

.info-card:nth-child(3) .info-icon {
    background: #fef2f2;
    color: #e53e3e;
}

.info-card:nth-child(4) .info-icon {
    background: #fffbeb;
    color: #f59e0b;
}

.info-card h3 {
    font-size: var(--font-size-lg);
    margin-bottom: var(--spacing-sm);
}

.info-card:nth-child(1) h3 { color: #1d4ed8; }
.info-card:nth-child(2) h3 { color: #15803d; }
.info-card:nth-child(3) h3 { color: #dc2626; }
.info-card:nth-child(4) h3 { color: #d97706; }

.info-card p {
    color: var(--color-text-light);
    font-size: var(--font-size-sm);
    margin-bottom: var(--spacing-sm);
    line-height: 1.7;
}

.info-link {
    font-size: var(--font-size-sm);
    font-weight: 600;
}

/* ---------- SECTIONS ---------- */
.section {
    padding: var(--spacing-3xl) 0;
}

.section-alt {
    background: var(--color-bg-alt);
}

/* Sub-pages (sans hero) */
.page-main {
    padding-top: calc(var(--header-height) + var(--clock-bar-height) + var(--dev-banner-height));
}

/* Bandeau hero pour pages secondaires (commune, conseil, urbanisme, etc.) */
.page-hero {
    position: relative;
    height: 220px;
    margin-top: calc(var(--header-height) + var(--clock-bar-height) + var(--dev-banner-height));
    background-size: cover;
    background-position: center;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
}
.page-hero::before {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(rgba(0,0,0,0.35), rgba(0,0,0,0.6));
}
.page-hero h1 {
    position: relative;
    color: #fff;
    text-align: center;
    font-size: clamp(1.9rem, 4vw, 3rem);
    font-weight: 700;
    text-shadow: 0 2px 12px rgba(0,0,0,0.75);
    margin: 0;
    padding: 0 1rem;
    letter-spacing: -0.01em;
}
.page-hero p.page-hero-subtitle {
    position: relative;
    color: #fff;
    text-align: center;
    font-size: clamp(0.95rem, 2vw, 1.15rem);
    text-shadow: 0 2px 8px rgba(0,0,0,0.7);
    margin: 0.4rem 0 0 0;
    padding: 0 1rem;
    opacity: 0.95;
}
/* Quand .page-hero est présent, .page-main n'a plus besoin du padding-top */
.page-hero + .page-main {
    padding-top: 0;
}
@media (max-width: 768px) {
    .page-hero { height: 160px; }
    .page-hero h1 { font-size: clamp(1.4rem, 6vw, 2rem); overflow-wrap: break-word; }
    .page-hero p.page-hero-subtitle { font-size: 0.9rem; }
}

.section-title {
    font-size: var(--font-size-2xl);
    color: var(--color-primary);
    margin-bottom: var(--spacing-md);
    position: relative;
    display: inline-block;
}

.section-title::after {
    content: '';
    display: block;
    width: 0;
    height: 3px;
    background: var(--color-accent);
    border-radius: 2px;
    margin-top: var(--spacing-sm);
    transition: width 0.6s ease;
}
.section-title.visible::after {
    width: 60px;
}

.section-intro {
    color: var(--color-text-light);
    font-size: var(--font-size-lg);
    max-width: 700px;
    margin-bottom: var(--spacing-2xl);
}

/* ---------- LA COMMUNE ---------- */
.commune-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: var(--spacing-2xl);
    align-items: start;
    margin-bottom: var(--spacing-2xl);
}

.commune-text p {
    margin-bottom: var(--spacing-md);
    font-size: var(--font-size-lg);
}

.chiffres-cles {
    display: flex;
    gap: var(--spacing-xl);
    margin-top: var(--spacing-xl);
    padding-top: var(--spacing-xl);
    border-top: 1px solid var(--color-border);
}

.chiffre {
    text-align: center;
}

.chiffre-nombre {
    display: block;
    font-size: var(--font-size-2xl);
    font-weight: 700;
    color: var(--color-primary);
    line-height: 1.2;
}

.chiffre-label {
    display: block;
    font-size: var(--font-size-sm);
    color: var(--color-text-light);
    margin-top: var(--spacing-xs);
}

.commune-image {
    border-radius: var(--radius-lg);
    overflow: hidden;
    box-shadow: var(--shadow-md);
}

.commune-image img {
    width: 100%;
    height: auto;
    display: block;
    object-fit: cover;
}

/* Associations */
.associations {
    margin-top: var(--spacing-2xl);
}

.associations h3 {
    font-size: var(--font-size-xl);
    color: var(--color-primary);
    margin-bottom: var(--spacing-lg);
}

.asso-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: var(--spacing-lg);
}

.asso-card {
    padding: var(--spacing-xl);
    background: var(--color-bg-alt);
    border-radius: var(--radius-lg);
    border-left: 4px solid var(--color-primary);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}
.asso-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 8px 24px rgba(0,0,0,0.1);
}

.asso-card h4 {
    font-size: 1.2rem;
    color: var(--color-primary);
    margin-bottom: 0.6rem;
}

/* Titres des associations : couleur par card (harmonie terreuse) + bordure assortie */
.asso-card h3 {
    font-size: 1.2rem;
    margin-bottom: 0.6rem;
}
.asso-grid > .asso-card:nth-child(1) h3 { color: #0f766e; }
.asso-grid > .asso-card:nth-child(1) { border-left-color: #0f766e; }
.asso-grid > .asso-card:nth-child(2) h3 { color: #92400e; }
.asso-grid > .asso-card:nth-child(2) { border-left-color: #92400e; }
.asso-grid > .asso-card:nth-child(3) h3 { color: #166534; }
.asso-grid > .asso-card:nth-child(3) { border-left-color: #166534; }
.asso-grid > .asso-card:nth-child(4) h3 { color: #c2410c; }
.asso-grid > .asso-card:nth-child(4) { border-left-color: #c2410c; }

.asso-card p {
    font-size: 1rem;
    line-height: 1.5;
    color: var(--color-text-light);
}

/* Pastille de date des evenements (agenda) : badge colore arrondi, texte blanc.
   Meme palette sobre que les actualites + rotation 6 couleurs. Contraste AA verifie. */
.event-date {
    display: inline-block;
    padding: 0.3rem 0.7rem;
    border-radius: var(--radius-md);
    background: #8C2D3A;
    color: var(--color-white);
    font-size: 0.95rem;
    font-weight: 700;
    line-height: 1.2;
}
.asso-grid > .asso-card:nth-child(6n+1) .event-date { background: #8C2D3A; }
.asso-grid > .asso-card:nth-child(6n+2) .event-date { background: #2F4858; }
.asso-grid > .asso-card:nth-child(6n+3) .event-date { background: #3E5C3A; }
.asso-grid > .asso-card:nth-child(6n+4) .event-date { background: #B45309; }
.asso-grid > .asso-card:nth-child(6n+5) .event-date { background: #6A2E5C; }
.asso-grid > .asso-card:nth-child(6n+6) .event-date { background: #B0492F; }

.asso-card ul {
    font-size: 1rem;
    line-height: 1.5;
}

.asso-contact {
    margin-top: var(--spacing-sm);
    font-style: italic;
}
.asso-contact a {
    display: block;
    margin-top: 0.15rem;
}

/* ---------- EVENTS FILES (photo/PDF) ---------- */
.event-photo {
    margin-top: var(--spacing-md);
}
.event-photo img {
    max-width: 100%;
    max-height: 400px;
    border-radius: var(--radius-md);
    object-fit: cover;
}
.event-pdf {
    margin-top: var(--spacing-md);
}
.btn-event-pdf {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    padding: 0.5rem 1rem;
    background: var(--color-primary);
    color: #fff;
    border-radius: var(--radius-md);
    text-decoration: none;
    font-size: var(--font-size-sm);
    font-weight: 600;
    transition: background 0.2s;
}
.btn-event-pdf:hover {
    background: var(--color-primary-dark, #111111);
}

/* ---------- GALERIE PHOTOS ---------- */
.galerie-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: var(--spacing-md);
    margin-top: var(--spacing-lg);
}

.galerie-item {
    position: relative;
    border-radius: var(--radius-md);
    overflow: hidden;
    aspect-ratio: 4/3;
    cursor: pointer;
}

.galerie-item img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s ease;
}

.galerie-item:hover img {
    transform: scale(1.05);
}

.galerie-item .galerie-caption {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    padding: var(--spacing-sm) var(--spacing-md);
    background: linear-gradient(transparent, rgba(0,0,0,0.7));
    color: #fff;
    font-size: var(--font-size-xs);
    font-weight: 500;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.galerie-item:hover .galerie-caption {
    opacity: 1;
}

/* Lightbox */
.lightbox {
    display: none;
    position: fixed;
    inset: 0;
    z-index: 9999;
    background: rgba(0,0,0,0.4);
    align-items: center;
    justify-content: center;
    flex-direction: column;
    padding: 2rem 1rem;
    overflow: hidden;
}

.lightbox.active {
    display: flex;
}

.lightbox-bg {
    position: absolute;
    inset: 0;
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    filter: blur(40px) brightness(0.55) saturate(1.3);
    transform: scale(1.15);
    z-index: 0;
    pointer-events: none;
}

.lightbox img {
    width: auto;
    height: auto;
    display: block;
    max-width: 90vw;
    max-height: 80vh;
    position: relative;
    z-index: 2;
    box-shadow: 0 8px 40px rgba(0,0,0,0.5);
    border-radius: 4px;
}

.lightbox-close {
    position: absolute;
    top: 1rem;
    right: 1.5rem;
    color: #fff;
    font-size: 2.5rem;
    cursor: pointer;
    background: none;
    border: none;
    line-height: 1;
    z-index: 3;
}

.lightbox-prev,
.lightbox-next {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    background: rgba(255,255,255,0.15);
    color: #fff;
    border: none;
    font-size: 2rem;
    width: 3rem;
    height: 3rem;
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background 0.2s;
    z-index: 3;
}
.lightbox-prev:hover,
.lightbox-next:hover {
    background: rgba(255,255,255,0.35);
}
.lightbox-prev { left: 1rem; }
.lightbox-next { right: 1rem; }
.lightbox-close:focus-visible,
.lightbox-prev:focus-visible,
.lightbox-next:focus-visible {
    outline: 2px solid #fff;
    outline-offset: 2px;
}

.lightbox-caption {
    color: #fff;
    font-size: var(--font-size-base);
    text-align: center;
    text-shadow: 0 1px 4px rgba(0,0,0,0.8);
    margin-top: 1rem;
    max-width: 90vw;
    position: relative;
    z-index: 2;
}

/* ---------- COMPTES-RENDUS ---------- */
.cr-filters {
    display: flex;
    flex-wrap: wrap;
    gap: var(--spacing-sm);
    margin-bottom: var(--spacing-lg);
}

.cr-filter-btn {
    padding: 0.4rem 1rem;
    border: 1px solid #ddd;
    border-radius: var(--radius-md);
    background: #fff;
    color: var(--color-text);
    font-size: var(--font-size-sm);
    cursor: pointer;
    transition: all var(--transition);
}

.cr-filter-btn.active,
.cr-filter-btn:hover {
    background: var(--color-primary);
    color: #fff;
    border-color: var(--color-primary);
}

.cr-list {
    display: flex;
    flex-direction: column;
    gap: var(--spacing-md);
}

/* Sections par mandat */
.cr-mandat-group {
    border: 2px solid #e2e8f0;
    border-radius: var(--radius-lg, 12px);
    overflow: hidden;
    background: #fff;
}

.cr-mandat-group + .cr-mandat-group {
    margin-top: var(--spacing-lg);
}

.cr-mandat-header {
    width: 100%;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: var(--spacing-md);
    padding: var(--spacing-lg);
    background: var(--color-primary, #1a5276);
    border: none;
    cursor: pointer;
    font-family: inherit;
    color: #fff;
    transition: background 0.2s;
}

.cr-mandat-header:hover {
    background: var(--color-primary-dark, #154360);
}

.cr-mandat-info {
    display: flex;
    flex-direction: column;
    gap: 4px;
    text-align: left;
}

.cr-mandat-title {
    font-size: 1.3rem;
    font-weight: 700;
}

.cr-mandat-subtitle {
    font-size: var(--font-size-sm);
    opacity: 0.85;
    font-style: italic;
}

.cr-mandat-meta {
    display: flex;
    align-items: center;
    gap: var(--spacing-sm);
}

.cr-mandat-meta .cr-year-count {
    color: rgba(255, 255, 255, 0.8);
}

.cr-mandat-arrow {
    font-size: 1.2rem;
    color: rgba(255, 255, 255, 0.8);
    transition: transform 0.3s;
}

.cr-mandat-open .cr-mandat-arrow {
    transform: rotate(180deg);
}

.cr-mandat-content {
    display: none;
    padding: var(--spacing-md);
}

.cr-mandat-open .cr-mandat-content {
    display: block;
}

/* Accordeon par annee */
.cr-year-group {
    border: 1px solid #e2e8f0;
    border-radius: var(--radius-md);
    overflow: hidden;
    background: #fff;
}

.cr-year-header {
    width: 100%;
    display: flex;
    align-items: center;
    gap: var(--spacing-md);
    padding: var(--spacing-md) var(--spacing-lg);
    background: #f8fafc;
    border: none;
    cursor: pointer;
    font-family: inherit;
    font-size: var(--font-size-base);
    transition: background 0.2s;
}

.cr-year-header:hover {
    background: #f1f5f9;
}

.cr-year-label {
    font-size: 1.25rem;
    font-weight: 700;
    color: var(--color-primary);
}

.cr-year-count {
    font-size: var(--font-size-sm);
    color: var(--color-text-light);
    flex: 1;
}

.cr-year-arrow {
    font-size: 1.1rem;
    color: var(--color-text-light);
    transition: transform 0.3s;
}

.cr-year-open .cr-year-arrow {
    transform: rotate(180deg);
}

.cr-year-content {
    display: none;
}

.cr-year-open .cr-year-content {
    display: block;
}

.cr-year-content .cr-item:first-child {
    border-top: 1px solid #e2e8f0;
}

.cr-item {
    display: flex;
    align-items: center;
    gap: var(--spacing-md);
    padding: var(--spacing-md) var(--spacing-lg);
    background: #fff;
    border-bottom: 1px solid #f1f5f9;
    text-decoration: none;
    color: var(--color-text);
    transition: background 0.2s;
}

.cr-item:last-child {
    border-bottom: none;
}

.cr-item:hover {
    background: #f8fafc;
}

.cr-icon {
    flex-shrink: 0;
    display: flex;
    align-items: center;
}

.cr-pdf-icon {
    width: 36px;
    height: 46px;
    filter: drop-shadow(0 2px 4px rgba(229,62,62,0.3));
    transition: transform 0.2s, filter 0.2s;
}

.cr-item:hover .cr-pdf-icon {
    transform: scale(1.1);
    filter: drop-shadow(0 3px 8px rgba(229,62,62,0.4));
}

.cr-info {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.cr-title {
    font-weight: 600;
    font-size: var(--font-size-base);
}

.cr-meta {
    font-size: var(--font-size-xs);
    color: var(--color-text-light);
}

.cr-download {
    font-size: var(--font-size-sm);
    font-weight: 600;
    color: var(--color-primary);
    white-space: nowrap;
}

.cr-loading {
    text-align: center;
    color: var(--color-text-light);
    padding: var(--spacing-xl);
}

/* ---------- CONSEIL MUNICIPAL ---------- */
.maire-card {
    display: flex;
    align-items: center;
    gap: var(--spacing-xl);
    padding: var(--spacing-xl);
    background: var(--color-white);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-md);
    margin-bottom: var(--spacing-2xl);
    border-left: 4px solid var(--color-accent);
}

.maire-avatar {
    flex-shrink: 0;
}
.maire-avatar img {
    width: 90px;
    height: 90px;
    border-radius: 50%;
    object-fit: cover;
    display: block;
    box-shadow: 0 2px 6px rgba(0,0,0,0.15);
}

.maire-info h3 {
    font-size: var(--font-size-xl);
    color: var(--color-text);
}

.maire-titre {
    font-size: var(--font-size-base);
    color: var(--color-primary);
    font-weight: 600;
}

.maire-detail {
    font-size: var(--font-size-sm);
    color: var(--color-text-light);
    margin-top: var(--spacing-xs);
}

.conseillers-titre {
    font-size: var(--font-size-xl);
    color: var(--color-text);
    margin-bottom: var(--spacing-lg);
}

.conseillers-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: var(--spacing-lg);
    margin-bottom: var(--spacing-lg);
}

.conseiller-card {
    padding: var(--spacing-md) var(--spacing-lg);
    background: var(--color-white);
    border-radius: var(--radius-md);
    box-shadow: var(--shadow-sm);
    display: flex;
    flex-direction: row;
    align-items: center;
    gap: var(--spacing-md);
}

.conseiller-card img {
    width: 90px;
    height: 90px;
    border-radius: 50%;
    object-fit: cover;
    flex-shrink: 0;
    box-shadow: 0 2px 6px rgba(0,0,0,0.15);
}

.conseiller-card-info {
    flex: 1;
    min-width: 0;
}

.conseiller-card h4 {
    font-size: var(--font-size-base);
    color: var(--color-text);
    margin-bottom: var(--spacing-xs);
}

.conseiller-card > p {
    font-size: var(--font-size-sm);
    color: var(--color-primary);
    font-weight: 600;
    margin-bottom: var(--spacing-sm);
}

.conseiller-lieu {
    font-size: var(--font-size-sm);
    color: var(--color-text-light);
    font-style: italic;
    font-weight: 400;
}

.conseiller-roles {
    font-size: var(--font-size-sm);
    color: var(--color-text-light);
}

.conseiller-roles li {
    padding: 2px 0;
    padding-left: var(--spacing-md);
    position: relative;
}

.conseiller-roles li::before {
    content: '';
    position: absolute;
    left: 0;
    top: 10px;
    width: 6px;
    height: 6px;
    background: var(--color-primary);
    border-radius: var(--radius-full);
    opacity: 0.4;
}

.conseil-note {
    font-size: var(--font-size-sm);
    color: var(--color-text-light);
    font-style: italic;
}

/* ---------- VIE PRATIQUE ---------- */

/* Horaires */
.horaires-block {
    margin-bottom: var(--spacing-2xl);
}

.horaires-block h3 {
    font-size: var(--font-size-xl);
    color: var(--color-text);
    margin-bottom: var(--spacing-lg);
}

.horaires-table {
    max-width: 600px;
    border-radius: var(--radius-md);
    overflow: hidden;
    box-shadow: var(--shadow-sm);
}

.horaires-table th,
.horaires-table td {
    padding: var(--spacing-sm) var(--spacing-md);
    text-align: left;
    border-bottom: 1px solid var(--color-border-light);
}

.horaires-table thead th {
    background: #8B6F5E;
    color: var(--color-white);
    font-weight: 600;
    font-size: var(--font-size-sm);
}

.horaires-table tbody tr:nth-child(even) {
    background: var(--color-bg-alt);
}

.horaire-note {
    font-size: var(--font-size-sm);
    color: var(--color-primary);
    font-style: italic;
    text-align: center;
    background: #f5f5f5;
}

.ferme {
    color: var(--color-text-light);
    font-style: italic;
}

/* Services */
.services-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: var(--spacing-lg);
    margin-bottom: var(--spacing-2xl);
}

.service-card {
    padding: var(--spacing-xl);
    background: var(--color-bg-alt);
    border-radius: var(--radius-lg);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.service-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 8px 24px rgba(0,0,0,0.1);
}

.service-icon {
    margin-bottom: var(--spacing-md);
}

.service-card h3 {
    font-size: var(--font-size-lg);
    color: var(--color-primary);
    margin-bottom: var(--spacing-sm);
}

.service-card p {
    font-size: var(--font-size-sm);
    color: var(--color-text-light);
    margin-bottom: var(--spacing-xs);
}

.service-link {
    font-size: 1rem;
    font-weight: 600;
}

/* Comptes-rendus */
.comptes-rendus h3 {
    font-size: var(--font-size-xl);
    color: var(--color-text);
    margin-bottom: var(--spacing-md);
}

.comptes-rendus p {
    margin-bottom: var(--spacing-md);
}

/* ---------- ACTUALITES ---------- */
.actus-grid {
    display: grid;
    gap: var(--spacing-lg);
}

.actu-card {
    display: flex;
    gap: var(--spacing-lg);
    padding: var(--spacing-xl);
    background: var(--color-white);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-sm);
    transition: box-shadow var(--transition);
}

.actu-card:hover {
    box-shadow: var(--shadow-md);
}

.actu-date {
    flex-shrink: 0;
    width: 60px;
    text-align: center;
    padding: var(--spacing-sm);
    background: #A89080;
    color: var(--color-white);
    border-radius: var(--radius-md);
    line-height: 1;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-self: flex-start;
}

.actu-jour {
    display: block;
    font-size: var(--font-size-xl);
    font-weight: 700;
}

.actu-mois {
    display: block;
    font-size: var(--font-size-sm);
    text-transform: uppercase;
    opacity: 0.9;
}

/* Rotation de couleurs des pastilles de date (actualites) - palette sobre/terreuse
   harmonisee avec le site mairie (bordeaux, bleu ardoise, vert sapin, ocre, prune, terracotta).
   Texte blanc, contraste AA (>= 4.5:1) verifie. */
.actus-grid > .actu-card:nth-child(6n+1) .actu-date { background: #8C2D3A; }
.actus-grid > .actu-card:nth-child(6n+2) .actu-date { background: #2F4858; }
.actus-grid > .actu-card:nth-child(6n+3) .actu-date { background: #3E5C3A; }
.actus-grid > .actu-card:nth-child(6n+4) .actu-date { background: #B45309; }
.actus-grid > .actu-card:nth-child(6n+5) .actu-date { background: #6A2E5C; }
.actus-grid > .actu-card:nth-child(6n+6) .actu-date { background: #B0492F; }

.actu-content h3 {
    font-size: var(--font-size-lg);
    color: var(--color-text);
    margin-bottom: var(--spacing-sm);
}

.actu-content p {
    font-size: var(--font-size-sm);
    color: var(--color-text-light);
}

.actus-loading, .actus-empty {
    text-align: center;
    padding: var(--spacing-2xl);
    color: var(--color-text-light);
    font-size: var(--font-size-lg);
}

/* ---------- CONTACT ---------- */
.contact-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: var(--spacing-2xl);
}

.contact-info h3 {
    font-size: var(--font-size-xl);
    color: var(--color-text);
    margin-bottom: var(--spacing-lg);
}

.coordonnees {
    font-style: normal;
}

.coord-item {
    display: flex;
    gap: var(--spacing-md);
    align-items: flex-start;
    margin-bottom: var(--spacing-lg);
}

.coord-item svg {
    flex-shrink: 0;
    color: var(--color-primary);
    margin-top: 2px;
}

.plan-acces {
    margin-top: var(--spacing-2xl);
}

.plan-acces h3 {
    font-size: var(--font-size-xl);
    color: var(--color-text);
    margin-bottom: var(--spacing-md);
}

.plan-acces p {
    color: var(--color-text-light);
    margin-bottom: var(--spacing-sm);
}

/* Formulaire */
.contact-form-wrapper h3 {
    font-size: var(--font-size-xl);
    color: var(--color-text);
    margin-bottom: var(--spacing-lg);
}

.contact-form {
    display: flex;
    flex-direction: column;
    gap: var(--spacing-lg);
}

/* Honeypot */
.hp-field {
    position: absolute;
    left: -9999px;
    opacity: 0;
    height: 0;
    overflow: hidden;
}

.form-group {
    display: flex;
    flex-direction: column;
    gap: var(--spacing-xs);
}

.form-group label {
    font-weight: 600;
    font-size: var(--font-size-sm);
    color: var(--color-text);
}

.required {
    color: var(--color-error);
}

.form-group input,
.form-group select,
.form-group textarea {
    padding: 0.625rem 0.875rem;
    border: 1px solid var(--color-border);
    border-radius: var(--radius-md);
    background: var(--color-white);
    font-size: var(--font-size-base);
    transition: border-color var(--transition), box-shadow var(--transition);
}

.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
    outline: none;
    border-color: var(--color-primary);
    box-shadow: 0 0 0 3px rgba(0, 0, 0, 0.15);
}

.form-group input.error,
.form-group select.error,
.form-group textarea.error {
    border-color: var(--color-error);
}

.form-error {
    font-size: var(--font-size-sm);
    color: var(--color-error);
    min-height: 0;
}

.form-counter {
    font-size: var(--font-size-sm);
    color: var(--color-text-light);
    text-align: right;
}

.form-group textarea {
    resize: vertical;
    min-height: 100px;
}

/* RGPD checkbox */
.checkbox-label {
    display: flex;
    gap: var(--spacing-sm);
    align-items: flex-start;
    cursor: pointer;
    font-size: var(--font-size-sm);
    font-weight: 400;
}

.checkbox-label input[type="checkbox"] {
    margin-top: 3px;
    flex-shrink: 0;
    width: 18px;
    height: 18px;
    accent-color: var(--color-primary);
}

.btn-submit {
    align-self: flex-start;
    background: linear-gradient(135deg, #8B6F5E, #A08070);
    color: var(--color-white);
    border: 2px solid #333333;
    padding: 0.75rem 2rem;
    transition: all 0.3s ease;
}

.btn-submit:hover {
    background: linear-gradient(135deg, #A89080, #B8A090);
    border-color: var(--color-primary-dark);
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(139,111,94,0.3);
}

.btn-submit:disabled {
    opacity: 0.6;
    cursor: not-allowed;
}

.form-status {
    font-size: var(--font-size-sm);
    padding: var(--spacing-sm) var(--spacing-md);
    border-radius: var(--radius-md);
}

.form-status.success {
    background: #f5f5f5;
    color: var(--color-success);
}

.form-status.error {
    background: #fef2f2;
    color: var(--color-error);
}

/* ---------- FOOTER ---------- */
.site-footer {
    background: linear-gradient(270deg, #152E4A, #5C1E2B, #143528, #1A3A3A, #3A1850, #152E4A);
    background-size: 600% 600%;
    animation: colorShift 45s ease infinite;
    color: rgba(255,255,255,0.9);
    padding-top: var(--spacing-2xl);
}

.footer-inner {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: var(--spacing-2xl);
    padding-bottom: var(--spacing-2xl);
}

.footer-col h4,
.footer-col .footer-title {
    color: var(--color-white);
    font-size: var(--font-size-base);
    margin-bottom: var(--spacing-md);
    font-weight: 700;
    margin-top: 0;
}

.footer-col p {
    font-size: var(--font-size-sm);
    line-height: 1.8;
}

.footer-col a {
    color: rgba(255,255,255,0.8);
}

.footer-col a:hover {
    color: var(--color-white);
}

.footer-links li {
    margin-bottom: var(--spacing-sm);
}

.footer-links a {
    font-size: var(--font-size-sm);
    display: inline-block;
    transition: transform 0.3s ease, color 0.3s ease;
    position: relative;
}
.footer-links a::after {
    content: '';
    position: absolute;
    bottom: -2px;
    left: 0;
    width: 0;
    height: 1px;
    background: #ffffff;
    transition: width 0.3s ease;
}
.footer-links a:hover {
    transform: translateX(4px);
}
.footer-links a:hover::after {
    width: 100%;
}

.footer-bottom {
    border-top: 1px solid rgba(255,255,255,0.1);
    padding: var(--spacing-lg) 0;
}

.footer-bottom p {
    font-size: var(--font-size-sm);
    text-align: center;
    opacity: 0.6;
}

/* ---------- MODAL ---------- */
.modal {
    position: fixed;
    inset: 0;
    z-index: 200;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: var(--spacing-lg);
}

.modal[hidden] {
    display: none;
}

.modal-overlay {
    position: absolute;
    inset: 0;
    background: rgba(0,0,0,0.6);
    backdrop-filter: blur(4px);
    animation: modalBackdropIn 0.3s ease;
}
@keyframes modalBackdropIn {
    from { opacity: 0; }
    to   { opacity: 1; }
}

.modal-content {
    position: relative;
    background: var(--color-white);
    border-radius: var(--radius-lg);
    padding: var(--spacing-2xl);
    max-width: 700px;
    width: 100%;
    max-height: 85vh;
    overflow-y: auto;
    box-shadow: var(--shadow-lg);
    animation: modalContentIn 0.3s ease;
}
@keyframes modalContentIn {
    from { opacity: 0; transform: scale(0.92) translateY(10px); }
    to   { opacity: 1; transform: scale(1) translateY(0); }
}

.modal-content h2 {
    font-size: var(--font-size-2xl);
    color: var(--color-primary);
    margin-bottom: var(--spacing-xl);
}

.modal-content h3 {
    font-size: var(--font-size-lg);
    color: var(--color-text);
    margin-top: var(--spacing-xl);
    margin-bottom: var(--spacing-sm);
}

.modal-content p {
    margin-bottom: var(--spacing-md);
    font-size: var(--font-size-sm);
    color: var(--color-text-light);
    line-height: 1.7;
}

.modal-close {
    position: absolute;
    top: var(--spacing-md);
    right: var(--spacing-md);
    width: 36px;
    height: 36px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--color-bg-alt);
    border: none;
    border-radius: var(--radius-full);
    font-size: 1.5rem;
    color: var(--color-text);
    cursor: pointer;
    transition: background var(--transition);
}

.modal-close:hover {
    background: var(--color-border);
}

/* ---------- AVIS PHOTOS ---------- */
.avis-photos {
    margin-top: 1.2rem;
    padding: 1rem 1.5rem;
    background: #f5f5f5;
    border: 1px solid #e0e0e0;
    border-radius: 8px;
    color: #555555;
    font-size: 1rem;
}
.avis-photos p {
    margin: 0;
}

/* ---------- GEOGRAPHIE ---------- */
.geographie {
    margin-top: 1.5rem;
    padding-top: 1.5rem;
    border-top: 1px solid #e2e8f0;
}
.geographie h3 {
    font-size: 1.1rem;
    color: #333333;
    margin-bottom: 0.8rem;
}
.geographie h4 {
    font-size: 1rem;
    color: #1a1a1a;
    margin-top: 1rem;
    margin-bottom: 0.5rem;
}
.geo-list {
    list-style: none;
    padding: 0;
    margin: 0;
}
.geo-list li {
    padding: 0.3rem 0;
    color: #334155;
    font-size: 1rem;
}
.geo-list li strong {
    color: #1a1a1a;
}

/* ---------- LIEUX-DITS ---------- */
.lieux-dits-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 1.5rem;
    margin-top: 2rem;
}
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}
.lieu-dit-card {
    background: #ffffff;
    border: 1px solid #e2e8f0;
    border-radius: 12px;
    overflow: hidden;
    opacity: 0;
    transform: translateY(40px) scale(0.95);
    transition: opacity 0.7s ease, transform 0.7s ease, box-shadow 0.3s ease, border-color 0.3s ease;
}
.lieu-dit-card.visible {
    opacity: 1;
    transform: translateY(0) scale(1);
}
.lieu-dit-card:hover {
    transform: translateY(-6px) scale(1.02);
    box-shadow: 0 12px 32px rgba(0,0,0,0.18);
    border-color: #999999;
}
.lieu-dit-photo {
    position: relative;
    width: 100%;
    height: 200px;
    overflow: hidden;
    background: #f1f5f9;
}
.lieu-dit-photo img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}
.lieu-dit-photo .photo-placeholder {
    display: none;
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, #f1f5f9 0%, #e2e8f0 100%);
    color: #64748b;
    font-size: 1rem;
    font-style: italic;
    justify-content: center;
    align-items: center;
}
.lieu-dit-photo.no-photo img {
    display: none;
}
.lieu-dit-photo.no-photo .photo-placeholder {
    display: flex;
}
.lieu-dit-photo-placeholder {
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, #e8e0d8, #d4c8bc);
}
.placeholder-text {
    font-size: 1rem;
    color: #8B6F5E;
    font-weight: 600;
    font-style: italic;
}
.lieu-dit-card h3 {
    padding: 1rem 1.2rem 0.3rem;
    font-size: 1.15rem;
    color: #1a1a1a;
}
.lieu-dit-card p {
    padding: 0 1.2rem 1.2rem;
    font-size: 1rem;
    color: #334155;
    line-height: 1.5;
}

/* ---------- SCROLL REVEAL ---------- */
.reveal {
    opacity: 0;
    transform: translateY(30px);
    transition: opacity 0.7s ease, transform 0.7s ease;
}
.reveal.visible {
    opacity: 1;
    transform: translateY(0);
}

/* ---------- RESPONSIVE ---------- */

/* Tablette */
@media (max-width: 1024px) {
    #admin-icon { display: none !important; }
    .commune-grid {
        grid-template-columns: 1fr;
    }

    .commune-image {
        order: -1;
    }

    .asso-grid {
        grid-template-columns: 1fr;
    }

    .galerie-grid {
        grid-template-columns: repeat(3, 1fr);
    }

    .conseillers-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    .contact-grid {
        grid-template-columns: 1fr;
    }

    .infos-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

/* Mobile */
@media (max-width: 768px) {
    :root {
        --header-height: 64px;
    }

    /* Menu burger visible */
    .menu-toggle {
        display: flex;
    }

    .nav-principal {
        position: fixed;
        top: calc(var(--header-height) + var(--clock-bar-height) + var(--dev-banner-height));
        right: 0;
        width: 280px;
        max-height: 55vh;
        background-color: #ffffff !important;
        background-image: none !important;
        padding: var(--spacing-md) 0;
        transform: translateX(100%);
        transition: transform 0.3s ease;
        overflow-y: auto;
        z-index: 9999;
        box-shadow: -4px 4px 24px rgba(0,0,0,0.3);
        border-bottom-left-radius: 12px;
    }

    .nav-principal.open {
        transform: translateX(0);
    }

    .nav-list {
        flex-direction: column;
        gap: var(--spacing-xs);
    }

    .nav-link {
        font-size: 1.25rem;
        padding: 0.9rem var(--spacing-md);
        color: #1a1a1a !important;
        text-shadow: none !important;
        border-bottom: 1px solid #e2e8f0;
    }
    .nav-link:hover {
        background: rgba(0,0,0,0.05);
        color: #1a1a1a !important;
    }
    .nav-link.active {
        border-bottom-color: #1a365d;
        color: #1a365d !important;
    }

    /* Dropdowns mobile */
    .dropdown-menu {
        position: static;
        background: #f1f5f9;
        border: none;
        border-radius: 0;
        box-shadow: none;
        min-width: 0;
        padding: 0 0 0 var(--spacing-md);
        opacity: 1;
        visibility: visible;
        transform: none;
        pointer-events: auto;
        display: none;
    }
    .nav-dropdown.open .dropdown-menu {
        display: block;
    }
    .dropdown-menu a {
        color: var(--color-text);
        padding: var(--spacing-sm) var(--spacing-md);
        font-size: var(--font-size-base);
    }
    .dropdown-menu a:hover,
    .dropdown-menu a.active {
        background: rgba(0,0,0,0.1);
        color: #333333;
    }

    /* Barre horloge mobile */
    .live-clock-bar {
        font-size: 1rem;
        padding: 0 var(--spacing-sm);
    }

    /* Hero */
    .hero {
        min-height: 400px;
    }

    .hero h1 {
        font-size: var(--font-size-2xl);
    }

    .hero-actions {
        flex-direction: column;
        align-items: center;
    }

    /* Infos */
    .infos-grid {
        grid-template-columns: 1fr;
    }

    .infos-rapides {
        margin-top: 0;
    }

    .info-card {
        box-shadow: var(--shadow-sm);
    }

    /* Chiffres */
    .chiffres-cles {
        flex-wrap: wrap;
        justify-content: center;
    }

    /* Services */
    .services-grid {
        grid-template-columns: 1fr;
    }

    /* Conseillers */
    .conseillers-grid {
        grid-template-columns: 1fr;
    }

    /* Footer */
    .footer-inner {
        grid-template-columns: 1fr;
        gap: var(--spacing-xl);
    }

    /* Sections */
    .section {
        padding: var(--spacing-2xl) 0;
    }

    .section-title {
        font-size: var(--font-size-xl);
    }

    /* Actu */
    .actu-card {
        flex-direction: column;
    }

    .actu-date {
        width: auto;
        flex-direction: row;
        gap: var(--spacing-sm);
        align-self: flex-start;
        padding: var(--spacing-sm) var(--spacing-md);
    }
}

/* Petit mobile */
@media (max-width: 480px) {
    .container {
        padding: 0 var(--spacing-md);
    }

    .hero {
        min-height: 350px;
    }

    .maire-card {
        flex-direction: column;
        text-align: center;
    }

    .galerie-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

/* ---------- PRINT ---------- */
@media print {
    .site-header,
    .hero-actions,
    .menu-toggle,
    .contact-form-wrapper,
    .modal,
    .skip-link {
        display: none;
    }

    .hero {
        background: none;
        color: var(--color-text);
        min-height: auto;
        margin-top: 0;
        padding: var(--spacing-lg) 0;
    }

    .hero h1 {
        color: var(--color-primary);
    }

    .section {
        padding: var(--spacing-lg) 0;
        break-inside: avoid;
    }

    body {
        font-size: 12pt;
    }

    a::after {
        content: ' (' attr(href) ')';
        font-size: 0.8em;
        color: var(--color-text-light);
    }

    .nav-link::after,
    .logo::after,
    .info-link::after,
    .footer-links a::after {
        content: none;
    }
}

/* ---------- MOTION PREFERENCES ---------- */
@media (prefers-reduced-motion: reduce) {
    *,
    *::before,
    *::after {
        animation-duration: 0.01ms !important;
        transition-duration: 0.01ms !important;
    }

    html {
        scroll-behavior: auto;
    }

    .reveal {
        opacity: 1;
        transform: none;
    }
    .section-title::after {
        width: 60px;
    }
}

/* ---------- RGAA ACCESSIBILITE ---------- */
/* Cibles tactiles min 44x44px (WCAG 2.5.5 AAA / 2.5.8 AA) */
@media (max-width: 768px) {
    a, button, [role="button"], input[type="submit"],
    .nav-link, .dropdown-menu a, .info-link, .footer-links a,
    .cr-filter-btn, .btn, .btn-event-pdf {
        min-height: 44px;
        min-width: 44px;
        display: inline-flex;
        align-items: center;
    }
}

/* Focus visible obligatoire (RGAA 12.7) */
*:focus-visible {
    outline: 3px solid #2563eb;
    outline-offset: 2px;
    border-radius: 2px;
}

/* Contraste selection texte */
::selection {
    background: #2563eb;
    color: #ffffff;
}

/* ==========================================================================
   Notifications push
   ========================================================================== */

.push-notification-section {
    padding: 1.5rem 0;
}

.btn-push-subscribe,
.btn-push-unsubscribe {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.4rem;
    padding: 0.65rem 1.4rem;
    border-radius: 8px;
    font-size: 1rem;
    font-weight: 500;
    cursor: pointer;
    transition: background 0.2s, border-color 0.2s, color 0.2s;
}

.btn-push-subscribe {
    background: #ffffff;
    color: #374151;
    border: 1.5px solid #d1d5db;
}

.btn-push-subscribe:hover,
.btn-push-subscribe:focus-visible {
    background: #f3f4f6;
    border-color: #9ca3af;
    color: #1f2937;
}

.btn-push-unsubscribe {
    background: #f0fdf4;
    color: #166534;
    border: 1.5px solid #86efac;
    font-size: 0.95rem;
}

.btn-push-unsubscribe:hover,
.btn-push-unsubscribe:focus-visible {
    background: #dcfce7;
    border-color: #4ade80;
}

/* =========================================================================
   Annuaire commerces — vignette LOGO de marque (champ `logo`, distinct de la
   galerie). Les autres classes .cga-* sont inline dans commerces.html ; cette
   classe est ici car ajoutee apres coup (cf. evolution logo des commerces).
   Affichage : petit logo (hauteur ~92px) a la place de la pastille icone.
   ========================================================================= */
.cga-logo {
    height: 92px;
    max-width: 150px;
    width: auto;
    object-fit: contain;
    background: #fff;
    border: 1px solid #e7ddd0;
    border-radius: 12px;
    padding: 6px 10px;
    flex-shrink: 0;
    display: block;
}
@media (max-width: 600px) {
    .cga-logo {
        height: 78px;
        max-width: 130px;
    }
}
