/* =========================================================
   TALOS — Pages intérieures (agents, à propos, contact, légal)
   ========================================================= */

/* ---------- Transition entre pages (rideau) ---------- */
.curtain {
  position: fixed; inset: 0; z-index: 1100; display: grid; place-items: center; pointer-events: none;
  background: radial-gradient(60% 50% at 50% 50%, #15124a 0%, #07071a 70%);
  clip-path: inset(0 0 100% 0); transition: clip-path .7s var(--ease-io);
}
.is-leaving .curtain { clip-path: inset(0 0 0 0); pointer-events: auto; }
.is-arriving .curtain { clip-path: inset(0 0 0 0); transition: none; }
.curtain__mark { width: 84px; height: 84px; opacity: 0; transform: scale(.8) rotate(-12deg); transition: opacity .4s, transform .7s var(--ease); }
.is-leaving .curtain__mark { opacity: 1; transform: none; transition-delay: .2s; }
.is-arriving .curtain__mark { opacity: 1; transform: none; transition: none; }

/* ---------- En-tête de page ---------- */
.page-hero {
  --mx: 0; --my: 0;
  position: relative; overflow: hidden; display: flex; align-items: flex-end;
  min-height: 78vh; min-height: 78svh; padding: calc(var(--header-h) + 90px) 0 clamp(64px, 9vw, 120px);
}
.page-hero--compact { min-height: 0; padding-bottom: 80px; }
.page-hero__inner { position: relative; z-index: 2; }
.page-hero__title { max-width: 15ch; margin-bottom: 28px; font-size: clamp(44px, 7.2vw, 108px); line-height: 1; letter-spacing: -0.045em; }
.page-hero--compact .page-hero__title { font-size: clamp(40px, 5.6vw, 80px); }
.page-hero .eyebrow { margin-bottom: 22px; }
.page-hero .lead { margin-bottom: 36px; }
.page-hero__mark {
  position: absolute; z-index: 1; bottom: 16%; right: max(var(--gutter), calc((100vw - var(--max)) / 2 + var(--gutter)));
  width: clamp(150px, 22vw, 320px); height: clamp(150px, 22vw, 320px);
  filter: drop-shadow(0 30px 60px rgba(83,58,253,.55));
  transform: translate(calc(var(--mx) * -14px), calc(var(--my) * -10px));
  animation: floaty 7s ease-in-out infinite;
}
.crumbs { display: flex; flex-wrap: wrap; gap: 10px; margin-bottom: 44px; font-size: 13px; font-weight: 400; color: var(--muted); }
.crumbs a { transition: color .3s; }
.crumbs a:hover, .crumbs [aria-current] { color: var(--fg); }

/* ---------- Sous-navigation collante (agents) ---------- */
.subnav {
  position: sticky; top: 0; z-index: 80; transition: top .6s var(--ease);
  background: color-mix(in srgb, var(--bg) 82%, transparent); backdrop-filter: blur(16px); -webkit-backdrop-filter: blur(16px);
  border-bottom: 1px solid var(--line);
}
body:has(.nav:not(.is-hidden)) .subnav { top: var(--header-h); }
.subnav__inner { display: flex; gap: 6px; padding-block: 12px; overflow-x: auto; scrollbar-width: none; }
.subnav__inner::-webkit-scrollbar { display: none; }
.subnav a {
  flex: none; display: inline-flex; align-items: center; gap: 8px; padding: 8px 15px; border-radius: 9999px;
  border: 1px solid var(--line); font-size: 13px; font-weight: 400; color: var(--muted);
  transition: color .3s, border-color .3s, background-color .3s;
}
.subnav a i { font-style: normal; font-size: 10.5px; opacity: .6; }
.subnav a:hover { color: var(--fg); border-color: var(--ghost); }
.subnav a.is-current { background: var(--indigo); border-color: var(--indigo); color: #fff; }

/* ---------- Fiche agent ---------- */
.agent-detail__grid { display: grid; grid-template-columns: 1.05fr .95fr; gap: clamp(40px, 6vw, 96px); align-items: center; }
.agent-detail--flip .agent-log { order: -1; }
.agent-detail .h-display { margin-bottom: 24px; font-size: clamp(40px, 5.4vw, 76px); }
.agent-detail__head { display: flex; align-items: center; justify-content: space-between; max-width: 540px; margin-bottom: 36px; }
.agent-detail__icon {
  width: 56px; height: 56px; display: grid; place-items: center; border-radius: var(--r); color: #fff;
  background: linear-gradient(140deg, #8b7bff 0%, #533afd 45%, #3b82f6 100%);
  box-shadow: 0 12px 30px -10px rgba(83,58,253,.75), inset 0 1px 0 rgba(255,255,255,.35);
}
.agent-detail__icon svg { width: 24px; height: 24px; fill: none; stroke: currentColor; stroke-width: 1.5; stroke-linecap: round; stroke-linejoin: round; }
.agent-detail__num { font-size: 12px; font-weight: 400; letter-spacing: .2em; color: var(--muted); }
.checklist { display: grid; gap: 14px; margin: 36px 0; }
.checklist li { display: flex; align-items: flex-start; gap: 14px; font-size: 17px; line-height: 1.45; }
.checklist li::before {
  content: '✓'; flex: none; display: grid; place-items: center; width: 20px; height: 20px; margin-top: 2px;
  border-radius: 50%; font-size: 11px; font-weight: 500; color: #fff; background: linear-gradient(140deg, #8b7bff, #3b82f6);
}
.integrations { display: flex; flex-wrap: wrap; align-items: center; gap: 12px 16px; padding-top: 28px; border-top: 1px solid var(--line); }
.integrations__label { font-size: 12px; font-weight: 400; letter-spacing: .2em; text-transform: uppercase; color: var(--muted); }
.integrations ul { display: flex; flex-wrap: wrap; gap: 6px; }
.integrations li {
  padding: 6px 12px; border-radius: 9999px; border: 1px solid var(--line); background: var(--card);
  font-size: 13px; font-weight: 400; transition: border-color .3s, color .3s, transform .4s var(--ease);
}
.integrations li:hover { border-color: var(--accent); color: var(--accent); transform: translateY(-2px); }

/* Terminal « agent en direct » */
.agent-log {
  --mx: 50%; --my: 50%;
  position: relative; overflow: hidden; border-radius: var(--r); color: #e6e6ff; isolation: isolate;
  background: linear-gradient(160deg, #100d33 0%, #07071a 70%);
  border: 1px solid rgba(160,150,255,.2); box-shadow: 0 40px 100px -40px rgba(83,58,253,.65);
  transition: transform .7s var(--ease);
}
.agent-log::before { content: ''; position: absolute; inset: 0; z-index: -1; background: radial-gradient(380px circle at var(--mx) var(--my), rgba(124,108,255,.18), transparent 50%), radial-gradient(300px circle at 100% 0%, rgba(59,130,246,.18), transparent 70%); }
.agent-log__bar { display: flex; align-items: center; gap: 8px; padding: 14px 18px; border-bottom: 1px solid rgba(255,255,255,.08); font-family: ui-monospace, 'SFMono-Regular', Menlo, Consolas, monospace; font-size: 12px; color: #9ea3c7; }
.agent-log__bar > i { width: 9px; height: 9px; border-radius: 50%; background: rgba(255,255,255,.14); }
.agent-log__bar > span { min-width: 0; margin-left: 10px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.agent-log__live { flex: none; white-space: nowrap; margin-left: auto; display: inline-flex; align-items: center; gap: 8px; font-size: 10.5px; font-weight: 400; letter-spacing: .14em; color: #8fb3ff; }
.agent-log__live::before { content: ''; width: 6px; height: 6px; border-radius: 50%; background: #8fb3ff; animation: ping 2.2s var(--ease) infinite; }
.agent-log__lines { display: grid; gap: 12px; padding: 22px 18px 8px; font-family: ui-monospace, 'SFMono-Regular', Menlo, Consolas, monospace; font-size: 13px; line-height: 1.5; }
.agent-log__lines li { display: grid; grid-template-columns: 46px 1fr; gap: 12px; opacity: 0; translate: 0 10px; transition: opacity .5s var(--ease), translate .6s var(--ease); }
.agent-log__lines time { color: #6f74a8; }
.agent-log__lines b { color: #fff; font-weight: 500; }
.agent-log__lines .ok { color: #8fb3ff; }
.agent-log__lines .tag { padding: 1px 7px; border-radius: 9999px; background: rgba(124,108,255,.2); color: #c4b5fd; }
.agent-log.is-in .agent-log__lines li { opacity: 1; translate: 0 0; }
.agent-log__lines li:nth-child(1) { transition-delay: .3s; } .agent-log__lines li:nth-child(2) { transition-delay: .75s; }
.agent-log__lines li:nth-child(3) { transition-delay: 1.2s; } .agent-log__lines li:nth-child(4) { transition-delay: 1.65s; }
.agent-log__lines li:nth-child(5) { transition-delay: 2.1s; } .agent-log__lines li:nth-child(6) { transition-delay: 2.55s; }
.agent-log__lines li:last-child span::after { content: '▍'; margin-left: 4px; color: #8fb3ff; animation: blink 1s steps(1) infinite; }
.agent-log__foot { display: flex; align-items: center; justify-content: space-between; gap: 16px; margin: 14px 18px 18px; padding-top: 14px; border-top: 1px dashed rgba(255,255,255,.12); font-size: 12px; letter-spacing: .06em; color: #9ea3c7; }
.agent-log__foot b { font-size: 26px; font-weight: 300; letter-spacing: -0.02em; color: #fff; }

/* ---------- À propos ---------- */
.myth__grid, .founder__grid { display: grid; grid-template-columns: 1fr 1fr; gap: clamp(48px, 7vw, 110px); align-items: center; }
.myth__text p { color: var(--muted); font-size: 18px; line-height: 1.6; max-width: 52ch; }
.myth__text p + p { margin-top: 18px; }
.myth__quote { margin: 34px 0; padding-left: 24px; border-left: 1px solid var(--accent); font-size: clamp(22px, 2.3vw, 31px); line-height: 1.3; letter-spacing: -0.02em; max-width: 30ch; }
.mission__text { max-width: 24ch; font-size: clamp(30px, 3.8vw, 56px); line-height: 1.12; letter-spacing: -0.035em; }
/* Mot du fondateur : une lettre ; la photo s'ajoute seule si assets/img/fondateur.jpg existe */
.founder__grid { grid-template-columns: 1fr; max-width: 920px; }
.founder__grid:has(.founder__photo) { grid-template-columns: .8fr 1.2fr; max-width: var(--max); }
.founder__photo { position: relative; margin: 0; width: 100%; max-width: 440px; aspect-ratio: 4 / 5; justify-self: center; overflow: hidden; border-radius: var(--r); border: 1px solid var(--line); background: #0d0b2b; }
.founder__photo img { width: 100%; height: 100%; object-fit: cover; filter: grayscale(1) contrast(1.05) brightness(1.02); transition: transform 1.2s var(--ease), filter .8s; }
.founder__photo::after { content: ''; position: absolute; inset: 0; pointer-events: none; background: linear-gradient(160deg, rgba(124,108,255,.35), rgba(83,58,253,.15) 45%, rgba(59,130,246,.35)); mix-blend-mode: color; }
.founder__photo:hover img { transform: scale(1.04); filter: grayscale(.6) contrast(1.05); }
.founder__letter { position: relative; }
.founder__quote { position: relative; margin-bottom: 44px; font-size: clamp(26px, 3vw, 42px); line-height: 1.28; letter-spacing: -0.025em; }
.founder__quote::before, .founder__quote::after { display: block; font-size: 110px; line-height: .8; background: var(--grad); -webkit-background-clip: text; background-clip: text; color: transparent; }
.founder__quote::before { content: '“'; margin-bottom: -6px; }
.founder__quote::after { content: '”'; height: .42em; margin-top: 14px; text-align: right; }
.founder__sign { display: flex; align-items: center; justify-content: space-between; gap: 24px; padding-top: 26px; border-top: 1px solid var(--line); }
.founder__sign .signature { margin: 0; padding: 0; }
.founder__sign .signature::before { display: none; }
.founder__sign .signature__name { font-size: 14px; white-space: nowrap; }
.founder__mark { flex: none; width: 54px; height: 54px; opacity: .9; animation: floaty 7s ease-in-out infinite; }

/* ---------- Contact ---------- */
.contact-page { padding-top: clamp(72px, 9vw, 120px); }
.contact-infos { display: grid; gap: 0; margin-top: 40px; border-top: 1px solid var(--line); }
.contact-infos div { display: flex; justify-content: space-between; gap: 20px; padding: 18px 0; border-bottom: 1px solid var(--line); }
.contact-infos dt { font-size: 12px; font-weight: 400; letter-spacing: .2em; text-transform: uppercase; color: var(--muted); }
.contact-infos dd { margin: 0; text-align: right; }
.faq__grid { display: grid; grid-template-columns: .8fr 1.2fr; gap: clamp(40px, 6vw, 96px); align-items: start; }
.faq__head { position: sticky; top: calc(var(--header-h) + 40px); }
.faq__list { border-top: 1px solid var(--line); }
.faq__list details { border-bottom: 1px solid var(--line); }
.faq__list summary { display: flex; align-items: center; justify-content: space-between; gap: 24px; padding: 26px 4px; cursor: pointer; list-style: none; font-size: clamp(18px, 1.6vw, 22px); letter-spacing: -0.015em; transition: color .3s; }
.faq__list summary::-webkit-details-marker { display: none; }
.faq__list summary:hover { color: var(--accent); }
.faq__list summary i { position: relative; flex: none; width: 30px; height: 30px; border: 1px solid var(--line); border-radius: var(--r); transition: border-color .3s, background-color .3s; }
.faq__list summary i::before, .faq__list summary i::after { content: ''; position: absolute; left: 50%; top: 50%; width: 10px; height: 1px; background: var(--accent); translate: -50% -50%; transition: rotate .45s var(--ease); }
.faq__list summary i::after { rotate: 90deg; }
.faq__list details[open] summary i { background: var(--indigo); border-color: var(--indigo); }
.faq__list details[open] summary i::before, .faq__list details[open] summary i::after { background: #fff; }
.faq__list details[open] summary i::after { rotate: 0deg; }
.faq__list details p { max-width: 62ch; padding: 0 4px 28px; color: var(--muted); line-height: 1.6; animation: fadeUp .5s var(--ease); }

/* ---------- Pages légales ---------- */
.legal { padding-block: clamp(64px, 8vw, 110px) var(--section); }
.legal__grid { display: grid; grid-template-columns: 240px 1fr; gap: clamp(40px, 6vw, 96px); align-items: start; }
.legal__toc { position: sticky; top: calc(var(--header-h) + 32px); display: grid; gap: 2px; font-size: 14px; }
.legal__toc a { padding: 7px 0 7px 14px; border-left: 1px solid var(--line); color: var(--muted); transition: color .3s, border-color .3s; }
.legal__toc a:hover, .legal__toc a.is-current { color: var(--indigo); border-left-color: var(--indigo); }
.legal__body { max-width: 72ch; }
.legal__body h2 { margin: 56px 0 16px; font-size: clamp(24px, 2.2vw, 30px); letter-spacing: -0.02em; scroll-margin-top: calc(var(--header-h) + 24px); }
.legal__body h2:first-of-type { margin-top: 0; }
.legal__body h3 { margin: 24px 0 8px; font-size: 18px; font-weight: 400; }
.legal__body p, .legal__body li { color: var(--muted); line-height: 1.65; }
.legal__body p + p { margin-top: 12px; }
.legal__body ul { display: grid; gap: 8px; margin: 12px 0; }
.legal__body li { position: relative; padding-left: 18px; }
.legal__body li::before { content: ''; position: absolute; left: 0; top: .78em; width: 7px; height: 1px; background: var(--accent); }
.legal__body strong { color: var(--fg); font-weight: 400; }
.legal__body a { color: var(--indigo); text-decoration: underline; text-underline-offset: 3px; }
.todo { padding: 1px 6px; border-radius: var(--r); background: rgba(83,58,253,.09); color: var(--indigo); font-weight: 400; }
.legal__note { margin-bottom: 48px; padding: 18px 20px; border-radius: var(--r); border: 1px solid var(--lilac-border); background: var(--periwinkle); color: var(--deep-violet); font-size: 14px; line-height: 1.55; }
.legal__updated { margin-top: 56px; padding-top: 20px; border-top: 1px solid var(--line); font-size: 13px; color: var(--muted); }

/* ---------- Méthode : principes ---------- */
.principles__grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; margin-top: 56px; }
.principle {
  position: relative; overflow: hidden; isolation: isolate; display: flex; flex-direction: column; min-height: 290px; padding: 32px;
  border-radius: var(--r); border: 1px solid var(--line); background: var(--card);
}
.principle::after { content: ''; position: absolute; inset: auto -30% -60% auto; width: 80%; aspect-ratio: 1; z-index: -1; border-radius: 50%; background: radial-gradient(circle, rgba(83,58,253,.35), transparent 65%); opacity: .4; transition: opacity .6s, transform .8s var(--ease); }
.principle:hover { border-color: var(--ghost); }
.principle:hover::after { opacity: 1; transform: scale(1.2); }
.principle__num { font-size: 13px; font-weight: 400; letter-spacing: .2em; color: var(--accent); }
.principle h3 { margin: auto 0 12px; padding-top: 48px; font-size: clamp(24px, 2.2vw, 32px); line-height: 1.1; letter-spacing: -0.025em; }
.principle p { color: var(--muted); }

/* ---------- Méthode : ligne de temps ---------- */
.timeline__list { --tp: 0; position: relative; display: grid; gap: clamp(80px, 10vw, 136px); margin-top: 80px; }
.timeline__list::before, .timeline__list::after { content: ''; position: absolute; left: 27px; top: 0; bottom: 0; width: 1px; }
.timeline__list::before { background: var(--line); }
.timeline__list::after { background: linear-gradient(180deg, #8b7bff, #533afd 50%, #3b82f6); transform: scaleY(var(--tp)); transform-origin: top; box-shadow: 0 0 12px rgba(115,137,255,.7); }
.tl-step { position: relative; display: grid; grid-template-columns: 56px 1fr; gap: clamp(24px, 4vw, 56px); scroll-margin-top: calc(var(--header-h) + 80px); }
.tl-step__marker {
  position: relative; z-index: 1; width: 56px; height: 56px; display: grid; place-items: center; border-radius: 50%;
  border: 1px solid var(--line); background: var(--bg); font-size: 14px; font-weight: 400; color: var(--muted);
  transition: background .6s var(--ease), color .4s, border-color .4s, box-shadow .6s, transform .6s var(--ease);
}
.tl-step.is-reached .tl-step__marker {
  border-color: transparent; color: #fff; transform: scale(1.06);
  background: linear-gradient(140deg, #8b7bff 0%, #533afd 45%, #3b82f6 100%);
  box-shadow: 0 0 0 6px rgba(83,58,253,.12), 0 12px 30px -8px rgba(83,58,253,.75);
}
.tl-step > div { min-width: 0; }
.tl-step__time { display: inline-block; margin-bottom: 18px; padding: 6px 12px; border-radius: 9999px; border: 1px solid var(--line); font-size: 11px; font-weight: 400; letter-spacing: .14em; text-transform: uppercase; color: var(--accent); }
.tl-step h2 { margin-bottom: 18px; font-size: clamp(42px, 5.4vw, 76px); line-height: 1; letter-spacing: -0.045em; }
.tl-step__cols { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; margin-top: 40px; }
.tl-step__box { padding: 28px; border-radius: var(--r); border: 1px solid var(--line); background: var(--card); }
.tl-step__box h3 { margin-bottom: 18px; font-size: 12px; font-weight: 400; letter-spacing: .2em; text-transform: uppercase; color: var(--muted); }
.tl-step__box .checklist { margin: 0; }
.tl-step__box .checklist li { font-size: 16px; }
.deliverables li { display: flex; align-items: center; gap: 14px; padding: 12px 0; border-bottom: 1px dashed var(--line); }
.deliverables li:first-child { padding-top: 0; }
.deliverables li:last-child { border-bottom: 0; padding-bottom: 0; }
.deliverables li::before { content: ''; flex: none; width: 8px; height: 8px; rotate: 45deg; background: linear-gradient(140deg, #8b7bff, #3b82f6); }
.tl-step__you { margin-top: 20px; padding: 16px 20px; border-left: 2px solid var(--indigo); border-radius: 0 var(--r) var(--r) 0; background: rgba(83,58,253,.06); color: var(--muted); font-size: 15px; }
.tl-step__you b { font-weight: 400; color: var(--fg); }

/* ---------- Bandeau d'appel final ---------- */
.cta__stage--band { min-height: 86vh; min-height: 86svh; }
.cta__stage--band .btn-pair { justify-content: center; margin-top: 36px; }

/* ---------- Responsive ---------- */
@media (max-width: 860px) {
  .agent-detail__grid, .myth__grid, .founder__grid, .faq__grid, .legal__grid { grid-template-columns: 1fr; }
  .agent-detail--flip .agent-log { order: 0; }
  .founder__grid:has(.founder__photo) { grid-template-columns: 1fr; }
  .founder__photo { max-width: 360px; justify-self: start; }
  .faq__head { position: static; }
  .legal__toc { position: static; grid-template-columns: 1fr 1fr; }
  .page-hero__mark { display: none; }
  .principles__grid, .tl-step__cols { grid-template-columns: 1fr; }
  .principle { min-height: 0; }
  .timeline__list::before, .timeline__list::after { left: 21px; }
  .tl-step { grid-template-columns: 44px 1fr; gap: 18px; }
  .tl-step__marker { width: 44px; height: 44px; font-size: 12px; }
  .tl-step h2 { font-size: clamp(34px, 10vw, 52px); }
  .tl-step__box { padding: 22px; }
}
@media (max-width: 640px) {
  .agent-log__lines { font-size: 12px; }
  .agent-log__lines li { grid-template-columns: 40px 1fr; gap: 8px; }
  .contact-infos div { flex-direction: column; gap: 4px; }
  .contact-infos dd { text-align: left; }
}
