:root {
    --color-bg:       #f7f7f8;
    --color-surface:  #ffffff;
    --color-border:   #e5e7eb;
    --color-text:     #111827;
    --color-muted:    #6b7280;
    --color-accent:   #0ea5e9;
    --color-accent-d: #0284c7;
    --color-success:  #059669;
    --color-warning:  #d97706;
    --color-danger:   #dc2626;

    --radius:  6px;
    --shadow:  0 1px 2px rgba(0, 0, 0, 0.04), 0 1px 3px rgba(0, 0, 0, 0.06);
    --font:    -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
}

* { box-sizing: border-box; }

html, body {
    margin: 0;
    padding: 0;
    font-family: var(--font);
    color: var(--color-text);
    background: var(--color-bg);
    font-size: 15px;
    line-height: 1.55;
}

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

.container {
    max-width: 1100px;
    margin: 0 auto;
    padding: 1.5rem;
}

/* --- Header & Navigation -------------------------------------------------- */
header {
    background: var(--color-surface);
    border-bottom: 1px solid var(--color-border);
}
header nav {
    max-width: 1100px;
    margin: 0 auto;
    padding: 0.9rem 1.5rem;
    display: flex;
    align-items: center;
    gap: 1.5rem;
}
header .brand {
    font-weight: 700;
    font-size: 1.1rem;
    color: var(--color-text);
    margin-right: auto;
}
header nav a {
    color: var(--color-muted);
    padding: 0.35rem 0.6rem;
    border-radius: var(--radius);
    font-weight: 500;
}
header nav a:hover { color: var(--color-text); text-decoration: none; background: var(--color-bg); }
header nav a.active { color: var(--color-accent-d); background: #e0f2fe; }

/* --- Footer --------------------------------------------------------------- */
footer {
    margin-top: 3rem;
    padding: 1.25rem 1.5rem;
    text-align: center;
    color: var(--color-muted);
    font-size: 0.85rem;
    border-top: 1px solid var(--color-border);
}

/* --- Headings & text ------------------------------------------------------ */
h1, h2, h3 { line-height: 1.25; margin: 0 0 0.75rem; }
h1 { font-size: 1.75rem; }
h2 { font-size: 1.25rem; margin-top: 2rem; }
.muted { color: var(--color-muted); }

/* --- Cards & stats -------------------------------------------------------- */
.card {
    background: var(--color-surface);
    border: 1px solid var(--color-border);
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    padding: 1.25rem;
    margin-bottom: 1.25rem;
}

.stats { display: grid; grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); gap: 1rem; }
.stat {
    background: var(--color-surface);
    border: 1px solid var(--color-border);
    border-radius: var(--radius);
    padding: 1rem 1.2rem;
}
.stat .label { color: var(--color-muted); font-size: 0.85rem; text-transform: uppercase; letter-spacing: 0.04em; }
.stat .value { font-size: 1.8rem; font-weight: 700; margin-top: 0.25rem; }

/* --- Tables --------------------------------------------------------------- */
table {
    width: 100%;
    border-collapse: collapse;
    background: var(--color-surface);
    border: 1px solid var(--color-border);
    border-radius: var(--radius);
    overflow: hidden;
}
th, td {
    padding: 0.7rem 0.9rem;
    text-align: left;
    border-bottom: 1px solid var(--color-border);
    vertical-align: middle;
}
th {
    font-weight: 600;
    font-size: 0.8rem;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    color: var(--color-muted);
    background: #fafafa;
}
tbody tr:last-child td { border-bottom: 0; }
tbody tr:hover { background: #fafafa; }
td.num { text-align: right; font-variant-numeric: tabular-nums; }

/* --- Status badges -------------------------------------------------------- */
.badge {
    display: inline-block;
    padding: 0.15rem 0.55rem;
    font-size: 0.78rem;
    font-weight: 600;
    border-radius: 999px;
    line-height: 1.5;
}
.badge-en_attente { background: #fef3c7; color: #92400e; }
.badge-confirmee  { background: #d1fae5; color: #065f46; }
.badge-annulee    { background: #fee2e2; color: #991b1b; }
.badge-inactif    { background: #f3f4f6; color: #6b7280; }

/* --- Forms ---------------------------------------------------------------- */
label { display: block; font-weight: 500; margin: 0.75rem 0 0.35rem; }
input, select, textarea {
    width: 100%;
    padding: 0.55rem 0.7rem;
    border: 1px solid var(--color-border);
    border-radius: var(--radius);
    font: inherit;
    background: var(--color-surface);
}
input:focus, select:focus, textarea:focus {
    outline: 2px solid var(--color-accent);
    outline-offset: -1px;
    border-color: var(--color-accent);
}

.btn {
    display: inline-block;
    padding: 0.5rem 0.9rem;
    background: var(--color-accent);
    color: #fff;
    border: 0;
    border-radius: var(--radius);
    font: inherit;
    font-weight: 500;
    cursor: pointer;
}
.btn:hover { background: var(--color-accent-d); text-decoration: none; color: #fff; }
.btn-secondary { background: var(--color-surface); color: var(--color-text); border: 1px solid var(--color-border); }
.btn-secondary:hover { background: var(--color-bg); color: var(--color-text); }

.empty {
    text-align: center;
    padding: 2rem 1rem;
    color: var(--color-muted);
    font-style: italic;
}
