/* Panneau Tator dans Outlook : reprise exacte du design validé (version finale animée). */
:root {
  --bleu: #2A5FE0; --bleu-fonce: #1E4BC2; --bleu-pale: #EEF3FE; --bleu-bord: #D6E2FB; --bleu-fond: #F5F8FF;
  --encre: #111827; --gris: #6B7280; --gris-2: #4B5563; --gris-3: #374151; --bord: #E6E8EC; --bord-2: #EEF0F3;
  --vert: #15803D; --vert-pale: #ECFDF3; --orange: #B45309; --orange-pale: #FFFAF2; --orange-bord: #FDE7C7;
}
* { box-sizing: border-box; }
html, body { margin: 0; height: 100%; }
body { font-family: Inter, "Segoe UI", system-ui, -apple-system, sans-serif; color: var(--encre); font-size: 13px; background: #FFFFFF; }
button { font: inherit; }
a { color: var(--bleu); } a:hover { color: var(--bleu-fonce); }
[hidden] { display: none !important; }
.masque { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }

.panneau { display: flex; flex-direction: column; height: 100vh; min-height: 480px; }

/* En-tête */
.entete { padding: 14px 18px; display: flex; align-items: center; gap: 10px; border-bottom: 1px solid var(--bord-2); }
.entete img { width: 26px; height: 26px; display: block; }
.entete-titre { font-weight: 600; font-size: 14px; letter-spacing: -0.01em; }
.t-close { margin-left: auto; }
.t-icon { width: 32px; height: 32px; border: 0; background: transparent; border-radius: 8px; display: flex; align-items: center; justify-content: center; cursor: pointer; padding: 0; }

/* Client */
.client { padding: 18px 18px 0 18px; display: flex; flex-direction: column; gap: 14px; }
.client-ligne { display: flex; align-items: center; gap: 12px; }
.avatar { width: 44px; height: 44px; border-radius: 50%; background: var(--bleu-pale); color: var(--bleu); display: flex; align-items: center; justify-content: center; font-weight: 600; font-size: 15px; border: 1px solid var(--bleu-bord); flex: none; }
.client-noms { display: flex; flex-direction: column; gap: 3px; min-width: 0; }
.client-nom { font-weight: 600; font-size: 16px; letter-spacing: -0.01em; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.client-adresse { color: var(--gris); font-size: 12px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.statut { display: flex; align-items: center; gap: 8px; color: var(--gris); }
.pastille { background: var(--bleu-pale); color: var(--bleu-fonce); padding: 3px 9px; border-radius: 6px; font-size: 12px; font-weight: 500; }
.pastille.neutre { background: #F3F4F6; color: var(--gris-3); }

/* Onglets */
.onglets { position: relative; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); margin: 16px 18px 0 18px; border-bottom: 1px solid var(--bord); }
.onglet { display: flex; align-items: center; justify-content: center; gap: 6px; min-height: 42px; padding: 0; border: 0; background: transparent; font-weight: 500; color: var(--gris); cursor: pointer; transition: color .2s ease; }
.onglet:hover, .onglet.actif { color: var(--encre); }
.indicateur { position: absolute; left: 0; bottom: -1px; width: 33.333%; height: 2px; background: var(--bleu); border-radius: 2px; transition: transform .35s cubic-bezier(.2,.7,.2,1); }

/* Contenu */
.contenu { flex: 1; overflow-y: auto; position: relative; }
.vue { padding: 16px 18px; display: flex; flex-direction: column; gap: 14px; }
.carte { border: 1px solid var(--bord); border-radius: 12px; padding: 14px 16px; background: #FFFFFF; }
.t-card { transition: border-color .2s ease, box-shadow .2s ease, transform .2s ease; }
.t-card:hover { border-color: var(--bleu-bord); box-shadow: 0 6px 18px rgba(17,24,39,.06); transform: translateY(-1px); }
.carte-ligne { display: flex; align-items: center; gap: 14px; }
.carte-titre { font-weight: 600; }
.carte-sous { color: var(--gris); font-size: 12px; }
.rdv-date { font-weight: 600; font-size: 17px; letter-spacing: -0.01em; }
.rdv-vide { font-weight: 500; color: var(--gris-3); }
.droite { margin-left: auto; }
.colonne { display: flex; flex-direction: column; gap: 4px; min-width: 0; }
.etiquette { font-size: 11px; font-weight: 500; color: var(--gris); text-transform: uppercase; letter-spacing: 0.06em; }

.alerte { border: 1px solid var(--orange-bord); background: var(--orange-pale); border-radius: 10px; padding: 10px 12px; display: flex; gap: 10px; align-items: flex-start; color: #7C3A0A; line-height: 1.45; }
.alerte svg { flex: none; margin-top: 1px; }

.barre { height: 4px; background: var(--bord-2); border-radius: 999px; overflow: hidden; }
.barre > div { height: 4px; background: var(--bleu); border-radius: 999px; animation: tGrow 1s .35s cubic-bezier(.2,.7,.2,1) both; }
.liste { display: flex; flex-direction: column; gap: 9px; }
.piece { display: flex; gap: 10px; align-items: center; }
.piece.manquante { color: var(--gris-2); }
.piece svg { flex: none; }
.badge { background: var(--bleu-pale); color: var(--bleu-fonce); font-size: 11px; font-weight: 500; padding: 1px 6px; border-radius: 4px; flex: none; }
.badge.vert { background: var(--vert-pale); color: var(--vert); }
.badge.orange { background: #FFF7ED; color: var(--orange); }
.badge.gris { background: #F3F4F6; color: var(--gris-3); }
.lien { font-weight: 500; text-decoration: underline; text-underline-offset: 3px; background: none; border: 0; padding: 0; color: var(--bleu); cursor: pointer; text-align: left; transition: text-underline-offset .15s ease, color .15s ease; }
.lien:hover { text-underline-offset: 5px; color: var(--bleu-fonce); }
.lien-discret { margin-left: auto; border: 0; background: transparent; padding: 0; font-size: 12px; color: var(--gris); cursor: pointer; }
.lien-discret:hover { color: var(--encre); }

.fichier { border: 1px solid var(--bord); border-radius: 12px; padding: 12px 14px; display: flex; align-items: center; gap: 12px; background: #FFFFFF; transition: background-color .2s ease, border-color .2s ease; }
.fichier:hover { background: #F9FAFB; border-color: var(--bleu-bord); }
.fichier-noms { display: flex; flex-direction: column; gap: 2px; min-width: 0; flex: 1; }
.fichier-nom { font-weight: 500; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.fichier-avant { color: var(--gris); font-size: 12px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.tableau-lignes { border: 1px solid var(--bord); border-radius: 12px; overflow: hidden; }
.ligne { display: flex; align-items: center; gap: 10px; min-height: 46px; padding: 0 14px; border-bottom: 1px solid var(--bord-2); background: #FFFFFF; transition: background-color .2s ease; }
.ligne:last-child { border-bottom: 0; }
.ligne:hover { background: #F9FAFB; }
.ligne > span:first-of-type { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.type-pdf { background: #FEF3F2; color: #B42318; font-size: 10px; font-weight: 600; padding: 2px 5px; border-radius: 4px; flex: none; }
.bouton-secondaire { min-height: 42px; border: 1px solid var(--bleu-pale); background: var(--bleu-pale); color: var(--bleu-fonce); border-radius: 10px; font-weight: 500; cursor: pointer; padding: 0 14px; }
.vide { color: var(--gris); line-height: 1.5; }

/* Pied : brouillon, chat, dictée */
.pied { border-top: 1px solid var(--bord); padding: 14px 18px 16px; display: flex; flex-direction: column; gap: 10px; background: #FFFFFF; }
.bouton-brouillon { min-height: 44px; border: 0; background: var(--bleu); color: #FFFFFF; border-radius: 10px; font-weight: 500; font-size: 14px; display: flex; align-items: center; justify-content: center; gap: 8px; cursor: pointer; }
.bouton-brouillon:disabled { background: #F3F4F6; color: var(--gris); cursor: default; box-shadow: none; transform: none; filter: none; }
.bouton-brouillon:disabled .t-arrow { display: none; }
.t-primary { transition: filter .2s ease, transform .15s ease, box-shadow .2s ease; }
.t-primary:not(:disabled):hover { filter: brightness(.92); box-shadow: 0 8px 20px rgba(42,95,224,.28); transform: translateY(-1px); }
.t-primary:not(:disabled):active { transform: translateY(0) scale(.99); }
.t-primary .t-arrow { transition: transform .2s ease; }
.t-primary:not(:disabled):hover .t-arrow { transform: translateX(3px); }

.suggestions { display: flex; gap: 6px; flex-wrap: wrap; }
.puce { min-height: 30px; padding: 0 10px; border: 1px solid var(--bord); background: #FFFFFF; border-radius: 8px; font-size: 12px; color: var(--gris-2); cursor: pointer; }
.t-chip { transition: background-color .15s ease, border-color .15s ease, color .15s ease; }
.t-chip:hover { background: var(--bleu-fond); border-color: var(--bleu-bord); color: var(--bleu-fonce); }
.t-icon:hover { background: #F3F4F6; }
.t-close svg { transition: transform .25s ease; }
.t-close:hover svg { transform: rotate(90deg); }

.saisie { display: flex; align-items: center; gap: 6px; background: #FFFFFF; border: 1px solid #D1D5DB; border-radius: 12px; padding: 0 6px 0 12px; min-height: 46px; transition: border-color .2s ease, box-shadow .2s ease; }
.saisie:focus-within { border-color: var(--bleu); box-shadow: 0 0 0 3px rgba(42,95,224,.12); }
.saisie input { flex: 1; border: 0; outline: none; font: inherit; color: var(--encre); background: transparent; min-width: 0; }
.bouton-icone { width: 34px; height: 34px; }
.bouton-envoyer { width: 34px; height: 34px; border: 0; background: var(--bleu); border-radius: 8px; cursor: pointer; display: flex; align-items: center; justify-content: center; padding: 0; }

.fil { display: flex; flex-direction: column; gap: 10px; animation: tSlideUp .35s cubic-bezier(.2,.7,.2,1) both; }
.fil-entete { display: flex; align-items: center; }
.fil-messages { display: flex; flex-direction: column; gap: 10px; max-height: 300px; overflow-y: auto; padding: 2px; }
.bulle-moi { align-self: flex-end; max-width: 85%; background: var(--bleu); color: #FFFFFF; padding: 8px 11px; border-radius: 12px 12px 4px 12px; line-height: 1.45; white-space: pre-wrap; animation: tFadeUp .3s ease both; }
.bulle-tator { display: flex; gap: 8px; align-items: flex-start; animation: tFadeUp .3s ease both; }
.bulle-tator img { width: 20px; height: 20px; display: block; flex: none; margin-top: 2px; }
.bulle-tator .bulle { display: flex; flex-direction: column; gap: 6px; background: var(--bleu-fond); border: 1px solid #E3EAFB; padding: 8px 11px; border-radius: 12px 12px 12px 4px; line-height: 1.5; color: #1F2937; white-space: pre-wrap; min-width: 0; }
.bulle-tator.erreur .bulle { background: var(--orange-pale); border-color: var(--orange-bord); color: #7C3A0A; }
.sources { display: flex; gap: 6px; flex-wrap: wrap; white-space: normal; }
.source { border: 1px solid var(--bleu-bord); background: #FFFFFF; border-radius: 6px; padding: 1px 7px; font-size: 11px; color: var(--gris-2); }
.points { display: flex; gap: 4px; align-items: center; height: 18px; }
.t-dot { display: inline-block; width: 5px; height: 5px; border-radius: 50%; background: var(--gris); animation: tDot 1.2s ease-in-out infinite; }

.ecoute { display: flex; flex-direction: column; gap: 8px; background: var(--bleu-fond); border: 1px solid var(--bleu-bord); border-radius: 12px; padding: 10px 8px 10px 12px; }
.ecoute-ligne { display: flex; align-items: center; gap: 10px; }
.rond-micro { width: 30px; height: 30px; border-radius: 50%; background: var(--bleu); display: flex; align-items: center; justify-content: center; flex: none; }
.onde { display: flex; align-items: center; gap: 3px; height: 22px; }
.onde span { display: block; width: 3px; height: 22px; border-radius: 2px; background: var(--bleu); transform: scaleY(.25); transform-origin: center; transition: transform .08s linear; }
.onde.automatique span { animation: tWave .9s ease-in-out infinite; }
.onde.automatique span:nth-child(2) { animation-delay: .15s; } .onde.automatique span:nth-child(3) { animation-delay: .3s; }
.onde.automatique span:nth-child(4) { animation-delay: .45s; } .onde.automatique span:nth-child(5) { animation-delay: .6s; }
.onde.automatique span:nth-child(6) { animation-delay: .75s; } .onde.automatique span:nth-child(7) { animation-delay: .9s; }
.ecoute-texte { color: var(--bleu-fonce); font-size: 12px; font-weight: 500; }
.bouton-stop { margin-left: auto; background: #FFFFFF; }
.transcription { min-height: 20px; color: var(--encre); line-height: 1.5; }
.t-word { display: inline-block; animation: tFadeUp .25s ease both; margin-right: 4px; }
.t-caret { display: inline-block; width: 1px; height: 14px; background: var(--encre); vertical-align: -2px; animation: tBlink 1s step-end infinite; }
.t-pulse { animation: tPulse 1.4s ease-out infinite; }

.toast { position: fixed; left: 18px; right: 18px; bottom: 18px; background: var(--encre); color: #FFFFFF; padding: 10px 14px; border-radius: 10px; box-shadow: 0 12px 32px rgba(17,24,39,.2); animation: tSlideUp .3s cubic-bezier(.2,.7,.2,1) both; z-index: 10; }

.squelette { display: inline-block; height: 12px; border-radius: 6px; background: linear-gradient(90deg, #EEF0F3 0%, #F7F8FA 50%, #EEF0F3 100%); background-size: 200% 100%; animation: tShimmer 1.2s linear infinite; vertical-align: middle; }
.bloc-squelette { height: 84px; border-radius: 12px; background: linear-gradient(90deg, #F3F4F6 0%, #FAFAFB 50%, #F3F4F6 100%); background-size: 200% 100%; animation: tShimmer 1.2s linear infinite; }

/* Animations */
@keyframes tFadeUp { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: none; } }
@keyframes tFade { from { opacity: 0; } to { opacity: 1; } }
@keyframes tGrow { from { width: 0; } }
@keyframes tPop { 0% { opacity: 0; transform: scale(.5); } 70% { transform: scale(1.08); } 100% { opacity: 1; transform: scale(1); } }
@keyframes tWave { 0%, 100% { transform: scaleY(.25); } 50% { transform: scaleY(1); } }
@keyframes tPulse { 0% { box-shadow: 0 0 0 0 rgba(42,95,224,.45); } 100% { box-shadow: 0 0 0 10px rgba(42,95,224,0); } }
@keyframes tBlink { 0%, 100% { opacity: 1; } 50% { opacity: 0; } }
@keyframes tDot { 0%, 80%, 100% { opacity: .25; transform: translateY(0); } 40% { opacity: 1; transform: translateY(-2px); } }
@keyframes tSlideUp { from { opacity: 0; transform: translateY(14px); } to { opacity: 1; transform: none; } }
@keyframes tShimmer { from { background-position: 200% 0; } to { background-position: -200% 0; } }
.t-up { animation: tFadeUp .5s cubic-bezier(.2,.7,.2,1) both; }
.t-fade { animation: tFade .3s ease both; }
.t-pop { animation: tPop .45s cubic-bezier(.2,.7,.2,1) both; }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; }
}
