/* Charte Motion4ever : Poppins, #263238, bleu #0062ff, corail #fc7157, ombres pleines décalées. */

@font-face { font-family: "Poppins"; font-weight: 300; font-display: swap; src: url("fonts/Poppins-Light.woff2") format("woff2"); }
@font-face { font-family: "Poppins"; font-weight: 400; font-display: swap; src: url("fonts/Poppins-Regular.woff2") format("woff2"); }
@font-face { font-family: "Poppins"; font-weight: 500; font-display: swap; src: url("fonts/Poppins-Medium.woff2") format("woff2"); }
@font-face { font-family: "Poppins"; font-weight: 600; font-display: swap; src: url("fonts/Poppins-SemiBold.woff2") format("woff2"); }

:root {
    --ink: #263238;
    --blue: #0062ff;
    --blue-2: #2761f6;
    --coral: #fc7157;
    --pink: #e3007d;
    --bg: #f2f7ff;
    --bg-2: #f0f4ff;
    --card: #fff;
    --muted: #6b7280;
    --line: #e5e7eb;
    --ok: #0b7a3e;
    --radius: 12px;
}

* { box-sizing: border-box; }
html { scroll-padding-top: 90px; }
body {
    margin: 0;
    font: 400 15px/1.55 "Poppins", "Helvetica Neue", Arial, sans-serif;
    background: var(--bg);
    color: var(--ink);
}
main { max-width: 1380px; margin: 0 auto; padding: 24px 16px 48px; }
a { color: var(--blue); font-weight: 500; text-decoration: none; }
a:hover { text-decoration: underline; }
strong { font-weight: 600; }
h1, h2, h3 { font-weight: 600; color: var(--ink); }
h1 { font-size: 1.75rem; line-height: 1.2; margin: .25rem 0 .5rem; }
h1::after { content: ""; display: block; width: 56px; height: 4px; margin-top: 10px; background: var(--coral); box-shadow: 3px 3px 0 var(--blue-2); }
h2 { font-size: 1.2rem; margin: 1.75rem 0 .6rem; }
h3 { font-size: 1rem; margin: 1.1rem 0 .3rem; }
code { background: var(--bg-2); color: var(--blue); padding: 1px 5px; border-radius: 4px; font-size: .9em; }

/* En-tête */
.top { position: sticky; top: 0; z-index: 100; background: #fff; box-shadow: 0 0 5px 1px rgba(38, 50, 56, .25); }
.top-inner { max-width: 1380px; margin: 0 auto; padding: 12px 16px; display: flex; flex-wrap: wrap; gap: 12px 28px; align-items: center; }
.brand { display: flex; align-items: center; gap: 14px; color: var(--ink); }
.brand:hover { text-decoration: none; }
.brand img { display: block; height: 34px; width: auto; }
.brand span { font-weight: 300; font-size: 1rem; padding-left: 14px; border-left: 1px solid var(--line); }
.top nav { display: flex; gap: 22px; flex-wrap: wrap; }
.top nav a { color: var(--ink); font-weight: 500; padding: 4px 0; border-bottom: 3px solid transparent; }
.top nav a:hover { color: var(--blue); text-decoration: none; }
.top nav a.active { color: var(--blue); border-bottom-color: var(--blue); }
.key { margin-left: auto; font-size: .8rem; font-weight: 500; padding: 3px 10px; border-radius: 20px; }
.key.ok { background: #e6f4ec; color: var(--ok); }
.key.ko { background: #fde6f2; color: var(--pink); }

/* Cartes et messages */
.card { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); padding: 16px 20px; margin: 18px 0; }
.card > h2:first-child { margin-top: .2rem; }
details.card > summary { cursor: pointer; font-weight: 600; font-size: 1.05rem; }
details.card > summary::marker { color: var(--blue); }
details.card[open] > summary { margin-bottom: 10px; }
.hint { color: var(--muted); font-size: .88rem; }
.notice { background: #e6f4ec; border-left: 4px solid var(--ok); padding: 10px 14px; border-radius: 0 var(--radius) var(--radius) 0; }
.alert { background: #fde6f2; border-left: 4px solid var(--pink); padding: 10px 14px; border-radius: 0 var(--radius) var(--radius) 0; }
.warn { color: #b4401f; }
blockquote { margin: 10px 0; padding: 8px 14px; border-left: 4px solid var(--blue); background: var(--bg-2); border-radius: 0 8px 8px 0; }

/* Formulaires */
label { display: block; font-size: .88rem; font-weight: 500; margin: 8px 0; }
label.check { display: flex; gap: 8px; align-items: center; font-weight: 400; }
input, select, textarea {
    width: 100%; margin-top: 3px; padding: 8px 10px; font: inherit; font-weight: 400; color: var(--ink);
    background: #fff; border: 1px solid #cfd6e4; border-radius: 6px;
}
input:focus, select:focus, textarea:focus { outline: none; border-color: var(--blue); box-shadow: 0 0 0 3px rgba(0, 98, 255, .15); }
input[readonly], textarea[readonly] { background: var(--bg-2); color: var(--muted); }
input[type="checkbox"] { width: auto; margin: 0; accent-color: var(--blue); }
textarea { font-family: ui-monospace, SFMono-Regular, Menlo, monospace; font-size: .84rem; }

/* Boutons : corail + ombre bleue pleine, comme sur le site */
button {
    display: inline-block; margin: 8px 12px 8px 0; padding: 9px 20px; font: 400 .95rem "Poppins", sans-serif;
    color: var(--ink); background: var(--coral); border: 0; border-radius: 0; box-shadow: 4px 4px 0 var(--blue-2);
    cursor: pointer; transition: transform .12s, box-shadow .12s;
}
button:hover { transform: translate(2px, 2px); box-shadow: 2px 2px 0 var(--blue-2); }
button:active { transform: translate(4px, 4px); box-shadow: 0 0 0 var(--blue-2); }
button:disabled { opacity: .45; cursor: not-allowed; transform: none; box-shadow: 4px 4px 0 var(--blue-2); }
button.secondary { background: #fff; border: 1px solid var(--ink); box-shadow: 4px 4px 0 var(--ink); }
button.secondary:hover { box-shadow: 2px 2px 0 var(--ink); }
button.link, button.link:hover { background: none; border: 0; box-shadow: none; transform: none; padding: 0; margin: 0; color: var(--blue); font-weight: 500; text-decoration: underline; }
button.link.danger { color: var(--pink); }
#btn-stop { background: #fff; border: 1px solid var(--ink); box-shadow: 4px 4px 0 var(--ink); }
form.inline { display: inline; }
.actions { margin: 14px 0 6px; }

/* Grilles */
.grid2 { display: grid; grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); gap: 0 20px; }
.grid3 { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 0 20px; }
.grid2 > .card { margin: 10px 0; }
.span2 { grid-column: 1 / -1; }

/* Tableaux */
.scroll { overflow-x: auto; border-radius: var(--radius); }
table { width: 100%; margin: 10px 0; border-collapse: separate; border-spacing: 0; background: #fff; border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; }
th, td { padding: 8px 10px; text-align: left; vertical-align: top; border-bottom: 1px solid var(--line); }
tbody tr:last-child td { border-bottom: 0; }
th { background: var(--bg-2); font-size: .82rem; font-weight: 600; color: var(--ink); white-space: nowrap; }
tbody tr:hover td { background: #fafcff; }
table.compact td, table.compact th { padding: 5px 8px; font-size: .86rem; }
td.num { text-align: right; white-space: nowrap; font-variant-numeric: tabular-nums; }
tr.is-brand td { background: #fff3ee; }
tr.is-brand:hover td { background: #ffe9e1; }

/* Statuts des réponses */
.cells { white-space: nowrap; }
.st { display: inline-block; min-width: 1.8em; margin: 1px; padding: 0 4px; text-align: center; border-radius: 4px; font-weight: 600; font-size: .85rem; text-decoration: none; }
a.st:hover { text-decoration: none; outline: 2px solid var(--ink); }
.st-recommended { background: var(--blue); color: #fff; }
.st-cited { background: #dce8ff; color: var(--blue); }
.st-absent { color: #9aa3b2; }
.st-nd { background: #eef0f4; color: var(--muted); font-size: .72rem; }
.st-review { background: #ffe1d9; color: #b4401f; }
.st-error { background: #fde6f2; color: var(--pink); }
.st-pending { color: #9aa3b2; }

/* Collecte et réponse */
.log { max-height: 240px; overflow: auto; font-size: .84rem; color: var(--muted); background: var(--bg-2); border-radius: 8px; padding: 8px 8px 8px 36px; }
.log:empty { display: none; }
pre.answer { white-space: pre-wrap; font: inherit; background: #fafcff; border: 1px solid var(--line); padding: 14px; border-radius: 8px; max-height: 620px; overflow: auto; }

@media (max-width: 700px) {
    .brand span { display: none; }
    .key { margin-left: 0; }
}
