/* ==========================================================================
   Le groupe Famille — « dimanche matin en famille ».
   Papier, bois, lumière chaude ; rien d'un écran de hacker, rien d'un bureau.
   Mobile : le téléphone est plein écran. Ordinateur : il est posé sur la table.
   Contrat : CONCEPTION.md § 1 et § 9 (contrastes AA, cibles 44 px, mouvement).
   ========================================================================== */

:root {
  --creme: #FBF6EE;
  --papier: #FFFDF8;
  --encre: #2B2420;
  --encre-douce: #5E534B;
  /* Texte des cartes d'outil, y compris à l'état « déjà utilisé » (fond rayé) :
     contraste mesuré 9,9:1 sur papier, 9,4:1 sur crème, 9,3:1 sur les rayures. */
  --encre-outil: #4A4038;
  --terracotta: #B4462E;
  --terracotta-clair: #F6DDD2;
  --sauge: #3F6544;
  --moutarde: #E0A82E;
  --moutarde-fonce: #6B4600;
  --rouge: #A3211A;
  --ciel: #2F5F80;

  --bord: rgba(43, 36, 32, .12);
  --bord-fin: rgba(43, 36, 32, .075);
  --kraft: #E7D3AC;
  --ombre-1: 0 1px 2px rgba(43, 36, 32, .07), 0 8px 20px -14px rgba(43, 36, 32, .5);
  --ombre-2: 0 2px 6px rgba(43, 36, 32, .10), 0 22px 44px -24px rgba(43, 36, 32, .55);
  --police: system-ui, -apple-system, "Segoe UI", Roboto, "Noto Sans", sans-serif;
  --police-titre: Georgia, "DejaVu Serif", serif;
  --barre-etat: 38px;

  /* Grain papier : deux trames croisées, à peine visibles. */
  --grain-papier:
    repeating-linear-gradient(0deg, rgba(43, 36, 32, .018) 0 1px, transparent 1px 4px),
    repeating-linear-gradient(90deg, rgba(43, 36, 32, .014) 0 1px, transparent 1px 4px);
  --souffle-chaud:
    radial-gradient(120% 60% at 50% -8%, rgba(224, 168, 46, .10), transparent 62%),
    radial-gradient(80% 55% at 100% 104%, rgba(180, 70, 46, .055), transparent 62%);
}

* { box-sizing: border-box; }

html, body {
  height: 100%;
  margin: 0;
}

body {
  font-family: var(--police);
  font-size: 16px;
  line-height: 1.45;
  color: var(--encre);
  background: var(--creme);
  -webkit-font-smoothing: antialiased;
  overscroll-behavior: none;
}

[hidden] { display: none !important; }

button { font: inherit; color: inherit; }
svg { display: block; }

/* Visuellement caché, lisible par les lecteurs d'écran. */
.sr {
  position: absolute;
  width: 1px;
  height: 1px;
  margin: -1px;
  padding: 0;
  overflow: hidden;
  clip: rect(0 0 0 0);
  clip-path: inset(50%);
  white-space: nowrap;
  border: 0;
}

/* Focus visible : épais, terracotta, toujours détaché du fond.
   Pas de border-radius ici : il écraserait les coins des éléments focusés. */
:focus-visible {
  outline: 3px solid var(--terracotta);
  outline-offset: 2px;
}

/* Un élément non interactif focalisé par programme (tabindex="-1") — titre du
   fil, titre d'une feuille, résultat d'outil — est un repère pour les lecteurs
   d'écran, pas une cible : aucun cadre de focus, même quand le navigateur le
   croit « focus visible ». Les vrais contrôles gardent leur contour épais. */
[tabindex="-1"]:focus,
[tabindex="-1"]:focus-visible {
  outline: none;
}

.sans-js {
  max-width: 34rem;
  margin: 2rem auto;
  padding: 1rem 1.2rem;
  background: var(--papier);
  border-radius: 16px;
  box-shadow: var(--ombre-1);
}

/* ==========================================================================
   Le bureau (ordinateur) et le téléphone.
   ========================================================================== */

.bureau {
  min-height: 100vh;
  min-height: 100dvh;
  display: grid;
  /* La colonne se cale sur le cadre, jamais sur le contenu : sans ce minmax(0, 1fr),
     la piste implicite `auto` s'élargit jusqu'au contenu du fil et le téléphone
     déborde de l'écran (aperçus de messages non tronqués). */
  grid-template-columns: minmax(0, 1fr);
  place-items: center;
  padding: 24px 16px;
  background-color: #E9DCC3;
  background-image:
    radial-gradient(120% 90% at 50% 38%, rgba(255, 255, 255, .28), transparent 58%),
    radial-gradient(135% 105% at 50% 50%, transparent 42%, rgba(60, 30, 10, .22) 100%),
    url('../../../img/fond-table.webp'),
    linear-gradient(168deg, #F2E4C9 0%, #E4CDA8 55%, #D6B68C 100%);
  background-size: cover, cover, cover, cover;
  background-position: center;
  background-repeat: no-repeat;
}

.telephone {
  position: relative;
  width: 400px;
  max-width: 100%;
  min-width: 0; /* jamais plus large que sa piste : le contenu ne l'étire pas */
  height: min(860px, calc(100vh - 48px));
  height: min(860px, calc(100dvh - 48px));
}

.coque {
  position: relative;
  height: 100%;
  padding: 10px;
  border-radius: 46px;
  background: #1d1a18;
  box-shadow:
    0 0 0 1px rgba(255, 255, 255, .07) inset,
    0 2px 3px rgba(255, 255, 255, .10) inset,
    0 46px 90px -28px rgba(60, 28, 8, .62),
    0 12px 32px -12px rgba(60, 28, 8, .38);
}

.encoche {
  position: absolute;
  z-index: 12;
  top: 10px;
  left: 50%;
  transform: translateX(-50%);
  width: 116px;
  height: 25px;
  border-radius: 0 0 15px 15px;
  background: #1d1a18;
}

.ecran {
  position: relative;
  display: flex;
  flex-direction: column;
  height: 100%;
  overflow: hidden;
  border-radius: 37px;
  background-color: var(--creme);
  background-image: var(--souffle-chaud), var(--grain-papier);
  color: var(--encre);
}

/* ==========================================================================
   Barre d'état du téléphone.
   ========================================================================== */

.barre-etat {
  flex: 0 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  height: var(--barre-etat);
  padding: 0 22px 0 26px;
  font-size: 13px;
  font-variant-numeric: tabular-nums;
  color: var(--encre);
}

.barre-etat__heure { font-weight: 650; }
/* Heure et lieu restent à gauche : au centre, l'encoche les recouvrirait. */
.barre-etat__lieu { margin-right: auto; font-weight: 500; color: var(--encre-douce); letter-spacing: .01em; }
.barre-etat__pile { display: inline-flex; align-items: center; gap: 5px; }
.barre-etat__pct { font-size: 11.5px; color: var(--encre-douce); }

.pile {
  position: relative;
  display: inline-block;
  width: 22px;
  height: 11px;
  border: 1.5px solid var(--encre);
  border-radius: 3.5px;
}

.pile::after {
  content: '';
  position: absolute;
  top: 50%;
  right: -4px;
  width: 2px;
  height: 5px;
  transform: translateY(-50%);
  border-radius: 0 2px 2px 0;
  background: var(--encre);
  opacity: .55;
}

.pile__niveau {
  display: block;
  height: 100%;
  width: 82%;
  border-radius: 1.5px;
  background: var(--encre);
  opacity: .78;
  transition: width .6s linear;
}

/* ==========================================================================
   Vue et surcouches.
   ========================================================================== */

.vue {
  position: relative;
  flex: 1 1 auto;
  display: flex;
  flex-direction: column;
  min-height: 0;
}

.surcouche {
  position: absolute;
  inset: 0;
  z-index: 30;
  pointer-events: none;
}

.feuilles {
  position: absolute;
  inset: 0;
  z-index: 40;
  pointer-events: none;
}

/* ==========================================================================
   Écran verrouillé (accueil).
   ========================================================================== */

.verrou {
  flex: 1 1 auto;
  min-height: 0;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  gap: 14px;
  padding: 4px 16px 22px;
  background-image:
    radial-gradient(90% 46% at 76% 2%, rgba(255, 219, 150, .85), transparent 64%),
    repeating-linear-gradient(104deg, rgba(255, 255, 255, .16) 0 38px, transparent 38px 92px),
    radial-gradient(120% 70% at 8% 102%, rgba(224, 168, 46, .26), transparent 62%),
    linear-gradient(168deg, #FCE9C8 0%, #F8DEC4 38%, #F2CDB4 70%, #ECBFA6 100%);
}

.verrou__heure {
  margin: 26px 0 0;
  text-align: center;
  font-family: var(--police-titre);
  font-size: 72px;
  line-height: 1;
  font-weight: 400;
  letter-spacing: -.03em;
  color: #4A3A2E;
  text-shadow: 0 1px 0 rgba(255, 255, 255, .5);
}

.verrou__date {
  margin: -2px 0 10px;
  text-align: center;
  font-size: 15px;
  letter-spacing: .16em;
  text-transform: uppercase;
  color: #654A31;
}

.notifs {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.notif {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  padding: 10px 12px;
  border-radius: 18px;
  background: rgba(255, 253, 248, .74);
  border: 1px solid rgba(255, 255, 255, .7);
  box-shadow: 0 6px 16px -12px rgba(80, 48, 20, .7);
  backdrop-filter: blur(6px);
  animation: notif-arrive .5s cubic-bezier(.2, .8, .2, 1) backwards;
}

.notif:nth-child(2) { animation-delay: .12s; }

.notif__avatar {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  object-fit: cover;
  flex: 0 0 auto;
  box-shadow: 0 0 0 1px rgba(43, 36, 32, .08);
}

.notif__contenu { flex: 1 1 auto; min-width: 0; }
.notif__ligne { display: flex; align-items: baseline; justify-content: space-between; gap: 8px; margin: 0; }
.notif__nom { font-size: 13.5px; font-weight: 700; }
.notif__quand { font-size: 11.5px; color: #654A31; }
.notif__texte { margin: 2px 0 0; font-size: 13.5px; color: #4A3A2E; }

.carte-accueil {
  margin-top: 2px;
  padding: 16px 16px 14px;
  border-radius: 24px;
  background: rgba(255, 253, 248, .9);
  border: 1px solid rgba(255, 255, 255, .8);
  box-shadow: var(--ombre-2);
}

.carte-accueil__titre {
  margin: 0;
  font-family: var(--police-titre);
  font-size: 25px;
  line-height: 1.15;
  letter-spacing: -.01em;
}

.carte-accueil__sous {
  margin: 3px 0 10px;
  font-size: 13.5px;
  font-weight: 600;
  color: var(--terracotta);
}

.carte-accueil__pitch { margin: 0 0 7px; font-size: 14.5px; color: var(--encre-douce); }

.carte-accueil__form { margin: 14px 0 0; display: flex; flex-direction: column; gap: 10px; }

.champ { margin: 0; }
.champ__label { display: block; margin-bottom: 5px; font-size: 13.5px; font-weight: 650; }

.champ__input {
  width: 100%;
  min-height: 46px;
  padding: 0 12px;
  font-size: 16px;
  color: var(--encre);
  background: var(--papier);
  border: 1.5px solid var(--bord);
  border-radius: 13px;
  box-shadow: 0 1px 0 rgba(255, 255, 255, .8) inset;
}

.champ__input:focus-visible { outline-offset: 0; border-color: var(--terracotta); }

.case {
  display: flex;
  align-items: center;
  gap: 10px;
  min-height: 46px;
  padding: 8px 12px;
  font-size: 14px;
  border-radius: 14px;
  background: rgba(224, 168, 46, .13);
  border: 1px solid rgba(224, 168, 46, .45);
  cursor: pointer;
}

.case__input { width: 20px; height: 20px; accent-color: var(--terracotta); flex: 0 0 auto; }
.case__texte { min-width: 0; }

.carte-accueil__graine { margin: 10px 0 0; text-align: center; font-size: 12px; color: var(--encre-douce); letter-spacing: .04em; }
.carte-accueil__retour { margin: 8px 0 0; text-align: center; }
.lien-retour { display: inline-flex; align-items: center; gap: 4px; min-height: 44px; padding: 0 12px; font-size: 14px; font-weight: 600; color: var(--encre-douce); text-decoration: underline; text-underline-offset: 3px; }
.lien-retour--bureau { position: fixed; top: 16px; left: 16px; z-index: 5; background: var(--papier); border-radius: 999px; box-shadow: var(--ombre-1); text-decoration: none; color: var(--encre); }
.lien-retour--bureau:hover { background: var(--creme); }
@media (max-width: 899px) { .lien-retour--bureau { display: none; } }
@media (min-width: 900px) { .lien-retour--carte { display: none; } }
.lien-retour:focus-visible { outline: 3px solid var(--terracotta); outline-offset: 2px; border-radius: 8px; }

/* Boutons. */
.bouton {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 46px;
  padding: 11px 18px;
  font-size: 15.5px;
  font-weight: 650;
  border: 1.5px solid transparent;
  border-radius: 15px;
  background: var(--terracotta);
  color: #fff;
  box-shadow: var(--ombre-1);
  cursor: pointer;
  text-decoration: none;
  transition: transform .12s ease, box-shadow .18s ease, background-color .18s ease;
}

.bouton:hover { background: #A63E28; }
.bouton:active { transform: translateY(1px); }
.bouton--principal { width: 100%; }
.bouton--ligne { background: var(--papier); color: var(--terracotta); border-color: var(--terracotta); }
.bouton--ligne:hover { background: rgba(180, 70, 46, .08); }
.bouton--sauge { background: var(--sauge); }
.bouton--sauge:hover { background: #365839; }
.bouton__note { font-size: 12.5px; font-weight: 600; opacity: .9; }
.bouton__icone svg { width: 20px; height: 20px; }

/* ==========================================================================
   Liste des conversations.
   ========================================================================== */

.liste {
  flex: 1 1 auto;
  display: flex;
  flex-direction: column;
  min-height: 0;
  min-width: 0; /* laisse la troncature des aperçus agir au lieu d'élargir le téléphone */
}

.liste__entete { padding: 14px 20px 8px; }
.liste__titre { margin: 0; font-family: var(--police-titre); font-size: 29px; letter-spacing: -.01em; }
.liste__sous { margin: 2px 0 0; font-size: 13px; color: var(--encre-douce); }

.conversations {
  flex: 1 1 auto;
  min-height: 0;
  min-width: 0;
  overflow-y: auto;
  list-style: none;
  margin: 0;
  padding: 4px 10px 18px;
  display: flex;
  flex-direction: column;
  gap: 2px;
}

/* Chaque rangée reste dans le cadre : ni la ligne de nom ni l'aperçu ne poussent. */
.conversation { min-width: 0; }

.conversation__bouton {
  display: flex;
  align-items: center;
  gap: 12px;
  width: 100%;
  min-height: 76px;
  padding: 10px;
  text-align: left;
  background: transparent;
  border: 0;
  border-radius: 18px;
  cursor: pointer;
  transition: background-color .15s ease;
}

.conversation__bouton:hover { background: rgba(43, 36, 32, .05); }
.conversation__texte { display: flex; flex-direction: column; gap: 3px; min-width: 0; flex: 1 1 auto; }
.conversation__ligne { display: flex; align-items: baseline; justify-content: space-between; gap: 10px; min-width: 0; }
.conversation__nom {
  min-width: 0;
  overflow: hidden;
  white-space: nowrap;
  text-overflow: ellipsis;
  font-size: 15.5px;
  font-weight: 700;
}
.conversation__heure { flex: 0 0 auto; font-size: 12px; color: var(--encre-douce); font-variant-numeric: tabular-nums; }
.conversation__apercu { display: flex; align-items: center; gap: 8px; min-width: 0; }
.conversation__apercu-texte {
  flex: 1 1 auto;
  min-width: 0;
  overflow: hidden;
  white-space: nowrap;
  text-overflow: ellipsis;
  font-size: 13.5px;
  color: var(--encre-douce);
}

.pastille-nonlus {
  flex: 0 0 auto;
  min-width: 22px;
  height: 22px;
  padding: 0 7px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 12px;
  font-weight: 700;
  color: #fff;
  background: var(--terracotta);
  border-radius: 999px;
  box-shadow: 0 2px 6px -3px rgba(43, 36, 32, .8);
}

/* Personne n'a encore écrit en privé : une tasse et un mot d'ambiance tiennent
   compagnie sous la conversation du groupe. Disparaît dès la deuxième. */
.conversations__ambiance {
  flex: 1 1 auto;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 10px;
  min-height: 0;
  padding: 24px 26px 52px;
  text-align: center;
  color: var(--encre-douce);
}

.conversations__ambiance-icone { color: currentColor; opacity: .75; }
.conversations__ambiance-icone svg { width: 32px; height: 32px; }
.conversations__ambiance-texte { margin: 0; max-width: 16rem; font-size: 13.5px; line-height: 1.5; }

/* Anneau de patience autour de l'avatar + pastille de texte. */
.avatar {
  position: relative;
  flex: 0 0 auto;
  display: block;
  width: 56px;
  height: 56px;
  padding: 3px;
  border-radius: 50%;
  background: conic-gradient(from -90deg, var(--anneau, rgba(43, 36, 32, .08)) var(--angle, 0deg), rgba(43, 36, 32, .08) 0);
}

.avatar__image,
.avatar .mosaique { width: 100%; height: 100%; border-radius: 50%; }

.avatar__image { object-fit: cover; display: block; background: var(--papier); }

.mosaique {
  display: grid;
  grid-template-columns: 1fr 1fr;
  grid-template-rows: 1fr 1fr;
  gap: 1px;
  overflow: hidden;
  background: var(--papier);
}

.mosaique img { width: 100%; height: 100%; object-fit: cover; display: block; }

.avatar[data-niveau="1"] { --anneau: var(--sauge); }
.avatar[data-niveau="2"] { --anneau: var(--moutarde); }
.avatar[data-niveau="3"] { --anneau: var(--rouge); animation: battement 2.4s ease-in-out infinite; }

.attente {
  align-self: flex-start;
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 2px 9px;
  font-size: 12px;
  font-weight: 700;
  border-radius: 999px;
}

.attente::before {
  content: '';
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: currentColor;
}

.attente[data-niveau="1"] { color: var(--sauge); background: rgba(63, 101, 68, .14); }
.attente[data-niveau="2"] { color: var(--moutarde-fonce); background: rgba(224, 168, 46, .30); }
.attente[data-niveau="3"] { color: var(--rouge); background: rgba(163, 33, 26, .14); }

/* Carte « Le lendemain ». */
.carte-lendemain {
  display: flex;
  flex-direction: column;
  gap: 2px;
  width: calc(100% - 24px);
  margin: 4px 12px 10px;
  padding: 13px 16px;
  text-align: left;
  border: 1.5px solid rgba(63, 101, 68, .5);
  border-radius: 20px;
  background: linear-gradient(180deg, rgba(63, 101, 68, .10), rgba(63, 101, 68, .05));
  box-shadow: var(--ombre-1);
  cursor: pointer;
  animation: entree-douce .5s cubic-bezier(.2, .8, .2, 1) backwards;
}

.carte-lendemain__kicker { font-size: 12px; font-weight: 700; letter-spacing: .1em; text-transform: uppercase; color: var(--sauge); }
.carte-lendemain__titre { display: flex; align-items: center; justify-content: space-between; font-family: var(--police-titre); font-size: 20px; }
.carte-lendemain__fleche { font-family: var(--police); font-size: 20px; color: var(--sauge); }

/* ==========================================================================
   Fil de discussion.
   ========================================================================== */

.fil {
  flex: 1 1 auto;
  display: flex;
  flex-direction: column;
  min-height: 0;
}

.fil__entete {
  flex: 0 0 auto;
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 8px 12px 9px;
  background: rgba(255, 253, 248, .9);
  border-bottom: 1px solid var(--bord-fin);
  box-shadow: 0 6px 16px -16px rgba(43, 36, 32, .8);
  backdrop-filter: blur(6px);
}

.fil__retour {
  flex: 0 0 auto;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 44px;
  height: 44px;
  border: 0;
  border-radius: 14px;
  background: transparent;
  color: var(--terracotta);
  cursor: pointer;
}

.fil__retour svg { width: 26px; height: 26px; }
.fil__retour:hover { background: rgba(180, 70, 46, .1); }

.fil__avatar.avatar { width: 42px; height: 42px; padding: 2px; }
.fil__qui { min-width: 0; flex: 1 1 auto; }
.fil__nom { margin: 0; font-size: 17px; font-weight: 700; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.fil__sous { margin: 0; font-size: 12px; color: var(--encre-douce); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

.fil__reglages {
  flex: 0 0 auto;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 44px;
  height: 44px;
  border: 1.5px solid var(--bord);
  border-radius: 14px;
  background: var(--papier);
  color: var(--encre-douce);
  cursor: pointer;
}

.fil__reglages svg { width: 22px; height: 22px; }
.fil__reglages:hover { color: var(--terracotta); border-color: var(--terracotta); }

.fil__corps {
  flex: 1 1 auto;
  min-height: 0;
  overflow-y: auto;
  padding: 14px 12px 10px;
  display: flex;
  flex-direction: column;
  gap: 5px;
  overscroll-behavior: contain;
}

/* Zone défilante atteignable au clavier (tabindex="0") : indicateur net, rentré. */
.fil__corps:focus-visible {
  outline: 3px solid var(--terracotta);
  outline-offset: -3px;
}

.fil__pied {
  flex: 0 0 auto;
  max-height: 62%;
  overflow-y: auto;
  background: rgba(255, 253, 248, .95);
  border-top: 1px solid var(--bord-fin);
  backdrop-filter: blur(6px);
}

/* Rangées et bulles. */
.rangee { display: flex; align-items: flex-end; gap: 7px; }
.rangee--recue { justify-content: flex-start; }
.rangee--moi { justify-content: flex-end; }
.rangee--systeme { justify-content: center; }
.rangee__avatar { width: 26px; flex: 0 0 auto; }

.mini-avatar {
  width: 26px;
  height: 26px;
  border-radius: 50%;
  object-fit: cover;
  display: block;
  background: var(--papier);
  box-shadow: 0 0 0 1.5px rgba(43, 36, 32, .07);
}

.mini-avatar--inconnu,
.mini-avatar--systeme,
.mini-avatar--groupe {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 14px;
  font-weight: 700;
  color: var(--encre-douce);
  background: rgba(43, 36, 32, .08);
}

.mini-avatar--systeme svg { width: 15px; height: 15px; }

.bulle {
  max-width: 78%;
  padding: 9px 13px 10px;
  border-radius: 19px;
  font-size: 15.5px;
  line-height: 1.42;
  box-shadow: var(--ombre-1);
}

.bulle--recue { background: var(--papier); border: 1px solid var(--bord-fin); border-bottom-left-radius: 19px; }
.bulle--moi { background: var(--terracotta-clair); border: 1px solid rgba(180, 70, 46, .18); border-bottom-right-radius: 19px; }
.bulle--fin.bulle--recue { border-bottom-left-radius: 6px; }
.bulle--fin.bulle--moi { border-bottom-right-radius: 6px; }

.bulle__nom { margin: 0 0 2px; font-size: 12.5px; font-weight: 700; color: var(--proche, var(--encre-douce)); }
.bulle__texte { margin: 0; white-space: pre-wrap; overflow-wrap: anywhere; }
.bulle--neuve { animation: entree-bulle .3s cubic-bezier(.2, .8, .2, 1) backwards; }

/* Intrusion : la surprise. */
.bulle--intrusion {
  background: var(--terracotta-clair);
  border: 2px dashed var(--moutarde);
  border-bottom-right-radius: 6px;
}

.bulle--intrusion.bulle--neuve { animation: entree-bulle .3s cubic-bezier(.2, .8, .2, 1) backwards, secousse .5s ease-in-out .3s; }

.bulle__alerte {
  display: flex;
  align-items: center;
  gap: 6px;
  margin: 0 0 6px;
  font-size: 12px;
  font-weight: 700;
  color: var(--rouge);
}

.bulle__alerte-icone svg { width: 16px; height: 16px; }

/* Moment fort : la bulle de Mamie, mise en valeur. */
.bulle--moment {
  max-width: 86%;
  padding: 14px 16px 15px;
  font-size: 16.5px;
  background: linear-gradient(180deg, #FFF7E4, var(--papier));
  border: 1.5px solid rgba(224, 168, 46, .75);
  box-shadow: 0 0 0 6px rgba(224, 168, 46, .14), 0 16px 30px -20px rgba(120, 80, 10, .8);
}

/* Le cœur suffit à marquer la bulle : plus d'étiquette visible « Moment fort »,
   qui cassait l'immersion (la mention reste en sr-only). */
.systeme {
  max-width: 86%;
  margin: 4px 0;
  padding: 6px 13px;
  text-align: center;
  font-size: 12.5px;
  color: var(--encre-douce);
  background: rgba(43, 36, 32, .06);
  border-radius: 999px;
}

/* « X écrit… » */
.frappe {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin: 2px 0;
  padding: 8px 13px;
  background: var(--papier);
  border: 1px solid var(--bord-fin);
  border-radius: 19px 19px 19px 6px;
  box-shadow: var(--ombre-1);
}

.frappe__nom { font-size: 13px; color: var(--encre-douce); }

.points { display: inline-flex; gap: 4px; }
.points i {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--encre-douce);
  opacity: .45;
  animation: point-frappe 1.05s ease-in-out infinite;
}

.points i:nth-child(2) { animation-delay: .16s; }
.points i:nth-child(3) { animation-delay: .32s; }

/* ==========================================================================
   Carte d'objet transféré.
   ========================================================================== */

.carte-objet {
  max-width: 84%;
  overflow: hidden;
  background: var(--papier);
  border: 1px solid var(--bord);
  border-radius: 18px;
  box-shadow: var(--ombre-1);
  animation: entree-bulle .3s cubic-bezier(.2, .8, .2, 1) backwards;
}

.carte-objet__bandeau {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  padding: 7px 12px;
  font-size: 12px;
  color: var(--ciel);
  background: rgba(47, 95, 128, .09);
  border-bottom: 1px solid rgba(47, 95, 128, .16);
}

.carte-objet__transfere { font-weight: 700; letter-spacing: .02em; }
.carte-objet__type { display: inline-flex; align-items: center; gap: 5px; font-weight: 600; text-transform: uppercase; letter-spacing: .06em; font-size: 11px; }
.carte-objet__icone svg { width: 17px; height: 17px; }

.carte-objet__expediteur {
  margin: 0;
  padding: 9px 12px 0;
  font-size: 12.5px;
  font-weight: 700;
  color: var(--encre-douce);
  font-variant-numeric: tabular-nums;
  overflow-wrap: anywhere;
}

.carte-objet__corps { margin: 0; padding: 5px 12px 12px; font-size: 15px; line-height: 1.42; overflow-wrap: anywhere; }

.lien { color: var(--ciel); text-decoration: underline; text-underline-offset: 2px; }

.carte-objet__examine { margin: 0; padding: 0 12px 10px; font-size: 12.5px; color: var(--encre-douce); }
.mini-tampon { display: flex; align-items: center; gap: 7px; margin: 0; font-size: 12px; color: var(--encre-douce); }
.mini-tampon__etiquette { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

.carte-objet__pied { padding: 0 12px 12px; }
.bouton--inspecter {
  box-sizing: border-box;
  width: 100%;
  min-width: 0;
  min-height: 46px;
  margin: 0;
  border: 1.5px solid var(--ciel);
  border-radius: 12px;
  background: var(--ciel);
  box-shadow: none;
  overflow: hidden;
}
.bouton--inspecter:hover { background: #28506C; border-color: #28506C; }

/* Tampons. */
.tampon {
  display: inline-block;
  padding: 3px 8px;
  font-size: 11.5px;
  font-weight: 800;
  letter-spacing: .12em;
  border: 3px double var(--encre-douce);
  border-radius: 7px;
  color: var(--encre-douce);
  transform: rotate(-4deg);
  white-space: nowrap;
}

.tampon--mini { font-size: 10px; padding: 2px 6px; border-width: 2.5px; }

/* ==========================================================================
   Réponses rapides et actions de groupe.
   ========================================================================== */

.reponses { padding: 12px 12px 14px; display: flex; flex-direction: column; gap: 8px; }
.reponses--feuille { padding: 0; }

.reponses__titre { margin: 0; font-size: 13px; font-weight: 700; color: var(--encre-douce); }

.reponses__puces { display: flex; flex-wrap: wrap; gap: 6px; }

.puce {
  min-height: 44px; /* cible tactile : jamais moins de 44 px */
  padding: 8px 14px;
  font-size: 13px;
  font-weight: 650;
  color: var(--encre-douce);
  background: var(--papier);
  border: 1.5px solid var(--bord);
  border-radius: 999px;
  cursor: pointer;
}

.puce--active { color: #fff; background: var(--terracotta); border-color: var(--terracotta); }

.suggestions { display: flex; flex-direction: column; gap: 8px; }

.suggestion {
  display: flex;
  align-items: center;
  gap: 10px;
  width: 100%;
  min-height: 48px;
  padding: 10px 13px;
  text-align: left;
  font-size: 14.5px;
  line-height: 1.35;
  color: var(--encre);
  background: var(--papier);
  border: 1.5px solid rgba(180, 70, 46, .45);
  border-radius: 16px 16px 16px 6px;
  box-shadow: var(--ombre-1);
  cursor: pointer;
  transition: transform .12s ease, background-color .15s ease, border-color .15s ease;
}

.suggestion:hover { background: rgba(180, 70, 46, .07); border-color: var(--terracotta); }
.suggestion:active { transform: translateY(1px); }
.suggestion__texte { flex: 1 1 auto; }
.suggestion__icone { flex: 0 0 auto; color: var(--terracotta); }
.suggestion__icone svg { width: 20px; height: 20px; }

.actions-groupe { display: flex; flex-direction: column; gap: 8px; padding: 12px 12px 4px; }
.actions-groupe .bouton { width: 100%; }

.etat-action {
  display: flex;
  align-items: center;
  gap: 8px;
  margin: 0;
  padding: 10px 13px;
  font-size: 13.5px;
  font-weight: 600;
  border-radius: 14px;
}

.etat-action--ok { color: var(--sauge); background: rgba(63, 101, 68, .12); border: 1px solid rgba(63, 101, 68, .3); }
.etat-action__icone svg { width: 18px; height: 18px; }

/* ==========================================================================
   Feuilles (table d'inspection, réglages).
   ========================================================================== */

.feuille-cadre {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: flex-end;
  pointer-events: auto;
  /* Seul le voile s'estompe : la feuille, elle, reste toujours opaque.
     (Une opacité sur le cadre rendait la feuille translucide en plein fondu,
     et le fil se voyait au travers.) */
  background-color: rgba(43, 36, 32, 0);
  transition: background-color .25s ease;
}

.feuille-cadre--visible { background-color: rgba(43, 36, 32, .45); }

.feuille {
  display: flex;
  flex-direction: column;
  width: 100%;
  height: 88%;
  overflow: hidden;
  /* Opaque : fond crème plein + texture papier, rien ne transparaît dessous. */
  background-color: var(--creme);
  background-image: var(--grain-papier), var(--souffle-chaud);
  border-radius: 28px 28px 0 0;
  box-shadow: 0 -20px 44px -20px rgba(43, 36, 32, .65);
  transform: translateY(4%);
  transition: transform .32s cubic-bezier(.2, .8, .2, 1);
}

.feuille--visible { transform: translateY(0); }

.feuille__poignee {
  width: 52px;
  height: 5px;
  margin: 9px auto 2px;
  border-radius: 999px;
  background: rgba(43, 36, 32, .18);
}

.feuille__entete {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 6px 16px 10px;
  border-bottom: 1px solid var(--bord-fin);
}

/* Le titre reçoit le focus à l'ouverture de la feuille (repère pour les
   lecteurs d'écran) : c'est un [tabindex="-1"], donc aucun cadre de focus —
   règle générale près de :focus-visible. */
.feuille__titre { margin: 0; font-family: var(--police-titre); font-size: 22px; }

.bouton-fermer {
  min-height: 44px;
  padding: 8px 16px;
  font-size: 14.5px;
  font-weight: 650;
  color: var(--encre);
  background: rgba(43, 36, 32, .06);
  border: 0;
  border-radius: 13px;
  cursor: pointer;
}

.bouton-fermer:hover { background: rgba(43, 36, 32, .11); }

.feuille__corps { flex: 1 1 auto; min-height: 0; overflow-y: auto; padding: 14px 16px 26px; }
.feuille__sous-titre { margin: 18px 0 8px; font-size: 13px; font-weight: 800; letter-spacing: .1em; text-transform: uppercase; color: var(--encre-douce); }

.etat-proche { display: flex; flex-direction: column; gap: 8px; }
.etat-proche__ligne { margin: 0; font-size: 15px; display: flex; align-items: center; gap: 7px; flex-wrap: wrap; }
.etat-proche__point { color: var(--encre-douce); }
.etat-proche__ligne .attente { align-self: center; }

.jauge { height: 10px; border-radius: 999px; background: rgba(43, 36, 32, .1); overflow: hidden; }
.jauge__remplissage { height: 100%; width: 0; border-radius: inherit; background: var(--sauge); transition: width .3s linear; }
.jauge[data-niveau="2"] .jauge__remplissage { background: var(--moutarde); }
.jauge[data-niveau="3"] .jauge__remplissage { background: var(--rouge); }
.jauge__texte { margin: 0; font-size: 13px; color: var(--encre-douce); }

/* L'objet, en grand, sur papier kraft. */
.objet-zone { margin-top: 14px; display: flex; flex-direction: column; gap: 10px; }

/* Dans la table d'inspection, l'objet est le cœur de l'écran : il s'affiche
   tout de suite, sans animation d'entrée. La carte y est reconstruite à chaque
   événement du moteur (patience, arrivée, résolution) : une animation avec
   `backwards` la remettrait à `opacity: 0` à chaque fois et laisserait un trou
   sous la barre de patience. */
.objet-zone .carte-objet { animation: none; }

.carte-objet--grand {
  max-width: none;
  position: relative;
  background-color: var(--kraft);
  background-image:
    repeating-linear-gradient(104deg, rgba(120, 88, 40, .05) 0 2px, transparent 2px 6px),
    repeating-linear-gradient(14deg, rgba(255, 255, 255, .07) 0 1px, transparent 1px 5px),
    radial-gradient(120% 80% at 18% 0%, rgba(255, 255, 255, .35), transparent 62%);
  border: 1px solid rgba(120, 88, 40, .28);
  border-radius: 14px;
  box-shadow: inset 0 0 32px rgba(120, 88, 40, .12), 0 14px 26px -20px rgba(80, 50, 10, .75);
  transform: rotate(-.4deg);
  /* Le ruban déborde du haut : la carte ne rogne pas, c'est le bandeau qui s'arrondit. */
  overflow: visible;
}

.carte-objet--grand .carte-objet__bandeau {
  border-radius: 13px 13px 0 0;
  background: rgba(120, 88, 40, .14);
  color: #5C4116;
  border-bottom-color: rgba(120, 88, 40, .24);
}

/* Morceau de ruban adhésif, comme sur une fiche punaisée. */
.carte-objet--grand::before {
  content: '';
  position: absolute;
  top: -9px;
  left: 50%;
  width: 92px;
  height: 20px;
  transform: translateX(-50%) rotate(-2.5deg);
  background: rgba(224, 168, 46, .42);
  border-left: 1px solid rgba(255, 255, 255, .5);
  border-right: 1px solid rgba(255, 255, 255, .5);
  border-radius: 2px;
}

.carte-objet--grand .carte-objet__corps { font-size: 16px; }
.carte-objet--grand .carte-objet__expediteur { color: #5C4116; }

.objet-tampon { display: flex; align-items: center; gap: 9px; }
.objet-tampon__etiquette { font-size: 13px; color: var(--encre-douce); }

/* Les quatre outils. */
.outils { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }

.outil {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 3px;
  min-height: 108px;
  padding: 12px;
  text-align: left;
  background: var(--papier);
  border: 1.5px solid var(--bord);
  border-radius: 17px;
  box-shadow: var(--ombre-1);
  cursor: pointer;
  transition: transform .12s ease, border-color .15s ease, background-color .15s ease;
}

.outil:hover { border-color: var(--terracotta); background: rgba(180, 70, 46, .04); }
.outil:active { transform: translateY(1px); }
.outil__icone { color: var(--terracotta); }
.outil__icone svg { width: 30px; height: 30px; }
.outil__nom { font-size: 15px; font-weight: 700; color: var(--encre); }
.outil__effet { font-size: 11.5px; line-height: 1.35; color: var(--encre-outil); }
.outil__pied { margin-top: auto; display: flex; align-items: center; gap: 6px; font-size: 12px; color: var(--encre-outil); }
.outil__cout { font-variant-numeric: tabular-nums; color: var(--encre-outil); }
.outil__coche svg { width: 16px; height: 16px; color: var(--sauge); }

.outil--fait {
  cursor: default;
  color: var(--encre-outil);
  border-style: dashed;
  background-image: repeating-linear-gradient(45deg, rgba(43, 36, 32, .035) 0 7px, transparent 7px 14px);
}

.outil--fait .outil__icone { color: var(--encre-outil); }
.outil--fait .outil__nom { color: var(--encre-outil); text-decoration: line-through; text-decoration-color: rgba(43, 36, 32, .3); }

/* Choix de la question de contrôle. */
.question-choix { display: flex; flex-direction: column; gap: 8px; margin-top: 10px; }
.question-choix__titre { margin: 0; font-size: 13px; font-weight: 700; color: var(--encre-douce); }
.question-choix__aide { margin: 0; font-size: 12.5px; color: var(--encre-douce); }

.question-bouton {
  min-height: 48px;
  padding: 11px 13px;
  text-align: left;
  font-size: 14.5px;
  background: var(--papier);
  border: 1.5px solid rgba(224, 168, 46, .8);
  border-radius: 14px;
  box-shadow: var(--ombre-1);
  cursor: pointer;
}

.question-bouton:hover { background: rgba(224, 168, 46, .14); }

/* Résultats tamponnés. */
.resultats { display: flex; flex-direction: column; gap: 10px; }
.resultats:empty { display: none; }

.resultat {
  padding: 12px 13px;
  background: var(--papier);
  border: 1px solid var(--bord);
  border-left: 5px solid var(--encre-douce);
  border-radius: 14px;
  box-shadow: var(--ombre-1);
}

.resultat__moment {
  margin-left: auto;
  padding: 3px 9px;
  font-size: 11px;
  font-weight: 800;
  letter-spacing: .08em;
  text-transform: uppercase;
  white-space: nowrap;
  color: var(--moutarde-fonce);
  background: rgba(224, 168, 46, .22);
  border-radius: 999px;
}

.resultat__entete { display: flex; align-items: center; gap: 10px; margin-bottom: 7px; }
.resultat__outil { font-size: 12px; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; color: var(--encre-douce); }
.resultat__texte { margin: 0; font-size: 14px; color: var(--encre-douce); }

/* Réglages du compte. */
.reglages__intro { margin: 0 0 14px; font-size: 14.5px; color: var(--encre-douce); }
.reglages__note { margin: 14px 0 0; font-size: 13px; color: var(--encre-douce); }

.etapes { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 10px; }

.etape {
  display: flex;
  align-items: center;
  gap: 12px;
  width: 100%;
  min-height: 64px;
  padding: 12px 14px;
  text-align: left;
  background: var(--papier);
  border: 1.5px solid var(--bord);
  border-radius: 17px;
  box-shadow: var(--ombre-1);
  cursor: pointer;
  transition: border-color .15s ease, background-color .15s ease;
}

.etape:hover { border-color: var(--terracotta); }
.etape__coche {
  flex: 0 0 auto;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 30px;
  height: 30px;
  border-radius: 50%;
  border: 1.5px dashed var(--bord);
  color: var(--sauge);
}

.etape__coche svg { width: 19px; height: 19px; }
.etape__texte { display: flex; flex-direction: column; }
.etape__libelle { font-size: 15.5px; }
.etape__cout { font-size: 12.5px; color: var(--encre-douce); }

.etape--faite { border-color: rgba(63, 101, 68, .5); background: rgba(63, 101, 68, .08); cursor: default; }
.etape--faite .etape__coche { border-style: solid; border-color: rgba(63, 101, 68, .5); background: rgba(63, 101, 68, .12); }
.etape--faite .etape__libelle { color: var(--sauge); }

.etapes__fin { margin-top: 4px; }

/* ==========================================================================
   Bandeaux : notification et « Démasqué ».
   ========================================================================== */

.banniere {
  position: absolute;
  /* Sous l'en-tête du fil (61 px) : jamais par-dessus le bouton retour. */
  top: calc(var(--barre-etat) + env(safe-area-inset-top, 0px) + 66px);
  left: 10px;
  right: 10px;
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 8px 12px;
  text-align: left;
  background: rgba(255, 253, 248, .96);
  border: 1px solid var(--bord);
  border-radius: 18px;
  box-shadow: var(--ombre-2);
  backdrop-filter: blur(8px);
  pointer-events: auto;
  cursor: pointer;
  opacity: 0;
  transform: translateY(-14px);
  transition: opacity .25s ease, transform .25s cubic-bezier(.2, .8, .2, 1);
}

.banniere--visible { opacity: 1; transform: translateY(0); }
.banniere__avatar { width: 36px; height: 36px; border-radius: 50%; object-fit: cover; flex: 0 0 auto; }
.banniere__contenu { display: flex; flex-direction: column; min-width: 0; }
.banniere__nom { font-size: 13.5px; font-weight: 700; }
.banniere__texte { font-size: 13px; color: var(--encre-douce); overflow: hidden; white-space: nowrap; text-overflow: ellipsis; }

/* « Démasqué » : une pastille compacte et opaque sous l'en-tête du fil, jamais
   par-dessus le bouton retour ni le titre. Aucune transition d'opacité : elle
   est lisible dès sa première image (l'entrée, purement en déplacement,
   n'assombrit rien et disparaît quand le mouvement est réduit). */
.bandeau-moment {
  position: absolute;
  top: calc(var(--barre-etat) + env(safe-area-inset-top, 0px) + 68px);
  left: 50%;
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  justify-content: center;
  gap: 3px 9px;
  max-width: calc(100% - 24px);
  padding: 9px 16px;
  line-height: 1.3;
  border-radius: 999px;
  background: linear-gradient(180deg, #FFF6E0, var(--papier));
  border: 1.5px solid rgba(224, 168, 46, .8);
  box-shadow: 0 16px 34px -20px rgba(120, 80, 10, .9), 0 0 0 5px rgba(224, 168, 46, .16);
  transform: translate(-50%, 6px) scale(.97);
  transition: transform .18s cubic-bezier(.2, .9, .3, 1.1);
}

.bandeau-moment--visible { transform: translate(-50%, 0) scale(1); }
.bandeau-moment__coeur { color: var(--terracotta); font-size: 15px; }
.bandeau-moment__titre { font-family: var(--police-titre); font-size: 18px; }
.bandeau-moment__sous { font-size: 12px; color: var(--moutarde-fonce); }

/* ==========================================================================
   Bilan : une page de carnet.
   ========================================================================== */

.bilan {
  flex: 1 1 auto;
  min-height: 0;
  overflow-y: auto;
  background: var(--papier);
}

.bilan__page {
  position: relative;
  padding: 26px 20px 34px 46px;
  background-image:
    repeating-linear-gradient(180deg, transparent 0 31px, rgba(47, 95, 128, .16) 31px 32px);
  background-position: 0 30px;
  line-height: 32px;
}

.bilan__page::before {
  content: '';
  position: absolute;
  top: 0;
  bottom: 0;
  left: 34px;
  width: 1.5px;
  background: rgba(180, 70, 46, .28);
}

.bilan__kicker {
  margin: 0;
  font-size: 12.5px;
  letter-spacing: .16em;
  text-transform: uppercase;
  color: var(--encre-douce);
  line-height: 24px;
}

.bilan__titre { margin: 0 0 8px; font-family: var(--police-titre); font-size: 36px; line-height: 44px; letter-spacing: -.015em; }

.bilan__proches { display: flex; flex-direction: column; gap: 18px; }

.bilan__proche { display: flex; flex-direction: column; gap: 4px; }
.bilan__proche-entete { display: flex; align-items: center; gap: 10px; }

.bilan__avatar {
  width: 44px;
  height: 44px;
  border-radius: 50%;
  object-fit: cover;
  box-shadow: 0 0 0 2px var(--papier), 0 0 0 3.5px rgba(43, 36, 32, .12);
  margin-top: -6px;
  margin-bottom: -6px;
}

.bilan__proche-nom { margin: 0; font-family: var(--police-titre); font-size: 19px; }
.bilan__texte { margin: 0; font-size: 15.5px; }

.bilan__compte { margin-top: 22px; }
.bilan__sous-titre { margin: 0 0 6px; font-family: var(--police-titre); font-size: 20px; }

.bilan__reflexes { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 10px; }
.bilan__reflexe { display: flex; align-items: flex-start; gap: 10px; font-size: 15px; }
.bilan__puce { flex: 0 0 auto; color: var(--sauge); margin-top: 6px; }
.bilan__puce svg { width: 17px; height: 17px; }

.bilan__graine { margin: 26px 0 0; font-size: 12.5px; letter-spacing: .06em; color: var(--encre-douce); }
.bilan__actions { display: flex; flex-direction: column; gap: 10px; margin-top: 14px; }

/* ==========================================================================
   Mouvement.
   ========================================================================== */

@keyframes notif-arrive {
  from { opacity: 0; transform: translateY(-10px) scale(.98); }
}

@keyframes entree-douce {
  from { opacity: 0; transform: translateY(10px); }
}

@keyframes entree-bulle {
  from { opacity: 0; transform: translateY(9px) scale(.985); }
}

@keyframes tomber-tampon {
  0% { opacity: 0; transform: rotate(-4deg) scale(1.8); }
  62% { opacity: 1; transform: rotate(-5.5deg) scale(.95); }
  100% { opacity: 1; transform: rotate(-4deg) scale(1); }
}

@keyframes secousse {
  0%, 100% { transform: translateX(0); }
  18% { transform: translateX(-5px); }
  36% { transform: translateX(5px); }
  54% { transform: translateX(-3px); }
  72% { transform: translateX(2px); }
  86% { transform: translateX(-1px); }
}

@keyframes battement {
  50% { box-shadow: 0 0 0 4px rgba(163, 33, 26, .16); }
}

@keyframes point-frappe {
  0%, 100% { opacity: .35; transform: translateY(0); }
  40% { opacity: .95; transform: translateY(-2px); }
}

/* Tout le mouvement est coupé : l'interface reste utilisable telle quelle. */
@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: .001ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: .001ms !important;
    scroll-behavior: auto !important;
  }
}

/* ==========================================================================
   Mobile : le téléphone est le téléphone, plein écran, sans cadre.
   ========================================================================== */

@media (max-width: 480px) {
  .bureau {
    padding: 0;
    background-color: var(--creme);
    background-image: none;
  }

  .telephone {
    width: 100%;
    max-width: 100vw;
    height: 100vh;
    height: 100dvh;
  }

  .coque {
    padding: 0;
    border-radius: 0;
    background: var(--creme);
    box-shadow: none;
  }

  .encoche { display: none; }

  .ecran {
    border-radius: 0;
  }

  .barre-etat {
    height: calc(var(--barre-etat) + env(safe-area-inset-top, 0px));
    padding: calc(env(safe-area-inset-top, 0px) + 4px) 16px 0 20px;
  }

  .feuille { height: 92%; border-radius: 24px 24px 0 0; }
  .bilan__page { padding-right: 16px; }
}

/* Très petits écrans : 320 px de large. */
@media (max-width: 340px) {
  .bulle { max-width: 84%; font-size: 15px; }
  .verrou__heure { font-size: 62px; }
  .liste__titre { font-size: 26px; }
  .outils { gap: 8px; }
  .outil { padding: 10px; min-height: 112px; }
  .bilan__page { padding-left: 40px; }
  .bilan__page::before { left: 28px; }
}
