/* --- Variables --- */
:root {
    --primary: #2c3e50;
    --accent: #3498db;
    --success: #27ae60;
    --danger: #e74c3c;
    --light-bg: #f8f9fa;
    --border: #dee2e6;
    --shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
}

/* --- Base & Reset --- */
html, body {
    overflow-x: hidden;
    width: 100%;
    background-color: var(--light-bg);
    color: #333;
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    line-height: 1.6;
    margin: 0;
    padding: 0;
}

/* --- Header & Nav --- */
header {
    background: var(--primary);
    color: #fff;
    padding: 15px 30px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    box-shadow: 0 2px 10px rgba(0,0,0,0.2);
    box-sizing: border-box;
}

header h1 { 
    margin: 0; 
    font-size: 1.3rem; 
    text-transform: uppercase;
    letter-spacing: 2px;
}
header h1 span { color: var(--accent); font-weight: bold; }

nav ul {
    list-style: none;
    padding: 0;
    margin: 0;
    display: flex;
    gap: 20px;
    align-items: center;
}

nav a {
    color: #ecf0f1;
    text-decoration: none;
    font-size: 0.85rem;
    font-weight: 500;
    transition: color 0.3s ease;
}

nav a:hover { color: var(--accent); }

/* --- Conteneur Principal --- */
main { 
    padding: 30px 20px; 
    max-width: 1100px; 
    margin: 20px auto; 
    background: #fff;
    border-radius: 8px;
    box-shadow: var(--shadow);
    box-sizing: border-box; 
}

/* --- Formulaires Modernes --- */
fieldset { 
    border: 1px solid var(--border); 
    padding: 20px; 
    margin-bottom: 25px; 
    border-radius: 8px;
    background: #fff;
}

legend {
    font-weight: bold;
    color: var(--primary);
    padding: 0 10px;
    font-size: 0.9rem;
}

input[type="text"],
input[type="email"],
input[type="password"],
input[type="date"],
input[type="time"],
select,
textarea {
    width: 100%;
    padding: 12px;
    margin: 8px 0 18px 0;
    border: 1px solid var(--border);
    border-radius: 6px;
    box-sizing: border-box;
    font-family: inherit;
    font-size: 0.9rem;
    background: #fdfdfd;
    transition: all 0.3s ease;
}

input:focus, select:focus, textarea:focus {
    outline: none;
    border-color: var(--accent);
    box-shadow: 0 0 0 3px rgba(52, 152, 219, 0.2);
    background: #fff;
}

/* --- Tableaux Style Dashboard --- */
.table-responsive {
    width: 100%;
    overflow-x: auto;
    border-radius: 8px;
    border: 1px solid var(--border);
}

table {
    width: 100%;
    border-collapse: collapse;
    background: #fff;
}

th {
    background: #f1f3f5;
    color: var(--primary);
    padding: 15px;
    text-align: left;
    font-size: 0.85rem;
    text-transform: uppercase;
}

td {
    padding: 15px;
    border-bottom: 1px solid var(--border);
    font-size: 0.9rem;
}

tr:last-child td { border-bottom: none; }
tr:hover { background-color: #f8f9fa; }

/* --- Boutons --- */
button, .btn {
    background: var(--accent);
    color: #fff;
    padding: 12px 20px;
    border: none;
    border-radius: 6px;
    cursor: pointer;
    font-weight: 600;
    transition: transform 0.2s, background 0.3s;
    display: inline-block;
    text-decoration: none;
    font-size: 0.85rem;
}

button:hover, .btn:hover {
    background: #2980b9;
    transform: translateY(-1px);
}

button:active { transform: translateY(0); }

.delete { 
    color: var(--danger); 
    font-weight: bold;
    text-decoration: none;
}
.delete:hover { color: #c0392b; }

/* Notifications */
.msg {
    padding: 15px;
    border-radius: 6px;
    margin-bottom: 20px;
    color: #fff;
    font-weight: 500;
}
.msg-success { background: var(--success); }
.msg-error { background: var(--danger); }