/* Page Agents IA — même palette que « Site web sécurisé » (web.css, bleu nuit / clair EduPrivacy).
   Organigramme des agents, tarif avec paiement Stripe. Démonstrations : écrans au style de la console des agents. */

/* ---------- Couleurs ---------- */
html[data-theme="dark"] .ag {
  --s-team: #0b1830; --s-live: radial-gradient(ellipse 70% 60% at 50% 0%, rgba(201, 164, 92, .10), transparent 70%), #071226; --s-faq2: #071226;
  --c-bg: linear-gradient(180deg, rgba(255, 255, 255, .045), rgba(255, 255, 255, .012)); --c-bd: rgba(255, 255, 255, .09); --c-fade: #0d1d38; --c-tx: #c3cfdf; --c-mut: #8e9fb6; --c-line: rgba(255, 255, 255, .12);
  --cs-bg: #0e1513; --cs-panel: #141d1a; --cs-bd: rgba(255, 255, 255, .09); --cs-tx: #e8ece9; --cs-mut: #93a09a; --cs-me: #1f6b3a; --cs-me-tx: #eafff1; --cs-bot: #1b2522; --cs-code: #0a100e;
  --win-bar: #0f1f3a; --win-bd: rgba(201, 164, 92, .25); --win-url: #071226; --win-url-tx: #9fb0c6;
  --tab-bg: rgba(255, 255, 255, .04); --tab-bd: rgba(255, 255, 255, .08); --tab-on: rgba(255, 255, 255, .09);
}
html[data-theme="light"] .ag {
  --s-team: #faf8f3; --s-live: radial-gradient(ellipse 70% 60% at 50% 0%, rgba(201, 164, 92, .12), transparent 70%), linear-gradient(180deg, #eef4fc 0%, #f8fafd 100%); --s-faq2: #faf8f3;
  --c-bg: #ffffff; --c-bd: #e6e2d8; --c-fade: #ffffff; --c-tx: #3d4a5c; --c-mut: #66727f; --c-line: #e3ddd0;
  --cs-bg: #ffffff; --cs-panel: #f5f7fa; --cs-bd: #e3e7ee; --cs-tx: #14202b; --cs-mut: #5b6778; --cs-me: #1f7a44; --cs-me-tx: #ffffff; --cs-bot: #eef1f5; --cs-code: #f6f8fb;
  --win-bar: #eef1f5; --win-bd: #d9e0ea; --win-url: #ffffff; --win-url-tx: #6b7686;
  --tab-bg: #ffffff; --tab-bd: #e1e6ed; --tab-on: #ffffff;
}
html[data-theme="dark"] body.p-agents-ia { background: #071226; }
html[data-theme="light"] body.p-agents-ia { background: #fff; }
html[data-theme="dark"] body.p-agents-ia .nav { background: rgba(7, 18, 38, .88); border-bottom-color: rgba(255, 255, 255, .08); }
html[data-theme="dark"] body.p-agents-ia .foot { background: #050d1c; border-top-color: rgba(255, 255, 255, .08); }

.ag-hero { background: var(--s-hero); padding-block: 70px 60px !important; color: #dbe5f2; overflow: hidden; }
.ag-live-sec { background: var(--s-live); }
.ag .sw-faq-sec { background: var(--s-faq2); }
.ag .ag-hero :is(h1, h3) { color: #fff; }
.ag .ag-hero h1 em { color: var(--gold-2); }
.ag .ag-hero .eyebrow { color: var(--gold-2); }
.ag .ag-hero .lead { color: #c3cfdf; }
.ag-sub { max-width: 720px; margin: 14px auto 0; }
.ag-sub em { font-style: normal; font-weight: 700; color: var(--hd); }

/* ---------- En-tête : radar ---------- */
.ag-hero-grid { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 40px; align-items: center; }
.ag-hero h1 { font-size: clamp(40px, 5.2vw, 66px); line-height: 1.03; }
.ag-hero .lead { margin-top: 18px; font-size: 17px; max-width: 520px; }
.ag-hero .actions { margin-top: 28px; }
.ag-radar { position: relative; width: min(540px, 100%); aspect-ratio: 1; margin-inline: auto; container-type: inline-size; }
.ag-circle { position: absolute; left: 50%; top: 50%; border-radius: 50%; transform: translate(-50%, -50%); border: 1px solid rgba(255, 255, 255, .08); }
.ag-circle.c1 { width: 54%; aspect-ratio: 1; border-color: rgba(201, 164, 92, .28); border-style: dashed; }
.ag-circle.c2 { width: 86%; aspect-ratio: 1; border-color: rgba(201, 164, 92, .2); }
.ag-circle.c3 { width: 100%; aspect-ratio: 1; background: radial-gradient(circle, rgba(47, 111, 214, .14), transparent 66%); }
.ag-sweep { position: absolute; inset: 0; border-radius: 50%; background: conic-gradient(from 0deg, rgba(230, 207, 154, .13), transparent 60deg, transparent); -webkit-mask: radial-gradient(circle, #000 0 70%, transparent 71%); mask: radial-gradient(circle, #000 0 70%, transparent 71%); animation: ag-rot 7s linear infinite; }
.ag-ring { position: absolute; inset: 0; animation: ag-rot 70s linear infinite; }
.ag-ring2 { animation-duration: 110s; animation-direction: reverse; }
.ag-ring1 { --r: 27cqw; }
.ag-ring2 { --r: 43cqw; }
.ag-pin { position: absolute; left: 50%; top: 50%; width: 0; height: 0; transform: rotate(var(--a)) translate(var(--r)) rotate(calc(-1 * var(--a))); }
.ag-av { position: absolute; left: -6.5cqw; top: -6.5cqw; width: 13cqw; height: 13cqw; animation: ag-rot 70s linear infinite reverse; }
.ag-ring2 .ag-av { animation-duration: 110s; animation-direction: normal; }
.ag-av img { width: 100%; height: 100%; border-radius: 50%; object-fit: cover; object-position: 50% 14%; border: 2px solid var(--accent); box-shadow: 0 0 0 4px rgba(7, 18, 38, .8), 0 0 22px var(--accent); background: #0b1830; display: block; }
.ag-av b { position: absolute; left: 50%; top: 100%; transform: translate(-50%, 6px); font: 600 10.5px var(--mono); letter-spacing: .12em; color: var(--accent); white-space: nowrap; text-shadow: 0 1px 6px #071226; }
.ag-ping { position: absolute; left: 50%; bottom: calc(100% + 8px); transform: translate(-50%, 6px) scale(.9); white-space: nowrap; font: 600 11.5px var(--sans); color: #0a1628; background: #fff; border-radius: 999px; padding: 5px 10px; box-shadow: 0 8px 20px rgba(0, 0, 0, .35); opacity: 0; transition: opacity .35s, transform .35s cubic-bezier(.2, .8, .2, 1); pointer-events: none; z-index: 3; }
.ag-ping::after { content: ''; position: absolute; left: 50%; top: 100%; margin-left: -5px; border: 5px solid transparent; border-top-color: #fff; }
.ag-pin.say .ag-ping { opacity: 1; transform: translate(-50%, 0) scale(1); }
.ag-pin.say { z-index: 5; }
.ag-pin.say .ag-av img { box-shadow: 0 0 0 4px rgba(7, 18, 38, .8), 0 0 34px var(--accent), 0 0 0 9px color-mix(in srgb, var(--accent) 30%, transparent); }
.ag-core { position: absolute; left: 50%; top: 50%; width: 22cqw; height: 22cqw; transform: translate(-50%, -50%); }
.ag-core img { width: 100%; height: 100%; border-radius: 50%; object-fit: cover; object-position: 50% 14%; border: 2px solid var(--accent); box-shadow: 0 0 0 6px rgba(250, 204, 21, .12), 0 0 50px rgba(250, 204, 21, .35); display: block; }
.ag-core::before { content: ''; position: absolute; inset: -12%; border-radius: 50%; border: 1px solid rgba(250, 204, 21, .5); animation: ag-ping 2.6s ease-out infinite; }
.ag-core b { position: absolute; left: 50%; top: 100%; transform: translate(-50%, 8px); font: 600 11px var(--mono); letter-spacing: .14em; text-transform: uppercase; color: var(--accent); white-space: nowrap; text-shadow: 0 1px 6px #071226; }
.ag-live-badge { position: absolute; right: 2%; bottom: 3%; display: inline-flex; align-items: center; gap: 8px; font: 600 11px var(--mono); letter-spacing: .1em; text-transform: uppercase; color: #dbe5f2; background: rgba(7, 18, 38, .75); border: 1px solid rgba(255, 255, 255, .12); border-radius: 999px; padding: 6px 12px; }
.ag-live-badge i { width: 8px; height: 8px; border-radius: 50%; background: #4ade80; box-shadow: 0 0 10px #4ade80; animation: ag-blink 1.6s ease-in-out infinite; }
@keyframes ag-rot { to { transform: rotate(360deg); } }
@keyframes ag-ping { 0% { transform: scale(.85); opacity: .9; } 100% { transform: scale(1.35); opacity: 0; } }
@keyframes ag-blink { 50% { opacity: .35; } }

/* ---------- Démonstrations ---------- */
.ag-live-sec .sw-center { margin-bottom: 44px; }
.ag-live { display: grid; grid-template-columns: 260px minmax(0, 1fr); gap: 22px; align-items: start; }
.ag-tabs { display: grid; gap: 10px; }
.ag-tab { position: relative; display: flex; align-items: center; gap: 12px; width: 100%; padding: 12px 14px; text-align: left; cursor: pointer; font: inherit; color: var(--tx); background: var(--tab-bg); border: 1px solid var(--tab-bd); border-radius: 16px; overflow: hidden; transition: background .3s, border-color .3s, transform .3s, box-shadow .3s; }
.ag-tab:hover { transform: translateX(3px); }
.ag-tab img { width: 44px; height: 44px; flex: none; border-radius: 50%; object-fit: cover; object-position: 50% 14%; border: 2px solid transparent; transition: border-color .3s, box-shadow .3s; }
.ag-tab strong { display: block; font-size: 15px; color: var(--hd); }
.ag-tab small { display: block; font-size: 12.5px; color: var(--tx-2); line-height: 1.35; }
.ag-tab.on { background: var(--tab-on); border-color: var(--accent); box-shadow: 0 14px 34px -18px var(--accent); }
.ag-tab.on img { border-color: var(--accent); box-shadow: 0 0 16px var(--accent); }
html[data-theme="light"] .ag-tab.on strong { color: var(--ink); }
.ag-tab-bar { position: absolute; left: 0; right: 0; bottom: 0; height: 3px; background: transparent; }
.ag-tab-bar b { display: block; height: 100%; width: 0; background: var(--accent); }

.ag-win { position: relative; border-radius: 16px; overflow: hidden; border: 1px solid var(--win-bd); box-shadow: 0 40px 90px -30px rgba(0, 0, 0, .6); background: var(--cs-bg); }
html[data-theme="light"] .ag-win { box-shadow: 0 40px 90px -40px rgba(15, 42, 74, .45); }
.ag-winbar { display: flex; align-items: center; gap: 6px; height: 34px; padding: 0 12px; background: var(--win-bar); border-bottom: 1px solid var(--win-bd); }
.ag-winbar i { width: 10px; height: 10px; border-radius: 50%; }
.ag-winbar i:nth-child(1) { background: #f26b5e; } .ag-winbar i:nth-child(2) { background: #f5bf4f; } .ag-winbar i:nth-child(3) { background: #5fc454; }
.ag-winurl { margin-left: 10px; flex: 1; max-width: 300px; background: var(--win-url); color: var(--win-url-tx); border-radius: 7px; padding: 2px 12px; font-size: 12px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.ag-replay { margin-left: auto; font: 600 12px var(--sans); color: var(--win-url-tx); background: none; border: 0; cursor: pointer; padding: 4px 6px; border-radius: 6px; }
.ag-replay:hover { color: var(--hd); }
.ag-scenes { position: relative; height: 480px; }
.ag-scene { position: absolute; inset: 0; opacity: 0; visibility: hidden; transform: translateY(10px) scale(.99); transition: opacity .5s, transform .6s cubic-bezier(.2, .7, .2, 1), visibility 0s .5s; overflow: hidden; }
.ag-scene.on { opacity: 1; visibility: visible; transform: none; transition: opacity .5s, transform .6s cubic-bezier(.2, .7, .2, 1); }
.ag-caps { min-height: 52px; margin-top: 16px; }
.ag-cap { color: var(--tx-2); font-size: 15px; line-height: 1.5; padding-left: 14px; border-left: 3px solid var(--gold); }
.ag-cap[hidden] { display: none; }
.ag-cap.on { animation: ag-pop .5s both; }

/* Apparitions pilotées par agents.js (data-at / data-hide / data-on / data-press) */
.js .ag-scene [data-at]:not(.show) { display: none; }
.js .ag-scene [data-at].show { animation: ag-pop .45s cubic-bezier(.2, .8, .2, 1) both; }
html:not(.js) .ag-scene [data-hide] { display: none; }
.ag-swap > * { display: none !important; }
.ag-swap > .show { display: inline-flex !important; }
html:not(.js) .ag-swap > :last-child { display: inline-flex !important; }
@keyframes ag-pop { from { opacity: 0; transform: translateY(8px) scale(.98); } to { opacity: 1; transform: none; } }
.ag-scene [data-type].typing::after { content: ''; display: inline-block; width: 2px; height: 1.05em; margin-left: 2px; vertical-align: -2px; background: currentColor; animation: ag-blink .7s steps(1) infinite; }
.cs-btn { display: inline-flex; align-items: center; justify-content: center; position: relative; font: 700 13px var(--sans); color: #1a1405; background: #e9c46a; border-radius: 10px; padding: 9px 16px; box-shadow: 0 6px 18px -6px rgba(233, 196, 106, .6); transition: transform .15s, box-shadow .2s; }
.press { transform: scale(.93) !important; }
.cs-btn.press, .lu-send.press { box-shadow: 0 0 0 6px rgba(233, 196, 106, .3); }
.ag-dots { display: inline-flex; gap: 4px; align-self: flex-start; padding: 10px 12px; border-radius: 14px; background: var(--cs-bot); }
.ag-dots i { width: 7px; height: 7px; border-radius: 50%; background: var(--cs-mut); animation: ag-bounce 1s infinite; }
.ag-dots i:nth-child(2) { animation-delay: .15s; } .ag-dots i:nth-child(3) { animation-delay: .3s; }
@keyframes ag-bounce { 0%, 60%, 100% { transform: none; opacity: .5; } 30% { transform: translateY(-4px); opacity: 1; } }

/* Écran façon console */
.cs { display: flex; flex-direction: column; gap: 14px; padding: 18px 20px; color: var(--cs-tx); background: var(--cs-bg); font-size: 14px; }
.cs::before { content: ''; position: absolute; inset: 0; pointer-events: none; background-image: linear-gradient(var(--cs-bd) 1px, transparent 1px), linear-gradient(90deg, var(--cs-bd) 1px, transparent 1px); background-size: 28px 28px; opacity: .35; -webkit-mask: linear-gradient(180deg, #000, transparent 70%); mask: linear-gradient(180deg, #000, transparent 70%); }
.cs > * { position: relative; }
.cs-top { display: flex; align-items: center; gap: 12px; padding-bottom: 12px; border-bottom: 1px solid var(--cs-bd); }
.cs-top img { width: 34px; height: 34px; flex: none; border-radius: 50%; object-fit: cover; object-position: 50% 14%; border: 2px solid var(--accent); }
.cs-top strong { font-size: 15px; }
.cs-top small { display: block; font-size: 12px; color: var(--cs-mut); line-height: 1.4; }
.cs-kick { font: 700 11.5px var(--sans) !important; letter-spacing: .14em; text-transform: uppercase; }
.cs-tabs { margin-left: auto; display: flex; gap: 6px; }
.cs-tabs span, .cs-chips span { font-size: 12px; font-weight: 600; padding: 6px 12px; border-radius: 999px; border: 1px solid var(--cs-bd); color: var(--cs-mut); white-space: nowrap; }
.cs-tabs span.on { background: #e9c46a; border-color: #e9c46a; color: #1a1405; }
.cs-chips { display: flex; flex-wrap: wrap; gap: 6px; margin-top: auto; }
.cs-chips span { color: var(--cs-tx); }

/* Luna : site du client + fenêtre de discussion */
.ag-luna { background: #f4f6fa; }
.lu-site { position: absolute; inset: 0; color: #0f2a4a; }
.lu-nav { display: flex; align-items: center; gap: 14px; height: 46px; padding: 0 22px; background: #fff; border-bottom: 1px solid #e6eaf0; }
.lu-nav b { font: 700 15px var(--serif-lux); margin-right: auto; }
.lu-nav i { width: 46px; height: 7px; border-radius: 4px; background: #dfe5ee; }
.lu-nav span { width: 74px; height: 26px; border-radius: 999px; background: #c9a45c; }
.lu-hero { margin: 18px 22px; padding: 34px 30px; border-radius: 16px; background: linear-gradient(135deg, #0f2a4a, #1f5fbf); color: #fff; max-width: 56%; }
.lu-hero h4 { font: 700 30px/1.08 var(--serif-lux); }
.lu-hero h4 em { color: #e6cf9a; }
.lu-hero p { display: grid; gap: 8px; margin: 18px 0; }
.lu-hero p i { height: 7px; border-radius: 4px; background: rgba(255, 255, 255, .3); }
.lu-hero p i:last-child { width: 70%; }
.lu-hero span { display: block; width: 120px; height: 34px; border-radius: 999px; background: #e6cf9a; }
.lu-cards { display: flex; gap: 12px; margin: 0 22px; max-width: 56%; }
.lu-cards i { flex: 1; height: 120px; border-radius: 12px; background: #fff; border: 1px solid #e3e8ef; }
.lu-chat { position: absolute; right: 18px; top: 16px; bottom: 16px; width: min(330px, 46%); display: flex; flex-direction: column; background: #fff; border-radius: 18px; overflow: hidden; box-shadow: 0 30px 70px -20px rgba(15, 42, 74, .45), 0 0 0 1px rgba(15, 42, 74, .06); color: #14202b; font-size: 13px; }
.lu-head { display: flex; align-items: center; gap: 10px; padding: 12px 14px; background: linear-gradient(135deg, #1a1035, #2c1a55); color: #fff; }
.lu-head img { width: 36px; height: 36px; border-radius: 50%; object-fit: cover; object-position: 50% 14%; border: 2px solid var(--accent); }
.lu-head strong { font-size: 14px; }
.lu-head strong span { font: 700 9px var(--sans); padding: 2px 6px; border-radius: 6px; background: rgba(167, 139, 250, .35); margin-left: 4px; vertical-align: 2px; }
.lu-head small { display: flex; align-items: center; gap: 5px; font-size: 11px; color: #cfc6f0; }
.lu-head small i { width: 6px; height: 6px; border-radius: 50%; background: #4ade80; }
.lu-x { margin-left: auto; width: 26px; height: 26px; display: grid; place-items: center; border-radius: 50%; background: rgba(255, 255, 255, .12); }
.lu-body { flex: 1; display: flex; flex-direction: column; gap: 10px; padding: 14px; overflow: hidden; background: #fafbfd; }
.lu-msg { display: flex; gap: 8px; align-items: flex-end; }
.lu-msg img { width: 22px; height: 22px; flex: none; border-radius: 50%; object-fit: cover; object-position: 50% 14%; }
.lu-msg p { padding: 9px 12px; border-radius: 14px 14px 14px 4px; background: #fff; border: 1px solid #e6eaf0; line-height: 1.45; }
.lu-msg.me { justify-content: flex-end; }
.lu-msg.me p { background: #2f6fd6; color: #fff; border: 0; border-radius: 14px 14px 4px 14px; max-width: 85%; }
.lu-chips { display: flex; flex-direction: column; align-items: flex-start; gap: 6px; margin-top: auto; }
.lu-chips span { font-size: 12px; color: #1f5fbf; border: 1px solid #c9d8f2; border-radius: 999px; padding: 5px 11px; background: #fff; }
.lu-book { align-self: flex-start; margin-left: 30px; font: 700 12.5px var(--sans); color: #fff; background: var(--ink); border-radius: 999px; padding: 8px 14px; box-shadow: 0 8px 20px -8px var(--accent); }
.lu-input { display: flex; align-items: center; gap: 8px; margin: 0 12px; padding: 6px 6px 6px 12px; border: 1.5px solid #2f6fd6; border-radius: 12px; min-height: 42px; }
.lu-field, .lu-ph { flex: 1; font-size: 12.5px; line-height: 1.35; }
.lu-ph { color: #98a3b3; }
.lu-field.show + .lu-ph { display: none; }
html:not(.js) .lu-field + .lu-ph { display: block; }
.lu-send { width: 30px; height: 30px; flex: none; display: grid; place-items: center; border-radius: 50%; background: #2f6fd6; color: #fff; font-size: 13px; transition: transform .15s, box-shadow .2s; }
.lu-foot { font-size: 10.5px; color: #8a95a5; text-align: center; padding: 8px 12px 10px; }

/* Anya : post préparé puis publié */
.an-week { display: grid; grid-template-columns: repeat(7, 1fr); gap: 6px; }
.an-day { position: relative; display: grid; justify-items: center; align-content: start; gap: 4px; min-height: 58px; padding: 8px 4px; border-radius: 10px; border: 1px solid var(--cs-bd); background: var(--cs-panel); transition: border-color .4s, box-shadow .4s, background .4s; }
.an-day b { font: 600 11px var(--mono); letter-spacing: .08em; color: var(--cs-mut); }
.an-day i { width: 7px; height: 7px; border-radius: 50%; background: var(--accent); opacity: .7; }
.an-day em { font: 600 10.5px var(--mono); font-style: normal; color: #1a1405; background: #e9c46a; border-radius: 6px; padding: 2px 6px; opacity: 0; transform: scale(.6); transition: .4s cubic-bezier(.2, .8, .2, 1); }
.an-day.on { border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-soft); }
.an-day.on em, html:not(.js) .an-day em { opacity: 1; transform: none; }
.an-post { flex: 1; display: grid; grid-template-columns: 210px minmax(0, 1fr); gap: 18px; padding: 16px; border-radius: 16px; border: 1px solid var(--cs-bd); background: var(--cs-panel); min-height: 0; }
.an-visual { position: relative; align-self: start; aspect-ratio: 4 / 5; border-radius: 12px; overflow: hidden; display: flex; flex-direction: column; justify-content: flex-end; padding: 16px; color: #fff; background: radial-gradient(circle at 75% 20%, #ffd57a 0 14%, transparent 15%), radial-gradient(circle at 75% 20%, rgba(255, 213, 122, .35) 0 24%, transparent 25%), linear-gradient(160deg, #f472b6, #a855f7 55%, #3b1a6b); box-shadow: 0 16px 34px -14px rgba(244, 114, 182, .6); }
.an-visual strong { font: 700 22px/1.1 var(--serif-lux); }
.an-visual small { font-size: 12px; opacity: .9; margin-top: 4px; }
.an-spark { position: absolute; color: #fff; animation: ag-blink 1.4s ease-in-out infinite; }
.an-spark.s1 { left: 18%; top: 16%; font-size: 16px; } .an-spark.s2 { left: 34%; top: 32%; font-size: 10px; animation-delay: .5s; }
.an-side { display: flex; flex-direction: column; gap: 10px; min-width: 0; }
.an-meta { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; }
.an-net { font: 700 11px var(--sans); padding: 4px 9px; border-radius: 6px; color: #fff; }
.an-net.fb { background: #1877f2; } .an-net.ig { background: linear-gradient(45deg, #f09433, #dc2743 55%, #bc1888); }
.an-state { margin-left: auto; }
.an-state span, .or-pill span { align-items: center; gap: 6px; font: 700 11px var(--sans); padding: 4px 10px; border-radius: 999px; background: rgba(148, 163, 184, .18); color: var(--cs-mut); }
.an-state .st1, .or-pill .st1 { background: rgba(233, 196, 106, .2); color: #c79a2c; }
.an-state .st2, .or-pill .st2 { background: rgba(59, 156, 255, .18); color: #3b9cff; }
.an-state .st3, .or-pill .st3 { background: rgba(74, 222, 128, .2); color: #22a35a; }
.an-text { line-height: 1.55; min-height: 4.6em; }
.an-tags { color: var(--accent); font-weight: 600; font-size: 13px; }
html[data-theme="light"] .an-tags { color: var(--ink); }
.an-check { font-size: 12.5px; font-weight: 600; color: #22a35a; }
.an-foot { margin-top: auto; display: flex; align-items: center; gap: 14px; flex-wrap: wrap; }
.an-stats { font-size: 13px; color: var(--cs-mut); }
.an-stats b { color: var(--cs-tx); }

/* Maia : discussion + carte à confirmer */
.ma-chat { flex: 1; display: flex; flex-direction: column; gap: 10px; min-height: 0; overflow: hidden; }
.ma-me { align-self: flex-end; max-width: 78%; }
.ma-me p { background: var(--cs-me); color: var(--cs-me-tx); padding: 10px 14px; border-radius: 14px 14px 4px 14px; line-height: 1.45; }
.ma-bot { align-self: flex-start; max-width: 78%; }
.ma-bot p { background: var(--cs-bot); padding: 10px 14px; border-radius: 14px 14px 14px 4px; line-height: 1.45; border: 1px solid var(--cs-bd); }
.ma-card { align-self: flex-start; width: min(460px, 100%); padding: 14px 16px; border-radius: 14px; border: 1px solid var(--cs-bd); background: var(--cs-panel); }
.ma-card-h { font: 700 11px var(--sans); letter-spacing: .12em; text-transform: uppercase; color: #c79a2c; margin-bottom: 8px; }
.ma-card-h .ok { color: #22a35a; }
.ma-card ul { list-style: none; display: grid; gap: 6px; margin-bottom: 12px; }
.ma-card li { display: flex; gap: 10px; font-size: 13px; }
.ma-card li strong { min-width: 120px; }
.ma-card li span { color: var(--cs-mut); }
.ma-done, .cs-done { font-weight: 700; color: #22a35a; font-size: 13px; padding: 9px 0; }
.ma-input { display: flex; align-items: center; min-height: 52px; padding: 10px 14px; border-radius: 12px; border: 1.5px solid #e9c46a; background: var(--cs-panel); font-size: 13px; line-height: 1.4; }
.ma-field, .ma-ph { flex: 1; }
.ma-ph { color: var(--cs-mut); }
.ma-field.show + .ma-ph { display: none; }

/* Rha : étapes, sujets, article */
.rh-steps { list-style: none; display: flex; gap: 6px; }
.rh-steps li { flex: 1; display: flex; align-items: center; gap: 8px; font-size: 12px; font-weight: 600; color: var(--cs-mut); padding: 8px 10px; border-radius: 10px; border: 1px solid var(--cs-bd); background: var(--cs-panel); transition: .4s; }
.rh-steps li i { width: 9px; height: 9px; flex: none; border-radius: 50%; background: var(--cs-bd); transition: .4s; }
.rh-steps li.on { color: var(--cs-tx); border-color: var(--accent); }
.rh-steps li.on i { background: var(--accent); box-shadow: 0 0 10px var(--accent); }
html:not(.js) .rh-steps li { color: var(--cs-tx); }
.rh-grid { flex: 1; display: grid; grid-template-columns: 220px minmax(0, 1fr); gap: 14px; min-height: 0; }
.rh-topics { list-style: none; display: grid; gap: 8px; align-content: start; }
.rh-topics li { position: relative; display: grid; gap: 4px; padding: 10px 12px; border-radius: 12px; border: 1px solid var(--cs-bd); background: var(--cs-panel); font-size: 12.5px; line-height: 1.35; transition: .4s; }
.rh-topics li span { font: 500 10.5px var(--mono); color: var(--cs-mut); }
.rh-topics li em { position: absolute; top: -8px; right: 8px; font: 700 10px var(--sans); font-style: normal; color: #1a1405; background: #e9c46a; border-radius: 6px; padding: 2px 7px; opacity: 0; transform: scale(.6); transition: .4s cubic-bezier(.2, .8, .2, 1); }
.rh-topics li.on { border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-soft); }
.rh-topics li.on em, html:not(.js) .rh-topics li em { opacity: 1; transform: none; }
.rh-doc { display: flex; flex-direction: column; gap: 10px; padding: 16px 18px; border-radius: 14px; border: 1px solid var(--cs-bd); background: var(--cs-panel); min-height: 0; overflow: hidden; }
.rh-doc h5 { font: 700 19px/1.25 var(--serif-lux); color: var(--cs-tx); }
.rh-doc p { font-size: 13px; line-height: 1.55; color: var(--cs-mut); }
.rh-lines { display: grid; gap: 8px; }
.rh-lines i { height: 7px; border-radius: 4px; background: var(--cs-bd); }
.rh-lines i:nth-child(2) { width: 92%; } .rh-lines i:nth-child(3) { width: 64%; }
.js .rh-lines i.show { animation: ag-grow .6s ease both; transform-origin: left; }
@keyframes ag-grow { from { transform: scaleX(0); } to { transform: none; } }
.rh-foot { display: flex; gap: 16px; font-size: 12px; color: var(--cs-mut); }
.rh-foot b { color: var(--accent); font-size: 14px; }
html[data-theme="light"] .rh-foot b { color: var(--ink); }
.rh-live { margin-top: auto; font-weight: 700; font-size: 12.5px; color: #22a35a; }

/* Orion : jauge + correction */
.or-grid { flex: 1; display: grid; grid-template-columns: 200px minmax(0, 1fr); gap: 16px; min-height: 0; }
.or-side { display: flex; flex-direction: column; align-items: center; gap: 10px; padding: 16px; border-radius: 14px; border: 1px solid var(--cs-bd); background: var(--cs-panel); }
.or-gauge { position: relative; width: 140px; aspect-ratio: 1; }
.or-gauge svg { width: 100%; height: 100%; transform: rotate(-90deg); }
.or-gauge circle { fill: none; stroke: var(--cs-bd); stroke-width: 10; }
.or-gauge .or-val { stroke: var(--accent); stroke-linecap: round; stroke-dasharray: 100; stroke-dashoffset: 38; transition: stroke-dashoffset 1.6s cubic-bezier(.2, .8, .2, 1), stroke .6s; filter: drop-shadow(0 0 6px var(--accent)); }
.or-gauge.on .or-val, html:not(.js) .or-gauge .or-val { stroke-dashoffset: 6; stroke: #22c55e; }
.or-gauge > div { position: absolute; inset: 0; display: grid; place-content: center; text-align: center; }
.or-gauge b { font: 700 36px/1 var(--sans); }
.or-gauge span { font-size: 11px; color: var(--cs-mut); }
.or-ai-h { font: 600 10.5px var(--mono); letter-spacing: .12em; text-transform: uppercase; color: var(--cs-mut); margin-top: 6px; }
.or-ai { display: flex; flex-wrap: wrap; justify-content: center; gap: 6px; }
.or-ai span { font-size: 11.5px; font-weight: 600; padding: 4px 9px; border-radius: 999px; border: 1px solid var(--cs-bd); color: var(--cs-mut); transition: .4s; }
.or-ai span.on, html:not(.js) .or-ai span { color: #fff; background: var(--accent); border-color: var(--accent); }
.or-fix { display: flex; flex-direction: column; gap: 8px; padding: 16px; border-radius: 14px; border: 1px solid var(--cs-bd); background: var(--cs-panel); min-width: 0; }
.or-h { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; }
.or-h strong { font-size: 14.5px; }
.or-url { font: 500 12px var(--mono); color: var(--cs-mut); }
.or-desc { font-size: 13px; }
.or-diff { flex: 1; margin: 2px 0 6px; padding: 12px 14px; border-radius: 10px; background: var(--cs-code); border: 1px solid var(--cs-bd); font: 500 12px/1.6 var(--mono); color: var(--cs-tx); white-space: pre-wrap; overflow: hidden; }
.or-diff .c { color: var(--cs-mut); }
.or-diff span[data-at] { color: #22a35a; }
.or-act { align-self: flex-start; }

/* ---------- Organigramme ---------- */
html[data-theme="dark"] .ag { --org-line: rgba(201, 164, 92, .38); --dept-bg: #0e1f3c; --pop-bg: #0f2142; }
html[data-theme="light"] .ag { --org-line: #d6ccb6; --dept-bg: #ffffff; --pop-bg: #ffffff; }
.ag-org-sec { background: var(--s-team); }
.ag-org-sec .sw-center { margin-bottom: 40px; }
.org { display: flex; flex-direction: column; align-items: center; }
.org-you { display: flex; flex-direction: column; align-items: center; gap: 2px; padding: 16px 30px; border-radius: 20px; border: 1px solid rgba(201, 164, 92, .45); background: linear-gradient(180deg, rgba(201, 164, 92, .16), rgba(201, 164, 92, .04)); text-align: center; }
.org-you-ico { display: grid; place-items: center; width: 50px; height: 50px; margin-bottom: 8px; border-radius: 50%; color: #1a1405; background: linear-gradient(135deg, var(--gold), var(--gold-2)); box-shadow: 0 0 0 6px rgba(201, 164, 92, .15), 0 10px 30px -8px rgba(201, 164, 92, .6); }
.org-you-ico svg { width: 26px; height: 26px; }
.org-you strong { font: 700 22px var(--serif-lux); color: var(--hd); }
.org-you small { font-size: 13px; color: var(--tx-2); }
.org-v { display: block; position: relative; width: 2px; height: 46px; background: var(--org-line); overflow: hidden; }
.org-v::after { content: ''; position: absolute; left: -1px; top: -16px; width: 4px; height: 16px; border-radius: 2px; background: linear-gradient(transparent, var(--gold-2)); animation: org-down 1.6s linear infinite; }
@keyframes org-down { to { top: 100%; } }

.org-node { position: relative; display: grid; grid-template-columns: 48px minmax(0, 1fr); gap: 12px; align-items: start; padding: 12px; border-radius: 16px; background: var(--c-bg); border: 1px solid var(--c-bd); outline: none; transition: border-color .3s, box-shadow .3s, transform .3s, opacity .8s ease, filter .9s ease; }
.org-node img { width: 48px; height: 48px; border-radius: 50%; object-fit: cover; object-position: 50% 14%; border: 2px solid var(--accent); box-shadow: 0 0 14px -2px var(--accent); }
.org-node strong { display: block; font: 700 15px var(--sans); letter-spacing: .03em; color: var(--accent); }
html[data-theme="light"] .org-node strong { color: var(--ink); }
.org-node em { display: block; font-style: normal; font-size: 12.5px; color: var(--hd); opacity: .85; }
.org-node p { margin-top: 6px; font-size: 12.5px; line-height: 1.45; color: var(--c-mut); }
.org-node:hover, .org-node:focus-visible, .org-node:focus-within { border-color: var(--accent); box-shadow: 0 14px 34px -18px var(--accent); transform: translateY(-2px); z-index: 6; }
.org-pop { position: absolute; left: 0; right: 0; top: calc(100% + 8px); z-index: 7; list-style: none; display: grid; gap: 6px; padding: 12px 14px; border-radius: 14px; background: var(--pop-bg); border: 1px solid var(--accent); box-shadow: 0 20px 40px -12px rgba(0, 0, 0, .45); opacity: 0; visibility: hidden; transform: translateY(-6px); transition: opacity .25s, transform .25s, visibility 0s .25s; pointer-events: none; }
.org-pop li { position: relative; padding-left: 14px; font-size: 12.5px; line-height: 1.4; color: var(--c-tx); }
.org-pop li::before { content: ''; position: absolute; left: 0; top: .55em; width: 6px; height: 6px; border-radius: 50%; background: var(--accent); }
.org-node:hover .org-pop, .org-node:focus .org-pop, .org-node:focus-within .org-pop { opacity: 1; visibility: visible; transform: none; transition: opacity .25s, transform .25s; }

.org-chief { width: min(460px, 100%); grid-template-columns: 76px minmax(0, 1fr); gap: 16px; padding: 16px 18px; border-color: rgba(250, 204, 21, .45); box-shadow: 0 20px 50px -30px rgba(250, 204, 21, .5); }
.org-chief img { width: 76px; height: 76px; }
.org-chief strong { font-size: 21px; }
.org-live { float: right; display: inline-flex; align-items: center; gap: 6px; font: 600 10px var(--mono); letter-spacing: .12em; text-transform: uppercase; color: #22a35a; }
.org-live i { width: 7px; height: 7px; border-radius: 50%; background: #22c55e; box-shadow: 0 0 8px #22c55e; animation: ag-blink 1.6s ease-in-out infinite; }

.org-depts { position: relative; display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 16px; width: 100%; padding-top: 32px; }
.org-bus { position: absolute; top: 0; left: calc((100% - 48px) / 8); right: calc((100% - 48px) / 8); height: 2px; background: var(--org-line); overflow: hidden; }
.org-bus b { position: absolute; top: -1px; left: 50%; width: 28px; height: 4px; border-radius: 2px; background: linear-gradient(90deg, transparent, var(--gold-2), transparent); animation: org-left 2.4s linear infinite; }
.org-bus b + b { animation-name: org-right; }
@keyframes org-left { from { left: 50%; } to { left: -28px; } }
@keyframes org-right { from { left: 50%; } to { left: 100%; } }
.org-dept { position: relative; padding: 14px; border-radius: 20px; border: 1px solid var(--c-bd); background: var(--dept-bg); }
html[data-theme="light"] .org-dept { box-shadow: 0 18px 40px -28px rgba(15, 42, 74, .3); }
.org-dept::before { content: ''; position: absolute; left: calc(50% - 1px); top: -33px; width: 2px; height: 33px; background: var(--org-line); }
.org-dept::after { content: ''; position: absolute; left: calc(50% - 2px); top: -33px; width: 6px; height: 6px; border-radius: 50%; background: var(--gold-2); box-shadow: 0 0 8px var(--gold-2); animation: org-stub 2.4s linear infinite; }
@keyframes org-stub { 0%, 45% { top: -33px; opacity: 0; } 55% { opacity: 1; } 100% { top: -4px; opacity: 0; } }
.org-dept-h { display: grid; grid-template-columns: minmax(0, 1fr) auto; align-items: center; gap: 2px 10px; margin-bottom: 12px; padding: 2px 4px 12px; border-bottom: 1px solid var(--c-line); }
.org-dept-h strong { font: 700 12px var(--sans); letter-spacing: .14em; text-transform: uppercase; color: var(--kick); }
.org-dept-h small { grid-column: 1; font-size: 12.5px; color: var(--tx-2); }
.org-dept-h span { grid-column: 2; grid-row: 1 / 3; display: grid; place-items: center; width: 28px; height: 28px; border-radius: 50%; font: 700 12px var(--mono); color: var(--kick); border: 1px solid var(--org-line); }
.org-team { position: relative; list-style: none; display: grid; gap: 10px; margin-left: 8px; padding-left: 16px; border-left: 2px solid var(--org-line); }
.org-team > li::before { content: ''; position: absolute; left: -18px; top: 35px; width: 16px; height: 2px; background: var(--org-line); }
.org-team > li:last-child::after { content: ''; position: absolute; left: -18px; top: 37px; bottom: -2px; width: 2px; background: var(--dept-bg); }

/* ---------- Tarif et paiement ---------- */
.ag-pay-msg { max-width: 900px; margin: 30px auto 0 !important; }
.ag-pay { max-width: 900px; margin: 34px auto 0; padding: 30px; border-radius: 24px; background: var(--card); border: 1px solid var(--bd); box-shadow: 0 30px 70px -40px rgba(0, 0, 0, .55); color: var(--tx); }
.ag-pay-head { margin-bottom: 18px; }
.ag .ag-pay-head h3 { font: 700 26px var(--serif-lux); }
html[data-theme="light"] .ag .ag-pay-head h3 { color: var(--hd); }
.ag-pay-head p { color: var(--tx-2); margin-top: 4px; }
.ag-fact { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.ag .form .ag-fact-opt { position: relative; display: block; }
.ag-fact-opt input { position: absolute; opacity: 0; pointer-events: none; }
.ag-fact-opt > span { display: grid; gap: 2px; padding: 14px 16px; border-radius: 14px; border: 2px solid var(--inp-bd); background: var(--inp); cursor: pointer; transition: border-color .25s, box-shadow .25s, background .25s; }
.ag-fact-opt strong { font: 700 11.5px var(--sans); letter-spacing: .14em; text-transform: uppercase; color: var(--kick); }
.ag-fact-opt b { font: 700 22px var(--serif-lux); color: var(--hd); }
.ag-fact-opt small { font-weight: 400; font-size: 13px; color: var(--tx-2); }
.ag-fact-opt input:checked + span { border-color: var(--gold); background: rgba(201, 164, 92, .1); box-shadow: 0 0 0 4px rgba(201, 164, 92, .16); }
.ag-fact-opt input:focus-visible + span { outline: 2px solid #4a86e8; outline-offset: 2px; }
.ag-pay-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 12px; }
.ag-pay-actions .btn svg { width: 18px; height: 18px; margin-right: 8px; }
.ag-pay-secure { font-size: 12.5px; color: var(--tx-2); }
.ag-pay.flash { animation: ag-flash 1.2s ease; }
@keyframes ag-flash { 30% { box-shadow: 0 0 0 6px rgba(201, 164, 92, .4); } }

/* ---------- Adaptation aux écrans ---------- */
@media (max-width: 1080px) {
  .ag-hero-grid { grid-template-columns: 1fr; gap: 30px; }
  .ag-radar { width: min(460px, 100%); }
  .ag-live { grid-template-columns: 1fr; }
  .org { align-items: stretch; }
  .org-you { flex-direction: row; gap: 14px; padding: 12px 16px; text-align: left; }
  .org-you-ico { margin: 0; flex: none; }
  .org-you small { margin-left: auto; }
  .org-v { margin-left: 40px; height: 34px; }
  .org-chief { width: 100%; grid-template-columns: 56px minmax(0, 1fr); padding: 12px; }
  .org-chief img { width: 56px; height: 56px; }
  .org-depts { grid-template-columns: 1fr; gap: 14px; padding: 0 0 0 64px; }
  .org-bus { left: 40px; right: auto; top: 0; bottom: 26px; width: 2px; height: auto; }
  .org-bus b { display: none; }
  .org-dept::before { left: -24px; top: 26px; width: 24px; height: 2px; }
  .org-dept::after { display: none; }
  .ag-tabs { display: flex; overflow-x: auto; scroll-snap-type: x mandatory; gap: 8px; margin: 0 -16px; padding: 2px 16px 8px; scrollbar-width: none; }
  .ag-tabs::-webkit-scrollbar { display: none; }
  .ag-tab { flex: 0 0 auto; width: auto; scroll-snap-align: start; padding: 8px 12px; }
  .ag-tab:hover { transform: none; }
  .ag-tab img { width: 34px; height: 34px; }
}
@media (max-width: 820px) {
  .ag-scenes { height: 600px; }
  .lu-site { display: none; }
  .lu-chat { left: 50%; right: auto; transform: translateX(-50%); width: min(360px, calc(100% - 28px)); }
  .an-post { grid-template-columns: 1fr; grid-template-rows: auto 1fr; }
  .an-visual { aspect-ratio: auto; height: 130px; }
  .rh-grid, .or-grid { grid-template-columns: 1fr; }
  .rh-topics li:nth-child(n+2) { display: none; }
  .or-side { flex-direction: row; flex-wrap: wrap; justify-content: center; padding: 10px; }
  .or-gauge { width: 96px; }
  .or-gauge b { font-size: 26px; }
  .or-ai-h { width: 100%; text-align: center; margin: 0; }
}
@media (max-width: 600px) {
  .ag-hero { padding-block: 44px 40px !important; }
  .ag-scenes { height: 690px; }
  .org-you small { display: none; }
  .org-depts { padding-left: 52px; }
  .org-v { margin-left: 34px; }
  .org-bus { left: 34px; }
  .org-dept::before { left: -18px; width: 18px; }
  .ag-pay { padding: 22px 18px; }
  .ag-fact { grid-template-columns: 1fr; }
  .ag-pay-actions .btn { width: 100%; justify-content: center; }
  .ag-maia .cs-chips { display: none; }
  .cs { padding: 14px; gap: 10px; }
  .cs-tabs { display: none; }
  .an-week { gap: 3px; }
  .an-day { min-height: 50px; padding: 6px 2px; }
  .rh-steps li { font-size: 0; gap: 0; justify-content: center; padding: 8px; }
  .rh-steps li i { width: 10px; height: 10px; }
  .ma-card li { flex-direction: column; gap: 0; }
  .ag-winurl { max-width: 150px; }
}
@media (prefers-reduced-motion: reduce) {
  .ag-sweep, .ag-ring, .ag-av, .ag-core::before, .ag-live-badge i, .org-v::after, .org-bus b, .org-dept::after, .org-live i, .an-spark, .ag-dots i { animation: none !important; }
}
html[data-theme="light"] .ag .ag-pay-sec .sub { color: var(--tx-2); }
.org-depts { align-items: start; }
