/* Mise en page applicative HK Sentinel. Toutes les valeurs viennent des jetons (tokens.css). */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; background: var(--surface); color: var(--text-hi); font-family: var(--font-body); font-size: 16px; line-height: 1.6; -webkit-font-smoothing: antialiased; }
img, svg { display: block; max-width: 100%; }
a { color: var(--accent-text); }
:focus-visible { outline: 2px solid var(--green-500); outline-offset: 2px; }
.skip-link { position: absolute; left: var(--space-4); top: -100px; padding: var(--space-3) var(--space-4); background: var(--green-500); color: var(--on-accent); border-radius: var(--radius-sm); font-weight: 700; z-index: 100; }
.skip-link:focus { top: var(--space-4); }
.visually-hidden { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

.wrap { width: 100%; max-width: var(--container); margin: 0 auto; padding: 0 40px; }
.section { padding: var(--space-32) 0; }
.section--alt { background: var(--surface-alt); }
.stack { display: flex; flex-direction: column; gap: var(--space-6); }
.cluster { display: flex; flex-wrap: wrap; gap: var(--space-3); align-items: center; }

/* En-tête */
.site-header { position: sticky; top: 0; z-index: 10; background: var(--surface); border-bottom: 1px solid var(--line); }
.site-header__bar { min-height: var(--header-h); display: flex; align-items: center; gap: var(--space-8); }
.site-header__logo img { width: 152px; height: auto; }
.site-nav { display: flex; gap: var(--space-8); flex: 1; justify-content: center; }
.site-nav a { color: var(--text-md); text-decoration: none; font-weight: 600; font-size: 14px; }
.site-nav a:hover, .site-nav a[aria-current="page"] { color: var(--text-hi); }
.site-header__actions { margin-left: auto; display: flex; gap: var(--space-3); align-items: center; }

/* Hero */
.hero { padding: var(--space-18) 0 var(--space-12); }
.hero__grid { display: grid; grid-template-columns: minmax(0, 1.05fr) minmax(0, 0.95fr); gap: var(--space-12); align-items: center; }
.hero__title { margin: 0; }
.hero__lead { margin: 0; color: var(--text-md); max-width: 540px; }

/* Radar du système de design */
.hk-radar__ring { fill: none; stroke: var(--line); }
.hk-radar__cross { stroke: var(--line); }
.hk-radar__arc { fill: none; stroke: var(--green-500); stroke-width: 3; stroke-linecap: round; }
.hk-radar__alert { fill: none; stroke: var(--red-alert); stroke-width: 5; stroke-linecap: round; }
.hk-radar__hub { fill: var(--ink-850); stroke: var(--line-strong); }
.hk-radar__waves { fill: none; stroke: var(--green-500); stroke-width: 4; stroke-linecap: round; }
.hk-radar__point { fill: var(--white); }
.hk-radar__point--alert { fill: var(--red-alert); }

/* Cartes de formulaire (connexion) */
.auth { min-height: calc(100vh - var(--header-h)); display: grid; place-items: center; padding: var(--space-12) var(--space-4); }
.auth__card { width: 100%; max-width: 440px; background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius-lg); padding: var(--space-8); }
.alert-box { padding: var(--space-3) var(--space-4); border-radius: var(--radius-sm); border: 1px solid var(--red-alert); color: var(--red-alert-text); font-size: 14px; }

/* Pied de page */
.site-footer { border-top: 1px solid var(--line); padding: var(--space-12) 0 var(--space-6); color: var(--text-md); font-size: 14px; }
.site-footer__grid { display: flex; justify-content: space-between; gap: var(--space-6); flex-wrap: wrap; }

/* Espace privé */
.private-main { padding: var(--space-8) 0 var(--space-18); }
.empty-state { border: 1px dashed var(--line-strong); border-radius: var(--radius-lg); padding: var(--space-8); color: var(--text-md); }

@media (max-width: 1000px) {
  .hero__grid { grid-template-columns: minmax(0, 1fr); }
  .site-nav { display: none; }
  .section { padding: var(--space-18) 0; }
}
@media (max-width: 720px) {
  .wrap { padding: 0 18px; }
  .site-header__logo img { width: 120px; }
  .site-header__actions .hk-btn--secondary { display: none; }
}
