:root {
    --bg-primary: #121212;
    --bg-secondary: #1e1e1e;
    --text-primary: #e0e0e0;
    --text-secondary: #9e9e9e;
    --accent: #bb86fc;
    --accent-hover: #9a67ea;
    --border: #333;
    --card-bg: #1e1e1e;
    --card-shadow: 0 4px 6px rgba(0, 0, 0, 0.3);
}

/* Animation de transition */
@keyframes fadeIn {
    from { opacity: 0; transform: translateY(10px); }
    to { opacity: 1; transform: translateY(0); }
}

@keyframes slideIn {
    from { transform: translateX(-20px); opacity: 0; }
    to { transform: translateX(0); opacity: 1; }
}

/* Style de base */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    transition: background-color 0.3s, color 0.3s, border-color 0.3s;
}

body {
    background-color: var(--bg-primary);
    color: var(--text-primary);
    font-family: 'Segoe UI', Arial, sans-serif;
    line-height: 1.6;
    min-height: 100vh;
}

/* Animation d'entrée pour le contenu principal */
main {
    animation: fadeIn 0.5s ease-out forwards;
}

/* En-tête */
header {
    background-color: var(--bg-secondary);
    padding: 1rem 2rem;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
    animation: slideIn 0.5s ease-out;
}

/* Navigation */
nav ul {
    display: flex;
    list-style: none;
    gap: 1.5rem;
}

nav a {
    color: var(--text-primary);
    text-decoration: none;
    padding: 0.5rem 1rem;
    border-radius: 4px;
    transition: background-color 0.2s, color 0.2s;
}

nav a:hover {
    color: var(--accent);
    background-color: rgba(187, 134, 252, 0.1);
}

/* Cartes et conteneurs */
.card {
    background-color: var(--card-bg);
    border-radius: 8px;
    padding: 1.5rem;
    margin: 1rem 0;
    box-shadow: var(--card-shadow);
    animation: fadeIn 0.5s ease-out;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.card:hover {
    transform: translateY(-5px);
    box-shadow: 0 6px 12px rgba(0, 0, 0, 0.4);
}

/* Boutons */
button, .btn {
    background-color: var(--accent);
    color: white;
    border: none;
    padding: 0.6rem 1.2rem;
    border-radius: 4px;
    cursor: pointer;
    font-size: 1rem;
    transition: background-color 0.2s, transform 0.2s;
}

button:hover, .btn:hover {
    background-color: var(--accent-hover);
    transform: translateY(-2px);
}

/* Champs de formulaire */
input, textarea, select {
    background-color: var(--bg-secondary);
    color: var(--text-primary);
    border: 1px solid var(--border);
    padding: 0.6rem;
    border-radius: 4px;
    width: 100%;
    margin-bottom: 1rem;
    transition: border-color 0.3s, box-shadow 0.3s;
}

input:focus, textarea:focus, select:focus {
    border-color: var(--accent);
    outline: none;
    box-shadow: 0 0 0 2px rgba(187, 134, 252, 0.2);
}

/* Tableaux */
table {
    width: 100%;
    border-collapse: collapse;
    margin: 1rem 0;
    animation: fadeIn 0.5s ease-out;
}

th, td {
    padding: 0.75rem;
    text-align: left;
    border-bottom: 1px solid var(--border);
}

th {
    background-color: var(--bg-secondary);
    color: var(--accent);
}

tr:hover {
    background-color: rgba(255, 255, 255, 0.03);
}

/* Pied de page */
footer {
    background-color: var(--bg-secondary);
    color: var(--text-secondary);
    text-align: center;
    padding: 1.5rem;
    margin-top: 2rem;
    animation: slideIn 0.5s ease-out;
}

/* Classes utilitaires */
.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 1rem;
}

.text-center {
    text-align: center;
}

.mt-1 { margin-top: 0.5rem; }
.mt-2 { margin-top: 1rem; }
.mt-3 { margin-top: 1.5rem; }
.mt-4 { margin-top: 2rem; }

/* Animation de chargement */
.loading {
    display: inline-block;
    width: 30px;
    height: 30px;
    border: 3px solid rgba(187, 134, 252, 0.3);
    border-radius: 50%;
    border-top-color: var(--accent);
    animation: spin 1s ease-in-out infinite;
    margin: 1rem auto;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

/* Animation pour les messages d'alerte */
.alert {
    padding: 1rem;
    border-radius: 4px;
    margin: 1rem 0;
    animation: slideIn 0.3s ease-out;
}

.alert-success {
    background-color: rgba(76, 175, 80, 0.2);
    border-left: 4px solid #4caf50;
}

.alert-error {
    background-color: rgba(244, 67, 54, 0.2);
    border-left: 4px solid #f44336;
}

/* Animation pour les éléments de liste */
li {
    animation: fadeIn 0.3s ease-out;
    animation-fill-mode: both;
}

/* Délai d'animation pour les éléments de liste */
li:nth-child(1) { animation-delay: 0.1s; }
li:nth-child(2) { animation-delay: 0.2s; }
li:nth-child(3) { animation-delay: 0.3s; }
li:nth-child(4) { animation-delay: 0.4s; }
li:nth-child(5) { animation-delay: 0.5s; }
