/**
 * Styles principaux de l'application UMOA
 * Design System unifié Web ↔ Mobile
 * 
 * @package UMOA
 * @version 2.0
 */

/* Import Google Fonts - Poppins et Inter */
@import url('https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700&family=Poppins:wght@400;500;600;700&display=swap');

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

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

:root {
    /* ========== COULEURS - Dégradés Bleu ========== */
    --blue-light: #6BB6FF;
    --blue-medium: #4A90E2;
    --blue-deep: #1E3A8A;
    --blue-darker: #0F172A;
    
    /* Couleurs sémantiques */
    --success-color: #10B981;
    --danger-color: #EF4444;
    --warning-color: #F59E0B;
    --info-color: #3B82F6;
    
    /* Gris neutres */
    --gray-50: #F9FAFB;
    --gray-100: #F3F4F6;
    --gray-200: #E5E7EB;
    --gray-300: #D1D5DB;
    --gray-400: #9CA3AF;
    --gray-500: #6B7280;
    --gray-600: #4B5563;
    --gray-700: #374151;
    --gray-800: #1F2937;
    --gray-900: #111827;
    
    --white: #FFFFFF;
    --black: #000000;
    
    /* Couleurs de texte */
    --text-color: var(--gray-900);
    --text-light: var(--gray-600);
    --text-muted: var(--gray-500);
    
    /* Couleurs de bordure */
    --border-color: var(--gray-200);
    --border-color-light: var(--gray-300);
    
    /* Backgrounds */
    --light-color: var(--gray-50);
    --surface-color: var(--white);
    
    /* Couleur maître UMOA - Design System Unifié */
    --umoa-violet: #7B2CBF; /* Violet UMOA - Couleur maître unique */
    --umoa-violet-light: #9D4EDD; /* Violet UMOA clair */
    --umoa-violet-dark: #5A189A; /* Violet UMOA foncé */
    
    /* Dégradés remplacés par couleurs unies (pour compatibilité) */
    --gradient-primary: #7B2CBF; /* Violet UMOA - couleur unie */
    --gradient-secondary: #7B2CBF; /* Violet UMOA - couleur unie */
    --gradient-elevation: #F8F9FA; /* Fond blanc légèrement gris */
    
    /* Typographie */
    --font-family: 'Poppins', system-ui, -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    
    /* Spacing (système 4px) */
    --spacing-0: 0px;
    --spacing-1: 4px;
    --spacing-2: 8px;
    --spacing-3: 12px;
    --spacing-4: 16px;
    --spacing-5: 20px;
    --spacing-6: 24px;
    --spacing-8: 32px;
    --spacing-10: 40px;
    --spacing-12: 48px;
    --spacing-16: 64px;
    --spacing-20: 80px;
    
    /* Border Radius */
    --radius-xs: 4px;
    --radius-sm: 8px;
    --radius-md: 12px;
    --radius-lg: 16px;
    --radius-xl: 20px;
    --radius-2xl: 24px;
    --radius-full: 9999px;
    
    /* Durées d'animation */
    --duration-fast: 150ms;
    --duration-normal: 300ms;
    --duration-slow: 500ms;
    
    /* Courbes d'animation */
    --curve-ease-out: cubic-bezier(0.0, 0, 0.2, 1);
    --curve-ease-in: cubic-bezier(0.4, 0, 1, 1);
    --curve-ease-in-out: cubic-bezier(0.4, 0, 0.2, 1);
    --curve-spring: cubic-bezier(0.33, 1, 0.68, 1);
}

/* ============================================================================
   EMPÊCHER LE DÉFILEMENT HORIZONTAL (HORIZONTAL SCROLL FIX)
   ============================================================================ */

html, body {
    overflow-x: hidden; /* Empêche physiquement le défilement horizontal */
    width: 100%;
    max-width: 100vw;
    position: relative;
    margin: 0;
    padding: 0;
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: var(--font-family);
    color: var(--text-color);
    line-height: 1.5;
    background-color: var(--background-off-white, var(--light-color)); /* Premium: Blanc cassé #F8F9FA */
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    word-wrap: break-word; /* Empêche les longs mots/liens de déborder */
    overflow-wrap: break-word; /* Support moderne pour word-wrap */
    /* Appliquer les règles du main-wrapper au body */
    display: flex;
    flex-direction: column;
}

/* Wrapper principal pour contenir tout le contenu */
.main-wrapper {
    display: flex;
    flex-direction: column;
    width: 100%;
    max-width: 100vw;
    overflow-x: hidden;
    position: relative;
}

/* Images responsive - Empêche le défilement horizontal */
img, video, iframe {
    max-width: 100%;
    height: auto;
}

/* Tables et éléments qui pourraient déborder */
table, div, section, article, aside, header, footer, nav, main {
    max-width: 100%;
}

/* Prévenir le débordement des tableaux */
table {
    width: 100%;
    max-width: 100%;
    table-layout: auto;
}

/* Prévenir le débordement des éléments flex */
.flex, .flex-row, .flex-column, .d-flex {
    min-width: 0;
}

.container {
    max-width: 1200px;
    width: 100%;
    margin: 0 auto;
    padding: 0 16px; /* Padding standardisé mobile-first */
    box-sizing: border-box; /* S'assure que le padding ne fait pas grandir le conteneur */
}

/* Padding latéral standardisé sur toutes les pages */
@media (max-width: 768px) {
    .container {
        padding-left: 16px;
        padding-right: 16px;
    }
    
    main,
    section,
    article {
        padding-left: 16px;
        padding-right: 16px;
    }
}

@media (min-width: 769px) {
    .container {
        padding-left: 20px;
        padding-right: 20px;
    }
}

/* ============================================================================
   NAVIGATION - Style Amazon avec Bleu UMOA
   ============================================================================ */

.navbar {
    background-color: #131921;
    border-bottom: none;
    padding: 0;
    position: sticky;
    top: 0;
    z-index: 1000;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
    min-height: clamp(50px, 8vw, 60px);
    height: auto;
}

.navbar .container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    max-width: 100%;
    padding: 0 clamp(12px, 2vw, 20px);
    height: clamp(50px, 8vw, 60px);
    gap: clamp(4px, 1vw, 12px);
    overflow-x: auto;
    overflow-y: hidden;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
    -ms-overflow-style: none;
}

.navbar .container::-webkit-scrollbar {
    display: none;
}

/* Logo/Brand - Style Amazon */
.navbar-brand {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0 clamp(8px, 1.5vw, 16px);
    min-width: auto;
    max-width: clamp(120px, 20vw, 200px);
    width: auto;
    height: 100%;
    background-color: transparent;
    transition: background-color 0.2s ease;
    overflow: hidden;
    position: relative;
    flex-shrink: 0;
}

.navbar-brand:hover {
    background-color: rgba(255, 255, 255, 0.05);
    border-radius: 2px;
}

.navbar-brand a {
    text-decoration: none;
    display: flex;
    align-items: center;
    justify-content: center;
    height: 100%;
    width: 100%;
    padding: 0;
    position: relative;
}

.navbar-logo {
    height: clamp(24px, 5vw, 36px) !important;
    width: auto !important;
    max-width: clamp(100px, 18vw, 140px) !important;
    max-height: clamp(24px, 5vw, 36px) !important;
    object-fit: contain;
    object-position: center;
    display: block;
    margin: 0 auto;
    position: relative;
    top: 0 !important;
    left: 0 !important;
    transition: opacity 0.2s ease, transform 0.2s ease;
}

.navbar-brand:hover .navbar-logo {
    opacity: 0.9;
    transform: scale(1.02);
}

/* Fallback pour le texte si l'image ne charge pas */
.navbar-brand h1 {
    font-size: 1.5rem;
    color: #FFFFFF;
    font-weight: 700;
    letter-spacing: -0.5px;
    margin: 0;
    transition: color 0.2s ease;
    display: none; /* Caché par défaut, visible seulement si l'image ne charge pas */
}

.navbar-brand:hover h1 {
    color: var(--blue-light);
}

/* Ensure navbar-desktop has proper constraints */
.navbar-desktop .navbar-brand {
    overflow: hidden;
    position: relative;
}

.navbar-desktop .navbar-logo {
    position: relative !important;
    top: 0 !important;
    left: 0 !important;
    transform: none !important;
}

.navbar-desktop .navbar-brand:hover .navbar-logo {
    transform: scale(1.02) !important;
}

/* Menu de navigation - Style Amazon */
.navbar-menu {
    display: flex;
    gap: clamp(2px, 0.5vw, 8px);
    align-items: center;
    height: 100%;
    flex: 1;
    justify-content: flex-start;
    padding-left: clamp(4px, 1vw, 12px);
    overflow-x: auto;
    overflow-y: hidden;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
    -ms-overflow-style: none;
    min-width: 0;
}

.navbar-menu::-webkit-scrollbar {
    display: none;
}

/* Liens de navigation uniformes - Style Amazon */
.nav-link {
    text-decoration: none;
    color: #FFFFFF;
    font-weight: 500;
    font-size: clamp(0.75rem, 1.5vw, 0.875rem);
    transition: all 0.15s ease;
    padding: clamp(4px, 1vw, 8px) clamp(6px, 1.2vw, 12px);
    border-radius: 2px;
    position: relative;
    display: inline-flex;
    align-items: center;
    gap: clamp(4px, 0.8vw, 8px);
    white-space: nowrap;
    height: 100%;
    min-height: clamp(32px, 6vw, 40px);
    border: 1px solid transparent;
    flex-shrink: 0;
}

.nav-link:hover {
    color: #FFFFFF;
    background-color: rgba(255, 255, 255, 0.1);
    border-color: rgba(255, 255, 255, 0.2);
}

.nav-link.active {
    color: #FFFFFF;
    background-color: rgba(74, 144, 226, 0.2);
    border-color: var(--blue-medium);
}

/* Supprimer l'effet ::after pour un style plus propre */
.nav-link::after {
    display: none;
}

/* Icônes dans les liens */
.nav-link svg {
    flex-shrink: 0;
    width: clamp(16px, 3vw, 20px);
    height: clamp(16px, 3vw, 20px);
    stroke-width: 2;
}

/* Chat Icon avec badge */
.chat-icon {
    display: flex;
    align-items: center;
    gap: 6px;
}

.chat-label-wrapper {
    position: relative;
    display: inline-block;
}

.chat-label {
    display: inline-block;
    font-size: clamp(0.75rem, 1.5vw, 0.875rem);
}

.chat-badge {
    position: absolute;
    top: clamp(-6px, -1.2vw, -8px);
    right: clamp(-10px, -2vw, -12px);
    background: #FF6B35;
    color: white;
    border-radius: clamp(8px, 1.5vw, 10px);
    min-width: clamp(14px, 2.8vw, 18px);
    height: clamp(14px, 2.8vw, 18px);
    font-size: clamp(0.6rem, 1.2vw, 0.625rem);
    font-weight: bold;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0 clamp(3px, 0.6vw, 5px);
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.3);
    z-index: 10;
    border: clamp(1.5px, 0.3vw, 2px) solid #131921;
}

/* Bouton primaire (Inscription) - Style Amazon avec Bleu UMOA */
.nav-link.btn-primary {
    background: #7B2CBF;
    color: #FFFFFF;
    border: 1px solid #1E3A8A;
    padding: clamp(4px, 1vw, 6px) clamp(10px, 2vw, 16px);
    font-weight: 600;
    font-size: clamp(0.75rem, 1.5vw, 0.875rem);
    margin-left: clamp(4px, 1vw, 12px);
    border-radius: 3px;
    width: auto;
    min-width: auto;
    max-width: none;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    white-space: nowrap;
    flex-shrink: 0;
    height: auto;
    min-height: clamp(32px, 6vw, 40px);
}

.nav-link.btn-primary:hover {
    background: #9D4EDD; /* Violet UMOA clair - couleur unie */
    border-color: #7B2CBF;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
    transform: none;
}

/* Surcharger les styles généraux de .btn pour les nav-links */
.navbar-menu .nav-link.btn-primary {
    width: auto !important;
    max-width: none !important;
    flex: 0 0 auto !important;
}

/* Sélecteur de langue - Desktop */
.language-selector-wrapper {
    position: relative;
    display: inline-flex;
    align-items: center;
    margin-left: clamp(4px, 1vw, 12px);
    z-index: 1000;
    flex-shrink: 0;
}

.language-selector-btn {
    display: flex;
    align-items: center;
    gap: clamp(3px, 0.6vw, 6px);
    padding: clamp(4px, 1vw, 6px) clamp(6px, 1.2vw, 12px);
    background: rgba(255, 255, 255, 0.08);
    border: 1px solid rgba(255, 255, 255, 0.15);
    color: #FFFFFF;
    font-weight: 600;
    font-size: clamp(0.7rem, 1.4vw, 0.8125rem);
    cursor: pointer;
    border-radius: 4px;
    transition: all 0.2s ease;
    font-family: var(--font-family);
    min-height: clamp(28px, 5.5vw, 36px);
    line-height: 1;
    pointer-events: auto;
    position: relative;
    z-index: 1;
    white-space: nowrap;
    flex-shrink: 0;
    -webkit-tap-highlight-color: rgba(255, 255, 255, 0.1);
}

.language-selector-btn:hover {
    background: rgba(255, 255, 255, 0.15);
    border-color: rgba(255, 255, 255, 0.25);
    transform: translateY(-1px);
}

.language-selector-btn:active {
    transform: translateY(0);
    background: rgba(255, 255, 255, 0.2);
    border-color: rgba(255, 255, 255, 0.35);
}

.language-selector-btn:focus {
    outline: 2px solid rgba(255, 255, 255, 0.3);
    outline-offset: 2px;
}

.language-selector-btn:focus:not(:focus-visible) {
    outline: none;
}

.language-selector-btn .language-code {
    font-size: clamp(0.7rem, 1.4vw, 0.8125rem);
    font-weight: 600;
    letter-spacing: 0.5px;
    display: inline-block;
    flex-shrink: 0;
}

.language-selector-btn .language-flag {
    font-size: clamp(0.9rem, 1.8vw, 1.1rem);
    line-height: 1;
    display: inline-block;
    flex-shrink: 0;
}

.language-selector-btn .language-arrow {
    width: clamp(10px, 2vw, 12px);
    height: clamp(10px, 2vw, 12px);
    transition: transform 0.2s ease;
    flex-shrink: 0;
    margin-left: clamp(1px, 0.3vw, 3px);
    opacity: 0.8;
}

.language-selector-wrapper.active .language-arrow {
    transform: rotate(180deg);
}

.language-selector-wrapper.active .language-selector-btn {
    background: rgba(255, 255, 255, 0.18);
    border-color: rgba(255, 255, 255, 0.3);
}

.language-dropdown {
    position: absolute;
    top: calc(100% + 6px);
    right: 0;
    background: #FFFFFF;
    border: 1px solid var(--border-color);
    border-radius: 8px;
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.12), 0 2px 4px rgba(0, 0, 0, 0.08);
    min-width: 180px;
    z-index: 1001;
    overflow: hidden;
    animation: languageDropdownFadeIn 0.2s ease;
    pointer-events: auto;
}

@keyframes languageDropdownFadeIn {
    from {
        opacity: 0;
        transform: translateY(-8px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.language-option {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 11px 14px;
    color: var(--text-color);
    text-decoration: none;
    transition: all 0.15s ease;
    font-size: 0.875rem;
    border-bottom: 1px solid var(--gray-100);
}

.language-option:last-child {
    border-bottom: none;
}

.language-option:hover {
    background-color: var(--gray-50);
    padding-left: 16px;
}

.language-option.active {
    background: #7B2CBF; /* Violet UMOA - couleur unie */
    color: #FFFFFF;
    font-weight: 600;
}

.language-option.active:hover {
    background: #9D4EDD; /* Violet UMOA clair - couleur unie */
    padding-left: 14px;
}

.language-option .language-code {
    font-size: 0.8125rem;
    font-weight: 700;
    letter-spacing: 0.5px;
    min-width: 28px;
    text-align: left;
}

.language-option .language-flag {
    font-size: 1.3rem;
    line-height: 1;
    flex-shrink: 0;
    width: 24px;
    text-align: center;
}

.language-option .language-text {
    flex: 1;
    font-weight: 500;
}

.language-option.active .language-text {
    font-weight: 600;
}

.language-option .language-check {
    width: 18px;
    height: 18px;
    flex-shrink: 0;
    color: currentColor;
    stroke-width: 2.5;
}

/* Sélecteur de langue - Mobile */
.mobile-language-selector {
    padding: 8px 12px;
    border-bottom: 1px solid var(--border-color);
    margin-bottom: 4px;
    background: transparent;
}

.mobile-language-current {
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 6px 0;
    font-weight: 500;
    color: var(--text-color);
    font-size: 0.875rem;
}

.mobile-language-current .language-flag {
    font-size: 1.1rem;
    line-height: 1;
    flex-shrink: 0;
}

.mobile-language-options {
    display: flex;
    flex-direction: column;
    gap: 2px;
    margin-top: 4px;
}

.mobile-language-option {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 8px 10px;
    color: var(--text-color);
    text-decoration: none;
    border-radius: 6px;
    transition: all 0.15s ease;
    font-size: 0.8125rem;
    cursor: pointer;
    -webkit-tap-highlight-color: rgba(0, 0, 0, 0.05);
}

.mobile-language-option:hover,
.mobile-language-option:active {
    background-color: var(--gray-100);
    transform: translateX(2px);
}

.mobile-language-option .language-flag {
    font-size: 1.1rem;
    line-height: 1;
    flex-shrink: 0;
}

.mobile-language-option .language-text {
    flex: 1;
    font-weight: 500;
}

.mobile-language-option .language-text {
    flex: 1;
}

.mobile-language-option .language-check {
    width: 16px;
    height: 16px;
    flex-shrink: 0;
    color: var(--blue-medium);
}

/* Wrapper pour les éléments avec badges */
.cart-icon-wrapper,
.notification-wrapper,
.chat-wrapper {
    position: relative;
    display: inline-flex;
    align-items: center;
    height: 100%;
}

/* Styles pour l'icône panier dans la navbar */
.cart-icon-wrapper {
    position: relative;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: auto;
    min-width: auto;
    height: 100%;
    flex-shrink: 0;
    pointer-events: auto;
    z-index: 10;
}

/* Styles pour l'icône notifications dans la navbar */
.notification-wrapper {
    position: relative;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: auto;
    min-width: auto;
    height: 100%;
    flex-shrink: 0;
    pointer-events: auto;
    z-index: 10;
    /* S'assurer que le wrapper ne limite pas la largeur du dropdown */
    overflow: visible;
}

.cart-link {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    width: 100%;
    height: 100%;
    min-width: auto;
    min-height: 40px;
    padding: 8px 10px;
    text-decoration: none;
    color: #FFFFFF;
    transition: all 0.15s ease;
    cursor: pointer;
    z-index: 11;
    pointer-events: auto;
    border-radius: 2px;
    border: 1px solid transparent;
    font-size: 0.875rem;
    font-weight: 500;
}

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

.cart-link svg {
    width: 20px;
    height: 20px;
    flex-shrink: 0;
}

.cart-text {
    font-size: 0.875rem;
    font-weight: 500;
    white-space: nowrap;
}

/* Assurer que le lien est cliquable */
.cart-icon-wrapper a.cart-link,
.cart-icon-wrapper .cart-link {
    pointer-events: auto !important;
}

/* Empêcher le pseudo-élément ::after de nav-link d'interférer */
.cart-link::after {
    display: none !important;
}

.cart-badge {
    position: absolute;
    top: 4px;
    right: 4px;
    background: #FF6B35;
    color: white;
    border-radius: 10px;
    min-width: 18px;
    height: 18px;
    font-size: 10px;
    font-weight: bold;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0 5px;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.3);
    z-index: 2;
    pointer-events: none;
    border: 2px solid #131921;
}

/* Responsive pour le panier */
@media (max-width: 768px) {
    .cart-link {
        padding: 6px 8px;
        gap: 4px;
        min-height: 36px;
    }
    
    .cart-link svg {
        width: 18px;
        height: 18px;
    }
    
    .cart-text {
        display: none;
    }
    
    .cart-badge {
        width: 16px;
        height: 16px;
        font-size: 9px;
        min-width: 16px;
        padding: 0 4px;
        top: 2px;
        right: 2px;
    }
}

/* Amélioration du style pour les liens avec texte et icônes */
.nav-link span:not(.chat-label):not(.cart-text):not(.chat-badge):not(.cart-badge):not(.notification-badge):not(.chat-label-wrapper) {
    display: inline-block;
    line-height: 1.4;
}

/* Style pour le texte dans les nav-links après une icône */
.nav-link:has(svg) > span:not(.chat-label-wrapper):not(.chat-badge):not(.cart-badge):not(.notification-badge) {
    margin-left: 4px;
}

/* Alignement vertical pour tous les éléments */
.navbar-menu > * {
    display: flex;
    align-items: center;
}

/* Amélioration de l'espacement entre les éléments du menu */
.navbar-menu > .nav-link:not(:last-child),
.navbar-menu > div:not(:last-child) {
    margin-right: 2px;
}

/* Responsive - Media Queries pour différentes tailles d'écran */
@media (max-width: 768px) {
    /* Navigation desktop cachée sur mobile */
    .navbar-desktop {
        display: none !important;
    }
}

/* Styles responsives pour la navbar desktop sur différentes tailles */
@media (min-width: 769px) and (max-width: 1024px) {
    .navbar .container {
        padding: 0 clamp(12px, 1.5vw, 16px);
        gap: clamp(4px, 0.8vw, 8px);
    }
    
    .navbar-menu {
        gap: clamp(2px, 0.4vw, 6px);
    }
    
    .nav-link {
        padding: clamp(5px, 0.8vw, 7px) clamp(7px, 1vw, 10px);
        font-size: clamp(0.7rem, 1.3vw, 0.8125rem);
    }
    
    .nav-link.btn-primary {
        padding: clamp(5px, 0.8vw, 6px) clamp(8px, 1.5vw, 12px);
        font-size: clamp(0.7rem, 1.3vw, 0.8125rem);
    }
}

@media (min-width: 1025px) and (max-width: 1280px) {
    .navbar .container {
        padding: 0 clamp(16px, 1.8vw, 20px);
    }
}

@media (min-width: 1281px) {
    .navbar .container {
        padding: 0 20px;
    }
}

/* Gestion du débordement horizontal sur petits écrans desktop */
@media (min-width: 769px) and (max-width: 1200px) {
    .navbar-menu {
        overflow-x: auto;
        overflow-y: hidden;
        -webkit-overflow-scrolling: touch;
        scrollbar-width: thin;
        scrollbar-color: rgba(255, 255, 255, 0.3) transparent;
    }
    
    .navbar-menu::-webkit-scrollbar {
        height: 4px;
        display: block;
    }
    
    .navbar-menu::-webkit-scrollbar-track {
        background: transparent;
    }
    
    .navbar-menu::-webkit-scrollbar-thumb {
        background: rgba(255, 255, 255, 0.3);
        border-radius: 2px;
    }
    
    .navbar-menu::-webkit-scrollbar-thumb:hover {
        background: rgba(255, 255, 255, 0.5);
    }
}

/* Très petits écrans desktop (tablettes en mode paysage) */
@media (min-width: 769px) and (max-width: 900px) {
    .navbar-brand {
        max-width: clamp(100px, 15vw, 150px);
    }
    
    .navbar-logo {
        max-width: clamp(90px, 14vw, 120px) !important;
    }
    
    .nav-link {
        font-size: clamp(0.7rem, 1.2vw, 0.8rem);
        padding: clamp(4px, 0.7vw, 6px) clamp(5px, 0.9vw, 8px);
    }
    
    .nav-link svg {
        width: clamp(14px, 2.5vw, 18px);
        height: clamp(14px, 2.5vw, 18px);
    }
    
    .language-selector-btn {
        padding: clamp(3px, 0.6vw, 5px) clamp(5px, 1vw, 8px);
        font-size: clamp(0.65rem, 1.2vw, 0.75rem);
    }
}

/* Ancien code mobile (gardé pour compatibilité mais navbar-desktop est cachée) */
@media (max-width: 768px) {
    .navbar {
        min-height: 50px;
    }
    
    .navbar .container {
        height: 50px;
        padding: 0 16px;
    }
    
    .navbar-brand {
        min-width: auto;
        max-width: 120px;
        width: auto;
        padding: 0 8px;
        flex-shrink: 0;
        overflow: hidden;
    }
    
    .navbar-logo {
        height: 28px !important;
        max-width: 100px !important;
        max-height: 28px !important;
        width: auto !important;
        top: 0 !important;
        left: 0 !important;
    }
    
    .navbar-brand h1 {
        font-size: 1.125rem;
        display: none;
    }
    
    .navbar-menu {
        gap: 0;
        padding-left: 4px;
        overflow-x: auto;
        overflow-y: hidden;
        -webkit-overflow-scrolling: touch;
        scrollbar-width: none;
        -ms-overflow-style: none;
        flex: 1;
        min-width: 0;
    }
    
    /* Sous-menus - Désactiver hover, utiliser clic */
    .navbar-menu .nav-link.has-submenu:hover .submenu {
        display: none; /* Pas de hover sur mobile */
    }
    
    .navbar-menu .nav-link.has-submenu.active .submenu {
        display: block;
        position: absolute;
        top: 100%;
        left: 0;
        width: 100%;
        background: white;
        box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
        border-radius: 8px;
        padding: 8px 0;
        z-index: 1000;
    }
    
    /* Ajustements du sélecteur de langue sur mobile */
    .language-selector-wrapper {
        margin-left: 4px;
        position: relative;
    }
    
    .language-selector-btn {
        padding: 4px 8px;
        font-size: 0.75rem;
        min-height: 32px;
        max-height: 32px;
        gap: 3px;
        white-space: nowrap;
        flex-shrink: 0;
        pointer-events: auto;
        cursor: pointer;
        -webkit-tap-highlight-color: rgba(255, 255, 255, 0.1);
    }
    
    .language-selector-btn .language-code {
        font-size: 0.7rem;
        font-weight: 600;
        letter-spacing: 0.3px;
        flex-shrink: 0;
    }
    
    .language-selector-btn .language-flag {
        font-size: 0.95rem;
        line-height: 1;
        display: inline-block;
        flex-shrink: 0;
    }
    
    .language-selector-btn .language-arrow {
        width: 9px;
        height: 9px;
        flex-shrink: 0;
        margin-left: 1px;
    }
    
    .language-dropdown {
        right: 0;
        min-width: 150px;
        max-width: 180px;
        top: calc(100% + 4px);
        z-index: 1002;
    }
    
    .navbar-menu::-webkit-scrollbar {
        display: none;
    }
    
    .nav-link {
        padding: 6px 8px;
        font-size: 0.8125rem;
        min-height: 36px;
        flex-shrink: 0;
    }
    
    .nav-link svg {
        width: 18px;
        height: 18px;
    }
    
    .chat-label,
    .cart-text {
        display: none;
    }
    
    /* Masquer le texte des liens sur mobile, garder seulement les icônes */
    .nav-link:not(.btn-primary):not(:has(svg)) {
        font-size: 0.75rem;
    }
    
    .nav-link.btn-primary {
        padding: 5px 10px;
        font-size: 0.8125rem;
        margin-left: 4px;
        flex-shrink: 0;
    }
    
    /* Ajuster les wrappers sur mobile */
    .cart-icon-wrapper,
    .notification-wrapper,
    .chat-wrapper {
        flex-shrink: 0;
    }
}

/* Responsive - Tablette */
@media (min-width: 769px) and (max-width: 1024px) {
    .navbar-menu {
        gap: 2px;
    }
    
    .nav-link {
        padding: 8px 10px;
        font-size: 0.875rem;
    }
}

/* Amélioration pour les écrans très larges */
@media (min-width: 1400px) {
    .navbar .container {
        max-width: 1400px;
        margin: 0 auto;
        padding: 0 20px;
    }
}

/* ============================================================================
   BOUTONS
   ============================================================================ */

.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: var(--spacing-2);
    padding: var(--spacing-3) var(--spacing-6);
    border: none;
    border-radius: var(--radius-md);
    font-weight: 600;
    text-decoration: none;
    cursor: pointer;
    transition: all var(--duration-fast) var(--curve-ease-out);
    font-size: 1rem;
    font-family: var(--font-family);
    position: relative;
    overflow: hidden;
}

/* Tailles de boutons */
.btn-sm {
    padding: var(--spacing-2) var(--spacing-4);
    font-size: 0.875rem;
}

.btn-lg {
    padding: var(--spacing-4) var(--spacing-8);
    font-size: 1.125rem;
}

/* Bouton Primary avec dégradé */
.btn-primary {
    background: var(--gradient-primary);
    color: var(--white);
    box-shadow: 0 2px 6px 0 rgba(0, 0, 0, 0.06), 0 4px 12px 0 rgba(0, 0, 0, 0.10);
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 10px 0 rgba(0, 0, 0, 0.10), 0 8px 20px 0 rgba(0, 0, 0, 0.18);
}

.btn-primary:active {
    transform: scale(0.95);
    transition-duration: var(--duration-fast);
}

/* Bouton Secondary */
.btn-secondary {
    background: var(--gradient-secondary);
    color: var(--white);
    box-shadow: 0 2px 6px 0 rgba(0, 0, 0, 0.06), 0 4px 12px 0 rgba(0, 0, 0, 0.10);
}

.btn-secondary:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 10px 0 rgba(0, 0, 0, 0.10), 0 8px 20px 0 rgba(0, 0, 0, 0.18);
}

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

/* Bouton Success */
.btn-success {
    background-color: var(--success-color);
    color: var(--white);
    box-shadow: 0 2px 6px 0 rgba(0, 0, 0, 0.06);
}

.btn-success:hover {
    background-color: #0ea472;
    transform: translateY(-1px);
}

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

/* Bouton Danger */
.btn-danger {
    background-color: var(--danger-color);
    color: var(--white);
    box-shadow: 0 2px 6px 0 rgba(0, 0, 0, 0.06);
}

.btn-danger:hover {
    background-color: #dc2626;
    transform: translateY(-1px);
}

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

/* Bouton Outline */
.btn-outline {
    background-color: transparent;
    border: 1.5px solid var(--blue-medium);
    color: var(--blue-deep);
}

.btn-outline:hover {
    background-color: var(--blue-deep);
    color: var(--white);
    border-color: var(--blue-deep);
}

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

/* Bouton Ghost */
.btn-ghost {
    background-color: transparent;
    color: var(--blue-medium);
}

.btn-ghost:hover {
    background-color: var(--gray-100);
}

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

/* Bouton Full Width */
.btn-full {
    width: 100%;
}

/* Bouton Disabled */
.btn:disabled,
.btn.disabled {
    opacity: 0.5;
    cursor: not-allowed;
    pointer-events: none;
}

/* ============================================================================
   FORMULAIRES
   ============================================================================ */

.form-group {
    margin-bottom: var(--spacing-6);
}

.form-label {
    display: block;
    margin-bottom: var(--spacing-2);
    font-weight: 500;
    color: var(--text-color);
    font-size: 0.875rem;
}

.form-control {
    width: 100%;
    padding: var(--spacing-4);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    font-size: 1rem;
    font-family: var(--font-family);
    background-color: var(--white);
    transition: all var(--duration-normal) var(--curve-ease-out);
}

.form-control:hover {
    border-color: var(--gray-300);
}

.form-control:focus {
    outline: none;
    border-color: var(--blue-medium);
    border-width: 2px;
    padding: calc(var(--spacing-4) - 1px); /* Compenser l'épaisseur de la bordure */
    box-shadow: 
        0 0 0 4px rgba(74, 144, 226, 0.1),
        0 2px 8px 0 rgba(107, 182, 255, 0.3);
}

.form-control::placeholder {
    color: var(--gray-400);
}

.form-control:disabled {
    background-color: var(--gray-100);
    cursor: not-allowed;
    opacity: 0.6;
}

/* Input avec icône */
.form-control-with-icon {
    position: relative;
}

.form-control-with-icon input {
    padding-left: var(--spacing-12);
}

.form-control-icon {
    position: absolute;
    left: var(--spacing-4);
    top: 50%;
    transform: translateY(-50%);
    color: var(--gray-400);
    pointer-events: none;
}

textarea.form-control {
    resize: vertical;
    min-height: 120px;
    line-height: 1.5;
}

/* États de validation */
.form-control.is-valid {
    border-color: var(--success-color);
}

.form-control.is-valid:focus {
    box-shadow: 
        0 0 0 4px rgba(16, 185, 129, 0.1),
        0 2px 8px 0 rgba(16, 185, 129, 0.3);
}

.form-control.is-invalid {
    border-color: var(--danger-color);
}

.form-control.is-invalid:focus {
    box-shadow: 
        0 0 0 4px rgba(239, 68, 68, 0.1),
        0 2px 8px 0 rgba(239, 68, 68, 0.3);
}

.form-feedback {
    margin-top: var(--spacing-2);
    font-size: 0.875rem;
}

.form-feedback.valid {
    color: var(--success-color);
}

.form-feedback.invalid {
    color: var(--danger-color);
}

/* ============================================================================
   CARTES
   ============================================================================ */

.card {
    background: var(--white);
    border-radius: var(--radius-lg);
    /* Ombre douce premium (double layer) */
    box-shadow: 
        0 2px 6px 0 rgba(0, 0, 0, 0.06), 
        0 4px 12px 0 rgba(0, 0, 0, 0.10);
    overflow: hidden;
    margin-bottom: var(--spacing-6);
    transition: all var(--duration-normal) var(--curve-ease-out);
}

.card:hover {
    transform: translateY(-2px);
    box-shadow: 
        0 4px 10px 0 rgba(0, 0, 0, 0.10), 
        0 8px 20px 0 rgba(0, 0, 0, 0.18);
}

.card.clickable {
    cursor: pointer;
}

.card.clickable:active {
    transform: scale(0.98);
    transition-duration: var(--duration-fast);
}

.card-header {
    padding: var(--spacing-5);
    border-bottom: 1px solid var(--border-color);
    font-weight: 600;
}

.card-body {
    padding: var(--spacing-6);
}

.card-footer {
    padding: var(--spacing-4);
    border-top: 1px solid var(--border-color);
    background: var(--gradient-elevation);
}

/* Card avec dégradé */
.card-gradient {
    background: var(--gradient-primary);
    color: var(--white);
}

.card-gradient .card-header {
    border-bottom-color: rgba(255, 255, 255, 0.2);
}

.card-gradient .card-footer {
    border-top-color: rgba(255, 255, 255, 0.2);
    background: rgba(255, 255, 255, 0.1);
}

/* Card elevated (plus d'ombre) */
.card-elevated {
    box-shadow: 
        0 4px 10px 0 rgba(0, 0, 0, 0.10), 
        0 8px 20px 0 rgba(0, 0, 0, 0.18);
}

.card-elevated:hover {
    box-shadow: 
        0 6px 14px 0 rgba(0, 0, 0, 0.12), 
        0 12px 28px 0 rgba(0, 0, 0, 0.20);
}

/* ============================================================================
   GRID
   ============================================================================ */

.grid {
    display: grid;
    gap: 1.5rem;
}

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

.grid-3 {
    grid-template-columns: repeat(3, 1fr);
}

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

/* ============================================================================
   RESPONSIVE DESIGN (Breakpoints standardisés)
   ============================================================================ */

/* Container responsive */
.container-responsive {
    width: 100%;
    margin-left: auto;
    margin-right: auto;
    padding-left: var(--spacing-4);
    padding-right: var(--spacing-4);
}

/* SM: 640px - Petits écrans */
@media (min-width: 640px) {
    .container-responsive {
        max-width: 640px;
    }
}

/* MD: 768px - Tablettes */
@media (min-width: 768px) {
    .container-responsive {
        max-width: 768px;
        padding-left: var(--spacing-6);
        padding-right: var(--spacing-6);
    }
    
    .navbar-menu {
        gap: var(--spacing-8);
    }
}

/* LG: 1024px - Desktop */
@media (min-width: 1024px) {
    .container-responsive {
        max-width: 1024px;
    }
    
    .card-body {
        padding: var(--spacing-8);
    }
}

/* XL: 1280px - Large desktop */
@media (min-width: 1280px) {
    .container-responsive {
        max-width: 1280px;
    }
}

/* Responsive pour les grilles */
@media (max-width: 1024px) {
    .grid-4 {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 768px) {
    .grid-2,
    .grid-3,
    .grid-4 {
        grid-template-columns: 1fr;
    }
    
    .navbar {
        padding: var(--spacing-3) 0;
    }
    
    .navbar-menu {
        gap: var(--spacing-4);
    }
    
    /* Ne pas forcer la largeur à 100% pour les boutons dans la navbar */
    .btn:not(.nav-link) {
        width: 100%;
    }
    
    .card-body {
        padding: var(--spacing-4);
    }
}

@media (max-width: 480px) {
    html {
        font-size: 14px;
    }
    
    .container {
        padding: 0 var(--spacing-3);
    }
    
    .btn-lg {
        padding: var(--spacing-3) var(--spacing-6);
        font-size: 1rem;
    }
}

/* ============================================================================
   FOOTER
   ============================================================================ */

.footer {
    background: #1F2937; /* Gris foncé - couleur unie */
    color: var(--white);
    padding: var(--spacing-16) 0 var(--spacing-4);
    margin-top: var(--spacing-20);
    position: relative;
}

.footer::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 1px;
    background: linear-gradient(90deg, 
        transparent 0%, 
        rgba(255, 255, 255, 0.1) 50%, 
        transparent 100%
    );
}

.footer-content {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: var(--spacing-8);
    margin-bottom: var(--spacing-8);
}

.footer-section h3,
.footer-section h4 {
    margin-bottom: var(--spacing-4);
    font-weight: 600;
}

.footer-section ul {
    list-style: none;
}

.footer-section ul li {
    margin-bottom: var(--spacing-2);
}

.footer-section a {
    color: rgba(255, 255, 255, 0.7);
    text-decoration: none;
    transition: all var(--duration-fast) var(--curve-ease-out);
    display: inline-block;
}

.footer-section a:hover {
    color: var(--white);
    transform: translateX(4px);
}

.footer-bottom {
    text-align: center;
    padding-top: var(--spacing-8);
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    color: rgba(255, 255, 255, 0.5);
    font-size: 0.875rem;
}

/* ============================================================================
   SECTION MODES DE PAIEMENT SÉCURISÉS
   ============================================================================ */

.payment-methods-section {
    margin: var(--spacing-8) 0;
    padding: var(--spacing-6) 0;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.payment-methods-title {
    text-align: center;
    font-size: 0.875rem;
    font-weight: 600;
    color: rgba(255, 255, 255, 0.9);
    margin-bottom: var(--spacing-4);
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.payment-icons-container {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 20px;
    flex-wrap: wrap;
    padding: var(--spacing-4) 0;
}

.payment-icon {
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.3s ease;
}

.payment-icon svg {
    height: 35px;
    width: auto;
    opacity: 0.6;
    transition: all 0.3s ease;
    filter: drop-shadow(0 2px 4px rgba(0, 0, 0, 0.1));
}

.payment-icon:hover svg {
    opacity: 1;
    transform: translateY(-5px) scale(1.1);
    filter: drop-shadow(0 4px 8px rgba(0, 0, 0, 0.2));
}

.payment-security-note {
    text-align: center;
    margin-top: var(--spacing-4);
    font-size: 0.75rem;
    color: rgba(255, 255, 255, 0.6);
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
}

.payment-security-note svg {
    opacity: 0.7;
    vertical-align: middle;
    margin-right: 6px;
    flex-shrink: 0;
}

/* Responsive - Mobile */
@media (max-width: 768px) {
    .payment-icons-container {
        gap: 15px;
        padding: var(--spacing-3) 0;
    }
    
    .payment-icon svg {
        height: 30px;
    }
    
    .payment-methods-title {
        font-size: 0.8125rem;
    }
    
    .payment-security-note {
        font-size: 0.6875rem;
        flex-wrap: wrap;
    }
}

/* ============================================================================
   FOOTER - Masquage sur pages non-accueil
   ============================================================================ */

/* Masquer le footer sur toutes les pages sauf la page d'accueil */
/* Cette règle CSS est une sécurité supplémentaire si le footer est quand même rendu */
body:not(.home-page) .footer,
body:not(.home-page) .footer-content {
    display: none !important;
}

/* ============================================================================
   MOBILE - Ajustement pour éviter les espaces blancs en bas
   ============================================================================ */

@media (max-width: 768px) {
    /* S'assurer que le contenu principal s'arrête avant la Bottom Navigation Bar */
    main {
        padding-bottom: calc(var(--mobile-bottom-height, 60px) + var(--mobile-safe-area-bottom, env(safe-area-inset-bottom, 0px)) + 1rem);
    }
    
    /* Masquer complètement le footer sur mobile pour les pages non-accueil */
    /* Le footer ne devrait pas être rendu, mais on le cache au cas où */
    .footer {
        display: none;
    }
    
    /* Réafficher le footer uniquement sur la page d'accueil en mobile */
    body.home-page .footer {
        display: block;
        margin-top: var(--spacing-16);
        padding-bottom: calc(var(--mobile-bottom-height, 60px) + var(--mobile-safe-area-bottom, env(safe-area-inset-bottom, 0px)) + 1rem);
    }
    
    /* S'assurer qu'il n'y a pas d'espace blanc supplémentaire */
    body:not(.home-page) main {
        margin-bottom: 0;
        padding-bottom: calc(var(--mobile-bottom-height, 60px) + var(--mobile-safe-area-bottom, env(safe-area-inset-bottom, 0px)) + 0.5rem);
    }
}

/* ============================================================================
   UTILITAIRES
   ============================================================================ */

.text-center {
    text-align: center;
}

.text-right {
    text-align: right;
}

.mt-1 { margin-top: 0.5rem; }
.mt-2 { margin-top: 1rem; }
.mt-3 { margin-top: 1.5rem; }
.mt-4 { margin-top: 2rem; }

.mb-1 { margin-bottom: 0.5rem; }
.mb-2 { margin-bottom: 1rem; }
.mb-3 { margin-bottom: 1.5rem; }
.mb-4 { margin-bottom: 2rem; }

.p-1 { padding: 0.5rem; }
.p-2 { padding: 1rem; }
.p-3 { padding: 1.5rem; }
.p-4 { padding: 2rem; }

.main-content {
    min-height: calc(100vh - 200px);
    padding: var(--spacing-8) 0;
    width: 100%;
    max-width: 100vw;
    box-sizing: border-box;
    overflow-x: hidden;
}

/* ============================================================================
   SCROLLBAR PERSONNALISÉE
   ============================================================================ */

/* Webkit browsers (Chrome, Safari, Edge) */
::-webkit-scrollbar {
    width: 8px;
    height: 8px;
}

::-webkit-scrollbar-track {
    background: var(--gray-100);
    border-radius: var(--radius-full);
}

::-webkit-scrollbar-thumb {
    background: var(--gray-300);
    border-radius: var(--radius-full);
    transition: background var(--duration-fast);
}

::-webkit-scrollbar-thumb:hover {
    background: var(--gray-400);
}

::-webkit-scrollbar-thumb:active {
    background: var(--gray-500);
}

/* Firefox */
* {
    scrollbar-width: thin;
    scrollbar-color: var(--gray-300) var(--gray-100);
}

/* ============================================================================
   CLASSES UTILITAIRES POUR DÉGRADÉS
   ============================================================================ */

.gradient-primary {
    background: var(--gradient-primary);
}

.gradient-secondary {
    background: var(--gradient-secondary);
}

.gradient-elevation {
    background: var(--gradient-elevation);
}

.gradient-text {
    background: var(--gradient-primary);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

/* ============================================================================
   CLASSES UTILITAIRES POUR OMBRES
   ============================================================================ */

.shadow-soft-sm {
    box-shadow: 0 1px 3px 0 rgba(0, 0, 0, 0.04), 0 2px 6px 0 rgba(0, 0, 0, 0.08);
}

.shadow-soft-md {
    box-shadow: 0 2px 6px 0 rgba(0, 0, 0, 0.06), 0 4px 12px 0 rgba(0, 0, 0, 0.10);
}

.shadow-soft-lg {
    box-shadow: 0 4px 10px 0 rgba(0, 0, 0, 0.10), 0 8px 20px 0 rgba(0, 0, 0, 0.18);
}

.shadow-soft-xl {
    box-shadow: 0 6px 14px 0 rgba(0, 0, 0, 0.12), 0 12px 28px 0 rgba(0, 0, 0, 0.20);
}

.shadow-glow-blue {
    box-shadow: 
        0 2px 8px 0 rgba(107, 182, 255, 0.3), 
        0 4px 16px 0 rgba(107, 182, 255, 0.1);
}

/* ============================================================================
   ANIMATIONS KEYFRAMES
   ============================================================================ */

@keyframes fadeIn {
    from {
        opacity: 0;
    }
    to {
        opacity: 1;
    }
}

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

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

@keyframes scaleIn {
    from {
        transform: scale(0.9);
        opacity: 0;
    }
    to {
        transform: scale(1);
        opacity: 1;
    }
}

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

/* Classes d'animation */
.animate-fade-in {
    animation: fadeIn var(--duration-normal) var(--curve-ease-out);
}

.animate-slide-in-right {
    animation: slideInRight var(--duration-normal) var(--curve-ease-out);
}

.animate-slide-in-up {
    animation: slideInUp var(--duration-normal) var(--curve-ease-out);
}

.animate-scale-in {
    animation: scaleIn var(--duration-normal) var(--curve-ease-out);
}

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

/* ============================================================================
   CLASSES UTILITAIRES POUR TRANSITIONS
   ============================================================================ */

.transition-smooth {
    transition: all var(--duration-normal) var(--curve-ease-out);
}

.transition-fast {
    transition: all var(--duration-fast) var(--curve-ease-out);
}

.transition-slow {
    transition: all var(--duration-slow) var(--curve-ease-out);
}

/* ============================================================================
   CLASSES UTILITAIRES SUPPLÉMENTAIRES
   ============================================================================ */

/* Couleurs de texte */
.text-primary {
    color: var(--blue-deep);
}

.text-secondary {
    color: var(--blue-medium);
}

.text-success {
    color: var(--success-color);
}

.text-danger {
    color: var(--danger-color);
}

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

.text-muted {
    color: var(--text-muted);
}

/* Backgrounds */
.bg-primary {
    background-color: var(--blue-deep);
}

.bg-light {
    background-color: var(--gray-50);
}

.bg-white {
    background-color: var(--white);
}

/* ============================================================================
   GLOBAL MOBILE CLEANUP - Optimisation de l'espacement pour mobile
   Réduction des whitespaces excessifs pour améliorer l'expérience mobile
   ============================================================================ */

/* Variables CSS pour le spacing mobile - Réduction de 50-60% */
:root {
    /* Section padding mobile - Réduction de 55% */
    --section-padding-mobile: clamp(20px, 5vw, 40px);
    
    /* Espacement titre-contenu standardisé mobile */
    --title-content-gap-mobile: 15px;
}

/* ============================================================================
   OPTIMISATIONS MOBILE (< 768px)
   ============================================================================ */

@media (max-width: 768px) {
    
    /* ========================================================================
       RÉDUCTION DES PADDING/MARGIN VERTICAUX DES SECTIONS
       ======================================================================== */
    
    /* Sections principales - Réduction de 50-60% */
    section,
    .section,
    article,
    .article {
        padding-top: clamp(20px, 4vw, 40px) !important;
        padding-bottom: clamp(20px, 4vw, 40px) !important;
    }
    
    /* Sections avec classes spécifiques */
    .venllre-section,
    .categories-section,
    .latest-sales-section,
    .section-content,
    .page-section {
        padding-top: var(--section-padding-mobile) !important;
        padding-bottom: var(--section-padding-mobile) !important;
    }
    
    /* Conteneurs principaux */
    .container,
    .container-responsive {
        padding-top: clamp(12px, 3vw, 24px) !important;
        padding-bottom: clamp(12px, 3vw, 24px) !important;
    }
    
    /* Main content - Réduction significative */
    .main-content {
        padding: clamp(16px, 4vw, 32px) 0 !important;
        min-height: auto;
    }
    
    /* ========================================================================
       STANDARDISATION ESPACE TITRE-CONTENU (MAX 15px)
       ======================================================================== */
    
    /* Titres de section et leurs contenus */
    h1,
    h2,
    h3,
    .section-title,
    .section-title-text,
    .section-title-venllre,
    .page-title {
        margin-bottom: var(--title-content-gap-mobile) !important;
    }
    
    /* Headers de section */
    .section-header {
        margin-bottom: var(--title-content-gap-mobile) !important;
    }
    
    /* Espace après les titres dans les cards */
    .card-header h1,
    .card-header h2,
    .card-header h3,
    .card-header .section-title {
        margin-bottom: var(--title-content-gap-mobile) !important;
    }
    
    /* ========================================================================
       GRILLES DE PRODUITS - 2 COLONNES SUR MOBILE
       ======================================================================== */
    
    /* Grilles de produits - Forcer 2 colonnes */
    .product-grid,
    .products-grid,
    .grid-products,
    .marketplace-grid {
        display: grid !important;
        grid-template-columns: repeat(2, 1fr) !important;
        gap: clamp(8px, 2vw, 16px) !important;
    }
    
    /* Grilles génériques - Adapter selon contexte (override règle existante ligne 1386) */
    .grid-2,
    .grid-3,
    .grid-4 {
        grid-template-columns: repeat(2, 1fr) !important;
        gap: clamp(8px, 2vw, 16px) !important;
    }
    
    /* Cards de produits - Réduire les marges */
    .product-card,
    .card-product,
    .item-card {
        margin-bottom: clamp(8px, 2vw, 16px) !important;
    }
    
    /* ========================================================================
       BANNIÈRES/HERO - HAUTEUR MAX 40-50VH
       ======================================================================== */
    
    /* Hero slider - Réduction de hauteur */
    .hero-slider,
    .hero-banner,
    .banner-hero,
    .slider-container {
        height: clamp(200px, 40vh, 300px) !important;
        min-height: clamp(200px, 40vh, 300px) !important;
        max-height: 50vh !important;
        margin-bottom: clamp(12px, 3vw, 24px) !important;
    }
    
    /* Bannières de catégories */
    .category-banner,
    .venllre-banner-large,
    .banner-large {
        min-height: clamp(150px, 35vh, 250px) !important;
        max-height: 45vh !important;
        margin-bottom: clamp(12px, 3vw, 24px) !important;
    }
    
    /* Bannières génériques */
    .banner,
    .hero-section,
    .promo-banner {
        min-height: clamp(180px, 40vh, 280px) !important;
        max-height: 50vh !important;
        padding: clamp(16px, 4vw, 32px) 0 !important;
    }
    
    /* ========================================================================
       LISTES - RÉDUCTION DU GAP ENTRE ÉLÉMENTS
       ======================================================================== */
    
    /* Listes de catégories */
    .category-list,
    .categories-list,
    .list-categories {
        gap: clamp(8px, 2vw, 16px) !important;
    }
    
    /* Cards de catégories */
    .category-card,
    .card-category {
        margin-bottom: clamp(8px, 2vw, 16px) !important;
    }
    
    /* Listes génériques avec flex/grid */
    ul.grid,
    ul.flex,
    .list-grid,
    .list-flex {
        gap: clamp(8px, 2vw, 16px) !important;
    }
    
    /* ========================================================================
       CARDS - RÉDUCTION DES PADDING
       ======================================================================== */
    
    /* Cards - Padding réduit (override règle existante ligne 1406) */
    .card {
        margin-bottom: clamp(12px, 3vw, 24px) !important;
    }
    
    .card-body {
        padding: clamp(12px, 3vw, 24px) !important;
        margin-bottom: clamp(12px, 3vw, 24px) !important;
    }
    
    .card-header {
        padding: clamp(12px, 3vw, 24px) clamp(12px, 3vw, 24px) clamp(8px, 2vw, 16px) !important;
    }
    
    .card-footer {
        padding: clamp(8px, 2vw, 16px) clamp(12px, 3vw, 24px) !important;
    }
    
    /* ========================================================================
       FORMULAIRES - RÉDUCTION DES MARGES
       ======================================================================== */
    
    .form-group {
        margin-bottom: clamp(12px, 3vw, 24px) !important;
    }
    
    /* ========================================================================
       FOOTER - RÉDUCTION DU PADDING
       ======================================================================== */
    
    .footer {
        padding-top: clamp(32px, 8vw, 64px) !important;
        padding-bottom: clamp(16px, 4vw, 32px) !important;
        margin-top: clamp(32px, 8vw, 64px) !important;
    }
    
    .footer-content {
        gap: clamp(16px, 4vw, 32px) !important;
        margin-bottom: clamp(16px, 4vw, 32px) !important;
    }
    
    /* ========================================================================
       UTILITAIRES - MARGES RÉDUITES
       ======================================================================== */
    
    .mt-1 { margin-top: clamp(2px, 0.5vw, 4px) !important; }
    .mt-2 { margin-top: clamp(4px, 1vw, 8px) !important; }
    .mt-3 { margin-top: clamp(6px, 1.5vw, 12px) !important; }
    .mt-4 { margin-top: clamp(8px, 2vw, 16px) !important; }
    
    .mb-1 { margin-bottom: clamp(2px, 0.5vw, 4px) !important; }
    .mb-2 { margin-bottom: clamp(4px, 1vw, 8px) !important; }
    .mb-3 { margin-bottom: clamp(6px, 1.5vw, 12px) !important; }
    .mb-4 { margin-bottom: clamp(8px, 2vw, 16px) !important; }
    
    .p-1 { padding: clamp(2px, 0.5vw, 4px) !important; }
    .p-2 { padding: clamp(4px, 1vw, 8px) !important; }
    .p-3 { padding: clamp(6px, 1.5vw, 12px) !important; }
    .p-4 { padding: clamp(8px, 2vw, 16px) !important; }
    
    /* ========================================================================
       ESPACEMENTS SPÉCIFIQUES PAR COMPOSANT
       ======================================================================== */
    
    /* Carousels */
    .carousel,
    .slider,
    .swiper-container {
        margin-bottom: clamp(12px, 3vw, 24px) !important;
    }
    
    /* Modals - Padding réduit */
    .modal-body,
    .modal-content {
        padding: clamp(16px, 4vw, 32px) !important;
    }
    
    /* Tables - Espacement réduit */
    table {
        margin-bottom: clamp(12px, 3vw, 24px) !important;
    }
    
    table td,
    table th {
        padding: clamp(8px, 2vw, 16px) !important;
    }
}

/* ============================================================================
   OPTIMISATIONS TABLETTE (768px - 1024px) - Transition fluide
   ============================================================================ */

@media (min-width: 769px) and (max-width: 1024px) {
    
    /* Réduction modérée pour tablettes */
    section,
    .section {
        padding-top: clamp(32px, 5vw, 60px) !important;
        padding-bottom: clamp(32px, 5vw, 60px) !important;
    }
    
    .main-content {
        padding: clamp(24px, 5vw, 48px) 0 !important;
    }
    
    h1,
    h2,
    .section-title {
        margin-bottom: clamp(15px, 2vw, 24px) !important;
    }
    
    .hero-slider,
    .hero-banner {
        height: clamp(300px, 45vh, 400px) !important;
        min-height: clamp(300px, 45vh, 400px) !important;
    }
    
    .product-grid,
    .grid-2,
    .grid-3,
    .grid-4 {
        grid-template-columns: repeat(3, 1fr) !important;
        gap: clamp(12px, 2vw, 20px) !important;
    }
}

