/* ============================================================
   CORTEX — la vitrine publique.

   Même monde que la console (« Précision ») : gris neutres, un seul
   accent, l'élévation est une bordure. Aucune ombre portée, aucun
   verre, aucun dégradé décoratif.

   Ce qui change par rapport à la console : l'échelle. Le corps est à
   17px et non 13, les respirations sont triples, et le logiciel se
   montre en grand. Ici c'est le produit qui parle — la mise en page
   se contente de lui laisser la place.

   Inter Tight (titres) · Inter (corps) · JetBrains Mono (étiquettes).
   ============================================================ */

:root {
  --bg: #0b0b0c;
  --bg-2: #0f0f11;
  --panel: #121214;
  --panel-2: #17171a;
  --hover: #1c1c20;

  --line: #232327;
  --line-2: #303036;

  --fg: #f2f2f3;
  --fg-2: #a3a3aa;
  --fg-3: #6c6c76;

  --accent: #8b84ff;
  --accent-fg: #0b0b0c;
  --accent-soft: rgba(139, 132, 255, 0.12);
  --accent-line: rgba(139, 132, 255, 0.38);

  --r: 10px;
  --r-sm: 6px;

  --font-display: "Inter Tight", ui-sans-serif, system-ui, sans-serif;
  --font-body: "Inter", ui-sans-serif, system-ui, sans-serif;
  --font-mono: "JetBrains Mono", ui-monospace, monospace;

  --wrap: 1180px;
  --pad: 20px;

  color-scheme: dark;
}

* { box-sizing: border-box; }

html {
  scroll-behavior: smooth;
  -webkit-text-size-adjust: 100%;
  scrollbar-color: var(--line-2) transparent;
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--fg);
  font-family: var(--font-body);
  font-size: 17px;
  line-height: 1.62;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

/* `height: auto` est indispensable : les images portent des attributs
   width/height (ils réservent la place et évitent le saut de mise en page),
   et sans cette ligne le `height` de l'attribut l'emporte — l'image se rendait
   à 1800 px de haut dans une colonne de 617 px de large. */
img { max-width: 100%; height: auto; display: block; }
a { color: inherit; }

::selection { background: var(--accent); color: var(--accent-fg); }

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

.sr-only {
  position: absolute;
  width: 1px; height: 1px;
  padding: 0; margin: -1px;
  overflow: hidden;
  clip-path: inset(50%);
  white-space: nowrap;
}

.wrap {
  width: 100%;
  max-width: var(--wrap);
  margin: 0 auto;
  padding: 0 var(--pad);
}

/* ── typographie ──────────────────────────────────────────── */

h1, h2, h3 {
  font-family: var(--font-display);
  font-weight: 600;
  letter-spacing: -0.022em;
  line-height: 1.1;
  text-wrap: balance;
  margin: 0;
}

h1 { font-size: clamp(2.15rem, 6.4vw, 3.9rem); letter-spacing: -0.03em; }
h2 { font-size: clamp(1.6rem, 4vw, 2.4rem); }
h3 { font-size: 1.12rem; letter-spacing: -0.012em; line-height: 1.35; }

p { margin: 0; }

.lede {
  font-size: clamp(1.02rem, 2.1vw, 1.22rem);
  color: var(--fg-2);
  line-height: 1.6;
  max-width: 62ch;
}

.mono {
  font-family: var(--font-mono);
  font-size: 0.72rem;
  letter-spacing: 0.09em;
  text-transform: uppercase;
  color: var(--fg-3);
  font-weight: 500;
}

.accent { color: var(--accent); }

/* ── barre du haut ────────────────────────────────────────── */

.topbar {
  position: sticky;
  top: 0;
  z-index: 40;
  background: rgba(11, 11, 12, 0.86);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--line);
}

.topbar .wrap {
  display: flex;
  align-items: center;
  gap: 18px;
  height: 60px;
}

.logo {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 1.02rem;
  letter-spacing: -0.02em;
  text-decoration: none;
  color: var(--fg);
}

.logo .mark { color: var(--accent); }

.nav-links {
  display: none;
  gap: 22px;
  margin-left: auto;
}

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

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

.topbar-actions {
  margin-left: auto;
  display: flex;
  align-items: center;
  gap: 10px;
}

.nav-links + .topbar-actions { margin-left: 0; }

@media (min-width: 900px) {
  .nav-links { display: flex; }
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 40px;
  padding: 0 18px;
  border-radius: var(--r-sm);
  border: 1px solid var(--line-2);
  background: transparent;
  color: var(--fg);
  font-family: inherit;
  font-size: 0.93rem;
  font-weight: 500;
  text-decoration: none;
  cursor: pointer;
  transition: background 0.15s, border-color 0.15s;
}

.btn:hover { background: var(--hover); border-color: var(--fg-3); }

.btn-solid {
  background: var(--accent);
  border-color: var(--accent);
  color: var(--accent-fg);
  font-weight: 550;
}

.btn-solid:hover { background: #9d97ff; border-color: #9d97ff; }

.btn-lg { min-height: 48px; padding: 0 24px; font-size: 1rem; }

.burger {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  border-radius: var(--r-sm);
  border: 1px solid var(--line-2);
  background: transparent;
  color: var(--fg);
  font-size: 1.2rem;
  cursor: pointer;
}

/* Cette règle DOIT rester après `.burger` : écrite plus haut, à spécificité
   égale, c'est la déclaration `display: inline-flex` ci-dessus qui l'emportait
   et le bouton menu s'affichait aussi sur grand écran. */
@media (min-width: 900px) {
  .burger { display: none; }
}

.mobile-menu {
  display: none;
  flex-direction: column;
  border-bottom: 1px solid var(--line);
  background: var(--bg-2);
}

.mobile-menu.open { display: flex; }

.mobile-menu a {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 15px var(--pad);
  border-top: 1px solid var(--line);
  text-decoration: none;
  color: var(--fg);
  font-size: 0.98rem;
}

@media (min-width: 900px) {
  .mobile-menu, .mobile-menu.open { display: none; }
}

/* ── rythme des sections ──────────────────────────────────── */

section { padding: clamp(56px, 9vw, 116px) 0; }

.section-head { max-width: 68ch; }
.section-head .mono { display: block; margin-bottom: 14px; }
.section-head h2 + p { margin-top: 18px; }

.rule { border: 0; border-top: 1px solid var(--line); margin: 0; }

/* ── le héros ─────────────────────────────────────────────── */

.hero { padding-top: clamp(48px, 7vw, 84px); padding-bottom: 0; }

.hero h1 { max-width: 15ch; }

.hero-label { display: block; margin-bottom: 22px; }

.hero-sub { margin-top: 26px; max-width: 56ch; }

.hero-actions {
  margin-top: 34px;
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
}

.hero-note {
  margin-top: 18px;
  font-size: 0.88rem;
  color: var(--fg-3);
}

/* La capture du héros : elle déborde à droite sur grand écran, pour que
   le logiciel se lise comme un plan large et non comme une vignette. */
.hero-shot {
  margin-top: clamp(44px, 6vw, 76px);
  border: 1px solid var(--line);
  border-bottom: 0;
  border-radius: var(--r) var(--r) 0 0;
  overflow: hidden;
  background: var(--panel);
}

.hero-shot img { width: 100%; }

/* Sur petit écran, une capture de 1440px réduite à 350 n'est plus qu'une tache :
   on en montre une PORTION à taille lisible plutôt que le tout en illisible.
   Le coin haut-gauche porte le nom de l'entreprise, la navigation et les
   premières lignes — de quoi reconnaître un logiciel. */
@media (max-width: 720px) {
  .hero-shot img, .cadre img {
    aspect-ratio: 3 / 4;
    object-fit: cover;
    object-position: left top;
  }
}

/* ── le constat ───────────────────────────────────────────── */

.constat { background: var(--bg-2); border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }

.constat-grid {
  display: grid;
  gap: 34px;
}

@media (min-width: 860px) {
  .constat-grid { grid-template-columns: 1.05fr 1fr; gap: 60px; align-items: start; }
}

.reponses {
  display: grid;
  gap: 0;
  border: 1px solid var(--line);
  border-radius: var(--r);
  overflow: hidden;
  background: var(--panel);
}

.reponse {
  display: grid;
  grid-template-columns: 30px 1fr;
  gap: 14px;
  padding: 18px 20px;
  border-bottom: 1px solid var(--line);
}

.reponse:last-child { border-bottom: 0; }

.reponse-n {
  font-family: var(--font-mono);
  font-size: 0.78rem;
  color: var(--fg-3);
  padding-top: 2px;
}

.reponse b { font-weight: 550; display: block; margin-bottom: 3px; }
.reponse span { color: var(--fg-2); font-size: 0.94rem; line-height: 1.5; }

.reponse.retenue { background: var(--accent-soft); }
.reponse.retenue .reponse-n { color: var(--accent); }

/* ── les capacités ────────────────────────────────────────── */

.capacites {
  display: grid;
  gap: 1px;
  margin-top: 54px;
  background: var(--line);
  border: 1px solid var(--line);
  border-radius: var(--r);
  overflow: hidden;
}

@media (min-width: 720px) { .capacites { grid-template-columns: repeat(2, 1fr); } }
@media (min-width: 1040px) { .capacites { grid-template-columns: repeat(3, 1fr); } }

.capacite {
  background: var(--panel);
  padding: 28px 26px 30px;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.capacite .mono { color: var(--accent); }
.capacite p { color: var(--fg-2); font-size: 0.95rem; line-height: 1.58; }

.capacite ul {
  margin: 4px 0 0;
  padding: 0;
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 7px;
}

.capacite li {
  position: relative;
  padding-left: 18px;
  font-size: 0.9rem;
  color: var(--fg-2);
  line-height: 1.45;
}

.capacite li::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0.58em;
  width: 7px;
  height: 1px;
  background: var(--line-2);
}

/* ── une capacité mise en scène (texte + capture) ─────────── */

.scene-bloc {
  display: grid;
  gap: 30px;
  align-items: center;
  padding: clamp(40px, 6vw, 72px) 0;
  border-top: 1px solid var(--line);
}

@media (min-width: 900px) {
  .scene-bloc { grid-template-columns: 0.85fr 1.15fr; gap: 64px; }
  /* Le bloc inversé échange aussi les LARGEURS : ne déplacer que le texte
     laissait la capture dans la colonne étroite, deux fois plus petite que
     ses voisines. */
  .scene-bloc.inverse { grid-template-columns: 1.15fr 0.85fr; }
  .scene-bloc.inverse .scene-texte { order: 2; }
}

.scene-texte h3 { font-size: clamp(1.3rem, 2.6vw, 1.75rem); font-family: var(--font-display); }
.scene-texte .mono { display: block; margin-bottom: 12px; }
.scene-texte p { margin-top: 14px; color: var(--fg-2); }

.cadre {
  border: 1px solid var(--line);
  border-radius: var(--r);
  overflow: hidden;
  background: var(--panel);
}

.cadre img { width: 100%; }

.cadre-legende {
  padding: 11px 16px;
  border-top: 1px solid var(--line);
  font-size: 0.83rem;
  color: var(--fg-3);
  background: var(--bg-2);
}

/* ── la configuration par client ──────────────────────────── */

.config { background: var(--bg-2); border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }

.config-table {
  margin-top: 44px;
  border: 1px solid var(--line);
  border-radius: var(--r);
  overflow-x: auto;
  background: var(--panel);
}

.config-table table {
  width: 100%;
  border-collapse: collapse;
  min-width: 620px;
  font-size: 0.92rem;
}

.config-table th,
.config-table td {
  text-align: left;
  padding: 13px 18px;
  border-bottom: 1px solid var(--line);
}

.config-table th {
  font-family: var(--font-mono);
  font-size: 0.7rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--fg-3);
  font-weight: 500;
  background: var(--bg-2);
}

.config-table tr:last-child td { border-bottom: 0; }
.config-table td:first-child { font-weight: 550; white-space: nowrap; }
.config-table td span { color: var(--fg-2); }

.pastille {
  display: inline-block;
  width: 7px;
  height: 7px;
  border-radius: 50%;
  margin-right: 9px;
  vertical-align: 1px;
}

.pastille.on { background: var(--accent); }
.pastille.off { background: var(--line-2); }

/* ── la galerie des cas ───────────────────────────────────── */

.cas-grille {
  display: grid;
  gap: 18px;
  margin-top: 50px;
}

@media (min-width: 760px) { .cas-grille { grid-template-columns: repeat(2, 1fr); } }
@media (min-width: 1080px) { .cas-grille { grid-template-columns: repeat(3, 1fr); } }

.cas {
  display: flex;
  flex-direction: column;
  border: 1px solid var(--line);
  border-radius: var(--r);
  background: var(--panel);
  overflow: hidden;
  transition: border-color 0.18s;
}

.cas:hover { border-color: var(--line-2); }

.cas-visuel {
  border-bottom: 1px solid var(--line);
  background: var(--bg-2);
  aspect-ratio: 16 / 10;
  overflow: hidden;
}

.cas-visuel img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: top center;
}

.cas-corps {
  padding: 22px 22px 24px;
  display: flex;
  flex-direction: column;
  gap: 12px;
  flex: 1;
}

.cas-titre { display: flex; flex-direction: column; gap: 4px; }
.cas-titre b { font-family: var(--font-display); font-size: 1.08rem; font-weight: 600; letter-spacing: -0.015em; }
.cas-titre .metier { font-size: 0.9rem; color: var(--fg-2); }

.cas-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.etiquette {
  font-family: var(--font-mono);
  font-size: 0.68rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--fg-3);
  border: 1px solid var(--line);
  border-radius: 3px;
  padding: 3px 7px;
  background: var(--bg-2);
}

.cas-probleme { font-size: 0.93rem; color: var(--fg-2); line-height: 1.55; }

.cas blockquote {
  margin: 0;
  padding-left: 14px;
  border-left: 2px solid var(--accent-line);
  font-size: 0.92rem;
  line-height: 1.55;
  color: var(--fg);
}

.cas blockquote cite {
  display: block;
  margin-top: 8px;
  font-style: normal;
  font-size: 0.8rem;
  color: var(--fg-3);
}

.cas-parcours {
  margin: 4px 0 0;
  padding: 0;
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 10px;
  border-top: 1px solid var(--line);
  padding-top: 16px;
  margin-top: auto;
}

.cas-parcours li { display: grid; grid-template-columns: auto 1fr; gap: 11px; }

.cas-parcours .etape {
  font-family: var(--font-mono);
  font-size: 0.68rem;
  color: var(--accent);
  padding-top: 2px;
}

.cas-parcours b { display: block; font-size: 0.87rem; font-weight: 550; }
.cas-parcours span { font-size: 0.87rem; color: var(--fg-2); line-height: 1.45; }

/* ── l'argument agence ────────────────────────────────────── */

.agence { background: var(--bg-2); border-top: 1px solid var(--line); }

.agence-grid {
  display: grid;
  gap: 1px;
  margin-top: 48px;
  background: var(--line);
  border: 1px solid var(--line);
  border-radius: var(--r);
  overflow: hidden;
}

@media (min-width: 800px) { .agence-grid { grid-template-columns: repeat(3, 1fr); } }

.agence-carte {
  background: var(--panel);
  padding: 30px 26px;
  display: flex;
  flex-direction: column;
  gap: 11px;
}

.agence-carte .chiffre {
  font-family: var(--font-display);
  font-size: 2.2rem;
  font-weight: 600;
  letter-spacing: -0.03em;
  color: var(--accent);
  line-height: 1;
}

.agence-carte p { color: var(--fg-2); font-size: 0.95rem; line-height: 1.55; }

/* ── l'appel final ────────────────────────────────────────── */

.final { border-top: 1px solid var(--line); text-align: center; }
.final .wrap { display: flex; flex-direction: column; align-items: center; gap: 22px; }
.final h2 { max-width: 20ch; }
.final .lede { text-align: center; }
.final .hero-actions { justify-content: center; }

/* ── pied ─────────────────────────────────────────────────── */

footer {
  border-top: 1px solid var(--line);
  padding: 36px 0 48px;
  background: var(--bg-2);
}

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

footer p { font-size: 0.86rem; color: var(--fg-3); }
footer nav { display: flex; gap: 20px; flex-wrap: wrap; }
footer nav a { font-size: 0.86rem; color: var(--fg-2); text-decoration: none; }
footer nav a:hover { color: var(--fg); }

/* Au doigt, un lien de 22px de haut se rate. On l'épaissit sans toucher au
   dessin : c'est la zone cliquable qui grandit, pas le texte. */
@media (pointer: coarse), (max-width: 899px) {
  footer nav { gap: 6px 20px; }
  footer nav a { padding: 11px 0; }
  .logo { padding: 8px 0; }
}

/* ── révélation au défilement ─────────────────────────────── */

.reveal {
  opacity: 0;
  transform: translateY(14px);
  transition: opacity 0.6s cubic-bezier(0.22, 1, 0.36, 1), transform 0.6s cubic-bezier(0.22, 1, 0.36, 1);
}

.reveal.in { opacity: 1; transform: none; }

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .reveal { opacity: 1; transform: none; transition: none; }
  * { animation-duration: 0.01ms !important; transition-duration: 0.01ms !important; }
}
