/* ========================================
   GLOBAL CSS - REVUE ODONTOLOGIQUE
   ======================================== */

/* ========================================
   IMPORTS ET FONTS
   ======================================== */
@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700;800&display=swap');
@import url('https://fonts.googleapis.com/css2?family=Roboto:wght@300;400;500;700&display=swap');

/* ========================================
   VARIABLES CSS
   ======================================== */
:root {
    /* Couleurs principales - Palette moderne */
    --primary-color: #4f46e5;
    --primary-dark: #3730a3;
    --primary-light: #6366f1;
    --secondary-color: #7c3aed;
    --secondary-dark: #5b21b6;
    --accent-color: #06b6d4;
    --accent-secondary: #ec4899;
    
    /* Couleurs sombres */
    --dark-bg: #0f172a;
    --dark-surface: #1f2937;
    --dark-card: #374151;
    --dark-border: #4b5563;
    
    /* Couleurs grises */
    --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;
    
    /* Couleurs indigo modernes */
    --indigo-300: #a5b4fc;
    --indigo-400: #818cf8;
    --indigo-500: #6366f1;
    --indigo-600: #4f46e5;
    --indigo-700: #4338ca;
    --indigo-800: #3730a3;
    
    /* Couleurs de statut */
    --success-color: #10b981;
    --warning-color: #f59e0b;
    --error-color: #ef4444;
    --info-color: #3b82f6;
    
    /* Ombres modernes */
    --shadow-sm: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
    --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
    --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.1);
    --shadow-xl: 0 20px 25px -5px rgba(0, 0, 0, 0.1);
    --shadow-2xl: 0 25px 50px -12px rgba(0, 0, 0, 0.25);
    --shadow-glow: 0 0 20px rgba(79, 70, 229, 0.3);
    
    /* Transitions */
    --transition-fast: 0.15s ease;
    --transition-normal: 0.3s ease;
    --transition-slow: 0.5s ease;
    
    /* Border radius */
    --radius-sm: 0.375rem;
    --radius-md: 0.5rem;
    --radius-lg: 0.75rem;
    --radius-xl: 1rem;
    --radius-2xl: 1.5rem;
}

/* ========================================
   RESET ET BASE
   ======================================== */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: 'Inter', 'Roboto', sans-serif;
    line-height: 1.6;
    color: var(--gray-900);
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
}

/* ========================================
   LAYOUTS PRINCIPAUX
   ======================================== */

/* Layout sombre (pour les dashboards) */
.dark-layout {
    background: linear-gradient(135deg, var(--gray-900) 0%, var(--indigo-900) 50%, var(--gray-800) 100%);
    min-height: 100vh;
    color: rgba(255, 255, 255, 0.895);
    display: flex;
    flex-direction: column;
}

/* Layout clair (pour les pages publiques) */
.light-layout {
    background: linear-gradient(135deg, var(--primary-color) 0%, var(--secondary-color) 100%);
    min-height: 100vh;
    color: white;
    position: relative;
    overflow-x: hidden;
}

.light-layout::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: 
        radial-gradient(circle at 20% 80%, rgba(120, 119, 198, 0.3) 0%, transparent 50%),
        radial-gradient(circle at 80% 20%, rgba(255, 119, 198, 0.3) 0%, transparent 50%),
        radial-gradient(circle at 40% 40%, rgba(120, 219, 255, 0.2) 0%, transparent 50%);
    pointer-events: none;
}

/* ========================================
   NAVIGATION
   ======================================== */

/* Barre de navigation sombre */
.nav-dark {
    background: rgba(17, 24, 39, 0.8);
    backdrop-filter: blur(12px);
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    box-shadow: var(--shadow-md);
}

/* Barre de navigation claire */
.nav-light {
    background: rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(12px);
    border-bottom: 1px solid rgba(255, 255, 255, 0.2);
    box-shadow: var(--shadow-sm);
    color: white;
}

/* Logo et branding */
.nav-brand {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    font-size: 1.25rem;
    font-weight: 700;
    letter-spacing: 0.025em;
}

.nav-brand-icon {
    color: var(--indigo-400);
    font-size: 1.5rem;
}

/* ========================================
   CARDS ET CONTAINERS
   ======================================== */

/* Cards sombres */
.card-dark {
    background: var(--gray-800);
    border-radius: var(--radius-xl);
    box-shadow: var(--shadow-lg);
    transition: all var(--transition-normal);
    border: 1px solid var(--gray-700);
}

.card-dark:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-xl);
    background: var(--gray-700);
}

/* Cards claires modernes */
.card-light {
    background: linear-gradient(145deg, rgba(255, 255, 255, 0.15), rgba(255, 255, 255, 0.05));
    backdrop-filter: blur(20px);
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: var(--radius-2xl);
    box-shadow: 
        0 8px 32px rgba(0, 0, 0, 0.1),
        inset 0 1px 0 rgba(255, 255, 255, 0.2);
    transition: all var(--transition-normal);
    color: white;
    position: relative;
    overflow: hidden;
}

.card-light::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.1), transparent);
    transition: left 0.6s ease;
}

.card-light:hover {
    transform: translateY(-10px) scale(1.02);
    box-shadow: 
        0 20px 40px rgba(0, 0, 0, 0.15),
        0 0 30px rgba(79, 70, 229, 0.2),
        inset 0 1px 0 rgba(255, 255, 255, 0.3);
    background: linear-gradient(145deg, rgba(255, 255, 255, 0.2), rgba(255, 255, 255, 0.1));
    border-color: rgba(255, 255, 255, 0.3);
}

.card-light:hover::before {
    left: 100%;
}

/* Container principal */
.container-main {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 1.5rem;
}

.container-narrow {
    max-width: 800px;
    margin: 0 auto;
    padding: 0 1.5rem;
}

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

/* Bouton primaire moderne */
.btn-primary {
    background: linear-gradient(135deg, var(--primary-color) 0%, var(--secondary-color) 100%);
    color: white;
    padding: 1rem 2rem;
    border-radius: var(--radius-xl);
    font-weight: 600;
    font-size: 1rem;
    border: none;
    cursor: pointer;
    transition: all var(--transition-normal);
    display: inline-flex;
    align-items: center;
    gap: 0.75rem;
    text-decoration: none;
    position: relative;
    overflow: hidden;
    box-shadow: 0 4px 15px rgba(79, 70, 229, 0.3);
    letter-spacing: 0.025em;
}

.btn-primary::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.2), transparent);
    transition: left 0.5s;
}

.btn-primary:hover {
    transform: translateY(-3px);
    box-shadow: 0 12px 30px rgba(79, 70, 229, 0.4), 0 0 20px rgba(79, 70, 229, 0.2);
    background: linear-gradient(135deg, var(--primary-light) 0%, var(--secondary-color) 100%);
}

.btn-primary:hover::before {
    left: 100%;
}

.btn-primary:active {
    transform: translateY(-1px);
    box-shadow: 0 6px 20px rgba(79, 70, 229, 0.3);
}

/* Bouton secondaire moderne */
.btn-secondary {
    background: linear-gradient(145deg, rgba(255, 255, 255, 0.15), rgba(255, 255, 255, 0.05));
    backdrop-filter: blur(10px);
    border: 2px solid rgba(255, 255, 255, 0.2);
    color: white;
    padding: 1rem 2rem;
    border-radius: var(--radius-xl);
    font-weight: 600;
    font-size: 1rem;
    cursor: pointer;
    transition: all var(--transition-normal);
    display: inline-flex;
    align-items: center;
    gap: 0.75rem;
    text-decoration: none;
    letter-spacing: 0.025em;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
}

.btn-secondary:hover {
    background: linear-gradient(145deg, rgba(255, 255, 255, 0.25), rgba(255, 255, 255, 0.1));
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.15);
    border-color: rgba(255, 255, 255, 0.3);
}

.btn-secondary:active {
    transform: translateY(0);
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
}

/* Bouton danger moderne */
.btn-danger {
    background: linear-gradient(135deg, var(--error-color) 0%, #dc2626 100%);
    color: white;
    padding: 1rem 2rem;
    border-radius: var(--radius-xl);
    font-weight: 600;
    font-size: 1rem;
    border: none;
    cursor: pointer;
    transition: all var(--transition-normal);
    box-shadow: 0 4px 15px rgba(239, 68, 68, 0.3);
    letter-spacing: 0.025em;
}

.btn-danger:hover {
    background: linear-gradient(135deg, #dc2626 0%, #b91c1c 100%);
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(239, 68, 68, 0.4);
}

.btn-danger:active {
    transform: translateY(0);
    box-shadow: 0 4px 15px rgba(239, 68, 68, 0.3);
}

/* Bouton de fichier stylisé */
.btn-file {
    position: relative;
    display: inline-block;
    cursor: pointer;
}

.btn-file input[type=file] {
    position: absolute;
    opacity: 0;
    width: 100%;
    height: 100%;
    cursor: pointer;
}

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

/* Champs de formulaire sombres */
.form-input-dark {
    width: 100%;
    padding: 1rem 1.25rem;
    background: linear-gradient(145deg, var(--gray-800), var(--gray-700));
    border: 2px solid var(--gray-600);
    border-radius: var(--radius-xl);
    color: white;
    font-size: 1rem;
    font-weight: 500;
    transition: all var(--transition-normal);
    box-shadow: inset 0 2px 4px rgba(0, 0, 0, 0.1);
}

.form-input-dark:focus {
    outline: none;
    border-color: var(--indigo-500);
    box-shadow: 0 0 0 4px rgba(99, 102, 241, 0.15), inset 0 2px 4px rgba(0, 0, 0, 0.1);
    background: linear-gradient(145deg, var(--gray-700), var(--gray-600));
    transform: translateY(-1px);
}

.form-input-dark::placeholder {
    color: var(--gray-400);
    font-weight: 400;
}



/* Champs de formulaire clairs - Design moderne */
.form-input-light {
    width: 100%;
    padding: 1rem 1.25rem;
    background: linear-gradient(145deg, rgba(255, 255, 255, 0.15), rgba(255, 255, 255, 0.05));
    border: 2px solid rgba(255, 255, 255, 0.2);
    border-radius: var(--radius-xl);
    color: white;
    font-size: 1rem;
    font-weight: 500;
    transition: all var(--transition-normal);
    backdrop-filter: blur(10px);
    box-shadow: inset 0 2px 4px rgba(0, 0, 0, 0.1), 0 4px 6px rgba(0, 0, 0, 0.1);
}

.form-input-light:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 4px rgba(79, 70, 229, 0.2), inset 0 2px 4px rgba(0, 0, 0, 0.1), 0 8px 16px rgba(0, 0, 0, 0.15);
    background: linear-gradient(145deg, rgba(255, 255, 255, 0.25), rgba(255, 255, 255, 0.1));
    transform: translateY(-2px);
}

.form-input-light::placeholder {
    color: rgba(255, 255, 255, 0.6);
    font-weight: 400;
}

/* Labels modernes */
.form-label {
    display: block;
    font-weight: 600;
    margin-bottom: 0.75rem;
    color: var(--indigo-300);
    font-size: 0.95rem;
    letter-spacing: 0.025em;
    text-transform: uppercase;
    font-size: 0.875rem;
}

.form-label-light {
    color: rgba(255, 255, 255, 0.95);
    font-weight: 600;
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.1);
}

/* Groupes de formulaire avec espacement moderne */
.form-group {
    margin-bottom: 2rem;
    position: relative;
}

/* Messages d'aide */
.form-help {
    font-size: 0.875rem;
    color: var(--gray-400);
    margin-top: 0.5rem;
    font-style: italic;
}

/* Style spécial pour les champs de fichier */
.form-input-light[type="file"] {
    padding: 0;
    text-align: left;
    border: none;
    background: transparent;
    cursor: pointer;
    position: static;
    overflow: visible;
    color: transparent; /* masque le texte du champ (chemin + icône) */
}

.form-input-light[type="file"]:hover {
    background: transparent;
}

.form-input-light[type="file"]::before {
    content: none;
}

/* Affiche et stylise uniquement le bouton natif "Choisir un fichier" */
.form-input-light[type="file"]::file-selector-button {
    background: linear-gradient(135deg, var(--primary-color) 0%, var(--secondary-color) 100%);
    color: #fff;
    padding: 0.6rem 1rem;
    border: none;
    border-radius: var(--radius-lg);
    font-weight: 600;
    cursor: pointer;
    box-shadow: 0 4px 10px rgba(79, 70, 229, 0.25);
}

.form-input-light[type="file"]::file-selector-button:hover {
    background: linear-gradient(135deg, var(--primary-light) 0%, var(--secondary-color) 100%);
}

/* Compatibilité WebKit anciens (Chrome/Safari) */
.form-input-light[type="file"]::-webkit-file-upload-button {
    background: linear-gradient(135deg, var(--primary-color) 0%, var(--secondary-color) 100%);
    color: #fff;
    padding: 0.6rem 1rem;
    border: none;
    border-radius: var(--radius-lg);
    font-weight: 600;
    cursor: pointer;
    box-shadow: 0 4px 10px rgba(79, 70, 229, 0.25);
}

.form-input-light[type="file"]::-webkit-file-upload-button:hover {
    background: linear-gradient(135deg, var(--primary-light) 0%, var(--secondary-color) 100%);
}

/* Style pour les textarea */
.form-input-light[rows] {
    min-height: 120px;
    resize: vertical;
    line-height: 1.6;
}

/* Animation pour les champs focus */
@keyframes formFieldGlow {
    0% { box-shadow: 0 0 0 4px rgba(79, 70, 229, 0.2); }
    50% { box-shadow: 0 0 0 6px rgba(79, 70, 229, 0.3); }
    100% { box-shadow: 0 0 0 4px rgba(79, 70, 229, 0.2); }
}

.form-input-light:focus {
    animation: formFieldGlow 2s ease-in-out infinite;
}

/* ========================================
   EFFETS VISUELS MODERNES
   ======================================== */

/* Effet de verre */
.glass {
    background: rgba(255, 255, 255, 0.05);
    backdrop-filter: blur(12px);
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.glass-light {
    background: linear-gradient(145deg, rgba(255, 255, 255, 0.15), rgba(255, 255, 255, 0.05));
    backdrop-filter: blur(20px);
    border: 1px solid rgba(255, 255, 255, 0.2);
    box-shadow: 
        0 8px 32px rgba(0, 0, 0, 0.1),
        inset 0 1px 0 rgba(255, 255, 255, 0.2);
}

/* Effet de verre amélioré pour les formulaires */
.glass-form {
    background: linear-gradient(145deg, rgba(255, 255, 255, 0.12), rgba(255, 255, 255, 0.06));
    backdrop-filter: blur(25px);
    border: 1px solid rgba(255, 255, 255, 0.25);
    box-shadow: 
        0 8px 32px rgba(0, 0, 0, 0.12),
        inset 0 1px 0 rgba(255, 255, 255, 0.3),
        0 0 20px rgba(79, 70, 229, 0.1);
}

/* Gradient de texte */
.text-gradient {
    background: linear-gradient(135deg, var(--primary-color) 0%, var(--secondary-color) 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

/* Animation flottante */
.floating {
    animation: floating 3s ease-in-out infinite;
}

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

/* Animation de pulsation */
.pulse-glow {
    animation: pulse-glow 2s ease-in-out infinite alternate;
}

@keyframes pulse-glow {
    from { box-shadow: 0 0 20px rgba(102, 126, 234, 0.4); }
    to { box-shadow: 0 0 30px rgba(102, 126, 234, 0.8); }
}

/* ========================================
   GRILLES ET LAYOUTS
   ======================================== */

/* Grille responsive */
.grid-responsive {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 1.5rem;
}

.grid-2 {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 1.5rem;
}

.grid-3 {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 1.5rem;
}

.grid-4 {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
    gap: 1rem;
}

/* ========================================
   ICÔNES ET ÉLÉMENTS VISUELS
   ======================================== */

/* Icônes avec espacement */
.icon-with-text {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.icon-large {
    font-size: 1.5rem;
    color: var(--indigo-400);
}

.icon-medium {
    font-size: 1.25rem;
    color: var(--indigo-400);
}

/* ========================================
   MESSAGES ET ALERTES
   ======================================== */

/* Messages de succès */
.alert-success {
    background: rgba(16, 185, 129, 0.1);
    border: 1px solid var(--success-color);
    color: #10b981;
    padding: 1rem;
    border-radius: var(--radius-lg);
    margin-bottom: 1rem;
}

/* Messages d'erreur */
.alert-error {
    background: rgba(239, 68, 68, 0.1);
    border: 1px solid var(--error-color);
    color: #ef4444;
    padding: 1rem;
    border-radius: var(--radius-lg);
    margin-bottom: 1rem;
}

/* Messages d'avertissement */
.alert-warning {
    background: rgba(245, 158, 11, 0.1);
    border: 1px solid var(--warning-color);
    color: #f59e0b;
    padding: 1rem;
    border-radius: var(--radius-lg);
    margin-bottom: 1rem;
}

/* Messages d'information */
.alert-info {
    background: rgba(59, 130, 246, 0.1);
    border: 1px solid var(--info-color);
    color: #3b82f6;
    padding: 1rem;
    border-radius: var(--radius-lg);
    margin-bottom: 1rem;
}

/* ========================================
   SYSTÈME D'UPLOAD D'IMAGES MODERNE
   ======================================== */

.image-upload-container {
    margin-top: 1rem;
}

.image-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 1.5rem;
    align-items: start;
}

/* Zone d'upload principale */
.image-upload-zone {
    background: linear-gradient(145deg, var(--gray-700), var(--gray-800));
    border: 2px dashed var(--gray-500);
    border-radius: var(--radius-xl);
    padding: 2rem;
    text-align: center;
    cursor: pointer;
    transition: all var(--transition-normal);
    min-height: 200px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    position: relative;
}

.image-upload-zone:hover {
    border-color: var(--primary-color);
    background: linear-gradient(145deg, var(--gray-600), var(--gray-700));
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.2);
}

.image-upload-zone.drag-over {
    border-color: var(--primary-color);
    background: linear-gradient(145deg, var(--gray-600), var(--gray-700));
    box-shadow: 0 0 20px rgba(79, 70, 229, 0.3);
}

.upload-icon {
    font-size: 3rem;
    color: var(--gray-400);
    margin-bottom: 1rem;
    font-weight: 300;
    transition: all var(--transition-normal);
}

.image-upload-zone:hover .upload-icon {
    color: var(--primary-color);
    transform: scale(1.1);
}

.image-upload-zone p {
    color: var(--gray-300);
    font-size: 0.95rem;
    margin: 0;
}

/* Aperçu des images uploadées */
.image-preview-item {
    background: linear-gradient(145deg, var(--gray-700), var(--gray-800));
    border: 1px solid var(--gray-600);
    border-radius: var(--radius-xl);
    overflow: hidden;
    transition: all var(--transition-normal);
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
}

.image-preview-item:hover {
    transform: translateY(-4px);
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.2);
    border-color: var(--primary-color);
}

.image-preview-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0.75rem 1rem;
    background: linear-gradient(145deg, var(--gray-800), var(--gray-700));
    border-bottom: 1px solid var(--gray-600);
}

.image-number {
    color: var(--gray-300);
    font-weight: 600;
    font-size: 0.9rem;
}

.remove-image-btn {
    background: var(--error-color);
    color: white;
    border: none;
    border-radius: 50%;
    width: 24px;
    height: 24px;
    cursor: pointer;
    font-size: 1rem;
    font-weight: bold;
    transition: all var(--transition-normal);
    display: flex;
    align-items: center;
    justify-content: center;
}

.remove-image-btn:hover {
    background: #dc2626;
    transform: scale(1.1);
}

.image-preview-content {
    padding: 1rem;
}

.preview-image {
    width: 100%;
    height: 150px;
    object-fit: cover;
    border-radius: var(--radius-lg);
    margin-bottom: 1rem;
    border: 1px solid var(--gray-600);
    transition: all var(--transition-normal);
}

.preview-image:hover {
    transform: scale(1.02);
    border-color: var(--primary-color);
}

.image-details > * + * {
    margin-top: 1rem; /* remplace l'utilisation invalide de space-y */
}

/* Champs de formulaire pour les légendes */
.form-input-small {
    width: 100%;
    padding: 0.5rem 0.75rem;
    background: var(--gray-800);
    border: 1px solid var(--gray-600);
    border-radius: var(--radius-md);
    color: white;
    font-size: 0.9rem;
    transition: all var(--transition-normal);
}

.form-input-small:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(79, 70, 229, 0.1);
}

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

.form-label-small {
    display: block;
    font-weight: 600;
    margin-bottom: 0.5rem;
    color: var(--gray-300);
    font-size: 0.8rem;
    text-transform: uppercase;
    letter-spacing: 0.025em;
}

/* Responsive */
@media (max-width: 768px) {
    .image-grid {
        grid-template-columns: 1fr;
    }
    
    .image-upload-zone {
        min-height: 150px;
        padding: 1.5rem;
    }
    
    .upload-icon {
        font-size: 2.5rem;
    }
}

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

/* Espacement */
.mt-8 { margin-top: 2rem; }
.mb-8 { margin-bottom: 2rem; }
.py-10 { padding-top: 2.5rem; padding-bottom: 2.5rem; }
.px-6 { padding-left: 1.5rem; padding-right: 1.5rem; }

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

/* Flexbox */
.flex { display: flex; }
.flex-col { flex-direction: column; }
.items-center { align-items: center; }
.justify-center { justify-content: center; }
.justify-between { justify-content: space-between; }

/* Transitions */
.transition { transition: all var(--transition-normal); }
.transition-fast { transition: all var(--transition-fast); }
.transition-slow { transition: all var(--transition-slow); }

/* ========================================
   RESPONSIVE
   ======================================== */

@media (max-width: 768px) {
    .container-main,
    .container-narrow {
        padding: 0 1rem;
    }
    
    .grid-responsive {
        grid-template-columns: 1fr;
    }
    
    .nav-brand {
        font-size: 1rem;
    }
    
    .btn-primary,
    .btn-secondary {
        padding: 0.5rem 1rem;
        font-size: 0.875rem;
    }
}

@media (max-width: 480px) {
    .card-dark,
    .card-light {
        padding: 1rem;
    }
    
    .form-input-dark,
    .form-input-light {
        padding: 0.5rem 0.75rem;
    }
}

/* ========================================
   ANIMATIONS PERSONNALISÉES
   ======================================== */

/* Fade in */
@keyframes fadeIn {
    from { opacity: 0; transform: translateY(20px); }
    to { opacity: 1; transform: translateY(0); }
}

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

/* Slide in from left */
@keyframes slideInLeft {
    from { opacity: 0; transform: translateX(-30px); }
    to { opacity: 1; transform: translateX(0); }
}

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

/* Slide in from right */
@keyframes slideInRight {
    from { opacity: 0; transform: translateX(30px); }
    to { opacity: 1; transform: translateX(0); }
}

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

/* ========================================
   THÈMES SPÉCIAUX
   ======================================== */

/* Thème médical */
.theme-medical {
    --primary-color: #3b82f6;
    --secondary-color: #1e40af;
    --accent-color: #06b6d4;
}

/* Thème académique */
.theme-academic {
    --primary-color: #8b5cf6;
    --secondary-color: #6d28d9;
    --accent-color: #ec4899;
}

/* ========================================
   ACCESSIBILITÉ
   ======================================== */

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

/* Réduction des animations pour les utilisateurs qui les préfèrent */
@media (prefers-reduced-motion: reduce) {
    * {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
}

/* Mode sombre système */
@media (prefers-color-scheme: dark) {
    .light-layout {
        background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
        color: white;
    }
    
    .card-light {
        background: rgba(255, 255, 255, 0.1);
        border-color: rgba(255, 255, 255, 0.2);
    }
} 
.form-large {
    max-width: 1000px;
    width: 100%;
    margin: 0 auto;
    padding: 2rem;
}

/* ========================================
   STYLES SPÉCIFIQUES - TABLEAU DES ARTICLES
   ======================================== */

/* Header avec navigation */
.header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1rem 2rem;
    background-color: white;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
    position: sticky;
    top: 0;
    z-index: 100;
}

.user-info {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.user-name {
    font-weight: 500;
    color: var(--dark-color);
}

.btn-dashboard {
    padding: 0.5rem 1rem;
    background-color: var(--primary-color);
    color: white;
    border: none;
    border-radius: 6px;
    cursor: pointer;
    font-weight: 500;
    transition: all 0.3s ease;
    text-decoration: none;
    display: inline-block;
}

.btn-dashboard:hover {
    background-color: var(--secondary-color);
    transform: translateY(-2px);
}

/* Switchers pour filtrer les articles */
.switchers {
    display: flex;
    gap: 1rem;
    margin-bottom: 2rem;
    justify-content: center;
    flex-wrap: wrap;
}

.switcher-btn {
    padding: 0.5rem 1.2rem;
    border: none;
    background: #e0e0e0;
    border-radius: 20px;
    cursor: pointer;
    font-weight: 500;
    transition: all 0.3s ease;
    text-decoration: none;
    color: var(--dark-color);
}

.switcher-btn.active {
    background: var(--primary-color);
    color: #fff;
    box-shadow: 0 4px 6px rgba(67, 97, 238, 0.2);
}

.switcher-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
}

/* Tableau des articles */
.articles-table {
    width: 100%;
    border-collapse: collapse;
    margin-bottom: 2rem;
    background-color: white;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.05);
}

.articles-table th, .articles-table td {
    border: 1px solid #e9ecef;
    padding: 0.75rem;
    vertical-align: top;
    text-align: left;
}

.articles-table th {
    background-color: #f8f9fa;
    font-weight: 500;
    color: var(--dark-color);
}

.articles-table tr:hover {
    background-color: #f8f9fa;
}

/* Colonnes spécifiques du tableau */
.articles-table th.titre, .articles-table td.titre {
    min-width: 220px;
    max-width: 320px;
}

.articles-table th.resume, .articles-table td.resume,
.articles-table th.abstract, .articles-table td.abstract {
    min-width: 200px;
    max-width: 350px;
}

.articles-table th.statut, .articles-table td.statut,
.articles-table th.date, .articles-table td.date,
.articles-table th.word, .articles-table td.word {
    min-width: 80px;
    max-width: 110px;
    text-align: center;
}

/* Aperçu des images dans le tableau */
.image-preview-table {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
}

.image-preview-table div {
    display: flex;
    flex-direction: column;
    align-items: center;
    width: 80px;
}

.image-preview-table img {
    width: 80px;
    height: 80px;
    object-fit: cover;
    border-radius: 6px;
    border: 1px solid #dee2e6;
    transition: transform 0.3s ease;
}

.image-preview-table img:hover {
    transform: scale(1.05);
}

.image-preview-table small {
    font-size: 0.7em;
    text-align: center;
    margin-top: 0.2em;
    color: #6c757d;
}

/* Bouton de téléchargement dans le tableau */
.articles-table .btn-secondary {
    padding: 0.4em 0.8em;
    background: var(--primary-color);
    color: #fff;
    border-radius: 6px;
    text-decoration: none;
    font-size: 0.9em;
    font-weight: 500;
    transition: all 0.3s ease;
}

.articles-table .btn-secondary:hover {
    background: var(--secondary-color);
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
}

/* Badges de statut colorés */
.status-badge {
    display: inline-block;
    padding: 0.25rem 0.5rem;
    border-radius: 12px;
    font-size: 0.8em;
    font-weight: 500;
}

.status-badge.accepted {
    background-color: #d1fae5;
    color: #065f46;
}

.status-badge.rejected {
    background-color: #fee2e2;
    color: #b91c1c;
}

.status-badge.modification {
    background-color: #fef3c7;
    color: #92400e;
}

.status-badge.pending {
    background-color: #e0e7ff;
    color: #3730a3;
}

/* Responsive pour le tableau */
@media (max-width: 768px) {
    .header {
        flex-direction: column;
        gap: 1rem;
        padding: 1rem;
    }
    
    .switchers {
        flex-direction: column;
        align-items: center;
    }
    
    .articles-table {
        display: block;
        overflow-x: auto;
    }
    
    .articles-table th.titre, .articles-table td.titre,
    .articles-table th.resume, .articles-table td.resume,
    .articles-table th.abstract, .articles-table td.abstract {
        min-width: 150px;
        max-width: 200px;
    }
}
.suggestions-box {
    background: white;
    color: black;
    border: 1px solid #ccc;
    max-height: 150px;
    overflow-y: auto;
    position: absolute;
    width: 100%;
    z-index: 10;
    margin-top: 4px;
    border-radius: 4px;
}

.suggestion-item {
    padding: 8px;
    cursor: pointer;
}

.suggestion-item:hover {
    background: #eee;
}

.selected-users {
    list-style: none;
    margin-top: 10px;
    padding: 0;
}

.selected-users li {
    display: inline-block;
    background: #333;
    color: white;
    padding: 6px 10px;
    margin-right: 6px;
    margin-top: 6px;
    border-radius: 20px;
    cursor: pointer;
    font-size: 0.9rem;
}
/* Ajoutez ceci dans votre balise <style> */
#wordTextContainer {
    max-height: 500px;
    overflow-y: auto;
    padding: 1rem;
    background-color: #f8f9fa;
    border-radius: 8px;
    border: 1px solid #e9ecef;
    margin-top: 1rem;
    transition: all 0.3s ease;
}

#wordTextContainer::-webkit-scrollbar {
    width: 8px;
}

#wordTextContainer::-webkit-scrollbar-track {
    background: #f1f1f1;
    border-radius: 10px;
}

#wordTextContainer::-webkit-scrollbar-thumb {
    background: #4361ee;
    border-radius: 10px;
}

#wordTextContainer::-webkit-scrollbar-thumb:hover {
    background: #3f37c9;
}
select.form-input-dark, 
select.form-input-dark option {
  background-color: #222 !important;
  color: #fff !important;
  border: 1px solid #444 !important;
}
/* Styles pour les keywords */
.keywords-search {
    position: relative;
    margin-bottom: 15px;
}

.selected-keywords {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-top: 15px;
    min-height: 40px;
    padding: 10px;
    border: 1px solid #e9ecef;
    border-radius: 8px;
    background: #f8f9fa;
}

.keyword-tag {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 6px 12px;
    background: #007bff;
    color: white;
    border-radius: 20px;
    font-size: 14px;
    font-weight: 500;
    box-shadow: 0 2px 4px rgba(0,123,255,0.2);
    transition: all 0.2s ease;
}

.keyword-tag:hover {
    background: #0056b3;
    transform: translateY(-1px);
    box-shadow: 0 4px 8px rgba(0,123,255,0.3);
}

.keyword-tag .remove-keyword {
    cursor: pointer;
    font-weight: bold;
    font-size: 16px;
    padding: 2px 4px;
    border-radius: 50%;
    transition: all 0.2s ease;
}

.keyword-tag .remove-keyword:hover {
    background: rgba(255,255,255,0.2);
}

.keyword-new {
    background: #28a745 !important;
}

.keyword-new:hover {
    background: #1e7e34 !important;
}
/*****************************/
.suggestions-box {
    max-height: 200px;
    overflow-y: auto;
    border: 1px solid #dee2e6;
    border-radius: 8px;
    background: #ffffff;
    margin-top: 5px;
    box-shadow: 0 4px 6px rgba(0,0,0,0.1);
}

.suggestion-item {
    padding: 12px;
    cursor: pointer;
    border-bottom: 1px solid #f1f3f4;
    transition: all 0.2s ease;
}

.suggestion-item:hover {
    background: #f8f9fa;
    transform: translateX(2px);
}

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

.suggestion-name {
    font-weight: bold;
    color: #2c3e50;
    margin-bottom: 2px;
}

.suggestion-email {
    font-size: 12px;
    color: #6c757d;
}

.suggestion-help {
    padding: 12px;
    color: #6c757d;
    font-style: italic;
    text-align: center;
    background: #f8f9fa;
    border-radius: 6px;
    margin: 4px;
}