/* ═════════════════════════════════════════════════════════════════════════
   NOOKI Startups — Grille avec pills de filtrage
   ═════════════════════════════════════════════════════════════════════════ */

/* ── Container ──────────────────────────────────────────────────────────── */
.wps-grille-wrap {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

/* ── Filtre déroulant ───────────────────────────────────────────────────── */
.wps-filter-wrap {
    max-width: 400px;
    margin: 0 auto 40px auto;
    text-align: center;
}

.wps-filter-label {
    display: block;
    font-size: 16px;
    font-weight: 600;
    color: #162234;
    margin-bottom: 12px;
}

.wps-filter-select {
    width: 100%;
    padding: 12px 40px 12px 20px;
    border-radius: 50px;
    border: 2px solid #162234;
    background: #fff url('data:image/svg+xml;utf8,<svg width="12" height="8" viewBox="0 0 12 8" fill="none" xmlns="http://www.w3.org/2000/svg"><path d="M1 1.5L6 6.5L11 1.5" stroke="%23162234" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"/></svg>') no-repeat right 20px center;
    background-size: 12px;
    color: #162234;
    font-size: 16px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s ease;
    outline: none;
    appearance: none;
    -webkit-appearance: none;
    -moz-appearance: none;
}

.wps-filter-select:hover {
    border-color: #C91D8D;
    box-shadow: 0 2px 8px rgba(201, 29, 141, 0.15);
}

.wps-filter-select:focus {
    border-color: #C91D8D;
    box-shadow: 0 0 0 3px rgba(201, 29, 141, 0.1);
}

.wps-filter-select option {
    padding: 12px;
    font-size: 16px;
}

/* ── Loader ─────────────────────────────────────────────────────────────── */
.wps-grille-loader {
    display: none;
    justify-content: center;
    align-items: center;
    gap: 8px;
    padding: 40px 0;
}

.wps-grille-loader.is-active {
    display: flex;
}

.wps-grille-loader-dot {
    width: 12px;
    height: 12px;
    border-radius: 50%;
    background: #C91D8D;
    animation: wps-bounce 1.4s infinite ease-in-out both;
}

.wps-grille-loader-dot:nth-child(1) { animation-delay: -0.32s; }
.wps-grille-loader-dot:nth-child(2) { animation-delay: -0.16s; }

@keyframes wps-bounce {
    0%, 80%, 100% { transform: scale(0); opacity: 0.5; }
    40% { transform: scale(1); opacity: 1; }
}

/* ── Grille ─────────────────────────────────────────────────────────────── */
.wps-grille {
    display: grid;
    grid-template-columns: repeat(3, 1fr) !important;
    gap: 24px;
    transition: opacity 0.2s;
    align-items: stretch !important;
}

.wps-grille.is-loading {
    opacity: 0.4;
    pointer-events: none;
}

.wps-grille-empty {
    grid-column: 1 / -1;
    text-align: center;
    padding: 60px 20px;
    color: #919191;
    font-size: 18px;
}

/* Wrapper pour chaque carte (permet de gérer le hide) */
.wps-card-wrapper {
    width: 100%;
}

.wps-card-hidden {
    display: none !important;
}

/* Sur desktop : cache après 6 */
@media (min-width: 769px) {
    .wps-card-hidden-desktop {
        display: none !important;
    }
}

/* Sur mobile : cache après 3 */
@media (max-width: 768px) {
    .wps-card-hidden-mobile,
    .wps-card-hidden-desktop {
        display: none !important;
    }
}

/* Bouton "Afficher plus" */
.wps-load-more-wrap {
    text-align: center;
    margin-top: 40px;
}

.wps-load-more-btn {
    background: #C91D8D;
    color: #fff;
    border: none;
    padding: 14px 40px;
    border-radius: 50px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s;
    box-shadow: 0 2px 8px rgba(201, 29, 141, 0.2);
}

.wps-load-more-btn:hover {
    background: #162234;
    box-shadow: 0 4px 16px rgba(22, 34, 52, 0.3);
    transform: translateY(-2px);
}

/* ── Carte ──────────────────────────────────────────────────────────────── */
.wps-card {
    width: 100% !important;
    min-height: 320px !important;
    max-height: 320px !important;
    height: 320px !important;
    background: #fff;
    border-radius: 15px;
    padding: 20px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
    position: relative;
    display: flex !important;
    flex-direction: column !important;
    transition: transform 0.2s, box-shadow 0.2s;
    overflow: hidden !important;
}

.wps-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.12);
}

/* Pill thématique (haut à droite) */
.wps-card-pill {
    position: absolute;
    top: 16px;
    right: 16px;
    background: #E4E3E4;
    color: #162234;
    font-size: 14px;
    padding: 6px 14px;
    max-width: calc(100% - 32px);
    display: inline-block;
    border-radius: 12px;
    font-weight: 500;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    text-align: right;
    line-height: 1.3;
}

/* Header avec photo + meta */
.wps-card-header {
    display: flex;
    align-items: center;
    gap: 14px;
    margin-bottom: 16px;
    padding-top: 40px;
}

/* Photo ronde 58x58 */
.wps-card-photo {
    width: 58px !important;
    height: 58px !important;
    min-width: 58px !important;
    min-height: 58px !important;
    max-width: 58px !important;
    max-height: 58px !important;
    border-radius: 50% !important;
    flex-shrink: 0 !important;
    overflow: hidden !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    position: relative !important;
}

/* Couleurs selon la catégorie */
.wps-photo-startups {
    background: #FF9E53 !important;
}

.wps-photo-alumnis {
    background: #EECDE2 !important;
}

.wps-photo-entreprises {
    background: #042E6E !important;
}

.wps-card-photo img {
    width: 100% !important;
    height: 100% !important;
    min-width: 100% !important;
    min-height: 100% !important;
    max-width: none !important;
    max-height: none !important;
    object-fit: cover !important;
    object-position: center !important;
    display: block !important;
    position: absolute !important;
    top: 0 !important;
    left: 0 !important;
}

.wps-card-photo-placeholder {
    width: 100% !important;
    height: 100% !important;
}

/* Meta (nom + fondateur) */
.wps-card-meta {
    flex: 1;
    min-width: 0;
}

.wps-card-name {
    font-size: 20px;
    font-weight: 700;
    color: #162234;
    margin: 0 0 4px 0;
    line-height: 1.2;
    overflow: hidden;
    text-overflow: ellipsis;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
}

.wps-card-fondateur {
    font-size: 16px;
    color: #919191;
    margin: 0;
    line-height: 1.3;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

/* Description */
.wps-card-desc {
    font-size: 16px !important;
    color: #162234 !important;
    margin: 0 0 12px 0 !important;
    line-height: 1.5 !important;
    flex: 1 !important;
    max-height: 96px !important; /* 16px * 1.5 * 4 lignes = 96px */
    overflow: hidden !important;
    text-overflow: ellipsis !important;
    display: -webkit-box !important;
    -webkit-line-clamp: 4 !important;
    -webkit-box-orient: vertical !important;
    word-wrap: break-word !important;
}

/* Liens site et LinkedIn */
.wps-card-links {
    display: flex;
    gap: 12px;
    margin-top: auto;
    padding-top: 12px;
    border-top: 1px solid #E4E3E4;
}

.wps-card-link {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 6px 12px;
    background: #f5f5f5;
    border-radius: 8px;
    color: #162234;
    font-size: 14px;
    font-weight: 500;
    text-decoration: none;
    transition: all 0.2s;
}

.wps-card-link:hover {
    background: #C91D8D;
    color: #fff;
}

.wps-card-link svg {
    flex-shrink: 0;
}

/* ── Responsive ─────────────────────────────────────────────────────────── */
@media (max-width: 1024px) {
    .wps-grille {
        grid-template-columns: repeat(2, 1fr) !important;
        gap: 20px;
    }
}

@media (max-width: 768px) {
    .wps-grille {
        grid-template-columns: 1fr !important;
        gap: 16px;
    }
    
    .wps-filter-wrap {
        margin-bottom: 30px;
    }
    
    .wps-filter-label {
        font-size: 14px;
        margin-bottom: 10px;
    }
    
    .wps-filter-select {
        padding: 10px 36px 10px 16px;
        font-size: 14px;
        background-position: right 16px center;
    }
    
    .wps-card {
        max-width: 100% !important;
        margin: 0 auto;
    }
    
    .wps-load-more-wrap {
        margin-top: 30px;
    }
    
    .wps-load-more-btn {
        padding: 12px 32px;
        font-size: 14px;
    }
}
