/* ===================================================================
   Justice4U V2 — Mon espace en interface conversationnelle
   Couche posée sur /dashboard : rien n'est retiré de la page, les
   éléments existants sont regroupés (barre, historique, zone de saisie,
   réglages) et les onglets du cabinet passent sous « Pro du droit ».
   Ces règles ne s'appliquent qu'avec body.v2-espace (posé par
   /v2/espace.js) : sans ce script, l'interface d'avant reste intacte.
=================================================================== */

/* Pendant la construction de l'interface : pas d'éclair de l'ancienne page */
html.v2-pre body > .nav, html.v2-pre body > .login-screen, html.v2-pre body > .app { visibility: hidden; }

/* Ancienne navigation, écran de connexion et bandeau « en ligne » : gardés dans la page, remplacés à l'écran */
body.v2-espace > .nav, body.v2-espace > .nav-overlay { display: none !important; }
body.v2-espace .login-screen { display: none !important; }
body.v2-espace .online-banner { display: none !important; }
body.v2-espace .app { padding-top: 0; }

/* En-tête et onglets du cabinet : seulement dans « Pro du droit » */
body.v2-espace:not([data-v2-vue="pro"]) .dash-header,
body.v2-espace:not([data-v2-vue="pro"]) .dash-tabs,
body.v2-espace:not([data-v2-vue="pro"]) .fab-create { display: none !important; }
body.v2-espace[data-v2-vue="pro"] .app { padding-top: calc(var(--v2-bar-h) + 30px); }
body.v2-espace .dash-tab[data-tab="guacamole"], body.v2-espace .dash-tab[data-tab="recherche"] { display: none !important; }
body.v2-espace[data-v2-vue="pro"] .v2-pied-saisie { display: none; }
body.v2-espace[data-v2-vue="pro"] .tab-content { padding-bottom: 60px; }

/* ---------- Vue Maître Guacamole ---------- */
body.v2-espace #tab-guacamole {
  max-width: var(--v2-col); padding: calc(var(--v2-bar-h) + 40px) 16px 210px; margin: 0 auto;
}
body.v2-espace #tab-guacamole .guac-hero {
  display: flex; flex-direction: column; align-items: center; text-align: center; gap: 14px;
  background: transparent !important; border: 0 !important; box-shadow: none !important; padding: 7vh 0 0; overflow: visible;
  -webkit-backdrop-filter: none; backdrop-filter: none;
}
body.v2-espace #tab-guacamole .guac-hero::after, body.v2-espace #tab-guacamole .guac-hero::before { display: none; }
body.v2-espace #tab-guacamole .guac-mascotte { width: clamp(118px, 21vh, 170px); height: auto; aspect-ratio: 472 / 480; animation: none; }
body.v2-espace #tab-guacamole .guac-mascotte canvas, body.v2-espace #tab-guacamole .guac-mascotte img { filter: none !important; }
body.v2-espace #tab-guacamole .guac-eyebrow { display: none; }
body.v2-espace #tab-guacamole .guac-intro { display: flex; flex-direction: column; align-items: center; }
body.v2-espace #tab-guacamole .guac-intro h2 {
  font-family: var(--font-display); font-style: normal; font-weight: 400; font-size: clamp(26px, 4vw, 34px); line-height: 1.15;
  letter-spacing: -0.01em; color: var(--v2-texte); margin: 0;
}
body.v2-espace #tab-guacamole .guac-intro h2 em { font-style: normal; color: inherit; }
/* La bulle de Maître Guacamole : une simple ligne d'état, seulement pendant qu'il travaille */
body.v2-espace #tab-guacamole .guac-bulle {
  display: none; max-width: 600px; margin: 8px auto 0; padding: 0; text-align: center;
  background: transparent !important; border: 0 !important; box-shadow: none !important; -webkit-backdrop-filter: none; backdrop-filter: none;
  color: var(--v2-texte-2); font-size: 14px; line-height: 1.5;
}
body.v2-espace #tab-guacamole .guac-bulle::before { display: none; }
body.v2-espace.v2-occupe #tab-guacamole .guac-bulle { display: block; }
body.v2-espace #tab-guacamole .guac-etapes { justify-content: center; margin-top: 10px; }
body.v2-espace #tab-guacamole .guac-cx-raccourci { display: none !important; }
body.v2-espace #guac-connecteur { display: none; }
body.v2-espace.v2-cx #guac-connecteur { display: block; }
/* Une fois la conversation lancée : la mascotte se fait discrète en haut du fil */
body.v2-espace.v2-conv #tab-guacamole .guac-hero { flex-direction: row; align-items: flex-start; text-align: left; justify-content: flex-start; padding-top: 0; gap: 12px; }
body.v2-espace.v2-conv #tab-guacamole .guac-mascotte { width: 44px; height: 45px; aspect-ratio: auto; flex-shrink: 0; }
body.v2-espace.v2-conv #tab-guacamole .guac-intro { align-items: flex-start; }
body.v2-espace.v2-conv #tab-guacamole .guac-intro h2, body.v2-espace.v2-conv #tab-guacamole .guac-cx-raccourci { display: none; }
body.v2-espace.v2-conv #tab-guacamole .guac-bulle { text-align: left; margin: 0; }
body.v2-espace.v2-conv #tab-guacamole .guac-etapes { justify-content: flex-start; }
body.v2-espace.v2-conv:not(.v2-occupe) #tab-guacamole .guac-hero { display: none; }

/* Le formulaire d'origine : ses éléments sont repris dans la zone de saisie et dans les réglages */
body.v2-espace #tab-guacamole .guac-form { background: transparent !important; border: 0 !important; box-shadow: none !important; padding: 0; margin: 0; -webkit-backdrop-filter: none; backdrop-filter: none; }
body.v2-espace #tab-guacamole .guac-form > .guac-grid > .full:not(.v2-garde),
body.v2-espace #tab-guacamole .guac-form > .guac-actions { display: none; }
body.v2-espace #guac-situation-label, body.v2-espace #guac-situation-aide { display: none !important; }
body.v2-espace #guac-lancer { position: absolute !important; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); opacity: 0; }
body.v2-espace .v2-composer textarea.guac-textarea {
  min-height: 26px; resize: none; border: 0 !important; background: transparent !important; padding: 2px 0 6px; border-radius: 0; box-shadow: none !important;
  font-size: 16px; line-height: 1.5; max-height: 38vh; color: var(--v2-texte);
}
body.v2-espace .v2-composer textarea[hidden] { display: none; }
/* Exemples de Maître Guacamole : sous la zone de saisie, avant la première question (quatre d'abord, les autres sur demande) */
body.v2-espace #guac-suggestions { display: none !important; }
body.v2-espace.v2-accueil-vide[data-v2-vue="guacamole"] #guac-suggestions {
  display: flex !important; flex-wrap: wrap; justify-content: center; gap: 8px; max-width: var(--v2-col); margin: 18px auto 0;
}
body.v2-espace #guac-suggestions .guac-sugg {
  max-width: 100%; padding: 8px 14px; border-radius: 999px; cursor: pointer; text-align: left;
  border: 1px solid var(--v2-trait-fort) !important; border-style: solid !important; background: color-mix(in srgb, var(--v2-surface) 70%, transparent) !important;
  color: var(--v2-texte-2); font: 400 14px/1.35 var(--font-body); letter-spacing: 0; text-transform: none; animation: none;
}
body.v2-espace #guac-suggestions .guac-sugg:hover { color: var(--v2-texte); background: var(--v2-surface) !important; border-color: color-mix(in srgb, var(--v2-accent) 40%, var(--v2-trait-fort)) !important; }
body.v2-espace #guac-suggestions .guac-sugg-autres { border-style: dashed !important; color: var(--v2-accent); }
body.v2-espace #guac-suggestions:has(.guac-sugg-autres) .guac-sugg:not(.guac-sugg-autres):nth-child(n+5) { display: none; }

/* Zone de saisie sous le titre, avant la première question */
body.v2-espace .v2-slot-saisie { width: 100%; max-width: var(--v2-col); margin: 24px auto 0; text-align: left; }
body.v2-espace .v2-slot-saisie:empty { display: none; }
body.v2-espace.v2-accueil-vide #tab-guacamole { padding-bottom: 60px; }

/* Réglages de Maître Guacamole dans la fenêtre « Réglages » */
body.v2-espace .v2-pop .guac-modes {
  display: flex; flex-wrap: wrap; gap: 2px; padding: 3px; margin: 0 4px 8px; border-radius: 10px;
  background: color-mix(in srgb, var(--v2-texte) 6%, transparent); border: 0;
}
body.v2-espace .v2-pop .guac-modes button {
  flex: 1; font-family: var(--font-body); font-size: 13px; letter-spacing: 0; text-transform: none; border-radius: 8px;
  border: 0; background: transparent; color: var(--v2-texte-2); padding: 7px 8px; box-shadow: none;
}
body.v2-espace .v2-pop .guac-modes button.active { background: var(--v2-surface); color: var(--v2-texte); box-shadow: 0 1px 3px rgba(10, 40, 25, 0.12); }
body.v2-espace .v2-pop .guac-cas, body.v2-espace .v2-pop #guac-bloc-dossier { padding: 8px 4px; }
body.v2-espace .v2-pop .guac-reglages { background: transparent; border: 0; padding: 0 4px; }
body.v2-espace .v2-pop .guac-reglages > summary { display: none; }
body.v2-espace .v2-pop .guac-reglages-grid { grid-template-columns: 1fr; gap: 12px; }
body.v2-espace .v2-pop .guac-checks { display: flex; flex-direction: column; gap: 6px; font-size: 13px; }
body.v2-espace .v2-pop .guac-moteur-choix { display: flex; flex-direction: column; gap: 6px; }
body.v2-espace .v2-pop [data-pop][hidden] { display: none; }
body.v2-espace .v2-pop .guac-help { font-size: 12px; color: var(--v2-texte-2); }
body.v2-espace .v2-pop select, body.v2-espace .v2-pop input[type="text"] {
  background: var(--v2-surface); color: var(--v2-texte); border: 1px solid var(--v2-trait-fort); border-radius: 10px;
}

/* Fil de la conversation (questions de la personne) */
body.v2-espace .v2-fil-guac { display: flex; flex-direction: column; gap: 14px; margin: 18px 0 14px; }
body.v2-espace .v2-fil-guac:empty { display: none; }
body.v2-espace #guac-resultat { animation: v2-apparait 0.3s var(--v2-ease); }

/* ---------- Vue Recherche : les résultats dans le cadre, la question dans la zone de saisie commune ---------- */
body.v2-espace #tab-recherche { max-width: 1180px; padding: calc(var(--v2-bar-h) + 26px) 12px 0; margin: 0 auto; }
body.v2-espace #tab-recherche .search-embed-head { display: none; }
body.v2-espace #tab-recherche .search-embed-wrap { border: 0; background: transparent; border-radius: 0; }
body.v2-espace #search-frame { height: calc(100dvh - var(--v2-bar-h) - 40px) !important; min-height: 420px; }
body.v2-espace .v2-recherche-vide { display: flex; flex-direction: column; align-items: center; text-align: center; gap: 14px; padding: 8vh 8px 10px; }
body.v2-espace .v2-recherche-vide[hidden] { display: none; }
body.v2-espace .v2-recherche-question { display: flex; justify-content: flex-end; max-width: var(--v2-col); margin: 0 auto 6px; }
body.v2-espace .v2-recherche-question:empty { display: none; }
body.v2-espace[data-v2-vue="recherche"] .tab-content#tab-recherche.v2-sans-resultat .search-embed-wrap { height: 0; overflow: hidden; }

/* ---------- Offre gratuite : l'espace Pro du droit présenté, réservé aux comptes Pro ---------- */
.v2-pro-verrou { max-width: 720px; margin: 24px auto 30px; padding: 26px 24px; border-radius: 18px; text-align: center;
  background: var(--v2-surface); border: 1px solid var(--v2-trait); box-shadow: var(--v2-ombre); }
.v2-pro-verrou h2 { font-family: var(--font-display); font-weight: 600; font-size: 24px; margin-bottom: 6px; color: var(--v2-texte); }
.v2-pro-verrou h2 em { font-style: normal; color: inherit; }
.v2-pro-verrou p { color: var(--v2-texte-2); line-height: 1.55; max-width: 540px; margin: 0 auto 16px; font-size: 14.5px; }
.v2-pro-verrou ul { list-style: none; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; text-align: left; margin: 0 auto 18px; max-width: 620px; }
.v2-pro-verrou li { padding: 10px 12px; border-radius: 12px; background: var(--v2-surface-2); border: 1px solid var(--v2-trait); font-size: 13px; color: var(--v2-texte-2); }
.v2-pro-verrou li b { display: block; color: var(--v2-texte); font-weight: 500; }
body.v2-espace[data-v2-plan="gratuit"][data-v2-vue="pro"] .tab-content { opacity: 0.35; pointer-events: none; filter: saturate(0.6); }

@media (max-width: 640px) {
  body.v2-espace #tab-guacamole { padding: calc(var(--v2-bar-h) + 28px) 12px 190px; }
  body.v2-espace #tab-guacamole .guac-hero { padding-top: 6vh; }
  body.v2-espace #tab-guacamole .guac-mascotte { width: clamp(108px, 17vh, 140px); }
  body.v2-espace.v2-conv #tab-guacamole .guac-mascotte { width: 36px; height: 37px; }
  body.v2-espace.v2-accueil-vide[data-v2-vue="guacamole"] #guac-suggestions { flex-direction: column; align-items: stretch; }
  body.v2-espace #guac-suggestions .guac-sugg { text-align: center; }
  body.v2-espace #tab-recherche { padding: calc(var(--v2-bar-h) + 20px) 0 0; }
  body.v2-espace #search-frame { height: calc(100dvh - var(--v2-bar-h) - 28px) !important; }
  body.v2-espace[data-v2-vue="pro"] .app { padding-top: calc(var(--v2-bar-h) + 22px); }
}

/* Conversation : la question d'abord, puis l'état de Maître Guacamole, puis sa réponse */
body.v2-espace.v2-conv #tab-guacamole.active { display: flex; flex-direction: column; }
body.v2-espace.v2-conv #tab-guacamole > * { order: 5; }
body.v2-espace.v2-conv #tab-guacamole > .v2-fil-guac { order: 1; margin-bottom: 4px; }
body.v2-espace.v2-conv #tab-guacamole > .guac-hero { order: 2; }
body.v2-espace.v2-conv #tab-guacamole > #guac-agent { order: 3; }
body.v2-espace.v2-conv #tab-guacamole > #guac-resultat { order: 4; }

/* Étapes : une progression discrète, en texte simple */
body.v2-espace #tab-guacamole .guac-etapes { gap: 4px 14px; }
body.v2-espace #tab-guacamole .guac-etape {
  font-family: var(--font-body); font-size: 12.5px; letter-spacing: 0; text-transform: none;
  padding: 0; border: 0; border-radius: 0; background: none; color: var(--v2-texte-2); opacity: 0.55; animation: none;
}
body.v2-espace #tab-guacamole .guac-etape.faite { color: var(--v2-texte-2); opacity: 1; }
body.v2-espace #tab-guacamole .guac-etape.encours { color: var(--v2-accent); opacity: 1; font-weight: 500; }

/* Réglages : libellés et champs au style de l'interface */
body.v2-espace .v2-pop .guac-label { font-family: var(--font-body); font-size: 12px; letter-spacing: 0; text-transform: none; color: var(--v2-texte-2); font-weight: 500; margin: 6px 0 6px; }
body.v2-espace .v2-pop .guac-select { width: 100%; height: 40px; padding: 0 10px; font: 400 14px var(--font-body); background: var(--v2-surface); color: var(--v2-texte); border: 1px solid var(--v2-trait-fort); border-radius: 10px; }
body.v2-espace .v2-pop .guac-cas-option, body.v2-espace .v2-pop .guac-moteur-option {
  display: flex; gap: 10px; align-items: flex-start; padding: 9px 8px; border-radius: 10px; border: 0 !important; background: transparent !important;
  font-size: 13px; line-height: 1.45; color: var(--v2-texte-2); cursor: pointer; box-shadow: none !important;
}
body.v2-espace .v2-pop .guac-cas-option:hover, body.v2-espace .v2-pop .guac-moteur-option:hover { background: color-mix(in srgb, var(--v2-texte) 5%, transparent) !important; }
body.v2-espace .v2-pop .guac-cas-option strong, body.v2-espace .v2-pop .guac-moteur-option strong { color: var(--v2-texte); font-weight: 500; }
body.v2-espace .v2-pop input[type="checkbox"], body.v2-espace .v2-pop input[type="radio"] { accent-color: var(--v2-accent); margin-top: 2px; }
body.v2-espace .v2-pop .guac-aide-plus summary { font-size: 12px; color: var(--v2-accent); padding: 0 8px; cursor: pointer; }
body.v2-espace .v2-pop .guac-reglages-resume, body.v2-espace .v2-pop .guac-reglages-titre { display: none; }
@media (max-width: 520px) { .v2-pro-verrou ul { grid-template-columns: 1fr; } }

/* =====================================================================
   Couleurs de Mon espace (03/11/2026) : le vert de l'interface à la place
   du vert fluo et des pastilles noires, dans toutes les vues (Pro du droit compris)
   ===================================================================== */
body.v2-espace { --fluo: var(--v2-accent); --fluo-ink: #ffffff; font-variant-numeric: tabular-nums; }
html:not([data-theme="light"]) body.v2-espace {
  --fluo-ink: #04130b; --mint: #2bd38a; --mint-soft: #6be3ae; --glass-border-lit: rgba(43, 211, 138, 0.35);
}
body.v2-espace .btn-login, body.v2-espace .btn-primary, body.v2-espace .btn-create, body.v2-espace .fab-create {
  background: var(--v2-accent) !important; color: var(--fluo-ink) !important; border-color: var(--v2-accent) !important;
  box-shadow: none !important; filter: none !important;
}
body.v2-espace .btn-login:hover, body.v2-espace .btn-primary:hover, body.v2-espace .btn-create:hover, body.v2-espace .fab-create:hover {
  background: var(--v2-accent-fonce) !important; border-color: var(--v2-accent-fonce) !important; transform: none;
}
body.v2-espace .fab-create { box-shadow: 0 10px 24px -12px rgba(10, 124, 74, 0.55) !important; }
body.v2-espace .dash-tab.active {
  background: color-mix(in srgb, var(--v2-accent) 12%, transparent) !important; color: var(--v2-accent) !important;
  border-color: color-mix(in srgb, var(--v2-accent) 35%, transparent) !important; box-shadow: none !important;
}
body.v2-espace .dash-tab.active .msg-unread-badge { background: var(--v2-accent); color: var(--fluo-ink); }
body.v2-espace .view-toggle button.active { background: var(--v2-accent); color: var(--fluo-ink); }
body.v2-espace .filter-pill.active { color: var(--v2-accent); border-color: color-mix(in srgb, var(--v2-accent) 40%, transparent); background: color-mix(in srgb, var(--v2-accent) 8%, transparent); }
body.v2-espace .dash-title .gothic-letter, body.v2-espace .gothic-letter { text-shadow: none; }

/* Titre de Pro du droit : la nouvelle police de titres, droite ; la lettre gothique ne change pas */
body.v2-espace .dash-title { font-style: normal; font-weight: 600; font-size: clamp(30px, 4vw, 42px); letter-spacing: -0.015em; }

/* =====================================================================
   Réponse de Maître Guacamole en conversation (03/11/2026)
   La fiche reste entière ; elle se lit comme un message : la réponse,
   ses actions, la jurisprudence qui la fonde, puis le détail replié.
   ===================================================================== */

/* Attente : Maître Guacamole cherche sur son iPhone, en grand, avec une seule phrase d'état */
body.v2-espace #tab-guacamole .guac-etapes { display: none !important; }
body.v2-espace.v2-conv.v2-occupe #tab-guacamole .guac-hero {
  flex-direction: column; align-items: center; text-align: center; justify-content: flex-start; gap: 4px; padding: 6px 0 10px;
}
body.v2-espace.v2-conv.v2-occupe #tab-guacamole .guac-mascotte { width: clamp(150px, 24vh, 200px); height: auto; aspect-ratio: 472 / 480; }
body.v2-espace.v2-conv.v2-occupe #tab-guacamole .guac-intro { align-items: center; }
body.v2-espace.v2-conv.v2-occupe #tab-guacamole .guac-bulle {
  text-align: center; margin: 0 auto; max-width: 34ch; min-height: 0; font-size: 14.5px;
  background: linear-gradient(90deg, var(--v2-texte-2) 0%, var(--v2-texte-2) 40%, var(--v2-texte) 50%, var(--v2-texte-2) 60%, var(--v2-texte-2) 100%) !important;
  background-size: 250% 100% !important; -webkit-background-clip: text !important; background-clip: text !important; color: transparent !important; -webkit-text-fill-color: transparent;
  animation: v2-reflet 2.4s linear infinite;
}
@keyframes v2-reflet { from { background-position: 100% 0; } to { background-position: -150% 0; } }
@media (prefers-reduced-motion: reduce) {
  body.v2-espace.v2-conv.v2-occupe #tab-guacamole .guac-bulle { animation: none; color: var(--v2-texte-2) !important; -webkit-text-fill-color: currentColor; background: none !important; }
}
/* Question de suivi : l'attente se place sous la conversation ; le détail de la réponse précédente attend la nouvelle */
body.v2-espace.v2-conv.v2-suite-encours #tab-guacamole > .guac-hero { order: 6; }
body.v2-espace.v2-suite-encours #guac-resultat > #guac-complete,
body.v2-espace.v2-suite-encours #guac-resultat > .guac-carte-precisions,
body.v2-espace.v2-suite-encours #guac-echange-encours .guac-echange-reponse { display: none; }

/* Le message : plus de cadre, d'en-tête « Fiche de recherche » ni d'étiquettes « Vous / Maître Guacamole » */
body.v2-espace #guac-resultat.v2-chat .guac-fiche-head { height: 0; margin: 0; padding: 0; overflow: hidden; }
body.v2-espace #guac-resultat.v2-chat > #guac-s-reponse {
  background: transparent !important; border: 0 !important; box-shadow: none !important; padding: 0 !important; margin: 0 0 8px;
  -webkit-backdrop-filter: none !important; backdrop-filter: none !important; border-radius: 0; overflow: visible;
}
body.v2-espace #guac-resultat.v2-chat > #guac-s-reponse::before, body.v2-espace #guac-resultat.v2-chat > #guac-s-reponse::after { display: none; }
body.v2-espace #guac-resultat.v2-chat > #guac-s-reponse > h4 { display: none; }
body.v2-espace #guac-resultat.v2-chat .guac-question-qui { display: none !important; }
body.v2-espace #guac-resultat.v2-chat #guac-s-reponse:not(.v2-avec-suite) > .guac-question-courante { display: none; }
body.v2-espace #guac-resultat.v2-chat .guac-question { margin: 18px 0 18px; }
body.v2-espace #guac-resultat.v2-chat .guac-question p {
  max-width: 80%; margin: 0; padding: 10px 16px; border-radius: 20px; border: 0;
  background: color-mix(in srgb, var(--v2-texte) 6%, var(--v2-surface)); color: var(--v2-texte); font-size: 15px; line-height: 1.55;
}
body.v2-espace #guac-resultat.v2-chat .guac-reponse-corps {
  position: relative; border-left: 0; padding: 0 0 0 42px; min-height: 30px;
}
body.v2-espace #guac-resultat.v2-chat .guac-reponse-corps::before {
  content: ''; position: absolute; left: 0; top: 0; width: 30px; height: 30px; border-radius: 50%;
  background: url("/guacamole/guacamole-tete-ronde.png") center / cover no-repeat;
}
body.v2-espace #guac-resultat.v2-chat .guac-redige { margin: 2px 0 6px; }
body.v2-espace #guac-resultat.v2-chat .guac-redige-texte { font-size: 15.5px; line-height: 1.7; color: var(--v2-texte); }
body.v2-espace #guac-resultat.v2-chat .guac-redige-texte p { margin: 0 0 12px; }
body.v2-espace #guac-resultat.v2-chat .guac-redige-liste { padding-left: 20px; margin: 0 0 12px; }
body.v2-espace #guac-resultat.v2-chat .guac-redige-liste li { margin: 6px 0; }
body.v2-espace #guac-resultat.v2-chat .guac-cite {
  display: inline-block; font-family: var(--font-body); font-size: 11px; font-weight: 500; line-height: 1; vertical-align: 2px;
  padding: 3px 6px; margin: 0 1px; border-radius: 999px; color: var(--v2-texte-2);
  background: color-mix(in srgb, var(--v2-texte) 7%, transparent); text-decoration: none;
}
body.v2-espace #guac-resultat.v2-chat .guac-cite:hover { color: var(--v2-accent); background: color-mix(in srgb, var(--v2-accent) 12%, transparent); }
body.v2-espace #guac-resultat.v2-chat .guac-redige-statut { font-family: var(--font-body); font-size: 13.5px; color: var(--v2-texte-2); }
body.v2-espace #guac-resultat.v2-chat .guac-redige.encours .guac-redige-note { display: none; }
body.v2-espace #guac-resultat.v2-chat .guac-redige-note { color: var(--v2-texte-2); }
body.v2-espace #guac-resultat.v2-chat .guac-details summary,
body.v2-espace #guac-resultat.v2-chat .v2-plus > summary {
  font-family: var(--font-body); font-size: 13px; letter-spacing: 0; color: var(--v2-texte-2); cursor: pointer; list-style: none;
}
body.v2-espace #guac-resultat.v2-chat .guac-details summary::-webkit-details-marker,
body.v2-espace #guac-resultat.v2-chat .v2-plus > summary::-webkit-details-marker { display: none; }
body.v2-espace #guac-resultat.v2-chat .guac-details summary::after,
body.v2-espace #guac-resultat.v2-chat .v2-plus > summary::after { content: ' ›'; }
body.v2-espace #guac-resultat.v2-chat .guac-details[open] summary::after,
body.v2-espace #guac-resultat.v2-chat .v2-plus[open] > summary::after { content: ' ⌄'; }
body.v2-espace #guac-resultat.v2-chat .guac-details summary:hover,
body.v2-espace #guac-resultat.v2-chat .v2-plus > summary:hover { color: var(--v2-accent); }
body.v2-espace #guac-resultat.v2-chat .guac-sources li { color: var(--v2-texte-2); }
body.v2-espace #guac-resultat.v2-chat .guac-claude { margin: 8px 0 2px; }
body.v2-espace #guac-resultat.v2-chat .guac-claude-btn {
  height: 32px; padding: 0 12px; font-size: 12.5px; border-radius: 999px; background: transparent !important;
  border: 1px solid var(--v2-trait-fort) !important; color: var(--v2-texte) !important;
}
body.v2-espace #guac-resultat.v2-chat .guac-claude-note { font-size: 12px; color: var(--v2-texte-2); }

/* Réponse établie par l'agent (sans réponse rédigée) : du texte, pas des encadrés */
body.v2-espace #guac-resultat.v2-chat .guac-reponse-corps > .guac-reponse { margin: 0 0 12px; padding: 0; border: 0; background: none; }
body.v2-espace #guac-resultat.v2-chat .guac-reponse-titre {
  font-family: var(--font-body); font-size: 14px; font-weight: 600; letter-spacing: 0; text-transform: none; color: var(--v2-texte); margin: 0 0 2px;
}
body.v2-espace #guac-resultat.v2-chat .guac-reponse-resume, body.v2-espace #guac-resultat.v2-chat .guac-reponse .guac-liste li {
  font-size: 15px; line-height: 1.65; color: var(--v2-texte);
}
body.v2-espace #guac-resultat.v2-chat .guac-voir { font-weight: 400; font-size: 12.5px; margin-left: 8px; color: var(--v2-accent); }

/* Actions sous la réponse */
body.v2-espace #guac-resultat.v2-chat .v2-actions-msg {
  display: flex; flex-wrap: wrap; align-items: center; gap: 2px 4px; margin: 2px 0 16px -8px;
}
body.v2-espace .v2-action-msg {
  display: inline-flex; align-items: center; gap: 6px; height: 30px; padding: 0 9px; border-radius: 8px; cursor: pointer;
  background: transparent; border: 0; color: var(--v2-texte-2); font: 400 12.5px var(--font-body);
}
body.v2-espace .v2-action-msg:hover { background: color-mix(in srgb, var(--v2-texte) 6%, transparent); color: var(--v2-texte); }
body.v2-espace .v2-avert-msg { font-size: 11.5px; color: var(--v2-texte-2); opacity: 0.8; margin-left: 8px; }

/* La jurisprudence sur laquelle la réponse s'appuie : des cartes sobres, la phrase de principe en clair */
body.v2-espace #guac-resultat.v2-chat .guac-refs { border-top: 0; padding-top: 0; margin: 0 0 16px; }
body.v2-espace #guac-resultat.v2-chat .guac-refs > .guac-reponse-titre { font-size: 13px; font-weight: 500; color: var(--v2-texte-2); margin-bottom: 8px; }
body.v2-espace #guac-resultat.v2-chat .guac-refs > .guac-reponse-titre .guac-voir { font-size: 12.5px; }
body.v2-espace #guac-resultat.v2-chat .guac-ref {
  padding: 12px 14px; margin: 0 0 8px; border: 1px solid var(--v2-trait); border-radius: 14px; background: var(--v2-surface);
}
body.v2-espace #guac-resultat.v2-chat .guac-ref-autorite {
  font-family: var(--font-body); font-size: 11px; letter-spacing: 0; text-transform: none; font-weight: 500;
  padding: 2px 8px; border-radius: 999px; color: var(--v2-accent); background: color-mix(in srgb, var(--v2-accent) 10%, transparent); border: 0;
}
body.v2-espace #guac-resultat.v2-chat .guac-ref-cit { font-size: 13.5px; color: var(--v2-texte); }
body.v2-espace #guac-resultat.v2-chat .guac-ref-principe {
  margin: 8px 0 4px; padding: 0 0 0 12px; border-left: 2px solid color-mix(in srgb, var(--v2-accent) 45%, transparent); border-radius: 0;
  background: none; font-size: 14px; line-height: 1.6; color: var(--v2-texte);
}
body.v2-espace #guac-resultat.v2-chat .guac-ref-nature { font-family: var(--font-body); font-size: 11px; letter-spacing: 0; text-transform: none; color: var(--v2-texte-2); }
body.v2-espace #guac-resultat.v2-chat .guac-dec-res { font-size: 12.5px; color: var(--v2-texte-2); }
body.v2-espace #guac-resultat.v2-chat .guac-dec-actions { display: flex; flex-wrap: wrap; gap: 4px 8px; margin-top: 8px; }
body.v2-espace #guac-resultat.v2-chat .guac-reponse-corps .row-btn {
  height: 28px; padding: 0 10px; font-size: 12px; border-radius: 999px; background: transparent; border: 1px solid var(--v2-trait-fort); color: var(--v2-texte);
}

/* Décision citée et fiche d'arrêt, en tête de la réponse : même carte sobre */
body.v2-espace #guac-resultat.v2-chat .guac-reponse-corps > .guac-carte {
  background: var(--v2-surface) !important; border: 1px solid var(--v2-trait) !important; box-shadow: none !important; border-radius: 16px;
  -webkit-backdrop-filter: none !important; backdrop-filter: none !important; padding: 16px 18px; margin: 0 0 14px;
}
body.v2-espace #guac-resultat.v2-chat .guac-reponse-corps > .guac-carte h4 {
  font-family: var(--font-body); font-size: 15px; font-weight: 600; letter-spacing: 0; text-transform: none; color: var(--v2-texte);
}

/* Analyse pas à pas : repliée, à la demande */
body.v2-espace #guac-resultat.v2-chat .v2-plus { margin: 0 0 14px; }
body.v2-espace #guac-resultat.v2-chat .v2-plus > summary span { margin-left: 8px; opacity: 0.75; }
body.v2-espace #guac-resultat.v2-chat .v2-plus .guac-analyse { margin-top: 10px; padding: 0; border: 0; }
body.v2-espace #guac-resultat.v2-chat .v2-plus .guac-analyse > .guac-reponse-titre { display: none; }

/* Ce que Maître Guacamole propose ensuite : des suggestions, comme sous une réponse d'assistant */
body.v2-espace #guac-resultat.v2-chat .guac-actions-prop { border-top: 0; padding-top: 0; margin: 0 0 12px; }
body.v2-espace #guac-resultat.v2-chat .guac-actions-prop > .guac-reponse-titre,
body.v2-espace #guac-resultat.v2-chat .guac-actions-sous { font-family: var(--font-body); font-size: 12.5px; font-weight: 400; letter-spacing: 0; text-transform: none; color: var(--v2-texte-2); margin: 8px 0 0; }
body.v2-espace #guac-resultat.v2-chat .guac-actions-liste { gap: 6px; margin-top: 6px; }
body.v2-espace #guac-resultat.v2-chat .guac-action-prop, body.v2-espace #guac-resultat.v2-chat .guac-sugg {
  height: auto; min-height: 32px; padding: 6px 12px; border-radius: 999px; font: 400 13px/1.35 var(--font-body); text-align: left;
  background: var(--v2-surface) !important; border: 1px solid var(--v2-trait-fort) !important; color: var(--v2-texte) !important; box-shadow: none !important;
}
body.v2-espace #guac-resultat.v2-chat .guac-action-prop:hover, body.v2-espace #guac-resultat.v2-chat .guac-sugg:hover {
  border-color: color-mix(in srgb, var(--v2-accent) 45%, var(--v2-trait-fort)) !important;
}
body.v2-espace #guac-resultat.v2-chat .guac-actions-liste.discret .guac-action-prop { background: transparent !important; color: var(--v2-texte-2) !important; }

/* La suite de la conversation : la zone de saisie du bas sert à poursuivre ; les échanges sont des messages */
body.v2-espace #guac-resultat.v2-chat #guac-suite-form { display: none; }
body.v2-espace #guac-resultat.v2-chat .guac-suite { margin: 0; padding: 0; border: 0; }
body.v2-espace #guac-resultat.v2-chat .guac-echange { margin: 14px 0; padding: 0; border: 0; background: none; }
body.v2-espace #guac-resultat.v2-chat .guac-echange .guac-question { margin: 0 0 12px; }
body.v2-espace #guac-resultat.v2-chat .guac-echange-reponse p { font-size: 15px; line-height: 1.65; color: var(--v2-texte); margin: 0; }
body.v2-espace #guac-resultat.v2-chat .guac-fil { gap: 0; margin: 0; }
body.v2-espace #guac-resultat.v2-chat .guac-tour { border: 0; background: none; border-radius: 0; }
body.v2-espace #guac-resultat.v2-chat .guac-tour > summary {
  display: block; width: fit-content; max-width: 80%; margin: 18px 0 18px auto; padding: 10px 16px; border-radius: 20px;
  background: color-mix(in srgb, var(--v2-texte) 6%, var(--v2-surface)); color: var(--v2-texte); font-size: 15px; line-height: 1.55;
  pointer-events: none; cursor: default; white-space: pre-wrap;
}
body.v2-espace #guac-resultat.v2-chat .guac-tour.v2-premier > summary { display: none; }
body.v2-espace #guac-resultat.v2-chat .guac-tour-reponse {
  position: relative; padding: 0 0 0 42px; border-top: 0; font-size: 15px; line-height: 1.65; color: var(--v2-texte);
}
body.v2-espace #guac-resultat.v2-chat .guac-tour-reponse::before {
  content: ''; position: absolute; left: 0; top: 0; width: 30px; height: 30px; border-radius: 50%;
  background: url("/guacamole/guacamole-tete-ronde.png") center / cover no-repeat;
}

/* Précisions, conflits d'intérêts : cartes sobres */
body.v2-espace #guac-resultat.v2-chat > .guac-carte {
  background: var(--v2-surface) !important; border: 1px solid var(--v2-trait) !important; box-shadow: none !important;
  -webkit-backdrop-filter: none !important; backdrop-filter: none !important; border-radius: 16px; margin: 0 0 14px 42px;
}

/* Le détail de la recherche : un lien discret qui ouvre toute la fiche */
body.v2-espace #guac-resultat.v2-chat > #guac-complete { margin: 6px 0 0 42px; }
body.v2-espace #guac-resultat.v2-chat > #guac-complete > summary {
  display: inline-flex; flex-wrap: wrap; align-items: baseline; gap: 4px 10px; padding: 8px 14px; margin: 0 0 14px;
  border-radius: 999px; border: 1px solid var(--v2-trait-fort); background: transparent;
}
body.v2-espace #guac-resultat.v2-chat > #guac-complete > summary:hover { border-color: color-mix(in srgb, var(--v2-accent) 45%, var(--v2-trait-fort)); }
body.v2-espace #guac-resultat.v2-chat > #guac-complete > summary::before { content: none; }
body.v2-espace #guac-resultat.v2-chat > #guac-complete > summary::after { content: '›'; color: var(--v2-texte-2); }
body.v2-espace #guac-resultat.v2-chat > #guac-complete[open] > summary::after { content: '⌄'; }
body.v2-espace #guac-resultat.v2-chat .guac-complete-titre {
  font-family: var(--font-body); font-size: 13px; letter-spacing: 0; text-transform: none; font-weight: 500; color: var(--v2-texte);
}
body.v2-espace #guac-resultat.v2-chat .guac-complete-resume { font-size: 12.5px; color: var(--v2-texte-2); }
body.v2-espace #guac-resultat.v2-chat > #guac-complete[open] { margin-left: 0; }

/* Retouches : polices des boutons hérités, propositions en une seule rangée */
body.v2-espace #guac-resultat.v2-chat .guac-reponse-corps .row-btn,
body.v2-espace #guac-resultat.v2-chat .guac-cite { font-family: var(--font-body) !important; letter-spacing: 0 !important; text-transform: none !important; text-decoration: none !important; }
body.v2-espace #guac-resultat.v2-chat .guac-reponse-corps .row-btn { display: inline-flex; align-items: center; }
body.v2-espace #guac-resultat.v2-chat .guac-refs > .guac-reponse-titre { display: flex; flex-wrap: wrap; align-items: baseline; gap: 2px 12px; }
body.v2-espace #guac-resultat.v2-chat .guac-refs > .guac-reponse-titre .guac-voir { margin-left: 0; }
body.v2-espace #guac-resultat.v2-chat .guac-actions-prop { display: flex; flex-wrap: wrap; gap: 6px; }
body.v2-espace #guac-resultat.v2-chat .guac-actions-prop > .guac-reponse-titre,
body.v2-espace #guac-resultat.v2-chat .guac-actions-prop > .guac-actions-sous { display: none; }
body.v2-espace #guac-resultat.v2-chat .guac-actions-prop > .guac-actions-liste { display: contents; }
body.v2-espace #guac-resultat.v2-chat .guac-action-prop, body.v2-espace #guac-resultat.v2-chat .guac-sugg { width: auto; max-width: 100%; }
body.v2-espace #guac-resultat.v2-chat > #guac-complete > summary { border-radius: 16px; }

@media (max-width: 640px) {
  body.v2-espace.v2-conv.v2-occupe #tab-guacamole .guac-mascotte { width: clamp(140px, 22vh, 170px); height: auto; }
  body.v2-espace #guac-resultat.v2-chat .guac-reponse-corps { padding-left: 0; padding-top: 36px; }
  body.v2-espace #guac-resultat.v2-chat .guac-reponse-corps::before { width: 26px; height: 26px; }
  body.v2-espace #guac-resultat.v2-chat .guac-tour-reponse { padding-left: 0; padding-top: 34px; }
  body.v2-espace #guac-resultat.v2-chat .guac-tour-reponse::before { width: 26px; height: 26px; }
  body.v2-espace #guac-resultat.v2-chat > .guac-carte, body.v2-espace #guac-resultat.v2-chat > #guac-complete { margin-left: 0; }
  body.v2-espace #guac-resultat.v2-chat .guac-question p { max-width: 88%; }
  body.v2-espace .v2-avert-msg { flex-basis: 100%; margin: 4px 0 0 9px; }
}

/* Panneau latéral fixé (grand écran) : les vues se décalent d'autant, rien ne passe dessous (Recherche comprise) */
@media (min-width: 1180px) {
  body.v2-espace.v2-side-fixe .app { padding-left: var(--v2-side-w); }
}
/* Fiche d'arrêt seule : la recherche complète, à la demande */
body.v2-espace #guac-resultat.v2-chat .guac-fa-suite { margin-top: 14px; }
body.v2-espace #guac-resultat.v2-chat .guac-fa-suite .btn-secondary {
  height: auto; min-height: 36px; padding: 8px 14px; border-radius: 999px; font: 500 13px/1.35 var(--font-body); letter-spacing: 0; text-transform: none; text-align: left;
  background: color-mix(in srgb, var(--v2-accent) 8%, transparent) !important; color: var(--v2-accent) !important;
  border: 1px solid color-mix(in srgb, var(--v2-accent) 30%, transparent) !important; box-shadow: none !important;
}
body.v2-espace #guac-resultat.v2-chat.v2-fiche-seule .guac-reponse-corps > .guac-reponse > .guac-reponse-titre { display: none; }

/* =====================================================================
   03/11/2026 : suivi rapide, document joint, historique synchronisé
   ===================================================================== */
/* Suivi rapide : la question reste, la réponse s'écrit dessous ; Maître Guacamole s'efface dès le premier mot */
body.v2-espace.v2-suite-encours #guac-echange-encours .guac-echange-reponse { display: block; }
body.v2-espace.v2-suite-encours #guac-echange-encours .guac-echange-reponse > .guac-redige-statut { display: none; }
body.v2-espace.v2-conv.v2-suite-flux #tab-guacamole > .guac-hero { display: none; }
body.v2-espace #guac-resultat.v2-chat .guac-echange-reponse,
body.v2-espace #guac-resultat.v2-chat #guac-echange-encours .guac-echange-reponse { position: relative; padding-left: 42px; min-height: 30px; border-left: 0; margin-left: 0; }
body.v2-espace #guac-resultat.v2-chat .guac-echange-reponse::before {
  content: ''; position: absolute; left: 0; top: 0; width: 30px; height: 30px; border-radius: 50%;
  background: url("/guacamole/guacamole-tete-ronde.png") center / cover no-repeat;
}
body.v2-espace #guac-resultat.v2-chat .guac-echange-rapide .guac-redige-texte,
body.v2-espace #guac-resultat.v2-chat .guac-suite-flux { font-size: 15.5px; line-height: 1.7; color: var(--v2-texte); }
body.v2-espace #guac-resultat.v2-chat .guac-suite-flux:empty { display: none; }
@media (max-width: 640px) {
  body.v2-espace #guac-resultat.v2-chat .guac-echange-reponse { padding-left: 0; padding-top: 34px; }
  body.v2-espace #guac-resultat.v2-chat .guac-echange-reponse::before { width: 26px; height: 26px; }
}

/* Document joint */
.v2-pop-doc { padding: 4px 4px 12px; margin-bottom: 8px; border-bottom: 1px solid var(--v2-trait); }
.v2-pop-doc .v2-petit { text-align: left; margin-top: 8px; padding: 0 4px; font-size: 12px; color: var(--v2-texte-2); }
.v2-doc-joint {
  display: block; width: fit-content; margin-top: 6px; padding: 3px 10px; border-radius: 999px; font-size: 12.5px;
  background: color-mix(in srgb, var(--v2-accent) 10%, transparent); color: var(--v2-accent);
}
body.v2-espace .v2-composer textarea.v2-envoi-doc { color: transparent !important; }
body.v2-espace .v2-composer.v2-depot { border-color: var(--v2-accent); border-style: dashed; }

/* Historique synchronisé (panneau latéral) */
.v2-synchro { display: flex; gap: 8px; align-items: flex-start; padding: 2px 12px 8px; font-size: 12px; line-height: 1.45; color: var(--v2-texte-2); }
.v2-synchro[hidden] { display: none; }
.v2-synchro .v2-lien { font-size: 12px; }
.v2-synchro-point { flex-shrink: 0; width: 7px; height: 7px; margin-top: 5px; border-radius: 50%; background: var(--v2-texte-2); opacity: 0.6; }
.v2-synchro-point.ok { background: var(--v2-accent); opacity: 1; }
.v2-erreur { color: #c0392b; font-size: 13px; min-height: 18px; margin: 4px 0 8px; }
