/* ================================================
   Frontend NGO Modern Enhancements
   Améliore le design visuel sans changer les fonctionnalités

   NOTE: Les variables sont définies dans design-tokens.css
   Utiliser var(--color-*) au lieu de var(--ngo-*)
   ================================================ */

/* ================================================
   Navbar Moderne
   ================================================ */
.navbar {
    backdrop-filter: blur(10px);
    background: rgba(255, 255, 255, 0.95) !important;
    box-shadow: 0 2px 20px rgba(0, 0, 0, 0.08);
    transition: all 0.3s ease;
    border-bottom: 1px solid rgba(0, 0, 0, 0.03);
}

.navbar-brand {
    transition: transform 0.3s ease;
}

.navbar-brand:hover {
    transform: scale(1.05);
}

.nav-link {
    position: relative;
    font-weight: 500;
    transition: color 0.3s ease;
    color: var(--color-text-primary);
}

.nav-link::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 0;
    height: 2px;
    background: var(--color-primary);
    transition: width 0.3s ease;
}

.nav-link:hover::after,
.nav-link.active::after {
    width: 80%;
}

.dropdown-menu {
    border: none;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.15);
    border-radius: 12px;
    padding: 0.5rem;
    margin-top: 0.5rem;
}

.dropdown-item {
    border-radius: 8px;
    padding: 0.7rem 1rem;
    transition: all 0.2s ease;
}

.dropdown-item:hover {
    background: linear-gradient(135deg, var(--color-primary), var(--color-secondary));
    color: white;
    transform: translateX(5px);
}

/* ================================================
   Typography
   ================================================ */
.section-title {
    font-family: 'Sora', 'Manrope', sans-serif;
    font-weight: 700;
    color: var(--color-text-primary);
    letter-spacing: -0.02em;
}

h1, h2, h3, h4, h5, h6 {
    font-family: 'Sora', 'Manrope', sans-serif;
}

.section-subtitle,
.text-muted {
    color: var(--color-text-secondary) !important;
}

/* ================================================
   Section Backgrounds
   ================================================ */
.bg-light {
    background-color: var(--color-surface) !important;
}

.page-header,
.cta-section {
    background: linear-gradient(135deg, rgba(32, 80, 48, 0.95), rgba(112, 160, 64, 0.95));
}

.cta-section {
    position: relative;
    overflow: hidden;
}

.cta-section::before {
    content: '';
    position: absolute;
    inset: 0;
    background: radial-gradient(circle at 20% 30%, rgba(255, 255, 255, 0.18), transparent 45%),
                radial-gradient(circle at 80% 0%, rgba(255, 255, 255, 0.12), transparent 40%);
}

.cta-section .cta-content {
    position: relative;
    z-index: 1;
}

/* ================================================
   Cards Modernes
   ================================================ */
.card {
    border: none !important;
    border-radius: 16px !important;
    overflow: hidden;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.08) !important;
}

.card:hover {
    transform: translateY(-8px);
    box-shadow: 0 12px 30px rgba(0, 0, 0, 0.15) !important;
}

.card-img-top {
    transition: transform 0.5s ease;
}

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

.card-body {
    padding: 1.5rem;
}

.card-title {
    font-weight: 700;
    color: var(--color-text-primary);
    margin-bottom: 0.75rem;
}

/* ================================================
   Buttons Améliorés
   ================================================ */
.btn {
    border-radius: 50px;
    padding: 0.7rem 1.8rem;
    font-weight: 600;
    letter-spacing: 0.3px;
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
}

.btn::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 0;
    height: 0;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.3);
    transform: translate(-50%, -50%);
    transition: width 0.6s, height 0.6s;
}

.btn:hover::before {
    width: 300px;
    height: 300px;
}

.btn-primary {
    background: linear-gradient(135deg, var(--color-primary), #1b5e20);
    border: none;
    box-shadow: 0 4px 15px rgba(46, 125, 50, 0.3);
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(46, 125, 50, 0.4);
}

.btn-warning {
    background: linear-gradient(135deg, var(--color-accent), #6a3c26);
    border: none;
    color: white !important;
    box-shadow: 0 4px 15px rgba(80, 48, 32, 0.3);
}

.btn-warning:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(255, 152, 0, 0.4);
}

.btn-outline-primary {
    border: 2px solid var(--color-primary);
    color: var(--color-primary);
    background: transparent;
}

.btn-outline-primary:hover {
    background: var(--color-primary);
    color: white;
    transform: translateY(-2px);
}

/* ================================================
   Hero Section Améliorée
   ================================================ */
.hero-section {
    position: relative;
    overflow: hidden;
}

.hero-overlay {
    background: linear-gradient(135deg, rgba(46, 125, 50, 0.7), rgba(21, 101, 192, 0.7));
}

.hero-content h1 {
    text-shadow: 2px 2px 10px rgba(0, 0, 0, 0.3);
    animation: fadeInUp 1s ease;
}

.hero-content p {
    animation: fadeInUp 1.2s ease;
}

.hero-buttons {
    animation: fadeInUp 1.4s ease;
}

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* ================================================
   Impact Stats Modernes
   ================================================ */
.impact-card-alt {
    position: relative;
    overflow: hidden;
}

.impact-card-alt::before {
    content: '';
    position: absolute;
    top: -50%;
    right: -50%;
    width: 200%;
    height: 200%;
    background: radial-gradient(circle, rgba(255, 255, 255, 0.2) 0%, transparent 70%);
    animation: rotate 15s linear infinite;
}

@keyframes rotate {
    from {
        transform: rotate(0deg);
    }

    to {
        transform: rotate(360deg);
    }
}

.impact-number-alt {
    background: linear-gradient(135deg, #fff, #f0f0f0);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

/* ================================================
   Proof/Impact Bar
   ================================================ */
.impact-section-alt {
    border-radius: 24px;
    margin-top: -40px;
    margin-left: auto;
    margin-right: auto;
    max-width: 1100px;
}

.impact-card-alt {
    background: rgba(255, 255, 255, 0.12);
    border: 1px solid rgba(255, 255, 255, 0.2);
}

/* ================================================
   Project/Activity Cards
   ================================================ */
.project-card,
.activity-card,
.event-card {
    position: relative;
    border-radius: 16px;
    overflow: hidden;
    background: white;
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    border: 1px solid rgba(15, 23, 42, 0.06);
}

.project-card:hover,
.activity-card:hover,
.event-card:hover {
    transform: translateY(-10px) scale(1.02);
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.2);
}

.project-image,
.activity-image,
.event-image {
    position: relative;
    height: 220px;
    overflow: hidden;
}

.project-image img,
.activity-image img,
.event-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.5s ease;
}

.project-card:hover .project-image img,
.activity-card:hover .activity-image img,
.event-card:hover .event-image img {
    transform: scale(1.15);
}

.project-status,
.activity-category,
.event-date-badge {
    position: absolute;
    top: 15px;
    right: 15px;
    z-index: 2;
}

.project-type {
    position: absolute;
    bottom: 15px;
    left: 15px;
    background: rgba(255, 255, 255, 0.9);
    width: 45px;
    height: 45px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.3rem;
    z-index: 2;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
}

.project-body,
.activity-body,
.event-body {
    padding: 1.5rem;
}

.project-title,
.activity-title,
.event-title {
    font-size: 1.1rem;
    font-weight: 700;
    color: var(--color-text-primary);
    margin-bottom: 0.75rem;
    line-height: 1.4;
}

.project-location,
.project-beneficiaries {
    font-size: 0.875rem;
    color: #666;
    margin-bottom: 0.5rem;
}

/* ================================================
   Page Header + Breadcrumbs
   ================================================ */
.page-header h1 {
    margin-bottom: 0.5rem;
}

.page-header .breadcrumb {
    margin-bottom: 0.75rem;
}

.breadcrumb-item + .breadcrumb-item::before {
    color: rgba(255, 255, 255, 0.65);
}

.breadcrumb-item a {
    text-decoration: none;
}

/* ================================================
   Filters + Button Groups
   ================================================ */
.btn-group.flex-wrap {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
}

.btn-group.flex-wrap .btn {
    border-radius: 999px !important;
}

/* ================================================
   Card Footer
   ================================================ */
.card-footer {
    background: transparent !important;
    border-top: 0 !important;
    padding: 0 1.5rem 1.5rem;
}

/* ================================================
   Pagination
   ================================================ */
.pagination {
    gap: 0.35rem;
    justify-content: center;
}

.pagination .page-link {
    border-radius: 12px;
    border: 1px solid rgba(15, 23, 42, 0.08);
    color: var(--color-text-primary);
    padding: 0.5rem 0.85rem;
}

.pagination .page-item.active .page-link {
    background: var(--color-primary);
    border-color: var(--color-primary);
    color: white;
    box-shadow: 0 6px 16px rgba(32, 80, 48, 0.25);
}

.pagination .page-link:hover {
    background: rgba(32, 80, 48, 0.08);
}

/* ================================================
   Event/Activity Badges
   ================================================ */
.event-date-badge {
    position: absolute;
    bottom: 12px;
    left: 12px;
    background: rgba(15, 23, 42, 0.85);
    color: white;
    padding: 6px 10px;
    border-radius: 10px;
    font-size: 0.75rem;
    line-height: 1.1;
    text-align: center;
}

.event-date-badge .day {
    display: block;
    font-weight: 700;
    font-size: 1rem;
}

.event-date-badge .month {
    text-transform: uppercase;
    letter-spacing: 0.04em;
    font-size: 0.7rem;
}

.activity-category {
    position: absolute;
    top: 12px;
    left: 12px;
    background: rgba(255, 255, 255, 0.92);
    color: var(--color-text-primary);
    padding: 6px 10px;
    border-radius: 999px;
    font-size: 0.75rem;
    font-weight: 600;
}

/* ================================================
   Map UI
   ================================================ */
#map {
    border-radius: 16px;
}

.map-filters,
.map-legend {
    background: rgba(255, 255, 255, 0.95);
    border: 1px solid rgba(15, 23, 42, 0.08);
    border-radius: 12px;
    box-shadow: 0 8px 24px rgba(15, 23, 42, 0.12);
    backdrop-filter: blur(8px);
}

.legend-item {
    gap: 8px;
    font-size: 0.85rem;
    color: var(--color-text-secondary);
}

.legend-color {
    border: 2px solid rgba(255, 255, 255, 0.7);
}

/* ================================================
   Project Detail
   ================================================ */
.card-header {
    background: transparent;
    border-bottom: 1px solid rgba(15, 23, 42, 0.08);
    font-weight: 700;
}

.card-header.bg-primary {
    background: linear-gradient(135deg, var(--color-primary), var(--color-secondary)) !important;
    color: white !important;
    border-bottom: none;
}

.card-header h5,
.card-header h4,
.card-header h3 {
    font-weight: 700;
}

.list-group-item {
    border-color: rgba(15, 23, 42, 0.08);
}

.list-group-item strong {
    color: var(--color-text-primary);
}

/* ================================================
   Forms + Alerts
   ================================================ */
.form-control,
.form-select {
    background-color: #fff;
}

.form-control::placeholder {
    color: rgba(71, 85, 105, 0.7);
}

.alert {
    border-radius: 14px;
    border: 1px solid rgba(15, 23, 42, 0.08);
}

/* ================================================
   Carousel Controls
   ================================================ */
.carousel-control-prev-icon,
.carousel-control-next-icon {
    background-color: rgba(15, 23, 42, 0.6);
    border-radius: 50%;
    padding: 14px;
    background-size: 60% 60%;
}

/* ================================================
   Rich Content
   ================================================ */
.project-content p {
    color: var(--color-text-secondary);
    line-height: 1.7;
}

/* ================================================
   Badges
   ================================================ */
.badge {
    border-radius: 999px;
    padding: 0.4rem 0.7rem;
    font-weight: 600;
}

.badge.bg-secondary {
    background: rgba(32, 80, 48, 0.12) !important;
    color: var(--color-primary);
}

.badge.bg-primary {
    background: rgba(32, 80, 48, 0.15) !important;
    color: var(--color-primary);
}

.btn-secondary {
    background: linear-gradient(135deg, var(--color-secondary), #5e8d35);
    border: none;
    color: white;
}

.btn-outline-secondary {
    border: 2px solid var(--color-secondary);
    color: var(--color-secondary);
}

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

/* ================================================
   Get Involved Cards
   ================================================ */
.involve-card {
    background: white;
    border-radius: 18px;
    padding: 2rem;
    border: 1px solid rgba(15, 23, 42, 0.06);
    box-shadow: 0 6px 18px rgba(15, 23, 42, 0.08);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.involve-card:hover {
    transform: translateY(-6px);
    box-shadow: 0 12px 28px rgba(15, 23, 42, 0.12);
}

.involve-icon {
    width: 64px;
    height: 64px;
    border-radius: 16px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 1.25rem;
    font-size: 1.5rem;
}

.event-meta {
    display: flex;
    gap: 12px;
    font-size: 0.85rem;
    color: var(--color-text-secondary);
    margin-bottom: 0.75rem;
}

/* ================================================
   Status Badges Améliorés
   ================================================ */
.status-badge {
    padding: 6px 14px;
    border-radius: 50px;
    font-size: 0.75rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);
}

.status-planned {
    background: linear-gradient(135deg, #17a2b8, #138496);
}

.status-in_progress {
    background: linear-gradient(135deg, #ffc107, #e0a800);
    color: #333 !important;
}

.status-completed {
    background: linear-gradient(135deg, #28a745, #218838);
}

.status-on_hold {
    background: linear-gradient(135deg, #6c757d, #5a6268);
}

/* ================================================
   Mission/Vision Cards
   ================================================ */
.mission-card,
.vision-card {
    background: white;
    padding: 2.5rem;
    border-radius: 20px;
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.1);
    transition: all 0.4s ease;
    position: relative;
    overflow: hidden;
    border: 1px solid rgba(15, 23, 42, 0.06);
}

.mission-card::before,
.vision-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 5px;
    background: linear-gradient(90deg, var(--color-primary), var(--color-secondary));
}

.mission-card:hover,
.vision-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 15px 35px rgba(0, 0, 0, 0.15);
}

.mission-icon,
.vision-icon {
    width: 70px;
    height: 70px;
    background: linear-gradient(135deg, var(--color-primary), var(--color-secondary));
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 2rem;
    margin-bottom: 1.5rem;
    box-shadow: 0 8px 20px rgba(46, 125, 50, 0.3);
}

/* ================================================
   Partner Logos
   ================================================ */
.partner-logo {
    padding: 1.5rem;
    background: white;
    border-radius: 12px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.08);
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    height: 100px;
    border: 1px solid rgba(15, 23, 42, 0.05);
}

.partner-logo:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.15);
}

.partner-logo img {
    max-width: 100%;
    max-height: 100%;
    filter: grayscale(100%);
    transition: filter 0.3s ease;
}

.partner-logo:hover img {
    filter: grayscale(0%);
}

/* ================================================
   Footer Amélioré
   ================================================ */
.footer-section {
    position: relative;
}

.footer-section::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: linear-gradient(90deg, var(--color-primary), var(--color-secondary), var(--color-accent));
}

.social-icon {
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.social-icon:hover {
    transform: translateY(-8px) rotate(5deg);
}

/* ================================================
   WhatsApp FAB Amélioré
   ================================================ */
.whatsapp-fab {
    animation: pulse 2s infinite;
}

@keyframes pulse {

    0%,
    100% {
        box-shadow: 0 4px 10px rgba(37, 211, 102, 0.3);
    }

    50% {
        box-shadow: 0 4px 25px rgba(37, 211, 102, 0.6);
    }
}

.whatsapp-fab::before {
    content: '';
    position: absolute;
    width: 100%;
    height: 100%;
    border-radius: 50%;
    background: #25D366;
    animation: ping 2s cubic-bezier(0, 0, 0.2, 1) infinite;
}

@keyframes ping {

    75%,
    100% {
        transform: scale(1.5);
        opacity: 0;
    }
}

/* ================================================
   Form Moderne (Donate Terrain)
   ================================================ */
.form-label {
    font-weight: 600;
    color: var(--color-text-primary);
    margin-bottom: 0.5rem;
}

.form-control,
.form-select {
    border: 2px solid var(--color-border);
    border-radius: 12px;
    padding: 0.75rem 1rem;
    transition: all 0.3s ease;
}

.form-control:focus,
.form-select:focus {
    border-color: var(--color-primary);
    box-shadow: 0 0 0 0.25rem rgba(46, 125, 50, 0.1);
    transform: translateY(-2px);
}

/* ================================================
   Responsive Améliorations
   ================================================ */
@media (max-width: 768px) {
    .card {
        margin-bottom: 1.5rem;
    }

    .hero-content h1 {
        font-size: 2rem !important;
    }

    .impact-number-alt {
        font-size: 2rem !important;
    }

    .btn {
        width: 100%;
        margin-bottom: 0.5rem;
    }
}

/* ================================================
   Smooth Scroll
   ================================================ */
html {
    scroll-behavior: smooth;
}

/* ================================================
   Utility: Soft Badges
   ================================================ */
.bg-primary-soft {
    background: rgba(32, 80, 48, 0.12) !important;
}

.bg-warning-soft {
    background: rgba(80, 48, 32, 0.12) !important;
}

.bg-success-soft {
    background: rgba(112, 160, 64, 0.15) !important;
}

/* ================================================
   Page Transitions
   ================================================ */
.page-transition {
    animation: fadeIn 0.5s ease;
}

@keyframes fadeIn {
    from {
        opacity: 0;
    }

    to {
        opacity: 1;
    }
}

/* ================================================
   Loading Skeleton (bonus)
   ================================================ */
.skeleton {
    background: linear-gradient(90deg, #f0f0f0 25%, #e0e0e0 50%, #f0f0f0 75%);
    background-size: 200% 100%;
    animation: loading 1.5s infinite;
    border-radius: 8px;
}

@keyframes loading {
    0% {
        background-position: 200% 0;
    }

    100% {
        background-position: -200% 0;
    }
}

/* ================================================
   Scroll to Top Button (auto-show)
   ================================================ */
#scroll-to-top {
    position: fixed;
    bottom: 90px;
    right: 20px;
    width: 50px;
    height: 50px;
    background: var(--color-primary);
    color: white;
    border-radius: 50%;
    display: none;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    z-index: 999;
    transition: all 0.3s ease;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
}

#scroll-to-top:hover {
    transform: translateY(-5px);
    background: var(--color-secondary);
}

#scroll-to-top.show {
    display: flex;
}
