/* ============================================================
   YOKA - apparence (version 4.1)
   Sombre et élégant, accents vert vif. Gros boutons, textes
   très lisibles dehors et d'une seule main.
   Toutes les couleurs sont définies ici, en un seul endroit.
   ============================================================ */
@font-face {
  font-family: "Inter";
  src: url("/fonts/inter.woff2") format("woff2");
  font-weight: 100 900;
  font-display: swap;
}

:root {
  /* Fonds : du plus profond au plus clair */
  --fond: #0a0d0b;
  --fond-2: #0f1411;
  --carte: #141a16;
  --carte-2: #1b231d;
  --carte-3: #222c25;
  --bord: #26302a;
  --bord-fort: #34413a;
  /* Textes */
  --texte: #eef3ec;
  --gris: #a2ada5;
  --gris-2: #7f8c83;
  /* Accent vert vif, et ses versions sombres pour les fonds */
  --accent: #86ef4a;
  --accent-fort: #a6f86e;
  --accent-texte: #06110a;      /* texte posé sur l'accent */
  --accent-fond: #15271a;
  --accent-bord: #2f5a2c;
  --accent-halo: rgba(134, 239, 74, .28);
  /* États */
  --ambre: #f5b84a;
  --ambre-fond: #2b2111;
  --ambre-bord: #6b5220;
  --rouge: #ff6b5e;
  --rouge-fort: #d9443a;
  --rouge-fond: #2c1513;
  --rouge-bord: #6e2a24;
  --info-fond: #13221c;
  --info-bord: #2a4a3b;
  /* Formes et mouvements */
  --rayon: 18px;
  --rayon-s: 12px;
  --ombre: 0 10px 30px rgba(0, 0, 0, .35);
  --nav-h: 68px;
  --vite: .18s;
  --doux: cubic-bezier(.2, .8, .2, 1);
}

* { box-sizing: border-box; }
html, body {
  margin: 0;
  min-height: 100%;
  background: var(--fond);
  color: var(--texte);
  font-family: "Inter", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  font-size: 16px;
  line-height: 1.45;
  -webkit-font-smoothing: antialiased;
  -webkit-tap-highlight-color: transparent;
}
body {
  padding: env(safe-area-inset-top) env(safe-area-inset-right) 0 env(safe-area-inset-left);
  background:
    radial-gradient(120% 60% at 100% -10%, rgba(134, 239, 74, .07), transparent 60%),
    radial-gradient(80% 50% at -20% 110%, rgba(63, 212, 110, .05), transparent 60%),
    var(--fond);
  background-attachment: fixed;
}
button, input, select, textarea { font: inherit; color: inherit; }
button { cursor: pointer; }
button:disabled { cursor: default; opacity: .5; }
a { color: var(--accent); text-underline-offset: 3px; }
h1 { font-size: 1.6rem; line-height: 1.2; margin: 6px 0 4px; font-weight: 800; letter-spacing: -.02em; }
h2 { font-size: 1.1rem; margin: 0; font-weight: 700; letter-spacing: -.01em; display: flex; align-items: center; gap: 10px; }
h3 { font-size: 1rem; margin: 0 0 6px; font-weight: 700; display: flex; align-items: center; gap: 8px; }
p { margin: 0; }
.cache { display: none !important; }
.gris { color: var(--gris); }
.petit { font-size: .875rem; }
.centre-texte { text-align: center; }
:focus-visible { outline: 3px solid var(--accent); outline-offset: 2px; border-radius: 8px; }
::selection { background: var(--accent); color: var(--accent-texte); }

/* ---------- Icônes ---------- */
.ic { width: 1.15em; height: 1.15em; flex: none; vertical-align: -.2em; }
.ic-g { margin-right: .5em; }
.ic-d { margin-left: .4em; }
.ic-ok { color: var(--accent); }
.ic-attention { color: var(--ambre); }
.ic-erreur { color: var(--rouge); }
.ic-accent { color: var(--accent); }
.ic-direct { color: var(--rouge); fill: currentColor; animation: clignote 1.2s infinite; }
h2 > .ic:first-child {
  width: 34px; height: 34px; padding: 8px; margin: 0; border-radius: 11px;
  background: var(--accent-fond); color: var(--accent); border: 1px solid var(--accent-bord);
}

/* ---------- Écran de démarrage animé ---------- */
.intro {
  position: fixed; inset: 0; z-index: 100;
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 18px;
  background: radial-gradient(60% 45% at 50% 45%, #13241a 0%, var(--fond) 70%);
  pointer-events: none;                  /* ne bloque jamais l'accès à l'application */
  animation: intro-sortie .38s ease-in 1.15s forwards;
}
.intro svg.logo-anime { position: relative; width: 148px; height: 126px; overflow: visible; }
.intro .halo {
  position: absolute; width: 280px; height: 280px; border-radius: 50%; top: calc(50% - 170px);
  background: radial-gradient(circle, rgba(134, 239, 74, .26), transparent 65%);
  transform: scale(.4); opacity: 0;
  animation: halo 1.1s var(--doux) .15s forwards;
}
.intro .oreille { stroke-dasharray: 760; stroke-dashoffset: 760; animation: trace .62s cubic-bezier(.6, 0, .2, 1) .05s forwards; }
.intro .conque { stroke-dasharray: 220; stroke-dashoffset: 220; animation: trace .34s ease-out .45s forwards; }
.intro .onde { opacity: 0; transform-box: fill-box; transform-origin: left center; animation: onde .5s var(--doux) forwards; }
.intro .o1 { --o: .45; animation-delay: .32s; }
.intro .o2 { --o: .72; animation-delay: .44s; }
.intro .o3 { animation-delay: .56s; }
.intro .mot { position: relative; display: flex; gap: .12em; font-size: 2.1rem; font-weight: 900; letter-spacing: .12em; color: var(--texte); margin: 0; }
.intro .mot span { opacity: 0; transform: translateY(14px); animation: lettre .42s var(--doux) forwards; }
.intro .mot span:nth-child(1) { animation-delay: .62s; }
.intro .mot span:nth-child(2) { animation-delay: .68s; }
.intro .mot span:nth-child(3) { animation-delay: .74s; }
.intro .mot span:nth-child(4) { animation-delay: .80s; color: var(--accent); }
@keyframes trace { to { stroke-dashoffset: 0; } }
@keyframes onde { 0% { opacity: 0; transform: translateX(-26px) scale(.7); } 70% { opacity: 1; } 100% { opacity: var(--o, 1); transform: none; } }
@keyframes halo { 0% { opacity: 0; transform: scale(.4); } 55% { opacity: 1; } 100% { opacity: .55; transform: scale(1.15); } }
@keyframes lettre { to { opacity: 1; transform: none; } }
@keyframes intro-sortie { to { opacity: 0; visibility: hidden; transform: scale(1.04); } }

/* ---------- Écrans d'accueil ---------- */
.ecran {
  max-width: 460px;
  margin: 0 auto;
  min-height: 100vh;
  min-height: 100dvh;
  padding: 28px 16px 32px;
  display: flex;
  flex-direction: column;
  gap: 16px;
}
.ecran.centre { justify-content: center; align-items: stretch; text-align: center; }
.logo-grand {
  width: 104px; height: 104px; margin: 0 auto; border-radius: 28px;
  box-shadow: 0 0 0 1px rgba(134, 239, 74, .12), 0 18px 50px rgba(134, 239, 74, .14), 0 10px 30px rgba(0, 0, 0, .5);
}
.nom-marque { font-size: 2.5rem; font-weight: 900; letter-spacing: .14em; margin: 8px 0 0; }
.nom-marque span { color: var(--accent); }
.accroche { color: var(--gris); margin: 0 0 14px; font-size: 1.05rem; }
.pile { display: flex; flex-direction: column; gap: 10px; }
.separateur { display: flex; align-items: center; gap: 10px; color: var(--gris-2); margin: 6px 0; font-size: .9rem; }
.separateur::before, .separateur::after { content: ""; flex: 1; height: 1px; background: var(--bord); }
.bouton-google { display: flex; justify-content: center; min-height: 44px; }
.bouton-retour {
  align-self: flex-start; display: inline-flex; align-items: center;
  background: none; border: 0; color: var(--gris); padding: 6px 0; font-size: 1rem; font-weight: 600;
}
.bouton-retour:hover { color: var(--texte); }

/* ---------- Cartes ---------- */
.carte {
  background: linear-gradient(180deg, rgba(255, 255, 255, .018), transparent 40%), var(--carte);
  border: 1px solid var(--bord);
  border-radius: var(--rayon);
  padding: 18px;
  display: flex;
  flex-direction: column;
  gap: 12px;
  text-align: left;
}
.carte.info { background: var(--info-fond); border-color: var(--info-bord); }
.carte.alerte { background: var(--ambre-fond); border-color: var(--ambre-bord); }
.carte.danger { background: var(--rouge-fond); border-color: var(--rouge-bord); }
.carte.ok { background: linear-gradient(135deg, rgba(134, 239, 74, .10), transparent 60%), var(--accent-fond); border-color: var(--accent-bord); }

/* ---------- Formulaires ---------- */
label { display: flex; flex-direction: column; gap: 7px; font-weight: 600; font-size: .92rem; color: var(--texte); }
input, select, textarea {
  background: var(--fond-2);
  border: 1px solid var(--bord-fort);
  border-radius: var(--rayon-s);
  padding: 13px 14px;
  font-size: 16px; /* évite le zoom automatique sur iPhone */
  font-weight: 400;
  width: 100%;
  transition: border-color var(--vite), box-shadow var(--vite);
}
input::placeholder, textarea::placeholder { color: var(--gris-2); }
input:focus, select:focus, textarea:focus { border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-halo); outline: none; }
select {
  appearance: none; -webkit-appearance: none; padding-right: 40px;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23a2ada5' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E");
  background-repeat: no-repeat; background-position: right 12px center; background-size: 18px;
}

/* ---------- Boutons ---------- */
.bouton-principal, .bouton-secondaire, .bouton-danger {
  display: inline-flex; align-items: center; justify-content: center;
  border-radius: 14px;
  padding: 13px 18px;
  font-weight: 700;
  font-size: 1rem;
  border: 1px solid transparent;
  min-height: 50px;
  text-decoration: none;
  transition: transform .1s, background var(--vite), border-color var(--vite), box-shadow var(--vite);
}
.bouton-principal {
  background: linear-gradient(180deg, var(--accent-fort), var(--accent));
  color: var(--accent-texte);
  box-shadow: 0 6px 20px rgba(134, 239, 74, .2), inset 0 1px 0 rgba(255, 255, 255, .35);
}
.bouton-principal:hover:not(:disabled) { box-shadow: 0 8px 26px rgba(134, 239, 74, .3), inset 0 1px 0 rgba(255, 255, 255, .35); }
.bouton-secondaire { background: var(--carte-2); border-color: var(--bord-fort); color: var(--texte); }
.bouton-secondaire:hover:not(:disabled) { border-color: var(--accent-bord); background: var(--carte-3); }
.bouton-danger { background: var(--rouge-fort); color: #fff; }
.bouton-principal .ic, .bouton-danger .ic, .bulle.moi .ic { color: inherit; }
.bouton-principal:active:not(:disabled), .bouton-secondaire:active:not(:disabled),
.bouton-danger:active:not(:disabled), .bouton-petit:active:not(:disabled) { transform: scale(.97); }
.bouton-petit {
  display: inline-flex; align-items: center; justify-content: center;
  background: var(--carte-2); border: 1px solid var(--bord-fort); border-radius: 11px; color: var(--texte);
  padding: 8px 12px; font-size: .9rem; font-weight: 600; min-height: 40px; text-decoration: none;
  transition: transform .1s, border-color var(--vite);
}
.bouton-petit:hover { border-color: var(--accent-bord); }
.bouton-lien {
  display: inline-flex; align-items: center;
  background: none; border: 0; color: var(--accent); padding: 6px 0; font-weight: 600; text-align: left;
  text-decoration: underline; text-decoration-color: rgba(134, 239, 74, .35); text-underline-offset: 4px;
}
.rangee { display: flex; gap: 10px; flex-wrap: wrap; align-items: center; }
.rangee > .bouton-principal, .rangee > .bouton-secondaire { flex: 1 1 140px; }
.message { margin: 0; min-height: 1.2em; font-size: .9rem; }
.message.erreur { color: var(--rouge); }
.message.ok { color: var(--accent); }
.dispo-ok { color: var(--accent); }
.dispo-non { color: var(--rouge); }

/* ---------- Choix de départ ---------- */
.choix-cartes { display: grid; gap: 12px; }
.carte-choix {
  display: grid;
  grid-template-columns: 56px 1fr;
  grid-template-rows: auto auto;
  column-gap: 14px; row-gap: 2px;
  align-items: center;
  text-align: left;
  background: var(--carte);
  border: 1px solid var(--bord);
  border-radius: var(--rayon);
  padding: 16px;
  transition: border-color var(--vite), transform .12s, background var(--vite);
}
.carte-choix:hover, .carte-choix:focus-visible { border-color: var(--accent-bord); background: var(--carte-2); }
.carte-choix:active { transform: scale(.985); }
.tuile-icone {
  grid-row: 1 / 3; width: 56px; height: 56px; border-radius: 16px;
  display: flex; align-items: center; justify-content: center;
  background: var(--accent-fond); border: 1px solid var(--accent-bord); color: var(--accent);
}
.tuile-icone .ic { width: 26px; height: 26px; margin: 0; }
.titre-choix { font-weight: 700; font-size: 1.05rem; align-self: end; }

/* ---------- Application ---------- */
#ecran-app { min-height: 100vh; min-height: 100dvh; }
.entete {
  position: sticky; top: 0; z-index: 20;
  display: flex; align-items: center; gap: 10px;
  padding: 10px 14px;
  background: rgba(10, 13, 11, .86);
  backdrop-filter: blur(14px) saturate(1.2);
  -webkit-backdrop-filter: blur(14px) saturate(1.2);
  border-bottom: 1px solid var(--bord);
}
.logo-entete { width: 38px; height: 32px; }
.selecteur-espace {
  flex: 1; min-width: 0;
  display: flex; align-items: center; justify-content: space-between; gap: 8px;
  background: var(--carte); border: 1px solid var(--bord); border-radius: 12px;
  padding: 9px 12px; text-align: left; font-weight: 700;
  transition: border-color var(--vite);
}
.selecteur-espace:hover { border-color: var(--accent-bord); }
#nom-espace { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.selecteur-espace .ic { color: var(--gris); }
.etat-reseau { font-size: .8rem; color: var(--gris); white-space: nowrap; display: inline-flex; align-items: center; gap: 6px; }
.etat-reseau::before { content: ""; width: 8px; height: 8px; border-radius: 50%; background: var(--accent); box-shadow: 0 0 0 3px var(--accent-halo); }
.etat-reseau:empty::before { display: none; }
.etat-reseau.en-cours::before { background: var(--ambre); box-shadow: 0 0 0 3px rgba(245, 184, 74, .25); }
.etat-reseau.hors-ligne { color: var(--rouge); font-weight: 700; }
.etat-reseau.hors-ligne::before { background: var(--rouge); box-shadow: 0 0 0 3px rgba(255, 107, 94, .25); }

.vue {
  max-width: 760px;
  margin: 0 auto;
  padding: 16px 16px calc(var(--nav-h) + 84px + env(safe-area-inset-bottom));
  display: flex; flex-direction: column; gap: 14px;
  outline: none;
}
/* Arrivée douce de chaque page */
.vue.entree > * { animation: monte .32s var(--doux) both; }
.vue.entree > *:nth-child(2) { animation-delay: .03s; }
.vue.entree > *:nth-child(3) { animation-delay: .06s; }
.vue.entree > *:nth-child(4) { animation-delay: .09s; }
.vue.entree > *:nth-child(n+5) { animation-delay: .12s; }
@keyframes monte { from { opacity: 0; transform: translateY(10px); } to { opacity: 1; transform: none; } }

.navigation {
  position: fixed; left: 0; right: 0; bottom: 0; z-index: 30;
  display: grid; grid-template-columns: repeat(5, 1fr);
  background: rgba(13, 17, 14, .92);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  border-top: 1px solid var(--bord);
  padding: 0 4px env(safe-area-inset-bottom);
}
.navigation a {
  position: relative;
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 4px;
  height: var(--nav-h);
  color: var(--gris); text-decoration: none; font-size: .72rem; font-weight: 600;
  transition: color var(--vite);
}
.navigation a .icone {
  display: flex; align-items: center; justify-content: center;
  width: 50px; height: 30px; border-radius: 999px;
  transition: background var(--vite), color var(--vite);
}
.navigation a .icone .ic { width: 22px; height: 22px; margin: 0; }
.navigation a:hover { color: var(--texte); }
.navigation a.actif { color: var(--texte); }
.navigation a.actif .icone { background: var(--accent); color: var(--accent-texte); }

.mini-canal {
  position: fixed; left: 12px; right: 12px; z-index: 25;
  bottom: calc(var(--nav-h) + 10px + env(safe-area-inset-bottom));
  max-width: 740px; margin: 0 auto;
  display: flex; align-items: center;
  background: var(--accent-fond); border: 1px solid var(--accent-bord); color: var(--texte);
  border-radius: 16px; padding: 12px 16px; text-align: left; font-weight: 600;
  box-shadow: var(--ombre);
  animation: monte .25s var(--doux);
}
.mini-canal .ic { color: var(--accent); }
.mini-canal.parle { background: var(--ambre-fond); border-color: var(--ambre-bord); }
.mini-canal.parle .ic { color: var(--ambre); }

/* Témoins micro / caméra / position : toujours visibles */
.temoins {
  display: flex; gap: 8px; flex-wrap: wrap;
  padding: 8px 14px; background: var(--rouge-fond); border-bottom: 1px solid var(--rouge-bord);
}
.temoin { display: inline-flex; align-items: center; gap: 6px; font-size: .82rem; font-weight: 700; }
.temoin button { background: var(--rouge-fort); border: 0; color: #fff; border-radius: 8px; padding: 4px 10px; font-size: .78rem; font-weight: 700; }
.point-rouge { width: 9px; height: 9px; border-radius: 50%; background: var(--rouge); animation: clignote 1.2s infinite; }
@keyframes clignote { 50% { opacity: .3; } }

.bandeau {
  display: flex; align-items: flex-start;
  margin: 8px 14px 0; padding: 11px 14px; border-radius: 14px; font-size: .9rem;
  background: var(--info-fond); border: 1px solid var(--info-bord);
  animation: monte .25s var(--doux);
}
.bandeau .ic { margin-top: .12em; }
.bandeau.alerte { background: var(--ambre-fond); border-color: var(--ambre-bord); }
.bandeau.erreur { background: var(--rouge-fond); border-color: var(--rouge-bord); }
.bandeau.cliquable { cursor: pointer; }
.bandeau.cliquable::after { content: "›"; margin-left: auto; padding-left: 10px; color: var(--gris); font-size: 1.3rem; line-height: 1; }

/* Listes */
.liste { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 8px; }
.ligne {
  display: flex; align-items: center; gap: 12px;
  background: var(--carte); border: 1px solid var(--bord); border-radius: 14px;
  padding: 12px 14px; min-height: 60px; color: var(--texte); text-decoration: none;
  transition: border-color var(--vite), background var(--vite), transform .1s;
}
a.ligne:hover, button.ligne:hover { border-color: var(--accent-bord); background: var(--carte-2); }
a.ligne:active, button.ligne:active { transform: scale(.99); }
button.ligne { width: 100%; text-align: left; }
.ligne .corps { flex: 1; min-width: 0; }
.ligne .titre { font-weight: 700; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.ligne.choisi { border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-halo); }
.pastille { width: 10px; height: 10px; border-radius: 50%; background: var(--gris-2); flex: none; }
.pastille.en-ligne { background: var(--accent); box-shadow: 0 0 0 3px var(--accent-halo); }
.pastille.parle { background: var(--ambre); box-shadow: 0 0 0 4px rgba(245, 184, 74, .3); animation: clignote 1s infinite; }
.badge {
  display: inline-flex; align-items: center; gap: 4px;
  font-size: .72rem; font-weight: 700; padding: 3px 10px; border-radius: 999px;
  background: var(--carte-2); border: 1px solid var(--bord-fort); white-space: nowrap;
}
.badge .ic { width: 13px; height: 13px; }
.badge .ic-g { margin-right: 4px; }
.badge.vert { background: var(--accent-fond); border-color: var(--accent-bord); color: var(--accent); }
.badge.orange { background: var(--ambre-fond); border-color: var(--ambre-bord); color: var(--ambre); }
.badge.rouge { background: var(--rouge-fond); border-color: var(--rouge-bord); color: var(--rouge); }
.titre-page { display: flex; align-items: center; justify-content: space-between; gap: 6px 10px; flex-wrap: wrap; padding: 2px 2px 4px; }
.titre-page h1 { margin: 0; }
.code-invitation {
  font-family: ui-monospace, "SF Mono", Menlo, Consolas, monospace; font-size: 1.6rem; letter-spacing: 6px; font-weight: 800;
  color: var(--accent); background: var(--fond-2); border: 1px dashed var(--accent-bord); border-radius: 12px; padding: 10px 14px; text-align: center;
}
details > summary { cursor: pointer; list-style: none; display: flex; align-items: center; gap: 8px; }
details > summary::-webkit-details-marker { display: none; }
details > summary::after {
  content: ""; margin-left: auto; width: 18px; height: 18px; flex: none; transition: transform var(--vite);
  background: currentColor; opacity: .6;
  -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E") center / contain no-repeat;
          mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E") center / contain no-repeat;
}
details[open] > summary::after { transform: rotate(180deg); }
details[open] > summary ~ * { animation: monte .22s var(--doux); }
details.carte > summary { font-weight: 700; }
.vide { text-align: center; color: var(--gris); padding: 22px; }

/* ---------- Canal ---------- */
.entete-canal { display: flex; align-items: center; gap: 12px; }
.entete-canal .corps { flex: 1; min-width: 0; }
.entete-canal h1 { margin: 0; font-size: 1.35rem; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.onglets-canal { display: grid; grid-template-columns: 1fr 1fr; gap: 4px; background: var(--carte); border: 1px solid var(--bord); padding: 4px; border-radius: 14px; }
.onglets-canal button {
  display: inline-flex; align-items: center; justify-content: center;
  background: none; border: 0; padding: 10px; border-radius: 10px; font-weight: 700; color: var(--gris);
  transition: background var(--vite), color var(--vite);
}
.onglets-canal button.actif { background: var(--carte-3); color: var(--texte); }
.onglets-canal button.actif .ic { color: var(--accent); }
.zone-canal { display: grid; gap: 14px; }
.panneau.pile { gap: 14px; }

.statut { text-align: center; font-size: 1.3rem; font-weight: 800; min-height: 1.6em; letter-spacing: -.01em; display: flex; align-items: center; justify-content: center; }
.statut.moi { color: var(--accent); }
.statut.autre { color: var(--ambre); }
.talk-zone { display: flex; flex-direction: column; align-items: center; gap: 16px; padding: 22px 0 8px; }

/* ===== Le bouton LOBA ===== */
.bouton-talk {
  --c1: #2a352d; --c2: #141a16; --anneau: var(--bord-fort); --lueur: transparent; --texte-b: var(--texte);
  position: relative;
  width: min(66vw, 252px); height: min(66vw, 252px);
  border-radius: 50%;
  border: 0; padding: 0;
  background: radial-gradient(circle at 50% 30%, var(--c1), var(--c2) 72%);
  color: var(--texte-b);
  box-shadow:
    0 0 0 8px var(--fond-2),
    0 0 0 10px var(--anneau),
    0 0 46px 8px var(--lueur),
    0 22px 40px rgba(0, 0, 0, .55),
    inset 0 2px 0 rgba(255, 255, 255, .10),
    inset 0 -10px 30px rgba(0, 0, 0, .3);
  touch-action: none; user-select: none; -webkit-user-select: none; -webkit-touch-callout: none;
  transition: transform .12s var(--doux), box-shadow .25s, background .25s, color .25s;
}
.bouton-talk:disabled { opacity: 1; }
.loba-coeur { position: relative; z-index: 2; display: flex; flex-direction: column; align-items: center; gap: 6px; }
.loba-coeur .ic { width: 32px; height: 32px; margin: 0; opacity: .95; }
.loba-mot { font-size: 2.4rem; font-weight: 900; letter-spacing: .12em; line-height: 1; padding-left: .12em; }
.loba-etat { font-size: .8rem; font-weight: 700; letter-spacing: .01em; padding: 4px 11px; border-radius: 999px; background: rgba(0, 0, 0, .25); }
.loba-ondes { position: absolute; inset: 0; z-index: 1; pointer-events: none; }
.loba-ondes i { position: absolute; inset: 0; border-radius: 50%; border: 3px solid var(--accent); opacity: 0; }
.bouton-talk::before, .bouton-talk::after { content: ""; position: absolute; inset: -10px; border-radius: 50%; pointer-events: none; opacity: 0; }

/* Prêt : anneau vert qui respire lentement */
.bouton-talk[data-etat="pret"] { --c1: #23331f; --c2: #111a12; --anneau: var(--accent); --lueur: rgba(134, 239, 74, .16); }
.bouton-talk[data-etat="pret"] .loba-coeur .ic { color: var(--accent); }
.bouton-talk[data-etat="pret"]::before { box-shadow: 0 0 0 2px var(--accent); animation: respire 2.6s ease-in-out infinite; }
@keyframes respire { 50% { opacity: .55; transform: scale(1.05); } }
/* Appui : le bouton s'enfonce, la lumière monte */
.bouton-talk[data-etat="appui"] { --c1: #9df35f; --c2: #4bc04a; --anneau: var(--accent-fort); --lueur: rgba(134, 239, 74, .45); --texte-b: var(--accent-texte); transform: scale(.94); }
/* En train de parler : vert plein et ondes qui partent */
.bouton-talk[data-etat="parle"] { --c1: #b4fb7c; --c2: #4fd24f; --anneau: var(--accent-fort); --lueur: rgba(134, 239, 74, .55); --texte-b: var(--accent-texte); transform: scale(.97); }
.bouton-talk[data-etat="parle"] .loba-etat { background: rgba(6, 17, 10, .14); }
.bouton-talk[data-etat="parle"] .loba-ondes i { animation: emission 1.6s cubic-bezier(.2, .6, .3, 1) infinite; }
.bouton-talk[data-etat="parle"] .loba-ondes i:nth-child(2) { animation-delay: .53s; }
.bouton-talk[data-etat="parle"] .loba-ondes i:nth-child(3) { animation-delay: 1.06s; }
@keyframes emission { 0% { opacity: .7; transform: scale(1); } 100% { opacity: 0; transform: scale(1.55); } }
/* Canal occupé : ambre, quelqu'un d'autre parle */
.bouton-talk[data-etat="occupe"] { --c1: #4a3818; --c2: #21190b; --anneau: var(--ambre); --lueur: rgba(245, 184, 74, .22); --texte-b: #fff3dc; }
.bouton-talk[data-etat="occupe"] .loba-coeur .ic { color: var(--ambre); }
.bouton-talk[data-etat="occupe"] .loba-ondes i { border-color: var(--ambre); animation: emission 2.2s ease-out infinite; }
/* Erreur : rouge, petit tremblement quand on insiste */
.bouton-talk[data-etat="erreur"] { --c1: #4a1f1b; --c2: #1f0e0c; --anneau: var(--rouge); --lueur: rgba(255, 107, 94, .18); --texte-b: #ffe2de; }
.bouton-talk[data-etat="erreur"] .loba-coeur .ic { color: var(--rouge); }
.bouton-talk.refuse { animation: secoue .32s; }
/* Attente / connexion : gris, un anneau tourne */
.bouton-talk[data-etat="attente"] { --texte-b: var(--gris); }
.bouton-talk[data-etat="attente"]::after { opacity: 1; border: 2px solid transparent; border-top-color: var(--accent); animation: tourne 1.1s linear infinite; }
@keyframes tourne { to { transform: rotate(360deg); } }
/* Mon tour dans la file : halo vert plus insistant */
.bouton-talk.mon-tour[data-etat="pret"] { --lueur: rgba(134, 239, 74, .45); }
.bouton-talk.mon-tour[data-etat="pret"]::before { animation-duration: 1.1s; }
@keyframes secoue { 25% { transform: translateX(-7px); } 75% { transform: translateX(7px); } }
.aide-talk { color: var(--gris); font-size: .85rem; text-align: center; margin: 0; }

.file-parole { display: flex; flex-direction: column; gap: 8px; }
.file-parole ol { margin: 0; padding-left: 22px; }
.actions-canal { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 8px; }

.temoin-ligne { display: flex; align-items: center; gap: 8px; font-size: .88rem; }
.temoin-ligne .etiquette { flex: 1; display: inline-flex; align-items: center; font-weight: 600; }
.etat-on { color: var(--rouge); font-weight: 800; }

.grille-videos { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 8px; }
.grille-videos:empty { display: none; }
.video { position: relative; background: #000; border-radius: 16px; overflow: hidden; aspect-ratio: 4 / 3; border: 1px solid var(--bord); animation: monte .25s var(--doux); }
.video video { width: 100%; height: 100%; object-fit: cover; }
.video .nom-video { position: absolute; left: 8px; bottom: 8px; display: inline-flex; align-items: center; background: rgba(0, 0, 0, .6); padding: 3px 9px; border-radius: 8px; font-size: .78rem; font-weight: 600; }
.video .nom-video .ic { width: 10px; height: 10px; }
.video.moi video { transform: scaleX(-1); }

/* Discussion */
.chat { display: flex; flex-direction: column; gap: 10px; }
.messages { display: flex; flex-direction: column; gap: 8px; max-height: 55vh; overflow-y: auto; padding: 4px; }
.bulle {
  max-width: 82%; background: var(--carte-2); border: 1px solid var(--bord); border-radius: 18px 18px 18px 6px;
  padding: 9px 13px; align-self: flex-start; word-wrap: break-word; overflow-wrap: anywhere;
  animation: monte .2s var(--doux);
}
.bulle.moi { align-self: flex-end; background: var(--accent); border-color: transparent; color: var(--accent-texte); border-radius: 18px 18px 6px 18px; }
.bulle.moi a { color: var(--accent-texte); }
.bulle .auteur { font-size: .78rem; font-weight: 700; color: var(--accent); margin-bottom: 2px; }
.bulle .heure { font-size: .7rem; color: var(--gris); text-align: right; margin-top: 2px; }
.bulle.moi .heure { color: rgba(6, 17, 10, .65); }
.bulle img { display: block; max-width: 100%; max-height: 260px; border-radius: 12px; margin-top: 4px; cursor: zoom-in; }
.bulle .texte { white-space: pre-wrap; }
.saisie { display: flex; gap: 4px; align-items: flex-end; background: var(--carte); border: 1px solid var(--bord); border-radius: 18px; padding: 6px; }
.saisie textarea { flex: 1; resize: none; min-height: 44px; max-height: 120px; border: 0; background: transparent; padding: 11px 8px; }
.saisie textarea:focus { box-shadow: none; }
.saisie .bouton-petit { min-width: 44px; min-height: 44px; border: 0; background: transparent; color: var(--gris); }
.saisie .bouton-petit:hover { color: var(--texte); }
.saisie .bouton-principal { min-height: 44px; min-width: 44px !important; width: 44px; padding: 0; border-radius: 14px; }
.saisie .ic { margin: 0; }

/* Fenêtres */
.fenetre {
  border: 1px solid var(--bord-fort); border-radius: 22px; background: var(--carte); color: var(--texte);
  width: min(94vw, 460px); max-height: 88vh; padding: 22px;
  box-shadow: 0 30px 80px rgba(0, 0, 0, .6);
}
.fenetre::backdrop { background: rgba(4, 6, 5, .72); }
.fenetre[open] { display: flex; flex-direction: column; gap: 12px; animation: apparait .22s var(--doux); }
@keyframes apparait { from { opacity: 0; transform: translateY(12px) scale(.98); } to { opacity: 1; transform: none; } }
.fenetre img.plein { max-width: 100%; max-height: 70vh; border-radius: 12px; }

.toast {
  position: fixed; left: 50%; transform: translateX(-50%) translateY(20px);
  bottom: calc(var(--nav-h) + 76px + env(safe-area-inset-bottom));
  display: flex; align-items: center;
  background: #f4f8f2; color: #0b120d; padding: 11px 18px; border-radius: 14px; font-weight: 600;
  box-shadow: 0 14px 40px rgba(0, 0, 0, .45);
  opacity: 0; pointer-events: none; transition: opacity .2s, transform .25s var(--doux); z-index: 50;
  width: max-content; max-width: min(90vw, 420px); text-align: left;
}
.toast .ic-ok { color: #2f9a3a; }
.toast .ic-attention { color: #b7791f; }
.toast.visible { opacity: 1; transform: translateX(-50%) translateY(0); }

/* Réglages */
.reglage { display: flex; flex-direction: column; gap: 7px; padding: 12px 0; border-top: 1px solid var(--bord); }
.reglage:first-of-type { border-top: 0; }
.reglage-tete { display: flex; align-items: center; justify-content: space-between; gap: 10px; font-weight: 600; }
.reglage p { margin: 0; }
input[type=checkbox].interrupteur {
  appearance: none; -webkit-appearance: none; width: 52px; height: 32px; padding: 0; flex: none;
  border-radius: 999px; background: var(--carte-3); position: relative; border: 1px solid var(--bord-fort); cursor: pointer;
  transition: background var(--vite), border-color var(--vite);
}
input[type=checkbox].interrupteur::after {
  content: ""; position: absolute; top: 3px; left: 3px; width: 24px; height: 24px; border-radius: 50%; background: #e7ece6;
  box-shadow: 0 2px 6px rgba(0, 0, 0, .4); transition: left .2s var(--doux);
}
input[type=checkbox].interrupteur:checked { background: var(--accent); border-color: var(--accent); }
input[type=checkbox].interrupteur:checked::after { left: 23px; background: #fff; }
input[type=range] { padding: 0; accent-color: var(--accent); border: 0; background: transparent; box-shadow: none; }
.diagnostic { list-style: none; padding: 0; margin: 0; display: grid; gap: 6px; font-size: .9rem; }

/* Ordinateur : navigation à gauche */
@media (min-width: 900px) {
  #ecran-app { display: grid; grid-template-columns: 236px 1fr; grid-template-rows: auto auto auto 1fr; }
  #ecran-app.cache { display: none; }
  .entete { grid-column: 1 / 3; padding: 12px 20px; }
  .temoins, .bandeau { grid-column: 2; }
  .vue { grid-column: 2; padding: 24px 28px 90px; width: 100%; max-width: 1080px; }
  .navigation {
    position: sticky; top: 61px; grid-column: 1; grid-row: 2 / 5; align-self: start;
    display: flex; flex-direction: column; gap: 4px; padding: 18px 12px;
    border-top: 0; border-right: 1px solid var(--bord); background: transparent; height: calc(100vh - 61px);
    backdrop-filter: none; -webkit-backdrop-filter: none;
  }
  .navigation a { flex-direction: row; justify-content: flex-start; gap: 10px; height: 48px; padding: 0 10px; border-radius: 14px; font-size: .95rem; }
  .navigation a .icone { width: 36px; height: 36px; border-radius: 11px; }
  .navigation a.actif { background: var(--carte); }
  .mini-canal { left: 256px; bottom: 18px; }
  .toast { bottom: 40px; }
  .zone-canal.large { grid-template-columns: minmax(340px, 1fr) 1fr; align-items: start; }
  .zone-canal.large .onglets-canal { display: none; }
  .zone-canal.large > .panneau { display: flex !important; }
  .messages { max-height: 60vh; }
}

/* Moins d'animations si le téléphone le demande */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .001ms !important; animation-delay: 0s !important; animation-iteration-count: 1 !important; transition-duration: .001ms !important; }
  .intro { display: none; }
  .bouton-talk[data-etat="parle"] .loba-ondes i { opacity: .5; transform: scale(1.12); }
}
