/* --- 1. RESET & STRUCTURE GLOBALE --- */
* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

body {
    /* Nouvelle font "Plus Jakarta Sans" */
    font-family: 'Plus Jakarta Sans', sans-serif;
    
    background-color: #f4f6f9;
    color: #333;
    height: 100vh;
    overflow: hidden;
    display: block;
    
    /* Rendu du texte plus net (Premium feel) */
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

/* On ajuste aussi les titres pour qu'ils soient plus serrés (Style moderne) */
h1, h2, h3, .logo-area {
    letter-spacing: -0.5px; /* Tendance actuelle : titres légèrement plus serrés */
}

/* Le conteneur qui tient le Menu + Le Contenu */
.app-container {
    display: flex;
    height: 100%;
    width: 100%;
}

.logo {
    width: 10vw;
}

/* --- 2. SIDEBAR (MENU GAUCHE) --- */
.sidebar {
    width: 260px;
    background-color: #1e1e2d; /* Ton style "Dark" */
    color: white;
    display: flex;
    flex-direction: column;
    padding: 20px;
    flex-shrink: 0;
}

.logo-area {
    font-size: 20px;
    font-weight: bold;
    margin-bottom: 40px;
    color: #ffffff;
    display: flex;
    align-items: center;
    gap: 10px;
    align-self: center;
}

.menu-item {
    text-decoration: none;
    color: #a2a3b7; /* Gris clair */
    padding: 12px 15px;
    border-radius: 8px;
    margin-bottom: 5px;
    transition: 0.3s;
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 15px;
}

.menu-item:hover {
    background-color: #2b2b40;
    color: white;
}

.menu-item.active {
    background-color: #13131c; /* Ton bleu actuel */
    color: white;
}

.menu-footer {
    margin-top: auto;
    padding-top: 20px;
    border-top: 1px solid #2b2b40;
    font-size: 12px;
    color: #555;
    text-align: center;
}

/* --- 3. CONTENU PRINCIPAL (DROITE) --- */
.main-content {
    flex: 1;
    overflow-y: auto; /* Scroll indépendant */
    padding: 30px;
}

.header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 30px;
}

h1 { font-size: 24px; color: #181c32; margin-bottom: 5px; }
h2, h3 { color: #181c32; margin-bottom: 15px; font-size: 1.2rem; }

a {
    color: black;
}

/* --- 4. CARTES (Anciennement .container) --- */
/* C'est ici qu'on reprend ton style de "boîte blanche" */
.card {
    background: white;
    padding: 25px;
    border-radius: 12px;
    box-shadow: 0 4px 15px rgba(0,0,0,0.05); /* Ton ombre légère */
    margin-bottom: 20px;
    width: 100%; /* Prend toute la largeur disponible */
}

/* --- 5. INPUTS & BOUTONS (Tes styles conservés) --- */
.input-group {
    margin-bottom: 1.5rem;
    text-align: left;
}

label {
    display: block;
    margin-bottom: 0.5rem;
    font-weight: 600;
    color: #444;
}

input[type="file"] {
    display: block;
    width: 100%;
    padding: 0.8rem; /* Un peu plus grand pour le confort */
    border: 1px solid #ddd;
    border-radius: 6px;
    background: #fafafa;
    cursor: pointer;
}

button {
    background-color: #1159F5; /* Ton bleu */
    color: white;
    border: none;
    padding: 0.8rem 1.5rem;
    border-radius: 6px;
    font-size: 1rem;
    cursor: pointer;
    font-weight: 600;
    transition: background 0.3s;
    width: 100%; /* Bouton pleine largeur */
}

button:hover { background-color: #0f4ed4; }

button.danger { background-color: #dc3545; }
button.danger:hover { background-color: #c82333; }

/* --- 6. TABLEAUX & STATUS --- */
.status { 
    margin-top: 1.5rem; 
    padding: 15px; 
    border-radius: 8px; 
    font-size: 0.95rem; 
    display: none; /* Caché par défaut */
}

.status.success { 
    background-color: #d4edda; 
    color: #155724; 
    display: block; 
}

.status.error { 
    background-color: #f8d7da; 
    color: #721c24; 
    display: block; 
}

table { width: 100%; border-collapse: collapse; margin-top: 10px; }
th { text-align: left; padding: 12px; color: #888; font-size: 12px; text-transform: uppercase; border-bottom: 2px solid #eee; }
td { padding: 12px; border-bottom: 1px solid #eee; font-size: 14px; }

/* --- STYLE DASHBOARD "PRODUCT HUNT" --- */

/* Le Header avec un sous-titre plus sexy */
.hero-header {
    margin-bottom: 40px;
}
.hero-header h1 {
    font-weight: 800; /* Très gras */
    font-size: 28px;
    background: -webkit-linear-gradient(45deg, #1e1e2d, #3699ff); /* Dégradé subtil sur le texte */
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    margin-bottom: 10px;
}
.hero-header p {
    color: #7e8299;
    font-size: 16px;
    max-width: 600px;
}

/* Le Stepper (Guide 1-2-3) */
.stepper {
    display: flex;
    gap: 30px;
    margin-bottom: 40px;
    background: white;
    padding: 20px;
    border-radius: 12px;
    box-shadow: 0 4px 15px rgba(0,0,0,0.03);
}
.step {
    display: flex;
    align-items: center;
    gap: 12px;
    flex: 1;
}
.step-icon {
    width: 40px;
    height: 40px;
    background-color: #f3f6f9;
    color: #3699ff;
    border-radius: 50%; /* Rond */
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: bold;
    font-size: 18px;
}
.step-text h4 { margin: 0; font-size: 14px; font-weight: 700; }
.step-text p { margin: 0; font-size: 12px; color: #a1a5b7; }

/* Les "Dropzones" (Zones de fichiers modernes) */
.upload-grid {
    display: grid;
    grid-template-columns: 1fr 1fr; /* 2 colonnes */
    gap: 20px;
    margin-bottom: 30px;
}

.dropzone {
    border: 2px dashed #e4e6ef;
    border-radius: 12px;
    padding: 30px;
    text-align: center;
    background: #ffffff;
    transition: all 0.3s;
    cursor: pointer;
    position: relative;
}

.dropzone:hover {
    border-color: #3699ff;
    background: #f9faff;
    transform: translateY(-2px); /* Petit effet de levitation */
}

.dropzone i {
    font-size: 40px;
    margin-bottom: 15px;
    display: block;
}

.dropzone h3 { font-size: 16px; margin-bottom: 5px; }
.dropzone p { font-size: 12px; color: #b5b5c3; margin-bottom: 0; }

/* On cache l'input moche par défaut mais il reste cliquable via le label */
.dropzone input[type="file"] {
    position: absolute;
    top: 0; left: 0; width: 100%; height: 100%;
    opacity: 0;
    cursor: pointer;
}

/* Le bouton Demo */
.demo-link {
    text-align: center;
    margin-top: 20px;
    font-size: 13px;
    color: #b5b5c3;
}
.demo-link a { color: #3699ff; text-decoration: none; font-weight: 600; }

/* --- MODALE (POP-UP) --- */
.modal {
    display: none; /* Caché par défaut */
    position: fixed;
    z-index: 1000;
    left: 0; top: 0;
    width: 100%; height: 100%;
    background-color: rgba(0, 0, 0, 0.6); /* Fond sombre transparent */
    backdrop-filter: blur(5px); /* Effet flou derrière */
    align-items: center;
    justify-content: center;
}

.modal-content {
    background-color: white;
    width: 90%;
    max-width: 600px;
    border-radius: 12px;
    box-shadow: 0 15px 40px rgba(0,0,0,0.2);
    animation: slideUp 0.3s ease-out;
    overflow: hidden;
}

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

.modal-header {
    background: #f8f9fa;
    padding: 15px 20px;
    border-bottom: 1px solid #eee;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.modal-header h2 { margin: 0; font-size: 18px; color: #181c32; }

.close-btn {
    font-size: 24px; font-weight: bold; color: #aaa; cursor: pointer;
}
.close-btn:hover { color: #333; }

.modal-body {
    padding: 25px;
    font-size: 15px;
    line-height: 1.6;
    color: #444;
    max-height: 70vh; /* Si le texte est long, on scroll */
    overflow-y: auto;
}

/* Bouton IA dans le tableau */
.btn-ai {
    background-color: #f3f0ff;
    color: #8A2BE2;
    border: 1px solid #e0d4fc;
    padding: 6px 12px;
    border-radius: 6px;
    cursor: pointer;
    transition: all 0.2s;
    margin-right: 5px;
}
.btn-ai:hover {
    background-color: #8A2BE2;
    color: white;
    box-shadow: 0 4px 10px rgba(138, 43, 226, 0.3);
}

table {
    text-align-last: center;
}