/* ═══════════════════════════════════════════════════════════
   KML Evolutions — identité éditoriale premium
   Encre navy · papier chaud · cuivre
   ═══════════════════════════════════════════════════════════ */

:root {
  --ink: #0C1E2E;
  --ink-soft: #16334A;
  --ink-deep: #081420;
  --ink-raise: #12283C;
  --paper: #F6F4EF;
  --paper-warm: #EFEBE2;
  --surface: #FCFBF8;
  --copper: #C2703D;
  --copper-bright: #D98D55;
  --copper-text: #9C5426;   /* cuivre accessible en texte sur fonds clairs (≥ 4.5:1) */
  --slate: #5C6B7A;
  --slate-light: #9FB0BE;
  --line: #DDD6C8;
  --line-dark: rgba(246, 244, 239, 0.14);

  --font-display: "Fraunces", Georgia, serif;
  --font-body: "Archivo", "Helvetica Neue", Arial, sans-serif;

  --radius: 4px;
  --text-sm: 0.95rem;
  --text-lg: 1.1rem;
  --h3: 1.35rem;
  --h3-sm: 1.2rem;
  --track-wide: 0.22em;
  --track-mid: 0.14em;
  --space-section: 7.5rem;
  --space-band: 3.5rem;

  --w: min(1160px, 92vw);
  --ease: cubic-bezier(0.22, 1, 0.36, 1);
}

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

html {
  scroll-behavior: smooth;
  scroll-padding-top: 96px; /* header fixe : ancres et focus dégagés */
}

body {
  font-family: var(--font-body);
  background: var(--paper);
  color: var(--ink);
  line-height: 1.6;
  font-size: 1.0625rem;
  -webkit-font-smoothing: antialiased;
}
body.no-scroll { overflow: hidden; }

/* Grain léger sur tout le site */
body::after {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 999;
  opacity: 0.05;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='120' height='120'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.85' numOctaves='2'/%3E%3C/filter%3E%3Crect width='120' height='120' filter='url(%23n)'/%3E%3C/svg%3E");
}

h1, h2, h3 {
  font-family: var(--font-display);
  font-weight: 500;
  line-height: 1.12;
  letter-spacing: -0.01em;
}

h2 { font-size: clamp(1.9rem, 4vw, 3rem); }
h3 { font-size: var(--h3); }

a { color: inherit; }

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

:focus-visible {
  outline: 2px solid var(--copper-text);
  outline-offset: 3px;
  box-shadow: 0 0 0 6px rgba(217, 141, 85, 0.4);
}

.visually-hidden {
  position: absolute;
  width: 1px; height: 1px;
  margin: -1px; padding: 0;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
  border: 0;
}

.skip-link {
  position: absolute;
  top: -100%;
  left: 1rem;
  z-index: 200;
  background: var(--ink);
  color: var(--paper);
  padding: 0.8rem 1.4rem;
  border-radius: 0 0 var(--radius) var(--radius);
  text-decoration: none;
  font-weight: 600;
  font-size: 0.9rem;
}
.skip-link:focus { top: 0; }

.eyebrow {
  font-family: var(--font-body);
  font-size: 0.78rem;
  font-weight: 600;
  letter-spacing: var(--track-wide);
  text-transform: uppercase;
  color: var(--copper-text);
  margin-bottom: 1.1rem;
}
.eyebrow--light { color: var(--copper-bright); }

/* ─── Boutons ─── */
.btn {
  display: inline-block;
  font-family: var(--font-body);
  font-weight: 600;
  font-size: var(--text-sm);
  text-decoration: none;
  padding: 0.9rem 1.8rem;
  border-radius: var(--radius);
  transition: transform 0.35s var(--ease), background 0.35s, color 0.35s, border-color 0.35s;
}
.btn--primary {
  background: var(--copper-text);
  color: #fff;
}
.btn--primary:hover { background: #A85A28; transform: translateY(-2px); }
.btn--ghost {
  border: 1px solid rgba(246, 244, 239, 0.35);
  color: var(--paper);
}
.btn--ghost:hover { border-color: var(--copper-bright); color: var(--copper-bright); transform: translateY(-2px); }
.btn--nav {
  background: var(--copper-text);
  color: #fff;
  padding: 0.6rem 1.2rem;
  font-size: 0.85rem;
}
.btn--nav:hover { background: #A85A28; }
.nav.is-solid .btn--nav { background: var(--ink); }
.nav.is-solid .btn--nav:hover { background: var(--copper-text); }

/* ─── Navigation ─── */
.nav {
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 100;
  transition: background 0.4s, box-shadow 0.4s;
}
.nav__inner {
  width: var(--w);
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 1rem 0;
}
.nav__logo img { display: block; height: 46px; width: auto; }
.nav .nav__logo-light { display: none; }
.nav .nav__logo-dark { display: block; }
.nav.is-solid {
  background: rgba(246, 244, 239, 0.92);
  backdrop-filter: blur(12px);
  box-shadow: 0 1px 0 var(--line);
}
.nav.is-solid .nav__logo-light { display: block; }
.nav.is-solid .nav__logo-dark { display: none; }
.nav__links {
  display: flex;
  align-items: center;
  gap: 2rem;
  list-style: none;
}
.nav__links a:not(.btn) {
  text-decoration: none;
  font-size: 0.92rem;
  font-weight: 500;
  color: var(--paper);
  position: relative;
  transition: color 0.3s;
}
.nav__links a:not(.btn)::after {
  content: "";
  position: absolute;
  left: 0; bottom: -5px;
  width: 0; height: 1.5px;
  background: var(--copper-bright);
  transition: width 0.35s var(--ease);
}
.nav__links a:not(.btn):hover::after,
.nav__links a:not(.btn):focus-visible::after { width: 100%; }
.nav.is-solid .nav__links a:not(.btn) { color: var(--ink); }

.nav__burger {
  display: none;
  background: none;
  border: none;
  cursor: pointer;
  padding: 10px 8px;
}
.nav__burger span {
  display: block;
  width: 26px; height: 2px;
  background: var(--paper);
  margin: 6px 0;
  transition: transform 0.3s var(--ease), opacity 0.3s;
}
.nav.is-solid .nav__burger span { background: var(--ink); }

/* ─── Hero ─── */
.hero {
  position: relative;
  background:
    radial-gradient(ellipse 90% 70% at 75% 15%, rgba(194, 112, 61, 0.13), transparent 60%),
    linear-gradient(175deg, var(--ink-deep) 0%, var(--ink) 55%, var(--ink-raise) 100%);
  color: var(--paper);
  min-height: 100svh;
  display: flex;
  align-items: center;
  overflow: hidden;
}
.hero__net {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
}
.hero__net-lines path {
  fill: none;
  stroke: rgba(246, 244, 239, 0.08);
  stroke-width: 1;
  stroke-dasharray: 2000;
  stroke-dashoffset: 2000;
  animation: draw 4s var(--ease) 0.4s forwards;
}
.hero__net-copper {
  fill: none;
  stroke: rgba(217, 141, 85, 0.4);
  stroke-width: 1.5;
  stroke-dasharray: 1 9;
  stroke-linecap: round;
  opacity: 0;
  animation: nodeIn 2s var(--ease) 1s forwards;
}
.hero__net-nodes circle {
  fill: rgba(217, 141, 85, 0.4);
  opacity: 0;
  animation: nodeIn 1s var(--ease) forwards;
}
.hero__net-nodes circle:nth-child(odd) { animation-delay: 1.6s; }
.hero__net-nodes circle:nth-child(even) { animation-delay: 2.2s; }
@keyframes draw { to { stroke-dashoffset: 0; } }
@keyframes nodeIn { to { opacity: 1; } }

.hero__inner {
  position: relative;
  width: var(--w);
  margin: 0 auto;
  padding: 9rem 0 6rem;
}
.hero__title {
  font-size: clamp(2.5rem, 6.5vw, 5.2rem);
  font-weight: 500;
  letter-spacing: -0.02em;
  line-height: 1.08;
  display: flex;
  flex-direction: column;
  max-width: 18ch;
}
.hero__title .accent { font-style: italic; }
.hero__sub {
  max-width: 620px;
  margin-top: 2rem;
  font-size: clamp(1.05rem, 1.5vw, 1.2rem);
  color: var(--slate-light);
}
.hero__sub strong { color: var(--paper); font-weight: 600; }
.hero__cta {
  margin-top: 2.8rem;
  display: flex;
  gap: 1rem;
  flex-wrap: wrap;
}

/* ─── Stats ─── */
.stats {
  background: var(--paper-warm);
  border-block: 1px solid var(--line);
}
.stats__inner {
  width: var(--w);
  margin: 0 auto;
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  padding: var(--space-band) 0;
  gap: 2.5rem;
}
.stat { border-left: 2px solid var(--copper); padding-left: 1.4rem; }
.stat__num {
  display: block;
  font-family: var(--font-display);
  font-size: clamp(2.2rem, 3.5vw, 3.1rem);
  font-weight: 500;
  color: var(--ink);
  line-height: 1;
  margin-bottom: 0.6rem;
  font-variant-numeric: tabular-nums;
}
.stat__label {
  font-size: 0.88rem;
  color: var(--slate);
  line-height: 1.45;
  display: block;
  max-width: 26ch;
}

/* ─── Sections génériques ─── */
.section { padding: var(--space-section) 0; }
.section--alt { background: var(--paper-warm); border-block: 1px solid var(--line); }
.section__inner { width: var(--w); margin: 0 auto; }
.section__head { max-width: 640px; margin-bottom: 4rem; }

/* ─── Cartes expertises ─── */
.cards {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 1.5rem;
}
.card {
  position: relative;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 2.6rem 2.4rem 2.2rem;
  transition: transform 0.45s var(--ease), box-shadow 0.45s var(--ease), border-color 0.45s;
}
.card:hover {
  transform: translateY(-6px);
  box-shadow: 0 24px 48px -24px rgba(12, 30, 46, 0.25);
  border-color: var(--copper);
}
.card--featured {
  background: var(--ink);
  color: var(--paper);
  border-color: var(--ink);
}
.card--featured p { color: var(--slate-light); }
.card--featured:hover { border-color: var(--copper); }
.card__badge {
  position: absolute;
  top: 1.6rem; right: 1.6rem;
  font-size: 0.68rem;
  font-weight: 700;
  letter-spacing: var(--track-mid);
  text-transform: uppercase;
  color: var(--copper-bright);
  border: 1px solid currentColor;
  border-radius: 20px;
  padding: 0.3rem 0.75rem;
}
.card__num {
  font-family: var(--font-display);
  font-style: italic;
  font-size: 1rem;
  color: var(--copper-text);
  display: block;
  margin-bottom: 1.4rem;
}
.card--featured .card__num { color: var(--copper-bright); }
.card h3 { margin-bottom: 0.9rem; font-size: 1.5rem; }
.card p { font-size: var(--text-sm); color: var(--slate); }
.card__tags {
  list-style: none;
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin-top: 1.6rem;
}
.card__tags li {
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0.04em;
  padding: 0.32rem 0.7rem;
  border: 1px solid var(--line);
  border-radius: 20px;
  color: var(--slate);
}
.card--featured .card__tags li {
  border-color: var(--line-dark);
  color: var(--slate-light);
}

/* ─── Manifeste ─── */
.manifesto {
  background:
    radial-gradient(ellipse 70% 90% at 20% 100%, rgba(194, 112, 61, 0.12), transparent 55%),
    var(--ink);
  color: var(--paper);
  padding: var(--space-section) 0;
}
.manifesto__inner { width: var(--w); margin: 0 auto; max-width: 880px; }
.manifesto blockquote p {
  font-family: var(--font-display);
  font-size: clamp(2rem, 4.5vw, 3.4rem);
  font-weight: 500;
  font-style: italic;
  line-height: 1.15;
  margin-bottom: 2.2rem;
}
.manifesto__text {
  font-size: var(--text-lg);
  color: var(--slate-light);
  max-width: 720px;
}
.manifesto__text strong { color: var(--copper-bright); font-weight: 600; }
.manifesto__points {
  margin-top: 3.5rem;
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 2rem;
  border-top: 1px solid var(--line-dark);
  padding-top: 2.5rem;
}
.mpoint { display: flex; flex-direction: column; gap: 0.5rem; font-size: var(--text-sm); color: var(--slate-light); }
.mpoint__k {
  font-weight: 600;
  color: var(--paper);
  font-size: 1rem;
}

/* ─── Approche ─── */
.steps {
  list-style: none;
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 2rem;
}
.step { position: relative; padding-top: 1.6rem; }
.step::before {
  content: "";
  position: absolute;
  top: 0; left: 0; right: -2rem;
  height: 2px;
  background-image: repeating-linear-gradient(90deg, var(--copper) 0 2px, transparent 2px 10px);
}
.step:last-child::before { right: 0; }
.step__num {
  position: absolute;
  top: -0.85rem;
  left: 0;
  width: 1.7rem; height: 1.7rem;
  display: grid;
  place-items: center;
  background: var(--copper-text);
  color: #fff;
  border-radius: 50%;
  font-size: 0.8rem;
  font-weight: 700;
}
.step h3 { margin: 0.8rem 0 0.6rem; font-size: var(--h3-sm); }
.step p { font-size: var(--text-sm); color: var(--slate); }

/* ─── Fondateur ─── */
.founder { padding: var(--space-section) 0; }
.founder__inner {
  width: var(--w);
  margin: 0 auto;
  display: grid;
  grid-template-columns: 5fr 7fr;
  gap: 5rem;
  align-items: start;
}
.founder__frame {
  aspect-ratio: 4 / 5;
  border-radius: var(--radius);
  overflow: hidden;
  position: relative;
  background: linear-gradient(160deg, var(--ink) 0%, var(--ink-soft) 100%);
  box-shadow: 14px 14px 0 var(--paper-warm), 14px 14px 0 1px var(--line);
}
.founder__frame img { width: 100%; height: 100%; object-fit: cover; display: block; }
.founder__placeholder {
  position: absolute;
  inset: 0;
  width: 70%;
  height: auto;
  margin: auto;
}
.founder__id { margin-top: 1.6rem; display: flex; flex-direction: column; }
.founder__name { font-family: var(--font-display); font-size: 1.4rem; font-weight: 600; }
.founder__role { font-size: 0.85rem; letter-spacing: var(--track-mid); text-transform: uppercase; color: var(--copper-text); margin-top: 0.3rem; }
.founder__bio h2 { max-width: 560px; margin-bottom: 1.8rem; }
.founder__bio > p { margin-bottom: 1.2rem; color: var(--ink-soft); max-width: 640px; }
.founder__bio strong { font-weight: 600; }
.founder__collective {
  margin-top: 2.5rem;
  background: var(--paper-warm);
  border: 1px solid var(--line);
  border-left: 3px solid var(--copper);
  border-radius: var(--radius);
  padding: 1.8rem 2rem;
}
.founder__collective h3 { font-size: var(--h3-sm); margin-bottom: 0.6rem; }
.founder__collective p { font-size: var(--text-sm); color: var(--slate); }

/* ─── Références ─── */
.refs {
  border-block: 1px solid var(--line);
  background: var(--surface);
  padding: var(--space-band) 0;
}
.refs__inner { width: var(--w); margin: 0 auto; text-align: center; }
.refs .eyebrow { margin-bottom: 1.8rem; }
.refs__list {
  list-style: none;
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  align-items: flex-start;
  gap: 2rem 3.5rem;
}
.refs__list li {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.7rem;
}
.refs__logo {
  height: 44px;
  display: flex;
  align-items: center;
  justify-content: center;
}
.refs__logo img {
  display: block;
  width: auto;
  opacity: 0.92;
}
.refs__logo--text {
  font-family: var(--font-display);
  font-size: 1.7rem;
  font-weight: 500;
  color: var(--slate);
  letter-spacing: 0.02em;
}
.refs__list li > span:last-child {
  font-family: var(--font-body);
  font-size: 0.75rem;
  font-weight: 500;
  color: var(--slate);
  letter-spacing: 0.02em;
}

/* ─── Contact ─── */
.contact {
  background:
    radial-gradient(ellipse 80% 80% at 50% 120%, rgba(194, 112, 61, 0.16), transparent 60%),
    var(--ink);
  color: var(--paper);
  padding: var(--space-section) 0;
  text-align: center;
}
.contact__inner { width: var(--w); margin: 0 auto; max-width: 760px; }
.contact h2 { font-size: clamp(2.4rem, 5.5vw, 4.2rem); }
.contact__sub { margin-top: 1.4rem; color: var(--slate-light); font-size: var(--text-lg); }
.contact__actions {
  margin-top: 2.8rem;
  display: flex;
  justify-content: center;
  gap: 1rem;
  flex-wrap: wrap;
}
.contact__meta { margin-top: 3rem; font-size: 0.9rem; color: var(--slate-light); line-height: 1.8; }

/* ─── Formulaire de contact ─── */
.cform {
  margin-top: 3rem;
  text-align: left;
  background: rgba(246, 244, 239, 0.04);
  border: 1px solid var(--line-dark);
  border-radius: var(--radius);
  padding: 2.2rem;
}
.cform__honey { display: none; }
.cform__grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1.2rem;
  margin-bottom: 1.2rem;
}
.cform__field { display: flex; flex-direction: column; gap: 0.45rem; }
.cform__field label {
  font-size: 0.78rem;
  font-weight: 600;
  letter-spacing: var(--track-mid);
  text-transform: uppercase;
  color: var(--slate-light);
}
.cform__field label span { color: var(--copper-bright); }
.cform__field input,
.cform__field textarea {
  font-family: var(--font-body);
  font-size: 1rem;
  color: var(--paper);
  background: rgba(246, 244, 239, 0.07);
  border: 1px solid rgba(246, 244, 239, 0.22);
  border-radius: var(--radius);
  padding: 0.85rem 1rem;
  transition: border-color 0.3s, background 0.3s;
}
.cform__field input:hover,
.cform__field textarea:hover { border-color: rgba(246, 244, 239, 0.4); }
.cform__field input:focus,
.cform__field textarea:focus {
  outline: none;
  border-color: var(--copper-bright);
  background: rgba(246, 244, 239, 0.1);
  box-shadow: 0 0 0 3px rgba(217, 141, 85, 0.25);
}
.cform__field textarea { resize: vertical; min-height: 120px; }
.cform__field ::placeholder { color: rgba(159, 176, 190, 0.6); }
.cform__submit {
  margin-top: 1.6rem;
  border: none;
  cursor: pointer;
  width: 100%;
}
.cform__status {
  margin-top: 1.2rem;
  padding: 0.85rem 1rem;
  border-radius: var(--radius);
  font-size: var(--text-sm);
  font-weight: 500;
  text-align: left;
}
.cform__status.is-ok {
  color: #dff3e4;
  background: rgba(72, 160, 104, 0.18);
  border: 1px solid rgba(120, 200, 150, 0.4);
}
.cform__status.is-err {
  color: #fbe0d4;
  background: rgba(194, 112, 61, 0.18);
  border: 1px solid rgba(217, 141, 85, 0.5);
}
.contact__alt { margin-top: 1.8rem; font-size: var(--text-sm); color: var(--slate-light); }
.contact__alt a { color: var(--copper-bright); text-decoration: underline; text-underline-offset: 3px; }
.contact__alt a:hover { color: var(--paper); }

/* ─── Footer ─── */
.footer {
  background: var(--ink-deep);
  color: var(--slate-light);
  padding: var(--space-band) 0;
}
.footer__inner { width: var(--w); margin: 0 auto; }
.footer__brand {
  display: flex;
  align-items: center;
  gap: 1rem;
  margin-bottom: 1.2rem;
}
.footer__brand img { display: block; height: 40px; width: auto; }
.footer__name {
  font-family: var(--font-display);
  font-size: 1.15rem;
  font-weight: 500;
  color: var(--paper);
}
.footer p { font-size: 0.9rem; max-width: 46ch; }
.footer__nav { margin-top: 1.4rem; }
.footer__nav a {
  color: var(--slate-light);
  font-size: 0.85rem;
  text-decoration: underline;
  text-underline-offset: 3px;
}
.footer__nav a:hover { color: var(--paper); }
.footer__legal { margin-top: 1.2rem; font-size: 0.78rem; }

/* ─── Fond « réseau neuronal » animé (canvas, sections sombres) ─── */
canvas.neural {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
}
/* quand le canvas anime, le réseau SVG statique s'efface (il reste le
   fallback sans JS / prefers-reduced-motion) */
.has-neural .hero__net { display: none; }

/* toutes les sections porteuses d'un canvas : le contenu passe devant */
.stats, .section, .manifesto, .founder, .refs, .contact { position: relative; }
.stats__inner, .section__inner, .manifesto__inner,
.founder__inner, .refs__inner, .contact__inner { position: relative; }

/* ─── Emplacements d'images gérés par l'admin ─── */
.card__media { margin-bottom: 1.4rem; }
.card__media img {
  width: 100%; height: auto; display: block;
  border-radius: var(--radius);
}
.section__media { margin: 0 0 3rem; }
.section__media img {
  width: 100%; height: auto; display: block;
  border-radius: var(--radius);
  border: 1px solid var(--line);
}
.manifesto__media { margin: 2.5rem 0 0; }
.manifesto__media img {
  width: 100%; height: auto; display: block;
  border-radius: var(--radius);
  opacity: 0.92;
}
/* ─── Assistant IA (widget bulle + panneau) ─── */
#kml-agent { position: fixed; z-index: 200; }
.kagent__bulle {
  position: fixed; bottom: 1.5rem; right: 1.5rem;
  width: 60px; height: 60px; border-radius: 50%;
  background: var(--ink); color: var(--paper);
  border: none; cursor: pointer;
  display: grid; place-items: center;
  box-shadow: 0 8px 24px -6px rgba(12, 30, 46, 0.5);
  transition: transform 0.3s var(--ease), background 0.3s;
}
.kagent__bulle:hover { background: var(--copper); transform: translateY(-3px); }
.kagent__bulle.is-open { transform: scale(0.9); opacity: 0; pointer-events: none; }
.kagent__bulle-ic { display: grid; place-items: center; }
/* point de présence vert */
.kagent__dot {
  position: absolute; top: 4px; right: 4px;
  width: 12px; height: 12px; border-radius: 50%;
  background: #3fbf6a; border: 2px solid var(--ink);
}
.kagent__bulle:hover .kagent__dot { border-color: var(--copper); }

/* infobulle (teaser) périodique, à gauche de l'icône */
.kagent__teaser {
  position: fixed; bottom: 2rem; right: 6rem;
  max-width: 260px; z-index: 199;
  background: var(--ink); color: var(--paper);
  border: 1px solid var(--line-dark);
  padding: 0.7rem 2rem 0.7rem 0.9rem;
  border-radius: 14px 14px 4px 14px;
  font-size: 0.9rem; line-height: 1.4; cursor: pointer;
  box-shadow: 0 12px 30px -10px rgba(12, 30, 46, 0.5);
  opacity: 0; transform: translateY(6px) scale(0.96);
  transition: opacity 0.3s var(--ease), transform 0.3s var(--ease);
}
.kagent__teaser.is-in { opacity: 1; transform: none; }
.kagent__teaser-x {
  position: absolute; top: 0.35rem; right: 0.45rem;
  background: none; border: none; color: var(--slate-light);
  font-size: 0.85rem; cursor: pointer; line-height: 1; padding: 0.15rem;
}
.kagent__teaser-x:hover { color: var(--paper); }
@media (max-width: 480px) {
  .kagent__teaser { max-width: calc(100vw - 6rem); right: 5.5rem; bottom: 1.4rem; }
}
@media (prefers-reduced-motion: reduce) {
  .kagent__teaser { transition: opacity 0.2s; transform: none; }
}

.kagent__panel {
  position: fixed; bottom: 1.5rem; right: 1.5rem;
  width: min(390px, calc(100vw - 2rem)); height: min(70vh, 620px);
  background: var(--paper); border: 1px solid var(--line);
  border-radius: 16px; overflow: hidden;
  display: flex; flex-direction: column;
  box-shadow: 0 24px 60px -12px rgba(12, 30, 46, 0.4);
  animation: kagentIn 0.28s var(--ease);
}
/* l'attribut hidden doit gagner sur le display:flex ci-dessus */
.kagent__panel[hidden], .kagent__mute[hidden] { display: none; }
@keyframes kagentIn { from { opacity: 0; transform: translateY(16px); } to { opacity: 1; transform: none; } }

.kagent__head {
  display: flex; align-items: center; justify-content: space-between;
  padding: 0.9rem 1.1rem; background: var(--ink); color: var(--paper);
}
.kagent__title { font-family: var(--font-display); font-size: 1.05rem; font-weight: 500; }
.kagent__close { background: none; border: none; color: var(--slate-light); font-size: 1.1rem; cursor: pointer; padding: 0.2rem 0.4rem; border-radius: 4px; }
.kagent__close:hover { color: var(--paper); }

.kagent__log { flex: 1; overflow-y: auto; padding: 1.1rem; display: flex; flex-direction: column; gap: 0.7rem; background: var(--paper); }
.kagent__msg { display: flex; }
.kagent__msg--user { justify-content: flex-end; }
.kagent__bubble {
  max-width: 82%; padding: 0.6rem 0.9rem; border-radius: 14px;
  font-size: 0.94rem; line-height: 1.5; white-space: pre-wrap; word-wrap: break-word;
}
.kagent__msg--bot .kagent__bubble { background: #fff; border: 1px solid var(--line); color: var(--ink); border-bottom-left-radius: 4px; }
.kagent__msg--user .kagent__bubble { background: var(--copper-text); color: #fff; border-bottom-right-radius: 4px; }

.kagent__typing { display: inline-flex; gap: 4px; align-items: center; }
.kagent__typing span { width: 6px; height: 6px; border-radius: 50%; background: var(--slate-light); animation: kagentBlink 1.2s infinite both; }
.kagent__typing span:nth-child(2) { animation-delay: 0.2s; }
.kagent__typing span:nth-child(3) { animation-delay: 0.4s; }
@keyframes kagentBlink { 0%, 60%, 100% { opacity: 0.25; } 30% { opacity: 1; } }

.kagent__bar { display: flex; gap: 0.5rem; align-items: flex-end; padding: 0.7rem; border-top: 1px solid var(--line); background: var(--surface); }
.kagent__input {
  flex: 1; resize: none; max-height: 120px;
  font-family: var(--font-body); font-size: 0.95rem;
  padding: 0.6rem 0.8rem; border: 1px solid var(--line); border-radius: 10px;
  background: #fff; color: var(--ink);
}
.kagent__input:focus { outline: none; border-color: var(--copper-bright); box-shadow: 0 0 0 3px rgba(217, 141, 85, 0.2); }
.kagent__send {
  flex: none; width: 42px; height: 42px; border-radius: 10px;
  background: var(--copper-text); color: #fff; border: none; cursor: pointer;
  display: grid; place-items: center; transition: background 0.2s;
}
.kagent__send:hover { background: #A85A28; }
.kagent__send:disabled { opacity: 0.5; cursor: wait; }

/* bouton micro (voix temps réel) */
.kagent__mic {
  flex: none; width: 42px; height: 42px; border-radius: 10px;
  background: var(--ink); color: var(--paper); border: none; cursor: pointer;
  display: grid; place-items: center; transition: background 0.2s, box-shadow 0.2s;
}
.kagent__mic:hover { background: var(--ink-soft); }
.kagent__mic.is-connecting { background: var(--slate); }
.kagent__mic.is-listening { background: var(--copper); box-shadow: 0 0 0 0 rgba(194,112,61,0.6); animation: kagentPulse 1.6s infinite; }
.kagent__mic.is-speaking { background: var(--ink-soft); box-shadow: 0 0 0 0 rgba(159,176,190,0.6); animation: kagentPulse 1.6s infinite; }
.kagent__mic.is-muted { background: var(--slate); opacity: 0.7; }
@keyframes kagentPulse {
  0% { box-shadow: 0 0 0 0 rgba(194,112,61,0.5); }
  70% { box-shadow: 0 0 0 10px rgba(194,112,61,0); }
  100% { box-shadow: 0 0 0 0 rgba(194,112,61,0); }
}
.kagent__mute {
  flex: none; width: 42px; height: 42px; border-radius: 10px;
  background: var(--surface); color: var(--slate); border: 1px solid var(--line); cursor: pointer;
  display: grid; place-items: center; transition: background 0.2s, color 0.2s;
}
.kagent__mute:hover { color: var(--ink); }
.kagent__mute.is-on { background: var(--slate); color: #fff; border-color: var(--slate); }
@media (prefers-reduced-motion: reduce) { .kagent__mic { animation: none !important; } }

@media (max-width: 480px) {
  .kagent__panel { bottom: 0; right: 0; width: 100vw; height: 100dvh; border-radius: 0; }
  .kagent__bulle { bottom: 1rem; right: 1rem; }
}
@media (prefers-reduced-motion: reduce) {
  .kagent__panel { animation: none; }
  .kagent__bulle, .kagent__send { transition: none; }
  .kagent__typing span { animation: none; opacity: 0.6; }
}

/* ─── Reveal on scroll (uniquement si JS présent) ─── */
.js .reveal {
  opacity: 0;
  transform: translateY(28px);
  transition: opacity 0.9s var(--ease), transform 0.9s var(--ease);
}
.js .reveal.is-in { opacity: 1; transform: none; }
.js .d1 { transition-delay: 0.12s; }
.js .d2 { transition-delay: 0.24s; }
.js .d3 { transition-delay: 0.36s; }
.js .d4 { transition-delay: 0.48s; }
.js .d5 { transition-delay: 0.6s; }

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .js .reveal { opacity: 1; transform: none; transition: none; }
  .hero__net-lines path { animation: none; stroke-dashoffset: 0; }
  .hero__net-copper, .hero__net-nodes circle { animation: none; opacity: 1; }
  .nav__links, .nav__burger span { transition: none; }
  .card, .card:hover, .btn, .btn:hover { transform: none; transition: none; }
}

/* ─── Responsive ─── */
@media (max-width: 900px) {
  .stats__inner { grid-template-columns: repeat(2, 1fr); }
  .cards { grid-template-columns: 1fr; }
  .steps { grid-template-columns: repeat(2, 1fr); gap: 3rem 2rem; }
  .step::before { right: 0; }
  .founder__inner { grid-template-columns: 1fr; gap: 3.5rem; }
  .founder__frame { max-width: 420px; }
  .manifesto__points { grid-template-columns: 1fr; }

  /* Menu mobile (breakpoint aligné sur les grilles : pas de zone de nav écrasée) */
  .nav__links {
    position: fixed;
    top: 0; right: 0;
    height: 100dvh;
    width: min(78vw, 340px);
    background: var(--ink);
    flex-direction: column;
    align-items: flex-start;
    justify-content: center;
    padding: 2.5rem;
    gap: 1.8rem;
    transform: translateX(100%);
    visibility: hidden;
    transition: transform 0.45s var(--ease), visibility 0s 0.45s;
    box-shadow: none;
  }
  .nav__links.is-open {
    transform: translateX(0);
    visibility: visible;
    transition: transform 0.45s var(--ease), visibility 0s;
    box-shadow: -20px 0 60px rgba(0, 0, 0, 0.3);
  }
  .nav__links a:not(.btn) { color: var(--paper) !important; font-size: 1.15rem; }
  .nav__links .btn--nav { background: var(--copper-text) !important; margin-top: 0.5rem; }
  .nav__burger { display: block; position: relative; z-index: 110; }
  .nav__burger.is-open span:nth-child(1) { transform: translateY(4px) rotate(45deg); background: var(--paper); }
  .nav__burger.is-open span:nth-child(2) { transform: translateY(-4px) rotate(-45deg); background: var(--paper); }
}

@media (max-width: 680px) {
  .hero__inner { padding: 8rem 0 4.5rem; }
  .stats__inner { grid-template-columns: 1fr; gap: 2rem; padding: 2.5rem 0; }
  .steps { grid-template-columns: 1fr; }
  .section, .manifesto, .contact, .founder { padding: 4.5rem 0; }
  .refs { padding: 2.5rem 0; }
  .founder__frame { box-shadow: 8px 8px 0 var(--paper-warm), 8px 8px 0 1px var(--line); }
  .refs__list { gap: 1.6rem 2.5rem; }
  .cform { padding: 1.5rem; }
  .cform__grid { grid-template-columns: 1fr; }
}
