/* ============================================
   STYLE.CSS - Bureau de Quartier MATETE
   Charte graphique : Vert Afrique · Orange Soleil · Rouge Terre
   ============================================ */

/* ===== RESET & VARIABLES ===== */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
}

:root {
    --vert-afrique: #0A8F5C;
    --vert-fonce: #066A44;
    --orange-soleil: #F5A623;
    --rouge-terre: #C0392B;
    --beige: #FDF6E3;
    --blanc-casse: #FAFAF5;
    --gris-anthracite: #2D2D2D;
    --gris-texte: #3D3D3D;
    --gris-clair: #EBE9E0;
    --ombre: 0 12px 40px rgba(10, 143, 92, 0.12);
    --transition: 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    --radius: 20px;
}

html {
    scroll-behavior: smooth;
}

body {
    background-color: var(--beige);
    color: var(--gris-texte);
    line-height: 1.7;
}

a {
    text-decoration: none;
    color: inherit;
}

img {
    max-width: 100%;
    height: auto;
    display: block;
    border-radius: 12px;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 24px;
}

/* ===== HEADER ===== */
header {
    background: rgba(255, 255, 255, 0.92);
    backdrop-filter: blur(12px);
    box-shadow: 0 2px 24px rgba(0, 0, 0, 0.06);
    position: sticky;
    top: 0;
    z-index: 1000;
    padding: 14px 0;
    border-bottom: 3px solid var(--orange-soleil);
}

.header-inner {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
}

.logo {
    display: flex;
    align-items: center;
    gap: 12px;
}

.logo-icon {
    width: 48px;
    height: 48px;
    background: linear-gradient(135deg, var(--vert-afrique), var(--orange-soleil));
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 1.4rem;
    font-weight: 700;
}

.logo h1 {
    font-size: 1.6rem;
    font-weight: 800;
    color: var(--vert-afrique);
    letter-spacing: -0.5px;
}

.logo h1 span {
    color: var(--orange-soleil);
    font-weight: 300;
}

.logo small {
    display: block;
    font-size: 0.65rem;
    color: var(--gris-anthracite);
    opacity: 0.6;
    font-weight: 500;
    letter-spacing: 0.5px;
}

nav {
    display: flex;
    flex-wrap: wrap;
    gap: 8px 16px;
}

nav a {
    font-weight: 600;
    font-size: 0.9rem;
    color: var(--gris-anthracite);
    padding: 6px 12px;
    border-radius: 30px;
    transition: var(--transition);
    position: relative;
}

nav a:hover {
    background: var(--vert-afrique);
    color: white;
    transform: translateY(-2px);
}

nav a::after {
    content: '';
    position: absolute;
    bottom: -2px;
    left: 50%;
    width: 0;
    height: 3px;
    background: var(--orange-soleil);
    transition: var(--transition);
    transform: translateX(-50%);
    border-radius: 10px;
}

nav a:hover::after {
    width: 60%;
}

.menu-toggle {
    display: none;
    font-size: 1.8rem;
    cursor: pointer;
    color: var(--vert-afrique);
}

/* ===== HERO ===== */
.hero {
    background: linear-gradient(135deg, var(--vert-afrique) 0%, var(--vert-fonce) 50%, var(--orange-soleil) 100%);
    color: white;
    padding: 60px 0 50px;
    text-align: center;
    border-radius: 0 0 50px 50px;
    margin-bottom: 30px;
    position: relative;
    overflow: hidden;
}

.hero::before {
    content: '✦';
    position: absolute;
    font-size: 20rem;
    opacity: 0.06;
    right: -50px;
    top: -80px;
    transform: rotate(15deg);
}

.hero h2 {
    font-size: 2.8rem;
    font-weight: 800;
    letter-spacing: -1px;
    text-shadow: 0 4px 20px rgba(0, 0, 0, 0.15);
}

.hero h2 i {
    color: var(--orange-soleil);
}

.hero p {
    font-size: 1.2rem;
    max-width: 700px;
    margin: 12px auto 0;
    opacity: 0.95;
    font-weight: 400;
}

.hero .badge-hero {
    display: inline-block;
    background: rgba(255, 255, 255, 0.2);
    backdrop-filter: blur(4px);
    padding: 8px 24px;
    border-radius: 40px;
    margin-top: 20px;
    font-size: 0.9rem;
    border: 1px solid rgba(255, 255, 255, 0.2);
}

/* ===== SECTIONS ===== */
section {
    background: var(--blanc-casse);
    border-radius: var(--radius);
    padding: 36px 32px;
    margin-bottom: 30px;
    box-shadow: var(--ombre);
    border: 1px solid rgba(10, 143, 92, 0.06);
    transition: var(--transition);
}

section:hover {
    box-shadow: 0 16px 48px rgba(10, 143, 92, 0.08);
}

.section-title {
    font-size: 1.9rem;
    font-weight: 700;
    color: var(--vert-afrique);
    border-left: 6px solid var(--orange-soleil);
    padding-left: 18px;
    margin-bottom: 28px;
    display: flex;
    align-items: center;
    gap: 12px;
}

.section-title i {
    color: var(--orange-soleil);
    font-size: 1.6rem;
}

.grid-2 {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 28px;
}

.grid-3 {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 28px;
}

.grid-4 {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 20px;
}

/* ===== CARDS ===== */
.card {
    background: white;
    border-radius: 16px;
    padding: 24px;
    transition: var(--transition);
    border: 1px solid rgba(10, 143, 92, 0.08);
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.03);
}

.card:hover {
    transform: translateY(-6px);
    box-shadow: 0 12px 32px rgba(10, 143, 92, 0.12);
    border-color: var(--orange-soleil);
}

.card .icon-circle {
    width: 56px;
    height: 56px;
    background: linear-gradient(135deg, var(--vert-afrique), var(--orange-soleil));
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 14px;
    color: white;
    font-size: 1.4rem;
}

.card h4 {
    font-size: 1.1rem;
    font-weight: 700;
    color: var(--vert-afrique);
    margin-bottom: 6px;
}

.card p {
    font-size: 0.95rem;
    color: var(--gris-texte);
    opacity: 0.85;
}

.card .card-img {
    width: 100%;
    height: 160px;
    object-fit: cover;
    border-radius: 12px;
    margin-bottom: 14px;
}

.card .card-img-small {
    width: 100%;
    height: 120px;
    object-fit: cover;
    border-radius: 10px;
    margin-bottom: 12px;
}

.card .link-more {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    color: var(--vert-afrique);
    font-weight: 600;
    font-size: 0.9rem;
    margin-top: 12px;
    transition: var(--transition);
}

.card .link-more:hover {
    color: var(--orange-soleil);
    gap: 12px;
}

.card .link-more i {
    font-size: 0.8rem;
}

.badge {
    display: inline-block;
    background: var(--orange-soleil);
    color: white;
    padding: 4px 14px;
    border-radius: 30px;
    font-size: 0.7rem;
    font-weight: 700;
    margin-top: 10px;
    letter-spacing: 0.3px;
}

.badge-green {
    background: var(--vert-afrique);
}

/* ===== AUTORITÉS ===== */
.autorites-wrap {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 30px;
}

.autorite-card {
    background: white;
    border-radius: var(--radius);
    padding: 28px;
    border: 1px solid rgba(10, 143, 92, 0.08);
    transition: var(--transition);
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
}

.autorite-card:hover {
    transform: translateY(-4px);
    box-shadow: var(--ombre);
    border-color: var(--orange-soleil);
}

.autorite-card img {
    width: 140px;
    height: 140px;
    object-fit: cover;
    border-radius: 50%;
    border: 5px solid var(--orange-soleil);
    box-shadow: 0 8px 32px rgba(245, 166, 35, 0.2);
    margin-bottom: 16px;
}

.autorite-card h3 {
    color: var(--vert-afrique);
    font-size: 1.4rem;
    font-weight: 800;
}

.autorite-card .fonction {
    color: var(--orange-soleil);
    font-weight: 600;
    font-size: 0.95rem;
    margin-bottom: 10px;
}

.autorite-card .message {
    text-align: left;
    font-size: 0.95rem;
    line-height: 1.8;
    width: 100%;
}

.autorite-card .message .citation {
    font-style: italic;
    border-left: 4px solid var(--orange-soleil);
    padding-left: 16px;
    margin: 10px 0;
    color: var(--gris-anthracite);
}

.autorite-card .signature {
    font-family: 'Georgia', serif;
    font-style: italic;
    color: var(--vert-afrique);
    margin-top: 8px;
    font-size: 1rem;
}

/* ===== ACTUALITÉS ===== */
.actu-card {
    display: flex;
    gap: 18px;
    background: white;
    border-radius: 16px;
    padding: 16px;
    transition: var(--transition);
    border: 1px solid rgba(10, 143, 92, 0.08);
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.03);
    align-items: center;
}

.actu-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 12px 32px rgba(10, 143, 92, 0.12);
    border-color: var(--orange-soleil);
}

.actu-card .actu-img {
    flex: 0 0 140px;
    height: 100px;
    object-fit: cover;
    border-radius: 12px;
}

.actu-card .actu-content {
    flex: 1;
}

.actu-card .actu-content h4 {
    font-size: 1.05rem;
    font-weight: 700;
    color: var(--vert-afrique);
}

.actu-card .actu-content p {
    font-size: 0.9rem;
    color: var(--gris-texte);
    opacity: 0.8;
    margin: 4px 0;
}

.actu-card .icon-circle {
    width: 40px;
    height: 40px;
    background: linear-gradient(135deg, var(--vert-afrique), var(--orange-soleil));
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 1rem;
    flex-shrink: 0;
}

/* ===== PROJETS & ASSAINISSEMENT ===== */
.projet-card {
    background: white;
    border-radius: 16px;
    overflow: hidden;
    transition: var(--transition);
    border: 1px solid rgba(10, 143, 92, 0.08);
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.03);
}

.projet-card:hover {
    transform: translateY(-6px);
    box-shadow: 0 12px 32px rgba(10, 143, 92, 0.12);
    border-color: var(--orange-soleil);
}

.projet-card img {
    width: 100%;
    height: 180px;
    object-fit: cover;
}

.projet-card .projet-body {
    padding: 18px 20px 20px;
}

.projet-card .projet-body h4 {
    font-size: 1.1rem;
    font-weight: 700;
    color: var(--vert-afrique);
}

.projet-card .projet-body p {
    font-size: 0.9rem;
    color: var(--gris-texte);
    opacity: 0.8;
    margin: 6px 0 10px;
}

/* ===== FORMULAIRES ===== */
.form-group {
    margin-bottom: 18px;
}

.form-group label {
    font-weight: 600;
    display: block;
    margin-bottom: 5px;
    color: var(--gris-anthracite);
    font-size: 0.9rem;
}

.form-control {
    width: 100%;
    padding: 14px 18px;
    border-radius: 12px;
    border: 2px solid #E8E5DC;
    font-size: 1rem;
    transition: var(--transition);
    background: white;
}

.form-control:focus {
    border-color: var(--vert-afrique);
    outline: none;
    box-shadow: 0 0 0 4px rgba(10, 143, 92, 0.12);
}

textarea.form-control {
    min-height: 100px;
    resize: vertical;
}

.btn {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    background: linear-gradient(135deg, var(--vert-afrique), var(--vert-fonce));
    color: white;
    border: none;
    padding: 14px 34px;
    border-radius: 40px;
    font-weight: 700;
    font-size: 1rem;
    cursor: pointer;
    transition: var(--transition);
    box-shadow: 0 4px 16px rgba(10, 143, 92, 0.25);
}

.btn:hover {
    transform: translateY(-3px) scale(1.02);
    box-shadow: 0 8px 32px rgba(10, 143, 92, 0.35);
}

.btn-outline {
    background: transparent;
    border: 2px solid var(--vert-afrique);
    color: var(--vert-afrique);
    box-shadow: none;
}

.btn-outline:hover {
    background: var(--vert-afrique);
    color: white;
    box-shadow: 0 4px 16px rgba(10, 143, 92, 0.25);
}

.btn-orange {
    background: linear-gradient(135deg, var(--orange-soleil), #E0951A);
    box-shadow: 0 4px 16px rgba(245, 166, 35, 0.3);
}

.btn-orange:hover {
    box-shadow: 0 8px 32px rgba(245, 166, 35, 0.4);
}

/* ===== STATISTIQUES ===== */
.stat-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
    gap: 18px;
    margin-top: 20px;
}

.stat-item {
    background: white;
    padding: 20px;
    border-radius: 16px;
    text-align: center;
    border: 1px solid rgba(10, 143, 92, 0.08);
    transition: var(--transition);
}

.stat-item:hover {
    transform: scale(1.04);
    border-color: var(--orange-soleil);
}

.stat-item .number {
    font-size: 2.2rem;
    font-weight: 800;
    color: var(--vert-afrique);
}

.stat-item .label {
    font-size: 0.8rem;
    color: var(--gris-texte);
    opacity: 0.7;
    font-weight: 500;
}

/* ===== CONTACT ===== */
.contact-row {
    display: flex;
    flex-wrap: wrap;
    gap: 30px;
}

.contact-info {
    flex: 1;
    min-width: 220px;
}

.contact-info p {
    margin: 10px 0;
    display: flex;
    align-items: center;
    gap: 12px;
}

.contact-info i {
    width: 32px;
    height: 32px;
    background: var(--vert-afrique);
    color: white;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.9rem;
    flex-shrink: 0;
}

.map-container {
    flex: 2;
    min-width: 280px;
    height: 250px;
    border-radius: 16px;
    overflow: hidden;
    border: 3px solid var(--orange-soleil);
}

.map-container iframe {
    width: 100%;
    height: 100%;
    border: 0;
}

/* ===== SOCIAL LINKS ===== */
.social-links {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    margin: 12px 0;
}

.social-links a {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 44px;
    height: 44px;
    border-radius: 50%;
    background: var(--gris-clair);
    color: var(--gris-anthracite);
    font-size: 1.2rem;
    transition: var(--transition);
}

.social-links a:hover {
    background: var(--vert-afrique);
    color: white;
    transform: translateY(-4px) scale(1.1);
}

/* ===== ORGANIGRAMME ===== */
.org-card {
    text-align: center;
    padding: 24px 16px;
    background: white;
    border-radius: 16px;
    border: 1px solid rgba(10, 143, 92, 0.06);
    transition: var(--transition);
}

.org-card:hover {
    border-color: var(--orange-soleil);
    transform: translateY(-4px);
}

.org-card img {
    border-radius: 50%;
    margin: 0 auto 12px;
    border: 4px solid var(--orange-soleil);
    width: 90px;
    height: 90px;
    object-fit: cover;
}

.org-card h4 {
    color: var(--vert-afrique);
    font-weight: 700;
}

.org-card p {
    font-size: 0.9rem;
    color: var(--gris-texte);
    opacity: 0.7;
}

/* ===== RESPONSIVE ===== */
@media (max-width: 992px) {
    .grid-2,
    .grid-3 {
        grid-template-columns: 1fr 1fr;
    }
    .grid-4 {
        grid-template-columns: 1fr 1fr;
    }
    .autorites-wrap {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 768px) {
    .menu-toggle {
        display: block;
    }

    nav {
        display: none;
        width: 100%;
        flex-direction: column;
        gap: 6px;
        padding-top: 16px;
        background: white;
        border-radius: 16px;
        padding: 16px;
        margin-top: 12px;
        box-shadow: var(--ombre);
    }

    nav.open {
        display: flex;
    }

    nav a {
        padding: 10px 16px;
        border-radius: 12px;
    }

    nav a:hover {
        background: var(--vert-afrique);
        color: white;
    }

    nav a::after {
        display: none;
    }

    .grid-2,
    .grid-3,
    .grid-4 {
        grid-template-columns: 1fr;
    }

    .hero h2 {
        font-size: 2rem;
    }

    .section-title {
        font-size: 1.4rem;
    }

    .contact-row {
        flex-direction: column;
    }

    .stat-grid {
        grid-template-columns: 1fr 1fr;
    }

    .actu-card {
        flex-direction: column;
        align-items: flex-start;
    }

    .actu-card .actu-img {
        flex: 0 0 auto;
        width: 100%;
        height: 160px;
    }
}

@media (max-width: 480px) {
    .container {
        padding: 0 14px;
    }

    section {
        padding: 20px 16px;
    }

    .hero {
        padding: 40px 0 30px;
    }

    .autorite-card img {
        width: 100px;
        height: 100px;
    }
}

/* ===== FOOTER ===== */
footer {
    background: linear-gradient(135deg, var(--vert-fonce), var(--vert-afrique));
    color: rgba(255, 255, 255, 0.9);
    padding: 40px 0 24px;
    border-radius: 40px 40px 0 0;
    margin-top: 20px;
    text-align: center;
}

footer .social-links {
    justify-content: center;
}

footer .social-links a {
    background: rgba(255, 255, 255, 0.12);
    color: white;
}

footer .social-links a:hover {
    background: var(--orange-soleil);
    color: var(--vert-fonce);
}

footer small {
    display: block;
    margin-top: 16px;
    opacity: 0.6;
    font-size: 0.85rem;
}

footer a[href*="admin"] {
    color: rgba(255, 255, 255, 0.4);
    font-size: 0.8rem;
    text-decoration: underline;
    transition: var(--transition);
}

footer a[href*="admin"]:hover {
    color: var(--orange-soleil);
}

/* ===== LIEN PAGE INTERNE ===== */
.page-link {
    color: var(--vert-afrique);
    font-weight: 600;
    transition: var(--transition);
}

.page-link:hover {
    color: var(--orange-soleil);
}

/* ===== MESSAGES D'ERREUR ===== */
.error-message {
    background: #FEE;
    color: var(--rouge-terre);
    padding: 16px 20px;
    border-radius: 12px;
    border-left: 5px solid var(--rouge-terre);
    margin-bottom: 20px;
}

.success-message {
    background: #E8F5E9;
    color: var(--vert-afrique);
    padding: 16px 20px;
    border-radius: 12px;
    border-left: 5px solid var(--vert-afrique);
    margin-bottom: 20px;
}