@font-face {
  font-family: "Nunito";
  src: url("/static/fonts/nunito.woff2") format("woff2");
  font-weight: 200 1000;
  font-style: normal;
  font-display: swap;
}

:root {
  --violet: #4B006E;
  --jaune: #FFD000;
  --rose: #FF2E7E;
  --creme: #FFF7EE;
  --lilas: #D6B8FF;
  --peche: #FFB49C;
  --menthe: #B8F0E0;
  --gris: #E6E6E6;
  --blanc: #FFFFFF;
  --texte-doux: #7A5A8C;
  --ombre: 0 2px 10px rgba(75, 0, 110, 0.08);
}

* { box-sizing: border-box; }

html { -webkit-text-size-adjust: 100%; }

body {
  margin: 0;
  background: var(--creme);
  color: var(--violet);
  font-family: "Nunito", system-ui, -apple-system, "Segoe UI", sans-serif;
  font-size: 17px;
  line-height: 1.45;
  -webkit-font-smoothing: antialiased;
}

button, input { font: inherit; color: inherit; }
button { cursor: pointer; -webkit-tap-highlight-color: transparent; }
[hidden] { display: none !important; }

.colonne { max-width: 520px; margin: 0 auto; padding: 0 16px; }

/* ---------- logo ---------- */

.logo { display: inline-flex; align-items: center; gap: 8px; text-decoration: none; }
.logo img { width: 58px; height: auto; display: block; }
.logo-texte { display: flex; flex-direction: column; line-height: 1; }
.logo-nom { font-weight: 900; font-size: 34px; letter-spacing: -0.03em; color: var(--violet); }
.logo-nom i { font-style: normal; color: var(--jaune); }
.logo-devise { font-weight: 700; font-size: 13px; margin-top: 3px; color: var(--violet); }

.logo.grand { flex-direction: column; gap: 0; }
.logo.grand img { width: 150px; }
.logo.grand .logo-texte { align-items: center; }
.logo.grand .logo-nom { font-size: 64px; margin-top: -14px; }
.logo.grand .logo-devise { font-size: 19px; margin-top: 6px; }

/* ---------- en-tete ---------- */

.entete { background: var(--violet); padding: 14px 0 34px; position: relative; }
.entete .colonne { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.entete .logo-nom, .entete .logo-devise { color: var(--creme); }
.entete::after {
  content: "";
  position: absolute; left: 0; right: 0; bottom: -1px; height: 26px;
  background: var(--creme);
  clip-path: path("M0 26 L0 14 C 160 -8, 300 30, 520 10 S 900 -6, 1200 16 S 1900 0, 2600 14 L2600 26 Z");
}
.bouton-rond {
  width: 46px; height: 46px; border-radius: 50%; border: 0;
  display: inline-grid; place-items: center; flex: none;
  background: rgba(255, 247, 238, 0.14); color: var(--creme); text-decoration: none;
}
.bouton-rond svg { width: 24px; height: 24px; }

/* ---------- textes ---------- */

h1 { font-size: 26px; font-weight: 900; margin: 18px 0 4px; letter-spacing: -0.01em; }
h2 { font-size: 20px; font-weight: 900; margin: 30px 0 10px; }
p { margin: 0 0 10px; }
.discret { color: var(--texte-doux); font-size: 15px; }

.etat-boite { display: inline-flex; align-items: center; gap: 8px; font-size: 15px; font-weight: 700; color: var(--texte-doux); }
.etat-boite::before { content: ""; width: 10px; height: 10px; border-radius: 50%; background: var(--gris); }
.etat-boite.en-ligne::before { background: #2EBD85; }

/* ---------- boutons ---------- */

.bouton {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  min-height: 46px; padding: 0 18px; border-radius: 999px; border: 0;
  font-weight: 800; background: var(--jaune); color: var(--violet); text-decoration: none;
}
.bouton.secondaire { background: var(--blanc); box-shadow: inset 0 0 0 2px rgba(75, 0, 110, 0.14); }
.bouton.rose { background: var(--rose); color: var(--blanc); }
.bouton.petit { min-height: 38px; padding: 0 14px; font-size: 15px; }
.bouton:disabled { opacity: 0.5; cursor: default; }
.bouton svg { width: 20px; height: 20px; }

/* ---------- fil des messages ---------- */

.fil { list-style: none; margin: 14px 0 0; padding: 0; display: grid; gap: 10px; }
.message {
  background: var(--blanc); border-radius: 22px; padding: 12px 12px 12px 14px;
  box-shadow: var(--ombre); display: grid; grid-template-columns: 48px 1fr 52px; gap: 12px; align-items: center;
}
.message.de-boite { background: #FFF3BF; }
.avatar {
  width: 48px; height: 48px; border-radius: 50%; display: grid; place-items: center;
  font-weight: 900; font-size: 20px; color: var(--violet); background: var(--lilas);
}
.avatar img { width: 40px; }
.message.de-boite .avatar { background: var(--blanc); }
.message-corps { min-width: 0; }
.message-auteur { font-weight: 900; font-size: 18px; line-height: 1.2; }
.message-quand { font-size: 14px; color: var(--texte-doux); }
.message-suivi { font-size: 13px; font-weight: 700; color: var(--texte-doux); margin-top: 2px; }
.message-suivi.ecoute { color: #1D8A60; }
.barre { height: 6px; border-radius: 3px; background: rgba(75, 0, 110, 0.1); margin-top: 8px; overflow: hidden; }
.barre span { display: block; height: 100%; width: 0; background: var(--rose); border-radius: 3px; }
.lire {
  width: 52px; height: 52px; border-radius: 50%; border: 0; background: var(--jaune); color: var(--violet);
  display: grid; place-items: center;
}
.lire svg { width: 26px; height: 26px; }
.lire.charge { opacity: 0.6; }
.supprimer-vocal { grid-column: 2 / 4; justify-self: start; background: none; border: 0; padding: 0; font-size: 13px; font-weight: 700; color: var(--texte-doux); text-decoration: underline; }

.vide { text-align: center; padding: 34px 10px; color: var(--texte-doux); }

/* ---------- zone pour parler ---------- */

.espace-bas { height: 190px; }
.parler {
  position: fixed; left: 0; right: 0; bottom: 0; z-index: 5;
  padding: 26px 16px calc(14px + env(safe-area-inset-bottom));
  background: linear-gradient(to top, var(--creme) 62%, rgba(255, 247, 238, 0));
  display: flex; flex-direction: column; align-items: center; gap: 6px; pointer-events: none;
}
.parler > * { pointer-events: auto; }
.micro {
  width: 92px; height: 92px; border-radius: 50%; border: 0; background: var(--rose); color: var(--blanc);
  display: grid; place-items: center;
  box-shadow: 0 0 0 10px rgba(255, 46, 126, 0.14), 0 8px 20px rgba(255, 46, 126, 0.35);
}
.micro svg { width: 42px; height: 42px; }
.micro.actif { animation: battement 1.2s ease-in-out infinite; }
@keyframes battement {
  0%, 100% { box-shadow: 0 0 0 10px rgba(255, 46, 126, 0.14), 0 8px 20px rgba(255, 46, 126, 0.35); }
  50% { box-shadow: 0 0 0 22px rgba(255, 46, 126, 0.10), 0 8px 20px rgba(255, 46, 126, 0.35); }
}
.parler-texte { font-weight: 800; font-size: 16px; min-height: 24px; text-align: center; }

/* ---------- fenetre d'apercu ---------- */

dialog {
  border: 0; border-radius: 26px; padding: 22px; width: min(92vw, 420px);
  background: var(--creme); color: var(--violet); box-shadow: 0 20px 60px rgba(75, 0, 110, 0.35);
}
dialog::backdrop { background: rgba(75, 0, 110, 0.45); }
dialog h2 { margin: 0 0 6px; }
.actions { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 16px; }
.actions .bouton { flex: 1 1 auto; }

.annonce {
  position: fixed; left: 50%; bottom: 200px; transform: translateX(-50%); z-index: 20;
  background: var(--violet); color: var(--creme); font-weight: 700; font-size: 15px;
  padding: 12px 18px; border-radius: 18px; width: max-content; max-width: calc(100vw - 32px); text-align: center;
  box-shadow: 0 8px 24px rgba(75, 0, 110, 0.3);
}

/* ---------- page pleine (accueil, lien invalide) ---------- */

.plein { min-height: 100vh; min-height: 100dvh; display: grid; place-items: center; text-align: center; padding: 24px; }
.plein p { max-width: 340px; margin: 22px auto 0; }

/* ---------- admin ---------- */

.carte { background: var(--blanc); border-radius: 22px; padding: 16px; box-shadow: var(--ombre); }
.membres { list-style: none; margin: 0; padding: 0; display: grid; gap: 10px; }
.membre-tete { display: flex; align-items: center; gap: 12px; }
.membre-tete .avatar { flex: none; }
.membre-nom { font-weight: 900; font-size: 19px; line-height: 1.2; }
.membre.inactif { opacity: 0.6; }
.etiquette {
  display: inline-block; font-size: 12px; font-weight: 800; padding: 2px 9px; border-radius: 999px;
  background: var(--lilas); vertical-align: middle; margin-left: 6px;
}
.etiquette.grise { background: var(--gris); }
.membre .actions { margin-top: 12px; gap: 8px; }
.membre .actions .bouton { flex: 0 1 auto; }
.lien-texte { background: none; border: 0; padding: 6px 4px; font-weight: 700; font-size: 15px; text-decoration: underline; color: var(--violet); }
.lien-texte.danger { color: #C4124F; }

.formulaire { display: flex; gap: 10px; flex-wrap: wrap; align-items: center; }
.formulaire input[type="text"] {
  flex: 1 1 180px; min-height: 46px; border-radius: 999px; border: 2px solid rgba(75, 0, 110, 0.18);
  padding: 0 18px; background: var(--blanc);
}
.formulaire input[type="text"]:focus { outline: 0; border-color: var(--violet); }
.case { display: inline-flex; align-items: center; gap: 8px; font-size: 15px; font-weight: 700; }
.case input { width: 20px; height: 20px; accent-color: var(--violet); }

.fiche { display: grid; grid-template-columns: auto 1fr; gap: 6px 16px; margin: 0 0 14px; }
.fiche dt { color: var(--texte-doux); font-size: 15px; }
.fiche dd { margin: 0; font-weight: 800; }
pre.journal {
  background: #2B0040; color: #F3E6FF; border-radius: 14px; padding: 12px; font-size: 13px;
  overflow: auto; max-height: 260px; white-space: pre-wrap; word-break: break-word; margin: 12px 0 0;
}
.retour { display: inline-block; margin: 16px 0 0; font-weight: 800; color: var(--violet); }
.pied { height: 60px; }

/* ---------- boite virtuelle ---------- */

.scene { padding: 26px 0 10px; display: grid; place-items: center; }
.boite {
  width: min(100%, 460px); aspect-ratio: 263 / 182; background: #FBEBDD; border-radius: 34px;
  box-shadow: 0 22px 0 var(--violet), 0 40px 40px rgba(75, 0, 110, 0.25);
  position: relative; margin-bottom: 40px; user-select: none; -webkit-user-select: none; touch-action: manipulation;
}
.boite::before, .boite::after { content: ""; position: absolute; width: 10px; height: 10px; border-radius: 50%; background: #C9B8A8; top: 14px; }
.boite::before { left: 14px; }
.boite::after { right: 14px; }
.grille {
  position: absolute; left: 6%; top: 16%; width: 40%; aspect-ratio: 1; border-radius: 50%;
  background-image: radial-gradient(circle, #3A2A33 28%, transparent 30%);
  background-size: 11% 11%; background-position: center;
}
.boite-logo { position: absolute; right: 9%; top: 11%; }
.boite-logo img { width: 44px; }
.boite-logo .logo-nom { font-size: 30px; }
.boite-logo .logo-devise { font-size: 11px; }
.touche {
  position: absolute; width: 21%; aspect-ratio: 1; border: 0; border-radius: 22%; bottom: 14%;
  display: grid; place-items: center; color: var(--violet); transition: transform 0.05s, box-shadow 0.05s;
  touch-action: none;
}
.touche svg { width: 46%; height: 46%; pointer-events: none; }
.touche.jaune { left: 52%; background: var(--jaune); box-shadow: 0 7px 0 #C9A400; }
.touche.rouge { left: 76%; background: var(--rose); box-shadow: 0 7px 0 #B81D58; }
.touche.enfoncee { transform: translateY(5px); }
.touche.jaune.enfoncee { box-shadow: 0 2px 0 #C9A400; }
.touche.rouge.enfoncee { box-shadow: 0 2px 0 #B81D58; }
.led { position: absolute; width: 3.6%; aspect-ratio: 1; border-radius: 50%; bottom: 52%; background: #D9CBBB; }
.led.j1 { left: 58%; }
.led.j2 { left: 63.5%; }
.led.r { left: 84.7%; }
.led.j1.allumee, .led.j2.allumee { background: var(--jaune); box-shadow: 0 0 12px 4px rgba(255, 208, 0, 0.8); }
.led.r.allumee { background: #FF2A2A; box-shadow: 0 0 12px 4px rgba(255, 42, 42, 0.75); }
.voile {
  position: absolute; inset: 0; border-radius: 34px; background: rgba(43, 0, 64, 0.82); color: var(--creme);
  display: grid; place-items: center; font-weight: 800; text-align: center; padding: 20px;
}
.etat-simulateur { text-align: center; font-weight: 800; min-height: 26px; }

/* ================= page famille (onglets) ================= */

h2[id] { scroll-margin-top: 16px; }
.appli .vue { padding-bottom: calc(96px + env(safe-area-inset-bottom)); position: relative; }
.entete.centre .colonne { justify-content: center; }
.avatar.jaune { background: var(--jaune); }
.avatar svg { width: 60%; height: 60%; }
.avatar.geant { width: 84px; height: 84px; font-size: 36px; margin: 0 auto; }
.avatar.geant img { width: 66px; }

.titre-fil { display: flex; align-items: center; gap: 14px; margin: 14px 0 8px; }
.titre-fil .avatar { width: 62px; height: 62px; flex: none; }
.titre-fil h1 { margin: 0; font-size: 30px; line-height: 1.1; }
.titre-fil p { margin: 0; }

.jour { text-align: center; margin: 18px 0 10px; }
.jour span { display: inline-block; background: #EADCFB; font-weight: 800; font-size: 14px; padding: 4px 16px; border-radius: 999px; }
.fil { margin: 0; }

.ligne {
  width: 100%; border: 0; text-align: left; position: relative;
  background: var(--blanc); border-radius: 999px; padding: 8px 18px 8px 8px; box-shadow: var(--ombre);
  display: grid; grid-template-columns: 48px 1fr auto; gap: 12px; align-items: center;
}
.ligne.de-boite { background: #FFF3BF; }
.ligne-lire { width: 48px; height: 48px; border-radius: 50%; background: #FFD3E3; color: var(--violet); display: grid; place-items: center; }
.ligne.de-boite .ligne-lire { background: var(--jaune); }
.ligne-lire svg { width: 24px; height: 24px; }
.ligne-corps { min-width: 0; display: grid; gap: 1px; }
.ligne-auteur { font-weight: 900; font-size: 16px; line-height: 1.2; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.ligne-auteur small { font-weight: 700; font-size: 13px; color: var(--texte-doux); }
.ligne-auteur .ecoute { color: #1D8A60; font-weight: 800; }
.ligne-son { display: flex; align-items: center; gap: 10px; }
.ligne-duree { font-weight: 800; font-size: 15px; }
.ligne-heure { font-size: 14px; color: var(--texte-doux); font-weight: 700; }
.pastille { position: absolute; top: 2px; right: 10px; width: 13px; height: 13px; border-radius: 50%; background: var(--rose); border: 2px solid var(--creme); }

.onde { display: inline-flex; align-items: center; gap: 2px; height: 22px; }
.onde i { width: 3px; border-radius: 2px; background: var(--violet); }
.onde i:nth-child(3n) { background: var(--rose); }
.onde.grande { display: flex; justify-content: center; gap: 3px; height: 74px; background: #FFE3EC; border-radius: 26px; padding: 14px 16px; margin: 22px 0; }
.onde.grande i { width: 4px; background: #E7A9C2; }
.onde.grande i.lue { background: var(--violet); }
.onde.grande i.lue:nth-child(3n) { background: var(--rose); }

/* ---------- barre d'onglets ---------- */

.onglets {
  position: fixed; left: 50%; transform: translateX(-50%); bottom: calc(12px + env(safe-area-inset-bottom)); z-index: 10;
  width: min(calc(100vw - 32px), 420px); background: var(--blanc); border-radius: 26px;
  box-shadow: 0 6px 24px rgba(75, 0, 110, 0.18); display: flex; justify-content: space-around; padding: 8px;
}
.onglets { align-items: center; }
.onglet { width: 64px; height: 54px; border: 0; border-radius: 18px; background: none; color: var(--violet); display: grid; place-items: center; }
.onglet svg { width: 28px; height: 28px; }
.onglet.actif { background: var(--jaune); }
.onglets .micro {
  width: 84px; height: 84px; margin: -34px 0 -6px; flex: none; border: 5px solid var(--creme);
  touch-action: none; user-select: none; -webkit-user-select: none; -webkit-touch-callout: none;
  background: radial-gradient(circle at 50% 35%, #FF5C9A, var(--rose) 70%);
  box-shadow: 0 8px 20px rgba(255, 46, 126, 0.4);
}
.onglets .micro svg { width: 38px; height: 38px; pointer-events: none; }
.onglets .micro.actif { transform: scale(1.12); animation: battement-micro 1.1s ease-in-out infinite; }
.onglets .micro:disabled { opacity: 0.6; }
@keyframes battement-micro {
  0%, 100% { box-shadow: 0 0 0 0 rgba(255, 46, 126, 0.45), 0 8px 20px rgba(255, 46, 126, 0.4); }
  50% { box-shadow: 0 0 0 20px rgba(255, 46, 126, 0), 0 8px 20px rgba(255, 46, 126, 0.4); }
}
.appli .vue { padding-bottom: calc(130px + env(safe-area-inset-bottom)); }

.bandeau {
  position: fixed; left: 50%; transform: translateX(-50%); z-index: 11;
  bottom: calc(118px + env(safe-area-inset-bottom)); width: max-content; max-width: min(calc(100vw - 32px), 420px);
  background: var(--violet); color: var(--creme); font-weight: 800; font-size: 15px; text-align: center;
  padding: 10px 16px; border-radius: 18px; box-shadow: 0 8px 24px rgba(75, 0, 110, 0.3);
  display: flex; align-items: center; gap: 12px;
}

/* ---------- bulles de la conversation ---------- */

#sous-titre.a-ecouter { color: var(--rose); font-weight: 800; }
.fil { gap: 8px; }
.point-nouveau { width: 10px; height: 10px; border-radius: 50%; background: var(--rose); flex: none; }
.coche { font-size: 13px; font-weight: 900; color: #B9A6C6; flex: none; letter-spacing: -0.12em; padding-right: 2px; }
.coche.ecoute { color: #1D8A60; }
.bulle { display: grid; grid-template-columns: 38px minmax(0, 1fr); gap: 8px; align-items: end; margin-right: 30px; }
.bulle .avatar { width: 38px; height: 38px; font-size: 17px; border: 3px solid var(--blanc); box-shadow: var(--ombre); }
.bulle .avatar img { width: 26px; }
.bulle-corps {
  background: var(--blanc); border-radius: 20px 20px 20px 6px; padding: 7px 12px 8px; box-shadow: var(--ombre);
  border-left: 6px solid var(--teinte, var(--lilas)); min-width: 0;
}
.bulle.de-boite .bulle-corps { background: #FFF3BF; }
.bulle.de-moi { grid-template-columns: minmax(0, 1fr) 38px; margin-right: 0; margin-left: 30px; }
.bulle.de-moi .avatar { order: 2; }
.bulle.de-moi .bulle-corps { background: #F1E6FF; border-left: 0; border-right: 6px solid var(--teinte, var(--lilas)); border-radius: 20px 20px 6px 20px; }

.bulle-tete { display: flex; align-items: center; gap: 8px; line-height: 1.2; }
.bulle-tete b { font-weight: 900; font-size: 16px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.bulle-heure { margin-left: auto; font-size: 13px; font-weight: 700; color: var(--texte-doux); flex: none; }
.etiquette-nouveau { background: var(--rose); color: var(--blanc); font-size: 11px; font-weight: 900; padding: 2px 8px; border-radius: 999px; text-transform: uppercase; letter-spacing: 0.03em; flex: none; }
.bulle-son { display: flex; align-items: center; gap: 10px; margin-top: 4px; }
.bulle .lire { width: 40px; height: 40px; flex: none; background: #EFE3F7; color: var(--violet); }
.bulle .lire svg { width: 20px; height: 20px; }
.bulle .onde { flex: 1 1 auto; height: 26px; justify-content: space-between; cursor: pointer; min-width: 0; }
.bulle .onde i { background: #CDB9DA; }
.bulle .onde i:nth-child(3n) { background: #CDB9DA; }
.bulle .onde i.lue, .bulle .onde i.lue:nth-child(3n) { background: var(--rose); }
.bulle-duree { font-weight: 800; font-size: 14px; flex: none; font-variant-numeric: tabular-nums; }
.bulle-suivi { display: block; font-size: 13px; font-weight: 700; color: var(--texte-doux); margin-top: 6px; }
.bulle-suivi.ecoute { color: #1D8A60; }
.bulle-suivi.ecoute::before { content: "✓ "; }
.bulle .supprimer-vocal { display: block; margin-top: 6px; }

/* ---------- haut de page : bulles a la hauteur du nom, etat de la boite a droite ---------- */

.entete .logo { gap: 10px; }
.entete .logo img { height: 56px; width: auto; }
.pastille-boite {
  display: inline-flex; align-items: center; gap: 8px; flex: none; white-space: nowrap;
  background: var(--blanc); color: var(--violet); font-weight: 800; font-size: 14px;
  padding: 8px 14px; border-radius: 999px; box-shadow: 0 2px 8px rgba(0, 0, 0, 0.18);
}
.pastille-boite::before { content: ""; width: 10px; height: 10px; border-radius: 50%; background: #C9C2CE; }
.pastille-boite.en-ligne::before { background: #2EBD85; }
.pastille-boite:empty { display: none; }


/* ---------- reponses de la boite : bien voyantes ---------- */

.bulle.de-boite { grid-template-columns: 46px minmax(0, 1fr); margin-right: 14px; }
.bulle.de-boite .avatar { width: 46px; height: 46px; background: var(--violet); border-color: var(--rose); }
.bulle.de-boite .avatar img { width: 34px; }
.bulle.de-boite .bulle-corps {
  background: var(--jaune); border-left: 0; padding: 10px 14px 12px;
  box-shadow: 0 5px 0 #E0A800, 0 10px 22px rgba(255, 190, 0, 0.45);
}
.bulle.de-boite .bulle-tete b { font-size: 19px; }
.bulle.de-boite .bulle-heure, .bulle.de-boite .corbeille { color: var(--violet); opacity: 0.75; }
.bulle.de-boite .lire { width: 48px; height: 48px; background: var(--violet); color: var(--jaune); }
.bulle.de-boite .lire svg { width: 24px; height: 24px; }
.bulle.de-boite .onde { height: 32px; }
.bulle.de-boite .onde i, .bulle.de-boite .onde i:nth-child(3n) { background: rgba(75, 0, 110, 0.38); }
.bulle.de-boite.nouveau .bulle-corps { box-shadow: 0 0 0 3px var(--rose), 0 5px 0 3px #E0A800, 0 10px 22px rgba(255, 46, 126, 0.35); }
.bulle.de-boite.nouveau .lire { background: var(--rose); color: var(--blanc); }
.bulle.de-boite.nouveau .onde i { background: var(--violet); }
.bulle.de-boite.nouveau .onde i:nth-child(3n) { background: var(--rose); }
.bulle.de-boite .point-nouveau { box-shadow: 0 0 0 3px var(--blanc); }
.bulle.de-boite.active .lire { background: var(--violet); color: var(--jaune); }
.bulle.de-boite.active .onde i { background: rgba(75, 0, 110, 0.3); }
.bulle.de-boite.active .onde i.lue, .bulle.de-boite.entame .onde i.lue { background: var(--rose); }

/* ---------- reglages des notifications ---------- */

.notifs { display: grid; gap: 14px; }
.rangee { display: flex; align-items: center; gap: 14px; justify-content: space-between; }
.rangee p { margin: 2px 0 0; font-size: 14px; }
.interrupteur {
  flex: none; width: 58px; height: 34px; border-radius: 999px; border: 0; background: #D9CBE2; position: relative;
  transition: background 0.15s;
}
.interrupteur::after {
  content: ""; position: absolute; top: 4px; left: 4px; width: 26px; height: 26px; border-radius: 50%;
  background: var(--blanc); box-shadow: 0 1px 4px rgba(75, 0, 110, 0.3); transition: transform 0.15s;
}
.interrupteur.actif { background: var(--rose); }
.interrupteur.actif::after { transform: translateX(24px); }
.interrupteur:disabled { opacity: 0.45; }
.notifs .formulaire input { flex: 1 1 180px; min-height: 46px; border-radius: 999px; border: 2px solid rgba(75, 0, 110, 0.18); padding: 0 18px; background: var(--blanc); }
.notifs .formulaire input:focus { outline: 0; border-color: var(--violet); }
.notifs > .bouton { justify-self: start; }

/* ---------- filtres ---------- */

.filtres { display: flex; gap: 8px; overflow-x: auto; margin: 14px -16px 0; padding: 4px 16px 6px; scrollbar-width: none; }
.filtres::-webkit-scrollbar { display: none; }
.filtre {
  flex: none; min-height: 40px; padding: 0 16px; border-radius: 999px; border: 0; font-weight: 800; font-size: 15px;
  background: var(--blanc); color: var(--violet); box-shadow: inset 0 0 0 2px rgba(75, 0, 110, 0.14);
}
.filtre.actif { background: var(--violet); color: var(--creme); box-shadow: none; }

/* ---------- corbeille, vitesse, reprise ---------- */

.corbeille { width: 34px; height: 34px; margin: -6px -8px -6px -2px; border: 0; border-radius: 50%; background: none; color: var(--texte-doux); display: grid; place-items: center; flex: none; }
.corbeille svg { width: 19px; height: 19px; }
.corbeille:active { background: rgba(196, 18, 79, 0.12); color: #C4124F; }
.vitesse {
  display: none; flex: none; min-width: 46px; height: 30px; padding: 0 8px; border-radius: 999px; border: 0;
  background: var(--violet); color: var(--creme); font-weight: 900; font-size: 14px;
}
.bulle.active .vitesse { display: block; }
.bulle.entame .onde i.lue, .bulle.entame .onde i.lue:nth-child(3n) { background: #F29BBD; }
.bulle { transition: opacity 0.2s ease, transform 0.2s ease; }
.bulle.part { opacity: 0; transform: scale(0.92) translateX(24px); }
.bandeau .bouton { min-height: 34px; padding: 0 14px; font-size: 14px; flex: none; }

/* Message pas encore ecoute : couleurs franches. */
.bulle.nouveau .bulle-corps { box-shadow: 0 0 0 2px var(--rose), var(--ombre); }
.bulle.nouveau .lire { background: var(--rose); color: var(--blanc); }
.bulle.nouveau .onde i { background: var(--violet); }
.bulle.nouveau .onde i:nth-child(3n) { background: var(--rose); }
/* Message en cours de lecture. */
.bulle.active .lire { background: var(--jaune); color: var(--violet); }
.bulle.active .onde i { background: #CDB9DA; }
.bulle.active .onde i.lue { background: var(--rose); }

/* ---------- vagues decoratives ---------- */

.vagues { position: absolute; left: 0; right: 0; bottom: 0; height: 190px; overflow: hidden; pointer-events: none; z-index: 0; }
.vagues::before, .vagues::after { content: ""; position: absolute; border-radius: 50%; }
.vagues::before { width: 150%; height: 300px; left: -70%; bottom: -190px; background: var(--violet); z-index: 2; }
.vagues::after { width: 150%; height: 300px; right: -75%; bottom: -170px; background: var(--jaune); box-shadow: -120px 30px 0 0 var(--rose); }
.vue-parler main, .lecteur .colonne { position: relative; z-index: 1; }

/* ---------- onglet micro ---------- */

.vue-parler main { text-align: center; padding-top: 12vh; display: flex; flex-direction: column; align-items: center; }
.vue-parler h1 { font-size: 32px; line-height: 1.15; margin: 0 0 40px; }
.vue-parler .micro {
  width: 170px; height: 170px; touch-action: none; user-select: none; -webkit-user-select: none; -webkit-touch-callout: none;
  background: radial-gradient(circle at 50% 35%, #FF5C9A, var(--rose) 70%);
  box-shadow: 0 0 0 16px rgba(255, 46, 126, 0.16), 0 0 0 34px rgba(255, 46, 126, 0.08), 0 10px 26px rgba(255, 46, 126, 0.4);
}
.vue-parler .micro svg { width: 74px; height: 74px; pointer-events: none; }
.vue-parler .micro.actif { animation: battement-grand 1.1s ease-in-out infinite; transform: scale(1.04); }
.vue-parler .micro:disabled { opacity: 0.6; }
@keyframes battement-grand {
  0%, 100% { box-shadow: 0 0 0 16px rgba(255, 46, 126, 0.16), 0 0 0 34px rgba(255, 46, 126, 0.08), 0 10px 26px rgba(255, 46, 126, 0.4); }
  50% { box-shadow: 0 0 0 26px rgba(255, 46, 126, 0.16), 0 0 0 52px rgba(255, 46, 126, 0.08), 0 10px 26px rgba(255, 46, 126, 0.4); }
}
.vue-parler .parler-texte { font-size: 20px; font-weight: 700; margin: 52px 0 16px; min-height: 58px; line-height: 1.3; }

/* ---------- Mon Papote ---------- */

.grand-titre { font-size: 32px; margin: 14px 0 16px; }
.vitrine { text-align: center; padding: 26px 16px 16px; }
.boite.mini { width: 210px; margin: 0 auto 30px; border-radius: 18px; box-shadow: 0 11px 0 var(--violet); pointer-events: none; }
.boite.mini::before, .boite.mini::after { display: none; }
.boite.mini .touche.jaune { box-shadow: 0 3px 0 #C9A400; }
.boite.mini .touche.rouge { box-shadow: 0 3px 0 #B81D58; }
.menu { display: grid; gap: 10px; margin-top: 16px; }
.menu a {
  display: grid; grid-template-columns: 32px 1fr 22px; gap: 12px; align-items: center; min-height: 58px; padding: 0 16px;
  background: var(--blanc); border-radius: 18px; box-shadow: var(--ombre); color: var(--violet); text-decoration: none; font-weight: 800;
}
.menu-icone svg { width: 28px; height: 28px; display: block; }
.menu-fleche svg { width: 22px; height: 22px; display: block; }

/* ---------- lecteur ---------- */

.lecteur { position: fixed; inset: 0; z-index: 30; background: var(--creme); overflow: auto; text-align: center; }
.lecteur .colonne { padding-top: 14px; padding-bottom: 200px; }
.bouton-nu { background: none; border: 0; width: 52px; height: 52px; display: grid; place-items: center; color: var(--violet); border-radius: 50%; }
.bouton-nu svg { width: 30px; height: 30px; }
#lecteur-fermer { margin-left: -10px; }
.lecteur h1 { font-size: 30px; margin: 10px 0 0; }
.lecteur p { margin: 2px 0 0; }
.commandes { display: flex; align-items: center; justify-content: center; gap: 26px; }
.commandes .bouton-nu svg { width: 44px; height: 44px; }
.lire.geant { width: 84px; height: 84px; }
.lire.geant svg { width: 42px; height: 42px; }
.curseur { width: 100%; margin: 26px 0 4px; accent-color: var(--violet); height: 24px; }
.temps { display: flex; justify-content: space-between; font-size: 14px; color: var(--texte-doux); font-weight: 700; }
#lecteur-supprimer { margin-top: 18px; }
.annonce { bottom: calc(122px + env(safe-area-inset-bottom)); z-index: 40; }

/* ================= page d'accueil : entrer avec le code famille ================= */

.entree { min-height: 100dvh; padding-top: 34px; padding-bottom: 40px; text-align: center; display: flex; flex-direction: column; align-items: stretch; }
.entree > .logo { align-self: center; margin-bottom: 22px; }
.entree h2 { margin: 0 0 6px; }
.entree section h2 { margin: 6px 0 10px; }
.etape { display: grid; gap: 12px; text-align: center; margin-top: 16px; }
form.etape[hidden], section[hidden] { display: none; }
.etape p { margin: 0; }
.champ {
  width: 100%; min-height: 54px; border-radius: 18px; border: 2px solid rgba(75, 0, 110, 0.18);
  padding: 0 18px; background: var(--blanc); font-size: 18px; text-align: center;
}
.champ:focus { outline: 0; border-color: var(--violet); }
.champ-code { font-weight: 900; font-size: 26px; letter-spacing: 0.12em; text-transform: uppercase; }
.champ-code::placeholder { font-weight: 700; color: #CDB9DA; }
.bouton.large { width: 100%; min-height: 54px; font-size: 18px; }
.entree .menu { text-align: left; margin-top: 0; }
.menu a small { font-weight: 700; color: var(--texte-doux); }
.menu a b { font-weight: 900; }
.menu-icone img { width: 30px; display: block; }
.menu a { padding-top: 8px; padding-bottom: 8px; }
.erreur { margin: 14px 0 0; padding: 12px 16px; border-radius: 16px; background: #FFE1EC; color: #A30F43; font-weight: 800; }
.code-famille { font-weight: 900; font-size: 34px; letter-spacing: 0.1em; margin: 0 0 6px; text-align: center; }

/* ---------- invitation WhatsApp ---------- */

.bouton.whatsapp { background: #1FAF5A; color: var(--blanc); width: 100%; min-height: 50px; }

/* ================= back office du vendeur ================= */

.colonne.large { max-width: 980px; }
.papotes { list-style: none; margin: 12px 0 0; padding: 0; display: grid; gap: 14px; grid-template-columns: repeat(auto-fill, minmax(min(100%, 420px), 1fr)); }
.papote-tete { display: flex; flex-wrap: wrap; align-items: baseline; justify-content: space-between; gap: 4px 12px; }
.papote-tete b { font-weight: 900; font-size: 20px; }
.papote-note { margin: 6px 0 0; font-weight: 700; }
.papote .code-famille { margin: 12px 0; background: var(--creme); border-radius: 16px; padding: 8px; }
.papote .fiche { font-size: 15px; margin-bottom: 10px; }
.papote .fiche dd { font-weight: 700; word-break: break-word; }
.cle-boite { font-family: ui-monospace, Consolas, monospace; font-size: 13px; background: #2B0040; color: #F3E6FF; border-radius: 12px; padding: 10px 12px; word-break: break-all; margin: 0 0 10px; }
.papote .actions { margin-top: 8px; gap: 8px; }
.papote .actions .bouton { flex: 0 1 auto; }
#creation input { flex: 1 1 260px; }

/* ================= page de gestion d'une Papote ================= */

.gestion h2 { margin-top: 34px; }
.gestion h2 .compte { font-weight: 700; color: var(--texte-doux); }
.centre { text-align: center; }

/* Etat de la boite, en haut */
.etat-haut { display: grid; grid-template-columns: auto 1fr; gap: 14px; align-items: start; margin-top: 12px; }
.etat-haut p { margin: 0; }
.voyant { width: 18px; height: 18px; border-radius: 50%; background: #C9C2CE; margin-top: 4px; box-shadow: 0 0 0 5px rgba(201, 194, 206, 0.3); }
.voyant.vert { background: #2EBD85; box-shadow: 0 0 0 5px rgba(46, 189, 133, 0.22); }
.voyant.rouge { background: var(--rose); box-shadow: 0 0 0 5px rgba(255, 46, 126, 0.2); }
.etat-titre { font-weight: 900; font-size: 19px; line-height: 1.25; }
.etat-haut .discret { margin-top: 4px; }
.etat-messages { margin-top: 8px !important; font-weight: 700; }

/* Listes d'actions : une par ligne, faciles a toucher du pouce */
.liste-actions { display: grid; margin-top: 8px; }
.liste-actions > a, .liste-actions > button {
  display: flex; align-items: center; justify-content: space-between; gap: 12px; min-height: 50px; width: 100%;
  padding: 0 4px; border: 0; border-top: 1px solid rgba(75, 0, 110, 0.1); background: none; text-align: left;
  color: var(--violet); font-weight: 800; font-size: 16px; text-decoration: none; cursor: pointer;
}
.liste-actions > :first-child { border-top: 0; }
.liste-actions > a::after, .liste-actions > button::after { content: "›"; font-size: 22px; font-weight: 700; color: #B9A6C6; }
.liste-actions > .danger { color: #C4124F; }
.liste-actions.sensibles { margin-top: 10px; border-top: 2px solid rgba(75, 0, 110, 0.14); }

/* Blocs qui se replient */
.repli { margin-top: 16px; background: var(--blanc); border-radius: 22px; box-shadow: var(--ombre); }
.repli > summary {
  list-style: none; cursor: pointer; display: flex; align-items: center; justify-content: space-between;
  min-height: 58px; padding: 0 18px; font-weight: 900; font-size: 18px;
}
.repli > summary::-webkit-details-marker { display: none; }
.repli > summary::after { content: "›"; font-size: 26px; font-weight: 700; color: var(--texte-doux); transform: rotate(90deg); transition: transform 0.15s; }
.repli[open] > summary::after { transform: rotate(-90deg); }
.repli-contenu { padding: 0 16px 16px; }
.repli-contenu > .discret { margin: 6px 0 0; }
.repli.leger { background: none; box-shadow: none; margin-top: 10px; }
.repli.leger > summary { min-height: 46px; padding: 0 4px; font-size: 16px; font-weight: 800; justify-content: flex-start; gap: 8px; text-decoration: underline; }
.repli.leger > summary::after { font-size: 20px; }
.repli.leger > .carte { margin-top: 6px; }

/* Confirmation dans la page, avec des boutons qui disent ce qu'ils font */
.confirmation { background: #FFF0F5; border: 2px solid #FFC2D8; border-radius: 16px; padding: 14px; margin-top: 10px; }
.confirmation p { margin: 0; font-weight: 700; }
.confirmation .actions { margin-top: 12px; gap: 8px; }
.confirmation .actions .bouton { flex: 1 1 auto; }

/* Membres */
.membre-tete { display: grid; grid-template-columns: auto 1fr auto; }
.membre-qui { min-width: 0; }
.membre-qui .discret { word-break: break-word; }
.membre.inactif { opacity: 1; }
.membre-panneau { margin-top: 10px; border-top: 1px solid rgba(75, 0, 110, 0.1); }
.membre-panneau .renommer { margin-top: 12px; }
.membre-panneau .renommer input { flex: 1 1 100%; }

/* Noms */
.noms { display: grid; gap: 4px; }
.noms .libelle { font-weight: 900; margin-top: 10px; }
.noms .libelle:first-child { margin-top: 0; }
.noms input {
  width: 100%; min-height: 48px; border-radius: 16px; border: 2px solid rgba(75, 0, 110, 0.18);
  padding: 0 16px; background: var(--blanc);
}
.noms input:focus { outline: 0; border-color: var(--violet); }
.noms .discret { margin: 0; font-size: 14px; }
.noms .bouton { justify-self: start; margin-top: 14px; }

/* Sur cette page, pas de barre d'onglets : les messages du bas descendent */
.gestion .bandeau, .gestion .annonce { bottom: calc(20px + env(safe-area-inset-bottom)); }
.gestion .pied { height: 90px; }

/* ================= conversation façon messagerie ================= */

/* Bulles plus etroites : celles des autres a gauche, les miennes a droite */
.fil { justify-items: start; }
.bulle { width: min(84%, 340px); margin-right: 0; }
.bulle.de-moi { justify-self: end; margin-left: 0; }
.bulle.de-boite { width: min(88%, 360px); margin-right: 0; }

/* Haut de page : retour a la liste des conversations */
.entete-gauche { display: inline-flex; align-items: center; gap: 6px; min-width: 0; }
.retour-liste {
  width: 38px; height: 38px; margin-left: -8px; border-radius: 50%; flex: none; display: grid; place-items: center;
  color: var(--creme); background: rgba(255, 247, 238, 0.14); text-decoration: none;
}
.retour-liste svg { width: 22px; height: 22px; }
/* Un seul haut de page pour tout le site : le logo a toujours la meme taille, qu'il y ait
   ou non une fleche de retour a sa gauche et l'etat de la boite a sa droite. */
.entete .colonne { min-height: 46px; }
.entete .logo { gap: 8px; }
.entete .logo img { height: 46px; width: auto; }
.entete .logo-nom { font-size: 29px; }
.entete .logo-devise { font-size: 11.5px; margin-top: 2px; }
.retour-liste[hidden] { display: none; }

/* Boite virtuelle rangee sous le haut de page */
.tiroir { background: var(--creme); }
.boite.poche { width: min(100%, 330px); margin: 14px auto 30px; border-radius: 26px; box-shadow: 0 16px 0 var(--violet), 0 28px 30px rgba(75, 0, 110, 0.2); }
.boite.poche .boite-logo img { width: 34px; }
.boite.poche .boite-logo .logo-nom { font-size: 23px; }
.boite.poche .boite-logo .logo-devise { font-size: 9px; }
.tiroir .etat-simulateur { font-size: 15px; margin: 0 0 6px; }
.tiroir-barre { display: flex; justify-content: center; position: relative; z-index: 2; margin-top: -8px; height: 26px; }
.tiroir-poignee {
  display: inline-flex; align-items: center; gap: 6px; height: 26px; padding: 0 14px 2px; border: 0;
  border-radius: 0 0 14px 14px; background: var(--violet); color: var(--creme); font-weight: 800; font-size: 13px;
}
.tiroir-poignee::after { content: "›"; font-size: 18px; line-height: 1; transform: rotate(90deg); transition: transform 0.15s; }
.tiroir-poignee.ouvert::after { transform: rotate(-90deg); }
/* Tiroir ferme : la languette garde sa taille et remonte contre le violet du haut de page,
   par-dessus la vague creme, pour qu'il n'y ait pas d'espace entre les deux. */
/* La vague n'a pas la meme hauteur partout (26 px au plus) : on remonte de toute sa hauteur,
   pour que le haut de la languette soit toujours dans le violet. */
.tiroir[hidden] + .tiroir-barre { margin-top: -32px; height: 38px; }
.tiroir[hidden] + .tiroir-barre .tiroir-poignee { height: 38px; align-items: flex-end; padding-bottom: 5px; }
.tiroir:not([hidden]) + .tiroir-barre { margin-top: 0; }
.appli .titre-fil { margin-top: 6px; }

/* La page de la boite virtuelle, quand elle est affichee dans ce tiroir */
body.incruste .hors-tiroir { display: none; }
body.incruste .colonne { padding: 0 12px; }
body.incruste .scene { padding: 12px 0 0; }
body.incruste .boite { width: min(100%, 330px); margin-bottom: 28px; border-radius: 26px; box-shadow: 0 16px 0 var(--violet); }
body.incruste .voile { border-radius: 26px; }
body.incruste .etat-simulateur { font-size: 15px; margin: 0; }

/* Enregistrement : cadenas a atteindre pour verrouiller, bouton d'envoi une fois verrouille */
.verrou {
  position: fixed; left: 50%; transform: translateX(-50%); z-index: 12; bottom: calc(180px + env(safe-area-inset-bottom));
  width: 50px; height: 78px; border-radius: 25px; background: var(--blanc); color: var(--violet);
  display: grid; justify-items: center; align-content: start; padding-top: 12px; gap: 4px;
  box-shadow: 0 6px 20px rgba(75, 0, 110, 0.25); transition: transform 0.12s, background 0.12s;
}
.verrou svg { width: 22px; height: 22px; }
.verrou::after { content: "›"; font-size: 22px; font-weight: 800; line-height: 1; transform: rotate(-90deg); color: var(--texte-doux); }
.verrou.proche { background: var(--jaune); transform: translateX(-50%) scale(1.14); }
.onglets .micro.verrouille { background: var(--violet); animation: none; transform: none; box-shadow: 0 8px 20px rgba(75, 0, 110, 0.4); }
.bandeau .bouton.secondaire { background: var(--creme); box-shadow: none; }

/* ================= page d'accueil : liste des conversations ================= */

.conversations { list-style: none; margin: 14px 0 0; padding: 0; display: grid; gap: 10px; }
.conversation {
  display: grid; grid-template-columns: 56px minmax(0, 1fr) auto; gap: 12px; align-items: center;
  background: var(--blanc); border-radius: 22px; padding: 12px 14px; box-shadow: var(--ombre);
  color: var(--violet); text-decoration: none;
}
.conversation .avatar { width: 56px; height: 56px; background: var(--violet); }
.conversation .avatar img { width: 42px; }
.conversation-corps { min-width: 0; display: grid; gap: 2px; }
.conversation-nom { font-weight: 900; font-size: 19px; line-height: 1.2; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.conversation-apercu { font-size: 15px; color: var(--texte-doux); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.conversation.non-lue .conversation-apercu { color: var(--violet); font-weight: 800; }
.conversation-cote { display: grid; justify-items: end; gap: 6px; align-self: start; padding-top: 3px; }
.conversation-heure { font-size: 13px; font-weight: 700; color: var(--texte-doux); white-space: nowrap; }
.conversation.non-lue .conversation-heure { color: var(--rose); }
.compteur { min-width: 24px; height: 24px; padding: 0 7px; border-radius: 12px; background: var(--rose); color: var(--blanc); font-weight: 900; font-size: 13px; display: grid; place-items: center; }

/* Tres petits ecrans : on resserre le logo pour garder la fleche et l'etat de la boite sur une ligne */
@media (max-width: 359px) {
  .entete .logo img { height: 38px; }
  .entete .logo-nom { font-size: 24px; }
  .entete .logo-devise { font-size: 10px; }
  .pastille-boite { padding: 7px 10px; font-size: 13px; }
}

.logo.cliquable { cursor: pointer; -webkit-tap-highlight-color: transparent; }
.logo.cliquable:focus-visible { outline: 3px solid var(--jaune); outline-offset: 4px; border-radius: 12px; }

/* ================= Papote de poche : une ligne en tete de conversation ================= */

.poche-zone { margin-top: 14px; background: var(--blanc); border-radius: 22px; box-shadow: var(--ombre); overflow: hidden; }
.poche-ligne {
  width: 100%; min-height: 58px; padding: 0 14px; border: 0; background: none; text-align: left;
  display: grid; grid-template-columns: auto minmax(0, 1fr) auto auto; gap: 12px; align-items: center;
  color: var(--violet); font-weight: 900; font-size: 17px;
}
/* Petite boite dessinee : couvercle creme, socle violet, un bouton jaune et un bouton rose */
.poche-vignette { width: 46px; height: 30px; border-radius: 7px; background: #FBEBDD; border-bottom: 5px solid var(--violet); position: relative; display: block; }
.poche-vignette i { position: absolute; bottom: 4px; width: 10px; height: 10px; border-radius: 3px; background: var(--jaune); right: 17px; }
.poche-vignette i + i { background: var(--rose); right: 4px; }
.poche-fleche { display: grid; place-items: center; color: var(--texte-doux); transform: rotate(90deg); transition: transform 0.15s; }
.poche-fleche svg { width: 20px; height: 20px; display: block; }
.poche-ligne.ouvert .poche-fleche { transform: rotate(-90deg); }
.poche-zone .tiroir { background: none; padding: 0 12px 10px; }
.poche-zone .boite.poche { margin-top: 6px; }
.appli .titre-fil { margin-top: 16px; }
