/* Charte JeCapte. Polices système uniquement : avant activation d'Internet,
   le walled garden ne laisse passer que wifi.jecapte.fr (pas de Google Fonts). */
:root {
  --rouge: #E41E13;
  --grenat: #7D160E;
  --creme: #F4F1EA;
  --blanc: #FFFEFB;
  --encre: #1F1B18;
  --muted: #6E665E;
  --trait: #E4DED3;
  --ok: #2E7D4F;
  --ok-bg: #E6F3EA;
  --warn-bg: #FBF0D9;
  --warn: #8A5A00;
  --font: system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
}

* { box-sizing: border-box; }
[hidden] { display: none !important; }
html, body { height: 100%; margin: 0; }
body {
  display: flex;
  flex-direction: column;
  background: var(--creme);
  color: var(--encre);
  font: 16px/1.45 var(--font);
  -webkit-text-size-adjust: 100%;
}

.top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: calc(10px + env(safe-area-inset-top)) 16px 10px;
  background: var(--blanc);
  border-bottom: 1px solid var(--trait);
}
.brand-logo { display: block; height: 28px; width: auto; cursor: pointer; }
.status {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 4px 10px; border-radius: 999px;
  font-size: 12px; white-space: nowrap;
}
/* Petits écrans (320 px) : la bulle Wi-Fi passe sur deux lignes plutôt que de
   sortir de l'écran. */
@media (max-width: 360px) {
  .top { gap: 8px; }
  .brand-logo { height: 24px; flex: none; }
  .status { min-width: 0; white-space: normal; line-height: 1.2; border-radius: 14px; }
}
.status .dot { width: 7px; height: 7px; border-radius: 50%; background: currentColor; }
.status.on { background: var(--ok-bg); color: var(--ok); }
.status.off { background: var(--warn-bg); color: var(--warn); }
.status.lost { background: #FCE9E7; color: var(--grenat); }
.status.appui { cursor: pointer; text-decoration: underline; text-underline-offset: 2px; }
.status.pending { background: var(--blanc); color: var(--muted); border: 1px dashed var(--trait); }

.thread {
  flex: 1;
  overflow-y: auto;
  padding: 6px 16px 16px;
  display: flex;
  flex-direction: column;
  gap: 10px;
  overscroll-behavior: contain;
}
.msg {
  max-width: 85%;
  padding: 10px 14px;
  border-radius: 16px;
  word-wrap: break-word;
  white-space: normal;
}
.msg.bot { align-self: flex-start; background: var(--blanc); border: 1px solid var(--trait); border-bottom-left-radius: 4px; }
.msg.user { align-self: flex-end; background: var(--grenat); color: #fff; border-bottom-right-radius: 4px; }
.msg.aimant { font-size: 14px; color: var(--grenat); background: #FBE4E2; border-color: #F2C6C1; cursor: pointer; }
.msg.error { align-self: flex-start; background: var(--warn-bg); color: var(--warn); }
.msg p { margin: 0 0 6px; }
.msg p:last-child { margin-bottom: 0; }
.msg ul { margin: 4px 0; padding-left: 20px; }
.msg.typing::after {
  content: "";
  display: inline-block; width: 6px; height: 6px; margin-left: 4px;
  border-radius: 50%; background: var(--muted);
  animation: blink 1s infinite;
}
@keyframes blink { 50% { opacity: .2; } }

.bottom {
  padding: 8px 12px calc(6px + env(safe-area-inset-bottom));
  background: var(--blanc);
  border-top: 1px solid var(--trait);
}
.composer { display: flex; gap: 8px; }
/* Défilement calé sur le début d'un bouton : jamais un bouton coupé à gauche
   (iOS fait défiler la bande pour montrer en entier le bouton touché). */
.suggestions { display: flex; gap: 6px; overflow-x: auto; padding: 0 1px 8px; scrollbar-width: none; scroll-padding: 0 1px; scroll-snap-type: x mandatory; }
.suggestions button { scroll-snap-align: start; }
.suggestions::-webkit-scrollbar { display: none; }
.suggestions button { flex: none; font: 600 13px var(--font); padding: 6px 12px; border-radius: 999px; border: 1px solid var(--trait); background: var(--blanc); color: var(--grenat); cursor: pointer; white-space: nowrap; -webkit-touch-callout: none; -webkit-user-select: none; user-select: none; }
/* Une seule ligne, même sur un téléphone de 360 px. */
.mention { margin: 4px -8px 0; text-align: center; font-size: 10px; line-height: 1.3; letter-spacing: -.1px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; color: var(--muted); }
.composer input {
  flex: 1; min-width: 0;
  padding: 11px 16px;
  border: 1px solid var(--trait); border-radius: 999px;
  background: var(--creme); color: var(--encre);
  font: inherit; /* 16px : évite le zoom auto d'iOS */
}
.composer input:focus { outline: 2px solid var(--rouge); outline-offset: 1px; }
.composer button {
  flex: none; display: grid; place-items: center;
  width: 44px; height: 44px; border: 0; border-radius: 50%;
  background: var(--rouge); color: #fff;
}
.composer button:disabled { opacity: .5; }

/* Écran d'accueil : une info, au plus un bouton ; gros textes, gros appuis.
   Tant que la conversation n'a pas commencé, il occupe toute la hauteur (le
   bouton d'offre en bas) ; ensuite il se resserre au-dessus des réponses. */
/* flex: none : dans le fil (flex), l'écran resserré ne doit pas rétrécir sous
   son contenu, sinon les réponses le recouvrent. */
.ecran { flex: none; display: flex; flex-direction: column; gap: 10px; min-height: 100%; padding: 0 4px 4px; }
.ecran h1 { margin: 0; font-size: 28px; line-height: 1.15; }
.texte { margin: 0; font-size: 18px; line-height: 1.4; }
/* Quatre tuiles carrées (2 x 2), sans Premium comme en Premium. */
.tuiles { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; user-select: none; -webkit-user-select: none; -webkit-touch-callout: none; }
.tuiles button { min-height: 92px; padding: 8px; border-radius: 18px; border: 1px solid var(--trait); background: var(--blanc); color: var(--encre); font: 700 18px/1.2 var(--font); display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 6px; text-align: center; cursor: pointer; -webkit-tap-highlight-color: transparent; }
.tuiles svg { color: var(--grenat); flex: none; }
.tuile-sous { margin-top: -4px; font-size: 12px; font-weight: 600; color: var(--muted); }
.tuile-sous:empty { display: none; }
.sous { display: flex; flex-direction: column; gap: 8px; }
.sous[hidden] { display: none; }
.sous-tete { display: flex; align-items: center; gap: 10px; }
.sous-retour { display: inline-flex; align-items: center; gap: 2px; padding: 4px 12px 4px 8px; border-radius: 999px; border: 1px solid var(--trait); background: var(--blanc); color: var(--encre); font: 600 14px/1.2 var(--font); cursor: pointer; }
.sous-titre { font-weight: 700; font-size: 16px; color: var(--grenat); }
.ecran.icones .sous { gap: 6px; }
.tuiles button.actif { border: 2px solid var(--grenat); background: #FBE4E2; }
/* En descendant dans une longue conversation : rangée de quatre icônes (les
   noms restent lus par les lecteurs d'écran). */
/* Conversation commencée : message de l'organisation et tuiles restent collés
   en haut (le fil a 6 px de marge en haut, 16 px sur les côtés : l'écran la recouvre pour masquer le texte
   qui passe dessous). */
.ecran.compact { min-height: 0; position: sticky; top: -6px; z-index: 2; background: var(--creme); margin: -6px -16px 0; padding: 6px 20px 8px; }
.ecran.icones { box-shadow: 0 6px 8px -8px rgba(31, 27, 24, .35); }
.ecran.icones .tuiles { grid-template-columns: repeat(4, 1fr); gap: 8px; }
.ecran.icones .tuiles button { min-height: 0; height: 48px; padding: 0; border-radius: 14px; gap: 0; }
.ecran.icones .tuiles svg { width: 24px; height: 24px; }
.ecran.icones .tuile-nom, .ecran.icones .tuile-sous { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
/* Crayon « Nouvelle conversation » : juste à gauche de la bulle Wi-Fi. */
.nouveau {
  margin-left: auto; flex: none;
  width: 36px; height: 36px; border-radius: 50%;
  display: inline-flex; align-items: center; justify-content: center;
  border: 1px solid var(--trait); background: var(--blanc); color: var(--grenat);
  padding: 0; cursor: pointer;
}
.nouveau[hidden] { display: none; }
.nouveau:disabled { opacity: .4; cursor: default; }
.nouveau + .etats { margin-left: -4px; }
.tuiles button:disabled { opacity: .6; cursor: default; }
/* Accès Premium (achat ou activation) : la tuile mise en avant. */
.tuiles button.offre { border: 2px solid var(--grenat); }
.tuiles button.offre.plein { border-color: var(--rouge); background: var(--rouge); color: #fff; }
.tuiles button.offre.plein svg, .tuiles button.offre.plein .tuile-sous { color: #fff; }
/* Urgence : rouge, et de plus en plus marquée à chaque appui (3 en 5 s). */
.tuiles button.urgence { border: 2px solid var(--rouge); color: var(--rouge); -webkit-touch-callout: none; user-select: none; -webkit-user-select: none; touch-action: none; }
.tuiles button.urgence svg, .tuiles button.urgence .tuile-sous { color: var(--rouge); }
.tuiles button.urgence[data-appuis='1'] { background: #FBE4E2; }
.tuiles button.urgence[data-appuis='2'], .tuiles button.urgence[data-appuis='3'] { background: var(--rouge); color: #fff; }
.tuiles button.urgence[data-appuis='2'] svg, .tuiles button.urgence[data-appuis='2'] .tuile-sous,
.tuiles button.urgence[data-appuis='3'] svg, .tuiles button.urgence[data-appuis='3'] .tuile-sous { color: #fff; }
.offre-bas { margin-top: auto; display: flex; flex-direction: column; gap: 8px; }
.ecran.compact .offre-bas { margin-top: 0; }
.gros-bouton { min-height: 58px; border-radius: 18px; border: 2px solid var(--grenat); background: var(--blanc); color: var(--grenat); font: 700 19px/1.2 var(--font); cursor: pointer; }
.gros-bouton.plein { border-color: var(--rouge); background: var(--rouge); color: #fff; }
.gros-bouton:disabled { opacity: .6; }
.note { margin: 0; font-size: 14px; color: var(--muted); text-align: center; }
.note.note-bas, .note.note-bas.lien-note { margin: 0; padding: 6px 16px 10px; font-size: 13px; }
.note.lien-note { font-size: 16px; font-weight: 600; color: var(--grenat); cursor: pointer; }
/* Plan : plein écran, ajusté à la hauteur ; glissé et zoomé par app.js
   (translate + scale sur une image de 2000 x 1276 « logiques »). */
.plan { position: fixed; inset: 0; z-index: 50; background: rgba(20, 16, 14, .96); display: flex; flex-direction: column; }
.plan-zone { flex: 1; position: relative; overflow: hidden; touch-action: none; cursor: grab; user-select: none; -webkit-user-select: none; }
.plan-zone.saisi { cursor: grabbing; }
.plan-zone img { position: absolute; left: 0; top: 0; width: 2000px; height: 1276px; max-width: none; transform-origin: 0 0; -webkit-user-drag: none; pointer-events: none; }
.plan-fermer { position: absolute; top: calc(10px + env(safe-area-inset-top)); right: 10px; z-index: 1; width: 44px; height: 44px; border-radius: 50%; border: 0; background: var(--blanc); color: var(--encre); display: grid; place-items: center; cursor: pointer; }
.carte { background: var(--creme); }
.carte .plan-fermer { z-index: 1000; box-shadow: 0 1px 6px rgba(0,0,0,.25); }
.carte-zone { flex: 1; }
.carte-bas { display: flex; align-items: center; gap: 8px; padding: 10px 12px calc(10px + env(safe-area-inset-bottom)); background: var(--blanc); border-top: 1px solid var(--trait); }
.carte-espace { flex: 1; }
.carte-avis { padding: 10px 14px; background: #FFF3D6; color: #5C3B00; font: 14px/1.35 var(--font); border-top: 1px solid var(--trait); }
.carte-avis[hidden] { display: none; }
.carte-tout, .carte-centrer, .carte-moi { flex: none; display: inline-flex; align-items: center; gap: 6px; font: 600 13px var(--font); padding: 7px 11px; border-radius: 999px; border: 1px solid var(--trait); background: var(--blanc); color: var(--encre); cursor: pointer; white-space: nowrap; }
.carte-moi { background: var(--rouge); border-color: var(--rouge); color: #fff; }
.point { width: 30px; height: 30px; border-radius: 50%; border: 2px solid #fff; box-shadow: 0 1px 4px rgba(0,0,0,.35); display: grid; place-items: center; color: #fff; font: 700 13px var(--font); }
.point.groupe { font-size: 14px; }
.moi-point { width: 18px; height: 18px; border-radius: 50%; background: #1E6FD9; border: 3px solid #fff; box-shadow: 0 0 0 6px rgba(30,111,217,.2); }
.carte .leaflet-popup-content { margin: 12px 14px; font: 15px var(--font); }
.carte-fiche b { display: block; margin-bottom: 8px; }
.carte-fiche .boutons-fiche { display: flex; gap: 8px; flex-wrap: wrap; }
.carte-fiche button, .carte-fiche a { font: 600 14px var(--font); padding: 7px 12px; border-radius: 999px; border: 1px solid var(--trait); background: var(--blanc); color: var(--grenat); text-decoration: none; cursor: pointer; }
.carte-fiche button.plein { background: var(--rouge); border-color: var(--rouge); color: #fff; }
.plan-aide { margin: 0; padding: 10px 16px calc(10px + env(safe-area-inset-bottom)); color: #fff; font-size: 14px; text-align: center; }
.lien { align-self: center; min-height: 44px; border: 0; background: none; color: var(--grenat); font: 600 16px/1.2 var(--font); text-decoration: underline; cursor: pointer; }
.org { background: var(--warn-bg); color: #6B4600; border-radius: 14px; padding: 12px 14px; font-size: 15px; display: flex; flex-direction: column; gap: 2px; white-space: pre-line; }
.org-compte { font-weight: 600; font-size: 13px; opacity: .7; margin-left: 4px; }
/* Minuteur : un cercle se remplit en 5 s, au rythme de la rotation des
   messages ; plein, le message suivant arrive. */
.minuteur { vertical-align: -3px; margin-left: 6px; transform: rotate(-90deg); }
.minuteur circle { fill: none; stroke: currentColor; stroke-width: 3; }
.minuteur-fond { opacity: .2; }
.minuteur-arc { stroke-dasharray: 100; stroke-dashoffset: 100; }
.minuteur.tourne .minuteur-arc { animation: minuteur 5s linear forwards; }
@keyframes minuteur { to { stroke-dashoffset: 0; } }
@media (prefers-reduced-motion: reduce) {
  .minuteur.tourne .minuteur-arc { animation: none; stroke-dashoffset: 50; }
}
#ecran-org-texte { transition: opacity .25s; }
#ecran-org-texte.fondu { opacity: 0; }
@media (prefers-reduced-motion: reduce) { #ecran-org-texte { transition: none; } }
/* Jauge de la liaison Wi-Fi (4 barres) dans le badge, sur le site. */
.signal { display: inline-flex; align-items: flex-end; gap: 2px; height: 12px; margin-left: 2px; }
.signal i { width: 3px; border-radius: 1px; background: currentColor; opacity: .25; }
.signal i:nth-child(1) { height: 4px; } .signal i:nth-child(2) { height: 7px; }
.signal i:nth-child(3) { height: 10px; } .signal i:nth-child(4) { height: 12px; }
.signal[data-barres='1'] i:nth-child(-n+1), .signal[data-barres='2'] i:nth-child(-n+2),
.signal[data-barres='3'] i:nth-child(-n+3), .signal[data-barres='4'] i { opacity: 1; }
/* Bulle Wi-Fi, calée à droite de l'en-tête. */
.etats { display: flex; flex-direction: column; align-items: flex-end; gap: 4px; min-width: 0; }

/* Liens ajoutés d'office par iOS (dates, adresses…) : apparence normale. */
a[x-apple-data-detectors] { color: inherit !important; text-decoration: none !important; }

/* Bouton d'action (paiement…) dans le fil, et pages simples (retour de paiement). */
.button {
  display: inline-block;
  padding: 10px 16px; border-radius: 999px;
  background: var(--rouge); color: #fff;
  font-weight: 600; text-decoration: none;
}
button.button { border: 0; font: inherit; font-weight: 600; cursor: pointer; }
button.button:disabled { opacity: 0.6; }
.msg.action { background: transparent; border: 0; padding: 0; }
.rdv { display: flex; flex-direction: column; gap: 8px; max-width: 320px; }
.rdv input { width: 100%; font: 16px var(--font); padding: 10px 12px; border: 1px solid var(--trait); border-radius: 12px; background: #fff; color: var(--encre); }
.rdv-props { display: flex; flex-direction: column; margin-top: -4px; border: 1px solid var(--trait); border-radius: 12px; overflow: hidden; background: #fff; }
.rdv-prop { display: flex; justify-content: space-between; gap: 8px; text-align: left; font: 15px var(--font); padding: 10px 12px; border: 0; border-top: 1px solid var(--trait); background: #fff; color: var(--encre); cursor: pointer; }
.rdv-prop:first-child { border-top: 0; }
.rdv-prop small { flex: none; color: var(--muted); font-size: 13px; }
.rdv-ligne { display: flex; gap: 8px; }
.rdv-ligne input { width: auto; flex: none; }
.rdv-pos { flex: 1; font: 600 14px var(--font); border: 1px solid var(--trait); border-radius: 12px; background: var(--creme); color: var(--grenat); cursor: pointer; }
.rdv-erreur { font-size: 13px; color: var(--rouge); }
.fiche { background: var(--blanc); border: 1px solid var(--trait); border-radius: 12px; padding: 10px 12px; margin-bottom: 8px; }
.fiche-titre { font-weight: 600; }
.fiche.avec-coeur { position: relative; padding-right: 44px; }
.fiche-coeur { position: absolute; top: 4px; right: 4px; width: 40px; height: 40px; display: flex; align-items: center; justify-content: center; border: 0; background: none; color: var(--trait); cursor: pointer; padding: 0; }
.fiche-coeur svg path { fill: transparent; stroke: #B9AFA4; }
.fiche-coeur.on svg path { fill: var(--rouge); stroke: var(--rouge); }
.fiche-meta { color: var(--muted); font-size: 14px; margin-top: 2px; }
.fiche-liens { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 14px; margin-top: 8px; }
.fiche-liens .button { padding: 8px 14px; }
.fiche-tel { color: var(--grenat); font-size: 14px; }
body.page { align-items: center; padding: 24px 16px; overflow-y: auto; }
.card { max-width: 420px; width: 100%; background: var(--blanc); border: 1px solid var(--trait); border-radius: 16px; padding: 20px; }
.card h1 { font-size: 20px; margin: 0 0 12px; }
.code { font: 600 28px/1.2 ui-monospace, SFMono-Regular, Menlo, monospace; letter-spacing: 2px; text-align: center; background: var(--creme); border-radius: 12px; padding: 12px; }

/* Prochain départ (navettes) : question du jour, puis la nuit le prochain
   départ de la ligne choisie ; orange à l'approche du dernier départ. */
.depart { background: var(--blanc); border: 1px solid var(--trait); border-radius: 14px; padding: 10px 12px; display: flex; flex-direction: column; gap: 4px; font-size: 15px; }
.depart[hidden] { display: none; }
.depart.dernier { background: var(--warn-bg); border-color: transparent; color: var(--warn); }
.depart.fini { background: var(--creme); }
.depart-tete { display: flex; align-items: center; gap: 8px; font-weight: 700; }
.depart-tete span { flex: 1; min-width: 0; }
.depart-x, .depart-lien { border: 0; background: none; color: inherit; font: 600 13px var(--font); padding: 4px; cursor: pointer; text-decoration: underline; text-underline-offset: 2px; }
.depart-x { text-decoration: none; font-size: 18px; line-height: 1; padding: 2px 4px; opacity: .7; }
.depart-heure { font-size: 26px; font-weight: 800; line-height: 1.1; }
.depart-heure small { font-size: 15px; font-weight: 600; margin-left: 6px; }
.depart-note { font-size: 13px; color: var(--muted); }
.depart.dernier .depart-note { color: inherit; }
.depart-choix { display: flex; flex-wrap: wrap; gap: 6px; }
.depart-choix button { border: 1px solid var(--trait); background: var(--creme); color: var(--encre); border-radius: 999px; padding: 6px 12px; font: 600 14px var(--font); cursor: pointer; }
.depart-groupe { font-size: 13px; color: var(--muted); margin-top: 2px; }
.depart-actions { display: flex; flex-wrap: wrap; gap: 4px 12px; }
.ecran.icones .depart { display: none; }

/* Programme instantané (tuile Programme) : la liste du jour dans le fil,
   « Maintenant » puis « Ensuite » ; Premium : un jour par pastille, un appui
   ouvre la fiche sous la ligne. */
.msg.programme { align-self: stretch; max-width: none; display: flex; flex-direction: column; gap: 6px; padding: 10px; border-radius: 16px; }
.prog-tete { display: flex; align-items: center; gap: 8px; }
.prog-titre { flex: 1; font-size: 15px; }
.prog-jours { flex: 1; min-width: 0; display: flex; gap: 6px; overflow-x: auto; scrollbar-width: none; }
.prog-jours::-webkit-scrollbar { display: none; }
.prog-jour { flex: none; border: 1px solid var(--trait); background: var(--blanc); color: var(--encre); border-radius: 999px; padding: 4px 11px; font: 600 13px var(--font); cursor: pointer; }
.prog-jour.on { background: var(--encre); border-color: var(--encre); color: var(--blanc); }
.prog-fermer { flex: none; width: 30px; height: 30px; border-radius: 50%; border: 0; background: var(--creme); color: var(--encre); font-size: 18px; line-height: 1; cursor: pointer; }
.prog-hors { font-size: 13px; color: var(--muted); background: var(--creme); border-radius: 8px; padding: 6px 8px; }
.prog-section { font-size: 12px; color: var(--muted); margin-top: 2px; }
.prog-ev { display: flex; gap: 10px; align-items: baseline; border: 1px solid var(--trait); border-radius: 10px; padding: 7px 10px; font-size: 15px; line-height: 1.3; }
.prog-ev.ouvrable { cursor: pointer; }
.prog-ev.now { border-color: #9ec5ec; background: #EAF3FC; }
.prog-h { flex: none; min-width: 44px; font-weight: 700; }
.prog-x { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.prog-l { font-size: 13px; color: var(--muted); }
.prog-vide { margin: 4px 0; color: var(--muted); font-size: 14px; }
.prog-premium { text-align: left; border: 1px solid #F2C6C1; background: #FBE4E2; color: var(--grenat); border-radius: 10px; padding: 8px 10px; font: 14px/1.35 var(--font); cursor: pointer; }
.msg.programme .fiche { margin: -2px 0 4px 54px; }

/* Fiches de Leo par 5 : « + N autres » ajoute les 5 suivantes. */
.fiches-plus { align-self: flex-start; border: 1px solid var(--trait); background: var(--blanc); color: var(--grenat); border-radius: 999px; padding: 6px 14px; font: 600 14px var(--font); cursor: pointer; }
.fiches-plus[hidden] { display: none; }

/* Ma Peña : le groupe */
.pena-carte { display: flex; align-items: center; justify-content: space-between; gap: 8px; width: 100%; background: var(--blanc); border: 1px solid var(--trait); border-radius: 14px; padding: 10px 12px; font: 15px var(--font); color: var(--encre); cursor: pointer; text-align: left; }
.pena-carte[hidden] { display: none; }
.pena-carte span { color: var(--muted); font-size: 14px; }
.pena-case { display: flex; align-items: center; gap: 8px; font-size: 15px; }
.pena-case input { width: 20px; height: 20px; flex: none; accent-color: var(--rouge); }
.pena { max-width: 340px; }
.pena-liste { display: flex; flex-direction: column; margin-top: 6px; }
.pena-membre { display: flex; align-items: center; gap: 10px; padding: 6px 0; border-top: 1px solid var(--trait); }
.pena-membre:first-child { border-top: 0; }
.pena-av { width: 30px; height: 30px; border-radius: 50%; flex: none; display: flex; align-items: center; justify-content: center; font-weight: 700; background: var(--creme); color: var(--grenat); }
.pena-membre.cache .pena-av { background: none; border: 1px solid var(--trait); color: var(--muted); }
.pena-qui { display: flex; flex-direction: column; min-width: 0; }
.pena-qui small { color: var(--muted); font-size: 13px; }
.pena-fil { display: flex; flex-direction: column; gap: 6px; max-height: 300px; overflow-y: auto; margin: 8px 0; }
.pena-msg { align-self: flex-start; max-width: 85%; display: flex; flex-direction: column; background: var(--creme); border-radius: 12px; padding: 6px 10px; overflow-wrap: anywhere; }
.pena-msg.moi { align-self: flex-end; background: var(--grenat); color: #fff; }
.pena-msg small { font-size: 12px; opacity: .75; }
.pena-ecrire { display: flex; gap: 8px; }
.pena-ecrire input { flex: 1; min-width: 0; font: 16px var(--font); padding: 10px 12px; border: 1px solid var(--trait); border-radius: 12px; background: #fff; color: var(--encre); }
.pena-ecran { position: fixed; inset: 0; z-index: 45; background: var(--creme); display: flex; flex-direction: column; }
.pena-ecran[hidden] { display: none; }
.pena-haut { display: flex; align-items: center; gap: 2px; padding: calc(8px + env(safe-area-inset-top)) 6px 8px; background: var(--blanc); border-bottom: 1px solid var(--trait); }
.pena-icone { flex: none; width: 42px; height: 42px; border-radius: 50%; border: 0; background: none; color: var(--grenat); display: grid; place-items: center; cursor: pointer; }
.pena-icone.retour { color: var(--encre); }
.pena-icone[aria-pressed="true"] { background: var(--creme); }
.pena-icone[hidden] { display: none; }
.pena-titre { flex: 1; min-width: 0; display: flex; flex-direction: column; padding: 0 4px; }
.pena-titre b { font-size: 17px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.pena-titre small { color: var(--muted); font-size: 13px; }
.pena-avis { padding: 8px 14px; background: #FFF3D6; color: #5C3B00; font-size: 14px; line-height: 1.35; }
.pena-avis[hidden] { display: none; }
.pena-corps { flex: 1; min-height: 0; overflow-y: auto; padding: 12px; -webkit-overflow-scrolling: touch; }
.pena-pied { background: var(--blanc); border-top: 1px solid var(--trait); padding: 8px 10px calc(8px + env(safe-area-inset-bottom)); }
.pena-ecran .pena-fil { max-height: none; overflow: visible; margin: 0; gap: 8px; }
.pena-ecran .pena-msg { background: var(--blanc); border: 1px solid var(--trait); border-radius: 16px; padding: 7px 11px; }
.pena-ecran .pena-msg.moi { background: var(--grenat); border-color: var(--grenat); }
.pena-msg b { font-size: 12px; color: var(--grenat); }
.pena-ecran .pena-msg small { align-self: flex-end; font-size: 11px; }
.pena-sys { align-self: center; font-size: 12px; color: var(--muted); background: rgba(0,0,0,.05); padding: 3px 10px; border-radius: 999px; text-align: center; }
.pena-ecran .pena-ecrire input { border-radius: 999px; padding: 10px 14px; }
.pena-envoyer { flex: none; width: 44px; height: 44px; border-radius: 50%; border: 0; background: var(--rouge); color: #fff; display: grid; place-items: center; cursor: pointer; }
.pena-envoyer:disabled { opacity: .6; }
.pena-ecran .pena-liste { background: var(--blanc); border: 1px solid var(--trait); border-radius: 14px; padding: 4px 12px; margin: 0 0 10px; }
.pena-voir { width: 100%; }
.pena-note { margin-top: 6px; text-align: center; color: var(--muted); font-size: 13px; }
.ami-point { width: 28px; height: 28px; border-radius: 50%; background: var(--grenat); color: #fff; border: 2px solid #fff; display: flex; align-items: center; justify-content: center; font: 700 13px var(--font); box-shadow: 0 1px 4px rgba(0,0,0,.35); }
.ami-point.zone { background: #fff; color: var(--grenat); border-color: var(--grenat); border-style: dashed; }
