/* 
    Cours Page Styles - Les Ateliers de Théo
    Premium, Modern, and Responsive Design
    Updated: Removed all greyish tones for a vibrant dark/blue aesthetic
*/

.cours-container {
    max-width: 1400px;
    margin: 140px auto 6rem;
    padding: 0 2rem;
    position: relative;
}

/* Background Decorative Elements */
.cours-container::before {
    content: '';
    position: absolute;
    top: -100px;
    right: -10%;
    width: 600px;
    height: 600px;
    background: radial-gradient(circle, var(--primary-color) 0%, transparent 70%);
    filter: blur(120px);
    opacity: 0.12; /* Slightly more visible for more color */
    z-index: -1;
    pointer-events: none;
}

.cours-container::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: -5%;
    width: 400px;
    height: 400px;
    background: radial-gradient(circle, var(--secondary-color) 0%, transparent 70%);
    filter: blur(100px);
    opacity: 0.08;
    z-index: -1;
    pointer-events: none;
}

/* Header Section */
.cours-header {
    text-align: center;
    max-width: 800px;
    margin: 0 auto 5rem;
}

.cours-header h1 {
    font-size: clamp(2.5rem, 6vw, 4.5rem);
    margin-bottom: 1.5rem;
    letter-spacing: -1px;
}

.cours-header h1 span {
    background: var(--gradient-primary);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    font-weight: 800;
}

.cours-header p {
    font-size: 1.25rem;
    line-height: 1.6;
    color: #cbd5e1; /* Lighter, less greyish blue-white */
    max-width: 650px;
    margin: 0 auto;
}

/* Grid Layout */
.cours-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
    gap: 2.5rem;
    perspective: 1000px;
}

/* Course Card Design - REMOVED GREY */
.course-card {
    background: rgba(15, 23, 42, 0.6); /* Deep Night Blue instead of Greyish Blue */
    border: 1px solid rgba(59, 130, 246, 0.15); /* Blue-ish border */
    border-radius: 32px;
    padding: 3rem 2.5rem;
    backdrop-filter: blur(24px);
    -webkit-backdrop-filter: blur(24px);
    transition: all 0.5s cubic-bezier(0.23, 1, 0.32, 1);
    position: relative;
    display: flex;
    flex-direction: column;
    height: 100%;
}

.course-card::before {
    content: '';
    position: absolute;
    inset: 0;
    border-radius: 32px;
    padding: 1px;
    background: linear-gradient(135deg, rgba(59, 130, 246, 0.2), transparent 50%, rgba(139, 92, 246, 0.1));
    -webkit-mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
    mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
    -webkit-mask-composite: xor;
    mask-composite: exclude;
    pointer-events: none;
}

.course-card:hover {
    transform: translateY(-12px) scale(1.02);
    border-color: rgba(59, 130, 246, 0.4);
    background: rgba(15, 23, 42, 0.8); /* Deeper blue on hover, no grey */
    box-shadow: 0 30px 60px -12px rgba(0, 0, 0, 0.6), 
                0 0 20px rgba(59, 130, 246, 0.15);
}

/* Course Icon */
.course-icon {
    width: 80px;
    height: 80px;
    background: rgba(59, 130, 246, 0.1);
    border: 1px solid rgba(59, 130, 246, 0.2);
    border-radius: 24px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 2.8rem;
    margin-bottom: 2.5rem;
    transition: all 0.4s ease;
}

.course-card:hover .course-icon {
    transform: scale(1.1) rotate(8deg);
    background: var(--gradient-primary);
    border-color: transparent;
    box-shadow: 0 15px 30px rgba(59, 130, 246, 0.3);
}

.course-card h2 {
    font-size: 1.85rem;
    margin-bottom: 1.25rem;
    color: #ffffff; /* Pure white */
    font-weight: 700;
    letter-spacing: -0.5px;
}

.course-card p {
    color: #94a3b8; /* Keep this but ensure it doesn't look dull on the blue bg */
    color: #cbd5e1; /* Brighter blue-grey text */
    margin-bottom: 2rem;
    line-height: 1.7;
    font-size: 1.05rem;
    flex-grow: 1;
}

/* Features List */
.course-features {
    list-style: none;
    padding: 0;
    margin-bottom: 3rem;
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.course-features li {
    display: flex;
    align-items: center;
    gap: 1rem;
    font-size: 1rem;
    color: #94a3b8;
    transition: color 0.3s ease;
}

.course-card:hover .course-features li {
    color: #e2e8f0; /* Near white on hover */
}

.course-features li::before {
    content: '';
    width: 20px;
    height: 20px;
    background: var(--primary-color);
    mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 20 20' fill='currentColor'%3E%3Cpath fill-rule='evenodd' d='M16.707 5.293a1 1 0 010 1.414l-8 8a1 1 0 01-1.414 0l-4-4a1 1 0 011.414-1.414L8 12.586l7.293-7.293a1 1 0 011.414 0z' clip-rule='evenodd' /%3E%3C/svg%3E") no-repeat center;
    -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 20 20' fill='currentColor'%3E%3Cpath fill-rule='evenodd' d='M16.707 5.293a1 1 0 010 1.414l-8 8a1 1 0 01-1.414 0l-4-4a1 1 0 011.414-1.414L8 12.586l7.293-7.293a1 1 0 011.414 0z' clip-rule='evenodd' /%3E%3C/svg%3E") no-repeat center;
    flex-shrink: 0;
}

/* Action Area */
.course-action {
    margin-top: auto;
}

.btn-course {
    width: 100%;
    padding: 1.25rem;
    font-size: 1.1rem;
    font-weight: 700;
    text-transform: none;
    letter-spacing: 0;
}

/* Specific adjustments for Light Theme if applied */
html.light-theme .course-card {
    background: rgba(255, 255, 255, 0.7);
    border-color: rgba(59, 130, 246, 0.2);
}

html.light-theme .course-card:hover {
    background: rgba(255, 255, 255, 0.9);
}

html.light-theme .course-card h2 {
    color: #1e293b;
}

html.light-theme .course-card p,
html.light-theme .course-features li {
    color: #475569;
}

/* Animations Overrides */
.animate-fade-in {
    opacity: 0;
    animation: fadeInUp 0.8s cubic-bezier(0.4, 0, 0.2, 1) forwards;
}

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(40px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Responsive Adjustments */
@media (max-width: 1024px) {
    .cours-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 768px) {
    .cours-container {
        margin-top: 100px;
        padding: 0 1.5rem;
    }

    .cours-grid {
        grid-template-columns: 1fr;
        gap: 2rem;
    }

    .cours-header {
        margin-bottom: 3.5rem;
    }

    .course-card {
        padding: 2.5rem 2rem;
    }

    .course-icon {
        width: 70px;
        height: 70px;
        font-size: 2.4rem;
        margin-bottom: 2rem;
    }
}
