/* Page Dashboard - Nouveau design */

.dashboard-page {
    overflow: hidden;
    margin: 0;
    padding: 0;
    height: 100vh;
    height: 100dvh; /* Support pour mobile */
}

body.dashboard-page {
    margin: 0;
    padding: 0;
    height: 100vh;
    height: 100dvh;
    overflow: hidden;
    zoom: 1; /* Réinitialiser le zoom pour le dashboard */
    transform: none;
    background-color: var(--dashboard-bg);
    color: var(--text-white, #fafafa);
    /* Même UI que News / Communauté (styles.css body) — pas de police « cassée » sur le catalogue */
    font-family:
        -apple-system,
        BlinkMacSystemFont,
        "SF Pro Display",
        "SF Pro Text",
        system-ui,
        sans-serif;
}

html.dashboard-page {
    height: 100%;
    margin: 0;
    padding: 0;
    overflow: hidden;
    /* Même idée que .sidebar-content : évite un léger décalage quand la scrollbar document apparaît */
    scrollbar-gutter: stable;
    /* Légèrement moins « noir pur » que #010105 — reste dans l’esprit landing */
    --dashboard-bg: #0c0d14;
    background-color: var(--dashboard-bg);
    /* Sidebar : alignée sur le fond dashboard, survols très légers */
    --sidebar: 240 22% 6%;
    --sidebar-foreground: 240 4.8% 95.9%;
    --sidebar-accent: 240 30% 8%;
    --sidebar-accent-foreground: 240 4.8% 95.9%;
    --sidebar-border: 0 0% 100%;
    --sidebar-ring: 240 4.9% 83.9%;
    --sidebar-width: 15rem;
    --sidebar-width-icon: 3.05rem;
}

/* Menu latéral — aspect shadcn Sidebar (bordure discrète, rail icône 3rem) */
.sidebar {
    position: fixed;
    left: 0;
    top: 0;
    bottom: 0;
    width: var(--sidebar-width);
    height: 100vh;
    height: 100dvh;
    max-height: 100vh;
    max-height: 100dvh;
    background: var(--dashboard-bg);
    color: hsl(var(--sidebar-foreground));
    border-right: 1px solid rgba(255, 255, 255, 0.08);
    display: flex;
    flex-direction: column;
    z-index: 1000;
    transition: width 200ms ease;
    overflow: hidden;
    box-sizing: border-box;
    will-change: width;
    contain: layout style;
    font-family: ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
}

.sidebar.collapsed:not(.sidebar--hover-expand) {
    width: var(--sidebar-width-icon);
}

/* Dashboard : rail étroit + expansion au survol uniquement */
.sidebar.sidebar--hover-expand {
    width: var(--sidebar-width-icon);
}
.sidebar.sidebar--hover-expand:hover {
    width: var(--sidebar-width);
}

/* Même largeur qu’après init JS : évite l’animation rail → plein écran au chargement (News ↔ Catégories) */
html.aionos-sidebar-pinned-preload .sidebar.sidebar--hover-expand {
    width: var(--sidebar-width);
}
html.aionos-sidebar-pinned-preload .sidebar.sidebar--hover-expand ~ .dashboard-main {
    margin-left: var(--sidebar-width);
}
html.aionos-sidebar-pinned-preload .sidebar.sidebar--hover-expand,
html.aionos-sidebar-pinned-preload .sidebar.sidebar--hover-expand ~ .dashboard-main {
    transition: none !important;
}

/* Corps scrollable (équivalent SidebarContent) */
.sidebar-content {
    flex: 1;
    min-height: 0;
    overflow-x: hidden;
    overflow-y: auto;
    /* Évite le décalage horizontal quand la barre de défilement apparaît / disparaît */
    scrollbar-gutter: stable;
    display: flex;
    flex-direction: column;
    padding: 0.5rem 0;
    scrollbar-width: thin;
    scrollbar-color: hsl(var(--sidebar-border) / 0.5) transparent;
}

.sidebar-content::-webkit-scrollbar {
    width: 6px;
}

.sidebar-content::-webkit-scrollbar-thumb {
    background: hsl(var(--sidebar-border) / 0.55);
    border-radius: 999px;
}

/* En-tête du sidebar — SidebarHeader p-2 */
.sidebar-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0.5rem;
    border-bottom: 1px solid hsl(var(--sidebar-border) / 0.45);
    min-height: 3rem;
    flex-shrink: 0;
    gap: 0.5rem;
}

.sidebar.collapsed .sidebar-header, .sidebar.sidebar--hover-expand:not(:hover):not(.sidebar--pinned) .sidebar-header {
    justify-content: center;
    padding: 0.5rem;
    flex-direction: column;
    gap: 0.5rem;
}

.sidebar.collapsed .sidebar-logo, .sidebar.sidebar--hover-expand:not(:hover):not(.sidebar--pinned) .sidebar-logo {
    flex: 0 0 auto;
}

.sidebar.collapsed .window-controls {
    flex: 0 0 auto;
    margin-left: auto;
    display: flex !important;
    visibility: visible !important;
    opacity: 1 !important;
}

.sidebar.collapsed .sidebar-toggle-btn {
    display: flex !important;
    visibility: visible !important;
    opacity: 1 !important;
}

/* Pas de bouton épingler : ouverture / fermeture au survol seulement */
.sidebar.sidebar--hover-expand .window-controls {
    display: none !important;
}

.sidebar-logo {
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.sidebar-logo-icon {
    width: 32px;
    height: 32px;
    object-fit: contain;
}

.sidebar-logo-fallback {
    width: 32px;
    height: 32px;
    border-radius: 0.375rem;
    background: hsl(var(--sidebar-accent));
    display: flex;
    align-items: center;
    justify-content: center;
    color: hsl(var(--sidebar-accent-foreground));
    font-weight: 600;
    font-size: 1.2rem;
}

.window-controls {
    display: flex;
    gap: 0.5rem;
    align-items: center;
}

.window-control-btn {
    width: 1.75rem;
    height: 1.75rem;
    border: none;
    background: transparent;
    border-radius: 0.375rem;
    color: hsl(var(--sidebar-foreground) / 0.85);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background 0.15s ease, color 0.15s ease;
    padding: 0;
}

.window-control-btn:hover {
    background: hsl(var(--sidebar-accent));
    color: hsl(var(--sidebar-accent-foreground));
}

.window-control-btn:focus-visible {
    outline: none;
    box-shadow: 0 0 0 2px hsl(var(--sidebar) / 1), 0 0 0 4px hsl(var(--sidebar-ring) / 0.45);
}

/* Icônes toggle — pages classiques : non collapsed = ouvert ; dashboard hover-expand : épinglé = ouvert */
.sidebar:not(.collapsed):not(.sidebar--hover-expand) .toggle-icon-open,
.sidebar.sidebar--hover-expand.sidebar--pinned .toggle-icon-open {
    display: block !important;
}

.sidebar:not(.collapsed):not(.sidebar--hover-expand) .toggle-icon-close,
.sidebar.sidebar--hover-expand.sidebar--pinned .toggle-icon-close {
    display: none !important;
}

.sidebar.collapsed .toggle-icon-open, .sidebar.sidebar--hover-expand:not(:hover):not(.sidebar--pinned) .toggle-icon-open {
    display: none !important;
}

.sidebar.collapsed .toggle-icon-close, .sidebar.sidebar--hover-expand:not(:hover):not(.sidebar--pinned) .toggle-icon-close {
    display: block !important;
    visibility: visible !important;
    opacity: 1 !important;
}

/* Navigation — pleine largeur, grille fixe icône + texte (évite sauts / largeurs de fond incohérentes) */
.sidebar-nav {
    width: 100%;
    min-width: 0;
    box-sizing: border-box;
    padding: 0 0.5rem;
    display: flex;
    flex-direction: column;
    align-items: stretch;
    gap: 0.25rem;
    flex-shrink: 0;
}

/* SidebarMenuButton — fond sur ::after (le padding + grille ne changent jamais au survol / actif) */
.nav-item {
    display: grid;
    grid-template-columns: 1rem minmax(0, 1fr);
    align-items: center;
    column-gap: 0.5rem;
    width: 100%;
    max-width: 100%;
    min-width: 0;
    min-height: 2rem;
    padding: 0.375rem 0.5rem;
    box-sizing: border-box;
    margin: 0;
    border-radius: 0.375rem;
    position: relative;
    isolation: isolate;
    color: hsl(var(--sidebar-foreground) / 0.9);
    text-decoration: none;
    background: transparent;
    transition: color 0.15s ease;
    user-select: none;
    -webkit-tap-highlight-color: transparent;
    font-size: 0.875rem;
    font-weight: 500;
    line-height: 1.25;
}

.nav-item::after {
    content: '';
    position: absolute;
    inset: 0;
    border-radius: inherit;
    background: transparent;
    z-index: -1;
    pointer-events: none;
    transition: background 0.15s ease;
}

.nav-item:hover {
    color: hsl(var(--sidebar-accent-foreground));
}

.nav-item:hover::after {
    background: hsl(var(--sidebar-accent));
}

.nav-item:focus {
    outline: none;
}

.nav-item:focus-visible {
    outline: none;
    box-shadow: 0 0 0 2px hsl(var(--sidebar) / 1), 0 0 0 4px hsl(var(--sidebar-ring) / 0.45);
}

.nav-item.active {
    color: hsl(var(--sidebar-foreground) / 0.92);
}

.nav-item.active::after {
    background: hsl(var(--sidebar-foreground) / 0.09);
}

.nav-icon {
    width: 1rem;
    height: 1rem;
    opacity: 0.92;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

/* Les SVG du HTML sont en 20×20 : on force la taille du slot pour alignement stable */
.nav-icon svg {
    width: 1rem;
    height: 1rem;
    display: block;
    flex-shrink: 0;
}

.nav-text {
    min-width: 0;
    font-size: inherit;
    font-weight: inherit;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.sidebar.collapsed .nav-text, .sidebar.sidebar--hover-expand:not(:hover):not(.sidebar--pinned) .nav-text {
    display: none;
}

.sidebar.collapsed .nav-item, .sidebar.sidebar--hover-expand:not(:hover):not(.sidebar--pinned) .nav-item {
    display: flex;
    justify-content: center;
    padding: 0.5rem;
    margin: 0 0.125rem;
    width: auto;
    min-width: 0;
    grid-template-columns: unset;
}

/* Séparateur — SidebarSeparator mx-2 */
.sidebar-separator {
    height: 1px;
    background: hsl(var(--sidebar-border) / 0.55);
    margin: 0.5rem 0.5rem;
    flex-shrink: 0;
}

.sidebar-section-title {
    flex: 1;
    min-width: 0;
    padding-right: 0.35rem;
    line-height: 1.3;
}

/* Section repliable (historique agrégateur) */
.sidebar-section {
    padding: 0;
    flex-shrink: 0;
    margin-bottom: 0.3rem;
    margin-top: 0;
}

.sidebar-chats-header.active ~ .sidebar-section {
    margin-bottom: 0;
}

.sidebar-section-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    min-height: 2rem;
    padding: 0 0.5rem;
    margin: 0 0.5rem;
    border-radius: 0.375rem;
    color: hsl(var(--sidebar-foreground) / 0.65);
    font-size: 0.75rem;
    font-weight: 500;
    letter-spacing: 0.01em;
    cursor: pointer;
    transition: background 0.15s ease, color 0.15s ease;
    width: calc(100% - 1rem);
    box-sizing: border-box;
}

.sidebar-section-header:hover {
    color: hsl(var(--sidebar-foreground) / 0.9);
    background: hsl(var(--sidebar-accent) / 0.35);
}

.sidebar-section-arrow {
    width: 16px;
    height: 16px;
    opacity: 0.5;
    transition: transform 0.2s ease;
    transform: rotate(0deg); /* Par défaut, pointe vers la droite (section masquée) */
}

.sidebar-section-header.active .sidebar-section-arrow {
    transform: rotate(90deg); /* Pointe vers le bas quand la section est ouverte */
}

.sidebar.collapsed .sidebar-section-header, .sidebar.sidebar--hover-expand:not(:hover):not(.sidebar--pinned) .sidebar-section-header {
    display: none;
}

/* Contenu de la section Agrégateur */
.sidebar-section-content {
    display: none; /* Masqué par défaut */
    flex-direction: column;
    padding: 0.5rem 0;
    gap: 0.5rem;
    overflow-y: auto;
    overflow-x: hidden;
    max-height: calc(100vh - 400px);
    min-height: 0;
}

.sidebar-section-header.active ~ .sidebar-section-content {
    display: flex; /* Affiché quand la section est active */
    padding-top: 0.5rem;
}

.sidebar.collapsed .sidebar-section-content, .sidebar.sidebar--hover-expand:not(:hover):not(.sidebar--pinned) .sidebar-section-content {
    display: none !important;
}

/* Vos chats - Même structure que sidebar-section */
.sidebar-chats {
    padding: 0;
    flex-shrink: 0;
    margin-bottom: 0.3rem;
    margin-top: 0;
    width: 100%;
    box-sizing: border-box;
    display: flex;
    flex-direction: column;
}

.sidebar-chats-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    min-height: 2rem;
    padding: 0 0.5rem;
    margin: 0 0.5rem;
    border-radius: 0.375rem;
    color: hsl(var(--sidebar-foreground) / 0.65);
    font-size: 0.75rem;
    font-weight: 500;
    letter-spacing: 0.01em;
    cursor: pointer;
    transition: background 0.15s ease, color 0.15s ease;
    width: calc(100% - 1rem);
    box-sizing: border-box;
}

.sidebar-chats-header:hover {
    color: hsl(var(--sidebar-foreground) / 0.9);
    background: hsl(var(--sidebar-accent) / 0.35);
}

.sidebar-chats-arrow {
    width: 16px;
    height: 16px;
    opacity: 0.5;
    transition: transform 0.2s ease;
    transform: rotate(0deg); /* Par défaut, pointe vers la droite (chats masqués) */
}

.sidebar-chats-header.active .sidebar-chats-arrow {
    transform: rotate(90deg); /* Pointe vers le bas quand les chats sont ouverts */
}

.sidebar.collapsed .sidebar-chats-header, .sidebar.sidebar--hover-expand:not(:hover):not(.sidebar--pinned) .sidebar-chats-header {
    display: none;
}

/* Contenu de la section Vos chats - Affiché quand active, comme Agrégateur */
.sidebar-chats-list {
    display: none; /* Masqué par défaut */
    flex-direction: column !important;
    padding: 0.5rem 0;
    gap: 0.5rem;
    overflow-y: auto;
    overflow-x: hidden;
    max-height: calc(100vh - 400px);
    min-height: 0;
    width: 100% !important;
    box-sizing: border-box;
    align-items: stretch;
}

.sidebar-chats-header.active ~ .sidebar-chats-list {
    display: flex !important; /* Affiché quand la section est active */
    flex-direction: column !important;
    flex-wrap: nowrap !important;
    padding-top: 0.5rem;
    align-items: stretch !important;
    justify-content: flex-start !important;
}

.sidebar.collapsed .sidebar-chats-list, .sidebar.sidebar--hover-expand:not(:hover):not(.sidebar--pinned) .sidebar-chats-list {
    display: none !important;
}

/* Message vide (même style pour Agrégateur et Vos chats) */
.chats-empty {
    padding: 1rem;
    text-align: center;
    color: rgba(255, 255, 255, 0.5);
    font-size: 0.9rem;
    width: 100%;
    box-sizing: border-box;
}

/* Wrapper pour chaque chat - même style partout (Agrégateur et Vos chats) */
.chat-item-wrapper {
    display: flex !important;
    align-items: center;
    gap: 0.5rem;
    padding: 0.5rem;
    border-radius: 6px;
    transition: background 0.2s;
    width: 100% !important;
    max-width: 100% !important;
    box-sizing: border-box;
    flex-direction: row;
    flex-shrink: 0;
}

.chat-item-wrapper:hover {
    background: hsl(var(--sidebar-accent) / 0.45);
}

.chat-item-wrapper.active {
    background: hsl(var(--sidebar-accent));
}

.chat-item-wrapper.active:hover {
    background: hsl(var(--sidebar-accent));
}

/* Style spécifique pour les wrappers dans Vos chats - affichage vertical */
.sidebar-chats-list .chat-item-wrapper {
    width: 100% !important;
    max-width: 100% !important;
    min-width: 0;
    display: flex !important;
    flex-direction: row !important;
    align-items: center !important;
    margin-bottom: 0;
}

/* Chat item - style de base */
.chat-item {
    padding: 0.5rem 0.75rem;
    color: rgba(255, 255, 255, 0.7);
    text-decoration: none;
    font-size: 0.8rem;
    font-weight: 300;
    transition: all 0.2s ease;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    display: block;
    width: 100%;
    box-sizing: border-box;
    border-radius: 6px;
}

/* Chat item direct dans sidebar-chats-list (sans wrapper) - affichage vertical */
.sidebar-chats-list > .chat-item {
    width: 100% !important;
    display: block !important;
    margin-bottom: 0.25rem;
}

/* Chat item dans le wrapper (même style pour Agrégateur et Vos chats) */
.chat-item-wrapper .chat-item {
    flex: 1;
    padding: 0;
    margin: 0;
    border-left: none;
    display: block;
    min-width: 0;
    max-width: 100%;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.chat-item:hover {
    background: rgba(255, 255, 255, 0.05);
    color: rgba(255, 255, 255, 0.9);
}

.chat-item.active {
    background: hsl(var(--sidebar-foreground) / 0.06);
    color: hsl(var(--sidebar-foreground) / 0.88);
    border-left-color: transparent;
}

.sidebar.collapsed .chat-item, .sidebar.sidebar--hover-expand:not(:hover):not(.sidebar--pinned) .chat-item {
    display: none;
}

/* Bouton de suppression de chat (même style pour Agrégateur et Vos chats) */
.chat-delete-btn {
    background: transparent;
    border: none;
    color: rgba(255, 255, 255, 0.4);
    cursor: pointer;
    padding: 0.35rem;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 4px;
    transition: all 0.2s ease;
    flex-shrink: 0;
    opacity: 0;
}

.chat-item-wrapper:hover .chat-delete-btn {
    opacity: 1;
}

.chat-delete-btn:hover {
    background: rgba(255, 255, 255, 0.06);
    color: rgba(255, 255, 255, 0.75);
}

.chat-delete-btn:active {
    background: rgba(255, 255, 255, 0.1);
    color: rgba(255, 255, 255, 0.9);
}

.chat-delete-btn:disabled {
    opacity: 0.3;
    cursor: not-allowed;
}

.chat-delete-btn svg {
    width: 14px;
    height: 14px;
}

/* Chat items in Vos chats (new structure with delete btn) */
.sidebar-chats-list > div.chat-item {
    display: flex;
    align-items: center;
    border-radius: 6px;
    margin-bottom: 0.15rem;
    overflow: hidden;
}

.sidebar-chats-list > div.chat-item:hover {
    background: rgba(255, 255, 255, 0.05);
}

.sidebar-chats-list > div.chat-item.active {
    background: rgba(255, 255, 255, 0.1);
}

.chat-item-link {
    flex: 1;
    min-width: 0;
    padding: 0.5rem 0.75rem;
    color: rgba(255, 255, 255, 0.7);
    text-decoration: none;
    font-size: 0.8rem;
    font-weight: 300;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    overflow: hidden;
}

.chat-item-link:hover {
    color: rgba(255, 255, 255, 0.9);
}

.sidebar-chats-list > div.chat-item.active .chat-item-link {
    color: rgba(255, 255, 255, 0.95);
}

.chat-item-link .chat-icon {
    flex-shrink: 0;
    font-size: 0.85rem;
}

.chat-item-link .chat-title {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.sidebar-chats-list > div.chat-item:hover .chat-delete-btn {
    opacity: 1;
}

/* Bouton toggle sidebar dans les contrôles */
.sidebar-toggle-btn {
    transition: all 0.2s ease;
}

.sidebar-toggle-btn:hover {
    background: hsl(var(--sidebar-accent));
    color: hsl(var(--sidebar-accent-foreground));
}

/* Footer sidebar — SidebarFooter p-2 */
.sidebar-footer {
    padding: 0.5rem;
    border-top: 1px solid hsl(var(--sidebar-border) / 0.45);
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.5rem;
    flex-shrink: 0;
    margin-top: auto;
    min-height: fit-content;
}

.sidebar-settings-btn {
    width: 2rem;
    height: 2rem;
    border: none;
    background: transparent;
    border-radius: 0.375rem;
    color: hsl(var(--sidebar-foreground) / 0.75);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background 0.15s ease, color 0.15s ease;
    flex-shrink: 0;
}

.sidebar-settings-btn:hover {
    background: hsl(var(--sidebar-accent));
    color: hsl(var(--sidebar-accent-foreground));
}

.sidebar-settings-btn:focus-visible {
    outline: none;
    box-shadow: 0 0 0 2px hsl(var(--sidebar) / 1), 0 0 0 4px hsl(var(--sidebar-ring) / 0.45);
}

.sidebar.collapsed .sidebar-footer, .sidebar.sidebar--hover-expand:not(:hover):not(.sidebar--pinned) .sidebar-footer {
    padding: 0.75rem 0.5rem;
    flex-direction: column;
    gap: 0.5rem;
}

/* Contenu principal — décalage = largeur sidebar (shadcn) */
.dashboard-main {
    margin-left: var(--sidebar-width);
    height: 100vh;
    height: 100dvh;
    overflow: hidden;
    transition: margin-left 200ms ease;
    position: relative;
    z-index: 1;
    background: var(--dashboard-bg);
}

/* Positionner les sections de manière relative au main */
#section-categories {
    position: relative;
    height: 100%;
}

.sidebar.collapsed:not(.sidebar--hover-expand) ~ .dashboard-main {
    margin-left: var(--sidebar-width-icon);
}

.sidebar.sidebar--hover-expand ~ .dashboard-main {
    margin-left: var(--sidebar-width-icon);
}
.sidebar.sidebar--hover-expand:hover ~ .dashboard-main {
    margin-left: var(--sidebar-width);
}

.dashboard-content {
    max-width: 1200px;
    margin: 0 auto;
    padding: 3rem 2rem;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    min-height: 100vh;
    gap: 1.5rem;
}

/* Section dashboard - conteneur qui prend toute la hauteur */
.dashboard-section {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    overflow-y: auto;
    overflow-x: hidden;
    /* Cacher la scrollbar mais garder le scroll */
    scrollbar-width: none; /* Firefox */
    -ms-overflow-style: none; /* IE et Edge */
}

.dashboard-section::-webkit-scrollbar {
    display: none; /* Chrome, Safari, Opera */
}

/* Section catégories - scrollable depuis le haut jusqu'en bas */
.dashboard-section .categories-content {
    padding: 0 2.25rem 2.75rem;
    max-width: 1320px;
    margin: 0 auto;
    width: 100%;
    display: flex;
    flex-direction: column;
    box-sizing: border-box;
    min-height: min-content;
    gap: 0;
}

/* Shell catalogue — même esprit que le flux communauté (surfaces neutres, pas de dégradé bleuté) */
.catalog-shell {
    position: relative;
    width: 100%;
    margin-top: 1.15rem;
    padding: 1rem 1rem 1.1rem;
    border-radius: 1rem;
    border: 1px solid rgba(255, 255, 255, 0.1);
    background: rgba(255, 255, 255, 0.02);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    box-shadow: 0 1px 0 rgba(255, 255, 255, 0.04) inset;
}

/* Hauteur minimale pendant le chargement (overlay seul sinon trop plat) */
.catalog-shell:not(.catalog-shell--ready) {
    min-height: min(70vh, 520px);
}

/* Masque titre + recherche + grille jusqu’à fin du chargement (live + JSON) */
.catalog-loading-overlay {
    position: absolute;
    inset: 0;
    z-index: 20;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 2rem 1.5rem;
    box-sizing: border-box;
    border-radius: inherit;
    background: rgba(12, 13, 20, 0.94);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
}

.catalog-shell.catalog-shell--ready .catalog-loading-overlay {
    display: none;
}

.catalog-loading-overlay__inner {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 1rem;
    text-align: center;
    max-width: 22rem;
}

.catalog-loading-overlay__spinner {
    width: 44px;
    height: 44px;
    border-width: 3px;
}

.catalog-loading-overlay__text {
    margin: 0;
    font-size: 0.9rem;
    font-weight: 500;
    color: rgba(255, 255, 255, 0.72);
    letter-spacing: 0.02em;
}

.catalog-loading-overlay__sub {
    margin: 0;
    font-size: 0.78rem;
    line-height: 1.45;
    font-weight: 400;
    color: rgba(255, 255, 255, 0.48);
    max-width: 26rem;
}

.catalog-loading-overlay__sub[hidden] {
    display: none !important;
}

@media (prefers-reduced-motion: reduce) {
    .catalog-loading-overlay__spinner {
        animation: none;
        border-top-color: rgba(255, 255, 255, 0.45);
    }
}

.catalog-head {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.55rem;
    margin-bottom: 1.05rem;
}

.catalog-subtitle {
    margin: 0;
    font-size: 0.85rem;
    line-height: 1.45;
    color: rgba(255, 255, 255, 0.62);
    text-align: center;
    max-width: 52rem;
}

/* S'assurer que le contenu commence bien en haut */
.dashboard-section .categories-content > *:first-child {
    margin-top: 0;
}

/*
 * Bloc agrégateur : hauteur ~viewport moins une bande pour entrevoir le catalogue ;
 * contenu titre + chat centrés verticalement dans cette zone.
 */
.aggregator-category-row {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    width: 100%;
    flex-shrink: 0;
    min-height: calc(100vh - 2.75rem);
    min-height: calc(100dvh - 2.75rem);
    padding: 1.5rem 1rem 0.65rem;
    box-sizing: border-box;
    margin-bottom: 0;
}

/*
 * Entre la box agrégateur et le titre catégories : trait vertical discret, centré.
 * Le décalage vers le haut ne touche qu’au trait (transform sur __cue), pas au titre.
 */
.dashboard-scroll-hint {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    flex-shrink: 0;
    padding: 0.2rem 0 0.45rem;
    margin: 0;
    border: none;
    border-radius: 0;
    background: transparent;
    box-shadow: none;
    cursor: pointer;
    transition: opacity 0.2s ease;
}

.dashboard-scroll-hint:hover {
    opacity: 1;
}

.dashboard-scroll-hint:hover .dashboard-scroll-hint__bar {
    opacity: 1;
    filter: brightness(1.15);
}

.dashboard-scroll-hint:focus-visible {
    outline: 2px solid rgba(255, 255, 255, 0.65);
    outline-offset: 3px;
}

.dashboard-scroll-hint__cue {
    display: flex;
    align-items: center;
    justify-content: center;
    line-height: 0;
    transform: translateY(-12rem);
}

/* Barre verticale légère (pas de flèche) */
.dashboard-scroll-hint__bar {
    display: block;
    width: 2px;
    height: 28px;
    border-radius: 2px;
    background: linear-gradient(
        180deg,
        rgba(255, 255, 255, 0.06) 0%,
        rgba(255, 255, 255, 0.38) 45%,
        rgba(255, 255, 255, 0.1) 100%
    );
    opacity: 0.85;
    animation: dashboard-scroll-hint-nudge 1.75s ease-in-out infinite;
}

@keyframes dashboard-scroll-hint-nudge {
    0%,
    100% {
        transform: translateY(0);
        opacity: 0.65;
    }
    50% {
        transform: translateY(4px);
        opacity: 1;
    }
}

@media (prefers-reduced-motion: reduce) {
    .dashboard-scroll-hint__bar {
        animation: none;
        opacity: 0.8;
    }

    .aggregator-category-row .dashboard-content--embedded {
        transform: none;
    }
}

.dashboard-content--embedded {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    min-height: 0;
    width: 100%;
    max-width: 920px;
    margin: 0 auto;
    padding: 0.75rem 0.75rem 1rem;
    gap: 2rem;
}

/* Remonte un peu le titre rotatif (« Comment pouvons-nous vous aider ? », etc.) + la zone chat */
.aggregator-category-row .dashboard-content--embedded {
    transform: translateY(-1.75rem);
}

/* Chat landing (Ruixen) réutilisé dans le dashboard : un peu plus large */
.dashboard-content--embedded .hero-chat-stack {
    width: 100%;
    max-width: 44rem;
}

/* Suggestions sous la chatbox — même position/couleurs que la landing */
.dashboard-content--embedded .quick-suggestions {
    margin-top: 0.85rem;
    display: flex;
    justify-content: center;
    width: 100%;
}

.dashboard-content--embedded .quick-suggestions .suggestions {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: center;
    gap: 0.45rem;
    max-width: 100%;
}

.dashboard-content--embedded .quick-suggestions .suggestion-chip {
    font-family: var(--ruixen-ui);
    background: rgba(0, 0, 0, 0.4);
    border: 1px solid rgba(64, 64, 64, 0.75);
    border-radius: 999px;
    padding: 0.4rem 0.85rem;
    font-size: 0.72rem;
    color: #d4d4d4;
}

.dashboard-content--embedded .quick-suggestions .suggestion-chip:hover {
    background: rgba(255, 255, 255, 0.06);
    border-color: rgba(115, 115, 115, 0.6);
    color: var(--ruixen-fg);
}

.dashboard-content--embedded .quick-suggestions .chip-icon {
    color: #737373;
}

.dashboard-content--embedded .quick-suggestions .more-btn {
    width: 32px;
    height: 32px;
    min-width: 32px;
    border-radius: 999px;
    border: 1px solid rgba(64, 64, 64, 0.75);
    color: #a3a3a3;
    background: rgba(0, 0, 0, 0.35);
}

.dashboard-content--embedded .quick-suggestions .more-btn:hover {
    color: #e5e5e5;
    border-color: rgba(115, 115, 115, 0.6);
    background: rgba(255, 255, 255, 0.06);
}

/* Titre principal (questions rotatives : intéresse, préoccupe, etc.) */
.dashboard-prompt {
    font-family: inherit;
    font-size: 2rem;
    font-weight: 600;
    letter-spacing: -0.02em;
    color: var(--text-white);
    text-align: center;
    margin: 0;
    line-height: 1.2;
    transition: opacity 0.3s ease;
}

/* Chatbox (identique à index.html mais plus petite) */
.dashboard-content .chat-box {
    margin-bottom: 0;
    max-width: 650px;
    width: 100%;
    padding: 1rem 1.5rem 0.75rem;
    border-radius: 16px;
}

.dashboard-content .chat-input {
    font-size: 0.9rem;
    padding: 0.15rem 0;
}

.dashboard-content .chat-footer {
    margin-top: 1.25rem;
    padding-top: 2.5rem;
}

/* Agrégateur dashboard : pied de chat un peu plus serré pour mieux centrer le bloc */
.dashboard-content--embedded .chat-footer {
    margin-top: 0.85rem;
    padding-top: 1.35rem;
}

.dashboard-content .suggestion-chip {
    padding: 0.45rem 0.9rem;
    font-size: 0.8rem;
    border-radius: 18px;
}

.dashboard-content .send-button {
    width: 32px;
    height: 32px;
}

.dashboard-content .send-button svg {
    width: 15px;
    height: 15px;
}

.dashboard-content .more-btn {
    width: 32px;
    height: 32px;
}

.dashboard-content .more-btn svg {
    width: 14px;
    height: 14px;
}

/* Responsive */
@media (max-width: 768px) {
    .sidebar {
        transform: translateX(-100%);
    }

    .sidebar.open {
        transform: translateX(0);
    }

    .dashboard-main {
        margin-left: 0;
    }

    /* Pas de rail au tactile : menu plein largeur quand la feuille est ouverte */
    .sidebar.sidebar--hover-expand,
    .sidebar.sidebar--hover-expand:hover {
        width: min(18rem, calc(100vw - 1.5rem)) !important;
    }

    .sidebar.sidebar--hover-expand .sidebar-section-header,
    .sidebar.sidebar--hover-expand .sidebar-chats-header {
        display: flex !important;
    }

    .sidebar.sidebar--hover-expand .nav-text {
        display: block !important;
    }

    .sidebar.sidebar--hover-expand .sidebar-section-content,
    .sidebar.sidebar--hover-expand .sidebar-chats-list {
        display: none !important;
    }

    .sidebar.sidebar--hover-expand .sidebar-section-header.active ~ .sidebar-section-content,
    .sidebar.sidebar--hover-expand .sidebar-chats-header.active ~ .sidebar-chats-list {
        display: flex !important;
    }

    .sidebar.sidebar--hover-expand .nav-item {
        display: grid !important;
        justify-content: initial !important;
        grid-template-columns: 1rem minmax(0, 1fr) !important;
        padding: 0.375rem 0.5rem !important;
        margin: 0 0 0.125rem !important;
        width: 100% !important;
    }

    .sidebar.sidebar--hover-expand .chat-item {
        display: block !important;
    }

    .sidebar.sidebar--hover-expand .sidebar-footer-pp-text {
        display: flex !important;
    }

    .sidebar.sidebar--hover-expand .sidebar-footer-pp {
        flex: 1 !important;
        padding: 0.35rem 0.5rem !important;
    }

    .aggregator-category-row {
        min-height: calc(100vh - 2.5rem);
        min-height: calc(100dvh - 2.5rem);
        padding: 1rem 0.65rem 0.5rem;
    }

    .dashboard-scroll-hint {
        padding: 0.15rem 0 0.4rem;
        margin: 0;
    }

    .dashboard-scroll-hint__cue {
        transform: translateY(-9.5rem);
    }

    .dashboard-scroll-hint__bar {
        height: 24px;
    }

    .dashboard-content--embedded {
        gap: 1.5rem;
        padding: 0.5rem 0.5rem 0.75rem;
    }

    .dashboard-prompt {
        font-size: 2rem;
    }

    .dashboard-content {
        padding: 2rem 1rem;
    }

    .categories-grid-dashboard {
        grid-template-columns: 1fr;
    }

    .categories-title-dashboard {
        font-size: 2rem;
    }
}

/* Scrollbar personnalisée */
.sidebar-chats::-webkit-scrollbar {
    width: 6px;
}

.sidebar-chats::-webkit-scrollbar-track {
    background: transparent;
}

.sidebar-chats::-webkit-scrollbar-thumb {
    background: rgba(255, 255, 255, 0.2);
    border-radius: 3px;
}

.sidebar-chats::-webkit-scrollbar-thumb:hover {
    background: rgba(255, 255, 255, 0.3);
}

/* Agrégateur d'IA */
.aggregator-loader {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 3rem;
    color: rgba(255, 255, 255, 0.7);
}

.loader-spinner {
    width: 40px;
    height: 40px;
    border: 3px solid rgba(255, 255, 255, 0.1);
    border-top-color: rgba(255, 255, 255, 0.6);
    border-radius: 50%;
    animation: spin 1s linear infinite;
    margin-bottom: 1rem;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

.aggregator-results {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
    gap: 1.5rem;
    padding: 2rem 0;
    max-width: 1400px;
    margin: 0 auto;
}

.ai-card {
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 12px;
    padding: 1.5rem;
    transition: all 0.3s ease;
    cursor: pointer;
    backdrop-filter: blur(10px);
}

.ai-card:hover {
    background: rgba(255, 255, 255, 0.05);
    border-color: rgba(255, 255, 255, 0.2);
    transform: translateY(-2px);
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.3);
}

.ai-card-header {
    display: flex;
    align-items: flex-start;
    gap: 1rem;
    margin-bottom: 1rem;
}

.ai-card-icon {
    width: 48px;
    height: 48px;
    border-radius: 8px;
    overflow: hidden;
    flex-shrink: 0;
    background: rgba(255, 255, 255, 0.05);
}

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

.ai-card-title-section {
    flex: 1;
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 1rem;
}

.ai-card-title {
    font-size: 1.1rem;
    font-weight: 600;
    color: rgba(255, 255, 255, 0.9);
    margin: 0;
    line-height: 1.3;
}

.ai-card-score {
    display: flex;
    align-items: baseline;
    gap: 0.25rem;
    background: rgba(255, 255, 255, 0.08);
    padding: 0.25rem 0.5rem;
    border-radius: 6px;
    font-size: 0.85rem;
}

.score-value {
    font-weight: 700;
    color: rgba(255, 255, 255, 0.9);
}

.score-label {
    font-size: 0.75rem;
    color: rgba(255, 255, 255, 0.6);
}

.ai-card-body {
    margin-bottom: 1rem;
}

.ai-card-description {
    color: rgba(255, 255, 255, 0.7);
    font-size: 0.9rem;
    line-height: 1.5;
    margin-bottom: 0.75rem;
}

.ai-card-reason {
    color: rgba(255, 255, 255, 0.6);
    font-size: 0.85rem;
    font-style: italic;
    margin-bottom: 0.75rem;
    padding-left: 0.75rem;
    border-left: 2px solid rgba(255, 255, 255, 0.2);
}

.ai-card-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 0.75rem;
    font-size: 0.8rem;
}

.ai-meta-item {
    color: rgba(255, 255, 255, 0.6);
}

.meta-label {
    color: rgba(255, 255, 255, 0.5);
    margin-right: 0.25rem;
}

.ai-card-footer {
    display: flex;
    gap: 0.75rem;
    padding-top: 1rem;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
}

.ai-card-link {
    flex: 1;
    text-align: center;
    padding: 0.5rem 1rem;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 6px;
    color: rgba(255, 255, 255, 0.8);
    text-decoration: none;
    font-size: 0.85rem;
    transition: all 0.2s ease;
}

.ai-card-link:hover {
    background: rgba(255, 255, 255, 0.1);
    border-color: rgba(255, 255, 255, 0.2);
}

.ai-card-details-btn {
    padding: 0.5rem 1rem;
    background: transparent;
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 6px;
    color: rgba(255, 255, 255, 0.7);
    font-size: 0.85rem;
    cursor: pointer;
    transition: all 0.2s ease;
}

.ai-card-details-btn:hover {
    background: rgba(255, 255, 255, 0.05);
    color: rgba(255, 255, 255, 0.9);
}

/* Modale de détails */
.ai-details-modal {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 2000;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 2rem;
}

.ai-details-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.8);
    backdrop-filter: blur(4px);
}

.ai-details-content {
    position: relative;
    background: rgba(15, 20, 30, 0.98);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 16px;
    max-width: 800px;
    max-height: 90vh;
    width: 100%;
    overflow-y: auto;
    padding: 2rem;
    z-index: 1;
}

.ai-details-close {
    position: absolute;
    top: 1rem;
    right: 1rem;
    background: transparent;
    border: none;
    color: rgba(255, 255, 255, 0.7);
    font-size: 2rem;
    cursor: pointer;
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    transition: all 0.2s ease;
}

.ai-details-close:hover {
    background: rgba(255, 255, 255, 0.1);
    color: rgba(255, 255, 255, 0.9);
}

.ai-details-header {
    display: flex;
    align-items: center;
    gap: 1rem;
    margin-bottom: 2rem;
    padding-bottom: 1.5rem;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.ai-details-icon {
    width: 64px;
    height: 64px;
    border-radius: 12px;
    overflow: hidden;
    background: rgba(255, 255, 255, 0.05);
}

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

.ai-details-header h2 {
    font-size: 1.5rem;
    font-weight: 600;
    color: rgba(255, 255, 255, 0.9);
    margin: 0;
}

.ai-details-body {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

.ai-details-section h3 {
    font-size: 1.1rem;
    font-weight: 600;
    color: rgba(255, 255, 255, 0.8);
    margin-bottom: 0.75rem;
}

.ai-details-section p {
    color: rgba(255, 255, 255, 0.7);
    line-height: 1.6;
    font-size: 0.95rem;
}

.ai-details-footer {
    margin-top: 2rem;
    padding-top: 1.5rem;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
}

.ai-details-link {
    display: inline-block;
    padding: 0.75rem 1.5rem;
    background: rgba(255, 255, 255, 0.08);
    border: 1px solid rgba(255, 255, 255, 0.22);
    border-radius: 8px;
    color: rgba(255, 255, 255, 0.92);
    text-decoration: none;
    font-weight: 500;
    transition: all 0.2s ease;
}

.ai-details-link:hover {
    background: rgba(255, 255, 255, 0.14);
    border-color: rgba(255, 255, 255, 0.35);
}

.aggregator-error {
    padding: 1rem;
    background: rgba(244, 67, 54, 0.2);
    border: 1px solid rgba(244, 67, 54, 0.4);
    border-radius: 8px;
    color: #f44336;
    margin: 1rem 0;
}

.no-results {
    text-align: center;
    padding: 3rem;
    color: rgba(255, 255, 255, 0.6);
}

@media (max-width: 768px) {
    .aggregator-results {
        grid-template-columns: 1fr;
        padding: 1rem;
    }

    .ai-details-content {
        padding: 1.5rem;
        max-height: 95vh;
    }
}

/* ============================================
   STYLES POUR LA SECTION CATÉGORIES DASHBOARD
   ============================================ */

/* Section Nouveautés */
.nouveautes-section-dashboard {
    margin-bottom: 3rem;
}

.nouveautes-title-dashboard {
    font-size: 0.8rem;
    font-weight: 600;
    font-family: 'SF Pro', Thin, sans-serif;
    color: rgba(255, 255, 255, 0.95);
    margin-bottom: 0.8rem;
    letter-spacing: 0.5px;
}

.featured-carousel-dashboard {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 1.5rem;
}

.featured-card-dashboard {
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 12px;
    overflow: hidden;
    height: 280px;
    width: 380px;
    position: relative;
    backdrop-filter: blur(10px);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.featured-card-dashboard:hover {
    transform: translateY(-4px);
    box-shadow: 0 12px 32px rgba(0, 0, 0, 0.4);
}

.featured-image-dashboard {
    width: 100%;
    height: 100%;
    background-size: cover;
    background-position: center;
    position: relative;
    display: flex;
    flex-direction: column;
    justify-content: flex-end;
    padding: 1.25rem;
}

.featured-badge-dashboard {
    position: absolute;
    top: 0.75rem;
    left: 0.75rem;
    right: 0.75rem;
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 0.5rem;
}

.badge-item-dashboard {
    background: rgba(255, 255, 255, 0.15);
    backdrop-filter: blur(10px);
    padding: 0.25rem 0.5rem;
    border-radius: 12px;
    font-size: 0.4rem;
    color: rgba(255, 255, 255, 0.95);
    border: 1px solid rgba(255, 255, 255, 0.3);
    font-weight: 500;
    text-transform: uppercase;
    display: flex;
    align-items: center;
    gap: 0.3rem;
}

.badge-item-dashboard.badge-with-icon {
    display: flex;
    align-items: center;
    gap: 0.3rem;
    margin-left: auto;
}

.badge-item-dashboard.badge-with-icon svg {
    width: 11px;
    height: 11px;
    flex-shrink: 0;
    opacity: 0.9;
}

.featured-content-dashboard {
    padding-top: 2rem;
}

.featured-title-dashboard {
    font-size: 1.1rem;
    font-weight: 700;
    color: rgba(255, 255, 255, 0.95);
    margin-bottom: 0.4rem;
}

.featured-desc-dashboard {
    font-size: 0.8rem;
    color: rgba(255, 255, 255, 0.7);
    margin-bottom: 1rem;
    line-height: 1.3;
}

.featured-buttons-dashboard {
    display: flex;
    gap: 0.5rem;
}

.btn-featured-dashboard {
    padding: 0.5rem 1rem;
    border-radius: 6px;
    border: none;
    font-weight: 500;
    font-size: 0.7rem;
    cursor: pointer;
    transition: all 0.2s ease;
    text-decoration: none;
}

.btn-featured-primary-dashboard {
    background: rgba(255, 255, 255, 0.95);
    color: #0a1628;
}

.btn-featured-primary-dashboard:hover {
    background: rgba(255, 255, 255, 1);
    transform: translateY(-2px);
}

.btn-featured-secondary-dashboard {
    background: rgba(255, 255, 255, 0.1);
    color: rgba(255, 255, 255, 0.9);
    border: 1px solid rgba(255, 255, 255, 0.2);
}

.btn-featured-secondary-dashboard:hover {
    background: rgba(255, 255, 255, 0.15);
}

/* Titre catalogue — sans-serif comme le corps News / Communauté */
.categories-main-title-dashboard {
    font-family: inherit;
    text-align: center;
    font-size: 1.65rem;
    font-weight: 600;
    padding-top: 0;
    color: rgba(255, 255, 255, 0.95);
    margin: 0;
    letter-spacing: -0.02em;
    scroll-margin-top: 1rem;
}

/* Barre unique recherche + filtres (une ligne, type liste catégorie) */
.dash-cat-toolbar-wrap {
    margin-bottom: 1.05rem;
    width: 100%;
    padding-bottom: 0.5rem;
    border-bottom: none;
}

.dash-cat-toolbar {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 0.45rem 0.6rem;
    row-gap: 0.4rem;
    width: 100%;
}

/* Dock recherche catalogue — même interaction / DA que News & Communauté (.c-search-dock) */
.dash-cat-toolbar .c-search-dock {
    position: relative;
    height: 3rem;
    width: 3rem;
    flex-shrink: 0;
    transition: width 0.38s cubic-bezier(0.22, 1, 0.36, 1);
}

.dash-cat-toolbar .c-search-dock.is-expanded {
    width: min(22rem, calc(100vw - 11rem));
}

@media (max-width: 640px) {
    .dash-cat-toolbar .c-search-dock.is-expanded {
        width: min(22rem, calc(100vw - 2.5rem));
    }
}

.dash-cat-toolbar .c-search-dock__toggle {
    position: absolute;
    inset: 0;
    z-index: 2;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 3rem;
    height: 3rem;
    padding: 0;
    border-radius: 999px;
    border: 1px solid rgba(255, 255, 255, 0.12);
    background: rgba(255, 255, 255, 0.04);
    color: rgba(255, 255, 255, 0.85);
    cursor: pointer;
    transition:
        background 0.15s ease,
        opacity 0.2s ease,
        transform 0.22s ease;
}

.dash-cat-toolbar .c-search-dock__toggle:hover {
    background: rgba(255, 255, 255, 0.08);
}

.dash-cat-toolbar .c-search-dock.is-expanded .c-search-dock__toggle {
    opacity: 0;
    pointer-events: none;
    transform: scale(0.85);
}

.dash-cat-toolbar .c-search-dock__form {
    position: absolute;
    inset: 0;
    z-index: 3;
    margin: 0;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.2s ease;
}

.dash-cat-toolbar .c-search-dock.is-expanded .c-search-dock__form {
    opacity: 1;
    pointer-events: auto;
}

.dash-cat-toolbar .c-search-dock__inner {
    display: flex;
    align-items: center;
    gap: 0.35rem;
    height: 3rem;
    padding-left: 0.85rem;
    padding-right: 0.25rem;
    border-radius: 999px;
    border: 1px solid rgba(255, 255, 255, 0.12);
    background: rgba(28, 28, 32, 0.72);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    box-shadow: 0 1px 0 rgba(255, 255, 255, 0.04) inset;
}

.dash-cat-toolbar .c-search-dock__inner svg {
    flex-shrink: 0;
    opacity: 0.55;
}

.dash-cat-toolbar .c-search-dock__input {
    flex: 1;
    min-width: 0;
    height: 100%;
    border: none;
    background: transparent;
    color: rgba(255, 255, 255, 0.92);
    font-family: inherit;
    font-size: 0.8125rem;
    outline: none;
}

.dash-cat-toolbar .c-search-dock__input::placeholder {
    color: rgba(255, 255, 255, 0.38);
}

.dash-cat-toolbar .c-search-dock__close {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 2rem;
    height: 2rem;
    padding: 0;
    border: none;
    border-radius: 999px;
    background: transparent;
    color: rgba(255, 255, 255, 0.65);
    cursor: pointer;
    transition:
        background 0.15s ease,
        color 0.15s ease,
        transform 0.15s ease;
}

.dash-cat-toolbar .c-search-dock__close:hover {
    background: rgba(255, 255, 255, 0.08);
    color: rgba(255, 255, 255, 0.9);
}

.dash-cat-toolbar .c-search-dock__close:active {
    transform: scale(0.92);
}

.dash-cat-toolbar__filters.filters-row-dashboard,
.dash-cat-toolbar__filters {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 0.32rem;
    flex: 1 1 auto;
    justify-content: flex-end;
    min-width: 0;
}

@media (max-width: 640px) {
    .dash-cat-toolbar__filters.filters-row-dashboard {
        justify-content: flex-start;
        width: 100%;
    }
}

/* Filtres compacts dans la toolbar */
.dash-cat-toolbar .filter-btn-dashboard {
    padding: 0.28rem 0.58rem;
    font-size: 0.76rem;
    border-radius: 6px;
    min-height: 1.65rem;
    gap: 0.3rem;
}

.dash-cat-toolbar .filter-dropdown-menu-dashboard {
    margin-top: 0.35rem;
    min-width: 240px;
}

.search-submit-dashboard {
    display: none;
}

/* Filtres (base — réutilisable hors toolbar) */
.filters-row-dashboard {
    display: flex;
    gap: 0.75rem;
    flex-wrap: wrap;
}

.filter-btn-dashboard {
    padding: 0.6rem 1.25rem;
    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);
    font-size: 0.9rem;
    cursor: pointer;
    transition: all 0.2s ease;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.filter-btn-dashboard:hover {
    background: rgba(255, 255, 255, 0.1);
    border-color: rgba(255, 255, 255, 0.2);
}

.filter-btn-dashboard.active {
    background: rgba(255, 255, 255, 0.12);
    border-color: rgba(255, 255, 255, 0.38);
    color: rgba(255, 255, 255, 0.98);
}

.filter-dropdown-dashboard {
    position: relative;
}

.filter-dropdown-btn-dashboard {
    background: rgba(255, 255, 255, 0.05);
    border-color: rgba(255, 255, 255, 0.1);
    color: rgba(255, 255, 255, 0.8);
}

.filter-dropdown-btn-dashboard:hover {
    background: rgba(255, 255, 255, 0.1);
    border-color: rgba(255, 255, 255, 0.2);
}

.filter-dropdown-menu-dashboard {
    position: absolute;
    top: 100%;
    left: 0;
    margin-top: 0.5rem;
    background: rgba(22, 22, 26, 0.98);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 8px;
    min-width: 280px;
    max-height: 400px;
    overflow-y: auto;
    z-index: 100;
    display: none;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.4);
}

.filter-dropdown-menu-dashboard::-webkit-scrollbar {
    width: 6px;
}

.filter-dropdown-menu-dashboard::-webkit-scrollbar-track {
    background: rgba(255, 255, 255, 0.05);
}

.filter-dropdown-menu-dashboard::-webkit-scrollbar-thumb {
    background: rgba(255, 255, 255, 0.2);
    border-radius: 3px;
}

.filter-dropdown-menu-dashboard.show {
    display: block;
}

.dropdown-item-dashboard {
    width: 100%;
    padding: 0.75rem 1rem;
    background: transparent;
    border: none;
    color: rgba(255, 255, 255, 0.8);
    font-size: 0.85rem;
    text-align: left;
    cursor: pointer;
    transition: background 0.2s ease;
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.dropdown-item-dashboard svg {
    width: 16px;
    height: 16px;
    flex-shrink: 0;
}

.dropdown-item-dashboard:hover {
    background: rgba(255, 255, 255, 0.1);
}

/* Grille des catégories — 3 colonnes, rythme type liste category-full */
.categories-grid-2col-dashboard {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 0.95rem 0.85rem;
    flex: 1;
    padding: 0.35rem 0 1rem;
    width: 100%;
    box-sizing: border-box;
}

/* Mode recherche : affichage vertical */
.categories-grid-2col-dashboard.search-mode {
    display: flex;
    flex-direction: column;
    grid-template-columns: none;
}

/* Résultats de recherche en ligne */
.search-results-section-dashboard {
    margin-bottom: 3rem;
    width: 100%;
}

.search-section-title-dashboard {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    font-size: 1.25rem;
    font-weight: 600;
    color: rgba(255, 255, 255, 0.95);
    margin-bottom: 1.5rem;
}

.search-section-title-dashboard svg {
    width: 20px;
    height: 20px;
    color: rgba(255, 255, 255, 0.7);
}

.search-ais-grid-dashboard {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.search-ais-horizontal-dashboard {
    display: grid;
    grid-template-columns: repeat(5, 1fr);
    gap: 1rem;
}

.ai-card-horizontal-dashboard {
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 12px;
    padding: 1.25rem;
    text-decoration: none;
    color: inherit;
    transition: all 0.2s ease;
    display: flex;
    flex-direction: column;
    gap: 1rem;
    min-width: 0;
}

.ai-card-horizontal-dashboard:hover {
    background: rgba(255, 255, 255, 0.08);
    border-color: rgba(255, 255, 255, 0.5);
    transform: translateY(-2px);
}

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

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

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

.ai-card-horizontal-content-dashboard {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.ai-card-horizontal-name-dashboard {
    font-size: 1rem;
    font-weight: 600;
    color: rgba(255, 255, 255, 0.95);
    margin: 0;
    word-wrap: break-word;
}

.ai-card-horizontal-desc-dashboard {
    font-size: 0.85rem;
    color: rgba(255, 255, 255, 0.6);
    line-height: 1.4;
    margin: 0;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.ai-card-horizontal-stats-dashboard {
    display: flex;
    gap: 1rem;
    margin-top: auto;
}

.ai-card-horizontal-stat-dashboard {
    display: flex;
    align-items: center;
    gap: 0.4rem;
    font-size: 0.8rem;
    color: rgba(255, 255, 255, 0.5);
}

.ai-card-horizontal-stat-dashboard svg {
    opacity: 0.6;
}

.search-categories-grid-dashboard {
    display: grid;
    grid-template-columns: repeat(5, 1fr);
    gap: 1rem;
}

.search-category-card-dashboard {
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 12px;
    padding: 1.25rem;
    cursor: pointer;
    transition: all 0.2s ease;
    text-align: center;
}

.search-category-card-dashboard:hover {
    background: rgba(255, 255, 255, 0.08);
    border-color: rgba(255, 255, 255, 0.5);
    transform: translateY(-2px);
}

.search-category-icon-dashboard {
    width: 40px;
    height: 40px;
    margin: 0 auto 0.75rem;
    display: flex;
    align-items: center;
    justify-content: center;
    color: rgba(255, 255, 255, 0.9);
}

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

.search-category-name-dashboard {
    font-size: 1rem;
    font-weight: 500;
    color: rgba(255, 255, 255, 0.95);
    margin-bottom: 0.5rem;
}

.search-category-count-dashboard {
    font-size: 0.85rem;
    color: rgba(255, 255, 255, 0.6);
}

/* Boîte de catégorie — même surface que .c-article (communauté / news) */
.category-box-dashboard {
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 1rem;
    padding: 0.72rem 0.8rem 0.68rem;
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    box-shadow: 0 1px 0 rgba(255, 255, 255, 0.04) inset;
    transition:
        border-color 0.2s ease,
        background 0.2s ease,
        box-shadow 0.2s ease;
    width: 100%;
    box-sizing: border-box;
    min-width: 0;
    overflow: hidden;
}

.category-box-dashboard:hover {
    border-color: rgba(255, 255, 255, 0.45);
    background: rgba(255, 255, 255, 0.05);
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.28);
}

.category-box-dashboard.special-box {
    border-color: rgba(255, 255, 255, 0.16);
}

/* Mise en avant Top 100 — même tonalité que les cartes actualités (.c-article) */
.category-box-dashboard.special-box.special-box--top100 {
    grid-column: 1 / -1;
    border-color: rgba(255, 255, 255, 0.1);
    background: rgba(255, 255, 255, 0.03);
    box-shadow: 0 1px 0 rgba(255, 255, 255, 0.04) inset;
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
}

.category-box-dashboard.special-box.special-box--top100:hover {
    border-color: rgba(255, 255, 255, 0.45);
    background: rgba(255, 255, 255, 0.05);
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.28);
}

/* —— Top 100 : aligné visuellement sur les cartes actualités (.c-article communauté) —— */
.dash-top100-slider {
    grid-column: 1 / -1;
    width: 100%;
    margin-bottom: 0.25rem;
    padding: 1.1rem 1rem 1.25rem;
    border-radius: 1rem;
    box-sizing: border-box;
    background: rgba(255, 255, 255, 0.02);
    border: 1px solid rgba(255, 255, 255, 0.1);
    box-shadow: 0 1px 0 rgba(255, 255, 255, 0.04) inset;
}

.dash-top100-slider__head {
    margin-bottom: 1rem;
    padding: 0 0.25rem;
}

.dash-top100-slider__title {
    margin: 0 0 0.35rem;
    font-size: 1.15rem;
    font-weight: 700;
    letter-spacing: -0.03em;
    color: rgba(255, 255, 255, 0.96);
}

.dash-top100-slider__desc {
    margin: 0;
    font-size: 0.8rem;
    line-height: 1.45;
    color: rgba(255, 255, 255, 0.5);
    max-width: 52rem;
}

.dash-top100-slider__row {
    display: flex;
    align-items: stretch;
    gap: 0.5rem;
    position: relative;
}

.dash-top100-slider__nav {
    flex-shrink: 0;
    align-self: center;
    width: 44px;
    height: 44px;
    border-radius: 999px;
    border: 1px solid rgba(255, 255, 255, 0.12);
    background: rgba(28, 28, 32, 0.72);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    color: rgba(255, 255, 255, 0.88);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition:
        transform 0.2s ease,
        background 0.2s ease,
        border-color 0.2s ease,
        opacity 0.2s ease;
    box-shadow: 0 1px 0 rgba(255, 255, 255, 0.04) inset;
    opacity: 0.88;
}

.dash-top100-slider:hover .dash-top100-slider__nav {
    opacity: 1;
}

.dash-top100-slider__nav:hover {
    background: rgba(255, 255, 255, 0.1);
    border-color: rgba(255, 255, 255, 0.28);
    transform: scale(1.06);
}

.dash-top100-slider__nav:active {
    transform: scale(0.96);
}

.dash-top100-slider__viewport {
    flex: 1;
    min-width: 0;
    overflow-x: auto;
    overflow-y: hidden;
    scroll-snap-type: x mandatory;
    scrollbar-width: thin;
    scrollbar-color: rgba(255, 255, 255, 0.28) transparent;
    -webkit-overflow-scrolling: touch;
    padding: 0.35rem 0 0.5rem;
    mask-image: linear-gradient(
        90deg,
        transparent,
        #000 1.25rem,
        #000 calc(100% - 1.25rem),
        transparent
    );
}

.dash-top100-slider__track {
    display: flex;
    flex-direction: row;
    gap: 1.1rem;
    width: max-content;
    padding: 0 0.15rem;
}

.dash-top100-card {
    flex: 0 0 auto;
    scroll-snap-align: start;
    width: min(320px, 82vw);
    max-width: 320px;
}

.dash-top100-card__link {
    display: flex;
    flex-direction: column;
    height: 100%;
    min-height: 340px;
    border-radius: 1rem;
    overflow: hidden;
    text-decoration: none;
    color: inherit;
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(255, 255, 255, 0.1);
    box-shadow: 0 1px 0 rgba(255, 255, 255, 0.04) inset;
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    transition:
        transform 0.35s cubic-bezier(0.22, 1, 0.36, 1),
        border-color 0.2s ease,
        background 0.2s ease,
        box-shadow 0.2s ease,
        backdrop-filter 0.2s ease;
}

.dash-top100-card__link:hover {
    transform: translateY(-4px);
    border-color: rgba(255, 255, 255, 0.45);
    background: rgba(255, 255, 255, 0.05);
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.28);
}

.dash-top100-card__media {
    position: relative;
    height: 10.25rem;
    overflow: hidden;
    background: rgba(255, 255, 255, 0.04);
}

.dash-top100-card__img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center;
    transition: transform 0.6s cubic-bezier(0.22, 1, 0.36, 1);
    image-rendering: auto;
}

.dash-top100-card__img.is-hidden {
    display: none !important;
}

.dash-top100-card__link:hover .dash-top100-card__img:not(.is-hidden) {
    transform: scale(1.06);
}

/* Même esprit que .c-article-img--placeholder (communauté) */
.dash-top100-card__placeholder {
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 2.5rem;
    font-weight: 700;
    letter-spacing: -0.04em;
    color: rgba(255, 255, 255, 0.22);
    background: linear-gradient(145deg, rgba(30, 30, 35, 0.9), rgba(255, 255, 255, 0.06));
}

.dash-top100-card__shade {
    position: absolute;
    inset: 0;
    background: linear-gradient(
        to top,
        rgba(10, 12, 22, 0.92) 0%,
        rgba(10, 12, 22, 0.2) 45%,
        transparent 100%
    );
    pointer-events: none;
}

.dash-top100-card__body {
    flex: 1;
    display: flex;
    flex-direction: column;
    padding: 0.85rem 0.95rem 0.95rem;
    gap: 0.38rem;
}

.dash-top100-card__name {
    margin: 0;
    font-size: 1.05rem;
    font-weight: 600;
    letter-spacing: -0.02em;
    line-height: 1.25;
    color: rgba(255, 255, 255, 0.95);
}

.dash-top100-card__link:hover .dash-top100-card__name {
    color: rgba(255, 255, 255, 0.98);
}

.dash-top100-card__excerpt {
    margin: 0;
    flex: 1;
    font-size: 0.8rem;
    line-height: 1.55;
    color: rgba(255, 255, 255, 0.45);
    display: -webkit-box;
    -webkit-line-clamp: 3;
    line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.dash-top100-card__footer {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 0.5rem;
    margin-top: auto;
    padding-top: 0.65rem;
    border-top: 1px solid rgba(255, 255, 255, 0.08);
}

.dash-top100-card__trend {
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    font-size: 0.72rem;
    font-weight: 600;
    color: rgba(255, 255, 255, 0.72);
    padding: 0.3rem 0.55rem;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.08);
    border: 1px solid rgba(255, 255, 255, 0.14);
}

.dash-top100-card__trend-ico {
    opacity: 0.9;
}

.dash-top100-slider__cta-wrap {
    margin-top: 1rem;
    display: flex;
    justify-content: center;
    padding: 0 0.25rem;
}

/* Même zinc que .c-article-read-btn (communauté) */
.dash-top100-slider__cta {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0.65rem 1.35rem;
    border-radius: 999px;
    font-size: 0.82rem;
    font-weight: 600;
    text-decoration: none;
    color: rgba(255, 255, 255, 0.95);
    background: linear-gradient(135deg, #3f3f46, #18181b);
    border: none;
    box-shadow: 0 6px 24px rgba(0, 0, 0, 0.35);
    transition:
        transform 0.2s ease,
        box-shadow 0.2s ease;
}

.dash-top100-slider__cta:hover {
    transform: translateY(-2px) scale(1.02);
    box-shadow: 0 8px 28px rgba(0, 0, 0, 0.45);
}

@media (max-width: 720px) {
    .dash-top100-slider__nav {
        display: none;
    }

    .dash-top100-slider__viewport {
        mask-image: none;
    }
}

@media (prefers-reduced-motion: reduce) {
    .dash-top100-card__link,
    .dash-top100-card__img,
    .dash-top100-slider__cta {
        transition: none;
    }

    .dash-top100-card__link:hover {
        transform: none;
    }
}

/* Icônes catégories : pastilles teintées + meilleur contraste */
.category-box-icon-dashboard {
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    width: 32px;
    height: 32px;
    border-radius: 10px;
    background: linear-gradient(
        145deg,
        rgba(255, 255, 255, 0.1) 0%,
        rgba(255, 255, 255, 0.04) 100%
    );
    border: 1px solid rgba(255, 255, 255, 0.14);
    box-shadow:
        0 6px 18px rgba(0, 0, 0, 0.4),
        inset 0 1px 0 rgba(255, 255, 255, 0.12);
}

.category-box-icon-dashboard .dash-cat-ico {
    display: flex;
    width: 100%;
    height: 100%;
    align-items: center;
    justify-content: center;
}

.category-box-icon-dashboard .dash-cat-ico svg {
    width: 20px;
    height: 20px;
    filter: drop-shadow(0 2px 8px rgba(0, 0, 0, 0.35));
}

/* Variantes N&B : blancs / gris légers (pas de teinte) */
.dash-cat-ico--tone-0 {
    color: rgba(255, 255, 255, 0.95);
}
.dash-cat-ico--tone-1 {
    color: rgba(255, 255, 255, 0.88);
}
.dash-cat-ico--tone-2 {
    color: rgba(220, 220, 222, 0.95);
}
.dash-cat-ico--tone-3 {
    color: rgba(200, 200, 204, 0.95);
}
.dash-cat-ico--tone-4 {
    color: rgba(255, 255, 255, 0.82);
}
.dash-cat-ico--tone-5 {
    color: rgba(180, 180, 184, 0.95);
}

.search-category-icon-dashboard .dash-cat-ico {
    display: flex;
    width: 100%;
    height: 100%;
    align-items: center;
    justify-content: center;
}

.search-category-icon-dashboard .dash-cat-ico svg {
    width: 22px;
    height: 22px;
}

.dropdown-item-dashboard .dash-cat-ico {
    display: inline-flex;
    width: 1.35rem;
    height: 1.35rem;
    margin-right: 0.35rem;
    vertical-align: middle;
    flex-shrink: 0;
    align-items: center;
    justify-content: center;
}

.dropdown-item-dashboard .dash-cat-ico svg {
    width: 16px;
    height: 16px;
}

/* Liste IA regroupée dans un sous-panneau */
.category-box-ais-dashboard--panel {
    padding: 0.45rem 0.42rem 0.4rem;
    border-radius: 10px;
    background: rgba(0, 0, 0, 0.28);
    border: 1px solid rgba(255, 255, 255, 0.06);
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.04);
}

.category-box-header-dashboard {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    margin-bottom: 0.38rem;
}

.category-box-header-link {
    text-decoration: none;
    color: inherit;
    cursor: pointer;
    transition: opacity 0.2s ease;
}

.category-box-header-link:hover {
    opacity: 0.8;
}

.category-box-title-dashboard {
    font-size: 0.98rem;
    font-weight: 600;
    letter-spacing: -0.02em;
    color: rgba(255, 255, 255, 0.96);
    word-wrap: break-word;
    overflow-wrap: break-word;
}

.category-box-desc-dashboard {
    font-size: 0.74rem;
    color: rgba(255, 255, 255, 0.44);
    line-height: 1.45;
    margin-bottom: 0.75rem;
    word-wrap: break-word;
    overflow-wrap: break-word;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

/* Liste des IA dans une catégorie */
.category-box-ais-dashboard {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
    margin-bottom: 0.65rem;
}

.category-box-ais-dashboard.dashboard-ais-expanded {
    max-height: min(70vh, 560px);
    overflow-y: auto;
    padding-right: 0.25rem;
}

.dashboard-expand-empty {
    font-size: 0.8rem;
    color: rgba(255, 255, 255, 0.45);
    margin: 0.25rem 0;
}

.ai-row-dashboard {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.5rem;
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(255, 255, 255, 0.06);
    min-width: 0;
    box-sizing: border-box;
    border-radius: 8px;
    text-decoration: none;
    color: inherit;
    transition: all 0.2s ease;
}

.ai-row-dashboard:hover {
    background: rgba(255, 255, 255, 0.06);
    border-color: rgba(255, 255, 255, 0.12);
}

.ai-row-stats-dashboard {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.2rem;
    min-width: 38px;
    padding-right: 0.4rem;
    border-right: 1px solid rgba(255, 255, 255, 0.08);
}

.ai-stat-dashboard {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.08rem;
    color: rgba(255, 255, 255, 0.4);
    font-size: 0.65rem;
}

.ai-stat-dashboard svg {
    opacity: 0.6;
}

.ai-row-icon-dashboard {
    width: 28px;
    height: 28px;
    border-radius: 6px;
    background: rgba(255, 255, 255, 0.1);
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    overflow: hidden;
}

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

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

.ai-row-info-dashboard {
    flex: 1;
    min-width: 0;
    overflow: hidden;
}

.ai-row-name-dashboard {
    font-size: 0.85rem;
    font-weight: 500;
    color: rgba(255, 255, 255, 0.95);
    margin-bottom: 0.15rem;
    word-wrap: break-word;
    overflow-wrap: break-word;
}

.ai-row-desc-dashboard {
    font-size: 0.7rem;
    color: rgba(255, 255, 255, 0.5);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    max-width: 100%;
}

.ai-row-link-dashboard {
    color: rgba(255, 255, 255, 0.3);
    flex-shrink: 0;
    transition: color 0.2s ease;
}

.ai-row-dashboard:hover .ai-row-link-dashboard {
    color: rgba(255, 255, 255, 0.7);
}

/* Bouton voir toute la catégorie */
.view-all-btn-dashboard {
    display: block;
    width: 100%;
    text-align: center;
    padding: 0.5rem 0.65rem;
    background: rgba(255, 255, 255, 0.04);
    border: 1px solid rgba(255, 255, 255, 0.14);
    border-radius: 10px;
    color: rgba(255, 255, 255, 0.78);
    font-size: 0.72rem;
    font-weight: 600;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    text-decoration: none;
    transition:
        background 0.2s ease,
        border-color 0.2s ease,
        color 0.2s ease;
    cursor: pointer;
    margin-top: 0.15rem;
}

.view-all-btn-dashboard:hover {
    background: rgba(255, 255, 255, 0.08);
    border-color: rgba(255, 255, 255, 0.28);
    color: rgba(255, 255, 255, 0.98);
}

/* Cartes outils — colonne dashboard : hauteurs homogènes, logos discrets */
#categories-grid-dashboard .cf-card--dashboard-cat {
    min-height: 0;
    height: auto;
    padding: 0.45rem 0.58rem 0.48rem;
    gap: 0.28rem;
    border-radius: 10px;
}

#categories-grid-dashboard .cf-card--dashboard-cat:hover {
    transform: translateY(-2px);
}

#categories-grid-dashboard .cf-card--dashboard-cat .cf-card__head {
    gap: 0.5rem;
    align-items: center;
}

#categories-grid-dashboard .cf-card--dashboard-cat .cf-card__logo {
    width: 1.75rem;
    height: 1.75rem;
    border-radius: 8px;
    box-shadow:
        0 0 0 1px rgba(255, 255, 255, 0.1) inset,
        0 2px 8px rgba(0, 0, 0, 0.18);
}

#categories-grid-dashboard .cf-card--dashboard-cat .cf-card__logo-img {
    object-fit: contain;
    padding: 1px;
}

#categories-grid-dashboard .cf-card--dashboard-cat .cf-card__logo-fallback {
    font-size: 0.72rem;
}

#categories-grid-dashboard .cf-card--dashboard-cat .cf-card__name {
    font-size: 0.8rem;
    line-height: 1.22;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    min-height: calc(2 * 0.8rem * 1.22);
}

#categories-grid-dashboard .cf-card--dashboard-cat .cf-card__meta--dashboard {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 0.28rem;
    min-height: 1.15rem;
    margin-top: 0.12rem;
}

#categories-grid-dashboard .cf-card--dashboard-cat .cf-card__price {
    padding: 0.1rem 0.36rem;
    font-size: 0.58rem;
    border-radius: 4px;
}

#categories-grid-dashboard .cf-card--dashboard-cat .cf-card__body {
    gap: 0.22rem;
    padding-top: 0;
    flex: 0 0 auto;
}

#categories-grid-dashboard .cf-card--dashboard-cat .cf-card__desc {
    font-size: 0.68rem;
    line-height: 1.4;
    -webkit-line-clamp: 2;
    line-clamp: 2;
    flex: 0 0 auto;
    min-height: calc(2 * 0.68rem * 1.4);
    max-height: calc(2 * 0.68rem * 1.4);
}

#categories-grid-dashboard .cf-card--dashboard-cat .cf-card__stats {
    margin-top: 0.15rem;
    padding-top: 0;
    gap: 0.28rem;
}

#categories-grid-dashboard .cf-card--dashboard-cat .cf-stat {
    font-size: 0.56rem;
    padding: 0.1rem 0.32rem 0.1rem 0.28rem;
    gap: 0.22rem;
}

#categories-grid-dashboard .cf-card--dashboard-cat .cf-card__arrow {
    margin-top: 0;
    align-self: flex-start;
}

#categories-grid-dashboard .cf-card--dashboard-cat .cf-card__arrow svg {
    width: 14px;
    height: 14px;
}

/* Page liste complète catégorie (category-full.html) */
.category-full-main {
    position: relative;
    z-index: 1;
    max-width: 720px;
    margin: 0 auto;
    padding: 2rem 1.25rem 4rem;
}

.category-full-toolbar {
    margin-bottom: 1.25rem;
}

.category-full-back {
    display: inline-block;
    font-size: 0.85rem;
    color: rgba(255, 255, 255, 0.55);
    text-decoration: none;
    margin-bottom: 0.75rem;
}

.category-full-back:hover {
    color: rgba(255, 255, 255, 0.9);
}

.category-full-title {
    font-size: 1.35rem;
    font-weight: 600;
    color: rgba(255, 255, 255, 0.95);
    margin: 0 0 0.35rem;
}

.category-full-sub {
    font-size: 0.8rem;
    color: rgba(255, 255, 255, 0.45);
    margin: 0;
    line-height: 1.4;
}

.category-full-list {
    margin-top: 1rem;
}

/* —— Liste catégorie complète : rendu premium (category-full.html) —— */
html.dashboard-page:has(body.category-full-page) {
    overflow-y: auto;
    height: auto;
    min-height: 100%;
}

body.category-full-page {
    overflow-x: hidden;
    overflow-y: auto;
    height: auto;
    min-height: 100dvh;
    -webkit-font-smoothing: antialiased;
}

body.category-full-page .category-full-main {
    width: 100%;
    max-width: none;
    margin: 0;
    padding: clamp(1.25rem, 2.5vw, 2.25rem) clamp(1rem, 4vw, 3rem) 5rem;
    box-sizing: border-box;
    font-family:
        'Outfit',
        -apple-system,
        BlinkMacSystemFont,
        'SF Pro Display',
        system-ui,
        sans-serif;
}

body.category-full-page .category-full-header {
    margin-bottom: clamp(1rem, 2vw, 1.75rem);
}

body.category-full-page .category-full-quick {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 0.5rem 0.65rem;
    margin-bottom: 1.1rem;
}

body.category-full-page .cf-pill {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.35rem;
    padding: 0.45rem 0.95rem;
    border-radius: 999px;
    font-size: 0.8125rem;
    font-weight: 600;
    letter-spacing: 0.02em;
    text-decoration: none;
    color: rgba(255, 255, 255, 0.58);
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    box-shadow: 0 4px 24px rgba(0, 0, 0, 0.12);
    transition:
        color 0.25s ease,
        background 0.25s ease,
        border-color 0.25s ease,
        transform 0.2s ease,
        box-shadow 0.25s ease;
}

body.category-full-page .cf-pill:hover {
    color: rgba(255, 255, 255, 0.95);
    background: rgba(255, 255, 255, 0.1);
    border-color: rgba(255, 255, 255, 0.28);
    transform: translateY(-1px);
    box-shadow: 0 8px 28px rgba(0, 0, 0, 0.35);
}

body.category-full-page .cf-pill--accent {
    color: rgba(255, 255, 255, 0.88);
    background: rgba(255, 255, 255, 0.08);
    border-color: rgba(255, 255, 255, 0.22);
}

body.category-full-page .cf-pill--accent:hover {
    border-color: rgba(255, 255, 255, 0.4);
    background: rgba(255, 255, 255, 0.12);
}

body.category-full-page .category-full-toolbar {
    margin-bottom: 0;
}

/* Barre filtres — ligne unique, style sobre (type barre d’outils éditoriale) */
body.category-full-page .cf-filters-sr-only {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}

body.category-full-page .category-full-filters {
    width: 100%;
    box-sizing: border-box;
    margin-top: 0.35rem;
    padding: 0.25rem 0 0.4rem;
    background: transparent;
    border: none;
    border-bottom: 1px solid rgba(255, 255, 255, 0.07);
    border-radius: 0;
    backdrop-filter: none;
    -webkit-backdrop-filter: none;
}

body.category-full-page .cf-toolbar {
    display: flex;
    flex-wrap: nowrap;
    align-items: center;
    gap: 0.5rem 0.85rem;
    width: 100%;
    min-height: 1.75rem;
    overflow-x: auto;
    overflow-y: hidden;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
}

body.category-full-page .cf-toolbar::-webkit-scrollbar {
    display: none;
}

body.category-full-page .cf-toolbar__search {
    flex: 1 1 auto;
    min-width: 7rem;
    max-width: min(22rem, 42vw);
}

body.category-full-page .cf-toolbar__price {
    flex: 0 0 auto;
}

body.category-full-page .cf-toolbar__sort {
    flex: 0 0 auto;
    width: auto;
    min-width: 5.75rem;
    max-width: 9rem;
}

body.category-full-page .cf-filter-count {
    flex: 0 0 auto;
    margin-left: auto;
    padding-left: 0.35rem;
    font-size: 0.6875rem;
    font-weight: 400;
    letter-spacing: 0.02em;
    color: rgba(255, 255, 255, 0.34);
    font-variant-numeric: tabular-nums;
    white-space: nowrap;
}

body.category-full-page .cf-input,
body.category-full-page .cf-select {
    box-sizing: border-box;
    height: 1.625rem;
    padding: 0 0.5rem;
    border-radius: 6px;
    font-family: inherit;
    font-size: 0.8125rem;
    font-weight: 400;
    letter-spacing: 0.01em;
    color: rgba(255, 255, 255, 0.88);
    background: rgba(255, 255, 255, 0.035);
    border: 1px solid rgba(255, 255, 255, 0.08);
    outline: none;
    transition:
        border-color 0.15s ease,
        background 0.15s ease;
}

body.category-full-page .cf-toolbar__search.cf-input {
    width: 100%;
}

body.category-full-page .cf-input::placeholder {
    color: rgba(255, 255, 255, 0.3);
}

body.category-full-page .cf-input:hover,
body.category-full-page .cf-select:hover {
    border-color: rgba(255, 255, 255, 0.12);
    background: rgba(255, 255, 255, 0.05);
}

body.category-full-page .cf-input:focus,
body.category-full-page .cf-select:focus {
    border-color: rgba(255, 255, 255, 0.32);
    background: rgba(255, 255, 255, 0.045);
}

body.category-full-page .cf-select {
    cursor: pointer;
    appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='9' height='9' viewBox='0 0 24 24' fill='none' stroke='rgba(200,200,200,0.45)' stroke-width='2'%3E%3Cpath d='M6 9l6 6 6-6'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 0.4rem center;
    padding-right: 1.4rem;
}

body.category-full-page .cf-toolbar .cf-select {
    width: auto;
}

body.category-full-page .cf-seg--rail {
    display: inline-flex;
    flex-wrap: nowrap;
    align-items: center;
    gap: 0;
    padding: 0;
    margin: 0;
    background: none;
    border: none;
    flex-shrink: 0;
}

body.category-full-page .cf-seg--rail .cf-seg-btn {
    position: relative;
    flex: 0 0 auto;
    padding: 0.2rem 0.5rem;
    margin: 0;
    border-radius: 4px;
    font-family: inherit;
    font-size: 0.75rem;
    font-weight: 400;
    letter-spacing: 0.01em;
    color: rgba(255, 255, 255, 0.38);
    background: transparent;
    border: none;
    cursor: pointer;
    transition: color 0.12s ease;
}

body.category-full-page .cf-seg--rail .cf-seg-btn:not(:first-child)::before {
    content: '';
    position: absolute;
    left: 0;
    top: 50%;
    transform: translateY(-50%);
    width: 1px;
    height: 0.7rem;
    background: rgba(255, 255, 255, 0.1);
}

body.category-full-page .cf-seg--rail .cf-seg-btn:not(:first-child) {
    padding-left: 0.55rem;
    margin-left: 0.1rem;
}

body.category-full-page .cf-seg--rail .cf-seg-btn:hover {
    color: rgba(255, 255, 255, 0.78);
}

body.category-full-page .cf-seg--rail .cf-seg-btn--active {
    color: rgba(255, 255, 255, 0.95);
    font-weight: 500;
}

body.category-full-page .cf-seg--rail .cf-seg-btn:focus-visible {
    outline: 1px solid rgba(255, 255, 255, 0.45);
    outline-offset: 2px;
}

body.category-full-page .category-full-title {
    font-family: inherit;
    font-size: clamp(1.85rem, 5vw, 2.35rem);
    font-weight: 700;
    letter-spacing: -0.035em;
    line-height: 1.15;
    margin: 0 0 0.65rem;
    background: linear-gradient(
        120deg,
        #ffffff 0%,
        rgba(235, 235, 237, 0.98) 45%,
        rgba(255, 255, 255, 0.92) 100%
    );
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
    text-shadow: 0 0 40px rgba(255, 255, 255, 0.08);
}

body.category-full-page .category-full-sub {
    font-size: 0.875rem;
    line-height: 1.55;
    color: rgba(255, 255, 255, 0.42);
    max-width: min(48rem, 100%);
}

body.category-full-page .category-full-sub::before {
    content: '';
    display: block;
    width: 2.5rem;
    height: 2px;
    margin-bottom: 0.65rem;
    border-radius: 2px;
    background: linear-gradient(
        90deg,
        rgba(255, 255, 255, 0.55),
        rgba(255, 255, 255, 0)
    );
}

.cf-tool-list {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
    margin-top: 1.75rem;
}

.cf-tool-list.cf-tool-list--ready {
    display: grid;
    grid-template-columns: repeat(
        auto-fill,
        minmax(min(100%, 17.5rem), 1fr)
    );
    gap: 1rem 1.15rem;
    padding-bottom: 0.5rem;
    align-items: stretch;
}

@media (min-width: 900px) {
    .cf-tool-list.cf-tool-list--ready {
        grid-template-columns: repeat(
            auto-fill,
            minmax(min(100%, 19rem), 1fr)
        );
        gap: 1.1rem 1.25rem;
    }
}

@media (min-width: 1400px) {
    .cf-tool-list.cf-tool-list--ready {
        grid-template-columns: repeat(
            auto-fill,
            minmax(min(100%, 20rem), 1fr)
        );
    }
}

.cf-card {
    position: relative;
    display: flex;
    flex-direction: column;
    align-items: stretch;
    gap: 0.65rem;
    padding: 0.75rem 0.82rem 0.72rem;
    min-height: 7.25rem;
    height: 100%;
    border-radius: 1rem;
    text-decoration: none;
    color: inherit;
    overflow: hidden;
    isolation: isolate;
    background: rgba(255, 255, 255, 0.03);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    box-shadow: 0 1px 0 rgba(255, 255, 255, 0.04) inset;
    transition:
        transform 0.3s cubic-bezier(0.22, 1, 0.36, 1),
        box-shadow 0.2s ease,
        border-color 0.2s ease,
        background 0.2s ease;
}

.cf-card__border {
    position: absolute;
    inset: 0;
    border-radius: inherit;
    padding: 1px;
    background: linear-gradient(
        135deg,
        rgba(255, 255, 255, 0.14) 0%,
        rgba(255, 255, 255, 0.05) 45%,
        rgba(255, 255, 255, 0.03) 70%,
        rgba(255, 255, 255, 0.09) 100%
    );
    -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;
    opacity: 0.85;
    z-index: 0;
}

.cf-card__glow {
    position: absolute;
    top: -40%;
    right: -20%;
    width: 55%;
    height: 120%;
    background: radial-gradient(
        ellipse at center,
        rgba(255, 255, 255, 0.16) 0%,
        transparent 65%
    );
    opacity: 0;
    transition: opacity 0.45s ease;
    pointer-events: none;
    z-index: 0;
}

.cf-card:hover .cf-card__glow {
    opacity: 1;
}

.cf-card:hover {
    transform: translateY(-3px);
    background: rgba(255, 255, 255, 0.05);
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.28);
}

.cf-card:hover .cf-card__border {
    opacity: 1;
}

.cf-card:active {
    transform: translateY(-1px);
}

.cf-card:focus-visible {
    outline: 2px solid rgba(255, 255, 255, 0.65);
    outline-offset: 3px;
}

.cf-card:focus-visible .cf-card__arrow {
    color: rgba(255, 255, 255, 0.9);
}

.cf-card__head {
    display: flex;
    align-items: flex-start;
    gap: 0.85rem;
    min-width: 0;
}

.cf-card__title-block {
    flex: 1;
    min-width: 0;
}

.cf-card__logo {
    position: relative;
    z-index: 1;
    flex-shrink: 0;
    width: 3rem;
    height: 3rem;
    border-radius: 14px;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    background: linear-gradient(
        145deg,
        rgba(255, 255, 255, 0.12),
        rgba(255, 255, 255, 0.04)
    );
    box-shadow:
        0 0 0 1px rgba(255, 255, 255, 0.12) inset,
        0 4px 16px rgba(0, 0, 0, 0.2);
}

.cf-card__logo-img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.cf-card__logo-fallback {
    font-size: 1.15rem;
    font-weight: 700;
    color: rgba(255, 255, 255, 0.88);
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    height: 100%;
    background: linear-gradient(
        135deg,
        rgba(255, 255, 255, 0.14),
        rgba(80, 80, 88, 0.4)
    );
}

.cf-card__body {
    position: relative;
    z-index: 1;
    flex: 1 1 auto;
    min-width: 0;
    min-height: 0;
    display: flex;
    flex-direction: column;
    gap: 0.4rem;
    padding-top: 0.05rem;
}

.cf-card__top {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 0.5rem;
    min-width: 0;
}

.cf-card__name {
    margin: 0;
    font-size: 1.0625rem;
    font-weight: 600;
    letter-spacing: -0.02em;
    color: rgba(255, 255, 255, 0.96);
    line-height: 1.25;
}

.cf-card__meta {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 0.35rem;
    margin-top: 0.35rem;
}

.cf-card__price {
    display: inline-flex;
    align-items: center;
    padding: 0.15rem 0.45rem;
    border-radius: 6px;
    font-size: 0.65rem;
    font-weight: 700;
    letter-spacing: 0.04em;
    text-transform: uppercase;
    border: 1px solid rgba(255, 255, 255, 0.12);
}

.cf-card__price--free {
    color: rgba(255, 255, 255, 0.92);
    background: rgba(255, 255, 255, 0.1);
    border-color: rgba(255, 255, 255, 0.18);
}

.cf-card__price--freemium {
    color: rgba(255, 255, 255, 0.85);
    background: rgba(255, 255, 255, 0.06);
    border-color: rgba(255, 255, 255, 0.14);
}

.cf-card__price--paid {
    color: rgba(220, 220, 222, 0.95);
    background: rgba(0, 0, 0, 0.35);
    border-color: rgba(255, 255, 255, 0.12);
}

.cf-card__arrow {
    flex-shrink: 0;
    margin-top: 0.1rem;
    color: rgba(255, 255, 255, 0.22);
    transition:
        color 0.3s ease,
        transform 0.35s cubic-bezier(0.22, 1, 0.36, 1);
}

.cf-card:hover .cf-card__arrow {
    color: rgba(255, 255, 255, 0.88);
    transform: translateX(4px);
}

.cf-card__desc {
    margin: 0;
    font-size: 0.8125rem;
    line-height: 1.5;
    color: rgba(255, 255, 255, 0.48);
    flex: 1 1 auto;
    min-height: 0;
    display: -webkit-box;
    -webkit-line-clamp: 3;
    line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.cf-card__stats {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 0.45rem;
    margin-top: auto;
    padding-top: 0.35rem;
}

.cf-stat {
    display: inline-flex;
    align-items: center;
    gap: 0.3rem;
    padding: 0.2rem 0.55rem 0.2rem 0.45rem;
    border-radius: 999px;
    font-size: 0.6875rem;
    font-weight: 600;
    letter-spacing: 0.03em;
    text-transform: uppercase;
    color: rgba(255, 255, 255, 0.55);
    background: rgba(0, 0, 0, 0.22);
    border: 1px solid rgba(255, 255, 255, 0.07);
}

.cf-stat__ico {
    flex-shrink: 0;
    opacity: 0.65;
}

.cf-stat__val {
    font-variant-numeric: tabular-nums;
    color: rgba(255, 255, 255, 0.72);
}

.cf-card:hover .cf-stat {
    border-color: rgba(255, 255, 255, 0.15);
    background: rgba(0, 0, 0, 0.32);
}

@media (prefers-reduced-motion: reduce) {
    .cf-card,
    .cf-card__arrow,
    .cf-card__glow,
    body.category-full-page .cf-pill {
        transition: none;
    }

    .cf-card:hover {
        transform: none;
    }
}

@media (max-width: 520px) {
    .cf-card {
        padding: 0.9rem 1rem;
        min-height: 0;
    }

    .cf-card__logo {
        width: 2.75rem;
        height: 2.75rem;
    }
}

/* Loader et erreur */
.loader-container-dashboard {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 4rem;
    color: rgba(255, 255, 255, 0.7);
    grid-column: 1 / -1;
}

.loader-spinner-dashboard {
    width: 40px;
    height: 40px;
    border: 3px solid rgba(255, 255, 255, 0.1);
    border-top-color: rgba(255, 255, 255, 0.6);
    border-radius: 50%;
    animation: spin 1s linear infinite;
    margin-bottom: 1rem;
}

.error-message-dashboard {
    text-align: center;
    padding: 3rem;
    color: rgba(255, 255, 255, 0.65);
    font-size: 1rem;
    grid-column: 1 / -1;
}

.no-results-dashboard {
    text-align: center;
    padding: 3rem;
    color: rgba(255, 255, 255, 0.5);
    font-size: 1rem;
    grid-column: 1 / -1;
}

/* Responsive */
@media (max-width: 1200px) {
    .featured-carousel-dashboard {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 1024px) {
    .categories-grid-2col-dashboard {
        grid-template-columns: repeat(2, 1fr);
    }

    .search-ais-horizontal-dashboard {
        grid-template-columns: repeat(4, 1fr);
    }

    .search-categories-grid-dashboard {
        grid-template-columns: repeat(4, 1fr);
    }
}

@media (max-width: 768px) {
    .categories-grid-2col-dashboard {
        grid-template-columns: 1fr;
    }

    .featured-carousel-dashboard {
        grid-template-columns: 1fr;
    }

    .search-ais-horizontal-dashboard {
        grid-template-columns: repeat(2, 1fr);
    }

    .search-categories-grid-dashboard {
        grid-template-columns: repeat(2, 1fr);
    }

    .categories-main-title-dashboard {
        font-size: 1.5rem;
    }

    .nouveautes-title-dashboard {
        font-size: 1rem;
    }

    .filters-row-dashboard {
        flex-wrap: wrap;
    }
}

/* ========================================
   IMAGES GÉNÉRÉES PAR IA
   ======================================== */

.generated-image-container {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
    max-width: 512px;
}

.generated-image-container video {
    max-width: 960px !important;
    width: 100%;
    height: auto;
}

.generated-image {
    width: 100%;
    max-width: 512px;
    height: auto;
    border-radius: 12px;
    cursor: pointer;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.3);
}

.generated-image-container video.generated-image {
    max-width: 960px;
}

.generated-image:hover {
    transform: scale(1.02);
    box-shadow: 0 8px 30px rgba(0, 0, 0, 0.4);
}

.generated-image-container video:hover {
    transform: none; /* Pas de zoom pour les vidéos au hover */
}

.image-actions {
    display: flex;
    gap: 0.75rem;
    align-items: center;
}

.image-download-btn {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.5rem 1rem;
    background: rgba(255, 255, 255, 0.1);
    color: rgba(255, 255, 255, 0.92);
    border: 1px solid rgba(255, 255, 255, 0.22);
    border-radius: 8px;
    text-decoration: none;
    font-size: 0.85rem;
    font-weight: 500;
    transition: all 0.2s ease;
}

.image-download-btn:hover {
    background: rgba(255, 255, 255, 0.16);
    border-color: rgba(255, 255, 255, 0.38);
    color: rgba(255, 255, 255, 1);
}

.image-fullscreen-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0.5rem;
    background: rgba(255, 255, 255, 0.05);
    color: rgba(255, 255, 255, 0.7);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.2s ease;
}

.image-fullscreen-btn:hover {
    background: rgba(255, 255, 255, 0.1);
    color: rgba(255, 255, 255, 0.9);
    border-color: rgba(255, 255, 255, 0.2);
}

/* ========================================
   Fiche outil IA (ai.html) — DA alignée liste catégories
   ======================================== */

html.dashboard-page:has(body.ai-detail-page) {
    overflow-y: auto;
    height: auto;
    min-height: 100%;
}

body.ai-detail-page {
    overflow-x: hidden;
    overflow-y: auto;
    min-height: 100dvh;
    -webkit-font-smoothing: antialiased;
    font-family:
        'Outfit',
        -apple-system,
        BlinkMacSystemFont,
        'SF Pro Display',
        system-ui,
        sans-serif;
}

body.ai-detail-page .ai-detail-inner {
    max-width: 1200px;
    margin: 0 auto;
    padding: clamp(1.25rem, 2.5vw, 2.25rem) clamp(1rem, 3vw, 2.5rem) 4rem;
    box-sizing: border-box;
}

body.ai-detail-page .ai-detail-quick {
    margin-bottom: 1.1rem;
}

body.ai-detail-page .ai-detail-pill {
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    padding: 0.45rem 0.95rem;
    border-radius: 999px;
    font-size: 0.8125rem;
    font-weight: 600;
    letter-spacing: 0.02em;
    text-decoration: none;
    color: rgba(255, 255, 255, 0.58);
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    box-shadow: 0 4px 24px rgba(0, 0, 0, 0.12);
    transition:
        color 0.25s ease,
        background 0.25s ease,
        border-color 0.25s ease,
        transform 0.2s ease;
}

body.ai-detail-page .ai-detail-pill:hover {
    color: rgba(255, 255, 255, 0.95);
    background: rgba(255, 255, 255, 0.1);
    border-color: rgba(255, 255, 255, 0.28);
    transform: translateY(-1px);
}

body.ai-detail-page .ai-detail-pill--accent {
    color: rgba(255, 255, 255, 0.88);
    background: rgba(255, 255, 255, 0.08);
    border-color: rgba(255, 255, 255, 0.22);
}

body.ai-detail-page .ai-detail-pill--accent:hover {
    border-color: rgba(255, 255, 255, 0.4);
    background: rgba(255, 255, 255, 0.12);
}

body.ai-detail-page .ai-hero {
    padding: 0 0 1.75rem;
    background: transparent;
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
    margin-bottom: 1.5rem;
}

body.ai-detail-page .ai-hero-main {
    gap: clamp(1rem, 3vw, 2rem);
}

body.ai-detail-page .ai-hero-icon {
    width: 88px;
    height: 88px;
    border-radius: 18px;
    border: 1px solid rgba(255, 255, 255, 0.12);
    box-shadow:
        0 0 0 1px rgba(0, 0, 0, 0.2),
        0 12px 40px rgba(0, 0, 0, 0.35);
}

body.ai-detail-page .ai-card {
    background: rgba(255, 255, 255, 0.04) !important;
    border: 1px solid rgba(255, 255, 255, 0.1) !important;
    border-radius: 16px !important;
    backdrop-filter: blur(14px);
    -webkit-backdrop-filter: blur(14px);
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.18);
}

body.ai-detail-page .ai-btn-primary {
    background: linear-gradient(135deg, #3f3f46, #18181b) !important;
    border: 1px solid rgba(255, 255, 255, 0.12) !important;
    color: rgba(255, 255, 255, 0.95) !important;
}

body.ai-detail-page .ai-btn-secondary {
    background: rgba(255, 255, 255, 0.06) !important;
    border: 1px solid rgba(255, 255, 255, 0.14) !important;
}

body.ai-detail-page .ai-alt-card {
    border-radius: 14px !important;
    border: 1px solid rgba(255, 255, 255, 0.1) !important;
    background: rgba(255, 255, 255, 0.03) !important;
}

body.ai-detail-page .ai-content-wrapper {
    gap: clamp(1.25rem, 2vw, 2rem);
}

body.ai-detail-page .ai-loading {
    min-height: 50vh;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 1rem;
    color: rgba(255, 255, 255, 0.55);
    font-size: 0.9rem;
}

body.ai-detail-page .ai-loading-spinner {
    width: 40px;
    height: 40px;
    border: 2px solid rgba(255, 255, 255, 0.12);
    border-top-color: rgba(255, 255, 255, 0.85);
    border-radius: 50%;
    animation: ai-detail-spin 0.75s linear infinite;
}

@keyframes ai-detail-spin {
    to {
        transform: rotate(360deg);
    }
}

body.ai-detail-page .ai-error {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    padding: 2.5rem 1.5rem !important;
    max-width: 28rem;
    margin: 2rem auto 0;
    color: rgba(255, 255, 255, 0.7);
}

body.ai-detail-page .ai-error-msg {
    font-size: 1rem;
    margin: 1rem 0 1.25rem;
    color: rgba(255, 255, 255, 0.82);
    line-height: 1.5;
}

/* Bloc compte bas de sidebar — aligné tokens shadcn (passe au-dessus de sidebar-footer.css) */
html.dashboard-page .sidebar .sidebar-footer-pp {
    background: hsl(var(--sidebar-accent) / 0.45);
    color: hsl(var(--sidebar-foreground));
}

html.dashboard-page .sidebar .sidebar-footer-pp:hover {
    background: hsl(var(--sidebar-accent));
    color: hsl(var(--sidebar-accent-foreground));
}

html.dashboard-page .sidebar .sidebar-footer-pp-inner {
    border-radius: 0.375rem;
    background: hsl(var(--sidebar-accent));
    color: hsl(var(--sidebar-accent-foreground));
    font-weight: 600;
}
