/* Legrand "Sites Filiale" digital charter tokens (UI Guidelines, 2026).
   Headings: Acumin Pro Condensed (licensed; Roboto Condensed as demo stand-in).
   Body: Roboto. Interactive colour: orange; brand red reserved for identity. */

:root {
  --legrand-red: #ED1C24;
  --int: #D54401;            /* interactive default (Colour Orange) */
  --int-hover: #B03801;      /* interactive hover (Orange Dark) */
  --n90: #000000;
  --n80: #1F1F20;            /* default text */
  --n60: #52575C;            /* secondary text */
  --n50: #73757B;            /* tertiary */
  --n40: #D3D6D9;            /* disabled / lines strong */
  --n30: #E2E4E6;            /* gridline */
  --n20: #F0F1F2;            /* light surface */
  --n10: #F9F9FA;            /* page */
  --white: #FFFFFF;
  --success: #0E8A37;
  --success-light: #E3F3E9;
  --warning: #A76800;
  --warning-light: #FBE3BF;
  --alert: #961E16;
  --alert-light: #FBE5E4;
  --shadow: 0 1px 2px rgba(0,0,0,.06), 0 8px 24px -12px rgba(0,0,0,.18);
  --radius: 10px;
  color-scheme: light;
}

* { box-sizing: border-box; }
html, body { margin: 0; }
body {
  background: var(--n10);
  color: var(--n80);
  font-family: "Roboto", system-ui, -apple-system, "Segoe UI", sans-serif;
  font-size: 15px;
  line-height: 1.5;
}
h1, h2, h3, .condensed {
  font-family: "Roboto Condensed", "Arial Narrow", "Roboto", sans-serif;
  font-weight: 700;
  line-height: 1.05;
  margin: 0;
  text-transform: uppercase;
  letter-spacing: 0.01em;
}
a { color: var(--int); }

/* header */
.topbar {
  background: var(--white);
  border-bottom: 1px solid var(--n30);
  position: sticky; top: 0; z-index: 10;
}
.topbar .inner {
  max-width: 1160px; margin: 0 auto; padding: 10px 20px;
  display: flex; align-items: center; gap: 16px;
}
.logo {
  background: var(--legrand-red); color: #fff;
  font-weight: 700; font-size: 20px; letter-spacing: -0.02em;
  padding: 10px 14px; border-radius: 3px;
  font-family: "Roboto", sans-serif; text-transform: lowercase;
}
.topbar .apptitle { font-size: 18px; }
.topbar .spacer { flex: 1; }
select, input[type=text], input[type=number], input[type=email] {
  font: inherit; color: var(--n80);
  padding: 8px 10px; border: 1px solid var(--n40); border-radius: 6px;
  background: var(--white);
}
select:focus, input:focus { outline: 2px solid var(--int); outline-offset: 1px; }

main { max-width: 1160px; margin: 0 auto; padding: 24px 20px 64px; }

.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  font: inherit; font-weight: 500; cursor: pointer; text-decoration: none;
  background: var(--int); color: #fff; border: none; border-radius: 6px;
  padding: 10px 18px; transition: background .15s;
}
.btn:hover { background: var(--int-hover); }
.btn.secondary {
  background: var(--white); color: var(--n80); border: 1px solid var(--n40);
}
.btn.secondary:hover { border-color: var(--int); color: var(--int); background: var(--white); }
.btn:disabled { background: var(--n40); color: var(--n60); cursor: default; }
.btn.small { padding: 6px 12px; font-size: 13px; }

.card {
  background: var(--white); border: 1px solid var(--n30);
  border-radius: var(--radius); box-shadow: var(--shadow);
}

.pill {
  display: inline-flex; align-items: center; gap: 6px;
  font-size: 13px; font-weight: 700; border-radius: 999px; padding: 4px 12px;
}
.pill::before { content: ""; width: 8px; height: 8px; border-radius: 50%; background: currentColor; }
.pill.ok { background: var(--success-light); color: var(--success); }
.pill.warn { background: var(--warning-light); color: var(--warning); }
.pill.err { background: var(--alert-light); color: var(--alert); }

.badge {
  font-size: 11px; font-weight: 700; letter-spacing: .04em;
  border-radius: 4px; padding: 2px 6px; vertical-align: middle;
}
.badge.demo { background: var(--legrand-red); color: #fff; }
.badge.special { background: var(--warning-light); color: var(--warning); }

.muted { color: var(--n60); }
.small { font-size: 13px; }

table.data { border-collapse: collapse; width: 100%; font-size: 13.5px; }
table.data th {
  text-align: left; font-size: 11.5px; letter-spacing: .05em; text-transform: uppercase;
  color: var(--n60); padding: 8px 10px; border-bottom: 2px solid var(--n30);
}
table.data td { padding: 7px 10px; border-bottom: 1px solid var(--n30); vertical-align: top; }
table.data tr:hover td { background: var(--n20); }

footer.app {
  border-top: 1px solid var(--n30); margin-top: 40px; padding: 18px 20px;
  text-align: center; font-size: 12.5px; color: var(--n60);
}

/* --- selectable "Legrand" skin (body[data-theme="legrand"], ?theme=legrand):
       flat and typographic, per the Sites Filiale charter and legrand.fi
       componentry - square corners, no shadows, hairlines, red identity ---- */

body[data-theme="legrand"] {
  --radius: 2px;
  --shadow: none;
  background: var(--white);
}
body[data-theme="legrand"] .topbar { border-bottom: 2px solid var(--legrand-red); }
body[data-theme="legrand"] .topbar .apptitle { font-size: 21px; letter-spacing: .02em; }
body[data-theme="legrand"] .logo { border-radius: 2px; }
body[data-theme="legrand"] select,
body[data-theme="legrand"] input[type=text],
body[data-theme="legrand"] input[type=number],
body[data-theme="legrand"] input[type=email] { border-radius: 2px; }
body[data-theme="legrand"] .btn {
  border-radius: 2px;
  font-family: "Roboto Condensed", "Arial Narrow", sans-serif;
  font-weight: 700; text-transform: uppercase; letter-spacing: .05em;
  background: var(--legrand-red);
}
body[data-theme="legrand"] .btn:hover { background: #C4151C; }
body[data-theme="legrand"] .btn.secondary { background: var(--white); color: var(--n80); border: 1px solid var(--n80); }
body[data-theme="legrand"] .btn.secondary:hover { color: var(--legrand-red); border-color: var(--legrand-red); background: var(--white); }
body[data-theme="legrand"] .btn:disabled { background: var(--n30); color: var(--n50); }
body[data-theme="legrand"] .card { box-shadow: none; }
body[data-theme="legrand"] .pill { background: none; padding: 0; border-radius: 0; font-weight: 500; }
body[data-theme="legrand"] .badge { border-radius: 1px; }
body[data-theme="legrand"] footer.app {
  background: var(--legrand-red); color: #fff; border-top: none;
  margin-top: 56px; text-align: left; font-weight: 500;
  max-width: none;
}
