/* =========================================================
   STYLE ÉDITORIAL — page Agents IA
   Typo serif, papier, une seule couleur d'accent, filets fins.
   ========================================================= */
.ed-page { --paper: #f6f4ef; --ink: #121318; --ink-2: #2b2d35; --muted: #6b6c72; --rule: #dcd8cf; --accent: #3a3fd4; background: var(--paper); color: var(--ink); }
.ed-page .cursor-glow { display: none; }
.ed-page .progress { background: var(--ink); height: 2px; }
.ed-page .header.scrolled .header-inner { background: rgba(246,244,239,.9); border-color: var(--rule); box-shadow: none; }
.ed-page .nav .btn-primary, .ed-page .mmenu .btn-primary { background: var(--ink); box-shadow: none; }
.ed-page .nav .btn-primary::after { display: none; }
.ed-page .nav > a:hover, .ed-page .dd > button:hover, .ed-page .nav > a.active { background: rgba(18,19,24,.06); color: var(--ink); }
.ed-page .mmenu { background: var(--paper); }
.ed-page footer { background: var(--ink); }
.ed-page .foot-big { background: linear-gradient(180deg, rgba(246,244,239,.16), rgba(246,244,239,0)); -webkit-background-clip: text; background-clip: text; }

.ed em, .ed-end em { font-family: "Instrument Serif", Georgia, serif; font-style: italic; font-weight: 400; letter-spacing: 0; }
.ed-h1, .ed-h2, .ed-end-h { font-family: "Instrument Serif", Georgia, serif; font-weight: 400; letter-spacing: -.015em; color: var(--ink); }
.ed-h1 em, .ed-h2 em { color: var(--accent); }

/* Hero */
.ed-hero { padding: 150px 0 40px; }
.ed-meta { display: flex; gap: 10px; font-size: .82rem; color: var(--muted); letter-spacing: .02em; margin-bottom: 26px; }
.ed-meta a:hover { color: var(--ink); text-decoration: underline; }
.ed-h1 { font-size: clamp(3rem, 8.6vw, 8.4rem); line-height: .95; }
.ed-h1 .line { display: block; overflow: hidden; padding-bottom: .06em; }
.ed-h1 .line > span { display: inline-block; transform: translateY(105%); transition: transform 1.1s var(--ease); }
body.loaded .ed-h1 .line > span { transform: none; }
.ed-h1 .line:nth-child(2) > span { transition-delay: .08s; }
.ed-h1 .line:nth-child(3) > span { transition-delay: .16s; }
.ed-hero-grid { display: grid; grid-template-columns: 1.55fr 1fr; gap: 56px; margin-top: 56px; align-items: end; }
.ed-hero-img { height: 520px; overflow: hidden; border-radius: 4px; }
.ed-hero-img img { width: 100%; height: 120%; object-fit: cover; filter: grayscale(.25) contrast(1.02); }
.ed-lead { font-size: 1.15rem; color: var(--ink-2); line-height: 1.6; }
.ed-cta { display: flex; flex-direction: column; align-items: flex-start; gap: 14px; margin: 32px 0 40px; }
.ed-btn { display: inline-flex; align-items: center; gap: 12px; padding: 17px 28px; border-radius: 999px; background: var(--ink); color: var(--paper); font-weight: 600; font-size: .95rem; transition: background .3s, transform .4s var(--ease); }
.ed-btn:hover { background: var(--accent); transform: translateY(-2px); }
.ed-btn svg { transition: transform .4s var(--ease); }
.ed-btn:hover svg { transform: translateX(4px); }
.ed-btn.light { background: var(--paper); color: var(--ink); }
.ed-btn.light:hover { background: #fff; }
.ed-link { font-size: .92rem; color: var(--muted); border-bottom: 1px solid var(--rule); padding-bottom: 2px; transition: color .3s, border-color .3s; }
.ed-link:hover { color: var(--ink); border-color: var(--ink); }
.ed-link.light { color: rgba(246,244,239,.7); border-color: rgba(246,244,239,.25); }
.ed-link.light:hover { color: var(--paper); border-color: var(--paper); }
.ed-facts { display: grid; grid-template-columns: repeat(3, 1fr); border-top: 1px solid var(--ink); }
.ed-facts div { padding: 16px 0 0; }
.ed-facts div + div { padding-left: 18px; border-left: 1px solid var(--rule); }
.ed-facts dt { font-family: "Instrument Serif", Georgia, serif; font-size: 2.6rem; line-height: 1; }
.ed-facts dd { color: var(--muted); font-size: .84rem; margin-top: 6px; }

/* Sections */
.ed-sec { padding: 130px 0; }
.ed-paper { background: #ece9e1; }
.ed-head { display: grid; grid-template-columns: 1fr 3fr; gap: 40px; margin-bottom: 64px; align-items: start; }
.ed-kicker { font-size: .8rem; letter-spacing: .08em; color: var(--muted); padding-top: 14px; }
.ed-kicker.light { color: rgba(246,244,239,.6); }
.ed-h2 { font-size: clamp(2.2rem, 4.6vw, 4.2rem); line-height: 1.02; }

/* Index des services */
.idx { list-style: none; border-top: 1px solid var(--ink); }
.idx-row {
  position: relative; display: grid; grid-template-columns: 70px 1.1fr 1.5fr auto 40px; gap: 28px; align-items: baseline;
  padding: 30px 12px; border-bottom: 1px solid var(--rule); cursor: default; isolation: isolate;
}
.idx-row::before { content: ""; position: absolute; inset: 0; background: var(--ink); transform: scaleY(0); transform-origin: bottom; transition: transform .55s var(--ease); z-index: -1; }
.idx-n { font-family: "Instrument Serif", Georgia, serif; font-size: 1.5rem; color: var(--muted); transition: color .4s; }
.idx-t { font-family: "Inter", sans-serif; font-size: 1.32rem; font-weight: 600; letter-spacing: -.02em; color: var(--ink); transition: color .4s, transform .55s var(--ease); }
.idx-d { color: var(--muted); font-size: .96rem; line-height: 1.55; transition: color .4s; }
.idx-tags { display: flex; flex-wrap: wrap; gap: 6px; justify-content: flex-end; max-width: 240px; }
.idx-tags span { font-size: .74rem; padding: 4px 10px; border: 1px solid var(--rule); border-radius: 999px; color: var(--ink-2); white-space: nowrap; transition: border-color .4s, color .4s; }
.idx-go { width: 40px; height: 40px; border-radius: 50%; border: 1px solid var(--rule); display: grid; place-items: center; color: var(--ink); align-self: center; transition: all .45s var(--ease); }
@media (hover: hover) {
  .idx-row:hover::before { transform: scaleY(1); }
  .idx-row:hover .idx-n { color: rgba(246,244,239,.5); }
  .idx-row:hover .idx-t { color: var(--paper); transform: translateX(8px); }
  .idx-row:hover .idx-d { color: rgba(246,244,239,.75); }
  .idx-row:hover .idx-tags span { color: var(--paper); border-color: rgba(246,244,239,.3); }
  .idx-row:hover .idx-go { background: var(--paper); color: var(--ink); border-color: var(--paper); transform: rotate(-45deg); }
}
.idx-preview { position: fixed; left: 0; top: 0; width: 280px; height: 200px; pointer-events: none; z-index: 40; border-radius: 4px; overflow: hidden; opacity: 0; transform: translate(-50%, -50%) scale(.85); transition: opacity .3s, transform .4s var(--ease); box-shadow: 0 30px 60px -20px rgba(0,0,0,.45); }
.idx-preview.on { opacity: 1; transform: translate(-50%, -50%) scale(1); }
.idx-preview img { width: 100%; height: 100%; object-fit: cover; }

/* Cas d'usage */
.uc { display: grid; grid-template-columns: 1fr 2.4fr; gap: 50px; }
.uc-tabs { display: flex; flex-direction: column; border-top: 1px solid var(--ink); }
.uc-tab { display: flex; gap: 14px; align-items: baseline; padding: 20px 0; border: 0; border-bottom: 1px solid var(--rule); background: none; font: inherit; font-size: 1.05rem; font-weight: 500; color: var(--muted); text-align: left; cursor: pointer; transition: color .3s, padding .4s var(--ease); }
.uc-tab span { font-family: "Instrument Serif", Georgia, serif; font-size: 1.1rem; }
.uc-tab:hover { color: var(--ink); }
.uc-tab.on { color: var(--ink); padding-left: 12px; font-weight: 600; }
.uc-tab.on span { color: var(--accent); }
.uc-panes { position: relative; min-height: 440px; }
.uc-pane { position: absolute; inset: 0; display: grid; grid-template-columns: 1.15fr 1fr; gap: 40px; opacity: 0; visibility: hidden; transition: opacity .5s, visibility .5s; }
.uc-pane.on { position: relative; opacity: 1; visibility: visible; }
.uc-img { height: 440px; overflow: hidden; border-radius: 4px; }
.uc-img img { width: 100%; height: 100%; object-fit: cover; transform: scale(1.08); transition: transform 1.2s var(--ease); filter: grayscale(.2); }
.uc-pane.on .uc-img img { transform: none; }
.uc-txt h3 { font-family: "Instrument Serif", Georgia, serif; font-weight: 400; font-size: 2.3rem; line-height: 1.05; letter-spacing: -.01em; margin-bottom: 18px; }
.uc-txt p { color: var(--ink-2); margin-bottom: 24px; }
.uc-txt ul { list-style: none; border-top: 1px solid var(--rule); }
.uc-txt li { padding: 12px 0; border-bottom: 1px solid var(--rule); font-size: .94rem; display: flex; justify-content: space-between; }
.uc-txt li::after { content: "✓"; color: var(--accent); }

/* Avant / après */
.ba { display: grid; grid-template-columns: 1fr auto 1fr; gap: 30px; align-items: stretch; }
.ba-col { padding: 36px; border: 1px solid var(--rule); border-radius: 4px; }
.ba-after { background: var(--ink); color: var(--paper); border-color: var(--ink); }
.ba-label { font-family: "Instrument Serif", Georgia, serif; font-size: 1.9rem; margin-bottom: 18px; }
.ba ul { list-style: none; display: grid; gap: 14px; }
.ba li { padding-left: 26px; position: relative; color: var(--ink-2); }
.ba li::before { content: "—"; position: absolute; left: 0; color: var(--muted); }
.ba-after li { color: rgba(246,244,239,.85); }
.ba-after li::before { content: "→"; color: #a5a8ff; }
.ba-arrow { display: grid; place-items: center; width: 54px; height: 54px; border-radius: 50%; border: 1px solid var(--ink); align-self: center; }
.ed-note { margin-top: 20px; font-size: .84rem; color: var(--muted); font-style: italic; }

/* Méthode */
.ed-steps { list-style: none; display: grid; grid-template-columns: repeat(4, 1fr); border-top: 1px solid var(--ink); }
.ed-steps li { padding: 28px 26px 0 0; }
.ed-steps li + li { padding-left: 26px; border-left: 1px solid var(--rule); }
.ed-steps span { font-family: "Instrument Serif", Georgia, serif; font-size: 3.4rem; line-height: 1; color: var(--accent); }
.ed-steps h3 { font-family: "Inter", sans-serif; font-size: 1.08rem; margin: 22px 0 10px; letter-spacing: -.01em; }
.ed-steps p { color: var(--muted); font-size: .93rem; }

/* FAQ */
.ed-faq { display: grid; grid-template-columns: 1fr 1.5fr; gap: 70px; align-items: start; }
.ed-faq > div:first-child { position: sticky; top: 120px; }
.ed-faq .ed-h2 { margin-top: 18px; }
.ed-qs { border-top: 1px solid var(--ink); }
.ed-q { border-bottom: 1px solid var(--rule); }
.ed-q summary { list-style: none; cursor: pointer; padding: 26px 0; display: flex; justify-content: space-between; gap: 24px; align-items: center; font-size: 1.1rem; font-weight: 600; letter-spacing: -.01em; }
.ed-q summary::-webkit-details-marker { display: none; }
.ed-q summary i { position: relative; flex: 0 0 18px; height: 18px; }
.ed-q summary i::before, .ed-q summary i::after { content: ""; position: absolute; left: 0; right: 0; top: 50%; height: 1.5px; background: var(--ink); transition: transform .4s var(--ease); }
.ed-q summary i::after { transform: rotate(90deg); }
.ed-q[open] summary i::after { transform: rotate(0); }
.ed-q p { color: var(--muted); padding: 0 40px 26px 0; }

/* Fin de page */
.ed-end { background: var(--ink); color: var(--paper); padding: 140px 0; }
.ed-end-h { color: var(--paper); font-size: clamp(2.6rem, 6.4vw, 6rem); line-height: 1; margin: 24px 0 44px; max-width: 1050px; }
.ed-end-h em { color: #a5a8ff; }
.ed-end-cta { display: flex; align-items: center; gap: 28px; flex-wrap: wrap; }

@media (max-width: 1080px) {
  .idx-row { grid-template-columns: 54px 1fr 40px; gap: 6px 20px; }
  .idx-d { grid-column: 2 / 3; }
  .idx-tags { grid-column: 2 / 3; justify-content: flex-start; max-width: none; }
  .idx-go { grid-row: 1; grid-column: 3; }
  .uc { grid-template-columns: 1fr; gap: 30px; }
  .uc-tabs { flex-direction: row; overflow-x: auto; border-top: 0; gap: 8px; scrollbar-width: none; }
  .uc-tab { flex: 0 0 auto; border: 1px solid var(--rule); border-radius: 999px; padding: 10px 16px; font-size: .9rem; }
  .uc-tab.on { padding-left: 16px; background: var(--ink); color: var(--paper); border-color: var(--ink); }
  .uc-tab.on span { color: #a5a8ff; }
}
@media (max-width: 900px) {
  .ed-hero-grid, .ed-faq { grid-template-columns: 1fr; gap: 36px; }
  .ed-faq > div:first-child { position: static; }
  .ed-hero-img { height: 380px; }
  .ed-head { grid-template-columns: 1fr; gap: 6px; margin-bottom: 44px; }
  .ed-sec { padding: 90px 0; }
  .uc-pane { grid-template-columns: 1fr; gap: 26px; }
  .uc-img { height: 300px; }
  .uc-panes { min-height: 0; }
  .ba { grid-template-columns: 1fr; }
  .ba-arrow { transform: rotate(90deg); justify-self: center; }
  .ed-steps { grid-template-columns: 1fr 1fr; gap: 36px 0; }
  .ed-steps li:nth-child(3) { padding-left: 0; border-left: 0; }
  .ed-end { padding: 100px 0; }
}
@media (max-width: 600px) {
  .ed-hero { padding-top: 120px; }
  .ed-hero-img { height: 300px; }
  .ed-facts dt { font-size: 2rem; }
  .idx-row { grid-template-columns: 40px 1fr; padding: 24px 0; }
  .idx-go { display: none; }
  .idx-t { font-size: 1.15rem; }
  .ba-col { padding: 26px; }
  .ed-steps { grid-template-columns: 1fr; }
  .ed-steps li, .ed-steps li + li { padding: 24px 0 0; border-left: 0; }
  .ed-steps li + li { border-top: 1px solid var(--rule); margin-top: 24px; }
  .ed-q p { padding-right: 0; }
}
@media (prefers-reduced-motion: reduce) { .ed-h1 .line > span { transform: none; } }
