/* ANEMOD — page PKI + HSM : fond clair, une seule couleur de marque, aucune décoration gratuite. */

:root {
  --brand: #9b2c63;
  --brand-strong: #7f2150;
  --on-brand: #ffffff;
  --ok: #2f6b45;
}

:root[data-theme='dark'] {
  --brand: #ff8cba;
  --brand-strong: #ffa9cb;
  --on-brand: #1c0d15;
  --ok: #7fd3a0;
}

@media (prefers-color-scheme: dark) {
  :root:not([data-theme='light']) {
    --brand: #ff8cba;
    --brand-strong: #ffa9cb;
    --on-brand: #1c0d15;
    --ok: #7fd3a0;
  }
}

h1,
h2,
h3 { letter-spacing: -0.03em; }
h2 { font-size: var(--step-3); line-height: 1.1; }
h3 { font-size: var(--step-1); line-height: 1.2; letter-spacing: -0.015em; }

.eyebrow > span { background: var(--brand); box-shadow: none; }

.btn { min-height: 50px; border-radius: 10px; font-size: 0.95rem; font-weight: 600; }
.btn:hover { transform: none; }
.btn--primary,
:root[data-theme='dark'] .btn--primary { color: var(--on-brand); background: var(--brand); box-shadow: none; }
.btn--primary:hover { color: var(--on-brand); background: var(--brand-strong); }
.btn--secondary { background: transparent; }
.btn--secondary:hover { border-color: var(--ink); }
.btn--light { color: #19191d; background: #ffffff; box-shadow: none; }
.btn--light:hover { color: #19191d; background: #f4f1eb; }

@media (prefers-color-scheme: dark) {
  :root:not([data-theme='light']) .btn--primary { color: var(--on-brand); background: var(--brand); }
}

/* Navigation ------------------------------------------------------------- */
.topbar {
  position: sticky;
  z-index: 100;
  top: 0;
  background: var(--bg);
  border-bottom: 1px solid transparent;
}

.topbar.is-scrolled { border-bottom-color: var(--line); }
.topbar__inner { display: flex; align-items: center; gap: 24px; min-height: 72px; }
.brand { display: inline-flex; align-items: center; flex: 0 0 auto; gap: 10px; color: var(--ink); }
.brand:hover { text-decoration: none; }
.brand__mark { width: 38px; height: 38px; object-fit: contain; }
.brand__name { font-family: var(--font-display); font-size: 1.05rem; font-weight: 650; letter-spacing: 0.05em; }
.brand__sub { padding-left: 10px; color: var(--muted); border-left: 1px solid var(--line-strong); font-family: var(--font-mono); font-size: 0.74rem; letter-spacing: 0.08em; }

.nav { display: flex; align-items: center; justify-content: flex-end; gap: clamp(16px, 2.2vw, 30px); margin-left: auto; }
.nav > a { color: var(--ink-2); font-size: 0.92rem; font-weight: 550; }
.nav > a:hover { color: var(--ink); text-decoration: none; }
.nav .nav__access,
.nav .nav__cta { display: inline-flex; align-items: center; min-height: 44px; padding: 0 16px; border-radius: 10px; }
.nav .nav__access { color: var(--ink); border: 1px solid var(--line-strong); }
.nav .nav__access:hover { border-color: var(--ink); }
.nav .nav__cta { color: var(--on-brand); background: var(--brand); }
.nav .nav__cta:hover { color: var(--on-brand); background: var(--brand-strong); }

.topbar__tools { display: flex; align-items: center; gap: 6px; }
.lang-switch,
.theme-toggle,
.burger {
  display: inline-grid;
  place-items: center;
  width: 44px;
  height: 44px;
  padding: 0;
  color: var(--ink-2);
  background: transparent;
  border: 1px solid var(--line-strong);
  border-radius: 10px;
  cursor: pointer;
}

.lang-switch { font-family: var(--font-mono); font-size: 0.78rem; font-weight: 500; letter-spacing: 0.06em; }
.lang-switch:hover { color: var(--ink); border-color: var(--ink); text-decoration: none; }
.theme-toggle svg { width: 20px; height: 20px; }
.theme-toggle .ico-sun { display: none; }
:root[data-theme='dark'] .theme-toggle .ico-sun { display: block; }
:root[data-theme='dark'] .theme-toggle .ico-moon { display: none; }
@media (prefers-color-scheme: dark) {
  :root:not([data-theme='light']) .theme-toggle .ico-sun { display: block; }
  :root:not([data-theme='light']) .theme-toggle .ico-moon { display: none; }
}

.burger { display: none; gap: 4px; align-content: center; }
.burger span { width: 18px; height: 1.5px; background: currentColor; transition: transform 180ms var(--ease), opacity 180ms var(--ease); }
.burger[aria-expanded='true'] span:nth-child(1) { transform: translateY(5.5px) rotate(45deg); }
.burger[aria-expanded='true'] span:nth-child(2) { opacity: 0; }
.burger[aria-expanded='true'] span:nth-child(3) { transform: translateY(-5.5px) rotate(-45deg); }

/* Hero ------------------------------------------------------------------- */
.hero { padding-block: clamp(40px, 6vw, 84px) clamp(48px, 6vw, 80px); }
.hero__layout { display: grid; grid-template-columns: minmax(0, 1.1fr) minmax(0, 0.9fr); align-items: center; gap: clamp(32px, 6vw, 84px); }
.hero__copy { display: grid; justify-items: start; gap: 22px; }
.hero h1 { max-width: 17ch; font-size: clamp(2.3rem, 1.5rem + 2.7vw, 3.9rem); font-weight: 560; line-height: 1.05; }
.hero__lead { max-width: 56ch; color: var(--ink-2); font-size: var(--step-1); line-height: 1.6; }
.hero__facts { display: grid; gap: 10px; padding: 0; margin: 0; list-style: none; }
.hero__facts li { position: relative; padding-left: 30px; color: var(--ink-2); }
.hero__facts li::before {
  position: absolute;
  top: 0.5em;
  left: 2px;
  width: 13px;
  height: 7px;
  border-bottom: 2.5px solid var(--brand);
  border-left: 2.5px solid var(--brand);
  content: '';
  transform: rotate(-45deg);
}

.hero__actions { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 6px; }
.hero__device { display: grid; gap: 14px; padding: clamp(20px, 3vw, 40px); margin: 0; background: var(--bg-soft); border: 1px solid var(--line); border-radius: var(--radius); }
.hero__device img { width: min(100%, 440px); margin-inline: auto; }
.hero__device figcaption { color: var(--muted); font-family: var(--font-mono); font-size: 0.78rem; letter-spacing: 0.04em; text-align: center; }

/* Partenaires ------------------------------------------------------------- */
.partners { padding-block: 28px; border-block: 1px solid var(--line); }
.partners__inner { display: flex; align-items: center; flex-wrap: wrap; gap: 20px clamp(24px, 4vw, 56px); }
.partners__title { flex: 0 0 auto; color: var(--muted); font-family: var(--font-mono); font-size: 0.76rem; font-weight: 500; line-height: 1.4; letter-spacing: 0.1em; text-transform: uppercase; }
.partners__list { display: flex; align-items: center; flex: 1 1 420px; flex-wrap: wrap; gap: 12px; padding: 0; margin: 0; list-style: none; }
/* Les logos sont dessinés pour un fond blanc : la tuile reste blanche dans les deux thèmes. */
.partners__list li { display: grid; flex: 1 1 130px; place-items: center; height: 76px; padding: 12px 18px; background: #ffffff; border: 1px solid var(--line); border-radius: 12px; }
.partners__list img { width: auto; max-width: 100%; height: auto; max-height: 50px; }

/* Cartes ------------------------------------------------------------------ */
.capabilities__grid,
.formats__grid,
.use-cases__grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: clamp(14px, 2vw, 22px); }

.capability,
.format,
.use-case { display: grid; align-content: start; gap: 12px; padding: clamp(22px, 2.6vw, 30px); background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius-small); }
.capability > p:last-child,
.format > p,
.use-case p { color: var(--muted); font-size: 0.97rem; }
.capability__top { display: flex; align-items: baseline; gap: 10px; color: var(--muted); font-family: var(--font-mono); font-size: 0.78rem; letter-spacing: 0.06em; text-transform: uppercase; }
.capability__top span { color: var(--brand); font-weight: 500; }
.use-cases { background: var(--bg-soft); }

/* Console ----------------------------------------------------------------- */
.product { background: var(--bg-soft); }
.product__head { display: grid; gap: 16px; max-width: 640px; margin-bottom: clamp(30px, 4vw, 46px); }
.product__head > p:last-child { color: var(--muted); }
.product-console__frame { overflow: hidden; background: var(--surface); border: 1px solid var(--line-strong); border-radius: var(--radius-small); }
.product-console__bar { display: grid; grid-template-columns: auto 1fr auto; align-items: center; gap: 16px; min-height: 46px; padding-inline: 16px; color: var(--muted); border-bottom: 1px solid var(--line); font-family: var(--font-mono); font-size: 0.76rem; }
.window-dots { display: flex; gap: 6px; }
.window-dots i { width: 9px; height: 9px; background: var(--line-strong); border-radius: 50%; }
.console-online { display: inline-flex; align-items: center; gap: 8px; }
.console-online i,
.console-device > i { width: 8px; height: 8px; background: var(--ok); border-radius: 50%; }
.product-console__shell { display: grid; grid-template-columns: 210px minmax(0, 1fr); min-height: 520px; }
.product-console__nav { display: grid; grid-template-rows: auto 1fr auto; gap: 22px; padding: 20px 14px; background: var(--bg-soft); border-right: 1px solid var(--line); }
.console-brand { display: flex; align-items: center; gap: 9px; padding-inline: 8px; font-family: var(--font-display); font-size: 0.9rem; letter-spacing: 0.05em; }
.console-nav-list { display: grid; align-content: start; gap: 2px; }
.console-nav-list span { display: flex; align-items: center; gap: 10px; padding: 9px 10px; color: var(--muted); border-radius: 8px; font-size: 0.88rem; }
.console-nav-list i { width: 14px; font-style: normal; text-align: center; }
.console-nav-list .is-active { color: var(--ink); background: var(--surface); box-shadow: inset 2px 0 var(--brand); font-weight: 600; }
.console-device { display: flex; align-items: center; gap: 10px; padding: 11px 12px; background: var(--surface); border: 1px solid var(--line); border-radius: 10px; }
.console-device span { display: grid; }
.console-device small { color: var(--muted); font-size: 0.74rem; }
.console-device strong { font-size: 0.86rem; }
.product-console__workspace { display: grid; align-content: start; gap: 26px; padding: clamp(18px, 2.6vw, 30px); }

.console-tabs { display: inline-flex; justify-self: start; gap: 4px; padding: 4px; background: var(--bg-soft); border-radius: 10px; }
.console-tabs button { min-height: 38px; padding: 0 14px; color: var(--muted); background: transparent; border: 0; border-radius: 7px; font-size: 0.86rem; font-weight: 600; cursor: pointer; }
.console-tabs button[aria-selected='true'] { color: var(--ink); background: var(--surface); box-shadow: 0 0 0 1px var(--line); }

.console-view { display: grid; gap: 18px; }
.console-view + .console-view { padding-top: 26px; border-top: 1px solid var(--line); }
.is-enhanced .console-view + .console-view { padding-top: 0; border-top: 0; }
.is-enhanced .console-view__fallback-title { display: none; }
.console-view__fallback-title { color: var(--brand); font-family: var(--font-mono); font-size: 0.76rem; letter-spacing: 0.08em; text-transform: uppercase; }
.console-view__title { display: flex; align-items: end; justify-content: space-between; gap: 16px; }
.console-view__title h3 { font-size: var(--step-2); }
.console-view__title span { color: var(--muted); font-size: 0.9rem; }
.console-view__title > small,
.product-console__caption { color: var(--muted); font-family: var(--font-mono); font-size: 0.76rem; }
.product-console__caption { margin-top: 14px; text-align: center; }

.console-metrics,
.certificate-summary { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; }
.console-metrics article,
.certificate-summary article,
.console-chain,
.console-events,
.audit-checkpoint,
.audit-log { display: grid; gap: 6px; padding: 16px; border: 1px solid var(--line); border-radius: 10px; }
.console-metrics span,
.certificate-summary small,
.audit-checkpoint small,
.console-events small,
.audit-log small { color: var(--muted); font-size: 0.8rem; }
.console-metrics strong,
.certificate-summary strong { font-family: var(--font-display); font-size: 1.15rem; font-weight: 600; }
.metric-spark { display: none; }

.console-overview-grid { display: grid; grid-template-columns: minmax(0, 1.1fr) minmax(0, 0.9fr); gap: 12px; }
.console-chain,
.console-events { align-content: start; gap: 14px; }
.console-card-head { display: flex; align-items: center; justify-content: space-between; gap: 10px; font-size: 0.9rem; }
.console-card-head span { color: var(--ok); font-size: 0.8rem; }
.console-chain__map { display: flex; align-items: center; gap: 8px; padding-block: 14px; }
.console-chain__map span { padding: 8px 12px; background: var(--bg-soft); border: 1px solid var(--line); border-radius: 8px; font-family: var(--font-mono); font-size: 0.78rem; white-space: nowrap; }
.console-chain__map i { flex: 1 1 16px; height: 1px; background: var(--line-strong); }
.console-chain__foot { display: flex; justify-content: space-between; gap: 10px; padding-top: 12px; color: var(--muted); border-top: 1px solid var(--line); font-size: 0.8rem; }

.console-events ul { display: grid; gap: 0; padding: 0; margin: 0; list-style: none; }
.console-events li,
.audit-log > div { display: grid; grid-template-columns: 8px 1fr auto; align-items: center; gap: 12px; padding-block: 10px; font-size: 0.88rem; }
.console-events li + li,
.audit-log > div + div { border-top: 1px solid var(--line); }
.console-events li > i,
.audit-log > div > i { width: 7px; height: 7px; background: var(--brand); border-radius: 50%; }
.console-events li > span,
.audit-log > div > span { display: grid; }
.console-events time,
.audit-log time { color: var(--muted); font-family: var(--font-mono); font-size: 0.78rem; }

.certificate-list { border: 1px solid var(--line); border-radius: 10px; }
.certificate-row { display: grid; grid-template-columns: 1.3fr 1fr 1fr auto; align-items: center; gap: 12px; min-height: 52px; padding-inline: 16px; font-size: 0.88rem; }
.certificate-row + .certificate-row { border-top: 1px solid var(--line); }
.certificate-row > span { color: var(--muted); }
.certificate-row--head { min-height: 42px; background: var(--bg-soft); border-radius: 10px 10px 0 0; font-family: var(--font-mono); font-size: 0.74rem; letter-spacing: 0.06em; text-transform: uppercase; }
.certificate-row em { min-width: 62px; color: var(--ok); font-style: normal; font-weight: 600; text-align: right; }

.audit-layout { display: grid; grid-template-columns: minmax(0, 0.8fr) minmax(0, 1.2fr); gap: 12px; }
.audit-checkpoint { align-content: start; gap: 14px; }
.audit-ring { display: inline-grid; justify-self: start; padding: 10px 14px; border: 1px solid var(--ok); border-radius: 10px; }
.audit-ring span,
.audit-checkpoint > div:last-child { display: grid; }
.audit-ring strong { color: var(--ok); }
.audit-ring small,
.audit-checkpoint > div:last-child span { color: var(--muted); font-size: 0.8rem; }
.audit-log { gap: 0; padding-block: 6px; }

/* Chemin de confiance ---------------------------------------------------- */
.flow-layout { display: grid; grid-template-columns: minmax(0, 0.85fr) minmax(0, 1.15fr); align-items: start; gap: clamp(32px, 6vw, 88px); }
.flow-head { position: sticky; top: 110px; display: grid; gap: 18px; }
.flow-head > p:last-child { max-width: 40ch; color: var(--muted); }
.flow-steps { display: grid; }
.flow-step { display: grid; grid-template-columns: 56px 1fr; gap: 8px; padding-block: 26px; border-top: 1px solid var(--line); }
.flow-step:last-child { border-bottom: 1px solid var(--line); }
.flow-step > span { color: var(--muted); font-family: var(--font-mono); font-size: 0.86rem; line-height: 1.9; transition: color 200ms var(--ease); }
.flow-step > div { display: grid; gap: 8px; }
.flow-step p { color: var(--muted); }
.flow-step.is-active > span { color: var(--brand); font-weight: 500; }

/* Déploiements ----------------------------------------------------------- */
.format { grid-template-rows: 170px auto 1fr auto; }
.format__media { display: grid; place-items: center; margin: 0; }
/* Le format hébergé n'a pas de matériel propre : une photo de centre de données l'illustre. */
.format__media--photo { place-self: stretch; overflow: hidden; border-radius: 10px; }
.format__media.format__media--photo img { width: 100%; height: 170px; max-height: none; object-fit: cover; }
.format__media img { width: auto; max-width: 100%; height: auto; max-height: 170px; }
.format--featured { border-color: var(--brand); box-shadow: inset 0 3px var(--brand); }
.format__foot { display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: 10px; padding-top: 16px; color: var(--muted); border-top: 1px solid var(--line); font-size: 0.86rem; }
.format__foot a { color: var(--brand); font-weight: 600; }

/* Accès à la console ------------------------------------------------------ */
.access__layout { display: grid; grid-template-columns: minmax(0, 1fr) minmax(320px, 0.82fr); align-items: center; gap: clamp(32px, 7vw, 96px); }
.access__copy { display: grid; gap: 18px; }
.access__copy > p:last-child { max-width: 46ch; color: var(--muted); }
.access__card { display: grid; gap: 20px; padding: clamp(22px, 3vw, 32px); background: var(--surface); border: 1px solid var(--line-strong); border-radius: var(--radius-small); }
.access__card-head { display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: 10px; }
.access__name { display: inline-flex; align-items: center; gap: 10px; color: var(--ink-2); font-family: var(--font-mono); font-size: 0.78rem; letter-spacing: 0.08em; text-transform: uppercase; }
.access__name i { width: 8px; height: 8px; background: var(--brand); border-radius: 50%; }
.access__status { padding: 5px 10px; color: var(--ink-2); border: 1px solid var(--line-strong); border-radius: 999px; font-family: var(--font-mono); font-size: 0.74rem; }
.access__signin { justify-content: space-between; min-height: 56px; color: var(--on-brand); background: var(--brand); }
.access__signin:hover { color: var(--on-brand); background: var(--brand-strong); }
/* Tant que l'adresse de la console n'est pas publiée, le bouton reste un repère inactif. */
.access__signin[aria-disabled='true'],
.access__signin[aria-disabled='true']:hover { color: var(--muted); background: transparent; border: 1px dashed var(--line-strong); cursor: default; }
.access__request { color: var(--muted); font-size: 0.92rem; }
.access__request a { color: var(--brand); font-weight: 600; }

/* Conclusion et pied de page --------------------------------------------- */
.closing { color: #ffffff; background: #7f2150; }
.closing__inner { display: grid; justify-items: start; gap: 28px; padding-block: clamp(64px, 9vw, 112px); }
.closing h2 { max-width: 18ch; color: #ffffff; font-size: var(--step-4); }
.closing :focus-visible { outline-color: #ffffff; }

.footer { color: var(--muted); background: var(--bg); border-top: 1px solid var(--line); font-size: 0.9rem; }
.footer__inner { display: grid; grid-template-columns: 0.8fr 1fr 1.2fr; align-items: start; gap: 40px; padding-block: 48px 36px; }
.footer__brand { display: flex; align-items: center; gap: 11px; }
.footer__brand img { width: 34px; height: 34px; }
.footer__brand div { display: grid; }
.footer__brand strong { color: var(--ink); font-family: var(--font-display); letter-spacing: 0.06em; }
.footer__brand span { font-family: var(--font-mono); font-size: 0.74rem; letter-spacing: 0.06em; }
.footer__nav { display: grid; grid-template-columns: 1fr 1fr; gap: 10px 24px; }
.footer a { color: var(--ink-2); }
.footer__contact { display: grid; justify-items: end; gap: 8px; font-style: normal; text-align: right; }
.footer__legal { display: flex; justify-content: space-between; flex-wrap: wrap; gap: 8px 20px; padding-block: 18px 24px; border-top: 1px solid var(--line); font-size: 0.8rem; }

/* Responsive ------------------------------------------------------------- */
@media (max-width: 1120px) {
  .brand__sub { display: none; }
  .nav { gap: 14px; }
  .product-console__shell { grid-template-columns: 180px minmax(0, 1fr); }
}

@media (max-width: 920px) {
  .nav { position: absolute; top: 100%; right: 0; left: 0; display: grid; align-items: stretch; gap: 0; padding: 8px var(--gutter) 18px; background: var(--bg); border-bottom: 1px solid var(--line-strong); }
  .topbar.has-menu .nav { display: none; }
  .topbar.has-menu .nav.is-open { display: grid; }
  .topbar:not(.has-menu) { position: relative; }
  .topbar:not(.has-menu) .topbar__inner { flex-wrap: wrap; padding-block: 10px; }
  .topbar:not(.has-menu) .nav { position: static; grid-template-columns: 1fr 1fr; width: 100%; padding-inline: 0; margin: 0; border-bottom: 0; }
  .topbar:not(.has-menu) .nav__access,
  .topbar:not(.has-menu) .nav__cta { grid-column: 1 / -1; }
  .topbar__tools { margin-left: auto; }
  .nav > a { display: flex; align-items: center; min-height: 48px; border-bottom: 1px solid var(--line); }
  .nav .nav__access,
  .nav .nav__cta { justify-content: center; margin-top: 10px; }
  .nav .nav__cta { border-bottom: 0; }
  .burger { display: inline-grid; }

  .hero__layout,
  .flow-layout,
  .access__layout { grid-template-columns: 1fr; }
  .hero__device img { width: min(100%, 340px); }
  .flow-head { position: static; }
  .capabilities__grid,
  .formats__grid,
  .use-cases__grid { grid-template-columns: 1fr; }
  .format { grid-template-rows: none; }
  .product-console__nav { display: none; }
  .product-console__shell { grid-template-columns: 1fr; min-height: 0; }
}

@media (max-width: 700px) {
  .hero__actions { align-items: stretch; flex-direction: column; width: 100%; }
  .partners__list li { flex-basis: calc(50% - 6px); }
  .product-console__bar { grid-template-columns: 1fr auto; }
  .product-console__bar > span:nth-child(2) { display: none; }
  .console-tabs { display: grid; grid-template-columns: repeat(3, 1fr); justify-self: stretch; }
  .console-tabs button { padding: 0 6px; }
  .console-view__title { align-items: start; flex-direction: column; gap: 8px; }
  .console-metrics,
  .certificate-summary,
  .console-overview-grid,
  .audit-layout { grid-template-columns: 1fr; }
  .certificate-row { grid-template-columns: 1fr auto; }
  .certificate-row > *:nth-child(2),
  .certificate-row > *:nth-child(3) { display: none; }
  .console-chain__map { flex-wrap: wrap; }
  .console-chain__map i { display: none; }
  .flow-step { grid-template-columns: 42px 1fr; }
  .footer__inner { grid-template-columns: 1fr; gap: 28px; }
  .footer__contact { justify-items: start; text-align: left; }
}

@media (prefers-reduced-motion: reduce) {
  .burger span,
  .flow-step > span { transition: none; }
}
