/* ==================================================================
   NOXVA AI — design system

   Charte NOXVA GROUPE. Le sigle est fait de trois paliers qui montent :
   les branches qui s'empilent sous la holding. Pour la branche IA, le
   palier en or est EN HAUT — c'est la valeur ajoutee. Ne jamais incliner
   le sigle ni toucher a son espacement.

   La charte est claire par defaut (fond #F4F6FB) : le navy sert aux
   titres, aux bordures et aux blocs pleins, l'or aux accents.
   ================================================================== */

:root {
  /* --- couleurs officielles ------------------------------------- */
  --navy: #1E3799;          /* couleur principale */
  --navy-clair: #2d4ba5;    /* haut du degrade navy */
  --indigo: #5C6BC0;        /* palier milieu, bordures, liens */
  --or: #F5A623;            /* palier haut, accents */
  --or-fonce: #e8941e;
  --encre: #14265F;         /* texte du lettrage */
  --gris: #718096;          /* textes secondaires */

  /* --- roles, pour que le reste de la feuille suive -------------- */
  --bg: #F4F6FB;            /* fond de page */
  --bg-2: #FFFFFF;          /* fond de bloc en relief */
  --surface: #FFFFFF;       /* cartes */
  --border: #DDE3F0;        /* filets */
  --texte: #14265F;         /* texte principal */
  --texte-2: #718096;       /* texte secondaire */

  /* Les anciens noms restent, remappes : la feuille en compte des
     centaines d'usages, et les renommer un par un n'apporterait rien
     de plus qu'un risque d'en oublier. */
  --violet: #1E3799;
  --violet-fort: #1E3799;
  --violet-sombre: #14265F;
  --violet-pale: #14265F;

  --ok: #1B9C6B;
  --warn: #e8941e;
  --erreur: #C0392B;

  --ombre: 0 1px 2px rgba(20, 38, 95, .06), 0 8px 24px rgba(20, 38, 95, .06);
  --ombre-forte: 0 2px 4px rgba(20, 38, 95, .08), 0 16px 40px rgba(20, 38, 95, .10);
}

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  background: var(--bg);
  color: var(--texte);
  font-family: "Open Sans", "Segoe UI", system-ui, -apple-system, sans-serif;
  font-size: 16px;
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

h1, h2, h3, h4 {
  font-family: "Montserrat", "Segoe UI", system-ui, sans-serif;
  font-weight: 700;
  line-height: 1.15;
  letter-spacing: -0.01em;
}

a {
  color: var(--violet);
  text-decoration: none;
}

::selection {
  background: rgba(30, 55, 153, 0.45);
  color: var(--violet-pale);
}

.conteneur {
  max-width: 1100px;
  margin: 0 auto;
  padding: 0 24px;
}

.cache {
  display: none !important;
}

/* ------------------------------------------------------------------
   Logo
   ------------------------------------------------------------------ */

.logo {
  width: 30px;
  height: 30px;
  display: block;
  flex: none;
}

.nav-logo {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  color: var(--texte);
  font-family: "Montserrat", system-ui, sans-serif;
  font-weight: 700;
  font-size: 19px;
  letter-spacing: 0.01em;
}

.nav-logo:hover {
  color: var(--violet-pale);
}

/* ------------------------------------------------------------------
   Navigation
   ------------------------------------------------------------------ */

.nav {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 100;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  padding: 14px 32px;
  background: rgba(244, 246, 251, 0.72);
  -webkit-backdrop-filter: blur(14px);
  backdrop-filter: blur(14px);
  border-bottom: 1px solid var(--border);
}

.nav-liens {
  display: flex;
  align-items: center;
  gap: 30px;
}

.nav-liens a {
  color: var(--texte-2);
  font-size: 15px;
  font-weight: 500;
  transition: color 0.2s ease;
}

.nav-liens a:hover {
  color: var(--violet-pale);
}

/* ------------------------------------------------------------------
   Boutons
   ------------------------------------------------------------------ */

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 12px 22px;
  border-radius: 10px;
  border: 1px solid transparent;
  font-family: "Inter", system-ui, sans-serif;
  font-size: 15px;
  font-weight: 600;
  line-height: 1.2;
  cursor: pointer;
  white-space: nowrap;
  transition: box-shadow 0.2s ease, border-color 0.2s ease,
    transform 0.2s ease, color 0.2s ease, background 0.2s ease;
}

.btn-primaire {
  background: linear-gradient(135deg, var(--navy), var(--navy-clair));
  color: #ffffff;
}

.btn-primaire:hover {
  box-shadow: 0 6px 18px rgba(30, 55, 153, .28);
  transform: translateY(-1px);
}

.btn-fantome {
  background: transparent;
  color: var(--texte);
  border-color: var(--border);
}

.btn-fantome:hover {
  border-color: rgba(92, 107, 192, 0.6);
  color: var(--violet-pale);
  box-shadow: 0 4px 12px rgba(30, 55, 153, .16);
}

.btn-petit {
  padding: 8px 14px;
  font-size: 13px;
  border-radius: 8px;
}

.btn-stop {
  background: transparent;
  color: var(--warn);
  border-color: rgba(245, 166, 35, 0.45);
}

.btn-stop:hover {
  box-shadow: 0 4px 12px rgba(232, 148, 30, .22);
  border-color: var(--warn);
}

/* ------------------------------------------------------------------
   Héros
   ------------------------------------------------------------------ */

.heros {
  position: relative;
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  overflow: hidden;
  padding: 140px 24px 100px;
  background:
    radial-gradient(ellipse 70% 55% at 50% 32%, rgba(30, 55, 153, 0.14), transparent 70%),
    var(--bg);
}

.heros-contenu {
  position: relative;
  z-index: 2;
  max-width: 860px;
}

.sur-titre {
  font-family: "JetBrains Mono", ui-monospace, monospace;
  font-size: 13px;
  font-weight: 500;
  letter-spacing: 0.22em;
  color: var(--violet);
  margin-bottom: 22px;
}

.heros h1 {
  font-size: clamp(42px, 7vw, 78px);
  margin-bottom: 26px;
  background: linear-gradient(135deg, var(--navy) 40%, var(--indigo));
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
}

.sous-titre {
  font-size: 19px;
  color: var(--texte-2);
  max-width: 640px;
  margin: 0 auto 42px;
}

.heros-actions {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 16px;
  flex-wrap: wrap;
}

/* Carrés voxel flottants */

.voxels {
  position: absolute;
  inset: 0;
  z-index: 1;
  pointer-events: none;
}

.voxel {
  position: absolute;
  height: 13px;
  border-radius: 6.5px;
  background: var(--indigo);
  opacity: .16;
  animation: flotter linear infinite;
}

.voxel.or {
  background: var(--or);
  opacity: .22;
}

@keyframes flottement {
  0%, 100% {
    transform: translateY(0) rotate(0deg);
  }
  50% {
    transform: translateY(-22px) rotate(10deg);
  }
}

/* ------------------------------------------------------------------
   Sections
   ------------------------------------------------------------------ */

.section {
  padding: 120px 0;
  scroll-margin-top: 70px;
}

.section-alt {
  background: var(--bg-2);
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
}

.section-entete {
  max-width: 640px;
  margin-bottom: 64px;
}

.section-entete h2 {
  font-size: clamp(30px, 4vw, 42px);
  margin: 14px 0 16px;
}

.section-entete p {
  color: var(--texte-2);
  font-size: 17px;
}

/* ------------------------------------------------------------------
   Cartes
   ------------------------------------------------------------------ */

.carte {
  background: var(--surface);
  border: 1px solid var(--border);
  box-shadow: var(--ombre);
  border-radius: 14px;
  padding: 32px;
  transition: box-shadow 0.25s ease, border-color 0.25s ease, transform 0.25s ease;
}

.carte:hover {
  box-shadow: var(--ombre-forte);
  border-color: rgba(92, 107, 192, 0.45);
  transform: translateY(-2px);
}

.grille-modeles {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 24px;
  margin-bottom: 24px;
}

.grille-avenir {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
}

.carte-entete {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 18px;
}

.carte h3 {
  font-size: 24px;
}

.carte .role {
  color: var(--violet-pale);
  font-weight: 600;
  font-size: 15px;
  margin-bottom: 10px;
}

.carte .description {
  color: var(--texte-2);
  font-size: 15px;
}

.carte-avenir {
  opacity: 0.55;
  padding: 24px;
  transition: opacity 0.25s ease, box-shadow 0.25s ease, border-color 0.25s ease, transform 0.25s ease;
}

.carte-avenir:hover {
  opacity: 0.9;
}

.carte-avenir h3 {
  font-size: 19px;
}

.carte-cta {
  margin-top: 26px;
}

/* Badges de statut */

.badge {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  font-family: "JetBrains Mono", ui-monospace, monospace;
  font-size: 11px;
  font-weight: 500;
  letter-spacing: 0.12em;
  padding: 5px 11px;
  border-radius: 999px;
  white-space: nowrap;
  flex: none;
}

.pastille {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: currentColor;
  flex: none;
}

.badge-ok {
  color: var(--ok);
  background: rgba(27, 156, 107, 0.08);
  border: 1px solid rgba(27, 156, 107, 0.32);
}

.badge-ok .pastille {
  box-shadow: 0 0 8px rgba(27, 156, 107, 0.8);
}

.badge-forge {
  color: var(--warn);
  background: rgba(245, 166, 35, 0.08);
  border: 1px solid rgba(245, 166, 35, 0.32);
}

.badge-forge .pastille {
  animation: pulsation 1.6s ease-in-out infinite;
}

@keyframes pulsation {
  0%, 100% {
    opacity: 1;
  }
  50% {
    opacity: 0.35;
  }
}

.badge-avenir {
  color: var(--texte-2);
  background: rgba(113, 128, 150, 0.07);
  border: 1px solid var(--border);
}

/* Petites stats techniques */

.stats {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 22px;
}

.stat {
  font-family: "JetBrains Mono", ui-monospace, monospace;
  font-size: 12px;
  color: var(--violet-pale);
  background: var(--bg-2);
  border: 1px solid var(--border);
  padding: 6px 12px;
  border-radius: 8px;
}

/* ------------------------------------------------------------------
   Piliers (Approche)
   ------------------------------------------------------------------ */

.grille-piliers {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
}

.pilier-icone {
  width: 46px;
  height: 46px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 12px;
  background: rgba(30, 55, 153, 0.12);
  border: 1px solid rgba(92, 107, 192, 0.28);
  color: var(--violet);
  margin-bottom: 20px;
}

.pilier h3 {
  font-size: 20px;
  margin-bottom: 10px;
}

.pilier p {
  color: var(--texte-2);
  font-size: 15px;
}

/* ------------------------------------------------------------------
   Feuille de route (timeline)
   ------------------------------------------------------------------ */

.timeline {
  position: relative;
  max-width: 720px;
  padding-left: 36px;
}

.timeline::before {
  content: "";
  position: absolute;
  left: 5px;
  top: 6px;
  bottom: 6px;
  width: 1px;
  background: var(--border);
}

.etape {
  position: relative;
  padding-bottom: 46px;
}

.etape:last-child {
  padding-bottom: 0;
}

.etape::before {
  content: "";
  position: absolute;
  left: -36px;
  top: 6px;
  width: 11px;
  height: 11px;
  border-radius: 3px;
  background: var(--surface);
  border: 2px solid var(--texte-2);
  transform: rotate(45deg);
}

.etape.fait::before {
  background: var(--ok);
  border-color: var(--ok);
  box-shadow: 0 0 10px rgba(27, 156, 107, 0.5);
}

.etape.en-cours::before {
  background: var(--warn);
  border-color: var(--warn);
  box-shadow: 0 0 10px rgba(245, 166, 35, 0.5);
}

.etape-titre {
  display: flex;
  align-items: center;
  gap: 14px;
  flex-wrap: wrap;
  margin-bottom: 6px;
}

.etape-titre h3 {
  font-size: 20px;
}

.etape p {
  color: var(--texte-2);
  font-size: 15px;
  max-width: 560px;
}

/* ------------------------------------------------------------------
   Pied de page
   ------------------------------------------------------------------ */

.pied {
  border-top: 1px solid var(--border);
  padding: 56px 24px 44px;
  text-align: center;
}

.pied .nav-logo {
  justify-content: center;
  margin: 0 auto 14px;
}

.pied-note {
  color: var(--texte-2);
  font-size: 14px;
  margin-bottom: 6px;
}

.pied-mono {
  font-family: "JetBrains Mono", ui-monospace, monospace;
  font-size: 12px;
  color: var(--texte-2);
  margin-bottom: 18px;
}

.pied-atelier {
  font-size: 12px;
  color: rgba(113, 128, 150, 0.6);
}

/* ==================================================================
   Page chat
   ================================================================== */

.page-chat {
  height: 100vh;
  height: 100dvh;
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

/* En-tête fin */

.chat-entete {
  flex: none;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  padding: 12px 22px;
  background: rgba(244, 246, 251, 0.72);
  -webkit-backdrop-filter: blur(14px);
  backdrop-filter: blur(14px);
  border-bottom: 1px solid var(--border);
}

.chat-titre {
  display: flex;
  align-items: baseline;
  gap: 12px;
  min-width: 0;
}

.chat-titre strong {
  font-family: "Montserrat", system-ui, sans-serif;
  font-size: 17px;
  font-weight: 700;
  white-space: nowrap;
}

.chat-sous-titre {
  color: var(--texte-2);
  font-size: 13px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.chat-actions {
  display: flex;
  align-items: center;
  gap: 16px;
}

.statut {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-family: "JetBrains Mono", ui-monospace, monospace;
  font-size: 12px;
  color: var(--texte-2);
  white-space: nowrap;
}

.statut .pastille {
  background: var(--texte-2);
}

.statut.en-ligne {
  color: var(--ok);
}

.statut.en-ligne .pastille {
  background: var(--ok);
  box-shadow: 0 0 8px rgba(27, 156, 107, 0.8);
}

.statut.hors-ligne {
  color: #C0392B;
}

.statut.hors-ligne .pastille {
  background: #C0392B;
  box-shadow: 0 0 8px rgba(192, 57, 43, 0.7);
}

/* Zone des messages */

.chat-messages {
  flex: 1;
  overflow-y: auto;
  overscroll-behavior: contain;
}

.chat-flux {
  max-width: 780px;
  margin: 0 auto;
  padding: 34px 20px 18px;
  display: flex;
  flex-direction: column;
  gap: 26px;
}

.msg-utilisateur {
  align-self: flex-end;
  max-width: 85%;
  background: var(--surface);
  border: 1px solid rgba(92, 107, 192, 0.35);
  border-radius: 14px 14px 4px 14px;
  padding: 12px 16px;
  white-space: pre-wrap;
  word-wrap: break-word;
}

.msg-assistant {
  display: flex;
  gap: 14px;
  align-items: flex-start;
  width: 100%;
}

.msg-assistant .avatar {
  width: 28px;
  height: 28px;
  flex: none;
  margin-top: 3px;
}

.msg-assistant .contenu {
  flex: 1;
  min-width: 0;
  overflow-wrap: break-word;
}

.contenu p {
  margin: 0 0 12px;
}

.contenu p:last-child {
  margin-bottom: 0;
}

.contenu ul {
  margin: 0 0 12px 22px;
}

.contenu li {
  margin-bottom: 4px;
}

.contenu h3, .contenu h4 {
  margin: 18px 0 8px;
}

.contenu h3 {
  font-size: 19px;
}

.contenu h4 {
  font-size: 16px;
}

.contenu code {
  font-family: "JetBrains Mono", ui-monospace, monospace;
  font-size: 0.88em;
  background: var(--bg-2);
  border: 1px solid var(--border);
  border-radius: 6px;
  padding: 2px 6px;
  color: var(--violet-pale);
}

.contenu .pense {
  color: var(--texte-2);
  font-style: italic;
}

/* Blocs de code */

.bloc-code {
  position: relative;
  background: var(--bg-2);
  border: 1px solid var(--border);
  border-radius: 10px;
  margin: 14px 0;
  overflow: hidden;
}

.bloc-code pre {
  padding: 16px;
  padding-right: 78px;
  overflow-x: auto;
  font-family: "JetBrains Mono", ui-monospace, monospace;
  font-size: 13px;
  line-height: 1.6;
}

.bloc-code pre code {
  background: none;
  border: none;
  padding: 0;
  color: var(--texte);
  font-size: inherit;
}

.btn-copier {
  position: absolute;
  top: 8px;
  right: 8px;
  font-family: "JetBrains Mono", ui-monospace, monospace;
  font-size: 11px;
  color: var(--texte-2);
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 7px;
  padding: 4px 10px;
  cursor: pointer;
  transition: color 0.2s ease, border-color 0.2s ease;
}

.btn-copier:hover {
  color: var(--violet-pale);
  border-color: rgba(92, 107, 192, 0.6);
}

/* Curseur de streaming */

.curseur {
  display: inline-block;
  width: 8px;
  height: 17px;
  background: var(--violet);
  border-radius: 2px;
  vertical-align: text-bottom;
  margin-left: 3px;
  animation: clignote 1s steps(2, start) infinite;
}

@keyframes clignote {
  to {
    visibility: hidden;
  }
}

/* Message d'erreur */

.msg-erreur {
  color: var(--warn);
  background: rgba(245, 166, 35, 0.07);
  border: 1px solid rgba(245, 166, 35, 0.35);
  border-radius: 10px;
  padding: 12px 16px;
  font-size: 15px;
}

/* Exemples cliquables de l'accueil */

.exemples {
  display: flex;
  flex-direction: column;
  gap: 9px;
  margin-top: 16px;
}

.exemple {
  text-align: left;
  font: inherit;
  font-size: 14px;
  color: var(--texte-2);
  background: var(--bg-2);
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 11px 15px;
  cursor: pointer;
  transition: color 0.2s ease, border-color 0.2s ease, box-shadow 0.2s ease;
}

.exemple:hover {
  color: var(--violet-pale);
  border-color: rgba(92, 107, 192, 0.55);
  box-shadow: var(--ombre);
}

/* Barre de saisie */

.chat-saisie {
  flex: none;
  border-top: 1px solid var(--border);
  background: rgba(244, 246, 251, 0.85);
  -webkit-backdrop-filter: blur(10px);
  backdrop-filter: blur(10px);
  padding: 14px 20px 18px;
}

.chat-formulaire {
  max-width: 780px;
  margin: 0 auto;
  display: flex;
  align-items: flex-end;
  gap: 10px;
}

.chat-formulaire textarea {
  flex: 1;
  resize: none;
  min-height: 46px;
  max-height: 200px;
  padding: 12px 16px;
  font-family: "Inter", system-ui, sans-serif;
  font-size: 15px;
  line-height: 1.5;
  color: var(--texte);
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 12px;
  outline: none;
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.chat-formulaire textarea:focus {
  border-color: rgba(92, 107, 192, 0.6);
  box-shadow: var(--ombre);
}

.chat-formulaire textarea::placeholder {
  color: rgba(113, 128, 150, 0.6);
}

.chat-astuce {
  max-width: 780px;
  margin: 8px auto 0;
  text-align: center;
  font-family: "JetBrains Mono", ui-monospace, monospace;
  font-size: 11px;
  color: rgba(113, 128, 150, 0.55);
}

/* ------------------------------------------------------------------
   Responsive
   ------------------------------------------------------------------ */

@media (max-width: 900px) {
  .grille-modeles,
  .grille-piliers {
    grid-template-columns: 1fr;
  }

  .grille-avenir {
    grid-template-columns: 1fr;
  }

  .section {
    padding: 80px 0;
  }
}

@media (max-width: 760px) {
  .nav {
    padding: 12px 18px;
  }

  .nav-liens {
    display: none;
  }

  .nav .btn {
    padding: 9px 14px;
    font-size: 13px;
  }

  .heros {
    padding: 120px 20px 80px;
  }

  .sous-titre {
    font-size: 17px;
  }

  .section-entete {
    margin-bottom: 44px;
  }

  .carte {
    padding: 24px;
  }

  .chat-sous-titre {
    display: none;
  }

  .statut .statut-texte {
    max-width: 130px;
    overflow: hidden;
    text-overflow: ellipsis;
  }

  .msg-utilisateur {
    max-width: 95%;
  }
}

/* ==================================================================
   Crafting-Table-1 — la page où l'on essaie le modèle maison
   ================================================================== */

.page-modele {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

.modele-page {
  flex: 1;
  width: 100%;
  max-width: 860px;
  margin: 0 auto;
  padding: 56px 24px 96px;
}

.modele-intro h1 {
  font-family: "Montserrat", "Segoe UI", system-ui, sans-serif;
  font-size: clamp(1.9rem, 4vw, 2.6rem);
  font-weight: 700;
  line-height: 1.15;
  letter-spacing: -0.02em;
  margin: 10px 0 18px;
}

.modele-avertissement {
  color: var(--texte-2);
  font-size: 1.02rem;
  line-height: 1.7;
  max-width: 68ch;
}

/* --- l'atelier : saisie, réglages, sortie --- */

.modele-atelier {
  margin-top: 44px;
  display: grid;
  gap: 22px;
}

.modele-form {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 14px;
  padding: 22px;
}

.modele-label {
  display: block;
  font-family: "JetBrains Mono", ui-monospace, monospace;
  font-size: 0.72rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--violet);
  margin-bottom: 10px;
}

#amorce {
  width: 100%;
  resize: vertical;
  background: var(--bg-2);
  border: 1px solid var(--border);
  border-radius: 10px;
  color: var(--texte);
  font-family: inherit;
  font-size: 1rem;
  line-height: 1.6;
  padding: 12px 14px;
}

#amorce:focus {
  outline: none;
  border-color: var(--violet-fort);
  box-shadow: 0 0 0 3px rgba(30, 55, 153, 0.18);
}

.modele-exemples {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 12px;
}

.modele-reglages {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 22px;
  margin-top: 24px;
}

.reglage {
  display: flex;
  flex-direction: column;
  gap: 8px;
  font-size: 0.9rem;
  color: var(--texte-2);
}

.reglage output {
  font-family: "JetBrains Mono", ui-monospace, monospace;
  color: var(--violet-pale);
}

.reglage small {
  color: var(--texte-2);
  opacity: 0.75;
  font-size: 0.78rem;
  line-height: 1.5;
}

.reglage input[type="range"] {
  accent-color: var(--violet-fort);
  width: 100%;
}

.modele-boutons {
  display: flex;
  gap: 10px;
  margin-top: 24px;
}

/* --- la sortie --- */

.modele-sortie {
  background: var(--bg-2);
  border: 1px solid var(--border);
  border-radius: 14px;
  padding: 24px;
}

.modele-resultat {
  font-size: 1.02rem;
  line-height: 1.85;
  white-space: pre-wrap;
  word-break: break-word;
  min-height: 6.5em;
}

/* Le début vient de l'humain : on l'estompe pour voir où le modèle prend la main. */
.modele-amorce {
  color: var(--texte-2);
}

.modele-vide {
  color: var(--texte-2);
  opacity: 0.6;
  font-style: italic;
}

.modele-erreur {
  color: var(--warn);
}

.modele-mesure {
  margin: 16px 0 0;
  font-family: "JetBrains Mono", ui-monospace, monospace;
  font-size: 0.78rem;
  color: var(--texte-2);
}

/* --- la fiche technique --- */

.modele-fiche {
  margin-top: 64px;
  border-top: 1px solid var(--border);
  padding-top: 40px;
}

.modele-fiche h2 {
  font-family: "Montserrat", "Segoe UI", system-ui, sans-serif;
  font-size: 1.35rem;
  font-weight: 600;
  margin: 0 0 22px;
}

.fiche-grille {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 18px;
  margin: 0;
}

.fiche-grille dt {
  font-family: "JetBrains Mono", ui-monospace, monospace;
  font-size: 0.68rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--texte-2);
  margin-bottom: 6px;
}

.fiche-grille dd {
  margin: 0;
  font-size: 0.98rem;
  color: var(--texte);
}

.modele-note {
  margin-top: 30px;
  color: var(--texte-2);
  font-size: 0.92rem;
  line-height: 1.7;
  max-width: 68ch;
}

@media (max-width: 640px) {
  .modele-page {
    padding: 36px 18px 72px;
  }

  .modele-reglages {
    grid-template-columns: 1fr;
  }
}

/* ==================================================================
   Journal de forge — les mesures réelles du labo
   ================================================================== */

.journal-blocs {
  margin-top: 44px;
  display: grid;
  gap: 44px;
}

.journal-bloc {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 14px;
  padding: 24px;
  /* Le tableau est large : il défile dans sa carte, jamais la page entière. */
  overflow-x: auto;
}

.journal-entete {
  margin-bottom: 18px;
}

.journal-entete h2 {
  font-family: "JetBrains Mono", ui-monospace, monospace;
  font-size: 0.95rem;
  font-weight: 500;
  color: var(--violet-pale);
  margin: 0;
}

.journal-compte {
  margin: 6px 0 0;
  font-size: 0.85rem;
  color: var(--texte-2);
}

.journal-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.88rem;
  white-space: nowrap;
}

.journal-table th {
  text-align: left;
  font-family: "JetBrains Mono", ui-monospace, monospace;
  font-size: 0.68rem;
  font-weight: 500;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--texte-2);
  padding: 0 16px 10px 0;
  border-bottom: 1px solid var(--border);
}

.journal-table td {
  padding: 11px 16px 11px 0;
  border-bottom: 1px solid rgba(221, 227, 240, 0.55);
  color: var(--texte-2);
}

.journal-table tr:last-child td {
  border-bottom: none;
}

.journal-val {
  font-family: "JetBrains Mono", ui-monospace, monospace;
  color: var(--texte);
  font-weight: 500;
}

.journal-ecart,
.journal-archi {
  font-family: "JetBrains Mono", ui-monospace, monospace;
  font-size: 0.82rem;
}

.journal-tag {
  color: var(--texte-2);
  font-size: 0.82rem;
}

/* La meilleure de son budget : c'est la seule comparaison qui ait un sens. */
.journal-meilleur .journal-val {
  color: var(--ok);
}

.journal-meilleur td {
  background: rgba(30, 55, 153, 0.07);
}
