/* SecureHold Social Publisher — feuille de style unique. */

:root {
    --bg: #f4f6f9;
    --surface: #ffffff;
    --border: #d9dfe7;
    --text: #1b2430;
    --muted: #5a6675;
    --accent: #1f5fa9;
    --accent-dark: #17497f;
    --ok: #1c7a4a;
    --ok-bg: #e6f4ec;
    --err: #a32424;
    --err-bg: #fbeaea;
    --radius: 10px;
}

* { box-sizing: border-box; }

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

/* --- Mise en page ------------------------------------------------------ */

.container {
    max-width: 880px;
    margin: 0 auto;
    padding: 24px 16px 64px;
}

body.page-centered {
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 100vh;
    padding: 24px 16px;
}

.card,
.card-block {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 24px;
}

.card {
    width: 100%;
    max-width: 460px;
}

.card-block { margin-bottom: 20px; }

/* --- Barre supérieure -------------------------------------------------- */

.topbar {
    background: var(--surface);
    border-bottom: 1px solid var(--border);
}

.topbar-inner {
    max-width: 880px;
    margin: 0 auto;
    padding: 12px 16px;
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 12px 20px;
}

.brand { font-weight: 600; }

.nav { display: flex; gap: 16px; }

.nav a {
    color: var(--muted);
    text-decoration: none;
    padding: 4px 0;
    border-bottom: 2px solid transparent;
}

.nav a:hover { color: var(--text); }
.nav a.active { color: var(--accent); border-bottom-color: var(--accent); }

.logout-form {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-left: auto;
}

.user-email { color: var(--muted); font-size: 0.9rem; }

/* --- Titres ------------------------------------------------------------ */

h1 { font-size: 1.5rem; margin: 0 0 20px; }
h2 { font-size: 1.1rem; margin: 0 0 12px; }

.lead { color: var(--muted); }

/* --- Formulaires ------------------------------------------------------- */

label {
    display: block;
    margin-bottom: 18px;
    font-weight: 500;
}

label.checkbox {
    font-weight: 400;
    display: flex;
    align-items: center;
    gap: 8px;
}

input[type="text"],
input[type="email"],
input[type="password"],
input[type="number"] {
    display: block;
    width: 100%;
    margin-top: 6px;
    padding: 10px 12px;
    font: inherit;
    color: var(--text);
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: 8px;
}

input:focus-visible,
button:focus-visible,
a:focus-visible {
    outline: 2px solid var(--accent);
    outline-offset: 2px;
}

.help {
    display: block;
    margin-top: 6px;
    color: var(--muted);
    font-size: 0.875rem;
    font-weight: 400;
}

.field-state { color: var(--muted); }
.state-error { color: var(--err); }

/* --- Boutons ----------------------------------------------------------- */

.button {
    display: inline-block;
    padding: 11px 18px;
    min-height: 44px;
    font: inherit;
    font-weight: 500;
    color: #fff;
    background: var(--accent);
    border: 1px solid var(--accent);
    border-radius: 8px;
    text-decoration: none;
    cursor: pointer;
}

.button:hover { background: var(--accent-dark); border-color: var(--accent-dark); }

.button-quiet {
    color: var(--muted);
    background: transparent;
    border-color: var(--border);
    padding: 7px 12px;
    min-height: 0;
}

.button-quiet:hover { background: var(--bg); color: var(--text); }

/* --- Messages ---------------------------------------------------------- */

.alert {
    padding: 12px 16px;
    border-radius: 8px;
    margin-bottom: 20px;
    border: 1px solid transparent;
}

.alert ul { margin: 0; padding-left: 20px; }

.alert-success { background: var(--ok-bg); border-color: #b8ddc8; color: var(--ok); }
.alert-error { background: var(--err-bg); border-color: #e6b8b8; color: var(--err); }

/* --- Listes et tableaux ------------------------------------------------ */

.checklist { list-style: none; margin: 0 0 16px; padding: 0; }

.checklist li {
    padding: 8px 0 8px 26px;
    border-bottom: 1px solid var(--border);
    position: relative;
}

.checklist li::before {
    position: absolute;
    left: 0;
    font-weight: 700;
}

.checklist li.ok::before { content: "\2713"; color: var(--ok); }
.checklist li.todo::before { content: "\2022"; color: var(--muted); }

.definitions { margin: 0; }
.definitions dt { font-weight: 500; margin-top: 10px; }
.definitions dd { margin: 0; color: var(--muted); }

.table-scroll { overflow-x: auto; }

table { width: 100%; border-collapse: collapse; font-size: 0.9rem; }

th, td {
    text-align: left;
    padding: 8px 10px;
    border-bottom: 1px solid var(--border);
    vertical-align: top;
}

th { color: var(--muted); font-weight: 500; white-space: nowrap; }

.tag {
    display: inline-block;
    padding: 1px 8px;
    border-radius: 999px;
    font-size: 0.78rem;
    background: var(--bg);
    color: var(--muted);
}

.tag-error { background: var(--err-bg); color: var(--err); }
.tag-info { background: var(--ok-bg); color: var(--ok); }

code {
    background: var(--bg);
    padding: 1px 5px;
    border-radius: 4px;
    font-size: 0.9em;
}

/* --- Mobile ------------------------------------------------------------ */

@media (max-width: 600px) {
    .topbar-inner { gap: 10px; }
    .logout-form { margin-left: 0; width: 100%; justify-content: space-between; }
    .card, .card-block { padding: 18px; }
}
