:root {
    --primary-blue: #007bff;
    --dark-blue: #0056b3;
    --bg-light: #f4f7f9;
}

body {
    font-family: 'Inter', sans-serif;
    background-color: white;
    color: #333;
    overflow-x: hidden;
}

/* Motion */
.card-project,
.article-card,
.timeline-card,
.foundation-card,
.structure-card,
.team-card,
.doc-card,
.about-photo,
.about-intro h1,
.about-intro p,
.section-title,
.section-kicker,
.hero-section h1,
.hero-section p,
.hero-section .hero-btn,
.hero-section .hero-controls,
.section-header h2 {
    opacity: 0;
    transform: translateY(18px);
    animation: riseIn 0.85s ease forwards;
}

.article-card,
.timeline-card,
.foundation-card,
.structure-card,
.team-card,
.doc-card,
.card-project {
    transition: transform 0.35s ease, box-shadow 0.35s ease, filter 0.35s ease;
    position: relative;
    overflow: hidden;
}

.article-card:hover,
.timeline-card:hover,
.foundation-card:hover,
.structure-card:hover,
.team-card:hover,
.doc-card:hover,
.card-project:hover {
    transform: translateY(-10px) scale(1.01);
    box-shadow: 0 18px 50px rgba(0, 0, 0, 0.12);
}

.article-card::after,
.timeline-card::after,
.foundation-card::after,
.structure-card::after,
.team-card::after,
.doc-card::after,
.card-project::after {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(120deg, transparent 30%, rgba(255,255,255,0.18) 45%, transparent 60%);
    transform: translateX(-120%);
    transition: transform 0.7s ease;
    pointer-events: none;
}

.article-card:hover::after,
.timeline-card:hover::after,
.foundation-card:hover::after,
.structure-card:hover::after,
.team-card:hover::after,
.doc-card:hover::after,
.card-project:hover::after {
    transform: translateX(120%);
}

.text-pop {
    display: inline-block;
    animation: textPop 0.7s ease both;
}

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

@keyframes textPop {
    0% {
        opacity: 0;
        transform: translateY(14px) scale(0.985);
        letter-spacing: 0.02em;
    }
    100% {
        opacity: 1;
        transform: translateY(0) scale(1);
        letter-spacing: normal;
    }
}

.hero-section h1 { animation-delay: 0.05s; }
.hero-section p { animation-delay: 0.18s; }
.hero-section .hero-btn { animation-delay: 0.28s; }
.hero-section .hero-controls { animation-delay: 0.36s; }
.section-header h2 { animation-delay: 0.05s; }
.about-intro h1 { animation-delay: 0.05s; }
.about-intro p { animation-delay: 0.18s; }
.section-kicker { animation-delay: 0.1s; }
.section-title { animation-delay: 0.18s; }
.about-photo { animation-delay: 0.1s; }
.card-project:nth-child(1),
.article-card:nth-child(1),
.foundation-card:nth-child(1),
.structure-card:nth-child(1),
.team-card:nth-child(1),
.doc-card:nth-child(1) { animation-delay: 0.05s; }

.card-project:nth-child(2),
.article-card:nth-child(2),
.foundation-card:nth-child(2),
.structure-card:nth-child(2),
.team-card:nth-child(2),
.doc-card:nth-child(2) { animation-delay: 0.15s; }

.card-project:nth-child(3),
.article-card:nth-child(3),
.foundation-card:nth-child(3),
.structure-card:nth-child(3),
.team-card:nth-child(3),
.doc-card:nth-child(3) { animation-delay: 0.25s; }

.card-project:nth-child(4),
.article-card:nth-child(4),
.doc-card:nth-child(4) { animation-delay: 0.35s; }

/* Navbar */
.navbar {
    padding: 1rem 0;
    background: white;
}
.navbar-brand img {
    height: 50px;
}
.nav-link {
    font-weight: 500;
    color: #333 !important;
    font-size: 0.9rem;
    margin: 0 10px;
    text-transform: uppercase;
}
.btn-contact {
    background-color: var(--primary-blue);
    color: white !important;
    border-radius: 50px;
    padding: 8px 20px;
    font-weight: 600;
    font-size: 0.85rem;
    text-transform: uppercase;
}

/* Hero Section */
.hero-section {
    background: linear-gradient(to bottom, #0077cc, #004499);
    color: white;
    padding: 80px 0 120px;
    text-align: center;
    position: relative;
    overflow: hidden;
}
.hero-section::before,
.hero-section::after {
    content: '';
    position: absolute;
    border-radius: 50%;
    background: rgba(255,255,255,0.08);
    filter: blur(2px);
    animation: floatBlob 10s ease-in-out infinite;
}
.hero-section::before {
    width: 260px;
    height: 260px;
    top: -60px;
    right: -70px;
}
.hero-section::after {
    width: 180px;
    height: 180px;
    bottom: -30px;
    left: -40px;
    animation-delay: -3s;
}
.hero-section h1 {
    font-weight: 800;
    font-size: 4rem;
    letter-spacing: 2px;
    margin-bottom: 20px;
}
.hero-section p {
    font-size: 1.2rem;
    max-width: 700px;
    margin: 0 auto 30px;
    opacity: 0.9;
}
.hero-divider {
    width: 80px;
    height: 4px;
    background: linear-gradient(to right, #007bff 33%, #ffcc00 33%, #ffcc00 66%, #ff0000 66%);
    margin: 0 auto;
}

/* Main Content Wrapper with Leopard Background */
.content-wrapper {
    background-image: url('../images/teet.png'), url('../images/teet.png');
    background-repeat: no-repeat, no-repeat;
    background-position: left -120px top 10%, right -120px bottom 10%;
    background-size: 340px, 340px;
    background-attachment: scroll, scroll;
    background-color: rgba(255, 255, 255, 0.98);
    padding-bottom: 80px;
}

/* Filters */
.filter-box {
    background: white;
    border-radius: 8px;
    padding: 30px;
    box-shadow: 0 10px 40px rgba(0,0,0,0.08);
    margin-top: -60px;
    margin-bottom: 60px;
}
.filter-label {
    font-size: 0.75rem;
    font-weight: 700;
    color: #888;
    text-transform: uppercase;
    margin-bottom: 8px;
}

/* Project Cards */
.card-project {
    border: none;
    border-radius: 15px;
    overflow: hidden;
    background: white;
    box-shadow: 0 15px 35px rgba(0,0,0,0.05);
    height: 100%;
    transition: transform 0.3s ease;
}
.card-project:hover {
    transform: translateY(-10px);
}
.card-img-wrapper img,
.article-card img,
.timeline-card img,
.about-photo img {
    transition: transform 0.6s ease, filter 0.6s ease;
}
.card-project:hover .card-img-wrapper img,
.article-card:hover img,
.timeline-card:hover img,
.about-photo:hover img {
    transform: scale(1.05);
    filter: saturate(1.08);
}
.card-img-wrapper {
    position: relative;
    height: 200px;
    background-color: #1a1a1a;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    overflow: hidden;
}
.card-img-wrapper img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    opacity: 0.7;
}
.badge-status {
    position: absolute;
    top: 15px;
    right: 15px;
    font-size: 0.65rem;
    padding: 4px 10px;
    border-radius: 50px;
    font-weight: 700;
    text-transform: uppercase;
}
.status-encours { background-color: #00bcd4; color: white; }
.status-termine { background-color: #28a745; color: white; }
.status-planifie { background-color: #ffc107; color: black; }

.card-body {
    padding: 25px;
}
.project-category {
    color: var(--primary-blue);
    font-weight: 700;
    font-size: 0.75rem;
    text-transform: uppercase;
    margin-bottom: 10px;
    display: block;
}
.project-title {
    font-weight: 700;
    font-size: 1.1rem;
    margin-bottom: 12px;
    color: #1a1a1a;
}
.project-desc {
    font-size: 0.85rem;
    color: #666;
    line-height: 1.5;
    margin-bottom: 20px;
}
.card-footer-custom {
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-top: 1px solid #eee;
    padding-top: 15px;
    font-size: 0.75rem;
    color: #999;
}
.btn-details-link {
    color: var(--primary-blue);
    text-decoration: none;
    font-weight: 600;
}

/* Footer */
.main-footer {
    background: linear-gradient(to right, #0052a3, #003d7a);
    color: white;
    padding: 80px 0 40px;
}
.footer-logo-box {
    display: flex;
    gap: 15px;
    margin-bottom: 25px;
}
.footer-logo-box img {
    height: 40px;
    filter: brightness(0) invert(1);
}
.footer-column h5 {
    font-weight: 700;
    font-size: 1rem;
    margin-bottom: 25px;
    text-transform: uppercase;
    letter-spacing: 1px;
}
.footer-link {
    display: block;
    color: rgba(255,255,255,0.8);
    text-decoration: none;
    margin-bottom: 12px;
    font-size: 0.9rem;
}
.footer-link:hover {
    color: white;
    padding-left: 5px;
    transition: all 0.2s;
}
.footer-link i {
    margin-right: 8px;
    font-size: 0.8rem;
}
.social-bar {
    border-top: 1px solid rgba(255,255,255,0.1);
    margin-top: 50px;
    padding-top: 30px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}
.social-icons a {
    color: white;
    margin-right: 15px;
    font-size: 1.2rem;
    opacity: 0.8;
}
.call-center {
    font-weight: 700;
    font-size: 1.1rem;
}

/* About page */
.about-intro {
    background: linear-gradient(135deg, #0d8bdc 0%, #005b9f 100%);
    color: #fff;
    padding: 90px 0 95px;
    text-align: center;
}
.about-intro h1 {
    font-size: 4rem;
    font-weight: 900;
    letter-spacing: 1px;
    margin-bottom: 18px;
}
.about-intro p {
    max-width: 760px;
    margin: 0 auto;
    opacity: 0.9;
    font-size: 1.05rem;
}
.about-divider {
    width: 90px;
    height: 4px;
    margin: 18px auto 0;
    background: linear-gradient(to right, #007bff 33%, #ffcc00 33%, #ffcc00 66%, #ff0000 66%);
}
.about-section {
    padding: 80px 0;
    background: #f5f7fb;
    position: relative;
    overflow: hidden;
}
.about-section::before {
    content: '';
    position: absolute;
    inset: 0;
    background: url('../images/teet.png') left -90px top 14% / 260px no-repeat,
                url('../images/teet.png') right -90px bottom 12% / 260px no-repeat;
    opacity: 0.045;
    pointer-events: none;
}
.about-section > .container {
    position: relative;
    z-index: 1;
}
.about-card {
    background: #fff;
    border-radius: 24px;
    box-shadow: 0 18px 55px rgba(0, 58, 118, 0.08);
    overflow: hidden;
}
.about-authority {
    display: grid;
    grid-template-columns: 1.05fr 1fr;
    gap: 40px;
    align-items: center;
}
.about-photo {
    position: relative;
    min-height: 520px;
}
.about-photo img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: 26px;
    box-shadow: 0 24px 50px rgba(0, 0, 0, 0.14);
}
.quote-badge {
    position: absolute;
    right: 24px;
    bottom: -24px;
    background: #0d8bdc;
    color: #fff;
    width: 290px;
    padding: 24px;
    border-radius: 18px;
    box-shadow: 0 18px 40px rgba(13, 139, 220, 0.35);
}
.section-kicker {
    text-transform: uppercase;
    letter-spacing: 0.18em;
    font-size: 0.72rem;
    font-weight: 800;
    color: #0d8bdc;
    margin-bottom: 12px;
}
.section-title {
    font-size: 2.4rem;
    line-height: 1.05;
    font-weight: 900;
    color: #101828;
    margin-bottom: 22px;
}
.section-copy {
    color: #4b5563;
    line-height: 1.9;
    margin-bottom: 18px;
    text-align: justify;
}
.signature-block {
    margin-top: 26px;
    font-weight: 800;
    color: #101828;
}
.signature-block small {
    display: block;
    color: #0d8bdc;
    font-weight: 700;
}
.foundation-shell {
    background: #fff;
    border-radius: 28px;
    padding: 48px;
    box-shadow: 0 18px 55px rgba(0, 58, 118, 0.08);
}
.foundation-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 28px;
}
.foundation-card {
    border-radius: 24px;
    border: 1px solid rgba(13, 139, 220, 0.08);
    padding: 30px;
    background: #fff;
    min-height: 240px;
}
.foundation-icon {
    width: 48px;
    height: 48px;
    border-radius: 14px;
    background: rgba(13, 139, 220, 0.12);
    color: #0d8bdc;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 18px;
    font-size: 1.2rem;
}
.structure-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 20px;
}
.structure-card {
    background: #fff;
    border-radius: 22px;
    padding: 24px;
    min-height: 240px;
    box-shadow: 0 10px 35px rgba(16, 24, 40, 0.08);
}
.structure-card h5 {
    font-weight: 800;
    color: #101828;
    margin-bottom: 16px;
}
.structure-card ul {
    padding-left: 18px;
    margin-bottom: 0;
    color: #475467;
    line-height: 1.8;
}
.team-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 24px;
}
.team-card {
    background: #fff;
    border-radius: 22px;
    overflow: hidden;
    box-shadow: 0 10px 35px rgba(16, 24, 40, 0.08);
    text-align: center;
}
.team-photo {
    height: 180px;
    background: linear-gradient(180deg, #d9d9d9, #ececec);
    display: flex;
    align-items: center;
    justify-content: center;
    color: #111827;
    font-size: 4rem;
}
.team-body {
    padding: 18px 18px 24px;
}
.team-name {
    font-weight: 800;
    margin-bottom: 6px;
}
.team-role {
    color: #0d8bdc;
    font-size: 0.9rem;
    font-weight: 700;
}

.foundation-shell,
.panel-card,
.form-section,
.admin-hero,
.kpi-card,
.quick-link {
    animation: softLift 0.8s ease both;
}

@keyframes softLift {
    from {
        opacity: 0;
        transform: translateY(18px) scale(0.985);
    }
    to {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

@keyframes floatBlob {
    0%, 100% { transform: translate3d(0, 0, 0) scale(1); }
    50% { transform: translate3d(0, 18px, 0) scale(1.06); }
}

@keyframes pulseGlow {
    0%, 100% { box-shadow: 0 0 0 0 rgba(13, 139, 220, 0.18); }
    50% { box-shadow: 0 0 0 18px rgba(13, 139, 220, 0); }
}

.hero-section .hero-btn {
    animation: pulseGlow 2.8s ease-in-out infinite;
}

.kpi-card .icon {
    animation: floatBlob 6s ease-in-out infinite;
}

.kpi-card:nth-child(2) .icon,
.kpi-card:nth-child(4) .icon {
    animation-delay: -1.5s;
}

.foundation-card:nth-child(2n) .foundation-icon {
    animation: pulseGlow 2.6s ease-in-out infinite;
}

@media (prefers-reduced-motion: reduce) {
    *,
    *::before,
    *::after {
        animation: none !important;
        transition: none !important;
        scroll-behavior: auto !important;
    }
}
@media (max-width: 991.98px) {
    .about-authority,
    .foundation-grid,
    .structure-grid,
    .team-grid {
        grid-template-columns: 1fr;
    }

    .about-photo {
        min-height: 420px;
    }

    .quote-badge {
        position: static;
        width: 100%;
        margin-top: 18px;
    }

    .section-title {
        font-size: 2rem;
    }
}
