/* Ma tour — rond et sobre, toujours en sombre.
   Les éléments « tombent » à l'arrivée, et des squelettes gris montrent
   les formes tant que les données ne sont pas là. */
:root {
  color-scheme: dark;
  --fond: #f2f2f7;
  --carte: #ffffff;
  --carte-2: #f2f2f7;
  --carte-3: #e9e9ef;
  --texte: #1d1d1f;
  --doux: #6e6e73;
  --tres-doux: #aeaeb2;
  --trait: rgba(60, 60, 67, .12);
  --principal: #1d1d1f;
  --principal-texte: #ffffff;
  --lien: #5856d6;
  --vert: #30b158;
  --ambre: #ff9500;
  --indigo: #5856d6;
  --rouge: #ff3b30;
  --bleu: #0a84ff;
  --sarcelle: #30b0c7;
  --argile: #d97757;
  --ombre: 0 1px 2px rgba(0, 0, 0, .04), 0 8px 24px rgba(0, 0, 0, .06);
  --ombre-forte: 0 20px 60px rgba(0, 0, 0, .18);
  --os: #e5e5ea;
  --reflet: rgba(255, 255, 255, .65);
  --verre: rgba(255, 255, 255, .72);
  --tour-haut: #ffffff;
  --tour-bas: #e4e4ea;
  --tour-bord: #d1d1d6;
  --tour-fente: #c7c7cc;
  --rayon: 22px;
  --police: -apple-system, BlinkMacSystemFont, "SF Pro Text", "Segoe UI Variable Text", "Segoe UI", system-ui, Roboto, "Helvetica Neue", Arial, sans-serif;
  --police-titre: -apple-system, BlinkMacSystemFont, "SF Pro Display", "Segoe UI Variable Display", "Segoe UI", system-ui, sans-serif;
  --ressort: cubic-bezier(.34, 1.4, .64, 1);
  --doux-sortie: cubic-bezier(.2, .8, .2, 1);
}
@media all { /* sombre en permanence (choix de la propriétaire) */
  :root {
    --fond: #000000;
    --carte: #1c1c1e;
    --carte-2: #2c2c2e;
    --carte-3: #3a3a3c;
    --texte: #f5f5f7;
    --doux: #98989f;
    --tres-doux: #636366;
    --trait: rgba(255, 255, 255, .09);
    --principal: #f5f5f7;
    --principal-texte: #000000;
    --lien: #7d7aff;
    --vert: #30d158;
    --ambre: #ff9f0a;
    --indigo: #7d7aff;
    --rouge: #ff453a;
    --bleu: #0a84ff;
    --sarcelle: #40c8e0;
    --argile: #e08a6b;
    --ombre: none;
    --ombre-forte: 0 20px 60px rgba(0, 0, 0, .6);
    --os: #2c2c2e;
    --reflet: rgba(255, 255, 255, .07);
    --verre: rgba(28, 28, 30, .72);
    --tour-haut: #3a3a3c;
    --tour-bas: #1c1c1e;
    --tour-bord: #48484a;
    --tour-fente: #2c2c2e;
  }
}

* { box-sizing: border-box; -webkit-tap-highlight-color: transparent; }
html, body { margin: 0; }
body {
  background: var(--fond);
  color: var(--texte);
  font: 17px/1.45 var(--police);
  letter-spacing: -.01em;
  -webkit-font-smoothing: antialiased;
  -webkit-text-size-adjust: 100%;
  min-height: 100vh;
}
body.feuille-ouverte { overflow: hidden; }
[hidden] { display: none !important; }
.defs-cachees { position: absolute; width: 0; height: 0; overflow: hidden; }

main {
  max-width: 880px;
  margin: 0 auto;
  padding: max(20px, env(safe-area-inset-top)) 18px calc(40px + env(safe-area-inset-bottom));
}
.vue.etroite { max-width: 480px; margin: 0 auto; }

h1 { font: 700 2.1rem/1.1 var(--police-titre); letter-spacing: -.025em; margin: 0; }
h2 { font: 600 1.25rem/1.2 var(--police-titre); letter-spacing: -.02em; margin: 0; }
h3 { font-size: 1.02rem; font-weight: 600; margin: 22px 0 8px; }
p { margin: 8px 0; }
.doux { color: var(--doux); }
.surtitre { margin: 0 0 4px; font-size: .8rem; font-weight: 600; text-transform: uppercase; letter-spacing: .04em; color: var(--doux); }
.centre-texte { text-align: center; }
.erreur { color: var(--rouge); min-height: 1.4em; }
code, .code { font-family: ui-monospace, "SF Mono", "Cascadia Mono", Consolas, monospace; }
a { color: var(--lien); }

/* ----- chute en cascade ----- */
.tombe { animation: tomber .75s var(--ressort) both; animation-delay: calc(var(--i, 0) * 70ms); }
@keyframes tomber {
  0% { opacity: 0; transform: translateY(-46px) scale(.97); }
  55% { opacity: 1; }
  100% { opacity: 1; transform: none; }
}
.apparait { animation: apparaitre .45s var(--doux-sortie) both; }
@keyframes apparaitre { from { opacity: 0; transform: scale(.98); } to { opacity: 1; transform: none; } }

/* ----- squelettes (formes grises pendant le chargement) ----- */
.os {
  display: block;
  position: relative;
  overflow: hidden;
  background: var(--os);
  border-radius: 9px;
  height: 14px;
}
.os::after {
  content: "";
  position: absolute;
  inset: 0;
  transform: translateX(-100%);
  background: linear-gradient(90deg, transparent, var(--reflet), transparent);
  animation: reflet 1.5s ease-in-out infinite;
}
@keyframes reflet { to { transform: translateX(100%); } }
.os + .os { margin-top: 10px; }
.os-surtitre { width: 130px; height: 12px; }
.os-grand-titre { width: 160px; height: 32px; border-radius: 10px; }
.os-bouton-rond { width: 40px; height: 40px; border-radius: 50%; margin: 0 !important; }
.os-tour { width: 64px; height: 100px; border-radius: 14px; flex: none; margin: 0 !important; }
.os-titre { width: 60%; height: 22px; }
.os-l85 { width: 85%; }
.os-l70 { width: 70%; }
.os-l50 { width: 50%; }
.os-segments { width: 100%; height: 34px; border-radius: 11px; }
.espace-haut { margin-top: 18px !important; }
.tuile-os { height: 118px; border-radius: var(--rayon); margin: 0 !important; }
.liste-os { display: flex; flex-direction: column; gap: 14px; padding: 6px 0; }
.ligne-os { display: flex; align-items: center; gap: 12px; }
.ligne-os .os { margin: 0; }
.ligne-os .os-rond { width: 36px; height: 36px; border-radius: 11px; flex: none; }
.ligne-os .os-textes { flex: 1; display: flex; flex-direction: column; gap: 8px; }
.ligne-os .os-textes .os { margin: 0; }

/* ----- boutons et champs ----- */
.bouton {
  appearance: none;
  border: 0;
  background: var(--carte-2);
  color: var(--texte);
  border-radius: 14px;
  padding: 11px 18px;
  min-height: 46px;
  font: inherit;
  font-size: .98rem;
  font-weight: 600;
  cursor: pointer;
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  transition: transform .2s var(--ressort), background-color .2s, opacity .2s;
}
.bouton:hover { background: var(--carte-3); }
.bouton:active, .tuile:active, .bouton-rond:active { transform: scale(.96); }
.bouton:focus-visible, .tuile:focus-visible, .onglet:focus-visible, .champ:focus-visible,
.bouton-rond:focus-visible, .heros:focus-visible { outline: 3px solid color-mix(in srgb, var(--lien) 55%, transparent); outline-offset: 3px; }
.bouton.principal { background: var(--principal); color: var(--principal-texte); }
.bouton.principal:hover { opacity: .88; }
.bouton.danger { color: var(--rouge); }
.bouton.danger.plein { background: var(--rouge); color: #fff; }
.bouton.argile { background: color-mix(in srgb, var(--argile) 22%, var(--carte-2)); color: var(--argile); }
.bouton.argile:hover { background: color-mix(in srgb, var(--argile) 32%, var(--carte-2)); }
.session-ligne { display: flex; align-items: center; justify-content: space-between; gap: 12px; background: var(--carte-2); border-radius: 16px; padding: 12px 14px; }
.bouton.discret { background: transparent; color: var(--doux); }
.bouton.discret:hover { background: var(--carte-2); }
.bouton.large { width: 100%; font-size: 1.05rem; min-height: 54px; border-radius: 16px; }
.bouton.petit { min-height: 36px; padding: 6px 14px; font-size: .9rem; border-radius: 12px; }
.bouton.pilule { border-radius: 999px; padding: 9px 18px; min-height: 40px; font-size: .95rem; }
.bouton[disabled] { opacity: .45; cursor: not-allowed; }
.bouton svg { width: 20px; height: 20px; flex: none; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }

.bouton-rond {
  appearance: none; border: 0; cursor: pointer;
  width: 40px; height: 40px; border-radius: 50%;
  background: var(--carte); color: var(--texte); box-shadow: var(--ombre);
  display: inline-grid; place-items: center; flex: none;
  transition: transform .2s var(--ressort), background-color .2s;
}
.bouton-rond.petit { width: 32px; height: 32px; background: var(--carte-2); box-shadow: none; }
.bouton-rond svg { width: 20px; height: 20px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.bouton-rond.petit svg { width: 16px; height: 16px; stroke-width: 2.2; color: var(--doux); }

.champ {
  width: 100%;
  font: inherit;
  padding: 12px 14px;
  min-height: 48px;
  border-radius: 14px;
  border: 1px solid transparent;
  background: var(--carte-2);
  color: var(--texte);
  transition: border-color .2s, background-color .2s;
}
.champ:focus { border-color: var(--lien); background: var(--carte); outline: none; }
textarea.champ { min-height: 150px; resize: vertical; }
label { display: block; font-weight: 600; font-size: .92rem; margin: 14px 0 6px; }
label.en-ligne { display: inline; margin: 0; font-weight: 400; }
.ligne { display: flex; gap: 8px; align-items: center; }
.ligne .champ { flex: 1; }
.ligne-formulaire { margin-top: 8px; }
.autres-moyens { margin-top: 26px; }
.autres-moyens summary { cursor: pointer; color: var(--doux); text-align: center; list-style: none; }
.autres-moyens summary::-webkit-details-marker { display: none; }

/* ----- accueil (connexion, installation) ----- */
.accueil { text-align: center; padding-top: 8vh; }
.accueil .ligne-formulaire, .accueil label { text-align: left; }
.tour-accueil { display: block; width: 76px; height: 118px; margin: 4vh auto 22px; filter: drop-shadow(0 14px 24px rgba(0, 0, 0, .12)); }
#vue-installation h1 { margin-bottom: 16px; text-align: center; }

/* ----- cartes ----- */
.carte {
  background: var(--carte);
  border-radius: var(--rayon);
  box-shadow: var(--ombre);
  padding: 18px;
  margin-bottom: 16px;
}
.entete { display: flex; align-items: flex-end; justify-content: space-between; gap: 12px; margin: 6px 0 20px; }

/* ----- carte d'état (la tour et son voyant) ----- */
.heros {
  position: relative;
  overflow: hidden;
  display: flex;
  align-items: center;
  gap: 20px;
  padding: 22px;
  cursor: pointer;
  isolation: isolate;
  --lueur: var(--tres-doux);
}
.heros::before {
  content: "";
  position: absolute;
  z-index: -1;
  left: -60px; top: -60px;
  width: 260px; height: 260px;
  border-radius: 50%;
  background: radial-gradient(circle, color-mix(in srgb, var(--lueur) 28%, transparent), transparent 68%);
  transition: background .8s;
}
.heros[data-etat="eveillee"] { --lueur: var(--vert); }
.heros[data-etat="reveil"] { --lueur: var(--ambre); }
.heros[data-etat="endormie"] { --lueur: var(--indigo); }
.tour-zone { position: relative; width: 64px; height: 100px; flex: none; }
.tour-dessin { width: 64px; height: 100px; display: block; filter: drop-shadow(0 10px 18px rgba(0, 0, 0, .14)); }
.tour-stop-haut { stop-color: var(--tour-haut); }
.tour-stop-bas { stop-color: var(--tour-bas); }
.tour-corps { fill: url(#g-tour); stroke: var(--tour-bord); }
.tour-fente { fill: var(--tour-fente); }
.tour-pied { fill: var(--tour-bord); }
.led {
  position: absolute; left: 50%; top: 72px;
  width: 9px; height: 9px; margin-left: -4.5px; border-radius: 50%;
  background: var(--tres-doux);
  transition: background-color .6s, box-shadow .6s;
}
.heros[data-etat="eveillee"] .led { background: var(--vert); box-shadow: 0 0 10px 2px color-mix(in srgb, var(--vert) 60%, transparent); }
.heros[data-etat="reveil"] .led { background: var(--ambre); animation: clignote 1s ease-in-out infinite; }
.heros[data-etat="endormie"] .led { background: var(--indigo); animation: respire 4s ease-in-out infinite; }
@keyframes respire { 0%, 100% { opacity: .2; box-shadow: none; } 50% { opacity: 1; box-shadow: 0 0 12px 3px color-mix(in srgb, var(--indigo) 55%, transparent); } }
@keyframes clignote { 50% { opacity: .25; } }
.heros-texte { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 3px; }
#etat-titre { font: 650 1.3rem/1.2 var(--police-titre); letter-spacing: -.02em; }
#etat-detail { font-size: .93rem; }
.heros.chargement .reel { display: none !important; }
.heros:not(.chargement) .os { display: none; }
.mesures { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 10px; }
.mesure { background: var(--carte-2); border-radius: 999px; padding: 3px 10px; font-size: .8rem; font-weight: 600; font-variant-numeric: tabular-nums; color: var(--doux); }
.mesure b { color: var(--texte); font-weight: 650; }
#bouton-alimentation { align-self: flex-start; }
@media (max-width: 520px) {
  .heros { flex-wrap: wrap; }
  #bouton-alimentation { width: 100%; order: 3; }
}

.bandeau { display: flex; align-items: center; justify-content: space-between; gap: 12px; background: color-mix(in srgb, var(--ambre) 16%, var(--carte)); }

/* ----- tuiles ----- */
.grille {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
  margin-bottom: 16px;
}
@media (min-width: 640px) { .grille { grid-template-columns: repeat(4, minmax(0, 1fr)); } }
.tuile {
  appearance: none;
  border: 0;
  background: var(--carte);
  color: var(--texte);
  border-radius: var(--rayon);
  box-shadow: var(--ombre);
  min-height: 118px;
  padding: 16px;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  justify-content: flex-end;
  gap: 2px;
  font: inherit;
  text-align: left;
  cursor: pointer;
  transition: transform .25s var(--ressort), background-color .2s;
}
.tuile:hover { transform: translateY(-2px); }
.tuile .puce { margin-bottom: auto; }
.tuile-nom { font-weight: 650; font-size: 1rem; }
.tuile-detail { font-size: .8rem; color: var(--doux); }
.puce {
  width: 38px; height: 38px; border-radius: 12px;
  display: grid; place-items: center; color: #fff; flex: none;
  background: var(--couleur, var(--bleu));
}
.puce svg { width: 21px; height: 21px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.puce.bleu { --couleur: var(--bleu); }
.puce.sarcelle { --couleur: var(--sarcelle); }
.puce.argile { --couleur: var(--argile); }
.puce.rouge { --couleur: var(--rouge); }
.puce.indigo { --couleur: var(--indigo); }
.puce.gris { --couleur: var(--tres-doux); }
.puce.petite { width: 32px; height: 32px; border-radius: 10px; }
.puce.petite svg { width: 18px; height: 18px; }

/* ----- feuille qui monte du bas ----- */
.voile {
  position: fixed; inset: 0; z-index: 20;
  background: rgba(0, 0, 0, .32);
  opacity: 0; transition: opacity .35s;
}
.voile.visible { opacity: 1; }
.feuille {
  position: fixed; z-index: 21;
  left: 0; right: 0; bottom: 0;
  margin: 0 auto;
  width: min(640px, 100%);
  max-height: 88vh;
  display: flex; flex-direction: column;
  background: var(--carte);
  border-radius: 28px 28px 0 0;
  box-shadow: var(--ombre-forte);
  padding: 8px 20px calc(20px + env(safe-area-inset-bottom));
  transform: translateY(105%);
  transition: transform .5s var(--doux-sortie);
}
.feuille.ouverte { transform: none; transition: transform .55s var(--ressort); }
@media (min-width: 700px) {
  .feuille { bottom: auto; top: 50%; border-radius: 28px; max-height: 80vh; transform: translateY(-40%) scale(.96); opacity: 0; transition: transform .4s var(--doux-sortie), opacity .3s; }
  .feuille.ouverte { transform: translateY(-50%); opacity: 1; }
}
.poignee { width: 38px; height: 5px; border-radius: 3px; background: var(--carte-3); margin: 0 auto 10px; flex: none; }
.feuille-entete { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 4px 0 14px; flex: none; }
.feuille-contenu { overflow-y: auto; overscroll-behavior: contain; margin: 0 -20px; padding: 0 20px 4px; }

.infos { display: grid; grid-template-columns: auto 1fr; gap: 0; margin: 0; background: var(--carte-2); border-radius: 16px; overflow: hidden; }
.infos dt, .infos dd { padding: 11px 14px; border-bottom: 1px solid var(--trait); margin: 0; }
.infos dt { color: var(--doux); }
.infos dd { text-align: right; font-variant-numeric: tabular-nums; font-weight: 500; }
.infos dt:nth-last-child(2), .infos dd:last-child { border-bottom: 0; }
.liste-actions { display: flex; flex-direction: column; gap: 8px; }
.liste-actions .bouton { justify-content: flex-start; text-align: left; min-height: 56px; padding: 12px 16px; border-radius: 16px; }
.description { display: block; font-weight: 400; color: var(--doux); font-size: .86rem; margin-top: 1px; }

/* ----- fichiers ----- */
.fil { display: flex; flex-wrap: wrap; gap: 2px; align-items: center; margin-bottom: 12px; font-size: .92rem; }
.fil button { appearance: none; border: 0; background: var(--carte-2); color: var(--texte); font: inherit; font-weight: 500; padding: 4px 10px; border-radius: 999px; cursor: pointer; }
.fil button:last-child { background: var(--principal); color: var(--principal-texte); }
.fil .sep { color: var(--tres-doux); padding: 0 2px; }
.barre-outils { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 12px; }
.fichiers { list-style: none; margin: 0; padding: 0; background: var(--carte-2); border-radius: 16px; overflow: hidden; }
.fichiers li { display: flex; align-items: center; gap: 8px; border-bottom: 1px solid var(--trait); min-height: 54px; padding: 0 6px 0 14px; }
.fichiers li:last-child { border-bottom: 0; }
.fichiers .nom {
  flex: 1; min-width: 0; display: flex; align-items: center; gap: 12px;
  appearance: none; border: 0; background: none; color: var(--texte); font: inherit; text-align: left;
  padding: 10px 0; cursor: pointer; text-decoration: none;
}
.fichiers .nom span.texte { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.fichiers .meta { color: var(--doux); font-size: .82rem; white-space: nowrap; font-variant-numeric: tabular-nums; }
.fichiers .nom svg { width: 22px; height: 22px; flex: none; fill: none; stroke: var(--doux); stroke-width: 1.7; }
.fichiers .dossier svg { stroke: var(--bleu); fill: color-mix(in srgb, var(--bleu) 18%, transparent); }
.progression { height: 6px; background: var(--carte-2); border-radius: 3px; overflow: hidden; margin: 8px 0; }
.progression > div { height: 100%; width: 0; background: var(--principal); border-radius: 3px; transition: width .2s; }
.vide { color: var(--doux); padding: 26px 0; text-align: center; }

/* ----- boîte ----- */
.boite h2 { margin-bottom: 14px; }
.segments { display: flex; background: var(--carte-2); border-radius: 12px; padding: 3px; gap: 2px; margin-bottom: 8px; }
.onglet {
  flex: 1; appearance: none; border: 0; background: transparent; color: var(--doux);
  font: inherit; font-size: .9rem; font-weight: 600; padding: 7px 8px; border-radius: 9px; cursor: pointer;
  white-space: nowrap; transition: background-color .25s, color .25s, box-shadow .25s;
}
.onglet.actif { background: var(--carte); color: var(--texte); box-shadow: 0 1px 3px rgba(0, 0, 0, .12); }
@media all { /* sombre en permanence (choix de la propriétaire) */ .onglet.actif { background: var(--carte-3); } }
.compteur:not(:empty) { background: var(--rouge); color: #fff; border-radius: 999px; padding: 0 6px; font-size: .72rem; margin-left: 3px; vertical-align: 1px; }
.element-boite { border-bottom: 1px solid var(--trait); padding: 16px 0; }
.element-boite:last-child { border-bottom: 0; padding-bottom: 4px; }
.element-boite h3 { margin: 0 0 2px; font-size: 1rem; }
.element-boite > .doux { font-size: .85rem; margin: 0 0 4px; }
.resultat {
  white-space: pre-wrap; word-wrap: break-word; background: var(--carte-2); border-radius: 14px;
  padding: 14px; margin: 10px 0 12px; max-height: 340px; overflow: auto; font-size: .95rem; line-height: 1.55;
}
.travaille { display: inline-flex; align-items: center; gap: 8px; color: var(--doux); font-size: .9rem; }
.travaille::before { content: ""; width: 8px; height: 8px; border-radius: 50%; background: var(--argile); animation: clignote 1.2s ease-in-out infinite; }
.actions { display: flex; flex-wrap: wrap; gap: 8px; }
.etiquette { display: inline-block; font-size: .72rem; font-weight: 600; padding: 2px 8px; border-radius: 999px; background: var(--carte-2); color: var(--doux); margin-left: 6px; vertical-align: 2px; }

/* ----- réglages ----- */
.section-reglage { margin-bottom: 16px; }
.section-reglage h2 { margin-bottom: 6px; font-size: 1.1rem; }
.liste-cles { list-style: none; padding: 0; margin: 10px 0; background: var(--carte-2); border-radius: 14px; overflow: hidden; }
.liste-cles li { display: flex; align-items: center; justify-content: space-between; gap: 8px; padding: 10px 14px; border-bottom: 1px solid var(--trait); }
.liste-cles li:last-child { border-bottom: 0; }
.codes { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 6px; font-family: ui-monospace, "SF Mono", Consolas, monospace; font-size: 1.02rem; background: var(--carte-2); padding: 14px; border-radius: 14px; }
.qr { display: block; width: 220px; height: 220px; margin: 12px auto; background: #fff; border-radius: 16px; padding: 8px; }
.secret { display: block; word-break: break-all; background: var(--carte-2); padding: 10px; border-radius: 12px; margin: 6px 0; }
.etapes { color: var(--doux); font-size: .88rem; margin-bottom: 8px; }

/* ----- dialogue ----- */
dialog {
  border: 0;
  border-radius: 26px;
  background: var(--carte);
  color: var(--texte);
  padding: 24px;
  width: min(420px, calc(100vw - 32px));
  max-height: calc(100vh - 32px);
  overflow: auto;
  box-shadow: var(--ombre-forte);
}
dialog[open] { animation: dialogue-arrive .45s var(--ressort); }
@keyframes dialogue-arrive { from { opacity: 0; transform: translateY(-30px) scale(.94); } }
dialog::backdrop { background: rgba(0, 0, 0, .35); -webkit-backdrop-filter: blur(6px); backdrop-filter: blur(6px); }
dialog h2 { margin-bottom: 8px; }
dialog p { color: var(--doux); }
.dialogue-boutons { display: flex; flex-wrap: wrap; justify-content: flex-end; gap: 8px; margin-top: 20px; }
.dialogue-boutons .bouton { flex: 1; }

/* ----- message éphémère ----- */
.toast {
  position: fixed; left: 50%; z-index: 40;
  top: max(14px, env(safe-area-inset-top));
  transform: translateX(-50%);
  max-width: calc(100vw - 32px);
  background: var(--verre);
  -webkit-backdrop-filter: saturate(180%) blur(20px); backdrop-filter: saturate(180%) blur(20px);
  color: var(--texte);
  font-size: .95rem; font-weight: 500;
  padding: 12px 20px; border-radius: 999px;
  box-shadow: 0 8px 30px rgba(0, 0, 0, .16);
  animation: toast-tombe .6s var(--ressort);
}
@keyframes toast-tombe { from { opacity: 0; transform: translate(-50%, -40px); } }
.toast[data-genre="erreur"] { background: var(--rouge); color: #fff; }

/* ----- mouvement réduit (réglage d'accessibilité de l'appareil) ----- */
@media (prefers-reduced-motion: reduce) {
  .tombe, .apparait, dialog[open], .toast { animation: apparaitre .2s ease both !important; }
  .os::after, .led { animation: none !important; }
  .feuille, .feuille.ouverte, .voile { transition: opacity .2s !important; }
}
