.header {
    padding: 40px 40px 0 40px;
    text-align: start;
}

.header h1 {
    font-size: 30px;
    font-weight: 800;
    line-height: 1.2;
    margin-bottom: 15px;
    color: var(--on-surface);
}

.header p {
    font-size: 14px;
    color: var(--tertiary);
    margin-bottom: 20px;
}

/* Scrollable Filters */
.filter-container {
    display: flex;
    gap: 12px;
    overflow-x: auto;
    padding-bottom: 8px;
    scrollbar-width: none; /* Firefox */
}

.filter-container::-webkit-scrollbar {
    display: none; /* Chrome/Safari */
}

.filter-chip {
    white-space: nowrap;
    padding: 10px 20px;
    border-radius: 0.5rem;
    border: 1px solid var(--outline-variant);
    background: var(--surface-container-low);
    color: var(--secondary);
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
}

.filter-chip.active {
    background: var(--brand-teal);
    color: white;
    border-color: var(--secondary);
}

/* Training Grid */
/* ===== TRAINING GRID RESPONSIVE ===== */
.grid {
    display: grid;
    grid-template-columns: 1fr; /* MOBILE: 1 colonne */
    gap: 24px;
}

/* TABLETTE: 2 colonnes */
@media (min-width: 640px) and (max-width: 1023px) {
    .grid { 
        grid-template-columns: repeat(2, 1fr);
    }

    /* Bordure gauche sur toutes les cases sauf 1ère colonne: 1,3,5... */
    .card:not(:nth-child(2n+1)) {
        border-left: 2px solid var(--gray-200);
    }
    
    /* Enlève la bordure top de la meta car on veut 0 bordure en bas */
    .card-meta {
        border-top: none;
        padding-top: 0;
    }
}

/* DESKTOP: 3 colonnes */
@media (min-width: 1024px) {
    .grid { 
        grid-template-columns: repeat(3, 1fr);
    }

    /* Bordure gauche sur toutes les cases sauf 1ère colonne: 1,4,7... */
    .card:not(:nth-child(3n+1)) {
        border-left: 2px solid var(--gray-200);
    }

    .card-meta {
        border-top: none;
        padding-top: 0;
    }
}

/* ===== FIX FILTER SCROLL MOBILE ===== */
@media (min-width: 640px) {
    .filter-container {
        overflow-x: visible;
        flex-wrap: wrap;
        justify-content: flex-start;
    }
}

.card {
    background: var(--surface-container-lowest);
    border: 1px solid var(--gray-200);
    border-radius: 1rem;
    padding: 32px;
    display: flex;
    flex-direction: column;
    box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.5);
    transition: transform 0.3s ease;
}

.card:hover {
    transform: translateY(-5px);
}

.card-icon {
    width: 48px;
    height: 48px;
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 24px;
    color: var(--white);
}

.icon-web { background: var(--brand-teal);}
.icon-mobile { background: var(--brand-orange);}
.icon-data { background: #67058d;}
.icon-design { background: #ff9012;}
.icon-security { background: #1bbfd8;}
.icon-entrepreneurship { background: #20C997;}

.card h3 {
    font-size: 16px;
    font-weight: 800;
    margin-bottom: 8px;
}

.badge {
    display: inline-block;
    padding: 4px 12px;
    border-radius: 1rem;
    font-size: 12px;
    font-weight: 700;
    margin-bottom: 16px;
    width: fit-content;
}

.badge-dev { background: rgba(0, 168, 168, 0.3); color: var(--brand-teal); }
.badge-mobile { background: rgba(255, 138, 0, 0.3); color: var(--brand-orange); }
.badge-design { background: rgb(255, 144, 18, 0.3); color: #ff9012; }
.badge-data{ background: rgb(103, 5, 141, 0.3); color: #67058d;}
.badge-security{ background: rgb(27, 191, 216, 0.3); color: #1bbfd8;}
.badge-entrepreneurship{ background: rgba(32, 201, 151, 0.3); color: #20C997;}

.card-text {
    color: var(--tertiary);
    font-size: 14px;
    margin-bottom: 14px;
}

.card-meta {
    padding-top: 24px;
    border-top: 1px solid var(--surface-container);
    margin-bottom: 24px;
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 14px;
    color: var(--on-surface-variant);
}

.card-link {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 13px;
    color: #238a79;
    font-weight: 700;
    text-decoration: none;
}

.card-link .icon{
    width: 18px;
    height: 18px;
}

/* CTA Banner */

.cta{
    padding: 4rem 0;
}

.cta-content {
    display: block;
}

/* Material Symbol adjustments */
.material-symbols-outlined {
    vertical-align: middle;
    font-size: 24px;
}

.ms-18 { font-size: 18px; }
.ms-28 { font-size: 28px; }