
*, *::before, *::after { margin:0; padding:0; box-sizing:border-box; }
:root {
  /* Palette EKO — bleu et vert d’eau pâle */
  --blue:#123C7C; --blue-lt:#2F6BFF; --blue-dk:#0B2A5B;
  --rose:#368477; --rose-lt:#BFE6D8; --rose-dk:#276A61;
  --ink:#0e1c33; --muted:#4d6076; --muted2:#6d8098;
  --line:rgba(18,60,124,.12);
  --r-md:22px; --r-sm:16px;
  --fs-xs:.75rem; --fs-sm:.82rem; --fs-base:.9rem; --fs-md:1rem; --fs-lg:1.4rem; --fs-xl:2.2rem;
  --ease:cubic-bezier(.16,1,.3,1);
  --viewport-h:100vh; --viewport-offset-top:0px;
  --safe-top:env(safe-area-inset-top, 0px); --safe-right:env(safe-area-inset-right, 0px);
  --safe-bottom:env(safe-area-inset-bottom, 0px); --safe-left:env(safe-area-inset-left, 0px);
}
@supports (height:100dvh) { :root { --viewport-h:100dvh; } }
html,body { height:var(--viewport-h); font-family:'Inter',system-ui,sans-serif; color:var(--ink);
  background:#edf5f5; overflow:hidden; -webkit-font-smoothing:antialiased; text-rendering:optimizeLegibility; }

/* ============ FOND ATMOSPHÉRIQUE ============ */
.bg-base { position:fixed; inset:0; z-index:0; pointer-events:none;
  background:
    radial-gradient(1300px 760px at 14% -10%, rgba(18,60,124,.16), transparent 58%),
    radial-gradient(1200px 720px at 88% -8%, rgba(116,187,164,.09), transparent 58%),
    radial-gradient(900px 700px at 50% 120%, rgba(47,107,255,.12), transparent 60%),
    linear-gradient(180deg,#f5f9fd 0%, #edf5f5 48%, #e5f3ed 100%); }
.aurora { position:fixed; inset:-15%; z-index:0; pointer-events:none; filter:blur(80px); opacity:.7;
  background:conic-gradient(from 200deg at 32% 22%, rgba(18,60,124,.22), transparent 26%,
    rgba(116,187,164,.09) 52%, transparent 76%, rgba(47,107,255,.18));
  animation:drift 32s ease-in-out infinite alternate; }
@keyframes drift { 0%{transform:translate3d(-2%,-1%,0) rotate(0) scale(1.06);}
  100%{transform:translate3d(2%,1%,0) rotate(7deg) scale(1.16);} }
.halo { position:fixed; border-radius:50%; filter:blur(110px) saturate(1.25); z-index:0; pointer-events:none; }
.halo.b { width:820px; height:820px; left:-4%; top:-26%;
  background:radial-gradient(circle, rgba(77,139,181,.24), rgba(18,60,124,.10) 46%, transparent 66%);
  animation:breathe 12s ease-in-out infinite; }
.halo.r { width:760px; height:760px; right:-3%; top:-18%;
  background:radial-gradient(circle, rgba(116,187,164,.16), rgba(116,187,164,.05) 46%, transparent 66%);
  animation:breathe 14s ease-in-out infinite reverse; }
.halo.c { width:980px; height:560px; left:50%; top:34%; --tx:-50%;
  background:radial-gradient(ellipse, rgba(47,107,255,.18), transparent 70%);
  animation:breathe 18s ease-in-out infinite; }
@keyframes breathe { 0%,100%{opacity:.5; transform:translate(var(--tx,0),0) scale(1);}
  50%{opacity:.92; transform:translate(var(--tx,0),-16px) scale(1.14);} }
.grid { position:fixed; left:0; right:0; top:0; height:520px; z-index:0; opacity:.45;
  background-image:linear-gradient(rgba(18,60,124,.05) 1px,transparent 1px),
    linear-gradient(90deg,rgba(18,60,124,.05) 1px,transparent 1px);
  background-size:56px 56px;
  -webkit-mask-image:linear-gradient(180deg,#000,transparent); mask-image:linear-gradient(180deg,#000,transparent); }
.vign { position:fixed; inset:0; z-index:0; pointer-events:none; box-shadow:inset 0 0 260px rgba(7,26,58,.16); }
.grain { position:fixed; inset:0; z-index:0; pointer-events:none; opacity:.5; mix-blend-mode:overlay;
  background:url("data:image/svg+xml,<svg xmlns='http://www.w3.org/2000/svg' width='160' height='160'><filter id='n'><feTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='2' stitchTiles='stitch'/><feColorMatrix type='saturate' values='0'/></filter><rect width='100%25' height='100%25' filter='url(%23n)' opacity='0.4'/></svg>");
  background-size:160px; }

/* ============ LAYOUT ============ */
.page { position:relative; z-index:1; height:var(--viewport-h); display:flex; flex-direction:column;
  max-width:1000px; margin:0 auto;
  padding:calc(24px + var(--safe-top)) calc(24px + var(--safe-right)) calc(16px + var(--safe-bottom)) calc(24px + var(--safe-left));
  gap:12px; overflow:hidden;
  transition:padding .5s var(--ease), gap .5s var(--ease), max-width .5s var(--ease); }
/* en conversation : shell PLEIN ÉCRAN bord-à-bord → hauteur + largeur max pour la réponse */
.page.conversing { max-width:100%; padding:0; gap:0; }
.conversing .chatbox { border-radius:0; }

/* ============ VERRE (matériau partagé) ============ */
.glass { position:relative; isolation:isolate;
  background:linear-gradient(135deg, rgba(255,255,255,.58), rgba(255,255,255,.30) 44%, rgba(214,228,244,.40));
  backdrop-filter:blur(54px) saturate(2) brightness(1.08);
  -webkit-backdrop-filter:blur(54px) saturate(2) brightness(1.08);
  box-shadow:
    0 2px 6px rgba(7,26,58,.04),
    0 18px 40px -12px rgba(7,26,58,.18),
    0 48px 90px -28px rgba(7,26,58,.30),
    inset 0 2px 1px rgba(255,255,255,1),
    inset 0 0 0 1px rgba(255,255,255,.55),
    inset 0 -34px 60px rgba(18,60,124,.08),
    inset 0 30px 54px rgba(255,255,255,.42);
  overflow:hidden; }
.glass::after { content:""; position:absolute; inset:0; border-radius:inherit; pointer-events:none; z-index:0;
  background:linear-gradient(125deg, rgba(255,255,255,.95), transparent 16%, transparent 84%, rgba(255,255,255,.6));
  -webkit-mask:linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0);
  -webkit-mask-composite:xor; mask-composite:exclude; padding:1.5px; }

.chatbox .glint { position:absolute; top:0; bottom:0; left:-45%; width:46%; z-index:1; pointer-events:none; border-radius:inherit;
  background:linear-gradient(105deg, transparent, rgba(255,255,255,.6) 50%, transparent);
  filter:blur(7px); animation:sweep 11s ease-in-out 2s infinite; }
@keyframes sweep { 0%{left:-45%;opacity:0;} 10%{opacity:1;} 32%{left:135%;opacity:0;} 100%{left:135%;opacity:0;} }
@keyframes rise { from{opacity:0;transform:translateY(24px);} to{opacity:1;transform:translateY(0);} }
.chat-header .eyebrow { display:inline-flex; align-items:center; justify-content:center; gap:9px;
  font-weight:700; font-size:var(--fs-xs); letter-spacing:2.6px; color:var(--blue);
  text-transform:uppercase; margin-bottom:9px; }
.chat-header .eyebrow .ln { width:26px; height:2px; border-radius:2px; background:linear-gradient(90deg,transparent,var(--rose)); }
.chat-header .eyebrow .ln.r { background:linear-gradient(90deg,var(--rose),transparent); }
.chat-header h1 { font-size:var(--fs-xl); font-weight:900; color:var(--blue-dk);
  letter-spacing:-.03em; line-height:.98; }
.chat-header h1 .accent { background:linear-gradient(110deg,#225B94 5%,#368EAD 48%,#65B39A 95%);
  -webkit-background-clip:text; background-clip:text; -webkit-text-fill-color:transparent; }
.chat-header p { font-size:var(--fs-sm); color:var(--muted); margin-top:6px; max-width:460px; margin-left:auto; margin-right:auto; line-height:1.5; }

/* ============ ACTIONS : Retour (bleu, haut-GAUCHE) + Nouvelle question (rose, haut-DROITE) ============ */

/* ============ BOUTON NOUVELLE QUESTION — ROSE, HAUT-DROITE ============ */
.reset-btn { position:fixed; top:max(18px, calc(var(--safe-top) + 10px)); right:max(18px, calc(var(--safe-right) + 10px)); z-index:50;
  display:inline-flex; align-items:center; gap:9px; cursor:pointer; font-family:inherit;
  padding:11px 18px 11px 14px; border-radius:40px;
  font-size:var(--fs-xs); font-weight:800; letter-spacing:.04em; color:#fff;
  background:linear-gradient(135deg, var(--rose) 0%, var(--rose-dk) 100%);
  border:1px solid rgba(255,255,255,.45);
  box-shadow:0 6px 18px -6px rgba(54,132,119,.5), 0 2px 4px rgba(150,0,82,.18),
    inset 0 1px 1px rgba(255,255,255,.6), inset 0 -8px 18px rgba(150,0,82,.28);
  transition:transform .25s var(--ease), box-shadow .25s, background .25s; }
.reset-btn[hidden] { display:none; }
.reset-btn svg { width:16px; height:16px; fill:none; stroke:#fff; stroke-width:2.4; }
.reset-btn:hover { transform:translateY(-2px);
  background:linear-gradient(135deg, var(--rose-lt) 0%, var(--rose) 100%);
  box-shadow:0 12px 26px -6px rgba(54,132,119,.6), inset 0 1px 1px rgba(255,255,255,.7),
    inset 0 -8px 18px rgba(150,0,82,.3); }
.reset-btn:active { transform:translateY(0); }

/* ============ BOUTON RETOUR INTRANET — BLEU, HAUT-GAUCHE (liquid glass) ============ */
.back-intra { position:fixed; top:max(18px, calc(var(--safe-top) + 10px)); left:max(18px, calc(var(--safe-left) + 10px)); z-index:50;
  display:inline-flex; align-items:center; gap:9px; cursor:pointer; text-decoration:none;
  padding:11px 18px 11px 14px; border-radius:40px;
  font-family:inherit; font-size:var(--fs-xs); font-weight:800; letter-spacing:.08em;
  text-transform:uppercase; color:#fff;
  background:linear-gradient(135deg, var(--blue) 0%, var(--blue-lt) 100%);
  backdrop-filter:blur(24px) saturate(1.8); -webkit-backdrop-filter:blur(24px) saturate(1.8);
  border:1px solid rgba(255,255,255,.45);
  box-shadow:0 6px 18px -6px rgba(7,26,58,.45),
    0 2px 4px rgba(7,26,58,.18),
    inset 0 1px 1px rgba(255,255,255,.7),
    inset 0 -8px 18px rgba(18,60,124,.25);
  transition:transform .25s var(--ease), box-shadow .25s, background .25s; }
.back-intra svg { width:16px; height:16px; fill:none; stroke:#fff; stroke-width:2.4; }
.back-intra:hover { transform:translateY(-2px);
  background:linear-gradient(135deg, var(--blue-dk) 0%, var(--blue) 100%);
  box-shadow:0 12px 26px -6px rgba(7,26,58,.55),
    inset 0 1px 1px rgba(255,255,255,.85),
    inset 0 -8px 18px rgba(18,60,124,.3); }
.back-intra:active { transform:translateY(0); }
@media (max-width:560px){ .back-intra{padding:11px 13px;} }
/* ============ EN-TÊTE INTERNE (fusionné) ============ */
.chat-header { position:relative; z-index:2; padding:26px 30px 20px; text-align:center;
  transition:padding .5s var(--ease); }
.chat-header .eyebrow, .chat-header p { transition:opacity .35s var(--ease), max-height .5s var(--ease), margin .5s var(--ease); overflow:hidden; }
.chat-header h1 { transition:font-size .5s var(--ease); }
/* ===== Header replié en conversation : bande slim → max d'espace réponse ===== */
.conversing .chat-header { padding:13px 30px 11px; }
.conversing .chat-header .eyebrow { opacity:0; max-height:0; margin:0; pointer-events:none; }
.conversing .chat-header p { opacity:0; max-height:0; margin:0; pointer-events:none; }
.conversing .chat-header h1 { font-size:1.25rem; }
.chat-sep { position:relative; z-index:2; height:1px; margin:0 30px;
  background:linear-gradient(90deg,transparent,rgba(18,60,124,.16),transparent); }
/* ============ CHATBOX ============ */
.chatbox { flex:1 1 auto; border-radius:var(--r-md); display:flex; flex-direction:column; min-height:0;
  animation:rise .9s var(--ease) .1s both; }
.messages { position:relative; z-index:2; flex:1 1 auto; min-height:0; overflow-y:auto; padding:30px 30px 18px;
  display:flex; flex-direction:column; gap:18px; scroll-behavior:smooth; }
.messages::-webkit-scrollbar { width:6px; }
.messages::-webkit-scrollbar-track { background:transparent; }
.messages::-webkit-scrollbar-thumb { background:rgba(18,60,124,.2); border-radius:10px; }

/* ====== ÉTAT D'ACCUEIL (habité) ====== */
.welcome { width:100%; max-width:720px; margin:0 auto; text-align:center; padding:18px 20px 20px;
  flex:1; display:flex; flex-direction:column; align-items:center;
  container-type:inline-size; container-name:welcome;
  animation:fadeUp .7s var(--ease) .25s both; }
.welcome-cta { margin-top:auto; margin-bottom:auto; width:100%;
  display:flex; flex-direction:column; align-items:center; gap:16px; }
.welcome-logo { position:relative; width:100%; display:flex; align-items:center; justify-content:center;
  margin-bottom:0; animation:floaty 5.5s ease-in-out infinite; }
.welcome-logo img { width:180px; max-width:50%; height:auto; object-fit:contain; display:block; margin:0 auto; }
@keyframes floaty { 0%,100%{transform:translateY(0);} 50%{transform:translateY(-7px);} }
.welcome h2 { font-size:var(--fs-lg); font-weight:800; color:var(--blue-dk); letter-spacing:-.025em; margin-top:0; }
.sug-label { font-size:var(--fs-xs); font-weight:700; letter-spacing:2px; text-transform:uppercase;
  color:var(--muted2); margin-top:4px; }
/* suggestions en cartes riches */
.suggestions { display:grid; grid-template-columns:repeat(3,1fr); gap:10px; width:100%; margin-top:2px; }
.sug-btn { position:relative; overflow:hidden; text-align:left; cursor:pointer; font-family:inherit;
  display:flex; align-items:center; gap:11px; padding:13px 15px; border-radius:var(--r-sm);
  background:linear-gradient(135deg, rgba(255,255,255,.66), rgba(246,249,252,.42));
  border:1px solid rgba(255,255,255,.7);
  box-shadow:0 6px 16px -6px rgba(18,60,124,.16), inset 0 1px 1px rgba(255,255,255,.9);
  transition:transform .28s var(--ease), box-shadow .28s var(--ease), border-color .28s; }
.sug-btn .sug-ic { flex-shrink:0; width:38px; height:38px; border-radius:12px; display:flex; align-items:center; justify-content:center;
  background:linear-gradient(135deg, rgba(18,60,124,.10), rgba(18,60,124,.04));
  box-shadow:inset 0 0 0 1px rgba(18,60,124,.10), inset 0 1px 1px rgba(255,255,255,.8);
  transition:background .28s var(--ease), box-shadow .28s; }
.sug-btn .sug-ic svg { width:20px; height:20px; fill:none; stroke:var(--blue); stroke-width:1.5;
  stroke-linecap:round; stroke-linejoin:round; transition:stroke .28s; }
.sug-btn .sug-tx { font-size:var(--fs-sm); font-weight:600; color:var(--blue-dk); line-height:1.25; }
.sug-btn::after { content:""; position:absolute; top:0; left:-60%; width:50%; height:100%;
  background:linear-gradient(105deg,transparent,rgba(255,255,255,.5),transparent); transition:left .5s var(--ease); }
.sug-btn:hover { transform:translateY(-3px); border-color:rgba(116,187,164,.35);
  box-shadow:0 14px 30px -8px rgba(18,60,124,.28), inset 0 1px 1px rgba(255,255,255,.95); }
.sug-btn:hover::after { left:140%; }
.sug-btn:hover .sug-ic { background:linear-gradient(135deg,var(--blue),var(--blue-lt)); }
.sug-btn:hover .sug-ic svg { stroke:#fff; }

/* ====== BULLES ====== */
.bubble { display:flex; gap:11px; align-items:flex-end; animation:fadeUp .3s ease both; }
@keyframes fadeUp { from{opacity:0;transform:translateY(10px);} to{opacity:1;transform:translateY(0);} }
.bubble.user { flex-direction:row-reverse; }
.bubble-avatar { width:34px; height:34px; border-radius:50%; flex-shrink:0;
  display:flex; align-items:center; justify-content:center; font-size:.78rem; font-weight:700;
  box-shadow:0 5px 14px rgba(18,60,124,.24), inset 0 1px 1px rgba(255,255,255,.3); }
.bubble.user .bubble-avatar { background:linear-gradient(135deg,var(--rose),var(--rose-lt)); color:#fff; }
.bubble.bot .bubble-avatar { background:linear-gradient(135deg,var(--blue),var(--blue-lt)); color:#fff; font-size:.82rem; }
.bubble-body { display:flex; flex-direction:column; gap:7px; max-width:78%; }
/* plein écran : on plafonne la largeur de lecture (confort) tout en gardant la hauteur mini */
.conversing .bubble.bot .bubble-body { max-width:min(86%, 820px); }
/* ===== DESKTOP : sommaire latéral cliquable + colonne de lecture unique aérée ===== */
/* Le sommaire (généré des titres) occupe la marge gauche ; la réponse reste sur UNE
   colonne lisible. On saute à une section d'un clic, sans chercher dans le texte. */
.answer-layout { width:100%; }
@media (min-width:1080px) {
  .conversing .bubble.bot { align-items:flex-start; }       /* avatar calé en haut */
  .conversing .bubble.bot .bubble-body { flex:1 1 auto; max-width:calc(100% - 46px); }
  .answer-layout { display:flex; gap:40px; align-items:flex-start;
    max-width:1180px; margin:0 auto; }
  .answer-toc { flex:0 0 236px; position:sticky; top:2px; align-self:flex-start;
    max-height:calc(100dvh - 160px); overflow:auto; padding:2px 0; }
  .answer-toc .toc-title { font-size:var(--fs-xs); font-weight:800; letter-spacing:1.6px;
    text-transform:uppercase; color:var(--muted2); margin:0 0 10px 14px; }
  .answer-toc a { display:block; text-decoration:none; color:var(--muted);
    font-size:var(--fs-sm); font-weight:600; line-height:1.35; padding:8px 14px;
    border-left:2px solid transparent; border-radius:0 8px 8px 0;
    transition:color .2s, background .2s, border-color .2s; }
  .answer-toc a:hover { color:var(--blue-dk); background:rgba(18,60,124,.05); }
  .answer-toc a.active { color:var(--rose-dk); border-left-color:var(--rose);
    background:rgba(116,187,164,.08); }
  .answer-layout .bubble-text.md { flex:1 1 auto; max-width:760px; }
}
@media (max-width:1079px) { .answer-toc { display:none; } }
.bubble.user .bubble-body { align-items:flex-end; }
.bubble-text { border-radius:18px; padding:13px 17px; font-size:var(--fs-base); line-height:1.55;
  white-space:pre-wrap; word-break:break-word; }
/* Bulle bot avec Markdown rendu : on annule le pre-wrap et on style les éléments */
/* --fit : multiplicateur d'auto-ajustement (réduit par JS si la réponse dépasse l'écran) */
.bubble-text.md { white-space:normal; font-size:calc(var(--fs-base) * var(--fit,1));
  transition:font-size .25s var(--ease); }
.bubble-text.md p { margin:0 0 .5em; }
.bubble-text.md p:last-child { margin-bottom:0; }
/* Titres : gras + soulignés, couleur bleu SNE-CGC */
.bubble-text.md h4 { font-size:.97rem; font-weight:800; color:var(--blue-dk);
  margin:.85em 0 .4em; letter-spacing:-.01em; padding-bottom:.22em;
  border-bottom:2px solid; border-image:linear-gradient(90deg,var(--blue),var(--rose)) 1; }
.bubble-text.md h4:first-child { margin-top:0; }
.bubble-text.md ol { margin:.25em 0 .65em; padding-left:1.35em; }
.bubble-text.md li { margin:.28em 0; }
.bubble-text.md ol li::marker { color:var(--blue); font-weight:700; }    /* numéros bleus SNE-CGC */
/* Puces premium SNE-CGC : losange dégradé bleu→rose */
.bubble-text.md ul { list-style:none; margin:.3em 0 .7em; padding-left:1.45em; }
.bubble-text.md ul li { position:relative; }
.bubble-text.md ul li::before {
  content:''; position:absolute; left:-1.2em; top:.52em;
  width:7px; height:7px; border-radius:2px; transform:rotate(45deg);
  background:linear-gradient(135deg,var(--blue) 0%,var(--rose) 100%);
  box-shadow:0 1px 2px rgba(54,132,119,.30), inset 0 1px 0 rgba(255,255,255,.5); }
/* sous-listes : puce rose pleine, plus discrète */
.bubble-text.md ul ul li::before {
  background:var(--rose-lt); box-shadow:none; width:6px; height:6px; }
.bubble-text.md strong { color:var(--blue-dk); font-weight:700; }
.bubble-text.md em { color:var(--blue); font-style:italic; }
.bubble-text.md code { background:rgba(18,60,124,.08); border-radius:5px;
  padding:.05em .35em; font-size:.88em; }
.bubble-text.md br { line-height:.5; }
/* Extraits : texte droit, paragraphes continus, référence séparée. */
.bubble-text.md blockquote.cite {
  margin:1.15em 0; padding:20px 22px;
  border:1px solid #d5e5e3; border-left:3px solid #72aaa2;
  border-radius:4px 14px 14px 4px; background:linear-gradient(115deg,#f6faf9,#f1f6f8);
  box-shadow:0 5px 18px -15px #173d5060;
}
.bubble-text.md blockquote.cite .cite-ln {
  color:#253f50; font-style:normal; line-height:1.75; margin:0;
}
.bubble-text.md blockquote.cite .cite-ln + .cite-ln { margin-top:.9em; }
.bubble-text.md blockquote.cite .cite-ref {
  display:block; margin-top:16px; padding-top:12px; border-top:1px solid #d5e5e3;
  color:#386961; font-size:.8em; font-weight:600; line-height:1.5; font-style:normal;
}
/* Séparateur de sections */
.bubble-text.md hr { border:0; height:1px; margin:.8em 0;
  background:linear-gradient(90deg,transparent,rgba(18,60,124,.28),transparent); }
/* Tableaux : style SNE-CGC moderne (en-tête dégradé bleu, lignes zébrées, coins arrondis) */
.bubble-text.md table.md-table { border-collapse:separate; border-spacing:0; width:100%;
  margin:.6em 0 .8em; font-size:.84rem; line-height:1.45;
  border:1px solid rgba(18,60,124,.14); border-radius:12px; overflow:hidden;
  box-shadow:0 4px 14px -8px rgba(18,60,124,.25); }
.bubble-text.md table.md-table thead th {
  background:linear-gradient(135deg,var(--blue),var(--blue-lt)); color:#fff;
  font-weight:700; text-align:left; padding:.6em .8em; white-space:nowrap; }
.bubble-text.md table.md-table tbody td {
  padding:.55em .8em; border-top:1px solid rgba(18,60,124,.1);
  color:var(--ink); vertical-align:top; }
.bubble-text.md table.md-table tbody tr:nth-child(even) td { background:rgba(18,60,124,.045); }
.bubble-text.md table.md-table tbody td:first-child {
  font-weight:700; color:var(--rose-dk); white-space:nowrap; }
.bubble.user .bubble-text { background:linear-gradient(135deg,var(--blue),var(--blue-lt)); color:#fff;
  border-bottom-right-radius:5px; box-shadow:0 8px 22px -6px rgba(18,60,124,.4), inset 0 1px 1px rgba(255,255,255,.25); }
.bubble.bot .bubble-text { background:linear-gradient(135deg, rgba(255,255,255,.74), rgba(246,249,252,.5));
  backdrop-filter:blur(20px) saturate(1.6); -webkit-backdrop-filter:blur(20px) saturate(1.6);
  color:var(--ink); border:1px solid rgba(255,255,255,.7); border-bottom-left-radius:5px;
  box-shadow:0 8px 22px -8px rgba(18,60,124,.16), inset 0 1px 1px rgba(255,255,255,.9); }

/* sources */
.sources { display:flex; flex-wrap:wrap; gap:6px; padding:0 4px; }
.source-chip { display:flex; align-items:center; gap:6px; cursor:pointer; font-weight:600;
  backdrop-filter:blur(14px) saturate(1.5); -webkit-backdrop-filter:blur(14px) saturate(1.5);
  background:rgba(255,255,255,.5); border:1px solid rgba(18,60,124,.16); border-radius:20px;
  padding:5px 12px; font-size:var(--fs-xs); color:var(--blue);
  box-shadow:inset 0 1px 1px rgba(255,255,255,.8); transition:all .2s; }
.source-chip:hover { background:rgba(255,255,255,.92); transform:translateY(-1px);
  box-shadow:0 6px 16px -4px rgba(18,60,124,.22); }
.source-chip svg { width:12px; height:12px; stroke:var(--blue); stroke-width:2; fill:none; }
/* Accords = rose SNE-CGC ; Livret = bleu SNE-CGC (par défaut) */
.source-chip.is-accord { color:var(--rose-dk); border-color:rgba(116,187,164,.35); }
.source-chip.is-accord svg { stroke:var(--rose); }
.source-chip.is-accord:hover { box-shadow:0 6px 16px -4px rgba(54,132,119,.25); }

/* typing */
.typing { display:flex; align-items:center; gap:5px; padding:13px 17px; }
.typing span { width:7px; height:7px; border-radius:50%; background:var(--blue-lt); opacity:.4;
  animation:blink 1.2s ease-in-out infinite; }
.typing span:nth-child(2){animation-delay:.2s;} .typing span:nth-child(3){animation-delay:.4s;}
@keyframes blink { 0%,80%,100%{opacity:.2;transform:scale(.8);} 40%{opacity:1;transform:scale(1);} }

/* séparateur + saisie */
.input-sep { position:relative; z-index:2; height:1px; margin:0 22px;
  background:linear-gradient(90deg,transparent,rgba(18,60,124,.14),transparent); }
/* alerte données personnelles (RGPD) */
.perso-alert { position:relative; z-index:2; margin:14px 22px 0; padding:12px 15px;
  display:none; align-items:flex-start; gap:10px; border-radius:14px;
  background:linear-gradient(135deg, rgba(116,187,164,.14), rgba(116,187,164,.07));
  border:1px solid rgba(54,132,119,.32);
  box-shadow:inset 0 1px 1px rgba(255,255,255,.6);
  font-size:var(--fs-sm); color:var(--rose-dk); line-height:1.45;
  animation:fadeUp .25s ease both; }
.perso-alert.show { display:flex; }
.perso-alert strong { color:var(--rose-dk); font-weight:700; }
.perso-alert svg { flex-shrink:0; width:18px; height:18px; margin-top:1px;
  fill:none; stroke:var(--rose-dk); stroke-width:2; stroke-linecap:round; stroke-linejoin:round; }
.input-area { position:relative; z-index:2; padding:18px 22px 22px; display:flex; gap:11px; align-items:flex-end; }
.input-wrap { flex:1; position:relative; }
textarea { width:100%; font-family:inherit; font-size:var(--fs-base); color:var(--ink); resize:none; outline:none;
  background:rgba(255,255,255,.55); border:1.5px solid rgba(255,255,255,.8); border-radius:var(--r-sm);
  padding:14px 17px; line-height:1.5; max-height:120px; min-height:50px;
  backdrop-filter:blur(20px) saturate(1.5); -webkit-backdrop-filter:blur(20px) saturate(1.5);
  box-shadow:inset 0 1px 3px rgba(18,60,124,.07), inset 0 1px 1px rgba(255,255,255,.8);
  transition:border-color .2s, box-shadow .2s, background .2s; }
textarea:focus { border-color:rgba(18,60,124,.4); background:rgba(255,255,255,.85);
  box-shadow:0 0 0 4px rgba(18,60,124,.1), inset 0 1px 1px rgba(255,255,255,.9); }
textarea::placeholder { color:var(--muted2); }
.send-btn { width:50px; height:50px; border-radius:16px; flex-shrink:0; border:none; cursor:pointer;
  position:relative; overflow:hidden; display:flex; align-items:center; justify-content:center;
  background:linear-gradient(135deg, var(--rose) 0%, var(--rose-dk) 100%);
  box-shadow:0 10px 24px -6px rgba(54,132,119,.55), inset 0 2px 1px rgba(255,255,255,.5), inset 0 -9px 18px rgba(150,0,82,.35);
  transition:transform .15s, box-shadow .15s, opacity .2s; }
.send-btn::before { content:""; position:absolute; inset:0; border-radius:inherit; pointer-events:none;
  background:linear-gradient(120deg, rgba(255,255,255,.85), transparent 32%); }
.send-btn:hover { transform:translateY(-2px); box-shadow:0 14px 30px -6px rgba(54,132,119,.65), inset 0 2px 1px rgba(255,255,255,.5), inset 0 -9px 18px rgba(150,0,82,.35); }
.send-btn:active { transform:translateY(0); }
.send-btn:disabled { opacity:.45; cursor:default; transform:none; }
.send-btn svg { position:relative; z-index:1; width:21px; height:21px; fill:none; stroke:#fff; stroke-width:2.2; }

/* ============ UX 2026 : focus, actions, spinner, statut, FAB, hint, cascade ============ */
/* Accessibilité clavier : anneau de focus visible (hors souris) */
:focus-visible { outline:3px solid rgba(18,60,124,.45); outline-offset:2px; border-radius:8px; }
textarea:focus-visible { outline:none; }

/* Actions sous une réponse bot : Copier / Réessayer */
.msg-actions { display:flex; flex-wrap:wrap; gap:6px; padding:0 4px; }
.copy-btn, .retry-btn { display:inline-flex; align-items:center; gap:6px; cursor:pointer; font-family:inherit;
  font-size:var(--fs-xs); font-weight:700; color:var(--blue); padding:6px 12px; border-radius:20px;
  backdrop-filter:blur(14px) saturate(1.5); -webkit-backdrop-filter:blur(14px) saturate(1.5);
  background:rgba(255,255,255,.5); border:1px solid rgba(18,60,124,.16);
  box-shadow:inset 0 1px 1px rgba(255,255,255,.8); transition:all .2s; }
.copy-btn:hover, .retry-btn:hover { background:rgba(255,255,255,.92); transform:translateY(-1px);
  box-shadow:0 6px 16px -4px rgba(18,60,124,.22); }
.copy-btn svg, .retry-btn svg { width:13px; height:13px; fill:none; stroke:currentColor; stroke-width:2.2;
  stroke-linecap:round; stroke-linejoin:round; }
.copy-btn.done { color:#1d7a4f; border-color:rgba(29,122,79,.35); background:rgba(29,122,79,.08); }
.retry-btn { color:var(--rose-dk); border-color:rgba(116,187,164,.35); }
.retry-btn:hover { box-shadow:0 6px 16px -4px rgba(54,132,119,.25); }

/* Bouton envoi : spinner pendant la requête */
.send-btn.loading svg { opacity:0; }
.send-btn.loading::after { content:""; position:absolute; z-index:1; width:20px; height:20px; border-radius:50%;
  border:2.5px solid rgba(255,255,255,.35); border-top-color:#fff; animation:spin .7s linear infinite; }
@keyframes spin { to { transform:rotate(360deg); } }

/* Statut de recherche sous l'indicateur de saisie (latence API perçue) */
.typing-status { font-size:var(--fs-xs); font-weight:600; color:var(--muted);
  padding:0 17px 11px; animation:fadeUp .3s ease both; }

/* FAB « aller en bas » (desktop, conversation longue) */
.scroll-fab { position:absolute; right:22px; bottom:104px; z-index:5; width:40px; height:40px;
  border-radius:50%; border:1px solid rgba(255,255,255,.7); cursor:pointer;
  display:flex; align-items:center; justify-content:center; opacity:0; pointer-events:none;
  background:rgba(255,255,255,.8); backdrop-filter:blur(14px) saturate(1.5);
  -webkit-backdrop-filter:blur(14px) saturate(1.5);
  box-shadow:0 8px 20px -6px rgba(7,26,58,.35), inset 0 1px 1px rgba(255,255,255,.9);
  transition:opacity .25s var(--ease), transform .25s var(--ease), background .2s; transform:translateY(6px); }
.scroll-fab.show { opacity:1; pointer-events:auto; transform:translateY(0); }
.scroll-fab:hover { background:#fff; }
.scroll-fab svg { width:18px; height:18px; fill:none; stroke:var(--blue); stroke-width:2.4;
  stroke-linecap:round; stroke-linejoin:round; }

/* Hint clavier sous la saisie (desktop) */
.input-hint { position:relative; z-index:2; text-align:right; font-size:.75rem; color:var(--muted);
  padding:0 24px 10px; margin-top:-12px; letter-spacing:.01em; }
.input-hint kbd { font-family:inherit; font-weight:700; color:var(--muted);
  background:rgba(18,60,124,.07); border:1px solid rgba(18,60,124,.14); border-radius:5px; padding:1px 5px; }

/* Suggestions : entrée en cascade */
.suggestions .sug-btn { animation:fadeUp .55s var(--ease) both; }
.suggestions .sug-btn:nth-child(1){animation-delay:.30s;} .suggestions .sug-btn:nth-child(2){animation-delay:.38s;}
.suggestions .sug-btn:nth-child(3){animation-delay:.46s;} .suggestions .sug-btn:nth-child(4){animation-delay:.54s;}
.suggestions .sug-btn:nth-child(5){animation-delay:.62s;} .suggestions .sug-btn:nth-child(6){animation-delay:.70s;}

/* Pied d'interface : deux niveaux lisibles, sans répétitions */
.interface-footer { position:relative; z-index:3; display:grid; gap:5px; color:var(--muted);
  font-size:.75rem; line-height:1.45; padding:2px 10px 0; }
.footer-priority { display:flex; align-items:center; justify-content:center; gap:10px; flex-wrap:wrap; }
.footer-warning { color:var(--blue-dk); font-weight:700; }
.footer-secondary { text-align:center; color:var(--muted); }
.footer-privacy { display:inline-flex; align-items:center; justify-content:center; gap:6px;
  min-height:34px; padding:6px 13px; border-radius:999px; color:#fff; text-decoration:none;
  font-size:.75rem; font-weight:800; background:linear-gradient(135deg,var(--rose),var(--rose-dk));
  box-shadow:0 5px 14px -7px rgba(54,132,119,.55), inset 0 1px 1px rgba(255,255,255,.45); }
.footer-privacy:hover { transform:translateY(-1px); }
.footer-privacy svg { width:13px; height:13px; fill:none; stroke:#fff; stroke-width:2.2; }
.conversing .footer-secondary { display:none; }
.conversing .interface-footer { padding-block:4px; }

/* modal */
.modal-overlay { position:fixed; inset:0; z-index:100; background:rgba(7,26,58,.4);
  padding:calc(12px + var(--safe-top)) calc(12px + var(--safe-right)) calc(12px + var(--safe-bottom)) calc(12px + var(--safe-left));
  backdrop-filter:blur(8px); display:none; align-items:center; justify-content:center;
  overflow:hidden; animation:fadeIn .2s ease; }
.modal-overlay.open { display:flex; }
@keyframes fadeIn { from{opacity:0;} to{opacity:1;} }
.modal { position:relative; max-width:560px; width:min(90%, 560px); border-radius:24px; padding:28px 32px;
  max-height:calc(var(--viewport-h) - var(--safe-top) - var(--safe-bottom) - 24px);
  display:flex; flex-direction:column; overflow:hidden;
  background:linear-gradient(135deg, rgba(255,255,255,.94), rgba(246,249,252,.88));
  backdrop-filter:blur(34px) saturate(1.6);
  box-shadow:0 50px 100px -20px rgba(7,26,58,.4), inset 0 2px 1px rgba(255,255,255,1), inset 0 0 0 1px rgba(255,255,255,.65);
  animation:slideUp .3s var(--ease); }
@keyframes slideUp { from{transform:translateY(22px);opacity:0;} to{transform:translateY(0);opacity:1;} }
.modal-header { flex:0 0 auto; display:flex; align-items:center; justify-content:space-between; margin-bottom:16px; }
.modal-title { font-size:var(--fs-md); font-weight:800; color:var(--blue-dk); }
.modal-close { width:32px; height:32px; border:none; background:rgba(18,60,124,.08); border-radius:10px;
  cursor:pointer; display:flex; align-items:center; justify-content:center; color:var(--muted); font-size:1.1rem; transition:background .2s; }
.modal-close:hover { background:rgba(18,60,124,.16); }
.modal-accord { font-size:var(--fs-xs); font-weight:700; color:var(--blue); text-transform:uppercase; letter-spacing:.04em; margin-bottom:4px; }
.modal-section { font-size:var(--fs-base); font-weight:600; color:var(--ink); margin-bottom:12px; }
.modal-body { min-height:0; overflow-y:auto; overscroll-behavior:contain; padding-right:4px;
  font-size:var(--fs-sm); color:var(--ink); line-height:1.65; white-space:pre-wrap; }

/* ============ RESPONSIVE FONDÉ SUR L'ESPACE RÉEL ============ */
@media (min-width:641px) {
  .chat-header { padding:clamp(14px, 2.3dvh, 24px) 30px clamp(10px, 1.6dvh, 18px); }
  .messages { padding:clamp(10px, 1.8dvh, 24px) 30px 10px; }
  .page:not(.conversing) .messages { overflow:hidden; }
  .welcome { padding:clamp(3px, .8dvh, 12px) 20px clamp(4px, 1dvh, 12px); }
  .welcome-logo img { width:clamp(118px, 18dvh, 180px); max-width:none; }
  .welcome-cta { gap:clamp(9px, 1.45dvh, 16px); }
  .welcome h2 { font-size:clamp(1.1rem, 2dvh, 1.4rem); }
  .suggestions { gap:12px; margin-top:2px; }
  .sug-btn { min-height:62px; padding:12px 15px; }
  .input-area { padding:clamp(9px, 1.5dvh, 16px) 22px clamp(10px, 1.7dvh, 18px); }
  textarea { font-size:1rem; }
}

/* Portable ou fenêtre desktop peu haute : compacter sans réduire la lisibilité. */
@media (min-width:641px) and (max-height:720px) {
  .page { padding:calc(14px + var(--safe-top)) calc(20px + var(--safe-right)) calc(10px + var(--safe-bottom)) calc(20px + var(--safe-left)); gap:8px; }
  .chat-header { padding:9px 26px 7px; }
  .chat-header h1 { font-size:1.65rem; }
  .chat-header .eyebrow { margin-bottom:4px; }
  .chat-header p { display:none; }
  .messages { padding:5px 26px 6px; }
  .welcome { padding:0 16px 2px; }
  .welcome-logo img { width:clamp(108px, 18dvh, 126px); }
  .welcome-cta { gap:7px; }
  .welcome h2 { font-size:1.1rem; }
  .sug-label { margin-top:0; }
  .suggestions { gap:8px 10px; margin-top:0; }
  .sug-btn { min-height:54px; padding:8px 12px; }
  .sug-btn .sug-ic { width:34px; height:34px; border-radius:10px; }
  .input-area { padding:8px 18px 9px; }
  textarea { min-height:48px; padding:12px 15px; }
  .send-btn { width:48px; height:48px; }
  .input-hint { margin-top:-10px; padding:0 20px 6px; }
  .interface-footer { gap:3px; padding-top:0; }
  .footer-privacy { min-height:30px; padding-block:4px; }
}

/* Grand desktop : shell plus présent, colonne de réponse inchangée. */
@media (min-width:1240px) and (min-height:721px) {
  .page { max-width:1240px; }
  .welcome { max-width:900px; }
  .chat-header p { max-width:560px; }
  .welcome-logo img { width:clamp(160px, 18dvh, 200px); }
  .suggestions { gap:14px; }
}

/* Mobile portrait + tout écran paysage réellement peu haut. */
@media (max-width:640px), (orientation:landscape) and (max-height:520px) {
  html, body { height:auto; min-height:var(--viewport-h); overflow-x:hidden; overflow-y:auto; }
  .page { height:auto; min-height:var(--viewport-h); overflow:visible;
    padding:calc(64px + var(--safe-top)) calc(12px + var(--safe-right)) calc(16px + var(--safe-bottom)) calc(12px + var(--safe-left));
    gap:10px; }
  .page:not(.conversing) .chatbox { flex:0 0 auto; overflow:visible; }
  .page:not(.conversing) .messages { flex:0 0 auto; overflow:visible; }
  .page:not(.conversing) .welcome { flex:0 0 auto; }
  .page.conversing { position:fixed; top:var(--viewport-offset-top); right:0; bottom:auto; left:0;
    width:100%; height:var(--viewport-h); min-height:0; overflow:hidden;
    padding:calc(6px + var(--safe-top)) calc(8px + var(--safe-right)) calc(6px + var(--safe-bottom)) calc(8px + var(--safe-left));
    gap:6px; }
  .page.conversing .chatbox { flex:1 1 auto; min-height:0; overflow:hidden; }
  .page.conversing .messages { flex:1 1 auto; min-height:0; overflow-y:auto; overscroll-behavior:contain; }
  .page.conversing .input-area { position:relative; flex:0 0 auto; }
  .conversing .chat-header { padding:9px 58px 8px; }
  .conversing .chat-header h1 { font-size:1.08rem; }
  .chat-header h1 { font-size:1.55rem; }
  .chat-header p { display:none; }
  .chat-header .eyebrow { margin-bottom:6px; font-size:.75rem; letter-spacing:2px; }
  .messages { padding:16px 14px 10px; gap:14px; }
  .suggestions { grid-template-columns:repeat(2,minmax(0,1fr)); gap:9px; }
  .sug-btn { min-width:0; min-height:64px; padding:10px 11px; gap:9px; }
  .sug-btn .sug-ic { width:34px; height:34px; border-radius:10px; }
  .sug-btn .sug-tx { font-size:.8rem; }
  .welcome { gap:12px; padding:12px 10px 14px; }
  .welcome-logo img { width:clamp(118px, 40vw, 174px); max-width:52%; }
  .welcome h2 { font-size:1.2rem; }
  .input-area { position:relative; padding:12px 12px 14px;
    background:linear-gradient(180deg, rgba(242,246,252,.68), rgba(232,238,247,.92));
    backdrop-filter:blur(14px) saturate(1.4); -webkit-backdrop-filter:blur(14px) saturate(1.4);
    border-radius:0 0 var(--r-md) var(--r-md); }
  textarea { font-size:16px; }
  textarea::placeholder { font-size:.9rem; }
  .reset-btn { width:44px; height:44px; padding:0; justify-content:center;
    top:max(10px, calc(var(--safe-top) + 8px)); right:max(10px, calc(var(--safe-right) + 8px)); }
  .reset-btn span { display:none; }
  .source-chip, .copy-btn, .retry-btn { min-height:44px; padding:9px 14px; }
  .scroll-fab, .input-hint { display:none; }
  .interface-footer { font-size:.75rem; gap:6px; padding:2px 4px 0; }
  .footer-priority { gap:7px; }
  .footer-warning { text-align:center; }
  .footer-privacy { min-height:44px; padding:8px 13px; }
  .footer-secondary { line-height:1.5; }
  .conversing .interface-footer { gap:2px; padding:0 4px; }
  .modal-overlay { align-items:center; }
  .modal { width:100%; max-height:calc(var(--viewport-h) - var(--safe-top) - var(--safe-bottom) - 20px);
    border-radius:18px; padding:18px 16px; }
  .modal-header { margin-bottom:12px; }
  .modal-close { flex:0 0 44px; width:44px; height:44px; }
  .consent-intro { min-height:0; overflow-y:auto; overscroll-behavior:contain; padding-right:4px; }
  .consent-actions { flex:0 0 auto; }
  /* Mobile : tableaux en cartes, sans débordement horizontal. */
  .bubble-text.md table.md-table { border:0; border-radius:0; box-shadow:none; width:100%; font-size:var(--fs-sm); margin:.5em 0 .8em; }
  .bubble-text.md table.md-table thead { position:absolute; width:1px; height:1px; overflow:hidden; clip:rect(0 0 0 0); white-space:nowrap; }
  .bubble-text.md table.md-table tbody,
  .bubble-text.md table.md-table tbody tr,
  .bubble-text.md table.md-table tbody td { display:block; width:100%; }
  .bubble-text.md table.md-table tbody tr { margin:0 0 12px; border-radius:14px; overflow:hidden; background:#fff;
    border:1px solid rgba(18,60,124,.14); box-shadow:0 6px 16px -10px rgba(18,60,124,.4); }
  .bubble-text.md table.md-table tbody tr:nth-child(even) td { background:transparent; }
  .bubble-text.md table.md-table tbody td:first-child { display:flex; align-items:baseline; gap:.55em; white-space:normal; border:0;
    padding:.62em .9em; color:var(--blue-dk); font-weight:800; font-size:.95rem; letter-spacing:-.01em;
    background:linear-gradient(135deg, rgba(18,60,124,.11), rgba(116,187,164,.09)); }
  .bubble-text.md table.md-table tbody td:first-child::before { content:attr(data-label); font-size:.75rem; font-weight:700;
    letter-spacing:.06em; text-transform:uppercase; color:var(--blue); opacity:.8; flex:0 0 auto; }
  .bubble-text.md table.md-table tbody td:not(:first-child) { display:flex; justify-content:space-between; align-items:baseline;
    gap:14px; padding:.5em .9em; border-top:1px solid rgba(18,60,124,.07); text-align:right; white-space:normal;
    color:var(--ink); font-weight:700; }
  .bubble-text.md table.md-table tbody td:not(:first-child)::before { content:attr(data-label); font-weight:600;
    color:var(--muted); text-align:left; flex:0 0 auto; }
  .bubble-text.md table.md-table tbody td:empty { display:none; }
  /* Rendu mobile allégé : le panneau reste premium, les effets secondaires reculent. */
  .glass { backdrop-filter:blur(18px) saturate(1.5); -webkit-backdrop-filter:blur(18px) saturate(1.5); }
  .aurora, .halo, .glint { animation:none !important; }
  .aurora { filter:blur(48px); opacity:.5; }
  .halo { filter:blur(70px); }
  .grain { display:none; }
  .welcome-logo { animation:none !important; }
}

/* En paysage mobile, la largeur autorise trois colonnes ; la page garde un seul scroll naturel. */
@media (orientation:landscape) and (min-width:641px) and (max-height:520px) {
  .page:not(.conversing) { padding-top:calc(58px + var(--safe-top)); }
  .page:not(.conversing) .welcome { max-width:780px; }
  .suggestions { grid-template-columns:repeat(3,minmax(0,1fr)); }
  .welcome-logo img { width:112px; }
  .footer-priority { flex-wrap:nowrap; }
}

/* Cartes réellement adaptées à leur conteneur, pas à un modèle de téléphone. */
@container welcome (max-width:300px) {
  .suggestions { gap:8px; }
  .sug-btn { min-height:86px; flex-direction:column; justify-content:center; text-align:center; padding:9px 8px; }
  .sug-btn .sug-tx { font-size:.78rem; }
}
@media (prefers-reduced-motion:reduce) {
  .aurora,.halo,.glint,.welcome-logo,.suggestions .sug-btn,.chatbox { animation:none !important; }
}

/* ============ ÉCRAN DE CONSENTEMENT (P0-04 / 7.1) ============ */
#consentOverlay { z-index:200; }
#consentOverlay .modal { max-width:600px; }
.consent-intro { min-height:0; overflow-y:auto; overscroll-behavior:contain;
  font-size:var(--fs-sm); color:var(--ink); line-height:1.65; }
.consent-intro strong { color:var(--rose-dk); }
.consent-warn { margin:14px 0 4px; padding:11px 14px; border-radius:12px;
  background:linear-gradient(135deg, rgba(116,187,164,.12), rgba(116,187,164,.06));
  border:1px solid rgba(54,132,119,.3); color:var(--rose-dk);
  font-size:var(--fs-sm); line-height:1.5; }
.consent-actions { display:flex; gap:10px; justify-content:flex-end; margin-top:20px; flex-wrap:wrap; }
.consent-btn { cursor:pointer; font-family:inherit; font-weight:800; font-size:var(--fs-sm);
  padding:12px 22px; border-radius:40px; border:1px solid rgba(255,255,255,.45); color:#fff;
  background:linear-gradient(135deg, var(--blue) 0%, var(--blue-lt) 100%);
  box-shadow:0 8px 20px -8px rgba(7,26,58,.5), inset 0 1px 1px rgba(255,255,255,.6);
  transition:transform .2s var(--ease), box-shadow .2s; }
.consent-btn:hover { transform:translateY(-2px); }
.consent-btn.ghost { background:rgba(18,60,124,.08); color:var(--blue-dk);
  border-color:rgba(18,60,124,.18); box-shadow:none; }

/* la modal Confidentialité doit passer AU-DESSUS de l'écran de consentement */
#privacyOverlay { z-index:300; }
.consent-link { color:var(--rose-dk); font-weight:800; text-decoration:underline; cursor:pointer; }

/* ════════════════════════════════════════════════════════════════
   VERRE 2026 MAX — application stricte du composant « Glass effect 2026 »
   (référence : Mes Frais app.css) : verre transparent, bord taillé
   (conic sombre+lumière), reflet balayant (screen), appui 3D.
   ════════════════════════════════════════════════════════════════ */
@property --angle-1{ syntax:"<angle>"; inherits:false; initial-value:-75deg; }
@property --angle-2{ syntax:"<angle>"; inherits:false; initial-value:-45deg; }
:root{ --v-ease:cubic-bezier(.25,1,.5,1); --v-time:.4s; --shadow-ink:7,26,58; }

/* ── 1) BASE VERRE : cartes suggestions, actions, FAB ───────────── */
.sug-btn, .copy-btn, .retry-btn, .scroll-fab{
  position:relative; isolation:isolate; overflow:hidden;
  background:linear-gradient(-75deg, rgba(255,255,255,.10), rgba(255,255,255,.30), rgba(255,255,255,.10));
  backdrop-filter:blur(6px) saturate(1.8); -webkit-backdrop-filter:blur(6px) saturate(1.8);
  box-shadow:
    inset 0 2px 2px rgba(0,0,0,.05),
    inset 0 -2px 2px rgba(255,255,255,.55),
    0 4px 2px -2px rgba(0,0,0,.2),
    inset 0 0 2px 4px rgba(255,255,255,.22),
    0 12px 22px -10px rgba(var(--shadow-ink),.38);
  transition:transform var(--v-time) var(--v-ease), box-shadow var(--v-time) var(--v-ease),
    backdrop-filter var(--v-time) var(--v-ease), background var(--v-time); }
/* Survol : le verre « se rapproche » (scale down + net) — fidèle au composant */
.sug-btn:hover, .copy-btn:hover, .retry-btn:hover, .scroll-fab:hover{
  transform:scale(.975);
  backdrop-filter:blur(.5px) saturate(1.4); -webkit-backdrop-filter:blur(.5px) saturate(1.4);
  background:linear-gradient(-75deg, rgba(255,255,255,.14), rgba(255,255,255,.34), rgba(255,255,255,.14));
  box-shadow:
    inset 0 2px 2px rgba(0,0,0,.05),
    inset 0 -2px 2px rgba(255,255,255,.5),
    0 3px 1px -2px rgba(0,0,0,.25),
    inset 0 0 1px 2px rgba(255,255,255,.5),
    0 14px 24px -10px rgba(var(--shadow-ink),.42); }
/* Appui : verre pressé + bascule 3D */
.sug-btn:active, .copy-btn:active, .retry-btn:active{
  transform:rotate3d(1,0,0,18deg) scale(.96); transform-origin:50% 100%;
  box-shadow:
    inset 0 2px 2px rgba(0,0,0,.06),
    inset 0 -2px 2px rgba(255,255,255,.35),
    0 2px 2px -2px rgba(0,0,0,.2),
    inset 0 4px 5px rgba(0,0,0,.12); }

/* ── 2) BORD TAILLÉ : conic sombre + ligne blanche ──────────────── */
.sug-btn::before, .copy-btn::before, .retry-btn::before, .scroll-fab::before,
.back-intra::before, .reset-btn::before, .send-btn::before{
  content:""; position:absolute; inset:0; border-radius:inherit; padding:1px;
  pointer-events:none; z-index:2; background-image:
    conic-gradient(from var(--angle-1) at 50% 50%,
      rgba(0,0,0,.45), transparent 5% 40%, rgba(0,0,0,.45) 50%, transparent 60% 95%, rgba(0,0,0,.45)),
    linear-gradient(180deg, rgba(255,255,255,.6), rgba(255,255,255,.6));
  -webkit-mask:linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0);
  -webkit-mask-composite:xor; mask-composite:exclude;
  box-shadow:inset 0 0 0 .5px rgba(255,255,255,.5);
  transition:--angle-1 .5s ease; }
.sug-btn:hover::before, .copy-btn:hover::before, .retry-btn:hover::before,
.scroll-fab:hover::before, .back-intra:hover::before, .reset-btn:hover::before,
.send-btn:hover::before{ --angle-1:-125deg; }
.sug-btn:active::before, .send-btn:active::before, .reset-btn:active::before{ --angle-1:-75deg; }

/* ── 3) REFLET BALAYANT (mix-blend screen) ──────────────────────── */
.sug-btn::after, .back-intra::after, .reset-btn::after, .send-btn:not(.loading)::after{
  content:""; position:absolute; z-index:3; pointer-events:none;
  width:calc(100% - 1px); height:calc(100% - 1px); top:.5px; left:.5px;
  border-radius:inherit; overflow:clip; border:none; filter:none;
  background:linear-gradient(var(--angle-2),
    rgba(255,255,255,0) 0%, rgba(255,255,255,.5) 40% 50%, rgba(255,255,255,0) 55%);
  background-size:200% 200%; background-position:0% 50%; background-repeat:no-repeat;
  mix-blend-mode:screen; transform:none; animation:none;
  transition:background-position .5s var(--v-ease), --angle-2 .5s var(--v-ease); }
.sug-btn:hover::after, .back-intra:hover::after, .reset-btn:hover::after,
.send-btn:not(.loading):hover::after{ left:.5px; top:.5px; background-position:25% 50%; }
.send-btn:not(.loading):active::after, .reset-btn:active::after{
  background-position:50% 15%; --angle-2:-15deg; }

/* ── 4) VARIANTES TEINTÉES (hiérarchie conservée, verre coloré) ─── */
.send-btn, .reset-btn{
  background:linear-gradient(-75deg, rgba(255,255,255,.10), rgba(255,255,255,.28), rgba(255,255,255,.10)),
    linear-gradient(135deg, rgba(116,187,164,.85), rgba(54,132,119,.88));
  backdrop-filter:blur(6px) saturate(1.8); -webkit-backdrop-filter:blur(6px) saturate(1.8); }
.send-btn:hover, .reset-btn:hover{
  background:linear-gradient(-75deg, rgba(255,255,255,.14), rgba(255,255,255,.32), rgba(255,255,255,.14)),
    linear-gradient(135deg, rgba(191,230,216,.85), rgba(116,187,164,.88));
  transform:scale(.975); }
.send-btn:active, .reset-btn:active{
  transform:rotate3d(1,0,0,14deg) scale(.96); transform-origin:50% 100%; }
.back-intra{
  background:linear-gradient(-75deg, rgba(255,255,255,.10), rgba(255,255,255,.25), rgba(255,255,255,.10)),
    linear-gradient(135deg, rgba(18,60,124,.88), rgba(47,107,255,.78)); }
.back-intra:hover{
  background:linear-gradient(-75deg, rgba(255,255,255,.14), rgba(255,255,255,.3), rgba(255,255,255,.14)),
    linear-gradient(135deg, rgba(11,42,91,.92), rgba(18,60,124,.9));
  transform:scale(.975); }

/* ── 5) CARTE PRINCIPALE : bord taillé rotatif sur le verre ─────── */
.glass::after{ background:
    conic-gradient(from var(--angle-1) at 50% 50%,
      rgba(var(--shadow-ink),.3), transparent 8% 42%, rgba(var(--shadow-ink),.3) 50%,
      transparent 58% 92%, rgba(var(--shadow-ink),.3)),
    linear-gradient(125deg, rgba(255,255,255,.95), transparent 22%, transparent 78%, rgba(255,255,255,.6));
  transition:--angle-1 .8s var(--ease); }
.chatbox:hover::after{ --angle-1:-125deg; }

/* ── 6) CHAMP DE SAISIE : verre affirmé ─────────────────────────── */
textarea{
  backdrop-filter:blur(10px) saturate(1.5); -webkit-backdrop-filter:blur(10px) saturate(1.5);
  box-shadow:inset 0 1px 1px rgba(255,255,255,1), inset 0 -1px 1px rgba(255,255,255,.3),
    inset 0 1px 3px rgba(18,60,124,.07); }

/* ── 7) GARDE-FOUS ──────────────────────────────────────────────── */
/* Texte : le verre ne doit jamais affaiblir la lecture (charte §06) */
.sug-btn .sug-tx{ text-shadow:0 1px 1px rgba(255,255,255,.35); }
.back-intra, .reset-btn{ text-shadow:0 1px 2px rgba(0,0,0,.25); }
/* Mobile : angles statiques, reflets sans animation */
@media (max-width:640px){
  .sug-btn::before,.copy-btn::before,.retry-btn::before,.scroll-fab::before,
  .back-intra::before,.reset-btn::before,.send-btn::before,
  .sug-btn::after,.back-intra::after,.reset-btn::after,.send-btn:not(.loading)::after{ transition:none; }
  .sug-btn:active,.send-btn:active,.reset-btn:active{ transform:scale(.96); }
}
@media (prefers-reduced-motion:reduce){
  .sug-btn::before,.copy-btn::before,.retry-btn::before,.scroll-fab::before,
  .back-intra::before,.reset-btn::before,.send-btn::before,
  .sug-btn::after,.back-intra::after,.reset-btn::after,.send-btn:not(.loading)::after{ transition:none; }
  .sug-btn:active,.send-btn:active,.reset-btn:active{ transform:none; }
  .sug-btn:hover,.copy-btn:hover,.retry-btn:hover,.scroll-fab:hover,
  .send-btn:hover,.reset-btn:hover,.back-intra:hover{ transform:none; }
}

/* Retour au Hub : modèle visuel du Trombinoscope. */
@keyframes hub-return-edge{ from{--angle-1:-75deg} to{--angle-1:-215deg} }
@keyframes hub-return-sheen{ from{background-position:0% 50%} to{background-position:100% 50%} }
.back-intra{
  --hub-return-ease:cubic-bezier(.25,1,.5,1);
  isolation:isolate; overflow:hidden; height:42px; padding:0 20px; border:0; border-radius:999vw;
  color:var(--ink); font-size:var(--fs-xs); font-weight:900; letter-spacing:.04em; text-transform:uppercase;
  text-shadow:0 1px 1px rgba(0,0,0,.08); -webkit-tap-highlight-color:transparent;
  background:linear-gradient(-75deg,rgba(255,255,255,.04),rgba(255,255,255,.16),rgba(255,255,255,.04));
  box-shadow:inset 0 1px 1px rgba(0,0,0,.06),inset 0 -1.5px 1px rgba(255,255,255,.55),inset 0 0 0 1px rgba(255,255,255,.14),0 1px 0 rgba(255,255,255,.5),0 8px 16px -6px rgba(var(--shadow-ink),.4);
  backdrop-filter:blur(4px); -webkit-backdrop-filter:blur(4px);
  transition:transform .4s var(--hub-return-ease),box-shadow .4s var(--hub-return-ease),background .4s var(--ease),--angle-1 .5s ease;
}
.back-intra > *{ position:relative; z-index:4; }
.back-intra::before{ content:""; position:absolute; z-index:3; inset:1px; border-radius:inherit; pointer-events:none;
  background:linear-gradient(var(--angle-2),rgba(255,255,255,0) 0%,rgba(255,255,255,.5) 40% 50%,rgba(255,255,255,0) 55%);
  background-size:200% 200%; background-position:0% 50%; background-repeat:no-repeat; mix-blend-mode:screen;
  animation:hub-return-sheen 4.5s var(--hub-return-ease) infinite alternate; transition:background-position .5s var(--hub-return-ease),--angle-2 .5s var(--hub-return-ease);
}
.back-intra::after{ content:""; position:absolute; z-index:1; inset:0; border-radius:inherit; padding:1.3px; box-sizing:border-box; pointer-events:none;
  background:conic-gradient(from var(--angle-1) at 50% 50%,rgba(0,0,0,.62),rgba(0,0,0,0) 6% 40%,rgba(0,0,0,.62) 50%,rgba(0,0,0,0) 60% 94%,rgba(0,0,0,.62)),linear-gradient(180deg,rgba(255,255,255,.45),rgba(255,255,255,.45));
  -webkit-mask:linear-gradient(#000 0 0) content-box,linear-gradient(#000 0 0); -webkit-mask-composite:xor; mask:linear-gradient(#000 0 0) content-box,linear-gradient(#000 0 0); mask-composite:exclude;
  box-shadow:inset 0 0 0 .6px rgba(255,255,255,.55); animation:hub-return-edge 6s var(--hub-return-ease) infinite alternate; transition:--angle-1 .5s ease;
}
.back-intra:hover{ transform:scale(.975); box-shadow:inset 0 2px 2px rgba(0,0,0,.05),inset 0 -2px 2px rgba(255,255,255,.5),0 2px 1px -1px rgba(0,0,0,.25),inset 0 0 1px 2px rgba(255,255,255,.5),0 14px 26px -8px rgba(var(--shadow-ink),.34); }
.back-intra:hover::before{ background-position:25% 50%; }
.back-intra:hover::after{ --angle-1:-125deg; }
.back-intra:active{ transform:scale(.95) rotate3d(1,0,0,20deg); }
.back-intra:active::before{ background-position:50% 15%; --angle-2:-15deg; }
.back-intra:active::after{ --angle-1:-75deg; }
[data-theme="dark"] .back-intra{ box-shadow:inset 0 2px 2px rgba(0,0,0,.2),inset 0 -2px 2px rgba(255,255,255,.12),0 6px 3px -3px rgba(0,0,0,.4),inset 0 0 2px 4px rgba(255,255,255,.06),0 22px 45px -22px rgba(0,0,0,.55); }
[data-theme="dark"] .back-intra::after{ background:conic-gradient(from var(--angle-1) at 50% 50%,rgba(255,255,255,.55),rgba(255,255,255,0) 5% 40%,rgba(255,255,255,.55) 50%,rgba(255,255,255,0) 60% 95%,rgba(255,255,255,.55)),linear-gradient(180deg,rgba(255,255,255,.1),rgba(255,255,255,.1)); }
/* Suggestions visuellement secondaires : verre conservé, relief simplifié. */
.sug-btn{
  box-shadow:inset 0 1px 1px rgba(255,255,255,.72), inset 0 -1px 1px rgba(18,60,124,.05),
    0 8px 18px -12px rgba(var(--shadow-ink),.42); }
.sug-btn::before{ opacity:.7; }
.sug-btn::after{ opacity:.58; }

@media(max-width:640px){ .back-intra{ height:44px; padding:0 14px; } }
@media(max-width:400px), (max-height:520px){
  .back-intra{ width:44px; height:44px; padding:0; justify-content:center;
    top:max(10px, calc(var(--safe-top) + 8px)); left:max(10px, calc(var(--safe-left) + 8px)); }
  .back-intra span{ display:none; }
}
@media(prefers-reduced-motion:reduce){ .back-intra::before,.back-intra::after{ animation:none!important; transition:none!important; } }


/* EKO — accueil ouvert, verre maximal, composition distincte de Mes Droits. */
.eko-brand { position:fixed; top:22px; left:28px; z-index:4; }
.eko-brand img { width:66px; height:auto; display:block; }
.page { max-width:1080px; padding-top:80px; }
.page:not(.conversing) .chatbox { flex:1; min-height:0; display:flex; justify-content:center;
 background:none; border:0; box-shadow:none; backdrop-filter:none; -webkit-backdrop-filter:none; overflow:visible; }
.page:not(.conversing) .chatbox::after,.page:not(.conversing) .glint,
.page:not(.conversing) .chat-sep,.page:not(.conversing) .input-sep { display:none; }
.page:not(.conversing) .chat-header { order:1; padding:12px 0 28px; }
.page:not(.conversing) .chat-header h1 { font-size:clamp(4rem,12dvh,7rem); letter-spacing:-.04em; font-weight:900; line-height:1.1; }
.chat-header h1 .accent { background-image:linear-gradient(110deg,#1b538f 8%,#388eac 50%,#66b599 96%); }
.page:not(.conversing) .chat-header .eyebrow { font-size:.65rem; letter-spacing:.24em; }
.page:not(.conversing) .chat-header p { display:block; max-height:none; font-size:.95rem; margin-top:10px; }
.page:not(.conversing) .input-area { order:2; width:min(100%,780px); align-self:center; border-radius:26px;
 padding:14px; border:1px solid #ffffffba; background:linear-gradient(125deg,#ffffff9e,#ffffff40 48%,#d3eceb75);
 backdrop-filter:blur(44px) saturate(1.8); -webkit-backdrop-filter:blur(44px) saturate(1.8);
 box-shadow:inset 0 2px 1px #fff,inset 0 -15px 30px #408a9620,0 20px 45px -22px #1a506565; }
.page:not(.conversing) textarea { background:#ffffff45; border:1px solid #ffffffa8; border-radius:17px; min-height:58px; padding:17px; }
.page:not(.conversing) .input-hint { order:3; margin:8px auto 0; padding:0; width:min(100%,750px); }
.page:not(.conversing) .messages { order:4; flex:0 0 auto; overflow:visible; padding:24px 0 14px; }
.page:not(.conversing) .welcome { padding:0; max-width:900px; flex:0 0 auto; container-type:normal; }
.welcome h2 { display:none; }
.welcome-cta { gap:12px; margin:0; }
.sug-label { font-size:.64rem; letter-spacing:.17em; font-weight:600; }
.suggestions { display:flex; flex-wrap:wrap; justify-content:center; gap:9px; }
.sug-btn { min-height:40px; min-width:0; padding:9px 14px; gap:7px; border-radius:999px;
 background:linear-gradient(125deg,#ffffffa6,#ffffff40 55%,#d7eaf187); }
.sug-btn:nth-child(even) { background:linear-gradient(125deg,#ffffffb3,#ffffff45 55%,#c9e8d58c); }
.sug-btn .sug-ic { width:20px; height:20px; background:none; box-shadow:none; border-radius:0; }
.sug-btn .sug-ic svg { width:16px; height:16px; stroke:#356f83; }
.sug-btn .sug-tx { font-size:.76rem; font-weight:550; }
.page.conversing { padding:0; max-width:100%; }
.conversing .chatbox { background:linear-gradient(135deg,#ffffff80,#e7f5f175); backdrop-filter:blur(50px) saturate(1.8); }
.conversing .chat-header { padding:16px 100px; }
.conversing .messages { padding:32px max(24px,calc((100vw - 1040px)/2)); gap:28px; }
.bubble.ai { max-width:100%; }
.bubble.ai .bubble-body { border-radius:8px 20px 20px 8px; border-left:3px solid #75b3ac;
 background:linear-gradient(120deg,#ffffffde,#ffffff9e); padding:26px 30px;
 box-shadow:0 16px 42px -28px #17465955,inset 0 1px 1px white; }
.bubble.ai .bubble-text { line-height:1.85; }
.source-chip { border-radius:8px; background:#ffffff8c; border:1px solid #a9ccc780; }
.interface-footer { margin-top:12px; }
.conversing .interface-footer { margin-top:0; }
@media(max-width:640px) {
 .eko-brand { top:16px; left:18px; } .eko-brand img { width:46px; }
 .page { padding:76px 18px 16px; }
 .page:not(.conversing) .chatbox { overflow:visible; }
 .page:not(.conversing) .chat-header { padding:0 0 24px; }
 .page:not(.conversing) .chat-header h1 { font-size:4.6rem; }
 .page:not(.conversing) .chat-header p { font-size:.85rem; }
 .page:not(.conversing) .input-area { padding:10px; border-radius:22px; }
 .page:not(.conversing) textarea { font-size:16px; min-height:56px; padding:15px 12px; }
 .page:not(.conversing) .messages { padding-top:20px; }
 .sug-btn { min-height:44px; padding:9px 12px; flex-direction:row; }
 .sug-btn .sug-tx { font-size:.73rem; }
 .conversing .chat-header { padding:18px 72px; }
 .conversing .messages { padding:22px 12px; }
 .bubble.ai .bubble-body { padding:20px 17px; }
}
@media(min-width:641px) and (max-height:720px) {
 .page { padding-top:64px; }
 .page:not(.conversing) .chat-header { padding:0 0 18px; }
 .page:not(.conversing) .chat-header h1 { font-size:4.5rem; }
 .page:not(.conversing) .messages { padding-top:20px; }
}

/* Signature EKO : une page qui devient échange. */
.chat-header h1 { display:flex; align-items:center; justify-content:center; gap:.18em; }
.eko-sign { display:inline-flex; width:.7em; height:.7em; color:#388b97; filter:drop-shadow(0 2px 1px #ffffffa8); }
.eko-sign svg { width:100%; height:100%; stroke-width:1.35; }
.bubble-avatar svg { width:23px; height:23px; }
.sug-btn .sug-ic svg { stroke-width:1.6; }

/* Lecture éditoriale EKO — réponses et pièces, ordinateur et téléphone. */
.conversing .bubble.bot { align-items:flex-start; min-width:0; }
.conversing .bubble.bot .bubble-body { width:100%; max-width:100%; min-width:0; }
.bubble.bot .bubble-text.md {
  font-size:16px; line-height:1.75; padding:24px 28px;
  color:#243c51; background:rgba(255,255,255,.94);
  border:1px solid rgba(175,203,207,.5); border-radius:18px;
  box-shadow:0 8px 30px -24px #123c7c50; overflow-wrap:anywhere;
}
.bubble-text.md p { margin:0 0 .85em; }
.bubble-text.md h4 {
  font-size:1.06em; line-height:1.45; font-weight:750; letter-spacing:-.015em;
  margin:1.65em 0 .7em; padding:0; border:0; border-image:none;
}
.bubble-text.md ul { list-style:disc; padding-left:1.25em; margin:.5em 0 1em; }
.bubble-text.md ul li::before { content:none; }
.bubble-text.md li { padding-left:.15em; margin:.45em 0; }
.bubble-text.md li::marker { color:#55867f; }
.bubble-text.md > br { display:none; }
.bubble-text.md { max-width:76ch; }
.answer-layout { min-width:0; }
.answer-layout .bubble-text.md { flex:1; min-width:0; }
.sources { gap:8px; }
.source-chip { min-height:40px; max-width:100%; white-space:normal; text-align:left; line-height:1.45; }
.modal-body { font-size:15px; line-height:1.8; }
.eko-evidence { border:1px solid #c7ddd9; border-radius:12px; background:#f8fbfa;
  padding:0 16px; font-size:14px!important; line-height:1.75!important; color:#294553; }
.eko-evidence summary { cursor:pointer; padding:14px 0; font-weight:600; color:#356a63; }
.eko-evidence p { padding:16px 0; border-top:1px solid #dce9e6; margin:0; white-space:pre-line; }
.source-chip:focus-visible, .eko-evidence summary:focus-visible { outline:2px solid #387a72; outline-offset:3px; }
@media (min-width:1080px) {
  .answer-layout { gap:28px; }
  .answer-toc { flex-basis:180px; }
}
@media (max-width:640px) {
  .conversing .messages { padding:18px 10px 24px; gap:20px; }
  .conversing .bubble.bot { gap:0; }
  .conversing .bubble.bot > .bubble-avatar { display:none; }
  .bubble.bot .bubble-text.md { font-size:16px; line-height:1.7; padding:20px 17px; border-radius:14px; }
  .bubble-text.md blockquote.cite { margin:1em 0; padding:15px 14px; border-radius:3px 10px 10px 3px; }
  .bubble-text.md blockquote.cite .cite-ln { line-height:1.7; }
  .bubble-text.md h4 { font-size:1.04em; }
  .source-chip { min-height:44px; }
  .modal { padding:22px 20px; }
  .eko-evidence { padding:0 14px; }
}

/* Lecture des seules réponses EKO : cadre, navigation et saisie conservés. */
.bubble-text.md.eko-answer { padding:24px 28px; font-size:16px; line-height:1.75; }
.eko-answer-section { min-width:0; }
.eko-answer-section + .eko-answer-section { margin-top:28px; padding-top:24px; border-top:1px solid rgba(18,60,124,.13); }
.eko-answer-meta { display:flex; align-items:center; flex-wrap:wrap; gap:8px; margin-bottom:10px; color:#48647b; font-size:12px; font-weight:600; line-height:1.5; }
.bubble-text.md .eko-answer-heading { margin:0 0 16px; font-size:18px; line-height:1.4; color:var(--blue); font-weight:650; overflow-wrap:anywhere; }
.bubble-text.md .eko-answer-paragraph { margin:0; line-height:1.75; max-width:72ch; overflow-wrap:anywhere; }
.bubble-text.md .eko-answer-paragraph + .eko-answer-paragraph { margin-top:16px; }
.eko-citation { display:inline-flex; align-items:center; justify-content:center; min-width:36px; min-height:36px; padding:4px 8px; border:1px solid #c9dbe7; border-radius:8px; background:#f3f8fc; color:#184d7d; font:inherit; font-size:12px; cursor:pointer; }
.eko-citation:hover { background:#e6f1f8; border-color:#83abc5; }
.eko-citation:focus-visible,.eko-evidence summary:focus-visible { outline:3px solid var(--blue); outline-offset:3px; }
.eko-answer-notice { margin-top:24px; padding:14px 17px; border-left:3px solid #b88c4b; border-radius:0 10px 10px 0; background:#fbf7ef; color:#634b29; font-size:14px; line-height:1.6; }
.eko-answer-notice strong { display:block; margin-bottom:5px; color:inherit; font-size:13px; }
.bubble-text.md .eko-answer-notice p,.bubble-text.md .eko-answer-empty p { margin:0; }
.bubble-text.md .eko-answer-coverage { margin:20px 0 0; padding-top:12px; border-top:1px solid rgba(18,60,124,.09); color:#586a7a; font-size:12px; line-height:1.6; }
.eko-evidence { margin:4px 0 0; padding:8px 0; font-size:12px; line-height:1.65; color:#586a7a; }
.eko-evidence summary { cursor:pointer; width:fit-content; padding:6px 0; }
.eko-evidence p { max-width:72ch; margin:8px 0 0; }
@media (max-width:600px) {
  .bubble-text.md.eko-answer { padding:18px; font-size:15px; }
  .bubble-text.md .eko-answer-heading { font-size:17px; }
  .eko-citation { min-width:44px; min-height:44px; }
  .eko-answer-notice { padding:12px 14px; }
}

/* EKO v2 — réponse rédigée vérifiée, au-dessus des extraits cités (4 octobre 2026). */
.bubble-text.md .eko-summary { margin:0 0 24px; padding:18px 20px; border:1px solid rgba(18,60,124,.14); border-radius:14px; background:linear-gradient(135deg,rgba(18,60,124,.055),rgba(235,102,139,.045)); }
.bubble-text.md .eko-summary p { margin:0; max-width:72ch; font-size:16.5px; line-height:1.7; color:#0b2a5b; overflow-wrap:anywhere; }
.bubble-text.md .eko-summary p + p { margin-top:10px; }
.bubble-text.md .eko-summary .eko-citation { min-width:30px; min-height:28px; padding:2px 7px; margin-left:1px; vertical-align:1px; font-size:11px; }
.bubble-text.md .eko-evidence-title { margin:0 0 14px; color:#5d7488; font-size:11px; font-weight:700; letter-spacing:.12em; text-transform:uppercase; }
@media (max-width:480px){ .bubble-text.md .eko-summary { padding:14px; } .bubble-text.md .eko-summary p { font-size:15.5px; } .bubble-text.md .eko-summary .eko-citation { min-width:44px; min-height:44px; } }

/* Dictée facultative — même interaction que Mes Droits. */
.input-area { flex-wrap:wrap; }
/* Dictée : bouton distinct de l'envoi, état annoncé sans animation. */
.voice-btn { min-width:50px; height:50px; padding:0 12px; border-radius:16px;
  display:flex; align-items:center; justify-content:center; gap:6px; flex-shrink:0;
  font:600 .82rem/1.2 sans-serif; font-family:inherit; color:var(--blue);
  background:rgba(255,255,255,.8); border:1.5px solid var(--line); cursor:pointer; }
.voice-btn svg { width:20px; height:20px; fill:none; stroke:currentColor; stroke-width:2; }
.voice-btn[aria-pressed="true"] { color:#fff; background:var(--blue); border-color:var(--blue); }
.voice-btn:disabled { opacity:.5; cursor:default; }
.voice-help { flex-basis:100%; font-size:.75rem; line-height:1.4; color:var(--muted); }
.voice-status { display:block; font-weight:600; color:var(--blue); }
.voice-status:empty { display:none; }
@media (max-width:640px) {
  .input-area { column-gap:7px; row-gap:6px; }
  .voice-btn { min-width:44px; width:44px; height:50px; padding:0; }
  .voice-btn span { display:none; }
}


/* Points complets des PV : liste lisible, même pour un débat de plusieurs pages. */
.eko-topic-count{font-weight:650;color:var(--text,#172c43)}
.eko-topic-query{font-size:12px;color:#627184;line-height:1.65;margin:10px 0 22px}
.eko-topic-list{padding:0!important;list-style:none!important;counter-reset:eko-topic;display:grid;gap:12px;margin:20px 0!important}
.eko-topic-item{margin:0!important;min-width:0;counter-increment:eko-topic}
.eko-topic{border:1px solid #dce4ea;border-radius:14px;background:#fff;overflow:hidden}
.eko-topic-summary{display:block;position:relative;padding:18px 42px 18px 20px;cursor:pointer;list-style:none;line-height:1.5}
.eko-topic-summary::-webkit-details-marker{display:none}
.eko-topic-summary::after{content:'+';position:absolute;right:18px;top:22px;font-size:22px;color:#427789}
.eko-topic[open]>.eko-topic-summary::after{content:'−'}
.eko-topic[open]>.eko-topic-summary{background:#f4f8fa;border-bottom:1px solid #dce4ea}
.eko-topic-date{display:block;color:#426675;font-size:12px;font-weight:650;margin-bottom:6px}
.eko-topic-title{display:block;font-size:15px;font-weight:650;color:#173957;overflow-wrap:anywhere}
.eko-topic-read{display:block;color:#527685;font-size:12px;margin-top:9px}
.eko-topic[open] .eko-topic-read{display:none}
.eko-topic-body{padding:18px 20px 24px;min-width:0}
.eko-topic-parents{font-size:12px!important;color:#687c89;line-height:1.6}
.eko-topic-actions{display:flex;flex-wrap:wrap;gap:12px;align-items:center;margin:0 0 22px}
.eko-topic-pdf,.eko-topic-copy{font:inherit;font-size:12px;color:#235f78!important;text-decoration:underline;text-underline-offset:3px}
.eko-topic-copy{background:none;border:0;padding:0;cursor:pointer}
.eko-topic-page{font-size:11px!important;color:#64818c;text-transform:uppercase;letter-spacing:.08em;margin:24px 0 12px!important;border-top:1px solid #e7edf0;padding-top:13px}
.eko-topic-paragraph{white-space:pre-wrap;overflow-wrap:anywhere;line-height:1.75;font-size:14px;margin:0 0 16px!important}
.eko-topic-more{border:1px solid #cbdce2;background:#f4f8fa;color:#235f78;border-radius:10px;padding:10px 16px;font:inherit;font-size:13px;cursor:pointer;margin:4px 0 18px}
.eko-topic-more[hidden]{display:none}
.eko-related{margin-top:20px;padding-top:16px;border-top:1px solid #dce4ea}
.eko-related>summary{font-size:14px;font-weight:600;color:#47616c;cursor:pointer}
.eko-topic-summary:focus-visible,.eko-topic-more:focus-visible,.eko-topic-copy:focus-visible{outline:3px solid #477eaa;outline-offset:3px}
@media(max-width:600px){.eko-topic-summary{padding:15px 36px 15px 14px}.eko-topic-title{font-size:14px}.eko-topic-body{padding:14px}.eko-topic-paragraph{font-size:13px;line-height:1.7}.eko-topic-list{gap:10px}.eko-topic-date{font-size:11px}}

/* Typographie de lecture des PV CERA : Trebuchet, noir, titres et votes natifs. */
.eko-topic-content{font-family:"Trebuchet MS",Arial,sans-serif;color:#151515;background:#fff;border:1px solid #e5e3dc;box-shadow:0 2px 8px #15263306;padding:20px 24px}
.eko-topic-content .eko-topic-paragraph{font-family:inherit;font-size:14px;line-height:1.6;color:#151515}
.eko-topic-content .eko-topic-page{font-family:inherit;color:#77736b;font-size:11px!important;letter-spacing:0;text-transform:none;text-align:right;border-top:1px solid #e8e6df;padding-top:20px}
.eko-pv-bold{font-weight:700}
.eko-pv-italic{font-style:italic}
.eko-pv-heading{font-size:1.16em;font-weight:700;line-height:1.55}
.eko-pv-highlight{background:#eeece2;box-decoration-break:clone;-webkit-box-decoration-break:clone}
@media(max-width:600px){.eko-topic-content{padding:14px 12px}.eko-topic-content .eko-topic-paragraph{font-size:13px}.eko-pv-heading{font-size:1.12em}}

.eko-topic-content .eko-topic-page:first-child{margin-top:0!important;padding-top:0;border-top:0}
.eko-topic-content .eko-topic-paragraph{white-space:pre-line}

/* Écran fixe, saisie fine et archives compactes. */
html,body{height:var(--viewport-h);min-height:0;overflow:hidden}
.page:not(.conversing){height:var(--viewport-h);min-height:0;overflow:hidden;padding:20px 24px 10px;gap:8px}
.page:not(.conversing) .chatbox{flex:1 1 auto;min-height:0;overflow:hidden;justify-content:center}
.page:not(.conversing) .chat-header{flex-shrink:0;padding:4px 70px 18px}
.page:not(.conversing) .chat-header h1{font-size:52px;line-height:1.1}
.page:not(.conversing) .chat-header .eyebrow{font-size:9px;margin-bottom:5px}
.page:not(.conversing) .chat-header p{font-size:13px;margin-top:7px;line-height:1.45}
.page:not(.conversing) .messages{order:5;flex:0 1 var(--library-height,202px);max-height:var(--library-height,202px);min-height:0;overflow:hidden;padding:12px 0 0}
.page:not(.conversing) .welcome,.page:not(.conversing) .welcome-cta{height:100%;min-height:0;flex:1;margin:0 auto;padding:0}
.page:not(.conversing) .scroll-fab{display:none}
.page:not(.conversing) .interface-footer{flex-shrink:0;margin:0;padding:0;gap:4px}
.page:not(.conversing) .footer-secondary{font-size:10px;line-height:1.35}
.eko-brand{position:fixed;top:18px;left:22px}
.eko-brand img{width:52px}

/* Un seul cadre de verre : aucun cadre supplémentaire autour du texte. */
.page .input-area{display:grid;grid-template-columns:minmax(0,1fr) 146px 40px 40px;gap:5px 8px;align-items:center;padding:8px 14px}
.page:not(.conversing) .input-area{width:min(100%,760px);border-radius:20px;padding:8px 12px;border:1px solid #ffffffcf;background:linear-gradient(115deg,#ffffff95,#ffffff45 65%,#d3eceb6b);box-shadow:inset 0 1px 1px #fff,0 9px 25px -18px #27596d80}
.page:not(.conversing) .input-area:focus-within{border-color:#91b9c1;box-shadow:inset 0 1px 1px #fff,0 9px 25px -18px #27596d80,0 0 0 2px #ffffff35}
.input-wrap{grid-column:1;grid-row:1;min-width:0}
.page textarea,.page:not(.conversing) textarea{display:block;min-height:40px;height:40px;max-height:80px;padding:9px 5px;border:0;border-radius:0;background:transparent;font-size:15px;line-height:22px;box-shadow:none;backdrop-filter:none;-webkit-backdrop-filter:none}
.page textarea:focus{border:0;background:transparent;box-shadow:none}
.question-scope{grid-column:2;grid-row:1;min-width:0}
.question-scope label{position:absolute;width:1px;height:1px;overflow:hidden;clip-path:inset(50%);white-space:nowrap}
.question-scope select{width:100%;height:32px;padding:0 8px;font:inherit;font-size:11px;color:#365f76;background:#ffffff70;border:1px solid #bdd2d980;border-radius:10px}
.question-scope select:disabled{opacity:.65}
.page .voice-btn,.page .send-btn{width:40px;min-width:40px;height:40px;padding:0;border-radius:13px;grid-row:1}
.page .voice-btn{grid-column:3;background:transparent;border:0;box-shadow:none}
.page .voice-btn:hover{background:#ffffff70}
.page .voice-btn[aria-pressed="true"]{background:var(--blue);color:#fff}
.page .voice-btn span{display:none}
.page .send-btn{grid-column:4;box-shadow:0 3px 10px -5px #326f77a0,inset 0 1px 1px #ffffffc0}
.page .send-btn svg{width:21px;height:21px}
.page .voice-help{position:relative;z-index:2;flex:0 0 auto;width:min(100%,760px);align-self:center;padding:4px 10px 0;font-size:10px;line-height:1.35}
.page:not(.conversing) .voice-help{order:3}
.page:not(.conversing) .input-hint{order:4;margin:4px auto 0;width:min(100%,740px);font-size:10px;line-height:1.25}
.question-scope select:focus-visible,.pv-library select:focus-visible,.pv-library button:focus-visible,.pv-library a:focus-visible{outline:2px solid #477eaa;outline-offset:2px}

/* Année et mois liés ; liste courte de PDF avec pagination si nécessaire. */
.pv-library{width:100%;max-width:760px;height:100%;min-height:0;display:flex;flex-direction:column;text-align:left;background:#ffffff85;border:1px solid #ffffffce;border-radius:20px;padding:14px 18px;box-shadow:inset 0 1px 1px #ffffffab,0 9px 25px -22px #27596d60}
.pv-library-heading{display:flex;align-items:center;justify-content:space-between;gap:10px;flex-shrink:0;margin-bottom:8px}
.welcome .pv-library h2{display:block;margin:0;font-size:15px;letter-spacing:0;font-weight:650;color:#173957}
#pvLibraryCount{font-size:11px;color:#527685;white-space:nowrap}
.pv-library-tree{width:100%;min-height:0;flex:1;display:flex;flex-direction:column;gap:8px}
.pv-library-filters{display:grid;grid-template-columns:100px minmax(0,1fr);gap:8px;flex-shrink:0}
.pv-library-filters select{height:32px;min-width:0;border:1px solid #bdd2d980;border-radius:9px;padding:0 9px;color:#365f76;background:#ffffff70;font:inherit;font-size:12px;text-transform:capitalize}
.pv-library-stage{display:grid;grid-template-columns:minmax(0,1fr);grid-auto-rows:56px;align-content:start;gap:6px;flex:1;min-height:0}
.pv-library-document{display:flex;align-items:center;justify-content:space-between;gap:12px;min-width:0;padding:8px 10px;border:1px solid #c9dce180;border-radius:11px;background:#ffffffa6;color:#173957;text-decoration:none;transition:background .15s,border-color .15s}
.pv-library-document:hover{background:#fff;border-color:#90b5bf}
.pv-document-label{display:flex;flex-direction:column;gap:3px;min-width:0}
.pv-document-date{font-size:13px;font-weight:650}
.pv-document-title{font-size:10px;line-height:1.35;color:#637c88;overflow:hidden;white-space:nowrap;text-overflow:ellipsis}
.pv-document-open{font-size:11px;color:#2b727c;white-space:nowrap}
.pv-library-pager{display:flex;justify-content:space-between;align-items:center;gap:8px;flex-shrink:0;min-height:26px}
.pv-library-pager.is-single button{display:none}
.pv-library-pager.is-single{justify-content:center}
.pv-library-pager button{border:0;border-radius:7px;background:#ffffff70;padding:6px 9px;font:inherit;font-size:11px;color:#275c73;cursor:pointer}
.pv-library-pager button:disabled{opacity:.35;cursor:default}
.pv-page-number{font-size:10px;color:#607d8c}
.pv-library-status{font-size:13px;line-height:1.5;color:#527685}
@media(max-width:640px){
 .page:not(.conversing){padding:12px 12px 8px;gap:8px}
 .eko-brand{top:16px;left:16px}.eko-brand img{width:40px}
 .page:not(.conversing) .chat-header{padding:6px 42px 12px}
 .page:not(.conversing) .chat-header h1{font-size:38px}
 .page:not(.conversing) .chat-header .eyebrow{display:none}
 .page:not(.conversing) .chat-header p{font-size:12px;margin-top:6px}
 .page .input-area{grid-template-columns:minmax(0,1fr) 40px 40px;padding:6px 10px;gap:3px 6px}
 .page:not(.conversing) .input-area{padding:6px 10px;border-radius:18px}
 .input-wrap{grid-column:1;grid-row:1}
 .page textarea,.page:not(.conversing) textarea{font-size:16px;min-height:40px;padding:9px 2px}
 .page .voice-btn{grid-column:2}.page .send-btn{grid-column:3}
 .question-scope{grid-column:1/-1;grid-row:2;display:flex;align-items:center;gap:8px}
 .question-scope label{position:static;width:auto;height:auto;overflow:visible;clip-path:none;font-size:10px;font-weight:500;color:#527685}
 .question-scope select{width:140px;height:26px;font-size:10px;border-radius:8px;background:#ffffff45}
 .page .voice-help{font-size:10px;line-height:1.3;padding:5px 8px 0}
 .page:not(.conversing) .input-hint{display:none}
 .page:not(.conversing) .messages{padding-top:12px}
 .page:not(.conversing) .footer-secondary{display:none}
 .pv-library{padding:12px;border-radius:18px}
 .welcome .pv-library h2{font-size:14px}
}
@media(max-height:560px){
 .page:not(.conversing){padding-top:8px;gap:5px}
 .page:not(.conversing) .chat-header{padding:0 55px 7px}
 .page:not(.conversing) .chat-header h1{font-size:30px}
 .page:not(.conversing) .chat-header .eyebrow,.page:not(.conversing) .chat-header p,.page:not(.conversing) .input-hint,.page:not(.conversing) .footer-secondary{display:none}
 .page:not(.conversing) .messages{padding-top:6px}
 .pv-library{padding:8px 12px}
 .pv-library-heading{margin-bottom:6px}
 .pv-library-tree{gap:6px}
 .pv-library-pager{min-height:22px}
 .eko-brand{top:10px;left:14px}.eko-brand img{width:32px}
}

/* ════════════════════════════════════════════════════════════════
   Accueil « Signature » — maquette A+ logo SNE-CGC + EKO validée par
   Nicolas le 5 octobre 2026. Accueil seulement : la conversation garde
   son rendu. Mêmes fonctions, mêmes éléments, présentation nouvelle.
   ════════════════════════════════════════════════════════════════ */
.eko-mark,.eko-divider{display:none}
body:has(.page:not(.conversing)) .eko-brand,
body:has(.page:not(.conversing)) .aurora,body:has(.page:not(.conversing)) .halo,
body:has(.page:not(.conversing)) .grid,body:has(.page:not(.conversing)) .vign,
body:has(.page:not(.conversing)) .grain{display:none}
body:has(.page:not(.conversing)) .bg-base{background:
  radial-gradient(ellipse 48% 55% at 14% 6%,rgba(191,230,216,.8),rgba(191,230,216,0) 70%),
  radial-gradient(ellipse 45% 50% at 88% 10%,rgba(150,178,255,.38),rgba(150,178,255,0) 70%),
  radial-gradient(ellipse 60% 40% at 50% 104%,rgba(54,132,119,.16),rgba(54,132,119,0) 70%),
  linear-gradient(180deg,#f6f9fa 0%,#edf3f5 100%)}

/* Cadre de page */
.page:not(.conversing){max-width:none;gap:0;
  padding:calc(20px + var(--safe-top)) calc(24px + var(--safe-right)) calc(20px + var(--safe-bottom)) calc(24px + var(--safe-left));
  font-feature-settings:'ss01','cv11'}
.page:not(.conversing) .chatbox{display:grid;grid-template-columns:minmax(0,1fr) auto;
  grid-template-rows:auto auto auto auto minmax(0,var(--library-height,300px));align-content:center;
  width:min(100%,840px);margin:0 auto;padding:0 0 22px;overflow:visible;isolation:auto}
.page:not(.conversing) .chatbox::before{content:"";grid-column:1/-1;grid-row:3;margin:6px 30px -10px;border-radius:40px;
  background:conic-gradient(from 200deg,#2f6bff,#5bb8a6,#bfe6d8,#8fb0ff,#123c7c,#2f6bff);
  filter:blur(26px);opacity:.38;pointer-events:none;z-index:1;transition:opacity .35s var(--ease)}
.page:not(.conversing) .chatbox:has(.input-area:focus-within)::before,
.page:not(.conversing) .chatbox:has(.voice-btn[aria-pressed="true"])::before{opacity:.6}

/* Signature : logo officiel + EKO */
.page:not(.conversing) .chat-header{grid-column:1/-1;grid-row:1;order:0;padding:0 0 52px;z-index:2}
.page:not(.conversing) .chat-header::before{content:"";position:absolute;left:50%;top:-150px;width:1000px;height:520px;
  transform:translateX(-50%);border-radius:50%;pointer-events:none;z-index:-1;
  background:radial-gradient(ellipse at center,rgba(255,255,255,.92),rgba(255,255,255,0) 68%)}
.page:not(.conversing) .chat-header .eyebrow,.page:not(.conversing) .chat-header p,
.page:not(.conversing) .chat-header .eko-sign{display:none}
.page:not(.conversing) .chat-header h1{display:flex;align-items:center;justify-content:center;gap:30px;
  font-size:136px;line-height:.92;font-weight:800;letter-spacing:-.06em}
.page:not(.conversing) .eko-mark{display:block;flex:none;width:auto;height:112px;filter:drop-shadow(0 12px 24px rgba(11,42,91,.14))}
.page:not(.conversing) .eko-divider{display:block;flex:none;width:1.5px;height:92px;border-radius:1px;
  background:linear-gradient(180deg,rgba(18,60,124,0),rgba(18,60,124,.28) 25%,rgba(54,132,119,.28) 75%,rgba(54,132,119,0))}
.page:not(.conversing) .chat-header h1 .accent{padding-right:6px;
  background:linear-gradient(180deg,rgba(255,255,255,.35) 0%,rgba(255,255,255,0) 45%),linear-gradient(100deg,#0f3470 8%,#2a5f96 48%,#3a8e80 92%);
  -webkit-background-clip:text;background-clip:text;-webkit-text-fill-color:transparent;color:transparent;
  filter:drop-shadow(0 14px 28px rgba(18,60,124,.16))}

/* Alerte données personnelles : rangée dédiée, au-dessus de la barre */
.page:not(.conversing) .perso-alert{grid-column:1/-1;grid-row:2;margin:0 0 12px}
/* Barre de question : verre clair, liseré lumineux */
.page:not(.conversing) .input-area{grid-column:1/-1;grid-row:3;z-index:2;width:100%;align-self:stretch;
  display:grid;grid-template-columns:20px minmax(0,1fr) auto 46px 52px;column-gap:8px;row-gap:0;align-items:center;
  min-height:75px;padding:0 10px 0 26px;border-radius:38px;border:1.5px solid transparent;
  background:linear-gradient(rgba(255,255,255,.86),rgba(255,255,255,.86)) padding-box,
    conic-gradient(from 200deg,rgba(47,107,255,.85),rgba(91,184,166,.85),rgba(191,230,216,.9),rgba(143,176,255,.85),rgba(18,60,124,.75),rgba(47,107,255,.85)) border-box;
  backdrop-filter:blur(30px) saturate(180%);-webkit-backdrop-filter:blur(30px) saturate(180%);
  box-shadow:inset 0 1px 0 #fff,inset 0 -1px 0 rgba(11,42,91,.04)}
.page:not(.conversing) .input-area:focus-within{border-color:transparent;box-shadow:inset 0 1px 0 #fff,inset 0 -1px 0 rgba(11,42,91,.04)}
.page:not(.conversing) .input-area::before{content:"";grid-column:1;grid-row:1;width:20px;height:20px;
  background:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%2356687E' stroke-width='1.9' stroke-linecap='round'%3E%3Ccircle cx='11' cy='11' r='7'/%3E%3Cpath d='m20 20-3.5-3.5'/%3E%3C/svg%3E") center/20px no-repeat}
.page:not(.conversing) .input-wrap{grid-column:2;grid-row:1}
.page:not(.conversing) textarea{height:44px;min-height:44px;max-height:88px;padding:11px 6px;font-size:18px;line-height:22px;letter-spacing:-.01em;color:#0b1730}
.page:not(.conversing) .question-scope{grid-column:3;grid-row:1;position:relative;display:flex;align-items:center}
.page:not(.conversing) .question-scope select{appearance:none;-webkit-appearance:none;width:auto;height:40px;padding:0 34px 0 16px;
  border:0;border-radius:999px;font:inherit;font-size:14px;font-weight:600;color:#123c7c;cursor:pointer;
  background:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23123C7C' stroke-width='2.2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E") right 13px center/13px no-repeat,rgba(18,60,124,.06);
  box-shadow:inset 0 0 0 .5px rgba(18,60,124,.1)}
.page:not(.conversing) .voice-btn{grid-column:4;grid-row:1;width:46px;min-width:46px;height:46px;border-radius:50%;color:#123c7c}
.page:not(.conversing) .voice-btn svg{width:21px;height:21px;stroke-width:1.8}
.page:not(.conversing) .voice-btn:hover{background:rgba(18,60,124,.06)}
.page:not(.conversing) .voice-btn[aria-pressed="true"]{background:var(--blue);color:#fff}
.page:not(.conversing) .send-btn{grid-column:5;grid-row:1;width:52px;min-width:52px;height:52px;border-radius:50%;transform:none;
  background:radial-gradient(circle at 35% 25%,#4fa392 0%,#2f7f72 45%,#23625a 100%);backdrop-filter:none;-webkit-backdrop-filter:none;
  box-shadow:inset 0 1px 1px rgba(255,255,255,.45),inset 0 -2px 4px rgba(0,0,0,.12),0 10px 22px -8px rgba(39,106,97,.65)}
.page:not(.conversing) .send-btn:hover{background:radial-gradient(circle at 35% 25%,#58ad9b 0%,#33877a 45%,#266a61 100%);transform:none}
.page:not(.conversing) .send-btn:active{transform:scale(.96)}
.page:not(.conversing) .send-btn::before,.page:not(.conversing) .send-btn:not(.loading)::after{display:none}
.page:not(.conversing) .send-btn svg{stroke-width:2.2}

/* Avertissement dictée et raccourcis */
.page:not(.conversing) .voice-help{grid-column:1;grid-row:4;order:0;width:auto;align-self:start;padding:14px 0 0 26px;
  font-size:12px;line-height:1.4;letter-spacing:-.003em;color:#5a6d84}
.page:not(.conversing) #voiceNotice{display:block;padding-left:18px;
  background:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%235A6D84' stroke-width='2' stroke-linecap='round'%3E%3Ccircle cx='12' cy='12' r='9'/%3E%3Cpath d='M12 8v5M12 16.5v.5'/%3E%3C/svg%3E") 0 2px/12px no-repeat}
.page:not(.conversing) .input-hint{grid-column:2;grid-row:4;order:0;width:auto;align-self:start;margin:0;padding:14px 26px 0 16px;
  white-space:nowrap;font-size:12px;line-height:1.4;color:#5a6d84}
.page:not(.conversing) .input-hint kbd{font-weight:600;font-size:11px;padding:2px 7px;margin:0 2px 0 6px;border:0;border-radius:6px;color:#123c7c;
  background:rgba(255,255,255,.75);box-shadow:inset 0 0 0 .5px rgba(18,60,124,.16),0 1px 0 rgba(18,60,124,.1)}
.page:not(.conversing) .input-hint kbd:first-child{margin-left:0}

/* Bibliothèque des PV */
.page:not(.conversing) .messages{grid-column:1/-1;grid-row:5;order:0;max-height:none;min-height:0;overflow:visible;padding:38px 0 0}
.page:not(.conversing) .welcome,.page:not(.conversing) .welcome-cta{max-width:none;width:100%}
.page .pv-library{--pv-row:98px;--pv-gap:10px;--pv-base:195px;--pv-max:400px;position:relative;max-width:none;
  padding:22px 22px 18px;border-radius:30px;background:rgba(255,255,255,.48);
  backdrop-filter:blur(28px) saturate(170%);-webkit-backdrop-filter:blur(28px) saturate(170%);border:1px solid rgba(255,255,255,.85);
  box-shadow:inset 0 1px 0 rgba(255,255,255,.95),inset 0 0 0 .5px rgba(11,42,91,.05),0 30px 60px -36px rgba(11,42,91,.35),0 2px 6px rgba(11,42,91,.04)}
.page .pv-library-heading{align-items:baseline;margin:0 0 16px;padding:0 4px}
.welcome .pv-library h2{font-size:20px;font-weight:700;letter-spacing:-.025em;color:#0b1730}
.page #pvLibraryCount{font-size:13px;font-weight:600;color:#5a6d84;font-variant-numeric:tabular-nums}
.page .pv-library-tree{gap:0}
.page .pv-library-filters{display:flex;align-items:center;justify-content:space-between;gap:18px;flex-shrink:0}
.pv-segmented{display:flex;flex:none;padding:3px;border-radius:13px;background:rgba(14,28,51,.055);box-shadow:inset 0 1px 2px rgba(11,42,91,.06)}
.pv-segmented button{width:65px;height:32px;border:0;border-radius:10px;background:transparent;font:inherit;font-size:13.5px;font-weight:600;
  color:#4d6076;font-variant-numeric:tabular-nums;cursor:pointer;transition:background .2s,color .2s,box-shadow .2s}
.pv-segmented button[aria-pressed="true"]{background:#fff;color:#0b1730;font-weight:700;box-shadow:0 3px 8px rgba(11,42,91,.12),0 0 0 .5px rgba(11,42,91,.06)}
.pv-months{position:relative;display:flex;gap:6px;min-width:0;overflow-x:auto;scrollbar-width:none;padding:4px 2px 8px;margin:-4px -2px -8px}
.pv-months::-webkit-scrollbar{display:none}
.pv-months.fade-end{-webkit-mask-image:linear-gradient(90deg,#000 calc(100% - 36px),transparent);mask-image:linear-gradient(90deg,#000 calc(100% - 36px),transparent)}
.pv-months.fade-start{-webkit-mask-image:linear-gradient(90deg,transparent,#000 36px);mask-image:linear-gradient(90deg,transparent,#000 36px)}
.pv-months.fade-start.fade-end{-webkit-mask-image:linear-gradient(90deg,transparent,#000 36px,#000 calc(100% - 36px),transparent);mask-image:linear-gradient(90deg,transparent,#000 36px,#000 calc(100% - 36px),transparent)}
.pv-months button{flex:none;height:36px;padding:0 15px;border:0;border-radius:999px;background:rgba(255,255,255,.7);
  box-shadow:inset 0 0 0 .5px rgba(18,60,124,.14);font:inherit;font-size:13.5px;font-weight:600;color:#123c7c;text-transform:capitalize;cursor:pointer;
  transition:background .2s,box-shadow .2s}
.pv-months button:hover{background:#fff}
.pv-months button[aria-pressed="true"]{padding:0 16px;color:#fff;background:linear-gradient(180deg,#1a4a8e,#123c7c);
  box-shadow:inset 0 1px 0 rgba(255,255,255,.22),0 6px 14px -8px rgba(18,60,124,.7)}
.pv-segmented button:focus-visible,.pv-months button:focus-visible{outline:2px solid #477eaa;outline-offset:2px}
.page .pv-library-stage{grid-auto-rows:88px;gap:10px;margin-top:16px}
.page .pv-library-document{justify-content:flex-start;gap:18px;padding:14px 14px 14px 16px;border:0;border-radius:20px;color:#0b1730;
  background:rgba(255,255,255,.92);box-shadow:inset 0 0 0 .5px rgba(11,42,91,.07),0 12px 26px -18px rgba(11,42,91,.4),0 1px 2px rgba(11,42,91,.04);
  transition:background .2s,box-shadow .2s,transform .2s var(--ease)}
.page .pv-library-document:hover{background:#fff;transform:translateY(-1px)}
.pv-document-cal{width:56px;height:60px;flex:none;display:flex;flex-direction:column;overflow:hidden;border-radius:14px;background:#fff;
  box-shadow:0 0 0 .5px rgba(11,42,91,.12),0 4px 10px -4px rgba(11,42,91,.2)}
.pv-document-month{height:18px;flex:none;display:grid;place-items:center;background:linear-gradient(180deg,#3f978a,#368477);color:#fff;
  font-size:9.5px;font-weight:700;letter-spacing:.1em;text-transform:uppercase}
.pv-document-day{flex:1;display:grid;place-items:center;font-size:28px;font-weight:500;letter-spacing:-.03em;line-height:1;color:#0b1730}
.page .pv-document-label{flex:1;gap:3px}
.page .pv-document-date{font-size:16.5px;font-weight:700;letter-spacing:-.015em}
.pv-document-meta{display:flex;min-width:0;font-size:13.5px;line-height:1.35;color:#56687e}
.page .pv-document-title{min-width:0;font-size:inherit;line-height:inherit;color:inherit;overflow:hidden;white-space:nowrap;text-overflow:ellipsis}
.pv-document-pages{flex:none;white-space:nowrap}
.pv-document-pages::before{content:"·";margin:0 .4em;color:#8a99ac}
.page .pv-document-open{flex:none;display:inline-flex;align-items:center;gap:6px;height:38px;padding:0 14px 0 16px;border-radius:999px;
  background:rgba(18,60,124,.06);box-shadow:inset 0 0 0 .5px rgba(18,60,124,.1);font-size:13.5px;font-weight:600;color:#123c7c}
.pv-document-open svg{width:14px;height:14px;fill:none;stroke:currentColor;stroke-width:2.2;stroke-linecap:round;stroke-linejoin:round}
.page .pv-library-pager{min-height:16px;margin-top:14px}
.page .pv-page-number{font-size:12px;color:#5a6d84}
.page .pv-library-pager button{height:30px;padding:0 12px;border-radius:999px;background:rgba(255,255,255,.75);
  box-shadow:inset 0 0 0 .5px rgba(18,60,124,.14);font-size:12px;font-weight:600;color:#123c7c}

/* Confidentialité en haut à droite ; mention en pied */
.page:not(.conversing) .interface-footer{padding:0;gap:0}
.page:not(.conversing) .footer-priority{display:block;height:0}
.page:not(.conversing) .footer-privacy{position:fixed;z-index:20;top:calc(26px + var(--safe-top));right:calc(40px + var(--safe-right));
  gap:8px;height:40px;min-height:40px;padding:0 16px 0 13px;border-radius:999px;color:#123c7c;
  font-size:13.5px;font-weight:600;letter-spacing:-.005em;background:rgba(255,255,255,.52);
  backdrop-filter:blur(20px) saturate(180%);-webkit-backdrop-filter:blur(20px) saturate(180%);border:1px solid rgba(255,255,255,.85);
  box-shadow:inset 0 1px 0 rgba(255,255,255,.95),inset 0 0 0 .5px rgba(11,42,91,.06),0 8px 20px -10px rgba(11,42,91,.22)}
.page:not(.conversing) .footer-privacy:hover{background:rgba(255,255,255,.75);transform:none}
.page:not(.conversing) .footer-privacy svg{width:24px;height:24px;padding:5.5px;border-radius:50%;background:rgba(18,60,124,.08);stroke:currentColor;stroke-width:2}
.page:not(.conversing) .footer-secondary{display:block;font-size:12px;line-height:1.4;letter-spacing:-.003em;color:#5a6d84}

/* Ordinateur peu haut */
@media (min-width:641px) and (max-height:780px){
  .page:not(.conversing) .chat-header{padding-bottom:34px}
  .page:not(.conversing) .chat-header h1{font-size:100px;gap:24px}
  .page:not(.conversing) .eko-mark{height:84px}
  .page:not(.conversing) .eko-divider{height:68px}
  .page:not(.conversing) .messages{padding-top:26px}
  .page .pv-library{--pv-base:183px}
}
@media (min-width:641px) and (max-height:600px){
  .page:not(.conversing){padding-top:calc(12px + var(--safe-top));padding-bottom:calc(10px + var(--safe-bottom))}
  .page:not(.conversing) .chatbox{padding-bottom:8px}
  .page:not(.conversing) .chat-header{padding-bottom:16px}
  .page:not(.conversing) .chat-header::before{display:none}
  .page:not(.conversing) .chat-header h1{font-size:52px;gap:14px}
  .page:not(.conversing) .eko-mark{height:44px;filter:none}
  .page:not(.conversing) .eko-divider{height:36px}
  .page:not(.conversing) .input-area{min-height:60px}
  .page:not(.conversing) .send-btn{width:44px;min-width:44px;height:44px}
  .page:not(.conversing) .input-hint{display:none}
  .page:not(.conversing) .voice-help{grid-column:1/-1;padding-top:8px}
  .page:not(.conversing) .messages{padding-top:12px}
  .page .pv-library{--pv-row:68px;--pv-gap:8px;--pv-base:120px;padding:12px 16px 8px;border-radius:24px}
  .page .pv-library-heading{margin-bottom:8px}
  .welcome .pv-library h2{font-size:18px}
  .pv-segmented button{height:28px}
  .pv-months button{height:30px}
  .page .pv-library-stage{grid-auto-rows:60px;gap:8px;margin-top:8px}
  .page .pv-library-document{padding:6px 12px;border-radius:16px}
  .pv-document-cal{width:44px;height:46px;border-radius:11px}
  .pv-document-month{height:14px;font-size:8px}
  .pv-document-day{font-size:20px}
  .page .pv-document-date{font-size:14.5px}
  .pv-document-meta{font-size:12.5px}
  .page .pv-document-open{height:32px}
  .page .pv-library-pager{margin-top:6px}
  .page:not(.conversing) .footer-privacy{top:calc(12px + var(--safe-top));right:calc(16px + var(--safe-right))}
}

/* Téléphone : signature en tête, barre de question sous le pouce */
@media (max-width:640px){
  body:has(.page:not(.conversing)) .bg-base{background:
    radial-gradient(ellipse 95% 40% at 5% 4%,rgba(191,230,216,.85),rgba(191,230,216,0) 70%),
    radial-gradient(ellipse 85% 35% at 100% 8%,rgba(150,178,255,.38),rgba(150,178,255,0) 70%),
    radial-gradient(ellipse 110% 35% at 50% 104%,rgba(54,132,119,.18),rgba(54,132,119,0) 70%),
    linear-gradient(180deg,#f6f9fa 0%,#edf3f5 100%)}
  .page:not(.conversing){padding:calc(14px + var(--safe-top)) calc(16px + var(--safe-right)) calc(14px + var(--safe-bottom)) calc(16px + var(--safe-left))}
  .page:not(.conversing) .chatbox{grid-template-columns:minmax(0,1fr);
    grid-template-rows:auto minmax(0,var(--library-height,300px)) minmax(0,1fr) auto auto auto;align-content:stretch;width:100%;padding:0}
  .page:not(.conversing) .chatbox::before{grid-column:1;grid-row:5;align-self:end;height:62px;margin:0 18px -8px;border-radius:32px;filter:blur(20px);opacity:.4}
  .page:not(.conversing) .chat-header{padding:72px 0 0}
  .page:not(.conversing) .chat-header::before{top:-60px;width:480px;height:300px}
  .page:not(.conversing) .chat-header h1{font-size:96px;gap:20px}
  .page:not(.conversing) .eko-mark{height:78px;filter:drop-shadow(0 8px 18px rgba(11,42,91,.14))}
  .page:not(.conversing) .eko-divider{height:64px}
  .page:not(.conversing) .chat-header h1 .accent{padding-right:4px;filter:drop-shadow(0 10px 20px rgba(18,60,124,.16))}
  .page:not(.conversing) .messages{grid-row:2;padding:34px 0 0}
  .page:not(.conversing) .perso-alert{grid-column:1;grid-row:4;margin:0 0 10px;font-size:12.5px}
  /* Barre ancrée en bas : ligne « Année des PV » puis capsule */
  .page:not(.conversing) .input-area{grid-column:1;grid-row:5;grid-template-columns:minmax(0,1fr) 44px 53.5px;column-gap:2px;row-gap:8px;
    min-height:0;padding:0;border:0;border-radius:0;background:none;backdrop-filter:none;-webkit-backdrop-filter:none;box-shadow:none}
  .page:not(.conversing) .input-area:focus-within{box-shadow:none}
  .page:not(.conversing) .input-area::before{grid-column:1/-1;grid-row:2;width:auto;height:61px;border-radius:31px;border:1.5px solid transparent;z-index:0;
    background:linear-gradient(rgba(255,255,255,.88),rgba(255,255,255,.88)) padding-box,
      conic-gradient(from 200deg,rgba(47,107,255,.85),rgba(91,184,166,.85),rgba(191,230,216,.9),rgba(143,176,255,.85),rgba(18,60,124,.75),rgba(47,107,255,.85)) border-box;
    backdrop-filter:blur(30px) saturate(180%);-webkit-backdrop-filter:blur(30px) saturate(180%);box-shadow:inset 0 1px 0 #fff}
  .page:not(.conversing) .question-scope{grid-column:1/-1;grid-row:1;justify-content:space-between;padding:0 6px}
  .page:not(.conversing) .question-scope label{position:static;width:auto;height:auto;overflow:visible;clip-path:none;
    font-size:12.5px;font-weight:600;color:#4d6076}
  .page:not(.conversing) .question-scope select{height:34px;padding:0 30px 0 13px;font-size:13px;background-color:rgba(255,255,255,.7);
    background-position:right 12px center;background-size:12px;box-shadow:inset 0 0 0 .5px rgba(18,60,124,.14)}
  .page:not(.conversing) .input-wrap{grid-column:1;grid-row:2;z-index:1;padding-left:19.5px}
  .page:not(.conversing) textarea{height:40px;min-height:40px;max-height:80px;padding:9px 0;font-size:16.5px}
  .page:not(.conversing) .voice-btn{grid-column:2;grid-row:2;z-index:1;width:44px;min-width:44px;height:44px}
  .page:not(.conversing) .voice-btn svg{width:20px;height:20px}
  .page:not(.conversing) .send-btn{grid-column:3;grid-row:2;z-index:1;width:46px;min-width:46px;height:46px;margin-right:7.5px;
    box-shadow:inset 0 1px 1px rgba(255,255,255,.45),inset 0 -2px 4px rgba(0,0,0,.12),0 8px 18px -8px rgba(39,106,97,.65)}
  .page:not(.conversing) .send-btn svg{width:19px;height:19px}
  .page:not(.conversing) .voice-help{grid-column:1;grid-row:6;padding:10px 8px 0;font-size:11px;line-height:1.45}
  .page:not(.conversing) #voiceNotice{padding-left:0;background:none}
  .page:not(.conversing) .input-hint{display:none}
  .page .pv-library{--pv-row:82px;--pv-gap:8px;--pv-base:209px;--pv-max:373px;padding:16px 14px 12px;border-radius:26px;
    box-shadow:inset 0 1px 0 #fff,inset 0 0 0 .5px rgba(11,42,91,.05),0 24px 46px -30px rgba(11,42,91,.38)}
  .page .pv-library-heading{margin-bottom:12px}
  .welcome .pv-library h2{font-size:17px}
  .page #pvLibraryCount{font-size:12.5px}
  .page .pv-library-filters{flex-direction:column;align-items:stretch;gap:10px}
  .pv-segmented{display:grid;grid-auto-flow:column;grid-auto-columns:minmax(0,1fr);border-radius:12px}
  .pv-segmented button{width:auto;font-size:13px;border-radius:9px}
  .pv-months button{height:34px;padding:0 13px;font-size:13px}
  .pv-months button[aria-pressed="true"]{padding:0 14px}
  .page .pv-library-stage{grid-auto-rows:74px;gap:8px;margin-top:12px}
  .page .pv-library-document{gap:13px;padding:11px 11px 11px 12px;border-radius:18px;
    box-shadow:inset 0 0 0 .5px rgba(11,42,91,.07),0 10px 22px -16px rgba(11,42,91,.4)}
  .pv-document-cal{width:48px;height:52px;border-radius:12px}
  .pv-document-month{height:16px;font-size:8.5px}
  .pv-document-day{font-size:24px}
  .page .pv-document-date{font-size:15px}
  .pv-document-meta{font-size:12.5px}
  .page .pv-document-open{width:36px;height:36px;padding:0;justify-content:center}
  .pv-open-text{display:none}
  .page .pv-library-pager{margin-top:10px}
  .page .pv-page-number{font-size:11.5px}
  .page:not(.conversing) .footer-privacy{top:calc(15px + var(--safe-top));right:calc(20px + var(--safe-right));width:44px;height:44px;min-height:44px;
    padding:0;justify-content:center;font-size:0;gap:0;border-color:rgba(255,255,255,.9);
    box-shadow:inset 0 1px 0 #fff,inset 0 0 0 .5px rgba(11,42,91,.06),0 8px 18px -10px rgba(11,42,91,.25)}
  .page:not(.conversing) .footer-privacy svg{width:18px;height:18px;padding:0;background:none;stroke-width:1.9}
  .page:not(.conversing) .footer-secondary{display:block;text-align:left;padding:6px 8px 0;font-size:10.5px;line-height:1.45}
}
@media (max-width:640px) and (max-height:740px){
  .page:not(.conversing) .chat-header{padding-top:60px}
  .page:not(.conversing) .chat-header h1{font-size:72px;gap:16px}
  .page:not(.conversing) .eko-mark{height:58px}
  .page:not(.conversing) .eko-divider{height:48px}
  .page:not(.conversing) .messages{padding-top:20px}
  .page .pv-library{--pv-base:195px}
}
@media (max-width:640px) and (max-height:620px){
  .page:not(.conversing) .chat-header{padding-top:52px}
  .page:not(.conversing) .chat-header h1{font-size:48px;gap:12px}
  .page:not(.conversing) .eko-mark{height:40px;filter:none}
  .page:not(.conversing) .eko-divider{height:32px}
  .page:not(.conversing) .messages{padding-top:12px}
  .page .pv-library{--pv-base:181px;padding:12px 12px 10px}
  .page:not(.conversing) .footer-secondary{display:none}
}
@media (prefers-reduced-motion:reduce){
  .page:not(.conversing) .chatbox::before,.page .pv-library-document,.pv-segmented button,.pv-months button{transition:none}
  .page .pv-library-document:hover{transform:none}
}

/* ════════════════════════════════════════════════════════════════
   Bibliothèque des PV « Cover Flow » — maquette G3 validée par Nicolas
   le 6 octobre 2026. Les PV défilent comme des couvertures (récent →
   ancien) ; curseur et années pour remonter le temps ; Ouvrir = PDF.
   ════════════════════════════════════════════════════════════════ */
.page .pv-library{--pv-cover-w:92px;--pv-cover-h:118px;padding:16px 22px 6px}
.page .pv-library-heading{display:flex;align-items:center;justify-content:flex-start;gap:13px;margin:0 0 6px;padding:0}
.pv-library-icon{flex:none;width:38px;height:38px;border-radius:10px;display:grid;place-items:center;color:#fff;
  background:linear-gradient(160deg,#4fa392 0%,#2f7f72 55%,#1e5a6e 100%);
  box-shadow:inset 0 1px 1px rgba(255,255,255,.45),inset 0 -2px 4px rgba(0,0,0,.12),0 8px 16px -8px rgba(39,106,97,.7)}
.pv-library-icon svg{width:19px;height:19px;fill:none;stroke:currentColor;stroke-width:1.9;stroke-linecap:round;stroke-linejoin:round}
.pv-library-titles{flex:1;min-width:0}
.welcome .pv-library h2{margin:0;font-size:19px;line-height:1.2;font-weight:700;letter-spacing:-.025em;color:#0b1730}
.page .pv-library .pv-library-sub{margin:2px 0 0;font-size:13px;line-height:1.35;font-weight:400;color:#5a6d84}
.page .pv-library #pvLibraryCount{font-size:inherit;font-weight:inherit;color:inherit}
#pvLibraryCount:empty + .pv-sub-sep{display:none}

.pv-flow{flex:none;display:flex;flex-direction:column;min-width:0}
.pv-flow-stage{position:relative;height:calc(var(--pv-cover-h) * 1.12 + 26px);overflow:hidden;overflow:clip;perspective:900px;
  touch-action:pan-y;user-select:none;-webkit-user-select:none;cursor:grab;
  -webkit-mask-image:linear-gradient(90deg,transparent,#000 12%,#000 88%,transparent);mask-image:linear-gradient(90deg,transparent,#000 12%,#000 88%,transparent)}
.pv-flow-stage:active{cursor:grabbing}
.pv-cover{position:absolute;left:50%;top:calc(var(--pv-cover-h) * .06 + 4px);width:var(--pv-cover-w);height:var(--pv-cover-h);
  margin-left:calc(var(--pv-cover-w) / -2);padding:0;border:0;border-radius:10px;background:none;font:inherit;color:inherit;cursor:pointer;
  transform-origin:50% 50%;transition:transform .5s cubic-bezier(.16,1,.3,1),opacity .4s ease;-webkit-tap-highlight-color:transparent}
.pv-cover:focus-visible{outline:2px solid #477eaa;outline-offset:4px}
.pv-cover-face{position:absolute;inset:0;display:flex;flex-direction:column;overflow:hidden;border-radius:10px;background:#fff;text-align:left;
  box-shadow:0 0 0 .5px rgba(11,42,91,.14),0 14px 24px -14px rgba(11,42,91,.55)}
.pv-cover[aria-current="true"] .pv-cover-face{box-shadow:0 0 0 .5px rgba(11,42,91,.14),0 24px 40px -16px rgba(11,42,91,.55)}
.pv-cover::after{content:"";position:absolute;left:0;right:0;top:calc(100% + 3px);height:30%;border-radius:10px;pointer-events:none;
  background:linear-gradient(180deg,rgba(15,52,112,.16),rgba(15,52,112,0));
  -webkit-mask-image:linear-gradient(180deg,#000,transparent);mask-image:linear-gradient(180deg,#000,transparent)}
.pv-cover-band{height:42%;flex:none;display:flex;flex-direction:column;padding:calc(var(--pv-cover-h) * .06) 10% 0;color:#fff;
  background:radial-gradient(ellipse 80% 90% at 100% 0%,rgba(191,230,216,.45),rgba(191,230,216,0) 60%),linear-gradient(140deg,#0f3470,#1f5583 50%,#2f7f72)}
.pv-cover-kicker{font-size:calc(var(--pv-cover-w) * .075);font-weight:700;letter-spacing:.14em;text-transform:uppercase;opacity:.8}
.pv-cover-date{margin-top:auto;margin-bottom:calc(var(--pv-cover-h) * .05);display:flex;align-items:baseline;gap:5px}
.pv-cover-day{font-size:calc(var(--pv-cover-w) * .3);font-weight:300;letter-spacing:-.05em;line-height:.9}
.pv-cover-month{font-size:calc(var(--pv-cover-w) * .09);font-weight:700;letter-spacing:.08em;line-height:1.2;text-transform:uppercase}
.pv-cover-body{flex:1;display:flex;flex-direction:column;gap:calc(var(--pv-cover-h) * .035);padding:calc(var(--pv-cover-h) * .07) 10%}
.pv-cover-body i{display:block;height:3px;border-radius:2px;background:#e3e9ef}
.pv-cover-body i:nth-child(2){width:92%}.pv-cover-body i:nth-child(3){width:96%}.pv-cover-body i:nth-child(4){width:70%}.pv-cover-body i:nth-child(5){width:88%}
.pv-cover-pages{margin-top:auto;font-size:calc(var(--pv-cover-w) * .085);font-weight:600;color:#6b7c90}

.pv-flow-info{display:flex;align-items:center;gap:16px;margin-top:2px;padding:0 4px;min-width:0}
.pv-flow-text{flex:1;min-width:0;display:flex;flex-direction:column;gap:2px}
.pv-flow-eyebrow{font-size:10.5px;font-weight:700;letter-spacing:.12em;text-transform:uppercase;color:#2f7f72}
.pv-flow-line{display:flex;align-items:baseline;gap:10px;min-width:0;white-space:nowrap}
.pv-flow-date{flex:none;font-size:18px;font-weight:700;letter-spacing:-.02em;color:#0b1730}
.pv-flow-meta{min-width:0;overflow:hidden;text-overflow:ellipsis;font-size:13.5px;color:#56687e}
.pv-flow-open{flex:none;display:inline-flex;align-items:center;gap:6px;height:40px;padding:0 16px 0 18px;border-radius:999px;color:#fff;
  text-decoration:none;font-size:14px;font-weight:600;background:radial-gradient(circle at 35% 25%,#4fa392 0%,#2f7f72 45%,#23625a 100%);
  box-shadow:inset 0 1px 1px rgba(255,255,255,.45),0 10px 20px -10px rgba(39,106,97,.75)}
.pv-flow-open:hover{filter:brightness(1.07);color:#fff}
.pv-flow-open:focus-visible{outline:2px solid #477eaa;outline-offset:2px}
.pv-flow-open svg{width:14px;height:14px;fill:none;stroke:currentColor;stroke-width:2.2;stroke-linecap:round;stroke-linejoin:round}

.pv-flow-scrub{position:relative;height:36px;margin:8px 4px 0}
.pv-flow-rail,.pv-flow-fill{position:absolute;left:0;top:11px;height:2px;border-radius:1px}
.pv-flow-rail{right:0;background:rgba(18,60,124,.12)}
.pv-flow-fill{width:0;background:#2f7f72}
.pv-flow-ticks{position:absolute;left:0;right:0;top:9px;height:6px;pointer-events:none;border-right:1px solid rgba(18,60,124,.25);
  background:repeating-linear-gradient(90deg,rgba(18,60,124,.25) 0 1px,transparent 1px calc(100% / var(--pv-steps,1)))}
.pv-flow-range{-webkit-appearance:none;appearance:none;position:absolute;left:-9px;top:3px;width:calc(100% + 18px);height:18px;margin:0;
  background:transparent;cursor:pointer;z-index:2}
.pv-flow-range:focus{outline:none}
.pv-flow-range::-webkit-slider-runnable-track{height:18px;background:transparent}
.pv-flow-range::-moz-range-track{height:18px;background:transparent}
.pv-flow-range::-webkit-slider-thumb{-webkit-appearance:none;appearance:none;width:18px;height:18px;border-radius:50%;background:#fff;
  box-shadow:0 0 0 .5px rgba(11,42,91,.2),0 4px 10px -2px rgba(11,42,91,.35)}
.pv-flow-range::-moz-range-thumb{width:18px;height:18px;border:0;border-radius:50%;background:#fff;box-shadow:0 0 0 .5px rgba(11,42,91,.2),0 4px 10px -2px rgba(11,42,91,.35)}
.pv-flow-range:focus-visible::-webkit-slider-thumb{box-shadow:0 0 0 2px #477eaa,0 4px 10px -2px rgba(11,42,91,.35)}
.pv-flow-range:focus-visible::-moz-range-thumb{box-shadow:0 0 0 2px #477eaa,0 4px 10px -2px rgba(11,42,91,.35)}
.pv-flow-years{position:absolute;left:0;right:0;top:20px;height:18px}
.pv-flow-years button{position:absolute;top:0;padding:0 2px;border:0;background:none;font:inherit;font-size:11.5px;font-weight:700;line-height:18px;
  color:#4d6076;font-variant-numeric:tabular-nums;cursor:pointer}
.pv-flow-years button:hover{color:#123c7c}
.pv-flow-years button[aria-pressed="true"]{color:#2f7f72}
.pv-flow-years button:focus-visible{outline:2px solid #477eaa;outline-offset:1px;border-radius:4px}
.pv-flow.is-static .pv-cover{transition:none}

@media (min-width:641px) and (min-height:781px){
  .page:not(.conversing) .messages{padding-top:30px}
}
@media (min-width:641px) and (max-height:780px){
  .page .pv-library{--pv-cover-w:80px;--pv-cover-h:102px;padding-top:14px}
}
@media (min-width:641px) and (max-height:600px){
  .page .pv-library{--pv-cover-w:48px;--pv-cover-h:60px;padding:10px 16px 2px}
  .pv-flow-eyebrow,.pv-flow-years,.page .pv-library .pv-library-sub{display:none}
  .pv-library-icon{width:30px;height:30px;border-radius:8px}
  .pv-library-icon svg{width:15px;height:15px}
  .welcome .pv-library h2{font-size:16px}
  .pv-cover::after{display:none}
  .pv-flow-stage{height:calc(var(--pv-cover-h) * 1.12 + 10px)}
  .pv-flow-date{font-size:15px}
  .pv-flow-open{height:34px}
  .pv-flow-scrub{height:20px;margin-top:0}
  .pv-flow-info{margin-top:0}
  .page .pv-library-heading{margin-bottom:2px}
}
@media (max-width:640px){
  .page .pv-library{--pv-cover-w:92px;--pv-cover-h:118px;padding:16px 14px 2px}
  .page .pv-library-heading{gap:11px}
  .pv-library-icon{width:34px;height:34px;border-radius:9px}
  .pv-library-icon svg{width:17px;height:17px}
  .welcome .pv-library h2{font-size:16.5px}
  .page .pv-library .pv-library-sub{font-size:12px}
  .pv-flow-info{gap:12px;padding:0 2px}
  .pv-flow-line{flex-direction:column;align-items:flex-start;gap:1px}
  .pv-flow-date{font-size:15.5px}
  .pv-flow-meta{max-width:100%;font-size:12px}
  .pv-flow-open{width:44px;height:44px;padding:0;justify-content:center}
  .pv-flow-open .pv-open-text{position:absolute;width:1px;height:1px;overflow:hidden;clip:rect(0 0 0 0);white-space:nowrap}
  .pv-flow-open svg{width:15px;height:15px}
  .pv-flow-scrub{margin-top:10px}
}
@media (max-width:640px) and (max-height:740px){
  .page .pv-library{--pv-cover-w:78px;--pv-cover-h:100px}
}
@media (max-width:640px) and (max-height:620px){
  .page .pv-library{--pv-cover-w:60px;--pv-cover-h:78px;padding:12px 12px 0}
  .pv-cover::after{display:none}
  .pv-flow-stage{height:calc(var(--pv-cover-h) * 1.12 + 8px)}
}
@media (prefers-reduced-motion:reduce){
  .pv-cover{transition:none}
}

/* ════════════════════════════════════════════════════════════════
   Vue réponse « Lecture » (R1) + accueil mobile question en haut (M) — CSS SEUL.
   Moteur, JavaScript et contenu des réponses inchangés (décision du 6 octobre 2026).
   ════════════════════════════════════════════════════════════════ */
body:has(.page.conversing) .eko-brand,
body:has(.page.conversing) .aurora,body:has(.page.conversing) .halo,
body:has(.page.conversing) .grid,body:has(.page.conversing) .vign,
body:has(.page.conversing) .grain{display:none}
body:has(.page.conversing) .bg-base{background:
  radial-gradient(ellipse 48% 55% at 14% 6%,rgba(191,230,216,.8),rgba(191,230,216,0) 70%),
  radial-gradient(ellipse 45% 50% at 88% 10%,rgba(150,178,255,.38),rgba(150,178,255,0) 70%),
  radial-gradient(ellipse 60% 40% at 50% 104%,rgba(54,132,119,.16),rgba(54,132,119,0) 70%),
  linear-gradient(180deg,#f6f9fa 0%,#edf3f5 100%)}

/* Coque : en-tête, fil, alerte, capsule, aide */
.page.conversing{max-width:none;padding:0;gap:0}
.page.conversing .chatbox{display:grid;grid-template-columns:minmax(24px,1fr) minmax(0,860px) minmax(24px,1fr);
  grid-template-rows:auto minmax(0,1fr) auto auto auto;padding:0 0 6px;border:0;border-radius:0;background:none;
  box-shadow:none;backdrop-filter:none;-webkit-backdrop-filter:none;overflow:hidden;isolation:auto;animation:none}
.page.conversing .chatbox > *{grid-column:2}
.page.conversing .chatbox::after,.page.conversing .glint,.page.conversing .chat-sep,.page.conversing .input-sep,
.page.conversing .scroll-fab{display:none}

/* En-tête : logo SNE-CGC + EKO */
.page.conversing .chat-header{grid-column:1/-1;grid-row:1;display:flex;align-items:center;justify-content:center;height:76px;padding:0 220px}
.page.conversing .chat-header .eyebrow,.page.conversing .chat-header p,.page.conversing .chat-header .eko-sign{display:none}
.page.conversing .chat-header h1{display:flex;align-items:center;justify-content:center;gap:12px;margin:0;font-size:32px;line-height:.92;font-weight:800;letter-spacing:-.06em}
.page.conversing .eko-mark{display:block;flex:none;width:auto;height:34px;filter:drop-shadow(0 6px 12px rgba(11,42,91,.14))}
.page.conversing .eko-divider{display:block;flex:none;width:1.5px;height:28px;border-radius:1px;
  background:linear-gradient(180deg,rgba(18,60,124,0),rgba(18,60,124,.28) 25%,rgba(54,132,119,.28) 75%,rgba(54,132,119,0))}
.page.conversing .chat-header h1 .accent{padding-right:4px;
  background:linear-gradient(180deg,rgba(255,255,255,.35) 0%,rgba(255,255,255,0) 45%),linear-gradient(100deg,#0f3470 8%,#2a5f96 48%,#3a8e80 92%);
  -webkit-background-clip:text;background-clip:text;-webkit-text-fill-color:transparent;color:transparent}

/* Nouvelle question : pastille vert d'eau */
body:has(.page.conversing) .reset-btn{top:max(18px,calc(var(--safe-top) + 18px));right:max(32px,calc(var(--safe-right) + 32px));
  height:40px;padding:0 18px 0 14px;gap:8px;border:0;border-radius:999px;font-size:13.5px;font-weight:600;letter-spacing:0;text-transform:none;
  color:#fff;text-shadow:none;background:radial-gradient(circle at 35% 25%,#4fa392 0%,#2f7f72 45%,#23625a 100%);
  backdrop-filter:none;-webkit-backdrop-filter:none;box-shadow:inset 0 1px 1px rgba(255,255,255,.45),0 10px 20px -10px rgba(39,106,97,.75)}
body:has(.page.conversing) .reset-btn::before,body:has(.page.conversing) .reset-btn::after{display:none}
body:has(.page.conversing) .reset-btn:hover{transform:none;background:radial-gradient(circle at 35% 25%,#58ad9b 0%,#33877a 45%,#266a61 100%)}
body:has(.page.conversing) .reset-btn svg{width:15px;height:15px;stroke:#fff;stroke-width:2}

/* Fil de lecture */
.page.conversing .messages{grid-column:1/-1;grid-row:2;padding:18px max(24px,calc((100% - 860px) / 2)) 28px;gap:18px;
  -webkit-mask-image:linear-gradient(180deg,transparent 0,#000 20px,#000 calc(100% - 28px),transparent 100%);
  mask-image:linear-gradient(180deg,transparent 0,#000 20px,#000 calc(100% - 28px),transparent 100%)}
.page.conversing .bubble.user{align-items:center;gap:10px}
.page.conversing .bubble.user .bubble-avatar{width:32px;height:32px;font-size:11px;font-weight:700;color:#123c7c;background:#e6edfa;box-shadow:none}
.page.conversing .bubble.user .bubble-body{max-width:78%}
.page.conversing .bubble.user .bubble-text{padding:10px 18px;border:0;border-radius:20px;background:rgba(255,255,255,.88);color:#0b1730;
  font-size:15px;font-weight:500;line-height:1.45;box-shadow:inset 0 0 0 .5px rgba(11,42,91,.14),0 6px 16px -10px rgba(11,42,91,.3)}
.page.conversing .bubble.bot{align-items:flex-start;gap:12px}
.page.conversing .bubble.bot > .bubble-avatar{display:grid;place-items:center;width:34px;height:34px;margin-top:4px;color:#fff;
  background:linear-gradient(160deg,#4fa392,#2f7f72 55%,#1e5a6e);box-shadow:0 6px 14px -6px rgba(39,106,97,.7)}
.page.conversing .bubble.bot > .bubble-avatar svg{width:17px;height:17px}
.page.conversing .bubble.bot .bubble-body{flex:1 1 auto;min-width:0;max-width:none;gap:0}
.page.conversing .bubble.bot .bubble-text,.page.conversing .bubble.bot .bubble-text.md{max-width:none;padding:26px 28px 22px;border:0;border-radius:26px;
  background:rgba(255,255,255,.93);color:#0b1730;font-size:15px;line-height:1.65;backdrop-filter:none;-webkit-backdrop-filter:none;
  box-shadow:inset 0 1px 0 rgba(255,255,255,.9),0 24px 48px -28px rgba(11,42,91,.35),inset 0 0 0 .5px rgba(11,42,91,.08)}

/* Sujets retrouvés : liste groupée */
.page.conversing .eko-topic-answer{display:grid;grid-template-columns:minmax(0,1fr) auto;column-gap:16px}
.page.conversing .eko-topic-answer > *{grid-column:1/-1}
.page.conversing .bubble-text.md .eko-topic-count{grid-column:1;margin:0;font-size:17px;font-weight:700;letter-spacing:-.02em;color:#0b1730;line-height:1.35}
.page.conversing .bubble-text.md .eko-topic-query{grid-column:2;grid-row:1;align-self:start;margin:2px 0 0;display:inline-flex;align-items:center;height:28px;padding:0 11px;
  border-radius:999px;background:rgba(18,60,124,.06);box-shadow:inset 0 0 0 .5px rgba(18,60,124,.12);color:#123c7c;font-size:12px;font-weight:600;white-space:nowrap}
.page.conversing .eko-topic-list{display:block;margin:14px 0 0!important}
.page.conversing .eko-topic-item + .eko-topic-item{border-top:.5px solid rgba(11,42,91,.10)}
.page.conversing .eko-topic{border:0;border-radius:0;background:none;overflow:visible}
.page.conversing .eko-topic-summary{display:grid;grid-template-columns:minmax(0,1fr) 30px;column-gap:14px;row-gap:3px;align-items:center;
  padding:12px 6px;line-height:1.35;border-radius:14px}
.page.conversing .eko-topic-summary:hover{background:rgba(18,60,124,.03)}
.page.conversing .eko-topic-summary::after{content:"";grid-column:2;grid-row:1/span 3;align-self:center;position:static;width:30px;height:30px;border-radius:50%;
  background:rgba(18,60,124,.06) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23123C7C' stroke-width='2.2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E") center/15px no-repeat}
.page.conversing .eko-topic[open] > .eko-topic-summary{background:none;border:0}
.page.conversing .eko-topic[open] > .eko-topic-summary::after{transform:rotate(180deg);background-color:rgba(54,132,119,.14)}
.page.conversing .eko-topic-date{grid-column:1;margin:0;font-size:12px;font-weight:600;color:#2f7f72}
.page.conversing .eko-topic-title{grid-column:1;font-size:15px;font-weight:650;line-height:1.35;letter-spacing:-.01em;color:#0b1730}
.page.conversing .eko-topic-read{grid-column:1;margin:2px 0 0;font-size:12px;font-weight:600;color:#2f7f72}
.page.conversing .eko-topic[open] .eko-topic-read{display:none}
.page.conversing .eko-topic-body{padding:0 6px 16px}
.page.conversing .eko-topic-parents{margin:0 0 10px;font-size:12px!important;color:#5a6d84}
.page.conversing .eko-topic-actions{gap:8px;margin:0 0 10px}
.page.conversing .eko-topic-pdf{display:inline-flex;align-items:center;gap:6px;height:34px;padding:0 14px;border-radius:999px;text-decoration:none;
  color:#fff!important;font-size:12.5px;font-weight:600;background:radial-gradient(circle at 35% 25%,#4fa392 0%,#2f7f72 45%,#23625a 100%);
  box-shadow:inset 0 1px 1px rgba(255,255,255,.45),0 8px 16px -10px rgba(39,106,97,.75)}
.page.conversing .eko-topic-pdf::after{content:"";width:13px;height:13px;background:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='white' stroke-width='2.2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M7 17 17 7M9 7h8v8'/%3E%3C/svg%3E") center/contain no-repeat}
.page.conversing .eko-topic-copy{display:inline-flex;align-items:center;height:34px;padding:0 14px;border-radius:999px;text-decoration:none;
  color:#24344d!important;font-size:12.5px;font-weight:600;background:rgba(255,255,255,.75);box-shadow:inset 0 0 0 .5px rgba(11,42,91,.16)}
.page.conversing .eko-topic-content{margin:0;padding:14px 16px 12px 18px;border:0;border-radius:14px;background:rgba(242,246,248,.95);
  box-shadow:inset 3px 0 0 #3f978a;font-family:inherit;color:#2b3a52}
.page.conversing .eko-topic-content .eko-topic-page{margin:12px 0 6px!important;padding:0;border:0;text-align:left;font-family:inherit;font-size:10.5px!important;
  font-weight:700;letter-spacing:.12em;text-transform:uppercase;color:#6b7c90}
.page.conversing .eko-topic-content .eko-topic-page:first-child{margin-top:0!important}
.page.conversing .eko-topic-content .eko-topic-paragraph{margin:0 0 10px!important;font-family:inherit;font-size:14px;line-height:1.6;color:#2b3a52}
.page.conversing .eko-pv-heading{font-size:1em;color:#0b2a5b}
.page.conversing .eko-pv-highlight{background:rgba(54,132,119,.12)}
.page.conversing .eko-topic-status{font-size:13px;color:#5a6d84}
.page.conversing .eko-topic-more{display:block;width:100%;height:40px;margin-top:12px;padding:0;border:0;border-radius:14px;background:rgba(54,132,119,.10);
  color:#23625a;font:inherit;font-size:13.5px;font-weight:600;cursor:pointer}
.page.conversing .eko-topic-more:hover{background:rgba(54,132,119,.16)}
.page.conversing .eko-topic-more[hidden]{display:none}
.page.conversing .bubble-text.md .eko-answer-coverage{margin:10px 0 0;padding:0;border:0;text-align:center;font-size:12px;color:#5a6d84}
.page.conversing .eko-related{margin-top:14px;padding-top:12px;border-top:.5px solid rgba(11,42,91,.10)}
.page.conversing .eko-related > summary{font-size:13.5px;font-weight:600;color:#123c7c}

/* Synthèse : sources numérotées, extraits à liseré vert d'eau */
.page.conversing .bubble-text.md .eko-summary{margin:0 0 6px;padding:0;border:0;border-radius:0;background:none}
.page.conversing .bubble-text.md .eko-summary::before{content:"Synthèse";display:block;margin:0 0 8px;font-size:10.5px;font-weight:700;letter-spacing:.12em;text-transform:uppercase;color:#2f7f72}
.page.conversing .bubble-text.md .eko-summary p{margin:0 0 10px;font-size:16px;line-height:1.6;color:#0b1730}
.page.conversing .bubble-text.md .eko-citation,.page.conversing .bubble-text.md .eko-summary .eko-citation{display:inline-grid;place-items:center;min-width:24px;min-height:20px;height:20px;
  padding:0 6px;margin:0 1px;border:0;border-radius:999px;background:rgba(54,132,119,.14);color:#23625a;font:inherit;font-size:11px;font-weight:700;line-height:1;vertical-align:1px;cursor:pointer}
.page.conversing .bubble-text.md .eko-citation:hover{background:rgba(54,132,119,.24)}
.page.conversing .bubble-text.md .eko-evidence-title{margin:14px 0 0;padding-top:14px;border-top:.5px solid rgba(11,42,91,.10);
  font-size:10.5px;font-weight:700;letter-spacing:.12em;text-transform:uppercase;color:#6b7c90}
.page.conversing .eko-answer-section{margin-top:10px;padding:14px 16px 12px 18px;border-radius:14px;background:rgba(242,246,248,.95);box-shadow:inset 3px 0 0 #3f978a}
.page.conversing .eko-answer-section + .eko-answer-section{margin-top:10px;padding-top:14px;border-top:0}
.page.conversing .eko-answer-meta{justify-content:space-between;margin:0 0 4px;font-size:12px;font-weight:600;color:#2f7f72}
.page.conversing .bubble-text.md .eko-answer-heading{margin:2px 0 4px;font-size:14px;font-weight:700;line-height:1.4;color:#0b2a5b}
.page.conversing .bubble-text.md .eko-answer-paragraph{max-width:none;font-size:13.5px;line-height:1.6;color:#2b3a52}
.page.conversing .bubble-text.md .eko-answer-paragraph + .eko-answer-paragraph{margin-top:8px}
.page.conversing .eko-answer-notice{margin-top:12px;border-radius:0 12px 12px 0}

/* Actions sous la réponse */
.page.conversing .msg-actions{gap:8px;padding:0;margin-top:12px}
.page.conversing .copy-btn,.page.conversing .retry-btn{display:inline-flex;align-items:center;gap:7px;height:34px;padding:0 14px;border:0;border-radius:999px;
  font-size:12.5px;font-weight:600;color:#24344d;background:rgba(255,255,255,.75);backdrop-filter:none;-webkit-backdrop-filter:none;
  box-shadow:inset 0 0 0 .5px rgba(11,42,91,.16);transform:none}
.page.conversing .copy-btn::before,.page.conversing .copy-btn::after,.page.conversing .retry-btn::before,.page.conversing .retry-btn::after{display:none}
.page.conversing .copy-btn:hover,.page.conversing .retry-btn:hover,.page.conversing .copy-btn:active,.page.conversing .retry-btn:active{transform:none;background:#fff}
.page.conversing .copy-btn svg,.page.conversing .retry-btn svg{width:13px;height:13px}
.page.conversing .retry-btn.eko-deep{color:#23625a;background:rgba(54,132,119,.10);box-shadow:inset 0 0 0 .5px rgba(54,132,119,.3)}
.page.conversing .eko-evidence{margin:8px 0 0;padding:0;border:0;background:none;font-size:12.5px!important;color:#4d6076}
.page.conversing .eko-evidence summary{display:inline-flex;align-items:center;gap:6px;padding:6px 2px;font-weight:600;color:#4d6076}
.page.conversing .eko-evidence p{border:0;padding:6px 2px 0}

/* Saisie : capsule de l'accueil */
.page.conversing .perso-alert{grid-row:3;margin:6px 0 4px}
.page.conversing .chatbox::before{content:"";grid-column:2;grid-row:4;align-self:start;height:75px;margin:10px 30px 0;border-radius:40px;
  background:conic-gradient(from 200deg,#2f6bff,#5bb8a6,#bfe6d8,#8fb0ff,#123c7c,#2f6bff);filter:blur(26px);opacity:.34;pointer-events:none;z-index:1;
  transition:opacity .35s var(--ease)}
.page.conversing .chatbox:has(.input-area:focus-within)::before,.page.conversing .chatbox:has(.voice-btn[aria-pressed="true"])::before{opacity:.55}
.page.conversing .input-area{grid-row:4;z-index:2;width:100%;margin:6px 0 0;
  display:grid;grid-template-columns:20px minmax(0,1fr) auto 44px 48px;column-gap:8px;row-gap:0;align-items:center;
  min-height:67px;padding:0 8.5px 0 24px;border-radius:34px;border:1.5px solid transparent;
  background:linear-gradient(rgba(255,255,255,.9),rgba(255,255,255,.9)) padding-box,
    conic-gradient(from 200deg,rgba(47,107,255,.85),rgba(91,184,166,.85),rgba(191,230,216,.9),rgba(143,176,255,.85),rgba(18,60,124,.75),rgba(47,107,255,.85)) border-box;
  backdrop-filter:blur(30px) saturate(180%);-webkit-backdrop-filter:blur(30px) saturate(180%);box-shadow:inset 0 1px 0 #fff}
.page.conversing .input-area:focus-within{border-color:transparent;box-shadow:inset 0 1px 0 #fff}
.page.conversing .input-area::before{content:"";grid-column:1;grid-row:1;width:20px;height:20px;
  background:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%2356687E' stroke-width='1.9' stroke-linecap='round'%3E%3Ccircle cx='11' cy='11' r='7'/%3E%3Cpath d='m20 20-3.5-3.5'/%3E%3C/svg%3E") center/20px no-repeat}
.page.conversing .input-wrap{grid-column:2;grid-row:1;min-width:0}
.page.conversing textarea{display:block;height:44px;min-height:44px;max-height:88px;padding:11px 6px;border:0;border-radius:0;background:transparent;box-shadow:none;
  backdrop-filter:none;-webkit-backdrop-filter:none;font-size:17px;line-height:22px;letter-spacing:-.01em;color:#0b1730}
.page.conversing textarea:focus{border:0;background:transparent;box-shadow:none}
.page.conversing .question-scope{grid-column:3;grid-row:1;position:relative;display:flex;align-items:center}
.page.conversing .question-scope select{appearance:none;-webkit-appearance:none;width:auto;height:36px;padding:0 32px 0 14px;border:0;border-radius:999px;
  font:inherit;font-size:13.5px;font-weight:600;color:#123c7c;cursor:pointer;
  background:rgba(18,60,124,.06) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23123C7C' stroke-width='2.2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E") right 12px center/12px no-repeat;
  box-shadow:inset 0 0 0 .5px rgba(18,60,124,.1)}
.page.conversing .voice-btn{grid-column:4;grid-row:1;width:44px;min-width:44px;height:44px;padding:0;border:0;border-radius:50%;background:transparent;box-shadow:none;color:#123c7c}
.page.conversing .voice-btn svg{width:20px;height:20px;stroke-width:1.8}
.page.conversing .voice-btn:hover{background:rgba(18,60,124,.06)}
.page.conversing .voice-btn[aria-pressed="true"]{background:var(--blue);color:#fff}
.page.conversing .send-btn{grid-column:5;grid-row:1;width:48px;min-width:48px;height:48px;border-radius:50%;transform:none;
  background:radial-gradient(circle at 35% 25%,#4fa392 0%,#2f7f72 45%,#23625a 100%);backdrop-filter:none;-webkit-backdrop-filter:none;
  box-shadow:inset 0 1px 1px rgba(255,255,255,.45),inset 0 -2px 4px rgba(0,0,0,.12),0 10px 22px -8px rgba(39,106,97,.65)}
.page.conversing .send-btn:hover{background:radial-gradient(circle at 35% 25%,#58ad9b 0%,#33877a 45%,#266a61 100%);transform:none}
.page.conversing .send-btn:active{transform:scale(.96)}
.page.conversing .send-btn::before,.page.conversing .send-btn:not(.loading)::after{display:none}
.page.conversing .send-btn svg{width:19px;height:19px;stroke:#fff;stroke-width:2.2}
.page.conversing .voice-help{grid-row:5;width:auto;align-self:start;margin:0;padding:10px 340px 0 24px;font-size:12px;line-height:1.4;color:#5a6d84}
.page.conversing .input-hint{grid-row:5;justify-self:end;align-self:start;width:auto;margin:0;padding:10px 24px 0 0;white-space:nowrap;font-size:12px;line-height:1.4;color:#5a6d84}
.page.conversing .input-hint kbd{font-weight:600;font-size:11px;padding:2px 7px;margin:0 2px 0 6px;border:0;border-radius:6px;color:#123c7c;
  background:rgba(255,255,255,.75);box-shadow:inset 0 0 0 .5px rgba(18,60,124,.16),0 1px 0 rgba(18,60,124,.1)}
.page.conversing .input-hint kbd:first-child{margin-left:0}

/* Pied : mention + Confidentialité sur une ligne */
.page.conversing .interface-footer{display:flex;flex-direction:row-reverse;align-items:center;justify-content:center;gap:12px;margin:0;
  padding:8px 16px calc(16px + var(--safe-bottom))}
.page.conversing .footer-priority{display:flex;gap:0}
.page.conversing .footer-secondary{display:block;margin:0;font-size:12px;line-height:1.4;color:#5a6d84;text-align:center}
.page.conversing .footer-privacy{min-height:28px;height:28px;padding:0 12px;gap:6px;border-radius:999px;color:#123c7c;font-size:12px;font-weight:600;
  background:rgba(255,255,255,.6);box-shadow:inset 0 0 0 .5px rgba(18,60,124,.14);backdrop-filter:none;-webkit-backdrop-filter:none}
.page.conversing .footer-privacy svg{width:12px;height:12px;stroke:currentColor}
.page.conversing .footer-privacy{white-space:nowrap;flex:none}
/* Paysage peu haut : en-tête et capsule resserrés pour laisser la place à la lecture */
@media (min-width:641px) and (max-height:520px){
  .page.conversing .chat-header{height:48px}
  .page.conversing .eko-mark{height:22px}
  .page.conversing .eko-divider{height:18px}
  .page.conversing .chat-header h1{font-size:21px}
  body:has(.page.conversing) .reset-btn{top:max(6px,calc(var(--safe-top) + 6px));height:36px}
  .page.conversing .messages{padding-top:8px;padding-bottom:12px}
  .page.conversing .input-area{min-height:54px;margin-top:4px}
  .page.conversing .chatbox::before{height:58px;margin-top:6px}
  .page.conversing textarea{height:38px;min-height:38px;padding:8px 6px;font-size:16px}
  .page.conversing .send-btn{width:40px;min-width:40px;height:40px}
  .page.conversing .voice-btn{width:38px;min-width:38px;height:38px}
  .page.conversing .voice-help,.page.conversing .input-hint{padding-top:4px;font-size:11px}
  .page.conversing .interface-footer{padding:2px 16px calc(6px + var(--safe-bottom))}
  .page.conversing .footer-secondary{font-size:11px}
}

/* Ordinateur peu haut */
@media (min-width:641px) and (max-height:720px){
  .page.conversing .chat-header{height:60px}
  .page.conversing .eko-mark{height:28px}
  .page.conversing .chat-header h1{font-size:26px}
  body:has(.page.conversing) .reset-btn{top:max(10px,calc(var(--safe-top) + 10px))}
  .page.conversing .input-area{min-height:60px}
  .page.conversing .chatbox::before{height:68px}
  .page.conversing .send-btn{width:44px;min-width:44px;height:44px}
  .page.conversing .interface-footer{padding-bottom:calc(10px + var(--safe-bottom))}
}
@media (min-width:641px) and (max-width:1000px){
  .page.conversing .voice-help{padding-right:24px}
  .page.conversing .input-hint{display:none}
  .page.conversing .chat-header{padding:0 200px}
}

/* Téléphone — conversation : barre d'en-tête, carte pleine largeur, saisie ancrée */
@media (max-width:640px){
  body:has(.page.conversing) .bg-base{background:
    radial-gradient(ellipse 95% 40% at 5% 4%,rgba(191,230,216,.85),rgba(191,230,216,0) 70%),
    radial-gradient(ellipse 85% 35% at 100% 8%,rgba(150,178,255,.38),rgba(150,178,255,0) 70%),
    radial-gradient(ellipse 110% 35% at 50% 104%,rgba(54,132,119,.18),rgba(54,132,119,0) 70%),
    linear-gradient(180deg,#f6f9fa 0%,#edf3f5 100%)}
  .page.conversing{padding:0}
  .page.conversing .chatbox{grid-template-columns:12px minmax(0,1fr) 12px;padding:0}
  .page.conversing .chat-header{height:calc(60px + var(--safe-top));padding:var(--safe-top) 64px 0;
    background:rgba(246,249,250,.75);backdrop-filter:blur(18px);-webkit-backdrop-filter:blur(18px);box-shadow:0 .5px 0 rgba(11,42,91,.12)}
  .page.conversing .chat-header h1{gap:9px;font-size:23px}
  .page.conversing .eko-mark{height:24px}
  .page.conversing .eko-divider{height:20px}
  body:has(.page.conversing) .reset-btn{top:calc(var(--safe-top) + 10px);right:calc(var(--safe-right) + 12px);width:40px;height:40px;padding:0;justify-content:center}
  body:has(.page.conversing) .reset-btn span{display:none}
  body:has(.page.conversing) .reset-btn svg{width:17px;height:17px}
  .page.conversing .messages{padding:16px 12px 20px;gap:14px}
  .page.conversing .bubble.user .bubble-text{font-size:14.5px}
  .page.conversing .bubble.bot{flex-direction:column;align-items:stretch;gap:8px}
  .page.conversing .bubble.bot > .bubble-avatar{display:grid;width:28px;height:28px;margin:0}
  .page.conversing .bubble.bot > .bubble-avatar svg{width:14px;height:14px}
  .page.conversing .bubble.bot .bubble-text,.page.conversing .bubble.bot .bubble-text.md{padding:18px 16px 16px;border-radius:22px}
  .page.conversing .eko-topic-answer{display:block}
  .page.conversing .bubble-text.md .eko-topic-count{font-size:15.5px}
  .page.conversing .bubble-text.md .eko-topic-query{margin-top:10px;height:auto;min-height:28px;padding:5px 11px;white-space:normal}
  .page.conversing .eko-topic-summary{column-gap:12px;padding:11px 2px}
  .page.conversing .eko-topic-title{font-size:14px}
  .page.conversing .eko-topic-body{padding:0 2px 14px}
  .page.conversing .eko-topic-content .eko-topic-paragraph{font-size:13.5px}
  .page.conversing .bubble-text.md .eko-summary p{font-size:15px}
  .page.conversing .bubble-text.md .eko-citation,.page.conversing .bubble-text.md .eko-summary .eko-citation{min-width:24px;min-height:24px;height:24px}
  .page.conversing .chatbox::before{grid-column:1/-1;grid-row:3/6;align-self:stretch;height:auto;margin:0;border-radius:0;
    background:rgba(246,249,250,.85);filter:none;opacity:1;box-shadow:0 -.5px 0 rgba(11,42,91,.12);z-index:0}
  .page.conversing .chatbox:has(.input-area:focus-within)::before,.page.conversing .chatbox:has(.voice-btn[aria-pressed="true"])::before{opacity:1}
  .page.conversing .perso-alert{z-index:1;margin:10px 0 0}
  .page.conversing .input-area{margin-top:12px;grid-template-columns:minmax(0,1fr) 40px 44px;grid-template-rows:57px auto;column-gap:4px;row-gap:8px;
    min-height:0;padding:0;border:0;border-radius:0;background:none;backdrop-filter:none;-webkit-backdrop-filter:none;box-shadow:none}
  .page.conversing .input-area::before{grid-column:1/-1;grid-row:1;width:auto;height:57px;border-radius:29px;border:1.5px solid transparent;z-index:0;
    background:linear-gradient(rgba(255,255,255,.92),rgba(255,255,255,.92)) padding-box,
      conic-gradient(from 200deg,rgba(47,107,255,.85),rgba(91,184,166,.85),rgba(191,230,216,.9),rgba(143,176,255,.85),rgba(18,60,124,.75),rgba(47,107,255,.85)) border-box}
  .page.conversing .input-wrap{grid-column:1;grid-row:1;z-index:1;padding-left:16px}
  .page.conversing textarea{height:40px;min-height:40px;max-height:72px;padding:9px 0;font-size:16px}
  .page.conversing .voice-btn{grid-column:2;grid-row:1;z-index:1;width:40px;min-width:40px;height:40px}
  .page.conversing .send-btn{grid-column:3;grid-row:1;z-index:1;width:44px;min-width:44px;height:44px;margin-right:6.5px}
  .page.conversing .question-scope{grid-column:1/-1;grid-row:2;justify-content:space-between;padding:0 4px;z-index:1}
  .page.conversing .question-scope label{position:static;width:auto;height:auto;overflow:visible;clip-path:none;font-size:12px;font-weight:600;color:#4d6076}
  .page.conversing .question-scope select{height:30px;padding:0 28px 0 12px;font-size:12.5px;background-color:rgba(255,255,255,.7);box-shadow:inset 0 0 0 .5px rgba(18,60,124,.14)}
  .page.conversing .voice-help{grid-column:2;grid-row:5;z-index:1;padding:6px 4px 0;font-size:10.5px;line-height:1.4}
  .page.conversing .input-hint{display:none}
  .page.conversing .interface-footer{flex-direction:row;justify-content:space-between;align-items:center;gap:8px;
    padding:6px 16px calc(12px + var(--safe-bottom));background:rgba(246,249,250,.85)}
  .page.conversing .footer-secondary{text-align:left;font-size:10.5px}
  .page.conversing .footer-priority{order:2}
  .page.conversing .footer-privacy{width:32px;min-width:32px;height:32px;min-height:32px;padding:0;justify-content:center;font-size:0;gap:0}
  .page.conversing .footer-privacy svg{width:14px;height:14px}
}

/* Téléphone — accueil : question en haut, bibliothèque dessous (maquette M) */
@media (max-width:640px){
  .page:not(.conversing) .chatbox{grid-template-rows:auto auto auto auto minmax(0,var(--library-height,300px)) minmax(0,1fr)}
  .page:not(.conversing) .chat-header{grid-row:1;padding:50px 0 0}
  .page:not(.conversing) .chat-header h1{font-size:78px;gap:16px}
  .page:not(.conversing) .eko-mark{height:64px}
  .page:not(.conversing) .eko-divider{height:52px}
  .page:not(.conversing) .input-area{grid-row:2;margin-top:22px;grid-template-rows:57px auto;row-gap:9px}
  .page:not(.conversing) .input-area::before{grid-row:1;height:57px;border-radius:29px}
  .page:not(.conversing) .input-wrap,.page:not(.conversing) .voice-btn,.page:not(.conversing) .send-btn{grid-row:1}
  .page:not(.conversing) .input-wrap{padding-left:16px}
  .page:not(.conversing) .voice-btn{width:40px;min-width:40px;height:40px}
  .page:not(.conversing) .send-btn{width:44px;min-width:44px;height:44px;margin-right:6.5px}
  .page:not(.conversing) .question-scope{grid-row:2;padding:0 4px}
  .page:not(.conversing) .question-scope select{height:30px;font-size:12.5px}
  .page:not(.conversing) .chatbox::before{grid-row:2;align-self:start;height:57px;margin:26px 18px 0}
  .page:not(.conversing) .voice-help{grid-row:3;padding:8px 4px 0}
  .page:not(.conversing) .perso-alert{grid-row:4;margin:10px 0 0}
  .page:not(.conversing) .messages{grid-row:5;padding:20px 0 0}
}
@media (max-width:640px) and (max-height:740px){
  .page:not(.conversing) .chat-header{padding-top:44px}
  .page:not(.conversing) .chat-header h1{font-size:60px}
  .page:not(.conversing) .eko-mark{height:50px}
  .page:not(.conversing) .eko-divider{height:40px}
  .page:not(.conversing) .input-area{margin-top:16px}
  .page:not(.conversing) .chatbox::before{margin-top:20px}
  .page:not(.conversing) .messages{padding-top:14px}
}
@media (max-width:640px) and (max-height:620px){
  .page:not(.conversing) .chat-header{padding-top:40px}
  .page:not(.conversing) .chat-header h1{font-size:44px}
  .page:not(.conversing) .eko-mark{height:36px}
  .page:not(.conversing) .eko-divider{height:28px}
}
@media (prefers-reduced-motion:reduce){
  .page.conversing .chatbox::before{transition:none}
}
