/* 
 * style.css - Styles personnalisés Robot Rédacteur v8.2
 */

/* Variables globales */
:root {
    --primary: #3b82f6;
    --primary-dark: #2563eb;
    --secondary: #8b5cf6;
    --success: #10b981;
    --warning: #f59e0b;
    --danger: #ef4444;
    --gray-50: #f9fafb;
    --gray-100: #f3f4f6;
    --gray-800: #1f2937;
    --gray-900: #111827;
}

/* Body moderne */
body {
    font-family: 'Inter', 'system-ui', '-apple-system', sans-serif;
    background: #f9fafb;
    min-height: 100vh;
}

/* Navigation Items */
.nav-item {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.75rem 1rem;
    border-radius: 0.5rem;
    color: #cbd5e1;
    text-decoration: none;
    transition: all 0.2s ease;
    font-size: 0.9rem;
    font-weight: 500;
    cursor: pointer;
    border: none;
    background: transparent;
}

.nav-item:hover {
    background: rgba(59, 130, 246, 0.1);
    color: #60a5fa;
}

.nav-item.active {
    background: linear-gradient(90deg, #3b82f6 0%, #8b5cf6 100%);
    color: white;
    box-shadow: 0 4px 12px rgba(59, 130, 246, 0.3);
}

.nav-item span:first-child {
    flex-shrink: 0;
}

/* Section Headers */
.nav-section {
    padding: 1rem 1rem 0.5rem;
    font-size: 0.65rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    color: #64748b;
    margin-top: 0.5rem;
}

.nav-section:first-child {
    margin-top: 0;
}

/* Animations de chargement */
@keyframes pulse {
    0%, 100% {
        opacity: 1;
    }
    50% {
        opacity: 0.5;
    }
}

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

/* Progress bar animation */
@keyframes progress {
    0% {
        width: 0%;
    }
}

/* Scrollbar personnalisée pour les logs */
#logs-container::-webkit-scrollbar {
    width: 8px;
    height: 8px;
}

#logs-container::-webkit-scrollbar-track {
    background: #1a1a1a;
}

#logs-container::-webkit-scrollbar-thumb {
    background: #4ade80;
    border-radius: 4px;
}

#logs-container::-webkit-scrollbar-thumb:hover {
    background: #22c55e;
}

/* Highlight pour les logs */
.log-line {
    word-wrap: break-word;
    white-space: pre-wrap;
    font-family: 'Courier New', 'Consolas', monospace;
    letter-spacing: -0.02em;
}

/* Amélioration visuelle des logs */
.log-line:hover {
    background-color: rgba(75, 85, 99, 0.3);
}

/* Toast notifications (pour usage futur) */
.toast {
    position: fixed;
    bottom: 20px;
    right: 20px;
    background: #1f2937;
    color: white;
    padding: 16px 24px;
    border-radius: 8px;
    box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.1);
    z-index: 1000;
    animation: slideIn 0.3s ease;
}

@keyframes slideIn {
    from {
        transform: translateX(100%);
        opacity: 0;
    }
    to {
        transform: translateX(0);
        opacity: 1;
    }
}

/* Cards hover effect */
.hover-lift {
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.hover-lift:hover {
    transform: translateY(-2px);
    box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.1);
}

/* Badge status */
.badge-status {
    display: inline-flex;
    align-items: center;
    padding: 4px 12px;
    border-radius: 9999px;
    font-size: 0.75rem;
    font-weight: 600;
}

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

.badge-status.running {
    background: #dbeafe;
    color: #1e40af;
}

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

.badge-status.failed {
    background: #fee2e2;
    color: #991b1b;
}

/* Loading spinner */
.spinner {
    border: 2px solid #f3f4f6;
    border-top: 2px solid #3b82f6;
    border-radius: 50%;
    width: 20px;
    height: 20px;
    animation: spin 1s linear infinite;
    display: inline-block;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* Code blocks */
code {
    background: #f3f4f6;
    padding: 2px 6px;
    border-radius: 4px;
    font-family: 'Courier New', monospace;
    font-size: 0.875rem;
}

/* ============================================
   RESPONSIVE DESIGN - Mobile & Tablette v8.2
   ============================================ */

/* Tablette (768px - 1023px) */
@media (max-width: 1023px) and (min-width: 768px) {
    /* Réduire l'espacement */
    .container {
        padding-left: 1.5rem;
        padding-right: 1.5rem;
    }
    
    /* Grids : 2 colonnes au lieu de 4 */
    .grid-cols-4 {
        grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
    }
    
    .grid-cols-3 {
        grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
    }
}

/* Mobile (< 768px) */
@media (max-width: 767px) {
    /* Container plus compact */
    .container {
        padding-left: 1rem;
        padding-right: 1rem;
    }
    
    /* Grids : 1 colonne */
    .grid {
        grid-template-columns: 1fr !important;
    }
    
    .md\:grid-cols-2,
    .md\:grid-cols-3,
    .md\:grid-cols-4,
    .grid-cols-2,
    .grid-cols-3,
    .grid-cols-4 {
        grid-template-columns: 1fr !important;
    }
    
    /* Tableaux : scroll horizontal */
    table {
        display: block;
        overflow-x: auto;
        white-space: nowrap;
    }
    
    /* Cartes : pleine largeur */
    .max-w-2xl,
    .max-w-3xl,
    .max-w-4xl,
    .max-w-5xl,
    .max-w-6xl {
        max-width: 100% !important;
    }
    
    /* Texte plus petit */
    h1, .text-3xl {
        font-size: 1.5rem !important;
    }
    
    h2, .text-2xl {
        font-size: 1.25rem !important;
    }
    
    h3, .text-xl {
        font-size: 1.125rem !important;
    }
    
    /* Boutons : pleine largeur sur mobile */
    .btn-full-mobile {
        width: 100% !important;
    }
    
    /* Formulaires : inputs pleine largeur */
    input[type="text"],
    input[type="password"],
    input[type="email"],
    input[type="number"],
    select,
    textarea {
        font-size: 16px; /* Éviter le zoom iOS */
    }
    
    /* Espacements réduits */
    .p-6 {
        padding: 1rem !important;
    }
    
    .p-8 {
        padding: 1.5rem !important;
    }
    
    .gap-6 {
        gap: 1rem !important;
    }
    
    /* Masquer certains éléments sur mobile */
    .hide-mobile {
        display: none !important;
    }
}

/* Petit mobile (< 480px) */
@media (max-width: 479px) {
    /* Sidebar plus étroite sur très petits écrans */
    #sidebar {
        width: 80vw !important;
        max-width: 280px;
    }
    
    /* Texte encore plus compact */
    .text-sm {
        font-size: 0.8rem !important;
    }
    
    /* Padding minimal */
    .p-4 {
        padding: 0.75rem !important;
    }
    
    /* Boutons plus petits */
    button, .btn {
        padding: 0.5rem 1rem !important;
        font-size: 0.875rem !important;
    }
}

/* Print styles */
@media print {
    nav, footer, .no-print {
        display: none;
    }
    
    body {
        background: white;
    }
    
    .container {
        max-width: 100%;
    }
}

