/* COSMOLOGIX IA — assistant de démonstration de la page IA (version 2, 2026-11-06).
   S'ajoute à site.css. Bandeau .hero-ia, puis section .ia-chat qui s'ouvre au premier message. */
.hero-ia{min-height:700px}
.ia-demo [hidden],.ia-chat[hidden]{display:none!important}
.hero-ia .hero-content{padding:72px 0 110px}
.hero-ia h1{max-width:820px}
.hero-ia .hero-intro{max-width:640px}
.ia-demo{max-width:760px;margin-top:34px}
.ia-demo-label{font-size:.71rem;font-weight:600;letter-spacing:.18em;text-transform:uppercase;color:#bdcddd;margin:0 0 14px}

/* Barre de saisie */
.ia-bar{position:relative;display:flex;align-items:center;gap:10px;margin:0;padding:8px 9px 8px 22px;min-height:56px;border:1px solid #aad9f9a6;border-radius:29px;background:linear-gradient(180deg,#314c6259,#0b2035d0 48%,#244058a8);box-shadow:inset 0 1px 1px #e5f5ff42,inset 0 -1px 6px #75bfff26,0 1px 15px #57b7ff1c,0 14px 42px #0005;backdrop-filter:blur(12px);-webkit-backdrop-filter:blur(12px);transition:border-color .2s,box-shadow .2s}
.ia-bar:before{content:'';position:absolute;pointer-events:none;left:18%;right:18%;height:1px;top:-1px;background:linear-gradient(90deg,transparent,#effcff,transparent);box-shadow:0 0 9px 1px #61baff66}
.ia-bar:focus-within{border-color:#d1effff0;box-shadow:inset 0 1px 2px #e5f5ff42,0 0 17px #66baff38,0 14px 42px #0005}
.ia-bar textarea{flex:1;min-width:0;display:block;width:100%;height:24px;min-height:0;max-height:140px;margin:0;padding:0;background:transparent;border:0;border-radius:0;outline:0;color:#f2f7fc;font-size:16px;line-height:24px;resize:none;overflow-y:hidden;scrollbar-width:thin;scrollbar-color:#647e96 transparent}
.ia-bar textarea:focus{background:transparent}
.ia-bar textarea::placeholder{color:#c6d4e0;opacity:1}
.ia-bar textarea:disabled{cursor:not-allowed}
.ia-send{flex:0 0 38px;display:grid;place-items:center;width:38px;height:38px;padding:0;border:1px solid #c1edff66;border-radius:50%;color:#fff;background:linear-gradient(155deg,#67b8e4,#28618e 60%,#244560);box-shadow:inset 0 1px 1px #d5f6ff55,0 0 8px #80caff23;transition:filter .2s,opacity .2s,transform .2s}
.ia-send:hover:not(:disabled){filter:brightness(1.18);transform:translateY(-1px)}
.ia-send:disabled{opacity:.55;cursor:default}
.ia-send svg{width:17px;height:17px;fill:currentColor}
.ia-send:focus-visible{outline:2px solid #eff8ff;outline-offset:4px}
.ia-chips{display:flex;flex-wrap:wrap;gap:8px;margin:14px 0 0;padding:0;list-style:none}
.ia-chips li{margin:0}
.ia-chip{padding:7px 14px;border:1px solid #7f93a9;border-radius:999px;background:#0b18268c;color:#dfe8f1;font-size:.76rem;line-height:1.4;transition:background .2s,border-color .2s}
.ia-chip:hover{background:#ffffff14;border-color:#a9c4dc;color:#fff}
.ia-chip:disabled{opacity:.5;cursor:default}
.ia-note{font-size:.72rem;line-height:1.65;color:#b9c8d6;margin:14px 0 0;max-width:680px}
.ia-note a{color:#dbe9f5}
.ia-note a:hover{color:#fff}
.ia-status{font-size:.8rem;line-height:1.6;color:#f1d9a6;margin:10px 0 0}
.ia-status.info{color:#bfd6ea}
.ia-end{display:flex;flex-wrap:wrap;gap:12px 20px;align-items:center;margin-top:18px;padding:18px 20px;border:1px solid #bddbff26;border-radius:12px;background:#051321c7}
.ia-end p{margin:0;font-size:.88rem;color:#dbe6f0;flex:1 1 260px}
.sr-only{position:absolute;width:1px;height:1px;overflow:hidden;clip-path:inset(50%);white-space:nowrap}

/* Section de conversation (sous le bandeau), façon Claude */
.ia-chat{background:linear-gradient(180deg,#060d16,#08131f 40%,#060d16);color:#eef3f7;padding:44px 0 0;border-top:1px solid #ffffff14}
.ia-chat .ia-demo{max-width:780px;margin:0 auto}
.ia-demo.en-conversation .ia-demo-label,.ia-demo.en-conversation .ia-chips{display:none}
.ia-thread{margin:0 0 8px}
.ia-msg{margin:0 0 30px;font-size:1rem;line-height:1.75;color:#e8f0f7;overflow-wrap:anywhere;scroll-margin-top:120px}
.ia-msg.user{margin-left:auto;max-width:85%;width:fit-content;padding:12px 18px;background:#c5dffa1c;border:1px solid #bddbff1f;border-radius:18px 18px 4px 18px;color:#f3f8fc;white-space:pre-wrap}
.ia-msg.assistant:before{content:'COSMOLOGIX IA';display:block;font-size:.6rem;letter-spacing:.16em;color:#86bce4;margin-bottom:8px;font-weight:600}
.ia-msg.pending{color:#a9bccd;font-style:italic}
.ia-msg.pending:after{content:'';display:inline-block;width:8px;height:8px;margin-left:10px;border-radius:50%;background:#86bce4;animation:iaPulse 1.1s ease-in-out infinite}
@keyframes iaPulse{0%,100%{opacity:.25;transform:scale(.8)}50%{opacity:1;transform:scale(1)}}
.ia-msg p{margin:0 0 .9em}
.ia-msg p:last-child,.ia-msg ul:last-child,.ia-msg ol:last-child,.ia-msg pre:last-child{margin-bottom:0}
.ia-msg ul,.ia-msg ol{margin:0 0 .9em;padding-left:1.35em}
.ia-msg li{margin-bottom:.35em}
.ia-msg h4{font-size:1.02rem;font-weight:600;letter-spacing:-.01em;margin:1.1em 0 .45em;color:#fff}
.ia-msg strong{font-weight:600;color:#fff}
.ia-msg code{font-family:ui-monospace,SFMono-Regular,Consolas,monospace;font-size:.86em;background:#ffffff14;padding:1px 6px;border-radius:4px}
.ia-msg pre{margin:0 0 .9em;padding:14px 16px;background:#0b1a2a;border:1px solid #ffffff1a;border-radius:10px;overflow:auto;font-size:.84rem;line-height:1.6;white-space:pre}
.ia-msg pre code{background:none;padding:0;font-size:inherit}
.ia-compose{position:relative}
.ia-chat .ia-compose{position:sticky;bottom:0;z-index:5;padding:14px 0 16px;background:linear-gradient(180deg,#060d1600,#060d16 26%)}
.ia-chat .ia-note{margin-top:10px;max-width:none;text-align:center;font-size:.68rem}
.ia-chat .ia-end{margin:18px 0 34px}

@media(max-width:650px){
  .hero-ia{min-height:640px}
  .hero-ia .hero-content{padding:52px 0 80px}
  .ia-demo{margin-top:26px}
  .ia-bar{padding:8px 8px 8px 17px}
  .ia-chat{padding-top:30px}
  .ia-msg{font-size:.95rem;margin-bottom:24px}
  .ia-msg.user{max-width:92%}
  .ia-chip{font-size:.72rem;padding:7px 12px}
}
@media(prefers-reduced-motion:reduce){.ia-bar,.ia-send,.ia-chip{transition:none}.ia-msg.pending:after{animation:none}}
@media print{.ia-compose,.ia-chips{display:none}}
