/* assets/css/style.css */

:root {
    /* Palette de couleurs "Cyber Consultant" */
    --primary-color: #0f172a;   /* Bleu nuit très foncé (Fond header) */
    --accent-color: #0ea5e9;    /* Cyan électrique (Boutons, Liens) */
    --text-main: #334155;       /* Gris foncé lisible */
    --text-light: #f8fafc;      /* Blanc cassé (Texte sur fond foncé) */
    --bg-body: #f1f5f9;         /* Gris très pâle (Fond de page) */
    --card-bg: #ffffff;         /* Blanc pur (Fond des modules) */
    
    /* Dimensions */
    --header-height: 70px;
    --footer-height: 60px;
    --container-width: 1200px;
}

* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

body {
    font-family: 'Segoe UI', Roboto, 'Helvetica Neue', sans-serif;
    background-color: var(--bg-body);
    color: var(--text-main);
    display: flex;
    flex-direction: column;
    min-height: 100vh; /* Force le footer en bas */
    line-height: 1.6;
}

/* --- HEADER --- */
.site-header {
    background-color: var(--primary-color);
    color: var(--text-light);
    height: var(--header-height);
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
    position: sticky;
    top: 0;
    z-index: 100;
}

.header-container {
    max-width: var(--container-width);
    margin: 0 auto;
    height: 100%;
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0 20px;
}

.brand-logo {
    font-weight: 700;
    font-size: 1.2rem;
    letter-spacing: 0.5px;
    text-decoration: none;
    color: var(--text-light);
    display: flex;
    align-items: center;
    gap: 10px;
}

.brand-subtitle {
    font-weight: 300;
    font-size: 0.85rem;
    opacity: 0.8;
    border-left: 1px solid #475569;
    padding-left: 10px;
    margin-left: 10px;
}

.user-nav a {
    color: var(--text-light);
    text-decoration: none;
    font-size: 0.9rem;
    padding: 8px 16px;
    border: 1px solid rgba(255,255,255,0.2);
    border-radius: 4px;
    transition: all 0.3s ease;
}

.user-nav a:hover {
    border-color: var(--accent-color);
    color: var(--accent-color);
}

/* --- MAIN CONTENT (REACT ROOT) --- */
#root {
    flex: 1; /* Pousse le footer vers le bas */
    width: 100%;
    max-width: var(--container-width);
    margin: 30px auto;
    padding: 0 20px;
}

/* Classes utilitaires pour vos composants React */
.card {
    background: var(--card-bg);
    border-radius: 8px;
    padding: 30px;
    box-shadow: 0 1px 3px 0 rgba(0, 0, 0, 0.1);
    margin-bottom: 20px;
    border-top: 4px solid var(--accent-color); /* La petite touche pro */
}

h1, h2 { color: var(--primary-color); margin-bottom: 15px; }

/* --- FOOTER --- */
.site-footer {
    background-color: #e2e8f0;
    color: #64748b;
    height: var(--footer-height);
    font-size: 0.85rem;
    display: flex;
    align-items: center;
    justify-content: center;
    border-top: 1px solid #cbd5e1;
}

.footer-content {
    text-align: center;
}
/* --- AJOUT POUR LE DASHBOARD CENTRAL --- */

/* Le conteneur du texte d'intro */
.welcome-section {
    text-align: center;
    max-width: 800px;
    margin: 0 auto 40px auto;
}

.welcome-title {
    font-size: 2rem;
    color: var(--primary-color);
    margin-bottom: 10px;
}

.welcome-text {
    font-size: 1.1rem;
    color: #64748b;
}

/* La grille des 3 boutons */
.dashboard-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 30px;
    margin-top: 30px;
}

/* Le style des gros boutons (Cartes) */
.action-card {
    background: white;
    border: 1px solid #e2e8f0;
    border-radius: 12px;
    padding: 30px 20px;
    text-align: center;
    cursor: pointer;
    transition: all 0.3s ease;
    text-decoration: none; /* Pour si on utilise des balises <a> */
    color: var(--text-main);
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.05);
}

.action-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 15px -3px rgba(14, 165, 233, 0.2); /* Ombre bleutée au survol */
    border-color: var(--accent-color);
}

/* Les icônes dans les boutons */
.card-icon {
    font-size: 2.5rem;
    color: var(--accent-color);
    margin-bottom: 15px;
    display: block;
}

.card-title {
    font-weight: 700;
    font-size: 1.2rem;
    display: block;
    margin-bottom: 5px;
}

.card-desc {
    font-size: 0.9rem;
    color: #94a3b8;
}
/* --- STYLE DES CARTES DE FORMATION (Inspiré de votre image) --- */
.course-card {
    background: white;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 4px 15px rgba(0,0,0,0.05);
    transition: transform 0.3s ease;
    cursor: pointer;
    border: 1px solid #f1f5f9;
    position: relative;
}

.course-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 25px rgba(0,0,0,0.1);
}

.course-image-container {
    height: 160px;
    background-color: #0f172a;
    background-image: url('../img/password-bg.jpg'); /* Mettez votre image ici */
    background-size: cover;
    background-position: center;
    position: relative;
}

/* Le petit badge "Nouveau" bleu */
.badge-new {
    background-color: #0ea5e9;
    color: white;
    font-size: 0.75rem;
    font-weight: 700;
    padding: 5px 12px;
    text-transform: uppercase;
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
}

.course-content {
    padding: 20px;
}

.course-title {
    font-size: 1.1rem;
    font-weight: 600;
    color: var(--primary-color);
    margin-bottom: 15px;
}

.course-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-top: 1px solid #f1f5f9;
    padding-top: 15px;
    font-size: 0.85rem;
    color: #64748b;
}

/* --- STYLE DU QUIZ --- */
.quiz-container {
    background: white;
    padding: 40px;
    border-radius: 12px;
    max-width: 800px;
    margin: 0 auto;
    box-shadow: 0 4px 6px rgba(0,0,0,0.05);
}

.question-text {
    font-size: 1.3rem;
    font-weight: 600;
    margin-bottom: 25px;
    color: var(--primary-color);
}

.option-btn {
    display: block;
    width: 100%;
    padding: 15px;
    margin-bottom: 10px;
    background: #f8fafc;
    border: 2px solid #e2e8f0;
    border-radius: 8px;
    text-align: left;
    cursor: pointer;
    font-size: 1rem;
    transition: all 0.2s;
}

.option-btn:hover {
    border-color: var(--accent-color);
    background: #f0f9ff;
}
/* --- STATISTIQUES HOMEPAGE --- */
.stats-container {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 20px;
    margin-bottom: 50px;
}

.stat-card {
    background: white;
    padding: 25px;
    border-radius: 12px;
    text-align: center;
    border: 1px solid #e2e8f0;
    box-shadow: 0 4px 6px rgba(0,0,0,0.05);
    transition: transform 0.3s ease;
}

.stat-card:hover {
    transform: translateY(-5px);
    border-color: var(--accent-color);
}

.stat-number {
    display: block;
    font-size: 2.5rem;
    font-weight: 800;
    color: var(--primary-color);
    margin: 10px 0;
}

.stat-number.danger { color: #dc2626; } /* Rouge pour les pertes */
.stat-number.warning { color: #f59e0b; } /* Orange pour le risque */

.stat-label {
    font-size: 0.9rem;
    color: #64748b;
    text-transform: uppercase;
    letter-spacing: 1px;
    font-weight: 600;
}

.stat-desc {
    font-size: 0.9rem;
    color: #475569;
    margin-top: 10px;
    line-height: 1.4;
}
/* Badge de complétion (Crochet vert) */
.badge-completed {
    position: absolute;
    top: 10px;
    right: 10px;
    background-color: #22c55e; /* Vert succès */
    color: white;
    font-size: 0.85rem;
    font-weight: 700;
    padding: 6px 12px;
    border-radius: 20px;
    box-shadow: 0 2px 5px rgba(0,0,0,0.2);
    z-index: 10;
    display: flex;
    align-items: center;
    gap: 6px;
}