/* Variables CSS */
:root {
    --blue-primary: #208DCC;
    --red-primary: #FF0000;
    --white: #ffffff;
    --gray-light: #f5f5f5;
    --gray-dark: #333333;
    --shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
}

/* Reset et styles de base */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Arial', sans-serif;
    line-height: 1.6;
    color: var(--gray-dark);
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

/* Navbar Styles */
.navbar {
    background-color: var(--white);
    box-shadow: var(--shadow);
    position: sticky;
    top: 0;
    z-index: 1000;
}

.nav-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    height: 70px;
}

.nav-logo img {
    height: 50px;
    width: auto;
}

.nav-menu {
    display: flex;
    list-style: none;
    align-items: center;
    gap: 30px;
}

.nav-link {
    text-decoration: none;
    color: var(--gray-dark);
    font-weight: 500;
    transition: color 0.3s ease;
    display: flex;
    align-items: center;
}

.nav-link:hover {
    color: var(--blue-primary);
}

.home-icon {
    width: 20px;
    height: 20px;
}

.nav-toggle {
    display: none;
    flex-direction: column;
    background: none;
    border: none;
    cursor: pointer;
    padding: 5px;
}

.hamburger {
    width: 25px;
    height: 3px;
    background-color: var(--gray-dark);
    margin: 3px 0;
    transition: 0.3s;
}

/* Hero Section */
.hero-section {
    position: relative;
    height: 400px;
    overflow: hidden;
}

.hero-image {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.hero-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.2);
}

/* Section Title */
.section-title {
    text-align: center;
    padding: 40px 20px;
    background-color: var(--white);
}

.section-title h1 {
    color: var(--gray-dark);
    font-size: 2rem;
    font-weight: bold;
    position: relative;
    display: inline-block;
}

.section-title h1::before,
.section-title h1::after {
    content: '';
    position: absolute;
    top: 50%;
    width: 100px;
    height: 2px;
    background-color: var(--blue-primary);
}

.section-title h1::before {
    right: calc(100% + 20px);
}

.section-title h1::after {
    left: calc(100% + 20px);
}

/* Cards Section */
.cards-section {
    padding: 60px 20px;
    background-color: var(--gray-light);
}

.cards-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 30px;
    max-width: 1200px;
    margin: 0 auto;
}

.donation-card {
    background-color: var(--white);
    border-radius: 10px;
    box-shadow: var(--shadow);
    overflow: hidden;
    transition: transform 0.3s ease;
    display: flex;
    flex-direction: column;
}

.donation-card:hover {
    transform: translateY(-10px);
}

.card-header {
    padding: 30px;
    text-align: center;
    background-color: var(--white);
    flex-shrink: 0; /* Empêche la compression du header */
}

.card-body {
    background-color: var(--blue-primary);
    padding: 30px;
    color: var(--white);
    display: flex;
    flex-direction: column;
    flex-grow: 1; /* Prend tout l'espace disponible */
}

.card-body p {
    font-size: 0.9rem;
    line-height: 1.5;
    margin-bottom: 20px;
    flex-grow: 1; /* Le paragraphe prend l'espace disponible */
}

.card-button {
    width: 100%;
    padding: 12px 24px;
    background-color: var(--white);
    color: var(--blue-primary);
    border: none;
    border-radius: 25px;
    font-weight: bold;
    cursor: pointer;
    transition: background-color 0.3s ease;
    margin-top: auto; /* Pousse le bouton vers le bas */
}

.heart-icon {
    background-color: var(--gray-light);
    width: 60px;
    height: 60px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 20px;
}

.heart-icon svg {
    width: 30px;
    height: 30px;
    color: var(--white);
}

.card-amount {
    color: var(--red-primary);
    font-size: 1.8rem;
    font-weight: bold;
}

.card-button:hover {
    background-color: var(--gray-light);
}

/* Quote Section */
.quote-section {
    padding: 60px 20px;
    background-color: var(--white);
    text-align: center;
}

.quote-text {
    font-size: 1.5rem;
    font-style: italic;
    color: var(--gray-dark);
}

.highlight-red {
    color: var(--red-primary);
    font-weight: bold;
}

.highlight-blue {
    color: var(--blue-primary);
    font-weight: bold;
}

/* Video Section */
.video-section {
    padding: 60px 20px;
    background-color: var(--gray-light);
}

.video-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 40px;
    align-items: center;
    max-width: 1200px;
    margin: 0 auto;
}

.video-container {
    position: relative;
    width: 100%;
    background-color: var(--gray-dark);
    border-radius: 10px;
    overflow: hidden;
    box-shadow: var(--shadow);
}

.video-player {
    width: 100%;
    height: auto;
    display: block;
    background-color: #000;
}

.video-content {
    padding: 20px;
}

.video-title {
    font-size: 2rem;
    font-weight: bold;
    color: var(--red-primary);
    margin-bottom: 20px;
    line-height: 1.2;
}

.video-description {
    font-size: 1rem;
    line-height: 1.6;
    color: var(--gray-dark);
    margin-bottom: 30px;
}

.video-cta-button {
    padding: 15px 40px;
    background-color: var(--blue-primary);
    color: var(--white);
    border: none;
    border-radius: 25px;
    font-weight: bold;
    font-size: 1rem;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: var(--shadow);
}

.video-cta-button:hover {
    background-color: #1a7aad;
    transform: translateY(-2px);
    box-shadow: 0 6px 12px rgba(0, 0, 0, 0.15);
}

/* Partners Section */
.partners-section {
    padding: 60px 20px;
    background-color: var(--white);
    text-align: center;
}

.partners-title {
    font-size: 1.8rem;
    font-weight: bold;
    color: var(--gray-dark);
    margin-bottom: 20px;
    position: relative;
    display: inline-block;
}

.partners-title::after {
    content: '';
    position: absolute;
    bottom: -10px;
    left: 0;
    width: 100%;
    height: 4px;
    background-color: var(--blue-primary);
}

.partners-description {
    max-width: 800px;
    margin-top: 30px;
    margin-bottom: 0px;
    margin-left : auto;
    margin-right: auto;
    color: #666;
    line-height: 1.6;
}

.partners-button {
    padding: 12px 30px;
    background-color: var(--blue-primary);
    color: var(--white);
    border: none;
    border-radius: 25px;
    font-weight: bold;
    cursor: pointer;
    margin-top: 20px;
    transition: background-color 0.3s ease;
}

.partners-button:hover {
    background-color: #1a7aad;
}

/* Partners Logos Scrolling */
.partners-logos-container {
    width: 100%;
    overflow: hidden;
    margin-top: 40px;
    padding: 20px 0;
    position: relative;
}

.partners-logos-container::before,
.partners-logos-container::after {
    content: '';
    position: absolute;
    top: 0;
    width: 100px;
    height: 100%;
    z-index: 2;
    pointer-events: none;
}

.partners-logos-container::before {
    left: 0;
    background: linear-gradient(to right, var(--white), transparent);
}

.partners-logos-container::after {
    right: 0;
    background: linear-gradient(to left, var(--white), transparent);
}

.partners-logos-track {
    display: flex;
    gap: 60px;
    align-items: center;
    animation: scroll 60s linear infinite;
    width: max-content;
}

.partners-logos-track:hover {
    animation-play-state: paused;
}

.partners-logos-track img {
    height: 60px;
    width: auto;
    max-width: 150px;
    object-fit: contain;
    transition: filter 0.3s ease, transform 0.3s ease;
    flex-shrink: 0;
}

.partners-logos-track img:hover {
    transform: scale(1.1);
}

@keyframes scroll {
    0% {
        transform: translateX(0);
    }
    100% {
        transform: translateX(-50%);
    }
}

/* Footer */
.footer {
    background-color: var(--blue-primary);
    padding: 30px 20px;
}

.footer .container {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.footer-copyright {
    color: white;
    font-size: 0.9rem;
    margin: 0;
}

.social-icons {
    display: flex;
    justify-content: center;
    gap: 20px;
}

.social-icon {
    width: 40px;
    height: 40px;
    background-color: var(--gray-dark);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background-color 0.3s ease;
}

.social-icon:hover {
    background-color: var(--white);
}

.social-icon svg {
    width: 20px;
    height: 20px;
    color: var(--white);
}

.social-icon:hover svg {
    color: var(--blue-primary);
}

.heart-icon i {
    font-size: 30px;
    color: #e74c3c;
}

/* Styles pour le dropdown */
.nav-dropdown {
    position: relative;
}

.dropdown-icon {
    width: 12px;
    height: 12px;
    margin-left: 5px;
    transition: transform 0.3s ease;
}

/* Desktop - hover */
@media (min-width: 769px) {
    .nav-dropdown:hover .dropdown-icon {
        transform: rotate(180deg);
    }

    .dropdown-menu {
        position: absolute;
        top: 100%;
        left: 0;
        background-color: var(--white);
        min-width: 200px;
        box-shadow: var(--shadow);
        border-radius: 5px;
        list-style: none;
        padding: 10px 0;
        opacity: 0;
        visibility: hidden;
        transform: translateY(-10px);
        transition: all 0.3s ease;
        z-index: 1001;
    }

    .nav-dropdown:hover .dropdown-menu {
        opacity: 1;
        visibility: visible;
        transform: translateY(0);
    }
}

.dropdown-link {
    display: block;
    padding: 12px 20px;
    color: var(--gray-dark);
    text-decoration: none;
    transition: all 0.3s ease;
}

.dropdown-link:hover {
    background-color: var(--gray-light);
    color: var(--blue-primary);
}

/* Page accès refusé */
.access-denied-container {
    text-align: center;
    padding: 60px 20px;
    max-width: 600px;
    margin: 0 auto;
}

.access-denied-icon {
    font-size: 5rem;
    color: var(--red-primary);
    margin-bottom: 30px;
}

.access-denied-container h2 {
    color: var(--gray-dark);
    font-size: 1.8rem;
    margin-bottom: 15px;
}

.access-denied-container p {
    color: #666;
    font-size: 1.1rem;
    margin-bottom: 30px;
}

.access-denied-container .btn-retour-home {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    padding: 12px 24px;
    font-size: 1rem;
}
.btn-retour-home-primary {
    background-color: var(--blue-primary);
    color: white;
}

.btn-retour-home-primary:hover {
    background-color: #1a7aad;
}

@media (min-width: 769px) {
    .dropdown-link:hover {
        padding-left: 25px;
    }
}

/* Page Content Styles */
.page-hero {
    position: relative;
    width: 100%;
    margin-top: 0;
}

.page-hero img {
    width: 100%;
    height: auto;
    display: block;
}

.content-section {
    padding: 60px 20px;
    background-color: var(--white);
}

.content-wrapper {
    max-width: 1200px;
    margin: 0 auto;
}

.content-text {
    font-size: 1.1rem;
    line-height: 1.8;
    color: var(--gray-dark);
    margin-bottom: 40px;
    text-align: center;
}

.cta-container {
    text-align: center;
    padding: 40px 20px;
    background-color: var(--gray-light);
}

.cta-title {
    font-size: 1.8rem;
    font-weight: bold;
    color: var(--gray-dark);
    margin-bottom: 20px;
}

.cta-button {
    padding: 15px 40px;
    background-color: var(--blue-primary);
    color: var(--white);
    border: none;
    border-radius: 25px;
    font-weight: bold;
    font-size: 1.1rem;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: var(--shadow);
    text-decoration: none;
    display: inline-block;
}

.cta-button:hover {
    background-color: #1a7aad;
    transform: translateY(-2px);
    box-shadow: 0 6px 12px rgba(0, 0, 0, 0.15);
}

.image-container {
    max-width: 1200px;
    margin: 40px auto;
    padding: 0 20px;
}

.image-container img {
    width: 100%;
    height: auto;
    border-radius: 10px;
    box-shadow: var(--shadow);
}

/* Responsive Design */
@media (max-width: 968px) {
    .video-grid {
        grid-template-columns: 1fr;
        gap: 30px;
    }

    .video-content {
        text-align: center;
    }
    
    .partners-logos-track {
        gap: 40px;
        animation-duration: 30s;
    }
    
    .partners-logos-track img {
        height: 50px;
        max-width: 120px;
    }
}

@media (max-width: 768px) {
    /* Empêcher le scroll du body quand le menu est ouvert */
    body.menu-open {
        overflow: hidden;
        position: fixed;
        width: 100%;
        height: 100%;
    }

    .nav-toggle {
        display: flex;
        z-index: 1002;
    }

    .nav-menu {
        position: fixed;
        left: -100%;
        top: 70px;
        flex-direction: column;
        background-color: var(--white);
        width: 100%;
        text-align: center;
        transition: left 0.3s;
        box-shadow: var(--shadow);
        padding: 20px 0 40px 0;
        gap: 0;
        
        /* MODIFICATION CRITIQUE pour le scroll */
        height: calc(100vh - 70px);
        height: calc(100dvh - 70px); /* Pour mobile avec barre d'adresse */
        overflow-y: auto;
        overflow-x: hidden;
        -webkit-overflow-scrolling: touch;
        overscroll-behavior: contain; /* Empêche le scroll de se propager au body */
        z-index: 1001;
    }

    .nav-menu.active {
        left: 0;
    }

    .nav-item {
        width: 100%;
    }

    .nav-link {
        padding: 15px;
        width: 100%;
        justify-content: center;
    }

    /* Mobile - dropdown click */
    .nav-dropdown.active .dropdown-icon {
        transform: rotate(180deg);
    }

    .dropdown-menu {
        position: static;
        background-color: var(--gray-light);
        list-style: none;
        padding: 0;
        max-height: 0;
        overflow: hidden;
        opacity: 0;
        transition: max-height 0.3s ease, opacity 0.3s ease, padding 0.3s ease;
        border-radius: 5px;
        margin-top: 5px;
    }

    .nav-dropdown.active .dropdown-menu {
        max-height: 500px;
        opacity: 1;
        padding: 10px 0;
    }
    
    .dropdown-link {
        padding: 10px 30px;
        font-size: 0.95rem;
    }
    
    .dropdown-link:hover {
        padding-left: 35px;
    }

    .section-title h1 {
        font-size: 1.5rem;
    }

    .section-title h1::before,
    .section-title h1::after {
        display: none;
    }

    .cards-grid {
        grid-template-columns: 1fr;
    }

    .quote-text {
        font-size: 1.2rem;
    }

    .partners-title {
        font-size: 1.4rem;
    }

    .hero-section {
        height: 250px;
    }

    .video-title {
        font-size: 1.5rem;
    }

    .video-description {
        font-size: 0.95rem;
    }

    .video-cta-button {
        width: 100%;
        padding: 15px 30px;
    }

    .footer .container {
        flex-direction: column;
        gap: 1rem;
        text-align: center;
    }
    
    .footer-copyright {
        font-size: 0.8rem;
    }
    
    .cta-title {
        font-size: 1.4rem;
    }

    .content-text {
        font-size: 1rem;
    }
}

@media (max-width: 480px) {
    .section-title h1 {
        font-size: 1.2rem;
    }

    .card-amount {
        font-size: 1.5rem;
    }

    .quote-text {
        font-size: 1rem;
    }

    .video-title {
        font-size: 1.3rem;
    }

    .video-description {
        font-size: 0.9rem;
    }
    
    .partners-logos-track {
        gap: 30px;
        animation-duration: 25s;
    }
    
    .partners-logos-track img {
        height: 40px;
        max-width: 100px;
    }
    
    .cta-title {
        font-size: 1.2rem;
    }

    .cta-button {
        width: 100%;
        padding: 15px 30px;
    }
}