/* --- VARIABLES & RESET --- */
:root {
    --font-main: 'Inter', sans-serif;
    --bg-color: #f8f9fa;
    --text-primary: #111827;
    --text-secondary: #6b7280;
    --accent: #2563eb; /* Royal Blue */
    --accent-hover: #1d4ed8;
    --surface: rgba(255, 255, 255, 0.85);
    --border: rgba(229, 231, 235, 0.8);
    --shadow-sm: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
    --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
    --radius: 16px;
    --nav-height: 64px;
}

* { box-sizing: border-box; margin: 0; padding: 0; }
body {
    font-family: var(--font-main);
    background-color: var(--bg-color);
    color: var(--text-primary);
    line-height: 1.5;
    overflow-x: hidden;
    min-height: 100vh;
}

a { text-decoration: none; color: inherit; transition: 0.2s; }
ul { list-style: none; }

/* --- THREE.JS CANVAS --- */
#bg-canvas {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: -1;
    pointer-events: none; /* Laisse passer les clics */
    opacity: 0.6;
}

/* --- LAYOUT --- */
.container {
    max-width: 1100px;
    margin: 0 auto;
    padding: 0 20px;
}

.main-layout {
    padding-top: calc(var(--nav-height) + 40px);
    padding-bottom: 80px;
}

/* --- COMPONENTS --- */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 12px 24px;
    border-radius: 12px;
    font-weight: 600;
    font-size: 0.95rem;
    cursor: pointer;
    border: none;
    transition: all 0.2s ease;
}

.btn-primary {
    background-color: var(--accent);
    color: white;
}
.btn-primary:hover { background-color: var(--accent-hover); transform: translateY(-1px); }

.btn-secondary {
    background-color: white;
    color: var(--text-primary);
    border: 1px solid var(--border);
}
.btn-secondary:hover { background-color: #f9fafb; border-color: #d1d5db; }

.btn-sm { padding: 8px 16px; font-size: 0.85rem; }

.card {
    background: var(--surface);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 24px;
    box-shadow: var(--shadow-sm);
    transition: box-shadow 0.2s;
}
.card:hover { box-shadow: var(--shadow-md); }

.input-group { margin-bottom: 20px; }
.input-group label { display: block; margin-bottom: 8px; font-weight: 500; font-size: 0.9rem; color: var(--text-secondary); }
.input-group input, .input-group select, .input-group textarea {
    width: 100%;
    padding: 12px 16px;
    border-radius: 12px;
    border: 1px solid var(--border);
    background: white;
    font-family: inherit;
    font-size: 1rem;
    transition: border-color 0.2s;
}
.input-group input:focus, .input-group select:focus, .input-group textarea:focus {
    outline: none;
    border-color: var(--accent);
    box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.1);
}

/* --- NAVIGATION --- */
.navbar {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: var(--nav-height);
    background: rgba(255, 255, 255, 0.9);
    backdrop-filter: blur(10px);
    border-bottom: 1px solid var(--border);
    z-index: 100;
    display: flex;
    align-items: center;
}
.nav-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
    width: 100%;
}
.logo { font-weight: 800; font-size: 1.25rem; letter-spacing: -0.5px; }
.logo span { color: var(--accent); }
.nav-links { display: flex; gap: 24px; }
.nav-links a { font-size: 0.95rem; color: var(--text-secondary); font-weight: 500; }
.nav-links a.active, .nav-links a:hover { color: var(--accent); }

/* --- BADGES & TAGS --- */
.badge {
    padding: 4px 10px;
    border-radius: 20px;
    font-size: 0.75rem;
    font-weight: 600;
    text-transform: uppercase;
}
.badge-mission { background: #dbeafe; color: #1e40af; }
.badge-collab { background: #fce7f3; color: #9d174d; }
.badge-dispo { background: #dcfce7; color: #166534; }

/* --- TOAST --- */
#toast-container { position: fixed; bottom: 24px; right: 24px; z-index: 2000; display: flex; flex-direction: column; gap: 10px; }
.toast {
    background: #1f2937; color: white; padding: 12px 20px; border-radius: 10px;
    box-shadow: var(--shadow-md); font-size: 0.9rem; animation: slideIn 0.3s ease;
}
@keyframes slideIn { from { transform: translateY(20px); opacity: 0; } to { transform: translateY(0); opacity: 1; } }

/* --- UTILS --- */
.text-sm { font-size: 0.875rem; color: var(--text-secondary); }
.hidden { display: none !important; }
.flex-between { display: flex; justify-content: space-between; align-items: center; }
.mb-4 { margin-bottom: 16px; }
.grid-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 20px; }
.grid-3 { display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 24px; }

/* --- RESPONSIVE --- */
@media (max-width: 768px) {
    .grid-2 { grid-template-columns: 1fr; }
    .nav-links { display: none; /* Simple MVP: hide nav links on mobile landing for now, or use bottom bar in app */ }
    .app-nav .nav-links { position: fixed; bottom: 0; left: 0; width: 100%; background: white; border-top: 1px solid var(--border); padding: 15px; justify-content: space-around; display: flex; }
}