:root {
    /* Palette de couleurs raffinée */
    --primary: #4f46e5;
    --primary-light: #6366f1;
    --primary-dark: #3730a3;
    --primary-gradient: linear-gradient(135deg, #4f46e5, #6366f1);
    --secondary: #10b981;
    --secondary-light: #34d399;
    --secondary-dark: #059669;
    --accent: #f97316;
    --accent-light: #fb923c;
    --accent-dark: #ea580c;
    --accent-gradient: linear-gradient(135deg, #f97316, #fb923c);
    
    /* Neutrals */
    --white: #ffffff;
    --light: #f9fafb;
    --light-alt: #f1f5f9;
    --light-hover: #e2e8f0;
    --dark: #1e293b;
    --dark-alt: #334155;
    --dark-light: #475569;
    --text: #1e293b;
    --text-light: #64748b;
    --text-lighter: #94a3b8;
    
    /* UI Elements */
    --glass: rgba(255, 255, 255, 0.7);
    --glass-dark: rgba(0, 0, 0, 0.03);
    --shadow-sm: 0 1px 2px rgba(0, 0, 0, 0.04);
    --shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.07), 0 2px 4px -1px rgba(0, 0, 0, 0.04);
    --shadow-md: 0 10px 15px -3px rgba(0, 0, 0, 0.08), 0 4px 6px -2px rgba(0, 0, 0, 0.03);
    --shadow-lg: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 10px 10px -5px rgba(0, 0, 0, 0.04);
    --shadow-focus: 0 0 0 3px rgba(79, 70, 229, 0.15);
    --shadow-hover: 0 10px 20px -5px rgba(0, 0, 0, 0.08);
    --border: 1px solid rgba(203, 213, 225, 0.8);
    --border-dark: 1px solid rgba(30, 41, 59, 0.1);
    
    /* Transitions & animations */
    --transition-fast: all 0.2s cubic-bezier(0.25, 0.46, 0.45, 0.94);
    --transition: all 0.3s cubic-bezier(0.25, 0.46, 0.45, 0.94);
    --transition-slow: all 0.5s cubic-bezier(0.25, 0.46, 0.45, 0.94);
    --ease-out-expo: cubic-bezier(0.19, 1, 0.22, 1);
    
    /* Radius */
    --radius-sm: 0.375rem;
    --radius: 0.5rem;
    --radius-md: 0.75rem;
    --radius-lg: 1rem;
    --radius-xl: 1.5rem;
    --radius-full: 9999px;
    
    /* Spacing */
    --space-1: 0.25rem;
    --space-2: 0.5rem;
    --space-3: 0.75rem;
    --space-4: 1rem;
    --space-5: 1.25rem;
    --space-6: 1.5rem;
    --space-8: 2rem;
    --space-10: 2.5rem;
    --space-12: 3rem;
    --space-16: 4rem;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
    scroll-padding-top: 80px;
}

body {
    background-color: var(--light);
    color: var(--text);
    font-family: 'Inter', system-ui, -apple-system, sans-serif;
    line-height: 1.6;
    overflow-x: hidden;
    transition: var(--transition);
    min-height: 100vh;
}

h1, h2, h3, h4, h5, h6 {
    font-family: 'Poppins', sans-serif;
    font-weight: 700;
    line-height: 1.3;
    color: var(--text);
}

a {
    text-decoration: none;
    color: inherit;
    transition: var(--transition);
}

button {
    font-family: 'Inter', sans-serif;
    border: none;
    background: none;
    cursor: pointer;
    transition: var(--transition);
}

button:focus, input:focus {
    outline: none;
}

img {
    max-width: 100%;
    height: auto;
}

/* Layout */
.container {
    width: 100%;
    max-width: 1400px;
    margin: 0 auto;
    padding: 0 var(--space-6);
}

.section {
    padding: var(--space-12) 0;
}

/* Header */
header {
    position: sticky;
    top: 0;
    z-index: 100;
    background-color: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    box-shadow: var(--shadow);
    transition: var(--transition);
    padding: var(--space-4) 0;
    border-bottom: var(--border);
}

.header-inner {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.header-left {
    display: flex;
    align-items: center;
}

.logo-container {
    display: flex;
    align-items: center;
    gap: var(--space-3);
}

.logo-icon {
    width: 2.5rem;
    height: 2.5rem;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--primary-gradient);
    border-radius: var(--radius);
    color: white;
    box-shadow: var(--shadow);
}

.logo-text {
    display: flex;
    flex-direction: column;
}

.logo {
    font-family: 'Poppins', sans-serif;
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--primary);
    letter-spacing: -0.5px;
}

.tagline {
    font-size: 0.85rem;
    color: var(--text-light);
}

.header-right {
    display: flex;
    align-items: center;
    gap: var(--space-4);
}

.header-actions {
    display: flex;
    gap: var(--space-3);
    align-items: center;
}

.button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: var(--space-3) var(--space-5);
    border-radius: var(--radius-full);
    font-weight: 500;
    font-size: 0.9rem;
    transition: var(--transition);
    gap: var(--space-2);
    position: relative;
    overflow: hidden;
}

.button::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(255, 255, 255, 0.2);
    opacity: 0;
    transition: var(--transition);
}

.button:hover::after {
    opacity: 1;
}

.button.primary {
    background: var(--primary-gradient);
    color: white;
    box-shadow: 0 4px 12px rgba(79, 70, 229, 0.2);
}

.button.primary:hover {
    box-shadow: 0 6px 16px rgba(79, 70, 229, 0.3);
    transform: translateY(-2px);
}

.button.secondary {
    background: rgba(79, 70, 229, 0.1);
    color: var(--primary);
}

.button.secondary:hover {
    background: rgba(79, 70, 229, 0.15);
}

.button.ghost {
    background: transparent;
    color: var(--text-light);
}

.button.ghost:hover {
    color: var(--primary);
    background: rgba(79, 70, 229, 0.05);
}

.button.icon {
    width: 2.5rem;
    height: 2.5rem;
    padding: 0;
    border-radius: var(--radius-full);
}

/* Hero Section */
.hero {
    padding: var(--space-10) 0 var(--space-12);
    text-align: center;
    position: relative;
    overflow: hidden;
}

.hero::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: radial-gradient(circle at 30% 20%, rgba(79, 70, 229, 0.05), transparent 25%),
                radial-gradient(circle at 70% 60%, rgba(16, 185, 129, 0.05), transparent 25%);
    z-index: -1;
}

.hero-title {
    font-size: 2.5rem;
    font-weight: 800;
    color: var(--text);
    margin-bottom: var(--space-4);
    max-width: 800px;
    margin-left: auto;
    margin-right: auto;
    position: relative;
    z-index: 1;
}

.hero-title span {
    color: var(--primary);
    position: relative;
    display: inline-block;
}

.hero-title span::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    height: 0.25rem;
    background: var(--accent-gradient);
    border-radius: var(--radius-full);
    z-index: -1;
    opacity: 0.5;
}

.hero-subtitle {
    font-size: 1.125rem;
    color: var(--text-light);
    max-width: 600px;
    margin: 0 auto var(--space-8);
}

/* Search */
.search-container {
    position: relative;
    max-width: 650px;
    margin: 0 auto var(--space-10);
    transition: var(--transition);
}

.global-search {
    width: 100%;
    height: 3.5rem;
    padding: 0 var(--space-8) 0 var(--space-12);
    border-radius: var(--radius-full);
    border: var(--border);
    background: var(--white);
    font-size: 1rem;
    transition: var(--transition);
    color: var(--text);
    box-shadow: var(--shadow);
}

.global-search:focus {
    box-shadow: var(--shadow-focus);
    border-color: var(--primary-light);
}

.search-icon {
    position: absolute;
    left: var(--space-5);
    top: 50%;
    transform: translateY(-50%);
    color: var(--primary);
    pointer-events: none;
    transition: var(--transition);
}

.global-search:focus + .search-icon {
    color: var(--primary-light);
}

.search-shortcut {
    position: absolute;
    right: var(--space-5);
    top: 50%;
    transform: translateY(-50%);
    color: var(--text-lighter);
    display: flex;
    align-items: center;
    gap: var(--space-1);
    font-size: 0.75rem;
    opacity: 0.7;
    pointer-events: none;
}

.kbd {
    display: inline-block;
    background: var(--light-alt);
    border-radius: var(--radius-sm);
    padding: 0.1rem 0.3rem;
    min-width: 1.5rem;
    text-align: center;
    box-shadow: 0 1px 1px rgba(0, 0, 0, 0.1);
    border: 1px solid var(--light-hover);
}

/* Categories Nav */
.categories-container {
    position: relative;
    margin-bottom: var(--space-8);
}

.categories-scroll {
    overflow-x: auto;
    scrollbar-width: none; /* Firefox */
    -ms-overflow-style: none; /* IE and Edge */
    scroll-snap-type: x mandatory;
    padding-bottom: var(--space-2);
    position: relative;
}

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

.categories-nav {
    display: flex;
    gap: var(--space-2);
    padding: var(--space-1);
    position: relative;
    width: max-content;
}

.category-chip {
    padding: var(--space-3) var(--space-5);
    border-radius: var(--radius-full);
    font-weight: 500;
    font-size: 0.9rem;
    scroll-snap-align: start;
    white-space: nowrap;
    transition: var(--transition);
    display: flex;
    align-items: center;
    gap: var(--space-2);
    background: var(--white);
    color: var(--text-light);
    border: var(--border);
    box-shadow: var(--shadow-sm);
}

.category-chip:hover {
    background: var(--light-alt);
    color: var(--text);
    box-shadow: var(--shadow);
}

.category-chip.active {
    background: var(--primary-gradient);
    color: white;
    border-color: transparent;
    box-shadow: 0 4px 12px rgba(79, 70, 229, 0.2);
}

.category-chip.active:hover {
    transform: translateY(-2px);
}

.category-icon {
    display: flex;
    align-items: center;
    justify-content: center;
}

.scroll-indicator {
    position: absolute;
    top: 0;
    bottom: 0;
    width: 80px;
    pointer-events: none;
    z-index: 2;
    transition: var(--transition);
    opacity: 0;
}

.scroll-indicator.left {
    left: 0;
    background: linear-gradient(to right, var(--light), transparent);
}

.scroll-indicator.right {
    right: 0;
    background: linear-gradient(to left, var(--light), transparent);
}

.categories-scroll:hover .scroll-indicator {
    opacity: 1;
}

.scroll-arrow {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    width: 2.5rem;
    height: 2.5rem;
    border-radius: var(--radius-full);
    background: white;
    box-shadow: var(--shadow);
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--primary);
    z-index: 3;
    cursor: pointer;
    transition: var(--transition);
    opacity: 0;
}

.categories-container:hover .scroll-arrow {
    opacity: 1;
}

.scroll-arrow:hover {
    background: var(--primary);
    color: white;
}

.scroll-arrow.left {
    left: var(--space-2);
}

.scroll-arrow.right {
    right: var(--space-2);
}

/* Module Grid */
.modules-section {
    position: relative;
    margin-bottom: var(--space-16);
}

.section-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: var(--space-6);
    position: relative;
}

.section-title-wrapper {
    display: flex;
    align-items: center;
    gap: var(--space-4);
}

.section-icon {
    width: 3rem;
    height: 3rem;
    border-radius: var(--radius);
    background: var(--primary-gradient);
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    box-shadow: var(--shadow);
}

.section-title {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--text);
    position: relative;
}

.section-title::after {
    content: '';
    position: absolute;
    bottom: -4px;
    left: 0;
    width: 2rem;
    height: 3px;
    background: var(--accent);
    border-radius: var(--radius-full);
}

.section-count {
    display: inline-block;
    padding: var(--space-1) var(--space-3);
    background: var(--light-alt);
    color: var(--primary);
    font-size: 0.8rem;
    font-weight: 600;
    border-radius: var(--radius-full);
    margin-left: var(--space-3);
}

.section-actions {
    display: flex;
    align-items: center;
    gap: var(--space-2);
}

.view-all {
    font-size: 0.9rem;
    font-weight: 500;
    color: var(--primary);
    padding: var(--space-2) var(--space-4);
    border-radius: var(--radius-full);
    background: rgba(79, 70, 229, 0.1);
    transition: var(--transition);
}

.view-all:hover {
    background: rgba(79, 70, 229, 0.15);
}

.module-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: var(--space-5);
}

.module-card {
    position: relative;
    border-radius: var(--radius-lg);
    background: var(--white);
    overflow: hidden;
    transition: var(--transition);
    box-shadow: var(--shadow);
    border: var(--border);
    height: 100%;
    display: flex;
    flex-direction: column;
}

.module-card:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-lg);
    border-color: rgba(79, 70, 229, 0.2);
}

.module-card-inner {
    padding: var(--space-6);
    display: flex;
    flex-direction: column;
    height: 100%;
    position: relative;
    z-index: 1;
}

.module-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, rgba(79, 70, 229, 0.03), rgba(16, 185, 129, 0.03));
    opacity: 0;
    transition: var(--transition);
    z-index: 0;
}

.module-card:hover::before {
    opacity: 1;
}

.module-card::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 4px;
    height: 0;
    background: var(--primary-gradient);
    transition: height 0.5s var(--ease-out-expo);
    z-index: 1;
}

.module-card:hover::after {
    height: 100%;
}

.module-header {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    margin-bottom: var(--space-4);
}

.module-name-wrapper {
    flex: 1;
}

.module-name {
    font-size: 1.2rem;
    font-weight: 600;
    color: var(--text);
    margin-bottom: var(--space-2);
    transition: var(--transition);
    position: relative;
    display: inline-block;
}

.module-card:hover .module-name {
    color: var(--primary);
}

.module-description {
    color: var(--text-light);
    font-size: 0.95rem;
    line-height: 1.5;
    margin-bottom: var(--space-5);
    flex-grow: 1;
}

.module-badge {
    display: inline-flex;
    align-items: center;
    padding: var(--space-1) var(--space-3);
    border-radius: var(--radius-full);
    font-size: 0.75rem;
    font-weight: 600;
    margin-right: var(--space-2);
}

.badge-recommended {
    background: rgba(249, 115, 22, 0.1);
    color: var(--accent);
}

.badge-new {
    background: rgba(16, 185, 129, 0.1);
    color: var(--secondary);
}

.module-footer {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-top: auto;
}

.module-tags {
    display: flex;
    flex-wrap: wrap;
    gap: var(--space-2);
}

.module-tag {
    display: inline-block;
    padding: var(--space-1) var(--space-3);
    background: var(--light-alt);
    color: var(--text-light);
    border-radius: var(--radius-full);
    font-size: 0.75rem;
    font-weight: 500;
    transition: var(--transition);
}

.module-card:hover .module-tag {
    background: rgba(79, 70, 229, 0.1);
    color: var(--primary);
}

.module-action {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 2.25rem;
    height: 2.25rem;
    border-radius: var(--radius-full);
    color: var(--primary);
    background: rgba(79, 70, 229, 0.1);
    transition: var(--transition);
    opacity: 0;
    transform: translateX(10px);
}

.module-card:hover .module-action {
    opacity: 1;
    transform: translateX(0);
}

.module-action:hover {
    background: var(--primary);
    color: white;
}

/* Quick Access */
.quick-access {
    position: fixed;
    bottom: var(--space-10);
    right: var(--space-8);
    display: flex;
    flex-direction: column;
    gap: var(--space-3);
    z-index: 90;
}

.quick-btn {
    width: 3.5rem;
    height: 3.5rem;
    border-radius: var(--radius-full);
    background: white;
    color: var(--primary);
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: var(--shadow-lg);
    transition: var(--transition);
    position: relative;
    opacity: 0;
    animation: fadeIn 0.5s forwards;
    animation-delay: 1s;
    transform: translateY(20px);
}

.quick-btn:nth-child(2) {
    animation-delay: 1.1s;
}

.quick-btn:nth-child(3) {
    animation-delay: 1.2s;
}

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

.quick-btn:hover {
    transform: translateY(-5px);
    box-shadow: 0 15px 20px rgba(0, 0, 0, 0.1);
    background: var(--primary);
    color: white;
}

.quick-tooltip {
    position: absolute;
    right: calc(100% + var(--space-3));
    top: 50%;
    transform: translateY(-50%);
    background: var(--dark);
    color: white;
    padding: var(--space-2) var(--space-4);
    border-radius: var(--radius);
    font-size: 0.85rem;
    white-space: nowrap;
    pointer-events: none;
    opacity: 0;
    transition: var(--transition);
    box-shadow: var(--shadow-md);
}

.quick-tooltip::after {
    content: '';
    position: absolute;
    top: 50%;
    right: -5px;
    transform: translateY(-50%);
    border-width: 6px 0 6px 6px;
    border-style: solid;
    border-color: transparent transparent transparent var(--dark);
}

.quick-btn:hover .quick-tooltip {
    opacity: 1;
    transform: translateY(-50%) translateX(-5px);
}

/* Empty State */
.empty-state {
    text-align: center;
    padding: var(--space-16) 0;
    display: none;
}

.empty-icon {
    width: 5rem;
    height: 5rem;
    background: var(--light-alt);
    border-radius: var(--radius-full);
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto var(--space-6);
    color: var(--primary-light);
}

.empty-title {
    font-size: 1.5rem;
    font-weight: 600;
    margin-bottom: var(--space-4);
    color: var(--text);
}

.empty-description {
    font-size: 1rem;
    color: var(--text-light);
    max-width: 450px;
    margin: 0 auto var(--space-8);
}

/* Loading */
.loading-screen {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background: var(--primary-gradient);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    z-index: 9999;
    transition: opacity 0.8s ease, visibility 0.8s ease;
}

.loading-logo {
    font-size: 2.5rem;
    font-weight: 800;
    color: white;
    margin-bottom: var(--space-8);
    letter-spacing: -1px;
    position: relative;
    display: flex;
    align-items: center;
    gap: var(--space-4);
}

.loading-icon {
    width: 4rem;
    height: 4rem;
    background: rgba(255, 255, 255, 0.2);
    border-radius: var(--radius);
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
}

.loading-progress {
    width: 200px;
    height: 3px;
    background: rgba(255, 255, 255, 0.2);
    border-radius: var(--radius-full);
    overflow: hidden;
    position: relative;
}

.loading-bar {
    position: absolute;
    top: 0;
    left: 0;
    height: 100%;
    width: 0;
    background: white;
    border-radius: var(--radius-full);
    animation: loading 2s ease forwards;
}

@keyframes loading {
    0% { width: 0; }
    100% { width: 100%; }
}

/* Spotlight Effect */
.spotlight {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: 9999;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.spotlight.active {
    opacity: 1;
    pointer-events: all;
}

.spotlight-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    backdrop-filter: blur(3px);
    -webkit-backdrop-filter: blur(3px);
}

.spotlight-content {
    position: absolute;
    top: 30%;
    left: 50%;
    transform: translate(-50%, -50%);
    background: white;
    border-radius: var(--radius-lg);
    padding: var(--space-6);
    width: 100%;
    max-width: 650px;
    max-height: 70vh;
    overflow-y: auto;
    box-shadow: var(--shadow-lg);
    transition: all 0.3s cubic-bezier(0.25, 0.46, 0.45, 0.94);
    border: var(--border);
}

.spotlight-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: var(--space-4);
}

.spotlight-title {
    font-size: 1.2rem;
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: var(--space-2);
}

.spotlight-title-icon {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 2rem;
    height: 2rem;
    border-radius: var(--radius);
    background: var(--primary-gradient);
    color: white;
}

.spotlight-close {
    width: 2rem;
    height: 2rem;
    border-radius: var(--radius-full);
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--light-alt);
    transition: var(--transition);
}

.spotlight-close:hover {
    background: var(--light-hover);
}

.spotlight-input {
    width: 100%;
    padding: var(--space-4) var(--space-4) var(--space-4) var(--space-10);
    border: none;
    background: var(--light-alt);
    border-radius: var(--radius);
    font-size: 1rem;
    margin-bottom: var(--space-4);
    position: relative;
}

.spotlight-input-icon {
    position: absolute;
    left: var(--space-10);
    top: calc(var(--space-6) + var(--space-4) + 0.5rem);
    color: var(--primary);
    z-index: 1;
}

.spotlight-results {
    display: flex;
    flex-direction: column;
    gap: var(--space-2);
}

.spotlight-item {
    display: flex;
    align-items: center;
    padding: var(--space-3) var(--space-4);
    border-radius: var(--radius);
    transition: var(--transition);
    cursor: pointer;
}

.spotlight-item:hover {
    background: var(--light-alt);
}

.spotlight-item.active {
    background: rgba(79, 70, 229, 0.1);
}

.spotlight-item-icon {
    width: 2rem;
    height: 2rem;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: var(--radius);
    background: var(--primary-light);
    color: white;
    margin-right: var(--space-3);
    flex-shrink: 0;
}

.spotlight-item-content {
    flex: 1;
    overflow: hidden;
}

.spotlight-item-title {
    font-weight: 500;
    margin-bottom: var(--space-1);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.spotlight-item-description {
    font-size: 0.85rem;
    color: var(--text-light);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.spotlight-keyboard-hint {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-top: var(--space-4);
    color: var(--text-lighter);
    font-size: 0.75rem;
    border-top: 1px solid var(--light-alt);
    padding-top: var(--space-4);
}

.spotlight-kbd-group {
    display: flex;
    align-items: center;
    gap: var(--space-2);
}

.spotlight-kbd-item {
    display: flex;
    align-items: center;
    gap: var(--space-1);
}

/* Dark mode pour Spotlight */
.dark-mode .spotlight-content {
    background: var(--dark-alt);
    border-color: rgba(255, 255, 255, 0.05);
}

.dark-mode .spotlight-close {
    background: rgba(255, 255, 255, 0.1);
    color: rgba(255, 255, 255, 0.9);
}

.dark-mode .spotlight-close:hover {
    background: rgba(255, 255, 255, 0.2);
}

.dark-mode .spotlight-input {
    background: rgba(255, 255, 255, 0.05);
    color: white;
}

.dark-mode .spotlight-item:hover {
    background: rgba(255, 255, 255, 0.05);
}

.dark-mode .spotlight-item.active {
    background: rgba(79, 70, 229, 0.2);
}

.dark-mode .spotlight-item-description {
    color: rgba(255, 255, 255, 0.6);
}

.dark-mode .spotlight-keyboard-hint {
    color: rgba(255, 255, 255, 0.5);
    border-top-color: rgba(255, 255, 255, 0.1);
}

/* Modification du positionnement du chat IA */
.ai-chat-container {
    position: fixed;
    bottom: 5rem;
    right: var(--space-8);
    width: 380px;
    max-width: calc(100vw - 2rem);
    height: 480px;
    max-height: 70vh;
    background: white;
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-lg);
    z-index: 89;
    display: flex;
    flex-direction: column;
    overflow: hidden;
    transform: translateY(20px) translateX(0);
    opacity: 0;
    pointer-events: none;
    transition: all 0.3s cubic-bezier(0.25, 0.46, 0.45, 0.94);
    border: var(--border);
}

@media (max-width: 767px) {
    .ai-chat-container {
        bottom: 5rem;
        right: var(--space-4);
        left: var(--space-4);
        width: auto;
        height: 60vh;
    }
    
    .quick-access {
        display: flex;
        flex-direction: row;
        bottom: var(--space-4);
        right: var(--space-4);
        left: var(--space-4);
        justify-content: space-around;
    }
    
    .quick-btn {
        width: 3rem;
        height: 3rem;
    }
}

@media (min-width: 768px) {
    .ai-chat-container.active {
        transform: translateY(0) translateX(-80px);
    }
}

.ai-chat-container.active {
    opacity: 1;
    pointer-events: all;
    transform: translateY(0);
}

/* Dark Mode */
.dark-mode {
    background-color: var(--dark);
    color: white;
}

.dark-mode header {
    background-color: rgba(30, 41, 59, 0.95);
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
}

.dark-mode .logo {
    color: white;
}

.dark-mode .tagline {
    color: rgba(255, 255, 255, 0.7);
}

.dark-mode .button.secondary {
    background: rgba(79, 70, 229, 0.2);
    color: #a5b4fc;
}

.dark-mode .button.ghost {
    color: rgba(255, 255, 255, 0.7);
}

.dark-mode .button.ghost:hover {
    background: rgba(255, 255, 255, 0.05);
    color: white;
}

.dark-mode h1, .dark-mode h2, .dark-mode h3, .dark-mode h4, .dark-mode h5, .dark-mode h6 {
    color: white;
}

.dark-mode .hero::before {
    background: radial-gradient(circle at 30% 20%, rgba(79, 70, 229, 0.1), transparent 25%),
                radial-gradient(circle at 70% 60%, rgba(16, 185, 129, 0.1), transparent 25%);
}

.dark-mode .global-search {
    background: var(--dark-alt);
    border-color: rgba(255, 255, 255, 0.05);
    color: white;
}

.dark-mode .search-shortcut {
    color: rgba(255, 255, 255, 0.5);
}

.dark-mode .kbd {
    background: rgba(255, 255, 255, 0.1);
    border-color: rgba(255, 255, 255, 0.05);
    color: rgba(255, 255, 255, 0.7);
}

.dark-mode .category-chip {
    background: var(--dark-alt);
    color: rgba(255, 255, 255, 0.7);
    border-color: rgba(255, 255, 255, 0.05);
}

.dark-mode .category-chip:hover {
    background: rgba(255, 255, 255, 0.1);
    color: white;
}

.dark-mode .scroll-indicator.left {
    background: linear-gradient(to right, var(--dark), transparent);
}

.dark-mode .scroll-indicator.right {
    background: linear-gradient(to left, var(--dark), transparent);
}

.dark-mode .scroll-arrow {
    background: var(--dark-alt);
    color: rgba(255, 255, 255, 0.7);
}

.dark-mode .scroll-arrow:hover {
    background: var(--primary);
    color: white;
}

.dark-mode .section-title {
    color: white;
}

.dark-mode .section-count {
    background: rgba(255, 255, 255, 0.1);
    color: rgba(255, 255, 255, 0.9);
}

.dark-mode .view-all {
    background: rgba(255, 255, 255, 0.1);
    color: #a5b4fc;
}

.dark-mode .view-all:hover {
    background: rgba(255, 255, 255, 0.15);
}

.dark-mode .module-card {
    background: var(--dark-alt);
    border-color: rgba(255, 255, 255, 0.05);
}

.dark-mode .module-card::before {
    background: linear-gradient(135deg, rgba(79, 70, 229, 0.1), rgba(16, 185, 129, 0.1));
}

.dark-mode .module-name {
    color: white;
}

.dark-mode .module-description {
    color: rgba(255, 255, 255, 0.7);
}

.dark-mode .module-tag {
    background: rgba(255, 255, 255, 0.1);
    color: rgba(255, 255, 255, 0.7);
}

.dark-mode .module-card:hover .module-tag {
    background: rgba(79, 70, 229, 0.2);
    color: #a5b4fc;
}

.dark-mode .module-action {
    background: rgba(255, 255, 255, 0.1);
    color: rgba(255, 255, 255, 0.9);
}

.dark-mode .module-action:hover {
    background: var(--primary);
    color: white;
}

.dark-mode .quick-btn {
    background: var(--dark-alt);
    color: rgba(255, 255, 255, 0.9);
}

.dark-mode .quick-btn:hover {
    background: var(--primary);
    color: white;
}

.dark-mode .empty-icon {
    background: rgba(255, 255, 255, 0.1);
    color: #a5b4fc;
}

.dark-mode .empty-title {
    color: white;
}

.dark-mode .empty-description {
    color: rgba(255, 255, 255, 0.7);
}

/* Responsive */
@media (max-width: 1200px) {
    .hero-title {
        font-size: 2.2rem;
    }
    
    .module-grid {
        grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    }
}

@media (max-width: 991px) {
    .hero-title {
        font-size: 1.8rem;
    }
    
    .hero-subtitle {
        font-size: 1rem;
    }
    
    .section-icon {
        width: 2.5rem;
        height: 2.5rem;
    }
    
    .section-title {
        font-size: 1.3rem;
    }
    
    .module-grid {
        grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
    }
}

@media (max-width: 767px) {
    .container {
        padding: 0 var(--space-4);
    }
    
    .header-inner {
        flex-direction: row;
        align-items: center;
        justify-content: space-between;
        gap: var(--space-4);
    }
    
    .header-left {
        width: auto;
        justify-content: flex-start;
    }
    
    .header-right {
        width: auto;
    }
    
    .tagline {
        display: none;
    }
    
    .header-actions {
        gap: var(--space-2);
    }
    
    .button.secondary span {
        display: none;
    }
    
    .button svg {
        margin: 0;
    }
    
    .button.primary {
        padding: var(--space-2) var(--space-3);
        font-size: 0.8rem;
    }
    
    .button.secondary {
        width: 2.5rem;
        height: 2.5rem;
        padding: 0;
        display: flex;
        align-items: center;
        justify-content: center;
    }
    
    .hero-title {
        font-size: 1.6rem;
    }
    
    .module-grid {
        grid-template-columns: repeat(auto-fill, minmax(100%, 1fr));
    }
    
    .quick-access {
        bottom: var(--space-8);
        right: var(--space-4);
    }
    
    .quick-btn {
        width: 3rem;
        height: 3rem;
    }
    
    .category-chip {
        padding: var(--space-2) var(--space-4);
    }
    
    .scroll-arrow {
        width: 2rem;
        height: 2rem;
    }
    
    .section-header {
        flex-direction: column;
        align-items: flex-start;
        gap: var(--space-3);
    }
    
    .section-actions {
        width: 100%;
        justify-content: flex-end;
    }
}

@media (max-width: 480px) {
    .logo-icon {
        width: 2rem;
        height: 2rem;
    }
    
    .logo {
        font-size: 1.2rem;
    }
    
    .tagline {
        font-size: 0.75rem;
    }
    
    .hero-title {
        font-size: 1.4rem;
    }
    
    .search-shortcut {
        display: none;
    }
    
    .section-icon {
        width: 2rem;
        height: 2rem;
    }
    
    .section-title {
        font-size: 1.1rem;
    }
    
    .quick-tooltip {
        display: none;
    }
}

/* Animations */
@keyframes fadeUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.fade-up {
    opacity: 0;
    animation: fadeUp 0.5s ease forwards;
}

.delay-1 { animation-delay: 0.1s; }
.delay-2 { animation-delay: 0.2s; }
.delay-3 { animation-delay: 0.3s; }
.delay-4 { animation-delay: 0.4s; }
.delay-5 { animation-delay: 0.5s; }

/* Micro-interactions */
.pulse {
    animation: pulse 2s cubic-bezier(0.4, 0, 0.6, 1) infinite;
}

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

.ripple {
    position: relative;
    overflow: hidden;
}

.ripple::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 0;
    height: 0;
    background: rgba(255, 255, 255, 0.5);
    border-radius: 50%;
    transform: translate(-50%, -50%);
    opacity: 0.8;
    pointer-events: none;
    transition: width 0.3s ease-out, height 0.3s ease-out, opacity 0.3s ease-out;
}

.ripple:active::after {
    width: 200%;
    height: 200%;
    opacity: 0;
}

.hover-lift {
    transition: transform 0.3s ease;
}

.hover-lift:hover {
    transform: translateY(-3px);
}

/* Scroll Progress */
.scroll-progress {
    position: fixed;
    top: 0;
    left: 0;
    width: 0;
    height: 3px;
    background: var(--primary-gradient);
    z-index: 101;
    transition: width 0.2s ease;
}

/* Scroll-based animations */
.reveal {
    opacity: 0;
    transform: translateY(30px);
    transition: opacity 0.8s ease, transform 0.8s ease;
}

.reveal.active {
    opacity: 1;
    transform: translateY(0);
}

/* Skeleton loading */
.skeleton {
    background: linear-gradient(90deg, #f0f0f0 25%, #e0e0e0 50%, #f0f0f0 75%);
    background-size: 200% 100%;
    animation: skeleton-loading 1.5s infinite;
    border-radius: var(--radius);
}

@keyframes skeleton-loading {
    0% {
        background-position: 200% 0;
    }
    100% {
        background-position: -200% 0;
    }
}

.dark-mode .skeleton {
    background: linear-gradient(90deg, #2a3644 25%, #374151 50%, #2a3644 75%);
    background-size: 200% 100%;
}

/* Chat IA */
.ai-chat-container {
    position: fixed;
    bottom: 5rem;
    right: var(--space-8);
    width: 380px;
    max-width: calc(100vw - 2rem);
    height: 480px;
    max-height: 70vh;
    background: white;
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-lg);
    z-index: 89;
    display: flex;
    flex-direction: column;
    overflow: hidden;
    transform: translateY(20px);
    opacity: 0;
    pointer-events: none;
    transition: all 0.3s cubic-bezier(0.25, 0.46, 0.45, 0.94);
    border: var(--border);
}

.ai-chat-container.active {
    transform: translateY(0);
    opacity: 1;
    pointer-events: all;
}

.ai-chat-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: var(--space-4) var(--space-5);
    background: var(--primary-gradient);
    color: white;
}

.ai-chat-title {
    font-weight: 600;
    font-size: 1rem;
    display: flex;
    align-items: center;
    gap: var(--space-2);
}

.ai-chat-close {
    width: 2rem;
    height: 2rem;
    border-radius: var(--radius-full);
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(255, 255, 255, 0.2);
    color: white;
    transition: var(--transition);
}

.ai-chat-close:hover {
    background: rgba(255, 255, 255, 0.3);
}

.ai-chat-messages {
    flex: 1;
    overflow-y: auto;
    padding: var(--space-4);
    display: flex;
    flex-direction: column;
    gap: var(--space-4);
}

.ai-message {
    display: flex;
    flex-direction: column;
    max-width: 85%;
    animation: fadeIn 0.3s ease forwards;
}

.ai-message.user {
    align-self: flex-end;
}

.ai-message.bot {
    align-self: flex-start;
}

.ai-message-content {
    padding: var(--space-3) var(--space-4);
    border-radius: var(--radius-lg);
    font-size: 0.95rem;
    position: relative;
    line-height: 1.5;
}

.ai-message.user .ai-message-content {
    background: var(--primary-light);
    color: white;
    border-bottom-right-radius: var(--space-1);
}

.ai-message.bot .ai-message-content {
    background: var(--light-alt);
    color: var(--text);
    border-bottom-left-radius: var(--space-1);
}

.ai-message-time {
    font-size: 0.7rem;
    color: var(--text-lighter);
    margin-top: var(--space-1);
    align-self: flex-end;
}

.user .ai-message-time {
    align-self: flex-end;
}

.bot .ai-message-time {
    align-self: flex-start;
}

.ai-chat-input-container {
    padding: var(--space-3) var(--space-4);
    border-top: var(--border);
    display: flex;
    align-items: center;
    gap: var(--space-2);
}

.ai-chat-input {
    flex: 1;
    border: none;
    background: var(--light-alt);
    padding: var(--space-3) var(--space-4);
    border-radius: var(--radius-full);
    font-size: 0.95rem;
    resize: none;
    max-height: 100px;
    overflow-y: auto;
}

.ai-chat-input:focus {
    outline: none;
    box-shadow: var(--shadow-focus);
}

.ai-chat-send {
    width: 2.5rem;
    height: 2.5rem;
    border-radius: var(--radius-full);
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--primary-gradient);
    color: white;
    transition: var(--transition);
}

.ai-chat-send:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(99, 102, 241, 0.3);
}

.ai-chat-send:disabled {
    opacity: 0.6;
    cursor: not-allowed;
    transform: none;
    box-shadow: none;
}

.typing-indicator {
    display: inline-flex;
    align-items: center;
    gap: 3px;
    padding: var(--space-2) var(--space-3);
    background: var(--light-alt);
    border-radius: var(--radius-full);
    font-size: 0.8rem;
    color: var(--text-light);
}

.typing-indicator span {
    width: 4px;
    height: 4px;
    border-radius: 50%;
    background: var(--primary);
    animation: typing 1s infinite ease-in-out;
}

.typing-indicator span:nth-child(1) {
    animation-delay: 0.1s;
}

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

.typing-indicator span:nth-child(3) {
    animation-delay: 0.3s;
}

@keyframes typing {
    0%, 100% {
        transform: translateY(0);
        opacity: 0.5;
    }
    50% {
        transform: translateY(-5px);
        opacity: 1;
    }
}

.dark-mode .ai-chat-container {
    background: var(--dark-alt);
    border-color: rgba(255, 255, 255, 0.05);
}

.dark-mode .ai-message.bot .ai-message-content {
    background: rgba(255, 255, 255, 0.1);
    color: white;
}

.dark-mode .ai-chat-input {
    background: rgba(255, 255, 255, 0.1);
    color: white;
}

.dark-mode .typing-indicator {
    background: rgba(255, 255, 255, 0.1);
    color: rgba(255, 255, 255, 0.7);
}

/* Animations supplémentaires */
@keyframes slideInRight {
    from {
        transform: translateX(30px);
        opacity: 0;
    }
    to {
        transform: translateX(0);
        opacity: 1;
    }
}

@keyframes slideInLeft {
    from {
        transform: translateX(-30px);
        opacity: 0;
    }
    to {
        transform: translateX(0);
        opacity: 1;
    }
}

@keyframes bounce {
    0%, 20%, 50%, 80%, 100% {
        transform: translateY(0);
    }
    40% {
        transform: translateY(-10px);
    }
    60% {
        transform: translateY(-5px);
    }
}

.slide-in-right {
    animation: slideInRight 0.5s forwards;
}

.slide-in-left {
    animation: slideInLeft 0.5s forwards;
}

.bounce {
    animation: bounce 1s ease infinite;
}

/* Animation pour les boutons et icônes */
.button:hover svg,
.module-action:hover svg,
.category-chip:hover svg {
    animation: spin 0.5s ease;
}

@keyframes spin {
    0% {
        transform: rotate(0deg);
    }
    25% {
        transform: rotate(10deg);
    }
    75% {
        transform: rotate(-10deg);
    }
    100% {
        transform: rotate(0deg);
    }
}

 #ai-chat-trigger svg {
    animation: pulse 2s infinite;
}

@keyframes pulse {
    0% {
        transform: scale(1);
        opacity: 1;
    }
    50% {
        transform: scale(1.1);
        opacity: 0.7;
    }
    100% {
        transform: scale(1);
        opacity: 1;
    }
}

/* --- CARROUSEL NOUVEAUTÉS/POPULAIRES --- */
.carousel-section {
    max-width: 900px;
    margin: 2rem auto 2.5rem;
    padding: 2rem 0 1.5rem;
    position: relative;
    z-index: 2;
}
.carousel-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 1rem;
}
.carousel-header h2 {
    font-size: 1.3rem;
    font-weight: 700;
    color: var(--primary);
    display: flex;
    align-items: center;
    gap: 0.5rem;
}
.carousel-controls {
    display: flex;
    gap: 0.5rem;
}
.carousel-controls button {
    background: var(--primary-gradient);
    color: #fff;
    border-radius: var(--radius-full);
    width: 2.2rem;
    height: 2.2rem;
    font-size: 1.1rem;
    border: none;
    box-shadow: var(--shadow);
    transition: var(--transition);
}
.carousel-controls button:hover {
    background: var(--accent-gradient);
    color: #fff;
    transform: scale(1.08);
}
.carousel-wrapper {
    display: flex;
    overflow: hidden;
    min-height: 140px;
    position: relative;
}
.carousel-slide {
    min-width: 100%;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.5s cubic-bezier(0.4,0,0.2,1);
    display: flex;
    justify-content: center;
    align-items: stretch;
}
.carousel-slide.active {
    opacity: 1;
    pointer-events: all;
}
.carousel-card {
    display: flex;
    align-items: flex-start;
    background: var(--white);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-md);
    padding: 1.5rem 2rem;
    gap: 1.5rem;
    min-width: 0;
    width: 100%;
    max-width: 700px;
    border: var(--border);
    position: relative;
    animation: fadeUp 0.7s;
}
.carousel-icon {
    flex-shrink: 0;
    width: 3.2rem;
    height: 3.2rem;
    background: var(--primary-gradient);
    color: #fff;
    border-radius: var(--radius-full);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 2rem;
    box-shadow: var(--shadow);
}
.carousel-content {
    flex: 1;
    min-width: 0;
}
.carousel-title {
    font-size: 1.1rem;
    font-weight: 600;
    margin-bottom: 0.3rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    flex-wrap: wrap;
}
.carousel-badge {
    display: inline-flex;
    align-items: center;
    gap: 0.2rem;
    font-size: 0.85rem;
    font-weight: 700;
    border-radius: var(--radius-full);
    padding: 0.15rem 0.7rem;
    margin-left: 0.5rem;
    vertical-align: middle;
}
.badge-recommended, .carousel-badge.badge-recommended {
    background: linear-gradient(90deg,#f97316 30%,#fb923c 100%);
    color: #fff;
    box-shadow: 0 2px 8px #f9731622;
}
.badge-new, .carousel-badge.badge-new {
    background: linear-gradient(90deg,#10b981 30%,#34d399 100%);
    color: #fff;
    box-shadow: 0 2px 8px #10b98122;
}
.carousel-desc {
    color: var(--text-light);
    font-size: 0.97rem;
    margin-bottom: 0.5rem;
}
.carousel-tags {
    display: flex;
    gap: 0.4rem;
    margin-bottom: 0.5rem;
}
.carousel-action {
    display: inline-flex;
    align-items: center;
    gap: 0.3rem;
    background: var(--primary-gradient);
    color: #fff;
    border-radius: var(--radius-full);
    padding: 0.4rem 1.1rem;
    font-size: 0.95rem;
    font-weight: 500;
    margin-top: 0.2rem;
    box-shadow: var(--shadow);
    transition: var(--transition);
}
.carousel-action:hover {
    background: var(--accent-gradient);
    color: #fff;
    transform: translateY(-2px) scale(1.04);
}

/* --- FAB MENU --- */
.fab-menu-container {
    position: fixed;
    bottom: 2.5rem;
    right: 2.5rem;
    z-index: 120;
    display: flex;
    flex-direction: column;
    align-items: flex-end;
}
.fab-main-btn {
    width: 4.2rem;
    height: 4.2rem;
    border-radius: 50%;
    background: var(--primary-gradient);
    color: #fff;
    box-shadow: 0 8px 32px #4f46e555, var(--shadow-lg);
    border: none;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 2rem;
    position: relative;
    transition: box-shadow 0.3s, transform 0.2s;
    cursor: pointer;
    outline: none;
    animation: fadeIn 0.7s;
}
.fab-main-btn.glowy {
    box-shadow: 0 0 0 0 #f97316, 0 8px 32px #4f46e555, var(--shadow-lg);
    animation: glowyPulse 1.5s infinite alternate;
}
@keyframes glowyPulse {
    0% { box-shadow: 0 0 0 0 #f97316, 0 8px 32px #4f46e555, var(--shadow-lg);}
    100% { box-shadow: 0 0 0 16px #f9731633, 0 8px 32px #4f46e555, var(--shadow-lg);}
}
.fab-main-btn.active, .fab-main-btn:active {
    transform: scale(1.08);
    box-shadow: 0 0 0 8px #10b98133, 0 8px 32px #4f46e555, var(--shadow-lg);
}
.fab-notif-dot {
    position: absolute;
    top: 0.7rem;
    right: 0.7rem;
    width: 0.8rem;
    height: 0.8rem;
    background: #f97316;
    border-radius: 50%;
    box-shadow: 0 0 8px #f97316cc;
    display: none;
    pointer-events: none;
}
.fab-menu {
    display: flex;
    flex-direction: column;
    gap: 0.7rem;
    margin-top: 0.7rem;
    background: var(--white);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-lg);
    padding: 1.1rem 0.7rem;
    min-width: 210px;
    opacity: 0;
    pointer-events: none;
    transform: translateY(20px) scale(0.98);
    transition: opacity 0.3s, transform 0.3s;
    border: var(--border);
    position: absolute;
    bottom: 4.5rem;
    right: 0;
    z-index: 121;
}
.fab-menu.active {
    opacity: 1;
    pointer-events: all;
    transform: translateY(0) scale(1);
    animation: fadeIn 0.4s;
}
.fab-menu-item {
    display: flex;
    align-items: center;
    gap: 0.7rem;
    background: none;
    border: none;
    color: var(--primary);
    font-weight: 600;
    font-size: 1rem;
    border-radius: var(--radius-full);
    padding: 0.7rem 1rem;
    transition: background 0.2s, color 0.2s, transform 0.2s;
    cursor: pointer;
    position: relative;
}
.fab-menu-item:hover {
    background: var(--primary-gradient);
    color: #fff;
    transform: translateY(-2px) scale(1.04);
}
.fab-badge-new {
    background: var(--accent-gradient);
    color: #fff;
    font-size: 0.8rem;
    font-weight: 700;
    border-radius: var(--radius-full);
    padding: 0.15rem 0.7rem;
    margin-left: 0.5rem;
    box-shadow: 0 2px 8px #f9731622;
    animation: bounce 1.2s infinite;
}
@media (max-width: 767px) {
    .fab-menu-container {
        bottom: 1.2rem;
        right: 1.2rem;
    }
    .fab-main-btn {
        width: 3.2rem;
        height: 3.2rem;
        font-size: 1.3rem;
    }
    .fab-menu {
        min-width: 170px;
        padding: 0.7rem 0.3rem;
        bottom: 3.5rem;
    }
}

/* --- SOPHIA BULLE ONBOARDING --- */
.sophia-bubble {
    position: fixed;
    bottom: 7.5rem;
    right: 2.5rem;
    background: var(--primary-gradient);
    color: #fff;
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-lg);
    padding: 1rem 1.5rem;
    font-size: 1.05rem;
    z-index: 130;
    opacity: 0;
    pointer-events: none;
    transform: translateY(20px) scale(0.98);
    transition: opacity 0.3s, transform 0.3s;
    display: flex;
    align-items: center;
    gap: 1rem;
}
.sophia-bubble.active {
    opacity: 1;
    pointer-events: all;
    transform: translateY(0) scale(1);
    animation: fadeIn 0.5s;
}
.sophia-bubble strong {
    color: #fff;
    text-shadow: 0 2px 8px #4f46e555;
}
.sophia-bubble button {
    background: none;
    border: none;
    color: #fff;
    font-size: 1.3rem;
    margin-left: 0.7rem;
    cursor: pointer;
    opacity: 0.7;
    transition: opacity 0.2s;
}
.sophia-bubble button:hover {
    opacity: 1;
}
@media (max-width: 767px) {
    .sophia-bubble {
        right: 1.2rem;
        bottom: 5.5rem;
        font-size: 0.95rem;
        padding: 0.7rem 1rem;
    }
}

/* --- TOAST NOTIFICATIONS --- */
.toast-container {
    position: fixed;
    bottom: 1.5rem;
    left: 50%;
    transform: translateX(-50%);
    z-index: 99999;
    display: flex;
    flex-direction: column;
    gap: 0.7rem;
    pointer-events: none;
}
.toast {
    background: var(--primary-gradient);
    color: #fff;
    padding: 0.8rem 1.5rem;
    border-radius: var(--radius-full);
    font-size: 1rem;
    font-weight: 600;
    box-shadow: var(--shadow-lg);
    opacity: 0.98;
    animation: fadeIn 0.4s;
    pointer-events: all;
    transition: opacity 0.5s, transform 0.5s;
}
.toast-success {
    background: var(--secondary-gradient, linear-gradient(90deg,#10b981 30%,#34d399 100%));
}
.toast-error {
    background: var(--accent-gradient);
}
.toast.fade-in {
    opacity: 1;
    transform: translateY(0);
}
.toast.fade-out {
    opacity: 0;
    transform: translateY(30px);
}

/* --- ANIMATIONS DOUCES --- */
.fade-up {
    opacity: 0;
    transform: translateY(20px);
    animation: fadeUp 0.7s forwards;
}
@keyframes fadeUp {
    to {
        opacity: 1;
        transform: translateY(0);
    }
}
.hover-lift {
    transition: transform 0.3s cubic-bezier(0.4,0,0.2,1), box-shadow 0.3s;
}
.hover-lift:hover {
    transform: translateY(-6px) scale(1.03);
    box-shadow: 0 8px 32px #4f46e533, var(--shadow-lg);
}

/* --- BADGES PLUS VISIBLES (modules) --- */
.module-badge, .badge-recommended, .badge-new {
    font-size: 0.85rem !important;
    font-weight: 700 !important;
    padding: 0.15rem 0.7rem !important;
    border-radius: var(--radius-full) !important;
    margin-right: 0.3rem;
    display: inline-flex;
    align-items: center;
    gap: 0.2rem;
}
.module-badge.badge-recommended {
    background: linear-gradient(90deg,#f97316 30%,#fb923c 100%);
    color: #fff;
    box-shadow: 0 2px 8px #f9731622;
}
.module-badge.badge-new {
    background: linear-gradient(90deg,#10b981 30%,#34d399 100%);
    color: #fff;
    box-shadow: 0 2px 8px #10b98122;
}
.module-badge svg {
    margin-right: 0.2rem;
    vertical-align: middle;
}

/* --- DARK MODE AMÉLIORÉ --- */
.dark-mode .carousel-card,
.dark-mode .fab-menu,
.dark-mode .sophia-bubble {
    background: var(--dark-alt);
    color: #fff;
    border-color: rgba(255,255,255,0.08);
}
.dark-mode .carousel-icon {
    background: var(--primary-dark);
    color: #fff;
}
.dark-mode .carousel-title {
    color: #fff;
}
.dark-mode .carousel-desc {
    color: #a5b4fc;
}
.dark-mode .carousel-action {
    background: var(--accent-gradient);
    color: #fff;
}
.dark-mode .carousel-action:hover {
    background: var(--primary-gradient);
}
.dark-mode .fab-main-btn {
    background: var(--primary-dark);
    color: #fff;
}
.dark-mode .fab-menu-item {
    color: #a5b4fc;
}
.dark-mode .fab-menu-item:hover {
    background: var(--primary-gradient);
    color: #fff;
}
.dark-mode .fab-badge-new {
    background: var(--accent-gradient);
    color: #fff;
}
.dark-mode .sophia-bubble {
    background: var(--primary-dark);
    color: #fff;
}
.dark-mode .toast {
    background: var(--primary-dark);
    color: #fff;
}
.dark-mode .toast-success {
    background: var(--secondary-dark);
}
.dark-mode .toast-error {
    background: var(--accent-dark);
}

/* --- AUTRES AJUSTEMENTS --- */