/* ═══════════════════════════════════════════════════════════════════
   hugoai.fr — feuille de style unique.

   Un registre de laboratoire : filets fins, marges franches, une seule
   couleur chaude tenue en réserve. Trois teintes ne servent qu'à
   distinguer les trois chantiers — elles portent une information, elles
   ne décorent pas.

   Toutes les couleurs passent par des variables. Aucune n'est définie
   uniquement dans un bloc sombre : sinon la page se retrouve avec le
   texte d'un thème sur le fond de l'autre.
   ═══════════════════════════════════════════════════════════════════ */

:root {
  /* clair */
  --fond:      #EBEDE6;
  --voile:     #F7F8F3;
  --voile-2:   #E2E5DB;
  --encre:     #14161B;
  --encre-2:   #4B5059;
  --encre-3:   #757A82;
  --filet:     #CFD3C8;
  --cuivre:    #A24D26;
  --cuivre-fd: #F0DFD5;
  --vert:      #2C6549;
  --bleu:      #29459A;

  --ombre: 0 1px 2px rgba(20, 22, 27, .05), 0 8px 24px -12px rgba(20, 22, 27, .18);

  --serif: "Instrument Serif", "Iowan Old Style", Georgia, serif;
  --sans:  "Public Sans", -apple-system, BlinkMacSystemFont, "Segoe UI", Helvetica, Arial, sans-serif;
  --mono:  "Spline Sans Mono", ui-monospace, "SF Mono", Menlo, Consolas, monospace;

  --mesure: 66ch;
  --large:  1180px;
  --marge:  clamp(20px, 5vw, 56px);
}

@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --fond:      #101218;
    --voile:     #181B22;
    --voile-2:   #21252E;
    --encre:     #E5E7E0;
    --encre-2:   #A8ADB6;
    --encre-3:   #7E848D;
    --filet:     #2C313B;
    --cuivre:    #D9825A;
    --cuivre-fd: #2E1F17;
    --vert:      #5EA57E;
    --bleu:      #7C99EC;
    --ombre: 0 1px 2px rgba(0, 0, 0, .5), 0 12px 32px -14px rgba(0, 0, 0, .7);
  }
}

:root[data-theme="dark"] {
  --fond:      #101218;
  --voile:     #181B22;
  --voile-2:   #21252E;
  --encre:     #E5E7E0;
  --encre-2:   #A8ADB6;
  --encre-3:   #7E848D;
  --filet:     #2C313B;
  --cuivre:    #D9825A;
  --cuivre-fd: #2E1F17;
  --vert:      #5EA57E;
  --bleu:      #7C99EC;
  --ombre: 0 1px 2px rgba(0, 0, 0, .5), 0 12px 32px -14px rgba(0, 0, 0, .7);
}

*, *::before, *::after { box-sizing: border-box; }

html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation-duration: .01ms !important; transition-duration: .01ms !important; }
}

body {
  margin: 0;
  background: var(--fond);
  color: var(--encre);
  font-family: var(--sans);
  font-size: 17px;
  line-height: 1.65;
  font-weight: 380;
  -webkit-font-smoothing: antialiased;
}

img { max-width: 100%; display: block; }

a { color: inherit; }

::selection { background: var(--cuivre); color: var(--fond); }

:focus-visible {
  outline: 2px solid var(--cuivre);
  outline-offset: 3px;
  border-radius: 2px;
}

/* ── mesures ─────────────────────────────────────────────────────── */
.enveloppe {
  width: 100%;
  max-width: var(--large);
  margin-inline: auto;
  padding-inline: var(--marge);
}
.mesure { max-width: var(--mesure); }

/* ── titres ──────────────────────────────────────────────────────── */
h1, h2, h3 { margin: 0; font-weight: 400; text-wrap: balance; }

h1 {
  font-family: var(--serif);
  font-size: clamp(2.6rem, 7vw, 5.1rem);
  line-height: 1.02;
  letter-spacing: -.015em;
}
h2 {
  font-family: var(--serif);
  font-size: clamp(1.9rem, 3.6vw, 2.9rem);
  line-height: 1.1;
  letter-spacing: -.01em;
}
h3 {
  font-family: var(--sans);
  font-size: 1.06rem;
  font-weight: 600;
  letter-spacing: -.005em;
}

p { margin: 0 0 1.1em; }
p:last-child { margin-bottom: 0; }

.chapo {
  font-size: clamp(1.08rem, 1.7vw, 1.28rem);
  line-height: 1.55;
  color: var(--encre-2);
}

/* Le libellé de registre : mono, petit, espacé. Il nomme la section,
   il ne la numérote pas — il n'y a pas d'ordre à respecter ici. */
.registre {
  font-family: var(--mono);
  font-size: .72rem;
  font-weight: 500;
  letter-spacing: .16em;
  text-transform: uppercase;
  color: var(--encre-3);
  margin: 0 0 .9rem;
  display: flex;
  align-items: center;
  gap: .8rem;
}
.registre::after {
  content: "";
  flex: 1;
  height: 1px;
  background: var(--filet);
}

/* ── entête ──────────────────────────────────────────────────────── */
.entete {
  position: sticky;
  top: 0;
  z-index: 40;
  background: color-mix(in srgb, var(--fond) 88%, transparent);
  backdrop-filter: saturate(1.4) blur(14px);
  border-bottom: 1px solid var(--filet);
}
.entete-i {
  display: flex;
  align-items: center;
  gap: 1.4rem;
  min-height: 64px;
}
.marque {
  font-family: var(--mono);
  font-size: .95rem;
  font-weight: 600;
  letter-spacing: -.01em;
  text-decoration: none;
  display: inline-flex;
  align-items: baseline;
  gap: .05em;
  white-space: nowrap;
}
.marque b { font-weight: 600; }
.marque span { color: var(--cuivre); }

.nav {
  display: flex;
  gap: .3rem;
  margin-left: auto;
  align-items: center;
}
.nav a {
  text-decoration: none;
  font-size: .9rem;
  color: var(--encre-2);
  padding: .42rem .62rem;
  border-radius: 6px;
  transition: color .15s, background .15s;
  white-space: nowrap;
}
.nav a:hover { color: var(--encre); background: var(--voile-2); }

/* AGENE quitte le site : on lui donne le poids d'un produit, pas d'une ancre. */
.nav a.nav-vif {
  color: var(--cuivre);
  font-weight: 500;
  border: 1px solid color-mix(in srgb, var(--cuivre) 32%, transparent);
  background: var(--voile);
  margin-right: .35rem;
}
.nav a.nav-vif:hover {
  color: var(--fond);
  background: var(--cuivre);
  border-color: var(--cuivre);
}

.theme {
  border: 1px solid var(--filet);
  background: transparent;
  color: var(--encre-2);
  width: 34px; height: 34px;
  border-radius: 8px;
  cursor: pointer;
  display: grid; place-items: center;
  flex: none;
  transition: border-color .15s, color .15s;
}
.theme:hover { border-color: var(--encre-3); color: var(--encre); }
.theme svg { width: 16px; height: 16px; }

/* Sur petit écran la navigation passe sous la marque et devient une
   bande qui se fait glisser au doigt. Pas de menu caché : six entrées
   se lisent très bien à plat, et rien à ouvrir avant de comprendre. */
@media (max-width: 900px) {
  .entete-i { flex-wrap: wrap; padding-bottom: .45rem; gap: .6rem 1rem; }
  .nav {
    order: 3;
    width: 100%;
    margin-left: 0;
    overflow-x: auto;
    scrollbar-width: none;
    -webkit-overflow-scrolling: touch;
    padding-bottom: 2px;
  }
  .nav::-webkit-scrollbar { display: none; }
  .nav a { padding: .3rem .5rem; font-size: .86rem; }
  .theme { margin-left: auto; }
}

/* ── section générique ───────────────────────────────────────────── */
section { padding-block: clamp(56px, 8vw, 104px); }
section + section { border-top: 1px solid var(--filet); }

/* ── ouverture ───────────────────────────────────────────────────── */
.ouverture { padding-block: clamp(64px, 12vw, 132px) clamp(56px, 8vw, 96px); }
.ouverture h1 em {
  font-style: italic;
  color: var(--cuivre);
}
.ouverture .chapo { margin-top: 1.6rem; max-width: 54ch; }

.signes {
  display: flex;
  flex-wrap: wrap;
  gap: .5rem;
  margin-top: 2.2rem;
}
.signe {
  font-family: var(--mono);
  font-size: .74rem;
  letter-spacing: .04em;
  color: var(--encre-2);
  border: 1px solid var(--filet);
  border-radius: 999px;
  padding: .3rem .72rem;
  background: var(--voile);
}

/* ── boutons ─────────────────────────────────────────────────────── */
.actions { display: flex; flex-wrap: wrap; gap: .7rem; margin-top: 2rem; }

.bouton {
  display: inline-flex;
  align-items: center;
  gap: .5rem;
  font-family: var(--sans);
  font-size: .92rem;
  font-weight: 500;
  text-decoration: none;
  padding: .68rem 1.15rem;
  border-radius: 8px;
  border: 1px solid transparent;
  cursor: pointer;
  transition: transform .12s, box-shadow .15s, background .15s, border-color .15s;
}
.bouton:active { transform: translateY(1px); }
.bouton-plein {
  background: var(--encre);
  color: var(--fond);
  box-shadow: var(--ombre);
}
.bouton-plein:hover { background: var(--cuivre); }
.bouton-vide {
  border-color: var(--filet);
  color: var(--encre);
  background: var(--voile);
}
.bouton-vide:hover { border-color: var(--encre-3); }
.bouton svg { width: 15px; height: 15px; flex: none; }

/* ── la boucle ───────────────────────────────────────────────────── */
.boucle-zone {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 420px);
  gap: clamp(28px, 5vw, 64px);
  align-items: start;
}
@media (max-width: 880px) {
  .boucle-zone { grid-template-columns: 1fr; }
}

.boucle {
  background: var(--voile);
  border: 1px solid var(--filet);
  border-radius: 14px;
  padding: clamp(18px, 3vw, 28px);
  box-shadow: var(--ombre);
}
.boucle ol {
  list-style: none;
  margin: 0;
  padding: 0;
  counter-reset: pas;
}
.boucle li {
  counter-increment: pas;
  display: grid;
  grid-template-columns: 2.1rem 1fr;
  align-items: baseline;
  gap: .7rem;
  padding: .46rem 0;
  position: relative;
  font-family: var(--mono);
  font-size: .88rem;
}
.boucle li::before {
  content: counter(pas, decimal-leading-zero);
  color: var(--encre-3);
  font-size: .74rem;
  letter-spacing: .04em;
}
/* le fil qui relie les étapes */
.boucle li:not(:last-child)::after {
  content: "";
  position: absolute;
  left: .82rem;
  top: 1.55rem;
  bottom: -.35rem;
  width: 1px;
  background: var(--filet);
}
.boucle li b { font-weight: 500; color: var(--encre); }
.boucle li.pivot b { color: var(--cuivre); }

.retour {
  margin-top: .9rem;
  padding-top: .9rem;
  border-top: 1px dashed var(--filet);
  font-family: var(--mono);
  font-size: .78rem;
  color: var(--encre-2);
  display: flex;
  align-items: center;
  gap: .55rem;
}
.retour svg { width: 15px; height: 15px; color: var(--cuivre); flex: none; }

/* ── cartes produit (le lanceur) ─────────────────────────────────── */
.grille {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 290px), 1fr));
  gap: 1rem;
  margin-top: 2.2rem;
}

.appli {
  display: flex;
  flex-direction: column;
  background: var(--voile);
  border: 1px solid var(--filet);
  border-radius: 14px;
  padding: 1.3rem 1.3rem 1.15rem;
  position: relative;
  overflow: hidden;
  transition: border-color .18s, transform .18s, box-shadow .18s;
}
.appli:hover { transform: translateY(-2px); box-shadow: var(--ombre); border-color: var(--encre-3); }
/* le filet de tête porte la couleur du chantier : c'est le seul endroit
   où les trois teintes servent, et elles servent à distinguer. */
.appli::before {
  content: "";
  position: absolute;
  inset: 0 0 auto;
  height: 3px;
  background: var(--teinte, var(--cuivre));
}
.appli.commerce { --teinte: var(--vert); }
.appli.code     { --teinte: var(--bleu); }
.appli.research { --teinte: var(--cuivre); }

.appli-tete {
  display: flex;
  align-items: center;
  gap: .7rem;
  margin-bottom: .85rem;
}
/* Le nom du chantier tient sur une ligne : sinon il pousse la pastille
   d'état et les trois cartes ne s'alignent plus entre elles. */
.appli-tete h3 { white-space: nowrap; }
.jeton {
  width: 38px; height: 38px;
  border-radius: 10px;
  display: grid; place-items: center;
  background: color-mix(in srgb, var(--teinte) 14%, var(--fond));
  color: var(--teinte);
  flex: none;
}
.jeton svg { width: 19px; height: 19px; }

.etat {
  margin-left: auto;
  font-family: var(--mono);
  font-size: .68rem;
  letter-spacing: .07em;
  text-transform: uppercase;
  color: var(--encre-2);
  border: 1px solid var(--filet);
  border-radius: 999px;
  padding: .18rem .55rem;
  display: inline-flex;
  align-items: center;
  gap: .38rem;
  white-space: nowrap;
}
.etat::before {
  content: "";
  width: 6px; height: 6px;
  border-radius: 50%;
  background: var(--encre-3);
}
.etat.vif { color: var(--vert); border-color: color-mix(in srgb, var(--vert) 40%, var(--filet)); }
.etat.vif::before { background: var(--vert); }

.appli p { font-size: .93rem; color: var(--encre-2); }
.appli ul {
  list-style: none;
  margin: .2rem 0 1.2rem;
  padding: 0;
  font-size: .87rem;
  color: var(--encre-2);
  display: grid;
  gap: .3rem;
}
.appli li { display: flex; gap: .55rem; align-items: baseline; }
.appli li::before {
  content: "";
  width: 4px; height: 4px; border-radius: 50%;
  background: var(--teinte);
  flex: none;
  transform: translateY(-2px);
}
.appli .actions { margin-top: auto; padding-top: .2rem; }
.appli .actions .bouton { padding: .55rem .95rem; font-size: .87rem; }

.domaine {
  font-family: var(--mono);
  font-size: .74rem;
  color: var(--encre-3);
  margin-top: .8rem;
}

/* ── liste de démonstrations ─────────────────────────────────────── */
.demos {
  margin-top: 2rem;
  border: 1px solid var(--filet);
  border-radius: 14px;
  overflow: hidden;
  background: var(--voile);
}
.demo {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 1rem;
  align-items: center;
  padding: .95rem 1.15rem;
  text-decoration: none;
  border-bottom: 1px solid var(--filet);
  transition: background .15s;
}
.demo:last-child { border-bottom: 0; }
.demo:hover { background: var(--voile-2); }
.demo b { font-weight: 500; font-size: .96rem; display: block; }
.demo small { color: var(--encre-3); font-size: .84rem; }
.demo .fleche { color: var(--encre-3); font-family: var(--mono); font-size: .8rem; }

/* ── à propos ────────────────────────────────────────────────────── */
.deux {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  gap: clamp(28px, 5vw, 64px);
  align-items: start;
}
@media (max-width: 820px) { .deux { grid-template-columns: 1fr; } }

.faits {
  display: grid;
  gap: 0;
  border: 1px solid var(--filet);
  border-radius: 14px;
  background: var(--voile);
  overflow: hidden;
}
.fait {
  display: grid;
  grid-template-columns: 8.5rem 1fr;
  gap: 1rem;
  padding: .85rem 1.15rem;
  border-bottom: 1px solid var(--filet);
  font-size: .92rem;
}
.fait:last-child { border-bottom: 0; }
.fait dt { font-family: var(--mono); font-size: .76rem; letter-spacing: .06em;
           text-transform: uppercase; color: var(--encre-3); padding-top: .18rem; }
.fait dd { margin: 0; color: var(--encre); }

/* ── contact ─────────────────────────────────────────────────────── */
.contact-carte {
  border: 1px solid var(--filet);
  border-radius: 14px;
  background: var(--voile);
  padding: clamp(22px, 4vw, 38px);
  box-shadow: var(--ombre);
}
.lien-fort {
  font-family: var(--mono);
  font-size: 1.02rem;
  color: var(--cuivre);
  text-decoration: none;
  border-bottom: 1px solid color-mix(in srgb, var(--cuivre) 40%, transparent);
  padding-bottom: 1px;
  word-break: break-word;
}
.lien-fort:hover { border-bottom-color: var(--cuivre); }

/* ── pied ────────────────────────────────────────────────────────── */
.pied {
  border-top: 1px solid var(--filet);
  padding-block: 2.4rem 3rem;
  font-size: .86rem;
  color: var(--encre-3);
}
.pied-i { display: flex; flex-wrap: wrap; gap: 1rem 1.6rem; align-items: center; }
.pied a { color: var(--encre-2); text-decoration: none; }
.pied a:hover { color: var(--encre); }
.pied .droite { margin-left: auto; font-family: var(--mono); font-size: .76rem; }

/* ── page investisseurs ──────────────────────────────────────────── */
.retour-haut {
  display: inline-flex; align-items: center; gap: .45rem;
  font-family: var(--mono); font-size: .78rem; letter-spacing: .05em;
  color: var(--encre-2); text-decoration: none; margin-bottom: 1.6rem;
}
.retour-haut:hover { color: var(--cuivre); }

.jalons { list-style: none; margin: 1.6rem 0 0; padding: 0; }
.jalons li {
  display: grid;
  grid-template-columns: 7.5rem 1fr;
  gap: 1.1rem;
  padding: .9rem 0;
  border-top: 1px solid var(--filet);
  align-items: baseline;
}
.jalons li:last-child { border-bottom: 1px solid var(--filet); }
.jalons time {
  font-family: var(--mono); font-size: .78rem; letter-spacing: .04em;
  color: var(--encre-3);
}
.jalons b { font-weight: 500; }
.jalons p { margin: .2rem 0 0; font-size: .92rem; color: var(--encre-2); }

@media (max-width: 620px) {
  .jalons li, .fait { grid-template-columns: 1fr; gap: .25rem; }
}
