/* Nuage, direction « verre » de Courrier : le verre ne sert qu'à la couche fonctionnelle (barres, feuilles,
   palette, menus, barre de sélection, toasts, panneau des envois). Le contenu (listes de fichiers, aperçus,
   cartes de réglages) reste sur des surfaces pleines. backdrop-filter n'est posé que sur ces quelques couches
   fixes, jamais sur une ligne de liste ni sur ce qui bouge. Aucun style en ligne (CSP) : les valeurs
   dynamiques passent par des propriétés personnalisées posées en CSSOM. */

*, *::before, *::after { box-sizing: border-box; }
html, body { margin: 0; height: 100%; }
html { background: var(--fond); }
body {
  font: 15px/1.45 system-ui, -apple-system, "Segoe UI", Roboto, Cantarell, "Noto Sans", sans-serif;
  color: var(--texte);
  background: var(--fond);
  -webkit-font-smoothing: antialiased;
  -webkit-tap-highlight-color: transparent;
  overflow: hidden;
}
button, input, textarea, select { font: inherit; color: inherit; }
button { cursor: pointer; background: none; border: 0; padding: 0; }
button:disabled { cursor: default; }
a { color: var(--accent); }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; border-radius: 8px; }
[hidden] { display: none !important; }
kbd {
  font: 600 11px/1 ui-monospace, "SF Mono", "Cascadia Mono", monospace;
  padding: 3px 5px; border-radius: 5px; color: var(--texte-2);
  background: var(--surface-3); border: 1px solid var(--trait);
}
code, .mono { font-family: ui-monospace, "SF Mono", "Cascadia Mono", monospace; }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.ic { width: 18px; height: 18px; flex: none; }
.discret { color: var(--texte-2); }
.espace { flex: 1; }

/* ---------- Fond : peint une fois, jamais animé ---------- */
.fond {
  position: fixed; inset: 0; z-index: -1; pointer-events: none;
  background:
    radial-gradient(60vmax 50vmax at 8% -10%, var(--tache-1), transparent 70%),
    radial-gradient(50vmax 40vmax at 100% 30%, var(--tache-2), transparent 70%),
    radial-gradient(50vmax 40vmax at 30% 110%, var(--tache-3), transparent 70%),
    var(--fond);
}

/* ---------- Matières ---------- */
.verre, .verre-fort {
  background: var(--verre);
  -webkit-backdrop-filter: blur(18px) saturate(1.5);
  backdrop-filter: blur(18px) saturate(1.5);
  border: 1px solid var(--verre-trait);
  box-shadow: inset 0 1px 0 var(--verre-reflet), inset 0 0 0 1px var(--verre-bord), var(--ombre-1);
}
.verre-fort {
  background: var(--verre-fort);
  -webkit-backdrop-filter: blur(24px) saturate(1.6);
  backdrop-filter: blur(24px) saturate(1.6);
  box-shadow: inset 0 1px 0 var(--verre-reflet), inset 0 0 0 1px var(--verre-bord), var(--ombre-2);
}
/* « Mica » : derrière le rail il n'y a que le fond fixe, déjà flou : une teinte suffit. */
.mica { background: var(--mica); border-right: 1px solid var(--verre-trait); }
/* Pendant un mouvement, le verre devient une surface pleine (pas de flou recalculé à chaque image). */
.en-mouvement { -webkit-backdrop-filter: none !important; backdrop-filter: none !important; background: var(--verre-plein) !important; }

@supports not ((backdrop-filter: blur(1px)) or (-webkit-backdrop-filter: blur(1px))) {
  .verre, .verre-fort { background: var(--verre-plein); }
}
@media (prefers-reduced-transparency: reduce) {
  :root:not([data-transparence="normale"]) .verre,
  :root:not([data-transparence="normale"]) .verre-fort { -webkit-backdrop-filter: none; backdrop-filter: none; background: var(--verre-plein); }
  :root:not([data-transparence="normale"]) .mica { background: var(--verre-plein); }
}
:root[data-transparence="reduite"] .verre,
:root[data-transparence="reduite"] .verre-fort { -webkit-backdrop-filter: none; backdrop-filter: none; background: var(--verre-plein); }
:root[data-transparence="reduite"] .mica { background: var(--verre-plein); }
@media (prefers-contrast: more) {
  .verre, .verre-fort { background: var(--verre-plein); border-color: var(--trait-fort); }
}

/* ---------- Charpente ---------- */
.appli { display: grid; grid-template-columns: 236px 1fr; height: 100dvh; }
.rail { display: flex; flex-direction: column; gap: 2px; padding: 18px 12px 14px; height: 100dvh; min-height: 0; }
.marque { display: flex; align-items: center; gap: 10px; padding: 4px 10px 18px; font-weight: 650; font-size: 16px; letter-spacing: -0.01em; color: var(--texte); text-decoration: none; }
.marque img, .marque svg { width: 26px; height: 26px; border-radius: 8px; }
.face {
  margin-left: auto; height: 20px; padding: 0 7px; border-radius: 6px; display: inline-flex; align-items: center; gap: 4px;
  font-size: 11px; font-weight: 650; letter-spacing: .02em; color: var(--texte-2); background: var(--surface-3);
}
.face.local { color: var(--succes); background: var(--succes-doux); }
.face .ic { width: 12px; height: 12px; }
.rail-lien {
  display: flex; align-items: center; gap: 12px; padding: 9px 10px; border-radius: 10px;
  color: var(--texte-2); text-decoration: none; font-weight: 520; position: relative;
  transition: background-color .15s, color .15s;
}
.rail-lien .ic { width: 19px; height: 19px; }
.rail-lien:hover { background: var(--accent-doux); color: var(--texte); }
.rail-lien[aria-current="page"] { background: var(--surface); color: var(--texte); box-shadow: var(--ombre-1); }
.rail-lien[aria-current="page"] .ic { color: var(--accent); }
.rail-lien .compte { margin-left: auto; font-size: 12px; font-weight: 650; color: var(--texte-2); font-variant-numeric: tabular-nums; }
.rail-lien .cadenas { margin-left: auto; width: 15px; height: 15px; color: var(--succes); }
.rail-lien.depot-cible { background: var(--accent-doux); box-shadow: inset 0 0 0 2px var(--accent); color: var(--texte); }
.rail-pied { margin-top: auto; display: grid; gap: 6px; }
.rail-astuce { display: flex; align-items: center; gap: 8px; padding: 8px 10px; color: var(--texte-2); font-size: 13px; border-radius: 10px; text-align: left; }
.rail-astuce:hover { background: var(--accent-doux); color: var(--texte); }
.rail-astuce kbd { margin-left: auto; }
.jauge-rail { display: grid; gap: 6px; padding: 10px; font-size: 12.5px; color: var(--texte-2); border-radius: 10px; text-decoration: none; }
.jauge-rail:hover { background: var(--accent-doux); }
.jauge-rail b { color: var(--texte); font-weight: 620; }

.principal { position: relative; min-width: 0; height: 100dvh; }
.vue { height: 100dvh; overflow-y: auto; overflow-x: hidden; overscroll-behavior: contain; scroll-padding-top: 120px; }
.vue-tete {
  position: sticky; top: 0; z-index: 5;
  display: flex; flex-wrap: wrap; align-items: center; gap: 8px 12px; min-height: 60px; padding: 10px 24px;
  border-width: 0 0 1px; border-radius: 0; box-shadow: inset 0 -1px 0 var(--verre-bord);
}
.vue-tete h1 { margin: 0; font-size: 20px; font-weight: 680; letter-spacing: -0.015em; white-space: nowrap; }
.vue-tete .sous { color: var(--texte-2); font-size: 13px; }
.titre-bloc { display: grid; min-width: 0; flex: 1; }
.titre-bloc h1 { overflow: hidden; text-overflow: ellipsis; }
.titre-bloc .ariane { margin: -2px 0 0 -8px; font-size: 12.5px; }
.titre-bloc .ariane a { height: 22px; padding: 0 6px; }
.titre-bloc .ariane .sep { width: 12px; height: 12px; }
.titre-bloc .ariane .ic:not(.sep) { width: 14px; height: 14px; }
.outils { display: flex; align-items: center; gap: 6px; margin-left: auto; flex: none; }
.contenu { padding: 16px 24px 120px; max-width: 1180px; }
.contenu.etroit { max-width: 760px; }

/* ---------- Boutons ---------- */
.bouton {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px; height: 36px; padding: 0 14px; border-radius: 10px;
  background: var(--surface); border: 1px solid var(--trait-fort); color: var(--texte); font-weight: 560; font-size: 14px;
  white-space: nowrap; text-decoration: none;
  transition: transform .12s cubic-bezier(.2,.9,.3,1.4), background-color .15s;
}
.bouton .ic { width: 17px; height: 17px; }
.bouton:hover { background: var(--surface-2); }
.bouton:active, .icone-bouton:active, .puce:active, .rail-lien:active, .onglet:active { transform: scale(.96); transition-duration: .05s; }
.bouton.primaire { background: var(--accent-fond); color: var(--accent-sur); border-color: transparent; }
.bouton.primaire:hover { filter: brightness(1.08); }
.bouton.discret { background: transparent; border-color: transparent; color: var(--texte-2); }
.bouton.discret:hover { background: var(--accent-doux); color: var(--texte); }
.bouton.danger { color: var(--urgent); }
.bouton.danger:hover { background: var(--urgent-doux); }
.bouton.danger.primaire { background: var(--urgent-fond); color: #fff; }
.bouton.grand { height: 44px; padding: 0 18px; font-size: 15px; border-radius: 12px; }
.bouton.large { width: 100%; }
.bouton.petit { height: 30px; padding: 0 10px; font-size: 13px; border-radius: 8px; }
.bouton:disabled, .bouton[aria-disabled="true"] { opacity: .5; filter: none; transform: none; }
.bouton kbd { background: transparent; border-color: currentColor; color: inherit; opacity: .8; }
.icone-bouton {
  display: inline-grid; place-items: center; width: 36px; height: 36px; flex: none; border-radius: 10px; color: var(--texte-2);
  transition: transform .12s cubic-bezier(.2,.9,.3,1.4), background-color .15s, color .15s;
}
.icone-bouton:hover, .icone-bouton[aria-expanded="true"] { background: var(--accent-doux); color: var(--texte); }
.icone-bouton .ic { width: 19px; height: 19px; }
.icone-bouton.petit { width: 30px; height: 30px; border-radius: 8px; }
.icone-bouton.petit .ic { width: 17px; height: 17px; }
.icone-bouton.danger:hover { color: var(--urgent); background: var(--urgent-doux); }
.puce {
  display: inline-flex; align-items: center; gap: 6px; height: 30px; padding: 0 12px; border-radius: 999px;
  background: var(--surface); border: 1px solid var(--trait-fort); font-size: 13px; font-weight: 540; color: var(--texte);
  white-space: nowrap; transition: transform .12s cubic-bezier(.2,.9,.3,1.4), background-color .15s;
}
.puce:hover { background: var(--surface-2); }
.puce[aria-pressed="true"] { background: var(--accent-fond); color: var(--accent-sur); border-color: transparent; }
.segments { display: inline-flex; padding: 3px; gap: 2px; border-radius: 11px; background: var(--surface-3); }
.segments button { display: inline-flex; align-items: center; gap: 6px; height: 30px; padding: 0 10px; border-radius: 8px; font-size: 13px; font-weight: 560; color: var(--texte-2); }
.segments button .ic { width: 17px; height: 17px; }
.segments button[aria-pressed="true"] { background: var(--surface); color: var(--texte); box-shadow: 0 1px 2px rgba(0,0,0,.12); }

/* ---------- Champs ---------- */
.champ { display: grid; gap: 6px; margin: 0 0 14px; font-size: 13.5px; color: var(--texte-2); font-weight: 520; text-align: left; }
.champ small { font-weight: 450; color: var(--texte-2); }
.saisie, .champ input, .champ select, .champ textarea {
  width: 100%; height: 42px; padding: 0 12px; border-radius: 10px; border: 1px solid var(--trait-fort);
  background: var(--surface); color: var(--texte); font-size: 15px; font-weight: 450; outline: 0;
  transition: border-color .15s, box-shadow .15s;
}
.champ textarea { height: auto; min-height: 92px; padding: 10px 12px; resize: vertical; line-height: 1.5; }
.saisie:focus, .champ input:focus, .champ select:focus, .champ textarea:focus { border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-doux); }
.champ input[aria-invalid="true"] { border-color: var(--urgent); }
.champ-mdp { position: relative; display: block; }
.champ-mdp input { padding-right: 46px; }
.champ-mdp .icone-bouton { position: absolute; right: 3px; top: 3px; }
.code-saisie { font: 600 22px/1 ui-monospace, "SF Mono", "Cascadia Mono", monospace !important; letter-spacing: .35em; text-align: center; height: 52px !important; }
.case { display: flex; align-items: flex-start; gap: 10px; font-size: 14px; color: var(--texte); cursor: pointer; text-align: left; }
.case input { width: 18px; height: 18px; margin: 2px 0 0; accent-color: var(--accent-fond); flex: none; }
.ligne-champs { display: grid; grid-template-columns: 1fr 1fr; gap: 0 12px; }
.erreur-formulaire { margin: 0 0 14px; padding: 9px 12px; border-radius: 10px; background: var(--urgent-doux); color: var(--urgent); font-size: 13.5px; font-weight: 520; text-align: left; }
.info-formulaire { margin: 0 0 14px; padding: 9px 12px; border-radius: 10px; background: var(--accent-doux); color: var(--texte); font-size: 13.5px; text-align: left; }
.bascule { position: relative; width: 42px; height: 26px; flex: none; appearance: none; -webkit-appearance: none; margin: 0; border-radius: 999px; background: var(--surface-3); border: 1px solid var(--trait-fort); cursor: pointer; transition: background-color .15s; }
.bascule::after { content: ""; position: absolute; top: 2px; left: 2px; width: 20px; height: 20px; border-radius: 50%; background: #fff; box-shadow: 0 1px 3px rgba(0,0,0,.3); transition: transform .2s cubic-bezier(.2,.9,.3,1.3); }
.bascule:checked { background: var(--accent-fond); border-color: transparent; }
.bascule:checked::after { transform: translateX(16px); }

/* ---------- Cartes (surfaces pleines) ---------- */
.carte { background: var(--surface); border: 1px solid var(--trait); border-radius: 16px; }
.carte-corps { padding: 16px 18px; }
.section-titre { display: flex; align-items: baseline; gap: 10px; margin: 26px 4px 10px; font-size: 13px; font-weight: 650; color: var(--texte-2); text-transform: uppercase; letter-spacing: .04em; }
.section-titre:first-child { margin-top: 6px; }
.section-titre .lien, .section-titre .bouton { margin-left: auto; text-transform: none; letter-spacing: 0; }

/* ---------- Fil d'Ariane ---------- */
.ariane { display: flex; align-items: center; gap: 2px; min-width: 0; flex-wrap: nowrap; overflow-x: auto; scrollbar-width: none; font-size: 13.5px; }
.ariane::-webkit-scrollbar { display: none; }
.ariane a, .ariane span[aria-current] {
  flex: none; display: inline-flex; align-items: center; gap: 6px; height: 28px; padding: 0 8px; border-radius: 8px;
  color: var(--texte-2); text-decoration: none; font-weight: 540; max-width: 220px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
.ariane a:hover { background: var(--accent-doux); color: var(--texte); }
.ariane a.depot-cible { background: var(--accent-doux); box-shadow: inset 0 0 0 2px var(--accent); }
.ariane span[aria-current] { color: var(--texte); font-weight: 650; display: inline-block; line-height: 28px; }
.ariane .sep { flex: none; width: 14px; height: 14px; color: var(--texte-3); }
.ariane .ic { width: 16px; height: 16px; }

/* ---------- Recherche ---------- */
.recherche {
  display: flex; align-items: center; gap: 8px; height: 36px; width: min(280px, 32vw); padding: 0 6px 0 10px; border-radius: 10px;
  background: var(--surface); border: 1px solid var(--trait-fort); transition: width .2s, border-color .15s, box-shadow .15s;
}
.recherche:focus-within { border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-doux); }
.recherche .ic { width: 17px; height: 17px; color: var(--texte-2); }
.recherche input { flex: 1; min-width: 0; height: 100%; border: 0; outline: 0; background: transparent; font-size: 14px; }
.recherche input::-webkit-search-cancel-button { display: none; }
.recherche:focus-within kbd { display: none; }

/* ---------- Liste de fichiers ---------- */
.liste-carte { background: var(--surface); border: 1px solid var(--trait); border-radius: 16px; overflow: hidden; }
.fichiers { list-style: none; margin: 0; padding: 0; contain: content; }
.entete-liste, .rangee {
  display: grid; grid-template-columns: 30px 36px minmax(0, 1fr) 96px 150px 40px; align-items: center; gap: 0 10px;
  padding: 0 10px 0 12px;
}
.entete-liste { height: 38px; border-bottom: 1px solid var(--trait); font-size: 12px; font-weight: 650; color: var(--texte-2); text-transform: uppercase; letter-spacing: .04em; background: var(--surface); }
.entete-liste button { display: inline-flex; align-items: center; gap: 4px; height: 26px; padding: 0 6px; margin-left: -6px; border-radius: 6px; text-transform: inherit; letter-spacing: inherit; font-weight: inherit; color: inherit; }
.entete-liste button:hover { background: var(--accent-doux); color: var(--texte); }
.entete-liste button[aria-sort] { color: var(--texte); }
.entete-liste button .ic { width: 13px; height: 13px; }
.entete-liste .col-taille, .rangee .col-taille { text-align: right; justify-self: end; }
.entete-liste .col-taille button { margin: 0 -6px 0 0; }
.rangee {
  position: relative; min-height: 52px; border-top: 1px solid var(--trait); background: var(--surface); cursor: default;
  content-visibility: auto; contain-intrinsic-size: auto 52px; user-select: none; -webkit-user-select: none;
  transition: background-color .12s;
}
.fichiers > .rangee:first-child { border-top: 0; }
.rangee:hover { background: var(--surface-2); }
.rangee[aria-selected="true"] { background: var(--accent-doux); }
.rangee.focus { box-shadow: inset 3px 0 0 var(--accent); }
.rangee.depot-cible { background: var(--accent-doux); box-shadow: inset 0 0 0 2px var(--accent); }
.rangee.coupe { opacity: .45; }
.rangee .col-nom { min-width: 0; display: flex; align-items: center; gap: 8px; }
.nom-fichier { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-weight: 540; font-size: 14.5px; color: var(--texte); text-decoration: none; }
a.nom-fichier:hover { text-decoration: underline; text-underline-offset: 2px; }
.chemin-fichier { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: 12.5px; color: var(--texte-2); }
.col-nom .empile { display: grid; min-width: 0; }
.col-taille, .col-date { font-size: 13px; color: var(--texte-2); font-variant-numeric: tabular-nums; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.marque-partage { width: 15px; height: 15px; color: var(--accent); flex: none; }
.coche-case {
  display: grid; place-items: center; width: 22px; height: 22px; border-radius: 7px; border: 1.5px solid var(--trait-fort);
  background: var(--surface); color: var(--accent-sur); transition: background-color .12s, border-color .12s, transform .2s cubic-bezier(.2,.9,.3,1.4);
}
.coche-case .ic { width: 15px; height: 15px; opacity: 0; transform: scale(.6); transition: opacity .12s, transform .2s cubic-bezier(.2,.9,.3,1.4); }
.rangee:not(:hover):not([aria-selected="true"]) .coche-case { opacity: .55; }
[aria-selected="true"] > .coche-case, [aria-selected="true"] .coche-case, .coche-case[aria-checked="true"] { background: var(--accent-fond); border-color: transparent; opacity: 1; }
[aria-selected="true"] .coche-case .ic, .coche-case[aria-checked="true"] .ic { opacity: 1; transform: none; }
.coche-case[aria-checked="mixed"] { background: var(--accent-fond); border-color: transparent; }
.coche-case[aria-checked="mixed"]::after { content: ""; width: 10px; height: 2px; border-radius: 2px; background: var(--accent-sur); }

/* Icône de type : pastille teintée sur surface pleine. */
.type {
  --t: var(--t-texte);
  display: grid; place-items: center; width: 36px; height: 36px; border-radius: 10px; flex: none;
  color: var(--t); background: color-mix(in srgb, var(--t) 13%, var(--surface));
}
.type .ic { width: 19px; height: 19px; }
.type.dossier { --t: var(--t-dossier); }
.type.image { --t: var(--t-image); }
.type.pdf { --t: var(--t-pdf); }
.type.video { --t: var(--t-video); }
.type.audio { --t: var(--t-audio); }
.type.archive { --t: var(--t-archive); }
.type.code { --t: var(--t-code); }
.type.chiffre { --t: var(--succes); }
.type.dossier .ic { fill: color-mix(in srgb, var(--t) 22%, transparent); }

/* Grille */
.grille { display: grid; grid-template-columns: repeat(auto-fill, minmax(156px, 1fr)); gap: 12px; list-style: none; margin: 0; padding: 0; }
.tuile {
  position: relative; display: grid; grid-template-rows: auto auto auto; gap: 2px; padding: 8px 8px 10px; border-radius: 14px;
  background: var(--surface); border: 1px solid var(--trait); cursor: default; user-select: none; -webkit-user-select: none;
  content-visibility: auto; contain-intrinsic-size: auto 196px; transition: background-color .12s, border-color .12s, box-shadow .12s;
}
.tuile:hover { border-color: var(--trait-fort); box-shadow: var(--ombre-1); }
.tuile[aria-selected="true"] { background: var(--accent-doux); border-color: color-mix(in srgb, var(--accent) 50%, transparent); }
.tuile.focus { box-shadow: 0 0 0 2px var(--accent); }
.tuile.depot-cible { box-shadow: 0 0 0 2px var(--accent); background: var(--accent-doux); }
.tuile .vignette {
  --t: var(--t-texte);
  position: relative; display: grid; place-items: center; aspect-ratio: 4 / 3; border-radius: 10px; overflow: hidden; margin-bottom: 6px;
  color: var(--t); background: color-mix(in srgb, var(--t) 9%, var(--surface-2));
}
.tuile .vignette .ic { width: 40px; height: 40px; stroke-width: 1.4; }
.tuile .vignette img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.tuile .vignette.dossier { --t: var(--t-dossier); }
.tuile .vignette.dossier .ic { fill: color-mix(in srgb, var(--t) 20%, transparent); }
.tuile .vignette.image { --t: var(--t-image); }
.tuile .vignette.pdf { --t: var(--t-pdf); }
.tuile .vignette.video { --t: var(--t-video); }
.tuile .vignette.audio { --t: var(--t-audio); }
.tuile .vignette.archive { --t: var(--t-archive); }
.tuile .vignette.code { --t: var(--t-code); }
.tuile .nom-fichier { font-size: 13.5px; padding: 0 2px; }
.tuile .col-date { font-size: 12px; padding: 0 2px; }
.tuile .coche-case { position: absolute; top: 14px; left: 14px; z-index: 1; opacity: 0; }
.tuile:hover .coche-case, .tuile[aria-selected="true"] .coche-case, .selection-active .tuile .coche-case { opacity: 1; }
.tuile .icone-bouton { position: absolute; top: 12px; right: 12px; z-index: 1; background: var(--surface); box-shadow: var(--ombre-1); opacity: 0; }
.tuile:hover .icone-bouton, .tuile .icone-bouton[aria-expanded="true"] { opacity: 1; }

/* États vides, chargement */
.vide { display: grid; justify-items: center; gap: 8px; padding: 56px 20px; text-align: center; }
.vide .rond { width: 84px; height: 84px; border-radius: 50%; display: grid; place-items: center; background: var(--accent-doux); color: var(--accent); }
.vide .rond.succes { background: var(--succes-doux); color: var(--succes); }
.vide .rond .ic { width: 38px; height: 38px; stroke-width: 1.5; }
.vide h2 { margin: 8px 0 0; font-size: 19px; letter-spacing: -.01em; }
.vide p { margin: 0; color: var(--texte-2); max-width: 42ch; }
.vide .actions { display: flex; gap: 8px; flex-wrap: wrap; justify-content: center; margin-top: 8px; }
.squelette { height: 52px; border-top: 1px solid var(--trait); background: linear-gradient(90deg, transparent 0 60px, color-mix(in srgb, var(--texte) 6%, transparent) 60px 40%, transparent 40%); background-size: 100% 12px; background-repeat: no-repeat; background-position: 0 50%; animation: pulse 1.2s ease-in-out infinite; }
.squelette:first-child { border-top: 0; }
@keyframes pulse { 50% { opacity: .45; } }
.compte-liste { margin: 10px 4px 0; font-size: 12.5px; color: var(--texte-2); }

/* Dépôt de fichiers (glisser-déposer) */
.depot {
  position: fixed; z-index: 25; inset: 12px 12px 12px 248px; border-radius: 22px; pointer-events: none;
  display: grid; place-content: center; justify-items: center; gap: 10px; text-align: center;
  border: 2px dashed var(--accent); background: color-mix(in srgb, var(--accent-fond) 8%, transparent);
  opacity: 0; transition: opacity .15s;
}
.depot.actif { opacity: 1; }
.depot .bulle-depot { display: grid; justify-items: center; gap: 8px; padding: 22px 28px; border-radius: 20px; }
.depot .ic { width: 40px; height: 40px; color: var(--accent); }
.depot b { font-size: 17px; }
.depot span { color: var(--texte-2); font-size: 14px; }

/* ---------- Barre de sélection, toasts, envois ---------- */
.barre-selection { position: fixed; z-index: 20; left: calc(50% + 118px); bottom: 20px; translate: -50% 0; display: flex; align-items: center; gap: 2px; padding: 6px 6px 6px 16px; border-radius: 18px; max-width: calc(100vw - 260px); }
.barre-selection .nombre { font-weight: 650; font-variant-numeric: tabular-nums; margin-right: 8px; white-space: nowrap; }
.barre-selection .icone-bouton { color: var(--texte); }
.barre-selection .sep { width: 1px; height: 22px; background: var(--verre-trait); margin: 0 4px; flex: none; }
.toasts { position: fixed; z-index: 50; left: calc(50% + 118px); bottom: 20px; translate: -50% 0; display: grid; gap: 8px; justify-items: center; pointer-events: none; }
.sel-actif .toasts { bottom: 86px; }
.toast { position: relative; overflow: hidden; pointer-events: auto; display: flex; align-items: center; gap: 12px; padding: 8px 8px 8px 16px; border-radius: 16px; font-size: 14px; font-weight: 520; min-height: 48px; max-width: min(560px, calc(100vw - 24px)); }
.toast > .ic { color: var(--accent); }
.toast.erreur > .ic { color: var(--urgent); }
.toast > span { min-width: 0; }
.toast .bouton { height: 32px; }
.toast:not(:has(.bouton)) { padding-right: 16px; }
.toast-delai { position: absolute; left: 0; right: 0; bottom: 0; height: 2px; background: var(--accent); opacity: .5; transform-origin: left; }

.envois { position: fixed; z-index: 22; right: 20px; bottom: 20px; width: min(380px, calc(100vw - 24px)); border-radius: 18px; overflow: hidden; display: flex; flex-direction: column; max-height: min(420px, 60dvh); }
.envois-tete { display: flex; align-items: center; gap: 8px; padding: 10px 8px 10px 16px; border-bottom: 1px solid var(--verre-trait); }
.envois-tete b { flex: 1; font-size: 14px; font-weight: 650; }
.envois-tete small { color: var(--texte-2); font-variant-numeric: tabular-nums; font-size: 12.5px; }
.envois.replie .envois-liste { display: none; }
.envois.replie .envois-tete { border-bottom: 0; }
.envois-liste { list-style: none; margin: 0; padding: 6px; overflow-y: auto; }
.envoi { display: grid; grid-template-columns: 1fr auto; gap: 4px 10px; align-items: center; padding: 8px 8px 9px 10px; border-radius: 10px; }
.envoi-nom { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: 13.5px; font-weight: 560; }
.envoi-etat { font-size: 12px; color: var(--texte-2); font-variant-numeric: tabular-nums; white-space: nowrap; }
.envoi.erreur .envoi-etat { color: var(--urgent); }
.envoi.fini .envoi-etat { color: var(--succes); }
.envoi .progression { grid-column: 1 / -1; }
.envoi .icone-bouton { width: 26px; height: 26px; grid-row: 1; grid-column: 2; }
.envoi .actions-envoi { display: flex; gap: 2px; align-items: center; }
.progression { height: 6px; border-radius: 99px; background: var(--surface-3); overflow: hidden; }
.progression i { display: block; height: 100%; width: 100%; background: var(--accent-fond); border-radius: inherit; transform-origin: left; transform: scaleX(var(--p, 0)); transition: transform .3s cubic-bezier(.2,.9,.25,1); }
.envoi.fini .progression i { background: var(--succes-fond); }
.envoi.erreur .progression i { background: var(--urgent-fond); }
.progression.grande { height: 10px; }
.progression.alerte i { background: var(--alerte-fond); }
.progression.urgent i { background: var(--urgent-fond); }

/* ---------- Feuilles, dialogues ---------- */
.voile { position: fixed; inset: 0; background: var(--voile); z-index: 30; }
.feuille {
  position: fixed; z-index: 38; left: 50%; top: 50%; translate: -50% -50%;
  width: min(480px, calc(100vw - 32px)); max-height: min(720px, calc(100dvh - 48px));
  border-radius: 22px; display: flex; flex-direction: column; overflow: hidden;
}
.feuille.large { width: min(640px, calc(100vw - 32px)); }
.feuille.apercu { width: min(1100px, calc(100vw - 48px)); height: min(860px, calc(100dvh - 48px)); max-height: none; }
.feuille-tete { display: flex; align-items: center; gap: 4px; padding: 10px 10px 8px 18px; border-bottom: 1px solid var(--verre-trait); flex: none; min-height: 56px; }
.feuille-tete .titre { flex: 1; font-weight: 650; font-size: 15.5px; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; margin: 0; }
.feuille-tete .sous { display: block; font-size: 12.5px; font-weight: 450; color: var(--texte-2); }
.poignee { display: none; width: 40px; height: 5px; border-radius: 9px; background: var(--trait-fort); margin: 8px auto 0; flex: none; }
.feuille-corps { flex: 1; overflow-y: auto; overscroll-behavior: contain; padding: 18px 20px 20px; }
.feuille-corps > p:first-child { margin-top: 0; }
.feuille-corps p { color: var(--texte-2); line-height: 1.5; }
.feuille-pied { flex: none; display: flex; justify-content: flex-end; gap: 8px; padding: 10px 12px calc(10px + env(safe-area-inset-bottom)); border-top: 1px solid var(--verre-trait); }
.feuille-pied .gauche { margin-right: auto; }
/* Le texte long et les listes se lisent sur une surface pleine posée dans la feuille. */
.papier { background: var(--surface); border: 1px solid var(--trait); border-radius: 14px; padding: 14px 16px; }
.papier + .papier { margin-top: 10px; }

/* Choix de dossier (déplacer / copier) */
.choix-dossier { padding: 0; overflow: hidden; }
.choix-dossier .ariane { padding: 8px 10px; border-bottom: 1px solid var(--trait); }
.choix-dossier ul { list-style: none; margin: 0; padding: 4px; max-height: 300px; overflow-y: auto; }
.choix-dossier li button { display: flex; align-items: center; gap: 10px; width: 100%; padding: 8px 10px; border-radius: 10px; text-align: left; font-size: 14.5px; }
.choix-dossier li button:hover, .choix-dossier li button:focus-visible { background: var(--accent-doux); }
.choix-dossier li button .type { width: 30px; height: 30px; border-radius: 8px; }
.choix-dossier li button .type .ic { width: 16px; height: 16px; }
.choix-dossier li button > .ic { margin-left: auto; color: var(--texte-3); width: 16px; height: 16px; }
.choix-dossier .vide-petit { padding: 18px; text-align: center; color: var(--texte-2); font-size: 13.5px; }

/* Aperçu */
.apercu .feuille-corps { padding: 0; display: grid; place-items: center; background: var(--surface-2); position: relative; overflow: auto; }
.apercu-media { max-width: 100%; max-height: 100%; display: block; }
.apercu img.apercu-media { object-fit: contain; width: 100%; height: 100%; }
.apercu video.apercu-media { width: 100%; height: 100%; background: #000; }
.apercu audio { width: min(520px, 90%); }
.apercu iframe { width: 100%; height: 100%; border: 0; background: #fff; }
.apercu pre { align-self: stretch; justify-self: stretch; margin: 0; padding: 18px 22px; overflow: auto; white-space: pre-wrap; overflow-wrap: anywhere; font: 13.5px/1.6 ui-monospace, "SF Mono", "Cascadia Mono", monospace; color: var(--texte); background: var(--surface); }
.apercu .rien { display: grid; justify-items: center; gap: 10px; padding: 40px; text-align: center; color: var(--texte-2); }
.apercu .rien .type { width: 72px; height: 72px; border-radius: 20px; }
.apercu .rien .type .ic { width: 34px; height: 34px; }
.apercu .rien b { color: var(--texte); font-size: 16px; }
.audio-carte { display: grid; justify-items: center; gap: 18px; padding: 30px; }
.audio-carte .type { width: 96px; height: 96px; border-radius: 26px; }
.audio-carte .type .ic { width: 44px; height: 44px; }
.apercu-nav { position: absolute; top: 50%; translate: 0 -50%; z-index: 2; width: 44px; height: 44px; border-radius: 50%; }
.apercu-nav.prec { left: 14px; }
.apercu-nav.suiv { right: 14px; }
.chargement { display: grid; justify-items: center; gap: 12px; color: var(--texte-2); font-size: 14px; }
.tourne { width: 28px; height: 28px; border-radius: 50%; border: 3px solid var(--surface-3); border-top-color: var(--accent-fond); animation: tourne .8s linear infinite; }
@keyframes tourne { to { transform: rotate(360deg); } }

/* ---------- Menu contextuel ---------- */
.menu { position: fixed; z-index: 45; min-width: 230px; max-width: calc(100vw - 16px); padding: 6px; border-radius: 16px; display: grid; }
.menu button, .menu a { display: flex; align-items: center; gap: 10px; padding: 8px 10px; border-radius: 10px; text-align: left; font-size: 14px; color: var(--texte); text-decoration: none; }
.menu button .ic, .menu a .ic { width: 17px; height: 17px; color: var(--texte-2); }
.menu button kbd { margin-left: auto; }
.menu button:hover, .menu button:focus-visible, .menu a:hover, .menu a:focus-visible { background: var(--accent-doux); outline: 0; }
.menu button.danger, .menu button.danger .ic { color: var(--urgent); }
.menu button.danger:hover, .menu button.danger:focus-visible { background: var(--urgent-doux); }
.menu button[aria-checked="true"] .ic { color: var(--accent); }
.menu hr { border: 0; border-top: 1px solid var(--verre-trait); margin: 5px 6px; }
.menu-titre { padding: 6px 10px 4px; font-size: 12px; font-weight: 650; color: var(--texte-2); text-transform: uppercase; letter-spacing: .04em; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; max-width: 280px; }

/* ---------- Palette ---------- */
.palette { position: fixed; z-index: 41; left: 50%; top: 12vh; width: min(640px, calc(100vw - 24px)); translate: -50% 0; border-radius: 20px; overflow: hidden; display: flex; flex-direction: column; max-height: min(560px, 76dvh); }
.palette-saisie { display: flex; align-items: center; gap: 10px; padding: 14px 16px; border-bottom: 1px solid var(--verre-trait); }
.palette-saisie .ic { width: 20px; height: 20px; color: var(--texte-2); }
.palette-saisie input { flex: 1; border: 0; outline: 0; background: transparent; font-size: 17px; min-width: 0; }
.palette-res { overflow-y: auto; padding: 6px; list-style: none; margin: 0; contain: content; }
.palette-groupe { padding: 10px 10px 4px; font-size: 11.5px; font-weight: 650; text-transform: uppercase; letter-spacing: .05em; color: var(--texte-2); }
.palette-groupe.rien { text-transform: none; letter-spacing: 0; font-weight: 500; font-size: 14px; padding: 16px; }
.palette-res li[role="option"] { display: flex; align-items: center; gap: 12px; padding: 9px 10px; border-radius: 10px; cursor: pointer; font-size: 14.5px; min-width: 0; }
.palette-res li[role="option"] .ic { width: 18px; height: 18px; color: var(--texte-2); }
.palette-res li[role="option"] .p-titre { flex: none; max-width: 55%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.palette-res li[role="option"] .p-sous { color: var(--texte-2); font-size: 13px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; min-width: 0; flex: 1; }
.palette-res li[role="option"] kbd { margin-left: auto; }
.palette-res li[aria-selected="true"] { background: var(--accent-fond); color: var(--accent-sur); }
.palette-res li[aria-selected="true"] .ic, .palette-res li[aria-selected="true"] .p-sous { color: var(--accent-sur); }
.palette-res li[aria-selected="true"] kbd { color: var(--accent-sur); background: transparent; border-color: currentColor; }
.palette-res mark { background: none; color: inherit; font-weight: 750; text-decoration: underline; text-underline-offset: 2px; }
.palette-pied { display: flex; gap: 14px; padding: 8px 14px; font-size: 12px; color: var(--texte-2); border-top: 1px solid var(--verre-trait); }

/* Aide des raccourcis */
.raccourcis { display: grid; grid-template-columns: 1fr 1fr; gap: 4px 24px; margin: 0; }
.raccourcis div { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 6px 0; border-bottom: 1px solid var(--trait); font-size: 14px; }
.raccourcis dt { color: var(--texte); }
.raccourcis dd { margin: 0; display: flex; gap: 3px; flex: none; }

/* ---------- Partages, corbeille, réglages (lignes sur surface pleine) ---------- */
.lignes { list-style: none; margin: 0; padding: 0; }
.ligne { display: grid; grid-template-columns: 36px minmax(0, 1fr) auto; gap: 2px 12px; align-items: center; padding: 12px 14px; border-top: 1px solid var(--trait); background: var(--surface); }
.lignes > .ligne:first-child { border-top: 0; }
.ligne .type { grid-row: span 2; }
.ligne-titre { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-weight: 580; font-size: 14.5px; }
.ligne-meta { grid-column: 2; min-width: 0; display: flex; flex-wrap: wrap; gap: 2px 10px; font-size: 12.5px; color: var(--texte-2); font-variant-numeric: tabular-nums; }
.ligne-meta > span { display: inline-flex; align-items: center; gap: 4px; }
.ligne-meta .ic { width: 13px; height: 13px; }
.ligne-actions { grid-row: 1 / span 2; grid-column: 3; display: flex; gap: 4px; align-items: center; }
.ligne.expire { opacity: .62; }
.etiquette { display: inline-flex; align-items: center; gap: 4px; height: 20px; padding: 0 7px; border-radius: 6px; font-size: 11.5px; font-weight: 650; flex: none; background: var(--surface-3); color: var(--texte-2); }
.etiquette.urgent { background: var(--urgent-doux); color: var(--urgent); }
.etiquette.succes { background: var(--succes-doux); color: var(--succes); }
.etiquette.accent { background: var(--accent-doux); color: var(--accent); }
.etiquette .ic { width: 12px; height: 12px; }

.reglage { display: flex; align-items: center; justify-content: space-between; gap: 16px; padding: 14px 18px; border-top: 1px solid var(--trait); }
.carte > .reglage:first-child { border-top: 0; }
.reglage-texte { min-width: 0; }
.reglage-texte b { display: block; font-weight: 580; font-size: 14.5px; }
.reglage-texte small { display: block; color: var(--texte-2); font-size: 13px; margin-top: 1px; }
.reglage .segments { flex: none; }
.espace-disque { padding: 18px; display: grid; gap: 10px; }
.espace-chiffres { display: flex; align-items: baseline; gap: 8px; flex-wrap: wrap; }
.espace-chiffres b { font-size: 28px; font-weight: 720; letter-spacing: -.02em; font-variant-numeric: tabular-nums; }
.espace-chiffres span { color: var(--texte-2); }
.espace-legende { display: flex; justify-content: space-between; font-size: 12.5px; color: var(--texte-2); font-variant-numeric: tabular-nums; }
.journal .ligne { grid-template-columns: 36px minmax(0, 1fr) auto; }
.journal .type.succes { --t: var(--succes); }
.journal .type.urgent { --t: var(--urgent); }
.journal .type.accent { --t: var(--accent); }
.journal time { font-size: 12.5px; color: var(--texte-2); font-variant-numeric: tabular-nums; white-space: nowrap; grid-row: 1 / span 2; grid-column: 3; }
.plus-bas { display: flex; justify-content: center; padding: 10px; border-top: 1px solid var(--trait); }

/* Secrets affichés une seule fois (jeton d'appareil, clé du coffre, codes de secours) */
.secret {
  display: flex; align-items: center; gap: 8px; padding: 10px 8px 10px 14px; border-radius: 12px;
  background: var(--surface-2); border: 1px dashed var(--trait-fort);
}
.secret code { text-align: left; flex: 1; min-width: 0; font-size: 14px; font-weight: 600; overflow-wrap: anywhere; word-break: break-all; color: var(--texte); user-select: all; -webkit-user-select: all; }
.codes { display: grid; grid-template-columns: repeat(2, 1fr); gap: 6px 10px; margin: 0; padding: 14px 16px; list-style: none; border-radius: 12px; background: var(--surface-2); border: 1px dashed var(--trait-fort); counter-reset: code; }
.codes li { font: 600 15px/1.6 ui-monospace, "SF Mono", "Cascadia Mono", monospace; letter-spacing: .04em; color: var(--texte); counter-increment: code; display: flex; gap: 8px; }
.codes li::before { content: counter(code) "."; color: var(--texte-3); min-width: 2.2ch; text-align: right; font-weight: 500; }
.avertissement { display: grid; grid-template-columns: 22px 1fr; gap: 10px; padding: 12px 14px; border-radius: 12px; background: var(--alerte-doux); color: var(--texte); font-size: 14px; margin: 0 0 14px; text-align: left; }
.avertissement .ic { color: var(--alerte); width: 20px; height: 20px; margin-top: 1px; }
.avertissement.info { background: var(--accent-doux); }
.avertissement.info .ic { color: var(--accent); }
.avertissement p { margin: 0; color: inherit; }
.avertissement b { font-weight: 650; }

/* ---------- Coffre ---------- */
.coffre-ecran { min-height: calc(100dvh - 61px); display: grid; place-items: center; padding: 24px 16px 120px; }
.coffre-carte { width: min(500px, 100%); padding: 30px 28px 24px; text-align: center; }
.coffre-carte .rond { width: 84px; height: 84px; margin: 0 auto 8px; border-radius: 50%; display: grid; place-items: center; background: var(--accent-doux); color: var(--accent); position: relative; }
.coffre-carte .rond.succes { background: var(--succes-doux); color: var(--succes); }
.coffre-carte .rond.alerte { background: var(--alerte-doux); color: var(--alerte); }
.coffre-carte .rond .ic { width: 38px; height: 38px; stroke-width: 1.6; }
.coffre-carte h2 { margin: 10px 0 6px; font-size: 21px; letter-spacing: -.015em; }
.coffre-carte > p { margin: 0 auto 20px; color: var(--texte-2); max-width: 40ch; line-height: 1.5; }
.coffre-carte .champ { margin-bottom: 12px; }
.coffre-carte textarea { font: 600 14px/1.5 ui-monospace, "SF Mono", "Cascadia Mono", monospace !important; min-height: 76px !important; word-break: break-all; }
.coffre-carte .bouton.large { margin-top: 6px; }
.coffre-carte .secret + .pied-carte { margin: 8px 0 18px; }
.coffre-carte .case { margin: 0 0 14px; }
.etapes { display: flex; justify-content: center; gap: 6px; margin: 0 0 18px; }
.etapes i { width: 28px; height: 4px; border-radius: 99px; background: var(--surface-3); }
.etapes i.fait { background: var(--accent-fond); }
.minuteur { display: inline-flex; align-items: center; gap: 6px; height: 30px; padding: 0 10px; border-radius: 999px; font-size: 12.5px; font-weight: 600; color: var(--succes); background: var(--succes-doux); font-variant-numeric: tabular-nums; white-space: nowrap; }
.minuteur .ic { width: 14px; height: 14px; }
.minuteur.bientot { color: var(--alerte); background: var(--alerte-doux); }

/* ---------- Onglets mobiles ---------- */
.onglets { display: none; }

/* ---------- Pages hors appli (connexion, enrôlement, partage public) ---------- */
.page-seule { overflow: auto; }
.page-seule .centre { min-height: 100dvh; display: grid; place-items: center; padding: max(24px, env(safe-area-inset-top)) 16px max(24px, env(safe-area-inset-bottom)); }
.carte-seule { width: min(400px, 100%); padding: 32px 28px 24px; text-align: center; border-radius: 22px; background: var(--surface); border: 1px solid var(--trait); box-shadow: var(--ombre-2); }
.carte-seule.large { width: min(520px, 100%); }
.carte-seule .logo { width: 52px; height: 52px; border-radius: 15px; box-shadow: 0 8px 22px -8px color-mix(in srgb, var(--accent-fond) 80%, transparent); }
.carte-seule h1 { margin: 14px 0 4px; font-size: 23px; font-weight: 700; letter-spacing: -.02em; }
.carte-seule > .discret, .carte-seule .etape > .discret { margin: 0 0 22px; font-size: 14.5px; line-height: 1.45; }
.carte-seule .bouton.large { margin-top: 4px; }
.pied-carte { margin: 16px 0 0; font-size: 12.5px; color: var(--texte-2); }
.lien-discret { color: var(--texte-2); font-size: 13.5px; text-decoration: underline; text-underline-offset: 2px; padding: 6px; border-radius: 6px; }
.lien-discret:hover { color: var(--accent); }
.qr { display: grid; place-items: center; margin: 0 auto 12px; width: 200px; height: 200px; padding: 10px; border-radius: 16px; background: #fff; border: 1px solid var(--trait); }
.qr img { width: 100%; height: 100%; image-rendering: pixelated; }
.secret-totp { margin: 0 0 16px; font-size: 12.5px; color: var(--texte-2); }
.secret-totp code { font-size: 12.5px; color: var(--texte); word-break: break-all; }
.partage-fichier { display: grid; justify-items: center; gap: 4px; margin: 4px 0 20px; }
.partage-fichier .type { width: 72px; height: 72px; border-radius: 20px; margin-bottom: 8px; }
.partage-fichier .type .ic { width: 34px; height: 34px; }
.partage-fichier b { font-size: 17px; font-weight: 650; overflow-wrap: anywhere; }
.partage-fichier span { font-size: 13.5px; color: var(--texte-2); }
.partage-liste { text-align: left; margin: 0 0 16px; max-height: 50dvh; overflow-y: auto; }
.partage-liste .ligne { padding: 10px 12px; }
.partage-liste .ligne a { color: var(--texte); text-decoration: none; }
.partage-liste .ligne a:hover { color: var(--accent); text-decoration: underline; }

/* ---------- Écran moyen ---------- */
@media (max-width: 1100px) {
  .appli { grid-template-columns: 72px 1fr; }
  .rail .lib, .rail .compte, .marque span, .rail-astuce span, .rail-astuce kbd, .face, .jauge-rail { display: none; }
  .rail-lien, .rail-astuce { justify-content: center; }
  .rail-lien .cadenas { position: absolute; top: 3px; right: 6px; width: 12px; height: 12px; margin: 0; }
  .rail-pied .bouton.primaire { padding: 0; }
  .rail-pied .bouton.primaire .lib { display: none; }
  .entete-liste, .rangee { grid-template-columns: 30px 36px minmax(0, 1fr) 84px 118px 40px; }
  .depot { inset: 12px 12px 12px 84px; }
  .barre-selection, .toasts { left: calc(50% + 36px); max-width: calc(100vw - 96px); }
  .recherche { width: 200px; }
}

/* ---------- Mobile 390 px : navigation au pouce ---------- */
@media (max-width: 720px) {
  .appli { grid-template-columns: 1fr; }
  .rail { display: none; }
  .vue-tete { padding: 8px 16px; min-height: 54px; padding-top: max(8px, env(safe-area-inset-top)); }
  .vue-tete h1 { font-size: 18px; }
  .contenu { padding: 12px 16px 150px; }
  .outils { gap: 2px; }
  .vue-tete { flex-wrap: nowrap; }
  .outils .bouton .lib { display: none; }
  .outils .bouton { width: 40px; height: 40px; padding: 0; }
  .outils .bouton:not(.primaire) { border-color: transparent; background: transparent; color: var(--texte-2); }
  .outils .icone-bouton { width: 40px; height: 40px; }
  .recherche { width: 40px; padding: 0; justify-content: center; border-color: transparent; background: transparent; }
  .recherche input, .recherche kbd { display: none; }
  .recherche.ouverte { position: absolute; left: 12px; right: 12px; top: max(8px, env(safe-area-inset-top)); z-index: 6; width: auto; height: 40px; padding: 0 6px 0 12px; border-color: var(--accent); background: var(--surface); }
  .recherche.ouverte input { display: block; }
  .entete-liste { display: none; }
  .rangee { grid-template-columns: 36px minmax(0, 1fr) 40px; gap: 0 12px; min-height: 60px; padding: 0 4px 0 14px; }
  .rangee .coche-case { display: none; }
  .selection-active .rangee { grid-template-columns: 26px 36px minmax(0, 1fr) 40px; }
  .selection-active .rangee .coche-case { display: grid; }
  .rangee .col-taille, .rangee .col-date { display: none; }
  .rangee .col-nom .empile .chemin-fichier { display: block; }
  .rangee .detail-mobile { display: block; }
  .grille { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
  .tuile .icone-bouton { opacity: 1; width: 32px; height: 32px; }
  .onglets {
    position: fixed; z-index: 15; left: 12px; right: 12px; bottom: calc(10px + env(safe-area-inset-bottom));
    display: grid; grid-template-columns: repeat(5, 1fr); height: 62px; border-radius: 22px; padding: 4px;
  }
  .onglet { position: relative; z-index: 1; display: grid; justify-items: center; align-content: center; gap: 2px; font-size: 11px; font-weight: 600; color: var(--texte-2); text-decoration: none; border-radius: 18px; transition: transform .12s cubic-bezier(.2,.9,.3,1.4), color .15s, background-color .15s; }
  .onglet .ic { width: 22px; height: 22px; }
  .onglet[aria-current="page"] { color: var(--accent); background: var(--accent-doux); }
  .onglet.depot-cible { box-shadow: inset 0 0 0 2px var(--accent); }
  .feuille, .feuille.large { left: 0; right: 0; top: auto; bottom: 0; translate: none; width: auto; max-height: 92dvh; border-radius: 22px 22px 0 0; }
  .feuille.apercu { inset: 0; width: auto; height: auto; border-radius: 0; }
  .feuille.apercu .feuille-tete { padding-top: max(10px, env(safe-area-inset-top)); }
  .feuille:not(.apercu) .poignee { display: block; }
  .feuille-corps { padding: 14px 16px 20px; }
  .feuille-pied { flex-wrap: wrap; }
  .feuille-pied .bouton { flex: 1; height: 44px; }
  .feuille-pied .gauche { flex-basis: 100%; }
  .palette { top: 10px; max-height: 70dvh; }
  .barre-selection { left: 50%; bottom: calc(84px + env(safe-area-inset-bottom)); max-width: calc(100vw - 16px); padding-left: 12px; }
  .barre-selection .masque-etroit { display: none; }
  .toasts { left: 50%; bottom: calc(84px + env(safe-area-inset-bottom)); width: calc(100vw - 24px); max-width: none; }
  .sel-actif .toasts { bottom: calc(146px + env(safe-area-inset-bottom)); }
  .toast { width: 100%; }
  .envois { right: 12px; left: 12px; width: auto; bottom: calc(84px + env(safe-area-inset-bottom)); }
  .envois-actifs .toasts { bottom: calc(150px + env(safe-area-inset-bottom)); }
  .depot { inset: 8px 8px calc(84px + env(safe-area-inset-bottom)); }
  .menu { min-width: 0; }
  .menu.feuille-menu { left: 8px !important; right: 8px; top: auto !important; bottom: calc(8px + env(safe-area-inset-bottom)); border-radius: 20px; padding: 8px; }
  .menu.feuille-menu button { padding: 12px; font-size: 15.5px; }
  .ligne { grid-template-columns: 36px minmax(0, 1fr) auto; padding: 12px; }
  .ligne-actions .bouton .lib { display: none; }
  .ligne-actions .bouton { width: 38px; padding: 0; }
  .reglage { padding: 14px 16px; flex-wrap: wrap; }
  .reglage:has(.bascule), .reglage:has(.bouton.petit) { flex-wrap: nowrap; }
  .reglage .segments { width: 100%; }
  .reglage .segments button { flex: 1; justify-content: center; }
  .raccourcis { grid-template-columns: 1fr; }
  .ligne-champs { grid-template-columns: 1fr; }
  .coffre-ecran { min-height: calc(100dvh - 55px); padding: 16px 16px 150px; align-items: start; }
  .coffre-carte { padding: 24px 18px 18px; }
  .codes { grid-template-columns: 1fr 1fr; padding: 12px; }
  .codes li { font-size: 14px; }
  .apercu-nav { display: none; }
  /* 16 px au moins dans les champs (en dessous, iOS zoome à la saisie), cibles de 44 px. */
  input:not([type="checkbox"]):not([type="radio"]), select, textarea { font-size: 16px !important; }
  .champ input, .champ select { height: 46px; }
  .carte-seule { padding: 26px 20px 20px; border-radius: 20px; }
  .carte-seule .bouton.large, .coffre-carte .bouton.large { height: 48px; font-size: 16px; }
  .masque-mobile { display: none !important; }
  .barre-selection .icone-bouton, .ligne-actions .icone-bouton { width: 40px; height: 40px; }
}
@media (min-width: 721px) { .masque-large { display: none !important; } }
.detail-mobile { display: none; font-size: 12.5px; color: var(--texte-2); font-variant-numeric: tabular-nums; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { transition-duration: 0.01ms !important; animation-duration: 0.01ms !important; }
}
