@import url('https://fonts.googleapis.com/css2?family=Outfit:wght@300;400;600;800&family=Playfair+Display:wght@600;700&display=swap');

:root {
    --primary: #0A3A64; /* Bleu institutionnel */
    --accent: #E2211C; /* Rouge république */
    --light: #F4F7FA;
    --dark: #121F2B;
    --text: #333333;
    --white: #FFFFFF;
    --shadow-soft: 0 10px 40px rgba(0, 0, 0, 0.05);
    --shadow-premium: 0 20px 50px rgba(10, 58, 100, 0.12);
    --safe-area: 1200px;
}

/* Accessibility Focus */
:focus-visible {
    outline: 3px solid var(--accent);
    outline-offset: 4px;
    border-radius: 4px;
}

* {
    box-sizing: border-box;
}

html, body {
    margin: 0;
    padding: 0;
    overflow-x: hidden;
    width: 100%;
    scroll-behavior: smooth;
    font-family: 'Outfit', sans-serif;
    background-color: var(--light);
    color: var(--text);
}

.close-alert { background: none; border: none; color: #fff; font-size: 1.5rem; cursor: pointer; }

@keyframes slideDown {
    from { margin-top: -50px; opacity: 0; }
    to { margin-top: 0; opacity: 1; }
}

/* Header */
header {
    position: fixed;
    top: 0;
    width: 100%;
    padding: 15px 50px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: rgba(255, 255, 255, 0.85);
    backdrop-filter: blur(15px);
    -webkit-backdrop-filter: blur(15px);
    z-index: 1000;
    box-shadow: 0 4px 30px rgba(0, 0, 0, 0.05);
    transition: all 0.3s ease;
}

/* Hamburger Sophistiqué */
.menu-toggle {
    display: none;
    width: 48px;
    height: 48px;
    background: var(--primary);
    border: none;
    border-radius: 12px;
    cursor: pointer;
    padding: 10px;
    z-index: 2000;
    box-shadow: 0 4px 15px rgba(0,0,0,0.1);
}

.hamb-box {
    width: 100%;
    height: 100%;
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
}

.hamb-inner {
    width: 100%;
    height: 2px;
    background-color: var(--white);
    border-radius: 2px;
    transition: transform 0.2s cubic-bezier(0.55, 0.055, 0.675, 0.19);
}

.hamb-inner::before, .hamb-inner::after {
    content: "";
    display: block;
    width: 100%;
    height: 2px;
    background-color: var(--white);
    position: absolute;
    border-radius: 2px;
    transition: transform 0.2s ease;
}

.hamb-inner::before { top: 8px; }
.hamb-inner::after { bottom: 8px; }

.menu-toggle.active .hamb-inner {
    transform: rotate(45deg);
}

.menu-toggle.active .hamb-inner::before {
    top: 0;
    opacity: 0;
}

.menu-toggle.active .hamb-inner::after {
    bottom: 0;
    transform: rotate(-90deg);
}

.logo {
    display: flex;
    align-items: center;
    gap: 15px;
    z-index: 1100;
}

.blason-wrapper {
    width: 45px;
    height: 45px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: white;
    padding: 5px;
    border-radius: 12px;
    box-shadow: 0 4px 10px rgba(0,0,0,0.08);
}

.dyn-blason {
    max-height: 100%;
    max-width: 100%;
    object-fit: contain;
}

.logo-text {
    display: flex;
    flex-direction: column;
}

.logo-prefix {
    font-size: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 2px;
    color: var(--accent);
    font-weight: 800;
    line-height: 1;
    margin-bottom: 2px;
}

.logo h1 {
    font-family: 'Playfair Display', serif;
    font-size: 1.3rem;
    color: var(--primary);
    line-height: 1;
    margin: 0;
}

nav ul {
    list-style: none;
    display: flex;
    gap: 30px;
}

nav a {
    text-decoration: none;
    color: var(--primary);
    font-weight: 600;
    font-size: 1rem;
    position: relative;
    transition: color 0.3s;
}

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

nav a:hover::after {
    width: 100%;
}
nav a:hover {
    color: var(--accent);
}

/* Hero Section */
.hero-full {
    min-height: 80vh;
    padding: 100px 0;
    width: 100%;
    position: relative;
    overflow: hidden;
    display: flex;
    align-items: center;
    justify-content: center;
    background: #000;
}

.hero-carousel {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 1;
}

.hero-slide {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-size: cover;
    background-position: center;
    opacity: 0;
    transition: opacity 1.5s ease-in-out;
    transform: scale(1.1);
    will-change: transform, opacity;
}

.hero-slide.active {
    opacity: 0.7;
    animation: kenBurns 15s linear infinite alternate;
}

@keyframes kenBurns {
    from { transform: scale(1); }
    to { transform: scale(1.15); }
}

.hero-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(to bottom, rgba(0,0,0,0.3), rgba(0,0,0,0.5), rgba(10, 58, 100, 0.4));
    z-index: 2;
}

.hero-glass-card {
    position: relative;
    z-index: 10;
    width: 90%;
    max-width: 650px;
    background: rgba(255, 255, 255, 0.08);
    backdrop-filter: blur(25px);
    -webkit-backdrop-filter: blur(25px);
    border: 1px solid rgba(255, 255, 255, 0.15);
    border-radius: 40px;
    padding: 60px 40px;
    text-align: center;
    color: var(--white);
    box-shadow: 0 25px 50px rgba(0,0,0,0.3);
    animation: cardEntrance 1.2s cubic-bezier(0.23, 1, 0.32, 1);
}

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

.hero-subtitle {
    text-transform: uppercase;
    letter-spacing: 4px;
    font-size: 0.9rem;
    font-weight: 600;
    opacity: 0.8;
    margin-bottom: 20px;
    display: block;
}

.hero-glass-card h2 {
    font-family: 'Playfair Display', serif;
    font-size: 4rem;
    margin-bottom: 30px;
    line-height: 1;
}

.btn-primary-modern {
    display: inline-flex;
    align-items: center;
    gap: 15px;
    background: var(--white);
    color: var(--primary);
    padding: 18px 40px;
    border-radius: 50px;
    text-decoration: none;
    font-weight: 700;
    transition: all 0.3s;
    box-shadow: 0 10px 20px rgba(0,0,0,0.1);
}

.btn-primary-modern:hover {
    transform: translateY(-5px);
    background: var(--accent);
    color: var(--white);
    box-shadow: 0 15px 30px rgba(226, 33, 28, 0.4);
}

/* Sections */
section {
    padding: 100px 50px;
    max-width: 1400px;
    margin: 0 auto;
}

.section-title {
    font-family: 'Playfair Display', serif;
    font-size: 2.8rem;
    color: var(--primary);
    margin-bottom: 50px;
    text-align: center;
}

.section-title::after {
    content: '';
    display: block;
    width: 80px;
    height: 4px;
    background-color: var(--accent);
    margin: 15px auto 0;
    border-radius: 2px;
}

/* INFOS PRATIQUES */
.practical-info {
    background: var(--white);
    padding: 80px 20px;
    margin-top: -60px;
    position: relative;
    z-index: 30;
    border-radius: 60px 60px 0 0;
    box-shadow: 0 -20px 40px rgba(0,0,0,0.05);
}

.info-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 40px;
    max-width: 1100px;
    margin: 0 auto;
}

.info-card {
    text-align: center;
    padding: 40px;
    background: var(--light);
    border-radius: 30px;
    transition: transform 0.3s ease;
    display: flex;
    flex-direction: column;
    align-items: center;
}

.info-card:hover { transform: translateY(-5px); }

/* SVG Global Colors */
svg {
    transition: all 0.3s ease;
}

.icon-circle {
    width: 72px;
    height: 72px;
    background: var(--light);
    border-radius: 20px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 25px;
    transition: all 0.3s ease;
    color: var(--accent) !important; /* Force RED */
}

.icon-circle svg {
    color: inherit;
    stroke: currentColor;
}/* BENTO SERVICES UNIFIED */
.services-bento-wrapper {
    background: var(--white);
    padding: 100px 50px;
    border-radius: 80px;
    margin: 40px auto;
    position: relative;
    overflow: hidden;
}

.services-bento-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    grid-auto-rows: minmax(180px, auto);
    gap: 25px;
    max-width: 1300px;
    margin: 40px auto 0;
}

.bento-card {
    background: var(--light);
    padding: 35px;
    border-radius: 40px;
    display: flex;
    flex-direction: column;
    justify-content: center;
    position: relative;
    transition: all 0.5s cubic-bezier(0.23, 1, 0.32, 1);
    border: 1px solid rgba(0,0,0,0.02);
    box-shadow: var(--shadow-soft);
    text-decoration: none;
    overflow: hidden;
}

.bento-card:hover {
    transform: translateY(-8px) scale(1.02);
    box-shadow: var(--shadow-premium);
    background: var(--white);
}

.bento-card.wide { grid-column: span 2; }
.bento-card.tall { grid-row: span 2; }
.bento-card.featured {
    grid-column: span 2;
    grid-row: span 2;
    background: linear-gradient(135deg, var(--white) 0%, #E8F0F8 100%);
}

.bento-card .icon-circle {
    width: 60px;
    height: 60px;
    background: var(--white);
    border-radius: 18px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 25px;
    color: var(--accent) !important;
    box-shadow: 0 8px 15px rgba(0,0,0,0.05);
}

.bento-card h3, .bento-card h4 {
    color: var(--primary);
    font-size: 1.25rem;
    margin-bottom: 12px;
    font-weight: 700;
}

.bento-card p {
    color: var(--text);
    opacity: 0.7;
    font-size: 0.95rem;
    line-height: 1.5;
    margin: 0;
}

.bento-card .btn-mini {
    margin-top: 20px;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    color: var(--accent);
    font-weight: 700;
    font-size: 0.9rem;
    text-decoration: none;
}

.bento-card.featured h3 { font-size: 1.8rem; }
.bento-card.featured .icon-circle { width: 80px; height: 80px; }

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

@media (max-width: 600px) {
    .services-bento-grid { grid-template-columns: 1fr; }
    .bento-card.wide, .bento-card.tall, .bento-card.featured { grid-column: span 1; grid-row: span 1; }
    .services-bento-wrapper { padding: 60px 20px; border-radius: 40px; }
}

/* REDESIGN DÉMARCHES EN 1 CLIC */
.quick-actions-section {
    background: var(--light);
    border-radius: 60px;
    padding: 100px 50px;
    margin: 40px auto;
}

.quick-actions-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
    gap: 30px;
    margin-top: 50px;
}

.quick-action-card {
    background: var(--white);
    padding: 50px 30px;
    border-radius: 35px;
    text-decoration: none;
    text-align: center;
    transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    border: 1px solid rgba(0,0,0,0.03);
    display: flex;
    flex-direction: column;
    align-items: center;
    box-shadow: var(--shadow-soft);
}

.quick-action-card:hover {
    transform: translateY(-15px);
    box-shadow: var(--shadow-premium);
    background: var(--primary);
}

.quick-action-card:hover .icon-circle {
    background: rgba(255,255,255,0.15);
    color: var(--white) !important;
    transform: scale(1.1);
}

.quick-action-card h3 {
    color: var(--primary);
    font-size: 1.4rem;
    margin-bottom: 15px;
    font-weight: 700;
    transition: color 0.3s;
}

.quick-action-card:hover h3 { color: var(--white); }

.quick-action-card p {
    color: var(--text);
    font-size: 0.95rem;
    opacity: 0.6;
    margin: 0;
    transition: color 0.3s;
}

.quick-action-card:hover p { color: var(--white); opacity: 0.8; }

/* VIE QUOTIDIENNE */
.service-box {
    background: var(--white);
    padding: 50px 40px;
    border-radius: 40px;
    text-align: center;
    transition: all 0.3s;
    box-shadow: var(--shadow-soft);
    display: flex;
    flex-direction: column;
    align-items: center;
}

.service-box:hover { transform: translateY(-10px); box-shadow: var(--shadow-premium); }

.service-box svg { color: var(--accent); margin-bottom: 25px; stroke: currentColor; }

.link-btn {
    display: inline-block;
    padding: 12px 30px;
    border: 2px solid var(--primary);
    color: var(--primary);
    border-radius: 50px;
    text-decoration: none;
    font-weight: 700;
    transition: all 0.3s;
}

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

/* SERVICES DE PROXIMITÉ (Bento Layout) */
.service-item-card {
    background: var(--white);
    padding: 30px;
    border-radius: 30px;
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    transition: all 0.3s ease;
    box-shadow: var(--shadow-soft);
}

.service-item-card:hover { transform: translateY(-5px); box-shadow: var(--shadow-premium); }

.service-icon-box {
    width: 64px;
    height: 64px;
    background: var(--light);
    border-radius: 18px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 20px;
    color: var(--accent); /* RED */
}

.service-icon-box svg {
    color: inherit;
    stroke: currentColor;
}

.service-item-card h4 { font-size: 1rem; color: var(--primary); font-weight: 700; }

/* TRANSPARENCE */
.dark-section {
    background: var(--primary);
    color: var(--white);
    padding: 100px 50px;
    border-radius: 60px;
}

.doc-item {
    display: flex;
    align-items: center;
    gap: 20px;
    background: rgba(255,255,255,0.08);
    padding: 25px;
    border-radius: 20px;
    text-decoration: none;
    color: white;
    transition: all 0.3s;
}

.doc-item:hover { background: rgba(255,255,255,0.15); transform: translateX(10px); }

/* MOT DU MAIRE */
.maire-card {
    background: var(--white);
    padding: 60px;
    border-radius: 50px;
    box-shadow: var(--shadow-soft);
    text-align: center;
}

/* FOOTER */
footer {
    background-color: var(--primary);
    color: var(--white);
    padding: 80px 50px;
    text-align: center;
    border-radius: 60px 60px 0 0;
}

/* Banner Prospection */
.prospect-banner {
    position: fixed;
    bottom: 20px;
    left: 50%;
    transform: translateX(-50%);
    width: calc(100% - 40px);
    max-width: 900px;
    background-color: var(--accent);
    color: var(--white);
    padding: 15px 30px;
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 25px;
    z-index: 2000;
    border-radius: 100px;
    box-shadow: 0 15px 40px rgba(226, 33, 28, 0.4);
}

/* COOKIE BANNER */
.cookie-banner {
    position: fixed;
    bottom: 25px;
    right: 25px;
    width: 350px;
    background: white;
    padding: 25px;
    border-radius: 24px;
    box-shadow: var(--shadow-premium);
    z-index: 3000;
    animation: slideUp 0.5s ease;
}

.cookie-content h4 { margin: 0 0 10px 0; color: var(--primary); }
.cookie-content p { font-size: 0.85rem; opacity: 0.8; margin-bottom: 20px; }
.cookie-actions { display: flex; gap: 10px; }

.btn-mini-alt {
    background: var(--light);
    color: var(--primary);
    border: none;
    padding: 10px 15px;
    border-radius: 10px;
    cursor: pointer;
    font-weight: 600;
}

/* MODAL SYSTEM */
.modal-root {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0,0,0,0.6);
    backdrop-filter: blur(8px);
    z-index: 4000;
    display: flex;
    align-items: center;
    justify-content: center;
}

.modal-card {
    background: white;
    width: 90%;
    max-width: 800px;
    max-height: 80vh;
    padding: 50px;
    border-radius: 40px;
    position: relative;
    overflow-y: auto;
}

.modal-close {
    position: absolute;
    top: 20px;
    right: 20px;
    font-size: 2rem;
    background: none;
    border: none;
    cursor: pointer;
}

/* REPORT FORM */
.report-form {
    max-width: 800px;
    margin: 0 auto;
}

.report-form .form-grid {
    display: grid;
    gap: 20px;
}

.report-form select, .report-form input, .report-form textarea {
    width: 100%;
    padding: 15px 25px;
    border-radius: 15px;
    border: 1px solid rgba(255,255,255,0.2);
    background: rgba(255,255,255,0.05);
    color: white;
    font-family: inherit;
    font-size: 1rem;
}

.report-form textarea { height: 120px; resize: none; }
.report-form select option { background: var(--primary); }

/* VIGILANCE BANNER */
.vigilance-banner {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 50px;
    z-index: 5000;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-weight: 600;
    font-size: 0.9rem;
    box-shadow: 0 2px 10px rgba(0,0,0,0.2);
}

.vigilance-content {
    display: flex;
    align-items: center;
    gap: 15px;
}

.vigilance-banner a {
    color: white;
    text-decoration: underline;
    margin-left: 10px;
}

/* RESPONSIVE */
@media (max-width: 768px) {
    header { padding: 10px 20px; }
    .menu-toggle { display: flex; }
    #main-nav { display: none; }
    .hero-glass-card h2 { font-size: 2.5rem; }
    .section-title { font-size: 2rem; }
    section { padding: 60px 20px !important; }
    .cookie-banner { width: calc(100% - 40px); left: 20px; bottom: 20px; }
}
