/* =====================================================================
   ALMA : interface « Liquid Glass » bleue (inspirée d'iOS 26).
   Principe : le VERRE sert à la navigation et aux contrôles (barre latérale,
   saisie, boutons, fenêtres). Les réponses médicales restent sur des cartes
   claires pour une lecture facile. Tout est piloté par les JETONS ci-dessous.
   Aucune ressource externe : fonctionne sans internet.
   ===================================================================== */

/* Polices embarquées (Inter pour le texte, Manrope pour les titres) : fonctionnent hors ligne */
@font-face{font-family:"Inter";font-style:normal;font-weight:100 900;font-display:swap;src:url("fonts/inter-latin.woff2") format("woff2");unicode-range:U+0000-00FF,U+0131,U+0152-0153,U+02BB-02BC,U+02C6,U+02DA,U+02DC,U+2000-206F,U+20AC,U+2122,U+2191,U+2193,U+2212,U+2215,U+FEFF,U+FFFD}
@font-face{font-family:"Manrope";font-style:normal;font-weight:200 800;font-display:swap;src:url("fonts/manrope-latin.woff2") format("woff2");unicode-range:U+0000-00FF,U+0131,U+0152-0153,U+02BB-02BC,U+02C6,U+02DA,U+02DC,U+2000-206F,U+20AC,U+2122,U+2191,U+2193,U+2212,U+2215,U+FEFF,U+FFFD}

/* ---------- JETONS (modifie ici pour changer tout le look) ---------- */
:root{
  /* Couleurs */
  --fond-1:#F5FAFF;
  --fond-2:#D6EBFF;
  --fond-3:#A9D3FA;
  --texte:#102F59;      /* Deep Navy */
  --texte-doux:#4A5F7E;        /* texte secondaire : 5:1 sur le verre (le gris #71849D du brief n'atteint que 3,8:1) */
  --muet:#71849D;              /* décoratif seulement (icônes, désactivé) */
  --bleu:#0878D1;              /* Primary Blue (blanc dessus : 4,6:1) */
  --bleu-2:#0663B0;
  --bleu-vif:#0E8CF0;
  --bleu-texte:#0A5FAE;
  --danger:#A61B1B;
  --danger-fond:#FEE2E2;
  --danger-texte:#7F1D1D;
  --ok:#178A4E;
  --ok-2:#0F7342;

  /* Verre */
  --verre-haut:rgba(255,255,255,.58);
  --verre-bas:rgba(255,255,255,.26);
  --verre-bord:rgba(255,255,255,.62);
  --flou:34px;
  --ombre-verre:0 12px 40px rgba(16,74,170,.18), 0 2px 6px rgba(16,74,170,.10);

  /* Formes et rythme (base 8 px) */
  --r-xl:32px; --r-l:24px; --r-m:18px; --r-s:14px;
  --police:"Inter",-apple-system,BlinkMacSystemFont,"Segoe UI Variable Text","Segoe UI",Roboto,"Noto Sans",system-ui,sans-serif;
  --police-titre:"Manrope","Inter",-apple-system,BlinkMacSystemFont,"Segoe UI",Roboto,system-ui,sans-serif;
  /* Espacements (base 4 px), ombres et flous réutilisables */
  --e1:4px; --e2:8px; --e3:12px; --e4:16px; --e5:20px; --e6:24px; --e8:32px;
  --ombre-s:0 3px 10px rgba(16,74,170,.12);
  --ombre-m:0 8px 22px rgba(16,74,170,.16);
  --ombre-l:0 14px 36px rgba(16,74,170,.2);
  --flou-s:14px; --flou-m:22px;
  --ease:cubic-bezier(.2,.8,.2,1);
  --ressort:cubic-bezier(.3,1.5,.5,1);
  --haut-sûr:env(safe-area-inset-top,0px);
  --bas-sûr:env(safe-area-inset-bottom,0px);
}

*{box-sizing:border-box;-webkit-tap-highlight-color:transparent}
html,body{height:100%;overflow:hidden}
body{
  margin:0; font-family:var(--police); font-size:16px; line-height:1.55;
  color:var(--texte); background:var(--fond-2);
  -webkit-font-smoothing:antialiased; -moz-osx-font-smoothing:grayscale;
  overflow:hidden; text-rendering:optimizeLegibility;
}
button,input,textarea,select{font:inherit;color:inherit}
button{cursor:pointer;touch-action:manipulation}
[hidden]{display:none!important}
:focus-visible{outline:3px solid var(--bleu-vif);outline-offset:2px}
.ic{width:22px;height:22px;flex:none;fill:none;stroke:currentColor;stroke-width:2;stroke-linecap:round;stroke-linejoin:round}
.lib,.long,.court{white-space:nowrap}
.court{display:none}
*{scrollbar-width:thin;scrollbar-color:rgba(10,100,214,.28) transparent}

/* ---------- ÉCRAN DE DÉMARRAGE (très court) ---------- */
.splash{position:fixed;inset:0;z-index:200;display:grid;place-content:center;justify-items:center;gap:30px;overflow:hidden;
  background:linear-gradient(165deg,#EAF4FF 0%,#C9E1FF 55%,#A5CCFF 100%);animation:splash-sortie .5s ease 1.05s forwards}
.splash-halo{position:absolute;left:50%;top:50%;width:620px;height:620px;margin:-310px;border-radius:50%;background:radial-gradient(circle,rgba(10,132,255,.38),rgba(10,132,255,0) 65%);animation:halo 1.6s ease-in-out both}
.splash-logo{position:relative;width:min(270px,64vw);height:auto;filter:drop-shadow(0 14px 30px rgba(10,100,214,.3));animation:splash-logo .85s var(--ressort) both}
.splash-barre{position:relative;width:120px;height:6px;border-radius:6px;overflow:hidden;background:rgba(255,255,255,.65);box-shadow:inset 0 1px 2px rgba(16,74,170,.18),0 0 0 1px rgba(255,255,255,.7);animation:fondu-splash .4s .25s both}
.splash-barre i{display:block;height:100%;width:100%;border-radius:6px;background:linear-gradient(90deg,var(--bleu-vif),#5AC8FA);transform-origin:left;animation:remplit .95s var(--ease) .15s both}
@keyframes splash-logo{from{opacity:0;transform:translateY(16px) scale(.86);filter:blur(8px) drop-shadow(0 14px 30px rgba(10,100,214,.3))}to{opacity:1;transform:none}}
@keyframes halo{from{opacity:0;transform:scale(.6)}to{opacity:1;transform:scale(1)}}
@keyframes remplit{from{transform:scaleX(0)}to{transform:scaleX(1)}}
@keyframes fondu-splash{from{opacity:0}}
@keyframes splash-sortie{to{opacity:0;visibility:hidden;transform:scale(1.05);filter:blur(10px)}}

/* ---------- FOND : dégradé bleu + lueurs qui dérivent ---------- */
.fond{position:fixed;inset:0;z-index:-1;overflow:hidden;
  background:linear-gradient(165deg,var(--fond-1) 0%,var(--fond-2) 52%,var(--fond-3) 100%)}
.blob{position:absolute;border-radius:50%;will-change:transform;animation:derive 28s ease-in-out infinite alternate}
.b1{width:760px;height:760px;left:-220px;top:-120px;background:radial-gradient(circle at 50% 50%,rgba(10,132,255,.55),rgba(10,132,255,0) 68%)}
.b2{width:680px;height:680px;right:-200px;top:30%;background:radial-gradient(circle at 50% 50%,rgba(50,173,230,.55),rgba(50,173,230,0) 68%);animation-duration:34s;animation-delay:-9s}
.b3{width:620px;height:620px;left:28%;bottom:-260px;background:radial-gradient(circle at 50% 50%,rgba(94,92,230,.34),rgba(94,92,230,0) 68%);animation-duration:40s;animation-delay:-18s}
@keyframes derive{from{transform:translate3d(0,0,0) scale(1)}to{transform:translate3d(70px,-50px,0) scale(1.14)}}

/* ---------- VERRE (Liquid Glass) ---------- */
.glass{
  position:relative;
  background:linear-gradient(150deg,var(--verre-haut),var(--verre-bas));
  -webkit-backdrop-filter:blur(var(--flou)) saturate(185%);
  backdrop-filter:blur(var(--flou)) saturate(185%);
  border:1px solid var(--verre-bord);
  box-shadow:
    inset 0 1.5px 0 rgba(255,255,255,.95),
    inset 0 -1px 0 rgba(255,255,255,.28),
    inset 0 0 28px rgba(255,255,255,.16),
    var(--ombre-verre);
}
/* Bord brillant (reflet de lumière sur l'arête, comme iOS 26) */
.glass::after{
  content:""; position:absolute; inset:0; border-radius:inherit; padding:1.5px; pointer-events:none;
  background:linear-gradient(135deg,rgba(255,255,255,.98) 0%,rgba(255,255,255,0) 28%,rgba(255,255,255,0) 68%,rgba(255,255,255,.75) 100%);
  -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 exclude,linear-gradient(#000 0 0);
  mask-composite:exclude;
}

/* ---------- BOUTONS ---------- */
.btn,.btn-icone{border:0;position:relative;overflow:hidden;transition:transform .2s var(--ease),filter .2s,background .2s,box-shadow .2s}
.btn{display:inline-flex;align-items:center;justify-content:center;gap:10px;min-height:48px;padding:0 20px;border-radius:var(--r-m);font-weight:650;font-size:15.5px}
.btn:active,.btn-icone:active{transform:scale(.95)}
.btn-primaire{color:#fff;background:linear-gradient(180deg,var(--bleu-vif) -40%,var(--bleu) 40%,var(--bleu-2) 130%);
  box-shadow:inset 0 1.5px 0 rgba(255,255,255,.5),inset 0 -1px 0 rgba(0,0,0,.12),0 8px 22px rgba(10,100,214,.38)}
.btn-verre{color:var(--texte);background:rgba(255,255,255,.62);box-shadow:inset 0 1px 0 #fff,0 0 0 1px rgba(255,255,255,.8),0 3px 10px rgba(16,74,170,.1)}
.btn-danger{color:var(--danger-texte);background:var(--danger-fond);box-shadow:inset 0 0 0 1px rgba(166,27,27,.28)}
.btn-urgence{color:var(--danger-texte);background:rgba(254,226,226,.78);box-shadow:inset 0 1px 0 rgba(255,255,255,.8),inset 0 0 0 1px rgba(166,27,27,.26);width:100%}
.btn-icone{display:inline-grid;place-items:center;width:44px;height:44px;padding:0;border-radius:50%;background:transparent;color:var(--texte)}
@media (hover:hover){
  .btn-primaire:hover{filter:brightness(1.08) saturate(1.1)}
  .btn-verre:hover{background:rgba(255,255,255,.85)}
  .btn-danger:hover,.btn-urgence:hover{background:#FECACA}
  .btn-icone:hover{background:rgba(255,255,255,.55)}
}
/* onde au clic (créée par app.js) */
.onde-clic{position:absolute;border-radius:50%;pointer-events:none;background:rgba(255,255,255,.55);transform:scale(0);animation:ondeclic .65s var(--ease) forwards}
@keyframes ondeclic{to{transform:scale(1);opacity:0}}

/* ---------- MISE EN PAGE (téléphone d'abord) ---------- */
.app{height:100dvh}
.principal{height:100dvh;min-height:0;display:flex;flex-direction:column;min-width:0}

/* Barre du haut (téléphone et petite tablette) */
.haut{display:flex;align-items:center;gap:6px;height:60px;margin:calc(10px + var(--haut-sûr)) 12px 0;padding:0 8px;border-radius:var(--r-l);flex:none}
.haut .logo-img{height:34px;margin:0 auto 0 4px}

/* Barre latérale : tiroir sur téléphone */
.lateral{
  position:fixed;z-index:40;left:10px;top:calc(10px + var(--haut-sûr));bottom:calc(10px + var(--bas-sûr));
  width:min(88vw,340px);border-radius:var(--r-xl);padding:16px;
  display:flex;flex-direction:column;gap:12px;
  transform:translateX(calc(-100% - 24px));visibility:hidden;
  transition:transform .5s var(--ease),visibility 0s .5s;
}
.lateral.ouvert{transform:none;visibility:visible;transition:transform .5s var(--ease),visibility 0s}
.voile{position:fixed;inset:0;z-index:30;background:rgba(10,42,94,.32);-webkit-backdrop-filter:blur(6px);backdrop-filter:blur(6px);opacity:0;pointer-events:none;transition:opacity .35s}
.voile.visible{opacity:1;pointer-events:auto}

/* Contenu de la barre latérale */
.lat-haut{display:flex;align-items:center;justify-content:space-between;gap:8px;min-height:48px;padding:0 2px 0 6px}
.logo-img{display:block;height:44px;width:auto;max-width:100%;object-fit:contain}
.btn-replier{display:none}
.nav-principal{display:flex;flex-direction:column;gap:2px}
.nav-item{display:flex;align-items:center;gap:12px;width:100%;min-height:46px;padding:0 12px;border:0;border-radius:var(--r-s);background:transparent;color:var(--texte);font-weight:600;font-size:15.5px;text-align:left;transition:background .2s,transform .15s,box-shadow .2s}
.nav-item .ic{width:20px;height:20px}
.nav-item:active{transform:scale(.97)}
#nouvelle{background:rgba(255,255,255,.58);box-shadow:inset 0 1px 0 #fff,0 0 0 1px rgba(255,255,255,.75),0 4px 14px rgba(16,74,170,.1);margin-bottom:4px}
#nouvelle .ic{color:var(--bleu)}
.nav-urgence{color:var(--danger-texte)}
.nav-urgence .ic{color:var(--danger)}
.nav-rail-only{display:none}
@media (hover:hover){.nav-item:hover{background:rgba(255,255,255,.55)}.nav-urgence:hover{background:rgba(254,226,226,.7)}}
.recherche{position:relative;display:flex;align-items:center;margin:2px 0 4px}
.recherche>.ic{position:absolute;left:14px;width:18px;height:18px;color:var(--texte-doux);pointer-events:none}
.recherche input{width:100%;height:46px;border:0;border-radius:var(--r-m);padding:0 44px 0 42px;background:rgba(255,255,255,.6);
  box-shadow:inset 0 0 0 1px rgba(255,255,255,.8),inset 0 1px 3px rgba(16,74,170,.08);outline:none;font-size:16px;transition:box-shadow .2s,background .2s;-webkit-appearance:none;appearance:none}
.recherche input::-webkit-search-cancel-button{display:none}
.recherche input::placeholder{color:#4A6488;opacity:1}
.recherche input:focus{background:#fff;box-shadow:inset 0 0 0 2px var(--bleu-vif)}
.recherche-x{position:absolute;right:3px;width:40px;height:40px}
.recherche-x .ic{width:18px;height:18px}

.liste{flex:1;min-height:0;overflow-y:auto;margin:0 -8px;padding:0 8px;display:flex;flex-direction:column;gap:2px}
.groupe{margin:14px 6px 4px;font-size:12px;font-weight:700;letter-spacing:.06em;text-transform:uppercase;color:var(--texte-doux)}
.groupe:first-child{margin-top:4px}
.liste-vide{margin:14px 6px;font-size:14px;color:var(--texte-doux)}
.conv-ligne{position:relative;display:flex;align-items:center;border-radius:var(--r-s);animation:entree .35s var(--ease) both}
.conv{flex:1;min-width:0;display:flex;align-items:center;gap:10px;min-height:46px;padding:0 44px 0 12px;border:0;border-radius:var(--r-s);background:transparent;color:#173A6E;text-align:left;font-size:15px;transition:background .2s,transform .15s}
.conv .ic{width:18px;height:18px;opacity:.7}
.conv span{overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
.conv:active{transform:scale(.98)}
.conv[aria-current="true"]{background:rgba(255,255,255,.78);color:var(--texte);font-weight:650;box-shadow:inset 0 1px 0 #fff,0 4px 14px rgba(16,74,170,.14)}
.conv[aria-current="true"]::before{content:"";position:absolute;left:0;top:12px;bottom:12px;width:3.5px;border-radius:4px;background:linear-gradient(var(--bleu-vif),var(--bleu-2))}
.conv-plus{position:absolute;right:2px;width:40px;height:40px;opacity:.65}
.conv-plus .ic{width:18px;height:18px}
.conv-ren{flex:1;min-width:0;height:44px;margin:1px 0;padding:0 12px;border:0;border-radius:var(--r-s);background:#fff;box-shadow:inset 0 0 0 2px var(--bleu-vif);outline:none;font-size:16px}
@media (hover:hover){
  .conv:hover{background:rgba(255,255,255,.5)}
  .conv-plus{opacity:0}
  .conv-ligne:hover .conv-plus,.conv-plus:focus-visible,.conv-plus[aria-expanded="true"]{opacity:1}
}

.bas-lateral{display:flex;flex-direction:column;gap:10px;padding-top:12px;border-top:1px solid rgba(255,255,255,.7);box-shadow:0 -1px 0 rgba(16,74,170,.06)}
.profil-ligne{display:flex;align-items:center;gap:8px}
.profil-carte{flex:1;min-width:0;display:flex;align-items:center;gap:12px;padding:8px;border:0;border-radius:var(--r-m);text-align:left;background:transparent;transition:background .2s,transform .2s var(--ease)}
.profil-carte:active{transform:scale(.97)}
.profil-carte.actif{background:rgba(255,255,255,.7);box-shadow:inset 0 1px 0 #fff,0 3px 10px rgba(16,74,170,.12)}
@media (hover:hover){.profil-carte:hover{background:rgba(255,255,255,.55)}}
.btn-pilule{flex:none;min-height:42px;padding:0 16px;border:0;border-radius:999px;background:#fff;color:var(--texte);font-weight:650;font-size:14px;box-shadow:inset 0 0 0 1px rgba(10,100,214,.22),0 3px 10px rgba(16,74,170,.14);transition:transform .2s var(--ease),background .2s}
.btn-pilule:active{transform:scale(.94)}
@media (hover:hover){.btn-pilule:hover{background:#EAF3FF}}
.initiales{display:grid;place-items:center;width:42px;height:42px;flex:none;border-radius:50%;color:#fff;font-weight:700;font-size:17px;
  background:linear-gradient(160deg,#1E90EC,var(--bleu) 70%);box-shadow:inset 0 1px 0 rgba(255,255,255,.55),0 4px 12px rgba(10,100,214,.35)}
.profil-txt{min-width:0}
.profil-nom{display:block;font-weight:700;font-size:15px;line-height:1.25;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
.profil-sous{display:block;font-size:12.5px;line-height:1.3;color:var(--texte-doux);white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.ligne-bas{display:flex;flex-direction:column;align-items:stretch;gap:8px}
.ligne-bas .segment{display:flex}
.ligne-bas .segment button{flex:1}
.ligne-bas .badge{justify-content:center}

.segment{display:inline-flex;padding:3px;border-radius:999px;background:rgba(10,100,214,.1);box-shadow:inset 0 1px 2px rgba(16,74,170,.12)}
.segment button{min-height:36px;min-width:44px;padding:0 14px;border:0;border-radius:999px;background:transparent;color:var(--texte-doux);font-weight:650;font-size:14px;transition:background .25s,color .25s,box-shadow .25s}
.segment button[aria-pressed="true"]{background:#fff;color:var(--texte);box-shadow:0 2px 8px rgba(16,74,170,.2)}
.segment-mini button{padding:0 11px;min-height:40px}
.badge{display:inline-flex;align-items:center;gap:6px;margin:0;font-size:12px;color:var(--texte-doux)}
.point{width:8px;height:8px;border-radius:50%;background:var(--bleu-vif);box-shadow:0 0 0 3px rgba(10,132,255,.22)}

/* ---------- CONVERSATION ---------- */
.fil{flex:1;min-height:0;overflow-y:auto;overscroll-behavior:contain;padding:8px 16px 24px;scroll-padding-bottom:24px}
.colonne{width:100%;max-width:800px;margin:0 auto}
.accueil{display:flex;flex-direction:column;align-items:center;text-align:center;padding-top:8px;animation:entree .6s var(--ease) both}
.logo-hero{width:min(220px,56vw);height:auto;margin-bottom:8px;filter:drop-shadow(0 10px 24px rgba(10,100,214,.2))}
.accueil h1,.compte-id h1,.auth h2,dialog.modale h2,.c-carte h2{font-family:var(--police-titre)}
.accueil h1{margin:10px 0 8px;font-size:clamp(1.65rem,1.2rem + 2vw,2.6rem);line-height:1.15;letter-spacing:-.025em;font-weight:750}
.sous-titre{margin:0 0 clamp(14px,3vh,26px);max-width:46ch;color:var(--texte-doux);font-size:clamp(15px,.9rem + .25vw,17.5px)}
.sugg-zone{flex:none;width:100%;max-width:800px;margin:0 auto;padding:6px 16px 16px;display:flex;justify-content:center}
.suggestions{display:flex;flex-wrap:wrap;justify-content:center;gap:10px;width:100%}
.sugg{display:inline-flex;align-items:center;gap:10px;min-height:48px;padding:0 18px 0 14px;border:0;border-radius:999px;font-weight:600;font-size:15px;color:var(--texte);
  background:linear-gradient(150deg,rgba(255,255,255,.72),rgba(255,255,255,.4));-webkit-backdrop-filter:blur(18px) saturate(170%);backdrop-filter:blur(18px) saturate(170%);
  box-shadow:inset 0 1.5px 0 #fff,0 0 0 1px rgba(255,255,255,.7),0 6px 18px rgba(16,74,170,.12);transition:transform .25s var(--ease),box-shadow .25s}
.sugg:active{transform:scale(.96)}
.sugg-ic{display:grid;place-items:center;flex:none;color:var(--bleu)}
.sugg-ic .ic{width:20px;height:20px}
@media (hover:hover){.sugg:hover{transform:translateY(-2px);box-shadow:inset 0 1.5px 0 #fff,0 0 0 1px rgba(255,255,255,.8),0 12px 28px rgba(16,74,170,.2)}}

/* Écran vide : titre, saisie et suggestions centrés (comme ChatGPT) */
.principal.vide{overflow-y:auto}
.principal.vide .fil{flex:none;overflow:visible;margin-top:auto;padding-bottom:0}
.principal.vide .sugg-zone{margin-bottom:auto}
.principal.vide .composeur{min-height:72px}
.principal:not(.vide) .sugg-zone{display:none}
.principal:not(.vide) .accueil{display:none}

.messages{display:flex;flex-direction:column;gap:20px;padding-top:12px}
.msg{display:flex;gap:12px;animation:entree .45s var(--ease) both}
.msg-user{justify-content:flex-end}
.bulle{max-width:min(82%,560px);padding:12px 18px;border-radius:24px 24px 8px 24px;color:#fff;font-size:16px;line-height:1.5;overflow-wrap:anywhere;
  background:linear-gradient(180deg,#0A76CC,var(--bleu) 55%,var(--bleu-2));box-shadow:inset 0 1.5px 0 rgba(255,255,255,.4),0 8px 22px rgba(10,100,214,.32)}
.avatar{display:grid;place-items:center;width:38px;height:38px;flex:none;border-radius:50%;color:#fff;background:linear-gradient(160deg,#1E90EC,var(--bleu));box-shadow:inset 0 1px 0 rgba(255,255,255,.55),0 4px 12px rgba(10,100,214,.32)}
.avatar .ic{width:20px;height:20px}
.carte{flex:1;min-width:0;padding:16px 20px 8px;border-radius:8px 24px 24px 24px;
  background:rgba(255,255,255,.9);-webkit-backdrop-filter:blur(14px);backdrop-filter:blur(14px);
  box-shadow:inset 0 1.5px 0 #fff,0 0 0 1px rgba(255,255,255,.9),0 10px 30px rgba(16,74,170,.12)}
.niveau{display:flex;gap:10px;align-items:center;margin-bottom:12px;padding:10px 14px;border-radius:var(--r-s);font-weight:700;font-size:15px;border-left:4px solid}
.niveau .ic{flex:none}
.niveau-urgence{background:var(--danger-fond);color:var(--danger-texte);border-color:var(--danger)}
.niveau-consulter{background:#FEF3C7;color:#78350F;border-color:#B45309}
.niveau-domicile{background:#DCFCE7;color:#14532D;border-color:var(--ok)}
.corps{font-size:clamp(15.5px,15px + .2vw,17px);line-height:1.62;overflow-wrap:anywhere}
.corps p{margin:0 0 .75em}
.corps ul{margin:0 0 .75em;padding-left:1.25em}
.corps li{margin:.25em 0}
.corps li::marker{color:var(--bleu)}
.corps strong{font-weight:700}
.danger{display:flex;gap:10px;align-items:flex-start;margin-bottom:12px;padding:12px 14px;border-radius:var(--r-s);background:var(--danger-fond);color:var(--danger-texte);border-left:4px solid var(--danger);font-weight:600;font-size:15px}
.danger .ic{margin-top:2px}
.sources{display:flex;flex-wrap:wrap;gap:8px;margin:12px 0 4px;padding-top:12px;border-top:1px solid rgba(8,120,209,.12)}
.sources:empty{display:none}
.source{display:inline-flex;align-items:center;gap:6px;padding:4px 12px;border-radius:999px;font-size:13px;font-weight:600;color:var(--bleu-texte);background:rgba(10,100,214,.09)}
.source .ic{width:14px;height:14px}
.choix{display:flex;flex-wrap:wrap;gap:8px;margin:14px 0 4px}
.choix[hidden]{display:none}
.choix-bouton{min-height:44px;padding:10px 18px;border:1.5px solid rgba(8,120,209,.3);border-radius:var(--r-m);background:rgba(255,255,255,.72);color:var(--bleu-texte);font:inherit;font-size:15px;font-weight:650;line-height:1.3;text-align:left;transition:transform .2s var(--ease),background .2s,border-color .2s}
.choix-bouton:active{transform:scale(.97);background:rgba(8,120,209,.16)}
@media (hover:hover){.choix-bouton:hover{background:rgba(8,120,209,.12);border-color:var(--bleu)}}
.choix-autre{border-style:dashed;color:var(--texte-doux);font-weight:600}
@media (max-width:520px){.choix-bouton{flex:1 1 100%}}
.choix-libre{display:flex;flex:1 1 100%;gap:8px;align-items:center;margin-top:2px}
.choix-libre input{flex:1;min-width:0;min-height:44px;padding:0 16px;border:1.5px solid rgba(8,120,209,.4);border-radius:var(--r-m);background:rgba(255,255,255,.85);color:var(--texte);font:inherit;font-size:15.5px}
.choix-libre input::placeholder{color:var(--texte-doux)}
.choix-envoi{display:grid;place-items:center;flex:none;width:44px;height:44px;border:0;border-radius:50%;background:var(--bleu);color:#fff;transition:transform .2s var(--ease),background .2s}
.choix-envoi .ic{width:20px;height:20px}
.choix-envoi:active{transform:scale(.92)}
@media (hover:hover){.choix-envoi:hover{background:var(--bleu-vif)}}
.mesure{margin:2px 0 0;font-size:12.5px;color:var(--texte-doux)}
.actions{display:flex;flex-wrap:wrap;gap:8px;margin:10px 0 8px}
.btn-action{display:inline-flex;align-items:center;gap:8px;min-height:44px;padding:0 16px 0 12px;border:0;border-radius:999px;background:rgba(8,120,209,.08);color:var(--bleu-texte);font-weight:650;font-size:14px;transition:transform .2s var(--ease),background .2s}
.btn-action .ic{width:18px;height:18px}
.btn-action:active{transform:scale(.95);background:rgba(8,120,209,.18)}
@media (hover:hover){.btn-action:hover{background:rgba(8,120,209,.15)}}
.pense{display:inline-flex;gap:5px;padding:10px 0}
.pense i{width:9px;height:9px;border-radius:50%;background:var(--bleu);animation:rebond 1.2s ease-in-out infinite}
.pense i:nth-child(2){animation-delay:.15s}.pense i:nth-child(3){animation-delay:.3s}
@keyframes rebond{0%,60%,100%{transform:translateY(0);opacity:.4}30%{transform:translateY(-6px);opacity:1}}
.curseur{display:inline-block;width:2px;height:1.1em;margin-left:2px;vertical-align:text-bottom;background:var(--bleu);animation:clignote 1s steps(2) infinite}
@keyframes clignote{50%{opacity:0}}
@keyframes entree{from{opacity:0;transform:translateY(14px)}to{opacity:1;transform:none}}

/* ---------- PAGE « MON COMPTE » ---------- */
.principal.mode-compte .fil,.principal.mode-compte .zone-saisie,.principal.mode-compte .sugg-zone{display:none}
.compte{flex:1;min-height:0;overflow-y:auto;overscroll-behavior:contain;padding:12px 16px 40px;animation:entree .45s var(--ease) both}
.compte-col{width:100%;max-width:1040px;margin:0 auto;display:flex;flex-direction:column;gap:16px}
.retour{display:inline-flex;align-items:center;gap:8px;align-self:flex-start;min-height:44px;padding:0 16px 0 12px;border:0;border-radius:999px;background:rgba(255,255,255,.55);color:var(--texte);font-weight:650;font-size:15px;box-shadow:inset 0 1px 0 #fff,0 0 0 1px rgba(255,255,255,.75);transition:transform .2s var(--ease),background .2s}
.retour:active{transform:scale(.95)}
@media (hover:hover){.retour:hover{background:rgba(255,255,255,.85)}}
.compte-grille{display:grid;grid-template-columns:minmax(0,1fr);gap:16px;align-items:start}
.c-main{min-width:0}
#f-profil{display:flex;flex-direction:column;gap:16px}

/* Fiche profil */
.c-profil{display:flex;flex-direction:column;align-items:center;gap:6px;padding:28px 22px 22px;border-radius:var(--r-xl);text-align:center;background:linear-gradient(160deg,rgba(255,255,255,.76),rgba(255,255,255,.44))}
.initiales.grand{width:96px;height:96px;font-size:40px;margin-bottom:8px;font-family:var(--police-titre);box-shadow:inset 0 2px 0 rgba(255,255,255,.55),0 0 0 5px rgba(255,255,255,.7),0 12px 28px rgba(8,120,209,.4)}
.c-profil h1{margin:6px 0 0;font-family:var(--police-titre);font-size:1.5rem;letter-spacing:-.02em;font-weight:750;overflow-wrap:anywhere}
.c-mail{margin:0 0 8px;color:var(--texte-doux);font-size:14px;overflow-wrap:anywhere}
.pastille-info{display:inline-flex;align-items:center;gap:8px;padding:7px 14px;border-radius:999px;background:rgba(8,120,209,.1);color:var(--bleu-texte);font-weight:650;font-size:13px}
.pastille-info .ic{width:15px;height:15px}
.c-faits{width:100%;margin:16px 0 8px;padding:6px 14px;border-radius:var(--r-m);background:rgba(255,255,255,.55);box-shadow:inset 0 1px 0 #fff,0 0 0 1px rgba(255,255,255,.7);text-align:left}
.c-faits>div{display:flex;align-items:center;justify-content:space-between;gap:12px;min-height:46px}
.c-faits>div+div{border-top:1px solid rgba(8,120,209,.1)}
.c-faits dt{font-size:13.5px;color:var(--texte-doux);font-weight:600}
.c-faits dd{margin:0;font-weight:700;font-size:14.5px;text-align:right}
.c-quit{width:100%}

/* Cartes lecture / édition */
.c-carte{padding:22px 24px;border-radius:var(--r-l);background:rgba(255,255,255,.86);-webkit-backdrop-filter:blur(14px);backdrop-filter:blur(14px);box-shadow:inset 0 1.5px 0 #fff,0 0 0 1px rgba(255,255,255,.9),0 10px 30px rgba(16,74,170,.1)}
.c-entete{display:flex;align-items:center;justify-content:space-between;gap:12px;margin-bottom:6px;min-height:44px}
.c-carte h2{display:flex;align-items:center;gap:12px;margin:0;font-size:1.05rem;letter-spacing:-.01em}
.c-carte h2 .ic{width:20px;height:20px;color:var(--bleu)}
.btn-modif{display:inline-flex;align-items:center;gap:8px;min-height:40px;padding:0 14px;border:0;border-radius:999px;background:rgba(8,120,209,.09);color:var(--bleu-texte);font-weight:650;font-size:14px;transition:background .2s,transform .2s var(--ease)}
.btn-modif .ic{width:16px;height:16px}
.btn-modif:active{transform:scale(.95)}
@media (hover:hover){.btn-modif:hover{background:rgba(8,120,209,.17)}}
.c-note{margin:0 0 4px!important;text-align:left!important}
.c-lignes{margin:0}
.c-lignes>div{display:grid;grid-template-columns:minmax(120px,200px) minmax(0,1fr);gap:4px 20px;align-items:center;min-height:56px;padding:10px 0;border-top:1px solid rgba(8,120,209,.1)}
.c-lignes dt{font-size:14px;font-weight:600;color:var(--texte-doux)}
.c-lignes dd{margin:0;font-size:15.5px;font-weight:600;overflow-wrap:anywhere}
.vide-val{font-weight:500;color:var(--texte-doux);font-style:italic}
.chips{display:flex;flex-wrap:wrap;gap:8px}
.chip{display:inline-flex;align-items:center;padding:5px 12px;border-radius:999px;font-size:13.5px;font-weight:650;background:rgba(8,120,209,.1);color:var(--bleu-texte)}
.chip.alerte{background:var(--danger-fond);color:var(--danger-texte)}
.c-edition{display:none;padding-top:12px;border-top:1px solid rgba(8,120,209,.1)}
.c-carte.edition .c-lignes{display:none}
.c-carte.edition .c-edition{display:block;animation:entree .35s var(--ease) both}
.c-carte.edition .btn-modif{visibility:hidden}
.c-champs{display:grid;grid-template-columns:1fr;gap:12px}
.c-actions{display:flex;justify-content:flex-end;gap:10px;margin-top:16px}
.c-actions .btn{min-width:132px}

/* Champs façon « étiquette dans le cadre » */
.champ-f{position:relative;display:block;padding:10px 16px 8px;border-radius:var(--r-m);background:rgba(255,255,255,.9);box-shadow:inset 0 0 0 1.5px rgba(8,120,209,.2);transition:box-shadow .2s,background .2s;cursor:text}
.champ-f:focus-within{background:#fff;box-shadow:inset 0 0 0 2.5px var(--bleu-vif)}
.champ-f>span{display:block;font-size:12px;font-weight:700;letter-spacing:.02em;color:var(--texte-doux)}
.champ-f>span em{font-style:normal;font-weight:500}
.champ-f input,.champ-f select,.champ-f textarea{display:block;width:100%;margin:2px 0 0;padding:0;border:0;background:transparent;outline:none;font-size:16px;font-weight:600;color:var(--texte);min-height:28px;-webkit-appearance:none;appearance:none}
.champ-f textarea{resize:vertical;font-weight:500;line-height:1.5}
.champ-f select{cursor:pointer;padding-right:28px}
.champ-f:has(select)::after{content:"";position:absolute;right:18px;bottom:19px;width:8px;height:8px;border-right:2px solid var(--texte-doux);border-bottom:2px solid var(--texte-doux);transform:rotate(45deg);pointer-events:none}
.champ-date>.ic{position:absolute;right:16px;bottom:14px;width:20px;height:20px;color:var(--bleu);pointer-events:none}
.champ-date input{cursor:pointer}
.champ-date input::-webkit-calendar-picker-indicator{position:absolute;inset:0;width:100%;height:100%;opacity:0;cursor:pointer}

/* Zone sensible */
.c-danger{display:flex;align-items:center;justify-content:space-between;gap:16px;flex-wrap:wrap;background:rgba(255,246,246,.86);box-shadow:inset 0 1.5px 0 #fff,0 0 0 1px rgba(166,27,27,.18),0 10px 30px rgba(166,27,27,.07)}
.c-danger h2 .ic{color:var(--danger)}
.c-danger-txt{flex:1;min-width:220px}
.c-danger-txt .aide{margin:4px 0 0 32px}
.btn-danger.confirme{background:var(--danger);color:#fff;box-shadow:0 8px 22px rgba(166,27,27,.35);animation:secoue .45s}
.c-carte .aide{text-align:left}
.c-carte .aide.sans-marge{margin:0}
.segment-large button,.c-lignes .segment button{min-height:40px}
@media (min-width:1000px){
  .compte-grille{grid-template-columns:300px minmax(0,1fr);gap:24px}
  .c-profil{position:sticky;top:0}
  .c-champs:not(.une){grid-template-columns:1fr 1fr}
  .c-champs:not(.une) .champ-f:first-child{grid-column:1/-1}
}
@media (min-width:640px) and (max-width:999px){
  .c-champs:not(.une){grid-template-columns:1fr 1fr}
  .c-champs:not(.une) .champ-f:first-child{grid-column:1/-1}
  .compte{padding:16px 24px 40px}
}
@media (max-width:639px){
  .c-lignes>div{grid-template-columns:1fr;min-height:0}
  .c-carte{padding:18px}
  .c-actions .btn{flex:1}
  .c-danger-txt .aide{margin-left:0}
  .c-danger .btn{width:100%}
}

/* ---------- SAISIE ---------- */
.zone-saisie{flex:none;padding:6px 12px calc(10px + var(--bas-sûr))}
.composeur{display:flex;align-items:flex-end;gap:4px;max-width:800px;min-height:64px;margin:0 auto;padding:9px;border-radius:32px;transition:box-shadow .25s}
.composeur:focus-within{box-shadow:inset 0 1.5px 0 rgba(255,255,255,.95),inset 0 0 0 2px rgba(10,132,255,.75),0 0 0 5px rgba(10,132,255,.16),var(--ombre-verre)}
.composeur textarea{flex:1;min-width:0;max-height:140px;padding:10px 8px;border:0;background:transparent;resize:none;outline:none;font-size:16px;line-height:1.5;color:var(--texte)}
.composeur textarea::placeholder{color:#4A6488;opacity:1;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.btn-micro{overflow:visible;color:var(--bleu);background:rgba(8,120,209,.1);transition:background .25s,color .25s,transform .2s var(--ease),box-shadow .25s}
.btn-micro::before{content:"";position:absolute;inset:-3px;border-radius:50%;border:2.5px solid transparent;opacity:0;pointer-events:none;transition:opacity .25s}
@media (hover:hover){.btn-micro:hover{background:rgba(8,120,209,.18)}}
/* 1) repos  2) enregistrement  3) traitement  4) erreur */
.btn-micro[data-etat="enregistre"],.btn-micro.actif{color:#fff;background:var(--danger);animation:pouls 1.6s ease-out infinite}
.btn-micro[data-etat="traitement"]{color:var(--bleu);background:rgba(8,120,209,.16)}
.btn-micro[data-etat="traitement"]::before{opacity:1;border-top-color:var(--bleu);border-right-color:rgba(8,120,209,.3);animation:tourne .9s linear infinite}
.btn-micro[data-etat="traitement"] .ic{animation:souffle 1.1s ease-in-out infinite}
.btn-micro[data-etat="erreur"]{color:var(--danger);background:var(--danger-fond);box-shadow:inset 0 0 0 2px var(--danger);animation:secoue .5s}
@keyframes souffle{50%{transform:scale(.8);opacity:.6}}
.composeur.rec{box-shadow:inset 0 1.5px 0 rgba(255,255,255,.95),inset 0 0 0 2px rgba(10,100,214,.38),0 0 0 5px rgba(58,167,255,.16),var(--ombre-verre)}
@keyframes pouls{0%{box-shadow:0 0 0 0 rgba(166,27,27,.45)}100%{box-shadow:0 0 0 14px rgba(166,27,27,0)}}
.btn-envoyer{color:#fff;background:linear-gradient(180deg,var(--bleu-vif) -40%,var(--bleu) 45%,var(--bleu-2) 130%);box-shadow:inset 0 1.5px 0 rgba(255,255,255,.5),0 6px 16px rgba(10,100,214,.38);transition:transform .25s var(--ressort),opacity .25s,filter .2s}
.btn-envoyer:disabled{opacity:.38;box-shadow:none;transform:scale(.88);cursor:not-allowed}
.rec-zone{flex:1;display:flex;align-items:center;gap:10px;min-width:0;height:100%;padding:0 6px}
.rec-point{flex:none;width:10px;height:10px;border-radius:50%;background:var(--danger);animation:clignote 1s steps(2) infinite}
.rec-temps{flex:none;min-width:2.6em;line-height:1;font-variant-numeric:tabular-nums;font-weight:650;font-size:15px}
.onde{display:block;flex:1;min-width:0;width:100%;height:40px}
.composeur.rec{align-items:center}
.composeur.rec .btn-joindre{display:none}
.composeur.rec textarea{display:none}
.composeur.rec .rec-zone{align-self:center;height:48px}
.pied-avert{
  max-width:780px;
  margin:8px auto 0;
  display:grid;
  grid-template-columns:1fr auto 1fr;
  align-items:center;
  gap:10px;
  padding:0 4px;
}
.badge-version-alma{
  justify-self:start;
  display:inline-flex;
  align-items:center;
  padding:2px 9px;
  border-radius:999px;
  font-size:11.5px;
  font-weight:750;
  letter-spacing:.03em;
  color:var(--bleu-texte);
  background:rgba(255,255,255,.58);
  border:1px solid rgba(8,120,209,.24);
  box-shadow:inset 0 1px 0 rgba(255,255,255,.85);
  white-space:nowrap;
}
.pied-avert-equilibre{display:block}
.avert{margin:0;min-height:2.2em;display:flex;align-items:center;justify-content:center;text-align:center;font-size:12.5px;color:var(--texte-doux);transition:opacity .3s var(--ease),transform .3s var(--ease)}
.avert.sortie{opacity:0;transform:translateY(5px)}
@media (max-width:640px){
  .pied-avert{grid-template-columns:auto 1fr;gap:8px}
  .pied-avert-equilibre{display:none}
  .pied-avert .avert{justify-content:flex-start;text-align:left}
}
.sr-seul{position:absolute;width:1px;height:1px;margin:-1px;padding:0;overflow:hidden;clip:rect(0 0 0 0);clip-path:inset(50%);white-space:nowrap;border:0}
.bascule [data-i18n],.bascule .sugg,.bascule #saisie{animation:fondu .35s var(--ease) both}

/* ---------- NOTIFICATION ---------- */
.toast{position:fixed;left:50%;bottom:calc(112px + var(--bas-sûr));z-index:90;max-width:min(92vw,460px);padding:13px 22px;border-radius:999px;
  background:rgba(10,42,94,.9);-webkit-backdrop-filter:blur(16px);backdrop-filter:blur(16px);color:#fff;font-size:15px;font-weight:600;text-align:center;
  box-shadow:inset 0 1px 0 rgba(255,255,255,.25),0 12px 34px rgba(10,42,94,.38);
  opacity:0;transform:translate(-50%,24px) scale(.94);pointer-events:none;transition:opacity .3s,transform .45s var(--ressort)}
.toast.visible{opacity:1;transform:translate(-50%,0) scale(1)}

/* ---------- FENÊTRES (profil, urgence) ---------- */
dialog.modale{position:fixed;inset:0;margin:auto;width:min(480px,calc(100vw - 24px));max-height:calc(100dvh - 24px);overflow:auto;padding:26px;border-radius:var(--r-xl);color:var(--texte);
  background:linear-gradient(150deg,rgba(255,255,255,.84),rgba(255,255,255,.66))}
dialog.modale[open]{animation:fenetre .5s var(--ressort)}
dialog.modale::backdrop{background:rgba(10,42,94,.34);-webkit-backdrop-filter:blur(8px);backdrop-filter:blur(8px);animation:fondu .3s}
@keyframes fenetre{from{opacity:0;transform:translateY(24px) scale(.94)}to{opacity:1;transform:none}}
@keyframes fondu{from{opacity:0}}
dialog.modale h2{margin:0 0 6px;font-size:1.4rem;letter-spacing:-.02em}
.aide{margin:0 0 14px;color:var(--texte-doux);font-size:14.5px}
.erreur{margin:0 0 12px;padding:10px 12px;border-radius:var(--r-s);background:var(--danger-fond);color:var(--danger-texte);font-size:14.5px;font-weight:600}
.champ-simple{display:block;margin-bottom:14px;font-size:13.5px;font-weight:650}
.champ-simple input,.champ-simple select,.champ-simple textarea{display:block;width:100%;margin-top:6px;padding:0 14px;min-height:50px;border:0;border-radius:var(--r-m);background:rgba(255,255,255,.8);
  box-shadow:inset 0 0 0 1.5px rgba(10,100,214,.18);outline:none;font-size:16px;font-weight:400;transition:box-shadow .2s,background .2s}
.champ-simple textarea{padding:12px 14px;resize:vertical}
.champ-simple input:focus,.champ-simple select:focus,.champ-simple textarea:focus{background:#fff;box-shadow:inset 0 0 0 2.5px var(--bleu-vif)}
.rangee{display:flex;flex-wrap:wrap;gap:10px;margin-top:10px}
.rangee .btn{flex:1 1 150px}
.prive{margin:16px 0 0;font-size:12.5px;color:var(--texte-doux);text-align:center}
.urg-liste{margin:0 0 14px;padding-left:1.2em}
.urg-liste li{margin:.35em 0}

/* ---------- MENU D'UNE CONVERSATION ---------- */
.menu-pop{position:fixed;z-index:80;min-width:200px;padding:6px;border-radius:var(--r-l);
  background:linear-gradient(150deg,rgba(255,255,255,.92),rgba(255,255,255,.78));animation:fenetre .35s var(--ressort);transform-origin:top right}
.menu-pop button{display:flex;align-items:center;gap:12px;width:100%;min-height:46px;padding:0 14px;border:0;border-radius:var(--r-s);background:transparent;text-align:left;font-weight:600;font-size:15px;color:var(--texte)}
.menu-pop button .ic{width:18px;height:18px}
.menu-pop button.dangereux{color:var(--danger)}
.menu-pop button.dangereux.confirme{background:var(--danger);color:#fff}
@media (hover:hover){.menu-pop button:hover{background:rgba(10,100,214,.09)}.menu-pop button.dangereux:hover{background:var(--danger-fond)}.menu-pop button.dangereux.confirme:hover{background:var(--danger)}}

/* =====================================================================
   PAGE CONNEXION / INSCRIPTION (plein écran)
   ===================================================================== */
.auth{position:fixed;inset:0;z-index:60;display:grid;grid-template-columns:minmax(0,1fr);place-items:center;overflow-y:auto;
  padding:calc(16px + var(--haut-sûr)) 16px calc(16px + var(--bas-sûr));
  background:linear-gradient(160deg,rgba(234,244,255,.78),rgba(165,204,255,.7));
  -webkit-backdrop-filter:blur(26px) saturate(150%);backdrop-filter:blur(26px) saturate(150%);
  opacity:0;transition:opacity .4s}
.auth.visible{opacity:1}
.auth-carte{display:grid;grid-template-columns:minmax(0,1fr);width:min(440px,100%);margin:auto;padding:clamp(22px,5vw,36px);border-radius:var(--r-xl);
  background:linear-gradient(150deg,rgba(255,255,255,.76),rgba(255,255,255,.5));
  transform:translateY(28px) scale(.95);transition:transform .7s var(--ressort)}
.auth.visible .auth-carte{transform:none}
.auth-vue,.auth-ok{grid-area:1/1;transition:opacity .4s,transform .5s var(--ease),visibility 0s}
.auth-logo{display:block;height:58px;margin:0 auto 10px}
.auth h2{margin:0 0 6px;text-align:center;font-size:clamp(1.35rem,1.1rem + 1vw,1.7rem);letter-spacing:-.025em;font-weight:750}
.auth .aide{text-align:center}

.onglets{position:relative;display:grid;grid-template-columns:1fr 1fr;margin:6px 0 18px;padding:4px;border-radius:999px;background:rgba(10,100,214,.11);box-shadow:inset 0 1px 3px rgba(16,74,170,.14)}
.onglets::before{content:"";position:absolute;top:4px;bottom:4px;left:4px;width:calc(50% - 4px);border-radius:999px;background:#fff;box-shadow:0 3px 10px rgba(16,74,170,.22);transition:transform .55s var(--ressort)}
.auth[data-mode="ins"] .onglets::before{transform:translateX(100%)}
.onglets button{position:relative;z-index:1;min-height:44px;border:0;border-radius:999px;background:transparent;color:var(--texte-doux);font-weight:650;font-size:15px;transition:color .3s}
.onglets button[aria-selected="true"]{color:var(--texte)}

.bandeau-err{display:flex;align-items:flex-start;gap:10px;margin:0 0 14px;padding:11px 14px;border-radius:var(--r-s);background:var(--danger-fond);color:var(--danger-texte);font-size:14.5px;font-weight:600;border-left:4px solid var(--danger);animation:secoue .5s}
.bandeau-err .ic{margin-top:1px;width:20px;height:20px}

.champ{margin-bottom:14px}
.champ>label:not(.case){display:block;margin-bottom:6px;font-size:13.5px;font-weight:650}
.entree{position:relative;display:flex;align-items:center;gap:10px;height:54px;padding:0 8px 0 14px;border-radius:var(--r-m);background:rgba(255,255,255,.78);
  box-shadow:inset 0 0 0 1.5px rgba(10,100,214,.18),inset 0 1px 3px rgba(16,74,170,.06);transition:box-shadow .25s,background .25s,transform .3s var(--ressort)}
.entree>.ic{width:19px;height:19px;color:var(--texte-doux);transition:color .25s}
.entree input{flex:1;min-width:0;height:100%;padding:0;border:0;background:transparent;outline:none;font-size:16px}
.entree input::placeholder{color:#4A6488;opacity:1}
.entree::after{content:"";position:absolute;inset:0;border-radius:inherit;pointer-events:none;box-shadow:inset 0 0 0 0 transparent;transition:box-shadow .25s}
.entree:focus-within{background:#fff;transform:translateY(-1px)}
.entree:focus-within::after{box-shadow:inset 0 0 0 2.5px var(--bleu-vif)}
/* Remplissage automatique (Chrome/Android/Safari) : on garde le fond du champ, pas le gris/bleu du navigateur */
.entree input:-webkit-autofill,.entree input:-webkit-autofill:hover,.entree input:-webkit-autofill:focus,.entree input:-webkit-autofill:active{
  -webkit-text-fill-color:var(--texte);caret-color:var(--texte);background-color:transparent!important;background-clip:content-box;
  -webkit-box-shadow:0 0 0 1000px transparent inset;transition:background-color 600000s 0s,color 600000s 0s}
.entree input:autofill{background-color:transparent!important;-webkit-text-fill-color:var(--texte);transition:background-color 600000s 0s}
.entree:focus-within>.ic{color:var(--bleu)}
.champ.invalide .entree{background:#fff;animation:secoue .5s}
.champ.invalide .entree::after{box-shadow:inset 0 0 0 2.5px var(--danger)}
.champ.invalide .entree>.ic{color:var(--danger)}
.champ-err{max-height:0;margin:0;overflow:hidden;font-size:13.5px;font-weight:600;color:var(--danger);opacity:0;transition:max-height .35s var(--ease),opacity .3s,margin .3s}
.champ.invalide .champ-err{max-height:48px;margin-top:6px;opacity:1}
@keyframes secoue{10%,90%{transform:translateX(-2px)}20%,80%{transform:translateX(4px)}30%,50%,70%{transform:translateX(-7px)}40%,60%{transform:translateX(7px)}}
.secoue{animation:secoue .5s}
.oeil{width:44px;height:44px;border:0;border-radius:50%;background:transparent;display:grid;place-items:center;color:var(--texte-doux);transition:background .2s,transform .2s}
.oeil:active{transform:scale(.88)}
.oeil .ic{width:20px;height:20px}
@media (hover:hover){.oeil:hover{background:rgba(10,100,214,.09)}}

/* Champs visibles seulement en « Créer un compte » (ouverture fluide) */
.plus-ins{display:grid;grid-template-rows:0fr;opacity:0;visibility:hidden;transition:grid-template-rows .55s var(--ease),opacity .35s,visibility 0s .55s}
.plus-in{min-height:0;overflow:hidden}
.auth[data-mode="ins"] .plus-ins{grid-template-rows:1fr;opacity:1;visibility:visible;transition:grid-template-rows .55s var(--ease),opacity .45s .1s,visibility 0s}

.force{display:flex;align-items:center;gap:12px;margin:-2px 0 14px}
.barres{display:flex;gap:5px;flex:0 0 96px}
.barres i{flex:1;height:6px;border-radius:6px;background:rgba(10,100,214,.16);transition:background .35s}
.force[data-niv="1"] .barres i:nth-child(-n+1){background:#D64545}
.force[data-niv="2"] .barres i:nth-child(-n+2){background:#E08A00}
.force[data-niv="3"] .barres i:nth-child(-n+3){background:var(--bleu-vif)}
.force[data-niv="4"] .barres i:nth-child(-n+4){background:var(--ok)}
.force-txt{min-width:0;font-size:13px;font-weight:600;color:var(--texte-doux)}

.case{display:flex;align-items:flex-start;gap:12px;position:relative;font-size:14px;line-height:1.45;cursor:pointer}
.case input{position:absolute;left:0;top:0;width:26px;height:26px;margin:0;opacity:0;cursor:pointer}
.boite{display:grid;place-items:center;flex:none;width:26px;height:26px;border-radius:9px;background:rgba(255,255,255,.85);box-shadow:inset 0 0 0 2px rgba(10,100,214,.38);transition:background .25s,box-shadow .25s,transform .35s var(--ressort)}
.boite .ic{width:16px;height:16px;stroke:#fff;stroke-width:3.4;stroke-dasharray:24;stroke-dashoffset:24;transition:stroke-dashoffset .35s var(--ease) .05s}
.case input:checked+.boite{background:linear-gradient(160deg,var(--bleu-vif),var(--bleu-2));box-shadow:inset 0 1px 0 rgba(255,255,255,.5),0 3px 10px rgba(10,100,214,.4);transform:scale(1.06)}
.case input:checked+.boite .ic{stroke-dashoffset:0}
.case input:focus-visible+.boite{outline:3px solid var(--bleu-vif);outline-offset:2px}
.champ.invalide .boite{box-shadow:inset 0 0 0 2.5px var(--danger);animation:secoue .5s}

/* Bouton principal : repos → chargement (rond) → succès (coche) */
.btn-go{position:relative;overflow:hidden;display:grid;place-items:center;width:100%;height:56px;margin:8px auto 0;padding:0;border:0;border-radius:999px;color:#fff;font-weight:700;font-size:16.5px;
  background:linear-gradient(180deg,var(--bleu-vif) -40%,var(--bleu) 40%,var(--bleu-2) 130%);
  box-shadow:inset 0 1.5px 0 rgba(255,255,255,.55),inset 0 -1px 0 rgba(0,0,0,.14),0 12px 28px rgba(10,100,214,.42);
  transition:width .55s var(--ease),transform .2s var(--ease),filter .2s,background .45s,box-shadow .45s}
.btn-go:active{transform:scale(.96)}
@media (hover:hover){.btn-go:hover{filter:brightness(1.07) saturate(1.1)}}
.btn-go{grid-template-columns:minmax(0,1fr);grid-template-rows:minmax(0,1fr)}
.btn-go>*{grid-area:1/1;justify-self:center;align-self:center;white-space:nowrap}
.btn-go-txt{transition:opacity .25s,transform .35s var(--ease)}
.spin{box-sizing:border-box;width:26px;height:26px;flex:none;border-radius:50%;border:3px solid rgba(255,255,255,.32);border-top-color:#fff;opacity:0;transform:scale(.4);transition:opacity .25s,transform .35s var(--ressort)}
.coche{display:block;width:30px;height:30px;flex:none;fill:none;stroke:#fff;stroke-width:3.4;stroke-linecap:round;stroke-linejoin:round;stroke-dasharray:30;stroke-dashoffset:30}
.btn-go[data-etat="charge"]{width:56px;pointer-events:none}
.btn-go[data-etat="charge"] .btn-go-txt{opacity:0;transform:scale(.8)}
.btn-go[data-etat="charge"] .spin{opacity:1;transform:none;animation:tourne .8s linear infinite}
.btn-go[data-etat="ok"]{width:56px;pointer-events:none;background:linear-gradient(180deg,#27B06A -40%,var(--ok) 45%,var(--ok-2) 130%);box-shadow:inset 0 1.5px 0 rgba(255,255,255,.5),0 12px 30px rgba(23,138,78,.45);animation:pop .55s var(--ressort)}
.btn-go[data-etat="ok"] .btn-go-txt{opacity:0}
.btn-go[data-etat="ok"] .coche{stroke-dashoffset:0;transition:stroke-dashoffset .45s var(--ease) .18s}
@keyframes tourne{to{transform:rotate(360deg)}}
@keyframes pop{0%{transform:scale(.8)}60%{transform:scale(1.14)}100%{transform:scale(1)}}
.ou{display:flex;align-items:center;gap:12px;margin:14px 0 10px;color:var(--texte-doux);font-size:13px;font-weight:600}
.ou::before,.ou::after{content:"";flex:1;height:1px;background:linear-gradient(90deg,transparent,rgba(8,120,209,.28),transparent)}
.btn-invite{display:flex;align-items:center;justify-content:center;width:100%;min-height:50px;padding:0 20px;border:0;border-radius:999px;background:rgba(255,255,255,.62);color:var(--bleu-texte);font-weight:700;font-size:15.5px;
  box-shadow:inset 0 1.5px 0 #fff,inset 0 0 0 1.5px rgba(8,120,209,.3),var(--ombre-s);transition:transform .2s var(--ease),background .2s}
.btn-invite:active{transform:scale(.97);background:#fff}
@media (hover:hover){.btn-invite:hover{background:#fff}}

/* Bienvenue après succès */
.auth-ok{display:flex;flex-direction:column;align-items:center;justify-content:center;text-align:center;opacity:0;visibility:hidden;transform:scale(.92);padding:12px 0}
.auth-carte.ok .auth-vue{opacity:0;transform:scale(.95) translateY(-10px);visibility:hidden;pointer-events:none;transition:opacity .35s,transform .45s var(--ease),visibility 0s .4s}
.auth-carte.ok .auth-ok{opacity:1;visibility:visible;transform:none;transition:opacity .5s .3s,transform .7s var(--ressort) .3s}
.rond-ok{position:relative;display:grid;place-items:center;width:104px;height:104px;margin-bottom:20px;border-radius:50%;background:linear-gradient(160deg,#27B06A,var(--ok-2));box-shadow:inset 0 2px 0 rgba(255,255,255,.5),0 16px 36px rgba(23,138,78,.42)}
.rond-ok svg{position:absolute;inset:0;margin:auto;display:block;width:54px;height:54px;fill:none;stroke:#fff;stroke-width:3.2;stroke-linecap:round;stroke-linejoin:round;stroke-dasharray:30;stroke-dashoffset:30}
.auth-carte.ok .rond-ok{animation:pop .7s var(--ressort) .35s both}
.auth-carte.ok .rond-ok svg{stroke-dashoffset:0;transition:stroke-dashoffset .55s var(--ease) .65s}
.onde-ok{position:absolute;inset:0;border-radius:50%;border:2.5px solid rgba(23,138,78,.55);opacity:0}
.auth-carte.ok .onde-ok{animation:onde-ok 1.3s var(--ease) .6s}
.auth-carte.ok .onde-ok.o2{animation-delay:.85s}
@keyframes onde-ok{0%{transform:scale(1);opacity:.9}100%{transform:scale(2.3);opacity:0}}
.rond-ok i{position:absolute;left:50%;top:50%;width:9px;height:9px;margin:-4.5px;border-radius:50%;background:var(--bleu-vif);opacity:0}
.rond-ok i:nth-of-type(odd){background:#5AC8FA;width:7px;height:7px;margin:-3.5px}
.rond-ok i:nth-of-type(3n){background:var(--ok)}
.rond-ok i:nth-of-type(1){--a:0deg}.rond-ok i:nth-of-type(2){--a:45deg}.rond-ok i:nth-of-type(3){--a:90deg}.rond-ok i:nth-of-type(4){--a:135deg}
.rond-ok i:nth-of-type(5){--a:180deg}.rond-ok i:nth-of-type(6){--a:225deg}.rond-ok i:nth-of-type(7){--a:270deg}.rond-ok i:nth-of-type(8){--a:315deg}
.auth-carte.ok .rond-ok i{animation:etincelle .9s var(--ease) .7s both}
@keyframes etincelle{0%{opacity:1;transform:rotate(var(--a)) translateY(-48px) scale(.3)}100%{opacity:0;transform:rotate(var(--a)) translateY(-92px) scale(1)}}
.auth-ok h2{margin:0}

/* =====================================================================
   TABLETTE ET ORDINATEUR (≥ 768 px de large et ≥ 561 px de haut)
   ===================================================================== */
@media (min-width:768px) and (min-height:561px){
  .app{display:grid;grid-template-columns:auto minmax(0,1fr);grid-template-rows:minmax(0,1fr);gap:12px;padding:12px;height:100dvh;overflow:hidden}
  .principal{height:100%;min-height:0}
  .haut,.voile{display:none}
  .lateral{min-height:0;position:relative;left:auto;top:auto;bottom:auto;z-index:1;width:316px;height:100%;transform:none;visibility:visible;transition:width .55s var(--ease)}
  .btn-replier{display:inline-grid}
  .fil{padding:20px 24px 24px}
  .zone-saisie{padding:6px 24px 16px}
  .toast{bottom:112px}

  /* Barre latérale réduite : seulement les icônes */
  .app.replie .lateral{width:88px;padding:16px 14px;align-items:center}
  .app.replie .lat-haut{justify-content:center;padding:0}
  .app.replie .lat-haut .logo-img{display:none}
  .app.replie .lib,.app.replie .profil-txt,.app.replie .recherche,.app.replie .liste,.app.replie .btn-pilule,.app.replie .badge span:last-child{display:none}
  .app.replie .nav-principal{align-items:center;gap:6px}
  .app.replie .nav-item{width:54px;min-height:54px;padding:0;justify-content:center;border-radius:20px}
  .app.replie .nav-rail-only{display:flex}
  .app.replie .bas-lateral{width:100%;align-items:center;margin-top:auto}
  .app.replie .profil-ligne{justify-content:center}
  .app.replie .profil-carte{flex:none;padding:6px;border-radius:50%}
  .app.replie .ligne-bas{align-items:center}
  .app.replie .lateral .ligne-bas .segment{display:inline-flex;flex-direction:column;border-radius:20px}
  .app.replie .lateral .segment .long{display:none}
  .app.replie .lateral .segment .court{display:inline}
  .app.replie .lateral .segment button{padding:0;min-width:42px}
}
@media (min-width:1280px){
  .colonne{max-width:840px}
  .composeur{max-width:840px}
}
@media (min-width:640px){
  .c-grille{grid-template-columns:1fr 1fr}
  .compte{padding:16px 24px 40px}
}
@media (max-width:520px){
  .bulle{max-width:88%}
  .carte{padding:14px 16px 6px}
  .avatar{width:34px;height:34px}
  .msg{gap:10px}
}
/* Seuls les téléphones passent en accueil compact : sur PC la page est la même à 90 %, 100 % ou 110 % de zoom. */
@media (max-height:700px) and (max-width:767px){
  .logo-hero{width:min(150px,40vw)}
  .sous-titre{display:none}
}
@media (max-height:880px){
  .auth-logo{height:46px}
  .auth .aide{font-size:13.5px;margin-bottom:8px}
  .onglets{margin-bottom:12px}
}

/* =====================================================================
   MOBILE (≤ 767 px) : téléphones Android et iOS, 320 à 767 px
   ===================================================================== */
@media (max-width:767px),(max-height:560px){
  .app,.principal{height:var(--vvh,100dvh)}
  .lateral{max-height:calc(var(--vvh,100dvh) - 20px)}

  /* En-tête : 4 éléments alignés, cibles de 44 px */
  .haut{height:58px;margin:calc(8px + var(--haut-sûr)) 10px 0;padding:0 6px;gap:2px;align-items:center}
  .haut .btn-icone{width:46px;height:46px;flex:none}
  .haut .btn-icone .ic{width:24px;height:24px}
  .haut .logo-img{height:30px;margin:0 auto}
  .segment-mini{flex:none}
  .segment-mini button{min-width:44px;min-height:44px;padding:0 11px;font-size:14px;font-weight:700;letter-spacing:.02em}
  .ligne-bas .segment button,.segment-large button,.c-lignes .segment button{min-height:40px}

  /* Accueil équilibré */
  .fil{padding:8px 16px 16px}
  .accueil{padding-top:0}
  .logo-hero{width:min(172px,46vw);margin-bottom:4px}
  .accueil h1{margin:8px 0 6px;font-size:clamp(1.45rem,6.4vw,1.85rem);line-height:1.18;max-width:18ch}
  .sous-titre{max-width:32ch;margin:0 0 18px;font-size:15px;line-height:1.5}

  /* Saisie confortable à une main */
  .zone-saisie{padding:6px 12px calc(8px + var(--bas-sûr))}
  .composeur{min-height:62px;padding:7px;gap:4px;border-radius:31px}
  .composeur .btn-icone{width:48px;height:48px;flex:none}
  .composeur textarea{padding:12px 6px}
  .principal.vide .composeur{min-height:66px}
  .avert{margin-top:6px;font-size:12px;line-height:1.35}

  /* Suggestions : cartes compactes en grille de 2 colonnes */
  .sugg-zone{padding:4px 12px 16px;max-width:none}
  .suggestions{display:grid;grid-template-columns:1fr 1fr;gap:10px;max-width:520px;margin:0 auto}
  .sugg{flex-direction:column;align-items:flex-start;justify-content:flex-start;gap:8px;min-height:84px;padding:12px;border-radius:var(--r-m);font-size:14.5px;line-height:1.3;text-align:left}
  .sugg>span:last-child{display:-webkit-box;-webkit-line-clamp:3;-webkit-box-orient:vertical;overflow:hidden}
  .sugg-ic{width:34px;height:34px;border-radius:11px;background:rgba(8,120,209,.1)}
  .sugg-ic .ic{width:20px;height:20px}
  .sugg:active{background:#fff}

  /* Conversation */
  .messages{gap:18px;padding-top:8px}
  .msg{gap:10px}
  .bulle{max-width:80%;padding:11px 16px;font-size:15.5px;line-height:1.5;border-radius:22px 22px 6px 22px}
  .avatar{width:34px;height:34px;margin-top:2px}
  .avatar .ic{width:18px;height:18px}
  .carte{padding:14px 16px 4px;border-radius:6px 22px 22px 22px}
  .corps{font-size:15.5px;line-height:1.65}
  .corps p{margin:0 0 .7em}
  .corps ul{padding-left:1.15em}
  .danger{font-size:14.5px;padding:11px 13px}
  .mesure{font-size:12px}
  .toast{bottom:calc(96px + var(--bas-sûr))}

  /* Connexion / inscription : compactes */
  .auth{padding:calc(10px + var(--haut-sûr)) 12px calc(10px + var(--bas-sûr));align-items:start}
  .auth-carte{padding:22px 18px 18px;border-radius:28px;margin:auto 0}
  .auth-logo{height:44px;margin-bottom:6px}
  .auth h2{font-size:1.35rem}
  .auth .aide{font-size:13.5px;margin-bottom:10px}
  .onglets{margin:4px 0 14px}
  .champ{margin-bottom:12px}
  .champ>label:not(.case){font-size:13px;margin-bottom:5px}
  .entree{height:52px}
  .case{font-size:13px}
  .force{margin-bottom:12px}
  .btn-go{height:54px;margin-top:6px}
  .c-carte{padding:18px}
  .compte{padding:8px 12px 28px}
}
@media (max-width:767px) and (max-height:760px){
  .auth[data-mode="ins"] .auth .aide,.auth[data-mode="ins"] #auth-aide{display:none}
}
/* Très petits téléphones (320–374 px) */
@media (max-width:374px){
  .haut{margin-inline:8px;padding:0 4px}
  .haut .btn-icone{width:44px;height:44px}
  .haut .logo-img{height:26px}
  .segment-mini button{min-width:44px;min-height:44px;padding:0 8px;font-size:13px}
  .fil{padding-inline:12px}
  .accueil h1{font-size:1.4rem}
  .sugg{min-height:78px;padding:10px;font-size:13.5px}
  .composeur textarea{font-size:15.5px}
  .bulle{max-width:84%}
  .auth-carte{padding:20px 14px 16px}
  .onglets button{font-size:14px}
}
/* Grands téléphones (431–767 px) */
@media (min-width:431px) and (max-width:767px){
  .logo-hero{width:min(190px,44vw)}
  .accueil h1{max-width:22ch}
  .bulle{max-width:76%}
  .carte{max-width:620px}
}
/* Peu de hauteur : on compacte pour que la saisie reste visible */
@media (max-height:640px) and (max-width:767px){
  .logo-hero{width:112px}
  .sous-titre{display:none}
  .accueil h1{margin:4px 0 12px}
  .sugg{min-height:64px;flex-direction:row;align-items:center}
}
@media (max-height:430px){
  .logo-hero,.accueil h1,.sous-titre,.auth-logo{display:none}
  .sugg-zone{display:none}
  .accueil{padding-top:0}
}

/* =====================================================================
   ACCESSIBILITÉ ET REPLIS
   ===================================================================== */
/* Mouvement réduit : plus d'animation décorative, états finaux immédiats */
@media (prefers-reduced-motion:reduce){
  *,*::before,*::after{animation-duration:.01ms!important;animation-iteration-count:1!important;animation-delay:0s!important;transition-duration:.01ms!important;transition-delay:0s!important;scroll-behavior:auto!important}
  .blob{animation:none!important}
}
/* Transparence réduite, ou navigateur sans flou : verre opaque lisible */
@media (prefers-reduced-transparency:reduce){
  .glass,.sugg,.carte,.auth,.auth-carte,.toast,.voile,dialog.modale::backdrop,.menu-pop{-webkit-backdrop-filter:none!important;backdrop-filter:none!important}
  .glass,.auth-carte,dialog.modale,.menu-pop{background:#F4F9FF!important}
  .auth{background:#DCEBFF!important}
  .sugg,.carte{background:#fff!important}
}
@supports not ((backdrop-filter:blur(1px)) or (-webkit-backdrop-filter:blur(1px))){
  .glass,.auth-carte,dialog.modale,.menu-pop{background:rgba(244,249,255,.96)}
  .auth{background:#DCEBFF}
  .sugg,.carte{background:#fff}
}
/* Contraste renforcé */
@media (prefers-contrast:more){
  :root{--texte-doux:#1B3560;--verre-bord:rgba(10,42,94,.55)}
  .glass{background:rgba(255,255,255,.92)}
  .entree,.champ-simple input{box-shadow:inset 0 0 0 2px #0A2A5E}
}


/* ---------- Pièces jointes ---------- */
.btn-joindre{flex:none;color:var(--bleu);background:rgba(8,120,209,.1)}   /* même style que le micro : une seule famille d'icônes */
@media (hover:hover){.btn-joindre:hover{background:rgba(8,120,209,.18)}}
.pieces{display:flex;gap:10px;max-width:800px;margin:0 auto;padding:12px 12px 10px;overflow-x:auto;scrollbar-width:none}
.pieces::-webkit-scrollbar{display:none}
.pieces[hidden]{display:none}
.piece{position:relative;flex:none;display:flex;align-items:center;gap:10px;height:64px;border-radius:var(--r-s);background:rgba(255,255,255,.86);
  box-shadow:inset 0 1.5px 0 #fff,inset 0 0 0 1.5px rgba(8,120,209,.22),var(--ombre-s);animation:entre-piece .4s var(--ressort)}
.piece-img{width:64px}
.piece-img img{display:block;width:100%;height:100%;object-fit:cover;border-radius:inherit}
.piece-fic{min-width:150px;max-width:230px;padding:0 14px 0 10px}
.piece-ic{display:grid;place-items:center;flex:none;width:42px;height:42px;border-radius:12px;background:rgba(8,120,209,.12);color:var(--bleu)}
.piece-ic .ic{width:22px;height:22px}
.piece-txt{display:grid;min-width:0;line-height:1.25}
.piece-txt b{overflow:hidden;text-overflow:ellipsis;white-space:nowrap;font-size:13.5px;font-weight:650;color:var(--texte)}
.piece-txt small{font-size:12px;color:var(--texte-doux)}
.piece.trait{opacity:.65;animation:entre-piece .4s var(--ressort),souffle-piece 1s ease-in-out infinite}
.piece-x{position:absolute;top:-8px;right:-8px;display:grid;place-items:center;width:26px;height:26px;padding:0;border:0;border-radius:50%;background:var(--texte);color:#fff;box-shadow:0 2px 8px rgba(16,47,89,.35)}
.piece-x::after{content:"";position:absolute;inset:-9px}
.piece-x .ic{width:14px;height:14px}
@keyframes entre-piece{from{opacity:0;transform:translateY(8px) scale(.9)}}
@keyframes souffle-piece{50%{opacity:.9}}
/* dans la conversation */
.col-user{display:flex;flex-direction:column;align-items:flex-end;gap:6px;min-width:0;max-width:min(88%,560px)}
.col-user .bulle{max-width:100%}
.pj{display:flex;flex-wrap:wrap;justify-content:flex-end;gap:6px}
.pj .piece{animation:none;box-shadow:inset 0 0 0 1.5px rgba(8,120,209,.22),var(--ombre-s)}
.pj .piece-img{width:120px;height:120px;border-radius:var(--r-m)}
.pj .piece-fic{height:56px}
/* dépôt par glisser-déposer */
.depot{position:fixed;inset:0;z-index:60;display:grid;place-items:center;padding:24px;background:rgba(16,47,89,.28);backdrop-filter:blur(6px);-webkit-backdrop-filter:blur(6px);pointer-events:none;animation:entre-piece .25s var(--ease)}
.depot[hidden]{display:none}
.depot-carte{display:grid;justify-items:center;gap:12px;width:min(420px,100%);padding:40px 24px;border-radius:var(--r-xl);outline:2.5px dashed var(--bleu-vif);outline-offset:-14px;text-align:center;font-weight:700;color:var(--texte)}
.depot-carte .ic{width:40px;height:40px;color:var(--bleu)}
.depot-carte p{margin:0;font-size:17px}
@media (max-width:767px),(max-height:560px){
  .pieces{padding:10px 8px 8px}
  .pj .piece-img{width:96px;height:96px}
}
@media (max-width:374px){
  .composeur .btn-joindre{width:42px;height:42px}
}
@media (prefers-reduced-motion:reduce){.piece,.depot{animation:none!important}}

/* ---------- Cohérence mobile : un seul logo, icônes de saisie identiques, accueil qui tient à l'écran ---------- */
@media (max-width:767px),(max-height:560px){
  .composeur{gap:6px}
  .composeur .btn-icone{width:44px;height:44px}
  .principal.vide .haut{justify-content:space-between}
  .principal.vide .haut .logo-img{display:none}   /* le grand logo de l'accueil suffit */
  .sugg-zone{padding-bottom:calc(16px + var(--bas-sûr))}
  .avatar{width:30px;height:30px}
  .avatar .ic{width:16px;height:16px}
}
@media (max-width:767px) and (max-height:820px){
  .logo-hero{width:min(132px,36vw)}
  .accueil h1{font-size:clamp(1.35rem,5.8vw,1.7rem)}
  .sous-titre{margin-bottom:12px}
}

/* ---------- Avatar d'ALMA : la lettre A du logo, en pastille ronde ---------- */
.avatar{background:#020617 url(img/avatar-alma.png) center/cover no-repeat;box-shadow:0 0 0 1.5px rgba(255,255,255,.7),0 4px 14px rgba(10,100,214,.35)}
.avatar .ic{display:none}

/* ---------- Accueil mobile : sobre, aéré, façon assistant moderne ---------- */
@media (max-width:767px),(max-height:560px){
  .accueil{padding-top:0}
  .logo-hero{width:min(124px,34vw);margin-bottom:6px}
  .accueil h1{margin:6px 0 6px;font-size:clamp(1.3rem,5.6vw,1.6rem);line-height:1.2;max-width:20ch}
  .sous-titre{max-width:30ch;margin:0 0 20px;font-size:14.5px;line-height:1.5}
  .principal.vide .composeur{min-height:60px}
  .avert{margin-top:8px;font-size:12px}
  /* suggestions : de petites pastilles sous la saisie, pas de grosses cartes */
  .sugg-zone{padding:14px 16px calc(18px + var(--bas-sûr))}
  .suggestions{display:flex;flex-wrap:wrap;justify-content:center;gap:8px;max-width:520px}
  .sugg{flex-direction:row;align-items:center;justify-content:flex-start;gap:7px;min-height:0;height:38px;padding:0 13px 0 7px;border-radius:999px;font-size:13px;font-weight:600;line-height:1.2;text-align:left;white-space:nowrap}
  .sugg>span:last-child{display:block;overflow:visible;-webkit-line-clamp:unset}
  .sugg-ic{width:24px;height:24px;border-radius:50%}
  .sugg-ic .ic{width:14px;height:14px}
}
@media (max-width:374px){
  .sugg{height:38px;font-size:13px;padding:0 12px 0 7px}
}

/* ---------- Accueil mobile : finition (saisie fine, espaces réguliers, pastilles discrètes) ---------- */
@media (max-width:767px),(max-height:560px){
  /* saisie : une pilule fine, boutons discrets */
  .zone-saisie{padding:4px 16px calc(6px + var(--bas-sûr))}
  .composeur{min-height:52px;padding:6px;gap:2px;border-radius:26px}
  .principal.vide .composeur{min-height:52px}
  .composeur .btn-icone{width:40px;height:40px}
  .composeur .btn-icone .ic{width:20px;height:20px}
  .composeur .btn-joindre,.composeur .btn-micro{background:transparent;box-shadow:none}
  .composeur .btn-envoyer{width:38px;height:38px}
  .composeur textarea{padding:8px 6px;font-size:16px;line-height:1.4}
  .avert{margin-top:10px;font-size:11.5px;opacity:.85}
  /* hero : plus compact, mieux centré */
  .logo-hero{width:min(104px,30vw);margin-bottom:10px}
  .accueil h1{margin:0 0 8px;font-size:clamp(1.25rem,5.4vw,1.5rem);font-weight:700;max-width:19ch}
  .sous-titre{max-width:34ch;margin:0 0 20px;font-size:13.5px;line-height:1.55;opacity:.9}
  /* pastilles : fines, régulières */
  .sugg-zone{padding:12px 16px calc(3vh + var(--bas-sûr))}
  .suggestions{gap:8px;max-width:420px}
  .sugg{height:34px;padding:0 13px 0 6px;gap:6px;font-size:12.5px;font-weight:600}
  .sugg-ic{width:22px;height:22px}
  .sugg-ic .ic{width:13px;height:13px}
}
@media (max-height:700px){
  .sugg-zone{padding-bottom:calc(10px + var(--bas-sûr))}
}

/* ---------- Accueil : le A d'ALMA (icône de l'app) + salutation selon l'heure ---------- */
.logo-hero{width:76px;height:76px;object-fit:cover;border-radius:24%;background:#020617;margin:0 0 14px;filter:none;
  box-shadow:0 0 0 2px rgba(255,255,255,.75),0 10px 28px rgba(10,100,214,.38)}
@media (max-width:767px),(max-height:560px){
  .logo-hero{width:64px;height:64px;margin:0 0 12px}
  .accueil h1{font-size:clamp(1.5rem,6.4vw,1.8rem);font-weight:700;margin:0 0 4px;max-width:none}
  .sous-titre{max-width:none;margin:0 0 20px;font-size:15px;line-height:1.4;opacity:.85}
}

/* ---------- Actions sous une réponse : petites icônes discrètes (copier, écouter) ---------- */
.actions{gap:2px;margin:6px 0 4px;margin-left:-6px}
.btn-action{position:relative;justify-content:center;gap:0;width:32px;min-height:0;height:32px;padding:0;border-radius:10px;background:transparent;color:var(--texte-doux)}
.btn-action .ic{width:17px;height:17px}
.btn-action>span{position:absolute;width:1px;height:1px;margin:-1px;overflow:hidden;clip:rect(0 0 0 0);white-space:nowrap}
.btn-action::after{content:"";position:absolute;inset:-6px}   /* zone tactile de 44 px malgré l'icône de 17 px */
.btn-action:active{transform:scale(.9);background:rgba(8,120,209,.14);color:var(--bleu-texte)}
@media (hover:hover){.btn-action:hover{background:rgba(8,120,209,.12);color:var(--bleu-texte)}}

/* ---------- Bulles en verre (envoyé = bleu verre, reçu = verre clair) + capsule d'actions ---------- */
.bulle{
  background:linear-gradient(160deg,rgba(40,150,240,.92),rgba(10,100,214,.88) 60%,rgba(6,78,190,.9));
  -webkit-backdrop-filter:blur(14px) saturate(160%);backdrop-filter:blur(14px) saturate(160%);
  box-shadow:inset 0 1.5px 0 rgba(255,255,255,.55),inset 0 -1px 0 rgba(255,255,255,.12),0 0 0 1px rgba(255,255,255,.28),0 10px 26px rgba(10,100,214,.3)}
.carte{
  background:linear-gradient(155deg,rgba(255,255,255,.78),rgba(255,255,255,.5));
  -webkit-backdrop-filter:blur(18px) saturate(170%);backdrop-filter:blur(18px) saturate(170%);
  box-shadow:inset 0 1.5px 0 rgba(255,255,255,.95),inset 0 -1px 0 rgba(255,255,255,.3),0 0 0 1px rgba(255,255,255,.7),0 12px 32px rgba(16,74,170,.14)}
.actions{display:inline-flex;align-items:center;gap:2px;margin:8px 0 8px;padding:3px;border-radius:999px;
  background:rgba(255,255,255,.55);box-shadow:inset 0 1px 0 rgba(255,255,255,.95),0 0 0 1px rgba(8,120,209,.12),0 2px 8px rgba(16,74,170,.08)}
.btn-action{width:30px;height:30px;border-radius:50%;color:var(--bleu-texte)}
.btn-action .ic{width:16px;height:16px}
.btn-action::after{inset:-7px}
.btn-action:active{background:rgba(8,120,209,.2)}
@media (hover:hover){.btn-action:hover{background:rgba(255,255,255,.95);box-shadow:0 1px 4px rgba(16,74,170,.18)}}
@media (prefers-contrast:more){.carte{background:#fff}}

/* ---------- Bouton « écouter » : chargement et lecture ---------- */
.btn-action[data-etat="charge"] .ic{animation:souffle-piece 1s ease-in-out infinite}
.btn-action[data-etat="lecture"]{background:rgba(8,120,209,.2)}
@media (prefers-reduced-motion:reduce){.btn-action[data-etat="charge"] .ic{animation:none}}

/* ---------- Barre latérale : seulement le A d'ALMA (icône de l'app) ---------- */
.logo-a{display:block;flex:none;width:40px;height:40px;border-radius:24%;object-fit:cover;background:#020617;margin-left:2px;
  box-shadow:0 0 0 1.5px rgba(255,255,255,.8),0 6px 16px rgba(10,100,214,.32)}
@media (min-width:768px) and (min-height:561px){.app.replie .lat-haut .logo-a{display:none}}

/* ---------- Barre latérale : A transparent + nom, rangement ---------- */
.logo-a{width:38px;height:38px;border-radius:0;background:transparent;object-fit:contain;margin:0;box-shadow:none;
  filter:drop-shadow(0 4px 10px rgba(10,100,214,.38))}
.marque{display:flex;align-items:center;gap:10px;min-width:0;text-decoration:none;color:var(--texte);border-radius:var(--r-s)}
.marque-nom{font-family:var(--police-titre);font-weight:800;font-size:21px;letter-spacing:.14em;
  background:linear-gradient(120deg,var(--bleu-2),var(--bleu-vif));-webkit-background-clip:text;background-clip:text;color:transparent}
.lat-haut{padding:2px 4px 10px 8px;min-height:56px;margin-bottom:6px;border-bottom:1px solid rgba(255,255,255,.7);box-shadow:0 1px 0 rgba(16,74,170,.06)}
.nav-principal{gap:3px}
.nav-item{border-radius:14px}
.nav-urgence{margin-top:6px;background:rgba(254,226,226,.45);box-shadow:inset 0 0 0 1px rgba(220,38,38,.14)}
.groupe{margin:16px 8px 6px;font-size:11.5px}
.liste{padding-top:2px}
.bas-lateral{margin-top:6px;padding-top:12px}
.profil-ligne{padding:4px;border-radius:18px;background:rgba(255,255,255,.4);box-shadow:inset 0 0 0 1px rgba(255,255,255,.7)}
@media (min-width:768px) and (min-height:561px){.app.replie .marque-nom{display:none}.app.replie .lat-haut{border:0;box-shadow:none}}

/* ---------- Mes messages : copier / modifier, édition en place ---------- */
.actions-user{align-self:flex-end;margin:2px 4px 2px 0;opacity:.9}
@media (hover:hover){.actions-user{opacity:0;transition:opacity .2s}.col-user:hover .actions-user,.actions-user:focus-within{opacity:1}}
.edition{width:min(100%,560px);padding:10px;border-radius:22px;background:linear-gradient(155deg,rgba(255,255,255,.88),rgba(255,255,255,.62));
  -webkit-backdrop-filter:blur(18px) saturate(170%);backdrop-filter:blur(18px) saturate(170%);
  box-shadow:inset 0 1.5px 0 #fff,0 0 0 2px var(--bleu-vif),0 12px 30px rgba(16,74,170,.18);animation:entree .25s var(--ease) both}
.edition textarea{display:block;width:100%;min-height:52px;max-height:220px;resize:none;border:0;outline:none;background:transparent;color:var(--texte);
  font:inherit;font-size:16px;line-height:1.5;padding:6px 8px}
.edition-btns{display:flex;justify-content:flex-end;gap:8px;margin-top:6px}
.edition-btns button{display:inline-flex;align-items:center;gap:6px;min-height:40px;padding:0 16px;border:0;border-radius:999px;font-weight:650;font-size:14.5px;
  transition:transform .15s var(--ease),background .2s}
.edition-btns button:active{transform:scale(.95)}
.ed-annuler{background:rgba(8,120,209,.1);color:var(--bleu-texte)}
.ed-envoyer{background:linear-gradient(160deg,#1E90EC,var(--bleu));color:#fff;box-shadow:0 4px 12px rgba(10,100,214,.3)}
.ed-envoyer .ic{width:16px;height:16px}
.msg-user .col-user{align-items:flex-end}

/* ---------- Réponses d'ALMA : actions sous la carte, comme sous mes messages ---------- */
.col-ia{flex:1;min-width:0;display:flex;flex-direction:column;align-items:flex-start;gap:0}
.col-ia .carte{align-self:stretch;flex:none;padding-bottom:14px}
.actions-ia{margin:8px 0 2px 6px}
.carte .mesure:empty{display:none}

/* ---------- Copier : confirmation (coche) ---------- */
.btn-action.copie{color:#0E8A5B;background:rgba(16,170,110,.16)}
.btn-action.copie .ic{animation:coche-pop .45s var(--ressort,cubic-bezier(.34,1.56,.64,1)) both}
@keyframes coche-pop{0%{transform:scale(.4) rotate(-20deg);opacity:0}60%{transform:scale(1.25) rotate(4deg);opacity:1}100%{transform:none}}
@media (hover:hover){.actions-user:has(.copie){opacity:1}}
@media (prefers-reduced-motion:reduce){.btn-action.copie .ic{animation:none}}

/* ---------- Pas de curseur texte là où on ne peut pas écrire ---------- */
html,body,body *{caret-color:transparent;cursor:default}
body :is(button,a,summary,label[for],[role="button"],[role="menuitem"],select,.nav-item,.conv,.btn-action,.profil-carte,.btn-pilule,.btn-icone,input[type="checkbox"],input[type="radio"],input[type="file"]),
body :is(button,a,.nav-item,.conv,.btn-action) *{cursor:pointer}
body :is(input:not([type="checkbox"]):not([type="radio"]):not([type="file"]):not([type="range"]),textarea,[contenteditable="true"]){caret-color:auto;cursor:text}
.bulle,.col-user,.actions,.avatar,.mesure,.source,.groupe,.nav-principal,.lat-haut,.haut{-webkit-user-select:none;user-select:none}
:is(button:disabled,[aria-disabled="true"]){cursor:not-allowed}

/* ---------- Connexion : mot de passe oublié, bouton Google, finitions ---------- */
.ligne-oubli{display:flex;justify-content:flex-end;margin:-6px 0 6px}
.ligne-oubli.centre{justify-content:center;margin:8px 0 0}
.ligne-oubli[hidden]{display:none}
.lien-oubli{position:relative;min-height:36px;padding:0 6px;border:0;border-radius:10px;background:transparent;color:var(--bleu-texte);font-weight:650;font-size:14px;transition:background .2s,transform .15s}
.lien-oubli::after{content:"";position:absolute;inset:-4px -6px}
.lien-oubli:active{transform:scale(.96);background:rgba(8,120,209,.12)}
@media (hover:hover){.lien-oubli:hover{background:rgba(8,120,209,.1)}}
.auth[data-mode="oubli"] .onglets,.auth[data-mode="oubli"] #f-auth{display:none}
.auth:not([data-mode="oubli"]) #f-oubli{display:none}
#f-oubli .etape:not([hidden]){animation:entree .4s var(--ease) both}
#f-oubli .btn-invite{margin-top:12px}
.saisie-code{letter-spacing:.5em;font-weight:700;font-size:20px;text-align:center;font-variant-numeric:tabular-nums}
.saisie-code::placeholder{letter-spacing:.3em;font-weight:400}
.btn-google{position:relative;overflow:hidden;display:flex;align-items:center;justify-content:center;gap:12px;width:100%;min-height:54px;margin-bottom:10px;padding:0 20px;border:0;border-radius:999px;
  background:linear-gradient(180deg,#fff,rgba(255,255,255,.82));color:#1f2d46;font-weight:700;font-size:15.5px;
  box-shadow:inset 0 1.5px 0 #fff,0 0 0 1px rgba(16,74,170,.14),0 6px 18px rgba(16,74,170,.14);
  transition:transform .2s var(--ease),box-shadow .25s,background .2s}
.btn-google .g-logo{width:22px;height:22px;flex:none}
.btn-google:active{transform:scale(.97)}
.btn-google.charge{pointer-events:none;opacity:.75}
.btn-google.charge .g-logo{animation:tourne .9s linear infinite}
@media (hover:hover){.btn-google:hover{transform:translateY(-1px);box-shadow:inset 0 1.5px 0 #fff,0 0 0 1px rgba(66,133,244,.45),0 10px 26px rgba(16,74,170,.22)}}
@media (prefers-reduced-motion:reduce){.btn-google.charge .g-logo{animation:none}#f-oubli .etape:not([hidden]){animation:none}}

/* =====================================================================
   ALMA : Intégration Vidéo Anatomique & Clinique Interactive (Liquid Glass)
   ===================================================================== */
.zone-video{margin:12px 0 6px 0;width:100%}
.zone-video[hidden]{display:none!important}

/* --- Carte Proposition de Vidéo --- */
.carte-video-proposee{
  background:linear-gradient(145deg,rgba(240,247,255,.9),rgba(214,235,255,.75));
  border:1.5px solid rgba(8,120,209,.32);
  border-radius:var(--r-m);
  padding:14px 16px;
  box-shadow:0 4px 18px rgba(8,120,209,.12),inset 0 1px 0 rgba(255,255,255,.9);
  display:flex;
  flex-direction:column;
  gap:10px;
  animation:entree .35s var(--ease) both;
}
.video-prop-header{
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:8px;
}
.video-badge{
  display:inline-flex;
  align-items:center;
  gap:6px;
  background:rgba(8,120,209,.12);
  color:var(--bleu);
  border-radius:20px;
  padding:3px 10px;
  font-size:12px;
  font-weight:700;
  border:1px solid rgba(8,120,209,.2);
}
.video-pts-count{
  font-size:12px;
  color:var(--texte-doux);
  font-weight:600;
}
.video-prop-titre{
  font-size:15px;
  font-weight:750;
  color:var(--texte);
  line-height:1.4;
}
.video-prop-actions{
  display:flex;
  margin-top:2px;
}
.btn-lancer-video{
  min-height:42px;
  padding:0 18px;
  font-size:14.5px;
  border-radius:var(--r-s);
  display:inline-flex;
  align-items:center;
  gap:8px;
  cursor:pointer;
}

/* --- Lecteur Vidéo Actif Synchronisé --- */
.carte-video-active{
  background:linear-gradient(155deg,rgba(16,47,89,.96),rgba(8,28,56,.98));
  color:#F5FAFF;
  border-radius:var(--r-m);
  padding:14px;
  margin:10px 0 6px 0;
  box-shadow:0 10px 32px rgba(16,47,89,.38),inset 0 1px 0 rgba(255,255,255,.2);
  border:1px solid rgba(255,255,255,.18);
  animation:entree .4s var(--ease) both;
}
.lecteur-barre-haut{
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:10px;
  margin-bottom:10px;
}
.lecteur-titre-group{
  display:flex;
  align-items:center;
  gap:8px;
  overflow:hidden;
  color:#E0F0FF;
}
.lecteur-titre{
  font-size:13.5px;
  font-weight:700;
  white-space:nowrap;
  text-overflow:ellipsis;
  overflow:hidden;
}
.lecteur-statut-pill{
  display:inline-flex;
  align-items:center;
  gap:6px;
  font-size:11.5px;
  font-weight:650;
  color:#4ADE80;
  background:rgba(34,197,94,.18);
  border:1px solid rgba(74,222,128,.3);
  padding:3px 8px;
  border-radius:12px;
  flex:none;
}
.point-vert{
  width:7px;
  height:7px;
  border-radius:50%;
  background:#22C55E;
  box-shadow:0 0 6px #22C55E;
  display:inline-block;
  animation:halo 1.6s ease-in-out infinite alternate;
}
.lecteur-media-wrap{
  position:relative;
  border-radius:12px;
  overflow:hidden;
  background:#050D1A;
  box-shadow:inset 0 0 12px rgba(0,0,0,.6);
  border:1px solid rgba(255,255,255,.1);
}
.alma-video-player{
  width:100%;
  max-height:360px;
  display:block;
  background:#000;
  border-radius:12px;
}
.lecteur-fallback-schema{
  padding:14px;
  background:linear-gradient(180deg,#0f2d52 0%,#091b33 100%);
  border-radius:12px;
  text-align:center;
}
.schema-visuel-header{
  display:flex;
  align-items:center;
  justify-content:center;
  gap:8px;
  font-size:12px;
  color:#D6EBFF;
  margin-bottom:10px;
}
.schema-pulsar{
  width:8px;
  height:8px;
  border-radius:50%;
  background:#0E8CF0;
  box-shadow:0 0 10px #0E8CF0;
  animation:halo 1.4s ease-in-out infinite alternate;
}
.schema-svg{
  width:100%;
  max-height:160px;
  display:block;
}
.schema-progression-bar{
  width:100%;
  height:5px;
  background:rgba(255,255,255,.15);
  border-radius:3px;
  margin-top:10px;
  overflow:hidden;
}
.schema-bar-remplie{
  height:100%;
  width:0%;
  background:linear-gradient(90deg,var(--bleu-vif),#5AC8FA);
  transition:width .4s linear;
}
.lecteur-commandes{
  display:flex;
  gap:8px;
  margin:10px 0 8px 0;
}
.btn-ctrl-v{
  flex:1;
  display:inline-flex;
  align-items:center;
  justify-content:center;
  gap:6px;
  padding:8px 12px;
  border-radius:var(--r-s);
  border:1px solid rgba(255,255,255,.2);
  background:rgba(255,255,255,.12);
  color:#fff;
  font-size:13px;
  font-weight:650;
  cursor:pointer;
  transition:background .2s,transform .15s;
}
.btn-ctrl-v:hover{background:rgba(255,255,255,.22)}
.btn-ctrl-v:active{transform:scale(.97)}
.lecteur-chapitres-bloc{
  margin-top:10px;
  border-top:1px solid rgba(255,255,255,.12);
  padding-top:8px;
}
.chapitres-titre{
  font-size:12px;
  color:rgba(214,235,255,.85);
  margin-bottom:6px;
  font-weight:650;
}
.chapitres-chips{
  display:flex;
  flex-wrap:wrap;
  gap:6px;
}
.chip-chapitre{
  display:inline-flex;
  align-items:center;
  gap:6px;
  padding:4px 10px;
  border-radius:14px;
  border:1px solid rgba(255,255,255,.22);
  background:rgba(255,255,255,.1);
  color:#fff;
  font-size:12px;
  cursor:pointer;
  transition:all .2s;
}
.chip-chapitre:hover{
  background:rgba(255,255,255,.22);
  border-color:rgba(255,255,255,.4);
}
.chip-chapitre.active{
  background:var(--bleu-vif);
  border-color:#5AC8FA;
  box-shadow:0 2px 10px rgba(14,140,240,.55);
}
.chip-time{
  font-family:monospace;
  font-weight:700;
  opacity:.9;
  background:rgba(0,0,0,.3);
  padding:1px 5px;
  border-radius:4px;
}
.chip-label{
  font-weight:550;
}

/* --- Galerie d'Images Botaniques & Schémas Médicaux --- */
.zone-images{margin:12px 0 8px 0;width:100%}
.zone-images[hidden]{display:none!important}
.galerie-images{
  display:grid;
  grid-template-columns:repeat(auto-fit,minmax(210px,1fr));
  gap:12px;
}
.carte-image-alma{
  margin:0;
  border-radius:var(--r-m);
  overflow:hidden;
  background:rgba(255,255,255,.78);
  border:1.5px solid rgba(8,120,209,.22);
  box-shadow:0 6px 20px rgba(16,74,170,.12);
  cursor:pointer;
  transition:transform .2s var(--ease),box-shadow .2s;
}
.carte-image-alma:hover{
  transform:translateY(-2px);
  box-shadow:0 10px 26px rgba(16,74,170,.2);
}
.image-alma-wrap{
  position:relative;
  background:#0D2C54;
  aspect-ratio:4/3;
  overflow:hidden;
}
.image-alma-img{
  width:100%;
  height:100%;
  object-fit:cover;
  display:block;
}
.image-alma-badge{
  position:absolute;
  left:8px;
  top:8px;
  display:inline-flex;
  align-items:center;
  gap:5px;
  padding:3px 9px;
  border-radius:999px;
  background:rgba(16,47,89,.82);
  color:#fff;
  font-size:11px;
  font-weight:650;
  backdrop-filter:blur(8px);
}
.image-alma-badge .ic{width:14px;height:14px}
.image-legende{
  padding:9px 11px;
  font-size:12.5px;
  line-height:1.4;
  color:var(--texte);
  font-weight:550;
}
.lightbox-alma{
  position:fixed;
  inset:0;
  z-index:300;
  background:rgba(10,25,47,.72);
  backdrop-filter:blur(10px);
  display:grid;
  place-items:center;
  padding:20px;
}
.lightbox-contenu{
  position:relative;
  max-width:min(92vw,760px);
  max-height:90vh;
  padding:16px;
  border-radius:var(--r-l);
  display:flex;
  flex-direction:column;
  gap:10px;
  background:rgba(255,255,255,.94);
}
.lightbox-fermer{
  position:absolute;
  right:10px;
  top:10px;
  background:rgba(255,255,255,.85)!important;
}
.lightbox-img{
  max-width:100%;
  max-height:70vh;
  object-fit:contain;
  border-radius:12px;
  background:#0D2C54;
}
.lightbox-legende{
  margin:0;
  font-size:14px;
  color:var(--texte);
  font-weight:600;
  text-align:center;
}
.md-code{
  font-family:ui-monospace,SFMono-Regular,Consolas,monospace;
  font-size:.9em;
  background:rgba(8,120,209,.1);
  color:var(--bleu-texte);
  padding:1px 6px;
  border-radius:6px;
}




/* ---------- Téléphone : saisie en bas (zone du pouce) + navigation en pastille ---------- */
.nav-bas{display:none}
@media (max-width:767px) and (min-height:561px){
  .nav-bas{display:flex;flex:none;order:4;gap:2px;margin:2px 12px calc(8px + var(--bas-sûr));padding:6px;border-radius:30px}
  .nb-item{flex:1;min-width:0;min-height:56px;display:flex;flex-direction:column;align-items:center;justify-content:center;gap:3px;padding:4px 2px;border:0;border-radius:24px;
    background:transparent;color:var(--texte-doux);font:inherit;font-size:12.5px;font-weight:650;line-height:1.1;cursor:pointer;-webkit-tap-highlight-color:transparent;
    transition:background .25s var(--ease),color .25s var(--ease),transform .2s var(--ease)}
  .nb-item .ic{width:23px;height:23px;flex:none}
  .nb-item:active{transform:scale(.94)}
  .nb-item:focus-visible{outline:2px solid var(--bleu);outline-offset:-2px}
  .nb-item.actif{background:rgba(255,255,255,.78);color:var(--bleu-texte);box-shadow:inset 0 1px 0 #fff,0 2px 10px rgba(16,74,170,.16)}
  .nb-item.nb-urgence{color:var(--danger)}
  html.clavier .nav-bas{display:none}

  /* ordre des blocs : conversation, suggestions, saisie, navigation */
  .fil{order:1}
  .sugg-zone{order:2}
  .zone-saisie{order:3}

  /* accueil : le message est centré dans l'espace libre, la saisie reste en bas */
  .principal.vide .fil{flex:1;min-height:0;margin-top:0;display:flex;flex-direction:column;justify-content:center;padding-bottom:4px}
  .principal.vide .accueil h1{font-size:clamp(1.65rem,7.4vw,2.05rem)}
  .principal.vide .sous-titre{margin-bottom:6px}
  .principal.vide .sugg-zone{margin-bottom:0;padding:2px 0 8px}
  .principal.vide .suggestions{display:flex;flex-wrap:nowrap;justify-content:flex-start;gap:8px;max-width:none;margin:0;padding:2px 12px;overflow-x:auto;scroll-snap-type:x proximity;scrollbar-width:none;-webkit-overflow-scrolling:touch}
  .principal.vide .suggestions::-webkit-scrollbar{display:none}
  .principal.vide .suggestions>*{flex:none;width:auto;scroll-snap-align:start;white-space:nowrap}
  .principal.vide .zone-saisie{padding-bottom:2px}
  .toast{bottom:calc(196px + var(--bas-sûr))}
}
