
/* BBind Home - Dark Mode Design inspired by ShadCN */

[x-cloak] { display: none !important; }

/* Dark mode color palette inspired by ShadCN */
:root {
    --background: 0 0% 3.9%; /* ~#0a0a0a noir */
    --foreground: 0 0% 98%;
    --card: 0 0% 7.1%; /* #121212 */
    --card-foreground: 0 0% 98%;
    --popover: 0 0% 7.1%; /* #121212 */
    --popover-foreground: 0 0% 98%;
    --primary: 0 0% 98%;
    --primary-foreground: 0 0% 9%;
    --secondary: 0 0% 14.9%;
    --secondary-foreground: 0 0% 98%;
    --muted: 0 0% 14.9%;
    --muted-foreground: 0 0% 63.9%;
    --accent: 0 0% 14.9%;
    --accent-foreground: 0 0% 98%;
    --destructive: 0 62.8% 30.6%;
    --destructive-foreground: 0 0% 98%;
    --border: 0 0% 14.9%;
    --input: 0 0% 14.9%;
    --ring: 0 0% 83.1%;
    --radius: 0.5rem;
}

/* Override for Tailwind classes to use our design system */
.bg-secondary {
    background-color: hsl(var(--secondary)) !important;
}

.bg-muted {
    background-color: hsl(var(--muted)) !important;
}

.bg-accent {
    background-color: hsl(var(--accent)) !important;
}

.text-primary {
    color: hsl(var(--primary)) !important;
}

.text-secondary {
    color: hsl(var(--muted-foreground)) !important;
}

.text-muted-foreground {
    color: hsl(var(--muted-foreground)) !important;
}

.text-secondary-foreground {
    color: hsl(var(--secondary-foreground)) !important;
}

.text-foreground {
    color: hsl(var(--foreground)) !important;
}

.bg-primary {
    background-color: hsl(var(--primary)) !important;
}

.text-primary-foreground {
    color: hsl(var(--primary-foreground)) !important;
}

/* Modern glass effect with dark mode */
.card {
    background: hsl(var(--card));
    border: 1px solid hsl(var(--border));
    border-radius: calc(var(--radius) + 2px);
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.3), 0 2px 4px -1px rgba(0, 0, 0, 0.2);
    transition: all 0.2s ease;
}

.card:hover {
    border-color: hsl(var(--border) / 0.8);
    box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.3), 0 4px 6px -2px rgba(0, 0, 0, 0.2);
}

/* Glass card alias pour compatibilité avec les templates Skills */
.glass-card {
    background: hsl(var(--card));
    border: 1px solid hsl(var(--border));
    border-radius: calc(var(--radius) + 2px);
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.3), 0 2px 4px -1px rgba(0, 0, 0, 0.2);
    transition: all 0.2s ease;
}

.glass-card:hover {
    border-color: hsl(var(--border) / 0.8);
    box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.3), 0 4px 6px -2px rgba(0, 0, 0, 0.2);
}

.card-hover-effect:hover {
    transform: translateY(-1px);
}

/* Interactive elements */
.button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0.5rem 1rem;
    border-radius: var(--radius);
    font-size: 0.875rem;
    font-weight: 500;
    transition: all 0.15s ease;
    border: none;
    cursor: pointer;
}

.button-primary {
    background: hsl(var(--primary));
    color: hsl(var(--primary-foreground));
}

.button-primary:hover {
    background: hsl(var(--primary) / 0.9);
}

.button-secondary {
    background: hsl(var(--secondary));
    color: hsl(var(--secondary-foreground));
    border: 1px solid hsl(var(--border));
}

.button-secondary:hover {
    background: hsl(var(--secondary) / 0.8);
    border-color: hsl(var(--border) / 0.8);
}

/* AI Orb redesign - more subtle */
.ai-orb-container {
    position: relative;
}

.ai-orb {
    width: 40px;
    height: 40px;
    background: linear-gradient(135deg, hsl(var(--secondary)), hsl(var(--accent)));
    border: 1px solid hsl(var(--border));
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s ease;
}

.ai-orb::before {
    content: "✦";
    color: hsl(var(--muted-foreground));
    font-size: 18px;
}

.ai-orb-large {
    width: 60px;
    height: 60px;
}

.ai-orb-large::before {
    font-size: 24px;
}

.ai-orb-container:hover .ai-orb {
    border-color: hsl(var(--ring));
    transform: scale(1.05);
}

.processing .ai-orb {
    animation: pulse 2s ease-in-out infinite;
}

@keyframes pulse {
    0%, 100% { 
        opacity: 1; 
        transform: scale(1);
    }
    50% { 
        opacity: 0.8; 
        transform: scale(1.05);
    }
}

/* Modern scrollbar */
.custom-scrollbar::-webkit-scrollbar {
    width: 4px;
}

.custom-scrollbar::-webkit-scrollbar-track {
    background: hsl(var(--muted));
    border-radius: calc(var(--radius) / 2);
}

.custom-scrollbar::-webkit-scrollbar-thumb {
    background: hsl(var(--muted-foreground) / 0.3);
    border-radius: calc(var(--radius) / 2);
}

.custom-scrollbar::-webkit-scrollbar-thumb:hover {
    background: hsl(var(--muted-foreground) / 0.5);
}

/* Home layout: only the central feed scrolls on desktop */
@media (min-width: 1024px) {
    .home-dashboard {
        height: calc(100vh - 1.5rem);
        max-height: calc(100vh - 1.5rem);
        overflow: hidden;
    }

    .home-side-column {
        position: sticky;
        top: 0;
        align-self: flex-start;
        max-height: calc(100vh - 1.5rem);
        overflow-y: auto;
        overscroll-behavior: contain;
    }

    .home-feed-column {
        height: 100%;
        max-height: calc(100vh - 1.5rem);
        min-height: 0;
        overflow-y: auto;
        overscroll-behavior: contain;
    }
}

/* Hide scrollbars on all home columns (keep scroll behaviour) */
.home-side-column,
.home-feed-column {
    scrollbar-width: none; /* Firefox */
    -ms-overflow-style: none; /* IE/Edge */
}
.home-side-column::-webkit-scrollbar,
.home-feed-column::-webkit-scrollbar {
    display: none; /* Chrome/Safari/Opera */
}

/* Badge styles */
.badge {
    display: inline-flex;
    align-items: center;
    border-radius: calc(var(--radius) / 2);
    padding: 0.25rem 0.75rem;
    font-size: 0.75rem;
    font-weight: 500;
    transition: all 0.2s ease;
}

.badge-success {
    background-color: hsl(120 50% 20%);
    color: hsl(120 50% 70%);
    border: 1px solid hsl(120 50% 30%);
}

/* Status indicators */
.status-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    display: inline-block;
}

.status-dot-green {
    background: hsl(120 50% 50%);
    box-shadow: 0 0 0 2px hsl(120 50% 50% / 0.2);
}

.status-dot-blue {
    background: hsl(220 50% 50%);
    box-shadow: 0 0 0 2px hsl(220 50% 50% / 0.2);
}

.status-dot-amber {
    background: hsl(45 50% 50%);
    box-shadow: 0 0 0 2px hsl(45 50% 50% / 0.2);
}

.status-dot-red {
    background: hsl(0 50% 50%);
    box-shadow: 0 0 0 2px hsl(0 50% 50% / 0.2);
}

/* Utility classes */
.stat-card {
    background: hsl(var(--muted) / 0.5);
    border: 1px solid hsl(var(--border));
    border-radius: var(--radius);
    transition: all 0.2s ease;
}

.stat-card:hover {
    background: hsl(var(--muted) / 0.8);
    border-color: hsl(var(--border) / 0.8);
}

/* Input styles */
.input {
    background: hsl(var(--background));
    border: 1px solid hsl(var(--border));
    border-radius: var(--radius);
    padding: 0.5rem 0.75rem;
    font-size: 0.875rem;
    color: hsl(var(--foreground));
    transition: all 0.2s ease;
    width: 100%;
}

.input:focus {
    outline: none;
    border-color: hsl(var(--ring));
    box-shadow: 0 0 0 2px hsl(var(--ring) / 0.2);
}

.input::placeholder {
    color: hsl(var(--muted-foreground));
}

/* Textarea styles */
textarea {
    background: hsl(var(--background));
    border: 1px solid hsl(var(--border));
    border-radius: var(--radius);
    padding: 0.75rem;
    font-size: 0.875rem;
    color: hsl(var(--foreground));
    resize: none;
    transition: all 0.2s ease;
    width: 100%;
}

textarea:focus {
    outline: none;
    border-color: hsl(var(--ring));
    box-shadow: 0 0 0 2px hsl(var(--ring) / 0.2);
}

textarea::placeholder {
    color: hsl(var(--muted-foreground));
}

/* Tab buttons */
.tab-button {
    padding: 0.25rem 0.5rem;
    border-radius: calc(var(--radius) / 2);
    font-size: 0.75rem;
    font-weight: 500;
    color: hsl(var(--muted-foreground));
    background: transparent;
    border: 1px solid transparent;
    cursor: pointer;
    transition: all 0.2s ease;
}

.tab-button:hover {
    color: hsl(var(--foreground));
    background: hsl(var(--muted) / 0.5);
}

.tab-button.active {
    color: hsl(var(--foreground));
    background: hsl(var(--secondary));
    border-color: hsl(var(--border));
}

/* Notification items */
.notification-item {
    display: flex;
    align-items: start;
    gap: 0.5rem;
    padding: 0.5rem;
    border-radius: var(--radius);
    background: hsl(var(--muted) / 0.3);
    border: 1px solid hsl(var(--border) / 0.5);
    transition: all 0.2s ease;
}

.notification-item:hover {
    background: hsl(var(--muted) / 0.5);
    border-color: hsl(var(--border));
}

/* Event type indicators */
.event-type-webinar {
    background: hsl(220 50% 20%);
    color: hsl(220 50% 70%);
}

.event-type-event {
    background: hsl(280 50% 20%);
    color: hsl(280 50% 70%);
}

.event-type-training {
    background: hsl(160 50% 20%);
    color: hsl(160 50% 70%);
}

/* Modal styles */
.modal-backdrop {
    background: rgba(0, 0, 0, 0.8);
    backdrop-filter: blur(4px);
}

.modal-content {
    background: hsl(var(--popover));
    border: 1px solid hsl(var(--border));
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.5);
}

/* Chat Sidebar - VS Code inspired */
.chat-sidebar {
    border-left: 1px solid hsl(var(--border));
    background: hsl(var(--card));
}

/* Chat message styles */
.chat-message {
    padding: 0.5rem 0.75rem;
    border-radius: 0.375rem;
    max-width: 90%;
    word-wrap: break-word;
    line-height: 1.4;
    font-size: 0.8125rem;
}

.chat-message p {
    margin: 0;
    line-height: 1.4;
}

.chat-message br {
    display: block;
    content: "";
    margin: 0.25rem 0;
}

.chat-message-user {
    background: hsl(217, 91%, 60%);
    color: white;
    margin-left: auto;
}

.chat-message-ai {
    background: hsl(var(--muted));
    color: hsl(var(--foreground));
    margin-right: auto;
    border: 1px solid hsl(var(--border));
}

.chat-typing {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.75rem 1rem;
    background: hsl(var(--muted));
    border-radius: var(--radius);
    color: hsl(var(--muted-foreground));
}

.typing-dots {
    display: flex;
    gap: 0.25rem;
}

.typing-dot {
    width: 6px;
    height: 6px;
    background: hsl(var(--muted-foreground));
    border-radius: 50%;
    animation: typing 1.4s ease-in-out infinite;
}

.typing-dot:nth-child(2) {
    animation-delay: 0.2s;
}

.typing-dot:nth-child(3) {
    animation-delay: 0.4s;
}

@keyframes typing {
    0%, 60%, 100% {
        transform: translateY(0);
        opacity: 0.3;
    }
    30% {
        transform: translateY(-10px);
        opacity: 1;
    }
}

/* Suggestion buttons */
.suggestion-button {
    padding: 0.5rem 0.75rem;
    background: hsl(var(--secondary));
    border: 1px solid hsl(var(--border));
    border-radius: var(--radius);
    color: hsl(var(--secondary-foreground));
    font-size: 0.875rem;
    cursor: pointer;
    transition: all 0.2s ease;
    text-align: left;
}

.suggestion-button:hover {
    background: hsl(var(--accent));
    border-color: hsl(var(--ring));
}

/* Classes pour Skills Templates */
.btn-primary {
    background: hsl(var(--primary));
    color: hsl(var(--primary-foreground));
    padding: 0.5rem 1rem;
    border-radius: var(--radius);
    font-size: 0.875rem;
    font-weight: 500;
    transition: all 0.15s ease;
    border: none;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

.btn-primary:hover {
    background: hsl(var(--primary) / 0.9);
}

.button-primary {
    background: hsl(var(--primary));
    color: hsl(var(--primary-foreground));
    border: none;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-weight: 500;
    transition: all 0.15s ease;
    cursor: pointer;
}

.button-primary:hover {
    background: hsl(var(--primary) / 0.9);
}

.sidebar-nav-item {
    background: transparent;
    border: 1px solid transparent;
    border-radius: var(--radius);
    color: hsl(var(--muted-foreground));
    transition: all 0.2s ease;
    text-decoration: none;
}

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

.sidebar-nav-item.active {
    background: hsl(var(--secondary));
    color: hsl(var(--secondary-foreground));
    border-color: hsl(var(--border));
}

.card-hover {
    transition: transform 0.2s ease;
}

.card-hover:hover {
    transform: translateY(-2px);
}

.line-clamp-3 {
    display: -webkit-box;
    -webkit-line-clamp: 3;
    line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
}
