/* ============================================
   SUIVI ÉLÈVES SEGPA - Styles CSS
   ============================================ */

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

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background-color: #f5f7fa;
    color: #333;
    line-height: 1.6;
}

/* ============================================
   PAGE DE CONNEXION
   ============================================ */
.login-page {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
}

.login-container {
    width: 100%;
    max-width: 400px;
    padding: 20px;
}

.login-box {
    background: white;
    border-radius: 12px;
    padding: 40px;
    box-shadow: 0 20px 60px rgba(0,0,0,0.3);
    text-align: center;
}

.login-box h1 {
    color: #667eea;
    margin-bottom: 10px;
    font-size: 1.8rem;
}

.login-box .subtitle {
    color: #666;
    margin-bottom: 30px;
    font-size: 0.95rem;
}

.login-footer {
    margin-top: 30px;
    padding-top: 20px;
    border-top: 1px solid #eee;
    color: #999;
    font-size: 0.85rem;
}

/* ============================================
   FORMULAIRES
   ============================================ */
.form-group {
    margin-bottom: 20px;
    text-align: left;
}

.form-group label {
    display: block;
    margin-bottom: 8px;
    font-weight: 600;
    color: #555;
    font-size: 0.9rem;
}

.form-group input,
.form-group select,
.form-group textarea {
    width: 100%;
    padding: 12px 15px;
    border: 2px solid #e0e0e0;
    border-radius: 8px;
    font-size: 1rem;
    transition: border-color 0.3s;
}

.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
    outline: none;
    border-color: #667eea;
    background-color: #f8f9ff;
}

/* Styles spécifiques pour le dashboard */
.right-content .form-group input,
.right-content .form-group select,
.right-content .form-group textarea {
    border: 2px solid #d0d0d0;
    background-color: #fff;
}

.right-content .form-group input:hover,
.right-content .form-group select:hover,
.right-content .form-group textarea:hover {
    border-color: #999;
}

.right-content .form-group input:focus,
.right-content .form-group select:focus,
.right-content .form-group textarea:focus {
    border-color: #667eea;
    background-color: #f8f9ff;
}

.form-group textarea {
    resize: vertical;
    min-height: 100px;
}

/* ============================================
   BOUTONS
   ============================================ */
.btn {
    display: inline-block;
    padding: 12px 24px;
    border: none;
    border-radius: 8px;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s;
    text-decoration: none;
}

.btn-primary {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(102, 126, 234, 0.4);
}

.btn-block {
    width: 100%;
}

.btn-secondary {
    background: #f0f0f0;
    color: #555;
}

.btn-secondary:hover {
    background: #e0e0e0;
}

.btn-success {
    background: #28a745;
    color: white;
}

.btn-danger {
    background: #dc3545;
    color: white;
}

/* ============================================
   ALERTES
   ============================================ */
.alert {
    padding: 15px 20px;
    border-radius: 8px;
    margin-bottom: 20px;
    font-size: 0.95rem;
}

.alert-error {
    background: #fee;
    border-left: 4px solid #dc3545;
    color: #721c24;
}

.alert-success {
    background: #efe;
    border-left: 4px solid #28a745;
    color: #155724;
}

.alert-info {
    background: #e7f3ff;
    border-left: 4px solid #0066cc;
    color: #004085;
}

/* ============================================
   LAYOUT PRINCIPAL (Dashboard)
   ============================================ */
.app-container {
    display: flex;
    min-height: 100vh;
}

/* Barre latérale */
.sidebar {
    width: 280px;
    background: #2c3e50;
    color: white;
    position: fixed;
    height: 100vh;
    overflow-y: auto;
}

.sidebar-header {
    padding: 20px;
    background: #1a252f;
    border-bottom: 1px solid #34495e;
}

.sidebar-header h2 {
    font-size: 1.2rem;
    margin-bottom: 5px;
}

.sidebar-header .user-role {
    font-size: 0.8rem;
    color: #7f8c8d;
    text-transform: uppercase;
}

/* Navigation */
.nav-menu {
    list-style: none;
    padding: 0;
}

.nav-menu li {
    border-bottom: 1px solid #34495e;
}

.nav-menu a {
    display: block;
    padding: 15px 20px;
    color: #ecf0f1;
    text-decoration: none;
    transition: all 0.3s;
}

.nav-menu a:hover,
.nav-menu a.active {
    background: #34495e;
    color: #fff;
}

.nav-menu a i {
    margin-right: 10px;
    width: 20px;
    text-align: center;
}

/* Zone principale */
.main-content {
    flex: 1;
    margin-left: 280px;
    padding: 20px;
}

/* Header */
.top-header {
    background: white;
    padding: 20px 30px;
    border-radius: 12px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
    margin-bottom: 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.top-header h1 {
    font-size: 1.5rem;
    color: #2c3e50;
}

.user-menu {
    display: flex;
    align-items: center;
    gap: 15px;
}

.user-menu .btn {
    padding: 8px 16px;
    font-size: 0.9rem;
}

/* ============================================
   CARTES ET CONTENUS
   ============================================ */
.card {
    background: white;
    border-radius: 12px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
    margin-bottom: 20px;
}

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

.card-header h2 {
    font-size: 1.2rem;
    color: #2c3e50;
}

.card-body {
    padding: 25px;
}

/* ============================================
   TABLEAUX
   ============================================ */
.table-container {
    overflow-x: auto;
}

table {
    width: 100%;
    border-collapse: collapse;
}

table th,
table td {
    padding: 12px 15px;
    text-align: left;
    border-bottom: 1px solid #eee;
}

table th {
    background: #f8f9fa;
    font-weight: 600;
    color: #555;
}

table tr:hover {
    background: #f8f9fa;
}

/* ============================================
   BADGES
   ============================================ */
.badge {
    display: inline-block;
    padding: 5px 10px;
    border-radius: 20px;
    font-size: 0.75rem;
    font-weight: 600;
}

.badge-success {
    background: #d4edda;
    color: #155724;
}

.badge-warning {
    background: #fff3cd;
    color: #856404;
}

.badge-danger {
    background: #f8d7da;
    color: #721c24;
}

.badge-info {
    background: #d1ecf1;
    color: #0c5460;
}

/* ============================================
   UTILITAIRES
   ============================================ */
.text-center {
    text-align: center;
}

.mt-20 {
    margin-top: 20px;
}

.mb-20 {
    margin-bottom: 20px;
}

.hidden {
    display: none;
}

/* ============================================
   RESPONSIVE
   ============================================ */
@media (max-width: 768px) {
    .sidebar {
        width: 100%;
        position: relative;
        height: auto;
    }
    
    .main-content {
        margin-left: 0;
    }
    
    .app-container {
        flex-direction: column;
    }
}
