/* ==================== INDEGO - DESIGN ULTRA SMOOTH & SATISFAISANT ==================== */

/* Variables CSS pour thème dark ultra confortable */
:root {
    /* Couleurs principales avec plus de profondeur */
    --primary-color: #8B5FBF;
    --primary-light: #A47DD6;
    --primary-dark: #6B4A94;
    --secondary-color: #6C7CE7;
    --accent-color: #FF6B9D;
    --success-color: #4ECDC4;
    --warning-color: #FFD93D;
    --error-color: #FF4757;
    
    /* Couleurs de fond avec transitions douces */
    --bg-primary: #0D1117;
    --bg-secondary: #161B22;
    --bg-tertiary: #21262D;
    --bg-card: #1C2128;
    --bg-hover: #262C36;
    --bg-glass: rgba(28, 33, 40, 0.85);
    
    /* Couleurs de texte */
    --text-primary: #E6EDF3;
    --text-secondary: #7D8590;
    --text-muted: #656D76;
    --text-inverse: #0D1117;
    
    /* Bordures ultra douces */
    --border-color: #30363D;
    --border-hover: #424A53;
    
    /* Ombres ultra smooth */
    --shadow-xs: 0 1px 3px rgba(0, 0, 0, 0.2);
    --shadow-sm: 0 4px 8px rgba(0, 0, 0, 0.3);
    --shadow-md: 0 8px 16px rgba(0, 0, 0, 0.4);
    --shadow-lg: 0 16px 32px rgba(0, 0, 0, 0.5);
    --shadow-xl: 0 24px 48px rgba(0, 0, 0, 0.6);
    --shadow-glow: 0 0 20px rgba(139, 95, 191, 0.3);
    
    /* Espacements */
    --space-xs: 0.25rem;
    --space-sm: 0.5rem;
    --space-md: 1rem;
    --space-lg: 1.5rem;
    --space-xl: 2rem;
    --space-2xl: 3rem;
    
    /* Rayons ultra arrondis */
    --radius-xs: 6px;
    --radius-sm: 12px;
    --radius-md: 18px;
    --radius-lg: 24px;
    --radius-xl: 32px;
    --radius-2xl: 40px;
    --radius-full: 9999px;
    
    /* Transitions ultra fluides */
    --transition-lightning: 0.1s cubic-bezier(0.4, 0, 0.2, 1);
    --transition-fast: 0.2s cubic-bezier(0.4, 0, 0.2, 1);
    --transition-normal: 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    --transition-smooth: 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    --transition-slow: 0.6s cubic-bezier(0.4, 0, 0.2, 1);
    --transition-bounce: 0.5s cubic-bezier(0.68, -0.55, 0.265, 1.55);
    --transition-elastic: 0.8s cubic-bezier(0.68, -0.55, 0.265, 1.55);
}

/* ==================== RESET & BASE ==================== */

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

html {
    scroll-behavior: smooth;
}

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    background: var(--bg-primary);
    color: var(--text-primary);
    line-height: 1.6;
    font-size: 16px;
    overflow-x: hidden;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

/* ==================== TYPOGRAPHY AVEC ANIMATIONS ==================== */

h1, h2, h3, h4, h5, h6 {
    font-weight: 600;
    line-height: 1.4;
    margin-bottom: var(--space-md);
    color: var(--text-primary);
    transition: var(--transition-smooth);
}

h1 { font-size: 2.5rem; }
h2 { font-size: 2rem; }
h3 { font-size: 1.75rem; }
h4 { font-size: 1.5rem; }
h5 { font-size: 1.25rem; }
h6 { font-size: 1rem; }

p {
    margin-bottom: var(--space-md);
    color: var(--text-secondary);
    transition: var(--transition-normal);
}

a {
    color: var(--primary-color);
    text-decoration: none;
    transition: var(--transition-fast);
    position: relative;
}

a:hover {
    color: var(--primary-light);
    text-decoration: none;
}

a::after {
    content: '';
    position: absolute;
    bottom: -2px;
    left: 0;
    width: 0;
    height: 2px;
    background: linear-gradient(90deg, var(--primary-color), var(--secondary-color));
    transition: width var(--transition-smooth);
    border-radius: var(--radius-full);
}

a:hover::after {
    width: 100%;
}

/* ==================== LAYOUT PRINCIPAL ==================== */

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 var(--space-lg);
}

.container-fluid {
    width: 100%;
    padding: 0 var(--space-lg);
}

/* Header ultra smooth */
.header {
    background: var(--bg-glass);
    backdrop-filter: blur(20px) saturate(180%);
    border-bottom: 1px solid var(--border-color);
    position: sticky;
    top: 0;
    z-index: 100;
    transition: all var(--transition-smooth);
}

.header:hover {
    background: rgba(28, 33, 40, 0.95);
    box-shadow: var(--shadow-md);
}

.header-content {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: var(--space-md) 0;
}

.logo {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--primary-color);
    text-decoration: none;
    transition: all var(--transition-bounce);
    display: inline-block;
}

.logo:hover {
    color: var(--secondary-color);
    transform: scale(1.05) rotate(-2deg);
    text-decoration: none;
}

.logo::after {
    display: none;
}

/* Navigation ultra fluide */
.nav {
    display: flex;
    align-items: center;
    gap: var(--space-lg);
}

.nav-menu {
    display: flex;
    list-style: none;
    gap: var(--space-md);
    margin: 0;
}

.nav-link {
    color: var(--text-secondary);
    font-weight: 500;
    padding: var(--space-sm) var(--space-lg);
    border-radius: var(--radius-full);
    transition: all var(--transition-smooth);
    position: relative;
    overflow: hidden;
}



.nav-link:hover::before {
    left: 100%;
}

.nav-link:hover,
.nav-link.active {
    color: var(--text-primary);
    background: var(--bg-hover);
    text-decoration: none;
    transform: translateY(-2px);
    box-shadow: var(--shadow-sm);
}

.nav-link::after {
    display: none;
}

/* ==================== BOUTONS ULTRA SATISFAISANTS ==================== */

.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: var(--space-sm);
    padding: var(--space-md) var(--space-xl);
    font-size: 0.95rem;
    font-weight: 500;
    text-align: center;
    text-decoration: none;
    border: none;
    border-radius: var(--radius-full);
    cursor: pointer;
    transition: all var(--transition-smooth);
    position: relative;
    overflow: hidden;
    white-space: nowrap;
}

.btn::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 0;
    height: 0;
    border-radius: var(--radius-full);
    background: rgba(255, 255, 255, 0.2);
    transform: translate(-50%, -50%);
    transition: width var(--transition-smooth), height var(--transition-smooth);
}

.btn:hover::before {
    width: 300px;
    height: 300px;
}

.btn:active {
    transform: scale(0.96);
}

.btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
    transform: none;
}

/* Bouton primaire avec gradient animé */
.btn-primary {
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
    background-size: 200% 200%;
    color: white;
    box-shadow: var(--shadow-sm);
    animation: gradientShift 3s ease infinite;
}

.btn-primary:hover:not(:disabled) {
    transform: translateY(-4px) scale(1.02);
    box-shadow: var(--shadow-lg), var(--shadow-glow);
    color: white;
    text-decoration: none;
}

@keyframes gradientShift {
    0%, 100% { background-position: 0% 50%; }
    50% { background-position: 100% 50%; }
}

/* Bouton secondaire */
.btn-secondary {
    background: var(--bg-tertiary);
    color: var(--text-primary);
    border: 2px solid var(--border-color);
    transition: all var(--transition-smooth);
}

.btn-secondary:hover:not(:disabled) {
    background: var(--bg-hover);
    border-color: var(--primary-color);
    color: var(--text-primary);
    text-decoration: none;
    transform: translateY(-2px);
    box-shadow: var(--shadow-md);
}

/* Bouton outline avec effet de remplissage */
.btn-outline {
    background: transparent;
    color: var(--primary-color);
    border: 2px solid var(--primary-color);
    position: relative;
    z-index: 1;
}

.btn-outline::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 0;
    height: 100%;
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
    transition: width var(--transition-smooth);
    border-radius: var(--radius-full);
    z-index: -1;
}

.btn-outline:hover:not(:disabled)::after {
    width: 100%;
}

.btn-outline:hover:not(:disabled) {
    color: white;
    border-color: var(--secondary-color);
    text-decoration: none;
    transform: translateY(-2px);
    box-shadow: var(--shadow-md);
}

/* Tailles des boutons */
.btn-sm {
    padding: var(--space-sm) var(--space-lg);
    font-size: 0.85rem;
    border-radius: var(--radius-lg);
}

.btn-lg {
    padding: var(--space-lg) var(--space-2xl);
    font-size: 1.1rem;
    border-radius: var(--radius-xl);
}

.btn-block {
    width: 100%;
}

/* ==================== CARTES ULTRA SMOOTH ==================== */

.card {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-2xl);
    overflow: hidden;
    transition: all var(--transition-smooth);
    box-shadow: var(--shadow-xs);
    position: relative;
}

.card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 2px;
    background: linear-gradient(90deg, var(--primary-color), var(--secondary-color));
    transform: scaleX(0);
    transition: transform var(--transition-smooth);
}

.card:hover::before {
    transform: scaleX(1);
}

.card:hover {
    transform: translateY(-8px) scale(1.02);
    box-shadow: var(--shadow-xl);
    border-color: var(--border-hover);
}

.card-header {
    padding: var(--space-xl);
    border-bottom: 1px solid var(--border-color);
    background: var(--bg-tertiary);
    transition: var(--transition-normal);
}

.card:hover .card-header {
    background: var(--bg-hover);
}

.card-body {
    padding: var(--space-xl);
}

.card-footer {
    padding: var(--space-xl);
    border-top: 1px solid var(--border-color);
    background: var(--bg-tertiary);
    transition: var(--transition-normal);
}

/* ==================== FORMULAIRES ULTRA CONFORTABLES ==================== */

.form-group {
    margin-bottom: var(--space-xl);
}

.form-label {
    display: block;
    margin-bottom: var(--space-sm);
    font-weight: 500;
    color: var(--text-primary);
    transition: var(--transition-fast);
}

.form-control {
    width: 100%;
    padding: var(--space-lg);
    font-size: 1rem;
    background: var(--bg-tertiary);
    border: 2px solid var(--border-color);
    border-radius: var(--radius-lg);
    color: var(--text-primary);
    transition: all var(--transition-smooth);
}

.form-control:hover {
    border-color: var(--border-hover);
    background: var(--bg-hover);
}

.form-control:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 4px rgba(139, 95, 191, 0.15);
    background: var(--bg-card);
    transform: translateY(-2px);
}

.form-control::placeholder {
    color: var(--text-muted);
    transition: var(--transition-fast);
}

.form-control:focus::placeholder {
    opacity: 0.7;
    transform: translateX(5px);
}

.form-select {
    background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' fill='%23E6EDF3' viewBox='0 0 16 16'%3e%3cpath d='m7.247 4.86-4.796 5.481c-.566.647-.106 1.659.753 1.659h9.592a1 1 0 0 0 .753-1.659l-4.796-5.48a1 1 0 0 0-1.506 0z'/%3e%3c/svg%3e");
    background-repeat: no-repeat;
    background-position: right var(--space-lg) center;
    background-size: 16px 12px;
    padding-right: calc(var(--space-2xl) + 16px);
    cursor: pointer;
}

.form-textarea {
    resize: vertical;
    min-height: 150px;
}

.form-control.error {
    border-color: var(--error-color);
    animation: shake 0.4s;
}

.form-error {
    color: var(--error-color);
    font-size: 0.875rem;
    margin-top: var(--space-sm);
    animation: fadeInUp 0.3s;
}

@keyframes shake {
    0%, 100% { transform: translateX(0); }
    25% { transform: translateX(-10px); }
    75% { transform: translateX(10px); }
}

/* ==================== GRILLE DE PRODUITS ULTRA FLUIDE ==================== */

.products-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: var(--space-2xl);
    margin-top: var(--space-2xl);
}

.product-card {
    position: relative;
    border-radius: var(--radius-2xl);
    overflow: hidden;
    transition: all var(--transition-smooth);
    box-shadow: var(--shadow-sm);
}

.product-card:hover {
    transform: translateY(-12px) scale(1.03);
    box-shadow: var(--shadow-xl);
    z-index: 10;
}

.product-image {
    position: relative;
    aspect-ratio: 3/4;
    overflow: hidden;
    border-radius: var(--radius-2xl);
}

.product-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform var(--transition-slow);
}

.product-card:hover .product-image img {
    transform: scale(1.15) rotate(2deg);
}

.product-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(to bottom, transparent 0%, rgba(0,0,0,0.85) 100%);
    opacity: 0;
    transition: opacity var(--transition-smooth);
}

.product-card:hover .product-overlay {
    opacity: 1;
}

.product-info {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    padding: var(--space-xl);
    transform: translateY(100%);
    transition: transform var(--transition-elastic);
}

.product-card:hover .product-info {
    transform: translateY(0);
}

.product-brand {
    font-size: 0.85rem;
    color: var(--text-muted);
    margin-bottom: var(--space-xs);
    animation: fadeIn 0.3s 0.1s both;
}

.product-name {
    font-weight: 600;
    color: white;
    margin-bottom: var(--space-sm);
    animation: fadeIn 0.3s 0.2s both;
}

.product-price {
    font-size: 1.3rem;
    font-weight: 700;
    color: var(--accent-color);
    margin-bottom: var(--space-md);
    animation: fadeIn 0.3s 0.3s both;
}

.product-actions {
    display: flex;
    gap: var(--space-sm);
    animation: fadeIn 0.3s 0.4s both;
}

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

/* Like button ultra satisfaisant */
.like-btn {
    background: rgba(255, 255, 255, 0.15);
    backdrop-filter: blur(10px);
    color: white;
    border: 2px solid rgba(255, 255, 255, 0.2);
    padding: var(--space-sm) var(--space-md);
    border-radius: var(--radius-full);
    cursor: pointer;
    transition: all var(--transition-bounce);
    display: flex;
    align-items: center;
    gap: var(--space-sm);
}

.like-btn:hover {
    background: var(--accent-color);
    border-color: var(--accent-color);
    transform: scale(1.1) rotate(5deg);
    box-shadow: var(--shadow-md);
}

.like-btn:active {
    transform: scale(0.95);
}

.like-btn.liked {
    background: var(--accent-color);
    border-color: var(--accent-color);
    animation: heartbeat 0.6s;
}

@keyframes heartbeat {
    0%, 100% { transform: scale(1); }
    25% { transform: scale(1.2); }
    50% { transform: scale(1.1); }
    75% { transform: scale(1.15); }
}

/* Badge de likes */
.product-likes {
    position: absolute;
    top: var(--space-md);
    right: var(--space-md);
    background: rgba(0, 0, 0, 0.8);
    backdrop-filter: blur(10px);
    color: white;
    padding: var(--space-sm) var(--space-md);
    border-radius: var(--radius-full);
    font-size: 0.85rem;
    display: flex;
    align-items: center;
    gap: var(--space-xs);
    transition: all var(--transition-smooth);
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.product-card:hover .product-likes {
    transform: scale(1.1);
    background: rgba(139, 95, 191, 0.9);
    border-color: var(--primary-light);
}

/* ==================== BARRE DE RECHERCHE ULTRA SMOOTH ==================== */

.search-bar {
    position: relative;
    max-width: 600px;
    margin: 0 auto;
}

.search-input {
    width: 100%;
    padding: var(--space-lg) var(--space-xl);
    padding-right: calc(var(--space-2xl) + 50px);
    background: var(--bg-tertiary);
    border: 2px solid var(--border-color);
    border-radius: var(--radius-full);
    color: var(--text-primary);
    font-size: 1rem;
    transition: all var(--transition-smooth);
    box-shadow: var(--shadow-xs);
}

.search-input:hover {
    border-color: var(--border-hover);
    background: var(--bg-hover);
}

.search-input:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 5px rgba(139, 95, 191, 0.15), var(--shadow-md);
    background: var(--bg-card);
    transform: translateY(-2px);
}

.search-btn {
    position: absolute;
    right: var(--space-sm);
    top: 50%;
    transform: translateY(-50%);
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
    color: white;
    border: none;
    padding: var(--space-md);
    border-radius: var(--radius-full);
    cursor: pointer;
    transition: all var(--transition-bounce);
    box-shadow: var(--shadow-sm);
    width: 45px;
    height: 45px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.search-btn:hover {
    transform: translateY(-50%) scale(1.1) rotate(5deg);
    box-shadow: var(--shadow-md), var(--shadow-glow);
}

.search-btn:active {
    transform: translateY(-50%) scale(0.95);
}

/* ==================== FILTRES ULTRA CONFORTABLES ==================== */

.filters {
    display: flex;
    flex-wrap: wrap;
    gap: var(--space-lg);
    align-items: center;
    margin: var(--space-2xl) 0;
    padding: var(--space-xl);
    background: var(--bg-glass);
    backdrop-filter: blur(20px);
    border-radius: var(--radius-2xl);
    border: 1px solid var(--border-color);
    transition: all var(--transition-smooth);
    box-shadow: var(--shadow-sm);
}

.filters:hover {
    border-color: var(--border-hover);
    box-shadow: var(--shadow-md);
}

.filter-group {
    display: flex;
    align-items: center;
    gap: var(--space-md);
    transition: var(--transition-normal);
}

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

.filter-label {
    font-weight: 500;
    color: var(--text-primary);
    white-space: nowrap;
}

.filter-select {
    min-width: 140px;
    border-radius: var(--radius-lg);
}

/* ==================== ALERTS SATISFAISANTES ==================== */

.alert {
    padding: var(--space-lg) var(--space-xl);
    border-radius: var(--radius-xl);
    margin-bottom: var(--space-lg);
    border-left: 4px solid;
    animation: slideInRight 0.4s cubic-bezier(0.68, -0.55, 0.265, 1.55);
    backdrop-filter: blur(10px);
    transition: all var(--transition-smooth);
}

.alert:hover {
    transform: translateX(5px);
    box-shadow: var(--shadow-md);
}

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

.alert-success {
    background: rgba(78, 205, 196, 0.15);
    border-left-color: var(--success-color);
    color: var(--success-color);
}

.alert-error {
    background: rgba(255, 71, 87, 0.15);
    border-left-color: var(--error-color);
    color: var(--error-color);
}

.alert-warning {
    background: rgba(255, 217, 61, 0.15);
    border-left-color: var(--warning-color);
    color: var(--warning-color);
}

/* ==================== MODAL ULTRA IMMERSIVE ==================== */

.modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.85);
    backdrop-filter: blur(15px);
    z-index: 1000;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    visibility: hidden;
    transition: all var(--transition-smooth);
}

.modal.active {
    opacity: 1;
    visibility: visible;
}

.modal-content {
    background: var(--bg-card);
    border-radius: var(--radius-2xl);
    max-width: 600px;
    width: 90%;
    max-height: 90vh;
    overflow-y: auto;
    transform: scale(0.8) translateY(50px);
    transition: transform var(--transition-elastic);
    box-shadow: var(--shadow-xl);
    border: 1px solid var(--border-color);
}

.modal.active .modal-content {
    transform: scale(1) translateY(0);
}

.modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: var(--space-xl);
    border-bottom: 1px solid var(--border-color);
}

.modal-close {
    background: var(--bg-tertiary);
    border: 2px solid var(--border-color);
    color: var(--text-secondary);
    font-size: 1.5rem;
    cursor: pointer;
    transition: all var(--transition-bounce);
    width: 40px;
    height: 40px;
    border-radius: var(--radius-full);
    display: flex;
    align-items: center;
    justify-content: center;
}

.modal-close:hover {
    color: var(--text-primary);
    background: var(--error-color);
    border-color: var(--error-color);
    transform: rotate(90deg) scale(1.1);
}

/* ==================== DROPDOWNS ULTRA FLUIDES ==================== */

.user-menu {
    position: relative;
}

.user-dropdown {
    position: absolute;
    top: calc(100% + var(--space-sm));
    right: 0;
    background: var(--bg-glass);
    backdrop-filter: blur(20px);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-xl);
    box-shadow: var(--shadow-xl);
    min-width: 220px;
    z-index: 1000;
    opacity: 0;
    visibility: hidden;
    transform: translateY(-20px) scale(0.95);
    transition: all var(--transition-elastic);
    overflow: hidden;
}

.user-dropdown.active {
    opacity: 1;
    visibility: visible;
    transform: translateY(0) scale(1);
}

.dropdown-item {
    display: flex;
    align-items: center;
    gap: var(--space-md);
    padding: var(--space-md) var(--space-xl);
    color: var(--text-primary);
    text-decoration: none;
    transition: all var(--transition-smooth);
    border-bottom: 1px solid var(--border-color);
    position: relative;
    overflow: hidden;
}

.dropdown-item::before {
    content: '';
    position: absolute;
    left: -100%;
    top: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(139, 95, 191, 0.1), transparent);
    transition: left var(--transition-smooth);
}

.dropdown-item:hover::before {
    left: 100%;
}

.dropdown-item:last-child {
    border-bottom: none;
}

.dropdown-item:hover {
    background: var(--bg-hover);
    text-decoration: none;
    color: var(--text-primary);
    transform: translateX(5px);
    padding-left: calc(var(--space-xl) + 5px);
}

.dropdown-item.text-warning {
    color: var(--warning-color);
}

.dropdown-item.text-error {
    color: var(--error-color);
}

.dropdown-item.text-error:hover {
    background: rgba(255, 71, 87, 0.1);
}

.dropdown-divider {
    border: none;
    height: 1px;
    background: var(--border-color);
    margin: var(--space-sm) 0;
}

/* ==================== MODAL PRODUCT DETAILS ULTRA IMMERSIVE ==================== */

.product-details {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: var(--space-2xl);
    align-items: start;
}

.product-image-modal img {
    width: 100%;
    border-radius: var(--radius-xl);
    transition: transform var(--transition-smooth);
    box-shadow: var(--shadow-md);
}

.product-image-modal img:hover {
    transform: scale(1.05);
}

.product-image-modal .placeholder {
    aspect-ratio: 3/4;
    background: var(--bg-tertiary);
    border-radius: var(--radius-xl);
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--text-muted);
    font-size: 3rem;
    transition: all var(--transition-smooth);
}

.product-image-modal .placeholder:hover {
    background: var(--bg-hover);
    transform: scale(1.02);
}

.product-info-modal h4 {
    color: var(--text-secondary);
    margin-bottom: var(--space-xs);
    font-size: 1rem;
    animation: fadeInUp 0.4s 0.1s both;
}

.product-info-modal h3 {
    color: var(--text-primary);
    margin-bottom: var(--space-md);
    font-size: 1.5rem;
    animation: fadeInUp 0.4s 0.2s both;
}

.product-info-modal .price {
    font-size: 1.5rem;
    font-weight: 700;
    background: linear-gradient(135deg, var(--accent-color), var(--primary-color));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    margin-bottom: var(--space-md);
    animation: fadeInUp 0.4s 0.3s both, pulse 2s infinite;
}

.product-info-modal .description {
    color: var(--text-secondary);
    line-height: 1.8;
    margin-bottom: var(--space-xl);
    animation: fadeInUp 0.4s 0.4s both;
}

.product-meta {
    display: flex;
    gap: var(--space-xl);
    margin-bottom: var(--space-xl);
    flex-wrap: wrap;
}

.meta-item {
    display: flex;
    align-items: center;
    gap: var(--space-sm);
    color: var(--text-muted);
    font-size: 0.9rem;
    padding: var(--space-sm) var(--space-md);
    background: var(--bg-tertiary);
    border-radius: var(--radius-full);
    transition: all var(--transition-smooth);
    animation: fadeInUp 0.4s calc(0.5s + var(--delay, 0s)) both;
}

.meta-item:nth-child(1) { --delay: 0s; }
.meta-item:nth-child(2) { --delay: 0.1s; }
.meta-item:nth-child(3) { --delay: 0.2s; }

.meta-item:hover {
    background: var(--bg-hover);
    transform: translateY(-2px) scale(1.05);
    box-shadow: var(--shadow-sm);
}

.meta-item i {
    color: var(--primary-color);
    transition: transform var(--transition-fast);
}

.meta-item:hover i {
    transform: scale(1.2) rotate(5deg);
}

.product-actions-modal {
    display: flex;
    gap: var(--space-md);
    flex-wrap: wrap;
    animation: fadeInUp 0.4s 0.6s both;
}

/* ==================== ANIMATIONS AVANCÉES ==================== */

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

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

@keyframes float {
    0%, 100% {
        transform: translateY(0);
    }
    50% {
        transform: translateY(-10px);
    }
}

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

@keyframes shimmer {
    0% {
        background-position: -1000px 0;
    }
    100% {
        background-position: 1000px 0;
    }
}

.fade-in-up {
    animation: fadeInUp 0.6s ease-out;
}

.pulse {
    animation: pulse 2s infinite;
}

.float {
    animation: float 3s ease-in-out infinite;
}

/* ==================== LOADING STATES ULTRA SATISFAISANTS ==================== */

.loading {
    display: inline-block;
    width: 20px;
    height: 20px;
    border: 3px solid rgba(139, 95, 191, 0.2);
    border-top-color: var(--primary-color);
    border-radius: var(--radius-full);
    animation: rotate 0.8s linear infinite;
}

.skeleton {
    background: linear-gradient(90deg, var(--bg-tertiary) 25%, var(--bg-hover) 50%, var(--bg-tertiary) 75%);
    background-size: 200% 100%;
    animation: shimmer 1.5s infinite;
    border-radius: var(--radius-md);
}

.skeleton-text {
    height: 1em;
    margin-bottom: var(--space-sm);
}

.skeleton-title {
    height: 2em;
    width: 60%;
    margin-bottom: var(--space-md);
}

.skeleton-card {
    height: 200px;
    border-radius: var(--radius-xl);
}

/* ==================== BADGES ULTRA SMOOTH ==================== */

.badge {
    display: inline-flex;
    align-items: center;
    gap: var(--space-xs);
    padding: var(--space-xs) var(--space-md);
    font-size: 0.85rem;
    font-weight: 500;
    border-radius: var(--radius-full);
    transition: all var(--transition-smooth);
}

.badge:hover {
    transform: scale(1.05);
}

.badge-primary {
    background: rgba(139, 95, 191, 0.15);
    color: var(--primary-light);
    border: 1px solid rgba(139, 95, 191, 0.3);
}

.badge-success {
    background: rgba(78, 205, 196, 0.15);
    color: var(--success-color);
    border: 1px solid rgba(78, 205, 196, 0.3);
}

.badge-warning {
    background: rgba(255, 217, 61, 0.15);
    color: var(--warning-color);
    border: 1px solid rgba(255, 217, 61, 0.3);
}

.badge-error {
    background: rgba(255, 71, 87, 0.15);
    color: var(--error-color);
    border: 1px solid rgba(255, 71, 87, 0.3);
}

/* ==================== TOOLTIPS ULTRA FLUIDES ==================== */

.tooltip {
    position: relative;
    display: inline-block;
}

.tooltip::before {
    content: attr(data-tooltip);
    position: absolute;
    bottom: calc(100% + var(--space-sm));
    left: 50%;
    transform: translateX(-50%) translateY(-5px);
    padding: var(--space-sm) var(--space-md);
    background: var(--bg-card);
    color: var(--text-primary);
    font-size: 0.85rem;
    border-radius: var(--radius-md);
    white-space: nowrap;
    opacity: 0;
    visibility: hidden;
    transition: all var(--transition-smooth);
    pointer-events: none;
    box-shadow: var(--shadow-lg);
    border: 1px solid var(--border-color);
    z-index: 1000;
}

.tooltip::after {
    content: '';
    position: absolute;
    bottom: calc(100% - 5px);
    left: 50%;
    transform: translateX(-50%);
    border: 6px solid transparent;
    border-top-color: var(--bg-card);
    opacity: 0;
    visibility: hidden;
    transition: all var(--transition-smooth);
    pointer-events: none;
    z-index: 1000;
}

.tooltip:hover::before,
.tooltip:hover::after {
    opacity: 1;
    visibility: visible;
    transform: translateX(-50%) translateY(0);
}

/* ==================== PROGRESS BARS SATISFAISANTES ==================== */

.progress {
    width: 100%;
    height: 8px;
    background: var(--bg-tertiary);
    border-radius: var(--radius-full);
    overflow: hidden;
    position: relative;
    box-shadow: inset 0 2px 4px rgba(0, 0, 0, 0.3);
}

.progress-bar {
    height: 100%;
    background: linear-gradient(90deg, var(--primary-color), var(--secondary-color));
    border-radius: var(--radius-full);
    transition: width var(--transition-smooth);
    position: relative;
    overflow: hidden;
}

.progress-bar::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.3), transparent);
    animation: shimmer 2s infinite;
}

.progress-bar::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(255, 255, 255, 0.2);
    box-shadow: 0 0 10px rgba(139, 95, 191, 0.5);
}

/* ==================== TOGGLE SWITCH ULTRA SATISFAISANT ==================== */

.toggle {
    position: relative;
    display: inline-block;
    width: 60px;
    height: 32px;
}

.toggle input {
    opacity: 0;
    width: 0;
    height: 0;
}

.toggle-slider {
    position: absolute;
    cursor: pointer;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: var(--bg-tertiary);
    border: 2px solid var(--border-color);
    transition: all var(--transition-smooth);
    border-radius: var(--radius-full);
}

.toggle-slider::before {
    position: absolute;
    content: "";
    height: 24px;
    width: 24px;
    left: 2px;
    bottom: 2px;
    background: white;
    transition: all var(--transition-elastic);
    border-radius: var(--radius-full);
    box-shadow: var(--shadow-sm);
}

.toggle input:checked + .toggle-slider {
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
    border-color: var(--primary-color);
}

.toggle input:checked + .toggle-slider::before {
    transform: translateX(28px);
}

.toggle:hover .toggle-slider {
    box-shadow: var(--shadow-md);
    transform: scale(1.05);
}

.toggle input:checked + .toggle-slider::before {
    box-shadow: var(--shadow-md), 0 0 10px rgba(139, 95, 191, 0.5);
}

/* ==================== TABS ULTRA FLUIDES ==================== */

.tabs {
    display: flex;
    gap: var(--space-sm);
    border-bottom: 2px solid var(--border-color);
    margin-bottom: var(--space-xl);
    overflow-x: auto;
    padding-bottom: var(--space-sm);
}

.tab {
    padding: var(--space-md) var(--space-xl);
    background: transparent;
    border: none;
    color: var(--text-secondary);
    font-weight: 500;
    cursor: pointer;
    transition: all var(--transition-smooth);
    border-radius: var(--radius-lg) var(--radius-lg) 0 0;
    position: relative;
    white-space: nowrap;
}

.tab::after {
    content: '';
    position: absolute;
    bottom: -2px;
    left: 0;
    right: 0;
    height: 2px;
    background: linear-gradient(90deg, var(--primary-color), var(--secondary-color));
    transform: scaleX(0);
    transition: transform var(--transition-smooth);
}

.tab:hover {
    color: var(--text-primary);
    background: var(--bg-hover);
}

.tab.active {
    color: var(--primary-color);
    background: var(--bg-hover);
}

.tab.active::after {
    transform: scaleX(1);
}

/* ==================== OPTIMISATION MOBILE ULTRA CONFORTABLE ==================== */

/* Amélioration du touch pour mobile */
@media (hover: none) and (pointer: coarse) {
    /* Désactiver les effets hover sur mobile */
    .card:hover,
    .product-card:hover,
    .btn:hover,
    .nav-link:hover {
        transform: none;
    }
    
    /* Activer les effets au tap */
    .card:active,
    .product-card:active {
        transform: scale(0.98);
    }
    
    .btn:active {
        transform: scale(0.95);
    }
}

/* Zone de touch plus grande pour mobile */
@media (max-width: 768px) {
    /* Variables ajustées pour mobile */
    :root {
        --space-xl: 1.5rem;
        --space-2xl: 2rem;
        --radius-xl: 28px;
        --radius-2xl: 36px;
    }
    
    /* Touch targets minimum 44x44px */
    .btn,
    .nav-link,
    .like-btn,
    .search-btn,
    .modal-close,
    .dropdown-item {
        min-height: 44px;
        min-width: 44px;
    }
    
    /* Espacement comfortable pour les pouces */
    .container {
        padding: 0 var(--space-lg);
    }
    
    /* Header mobile friendly */
    .header {
        position: sticky;
        top: 0;
        z-index: 100;
    }
    
    .header-content {
        flex-direction: column;
        gap: var(--space-md);
        padding: var(--space-lg) 0;
    }
    
    /* Logo centré sur mobile */
    .logo {
        font-size: 1.75rem;
        text-align: center;
    }
    
    /* Navigation mobile optimisée */
    .nav {
        width: 100%;
        justify-content: center;
    }
    
    .nav-menu {
        flex-wrap: wrap;
        justify-content: center;
        gap: var(--space-sm);
        width: 100%;
    }
    
    .nav-link {
        padding: var(--space-md) var(--space-lg);
        flex: 1 1 auto;
        text-align: center;
        min-width: 100px;
    }
    
    /* Grille produits mobile friendly */
    .products-grid {
        grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
        gap: var(--space-md);
        padding: 0 var(--space-xs);
    }
    
    /* Cards plus compactes mais touchables */
    .product-card {
        border-radius: var(--radius-xl);
    }
    
    .product-info {
        padding: var(--space-lg);
    }
    
    .product-name {
        font-size: 0.95rem;
    }
    
    .product-price {
        font-size: 1.1rem;
    }
    
    /* Boutons mobile friendly */
    .btn {
        padding: var(--space-md) var(--space-xl);
        font-size: 1rem;
        min-height: 48px;
        border-radius: var(--radius-xl);
    }
    
    .btn-lg {
        padding: var(--space-lg) var(--space-2xl);
        font-size: 1.1rem;
        min-height: 56px;
    }
    
    .btn-sm {
        padding: var(--space-sm) var(--space-lg);
        font-size: 0.9rem;
        min-height: 40px;
    }
    
    /* Like button plus grand */
    .like-btn {
        padding: var(--space-md);
        min-width: 48px;
        min-height: 48px;
    }
    
    /* Formulaires mobile optimisés */
    .form-control {
        padding: var(--space-lg);
        font-size: 16px; /* Évite le zoom sur iOS */
        min-height: 48px;
        border-radius: var(--radius-lg);
    }
    
    .form-select {
        padding: var(--space-lg);
        font-size: 16px;
        min-height: 48px;
    }
    
    .form-textarea {
        min-height: 150px;
        font-size: 16px;
    }
    
    /* Search bar mobile friendly */
    .search-bar {
        max-width: 100%;
        margin: var(--space-md) 0;
    }
    
    .search-input {
        padding: var(--space-lg) var(--space-xl);
        padding-right: 60px;
        font-size: 16px;
        min-height: 52px;
    }
    
    .search-btn {
        width: 48px;
        height: 48px;
        right: 2px;
        top: 2px;
        transform: none;
    }
    
    .search-btn:active {
        transform: scale(0.95);
    }
    
    /* Filtres mobile friendly */
    .filters {
        flex-direction: column;
        align-items: stretch;
        padding: var(--space-lg);
        gap: var(--space-md);
    }
    
    .filter-group {
        justify-content: space-between;
        width: 100%;
        gap: var(--space-md);
    }
    
    .filter-select {
        min-width: auto;
        flex: 1;
        font-size: 16px;
    }
    
    /* Modal mobile optimisé */
    .modal-content {
        width: 95%;
        max-width: 95vw;
        max-height: 95vh;
        margin: var(--space-sm);
        border-radius: var(--radius-xl);
    }
    
    .modal-header {
        padding: var(--space-lg);
        position: sticky;
        top: 0;
        background: var(--bg-card);
        z-index: 10;
    }
    
    .modal-close {
        min-width: 44px;
        min-height: 44px;
        font-size: 1.75rem;
    }
    
    .modal-body {
        padding: var(--space-lg);
    }
    
    /* Product details mobile */
    .product-details {
        grid-template-columns: 1fr;
        gap: var(--space-lg);
    }
    
    .product-actions-modal {
        flex-direction: column;
        gap: var(--space-md);
    }
    
    .product-actions-modal .btn {
        width: 100%;
    }
    
    /* Dropdown mobile friendly */
    .user-dropdown {
        left: 0;
        right: auto;
        min-width: 240px;
        max-width: 90vw;
    }
    
    .dropdown-item {
        padding: var(--space-lg) var(--space-xl);
        min-height: 52px;
        font-size: 1rem;
    }
    
    /* Cards mobile */
    .card {
        border-radius: var(--radius-xl);
    }
    
    .card-header,
    .card-body,
    .card-footer {
        padding: var(--space-lg);
    }
    
    /* Typography mobile */
    h1 { 
        font-size: 1.875rem;
        line-height: 1.3;
    }
    h2 { 
        font-size: 1.625rem;
        line-height: 1.3;
    }
    h3 { 
        font-size: 1.375rem;
        line-height: 1.4;
    }
    h4 {
        font-size: 1.125rem;
    }
    
    p {
        font-size: 1rem;
        line-height: 1.7;
    }
    
    /* Tabs mobile avec scroll horizontal */
    .tabs {
        gap: var(--space-sm);
        overflow-x: auto;
        overflow-y: hidden;
        -webkit-overflow-scrolling: touch;
        scroll-snap-type: x mandatory;
        scrollbar-width: none;
        padding-bottom: var(--space-md);
    }
    
    .tabs::-webkit-scrollbar {
        display: none;
    }
    
    .tab {
        padding: var(--space-md) var(--space-lg);
        font-size: 0.95rem;
        min-width: 120px;
        scroll-snap-align: start;
        flex-shrink: 0;
    }
    
    /* Toggle mobile */
    .toggle {
        width: 64px;
        height: 36px;
    }
    
    .toggle-slider::before {
        height: 28px;
        width: 28px;
    }
    
    .toggle input:checked + .toggle-slider::before {
        transform: translateX(28px);
    }
    
    /* Alerts mobile */
    .alert {
        padding: var(--space-lg);
        border-radius: var(--radius-lg);
        font-size: 0.95rem;
    }
    
    /* Badges mobile */
    .badge {
        padding: var(--space-sm) var(--space-md);
        font-size: 0.875rem;
    }
    
    /* Meta items mobile */
    .product-meta {
        gap: var(--space-md);
    }
    
    .meta-item {
        padding: var(--space-sm) var(--space-md);
        font-size: 0.85rem;
        flex: 1 1 auto;
        justify-content: center;
    }
}

/* Optimisation pour petits mobiles */
@media (max-width: 480px) {
    :root {
        --space-lg: 1rem;
        --space-xl: 1.25rem;
        --space-2xl: 1.5rem;
    }
    
    /* Grille produits une colonne */
    .products-grid {
        grid-template-columns: 1fr;
        gap: var(--space-lg);
        padding: 0;
    }
    
    /* Cards pleine largeur */
    .product-card {
        max-width: 100%;
    }
    
    /* Header compact */
    .header-content {
        padding: var(--space-md) 0;
    }
    
    .logo {
        font-size: 1.5rem;
    }
    
    /* Navigation en grille */
    .nav-menu {
        display: grid;
        grid-template-columns: repeat(2, 1fr);
        gap: var(--space-sm);
        width: 100%;
    }
    
    .nav-link {
        padding: var(--space-md);
        font-size: 0.9rem;
    }
    
    /* Boutons full width sur petits écrans */
    .btn-block,
    .product-actions-modal .btn {
        width: 100%;
        justify-content: center;
    }
    
    /* Typography compacte */
    h1 { font-size: 1.625rem; }
    h2 { font-size: 1.375rem; }
    h3 { font-size: 1.25rem; }
    
    /* Modal plein écran sur petits mobiles */
    .modal-content {
        width: 100%;
        height: 100%;
        max-height: 100vh;
        border-radius: 0;
        margin: 0;
    }
    
    /* Filtres simplifiés */
    .filter-group {
        flex-direction: column;
        align-items: stretch;
    }
    
    .filter-label {
        margin-bottom: var(--space-xs);
    }
    
    .filter-select {
        width: 100%;
    }
    
    /* Search full width */
    .search-bar {
        width: 100%;
    }
    
    /* Product info toujours visible sur petits écrans */
    .product-info {
        position: static;
        transform: none;
        background: var(--bg-card);
        margin-top: calc(-1 * var(--space-lg));
        border-radius: var(--radius-xl) var(--radius-xl) 0 0;
        padding: var(--space-lg);
    }
    
    .product-overlay {
        display: none;
    }
    
    .product-image img {
        border-radius: var(--radius-xl) var(--radius-xl) 0 0;
    }
}

/* Optimisation pour tablettes en portrait */
@media (min-width: 481px) and (max-width: 768px) {
    .products-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: var(--space-lg);
    }
}

/* Optimisation pour tablettes en paysage */
@media (min-width: 769px) and (max-width: 1024px) {
    .products-grid {
        grid-template-columns: repeat(3, 1fr);
        gap: var(--space-xl);
    }
    
    .container {
        max-width: 960px;
    }
}

/* Support des notch et safe areas iOS */
@supports (padding: max(0px)) {
    .header,
    .container,
    .modal-content {
        padding-left: max(var(--space-lg), env(safe-area-inset-left));
        padding-right: max(var(--space-lg), env(safe-area-inset-right));
    }
    
    .header {
        padding-top: max(var(--space-md), env(safe-area-inset-top));
    }
    
    .modal-content {
        padding-bottom: max(var(--space-lg), env(safe-area-inset-bottom));
    }
}

/* Optimisation du scroll mobile */
@media (max-width: 768px) {
    body {
        -webkit-overflow-scrolling: touch;
        overscroll-behavior-y: none;
    }
    
    /* Scroll snap pour les grilles */
    .products-grid {
        scroll-snap-type: y proximity;
    }
    
    .product-card {
        scroll-snap-align: start;
    }
}

/* Gestion du clavier virtuel mobile */
@media (max-width: 768px) {
    .form-control:focus {
        position: relative;
        z-index: 10;
    }
    
    /* Empêche le zoom sur focus pour iOS */
    input[type="text"],
    input[type="email"],
    input[type="password"],
    input[type="search"],
    select,
    textarea {
        font-size: 16px !important;
    }
}

/* ==================== SCROLLBAR ULTRA SMOOTH ==================== */

::-webkit-scrollbar {
    width: 10px;
    height: 10px;
}

::-webkit-scrollbar-track {
    background: var(--bg-secondary);
    border-radius: var(--radius-sm);
}

::-webkit-scrollbar-thumb {
    background: linear-gradient(180deg, var(--primary-color), var(--secondary-color));
    border-radius: var(--radius-full);
    border: 2px solid var(--bg-secondary);
    transition: background var(--transition-fast);
}

::-webkit-scrollbar-thumb:hover {
    background: linear-gradient(180deg, var(--primary-light), var(--secondary-color));
    box-shadow: var(--shadow-glow);
}

/* Firefox */
* {
    scrollbar-width: thin;
    scrollbar-color: var(--primary-color) var(--bg-secondary);
}

/* ==================== UTILITAIRES AVANCÉS ==================== */

.backdrop-blur {
    backdrop-filter: blur(20px);
}

.glass {
    background: var(--bg-glass);
    backdrop-filter: blur(20px) saturate(180%);
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.gradient-text {
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.hover-lift {
    transition: transform var(--transition-smooth);
}

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

.hover-glow {
    transition: box-shadow var(--transition-smooth);
}

.hover-glow:hover {
    box-shadow: var(--shadow-glow);
}

/* ==================== PRÉFÉRENCE REDUCED MOTION ==================== */

@media (prefers-reduced-motion: reduce) {
    *,
    *::before,
    *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
}