/* Assistant « Une question ? » — maquette du 29/11/2026. Sans ce fichier, rien n'apparaît (les éléments restent masqués). */
/* Couleurs et remise à zéro propres à l'assistant : il ne dépend pas des styles de la page qui l'accueille
   (la page Direct Drive a d'autres couleurs et pas de remise à zéro des marges ; corrigé le 29/11/2026). */
.dma-bubble,.dma-panel,.dma-shade,.callbar-ask{
  --ink:#E9EEF5;--ink-soft:#A9B7C8;--muted:#8696AC;--bg:#0A1220;--surface:#132039;--surface-2:#0F1A30;
  --line:rgba(255,255,255,.09);--line-strong:rgba(255,255,255,.20);
  --brand:#1B3F72;--brand-600:#264F86;--brand-light:#4B92D0;
  font-family:var(--font-body,system-ui,sans-serif);box-sizing:border-box}
.dma-panel{color:var(--ink);line-height:1.5;text-align:left}
/* :where() = priorité nulle : ces remises à zéro ne gênent aucune règle de l'assistant écrite plus bas */
:where(.dma-panel) *,:where(.dma-panel) *::before,:where(.dma-panel) *::after{box-sizing:border-box;margin:0}
:where(.dma-panel) p{color:inherit}
.dma-panel[hidden],.dma-shade[hidden],.dma-form[hidden]{display:none!important}

/* ---------- Bouton dans la barre d'appel (téléphone et tablette) ---------- */
.callbar-ask{display:none}
@media (max-width:1140px){
  .callbar .callbar-ask{display:flex;flex:0 0 auto;align-items:center;justify-content:center;gap:.4em;min-height:46px;min-width:46px;padding:0 .8rem;border-radius:9px;background:rgba(255,255,255,.06);border:1.5px solid rgba(255,255,255,.24);color:#fff;font:600 .82rem/1 var(--font-body,system-ui,sans-serif);letter-spacing:.05em;text-transform:uppercase;cursor:pointer}
  .callbar-ask svg{width:22px;height:22px;fill:none;stroke:currentColor;stroke-width:1.8;stroke-linecap:round;stroke-linejoin:round}
  .dma-has-bar .dma-bubble{display:none}
}
@media (max-width:400px){
  /* Trois boutons sur un petit écran : on resserre pour ne jamais déborder */
  .dma-has-bar .callbar{gap:.4rem;padding-inline:10px}
  .dma-has-bar .callbar a{min-width:0;letter-spacing:.02em;padding-inline:.4rem}
  .callbar .callbar-ask{padding:0;width:46px}
  .callbar-ask span{position:absolute;width:1px;height:1px;overflow:hidden;clip:rect(0 0 0 0);white-space:nowrap}
}

/* ---------- Bulle (ordinateur) ---------- */
.dma-bubble{position:fixed;right:24px;bottom:24px;z-index:95;display:flex;align-items:center;gap:.55em;padding:.8rem 1.1rem;border-radius:999px;border:1.5px solid var(--brand-light,#4B92D0);background:var(--brand,#1B3F72);color:#fff;font-weight:600;font-size:.9rem;cursor:pointer;box-shadow:0 10px 30px -8px rgba(0,0,0,.6);transition:transform .2s ease,background .2s ease}
.dma-bubble:hover{background:var(--brand-600,#264F86);transform:translateY(-2px)}
.dma-bubble svg{width:22px;height:22px;fill:none;stroke:currentColor;stroke-width:1.8;stroke-linecap:round;stroke-linejoin:round}
/* Petit robot : les yeux et le bout de l'antenne sont pleins */
.dma-robot .dma-dot{fill:currentColor;stroke:none}
/* Avatar du robot dans l'en-tête du panneau */
.dma-title{display:flex;align-items:center;gap:.6rem}
.dma-avatar{display:grid;place-items:center;flex:0 0 auto;width:34px;height:34px;border-radius:50%;background:var(--brand);border:1.5px solid var(--brand-light);color:#fff}
.dma-avatar svg{width:20px;height:20px;fill:none;stroke:currentColor;stroke-width:1.8;stroke-linecap:round;stroke-linejoin:round}
/* Page sans barre d'appel (Direct Drive) sur téléphone : simple pastille ronde, pour masquer le moins possible */
@media (max-width:1140px){
  .dma-bubble{right:12px;bottom:calc(12px + env(safe-area-inset-bottom,0px));width:52px;height:52px;padding:0;justify-content:center}
  .dma-bubble span{position:absolute;width:1px;height:1px;overflow:hidden;clip:rect(0 0 0 0);white-space:nowrap}
}

/* ---------- Voile + panneau ---------- */
.dma-shade{position:fixed;inset:0;z-index:999;background:rgba(3,7,14,.55)}
.dma-panel{position:fixed;z-index:1000;display:flex;flex-direction:column;background:var(--surface-2,#0F1A30);color:var(--ink,#E9EEF5);border:1px solid var(--line-strong,rgba(255,255,255,.2));box-shadow:0 24px 60px -12px rgba(0,0,0,.7);
  right:24px;bottom:24px;width:390px;max-width:calc(100vw - 32px);height:min(620px,calc(100vh - 48px));border-radius:16px;
  opacity:0;transform:translateY(14px);transition:opacity .22s ease,transform .26s cubic-bezier(.16,1,.3,1)}
.dma-panel.dma-in{opacity:1;transform:none}
@media (max-width:1140px){
  /* Téléphone : panneau qui monte du bas, comme une feuille */
  .dma-panel{left:0;right:0;bottom:0;width:auto;max-width:none;height:min(86vh,680px);height:min(86dvh,680px);border-radius:16px 16px 0 0;border-bottom:0;padding-bottom:env(safe-area-inset-bottom,0px);transform:translateY(40px)}
  html.dma-open,html.dma-open body{overflow:hidden}
}
@media (prefers-reduced-motion:reduce){.dma-panel,.dma-bubble{transition:none}}

.dma-head{display:flex;align-items:center;justify-content:space-between;gap:1rem;padding:.9rem 1rem .8rem 1.2rem;border-bottom:1px solid var(--line,rgba(255,255,255,.09))}
.dma-title{font-family:var(--font-display,system-ui,sans-serif);font-weight:700;font-size:1.05rem;letter-spacing:-.01em}
.dma-close{display:grid;place-items:center;width:44px;height:44px;border-radius:10px;border:0;background:transparent;color:var(--ink-soft,#A9B7C8);cursor:pointer}
.dma-close:hover{background:rgba(255,255,255,.06);color:#fff}
.dma-close svg{width:20px;height:20px;fill:none;stroke:currentColor;stroke-width:2;stroke-linecap:round}

.dma-log{flex:1;overflow-y:auto;overscroll-behavior:contain;padding:1rem;display:flex;flex-direction:column;gap:.7rem;-webkit-overflow-scrolling:touch}
.dma-msg{max-width:92%;font-size:.95rem;line-height:1.55}
.dma-msg p+p{margin-top:.45rem}
.dma-bot{align-self:flex-start;background:var(--surface,#132039);border:1px solid var(--line,rgba(255,255,255,.09));border-radius:4px 14px 14px 14px;padding:.75rem .9rem}
.dma-user{align-self:flex-end;background:var(--brand,#1B3F72);border-radius:14px 4px 14px 14px;padding:.55rem .85rem;color:#fff}
.dma-small{font-size:.85rem;color:var(--ink-soft,#A9B7C8)}
.dma-card{border-left:2px solid var(--brand-light,#4B92D0);padding-left:.7rem;margin-bottom:.6rem}
.dma-link{display:inline-block;margin-top:.55rem;color:var(--brand-light,#4B92D0);font-weight:600;text-decoration:underline;text-underline-offset:3px}

.dma-chips{display:flex;flex-direction:column;gap:.45rem;margin-top:.6rem}
.dma-chip,.dma-more{text-align:left;min-height:44px;padding:.6rem .8rem;border-radius:10px;border:1px solid var(--line-strong,rgba(255,255,255,.2));background:rgba(255,255,255,.03);color:var(--ink,#E9EEF5);font:500 .9rem/1.4 var(--font-body,system-ui,sans-serif);cursor:pointer}
.dma-chip:hover,.dma-more:hover{border-color:var(--brand-light,#4B92D0);background:rgba(75,146,208,.10)}
.dma-more{margin-top:.45rem;width:100%;color:var(--brand-light,#4B92D0);font-weight:600}
/* Nom de la page sous un titre de passage */
.dma-chip small{display:block;margin-top:.15rem;font-size:.78rem;font-weight:400;color:var(--muted)}

.dma-contact{display:flex;flex-direction:column;gap:.45rem;margin-top:.7rem}
.dma-btn{display:flex;align-items:center;justify-content:center;min-height:44px;border-radius:10px;border:1.5px solid rgba(255,255,255,.24);background:rgba(255,255,255,.05);color:#fff;font-weight:600;font-size:.9rem;text-decoration:none}
.dma-btn-main{background:var(--brand,#1B3F72);border-color:var(--brand-light,#4B92D0)}

.dma-form{display:flex;gap:.5rem;padding:.7rem 1rem;border-top:1px solid var(--line,rgba(255,255,255,.09))}
.dma-input{flex:1;min-width:0;min-height:46px;padding:0 .85rem;border-radius:10px;border:1px solid var(--line-strong,rgba(255,255,255,.2));background:var(--bg,#0A1220);color:var(--ink,#E9EEF5);font:16px/1.2 var(--font-body,system-ui,sans-serif)} /* 16 px : évite le zoom automatique sur iPhone */
.dma-input::placeholder{color:var(--muted,#8696AC)}
.dma-go{min-height:46px;padding:0 1rem;border-radius:10px;border:1.5px solid var(--brand-light,#4B92D0);background:var(--brand,#1B3F72);color:#fff;font-weight:600;font-size:.9rem;cursor:pointer}

.dma-foot{padding:.6rem 1rem .8rem;border-top:1px solid var(--line,rgba(255,255,255,.09));text-align:center}
.dma-call{display:block;min-height:44px;line-height:44px;border-radius:10px;background:var(--brand,#1B3F72);border:1.5px solid var(--brand-light,#4B92D0);color:#fff;font-weight:600;font-size:.92rem;text-decoration:none}
.dma-hours{margin-top:.35rem;font-size:.78rem;color:var(--muted,#8696AC)}

@media print{.dma-bubble,.dma-panel,.dma-shade,.callbar-ask{display:none!important}}

/* ---------- Version du 30/11/2026 : discussion (attente, suggestions, extraits, nouvelle discussion) ---------- */
.dma-sug[hidden],.dma-reset[hidden]{display:none!important}
.dma-tools{display:flex;align-items:center;gap:.1rem}
.dma-msg{animation:dma-pop .22s ease both}
@keyframes dma-pop{from{opacity:0;transform:translateY(6px)}to{opacity:1;transform:none}}
.dma-text p+p{margin-top:.5rem}
.dma-small+.dma-text{margin-top:.4rem}
.dma-inline{color:var(--brand-light);font-weight:600;text-decoration:underline;text-underline-offset:3px;white-space:nowrap}
.dma-bot>.dma-more{margin-top:.55rem}
.dma-acts{flex-direction:row;flex-wrap:wrap}
.dma-acts .dma-chip{min-height:40px;padding:.45rem .8rem;border-radius:999px;color:var(--ink-soft)}
/* Trois points pendant que l'assistant « écrit » */
.dma-typing{display:flex;align-items:center;gap:5px;min-height:40px;padding:.75rem .95rem}
.dma-typing span{width:7px;height:7px;border-radius:50%;background:var(--ink-soft);animation:dma-dot 1s ease-in-out infinite}
.dma-typing span:nth-child(2){animation-delay:.15s}
.dma-typing span:nth-child(3){animation-delay:.3s}
@keyframes dma-dot{0%,60%,100%{opacity:.3;transform:none}30%{opacity:1;transform:translateY(-3px)}}
/* Questions proposées pendant la frappe, juste au-dessus du champ */
.dma-sug{display:flex;flex-direction:column;border-top:1px solid var(--line);background:var(--surface)}
.dma-sug-item{display:block;width:100%;min-height:44px;padding:.55rem 1rem;border:0;border-bottom:1px solid var(--line);background:transparent;color:var(--ink);font:500 .9rem/1.35 var(--font-body,system-ui,sans-serif);text-align:left;cursor:pointer;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
.dma-sug-item:last-child{border-bottom:0}
.dma-sug-item:hover,.dma-sug-item:focus-visible{background:rgba(75,146,208,.12)}
.dma-panel :focus-visible{outline:2px solid var(--brand-light);outline-offset:2px}
@media (prefers-reduced-motion:reduce){.dma-msg,.dma-typing span{animation:none}}
