:root {
    --primary-blue: #0056b3;
    --primary-green: #28a745;
    --text-dark: #333;
    --text-light: #666;
    --white: #ffffff;
    --light-gray: #f8f9fa;
    --transition: all 0.3s ease;
}

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

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    line-height: 1.6;
    color: var(--text-dark);
    background-color: var(--white);
    display: flex;
    flex-direction: column;
    min-height: 100vh;
}


/* Header & Nav */

header {
    background-color: var(--white);
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
    position: sticky;
    top: 0;
    z-index: 1000;
    width: 100%;
}

.navbar {
    min-height: 70px;
    display: flex;
    align-items: center;
}

.nav-container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    width: 100%;
}

.nav-logo {
    text-decoration: none;
    display: flex;
    align-items: center;
}

.nav-logo img {
    height: 50px;
    width: auto;
}

.nav-menu {
    display: flex;
    align-items: center;
    list-style: none;
    gap: 1.5rem;
}

.nav-link {
    text-decoration: none;
    color: var(--text-dark);
    font-weight: 600;
    transition: var(--transition);
}

.nav-link:hover {
    color: var(--primary-green);
}


/* Special styling for the "Faire un don" button in the nav */

.nav-item .btn-primary {
    padding: 8px 20px;
}

.hamburger {
    display: none;
    cursor: pointer;
}

.bar {
    display: block;
    width: 25px;
    height: 3px;
    margin: 5px auto;
    -webkit-transition: all 0.3s ease-in-out;
    transition: all 0.3s ease-in-out;
    background-color: var(--text-dark);
}


/* Buttons */

.btn {
    display: inline-block;
    padding: 10px 25px;
    border-radius: 50px;
    text-decoration: none;
    font-weight: bold;
    transition: var(--transition);
    margin: 5px;
    cursor: pointer;
    border: 2px solid transparent;
}

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

.btn-primary:hover {
    background-color: #218838;
}

.btn-secondary {
    background-color: transparent;
    border-color: var(--white);
    color: var(--white);
}

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

.btn-outline {
    border-color: var(--primary-blue);
    color: var(--primary-blue);
}

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

.btn-danger {
    background-color: #dc3545;
    color: var(--white);
    border-color: #dc3545;
}

.btn-danger:hover {
    background-color: #c82333;
    border-color: #bd2130;
}

.btn-outline-white {
    border-color: var(--white);
    color: var(--white);
}

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


/* Sections General */

.section-padding {
    padding: 60px 20px;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 15px;
}

.text-center {
    text-align: center;
}

.text-white {
    color: var(--white);
}

.bg-light {
    background-color: var(--light-gray);
}

.bg-blue {
    background-color: var(--primary-blue);
}

h2.section-title {
    font-size: 2.5rem;
    color: var(--primary-blue);
}


/* General content styling */

.section-padding h3 {
    font-size: 1.8rem;
    color: var(--primary-blue);
    margin-bottom: 15px;
    margin-top: 30px;
}

.section-padding p {
    margin-bottom: 15px;
}


/* Hero Section */

.hero {
    background: linear-gradient(rgba(0, 86, 179, 0.7), rgba(40, 167, 69, 0.6)), url('https://images.unsplash.com/photo-1488521787991-ed7bbaae773c?ixlib=rb-4.0.3&auto=format&fit=crop&w=1920&q=80');
    background-size: cover;
    background-position: center;
    height: 80vh;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    color: var(--white);
}

.hero h1 {
    font-size: 3rem;
    margin-bottom: 1rem;
    line-height: 1.2;
}

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

.hero-buttons .btn-outline {
    border-color: var(--white);
    color: var(--white);
}

.hero-buttons .btn-outline:hover {
    background: var(--white);
    color: var(--primary-blue);
}


/* Page Header */

.page-header {
    background: linear-gradient(rgba(0, 86, 179, 0.7), rgba(40, 167, 69, 0.6)), url('https://images.unsplash.com/photo-1488521787991-ed7bbaae773c?ixlib=rb-4.0.3&auto=format&fit=crop&w=1920&q=80');
    background-size: cover;
    background-position: center;
    padding: 80px 20px;
    text-align: center;
    color: var(--white);
}

.page-header h1 {
    font-size: 2.8rem;
    margin: 0;
    line-height: 1.2;
}


/* Cards Grid */

.grid-4 {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 30px;
}

.grid-3 {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 30px;
}

.grid-2 {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 30px;
}

.card {
    background: var(--white);
    border-radius: 10px;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.05);
    transition: var(--transition);
    display: flex;
    flex-direction: column;
    position: relative;
    overflow: hidden;
    /* Pour contenir le pseudo-élément */
}

.card-body {
    padding: 30px;
    flex-grow: 1;
    /* Permet au corps de la carte de grandir */
    position: relative;
    z-index: 2;
}

.card-img-top {
    width: 100%;
    height: 200px;
    /* Hauteur fixe pour l'uniformité */
    object-fit: cover;
    /* Assure que l'image couvre la zone sans se déformer */
    border-top-left-radius: 10px;
    border-top-right-radius: 10px;
}

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

.card .icon {
    font-size: 3rem;
    margin-bottom: 20px;
    display: block;
}

.card h3 {
    color: var(--primary-blue);
    margin-bottom: 15px;
}


/* Card Content Specifics */

.card-body h3 {
    margin-top: 0;
}

.card-body strong {
    display: block;
    margin-top: 15px;
    margin-bottom: 10px;
    color: var(--primary-blue);
    font-weight: 600;
}


/* Disable hover effect for specific cards */

.card.no-hover:hover {
    transform: none;
}


/* Styles spécifiques pour les cartes de programme avec image de fond */

.program-card {
    background-size: cover;
    background-position: center;
    color: var(--white);
}

.program-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(rgba(0, 86, 179, 0.7), rgba(40, 167, 69, 0.6));
    z-index: 1;
    transition: var(--transition);
}

.program-card:hover::before {
    opacity: 0.8;
}

.program-card-sante {
    background-image: url('https://images.unsplash.com/photo-1576091160550-2173dba999ef?auto=format&fit=crop&w=800&q=60');
}

.program-card-nutrition {
    background-image: url('https://images.unsplash.com/photo-1540420773420-3366772f4999?auto=format&fit=crop&w=800&q=60');
}

.program-card-education {
    background-image: url('https://images.unsplash.com/photo-1517495306984-f84210c9c24a?auto=format&fit=crop&w=800&q=60');
}

.program-card-assistance {
    background-image: url('https://images.unsplash.com/photo-1593113598332-cd288d649433?auto=format&fit=crop&w=800&q=60');
}

.program-card h3,
.program-card strong,
.program-card .styled-list li::before {
    color: var(--white);
}


/* Stats / Impact */

.stat-item {
    padding: 20px;
}

.stat-number {
    font-size: 3.5rem;
    font-weight: bold;
    display: block;
    margin-bottom: 10px;
}


/* Footer */

footer {
    background-color: #1a1a1a;
    color: #ccc;
    padding: 50px 0 0 0;
    margin-top: auto;
}

.footer-container {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 30px;
    padding-bottom: 40px;
}

.footer-about h4,
.footer-links h4,
.footer-social h4 {
    color: var(--white);
    font-size: 1.2rem;
    margin-bottom: 20px;
}

.footer-about .slogan {
    font-style: italic;
    margin-top: 10px;
    color: var(--primary-green);
}

.footer-logo {
    display: block;
    margin-bottom: 15px;
}

.footer-logo img {
    width: 60px;
    height: auto;
}

.footer-links ul {
    list-style: none;
}

.footer-links ul li a {
    color: #ccc;
    text-decoration: none;
    transition: var(--transition);
    display: block;
    margin-bottom: 10px;
}

.footer-links ul li a:hover {
    color: var(--white);
    padding-left: 5px;
}

.social-icons a {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background-color: #333;
    color: var(--white);
    text-decoration: none;
    margin-right: 10px;
    transition: var(--transition);
}

.social-icons a:hover {
    background-color: var(--primary-green);
}

.social-icons a svg {
    width: 20px;
    height: 20px;
    fill: currentColor;
}

.footer-bottom {
    background-color: #000;
    color: #888;
    text-align: center;
    padding: 15px 0;
    font-size: 0.9rem;
}


/* Responsive */

@media (max-width: 768px) {
    /* Sections générales */
    .section-padding {
        padding: 40px 20px;
    }
    h2.section-title {
        font-size: 2rem;
        margin-bottom: 30px;
    }
    .section-padding h3 {
        font-size: 1.6rem;
    }
    .page-header {
        padding: 60px 20px;
    }
    .page-header h1 {
        font-size: 2.2rem;
    }
    /* Hero Section */
    .hero {
        height: auto;
        min-height: 70vh;
        padding: 60px 20px;
    }
    .hero h1 {
        font-size: 2.2rem;
    }
    .hero .subtitle {
        font-size: 1.1rem;
    }
    .hero-buttons {
        display: flex;
        flex-direction: column;
        align-items: center;
        gap: 15px;
    }
    .hero-buttons .btn {
        width: 90%;
        max-width: 320px;
    }
    .footer-container {
        text-align: center;
    }
    .social-icons {
        text-align: center;
    }
    /* Grids */
    .grid-2 {
        grid-template-columns: 1fr;
    }
    .hide-on-mobile {
        display: none;
    }
}


/* Scroll to Top Button */

.scroll-to-top {
    position: fixed;
    bottom: 30px;
    right: 30px;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 50px;
    height: 50px;
    background-color: var(--primary-blue);
    color: var(--white);
    border-radius: 50%;
    text-decoration: none;
    font-size: 24px;
    font-weight: bold;
    z-index: 999;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.3s, visibility 0.3s, transform 0.3s;
    transform: translateY(20px);
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.2);
}

.scroll-to-top.show {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.scroll-to-top:hover {
    background-color: var(--primary-green);
}


/* Lists in content */

.styled-list {
    list-style: none;
    padding-left: 0;
}

.styled-list li {
    padding-left: 1.5em;
    text-indent: -1.5em;
    margin-bottom: 10px;
}

.styled-list li::before {
    content: '✔';
    color: var(--primary-green);
    margin-right: 10px;
    font-weight: bold;
}

.impact-list {
    list-style: none;
    padding: 0;
    display: inline-block;
    text-align: left;
}

.impact-list li {
    margin-bottom: 8px;
}

@media (max-width: 992px) {
    .hamburger {
        display: block;
    }
    .hamburger.active .bar:nth-child(2) {
        opacity: 0;
    }
    .hamburger.active .bar:nth-child(1) {
        transform: translateY(8px) rotate(45deg);
    }
    .hamburger.active .bar:nth-child(3) {
        transform: translateY(-8px) rotate(-45deg);
    }
    .nav-menu {
        position: fixed;
        left: -100%;
        top: 70px;
        /* Height of the navbar */
        flex-direction: column;
        background-color: var(--white);
        width: 100%;
        text-align: center;
        transition: 0.3s;
        box-shadow: 0 10px 27px rgba(0, 0, 0, 0.05);
        gap: 0;
        padding: 1rem 0;
    }
    .nav-menu.active {
        left: 0;
    }
    .nav-item {
        margin: 1rem 0;
    }
}


/* Form styles */

.form-group {
    margin-bottom: 1.5rem;
}

.form-group label {
    display: block;
    margin-bottom: 8px;
    font-weight: 600;
}

.form-control {
    width: 100%;
    padding: 12px 15px;
    border-radius: 5px;
    border: 1px solid #ccc;
    font-size: 1rem;
    transition: var(--transition);
}

.form-control:focus {
    outline: none;
    border-color: var(--primary-blue);
    box-shadow: 0 0 0 3px rgba(0, 86, 179, 0.2);
}

textarea.form-control {
    resize: vertical;
    min-height: 120px;
}


/* --- Utility Classes --- */

.text-left {
    text-align: left;
}

.text-light {
    color: var(--text-light);
}

.fw-bold {
    font-weight: bold;
}

.fs-1-1 {
    font-size: 1.1rem;
}

.fs-1-4 {
    font-size: 1.4rem;
}

.mt-0 {
    margin-top: 0 !important;
}

.mt-10 {
    margin-top: 10px;
}

.mt-30 {
    margin-top: 30px;
}

.mt-40 {
    margin-top: 40px;
}

.mt-50 {
    margin-top: 50px;
}

.mb-20 {
    margin-bottom: 20px;
}

.mb-30 {
    margin-bottom: 30px;
}

.mb-40 {
    margin-bottom: 40px;
}

.mb-50 {
    margin-bottom: 50px;
}

.mx-auto {
    margin-left: auto;
    margin-right: auto;
}

.max-w-800 {
    max-width: 800px;
}

.max-w-700 {
    max-width: 700px;
}

.max-w-500 {
    max-width: 500px;
}

.grid-col-span-full {
    grid-column: 1 / -1;
}

.d-flex {
    display: flex;
}

.justify-content-between {
    justify-content: space-between;
}

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

.align-items-center {
    align-items: center;
}

.gap-50 {
    gap: 50px;
}

.align-items-start {
    align-items: flex-start;
}


/* Admin page specific */

.admin-actions {
    display: flex;
    flex-direction: column;
    min-width: 110px;
    margin-left: 20px;
}

@media (max-width: 768px) {
    .card .d-flex {
        flex-direction: column;
    }
    .admin-actions {
        flex-direction: row;
        width: 100%;
        margin-left: 0;
        margin-top: 20px;
        gap: 10px;
    }
    .admin-actions .btn {
        margin-bottom: 0 !important;
    }
}


/* Article Detail Page */

.article-detail {
    text-align: left;
}

.article-title {
    font-size: 2.8rem;
    color: var(--primary-blue);
    margin-bottom: 15px;
    line-height: 1.2;
}

.article-meta {
    color: var(--text-light);
    margin-bottom: 30px;
    font-weight: bold;
}

.article-image {
    width: 100%;
    height: auto;
    max-height: 500px;
    object-fit: cover;
    border-radius: 10px;
    margin-bottom: 30px;
}

.article-content {
    font-size: 1.1rem;
    line-height: 1.8;
}


/* Card links */

.card-title-link {
    text-decoration: none;
    color: inherit;
    transition: var(--transition);
}

.card-title-link:hover {
    color: var(--primary-green);
}

.read-more-link {
    text-decoration: none;
    font-weight: bold;
    color: var(--primary-blue);
    transition: var(--transition);
    display: inline-block;
    margin-top: 15px;
}

.read-more-link:hover {
    color: var(--primary-green);
    transform: translateX(5px);
}


/* Search Form */

.search-form {
    display: flex;
    gap: 10px;
    max-width: 600px;
    margin-left: auto;
    margin-right: auto;
}

.search-form .form-control {
    flex-grow: 1;
}

.search-form .btn {
    flex-shrink: 0;
}


/* Pagination */

.pagination-nav {
    margin-top: 50px;
    display: flex;
    justify-content: center;
}

.pagination {
    list-style: none;
    padding: 0;
    display: flex;
    gap: 5px;
}

.page-link {
    display: block;
    padding: 10px 18px;
    text-decoration: none;
    color: var(--primary-blue);
    border: 1px solid #ddd;
    border-radius: 5px;
    transition: var(--transition);
}

.page-link:hover,
.page-item.active .page-link {
    background-color: var(--primary-blue);
    color: var(--white);
    border-color: var(--primary-blue);
}


/* Social Share Buttons */

.social-share {
    border-top: 1px solid #eee;
    border-bottom: 1px solid #eee;
    padding: 20px 0;
    text-align: center;
}

.social-share h4 {
    margin-top: 0;
    margin-bottom: 15px;
    font-size: 1.2rem;
    color: var(--text-dark);
}

.share-btn {
    display: inline-block;
    padding: 8px 16px;
    margin: 5px;
    border-radius: 5px;
    color: var(--white);
    text-decoration: none;
    font-weight: bold;
    transition: var(--transition);
    font-size: 0.9rem;
}

.share-btn:hover {
    opacity: 0.85;
}

.share-btn.facebook {
    background-color: #1877F2;
}

.share-btn.twitter {
    background-color: #1DA1F2;
}

.share-btn.linkedin {
    background-color: #0A66C2;
}

.share-btn.whatsapp {
    background-color: #25D366;
}