/* Public battery page. Brand colour comes from batt.marque (--brand);
   the red accent echoes the Steco charter. Mobile first: the page is reached
   by scanning a label with a phone. No external font (CSP default-src 'self'). */
:root {
    --brand: #0B1626;
    --accent: #E30613;
    --text: #15171c;
    --muted: #616875;
    --border: #e4e6eb;
    --background: #f2f3f5;
    --card: #ffffff;
    --radius: 14px;
    --font: "Segoe UI", "Helvetica Neue", Roboto, Arial, sans-serif;
}

* { box-sizing: border-box; }

body {
    margin: 0;
    font-family: var(--font);
    font-size: 16px;
    line-height: 1.5;
    color: var(--text);
    background: var(--background);
}

.page { max-width: 1040px; margin: 0 auto; padding: 0 16px 32px; }

.sr-only {
    position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px;
    overflow: hidden; clip: rect(0, 0, 0, 0); border: 0;
}

a { color: var(--brand); font-weight: 600; text-underline-offset: 2px; }

/* ---------- top bar */
.topbar {
    display: flex; align-items: center; justify-content: space-between; gap: 12px;
    padding: 16px 0;
}
.brand-logo { max-height: 40px; max-width: 180px; display: block; }
.brand-word { font-size: 1.75rem; font-weight: 900; letter-spacing: -0.04em; color: var(--brand); }
.brand-dot { color: var(--accent); }

.languages { display: flex; gap: 4px; }
.languages a {
    font-size: 0.8rem; font-weight: 700; text-decoration: none; color: var(--muted);
    padding: 6px 10px; border-radius: 999px; border: 1px solid var(--border); background: var(--card);
}
.languages a.is-active { background: var(--brand); border-color: var(--brand); color: #fff; }

/* ---------- hero */
.hero {
    position: relative; overflow: hidden;
    background: var(--brand); color: #fff;
    border-radius: var(--radius);
    padding: 24px 20px 26px;
}
.hero-badges { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 14px; }
.badge {
    font-size: 0.72rem; font-weight: 700; letter-spacing: 0.06em; text-transform: uppercase;
    padding: 4px 10px; border-radius: 999px; background: rgba(255, 255, 255, 0.12);
}
.hero-brand { margin: 0; font-size: 1.1rem; font-weight: 700; opacity: 0.85; }
.hero-ref {
    margin: 2px 0 6px; font-size: clamp(2.2rem, 9vw, 3.6rem); line-height: 1.05;
    font-weight: 900; letter-spacing: -0.03em; overflow-wrap: anywhere;
}
.hero-designation { margin: 0; font-size: 1rem; opacity: 0.9; }
.hero-maker { margin: 10px 0 0; font-size: 0.875rem; opacity: 0.7; }
.hero-dot {
    position: absolute; right: -40px; bottom: -40px; width: 140px; height: 140px;
    border-radius: 50%; background: var(--accent); opacity: 0.95;
}

/* ---------- notices */
.banner, .notice {
    margin: 12px 0 0; padding: 12px 16px; border-radius: 10px; font-size: 0.9rem;
}
.banner { background: #fff4e5; border: 1px solid #f0a33a; }
.notice { background: var(--card); border: 1px dashed var(--border); color: var(--muted); }

/* ---------- key figures */
.figures {
    display: grid; grid-template-columns: repeat(2, 1fr); gap: 10px; margin: 12px 0;
}
.figure {
    background: var(--card); border-radius: var(--radius); padding: 14px 16px;
    border-bottom: 3px solid var(--accent);
}
.figure-label {
    display: block; font-size: 0.72rem; font-weight: 700; letter-spacing: 0.06em;
    text-transform: uppercase; color: var(--muted);
}
.figure-value { display: block; font-size: 1.5rem; font-weight: 800; color: var(--brand); }

/* ---------- cards */
.grid { display: grid; grid-template-columns: 1fr; gap: 12px; }
.card {
    background: var(--card); border-radius: var(--radius); padding: 18px 18px 20px;
    border: 1px solid var(--border);
}
.card h2 {
    display: flex; align-items: center; gap: 8px;
    margin: 0 0 14px; font-size: 0.8rem; font-weight: 800; letter-spacing: 0.08em;
    text-transform: uppercase; color: var(--brand);
}
.card h2::before {
    content: ""; width: 8px; height: 8px; border-radius: 50%; background: var(--accent); flex: none;
}

dl { margin: 0; }
dd { margin: 0; overflow-wrap: anywhere; }

.rows { display: grid; grid-template-columns: 1fr auto; }
.rows dt, .rows dd { padding: 9px 0; border-bottom: 1px solid var(--border); }
.rows dt { color: var(--muted); padding-right: 12px; }
.rows dd { font-weight: 600; text-align: right; }
.rows dt:last-of-type, .rows dd:last-of-type { border-bottom: 0; }

.stack dt {
    font-size: 0.72rem; font-weight: 700; letter-spacing: 0.06em; text-transform: uppercase;
    color: var(--muted); margin-top: 12px;
}
.stack dt:first-child { margin-top: 0; }
.stack dd { font-weight: 600; }

.muted { color: var(--muted); font-weight: 400; font-size: 0.9rem; }

.button {
    display: inline-block; margin-top: 6px; padding: 10px 18px; border-radius: 999px;
    background: var(--brand); color: #fff; text-decoration: none; font-weight: 700;
}
.button.is-disabled { background: var(--border); color: var(--muted); cursor: default; }

.bullets { margin: 0; padding-left: 18px; }
.bullets li { margin-bottom: 8px; }
.bullets li::marker { color: var(--accent); }
.bullets.is-green li::marker { color: #2e8b57; }

.pictos { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 16px; }
.picto { margin: 0; width: 72px; text-align: center; }
.picto svg { width: 56px; height: 56px; display: block; margin: 0 auto; }
.picto figcaption { font-size: 0.65rem; line-height: 1.25; color: var(--muted); margin-top: 4px; }

.documents { margin: 0; padding-left: 18px; }
.documents li { margin-bottom: 8px; }

.footer { margin-top: 24px; font-size: 0.8rem; color: var(--muted); text-align: center; }
.footer p { margin: 4px 0; }

.date-image { margin-top: 12px; }
.date-image summary { cursor: pointer; font-weight: 700; color: var(--brand); }
.date-image img {
    display: block; margin-top: 10px; max-width: 100%; height: auto;
    border-radius: 10px; border: 1px solid var(--border);
}

/* ---------- home and search */
a.brand { text-decoration: none; }

.hero-title {
    margin: 0 0 8px; font-size: clamp(1.8rem, 7vw, 2.8rem); line-height: 1.1;
    font-weight: 900; letter-spacing: -0.03em; max-width: 18ch;
}
.hero-search .hero-designation { max-width: 46ch; }

.search {
    position: relative; z-index: 1;
    display: grid; grid-template-columns: 1fr; gap: 12px; margin-top: 20px;
    background: var(--card); color: var(--text); border-radius: 12px; padding: 16px;
}
.search-field { display: flex; flex-direction: column; gap: 4px; font-weight: 700; font-size: 0.85rem; }
.search-field small { font-weight: 400; color: var(--muted); }
.search select, .search input {
    font: inherit; font-size: 1rem; font-weight: 600; padding: 10px 12px;
    border: 1px solid var(--border); border-radius: 10px; background: #fff; color: var(--text); width: 100%;
}
.search input { text-transform: uppercase; }
.search select:focus, .search input:focus { outline: 2px solid var(--accent); outline-offset: 1px; }
.search .button { border: 0; cursor: pointer; font: inherit; font-weight: 700; margin-top: 0; }
.button-accent { background: var(--accent); }

.search-message {
    position: relative; z-index: 1;
    margin: 12px 0 0; padding: 12px 16px; border-radius: 10px;
    background: #fff4e5; color: var(--text); border: 1px solid #f0a33a;
}

.home-section { margin-top: 24px; }
.home-heading { font-size: 1.25rem; font-weight: 800; color: var(--brand); margin: 0 0 12px; }
.card p { margin: 0; }

.steps { list-style: none; counter-reset: step; margin: 0; padding: 0; display: grid; gap: 10px; }
.steps li {
    counter-increment: step; position: relative; display: flex; flex-direction: column; gap: 2px;
    background: var(--card); border: 1px solid var(--border); border-radius: var(--radius);
    padding: 14px 16px 14px 60px;
}
.steps li::before {
    content: counter(step); position: absolute; left: 16px; top: 14px;
    width: 30px; height: 30px; border-radius: 50%; background: var(--brand); color: #fff;
    display: grid; place-items: center; font-weight: 800;
}

/* ---------- neutral page */
.neutral { max-width: 560px; margin: 48px auto; }

/* ---------- wider screens */
@media (min-width: 720px) {
    .hero { padding: 32px 32px 34px; }
    .figures { grid-template-columns: repeat(4, 1fr); }
    .grid { grid-template-columns: repeat(2, 1fr); align-items: start; }
    .card-wide { grid-column: span 2; }
    .grid-4 { grid-template-columns: repeat(4, 1fr); }
    .search { grid-template-columns: 1fr 1.4fr auto; align-items: start; }
    .search .button { align-self: start; margin-top: 22px; }
    .steps { grid-template-columns: repeat(3, 1fr); }
}

/* Several versions (sourcings) of a searched reference */
.search-choices p { margin: 0 0 8px; }
.search-choices ul { margin: 0; padding-left: 18px; }
.search-choices li { margin: 4px 0; }
