/* ColisBled Modern Responsive Design */

/* Variables CSS pour thème moderne */
:root {
    /* Couleurs primaires avec tons plus doux */
    --primary: #4F46E5;
    --primary-dark: #4338CA;
    --primary-light: #818CF8;
    --primary-bg: #EEF2FF;
    
    /* Couleurs secondaires */
    --secondary: #64748B;
    --secondary-dark: #475569;
    --secondary-light: #94A3B8;
    
    /* Couleurs d'accent */
    --accent: #10B981;
    --accent-dark: #059669;
    --accent-light: #34D399;
    
    /* Couleurs neutres */
    --gray-50: #F8FAFC;
    --gray-100: #F1F5F9;
    --gray-200: #E2E8F0;
    --gray-300: #CBD5E1;
    --gray-400: #94A3B8;
    --gray-500: #64748B;
    --gray-600: #475569;
    --gray-700: #334155;
    --gray-800: #1E293B;
    --gray-900: #0F172A;
    
    /* Espacement moderne */
    --space-1: 0.25rem;
    --space-2: 0.5rem;
    --space-3: 0.75rem;
    --space-4: 1rem;
    --space-5: 1.25rem;
    --space-6: 1.5rem;
    --space-8: 2rem;
    --space-10: 2.5rem;
    --space-12: 3rem;
    --space-16: 4rem;
    --space-20: 5rem;
    
    /* Bordures arrondies */
    --radius-sm: 0.375rem;
    --radius: 0.5rem;
    --radius-md: 0.75rem;
    --radius-lg: 1rem;
    --radius-xl: 1.5rem;
    --radius-2xl: 2rem;
    --radius-full: 9999px;
    
    /* Ombres subtiles */
    --shadow-xs: 0 1px 2px 0 rgb(0 0 0 / 0.05);
    --shadow-sm: 0 1px 3px 0 rgb(0 0 0 / 0.1);
    --shadow: 0 4px 6px -1px rgb(0 0 0 / 0.1);
    --shadow-md: 0 6px 12px -2px rgb(0 0 0 / 0.1);
    --shadow-lg: 0 10px 20px -3px rgb(0 0 0 / 0.1);
    --shadow-xl: 0 20px 40px -5px rgb(0 0 0 / 0.15);
    
    /* Transitions fluides */
    --transition: all 0.2s ease-in-out;
    --transition-slow: all 0.3s ease-in-out;
}

/* Reset et styles de base - MOBILE FIRST */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    /* Empêche débordement horizontal */
    overflow-x: hidden;
    width: 100%;
}

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    font-size: 16px;
    line-height: 1.6;
    color: var(--gray-800);
    background: var(--gray-50);
    /* CRITIQUE: Empêche tout débordement horizontal */
    overflow-x: hidden;
    width: 100%;
    max-width: 100vw;
}

/* Typographie responsive */
h1, h2, h3, h4, h5, h6 {
    font-weight: 700;
    line-height: 1.2;
    color: var(--gray-900);
    margin-bottom: var(--space-4);
}

h1 { font-size: clamp(2rem, 5vw, 3rem); }
h2 { font-size: clamp(1.75rem, 4vw, 2.5rem); }
h3 { font-size: clamp(1.5rem, 3vw, 2rem); }
h4 { font-size: clamp(1.25rem, 2.5vw, 1.75rem); }
h5 { font-size: clamp(1.125rem, 2vw, 1.5rem); }
h6 { font-size: clamp(1rem, 1.5vw, 1.25rem); }

/* Container responsive */
.modern-container {
    width: 100%;
    max-width: 1280px;
    margin: 0 auto;
    padding: 0 var(--space-4);
}

@media (min-width: 768px) {
    .modern-container {
        padding: 0 var(--space-6);
    }
}

@media (min-width: 1024px) {
    .modern-container {
        padding: 0 var(--space-8);
    }
}

/* Cartes modernes avec effets */
.modern-card {
    background: white;
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-sm);
    padding: var(--space-6);
    transition: var(--transition);
    border: 1px solid var(--gray-200);
}

.modern-card:hover {
    box-shadow: var(--shadow-md);
    transform: translateY(-2px);
}

.modern-card-hover {
    transition: var(--transition-slow);
}

.modern-card-hover:hover {
    box-shadow: var(--shadow-lg);
    transform: translateY(-4px);
}

/* Boutons modernes */
.btn-modern {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: var(--space-2);
    padding: var(--space-3) var(--space-6);
    border-radius: var(--radius);
    font-weight: 600;
    font-size: 0.9375rem;
    text-decoration: none;
    border: none;
    cursor: pointer;
    transition: var(--transition);
    outline: none;
    white-space: nowrap;
}

.btn-modern:focus {
    outline: 2px solid var(--primary);
    outline-offset: 2px;
}

.btn-modern-primary {
    background: var(--primary);
    color: white;
}

.btn-modern-primary:hover {
    background: var(--primary-dark);
    transform: translateY(-1px);
    box-shadow: var(--shadow-md);
}

.btn-modern-secondary {
    background: white;
    color: var(--gray-700);
    border: 1px solid var(--gray-300);
}

.btn-modern-secondary:hover {
    background: var(--gray-50);
    border-color: var(--gray-400);
}

.btn-modern-accent {
    background: var(--accent);
    color: white;
}

.btn-modern-accent:hover {
    background: var(--accent-dark);
    transform: translateY(-1px);
    box-shadow: var(--shadow-md);
}

.btn-modern-lg {
    padding: var(--space-4) var(--space-8);
    font-size: 1.0625rem;
}

.btn-modern-sm {
    padding: var(--space-2) var(--space-4);
    font-size: 0.875rem;
}

/* Champs de formulaire modernes */
.form-modern {
    width: 100%;
}

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

.form-modern label {
    display: block;
    margin-bottom: var(--space-2);
    font-weight: 600;
    color: var(--gray-700);
    font-size: 0.9375rem;
}

.form-modern input,
.form-modern select,
.form-modern textarea {
    width: 100%;
    padding: var(--space-3) var(--space-4);
    border: 1px solid var(--gray-300);
    border-radius: var(--radius);
    font-size: 1rem;
    color: var(--gray-800);
    background: white;
    transition: var(--transition);
}

.form-modern input:focus,
.form-modern select:focus,
.form-modern textarea:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 0 3px var(--primary-bg);
}

.form-modern input::placeholder,
.form-modern textarea::placeholder {
    color: var(--gray-400);
}

/* Badges modernes */
.badge-modern {
    display: inline-flex;
    align-items: center;
    gap: var(--space-1);
    padding: var(--space-1) var(--space-3);
    border-radius: var(--radius-full);
    font-size: 0.875rem;
    font-weight: 600;
}

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

.badge-success {
    background: #D1FAE5;
    color: #065F46;
}

.badge-warning {
    background: #FEF3C7;
    color: #92400E;
}

.badge-danger {
    background: #FEE2E2;
    color: #991B1B;
}

/* Grid responsive moderne */
.modern-grid {
    display: grid;
    gap: var(--space-6);
}

/* Mobile: 1 colonne par défaut */
.modern-grid-2 {
    grid-template-columns: 1fr;
}

.modern-grid-3 {
    grid-template-columns: 1fr;
}

/* Tablette: 2 colonnes */
@media (min-width: 640px) {
    .modern-grid-2 {
        grid-template-columns: repeat(2, 1fr);
    }
}

/* Desktop: 2-3 colonnes */
@media (min-width: 1024px) {
    .modern-grid-2 {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .modern-grid-3 {
        grid-template-columns: repeat(3, 1fr);
    }
}

.modern-grid-4 {
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
}

@media (max-width: 640px) {
    .modern-grid {
        gap: var(--space-4);
    }
    
    .modern-grid-2,
    .modern-grid-3,
    .modern-grid-4 {
        grid-template-columns: 1fr;
    }
}

/* Hero section moderne */
.modern-hero {
    position: relative;
    padding: var(--space-16) 0;
    background: linear-gradient(135deg, var(--primary) 0%, var(--primary-dark) 100%);
    color: white;
    overflow: hidden;
}

.modern-hero::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: url("data:image/svg+xml,%3Csvg width='60' height='60' viewBox='0 0 60 60' xmlns='http://www.w3.org/2000/svg'%3E%3Cg fill='none' fill-rule='evenodd'%3E%3Cg fill='%23ffffff' fill-opacity='0.05'%3E%3Cpath d='M36 34v-4h-2v4h-4v2h4v4h2v-4h4v-2h-4zm0-30V0h-2v4h-4v2h4v4h2V6h4V4h-4zM6 34v-4H4v4H0v2h4v4h2v-4h4v-2H6zM6 4V0H4v4H0v2h4v4h2V6h4V4H6z'/%3E%3C/g%3E%3C/g%3E%3C/svg%3E");
    opacity: 0.3;
}

.modern-hero-content {
    position: relative;
    z-index: 1;
    max-width: 800px;
    margin: 0 auto;
    text-align: center;
}

@media (max-width: 768px) {
    .modern-hero {
        padding: var(--space-12) 0;
    }
}

/* Barre de recherche moderne */
.modern-search-bar {
    background: white;
    border-radius: var(--radius-xl);
    padding: var(--space-3);
    box-shadow: var(--shadow-xl);
    display: grid;
    gap: var(--space-3);
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
}

@media (max-width: 768px) {
    .modern-search-bar {
        grid-template-columns: 1fr;
        padding: var(--space-4);
    }
}

/* Liste d'éléments moderne */
.modern-list {
    display: flex;
    flex-direction: column;
    gap: var(--space-4);
}

.modern-list-item {
    background: white;
    border-radius: var(--radius-lg);
    padding: var(--space-5);
    box-shadow: var(--shadow-sm);
    transition: var(--transition);
    border: 1px solid var(--gray-200);
}

.modern-list-item:hover {
    box-shadow: var(--shadow-md);
    border-color: var(--primary-light);
}

/* Avatars modernes */
.modern-avatar {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: var(--radius-full);
    background: var(--primary);
    color: white;
    font-weight: 600;
    overflow: hidden;
}

.modern-avatar-sm {
    width: 32px;
    height: 32px;
    font-size: 0.75rem;
}

.modern-avatar-md {
    width: 48px;
    height: 48px;
    font-size: 1rem;
}

.modern-avatar-lg {
    width: 64px;
    height: 64px;
    font-size: 1.5rem;
}

/* Statistiques modernes */
.modern-stat {
    text-align: center;
    padding: var(--space-6);
}

.modern-stat-value {
    font-size: 2.5rem;
    font-weight: 800;
    color: var(--primary);
    line-height: 1;
    margin-bottom: var(--space-2);
}

.modern-stat-label {
    color: var(--gray-600);
    font-size: 0.9375rem;
    font-weight: 500;
}

/* Alertes modernes */
.modern-alert {
    padding: var(--space-4);
    border-radius: var(--radius);
    border-left: 4px solid;
    display: flex;
    align-items: flex-start;
    gap: var(--space-3);
}

.modern-alert-success {
    background: #D1FAE5;
    border-color: var(--accent);
    color: #065F46;
}

.modern-alert-warning {
    background: #FEF3C7;
    border-color: #F59E0B;
    color: #92400E;
}

.modern-alert-danger {
    background: #FEE2E2;
    border-color: #EF4444;
    color: #991B1B;
}

.modern-alert-info {
    background: #DBEAFE;
    border-color: #3B82F6;
    color: #1E3A8A;
}

/* Tabs modernes */
.modern-tabs {
    display: flex;
    gap: var(--space-2);
    border-bottom: 2px solid var(--gray-200);
    margin-bottom: var(--space-6);
    overflow-x: auto;
}

.modern-tab {
    padding: var(--space-3) var(--space-5);
    border: none;
    background: transparent;
    color: var(--gray-600);
    font-weight: 600;
    cursor: pointer;
    position: relative;
    transition: var(--transition);
    white-space: nowrap;
}

.modern-tab:hover {
    color: var(--primary);
}

.modern-tab.active {
    color: var(--primary);
}

.modern-tab.active::after {
    content: '';
    position: absolute;
    bottom: -2px;
    left: 0;
    right: 0;
    height: 2px;
    background: var(--primary);
}

/* Navigation responsive améliorée */
.modern-nav {
    background: white;
    box-shadow: var(--shadow-sm);
    position: sticky;
    top: 0;
    z-index: 1000;
}

/* Footer moderne */
.modern-footer {
    background: var(--gray-900);
    color: var(--gray-400);
    padding: var(--space-16) 0 var(--space-8);
    margin-top: var(--space-20);
}

.modern-footer a {
    color: var(--gray-400);
    text-decoration: none;
    transition: var(--transition);
}

.modern-footer a:hover {
    color: white;
}

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

.animate-fade-in {
    animation: fadeIn 0.5s ease-out;
}

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

.animate-slide-up {
    animation: slideUp 0.6s ease-out;
}

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

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

/* Utilitaires responsive */
.mobile-only {
    display: block;
}

.desktop-only {
    display: none;
}

@media (min-width: 768px) {
    .mobile-only {
        display: none;
    }
    
    .desktop-only {
        display: block;
    }
}

/* Accessibilité */
.sr-only {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border-width: 0;
}

/* Focus visible pour accessibilité */
*:focus-visible {
    outline: 2px solid var(--primary);
    outline-offset: 2px;
}

/* Scrollbar personnalisée */
::-webkit-scrollbar {
    width: 10px;
    height: 10px;
}

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

::-webkit-scrollbar-thumb {
    background: var(--gray-400);
    border-radius: var(--radius-full);
}

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

/* Mode sombre */
@media (prefers-color-scheme: dark) {
    :root {
        --gray-50: #0F172A;
        --gray-100: #1E293B;
        --gray-200: #334155;
        --gray-300: #475569;
        --gray-800: #F1F5F9;
        --gray-900: #F8FAFC;
    }
}

/* ===========================================
   UTILITY CLASSES POUR GP PROFILE
   =========================================== */

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

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

/* Utility Classes */
.text-center { text-align: center; }
.text-left { text-align: left; }
.text-right { text-align: right; }

.mb-0 { margin-bottom: 0; }
.mb-1 { margin-bottom: var(--space-1); }
.mb-2 { margin-bottom: var(--space-2); }
.mb-3 { margin-bottom: var(--space-3); }
.mb-4 { margin-bottom: var(--space-4); }

.mt-0 { margin-top: 0; }
.mt-1 { margin-top: var(--space-1); }
.mt-2 { margin-top: var(--space-2); }
.mt-3 { margin-top: var(--space-3); }
.mt-4 { margin-top: var(--space-4); }

.py-5 { padding: var(--space-12) 0; }
.py-4 { padding: var(--space-8) 0; }
.py-3 { padding: var(--space-6) 0; }

.px-4 { padding: 0 var(--space-8); }
.px-3 { padding: 0 var(--space-6); }

.fs-1 { font-size: 2.5rem; }
.fs-2 { font-size: 2rem; }
.fs-3 { font-size: 1.75rem; }
.fs-4 { font-size: 1.5rem; }
.fs-5 { font-size: 1.25rem; }
.fs-6 { font-size: 1rem; }

.text-muted { color: var(--gray-600); }
.text-primary { color: var(--primary); }
.text-success { color: var(--accent); }
.text-danger { color: #ef4444; }
.text-warning { color: #f59e0b; }

.fw-bold { font-weight: 700; }
.fw-semibold { font-weight: 600; }
.fw-normal { font-weight: 400; }

.d-flex { display: flex; }
.d-block { display: block; }
.d-none { display: none; }

.flex-column { flex-direction: column; }
.flex-row { flex-direction: row; }

.align-items-center { align-items: center; }
.align-items-start { align-items: flex-start; }
.align-items-end { align-items: flex-end; }

.justify-content-center { justify-content: center; }
.justify-content-between { justify-content: space-between; }
.justify-content-start { justify-content: flex-start; }
.justify-content-end { justify-content: flex-end; }

.flex-shrink-0 { flex-shrink: 0; }
.flex-grow-1 { flex-grow: 1; }

.gap-2 { gap: var(--space-4); }
.gap-3 { gap: var(--space-6); }

.w-100 { width: 100%; }
.h-100 { height: 100%; }

.rounded { border-radius: var(--radius); }
.rounded-circle { border-radius: var(--radius-full); }

.border { border: 1px solid var(--gray-300); }
.border-0 { border: 0; }

.bg-light { background-color: var(--gray-100); }
.bg-white { background-color: white; }
.bg-primary { background-color: var(--primary); }
.bg-success { background-color: var(--accent); }
.bg-danger { background-color: #ef4444; }
.bg-warning { background-color: #f59e0b; }

.text-white { color: white; }
.text-dark { color: var(--gray-900); }

.position-relative { position: relative; }
.position-absolute { position: absolute; }

.top-0 { top: 0; }
.bottom-0 { bottom: 0; }
.left-0 { left: 0; }
.right-0 { right: 0; }

.z-index-1 { z-index: 1; }
.z-index-10 { z-index: 10; }

.overflow-hidden { overflow: hidden; }

.shadow-sm { box-shadow: var(--shadow-sm); }
.shadow { box-shadow: var(--shadow); }
.shadow-lg { box-shadow: var(--shadow-lg); }

.opacity-50 { opacity: 0.5; }
.opacity-75 { opacity: 0.75; }
.opacity-100 { opacity: 1; }
