:root {
    --navy: #0f2035;
    --navy-light: #1b3556;
    --accent: #2f7de1;
    --accent-dark: #1f5fb0;
    --bg: #f4f6f9;
    --card: #ffffff;
    --text: #1a2432;
    --muted: #6b7a8d;
    --border: #e2e8f0;
    --danger: #c0392b;
    --success: #1f8a4c;
    --radius: 10px;
    --shadow: 0 1px 3px rgba(15, 32, 53, 0.08), 0 4px 12px rgba(15, 32, 53, 0.05);
}

* { box-sizing: border-box; }

body {
    margin: 0;
    font-family: -apple-system, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
    background: var(--bg);
    color: var(--text);
    line-height: 1.55;
}

a { color: var(--accent); text-decoration: none; }
a:hover { text-decoration: underline; }

/* ---------- Navbar ---------- */
.navbar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    background: var(--navy);
    padding: 0 28px;
    height: 62px;
    color: #fff;
}
.brand { font-size: 20px; font-weight: 700; color: #fff; letter-spacing: -0.3px; }
.brand span { color: #7bb0f0; font-weight: 400; }
.brand:hover { text-decoration: none; }
.navbar nav { display: flex; align-items: center; gap: 22px; }
.navbar nav a { color: #cdd8e6; font-size: 15px; }
.navbar nav a:hover { color: #fff; text-decoration: none; }
.pseudo { color: #7bb0f0; font-size: 14px; font-weight: 600; }
.btn-ghost {
    border: 1px solid rgba(255,255,255,0.25);
    padding: 6px 12px; border-radius: 6px;
}

/* ---------- Layout ---------- */
.container { max-width: 900px; margin: 34px auto; padding: 0 20px; }
.footer {
    text-align: center; color: var(--muted);
    font-size: 13px; padding: 40px 0 30px;
}

/* ---------- Flash ---------- */
.flash {
    padding: 12px 16px; border-radius: 8px; margin-bottom: 18px; font-size: 14px;
}
.flash-error { background: #fdecea; color: var(--danger); border: 1px solid #f5c6c2; }
.flash-success { background: #e7f6ed; color: var(--success); border: 1px solid #b7e2c6; }

/* ---------- Titres ---------- */
h1 { font-size: 26px; letter-spacing: -0.4px; margin: 0 0 6px; }
.subtitle { color: var(--muted); margin: 0 0 26px; }

/* ---------- Filtres ---------- */
.filters {
    display: flex; flex-wrap: wrap; gap: 12px; align-items: flex-end;
    background: var(--card); padding: 18px; border-radius: var(--radius);
    box-shadow: var(--shadow); margin-bottom: 24px;
}
.filters .field { display: flex; flex-direction: column; gap: 5px; flex: 1; min-width: 130px; }
.filters label { font-size: 12px; color: var(--muted); font-weight: 600; text-transform: uppercase; letter-spacing: 0.4px; }

select, input, textarea {
    font-family: inherit; font-size: 15px; color: var(--text);
    padding: 9px 11px; border: 1px solid var(--border);
    border-radius: 8px; background: #fff; width: 100%;
}
select:focus, input:focus, textarea:focus {
    outline: none; border-color: var(--accent);
    box-shadow: 0 0 0 3px rgba(47, 125, 225, 0.12);
}
textarea { resize: vertical; min-height: 120px; }

/* ---------- Boutons ---------- */
.btn {
    display: inline-block; background: var(--accent); color: #fff;
    border: none; padding: 10px 18px; border-radius: 8px;
    font-size: 15px; font-weight: 600; cursor: pointer; text-align: center;
}
.btn:hover { background: var(--accent-dark); text-decoration: none; }
.btn-outline {
    background: #fff; color: var(--accent); border: 1px solid var(--accent);
}
.btn-outline:hover { background: #f0f6fe; }
.btn-sm { padding: 6px 12px; font-size: 13px; }

/* ---------- Liste de comptes rendus ---------- */
.report-grid { display: flex; flex-direction: column; gap: 14px; }
.report-card {
    display: block; background: var(--card); border: 1px solid var(--border);
    border-radius: var(--radius); padding: 18px 20px; box-shadow: var(--shadow);
    transition: transform 0.08s ease, box-shadow 0.15s ease;
}
.report-card:hover {
    text-decoration: none; transform: translateY(-1px);
    box-shadow: 0 4px 18px rgba(15, 32, 53, 0.12);
}
.report-card h3 { margin: 0 0 8px; font-size: 18px; color: var(--navy); }
.tags { display: flex; flex-wrap: wrap; gap: 7px; margin-bottom: 10px; }
.tag {
    font-size: 12px; font-weight: 600; padding: 3px 10px; border-radius: 20px;
    background: #eaf1fb; color: var(--accent-dark);
}
.tag-type { background: #eef2f7; color: var(--muted); }
.report-meta { color: var(--muted); font-size: 13px; }
.excerpt { color: var(--text); font-size: 14px; margin: 8px 0 0; opacity: 0.85; }

.empty {
    text-align: center; color: var(--muted); padding: 50px 20px;
    background: var(--card); border-radius: var(--radius);
    border: 1px dashed var(--border);
}

/* ---------- Détail ---------- */
.detail-header { margin-bottom: 20px; }
.section-block { background: var(--card); border: 1px solid var(--border);
    border-radius: var(--radius); padding: 22px 24px; box-shadow: var(--shadow); margin-bottom: 18px; }
.section-block h2 { font-size: 16px; color: var(--accent-dark); margin: 0 0 10px;
    text-transform: uppercase; letter-spacing: 0.5px; }
.section-block p { white-space: pre-wrap; margin: 0; }
.back-link { display: inline-block; margin-bottom: 18px; font-size: 14px; }

/* ---------- Formulaires (cartes centrées) ---------- */
.card-form {
    background: var(--card); border: 1px solid var(--border);
    border-radius: var(--radius); box-shadow: var(--shadow);
    padding: 30px; max-width: 460px; margin: 0 auto;
}
.form-wide { max-width: 720px; }
.form-row { margin-bottom: 16px; }
.form-row label { display: block; font-size: 14px; font-weight: 600; margin-bottom: 6px; }
.form-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.hint { font-size: 13px; color: var(--muted); margin-top: 4px; }

/* ---------- Auth ---------- */
.auth-wrap { max-width: 400px; margin: 40px auto; }
.auth-title { text-align: center; margin-bottom: 8px; }
.auth-sub { text-align: center; color: var(--muted); margin-bottom: 26px; }
.disclaimer {
    background: #fff8e6; border: 1px solid #f2d98c; color: #7a5b12;
    font-size: 13px; line-height: 1.5; padding: 12px 14px;
    border-radius: 8px; margin-bottom: 22px;
}

/* ---------- Tables admin ---------- */
.admin-section { margin-bottom: 40px; }
table { width: 100%; border-collapse: collapse; background: var(--card);
    border-radius: var(--radius); overflow: hidden; box-shadow: var(--shadow); }
th, td { text-align: left; padding: 11px 14px; font-size: 14px; border-bottom: 1px solid var(--border); }
th { background: #f0f3f7; color: var(--muted); font-size: 12px; text-transform: uppercase; letter-spacing: 0.4px; }
tr:last-child td { border-bottom: none; }
.badge { font-size: 11px; padding: 2px 8px; border-radius: 20px; font-weight: 600; }
.badge-ok { background: #e7f6ed; color: var(--success); }
.badge-wait { background: #fff4e0; color: #b7791f; }
.invite-link {
    font-family: monospace; font-size: 12px; background: #f0f3f7;
    padding: 4px 8px; border-radius: 6px; word-break: break-all;
}

@media (max-width: 600px) {
    .form-grid { grid-template-columns: 1fr; }
    .navbar { padding: 0 14px; }
    .navbar nav { gap: 12px; }
}
