/* Sipward — feuille de style du site de présentation.
 *
 * Les jetons de couleur sont ceux de l'application, reproduits à l'identique :
 * un visiteur qui parcourt le site puis se connecte ne doit pas changer
 * d'univers visuel. Toute modification de palette se fait donc dans les deux
 * dépôts, sans quoi ils divergent sans que personne ne s'en aperçoive.
 *
 * Pas de framework : une page de présentation n'en a pas besoin, et chaque
 * dépendance serait à suivre pour des failles qui ne concernent pas du texte
 * statique.
 *
 * Polices servies depuis le site (fonts/) : la politique de sécurité appliquée
 * par Traefik restreint font-src à 'self', et une police externe ajouterait une
 * dépendance réseau au premier rendu.
 *
 * Typographie : IBM Plex Sans pour le texte, IBM Plex Mono réservé aux données
 * techniques (statuts, noms d'instance, paliers). Échelle fixe de sept tailles
 * (13 · 15 · 17 · 20 · 30 · 40 · 50 px) et deux graisses (400, 600) : toute
 * nouvelle règle en reprend une plutôt que d'en créer une intermédiaire. */

@font-face {
  font-family: "IBM Plex Sans";
  src: url("/fonts/ibm-plex-sans-400.woff2") format("woff2");
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: "IBM Plex Sans";
  src: url("/fonts/ibm-plex-sans-600.woff2") format("woff2");
  font-weight: 600;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: "IBM Plex Mono";
  src: url("/fonts/ibm-plex-mono-400.woff2") format("woff2");
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: "IBM Plex Mono";
  src: url("/fonts/ibm-plex-mono-500.woff2") format("woff2");
  font-weight: 500;
  font-style: normal;
  font-display: swap;
}

:root {
  --bg: #f5f6f7;
  --surface: #ffffff;
  --surface-alt: #f9fafb;
  --border: rgba(16, 24, 40, 0.11);
  --border-strong: rgba(16, 24, 40, 0.2);
  --text: #111418;
  --text-2: #474e57;
  --text-3: #6b727c;
  --accent: #185fa5;
  --accent-bg: #e8f0f9;
  --accent-text: #0c447c;
  --ok: #1d9e75;
  --warn-text: #c2410c;
  --radius: 4px;
  --max: 1080px;

  --sans: "IBM Plex Sans", -apple-system, BlinkMacSystemFont, "Segoe UI",
    Roboto, Arial, sans-serif;
  --mono: "IBM Plex Mono", ui-monospace, SFMono-Regular, Menlo, Consolas,
    monospace;
}

/* Clair par défaut, sombre si le système le demande — comme l'application. */
@media (prefers-color-scheme: dark) {
  :root {
    --bg: #0f1215;
    --surface: #161a1f;
    --surface-alt: #13161a;
    --border: rgba(255, 255, 255, 0.09);
    --border-strong: rgba(255, 255, 255, 0.18);
    --text: #e6e8eb;
    --text-2: #b2b8c0;
    --text-3: #8a919a;
    --accent: #3987e5;
    --accent-bg: #0c2340;
    --accent-text: #85b7eb;
    --warn-text: #fb923c;
  }
}

* { box-sizing: border-box; margin: 0; padding: 0; }

html { scroll-behavior: smooth; }

body {
  background: var(--bg);
  color: var(--text);
  font-family: var(--sans);
  font-size: 17px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

.wrap { max-width: var(--max); margin: 0 auto; padding: 0 24px; }

/* ── En-tête ─────────────────────────────────────────────────────────────── */

header {
  border-bottom: 1px solid var(--border);
  position: sticky;
  top: 0;
  background: color-mix(in srgb, var(--bg) 85%, transparent);
  backdrop-filter: blur(10px);
  z-index: 10;
}

.nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 62px;
}

.logo {
  display: flex;
  align-items: center;
  gap: 9px;
  font-weight: 600;
  font-size: 17px;
  color: var(--text);
  text-decoration: none;
}

.logo svg { display: block; }

/* Le tracé du logo suit la couleur d'accent : une seule définition pour les
   deux thèmes, là où deux versions divergeraient à la première retouche. */
.logo-mark { color: var(--accent); }

.nav-links { display: flex; gap: 26px; align-items: center; }

.nav-links a {
  color: var(--text-2);
  text-decoration: none;
  font-size: 15px;
  transition: color 0.15s;
}

.nav-links a:hover { color: var(--text); }

/* Hamburger — caché sur desktop, visible sur mobile via media query. */
#mob-overlay { display: none; }
#nav-check { display: none; }
.nav-toggle {
  display: none;
  cursor: pointer;
  flex-direction: column;
  gap: 5px;
  padding: 4px;
  z-index: 210;
  position: relative;
}
.nav-toggle .bar {
  display: block;
  width: 22px;
  height: 2px;
  background: var(--text);
  border-radius: 2px;
  transition: transform 0.2s, opacity 0.2s;
}

/* ── Bandeau d'ouverture ─────────────────────────────────────────────────── */

.hero { padding-block: 88px 80px; }

/* Ligne d'état au-dessus du titre d'accueil : du texte, pas un badge. */
.status {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 4px 10px;
  margin-bottom: 28px;
  font-family: var(--mono);
  font-size: 13px;
  color: var(--text-2);
}

.status-mark {
  width: 8px;
  height: 8px;
  background: var(--ok);
}

.status-extra { color: var(--text-3); }

h1 {
  font-size: clamp(34px, 5.4vw, 50px);
  line-height: 1.12;
  letter-spacing: -0.012em;
  font-weight: 600;
  max-width: 18ch;
  margin-bottom: 24px;
  text-wrap: balance;
}

h1 em, .h1-page em {
  font-style: normal;
  color: var(--accent);
}

.lead {
  font-size: 20px;
  line-height: 1.55;
  color: var(--text-2);
  max-width: 56ch;
  margin-bottom: 36px;
}

.cta-row { display: flex; gap: 12px; flex-wrap: wrap; align-items: center; }

.btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 12px 20px;
  border-radius: var(--radius);
  font-size: 15px;
  font-weight: 600;
  text-decoration: none;
  border: 1px solid transparent;
  transition: background 0.15s, border-color 0.15s;
}

.btn-primary {
  background: var(--accent);
  color: var(--surface);
}

.btn-primary:hover { background: var(--accent-text); }

.btn-ghost {
  border-color: var(--border-strong);
  color: var(--text-2);
  font-weight: 400;
}

.btn-ghost:hover { border-color: var(--text-3); color: var(--text); }

/* ── Sections ────────────────────────────────────────────────────────────── */

section { padding: 80px 0; border-top: 1px solid var(--border); }

/* Étiquette de donnée (paliers de tarif) : en mono, sans majuscules forcées. */
.section-label {
  font-family: var(--mono);
  font-size: 13px;
  font-weight: 500;
  color: var(--text-2);
  margin-bottom: 12px;
}

h2 {
  font-size: 30px;
  line-height: 1.2;
  letter-spacing: -0.005em;
  font-weight: 600;
  margin-bottom: 16px;
  max-width: 24ch;
  text-wrap: balance;
}

.section-lead {
  color: var(--text-2);
  max-width: 62ch;
  margin-bottom: 48px;
}

/* ── Grille de fonctionnalités ───────────────────────────────────────────── */

.grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 32px 40px;
}

/* Un filet au-dessus de chaque élément plutôt qu'une boîte : la grille se lit
   comme une liste, sans empiler fond, bordure et arrondi. */
.card {
  border-top: 1px solid var(--border-strong);
  padding: 22px 0 0;
}

.card-icon {
  display: flex;
  margin-bottom: 14px;
  color: var(--accent);
}

.card h3 {
  font-size: 20px;
  line-height: 1.3;
  font-weight: 600;
  margin-bottom: 8px;
}

.card p {
  font-size: 15px;
  color: var(--text-2);
}

/* Ligne d'exemple en mono sous une carte : à quoi ressemble l'information
   dans la console. */
.card .log {
  margin-top: 16px;
  padding: 8px 10px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  font-family: var(--mono);
  font-size: 13px;
  line-height: 1.5;
  color: var(--text-2);
  overflow-wrap: anywhere;
}

.card .log b { font-weight: 500; color: var(--text); }

.card .log .ko { color: var(--warn-text); }

/* ── Liste en deux colonnes ──────────────────────────────────────────────── */

.split {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 40px;
  align-items: start;
}

.checklist { list-style: none; display: grid; gap: 16px; }

.checklist li {
  display: flex;
  gap: 12px;
  align-items: flex-start;
  font-size: 15px;
  color: var(--text-2);
}

.checklist svg { flex-shrink: 0; margin-top: 3px; color: var(--accent); }

.checklist strong {
  color: var(--text);
  font-weight: 600;
  display: block;
  margin-bottom: 2px;
}

/* ── Encart souveraineté ─────────────────────────────────────────────────── */

.panel {
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--surface);
  padding: 32px;
}

.panel h3 {
  font-size: 20px;
  font-weight: 600;
  margin-bottom: 10px;
}

.panel p { color: var(--text-2); font-size: 15px; max-width: 60ch; }

/* ── Contact ─────────────────────────────────────────────────────────────── */

.contact { text-align: center; padding-block: 88px; }

.contact h2 { margin: 0 auto 16px; max-width: 20ch; }

.contact .section-lead { margin: 0 auto 32px; }

.mail-block { margin-top: 32px; }

.mail {
  color: var(--accent);
  text-decoration: none;
  border-bottom: 1px solid var(--border-strong);
  padding-bottom: 2px;
}

.mail:hover { border-color: var(--accent); }

/* ── Pied de page ────────────────────────────────────────────────────────── */

footer {
  border-top: 1px solid var(--border);
  padding: 32px 0;
  font-size: 13px;
  /* La mention légale du pied de page doit rester lisible, elle n'est pas
     décorative : --text-2 plutôt que --text-3. */
  color: var(--text-2);
}

.foot {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  flex-wrap: wrap;
  align-items: center;
}

footer a { color: var(--text-3); text-decoration: none; }
footer a:hover { color: var(--text-2); }

/* ── Écrans étroits ──────────────────────────────────────────────────────── */

@media (max-width: 640px) {
  .hero { padding-block: 56px; }
  section { padding: 56px 0; }
  .panel { padding: 24px; }
  .lead { font-size: 17px; }

  .nav-toggle { display: flex; }
  header { z-index: 99999; position: sticky; }
  .nav-links { display: none; }

  /* Menu mobile injecté dans body par JS — pas de clipping par le header. */
  #mob-overlay {
    display: none;
    position: fixed;
    inset: 0;
    z-index: 9999;
  }
  #mob-overlay.mob-open { display: block; }

  .mob-backdrop {
    position: absolute;
    inset: 0;
    background: rgba(0,0,0,0.45);
  }

  .mob-panel {
    position: absolute;
    top: 0; left: 0; right: 0;
    background: var(--surface);
    padding: 80px 28px 32px;
    display: flex;
    flex-direction: column;
    max-height: 100vh;
    overflow-y: auto;
    box-shadow: 0 4px 24px rgba(0,0,0,0.15);
  }

  .mob-panel a {
    font-size: 20px;
    padding: 16px 0;
    border-bottom: 0.5px solid var(--border);
    color: var(--text);
    text-decoration: none;
  }

  .mob-panel a:last-child { border-bottom: none; }

  #nav-check:checked ~ label.nav-toggle .bar:nth-child(1) {
    transform: translateY(7px) rotate(45deg);
  }
  #nav-check:checked ~ label.nav-toggle .bar:nth-child(2) { opacity: 0; }
  #nav-check:checked ~ label.nav-toggle .bar:nth-child(3) {
    transform: translateY(-7px) rotate(-45deg);
  }
}

/* Respect d'une préférence système : une animation de défilement peut gêner
 * les personnes sensibles au mouvement. */
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  * { transition: none !important; }
}

/* ── Pages intérieures ───────────────────────────────────────────────────── */

/* h1 des pages intérieures : taille plus modeste que le hero d'accueil. */
.h1-page {
  font-size: clamp(30px, 4.2vw, 40px);
  line-height: 1.15;
  letter-spacing: -0.01em;
  font-weight: 600;
  max-width: 22ch;
  margin-bottom: 24px;
  text-wrap: balance;
}

/* h2 dans les cards (pages fonctionnalités) : même rendu que h3 sans en être un. */
.card-h2 {
  font-size: 20px;
  line-height: 1.3;
  font-weight: 600;
  margin-bottom: 8px;
  max-width: none;
}

/* Page active dans la navigation. */
.nav-links a[aria-current="page"] {
  color: var(--text);
  font-weight: 600;
}

/* ── Navigation pied de page ─────────────────────────────────────────────── */

.foot-nav { display: flex; gap: 18px; flex-wrap: wrap; }

.foot-nav a { color: var(--text-3); text-decoration: none; font-size: 13px; }
.foot-nav a:hover { color: var(--text-2); }

/* ── Tarifs ───────────────────────────────────────────────────────────────── */

/* Palier mis en avant : filet d'accent, plus épais, au lieu d'un fond coloré. */
.card--accent {
  border-top: 2px solid var(--accent);
  padding-top: 21px;
}

.card--accent .section-label { color: var(--accent); }

.card .pricing-price {
  font-size: 50px;
  font-weight: 600;
  letter-spacing: -0.012em;
  color: var(--text);
  margin: 8px 0;
  line-height: 1.1;
}

.pricing-unit {
  font-size: 15px;
  font-weight: 400;
  color: var(--text-2);
  letter-spacing: 0;
}

/* Texte corps dans une card (complément à card p déjà défini). */
.card-body {
  font-size: 15px;
  color: var(--text-2);
}

/* Espace au-dessus d'une cta-row qui suit un encart panel. */
.cta-row--top { margin-top: 32px; }

/* ── Prose juridique ─────────────────────────────────────────────────────── */

.prose { max-width: 72ch; }

.prose h2 {
  font-size: 20px;
  line-height: 1.3;
  font-weight: 600;
  letter-spacing: 0;
  margin: 40px 0 10px;
  max-width: none;
}

.prose h2:first-child { margin-top: 0; }

.prose p {
  font-size: 15px;
  color: var(--text-2);
  line-height: 1.7;
  margin-bottom: 14px;
}

.prose ul {
  margin: 0 0 14px 20px;
  display: grid;
  gap: 6px;
}

.prose li {
  font-size: 15px;
  color: var(--text-2);
  line-height: 1.6;
}

.prose strong { color: var(--text); font-weight: 600; }

/* ── Ajustements ponctuels ───────────────────────────────────────────────── */

/* Nommés plutôt qu'écrits en attribut style= : la politique de contenu du site
 * interdit les styles en ligne, ce qui les rendrait sans effet. */

.no-margin-bottom { margin-bottom: 0; }

.page-error { padding-top: 140px; }

.page-error h2 { margin: 0 auto 16px; }

.page-error .section-lead { margin: 0 auto 32px; }

/* Espacements utilitaires — remplacent les style= inline (bloqués par CSP). */
.mt-32 { margin-top: 32px; }
.mt-40 { margin-top: 40px; }
.mt-48 { margin-top: 48px; }

/* ── Formulaire waitlist ─────────────────────────────────────────────────── */

/* Champ piège anti-robot : hors écran, pas display:none (certains robots
   ignorent les champs masqués de cette façon). */
.hp { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }

.waitlist-form {
  display: grid;
  gap: 14px;
  max-width: 520px;
}

.waitlist-form .form-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 14px;
}

.waitlist-form label {
  display: block;
  font-size: 13px;
  font-weight: 600;
  color: var(--text-2);
  margin-bottom: 5px;
}

.waitlist-form input,
.waitlist-form select {
  width: 100%;
  padding: 9px 12px;
  border: 1px solid var(--border-strong);
  border-radius: var(--radius);
  background: var(--surface);
  color: var(--text);
  font-size: 15px;
  font-family: inherit;
  transition: border-color 0.15s;
}

.waitlist-form input:focus,
.waitlist-form select:focus {
  outline: none;
  border-color: var(--accent);
}

.waitlist-form .form-field { display: flex; flex-direction: column; }

.form-note {
  font-size: 13px;
  line-height: 1.55;
  color: var(--text-2);
}

.form-note .mail { border-bottom: 0; text-decoration: underline; }

.form-msg {
  font-size: 13px;
  padding: 10px 14px;
  border-radius: var(--radius);
  display: none;
}

.form-msg.ok  { background: #e6f6f0; color: #0d5c3a; display: block; }
.form-msg.err { background: #fdecea; color: #8b1a1a; display: block; }

@media (prefers-color-scheme: dark) {
  .form-msg.ok  { background: #0a2e1e; color: #6fcca0; }
  .form-msg.err { background: #2e0d0d; color: #f4a0a0; }
}

@media (max-width: 640px) {
  .waitlist-form .form-row { grid-template-columns: 1fr; }
}
