/* --- VARIABLES & RESET --- */
:root {
    /* Palette Réseau Moisson */
    --primary-color: #2c5e4e; /* Vert Réseau */
    --secondary-color: #e85d04; /* Orange accentué */
    --accent-color: #e3f2fd;
    --text-dark: #333333;
    --text-light: #666666;
    --white: #ffffff;
    --bg-light: #f4f7f6;
    --shadow: 0 4px 6px rgba(0,0,0,0.08);
    --transition: all 0.3s ease;
}

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

body {
    font-family: 'Segoe UI', Roboto, Helvetica, Arial, sans-serif;
    line-height: 1.6;
    color: var(--text-dark);
    background-color: var(--bg-light);
}

a {
    text-decoration: none;
    color: inherit;
}

ul {
    list-style: none;
}

/* --- HEADER & NAVIGATION --- */
header {
    background-color: var(--white);
    box-shadow: 0 2px 10px rgba(0,0,0,0.05);
    position: sticky;
    top: 0;
    z-index: 1000;
}

.navbar {
    max-width: 1200px;
    margin: 0 auto;
    padding: 1rem 2rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.logo {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 1.4rem;
    font-weight: 700;
    color: var(--primary-color);
}

.logo i {
    color: var(--secondary-color);
    font-size: 1.6rem;
}

.nav-links {
    display: flex;
    gap: 2rem;
}

.nav-links a {
    font-weight: 500;
    color: var(--text-dark);
    transition: var(--transition);
}

.nav-links a:hover {
    color: var(--secondary-color);
}

.btn-donate {
    background-color: var(--secondary-color);
    color: var(--white);
    padding: 0.5rem 1.2rem;
    border-radius: 50px;
    font-weight: 600;
    transition: var(--transition);
}

.btn-donate:hover {
    background-color: #d64b00;
    transform: translateY(-2px);
}

/* --- HERO SECTION --- */
.hero {
    background: linear-gradient(rgba(44, 94, 78, 0.85), rgba(44, 94, 78, 0.75)), url('https://picsum.photos/seed/quebecmap/1600/600');
    background-size: cover;
    background-position: center;
    color: var(--white);
    padding: 5rem 2rem;
    text-align: center;
}

.hero-content {
    max-width: 800px;
    margin: 0 auto;
}

.hero h1 {
    font-size: 2.8rem;
    margin-bottom: 1.2rem;
    font-weight: 800;
}

.hero p {
    font-size: 1.15rem;
    margin-bottom: 2.5rem;
    opacity: 0.95;
    line-height: 1.8;
}

.search-container {
    position: relative;
    max-width: 600px;
    margin: 0 auto;
}

.search-input {
    width: 100%;
    padding: 1rem 1.5rem;
    padding-right: 3.5rem;
    border-radius: 50px;
    border: none;
    font-size: 1.05rem;
    box-shadow: 0 6px 20px rgba(0,0,0,0.25);
}

.search-btn {
    position: absolute;
    right: 5px;
    top: 5px;
    height: calc(100% - 10px);
    width: 50px;
    border: none;
    background-color: var(--secondary-color);
    color: var(--white);
    border-radius: 50px;
    cursor: pointer;
    transition: var(--transition);
}

.search-btn:hover {
    background-color: #d64b00;
}

/* --- MAIN CONTENT --- */
main {
    max-width: 1200px;
    margin: 4rem auto;
    padding: 0 2rem;
}

.section-header {
    text-align: center;
    margin-bottom: 3.5rem;
}

.section-header h2 {
    font-size: 2.2rem;
    color: var(--primary-color);
    margin-bottom: 0.8rem;
}

.section-header p {
    color: var(--text-light);
    max-width: 700px;
    margin: 0 auto;
    font-size: 1.05rem;
}

/* --- GRID SYSTEM --- */
.centres-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
    gap: 2.5rem;
}

/* --- CARDS --- */
.card {
    background-color: var(--white);
    border-radius: 12px;
    overflow: hidden;
    box-shadow: var(--shadow);
    transition: var(--transition);
    display: flex;
    flex-direction: column;
    border: 1px solid rgba(0,0,0,0.03);
}

.card:hover {
    transform: translateY(-8px);
    box-shadow: 0 15px 30px rgba(0,0,0,0.12);
}

.card-image {
    height: 160px;
    background-color: #eee;
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
}

.card-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    opacity: 0.85;
    transition: transform 0.5s ease;
}

.card:hover .card-image img {
    transform: scale(1.1);
}

/* --- CARD LOGO OVERLAY (CORRECTION LOGOS) --- */
.card-logo-overlay {
    position: absolute;
    bottom: -35px;
    left: 20px;
    width: 80px;
    height: 80px; /* Hauteur fixe assurée */
    background-color: var(--white);
    border-radius: 7px;
    padding: 5px;
    box-shadow: 0 4px 10px rgba(0,0,0,0.15);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 10;
    border-left: 4px solid var(--secondary-color);
    overflow: hidden; /* Empêche le logo de dépasser s'il est trop grand */
}

.card-logo-overlay img {
    width: 100%;
    height: 100%;
    object-fit: contain; /* IMPORTANT : Garde le logo intact sans le déformer */
    display: block;     /* Corrige parfois les bugs d'affichage d'images inline */
}

.card-content {
    padding: 3rem 1.8rem 1.8rem 1.8rem; /* Extra padding top for logo */
    flex-grow: 1;
    display: flex;
    flex-direction: column;
}

.card-title {
    font-size: 1.35rem;
    font-weight: 700;
    margin-bottom: 0.5rem;
    color: var(--primary-color);
}

.card-location {
    font-size: 0.9rem;
    color: var(--text-light);
    margin-bottom: 1rem;
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.card-location i {
    color: var(--secondary-color);
    margin-right: 5px;
}

/* --- CARD DETAILS (Address & Phone) --- */
.card-details {
    background-color: #f8f9fa;
    padding: 1rem;
    border-radius: 8px;
    margin-bottom: 1.2rem;
    border-left: 3px solid var(--secondary-color);
}

.card-details p {
    margin-bottom: 0.5rem;
    font-size: 0.9rem;
    color: #444;
    display: flex;
    align-items: flex-start;
}

.card-details p:last-child {
    margin-bottom: 0;
}

.card-details i {
    margin-right: 8px;
    color: var(--primary-color);
    margin-top: 3px; /* Align icon with text */
}

/* --- END CARD DETAILS --- */

.card-desc {
    font-size: 0.95rem;
    color: var(--text-light);
    margin-bottom: 1.5rem;
    flex-grow: 1;
}

.card-footer {
    margin-top: auto;
}

.btn-visit {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    padding: 0.9rem;
    border: 2px solid var(--primary-color);
    color: var(--primary-color);
    border-radius: 8px;
    font-weight: 600;
    transition: var(--transition);
    background: transparent;
}

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

.btn-visit i {
    margin-left: 10px;
}

/* --- FOOTER --- */
footer {
    background-color: var(--primary-color);
    color: var(--white);
    padding: 4rem 2rem 2rem;
    margin-top: 5rem;
}

.footer-content {
    max-width: 1200px;
    margin: 0 auto;
    /* MODIFICATION ICI : 1fr 1fr pour 2 colonnes égales */
    grid-template-columns: repeat(2, 1fr);
    gap: 2.5rem;
}

/* Le reste de votre footer-col et footer-bottom reste identique... */

.footer-col h3 {
    margin-bottom: 1.2rem;
    color: var(--secondary-color);
    font-size: 1.2rem;
}

.footer-col ul li {
    margin-bottom: 0.8rem;
}

.footer-col ul li a:hover {
    color: var(--secondary-color);
    text-decoration: underline;
}

.footer-bottom {
    text-align: center;
    margin-top: 3.5rem;
    padding-top: 1.5rem;
    border-top: 1px solid rgba(255,255,255,0.15);
    font-size: 0.9rem;
    opacity: 0.8;
}

/* --- RESPONSIVE --- */
@media (max-width: 768px) {
    .navbar {
        flex-direction: column;
        gap: 1.5rem;
    }

    .nav-links {
        gap: 1.5rem;
        flex-wrap: wrap;
        justify-content: center;
    }

    .hero h1 {
        font-size: 2rem;
    }
    
    .hero p {
        font-size: 1rem;
    }

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