/* --- RESET & VARIABLES --- */
:root {
    --primary: #2c3e50;    /* Bleu nuit profond */
    --accent: #3498db;     /* Bleu pro */
    --bg: #f5f7fa;         /* Gris très clair */
    --text: #333;
    --white: #ffffff;
    --shadow: 0 4px 6px rgba(0,0,0,0.1);
}

* { margin: 0; padding: 0; box-sizing: border-box; }

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background-color: var(--bg);
    color: var(--text);
    line-height: 1.6;
    display: flex;
    flex-direction: column;
    min-height: 100vh;
}

/* --- LOADER --- */
#loader-wrapper {
    position: fixed;
    top: 0; left: 0; width: 100%; height: 100%;
    background: var(--primary);
    z-index: 9999;
    display: flex;
    justify-content: center;
    align-items: center;
    transition: opacity 0.5s ease;
}
.loader {
    border: 5px solid rgba(255,255,255,0.3);
    border-radius: 50%;
    border-top: 5px solid var(--white);
    width: 50px;
    height: 50px;
    animation: spin 1s linear infinite;
}
@keyframes spin { 0% { transform: rotate(0deg); } 100% { transform: rotate(360deg); } }
.loaded #loader-wrapper { opacity: 0; pointer-events: none; }

/* --- HEADER --- */
header {
    background-color: var(--primary);
    color: var(--white);
    padding: 1rem 2rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
    box-shadow: 0 2px 5px rgba(0,0,0,0.1);
    position: sticky;
    top: 0;
    z-index: 100;
}

.logo { font-size: 1.5rem; font-weight: bold; letter-spacing: 1px; }
.nav-links a { color: var(--white); text-decoration: none; margin-left: 20px; font-size: 0.9rem; opacity: 0.8; transition: opacity 0.2s; }
.nav-links a:hover { opacity: 1; }

/* --- MAIN CONTENT --- */
main {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 2rem;
    text-align: center;
}

h1 { margin-bottom: 2rem; color: var(--primary); font-size: 2.5rem; }

/* --- CARDS MENU --- */
.menu-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 20px;
    width: 100%;
    max-width: 900px;
}

.card {
    background: var(--white);
    padding: 2rem;
    border-radius: 8px;
    box-shadow: var(--shadow);
    text-decoration: none;
    color: var(--text);
    border-left: 5px solid transparent;
    transition: transform 0.2s, border-color 0.2s;
    display: flex;
    flex-direction: column;
    align-items: center;
}

.card:hover {
    transform: translateY(-5px);
    border-left-color: var(--accent);
}

.card h3 { margin-bottom: 0.5rem; color: var(--primary); }
.card p { font-size: 0.9rem; color: #666; }

/* --- FOOTER --- */
footer {
    text-align: center;
    padding: 1rem;
    font-size: 0.8rem;
    color: #888;
    background: #eef2f5;
}

/* --- MOBILE --- */
@media (max-width: 600px) {
    header { flex-direction: column; gap: 10px; padding: 1rem; }
    h1 { font-size: 1.8rem; }
    .menu-grid { grid-template-columns: 1fr; }
}