
:root {
    --primary-color: #8b1a3b;
    --secondary-color: #f8c300;
    --accent-color: #2a623d;
    --light-color: #f8f9fa;
    --dark-color: #1a1a1a;
    --gradient-primary: linear-gradient(135deg, #8b1a3b 0%, #6e152f 100%);
    --gradient-secondary: linear-gradient(135deg, #f8c300 0%, #e0b000 100%);
    --gradient-accent: linear-gradient(135deg, #2a623d 0%, #1e4a2d 100%);
}

/* ===== GLOBAL STYLES ===== */
body {
    font-family: 'Open Sans', sans-serif;
    color: var(--dark-color);
    line-height: 1.8;
    overflow-x: hidden;
    padding-top: 80px;
}

h1, h2, h3, h4, h5, h6, .navbar-brand {
    font-family: 'Montserrat', sans-serif;
    font-weight: 700;
}

/* ===== NAVBAR ===== */
.navbar {
    background: rgba(255, 255, 255, 0.98);
    backdrop-filter: blur(10px);
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.08);
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

.navbar.scrolled {
    padding: 0.7rem 0;
    box-shadow: 0 6px 25px rgba(139, 26, 59, 0.15);
}

.nav-link {
    font-weight: 500;
    margin: 0 0.4rem;
    position: relative;
    transition: all 0.3s ease;
}

.nav-link::after {
    content: '';
    position: absolute;
    width: 0;
    height: 3px;
    background: var(--gradient-primary);
    bottom: -2px;
    left: 0;
    transition: width 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    border-radius: 2px;
}

.nav-link:hover::after,
.nav-link.active::after {
    width: 100%;
}

/* ===== PAGE HEADER - IMPROVED VERSION ===== *
.page-header {
    position: relative;
    overflow: hidden;
    margin-top: -80px;
    min-height: 80vh;
    display: flex;
    align-items: flex-end;
}

.page-header-bg {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 1;
}

.page-header-img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center;
    animation: zoomIn 20s ease-in-out infinite alternate;
}

.page-header-overlay {
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    height: 70%;
    background: linear-gradient(to top, 
        rgba(0, 0, 0, 0.95) 0%,
        rgba(0, 0, 0, 0.7) 40%,
        rgba(0, 0, 0, 0.4) 70%,
        rgba(0, 0, 0, 0) 100%);
    z-index: 2;
}

.page-header-content {
    position: relative;
    z-index: 3;
    padding-bottom: 100px;
    width: 100%;
}

.page-header-title {
    color: white;
    font-size: 3.5rem;
    font-weight: 800;
    margin-bottom: 1.5rem;
    text-shadow: 2px 2px 8px rgba(0, 0, 0, 0.5);
    opacity: 0;
    transform: translateY(30px);
    animation: fadeInUp 1s ease 0.3s forwards;
}

.page-header-subtitle {
    color: rgba(255, 255, 255, 0.95);
    font-size: 1.3rem;
    max-width: 700px;
    margin: 0 auto 2.5rem;
    text-shadow: 1px 1px 4px rgba(0, 0, 0, 0.5);
    opacity: 0;
    transform: translateY(30px);
    animation: fadeInUp 1s ease 0.6s forwards;
}

.page-header-breadcrumb {
    opacity: 0;
    transform: translateY(30px);
    animation: fadeInUp 1s ease 0.9s forwards;
    background: rgba(0, 0, 0, 0.3);
    backdrop-filter: blur(5px);
    border-radius: 12px;
    padding: 15px 20px;
    display: inline-block;
}

.page-header-scroll {
    position: absolute;
    bottom: 30px;
    left: 50%;
    transform: translateX(-50%);
    z-index: 3;
    opacity: 0;
    animation: fadeIn 1s ease 1.2s forwards;
}

.scroll-down-link {
    display: inline-block;
    width: 50px;
    height: 50px;
    border: 2px solid rgba(255, 255, 255, 0.5);
    border-radius: 50%;
    color: white;
    text-decoration: none;
    transition: all 0.3s ease;
    animation: bounce 2s infinite;
}

.scroll-down-link:hover {
    background-color: rgba(255, 255, 255, 0.1);
    border-color: white;
    transform: scale(1.1);
}

.scroll-down-link i {
    line-height: 46px;
    font-size: 1.2rem;
}

*/

/* ===== PAGE HEADER - CONTENU EN BAS ===== */
.page-header {
    position: relative;
    overflow: hidden;
    margin-top: -80px;
    min-height: 80vh;
    display: flex;
    align-items: flex-end; /* Aligne tout en bas */
    padding: 0;
}

.page-header-bg {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 1;
}

.page-header-img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center;
    animation: zoomIn 20s ease-in-out infinite alternate;
    display: block;
}

/* Overlay plus dense en bas pour la partie sombre */
.page-header-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(to top, 
        rgba(0, 0, 0, 0.95) 0%,        /* Très sombre en bas */
        rgba(0, 0, 0, 0.85) 20%,      /* Sombre */
        rgba(0, 0, 0, 0.7) 40%,       /* Moyen */
        rgba(0, 0, 0, 0.4) 70%,       /* Clair */
        rgba(0, 0, 0, 0.2) 85%,       /* Très clair */
        rgba(0, 0, 0, 0) 100%         /* Transparent en haut */
    );
    z-index: 2;
}

/* Conteneur qui s'aligne automatiquement en bas */
.page-header .container {
    position: relative;
    z-index: 3;
    width: 100%;
    padding-bottom: 80px; /* Espace depuis le bas */
    margin-top: auto; /* Pousse vers le bas */
}

/* Le contenu lui-même */
.page-header-content {
    max-width: 800px;
    margin: 0 auto;
}

/* Version avec contenu aligné à gauche sur desktop */
.page-header-content.text-lg-start {
    margin: 0;
    margin-right: auto;
}

/* Ajustements pour mobile */
@media (max-width: 768px) {
    .page-header {
        min-height: 70vh;
        margin-top: -70px;
    }
    
    .page-header .container {
        padding-bottom: 60px;
        padding-left: 20px;
        padding-right: 20px;
    }
    
    .page-header-content {
        text-align: center;
        max-width: 100%;
    }
}

@media (max-width: 576px) {
    .page-header {
        min-height: 60vh;
    }
    
    .page-header .container {
        padding-bottom: 40px;
        padding-left: 15px;
        padding-right: 15px;
    }
    
    .page-header-title {
        font-size: 2.2rem !important;
    }
    
    .page-header-subtitle {
        font-size: 1.1rem !important;
    }
}

/* Pour s'assurer que le contenu ne dépasse pas */
.page-header * {
    box-sizing: border-box;
}

/* Overlay plus dense si nécessaire */
.page-header-overlay-dense {
    background: linear-gradient(to top, 
        rgba(0, 0, 0, 0.98) 0%,
        rgba(0, 0, 0, 0.95) 15%,
        rgba(0, 0, 0, 0.9) 30%,
        rgba(0, 0, 0, 0.7) 50%,
        rgba(0, 0, 0, 0.4) 70%,
        rgba(0, 0, 0, 0) 100%
    ) !important;
}

/* ===== HERO SECTION ===== */
.hero-section {
    color: #fff;
    padding: 140px 0 100px;
    position: relative;
    overflow: hidden;
    margin-top: -80px;
}

.hero-bg-img {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    z-index: 1;
}

.hero-overlay {
    position: absolute;
    inset: 0;
    background: linear-gradient(135deg, rgba(139, 26, 59, 0.92) 0%, rgba(42, 98, 61, 0.88) 100%);
    z-index: 2;
}

.hero-section .container {
    position: relative;
    z-index: 3;
}

.hero-title {
    font-size: 3.5rem;
    font-weight: 800;
    margin-bottom: 1.5rem;
    line-height: 1.2;
    color: white;
}

/* ===== SECTION TITLES ===== */
.section-title {
    position: relative;
    margin-bottom: 3.5rem;
    padding-bottom: 1.2rem;
    font-weight: 800;
    font-size: 2.5rem;
}

.section-title::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 80px;
    height: 5px;
    background: var(--gradient-primary);
    border-radius: 2px;
}

.section-title.text-center::after {
    left: 50%;
    transform: translateX(-50%);
}

/* ===== CARDS ===== */
.card-feature {
    border: none;
    border-radius: 20px;
    overflow: hidden;
    transition: all 0.5s cubic-bezier(0.4, 0, 0.2, 1);
    height: 100%;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.08);
    background: white;
}

.card-feature:hover {
    transform: translateY(-15px);
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.15);
}

.card-feature .card-icon {
    width: 80px;
    height: 80px;
    border-radius: 50%;
    background: linear-gradient(135deg, rgba(139, 26, 59, 0.1) 0%, rgba(139, 26, 59, 0.05) 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 1.8rem;
    transition: all 0.4s ease;
}

.card-feature:hover .card-icon {
    transform: scale(1.1);
    background: var(--gradient-primary);
}

.card-feature:hover .card-icon i {
    color: white;
}

.card-feature .card-icon i {
    font-size: 2rem;
    color: var(--primary-color);
    transition: all 0.4s ease;
}

/* ===== BUTTONS ===== */
.btn-primary {
    background: var(--gradient-primary);
    border: none;
    padding: 0.8rem 2rem;
    font-weight: 600;
    border-radius: 50px;
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
    overflow: hidden;
    z-index: 1;
}

.btn-primary:hover {
    transform: translateY(-3px);
    box-shadow: 0 10px 25px rgba(139, 26, 59, 0.3);
}

.btn-secondary {
    background: var(--gradient-secondary);
    border: none;
    color: var(--dark-color);
    padding: 0.8rem 2rem;
    font-weight: 600;
    border-radius: 50px;
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

.btn-secondary:hover {
    transform: translateY(-3px);
    box-shadow: 0 10px 25px rgba(248, 195, 0, 0.3);
}

/* ===== ANIMATIONS ===== */
.fade-in-up {
    opacity: 0;
    transform: translateY(30px);
    transition: all 0.8s cubic-bezier(0.4, 0, 0.2, 1);
}

.fade-in-up.active {
    opacity: 1;
    transform: translateY(0);
}

.fade-in-left {
    opacity: 0;
    transform: translateX(-30px);
    transition: all 0.8s cubic-bezier(0.4, 0, 0.2, 1);
}

.fade-in-left.active {
    opacity: 1;
    transform: translateX(0);
}

.fade-in-right {
    opacity: 0;
    transform: translateX(30px);
    transition: all 0.8s cubic-bezier(0.4, 0, 0.2, 1);
}

.fade-in-right.active {
    opacity: 1;
    transform: translateX(0);
}

.scale-in {
    opacity: 0;
    transform: scale(0.8);
    transition: all 0.8s cubic-bezier(0.4, 0, 0.2, 1);
}

.scale-in.active {
    opacity: 1;
    transform: scale(1);
}

.staggered-animation > * {
    opacity: 0;
    transform: translateY(30px);
    transition: all 0.6s cubic-bezier(0.4, 0, 0.2, 1);
}

.staggered-animation.active > * {
    opacity: 1;
    transform: translateY(0);
}

.staggered-animation.active > *:nth-child(1) { transition-delay: 0.1s; }
.staggered-animation.active > *:nth-child(2) { transition-delay: 0.2s; }
.staggered-animation.active > *:nth-child(3) { transition-delay: 0.3s; }
.staggered-animation.active > *:nth-child(4) { transition-delay: 0.4s; }
.staggered-animation.active > *:nth-child(5) { transition-delay: 0.5s; }
.staggered-animation.active > *:nth-child(6) { transition-delay: 0.6s; }

/* ===== PAGE ANIMATIONS ===== */
@keyframes zoomIn {
    0% { transform: scale(1); }
    100% { transform: scale(1.1); }
}

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

@keyframes bounce {
    0%, 20%, 50%, 80%, 100% { transform: translateY(0) translateX(-50%); }
    40% { transform: translateY(-10px) translateX(-50%); }
    60% { transform: translateY(-5px) translateX(-50%); }
}

/* ===== IMPACT CARDS ===== */
.impact-card {
    border-radius: 24px;
    padding: 2.5rem 1.5rem;
    transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    border: 1px solid rgba(0,0,0,0.05) !important;
}

.impact-card:hover {
    transform: translateY(-12px);
    box-shadow: 0 20px 40px rgba(0,0,0,0.1) !important;
}

.impact-valeur {
    font-size: 3.5rem;
    font-weight: 800;
    line-height: 1;
    margin-bottom: 0.5rem;
    display: block;
}

.impact-icon-wrapper {
    width: 70px;
    height: 70px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 1.5rem;
    font-size: 1.5rem;
}

.counter-animated {
    font-size: 3rem;
    font-weight: 800;
    background: var(--gradient-primary);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    line-height: 1;
}

/* ===== BACKGROUND GRADIENTS ===== */
.bg-gradient-bordeaux { background: linear-gradient(135deg, #8b1a3b 0%, #a5264b 100%); }
.bg-gradient-vert { background: linear-gradient(135deg, #2a623d 0%, #3a8252 100%); }
.bg-gradient-or { background: linear-gradient(135deg, #f8c300 0%, #ffdb4d 100%); }

/* ===== GLASS EFFECT ===== */
.glass-card {
    background: rgba(255, 255, 255, 0.9);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 20px;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.1);
}

/* ===== ABOUT PAGE ===== */
.image-container {
    position: relative;
    padding: 20px;
}

.img-profile {
    position: relative;
    z-index: 1;
    border-radius: 20px;
    box-shadow: 20px 20px 60px rgba(0,0,0,0.15);
    transition: transform 0.5s ease;
}

.img-profile:hover {
    transform: scale(1.02);
}

.experience-badge {
    position: absolute;
    bottom: 40px;
    right: 0;
    background: var(--gradient-primary);
    color: white;
    padding: 20px;
    border-radius: 15px;
    box-shadow: 0 10px 30px rgba(139, 26, 59, 0.3);
    z-index: 2;
    text-align: center;
    min-width: 150px;
}

.info-card-modern {
    background: rgba(255, 255, 255, 0.9);
    border: 1px solid rgba(139, 26, 59, 0.1);
    border-left: 5px solid var(--primary-color);
    transition: all 0.3s ease;
}

.info-card-modern:hover {
    background: white;
    box-shadow: 0 15px 35px rgba(139, 26, 59, 0.1) !important;
}

.slogan-box {
    border-left: 4px solid var(--secondary-color);
    padding-left: 20px;
    margin: 25px 0;
}

.value-item {
    display: flex;
    align-items: flex-start;
    margin-bottom: 2rem;
    padding: 1.5rem;
    border-radius: 15px;
    transition: all 0.4s ease;
    background: rgba(255, 255, 255, 0.8);
    box-shadow: 0 5px 20px rgba(0, 0, 0, 0.05);
}

.value-item:hover {
    transform: translateY(-10px);
    box-shadow: 0 15px 35px rgba(0, 0, 0, 0.1);
    background: white;
}

.value-icon {
    width: 70px;
    height: 70px;
    border-radius: 50%;
    background: linear-gradient(135deg, rgba(139, 26, 59, 0.1) 0%, rgba(139, 26, 59, 0.05) 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    margin-right: 1.5rem;
    flex-shrink: 0;
}

.value-icon i {
    font-size: 1.8rem;
    color: var(--primary-color);
}

/* ===== NEWS ===== */
.news-card {
    border-radius: 20px;
    overflow: hidden;
    transition: all 0.5s cubic-bezier(0.4, 0, 0.2, 1);
    height: 100%;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.08);
    background: white;
}

.news-card:hover {
    transform: translateY(-10px);
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.15);
}

.news-image {
    height: 250px;
    width: 100%;
    object-fit: cover;
    transition: transform 0.5s ease;
}

.news-card:hover .news-image {
    transform: scale(1.05);
}

.news-category {
    position: absolute;
    top: 20px;
    left: 20px;
    background: var(--gradient-primary);
    color: white;
    padding: 6px 15px;
    border-radius: 30px;
    font-size: 0.85rem;
    font-weight: 600;
}

.news-date {
    color: #6c757d;
    font-size: 0.9rem;
}

.news-read-more {
    color: var(--primary-color);
    font-weight: 600;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    transition: all 0.3s ease;
}

.news-read-more:hover {
    color: #6e152f;
    transform: translateX(5px);
}

.category-badge {
    display: inline-block;
    padding: 6px 15px;
    border-radius: 30px;
    font-size: 0.85rem;
    font-weight: 600;
    margin-right: 10px;
    margin-bottom: 10px;
}

.category-humanitaire { background: var(--gradient-primary); color: white; }
.category-education { background: var(--gradient-accent); color: white; }
.category-protection { background: #6f42c1; color: white; }
.category-developpement { background: var(--gradient-secondary); color: var(--dark-color); }

/* ===== RESPONSIVE ===== */
@media (max-width: 991px) {
    #navbarNav {
        display: none;
        background: white;
        padding: 20px;
        border-radius: 14px;
        margin-top: 15px;
        box-shadow: 0 10px 30px rgba(0,0,0,0.15);
    }
    
    .navbar-toggler i {
        font-size: 1.4rem;
        transition: transform 0.3s ease;
    }
    
    .navbar-toggler.active i {
        transform: rotate(90deg);
    }
}

@media (max-width: 768px) {
    body {
        padding-top: 70px;
    }
    
    .page-header {
        min-height: 60vh;
        margin-top: -70px;
    }
    
    .page-header-title {
        font-size: 2.5rem;
    }
    
    .page-header-subtitle {
        font-size: 1.1rem;
        padding: 0 15px;
    }
    
    .hero-section {
        padding: 120px 0 80px;
        margin-top: -70px;
    }
    
    .hero-title {
        font-size: 2.5rem;
    }
    
    .section-title {
        font-size: 2rem;
    }
    
    .impact-valeur {
        font-size: 2.5rem;
    }
    
    .counter-animated {
        font-size: 2.5rem;
    }
    
    .value-item {
        flex-direction: column;
        text-align: center;
    }
    
    .value-icon {
        margin-right: 0;
        margin-bottom: 1rem;
    }
}

@media (max-width: 576px) {
    .page-header {
        min-height: 50vh;
    }
    
    .page-header-title {
        font-size: 2rem;
    }
    
    .page-header-subtitle {
        font-size: 1rem;
    }
    
    .page-header-content {
        padding-bottom: 80px;
    }
}
