/* GoverFiles — branding GoverByte
   Couleurs : navy #0F172A, teal #2DD4BF, emerald #10B981
   Police : système (sans-serif neutre, équivalente Calibri quand absente) */

:root {
    --navy: #0F172A;
    --navy-2: #1E293B;
    --teal: #2DD4BF;
    --teal-2: #14B8A6;
    --emerald: #10B981;
    --bg: #F8FAFC;
    --bg-card: #FFFFFF;
    --text: #0F172A;
    --text-muted: #64748B;
    --border: #E2E8F0;
    --red: #DC2626;
    --orange: #EA580C;
    --green: #16A34A;
    --shadow: 0 4px 12px rgba(15, 23, 42, 0.08);
}

* { box-sizing: border-box; }

html, body {
    margin: 0;
    padding: 0;
    font-family: Calibri, "Segoe UI", system-ui, -apple-system, BlinkMacSystemFont, "Helvetica Neue", Arial, sans-serif;
    color: var(--text);
    background: var(--bg);
    line-height: 1.5;
    font-size: 15px;
}

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

h1, h2, h3 { color: var(--navy); margin-top: 0; }
h1 { font-size: 1.7rem; margin-bottom: 0.5rem; }
h2 { font-size: 1.2rem; margin-top: 1.5rem; margin-bottom: 0.5rem; }

code {
    font-family: "SFMono-Regular", "Consolas", "Liberation Mono", Menlo, monospace;
    background: #F1F5F9;
    padding: 2px 6px;
    border-radius: 4px;
    font-size: 0.9em;
    word-break: break-all;
}

.muted { color: var(--text-muted); }
.small { font-size: 0.85rem; }

.topbar {
    background: var(--navy);
    color: #fff;
    padding: 0.6rem 1.5rem;
    display: flex;
    align-items: center;
    justify-content: space-between;
    box-shadow: var(--shadow);
}
.brand-mark { font-weight: 700; font-size: 1.2rem; color: var(--teal); }
.brand-tag { color: #94A3B8; margin-left: 0.5rem; font-size: 0.85rem; }
.nav { display: flex; gap: 1rem; align-items: center; }
.nav a, .nav button.link {
    color: #E2E8F0;
    background: none;
    border: none;
    cursor: pointer;
    font-size: 0.95rem;
    font-family: inherit;
}
.nav a:hover, .nav button.link:hover { color: var(--teal); text-decoration: none; }

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

.centered {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 1.5rem;
    background: linear-gradient(135deg, var(--navy) 0%, var(--navy-2) 100%);
}
.centered .card { width: 100%; max-width: 420px; }
.centered h1 { color: var(--navy); }

.card {
    background: var(--bg-card);
    padding: 1.5rem;
    border-radius: 8px;
    box-shadow: var(--shadow);
    margin-bottom: 1rem;
}

.row { display: flex; align-items: center; gap: 1rem; }
.row.spaced { justify-content: space-between; flex-wrap: wrap; }

.stack { display: flex; flex-direction: column; gap: 0.9rem; }
.stack label {
    display: flex;
    flex-direction: column;
    gap: 0.3rem;
    font-size: 0.9rem;
    color: var(--text-muted);
}
.stack label.checkbox {
    flex-direction: row;
    align-items: center;
    gap: 0.5rem;
    color: var(--text);
}

input[type="text"], input[type="password"], input[type="number"], input[type="file"] {
    padding: 0.55rem 0.7rem;
    border: 1px solid var(--border);
    border-radius: 6px;
    font-size: 1rem;
    font-family: inherit;
    background: #fff;
}
input:focus {
    outline: 2px solid var(--teal);
    outline-offset: 1px;
}

button, .button {
    cursor: pointer;
    padding: 0.6rem 1.1rem;
    border: 1px solid var(--border);
    border-radius: 6px;
    background: #fff;
    color: var(--text);
    font-size: 0.95rem;
    font-family: inherit;
    text-decoration: none;
    display: inline-block;
}
button:hover, .button:hover { background: #F1F5F9; text-decoration: none; }

button.primary, .primary {
    background: var(--teal-2);
    color: #fff;
    border-color: var(--teal-2);
    font-weight: 600;
}
button.primary:hover, .primary:hover {
    background: var(--teal);
    border-color: var(--teal);
    color: #fff;
}

button.danger, .danger {
    color: var(--red);
}
button.danger:hover { background: #FEE2E2; }

button.link {
    background: none;
    border: none;
    color: var(--teal-2);
    text-decoration: underline;
    padding: 0;
    cursor: pointer;
    font-size: 0.9rem;
}
button.link.danger { color: var(--red); }

form.inline { display: inline; }

table.grid {
    width: 100%;
    border-collapse: collapse;
    background: #fff;
    box-shadow: var(--shadow);
    border-radius: 8px;
    overflow: hidden;
    margin-top: 0.5rem;
}
table.grid th, table.grid td {
    padding: 0.7rem 1rem;
    text-align: left;
    border-bottom: 1px solid var(--border);
    font-size: 0.92rem;
    vertical-align: middle;
}
table.grid th { background: #F8FAFC; color: var(--text-muted); font-weight: 600; text-transform: uppercase; font-size: 0.78rem; letter-spacing: 0.05em; }
table.grid tr:last-child td { border-bottom: none; }
table.grid tr.expired { opacity: 0.55; }

.alert {
    padding: 0.8rem 1rem;
    border-radius: 6px;
    margin-bottom: 1rem;
    font-size: 0.95rem;
}
.alert.error { background: #FEE2E2; color: #991B1B; border: 1px solid #FCA5A5; }
.alert.success { background: #D1FAE5; color: #065F46; border: 1px solid #6EE7B7; }
.alert.info { background: #DBEAFE; color: #1E3A8A; border: 1px solid #93C5FD; }

.badge {
    display: inline-block;
    padding: 2px 8px;
    border-radius: 999px;
    font-size: 0.78rem;
    font-weight: 600;
}
.badge.red { background: #FEE2E2; color: #991B1B; }
.badge.orange { background: #FFEDD5; color: #9A3412; }
.badge.green { background: #DCFCE7; color: #166534; }
.badge.teal { background: #CCFBF1; color: #115E59; }

.copy-line {
    background: #F1F5F9;
    padding: 0.7rem 1rem;
    border-radius: 6px;
    margin: 0.4rem 0 1rem;
    overflow-wrap: break-word;
}

@media (max-width: 600px) {
    .topbar { flex-direction: column; gap: 0.5rem; align-items: flex-start; }
    .nav { flex-wrap: wrap; }
}
