/* ========== METHOD LABS PAGE ========== */

/* Lien de navigation actif (identique) */
.navbar a[href="method-labs.html"].nav-link,
.navbar a[href="method-labs.html"].nav-link:hover {
    color: var(--komit-orange);
    font-weight: 700;
}
.navbar a[href="method-labs.html"].nav-link::after {
    width: 100%;
}

/* Conteneur principal */
.labs-container {
    max-width: 1400px;
    margin: 0 auto;
    padding: 150px 5% 60px; 
    animation: fadeIn 0.6s ease-out;
}

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

/* ========== Section Header & Recherche ========== */
.labs-header {
    text-align: center;
    margin-bottom: 3rem;
}

.labs-title {
    font-family: 'Lilita One', sans-serif;
    font-size: 3.5rem;
    color: var(--black);
    margin-bottom: 0.75rem;
}

.labs-title .highlight {
    color: var(--komit-orange);
}

.labs-subtitle {
    font-size: 1.25rem;
    color: var(--gray-dark);
    max-width: 600px;
    margin: 0 auto 2rem;
}

/* Barre de recherche */
.search-bar {
    display: flex;
    max-width: 700px;
    margin: 0 auto;
    box-shadow: 0 5px 25px rgba(0, 0, 0, 0.08);
    border-radius: 12px;
    overflow: hidden;
}

.search-bar input[type="search"] {
    flex-grow: 1;
    border: none;
    font-size: 1rem;
    padding: 1.1rem 1.5rem;
    font-family: 'Nunito', sans-serif;
    background: #fdfdfd;
    min-width: 100px;
}
.search-bar input[type="search"]:focus {
    outline: 2px solid var(--komit-orange);
    z-index: 1;
}

.search-button {
    border: none;
    background: var(--komit-orange);
    color: white;
    padding: 0 2rem;
    font-size: 1rem;
    font-weight: 700;
    font-family: 'Nunito', sans-serif;
    cursor: pointer;
    transition: background 0.3s ease;
}
.search-button:hover {
    background: #E65300;
}



.pagination-container {
            display: flex;
            justify-content: center;
            gap: 0.5rem;
            margin-top: 3rem;
            margin-bottom: 2rem;
        }
        .page-btn {
            width: 40px;
            height: 40px;
            border-radius: 50%;
            border: 2px solid #f0f0f0;
            background: white;
            color: var(--gray-dark);
            font-family: 'Nunito', sans-serif;
            font-weight: 700;
            cursor: pointer;
            transition: all 0.3s ease;
            display: flex;
            align-items: center;
            justify-content: center;
        }
        .page-btn:hover {
            border-color: var(--komit-orange);
            color: var(--komit-orange);
        }
        .page-btn.active {
            background: var(--komit-orange);
            border-color: var(--komit-orange);
            color: white;
            box-shadow: 0 4px 10px rgba(255, 92, 0, 0.3);
        }
/* ========== Filtres / Catégories ========== */
.filter-nav {
    display: flex;
    justify-content: center;
    gap: 0.75rem;
    margin-bottom: 3rem;
    flex-wrap: wrap;
}

.filter-btn {
    padding: 0.6rem 1.25rem;
    border: none;
    background: var(--gray-light);
    color: var(--gray-dark);
    border-radius: 20px;
    cursor: pointer;
    font-weight: 600;
    font-family: 'Nunito', sans-serif;
    font-size: 0.9rem;
    transition: all 0.3s ease;
}

.filter-btn:hover {
    background: var(--orange-light);
    color: var(--komit-orange);
}

.filter-btn.active {
    background: var(--komit-orange);
    color: white;
    box-shadow: 0 4px 15px rgba(255, 92, 0, 0.3);
}


/* ========== Grille des Vignettes (CORRIGÉE) ========== */
.labs-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
    gap: 2rem;
    align-items: stretch; /* Force les cartes à avoir la même hauteur */
}

/* Wrapper pour le positionnement du bouton Like */
.lab-card-wrapper {
    position: relative;
    height: 100%; /* Important pour que le lien à l'intérieur remplisse la case */
}

/* La Carte */
.lab-card {
    text-decoration: none;
    color: inherit;
    background: white;
    border-radius: 16px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.06);
    overflow: hidden;
    transition: all 0.3s ease;
    display: flex;
    flex-direction: column;
    height: 100%; /* La carte prend toute la hauteur disponible */
}

.lab-card:hover {
    transform: translateY(-8px);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
}

/* Image de la vignette (FIXÉE) */
.card-image {
    height: 200px; /* Hauteur fixe et inmodifiable */
    width: 100%;
    flex-shrink: 0; /* Empêche l'image de s'écraser */
    background-color: var(--gray-light);
    overflow: hidden;
}

.card-image img {
    width: 100%;
    height: 100%;
    object-fit: cover; /* L'image remplit le cadre sans déformation */
    transition: transform 0.4s ease;
}

.lab-card:hover .card-image img {
    transform: scale(1.05);
}

/* Contenu de la vignette */
.card-content {
    padding: 1.5rem;
    display: flex;
    flex-direction: column;
    flex-grow: 1; /* Occupe tout l'espace restant */
}

.card-category {
    font-size: 0.8rem;
    font-weight: 700;
    color: var(--komit-orange);
    margin-bottom: 0.5rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

/* Titre (FIXÉ) */
.card-title {
    font-size: 1.25rem;
    font-weight: 700;
    font-family: 'Nunito', sans-serif;
    margin-bottom: 1rem;
    line-height: 1.4;
    color: var(--black);
    
    /* LIMITATION A 2 LIGNES (CSS Moderne) */
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    text-overflow: ellipsis;
    height: 3.6rem; /* Force la hauteur à 2 lignes environ + marge */
}

/* Métadonnées (Auteur, Temps de lecture) */
.card-meta {
    font-size: 0.9rem;
    color: var(--gray-medium);
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-top: 1px solid #f0f0f0;
    padding-top: 1rem;
    margin-top: auto; /* Pousse cet élément tout en bas de la carte */
}

.card-meta .author {
    font-weight: 600;
    color: var(--gray-dark);
}

.card-meta .read-time {
    flex-shrink: 0;
    margin-left: 1rem;
}

/* ========== INTERACTION CŒUR (COULEUR MAUVE KOMIT) ========== */
.like-btn {
    position: absolute;
    top: 15px;
    right: 15px;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: white;
    border: none;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    box-shadow: 0 4px 10px rgba(0,0,0,0.1);
    transition: all 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    z-index: 10;
}

.like-btn svg {
    width: 22px;
    height: 22px;
    fill: transparent;
    stroke: var(--gray-medium);
    stroke-width: 2px;
    transition: all 0.3s ease;
}

.like-btn:hover {
    transform: scale(1.1);
    box-shadow: 0 6px 15px rgba(0,0,0,0.15);
}

/* État actif (Liké) - MODIFIÉ POUR MAUVE KOMIT */
.like-btn.liked {
    background: #F3E5F5; /* Mauve très clair (similaire --violet-soft) */
}

.like-btn.liked svg {
    fill: #662E9B; /* Mauve KOMIT (similaire --komit-violet) */
    stroke: #662E9B;
    animation: heartPop 0.4s ease-out;
}

@keyframes heartPop {
    0% { transform: scale(1); }
    50% { transform: scale(1.4); }
    100% { transform: scale(1); }
}

/* ========== RESPONSIVE ========== */
@media (max-width: 768px) {
    .labs-container {
        padding-top: 120px; 
    }

    .labs-title {
        font-size: 2.5rem;
    }

    .labs-subtitle {
        font-size: 1.1rem;
    }

    .search-bar {
        flex-direction: column;
        border-radius: 12px;
    }
    .search-bar input[type="search"] {
        border-radius: 12px 12px 0 0;
    }
    .search-button {
        border-radius: 0 0 12px 12px;
        padding: 1rem;
    }

    .filter-nav {
        gap: 0.5rem;
    }
    .filter-btn {
        font-size: 0.85rem;
        padding: 0.5rem 1rem;
    }

    .labs-grid {
        grid-template-columns: 1fr;
        gap: 1.5rem;
    }

    .card-title {
        font-size: 1.15rem;
    }
}