/* ============================================
   Mieux vivre à Eaubonne - Design System
   ============================================ */

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

html {
    scroll-behavior: smooth;
}

body {
    font-family: system-ui, -apple-system, sans-serif;
    color: #333;
    line-height: 1.6;
    background: #fff;
}

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

a {
    color: #1a5276;
    text-decoration: none;
}

a:hover {
    color: #27ae60;
}

ul, ol {
    list-style: none;
}

/* --- Layout --- */
.container {
    width: 100%;
    max-width: 1100px;
    margin: 0 auto;
    padding: 0 1rem;
}

/* --- Header --- */
.site-header {
    background: #fff;
    border-bottom: 2px solid #1a5276;
    position: sticky;
    top: 0;
    z-index: 100;
}

.header-inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0.5rem 1rem;
    max-width: 1100px;
    margin: 0 auto;
}

.header-brand {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    text-decoration: none;
    color: #1a5276;
    flex-shrink: 0;
}

.header-brand img {
    height: 70px;
    width: auto;
}

.header-brand-text {
    display: flex;
    flex-direction: column;
}

.header-brand-title {
    font-size: 1.1rem;
    font-weight: 700;
    color: #1a5276;
    line-height: 1.2;
}

.header-brand-slogan {
    font-size: 0.75rem;
    color: #555;
    line-height: 1.2;
}

.main-nav {
    display: flex;
    gap: 1.5rem;
}

.main-nav a {
    font-size: 0.9rem;
    font-weight: 500;
    color: #1a5276;
    padding: 0.25rem 0;
    border-bottom: 2px solid transparent;
    transition: border-color 0.2s, color 0.2s;
    white-space: nowrap;
}

.main-nav a:hover,
.main-nav a.active {
    color: #27ae60;
    border-bottom-color: #27ae60;
}

/* Hamburger */
.hamburger {
    display: none;
    background: none;
    border: none;
    cursor: pointer;
    padding: 0.5rem;
    flex-direction: column;
    gap: 5px;
}

.hamburger span {
    display: block;
    width: 24px;
    height: 2px;
    background: #1a5276;
    transition: transform 0.3s, opacity 0.3s;
}

.hamburger.open span:nth-child(1) {
    transform: rotate(45deg) translate(5px, 5px);
}

.hamburger.open span:nth-child(2) {
    opacity: 0;
}

.hamburger.open span:nth-child(3) {
    transform: rotate(-45deg) translate(5px, -5px);
}

/* --- Hero --- */
.hero {
    position: relative;
    background-size: cover;
    background-position: center;
    color: #fff;
    min-height: 70vh;
    display: flex;
    align-items: center;
    justify-content: center;
}

.hero::before {
    content: "";
    position: absolute;
    inset: 0;
    background: rgba(26, 82, 118, 0.65);
}

.hero-inner {
    position: relative;
    z-index: 1;
    display: flex;
    align-items: center;
    gap: 2rem;
    max-width: 1000px;
    padding: 2rem 1rem;
}

.hero-photo {
    flex-shrink: 0;
    background: #1a5276;
    border-radius: 12px;
    padding: 0 1rem 0;
}

.hero-photo img {
    width: 300px;
    height: auto;
    display: block;
}

.hero-content {
    text-align: center;
    max-width: 700px;
}

.hero h1 {
    font-size: 2.5rem;
    margin-bottom: 0.5rem;
}

.hero .subtitle {
    font-size: 1.3rem;
    margin-bottom: 1.5rem;
    font-weight: 300;
}

.hero .contact-line {
    font-size: 1rem;
    margin-bottom: 1rem;
    opacity: 0.9;
}

.hero .slogan {
    font-size: 1.4rem;
    font-weight: 600;
    margin-bottom: 1.5rem;
}

.hero .election-date {
    background: #27ae60;
    display: inline-block;
    padding: 0.75rem 1.5rem;
    border-radius: 6px;
    font-size: 1.1rem;
    font-weight: 600;
    margin-bottom: 1rem;
}

.hero .election-date small {
    display: block;
    font-weight: 400;
    font-size: 0.85rem;
}

/* --- Page Hero (smaller, for inner pages) --- */
.page-hero {
    background: #1a5276;
    color: #fff;
    padding: 3rem 1rem;
    text-align: center;
}

.page-hero h1 {
    font-size: 2rem;
    margin-bottom: 0.5rem;
}

.page-hero .subtitle {
    font-size: 1.1rem;
    font-weight: 300;
    opacity: 0.9;
}

/* Page hero with background image */
.page-hero-img {
    position: relative;
    background-size: cover;
    background-position: center;
    min-height: 300px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.page-hero-img::before {
    content: "";
    position: absolute;
    inset: 0;
    background: rgba(26, 82, 118, 0.6);
}

.page-hero-img .page-hero-content {
    position: relative;
    z-index: 1;
}

/* --- Section --- */
.section {
    padding: 3rem 0;
}

.section--grey {
    background: #f5f5f5;
}

.section-title {
    font-size: 1.6rem;
    color: #1a5276;
    margin-bottom: 1.5rem;
}

/* --- Cards Grid (projets) --- */
.cards-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 1.5rem;
}

.card {
    background: #fff;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
    transition: transform 0.2s, box-shadow 0.2s;
    display: flex;
    flex-direction: column;
}

.card:hover {
    transform: translateY(-4px);
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.15);
}

.card-img {
    height: 180px;
    background-size: cover;
    background-position: center;
    background-color: #1a5276;
}

.card-body {
    padding: 1.25rem;
    flex: 1;
    display: flex;
    flex-direction: column;
}

.card-body h3 {
    font-size: 1.1rem;
    color: #1a5276;
    margin-bottom: 0.5rem;
}

.card-body p {
    font-size: 0.9rem;
    color: #555;
    flex: 1;
    margin-bottom: 1rem;
}

.card-body .btn {
    align-self: flex-start;
}

/* --- Buttons --- */
.btn {
    display: inline-block;
    padding: 0.5rem 1.25rem;
    border-radius: 4px;
    font-size: 0.9rem;
    font-weight: 600;
    text-decoration: none;
    transition: background 0.2s, color 0.2s;
}

.btn-primary {
    background: #27ae60;
    color: #fff;
}

.btn-primary:hover {
    background: #219a52;
    color: #fff;
}

.btn-outline {
    border: 2px solid #1a5276;
    color: #1a5276;
}

.btn-outline:hover {
    background: #1a5276;
    color: #fff;
}

/* --- Content (prose text) --- */
.content {
    max-width: 800px;
    margin: 0 auto;
}

.content p {
    margin-bottom: 1rem;
}

.content h2 {
    font-size: 1.4rem;
    color: #1a5276;
    margin: 2rem 0 1rem;
}

.content h3 {
    font-size: 1.15rem;
    color: #1a5276;
    margin: 1.5rem 0 0.75rem;
}

.content ul {
    margin-bottom: 1rem;
    padding-left: 0;
}

.content ul li {
    padding: 0.35rem 0 0.35rem 1.5rem;
    position: relative;
}

.content ul li::before {
    content: "→";
    position: absolute;
    left: 0;
    color: #27ae60;
    font-weight: bold;
}

.content ul.bullet li::before {
    content: "•";
}

.content strong {
    color: #1a5276;
}

.content .highlight {
    background: #f5f5f5;
    border-left: 4px solid #27ae60;
    padding: 1rem 1.25rem;
    margin: 1.5rem 0;
    border-radius: 0 4px 4px 0;
}

.content .highlight p:last-child {
    margin-bottom: 0;
}

.content-img {
    margin: 2rem 0;
    border-radius: 8px;
    overflow: hidden;
}

.content-img img {
    width: 100%;
}

/* --- Project detail nav (prev/next) --- */
.project-nav {
    display: flex;
    justify-content: space-between;
    margin-top: 3rem;
    padding-top: 1.5rem;
    border-top: 1px solid #ddd;
}

.project-nav a {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    font-weight: 600;
    color: #1a5276;
}

.project-nav a:hover {
    color: #27ae60;
}

/* Back link */
.back-link {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    color: #1a5276;
    font-weight: 500;
    margin-bottom: 1rem;
}

.back-link:hover {
    color: #27ae60;
}

/* --- Equipe --- */
.bio-section {
    display: flex;
    gap: 2rem;
    align-items: flex-start;
}

.bio-section .bio-text {
    flex: 1;
}

/* --- Finances specific --- */
.finance-proposals {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 1.5rem;
    margin: 2rem 0;
}

.finance-card {
    background: #f5f5f5;
    border-radius: 8px;
    padding: 1.5rem;
    text-align: center;
    border-top: 4px solid #27ae60;
}

.finance-card h3 {
    color: #1a5276;
    margin-bottom: 0.5rem;
}

.finance-card p {
    font-size: 0.9rem;
    color: #555;
}

.closing-statement {
    text-align: center;
    font-size: 1.3rem;
    font-weight: 700;
    color: #1a5276;
    margin: 2rem 0;
}

.closing-statement span {
    color: #27ae60;
}

/* --- Social links --- */
.social-links {
    display: flex;
    gap: 1rem;
    justify-content: center;
    margin-top: 1rem;
}

.social-links a {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    color: #fff;
    background: #1a5276;
    padding: 0.5rem 1rem;
    border-radius: 4px;
    font-size: 0.9rem;
    transition: background 0.2s;
}

.social-links a:hover {
    background: #27ae60;
    color: #fff;
}

/* --- Footer --- */
.site-footer {
    background: #1a5276;
    color: #fff;
    padding: 2rem 0;
}

.footer-inner {
    max-width: 1100px;
    margin: 0 auto;
    padding: 0 1rem;
    display: flex;
    flex-wrap: wrap;
    justify-content: space-between;
    align-items: center;
    gap: 1rem;
}

.footer-links {
    display: flex;
    gap: 1.5rem;
    flex-wrap: wrap;
}

.footer-links a {
    color: #ddd;
    font-size: 0.9rem;
}

.footer-links a:hover {
    color: #27ae60;
}

.footer-copy {
    font-size: 0.85rem;
    color: #aaa;
}

/* --- Responsive --- */
@media (max-width: 768px) {
    .hamburger {
        display: flex;
    }

    .main-nav {
        display: none;
        position: absolute;
        top: 100%;
        left: 0;
        right: 0;
        background: #fff;
        flex-direction: column;
        padding: 1rem;
        gap: 0;
        border-bottom: 2px solid #1a5276;
        box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
    }

    .main-nav.open {
        display: flex;
    }

    .main-nav a {
        padding: 0.75rem 0;
        border-bottom: 1px solid #eee;
    }

    .header-brand-slogan {
        display: none;
    }

    .header-brand-title {
        font-size: 0.95rem;
    }

    .header-brand img {
        height: 40px;
    }

    .hero-inner {
        flex-direction: column;
        text-align: center;
    }

    .hero-photo img {
        width: 150px;
    }

    .hero h1 {
        font-size: 1.8rem;
    }

    .hero .subtitle {
        font-size: 1rem;
    }

    .hero .slogan {
        font-size: 1.1rem;
    }

    .page-hero h1 {
        font-size: 1.5rem;
    }

    .bio-section {
        flex-direction: column;
    }

    .footer-inner {
        flex-direction: column;
        text-align: center;
    }

    .footer-links {
        justify-content: center;
    }

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

@media (min-width: 769px) and (max-width: 1024px) {
    .cards-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}
