/* ===== Programmes Page Styles ===== */

/* Hero Programmes Section */
.hero-programmes {
    background-color: #003d7a;
    color: white;
    padding: 6.5rem 0;
    display: flex;
    justify-content: center;
    align-items: center;
    text-align: center;
}

.hero-programmes .container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

.hero-content {
    margin: 0 auto;
    width: 100%;
}

.hero-content h1 {
    font-size: clamp(1.2rem, 4vw, 1.6rem);
    margin-bottom: 0;
    font-weight: 700;
}

/* Filters Section */
.filters-section {
    background-color: #f8f9fa;
    padding: 2.5rem 0;
    border-bottom: 1px solid #e9ecef;
}

.filters {
    display: flex;
    gap: 1rem;
    justify-content: center;
    flex-wrap: wrap;
}

.filter-btn {
    padding: 0.9rem 1.8rem;
    border: 2px solid var(--primary-color);
    background-color: transparent;
    color: var(--primary-color);
    border-radius: 30px;
    cursor: pointer;
    font-weight: 600;
    transition: all 0.3s ease;
    font-size: 0.95rem;
    letter-spacing: 0.5px;
}

.filter-btn:hover {
    background-color: var(--primary-color);
    color: white;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 61, 122, 0.2);
}

.filter-btn.active {
    background: linear-gradient(135deg, var(--primary-color) 0%, var(--secondary-color) 100%);
    color: white;
    border-color: transparent;
    box-shadow: 0 6px 16px rgba(0, 61, 122, 0.25);
}

/* Programmes Section */
.programmes-section {
    padding: 4rem 0;
    background-color: #ffffff;
}

.programmes-section > .container {
    margin-top: 0;
    max-width: 1400px !important;
    width: 92%; /* Permet aux marges de respirer sur petit écran */
}

.programmes-section h2 {
    text-align: center;
    margin-bottom: clamp(1.5rem, 5vw, 3rem);
    font-size: clamp(1.8rem, 4vw, 2.6rem);
    color: var(--primary-color);
    font-weight: 700;
}

/* Grille fluide : Mobile first (1 colonne par défaut) */
.programmes-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 20px;
    margin: 2rem auto;
    width: 100%;
}

/* UPL Style Programme Cards */
.programme-card-upl {
    position: relative;
    overflow: hidden;
    border-radius: 8px;
    background-color: #f0f0f0;
    min-height: 175px; /* ajusté pour -50% */
    height: clamp(200px, 32.5vh, 300px); /* dinmini la taille en hauteur (-50%) */
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
    transition: all 0.35s cubic-bezier(0.4, 0, 0.2, 1);
}


.programme-card-upl:hover {
    box-shadow: 0 8px 25px rgba(0, 61, 122, 0.18);
    transform: translateY(-8px);
}

.programme-link {
    display: flex;
    height: 100%;
    flex-direction: column;
    text-decoration: none;
    position: relative;
    z-index: 1;
}

.programme-image {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-size: cover;
    background-position: center;
    transition: transform 0.35s ease;
}

.programme-card-upl:hover .programme-image {
    transform: scale(1.05);
}

.programme-image::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(to bottom, rgba(0,0,0,0.2) 0%, rgba(0,0,0,0.7) 100%);
    opacity: 1;
    transition: opacity 0.35s ease;
}

.programme-card-upl:hover .programme-image::after {
    opacity: 0.85;
}

.programme-content {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    padding: 1rem 1.2rem;
    color: white;
    display: flex;
    flex-direction: column;
    justify-content: flex-end;
    height: 100%;
    z-index: 2;
    background: linear-gradient(to top, rgba(0,0,0,0.8) 0%, rgba(0,0,0,0.3) 100%);
}

.programme-category {
    font-size: 0.55rem; /* diminué */
    text-transform: uppercase;
    letter-spacing: 1.1px;
    margin: 0 0 0.25rem 0;
    opacity: 0.95;
    font-weight: 700;
    color: var(--accent-color);
}


.programme-content h3 {
    font-size: clamp(1.1rem, 3.0vw, 1.8rem); /* diminué */
    font-weight: 700;
    margin: 0 0 0.35rem 0;
    color: white;
    line-height: 1.15;
}


.programme-description {
    font-size: clamp(0.7rem, 1.4vw, 0.9rem); /* diminué */
    margin: 0 0 0.8rem 0;
    opacity: 0.9;
    line-height: 1.35;
    color: white;
    display: -webkit-box;
    -webkit-line-clamp: 3; /* diminué */
    -webkit-box-orient: vertical;
    overflow: hidden;
}


.programme-link-text {
    font-size: 0.8rem;
    font-weight: 600;
    color: var(--accent-color);
    text-transform: capitalize;
    opacity: 0;
    transform: translateY(8px);
    transition: all 0.35s ease;
}

.programme-card-upl:hover .programme-link-text {
    opacity: 1;
    transform: translateY(0);
}

/* Values Section */
.values-section {
    background-color: #f8f9fa;
    padding: 3rem 0;
    border-top: 1px solid #e9ecef;
    border-bottom: 1px solid #e9ecef;
}

.values-section h2 {
    text-align: center;
    margin-bottom: 3rem;
    font-size: 2.2rem;
    color: var(--primary-color);
    font-weight: 700;
}

.values-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 2rem;
}

.value-card {
    background-color: white;
    padding: 2rem;
    border-radius: 10px;
    text-align: center;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
    transition: all 0.3s ease;
    border-top: 4px solid var(--accent-color);
}

.value-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 20px rgba(0, 61, 122, 0.12);
}

.value-icon {
    font-size: 3rem;
    margin-bottom: 1rem;
    line-height: 1;
}

.value-card h3 {
    color: var(--primary-color);
    margin-bottom: 1rem;
    font-size: 1.2rem;
    font-weight: 700;
}

.value-card p {
    color: var(--text-light);
    line-height: 1.6;
    font-size: 0.95rem;
}

.info-section {
    background-color: #f8f9fa;
    padding: 4rem 0;
    margin-top: 3rem;
}

.info-section h2 {
    text-align: center;
    margin-bottom: 3rem;
    font-size: 2.2rem;
    color: var(--primary-color);
    font-weight: 700;
}

.info-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 2rem;
}

.info-card {
    background-color: white;
    padding: 2.5rem;
    border-radius: 10px;
    box-shadow: 0 2px 12px rgba(0, 0, 0, 0.08);
    border-left: 5px solid var(--accent-color);
    transition: all 0.3s ease;
}

.info-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.12);
}

.info-card h4 {
    color: var(--primary-color);
    margin-bottom: 1rem;
    font-size: 1.2rem;
    font-weight: 700;
}

.info-card p {
    color: var(--text-light);
    line-height: 1.7;
    font-size: 0.95rem;
}

/* CTA Section */
.cta-section {
    background: linear-gradient(135deg, var(--primary-color) 0%, var(--secondary-color) 100%);
    color: white;
    padding: 5rem 0;
    text-align: center;
    margin: 3rem 0 0 0;
    position: relative;
    overflow: hidden;
}

.cta-section::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: url("data:image/svg+xml,%3Csvg width='60' height='60' viewBox='0 0 60 60' xmlns='http://www.w3.org/2000/svg'%3E%3Cg fill='none' fill-rule='evenodd'%3E%3Cg fill='%23ffffff' fill-opacity='0.1'%3E%3Cpath d='M36 34v-4h-2v4h-4v2h4v4h2v-4h4v-2h-4zm0-30V0h-2v4h-4v2h4v4h2V6h4V4h-4zM6 34v-4H4v4H0v2h4v4h2v-4h4v-2H6zM6 4V0H4v4H0v2h4v4h2V6h4V4H6z'/%3E%3C/g%3E%3C/g%3E%3C/svg%3E");
    opacity: 0.5;
}

.cta-section .container {
    position: relative;
    z-index: 1;
}

.cta-section h2 {
    font-size: 2.8rem;
    margin-bottom: 1rem;
    font-weight: 800;
}

.cta-section p {
    font-size: 1.2rem;
    margin-bottom: 2rem;
    opacity: 0.95;
    font-weight: 300;
}

.cta-section .btn {
    padding: 1rem 2.5rem;
    font-size: 1.05rem;
}

/* Footer */
.footer {
    background-color: #1a1a1a;
    color: white;
    padding: 2rem 0 1rem;
}

.footer-content {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 2rem;
    margin-bottom: 2rem;
}

.footer-section h4 {
    color: var(--accent-color);
    margin-bottom: 1rem;
    font-size: 1.1rem;
}

.footer-section p {
    color: #ccc;
    line-height: 1.6;
}

.social-links {
    display: flex;
    gap: 1rem;
    flex-wrap: wrap;
}

.social-links a {
    color: var(--accent-color);
    text-decoration: none;
    transition: color 0.3s ease;
}

.social-links a:hover {
    color: white;
}

.footer-bottom {
    text-align: center;
    padding-top: 1rem;
    border-top: 1px solid #333;
    color: #999;
}

/* Button Base Styles */
.btn {
    display: inline-block;
    padding: 0.8rem 1.5rem;
    border: none;
    border-radius: 25px;
    cursor: pointer;
    font-weight: 600;
    text-decoration: none;
    transition: all 0.3s ease;
    font-size: 1rem;
}

.btn-primary {
    background-color: var(--accent-color);
    color: var(--primary-color);
}

.btn-primary:hover {
    background-color: #ffb300;
    transform: translateY(-3px);
    box-shadow: 0 5px 15px rgba(255, 193, 7, 0.3);
}

/* Active Navigation Link */
.navbar a.active {
    color: var(--accent-color);
    border-bottom: 2px solid var(--accent-color);
    padding-bottom: 5px;
}

.header.scrolled .navbar a.active {
    color: var(--primary-color);
    border-bottom-color: var(--primary-color);
}

@media (max-width: 768px) {
    .hero-content h2 {
        font-size: 1.2rem;
    }

    .hero-content p {
        font-size: 1rem;
    }
    .programme-content {
        padding: 1rem;
    }

    .programme-category {
        font-size: 0.7rem;
    }

    .programme-content h3 {
        font-size: 1.1rem;
    }

    .programme-description {
        font-size: 0.8rem;
        -webkit-line-clamp: 3;
    }

    .filters {
        flex-direction: column;
        align-items: stretch;
    }

    .filter-btn {
        width: 100%;
    }

    .info-grid {
        grid-template-columns: 1fr;
    }

    .cta-section h2 {
        font-size: 1.8rem;
    }

    .cta-section p {
        font-size: 1rem;
    }
}

@media (max-width: 480px) {
    .hero-content h1 {
        font-size: 1.5rem;
    }

    .hero-content h2 {
        font-size: 1rem;
    }
    .programme-content {
        padding: 0.8rem;
    }

    .programme-content h3 {
        font-size: 0.95rem;
    }

    .programme-description {
        display: none;
    }

    .programme-link-text {
        font-size: 0.7rem;
    }

    .info-card {
        padding: 1.5rem;
    }

    .values-section {
        padding: 2rem 0;
    }

    .values-grid {
        grid-template-columns: 1fr;
        gap: 1rem;
    }

    .value-card {
        padding: 1.5rem;
    }

    .value-icon {
        font-size: 2rem;
    }

    .value-card h3 {
        font-size: 1rem;
    }
}

/* Points de rupture pour la grille (Adaptation intelligente) */
@media (min-width: 650px) {
    .programmes-grid {
        grid-template-columns: repeat(2, 1fr); /* 2 colonnes sur tablette */
    }
}

@media (min-width: 1024px) {
    .programmes-grid {
        grid-template-columns: repeat(3, 1fr) !important; /* Force 3 colonnes (3 en haut, 3 en bas) */
        gap: 40px !important;
    }
}

/* Hide and Show Animation */
.programme-card-upl {
    animation: fadeIn 0.3s ease-in;
}

.programme-card-upl.hidden {
    display: none !important;
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}
