/* ManagerAtHome (JM, 29/10) : l'assistant IA du Manager sur le telephone. Jetons de la charte : mv2-tokens.css (Web.Shared).
   Le volet est la copie de celui du Manager (regles .mv2-asst* plus bas, recopiees de ManagerV2/wwwroot/css/site.css) ;
   ici, il occupe tout l'ecran. */
:root{--header-h:0px;--footer-h:0px;--mv2-side-w:100vw;--app-w:430px;--app-bg:#f4f4f6}
*{box-sizing:border-box}
html,body{margin:0;padding:0;color:var(--text,#1f2937);font-family:var(--font,-apple-system,BlinkMacSystemFont,"Segoe UI",Inter,Arial,sans-serif)}
body{overscroll-behavior:none;background:var(--app-bg)}

/* ----- Le format telephone, repris de l'application Conducteur V2 (ConducteurV2/wwwroot/css/site.css, « Cadre ») : une colonne de
   430 px au plus, centree ; au-dela de 480 px d'ecran, le fond autour d'elle grisé ; ce qui est fixe se cale sur la colonne. */
@media (min-width: 480px) { body { background: #e9e9ec; } }
.app{max-width:var(--app-w);margin:0 auto;min-height:100dvh;background:var(--app-bg);position:relative}
/* Le numero de build reste en haut a droite de l'application (cale sur le bord droit de la colonne). */
.build{position:fixed;top:4px;right:max(8px, calc((100vw - var(--app-w)) / 2 + 8px));z-index:1000;font-size:9px;line-height:1.25;color:var(--muted,#6b7280);pointer-events:none;display:flex;align-items:center;gap:4px}

/* ----- Les ecrans d'activation (lien, code) */
.ah-page{min-height:100dvh;display:flex;flex-direction:column;align-items:center;justify-content:center;gap:18px;padding:28px 22px;text-align:center}
.ah-logo{width:190px;max-width:70%}
.ah-app{display:inline-flex;align-items:center;gap:8px;font-weight:800;font-size:20px;color:var(--text,#1f2937)}
.ah-app svg{color:var(--argus,#a6192e)}
.ah-sub{margin:0;color:var(--muted,#6b7280);font-size:14px;line-height:1.45;max-width:340px}
.ah-form{width:100%;max-width:340px;display:flex;flex-direction:column;gap:12px;text-align:left}
.ah-form label{font-size:13px;font-weight:600}
.ah-form input{width:100%;font:inherit;font-size:16px;padding:11px 12px;border:1px solid var(--line,#e5e7eb);border-radius:10px}
.ah-form input:focus{outline:none;border-color:var(--argus,#a6192e)}
.ah-code{letter-spacing:.5em;text-align:center;font-size:22px!important;font-weight:700}
.ah-btn{display:block;width:100%;max-width:340px;font:inherit;font-size:16px;font-weight:700;padding:13px;border:none;border-radius:12px;background:var(--argus,#a6192e);color:#fff;cursor:pointer}
.ah-msg{margin:0;padding:9px 12px;border-radius:10px;font-size:13.5px;max-width:340px}
.ah-msg.bad{background:#fdecec;color:#b42318}
.ah-msg.info{background:#eef4ff;color:#1e3a8a}
.ah-bas{font-size:13px;color:var(--muted,#6b7280)}
.ah-bas a{color:var(--argus,#a6192e)}

/* ----- Le volet en plein ecran */
.mv2-asst.ah-full{position:fixed;top:0;bottom:0;left:0;right:0;width:auto;max-width:var(--app-w);margin:0 auto;height:100dvh;transform:none;border-left:none;box-shadow:none;
  padding-top:env(safe-area-inset-top);padding-bottom:env(safe-area-inset-bottom)}
.ah-who{font-size:11px;font-weight:500;color:var(--muted,#6b7280);margin-left:4px;white-space:nowrap;overflow:hidden;text-overflow:ellipsis;max-width:150px}
.ah-out{border:none;background:none;color:var(--muted,#6b7280);font:inherit;font-size:12px;padding:6px;cursor:pointer}
.mv2-asst.ah-full .mv2-asst-input textarea{font-size:16px}

/* Le volet lui-meme : _content/ArgusFlotte.Web.Shared/css/mv2-assistant.css (le meme que dans le Manager). */

/* ----- A l'ecran d'un ordinateur (JM, 29/10 : « l'appli tél elle a un bord en bas, on part pas comme ça sous l'écran ; et en mode web,
   on mettra un scrollbar ») : le telephone s'arrete avant le bas de la fenetre (cadre arrondi, marges en haut et en bas), et la
   conversation defile dans sa barre, toujours visible. */
@media (min-width: 480px) {
    body{overflow:hidden}
    .app{margin:20px auto;min-height:0;height:calc(100dvh - 40px);border:1px solid #d4d4da;border-radius:22px;overflow-y:auto;box-shadow:0 24px 60px -24px rgba(15,15,20,.35)}
    .ah-page{min-height:100%}
    .mv2-asst.ah-full{top:20px;bottom:20px;height:auto;border:1px solid #d4d4da;border-radius:22px;overflow:hidden;box-shadow:0 24px 60px -24px rgba(15,15,20,.35)}
    .mv2-asst.ah-full .mv2-asst-list{overflow-y:scroll;scrollbar-width:thin}
    /* LES FENETRES DANS LE TELEPHONE (JM, 29/10 : « même sur web on simule un tél !!! fenêtres dans le tel ») : fiche, aide et
       confirmation a la largeur du telephone (430 px, --app-w), et le voile sur lui seul (marges de 20 px du cadre, coins arrondis). */
    dialog.mv2-asst-help{width:calc(var(--app-w) - 28px);max-width:calc(var(--app-w) - 28px);max-height:calc(100dvh - 68px)}
    dialog.mv2-asst-help::backdrop{top:20px;bottom:20px;left:calc((100vw - 430px) / 2);right:calc((100vw - 430px) / 2);border-radius:22px}
}
