/* Bulle « Contact » du site — prefixe `tlc-`, rien de partage avec le reste.
   Chargee APRES signature.css : cette feuille-la porte des regles sans portee
   (le fameux `.btn-p{width:100%}` qui avait dechire la barre sur telephone), on
   se met donc a l'abri derriere elle. */

.tlc {
  position: fixed;
  left: 18px;
  bottom: 18px;
  z-index: 80;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 12px;
  /* La zone ne capte rien : sans ca, une boite fixe de 380 px de large avalerait
     les clics sur le contenu derriere elle. */
  pointer-events: none;
}
.tlc > * { pointer-events: auto; }

/* ── Le bouton ────────────────────────────────────────────────────────────── */
.tlc-bulle {
  position: relative;
  display: inline-flex;
  align-items: center;
  gap: 9px;
  height: 48px;
  padding: 0 19px 0 16px;
  border: 0;
  border-radius: 999px;
  background: linear-gradient(140deg, #ff2d6b, #e11d74);
  color: #fff;
  font: 600 13.5px/1 var(--sans, system-ui, sans-serif);
  cursor: pointer;
  box-shadow: 0 16px 38px rgba(0, 0, 0, 0.5), inset 0 1px 0 rgba(255, 255, 255, 0.2);
  transition: transform .2s cubic-bezier(.22, 1, .36, 1), box-shadow .2s ease;
}
.tlc-bulle:hover { transform: translateY(-2px); box-shadow: 0 20px 44px rgba(0, 0, 0, 0.55); }
.tlc-bulle svg { width: 20px; height: 20px; flex: none; }
.tlc-nb {
  position: absolute;
  top: -3px; right: -3px;
  min-width: 21px; height: 21px; padding: 0 6px;
  border-radius: 999px;
  background: #ff3b3b;
  font: 700 11px/21px var(--mono, monospace);
  text-align: center;
}

/* ── Le panneau ───────────────────────────────────────────────────────────── */
.tlc-panneau {
  width: 380px;
  max-width: calc(100vw - 36px);
  max-height: min(70vh, 560px);
  display: flex;
  flex-direction: column;
  border-radius: 20px;
  background: #0d1119;
  box-shadow: 0 26px 60px rgba(0, 0, 0, .6), inset 0 1px 0 rgba(255, 255, 255, .08);
  overflow: hidden;
}
.tlc-panneau[hidden] { display: none; }

.tlc-tete {
  flex: none;
  display: flex; align-items: center; gap: 11px;
  padding: 14px 12px 14px 15px;
  background: rgba(255, 255, 255, .035);
}
.tlc-avatar {
  flex: none;
  width: 36px; height: 36px;
  border-radius: 999px;
  background: linear-gradient(140deg, #ff2d6b, #e11d74);
  color: #fff;
  display: grid; place-items: center;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, .22);
}
.tlc-avatar svg { width: 18px; height: 18px; }

.tlc-titre { flex: 1 1 auto; min-width: 0; display: flex; flex-direction: column; gap: 3px; }
.tlc-titre strong { font-size: 15px; font-weight: 650; color: var(--txt, #eef1f6); }
.tlc-etat {
  display: inline-flex; align-items: center; gap: 6px;
  font: 700 9.5px/1 var(--mono, monospace);
  letter-spacing: .09em; text-transform: uppercase;
  color: var(--dim, #8b93a3);
}
.tlc-etat i { width: 6px; height: 6px; border-radius: 999px; background: currentColor; opacity: .7; }
.tlc-etat.est-ok { color: #34d399; }
.tlc-etat.est-ok i { opacity: 1; box-shadow: 0 0 0 3px rgba(52, 211, 153, .16); }

.tlc-x {
  flex: none; width: 32px; height: 32px;
  border: 0; border-radius: 10px;
  background: transparent; color: var(--dim, #8b93a3);
  cursor: pointer; display: grid; place-items: center;
}
.tlc-x:hover { background: rgba(255, 255, 255, .08); color: var(--txt, #eef1f6); }
.tlc-x svg { width: 17px; height: 17px; }

/* ── Le fil ───────────────────────────────────────────────────────────────── */
.tlc-fil {
  flex: 1 1 auto;
  min-height: 0;                  /* sans lui l'enfant fait grandir la boite */
  overflow-y: auto;
  overscroll-behavior: contain;
  padding: 14px;
  display: flex; flex-direction: column; gap: 10px;
}

.tlc-accueil { margin: auto 0; padding: 12px 8px; text-align: center; }
.tlc-accueil-ico {
  display: inline-grid; place-items: center;
  width: 48px; height: 48px; margin-bottom: 12px;
  border-radius: 999px;
  background: rgba(255, 45, 107, .14);
  color: #ff8fb0;
}
.tlc-accueil-ico svg { width: 22px; height: 22px; }
.tlc-accueil-t { margin: 0 0 5px; font-size: 14px; font-weight: 600; color: var(--txt, #eef1f6); }
.tlc-accueil-s { margin: 0; font-size: 12.5px; line-height: 1.5; color: var(--dim, #8b93a3); }

.tlc-msg { max-width: 82%; align-self: flex-start; display: flex; flex-direction: column; gap: 3px; }
.tlc-msg.est-moi { align-self: flex-end; align-items: flex-end; }
.tlc-msg-corps {
  margin: 0; padding: 9px 13px;
  border-radius: 15px 15px 15px 5px;
  background: rgba(255, 255, 255, .07);
  font-size: 13.5px; line-height: 1.48;
  color: var(--txt, #eef1f6);
  white-space: pre-wrap;
  overflow-wrap: anywhere;
}
.tlc-msg.est-moi .tlc-msg-corps {
  border-radius: 15px 15px 5px 15px;
  background: linear-gradient(140deg, rgba(255, 45, 107, .26), rgba(225, 29, 116, .26));
}
.tlc-msg-h {
  font: 500 9.5px/1 var(--mono, monospace);
  color: var(--dim, #8b93a3); opacity: .75;
  padding: 0 4px;
}

/* ── Le pied ──────────────────────────────────────────────────────────────── */
.tlc-err {
  flex: none;
  margin: 0; padding: 9px 15px;
  font-size: 12.5px; line-height: 1.45;
  color: #fca5a5; background: rgba(239, 68, 68, .12);
}
.tlc-err[hidden] { display: none; }

.tlc-form { flex: none; padding: 12px; background: rgba(255, 255, 255, .035); }

/* Le bloc d'identite : prenom et adresse sont OBLIGATOIRES, il a donc droit a
   un titre qui dit pourquoi. Sans adresse, une conversation du site est un
   cul-de-sac : impossible de repondre une fois le visiteur parti. */
.tlc-ident { margin-bottom: 10px; }
.tlc-ident[hidden] { display: none; }
.tlc-ident-t {
  margin: 0 0 7px 2px;
  font: 700 9.5px/1 var(--mono, monospace);
  letter-spacing: .09em; text-transform: uppercase;
  color: var(--dim, #8b93a3);
}
.tlc-ident-champs { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.tlc-ligne { display: flex; gap: 9px; }

.tlc-form input {
  min-width: 0; height: 38px; padding: 0 14px;
  border: 0; border-radius: 12px;
  background: rgba(255, 255, 255, .075);
  color: var(--txt, #eef1f6);
  font-family: inherit; font-size: 13.5px;
}
.tlc-form input::placeholder { color: var(--dim, #8b93a3); }
/* ⚠ COULEUR PLEINE, PAS D'ALPHA. Compose sur le fond du panneau, le rose
   a 55 % tombait a 2,26:1 — sous les 3:1 qu'exige WCAG 2.2 pour un
   indicateur de focus. C'est le seul reperage visuel des deux champs
   obligatoires du formulaire. */
.tlc-form input:focus { outline: 2px solid #ff2d6b; outline-offset: 1px; }
.tlc-form input.est-faux { outline: 2px solid rgba(239, 68, 68, .8); }
.tlc-ligne input { flex: 1 1 auto; }

.tlc-form button[type="submit"] {
  flex: none; width: 38px; height: 38px;
  border: 0; border-radius: 12px;
  background: linear-gradient(140deg, #ff2d6b, #e11d74);
  color: #fff; cursor: pointer;
  display: grid; place-items: center;
}
.tlc-form button[type="submit"] svg { width: 16px; height: 16px; }
.tlc-form button[type="submit"]:disabled { opacity: .35; cursor: default; }

/* Le leurre : hors de l'ecran mais bien present dans le DOM et focusable par un
   robot. `display:none` le rendrait invisible aux robots aussi. */
.tlc-piege { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }

/* Telephone : la bulle se reduit a son icone, le panneau prend la largeur. */
@media (max-width: 519.98px) {
  .tlc { left: 12px; bottom: 12px; }
  .tlc-bulle { width: 48px; padding: 0; justify-content: center; }
  .tlc-bulle-txt { display: none; }
  .tlc-panneau { width: calc(100vw - 24px); }
  .tlc-ident-champs { grid-template-columns: 1fr; }
}

@media (prefers-reduced-motion: reduce) {
  .tlc-bulle { transition: none; }
  .tlc-bulle:hover { transform: none; }
}

/* ─────────────────────────────────────────────────────────────────────────────
   IMAGES JOINTES                                                   (22/09/2026)
   Meme dessin que la bulle de l'app, AUCUN code partage : prefixes `tlc-` ici,
   `sup-` la-bas, volontairement etanches.
   ────────────────────────────────────────────────────────────────────────── */

/* Le voile de depot se place dans le panneau : il lui faut un reperage. */
.tlc-panneau { position: relative; }

/* Le trombone. La regle generique du formulaire ne vise que [type=submit] :
   celui-ci a donc besoin de son propre habillage. */
#tlc-joindre {
  flex: none;
  width: 38px; height: 38px;
  border: 0; border-radius: 12px;
  background: rgba(255, 255, 255, .075);
  color: var(--dim, #8b93a3);
  cursor: pointer;
  display: grid; place-items: center;
}
#tlc-joindre:hover:not(:disabled) { background: rgba(255, 255, 255, .12); color: var(--txt, #eef1f6); }
#tlc-joindre:disabled { opacity: .4; cursor: not-allowed; }
#tlc-joindre svg { width: 17px; height: 17px; }

/* ── Une image dans le fil ────────────────────────────────────────────────── */
.tlc-img {
  display: block;
  max-width: 220px;
  padding: 0; border: 0;
  border-radius: 15px 15px 15px 5px;
  background: rgba(255, 255, 255, .07);
  cursor: zoom-in;
  overflow: hidden;
  line-height: 0;
}
.tlc-msg.est-moi .tlc-img { border-radius: 15px 15px 5px 15px; }
.tlc-img img { display: block; width: 100%; height: auto; max-height: 250px; object-fit: cover; }
.tlc-img-legende {
  display: block;
  padding: 7px 11px 8px;
  font-size: 13px; line-height: 1.45;
  color: var(--txt, #eef1f6);
  text-align: left;
  overflow-wrap: anywhere;
}
.tlc-msg.est-moi .tlc-img-legende {
  background: linear-gradient(140deg, rgba(255, 45, 107, .26), rgba(225, 29, 116, .26));
}

/* ── L'image en attente d'envoi ───────────────────────────────────────────── */
.tlc-attente {
  display: flex; align-items: center; gap: 10px;
  margin-bottom: 10px;
  padding: 8px 10px;
  border-radius: 12px;
  background: rgba(255, 255, 255, .05);
}
.tlc-attente[hidden] { display: none; }
.tlc-attente img { width: 40px; height: 40px; border-radius: 10px; object-fit: cover; }
.tlc-attente span {
  flex: 1 1 auto;
  font: 600 10px/1 var(--mono, monospace);
  letter-spacing: .06em;
  color: var(--dim, #8b93a3);
}
.tlc-attente button {
  flex: none;
  width: 28px; height: 28px;
  border: 0; border-radius: 9px;
  background: rgba(255, 255, 255, .08);
  color: var(--dim, #8b93a3);
  cursor: pointer;
  display: grid; place-items: center;
}
.tlc-attente button:hover { background: rgba(239, 68, 68, .2); color: #fecaca; }
.tlc-attente button svg { width: 14px; height: 14px; }

/* ── Le voile de depot ────────────────────────────────────────────────────── */
.tlc-depose {
  position: absolute;
  inset: 0;
  z-index: 3;
  background: rgba(13, 17, 25, .88);
  display: grid; place-items: center;
  pointer-events: none;            /* il ne doit pas voler le depot lui-meme */
}
.tlc-depose[hidden] { display: none; }
.tlc-depose span {
  padding: 14px 20px;
  border-radius: 14px;
  background: rgba(255, 45, 107, .16);
  font-size: 13.5px; font-weight: 600;
  color: #ffb3c9;
}

/* ── La visionneuse ───────────────────────────────────────────────────────── */
.tlc-zoom {
  position: fixed;
  inset: 0;
  z-index: 1000;
  background: rgba(6, 9, 14, .92);
  display: grid; place-items: center;
  padding: 40px;
  cursor: zoom-out;
}
.tlc-zoom[hidden] { display: none; }
.tlc-zoom img {
  max-width: 100%; max-height: 100%;
  border-radius: 12px;
  box-shadow: 0 30px 70px rgba(0, 0, 0, .6);
}
#tlc-zoom-x {
  position: absolute;
  top: 16px; right: 16px;
  width: 38px; height: 38px;
  border: 0; border-radius: 12px;
  background: rgba(255, 255, 255, .1);
  color: #eef1f6;
  cursor: pointer;
  display: grid; place-items: center;
}
#tlc-zoom-x:hover { background: rgba(255, 255, 255, .18); }
#tlc-zoom-x svg { width: 18px; height: 18px; }

/* Sur telephone la bulle prend toute la largeur : la vignette suit. */
@media (max-width: 480px) {
  .tlc-img { max-width: 180px; }
}
