/*
Theme Name: MDE Martigues
Description: Thème professionnel pour la Maison de l'Emploi du Pays de Martigues Côte Bleue
Version: 1.0.0
Author: MDE
Text Domain: mde-martigues
Requires at least: 6.0
Requires PHP: 7.4
*/

:root {
    --primary: #1a365d;
    --primary-rgb: 26, 54, 93;
    --primary-light: #2563eb;
    --primary-lighter: #dbeafe;
    --accent: #0891b2;
    --accent-dark: #0e7490;
    --accent-light: #cffafe;
    --green: #059669;
    --green-light: #d1fae5;
    --text: #1f2937;
    --text-light: #6b7280;
    --text-lighter: #9ca3af;
    --bg: #f8fafc;
    --bg-alt: #f1f5f9;
    --white: #ffffff;
    --border: #e2e8f0;
    --shadow-sm: 0 1px 2px rgba(0,0,0,0.05);
    --shadow: 0 1px 3px rgba(0,0,0,0.1), 0 1px 2px rgba(0,0,0,0.06);
    --shadow-md: 0 4px 6px rgba(0,0,0,0.07), 0 2px 4px rgba(0,0,0,0.06);
    --shadow-lg: 0 10px 15px rgba(0,0,0,0.1), 0 4px 6px rgba(0,0,0,0.05);
    --radius: 8px;
    --radius-lg: 12px;
    --font: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
    --max-width: 1200px;
    --transition: 0.2s ease;
}

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

html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }

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

img { max-width: 100%; height: auto; display: block; }
a { color: var(--primary-light); text-decoration: none; transition: color var(--transition); }
a:hover { color: var(--accent); }

h1, h2, h3, h4 { color: var(--primary); line-height: 1.3; font-weight: 700; }
h1 { font-size: 2.5rem; }
h2 { font-size: 2rem; }
h3 { font-size: 1.25rem; }

.container { max-width: var(--max-width); margin: 0 auto; padding: 0 24px; }

/* ── Top Bar ── */
.topbar {
    background: var(--primary);
    color: rgba(255,255,255,0.9);
    font-size: 0.85rem;
    padding: 8px 0;
}
.topbar .container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 8px;
}
.topbar a { color: #fff; }
.topbar a:hover { color: var(--accent-light); }
.topbar-left, .topbar-right { display: flex; align-items: center; gap: 20px; }
.topbar-item { display: flex; align-items: center; gap: 6px; }
.topbar-item svg { width: 14px; height: 14px; flex-shrink: 0; }

/* ── Header ── */
.site-header {
    background: var(--white);
    border-bottom: 1px solid var(--border);
    position: sticky;
    top: 0;
    z-index: 100;
    box-shadow: var(--shadow-sm);
}
.header-inner {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 12px 0;
}
.site-logo { display: flex; align-items: center; gap: 12px; }
.site-logo img { height: 52px; width: auto; }
.site-logo-text { display: flex; flex-direction: column; }
.site-logo-name {
    font-size: 1.15rem;
    font-weight: 700;
    color: var(--primary);
    line-height: 1.2;
}
.site-logo-tagline {
    font-size: 0.75rem;
    color: var(--text-light);
    line-height: 1.3;
}

/* ── Navigation ── */
.main-nav ul {
    list-style: none;
    display: flex;
    gap: 4px;
    align-items: center;
}
.main-nav a {
    display: block;
    padding: 8px 16px;
    color: var(--text);
    font-weight: 500;
    font-size: 0.95rem;
    border-radius: var(--radius);
    transition: all var(--transition);
}
.main-nav a:hover,
.main-nav .current-menu-item a,
.main-nav .current_page_item a {
    color: var(--primary-light);
    background: var(--primary-lighter);
}

/* Mobile menu toggle */
.menu-toggle {
    display: none;
    background: none;
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 8px 12px;
    cursor: pointer;
    color: var(--primary);
}
.menu-toggle svg { width: 24px; height: 24px; display: block; }

/* ── Hero ── */
.hero {
    background: linear-gradient(135deg, var(--primary) 0%, #1e4d8c 50%, var(--accent-dark) 100%);
    color: #fff;
    padding: 100px 0 80px;
    position: relative;
    overflow: hidden;
}
.hero::before {
    content: '';
    position: absolute;
    inset: 0;
    background-image: url("data:image/svg+xml,%3Csvg width='60' height='60' viewBox='0 0 60 60' xmlns='http://www.w3.org/2000/svg'%3E%3Cg fill='none' fill-rule='evenodd'%3E%3Cg fill='%23ffffff' fill-opacity='0.05'%3E%3Cpath d='M36 34v-4h-2v4h-4v2h4v4h2v-4h4v-2h-4zm0-30V0h-2v4h-4v2h4v4h2V6h4V4h-4zM6 34v-4H4v4H0v2h4v4h2v-4h4v-2H6zM6 4V0H4v4H0v2h4v4h2V6h4V4H6z'/%3E%3C/g%3E%3C/g%3E%3C/svg%3E");
    opacity: 1;
}
.hero .container { position: relative; z-index: 1; max-width: 900px; text-align: center; }
.hero-badge {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    background: rgba(255,255,255,0.15);
    backdrop-filter: blur(4px);
    padding: 8px 20px;
    border-radius: 50px;
    font-size: 0.85rem;
    font-weight: 500;
    margin-bottom: 24px;
    border: 1px solid rgba(255,255,255,0.2);
}
.hero h1 {
    color: #fff;
    font-size: 2.8rem;
    font-weight: 800;
    margin-bottom: 20px;
    letter-spacing: -0.02em;
}
.hero p {
    font-size: 1.2rem;
    opacity: 0.9;
    max-width: 700px;
    margin: 0 auto 32px;
    line-height: 1.7;
}
.hero-buttons { display: flex; gap: 16px; justify-content: center; flex-wrap: wrap; }

/* ── Buttons ── */
.btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 14px 28px;
    border-radius: var(--radius);
    font-weight: 600;
    font-size: 0.95rem;
    transition: all var(--transition);
    border: none;
    cursor: pointer;
    text-decoration: none;
}
.btn-primary {
    background: var(--accent);
    color: #fff;
}
.btn-primary:hover { background: var(--accent-dark); color: #fff; }
.btn-outline {
    background: transparent;
    color: #fff;
    border: 2px solid rgba(255,255,255,0.5);
}
.btn-outline:hover { background: rgba(255,255,255,0.1); border-color: #fff; color: #fff; }
.btn svg { width: 18px; height: 18px; }

/* ── Stats Bar ── */
.stats-bar {
    background: var(--white);
    border-bottom: 1px solid var(--border);
    padding: 32px 0;
}
.stats-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 32px;
    text-align: center;
}
.stat-item {}
.stat-number {
    font-size: 2.2rem;
    font-weight: 800;
    color: var(--primary-light);
    line-height: 1;
    margin-bottom: 4px;
}
.stat-label {
    font-size: 0.9rem;
    color: var(--text-light);
    font-weight: 500;
}

/* ── Sections ── */
.section { padding: 80px 0; }
.section-alt { background: var(--bg); }
.section-header {
    text-align: center;
    max-width: 700px;
    margin: 0 auto 48px;
}
.section-header h2 { margin-bottom: 12px; }
.section-header p { color: var(--text-light); font-size: 1.1rem; }
.section-label {
    display: inline-block;
    font-size: 0.8rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: var(--accent);
    margin-bottom: 8px;
}

/* ── Services Grid ── */
.services-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 24px;
}
.service-card {
    background: var(--white);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    padding: 32px 28px;
    transition: all var(--transition);
}
.section-alt .service-card { border-color: transparent; box-shadow: var(--shadow); }
.service-card:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-lg);
    border-color: var(--primary-lighter);
}
.service-icon {
    width: 52px;
    height: 52px;
    border-radius: var(--radius);
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 20px;
}
.service-icon svg { width: 26px; height: 26px; }
.service-icon.blue { background: var(--primary-lighter); color: var(--primary-light); }
.service-icon.teal { background: var(--accent-light); color: var(--accent); }
.service-icon.green { background: var(--green-light); color: var(--green); }
.service-card h3 { margin-bottom: 10px; font-size: 1.15rem; }
.service-card p { color: var(--text-light); font-size: 0.95rem; line-height: 1.6; }

/* ── About Section ── */
.about-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 48px;
    align-items: center;
}
.about-content h2 { margin-bottom: 16px; }
.about-content p { color: var(--text-light); margin-bottom: 16px; font-size: 1.05rem; }
.about-features { list-style: none; margin-top: 24px; }
.about-features li {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    padding: 10px 0;
    color: var(--text);
    font-weight: 500;
}
.about-features li svg {
    width: 20px;
    height: 20px;
    color: var(--green);
    flex-shrink: 0;
    margin-top: 2px;
}
.about-image {
    background: linear-gradient(135deg, var(--primary-lighter) 0%, var(--accent-light) 100%);
    border-radius: var(--radius-lg);
    padding: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 380px;
}
.about-image-inner {
    background: var(--white);
    border-radius: var(--radius);
    padding: 32px;
    box-shadow: var(--shadow-lg);
    text-align: center;
    max-width: 320px;
}
.about-image-inner img { margin: 0 auto 16px; max-height: 80px; }
.about-image-inner h3 { font-size: 1rem; margin-bottom: 4px; }
.about-image-inner p { font-size: 0.85rem; color: var(--text-light); }

/* ── Partners ── */
.partners-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 20px;
}
.partner-card {
    background: var(--white);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 24px 20px;
    text-align: center;
    transition: all var(--transition);
}
.partner-card:hover { border-color: var(--primary-lighter); box-shadow: var(--shadow-md); }
.partner-card h4 {
    font-size: 0.9rem;
    font-weight: 600;
    color: var(--primary);
    margin-bottom: 4px;
}
.partner-card p { font-size: 0.8rem; color: var(--text-light); }

/* ── Contact Section ── */
.contact-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 40px;
}
.contact-info {}
.contact-info h2 { margin-bottom: 16px; }
.contact-info > p { color: var(--text-light); margin-bottom: 24px; }
.contact-items { display: flex; flex-direction: column; gap: 20px; }
.contact-item {
    display: flex;
    gap: 16px;
    align-items: flex-start;
}
.contact-item-icon {
    width: 44px;
    height: 44px;
    border-radius: var(--radius);
    background: var(--primary-lighter);
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}
.contact-item-icon svg { width: 20px; height: 20px; color: var(--primary-light); }
.contact-item-text h4 { font-size: 0.95rem; margin-bottom: 2px; }
.contact-item-text p { color: var(--text-light); font-size: 0.9rem; }
.contact-item-text a { color: var(--primary-light); }
.contact-map {
    border-radius: var(--radius-lg);
    overflow: hidden;
    border: 1px solid var(--border);
    min-height: 350px;
}
.contact-map iframe { width: 100%; height: 100%; min-height: 350px; border: 0; }

/* ── CTA Section ── */
.cta-section {
    background: linear-gradient(135deg, var(--primary) 0%, #1e4d8c 100%);
    color: #fff;
    padding: 64px 0;
    text-align: center;
}
.cta-section h2 { color: #fff; margin-bottom: 12px; }
.cta-section p { opacity: 0.9; margin-bottom: 28px; font-size: 1.1rem; }

/* ── Footer ── */
.site-footer {
    background: var(--primary);
    color: rgba(255,255,255,0.8);
    padding: 60px 0 0;
}
.footer-grid {
    display: grid;
    grid-template-columns: 2fr 1fr 1fr 1.5fr;
    gap: 40px;
    padding-bottom: 40px;
    border-bottom: 1px solid rgba(255,255,255,0.1);
}
.footer-col h3 {
    color: #fff;
    font-size: 1rem;
    margin-bottom: 16px;
    font-weight: 600;
}
.footer-about p { font-size: 0.9rem; line-height: 1.7; margin-bottom: 16px; }
.footer-about img { height: 40px; margin-bottom: 12px; filter: brightness(0) invert(1); }
.footer-links { list-style: none; }
.footer-links li { margin-bottom: 8px; }
.footer-links a { color: rgba(255,255,255,0.7); font-size: 0.9rem; }
.footer-links a:hover { color: #fff; }
.footer-contact-item {
    display: flex;
    gap: 10px;
    align-items: flex-start;
    margin-bottom: 12px;
    font-size: 0.9rem;
}
.footer-contact-item svg { width: 16px; height: 16px; flex-shrink: 0; margin-top: 3px; opacity: 0.7; }
.footer-bottom {
    padding: 20px 0;
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 0.85rem;
    color: rgba(255,255,255,0.5);
}
.footer-bottom a { color: rgba(255,255,255,0.6); }
.footer-bottom a:hover { color: #fff; }

/* ── Page Content ── */
.page-header {
    background: linear-gradient(135deg, var(--primary) 0%, #1e4d8c 100%);
    color: #fff;
    padding: 60px 0 48px;
    position: relative;
}
.page-header::before {
    content: '';
    position: absolute;
    inset: 0;
    background-image: url("data:image/svg+xml,%3Csvg width='60' height='60' viewBox='0 0 60 60' xmlns='http://www.w3.org/2000/svg'%3E%3Cg fill='none' fill-rule='evenodd'%3E%3Cg fill='%23ffffff' fill-opacity='0.04'%3E%3Cpath d='M36 34v-4h-2v4h-4v2h4v4h2v-4h4v-2h-4zm0-30V0h-2v4h-4v2h4v4h2V6h4V4h-4zM6 34v-4H4v4H0v2h4v4h2v-4h4v-2H6zM6 4V0H4v4H0v2h4v4h2V6h4V4H6z'/%3E%3C/g%3E%3C/g%3E%3C/svg%3E");
}
.page-header .container { position: relative; z-index: 1; }
.page-header h1 { color: #fff; font-size: 2.2rem; margin-bottom: 8px; }
.page-header p { opacity: 0.8; font-size: 1.1rem; }
.breadcrumb { font-size: 0.85rem; opacity: 0.7; margin-bottom: 12px; }
.breadcrumb a { color: #fff; }
.breadcrumb span { margin: 0 8px; }

.page-content {
    padding: 60px 0;
    max-width: 800px;
    margin: 0 auto;
}
.page-content h2 { margin: 40px 0 16px; font-size: 1.6rem; }
.page-content h3 { margin: 32px 0 12px; font-size: 1.25rem; }
.page-content p { margin-bottom: 16px; color: var(--text); line-height: 1.8; }
.page-content ul, .page-content ol { margin: 0 0 16px 24px; }
.page-content li { margin-bottom: 8px; line-height: 1.6; }
.page-content blockquote {
    border-left: 4px solid var(--primary-light);
    padding: 16px 24px;
    margin: 24px 0;
    background: var(--bg);
    border-radius: 0 var(--radius) var(--radius) 0;
    color: var(--text-light);
    font-style: italic;
}
.page-content strong { color: var(--primary); }
.page-content a { color: var(--primary-light); text-decoration: underline; }
.page-content img {
    border-radius: var(--radius);
    margin: 24px 0;
    box-shadow: var(--shadow);
}

/* ── Single Post (for Google indexing) ── */
.single-article {
    padding: 48px 0 80px;
}
.single-article .container { max-width: 800px; }
.article-meta {
    display: flex;
    align-items: center;
    gap: 16px;
    margin-bottom: 24px;
    font-size: 0.9rem;
    color: var(--text-light);
}
.article-category {
    background: var(--primary-lighter);
    color: var(--primary-light);
    padding: 4px 12px;
    border-radius: 50px;
    font-size: 0.8rem;
    font-weight: 600;
}
.article-thumbnail {
    margin-bottom: 32px;
    border-radius: var(--radius-lg);
    overflow: hidden;
}
.article-body h2 { margin: 36px 0 16px; font-size: 1.5rem; }
.article-body h3 { margin: 28px 0 12px; font-size: 1.2rem; }
.article-body p { margin-bottom: 16px; line-height: 1.8; }
.article-body ul, .article-body ol { margin: 0 0 16px 24px; }
.article-body li { margin-bottom: 8px; line-height: 1.7; }
.article-body blockquote {
    border-left: 4px solid var(--primary-light);
    padding: 16px 24px;
    margin: 24px 0;
    background: var(--bg);
    border-radius: 0 var(--radius) var(--radius) 0;
}
.article-body img {
    border-radius: var(--radius);
    margin: 24px 0;
}

/* ── 404 ── */
.error-404 {
    text-align: center;
    padding: 100px 0;
}
.error-404 h1 {
    font-size: 6rem;
    color: var(--primary-lighter);
    margin-bottom: 16px;
    line-height: 1;
}
.error-404 h2 { margin-bottom: 12px; font-size: 1.5rem; }
.error-404 p { color: var(--text-light); margin-bottom: 32px; }

/* ── Responsive ── */
@media (max-width: 1024px) {
    .services-grid { grid-template-columns: repeat(2, 1fr); }
    .partners-grid { grid-template-columns: repeat(3, 1fr); }
    .footer-grid { grid-template-columns: repeat(2, 1fr); }
    .stats-grid { grid-template-columns: repeat(2, 1fr); gap: 24px; }
}

@media (max-width: 768px) {
    h1 { font-size: 2rem; }
    h2 { font-size: 1.5rem; }
    .section { padding: 60px 0; }

    .topbar-right { display: none; }

    .menu-toggle { display: block; }
    .main-nav {
        display: none;
        position: absolute;
        top: 100%;
        left: 0;
        right: 0;
        background: var(--white);
        border-top: 1px solid var(--border);
        box-shadow: var(--shadow-lg);
        padding: 16px;
        z-index: 99;
    }
    .main-nav.active { display: block; }
    .main-nav ul { flex-direction: column; gap: 0; }
    .main-nav a { padding: 12px 16px; border-radius: 0; }
    .header-inner { position: relative; }

    .hero { padding: 64px 0 56px; }
    .hero h1 { font-size: 2rem; }
    .hero p { font-size: 1rem; }
    .hero-buttons { flex-direction: column; align-items: center; }

    .services-grid { grid-template-columns: 1fr; }
    .about-grid { grid-template-columns: 1fr; gap: 32px; }
    .about-image { min-height: 250px; padding: 24px; }
    .contact-grid { grid-template-columns: 1fr; }
    .partners-grid { grid-template-columns: repeat(2, 1fr); }
    .footer-grid { grid-template-columns: 1fr; gap: 32px; }
    .footer-bottom { flex-direction: column; gap: 8px; text-align: center; }
    .stats-grid { grid-template-columns: repeat(2, 1fr); }
    .page-header { padding: 40px 0 32px; }
}

@media (max-width: 480px) {
    .container { padding: 0 16px; }
    .hero h1 { font-size: 1.6rem; }
    .stats-grid { grid-template-columns: 1fr 1fr; gap: 16px; }
    .stat-number { font-size: 1.8rem; }
    .partners-grid { grid-template-columns: 1fr; }
}

/* ── Print ── */
@media print {
    .topbar, .site-header, .site-footer, .cta-section { display: none; }
    .hero { background: none; color: var(--text); padding: 20px 0; }
    .hero h1 { color: var(--primary); }
}
