/* ==========================================================================
   Formation IA Niveau 1 — Parallax scroll-driven
   Style type Apple product page : sticky stages, scroll-pinned reveals
   ========================================================================== */
:root {
  --cyan: #00B9FF;
  --navy: #003C5A;
  --dark: #0E1518;
  --darker: #080C0E;
  --orange: #FF6B35;
  --teal: #1B9A86;
  --pink: #E2255B;
  --purple: #9369F7;
  --yellow: #FFC83D;
  --white: #FFFFFF;
  --lgray: #C7D4E3;
  --mgray: #6B7A8E;
  --ring: rgba(0,185,255,0.35);
}

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

html { scroll-behavior: auto; }
body {
  font-family: "Aptos","SF Pro Display","Segoe UI",system-ui,-apple-system,sans-serif;
  background: var(--darker);
  color: var(--white);
  line-height: 1.5;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
}

/* ============ NAV + PROGRESS ============ */
#scrollbar {
  position: fixed; top:0; left:0; right:0;
  height: 3px;
  background: rgba(255,255,255,0.05);
  z-index: 200;
}
#scrollbarFill {
  height: 100%; width: 0%;
  background: linear-gradient(90deg, var(--cyan), var(--purple));
  transition: width 0.08s linear;
}
#topnav {
  position: fixed;
  top: 12px; left: 24px; right: 24px;
  display: flex; justify-content: space-between; align-items: center;
  z-index: 150;
  pointer-events: none;
  font-size: 12px;
  letter-spacing: 0.5px;
}
.brand { color: var(--cyan); font-weight: 600; }
.chapter {
  color: var(--lgray);
  background: rgba(14,21,24,0.8);
  backdrop-filter: blur(10px);
  padding: 6px 14px;
  border-radius: 20px;
  border: 1px solid rgba(255,255,255,0.08);
  pointer-events: auto;
  transition: all 0.3s;
}

/* ============ STAGE MECHANICS ============ */
.stage {
  position: relative;
  height: var(--h, 200vh);
  width: 100%;
}
.sticky {
  position: sticky;
  top: 0;
  height: 100vh;
  width: 100%;
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
}
.container {
  width: 100%;
  max-width: 1280px;
  padding: 80px 60px;
  margin: 0 auto;
}

/* ============ TYPOGRAPHY ============ */
h1, h2, h3, h4 { font-weight: 700; letter-spacing: -0.01em; }
h1 { font-size: clamp(40px, 6vw, 88px); line-height: 1.02; }
h1.huge { font-size: clamp(80px, 14vw, 220px); letter-spacing: -0.03em; }
h2 { font-size: clamp(36px, 5vw, 72px); line-height: 1.05; margin-bottom: 24px; }
h3 { font-size: clamp(22px, 2vw, 28px); line-height: 1.2; }
h4 { font-size: 14px; letter-spacing: 1.2px; text-transform: uppercase; }
.accent { color: var(--cyan); }
.eyebrow {
  color: var(--cyan);
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 2px;
  margin-bottom: 18px;
  text-transform: uppercase;
}
.lead { font-size: clamp(18px, 1.5vw, 22px); color: var(--lgray); margin-top: 16px; max-width: 720px; }
.muted { color: var(--mgray); font-size: 13px; font-style: italic; }

/* ============ ANIMATIONS DRIVEN BY --p (0→1) ============ */
/* Each element has an inline --p (progress within its range) set by JS. */
[data-anim] { will-change: transform, opacity; --p: 0; }

[data-anim="fade-up"] {
  opacity: var(--p);
  transform: translateY(calc((1 - var(--p)) * 80px));
}
[data-anim="fade-down"] {
  opacity: var(--p);
  transform: translateY(calc((1 - var(--p)) * -40px));
}
[data-anim="fade-out"] {
  opacity: calc(1 - var(--p));
}
[data-anim="zoom-fade"] {
  opacity: var(--p);
  transform: scale(calc(0.7 + var(--p) * 0.3));
}
[data-anim="zoom-in"] {
  opacity: var(--p);
  transform: scale(calc(0.3 + var(--p) * 0.7));
}
[data-anim="slide-up-in"] {
  opacity: var(--p);
  transform: translateY(calc((1 - var(--p)) * 120px)) scale(calc(0.92 + var(--p) * 0.08));
}
[data-anim="slide-right"] {
  opacity: var(--p);
  transform: translateX(calc((1 - var(--p)) * -60px));
}
[data-anim="rise"] {
  opacity: var(--p);
  transform: translateY(calc((1 - var(--p)) * 100px));
}
[data-anim="slide-right-stay"] {
  opacity: var(--p);
  transform: translateX(calc((1 - var(--p)) * -120px));
}
[data-anim="slide-left-stay"] {
  opacity: var(--p);
  transform: translateX(calc((1 - var(--p)) * 120px));
}

/* ============ HERO ============ */
.hero { height: 180vh; }
.hero .sticky { background: var(--darker); }
.hero-bg { position: absolute; inset: 0; overflow: hidden; }
.glow {
  position: absolute;
  border-radius: 50%;
  filter: blur(90px);
  opacity: 0.4;
}
.glow.g1 { width: 500px; height: 500px; top: -100px; left: -100px; background: var(--cyan); animation: float 18s ease-in-out infinite; }
.glow.g2 { width: 600px; height: 600px; bottom: -200px; right: -150px; background: var(--purple); animation: float 22s ease-in-out infinite reverse; }
.glow.g3 { width: 400px; height: 400px; top: 30%; right: 30%; background: var(--orange); opacity: 0.18; animation: float 25s ease-in-out infinite; }
@keyframes float {
  0%,100% { transform: translate(0,0) scale(1); }
  50% { transform: translate(40px,-30px) scale(1.1); }
}

.hero-content {
  position: relative;
  z-index: 2;
  text-align: center;
  padding: 0 40px;
}
.hero-chapo {
  color: var(--cyan);
  font-size: 14px;
  font-weight: 700;
  letter-spacing: 3px;
  margin-bottom: 30px;
}
.hero-title .line {
  display: block;
  background: linear-gradient(180deg, #fff 0%, #96B8D0 100%);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}
.hero-sub {
  margin-top: 36px;
  font-size: clamp(18px, 1.6vw, 24px);
  color: var(--lgray);
  letter-spacing: 0.5px;
}
.hero-scroll {
  position: absolute;
  bottom: -150px;
  left: 50%;
  transform: translateX(-50%);
  color: var(--mgray);
  font-size: 12px;
  letter-spacing: 2px;
  text-transform: uppercase;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 12px;
}
.arrow-down {
  width: 2px;
  height: 40px;
  background: linear-gradient(180deg, var(--cyan), transparent);
  animation: arrowBounce 1.8s ease-in-out infinite;
}
@keyframes arrowBounce {
  0%,100% { transform: translateY(0); opacity: 1; }
  50% { transform: translateY(10px); opacity: 0.3; }
}

/* ============ WORD CLOUD ============ */
.word-ui {
  margin-top: 50px;
  max-width: 1000px;
}
.word-ui form {
  display: flex;
  gap: 12px;
  margin-bottom: 28px;
}
.word-ui input {
  flex: 1;
  background: rgba(255,255,255,0.04);
  border: 1px solid rgba(255,255,255,0.1);
  border-radius: 100px;
  padding: 16px 24px;
  color: var(--white);
  font-size: 16px;
  font-family: inherit;
  transition: all 0.2s;
}
.word-ui input:focus {
  outline: none;
  border-color: var(--cyan);
  box-shadow: 0 0 0 4px var(--ring);
  background: rgba(0,185,255,0.06);
}
.word-ui button, .commit-ui button {
  background: var(--cyan);
  color: var(--dark);
  border: none;
  padding: 0 28px;
  border-radius: 100px;
  font-weight: 700;
  font-size: 15px;
  cursor: pointer;
  font-family: inherit;
  transition: all 0.15s;
}
.word-ui button:hover, .commit-ui button:hover { background: #33c7ff; transform: translateY(-1px); }
.word-ui button:active { transform: scale(0.96); }

#wordCloud {
  min-height: 150px;
  display: flex;
  flex-wrap: wrap;
  gap: 10px 14px;
  align-items: center;
  padding: 20px 0;
}
.word {
  display: inline-block;
  padding: 6px 16px;
  border-radius: 30px;
  background: rgba(0,185,255,0.12);
  border: 1px solid rgba(0,185,255,0.3);
  color: var(--white);
  font-weight: 500;
  transition: transform 0.2s;
  animation: popIn 0.5s cubic-bezier(.17,.67,.35,1.55);
}
@keyframes popIn {
  0% { opacity: 0; transform: scale(0.3) rotate(-8deg); }
  100% { opacity: 1; transform: scale(1) rotate(0); }
}
.word:hover { transform: scale(1.1); }
.word.s1 { font-size: 14px; }
.word.s2 { font-size: 19px; background: rgba(255,107,53,0.15); border-color: rgba(255,107,53,0.4); }
.word.s3 { font-size: 25px; background: rgba(27,154,134,0.18); border-color: rgba(27,154,134,0.45); font-weight: 600; }
.word.s4 { font-size: 34px; background: rgba(147,105,247,0.22); border-color: rgba(147,105,247,0.55); font-weight: 700; letter-spacing: -0.5px; }

.hint { color: var(--mgray); font-size: 12px; }
.linky { background: none; border: none; color: var(--cyan); cursor: pointer; font: inherit; text-decoration: underline; }

/* ============ PILLARS ============ */
.pillars .sticky { background: linear-gradient(180deg, var(--darker) 0%, #0a1220 100%); }
.pillar-stage {
  position: relative;
  margin-top: 60px;
  min-height: 500px;
}
.pillar-slot {
  position: absolute;
  width: 48%;
}
.pillar-slot.left { left: 0; top: 0; }
.pillar-slot.right { right: 0; top: 80px; }
.big-num {
  font-size: 180px;
  font-weight: 900;
  color: var(--cyan);
  opacity: 0.12;
  line-height: 0.8;
  position: absolute;
  top: -40px;
  left: -30px;
  z-index: 0;
  font-family: "SF Pro Display","Aptos Display",sans-serif;
  letter-spacing: -0.05em;
}
.pillar-slot.right .big-num { color: var(--orange); left: auto; right: -30px; }
.pillar-card {
  position: relative;
  z-index: 1;
  background: rgba(255,255,255,0.03);
  border: 1px solid rgba(255,255,255,0.08);
  backdrop-filter: blur(20px);
  border-radius: 24px;
  padding: 36px;
  box-shadow: 0 30px 60px rgba(0,0,0,0.4);
}
.pillar-card.pc1 { border-left: 3px solid var(--cyan); }
.pillar-card.pc2 { border-left: 3px solid var(--orange); }
.pc-tag {
  display: inline-block;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 2px;
  color: var(--cyan);
  margin-bottom: 14px;
}
.pc2 .pc-tag { color: var(--orange); }
.pillar-card h3 { margin-bottom: 10px; color: var(--white); }
.pc-lead { color: var(--lgray); font-size: 17px; margin-bottom: 20px; }
.pillar-card ul { list-style: none; margin-bottom: 18px; }
.pillar-card li {
  padding: 6px 0 6px 24px;
  position: relative;
  color: var(--lgray);
  font-size: 15px;
}
.pillar-card li::before {
  content: "→";
  position: absolute;
  left: 0;
  color: var(--cyan);
  font-weight: 700;
}
.pc2 li::before { color: var(--orange); }
.pillar-card b { color: var(--white); font-weight: 600; }
.pc-use { color: var(--mgray); font-style: italic; font-size: 14px; border-top: 1px solid rgba(255,255,255,0.08); padding-top: 14px; margin-top: 14px; }
.pillar-final {
  position: absolute;
  bottom: -80px;
  left: 0; right: 0;
  text-align: center;
  font-size: clamp(18px, 2vw, 28px);
  color: var(--cyan);
  font-weight: 600;
}

/* ============ RECIPE ============ */
.recipe .sticky { background: linear-gradient(180deg, #0a1220 0%, var(--darker) 100%); }
.ingredients {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 18px;
  margin-top: 50px;
}
.ing {
  background: rgba(255,255,255,0.04);
  border: 1px solid rgba(255,255,255,0.08);
  border-top: 4px solid var(--c);
  border-radius: 16px;
  padding: 24px;
  backdrop-filter: blur(10px);
}
.ing-num {
  font-size: 48px;
  font-weight: 800;
  color: var(--c);
  line-height: 0.9;
  margin-bottom: 8px;
}
.ing h4 { color: var(--c); margin-bottom: 10px; letter-spacing: 1.5px; }
.ing .quote-inline {
  background: rgba(0,0,0,0.3);
  border-left: 2px solid var(--c);
  padding: 10px 14px;
  border-radius: 6px;
  color: var(--white);
  font-style: italic;
  font-size: 13px;
  margin: 10px 0;
}

/* ============ GUIDED STEPPER ============ */
.guided {
  max-width: 900px;
  margin: 60px auto 0;
}
.step-chips {
  display: flex;
  gap: 8px;
  justify-content: center;
  margin-bottom: 30px;
}
.step-chip {
  padding: 6px 14px;
  border-radius: 20px;
  background: rgba(255,255,255,0.04);
  border: 1px solid rgba(255,255,255,0.1);
  color: var(--mgray);
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.5px;
  transition: all 0.3s;
}
.step-chip.active { background: var(--cyan); color: var(--dark); border-color: var(--cyan); transform: scale(1.08); }
.step-chip.done { background: rgba(0,185,255,0.15); border-color: var(--cyan); color: var(--cyan); }
.step-panel {
  background: rgba(255,255,255,0.03);
  border: 1px solid rgba(255,255,255,0.08);
  border-radius: 20px;
  padding: 40px;
  min-height: 280px;
}
.step-intro {
  color: var(--cyan);
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 2px;
  text-transform: uppercase;
  margin-bottom: 10px;
}
.step-q { font-size: 26px; font-weight: 600; margin-bottom: 14px; line-height: 1.2; }
.step-why { color: var(--lgray); font-size: 14px; margin-bottom: 24px; }
.step-examples {
  background: rgba(0,185,255,0.06);
  border: 1px dashed rgba(0,185,255,0.3);
  border-radius: 10px;
  padding: 14px 18px;
  margin-bottom: 24px;
  font-size: 13px;
  color: var(--lgray);
}
.step-examples b { color: var(--cyan); display: block; margin-bottom: 6px; font-size: 11px; letter-spacing: 1px; }
.step-examples .ex { display: block; margin: 4px 0; font-style: italic; }
.step-examples .ex::before { content: "« "; } .step-examples .ex::after { content: " »"; }
.step-input {
  width: 100%;
  background: rgba(0,0,0,0.3);
  border: 2px solid rgba(255,255,255,0.1);
  border-radius: 12px;
  padding: 18px 20px;
  color: var(--white);
  font-size: 17px;
  font-family: inherit;
  transition: all 0.2s;
}
.step-input:focus {
  outline: none;
  border-color: var(--cyan);
  background: rgba(0,185,255,0.05);
  box-shadow: 0 0 0 4px var(--ring);
}
.step-actions {
  display: flex;
  justify-content: space-between;
  margin-top: 24px;
  align-items: center;
}
.step-prev, .step-next {
  background: var(--cyan);
  color: var(--dark);
  border: none;
  padding: 12px 28px;
  border-radius: 100px;
  font-weight: 700;
  cursor: pointer;
  font-family: inherit;
  font-size: 14px;
  transition: all 0.15s;
}
.step-prev { background: transparent; border: 1px solid rgba(255,255,255,0.2); color: var(--lgray); }
.step-prev:hover { background: rgba(255,255,255,0.05); }
.step-next:hover { background: #33c7ff; transform: translateX(3px); }
.step-next:disabled { background: rgba(255,255,255,0.1); color: var(--mgray); cursor: not-allowed; transform: none; }

.assembly {
  margin-top: 30px;
  background: rgba(0,0,0,0.5);
  border: 2px solid var(--cyan);
  border-radius: 16px;
  padding: 26px;
  font-family: "SF Mono","Menlo","Consolas",monospace;
  font-size: 13px;
  white-space: pre-wrap;
  color: var(--white);
  line-height: 1.7;
  position: relative;
}
.assembly .piece { transition: all 0.4s; }
.assembly .piece .tag {
  color: var(--cyan);
  font-weight: 700;
  font-size: 11px;
  letter-spacing: 2px;
}
.assembly .piece.role .tag { color: var(--cyan); }
.assembly .piece.ctx .tag { color: var(--orange); }
.assembly .piece.task .tag { color: var(--teal); }
.assembly .piece.fmt .tag { color: var(--pink); }
.assembly .piece.pending { opacity: 0.25; }
.assembly .piece.pending .val::before { content: "…"; color: var(--mgray); }
.assembly-actions { display: flex; gap: 10px; margin-top: 20px; flex-wrap: wrap; }
.btn-copy, .btn-ai {
  background: var(--teal);
  color: var(--white);
  border: none;
  padding: 12px 22px;
  border-radius: 100px;
  font-weight: 600;
  cursor: pointer;
  font-family: inherit;
  font-size: 13px;
  transition: all 0.15s;
}
.btn-copy:hover { background: #26b89e; }
.btn-copy.copied { background: var(--cyan); color: var(--dark); }
.btn-ai {
  background: linear-gradient(135deg, var(--purple), var(--pink));
  font-weight: 700;
}
.btn-ai:hover { transform: translateY(-1px); box-shadow: 0 8px 20px rgba(147,105,247,0.3); }
.btn-ai:disabled { opacity: 0.4; cursor: not-allowed; }

/* ============ HORIZONTAL (CR Teams) ============ */
.horiz .sticky { background: var(--darker); }
.horiz-top {
  position: absolute;
  top: 60px; left: 0; right: 0;
  text-align: center;
  z-index: 5;
  padding: 0 40px;
  max-width: 900px;
  margin: 0 auto;
}
.horiz-track {
  display: flex;
  gap: 40px;
  padding: 0 50vw;
  align-items: center;
  height: 100%;
  transform: translateX(0);
  will-change: transform;
}
.h-card {
  flex: 0 0 460px;
  background: rgba(255,255,255,0.04);
  border: 1px solid rgba(255,255,255,0.08);
  border-radius: 24px;
  padding: 48px;
  backdrop-filter: blur(10px);
  box-shadow: 0 30px 60px rgba(0,0,0,0.4);
  position: relative;
  overflow: hidden;
}
.h-card::before {
  content: "";
  position: absolute;
  top: 0; left: 0;
  width: 100%; height: 4px;
  background: linear-gradient(90deg, var(--cyan), var(--purple));
}
.h-num {
  font-size: 96px;
  font-weight: 900;
  color: var(--cyan);
  opacity: 0.2;
  line-height: 1;
  margin-bottom: 10px;
  letter-spacing: -0.04em;
}
.h-label {
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 3px;
  color: var(--cyan);
  margin-bottom: 16px;
}
.h-card h3 { font-size: 28px; margin-bottom: 14px; }
.h-card p { color: var(--lgray); font-size: 16px; }

/* ============ DECISION TABLE ============ */
.deepbg .sticky { background: linear-gradient(180deg, var(--darker) 0%, #0a1520 100%); }
.decision { margin-top: 40px; max-width: 1100px; }
.row {
  display: grid;
  grid-template-columns: 2fr 2fr 1fr;
  gap: 20px;
  padding: 14px 20px;
  border-radius: 12px;
  font-size: 15px;
  margin-bottom: 4px;
}
.row.head {
  background: var(--cyan);
  color: var(--dark);
  font-weight: 700;
  font-size: 13px;
  letter-spacing: 1px;
  text-transform: uppercase;
}
.row:not(.head) { background: rgba(255,255,255,0.03); border: 1px solid rgba(255,255,255,0.06); }
.row:not(.head):nth-child(even) { background: rgba(255,255,255,0.06); }
.tag { font-weight: 700; font-size: 12px; letter-spacing: 1px; }
.tag.c { color: var(--cyan); }
.tag.o { color: var(--orange); }
.tag.p { color: var(--purple); }

/* ============ RULES ============ */
.rules .sticky { background: var(--darker); }
.rules-grid {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 16px;
  margin-top: 50px;
}
.rule {
  background: rgba(255,255,255,0.03);
  border: 1px solid rgba(255,255,255,0.08);
  border-radius: 16px;
  overflow: hidden;
  backdrop-filter: blur(10px);
  transition: transform 0.3s;
}
.rule:hover { transform: translateY(-6px); }
.rule-h {
  background: var(--c);
  color: var(--dark);
  padding: 14px 16px;
  font-weight: 800;
  font-size: 12px;
  text-align: center;
  letter-spacing: 1px;
  line-height: 1.2;
}
.rule p { padding: 20px; font-size: 14px; color: var(--lgray); }
.rules-end {
  text-align: center;
  margin-top: 60px;
  font-size: clamp(22px, 2.5vw, 36px);
  color: var(--cyan);
  font-weight: 300;
  letter-spacing: 4px;
}

/* ============ AI CHAT ============ */
.aichat .sticky { background: linear-gradient(180deg, var(--darker) 0%, #120a20 100%); }
.chat-wrap {
  max-width: 1000px;
  margin: 40px auto 0;
  background: rgba(255,255,255,0.03);
  border: 1px solid rgba(255,255,255,0.08);
  border-radius: 20px;
  overflow: hidden;
  backdrop-filter: blur(20px);
}
.chat-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 16px 22px;
  background: rgba(0,185,255,0.06);
  border-bottom: 1px solid rgba(0,185,255,0.15);
}
.chat-head .dot {
  width: 8px; height: 8px; border-radius: 50%;
  background: #0f0; box-shadow: 0 0 10px #0f0;
  display: inline-block; margin-right: 8px;
  animation: pulse 2s infinite;
}
.chat-head .dot.off { background: #f55; box-shadow: none; animation: none; }
@keyframes pulse { 0%,100%{opacity:1;} 50%{opacity:0.4;} }
.chat-head button.settings {
  background: transparent;
  border: 1px solid rgba(255,255,255,0.15);
  color: var(--lgray);
  padding: 6px 14px;
  border-radius: 100px;
  cursor: pointer;
  font-size: 12px;
  font-family: inherit;
}
.chat-body {
  height: 320px;
  overflow-y: auto;
  padding: 20px 22px;
  display: flex;
  flex-direction: column;
  gap: 12px;
}
.chat-body::-webkit-scrollbar { width: 6px; }
.chat-body::-webkit-scrollbar-thumb { background: rgba(255,255,255,0.1); border-radius: 3px; }
.msg {
  max-width: 80%;
  padding: 12px 16px;
  border-radius: 14px;
  font-size: 14px;
  line-height: 1.5;
  white-space: pre-wrap;
}
.msg.user { align-self: flex-end; background: var(--cyan); color: var(--dark); border-bottom-right-radius: 4px; }
.msg.bot { align-self: flex-start; background: rgba(255,255,255,0.06); border: 1px solid rgba(255,255,255,0.08); border-bottom-left-radius: 4px; }
.msg.system { align-self: center; background: rgba(255,200,61,0.1); border: 1px solid rgba(255,200,61,0.25); color: var(--yellow); font-size: 12px; padding: 8px 14px; }
.msg.typing::after { content: "▋"; animation: blink 1s infinite; color: var(--cyan); }
@keyframes blink { 50% { opacity: 0; } }

.chat-input {
  display: flex;
  gap: 10px;
  padding: 14px 18px;
  border-top: 1px solid rgba(255,255,255,0.08);
  background: rgba(0,0,0,0.2);
}
.chat-input textarea {
  flex: 1;
  background: rgba(255,255,255,0.04);
  border: 1px solid rgba(255,255,255,0.1);
  border-radius: 12px;
  padding: 12px 14px;
  color: var(--white);
  font-family: inherit;
  font-size: 14px;
  resize: none;
  min-height: 46px;
  max-height: 120px;
}
.chat-input textarea:focus {
  outline: none;
  border-color: var(--cyan);
}
.chat-input button {
  background: var(--cyan);
  color: var(--dark);
  border: none;
  padding: 0 22px;
  border-radius: 12px;
  font-weight: 700;
  cursor: pointer;
  font-family: inherit;
}
.chat-presets {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  padding: 12px 18px 16px;
}
.preset-btn {
  background: rgba(255,255,255,0.04);
  border: 1px solid rgba(255,255,255,0.12);
  color: var(--lgray);
  padding: 8px 14px;
  border-radius: 100px;
  font-size: 12px;
  cursor: pointer;
  font-family: inherit;
  transition: all 0.2s;
}
.preset-btn:hover { background: var(--cyan); color: var(--dark); border-color: var(--cyan); }

.settings-panel {
  padding: 14px 22px;
  background: rgba(0,0,0,0.3);
  border-bottom: 1px solid rgba(255,255,255,0.08);
  display: none;
}
.settings-panel.open { display: block; }
.settings-panel label { display: block; font-size: 12px; color: var(--lgray); margin-bottom: 6px; letter-spacing: 0.5px; }
.settings-panel input {
  width: 100%;
  background: rgba(0,0,0,0.4);
  border: 1px solid rgba(255,255,255,0.1);
  color: var(--white);
  padding: 10px 14px;
  border-radius: 8px;
  font-family: monospace;
  font-size: 12px;
}
.settings-panel select {
  width: 100%;
  background: rgba(0,0,0,0.4);
  border: 1px solid rgba(255,255,255,0.1);
  color: var(--white);
  padding: 10px 14px;
  border-radius: 8px;
  font-family: inherit;
  font-size: 13px;
  margin-top: 8px;
}
.settings-panel .help {
  font-size: 11px;
  color: var(--mgray);
  margin-top: 8px;
  line-height: 1.5;
}
.settings-panel a { color: var(--cyan); }

/* ============ CR DEMO ============ */
.crdemo .sticky { background: linear-gradient(180deg, #120a20 0%, var(--darker) 100%); }
.cr-wrap {
  max-width: 1100px;
  margin: 40px auto 0;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 20px;
}
.cr-box {
  background: rgba(255,255,255,0.03);
  border: 1px solid rgba(255,255,255,0.08);
  border-radius: 16px;
  padding: 20px;
  display: flex;
  flex-direction: column;
  min-height: 380px;
}
.cr-box h3 { font-size: 16px; color: var(--cyan); margin-bottom: 10px; letter-spacing: 1px; text-transform: uppercase; }
.cr-box.out h3 { color: var(--teal); }
.cr-box textarea {
  flex: 1;
  background: rgba(0,0,0,0.3);
  border: 1px solid rgba(255,255,255,0.1);
  border-radius: 10px;
  padding: 14px;
  color: var(--white);
  font-family: inherit;
  font-size: 13px;
  resize: none;
  margin-bottom: 12px;
}
.cr-box textarea:focus { outline: none; border-color: var(--cyan); }
.cr-output {
  flex: 1;
  background: rgba(0,0,0,0.3);
  border: 1px solid rgba(27,154,134,0.25);
  border-radius: 10px;
  padding: 14px;
  color: var(--white);
  font-size: 13px;
  overflow-y: auto;
  white-space: pre-wrap;
  line-height: 1.6;
  margin-bottom: 12px;
}
.cr-output.empty { color: var(--mgray); font-style: italic; display: flex; align-items: center; justify-content: center; }
.cr-actions { display: flex; gap: 10px; justify-content: space-between; align-items: center; }
.cr-sample {
  font-size: 11px;
  color: var(--cyan);
  background: none;
  border: none;
  cursor: pointer;
  text-decoration: underline;
  font-family: inherit;
}
.cr-run {
  background: linear-gradient(135deg, var(--purple), var(--pink));
  color: var(--white);
  border: none;
  padding: 12px 26px;
  border-radius: 100px;
  font-weight: 700;
  cursor: pointer;
  font-family: inherit;
  font-size: 14px;
}
.cr-run:disabled { opacity: 0.5; cursor: not-allowed; }

/* ============ MAGELLAN CTA ============ */
.magellan .sticky { background: radial-gradient(ellipse at center, #0a1830 0%, var(--darker) 70%); }
.magellan-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
  margin-top: 60px;
  max-width: 1200px;
}
.mag-card {
  position: relative;
  background: rgba(255,255,255,0.03);
  border: 1px solid rgba(255,255,255,0.1);
  border-radius: 24px;
  padding: 40px 32px;
  text-decoration: none;
  color: var(--white);
  overflow: hidden;
  transition: all 0.3s cubic-bezier(.4,0,.2,1);
  display: block;
  cursor: pointer;
}
.mag-card::before {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(135deg, var(--c), transparent);
  opacity: 0;
  transition: opacity 0.3s;
}
.mag-card:hover {
  transform: translateY(-8px);
  border-color: var(--c);
  box-shadow: 0 30px 60px rgba(0,185,255,0.15);
}
.mag-card:hover::before { opacity: 0.12; }
.mag-tag {
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 2px;
  color: var(--c);
  margin-bottom: 14px;
  position: relative;
}
.mag-card h3 {
  font-size: 32px;
  margin-bottom: 10px;
  position: relative;
}
.mag-card .mag-sub {
  color: var(--lgray);
  font-size: 15px;
  margin-bottom: 22px;
  position: relative;
}
.mag-card ul {
  list-style: none;
  margin-bottom: 26px;
  position: relative;
}
.mag-card li {
  color: var(--lgray);
  font-size: 13px;
  padding: 3px 0 3px 18px;
  position: relative;
}
.mag-card li::before {
  content: "•";
  position: absolute;
  left: 4px;
  color: var(--c);
}
.mag-cta {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: var(--c);
  font-weight: 700;
  font-size: 14px;
  transition: gap 0.2s;
  position: relative;
}
.mag-card:hover .mag-cta { gap: 14px; }
.mag-cta::after {
  content: "→";
  font-size: 18px;
}

/* ============ COMMITS ============ */
.commits .sticky { background: var(--darker); }
.commit-ui { max-width: 900px; margin-top: 40px; }
.commit-ui form {
  display: flex;
  gap: 12px;
  margin-bottom: 30px;
}
.commit-ui input {
  flex: 1;
  background: rgba(255,255,255,0.04);
  border: 1px solid rgba(255,255,255,0.1);
  border-radius: 100px;
  padding: 16px 24px;
  color: var(--white);
  font-size: 15px;
  font-family: inherit;
}
.commit-ui input:focus { outline: none; border-color: var(--cyan); box-shadow: 0 0 0 4px var(--ring); }
#commitWall {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
  gap: 16px;
  min-height: 140px;
}
.commit {
  background: linear-gradient(135deg, #FFE88A, #FFC83D);
  color: #3a2a00;
  padding: 18px 20px;
  border-radius: 6px;
  font-size: 14px;
  font-weight: 500;
  box-shadow: 0 10px 25px rgba(0,0,0,0.4);
  transform: rotate(var(--r, 0deg));
  animation: stick 0.5s cubic-bezier(.17,.67,.35,1.4);
  line-height: 1.4;
  cursor: pointer;
  transition: transform 0.2s;
}
.commit:hover { transform: rotate(0) scale(1.04); }
@keyframes stick { from { opacity:0; transform: rotate(var(--r, 0deg)) translateY(-30px) scale(0.8); } to { opacity:1; } }

/* ============ END ============ */
.end .sticky { background: radial-gradient(ellipse at center, #0a1830 0%, var(--darker) 70%); }
.end-content { text-align: center; padding: 0 40px; max-width: 900px; }
h1.huge {
  background: linear-gradient(180deg, var(--cyan), var(--purple));
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  font-weight: 900;
}
.end-sub { font-size: clamp(20px, 2vw, 28px); color: var(--lgray); margin: 30px 0 60px; }
.end-next {
  background: rgba(255,255,255,0.04);
  border: 1px solid rgba(255,107,53,0.3);
  border-radius: 20px;
  padding: 28px;
  text-align: left;
  max-width: 600px;
  margin: 0 auto;
}
.en-tag { color: var(--orange); font-size: 11px; font-weight: 700; letter-spacing: 2px; margin-bottom: 10px; }
.end-next h3 { font-size: 22px; margin-bottom: 10px; }
.end-next p { color: var(--lgray); font-size: 14px; }
.sig { margin-top: 80px; color: var(--mgray); font-size: 13px; }

/* ============ RESPONSIVE ============ */
@media (max-width: 900px) {
  .container { padding: 60px 24px; }
  .ingredients { grid-template-columns: repeat(2,1fr); }
  .rules-grid { grid-template-columns: repeat(2,1fr); }
  .magellan-grid { grid-template-columns: 1fr; }
  .pillar-slot { position: relative; width: 100%; }
  .pillar-slot.right { top: 0; margin-top: 30px; }
  .big-num { font-size: 100px; }
  .cr-wrap { grid-template-columns: 1fr; }
  .h-card { flex: 0 0 85vw; padding: 28px; }
}

/* ==========================================================================
   SESSION PANEL + MODALS (ajoutés pour mode multi-device)
   ========================================================================== */
.session-panel {
  position: fixed;
  top: 58px;
  left: 20px;
  z-index: 140;
  background: rgba(14,21,24,0.85);
  backdrop-filter: blur(14px);
  border: 1px solid rgba(0,185,255,0.25);
  border-radius: 14px;
  padding: 14px 16px;
  max-width: 260px;
  font-size: 12px;
  box-shadow: 0 20px 40px rgba(0,0,0,0.4);
}
.sp-label {
  color: var(--cyan);
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 2px;
  margin-bottom: 6px;
}
.sp-code {
  font-family: "SF Mono","Menlo",monospace;
  font-size: 22px;
  font-weight: 800;
  color: var(--white);
  letter-spacing: 4px;
  margin-bottom: 6px;
}
.sp-title { color: var(--lgray); font-size: 12px; margin-bottom: 12px; line-height: 1.3; }
.sp-hint { color: var(--lgray); font-size: 11px; margin-bottom: 10px; line-height: 1.4; }
.sp-error { color: var(--pink); font-size: 12px; margin-bottom: 10px; }
.sp-actions { display: flex; gap: 6px; }
.sp-btn {
  background: var(--cyan);
  color: var(--dark);
  border: none;
  padding: 7px 12px;
  border-radius: 20px;
  font-weight: 600;
  font-size: 11px;
  cursor: pointer;
  font-family: inherit;
  letter-spacing: 0.2px;
  flex: 1;
}
.sp-btn:hover { background: #33c7ff; }
.sp-btn.ghost {
  background: transparent;
  border: 1px solid rgba(255,255,255,0.2);
  color: var(--lgray);
}
.sp-btn.ghost:hover { background: rgba(255,255,255,0.05); color: var(--white); }

/* Modals */
.modal {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.7);
  backdrop-filter: blur(8px);
  z-index: 300;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
}
.modal.hidden { display: none; }
.modal-card {
  background: #0a1420;
  border: 1px solid rgba(0,185,255,0.3);
  border-radius: 18px;
  padding: 32px 36px;
  max-width: 480px;
  width: 100%;
  box-shadow: 0 40px 80px rgba(0,0,0,0.6);
}
.modal-card h3 {
  color: var(--white);
  font-size: 22px;
  margin-bottom: 10px;
}
.modal-card h3 span {
  color: var(--cyan);
  font-family: "SF Mono","Menlo",monospace;
  letter-spacing: 4px;
  margin-left: 8px;
}
.modal-sub {
  color: var(--lgray);
  font-size: 13px;
  margin-bottom: 20px;
  line-height: 1.5;
}
.modal-card label {
  display: block;
  color: var(--cyan);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 1px;
  margin-bottom: 8px;
}
.modal-card input {
  width: 100%;
  background: rgba(0,0,0,0.4);
  border: 1px solid rgba(255,255,255,0.15);
  color: var(--white);
  padding: 12px 16px;
  border-radius: 10px;
  font-size: 15px;
  font-family: inherit;
  margin-bottom: 18px;
}
.modal-card input:focus {
  outline: none;
  border-color: var(--cyan);
  box-shadow: 0 0 0 3px rgba(0,185,255,0.2);
}
.modal-actions {
  display: flex;
  gap: 10px;
  justify-content: flex-end;
  margin-top: 20px;
}
.btn-primary {
  background: var(--cyan);
  color: var(--dark);
  border: none;
  padding: 10px 22px;
  border-radius: 100px;
  font-weight: 700;
  cursor: pointer;
  font-family: inherit;
  font-size: 13px;
}
.btn-primary:hover { background: #33c7ff; }
.btn-primary:disabled { opacity: 0.6; cursor: not-allowed; }
.btn-ghost {
  background: transparent;
  border: 1px solid rgba(255,255,255,0.2);
  color: var(--lgray);
  padding: 10px 22px;
  border-radius: 100px;
  font-weight: 600;
  cursor: pointer;
  font-family: inherit;
  font-size: 13px;
}

.qr-card { text-align: center; max-width: 400px; }
.qr-wrap {
  background: white;
  padding: 14px;
  border-radius: 12px;
  display: inline-block;
  margin: 18px 0 12px;
}
.qr-url {
  color: var(--cyan);
  font-family: "SF Mono",monospace;
  font-size: 13px;
  word-break: break-all;
  margin-bottom: 12px;
}
.qr-hint { color: var(--lgray); font-size: 12px; margin-bottom: 20px; }

/* Poll UI dans le parallax */
.poll-ui {
  margin-top: 50px;
  max-width: 900px;
}
.poll-opts {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-bottom: 24px;
}
.poll-btn {
  background: rgba(255,255,255,0.04);
  border: 1px solid rgba(255,255,255,0.12);
  color: var(--white);
  padding: 12px 22px;
  border-radius: 100px;
  font-size: 14px;
  cursor: pointer;
  font-family: inherit;
  transition: all 0.2s;
}
.poll-btn:hover { background: rgba(0,185,255,0.15); border-color: var(--cyan); }
.poll-btn.voted {
  background: var(--cyan);
  color: var(--dark);
  border-color: var(--cyan);
  font-weight: 700;
}
.poll-bar {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 8px 0;
  font-size: 14px;
}
.poll-bar-label { min-width: 180px; color: var(--lgray); }
.poll-bar-track {
  flex: 1;
  height: 24px;
  background: rgba(255,255,255,0.05);
  border-radius: 4px;
  overflow: hidden;
}
.poll-bar-fill {
  height: 100%;
  background: linear-gradient(90deg, var(--cyan), var(--purple));
  transition: width 0.6s ease;
  display: flex;
  align-items: center;
  justify-content: flex-end;
  padding-right: 10px;
  color: var(--dark);
  font-weight: 800;
  font-size: 12px;
  min-width: 4px;
}
.poll-bar-count {
  min-width: 40px;
  text-align: right;
  color: var(--white);
  font-weight: 700;
  font-variant-numeric: tabular-nums;
}

@media (max-width: 900px) {
  .session-panel { left: 12px; right: 12px; max-width: none; top: 52px; }
}

/* ==========================================================================
   AUTOPILOTE — Mode démo autonome
   ========================================================================== */
html.ap-on { overflow: hidden; }
.autopilot {
  position: fixed;
  inset: 0;
  z-index: 500;
  background: radial-gradient(ellipse at top, #0a1530 0%, #050810 60%, #000 100%);
  display: none;
  flex-direction: column;
  color: var(--white);
  font-family: "Aptos","SF Pro Display",system-ui,sans-serif;
}
.autopilot.active { display: flex; animation: apFadeIn 0.4s ease; }
@keyframes apFadeIn { from { opacity: 0; } to { opacity: 1; } }

/* Top bar */
.ap-top {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 18px 28px;
  border-bottom: 1px solid rgba(255,255,255,0.05);
  flex-shrink: 0;
}
.ap-brand {
  display: flex;
  align-items: center;
  gap: 16px;
  font-size: 12px;
  letter-spacing: 1px;
}
.ap-live {
  color: var(--cyan);
  font-weight: 700;
  animation: apPulse 2s infinite;
}
@keyframes apPulse { 0%,100% { opacity: 1; } 50% { opacity: 0.5; } }
.ap-chap { color: var(--mgray); }
.ap-controls { display: flex; gap: 6px; }
.ap-controls button {
  width: 36px; height: 36px;
  border-radius: 50%;
  background: rgba(255,255,255,0.05);
  border: 1px solid rgba(255,255,255,0.1);
  color: var(--lgray);
  cursor: pointer;
  font-size: 14px;
  font-family: inherit;
  transition: all 0.2s;
}
.ap-controls button:hover { background: var(--cyan); color: var(--dark); border-color: var(--cyan); }

/* Stage */
.ap-stage {
  flex: 1;
  overflow: auto;
  padding: 40px 60px;
  display: flex;
  align-items: center;
  justify-content: center;
}
.ap-fade-in { animation: apFadeInSlow 0.6s ease; }
@keyframes apFadeInSlow {
  from { opacity: 0; transform: translateY(12px); }
  to { opacity: 1; transform: translateY(0); }
}

/* Bottom bar (progress + steps) */
.ap-bottom {
  flex-shrink: 0;
  padding: 16px 28px 22px;
  border-top: 1px solid rgba(255,255,255,0.05);
}
.ap-progress {
  height: 3px;
  background: rgba(255,255,255,0.06);
  border-radius: 2px;
  overflow: hidden;
  margin-bottom: 14px;
}
.ap-progress-fill {
  height: 100%;
  background: linear-gradient(90deg, var(--cyan), var(--purple));
  width: 0%;
  transition: width 0.4s ease;
}
.ap-steps {
  display: flex;
  gap: 8px;
  justify-content: center;
}
.ap-step {
  width: 28px; height: 28px;
  border-radius: 50%;
  background: rgba(255,255,255,0.05);
  border: 1px solid rgba(255,255,255,0.1);
  color: var(--mgray);
  font-size: 11px;
  font-weight: 700;
  display: flex;
  align-items: center;
  justify-content: center;
}
.ap-step.current {
  background: var(--cyan);
  color: var(--dark);
  border-color: var(--cyan);
  transform: scale(1.1);
}
.ap-step.done {
  background: rgba(0,185,255,0.15);
  color: var(--cyan);
  border-color: var(--cyan);
}

/* ---------- INTRO / OUTRO ---------- */
.ap-intro {
  text-align: center;
  max-width: 900px;
}
.ap-intro-eyebrow {
  color: var(--cyan);
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 4px;
  margin-bottom: 30px;
}
.ap-intro-big {
  font-size: clamp(48px, 8vw, 110px);
  font-weight: 800;
  line-height: 1;
  margin-bottom: 20px;
  background: linear-gradient(180deg, #fff, #7eb8e0);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  letter-spacing: -0.02em;
}
.ap-intro-sub {
  font-size: clamp(20px, 2.5vw, 34px);
  color: var(--lgray);
  margin-bottom: 40px;
  font-weight: 300;
}
.ap-intro-foot {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  color: var(--cyan);
  font-size: 13px;
  letter-spacing: 1px;
  border: 1px solid rgba(0,185,255,0.3);
  padding: 10px 20px;
  border-radius: 100px;
}
.ap-dot {
  width: 8px; height: 8px; border-radius: 50%;
  background: var(--cyan);
  box-shadow: 0 0 12px var(--cyan);
  animation: apPulse 1.6s infinite;
}
.ap-intro-stats {
  display: flex;
  justify-content: center;
  gap: 50px;
  margin: 40px 0 30px;
}
.ap-intro-stats > div { text-align: center; }
.ap-intro-stats .n {
  font-size: 42px;
  font-weight: 800;
  color: var(--cyan);
}
.ap-intro-stats .l {
  font-size: 11px;
  color: var(--mgray);
  letter-spacing: 1px;
  margin-top: 4px;
  max-width: 120px;
}
.ap-cta {
  font-size: 18px;
  color: var(--white);
  font-weight: 600;
  margin-top: 20px;
}

/* ---------- DEMO LAYOUT ---------- */
.ap-demo { width: 100%; max-width: 1400px; }
.ap-demo-head { margin-bottom: 24px; }
.ap-chapter {
  color: var(--cyan);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 2.5px;
  margin-bottom: 8px;
}
.ap-demo h2 {
  font-size: clamp(32px, 4.5vw, 56px);
  line-height: 1.05;
  font-weight: 700;
  margin-bottom: 10px;
  letter-spacing: -0.01em;
}
.ap-lead {
  color: var(--lgray);
  font-size: 17px;
  max-width: 800px;
}

.ap-2col {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 20px;
  margin-top: 20px;
}
.ap-col { display: flex; flex-direction: column; gap: 12px; }
.ap-label {
  color: var(--cyan);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 1.5px;
  margin-top: 10px;
}
.ap-box {
  background: rgba(255,255,255,0.03);
  border: 1px solid rgba(255,255,255,0.08);
  border-radius: 12px;
  padding: 16px 18px;
  font-size: 14px;
  line-height: 1.55;
  min-height: 60px;
  white-space: pre-wrap;
  font-family: inherit;
  color: var(--white);
  transition: border-color 0.3s;
}
.ap-box.small-text { font-size: 12px; line-height: 1.5; }
.ap-input-box { border-color: rgba(255,200,61,0.25); }
.ap-prompt {
  border-color: rgba(147,105,247,0.3);
  background: rgba(147,105,247,0.04);
  color: var(--lgray);
  font-style: italic;
}
.ap-output {
  border-color: rgba(27,154,134,0.3);
  background: rgba(27,154,134,0.04);
  min-height: 300px;
  overflow: auto;
  max-height: 500px;
}
.ap-code {
  font-family: "SF Mono","Menlo","Consolas",monospace;
  font-size: 11px;
  line-height: 1.4;
  color: #9ff;
  background: #000;
  border-color: rgba(0,185,255,0.2);
  max-height: 260px;
  overflow: auto;
}
.ap-loading { color: var(--mgray); font-style: italic; }

/* ---------- LANGUES ---------- */
.ap-grid-langs {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 14px;
  margin-top: 24px;
}
.ap-lang {
  background: rgba(255,255,255,0.03);
  border: 1px solid rgba(255,255,255,0.08);
  border-radius: 12px;
  padding: 16px;
  min-height: 90px;
}
.ap-flag { font-size: 26px; margin-bottom: 4px; }
.ap-lang-name {
  color: var(--cyan);
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 1.5px;
  margin-bottom: 8px;
}
.ap-lang-text { color: var(--white); font-size: 13px; line-height: 1.4; }

/* ---------- TABLE (extract) ---------- */
.ap-table-wrap {
  padding: 8px;
  background: rgba(0,0,0,0.3);
  overflow: auto;
  max-height: 500px;
}
.ap-table { width: 100%; border-collapse: collapse; font-size: 13px; }
.ap-table tr { border-bottom: 1px solid rgba(255,255,255,0.05); }
.ap-table tr:last-child { border-bottom: 0; }
.ap-table td { padding: 10px 14px; vertical-align: top; }
.ap-table td.ap-k {
  color: var(--cyan);
  font-weight: 700;
  font-size: 11px;
  letter-spacing: 1px;
  text-transform: uppercase;
  width: 40%;
  white-space: nowrap;
}
.ap-table td.ap-v { color: var(--white); white-space: pre-wrap; line-height: 1.5; }

/* ---------- SANDBOX IFRAME ---------- */
.ap-sandbox {
  border: 1px solid var(--cyan);
  border-radius: 12px;
  overflow: hidden;
  background: var(--darker);
  min-height: 400px;
  max-height: 500px;
  box-shadow: 0 20px 50px rgba(0,185,255,0.15);
}
.ap-sandbox iframe {
  width: 100%;
  height: 500px;
  border: 0;
  background: white;
}

/* ---------- USECASES MATRIX ---------- */
.ap-matrix {
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin-top: 20px;
  min-height: 300px;
}
.ap-usecase {
  background: rgba(255,255,255,0.03);
  border: 1px solid rgba(255,255,255,0.08);
  border-radius: 12px;
  padding: 16px 20px;
}
.ap-uc-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 16px;
  margin-bottom: 6px;
}
.ap-uc-name { font-size: 17px; font-weight: 700; color: var(--white); }
.ap-uc-chips { display: flex; gap: 6px; flex-shrink: 0; }
.ap-chip {
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 1px;
  padding: 4px 10px;
  border-radius: 20px;
  text-transform: uppercase;
}
.effort-faible, .impact-élevé { background: rgba(27,154,134,0.2); color: var(--teal); }
.effort-moyen, .impact-moyen { background: rgba(255,200,61,0.15); color: var(--yellow); }
.effort-élevé, .impact-faible { background: rgba(226,37,91,0.15); color: var(--pink); }
.ap-uc-why { color: var(--lgray); font-size: 13px; line-height: 1.5; }

@media (max-width: 900px) {
  .ap-2col { grid-template-columns: 1fr; }
  .ap-grid-langs { grid-template-columns: 1fr 1fr; }
  .ap-stage { padding: 20px; }
}

/* ==========================================================================
   FOND GLOBAL UNIFIÉ — pour la fluidité du parallax
   Toutes les sections partagent le même canevas de fond.
   ========================================================================== */

/* Neutralise les fonds individuels de chaque stage */
.hero .sticky,
.pillars .sticky,
.recipe .sticky,
.horiz .sticky,
.deepbg .sticky,
.rules .sticky,
.aichat .sticky,
.crdemo .sticky,
.magellan .sticky,
.commits .sticky,
.end .sticky {
  background: transparent !important;
}

/* Body devient très sombre uniforme */
body { background: var(--darker); }

/* Canvas de fond global, fixé derrière tout */
#bgCanvas {
  position: fixed;
  inset: 0;
  z-index: -1;
  overflow: hidden;
  pointer-events: none;
  background: radial-gradient(ellipse at 50% 30%, #0a1428 0%, #060a10 50%, #020406 100%);
}

/* Glows colorés pilotés par le scroll (JS) + respiration via sin du temps.
   Sensation : on traverse cet univers à 3 halos, on ne les regarde pas flotter. */
.bg-glow {
  position: absolute;
  border-radius: 50%;
  filter: blur(120px);
  will-change: transform, opacity;
  transition: none;
}
.bg-g1 {
  width: 720px; height: 720px;
  top: 0; left: 0;
  background: var(--cyan);
  opacity: 0.30;
}
.bg-g2 {
  width: 820px; height: 820px;
  top: 0; left: 0;
  background: var(--purple);
  opacity: 0.24;
}
.bg-g3 {
  width: 520px; height: 520px;
  top: 0; left: 0;
  background: var(--orange);
  opacity: 0.12;
}

/* Grille discrète pour ajouter de la texture uniforme */
.bg-grid {
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(rgba(255,255,255,0.015) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255,255,255,0.015) 1px, transparent 1px);
  background-size: 60px 60px;
  mask-image: radial-gradient(ellipse at center, black 30%, transparent 80%);
  -webkit-mask-image: radial-gradient(ellipse at center, black 30%, transparent 80%);
}

/* Renforce la lisibilité des cartes sur le fond translucide en augmentant
   un peu leur opacité native (legacy cards avec background navy) */
.pillar-card, .ap-box { backdrop-filter: blur(20px) saturate(1.1); }

/* ==========================================================================
   ANCRES + NAV MENU
   ========================================================================== */
html { scroll-behavior: smooth; }
/* Quand on clique une ancre, décaler un peu pour ne pas coller à la nav */
.stage { scroll-margin-top: 48px; }

/* Brand comme lien */
#topnav .brand {
  color: var(--cyan);
  font-weight: 600;
  letter-spacing: 0.5px;
  text-decoration: none;
  pointer-events: auto;
  transition: opacity 0.2s;
}
#topnav .brand:hover { opacity: 0.75; }

/* Label chapitre maintenant bouton cliquable */
button.chapter {
  background: rgba(14,21,24,0.8);
  backdrop-filter: blur(10px);
  border: 1px solid rgba(255,255,255,0.08);
  color: var(--lgray);
  padding: 6px 14px;
  border-radius: 20px;
  font-size: 12px;
  font-family: inherit;
  cursor: pointer;
  letter-spacing: 0.5px;
  pointer-events: auto;
  transition: all 0.2s;
}
button.chapter:hover {
  background: var(--cyan);
  color: var(--dark);
  border-color: var(--cyan);
}

/* Menu déroulant (plan du site) */
.chapter-menu {
  position: fixed;
  top: 48px;
  right: 24px;
  background: rgba(10,20,30,0.95);
  backdrop-filter: blur(20px);
  border: 1px solid rgba(0,185,255,0.25);
  border-radius: 14px;
  padding: 10px;
  min-width: 240px;
  max-height: 70vh;
  overflow-y: auto;
  display: none;
  flex-direction: column;
  gap: 2px;
  z-index: 160;
  box-shadow: 0 30px 60px rgba(0,0,0,0.5);
  pointer-events: auto;
}
.chapter-menu.open { display: flex; animation: chmFade 0.2s ease; }
@keyframes chmFade {
  from { opacity: 0; transform: translateY(-6px); }
  to { opacity: 1; transform: translateY(0); }
}
.chapter-menu a {
  color: var(--lgray);
  text-decoration: none;
  padding: 9px 14px;
  border-radius: 8px;
  font-size: 13px;
  transition: all 0.15s;
  letter-spacing: 0.2px;
}
.chapter-menu a:hover {
  background: rgba(0,185,255,0.12);
  color: var(--white);
  padding-left: 18px;
}
.chapter-menu a.current {
  background: var(--cyan);
  color: var(--dark);
  font-weight: 600;
}

/* ==========================================================================

/* ==========================================================================
   TOUR DES 3 APPS — mockups fidèles aux vraies plateformes
   ========================================================================== */
.apps-container {
  margin-top: 40px;
  max-width: 1400px;
}
.apps-tabs {
  display: flex;
  gap: 12px;
  margin-bottom: 20px;
  flex-wrap: wrap;
}
.apps-tab {
  background: rgba(255,255,255,0.03);
  border: 1px solid rgba(255,255,255,0.1);
  border-radius: 14px;
  padding: 14px 22px 14px 16px;
  color: var(--lgray);
  cursor: pointer;
  font-family: inherit;
  text-align: left;
  display: flex;
  align-items: center;
  gap: 14px;
  transition: all 0.25s;
  flex: 1;
  min-width: 220px;
}
.apps-tab:hover { background: rgba(0,185,255,0.08); border-color: rgba(0,185,255,0.3); }
.apps-tab.active {
  background: rgba(0,185,255,0.14);
  border-color: var(--cyan);
  color: var(--white);
}
.apps-tab-logo {
  width: 42px; height: 42px;
  border-radius: 12px;
  font-weight: 800;
  font-size: 22px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: "Aptos Display", sans-serif;
  flex-shrink: 0;
  color: #fff;
}
.mgpt-logo { background: #e94e5e; color:#fff; }
.diane-logo { background: linear-gradient(135deg, #3da4ff, #7fc8ff); color:#fff; }
.magents-logo { background: linear-gradient(135deg, #9369F7, #ff6bb5, #62d2ff); color:#fff; font-size:26px; }
.apps-tab-name { font-weight: 700; font-size: 15px; display: block; }
.apps-tab-sub { font-size: 11px; color: var(--mgray); display: block; margin-top: 2px; }
.apps-tab.active .apps-tab-sub { color: var(--lgray); }

.apps-mockup {
  background: #fff;
  border: 1px solid rgba(255,255,255,0.08);
  border-radius: 16px;
  overflow: hidden;
  min-height: 640px;
  display: none;
  box-shadow: 0 30px 60px rgba(0,0,0,0.35);
}
.apps-mockup.active { display: block; animation: appsFade 0.4s ease; }
@keyframes appsFade { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: translateY(0); } }

/* ==========================================================================
   M'GPT — thème clair, fond dégradé pâle, sidebar icon-only
   ========================================================================== */
.mgpt-chrome {
  display: grid;
  grid-template-columns: 56px 1fr;
  min-height: 640px;
  height: 640px;
  background: linear-gradient(135deg, #eef4f8 0%, #eaf0ed 100%);
  color: #222;
  position: relative;
}
.mgpt-sidebar {
  background: #fff;
  border-right: 1px solid rgba(0,0,0,0.05);
  display: flex;
  flex-direction: column;
  padding: 14px 0;
  justify-content: space-between;
  align-items: center;
}
.mgpt-sb-top, .mgpt-sb-bottom { display:flex; flex-direction:column; gap:4px; align-items:center; }
.mgpt-sb-icon {
  width: 36px; height: 36px;
  display: flex; align-items:center; justify-content:center;
  border-radius: 8px;
  color: #6e7a8a;
  font-size: 15px;
  cursor: pointer;
  transition: background 0.15s;
}
.mgpt-sb-icon:hover { background: rgba(0,0,0,0.04); color:#222; }
.mgpt-sb-icon.user {
  border: 1.5px solid #e94e5e;
  color: #e94e5e;
  border-radius: 50%;
  width: 34px; height: 34px;
}
.mgpt-sb-icon.active { background: rgba(233,78,94,0.08); color: #e94e5e; }
.mgpt-sb-logo {
  margin-top: 8px;
  font-family: "Aptos Display", sans-serif;
  font-size: 24px;
  font-weight: 800;
  color: #2fb0ff;
  letter-spacing: -0.04em;
}

.mgpt-main { position: relative; overflow: hidden; }
.mgpt-histo {
  position: absolute;
  top: 14px; right: 14px;
  background: #1b2539;
  color: #fff;
  border: none;
  padding: 9px 18px;
  border-radius: 100px;
  font-family: inherit;
  font-size: 12px;
  font-weight: 600;
  cursor: pointer;
  letter-spacing: 0.5px;
}

.mgpt-hero {
  height: 100%;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: flex-start;
  padding: 56px 50px 20px;
  gap: 16px;
  overflow-y: auto;
}
.mgpt-hello {
  font-family: "Aptos Display", sans-serif;
  font-size: 32px;
  font-weight: 600;
  color: #2a3244;
  letter-spacing: -0.01em;
}
.mgpt-hello .mgpt-accent { color: #e94e5e; }

.mgpt-inputbox {
  width: 100%;
  max-width: 940px;
  background: #fff;
  border: 2px solid #ffc9cf;
  border-radius: 16px;
  box-shadow: 0 4px 20px rgba(233,78,94,0.08);
  padding: 14px 18px;
  display: flex;
  flex-direction: column;
  gap: 10px;
  position: relative;
}
.mgpt-inputbox textarea {
  width: 100%;
  border: none;
  resize: none;
  font-family: inherit;
  font-size: 14px;
  color: #2a3244;
  background: transparent;
  outline: none;
  padding: 4px 0;
  line-height: 1.45;
  border-bottom: 1px solid rgba(0,0,0,0.08);
  padding-bottom: 8px;
}
.mgpt-inputbox textarea::placeholder { color: #9aa4b2; font-style: normal; }
.mgpt-inputbox-icons {
  position: absolute;
  top: 12px; right: 16px;
  display: flex;
  gap: 8px;
}
.mgpt-icon-btn {
  background: transparent;
  border: none;
  color: #9aa4b2;
  cursor: pointer;
  font-size: 15px;
}
.mgpt-inputbox-bottom {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}
.mgpt-assistant-slot { display: flex; gap: 6px; align-items: center; }
.mgpt-pick-assistant, .mgpt-mode-dropdown, .mgpt-anon {
  background: #fff;
  border: 1px solid #d8dde3;
  color: #2a3244;
  padding: 6px 14px;
  border-radius: 8px;
  font-family: inherit;
  font-size: 12px;
  cursor: pointer;
  transition: all 0.15s;
}
.mgpt-pick-assistant:hover, .mgpt-mode-dropdown:hover { background: #f5f7fa; border-color: #2fb0ff; color: #2fb0ff; }
.mgpt-anon { border-color: #2fb0ff; color: #2fb0ff; background: transparent; }
.mgpt-right-actions { margin-left: auto; display:flex; gap: 8px; align-items:center; }
.mgpt-send-arrow {
  width: 30px; height: 30px;
  border-radius: 50%;
  background: #9aa4b2;
  color: #fff;
  border: none;
  cursor: pointer;
  font-size: 14px;
}
.mgpt-assistant-chip {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: #1b2539;
  color: #fff;
  padding: 5px 10px;
  border-radius: 6px;
  font-size: 12px;
  font-weight: 600;
}
.mgpt-assistant-chip .close { cursor: pointer; opacity: 0.7; }
.mgpt-assistant-chip .public { background:rgba(255,255,255,0.15); padding:1px 6px; border-radius:4px; font-size:10px; }

.mgpt-disclaimer {
  font-size: 11px;
  color: #9aa4b2;
  margin-top: 2px;
  max-width: 940px;
  text-align: center;
}

.mgpt-chat-body {
  width: 100%;
  max-width: 940px;
  margin-top: 16px;
  display: flex;
  flex-direction: column;
  gap: 12px;
  overflow-y: auto;
  max-height: 260px;
}
.mgpt-msg {
  display: flex;
  flex-direction: column;
  gap: 4px;
  max-width: 85%;
}
.mgpt-msg.user { align-self: flex-end; }
.mgpt-msg-role { font-size: 10px; font-weight: 700; letter-spacing: 1.5px; text-transform: uppercase; color: #9aa4b2; }
.mgpt-msg-text {
  font-size: 14px; line-height: 1.55;
  background: #fff;
  border: 1px solid #e5e9ee;
  color: #2a3244;
  border-radius: 12px;
  padding: 12px 16px;
  white-space: pre-wrap;
}
.mgpt-msg.user .mgpt-msg-text { background: #1b2539; color: #fff; border-color: #1b2539; }
.mgpt-msg-text.typing::after { content: '▋'; color: #e94e5e; animation: blink 1s infinite; }

/* ---------- Modal M'GPT (Sélectionner un Assistant) ---------- */
.mgpt-modal {
  position: absolute;
  inset: 0;
  background: rgba(0,0,0,0.4);
  z-index: 50;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
}
.mgpt-modal[hidden] { display: none; }
.mgpt-modal-inner {
  background: #fff;
  border-radius: 12px;
  width: 100%;
  max-width: 900px;
  max-height: 520px;
  padding: 24px 28px;
  overflow-y: auto;
  position: relative;
  color: #2a3244;
}
.mgpt-modal-close {
  position: absolute; top: 14px; right: 14px;
  background: transparent; border: none;
  font-size: 22px; color: #9aa4b2; cursor: pointer;
}
.mgpt-modal h3 { font-size: 18px; margin-bottom: 4px; }
.mgpt-modal-sub { color: #6e7a8a; font-size: 13px; margin-bottom: 14px; }
.mgpt-modal-search {
  background: #f5f7fa; padding: 10px 14px; border-radius: 8px;
  color: #9aa4b2; font-size: 13px; margin-bottom: 8px;
}
.mgpt-modal-count { font-size: 12px; color: #6e7a8a; margin-bottom: 14px; }
.mgpt-modal-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(230px, 1fr));
  gap: 10px;
}
.mgpt-asst-card {
  background: #fff;
  border: 1px solid #e5e9ee;
  border-radius: 10px;
  padding: 14px 16px;
  cursor: pointer;
  transition: all 0.2s;
  position: relative;
  font-size: 12px;
}
.mgpt-asst-card:hover { border-color: #2fb0ff; box-shadow: 0 6px 16px rgba(47,176,255,0.15); }
.mgpt-asst-card .asst-name { font-weight: 700; color: #2a3244; font-size: 13px; margin-bottom: 4px; padding-right: 54px; }
.mgpt-asst-card .asst-public {
  position: absolute; top: 12px; right: 12px;
  background: #c6a5ff; color: #fff;
  font-size: 9px; font-weight: 700; letter-spacing: 1px;
  padding: 3px 8px; border-radius: 10px;
}
.mgpt-asst-card .asst-desc { color: #6e7a8a; font-size: 11px; line-height: 1.4; margin-bottom: 8px; min-height: 28px; }
.mgpt-asst-card .asst-users { color: #9aa4b2; font-size: 10px; margin-bottom: 8px; }
.mgpt-asst-card .asst-select {
  display: block; text-align: center;
  background: #1b2539; color: #fff;
  padding: 6px 12px; border-radius: 6px;
  font-size: 10px; font-weight: 700; letter-spacing: 1px;
}

/* ==========================================================================
   DIAne — thème clair, sidebar large, tabs MODÈLE / CONSEILLER
   ========================================================================== */
.diane-chrome {
  display: grid;
  grid-template-columns: 220px 1fr;
  min-height: 640px;
  height: 640px;
  background: #fff;
  color: #2a3244;
}
.diane-sidebar {
  background: #fff;
  border-right: 1px solid #eef2f5;
  padding: 18px 14px;
  display: flex;
  flex-direction: column;
  gap: 8px;
  font-size: 13px;
}
.diane-brand {
  display: flex; align-items: center; gap: 10px;
  margin-bottom: 12px;
}
.diane-magellan-mark {
  width: 30px; height: 30px;
  background: linear-gradient(135deg, #3da4ff, #7fc8ff);
  color: #fff; font-weight: 800;
  border-radius: 6px;
  display: flex; align-items: center; justify-content: center;
  font-family: "Aptos Display", sans-serif;
  font-size: 14px;
}
.diane-brand-text {
  color: #3da4ff;
  font-weight: 700;
  font-size: 19px;
  font-family: "Aptos Display", sans-serif;
}
.diane-new-chat {
  background: #9fd1ff;
  color: #fff;
  border: none;
  padding: 9px 14px;
  border-radius: 8px;
  font-family: inherit;
  font-weight: 700;
  font-size: 13px;
  cursor: pointer;
  transition: background 0.15s;
}
.diane-new-chat:hover { background: #77c0ff; }
.diane-counselors {
  background: #eef3f7;
  color: #2a3244;
  border: none;
  padding: 9px 14px;
  border-radius: 8px;
  font-family: inherit;
  font-weight: 600;
  font-size: 13px;
  cursor: pointer;
  text-align: left;
}
.diane-sb-section {
  font-size: 10px;
  font-weight: 700;
  color: #9aa4b2;
  letter-spacing: 1.5px;
  margin: 14px 6px 6px;
}
.diane-history { list-style: none; }
.diane-history li {
  padding: 6px 8px;
  color: #6e7a8a;
  font-size: 12px;
  cursor: pointer;
  border-radius: 5px;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.diane-history li:hover { background: #f5f7fa; color: #2a3244; }
.diane-sb-spacer { flex: 1; }
.diane-sb-links { list-style: none; }
.diane-sb-links li {
  padding: 6px 8px; color: #6e7a8a; font-size: 12px; cursor: pointer;
}
.diane-profile {
  display: flex; align-items: center; gap: 10px;
  padding: 6px 8px;
  font-size: 13px;
  color: #2a3244;
}
.diane-avatar {
  width: 28px; height: 28px; border-radius: 50%;
  background: #eef3f7; color: #6e7a8a;
  display: flex; align-items: center; justify-content: center;
  font-size: 11px; font-weight: 700;
}

.diane-main {
  padding: 40px 60px 18px;
  display: flex;
  flex-direction: column;
  min-width: 0;
  position: relative;
}
.diane-title { font-size: 28px; font-weight: 700; color: #2a3244; margin-bottom: 6px; }
.diane-sub-title { color: #6e7a8a; font-size: 13px; margin-bottom: 22px; }
.diane-tabs {
  display: flex;
  border-bottom: 1px solid #eef2f5;
  margin-bottom: 20px;
}
.diane-tab {
  background: transparent;
  border: none;
  padding: 12px 26px;
  font-family: inherit;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 1.5px;
  color: #9aa4b2;
  cursor: pointer;
  position: relative;
}
.diane-tab.active { color: #3da4ff; }
.diane-tab.active::after {
  content: '';
  position: absolute;
  bottom: -1px; left: 0; right: 0;
  height: 2px;
  background: #3da4ff;
}
.diane-tab-pane { flex: 1; overflow-y: auto; min-height: 200px; }
.diane-search {
  background: #f5f7fa;
  padding: 10px 16px;
  border-radius: 8px;
  color: #9aa4b2;
  font-size: 13px;
  margin-bottom: 20px;
  text-align: right;
  max-width: 280px;
  margin-left: auto;
}

.diane-model-grid {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 24px 16px;
  background: #fff;
  padding: 28px 24px;
  border-radius: 12px;
  border: 1px solid #eef2f5;
}
.diane-model {
  display: flex; flex-direction: column; align-items: center;
  gap: 10px;
  padding: 14px 6px;
  border-radius: 8px;
  cursor: pointer;
  transition: all 0.2s;
  font-size: 12px;
  color: #2a3244;
  font-weight: 500;
  text-align: center;
}
.diane-model:hover { background: #eaf4ff; }
.diane-model.selected {
  background: #d6edff;
  outline: 2px solid #3da4ff;
}
.diane-model-ico {
  width: 40px; height: 40px;
  border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  color: #fff;
  font-size: 20px;
}
.diane-model-ico.gem {
  background: conic-gradient(from 0deg, #ec7460, #d76ac1, #7e67e3, #45a8ec, #4ecfb2, #ec7460);
  -webkit-mask: radial-gradient(circle at 50% 50%, transparent 25%, black 27%);
  mask: radial-gradient(circle at 50% 50%, transparent 25%, black 27%);
}
.diane-model-ico.gem::before { content: "✦"; position: absolute; color: transparent; }
.diane-model-ico.gem {
  background: linear-gradient(135deg, #4ac0ef 0%, #a071f2 50%, #ec7460 100%);
  position: relative;
}
.diane-model-ico.gem::after {
  content: "✦"; position: absolute;
  top: 50%; left: 50%; transform: translate(-50%,-50%);
  color: #fff; font-size: 22px; font-weight: 900;
  text-shadow: 0 0 6px rgba(0,0,0,0.1);
}
.diane-model-ico.claude {
  background: #d97757;
  position: relative;
}
.diane-model-ico.claude::after {
  content: "✺"; position: absolute;
  top: 50%; left: 50%; transform: translate(-50%,-50%);
  color: #fff; font-size: 24px;
}
.diane-model-ico.gpt {
  background: #10a37f;
  position: relative;
}
.diane-model-ico.gpt::after {
  content: "✿"; position: absolute;
  top: 50%; left: 50%; transform: translate(-50%,-50%);
  color: #fff; font-size: 22px;
}

.diane-counselor-empty {
  background: #fafbfc;
  border: 1px dashed #d8dde3;
  border-radius: 12px;
  padding: 30px;
  text-align: center;
  color: #2a3244;
}
.diane-counselor-info { color: #6e7a8a; font-size: 13px; margin: 12px 0 18px; max-width: 600px; margin-left:auto; margin-right:auto; }
.diane-counselor-example {
  background: #fff;
  border: 1px solid #eef2f5;
  border-radius: 8px;
  padding: 10px 16px;
  max-width: 500px;
  margin: 0 auto 16px;
  text-align: left;
}
.diane-counselor-row { display: flex; justify-content: space-between; align-items: center; gap: 16px; font-size: 13px; }
.diane-ct-desc { font-size: 11px; color: #9aa4b2; margin-top: 2px; }
.diane-ct-model { color: #3da4ff; font-size: 11px; font-weight: 600; white-space: nowrap; }
.diane-counselor-note { font-size: 12px; color: #3da4ff; font-weight: 600; }

.diane-chat-area {
  flex: 1;
  overflow-y: auto;
  padding: 14px 0;
  display: flex;
  flex-direction: column;
  gap: 10px;
  min-height: 150px;
}
.diane-msg {
  max-width: 80%;
  padding: 10px 16px;
  border-radius: 14px;
  font-size: 13px;
  line-height: 1.55;
  white-space: pre-wrap;
  animation: dianeFade 0.3s ease;
}
@keyframes dianeFade { from { opacity: 0; transform: translateY(6px); } to { opacity: 1; } }
.diane-msg.user { align-self: flex-end; background: #3da4ff; color: #fff; }
.diane-msg.assistant { align-self: flex-start; background: #f5f7fa; color: #2a3244; }
.diane-msg.typing::after { content: '▋'; color: #3da4ff; animation: blink 1s infinite; }

.diane-bottom {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 14px 0 0;
  border-top: 1px solid #eef2f5;
}
.diane-selected {
  font-size: 12px;
  color: #3da4ff;
  font-weight: 600;
  min-width: 120px;
}
.diane-input {
  flex: 1;
  border: 1px solid #eef2f5;
  background: #fff;
  padding: 10px 16px;
  border-radius: 100px;
  font-family: inherit;
  font-size: 14px;
  color: #2a3244;
}
.diane-input:focus { outline: none; border-color: #3da4ff; }
.diane-input:disabled { background: #f5f7fa; cursor: not-allowed; }
.diane-start {
  background: #9fd1ff;
  color: #fff;
  border: none;
  padding: 10px 20px;
  border-radius: 100px;
  font-family: inherit;
  font-size: 13px;
  font-weight: 700;
  cursor: pointer;
  white-space: nowrap;
}
.diane-start:disabled { background: #e5e9ee; color: #9aa4b2; cursor: not-allowed; }

/* ==========================================================================
   M'AGENTS PORTAL — pastel gradient, cards illustrées
   ========================================================================== */
.magents-chrome {
  background: linear-gradient(135deg, #c9bdf2 0%, #e9c4e8 35%, #f2c8b9 65%, #b7e3f1 100%);
  color: #2a2440;
  min-height: 640px;
  height: 640px;
  display: flex;
  flex-direction: column;
  position: relative;
  overflow: auto;
}
.magents-hero-bg {
  padding: 20px 40px 0;
  text-align: center;
}
.magents-head h2 {
  font-size: 28px;
  font-weight: 800;
  color: #1b1330;
  line-height: 1.15;
  letter-spacing: -0.01em;
}
.g-agents {
  background: linear-gradient(90deg, #8d57ff, #ff5ca3, #ff8f5c);
  -webkit-background-clip: text; background-clip: text; color: transparent;
}
.g-beta {
  display: inline-block;
  background: #d1c2ff; color: #4a2b99;
  font-size: 10px; font-weight: 700;
  padding: 3px 10px; border-radius: 20px;
  vertical-align: super;
  margin-left: 4px;
}
.magents-head h2 em { font-style: italic; font-weight: 600; color: #1b1330; }

.magents-tabs {
  margin: 18px auto 12px;
  display: inline-flex;
  gap: 4px;
  background: rgba(255,255,255,0.7);
  backdrop-filter: blur(8px);
  padding: 4px;
  border-radius: 100px;
  border: 1px solid rgba(255,255,255,0.5);
}
.magents-tab {
  background: transparent;
  border: none;
  padding: 7px 16px;
  font-family: inherit;
  font-size: 12px;
  color: #4a4366;
  cursor: pointer;
  border-radius: 100px;
  display: flex; align-items: center; gap: 6px;
  font-weight: 500;
}
.magents-tab.active {
  background: #8d57ff;
  color: #fff;
  font-weight: 600;
}
.magents-tab:not(.active):hover { background: rgba(255,255,255,0.6); }

.magents-toggle-row {
  display: flex; align-items: center; gap: 10px;
  justify-content: flex-start;
  margin: 10px 0 0;
  padding: 0 14px;
  font-size: 12px;
}
.magents-toggle-label { color: #6e668a; }
.magents-toggle-label.active { color: #8d57ff; font-weight: 700; }
.magents-toggle {
  width: 34px; height: 18px;
  background: #fff;
  border-radius: 20px;
  position: relative;
  cursor: pointer;
}
.magents-toggle-ball {
  width: 14px; height: 14px;
  background: #8d57ff;
  border-radius: 50%;
  position: absolute; top: 2px; left: 2px;
  transition: left 0.2s;
}

.magents-body { padding: 14px; flex: 1; }
.magents-body[hidden] { display: none; }
.magents-grid-title {
  font-size: 18px;
  font-weight: 700;
  color: #1b1330;
  margin: 6px 10px 14px;
}
.magents-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 14px;
  padding: 0 10px 20px;
}
.magent-card {
  position: relative;
  border-radius: 16px;
  overflow: hidden;
  cursor: pointer;
  aspect-ratio: 0.85;
  box-shadow: 0 10px 25px rgba(72,40,140,0.18);
  transition: transform 0.25s;
}
.magent-card:hover { transform: translateY(-4px); }
.magent-illus {
  width: 100%; height: 100%;
  display: flex; align-items: center; justify-content: center;
  font-size: 60px;
  position: relative;
}
.illus-consultant { background: linear-gradient(135deg, #2a5a8e, #4280c0); }
.illus-m365 { background: linear-gradient(135deg, #83c5e1, #5ca8c6); }
.illus-totalope { background: linear-gradient(135deg, #e87b3a, #d15a20); }
.illus-commercial { background: linear-gradient(135deg, #1f2d4a, #3b4e73); }
.illus-skillisy { background: linear-gradient(135deg, #f0a880, #b87856); }
.illus-change { background: linear-gradient(135deg, #e89090, #f0b8a8); }
.illus-msexpert { background: linear-gradient(135deg, #3b6bc4, #6ba3df); }
.illus-slides { background: linear-gradient(135deg, #e8815e, #d65e38); }

.magent-illus-emoji {
  font-size: 70px;
  filter: drop-shadow(0 4px 8px rgba(0,0,0,0.3));
}
.magent-preview-tag {
  position: absolute;
  top: 14px; right: -22px;
  background: #ff8a4a;
  color: #fff;
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 1px;
  padding: 4px 20px;
  transform: rotate(25deg);
  box-shadow: 0 2px 8px rgba(0,0,0,0.2);
}
.magent-overlay {
  position: absolute;
  bottom: 0; left: 0; right: 0;
  padding: 40px 14px 14px;
  background: linear-gradient(180deg, transparent, rgba(0,0,0,0.85));
  color: #fff;
}
.magent-name { font-size: 14px; font-weight: 700; margin-bottom: 3px; }
.magent-name .preview { background: #ff8a4a; padding: 1px 6px; border-radius: 4px; font-size: 9px; font-weight: 800; margin-left: 4px; }
.magent-desc { font-size: 11px; opacity: 0.85; line-height: 1.3; }

/* Vue chat agent (après clic) */
.magents-body[data-agents-view="chat"] {
  background: linear-gradient(135deg, rgba(255,255,255,0.5), rgba(255,255,255,0.75));
  margin: 14px;
  border-radius: 20px;
  padding: 20px 26px;
  min-height: 540px;
  display: flex;
  flex-direction: column;
}
.magents-agent-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 20px;
}
.magents-agent-title {
  color: #7b3dff;
  font-weight: 700;
  font-size: 16px;
}
.magents-back {
  background: #d1c2ff;
  color: #4a2b99;
  border: none;
  padding: 7px 16px;
  border-radius: 100px;
  font-family: inherit;
  font-size: 12px;
  font-weight: 600;
  cursor: pointer;
}
.magents-chat {
  flex: 1;
  overflow-y: auto;
  padding: 0 6px;
  display: flex;
  flex-direction: column;
  gap: 10px;
  min-height: 180px;
  max-height: 280px;
}
.magents-msg {
  max-width: 80%;
  padding: 10px 16px;
  border-radius: 12px;
  font-size: 13px;
  line-height: 1.55;
  white-space: pre-wrap;
}
.magents-msg.user { align-self: flex-end; background: #8d57ff; color: #fff; }
.magents-msg.assistant { align-self: flex-start; background: rgba(255,255,255,0.9); color: #2a2440; border: 1px solid rgba(141,87,255,0.15); }
.magents-msg.typing::after { content: '▋'; color: #8d57ff; animation: blink 1s infinite; }

.magents-suggestions {
  display: flex; flex-direction: column; gap: 8px;
  margin: 10px 0;
}
.magents-suggestion {
  background: rgba(255,255,255,0.6);
  border: none;
  color: #4a4366;
  padding: 10px 18px;
  border-radius: 100px;
  font-family: inherit;
  font-size: 12px;
  cursor: pointer;
  text-align: center;
  transition: background 0.15s;
}
.magents-suggestion:hover { background: #fff; color: #1b1330; }

.magents-composer {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-top: auto;
}
.magents-attach, .magents-send {
  width: 36px; height: 36px;
  border-radius: 50%;
  border: none;
  cursor: pointer;
  font-size: 14px;
  display: flex; align-items: center; justify-content: center;
}
.magents-attach { background: #8d57ff; color: #fff; }
.magents-send { background: #d1c2ff; color: #4a2b99; }
.magents-composer input {
  flex: 1;
  background: #fff;
  border: 1px solid rgba(141,87,255,0.2);
  padding: 10px 18px;
  border-radius: 100px;
  font-family: inherit;
  font-size: 13px;
  color: #2a2440;
}
.magents-composer input:focus { outline: none; border-color: #8d57ff; }

/* Responsive */
@media (max-width: 900px) {
  .mgpt-chrome, .diane-chrome { grid-template-columns: 1fr; }
  .mgpt-sidebar, .diane-sidebar { display: none; }
  .magents-grid { grid-template-columns: 1fr 1fr; }
  .diane-model-grid { grid-template-columns: repeat(3, 1fr); }
  .mgpt-hero { padding: 60px 20px 20px; }
}

/* ==========================================================================
   AJOUTS — Tour des 3 apps V2
   ========================================================================== */

/* Nouvelles illustrations */
.illus-cyber { background: linear-gradient(135deg, #2b1e5c, #6b3df5); }
.illus-geoseo { background: linear-gradient(135deg, #d4a551, #f0c776); }
.illus-soon { background: linear-gradient(135deg, #4a4e57, #2a2d33); }
.magent-card.soon { cursor: default; opacity: 0.85; }
.magent-card.soon:hover { transform: none; }
.soon-overlay {
  background: linear-gradient(180deg, transparent, rgba(0,0,0,0.7));
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0 !important;
  height: 100%;
  top: 0;
}
.magent-soon-text {
  color: rgba(255,255,255,0.75);
  font-weight: 700;
  font-size: 13px;
  letter-spacing: 1.5px;
}

/* Bandeau pédagogique au-dessus de chaque mockup */
.apps-info {
  background: linear-gradient(135deg, rgba(0,185,255,0.08), rgba(147,105,247,0.06));
  border: 1px solid rgba(0,185,255,0.22);
  border-radius: 12px;
  padding: 14px 20px;
  margin: 0 0 14px;
  display: flex;
  align-items: flex-start;
  gap: 14px;
}
.apps-info-icon {
  flex-shrink: 0;
  width: 34px; height: 34px;
  border-radius: 10px;
  background: var(--cyan);
  color: var(--dark);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 17px;
  font-weight: 800;
}
.apps-info-body {
  font-size: 13px;
  color: var(--lgray);
  line-height: 1.5;
  flex: 1;
}
.apps-info-body b { color: var(--white); font-weight: 700; }
.apps-info-body .tag {
  display: inline-block;
  background: rgba(0,185,255,0.15);
  color: var(--cyan);
  padding: 2px 8px;
  border-radius: 100px;
  font-size: 11px;
  font-weight: 700;
  margin: 0 4px 2px 0;
}

/* Rendre la chat body M'GPT plus confortable */
.mgpt-chat-body { max-height: 220px; }

/* Agent Cybersecurité & GEO/SEO cards — emoji plus gros pour compenser */
.illus-cyber .magent-illus-emoji { font-size: 70px; }
.illus-geoseo .magent-illus-emoji { font-size: 70px; }
