/* TLPC — feuille de style
   Palette : graphite profond + accent sarcelle (technique, réseau/monitoring).
   Typographie : pile système, une seule famille, échelle nette. */

:root {
    --bg: #10161A;
    --surface: #161E23;
    --line: #26333A;
    --text: #E7EEF1;
    --text-muted: #93A7AF;
    --accent: #4FB8AC;
    --accent-dim: #2E4B48;
    --ok: #7FD1A6;
    --radius: 3px;
    --content-width: 1040px;
}

* { box-sizing: border-box; }

html {
    scroll-behavior: smooth;
}

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

.wrap {
    max-width: var(--content-width);
    margin: 0 auto;
    padding: 0 24px;
}

a { color: var(--accent); }

h1, h2, h3 {
    font-weight: 600;
    letter-spacing: -0.01em;
    margin: 0 0 0.5em;
}

h1 { font-size: clamp(2rem, 4vw + 1rem, 3.2rem); line-height: 1.1; }
h2 { font-size: 1.6rem; margin-bottom: 1.1em; }
h3 { font-size: 1.15rem; }

p { color: var(--text-muted); max-width: 62ch; }

/* --- Header --- */

.site-header {
    border-bottom: 1px solid var(--line);
    position: sticky;
    top: 0;
    background: rgba(16, 22, 26, 0.92);
    backdrop-filter: blur(6px);
    z-index: 10;
}

.site-header__inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    height: 64px;
}

.logo {
    font-weight: 700;
    letter-spacing: 0.02em;
    color: var(--text);
}

.site-nav { display: flex; gap: 28px; }
.site-nav a { color: var(--text-muted); text-decoration: none; font-size: 0.95rem; }
.site-nav a:hover { color: var(--text); }

/* --- Hero --- */

.hero { padding: 88px 0 96px; }

.hero__inner {
    display: grid;
    grid-template-columns: 1.2fr 0.8fr;
    gap: 56px;
    align-items: center;
}

.hero__eyebrow {
    color: var(--accent);
    font-size: 0.95rem;
    margin: 0 0 14px;
}

.hero__subtitle {
    font-size: 1.08rem;
    margin-top: 18px;
}

.button {
    display: inline-block;
    margin-top: 28px;
    padding: 12px 24px;
    background: var(--accent);
    color: #0A1210;
    text-decoration: none;
    font-weight: 600;
    border-radius: var(--radius);
}
.button:hover { background: #63c5ba; }

.hero__panel {
    background: var(--surface);
    border: 1px solid var(--line);
    border-radius: var(--radius);
    padding: 22px;
    font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
    font-size: 0.9rem;
}

.panel__row {
    display: flex;
    justify-content: space-between;
    padding: 9px 0;
    border-bottom: 1px solid var(--line);
    color: var(--text-muted);
}
.panel__row:last-of-type { border-bottom: none; }

.panel__value--ok { color: var(--ok); }

.panel__prompt {
    margin-top: 16px;
    padding-top: 14px;
    border-top: 1px dashed var(--line);
    color: var(--accent);
}

.panel__cursor {
    display: inline-block;
    width: 8px;
    background: var(--accent);
    animation: blink 1.1s steps(1) infinite;
}

@keyframes blink {
    50% { opacity: 0; }
}

@media (prefers-reduced-motion: reduce) {
    .panel__cursor { animation: none; opacity: 1; }
    html { scroll-behavior: auto; }
}

/* --- Services --- */

.services { padding: 72px 0; border-top: 1px solid var(--line); }

.services__list {
    list-style: none;
    margin: 0;
    padding: 0;
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 1px;
    background: var(--line);
    border: 1px solid var(--line);
}

.services__item {
    background: var(--bg);
    padding: 26px 28px;
    border-left: 2px solid var(--accent-dim);
}

/* --- About --- */

.about { padding: 72px 0; border-top: 1px solid var(--line); }

.about__inner { max-width: 720px; }

/* --- Contact --- */

.contact { padding: 72px 0; border-top: 1px solid var(--line); }

.contact__inner {
    display: grid;
    grid-template-columns: 0.85fr 1.15fr;
    gap: 48px;
    align-items: start;
}

.contact__list {
    list-style: none;
    margin: 18px 0 0;
    padding: 0;
    font-size: 1.05rem;
}
.contact__list li { padding: 6px 0; color: var(--text-muted); }
.contact__list a { text-decoration: none; }
.contact__list a:hover { text-decoration: underline; }

.contact__form {
    background: var(--surface);
    border: 1px solid var(--line);
    border-radius: var(--radius);
    padding: 26px 28px 30px;
}

.contact__form label { display: block; font-size: 0.85rem; color: var(--text-muted); margin: 14px 0 6px; }
.contact__form label:first-of-type { margin-top: 0; }

.contact__form input[type="text"],
.contact__form input[type="email"],
.contact__form textarea {
    width: 100%;
    background: var(--bg);
    border: 1px solid var(--line);
    color: var(--text);
    padding: 10px 12px;
    border-radius: var(--radius);
    font-size: 1rem;
    font-family: inherit;
}
.contact__form textarea { resize: vertical; }
.contact__form button { margin-top: 18px; }

/* Champ piège anti-robots : invisible pour un humain, présent pour les robots */
.hp-field {
    position: absolute;
    left: -9999px;
    width: 1px;
    height: 1px;
    overflow: hidden;
}

@media (max-width: 760px) {
    .contact__inner { grid-template-columns: 1fr; }
}

/* --- Footer --- */

.site-footer {
    border-top: 1px solid var(--line);
    padding: 28px 0;
}
.site-footer p {
    color: var(--text-muted);
    font-size: 0.85rem;
    margin: 0;
}

/* --- Politique de confidentialité --- */

.policy { padding: 64px 0 88px; }

.policy__inner { max-width: 720px; }

.policy__updated {
    color: var(--text-muted);
    font-size: 0.85rem;
    margin-top: -8px;
}

.policy h2 {
    font-size: 1.15rem;
    margin-top: 34px;
}

.policy__note {
    margin-top: 34px;
    padding-top: 18px;
    border-top: 1px solid var(--line);
    font-size: 0.85rem;
    color: var(--text-muted);
}

.contact__privacy-note {
    margin-top: 12px;
    font-size: 0.8rem;
    color: var(--text-muted);
    max-width: none;
}
.contact__privacy-note a { color: var(--text-muted); text-decoration: underline; }

.downloads-list {
    list-style: none;
    margin: 24px 0 0;
    padding: 0;
}
.downloads-list li {
    border-bottom: 1px solid var(--line);
    padding: 14px 0;
}
.downloads-list a {
    font-size: 1.05rem;
    text-decoration: none;
    color: var(--accent);
}
.downloads-list a:hover { text-decoration: underline; }
.downloads-list__hint {
    margin-left: 8px;
    font-size: 0.78rem;
    color: var(--text-muted);
}

/* --- Responsive --- */

@media (max-width: 760px) {
    .hero__inner { grid-template-columns: 1fr; }
    .services__list { grid-template-columns: 1fr; }
    .site-nav { gap: 18px; }
}

/* --- Focus visibility (accessibilité) --- */

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

/* --- Login / Admin (partagent la même feuille) --- */

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

.login-card {
    width: 100%;
    max-width: 360px;
    background: var(--surface);
    border: 1px solid var(--line);
    border-radius: var(--radius);
    padding: 36px 32px;
}

.login-card--wide { max-width: 440px; }

.login-mark {
    color: var(--accent);
    font-weight: 700;
    margin: 0 0 18px;
    font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
}

.login-sub { margin: -8px 0 20px; font-size: 0.92rem; }

.login-error {
    background: #3A1F22;
    border: 1px solid #6A2E33;
    color: #F3B7BC;
    padding: 10px 14px;
    border-radius: var(--radius);
    font-size: 0.9rem;
}

.login-links {
    margin-top: 18px;
    text-align: center;
    font-size: 0.85rem;
}

.captcha-row {
    display: flex;
    align-items: center;
    gap: 12px;
}
.captcha-row .captcha-question {
    font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
    color: var(--text);
    white-space: nowrap;
}
.captcha-row input { flex: 1; }

.totp-key-box {
    font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
    background: var(--bg);
    border: 1px solid var(--line);
    border-radius: var(--radius);
    padding: 14px 16px;
    font-size: 1.05rem;
    letter-spacing: 0.06em;
    word-break: break-all;
    margin: 10px 0;
}

.uri-box {
    font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
    background: var(--bg);
    border: 1px solid var(--line);
    border-radius: var(--radius);
    padding: 10px 12px;
    font-size: 0.8rem;
    word-break: break-all;
    color: var(--text-muted);
    margin: 6px 0 0;
}

form label {
    display: block;
    font-size: 0.85rem;
    color: var(--text-muted);
    margin: 16px 0 6px;
}

form input[type="text"],
form input[type="email"],
form input[type="password"],
form textarea {
    width: 100%;
    background: var(--bg);
    border: 1px solid var(--line);
    color: var(--text);
    padding: 10px 12px;
    border-radius: var(--radius);
    font-size: 1rem;
    font-family: inherit;
}

form textarea { resize: vertical; }

.checkbox-label {
    display: flex !important;
    align-items: center;
    gap: 8px;
    font-size: 0.9rem;
    color: var(--text-muted);
    margin: 16px 0 !important;
}
.checkbox-label input[type="checkbox"] {
    width: auto;
}

.login-card button, .admin-save {
    margin-top: 22px;
    width: 100%;
    padding: 11px;
    background: var(--accent);
    color: #0A1210;
    border: none;
    font-weight: 600;
    font-size: 1rem;
    border-radius: var(--radius);
    cursor: pointer;
}
.login-card button:hover, .admin-save:hover { background: #63c5ba; }

.admin-save--muted {
    background: transparent;
    border: 1px solid var(--line);
    color: var(--text-muted);
}
.admin-save--muted:hover { background: var(--surface); color: var(--text); }

.inline-toggle-form {
    background: var(--surface);
    border: 1px solid var(--line);
    border-radius: var(--radius);
    padding: 14px 16px;
    margin: 16px 0 26px;
}
.inline-toggle-form .checkbox-label { margin: 0 0 10px !important; }
.admin-save--inline {
    width: auto;
    margin-top: 0;
    padding: 8px 16px;
    font-size: 0.85rem;
}

.incident-list {
    list-style: none;
    margin: 0 0 24px;
    padding: 0;
}
.incident-list li {
    border: 1px solid var(--line);
    border-radius: var(--radius);
    padding: 14px 16px;
    margin-bottom: 12px;
}
.incident-list__head {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 6px;
}
.incident-tag {
    font-size: 0.75rem;
    background: var(--accent-dim);
    color: var(--accent);
    padding: 2px 8px;
    border-radius: 2px;
}
.incident-delete-form { margin-top: 8px; }

.download-row {
    display: flex;
    gap: 10px;
    align-items: center;
    margin-bottom: 10px;
}
.download-row__name { flex: 0 0 34%; }
.download-row__url { flex: 1; }
.download-row__tab {
    flex: 0 0 auto;
    margin: 0 !important;
    white-space: nowrap;
    font-size: 0.78rem;
}
.download-row input[type="text"] {
    width: 100%;
    background: var(--bg);
    border: 1px solid var(--line);
    color: var(--text);
    padding: 9px 10px;
    border-radius: var(--radius);
    font-size: 0.92rem;
    font-family: inherit;
}

@media (max-width: 560px) {
    .download-row { flex-wrap: wrap; }
    .download-row__name, .download-row__url { flex: 1 1 100%; }
}

code {
    font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
    background: var(--bg);
    padding: 1px 5px;
    border-radius: 3px;
    font-size: 0.9em;
}

.admin-header {
    border-bottom: 1px solid var(--line);
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 18px 24px;
}
.admin-mark {
    font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
    color: var(--accent);
    margin: 0;
}
.admin-nav a {
    color: var(--text-muted);
    text-decoration: none;
    margin-left: 20px;
    font-size: 0.9rem;
}
.admin-nav a:hover { color: var(--text); }

.admin-main {
    max-width: 720px;
    margin: 0 auto;
    padding: 36px 24px 80px;
}

.admin-form section {
    border-top: 1px solid var(--line);
    padding: 24px 0;
}
.admin-form section:first-child { border-top: none; padding-top: 0; }

.admin-notice {
    padding: 10px 14px;
    border-radius: var(--radius);
    font-size: 0.9rem;
    margin-bottom: 20px;
}
.admin-notice--ok {
    background: #1C3428;
    border: 1px solid #2F5C43;
    color: var(--ok);
}
.admin-notice--error {
    background: #3A1F22;
    border: 1px solid #6A2E33;
    color: #F3B7BC;
}

.admin-sep {
    border: none;
    border-top: 1px solid var(--line);
    margin: 44px 0 32px;
}

.field-hint {
    font-size: 0.85rem;
    color: var(--text-muted);
    margin: 6px 0 0;
    max-width: 60ch;
}

.admin-form select {
    width: 100%;
    background: var(--bg);
    border: 1px solid var(--line);
    color: var(--text);
    padding: 10px 12px;
    border-radius: var(--radius);
    font-size: 1rem;
    font-family: inherit;
}

.stats-period {
    display: flex;
    gap: 8px;
    margin: 4px 0 20px;
}
.stats-period a {
    padding: 6px 14px;
    border: 1px solid var(--line);
    border-radius: var(--radius);
    color: var(--text-muted);
    text-decoration: none;
    font-size: 0.85rem;
}
.stats-period a.is-active {
    background: var(--accent);
    border-color: var(--accent);
    color: #0A1210;
    font-weight: 600;
}

.stats-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 1px;
    background: var(--line);
    border: 1px solid var(--line);
    margin-bottom: 8px;
}
.stat-box {
    background: var(--surface);
    padding: 18px 16px;
    display: flex;
    flex-direction: column;
    gap: 4px;
}
.stat-number { font-size: 1.9rem; font-weight: 700; color: var(--accent); line-height: 1; }
.stat-label { font-size: 0.8rem; color: var(--text-muted); }

.stats-subhead {
    font-size: 1rem;
    margin: 26px 0 10px;
    color: var(--text);
}

.stats-bars {
    list-style: none;
    margin: 0;
    padding: 0;
}
.stats-bars li {
    display: grid;
    grid-template-columns: 44px 1fr 34px;
    align-items: center;
    gap: 10px;
    padding: 3px 0;
    font-size: 0.8rem;
    color: var(--text-muted);
}
.stats-bars__track {
    background: var(--bg);
    border: 1px solid var(--line);
    border-radius: 2px;
    height: 10px;
    overflow: hidden;
}
.stats-bars__fill {
    display: block;
    height: 100%;
    background: var(--accent);
}
.stats-bars__count { text-align: right; }

.stats-list {
    list-style: none;
    margin: 0;
    padding: 0;
    font-size: 0.92rem;
}
.stats-list li {
    display: flex;
    justify-content: space-between;
    padding: 7px 0;
    border-bottom: 1px solid var(--line);
    color: var(--text-muted);
}
.stats-list li:last-child { border-bottom: none; }
.stats-list li span:first-child { color: var(--text); }

@media (max-width: 480px) {
    .stats-grid { grid-template-columns: 1fr; }
}
