/* Page catégorie - Styles spécifiques */

.main-content {
    margin-left: 240px;
    padding: 2rem;
    overflow-y: auto;
    height: 100vh;
    height: 100dvh;
    box-sizing: border-box;
}

.sidebar.collapsed ~ .main-content {
    margin-left: 80px;
}

.content-wrapper {
    max-width: 1400px;
    margin: 0 auto;
    width: 100%;
}

/* Agrégateur en tête — transition douce vers le détail catégorie (sans barre) */
.category-page-aggregator {
    display: flex;
    flex-direction: column;
    align-items: center;
    width: 100%;
    margin-bottom: 0;
    padding-bottom: 0.5rem;
}

@media (max-width: 768px) {
    .main-content {
        margin-left: 0;
        padding: 1.5rem 1rem;
    }
}

.category-header-page {
    margin-top: 1.25rem;
    margin-bottom: 1.5rem;
}

.back-button-page {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.5rem 1rem;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 8px;
    color: rgba(255, 255, 255, 0.8);
    text-decoration: none;
    font-size: 0.9rem;
    font-weight: 500;
    transition: all 0.2s ease;
    margin-bottom: 1.5rem;
}

.back-button-page:hover {
    background: rgba(255, 255, 255, 0.1);
    border-color: rgba(255, 255, 255, 0.2);
    color: rgba(255, 255, 255, 1);
    transform: translateX(-2px);
}

.back-button-page svg {
    width: 18px;
    height: 18px;
}

.category-header-info {
    display: flex;
    align-items: flex-start;
    gap: 1.5rem;
    padding: 1.5rem;
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 12px;
    backdrop-filter: blur(10px);
}

.category-icon-large {
    width: 56px;
    height: 56px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    color: rgba(255, 255, 255, 0.9);
    background: rgba(255, 255, 255, 0.05);
    border-radius: 10px;
    padding: 0.75rem;
}

.category-icon-large svg {
    width: 100%;
    height: 100%;
}

.category-header-text {
    flex: 1;
    min-width: 0;
}

.category-title-page {
    font-size: 1.75rem;
    font-weight: 700;
    color: rgba(255, 255, 255, 0.95);
    margin: 0 0 0.5rem 0;
    word-wrap: break-word;
    overflow-wrap: break-word;
    line-height: 1.2;
}

.category-description-page {
    font-size: 0.9rem;
    color: rgba(255, 255, 255, 0.6);
    line-height: 1.5;
    margin: 0 0 1rem 0;
    word-wrap: break-word;
    overflow-wrap: break-word;
}

.category-stats-page {
    display: flex;
    align-items: center;
    gap: 1.25rem;
    font-size: 0.85rem;
    color: rgba(255, 255, 255, 0.5);
    flex-wrap: wrap;
}

.category-stat-item {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.category-stat-item svg {
    width: 16px;
    height: 16px;
    opacity: 0.6;
}

/* Grille des IA */
.category-ais-grid-page {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
    gap: 1.25rem;
    margin-top: 1.5rem;
}

.ai-card-page {
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 1rem;
    padding: 1.25rem;
    transition:
        border-color 0.2s ease,
        background 0.2s ease,
        box-shadow 0.2s ease;
    text-decoration: none;
    color: inherit;
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
    min-height: 0;
    position: relative;
    box-shadow: 0 1px 0 rgba(255, 255, 255, 0.04) inset;
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
}

.ai-card-page a {
    text-decoration: none;
    color: inherit;
}

.ai-card-number-page {
    position: absolute;
    top: 0.75rem;
    right: 0.75rem;
    width: 28px;
    height: 28px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(255, 255, 255, 0.06);
    border: 1px solid rgba(255, 255, 255, 0.12);
    border-radius: 6px;
    font-size: 0.75rem;
    font-weight: 700;
    color: rgba(255, 255, 255, 0.75);
    z-index: 1;
}

.ai-card-page:hover {
    background: rgba(255, 255, 255, 0.05);
    border-color: rgba(255, 255, 255, 0.45);
    transform: translateY(-2px);
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.28);
}

.ai-card-header-page {
    display: flex;
    align-items: flex-start;
    gap: 0.75rem;
    min-height: 0;
}

.ai-card-icon-page {
    width: 44px;
    height: 44px;
    border-radius: 8px;
    background: rgba(255, 255, 255, 0.1);
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    overflow: hidden;
}

.ai-card-icon-page img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.ai-card-icon-page .ai-icon-fallback-page {
    font-size: 1.2rem;
    font-weight: 600;
    color: rgba(255, 255, 255, 0.7);
}

.ai-card-info-page {
    flex: 1;
    min-width: 0;
    padding-right: 0.5rem;
}

.ai-card-name-page {
    font-size: 1.05rem;
    font-weight: 600;
    color: rgba(255, 255, 255, 0.95);
    margin: 0 0 0.5rem 0;
    word-wrap: break-word;
    overflow-wrap: break-word;
    line-height: 1.4;
    padding-right: 2rem;
}

.ai-card-desc-page {
    font-size: 0.85rem;
    color: rgba(255, 255, 255, 0.65);
    line-height: 1.5;
    margin: 0;
    display: -webkit-box;
    -webkit-line-clamp: 3;
    line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
    word-wrap: break-word;
    overflow-wrap: break-word;
    text-align: left;
}

.ai-card-stats-page {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding-top: 0.75rem;
    margin-top: auto;
    border-top: 1px solid rgba(255, 255, 255, 0.08);
    font-size: 0.75rem;
    color: rgba(255, 255, 255, 0.4);
}

.ai-stat-item-page {
    display: flex;
    align-items: center;
    gap: 0.4rem;
}

.ai-stat-item-page svg {
    width: 14px;
    height: 14px;
    opacity: 0.6;
}

.ai-card-link-icon-page {
    position: absolute;
    bottom: 0.5rem;
    right: 1rem;
    width: 36px;
    height: 36px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(255, 255, 255, 0.06);
    border: 1px solid rgba(255, 255, 255, 0.14);
    border-radius: 8px;
    color: rgba(255, 255, 255, 0.82);
    transition:
        background 0.2s ease,
        border-color 0.2s ease,
        color 0.2s ease,
        transform 0.2s ease;
    z-index: 2;
}

.ai-card-link-icon-page:hover {
    background: rgba(255, 255, 255, 0.1);
    border-color: rgba(255, 255, 255, 0.28);
    color: rgba(255, 255, 255, 0.95);
    transform: scale(1.06);
}

.ai-card-link-icon-page svg {
    width: 18px;
    height: 18px;
}

/* Responsive */
@media (max-width: 1200px) {
    .category-ais-grid-page {
        grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
        gap: 1.25rem;
    }
}

@media (max-width: 768px) {
    .category-header-info {
        flex-direction: column;
        padding: 1.5rem;
    }

    .category-icon-large {
        width: 48px;
        height: 48px;
        padding: 0.75rem;
    }

    .category-title-page {
        font-size: 1.5rem;
    }

    .category-description-page {
        font-size: 0.9rem;
    }

    .category-ais-grid-page {
        grid-template-columns: 1fr;
        gap: 1rem;
    }

    .ai-card-page {
        padding: 1.25rem;
    }
}

/* ── OpenRouter model cards ─────────────────────────────────────────────── */

.or-models-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 1rem;
}

.or-model-card {
    display: flex;
    flex-direction: column;
    gap: 0.6rem;
}

.or-model-provider {
    font-size: 0.75rem;
    color: rgba(255, 255, 255, 0.4);
    margin: 0;
    letter-spacing: 0.02em;
    text-transform: uppercase;
    font-weight: 500;
}

.or-model-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 0.4rem;
    margin-top: 0.1rem;
}

.or-model-badge {
    display: inline-flex;
    align-items: center;
    padding: 0.2rem 0.55rem;
    border-radius: 5px;
    font-size: 0.7rem;
    font-weight: 500;
    background: rgba(255, 255, 255, 0.06);
    border: 1px solid rgba(255, 255, 255, 0.1);
    color: rgba(255, 255, 255, 0.5);
    white-space: nowrap;
}

.or-model-try-btn {
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    margin-top: auto;
    padding: 0.45rem 0.85rem;
    border-radius: 7px;
    font-size: 0.78rem;
    font-weight: 500;
    color: rgba(255, 255, 255, 0.75);
    background: rgba(255, 255, 255, 0.06);
    border: 1px solid rgba(255, 255, 255, 0.1);
    cursor: pointer;
    transition: background 0.15s ease, border-color 0.15s ease, color 0.15s ease;
    align-self: flex-start;
    font-family: inherit;
}

.or-model-try-btn:hover {
    background: rgba(255, 255, 255, 0.11);
    border-color: rgba(255, 255, 255, 0.25);
    color: rgba(255, 255, 255, 0.95);
}

/* ── Outils separator ───────────────────────────────────────────────────── */

.aixploria-section-header {
    display: flex;
    align-items: center;
    gap: 0.6rem;
    margin: 2.5rem 0 1.25rem;
    font-size: 0.75rem;
    font-weight: 600;
    color: rgba(255, 255, 255, 0.3);
    text-transform: uppercase;
    letter-spacing: 0.1em;
}

.aixploria-section-header::before,
.aixploria-section-header::after {
    content: '';
    flex: 1;
    height: 1px;
    background: rgba(255, 255, 255, 0.07);
}

