/* Veilleuse — interface */

:root {
  --fond: #07080b;
  --fond-2: #0c0e13;
  --verre: rgba(255, 255, 255, .045);
  --verre-2: rgba(255, 255, 255, .075);
  --verre-3: rgba(255, 255, 255, .11);
  --trait: rgba(255, 255, 255, .08);
  --trait-2: rgba(255, 255, 255, .14);
  --texte: #f4f5f8;
  --texte-2: #a7acbd;
  --texte-3: #6c7186;
  --ambre: #ffb547;
  --corail: #ff7a52;
  --rose: #ff5f7e;
  --degrade: linear-gradient(120deg, #ffd27a 0%, #ff9a4d 45%, #ff5f7e 100%);
  --ok: #6fe3a8;
  --danger: #ff7b7b;
  --r-s: 10px;
  --r: 16px;
  --r-l: 24px;
  --ombre: 0 30px 80px -30px rgba(0, 0, 0, .8);
  --police: "Geist", ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  --courbe: cubic-bezier(.2, .8, .2, 1);
  color-scheme: dark;
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
html, body { margin: 0; }
body {
  min-height: 100vh;
  background: var(--fond);
  color: var(--texte);
  font: 15px/1.5 var(--police);
  letter-spacing: -.005em;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  overflow-x: hidden;
}
button, input, select { font: inherit; color: inherit; letter-spacing: inherit; }
button { cursor: pointer; }
a { color: inherit; text-decoration: none; }
img { display: block; }
svg { width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; flex: none; }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
:focus-visible { outline: 2px solid var(--ambre); outline-offset: 2px; }
[hidden] { display: none !important; }

.conteneur { width: 100%; max-width: 1240px; margin: 0 auto; padding: 0 16px; }
@media (min-width: 720px) { .conteneur { padding: 0 32px; } }

/* ---------- Aurore en fond ---------- */
.aurore { position: fixed; inset: 0; pointer-events: none; z-index: 0; overflow: hidden; }
.aurore i {
  position: absolute; border-radius: 50%; filter: blur(90px); opacity: .55;
  animation: derive 28s ease-in-out infinite alternate;
}
.aurore i:nth-child(1) { width: 620px; height: 620px; top: -260px; right: -120px; background: radial-gradient(circle, rgba(255, 150, 70, .55), transparent 65%); }
.aurore i:nth-child(2) { width: 560px; height: 560px; top: -200px; left: -220px; background: radial-gradient(circle, rgba(118, 92, 255, .45), transparent 65%); animation-duration: 34s; }
.aurore i:nth-child(3) { width: 500px; height: 500px; top: 380px; left: 40%; background: radial-gradient(circle, rgba(255, 80, 130, .22), transparent 65%); animation-duration: 40s; }
@keyframes derive { to { transform: translate3d(60px, 40px, 0) scale(1.12); } }
@media (prefers-reduced-motion: reduce) { .aurore i { animation: none; } }

main, .barre-haut { position: relative; z-index: 1; }

/* ---------- Barre du haut ---------- */
.barre-haut {
  position: sticky; top: 0; z-index: 20;
  padding-top: env(safe-area-inset-top);
  transition: background .3s, border-color .3s, backdrop-filter .3s;
  border-bottom: 1px solid transparent;
}
.barre-haut.defile { background: rgba(7, 8, 11, .72); backdrop-filter: blur(18px) saturate(1.4); -webkit-backdrop-filter: blur(18px) saturate(1.4); border-bottom-color: var(--trait); }
.barre-haut-int { display: flex; align-items: center; justify-content: space-between; height: 64px; }
.marque { display: inline-flex; align-items: center; gap: 10px; font-weight: 700; font-size: 18px; letter-spacing: -.02em; }
.marque-icone {
  width: 34px; height: 34px; border-radius: 11px; display: grid; place-items: center;
  background: var(--degrade); box-shadow: 0 8px 24px -8px rgba(255, 130, 70, .7);
}
.marque-icone svg { width: 20px; height: 20px; }
.marque-icone svg path { fill: #1a0f06; stroke: none; }
.stockage { display: flex; align-items: center; gap: 10px; color: var(--texte-2); font-size: 13px; font-variant-numeric: tabular-nums; }
.stockage-barre { width: 64px; height: 6px; border-radius: 9px; background: var(--verre-3); overflow: hidden; }
.stockage-barre i { display: block; height: 100%; width: 0; background: var(--degrade); border-radius: inherit; transition: width .6s var(--courbe); }
.stockage b { color: var(--texte); font-weight: 600; }
.barre-droite { display: flex; align-items: center; gap: 14px; }
.barre-droite form { margin: 0; }
.sortie { width: 36px; height: 36px; border-radius: 11px; }
.sortie svg { width: 17px; height: 17px; }

/* ---------- Accroche ---------- */
.accroche { padding: 40px 0 8px; max-width: 860px; }
@media (min-width: 720px) { .accroche { padding-top: 64px; } }
.pastille {
  display: inline-flex; align-items: center; gap: 8px; margin: 0 0 18px;
  padding: 6px 12px 6px 10px; border-radius: 999px; font-size: 13px; color: var(--texte-2);
  background: var(--verre); border: 1px solid var(--trait);
}
.point { width: 7px; height: 7px; border-radius: 50%; background: var(--ok); box-shadow: 0 0 0 4px rgba(111, 227, 168, .15); }
h1 {
  margin: 0; font-size: clamp(36px, 7vw, 64px); line-height: 1.02; letter-spacing: -.045em; font-weight: 700;
}
.degrade { background: var(--degrade); -webkit-background-clip: text; background-clip: text; color: transparent; }
.sous-titre { margin: 16px 0 28px; color: var(--texte-2); font-size: clamp(15px, 2.2vw, 18px); max-width: 620px; line-height: 1.55; }

/* ---------- Composeur ---------- */
.composeur {
  position: relative; padding: 10px; border-radius: var(--r-l);
  background: linear-gradient(180deg, rgba(255, 255, 255, .07), rgba(255, 255, 255, .03));
  border: 1px solid var(--trait-2);
  box-shadow: var(--ombre), inset 0 1px 0 rgba(255, 255, 255, .06);
  backdrop-filter: blur(20px); -webkit-backdrop-filter: blur(20px);
}
.composeur::before {
  content: ""; position: absolute; inset: -1px; border-radius: inherit; padding: 1px; pointer-events: none;
  background: linear-gradient(120deg, rgba(255, 190, 110, .5), transparent 35%, transparent 65%, rgba(140, 110, 255, .45));
  -webkit-mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0); -webkit-mask-composite: xor; mask-composite: exclude;
  opacity: .0; transition: opacity .3s;
}
.composeur:focus-within::before { opacity: 1; }
.champ-lien {
  display: flex; align-items: center; gap: 10px; padding: 6px 6px 6px 8px; border-radius: 16px;
  background: rgba(0, 0, 0, .35); border: 1px solid var(--trait);
}
.service-tuile {
  width: 38px; height: 38px; border-radius: 12px; flex: none; display: grid; place-items: center;
  background: var(--verre-2); color: var(--texte-3); font-weight: 700; font-size: 15px;
  transition: background .25s, color .25s, transform .25s var(--courbe);
}
.service-tuile svg { width: 18px; height: 18px; }
.service-tuile.actif { transform: scale(1.04); color: #fff; }
.champ-lien input {
  flex: 1; min-width: 0; height: 44px; border: 0; outline: 0; background: transparent;
  font-size: 16px; color: var(--texte);
}
.champ-lien input::placeholder { color: var(--texte-3); }
.bouton-coller {
  display: inline-flex; align-items: center; gap: 6px; height: 38px; padding: 0 14px; border-radius: 11px;
  border: 1px solid var(--trait-2); background: var(--verre-2); color: var(--texte-2); font-size: 14px; font-weight: 500;
  transition: background .2s, color .2s;
}
.bouton-coller:hover { background: var(--verre-3); color: var(--texte); }
.bouton-coller svg { width: 16px; height: 16px; }

.composeur-bas { display: flex; gap: 10px; margin-top: 10px; align-items: stretch; }
.segments {
  flex: 1; display: grid; grid-template-columns: repeat(4, 1fr); gap: 4px; padding: 4px;
  border-radius: 14px; background: rgba(0, 0, 0, .3); border: 1px solid var(--trait);
}
.segments button {
  border: 0; background: transparent; border-radius: 10px; padding: 7px 6px; color: var(--texte-2);
  display: flex; flex-direction: column; align-items: center; justify-content: center; line-height: 1.2;
  transition: background .2s, color .2s;
}
.segments button b { font-size: 13.5px; font-weight: 600; }
.segments button small { font-size: 11.5px; color: var(--texte-3); margin-top: 2px; }
.segments button:hover { color: var(--texte); }
.segments button[aria-checked="true"] { background: var(--verre-3); color: var(--texte); box-shadow: inset 0 0 0 1px var(--trait-2), 0 6px 16px -8px rgba(0, 0, 0, .8); }
.segments button[aria-checked="true"] small { color: var(--ambre); }

.bouton-principal {
  position: relative; display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  min-width: 170px; padding: 0 22px; border: 0; border-radius: 14px; color: #1d1006; font-weight: 650; font-size: 16px;
  background: var(--degrade); box-shadow: 0 12px 30px -10px rgba(255, 120, 70, .75), inset 0 1px 0 rgba(255, 255, 255, .45);
  transition: transform .15s var(--courbe), box-shadow .2s, filter .2s; overflow: hidden;
}
.bouton-principal svg { stroke-width: 2.4; }
.bouton-principal:hover { filter: brightness(1.06); box-shadow: 0 16px 36px -10px rgba(255, 120, 70, .9), inset 0 1px 0 rgba(255, 255, 255, .45); }
.bouton-principal:active { transform: scale(.98); }
.bouton-principal[disabled] { filter: saturate(.6) brightness(.85); cursor: progress; }
.bouton-principal::after {
  content: ""; position: absolute; inset: 0; transform: translateX(-120%);
  background: linear-gradient(100deg, transparent 30%, rgba(255, 255, 255, .45), transparent 70%);
}
.bouton-principal:hover::after { animation: reflet 1s var(--courbe); }
@keyframes reflet { to { transform: translateX(120%); } }

.message { margin: 10px 6px 2px; font-size: 14px; color: var(--danger); }
.message:empty { display: none; }

.sous-composeur { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 14px 20px; margin-top: 16px; padding: 0 4px; }
.interrupteur { display: inline-flex; align-items: center; gap: 10px; color: var(--texte-2); font-size: 14px; cursor: pointer; user-select: none; }
.interrupteur input { position: absolute; opacity: 0; pointer-events: none; }
.piste { width: 38px; height: 22px; border-radius: 99px; background: var(--verre-3); border: 1px solid var(--trait-2); position: relative; transition: background .2s; flex: none; }
.curseur { position: absolute; top: 2px; left: 2px; width: 16px; height: 16px; border-radius: 50%; background: #fff; transition: transform .25s var(--courbe); box-shadow: 0 2px 6px rgba(0, 0, 0, .4); }
.interrupteur input:checked + .piste { background: var(--corail); border-color: transparent; }
.interrupteur input:checked + .piste .curseur { transform: translateX(16px); }
.interrupteur input:focus-visible + .piste { outline: 2px solid var(--ambre); outline-offset: 2px; }

.services { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; }
.services .etiquette { color: var(--texte-3); font-size: 12.5px; margin-right: 2px; }
.service {
  display: inline-flex; align-items: center; gap: 6px; padding: 4px 9px 4px 5px; border-radius: 99px;
  background: var(--verre); border: 1px solid var(--trait); font-size: 12.5px; color: var(--texte-2);
}
.service .mini { width: 18px; height: 18px; border-radius: 6px; font-size: 10px; }
.service.plus { padding-left: 9px; color: var(--texte-3); }

.mini, .tuile-service {
  display: inline-grid; place-items: center; color: #fff; font-weight: 700; line-height: 1; flex: none;
}
.mini svg, .tuile-service svg { width: 62%; height: 62%; }

/* ---------- Blocs ---------- */
.bloc { margin-top: 48px; }
.bloc-tete { display: flex; align-items: baseline; gap: 12px; margin-bottom: 16px; }
h2 { margin: 0; font-size: 22px; font-weight: 650; letter-spacing: -.025em; }
.discret { color: var(--texte-3); font-size: 14px; }

/* ---------- Tâches ---------- */
.taches { display: grid; gap: 10px; }
.tache {
  display: grid; grid-template-columns: 112px 1fr auto; gap: 16px; align-items: center;
  padding: 10px; border-radius: var(--r); background: var(--verre); border: 1px solid var(--trait);
  animation: entree .4s var(--courbe);
}
@keyframes entree { from { opacity: 0; transform: translateY(8px); } }
.tache-image { position: relative; width: 112px; aspect-ratio: 16/9; border-radius: 10px; overflow: hidden; background: var(--verre-2); }
.tache-image img { position: relative; width: 100%; height: 100%; object-fit: cover; }
.tache-image .mini { position: absolute; inset: 0; margin: auto; width: 30px; height: 30px; border-radius: 9px; font-size: 14px; }
.tache-corps { min-width: 0; }
.tache-titre { font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; display: flex; align-items: center; gap: 8px; }
.tache-titre .mini { width: 18px; height: 18px; border-radius: 6px; font-size: 10px; }
.tache-titre span { overflow: hidden; text-overflow: ellipsis; }
.tache-statut { color: var(--texte-2); font-size: 13px; margin-top: 3px; font-variant-numeric: tabular-nums; }
.tache.erreur .tache-statut { color: var(--danger); }
.tache.termine .tache-statut { color: var(--ok); }
.tache.relance .tache-statut { color: var(--ambre); }
.jauge { height: 6px; border-radius: 99px; background: var(--verre-3); overflow: hidden; margin-top: 10px; position: relative; }
.jauge > i {
  display: block; height: 100%; width: 0; border-radius: inherit; background: var(--degrade);
  box-shadow: 0 0 16px rgba(255, 140, 80, .6); transition: width .7s var(--courbe); position: relative; overflow: hidden;
}
.jauge > i::after {
  content: ""; position: absolute; inset: 0; transform: translateX(-100%);
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, .55), transparent);
  animation: brille 1.6s linear infinite;
}
@keyframes brille { to { transform: translateX(100%); } }
.jauge.indeterminee > i { width: 32% !important; animation: va-et-vient 1.4s ease-in-out infinite; }
@keyframes va-et-vient { from { transform: translateX(-110%); } to { transform: translateX(320%); } }
.tache-droite { display: flex; align-items: center; gap: 8px; }
.pourcent { font-size: 22px; font-weight: 650; letter-spacing: -.03em; font-variant-numeric: tabular-nums; min-width: 64px; text-align: right; }
.pourcent small { font-size: 13px; color: var(--texte-3); margin-left: 1px; }

/* ---------- Boutons génériques ---------- */
.icone-bouton {
  width: 40px; height: 40px; border-radius: 12px; display: inline-grid; place-items: center; flex: none;
  border: 1px solid var(--trait); background: var(--verre); color: var(--texte-2);
  transition: background .2s, color .2s, border-color .2s;
}
.icone-bouton:hover { background: var(--verre-3); color: var(--texte); border-color: var(--trait-2); }
.bouton-second {
  height: 40px; padding: 0 16px; border-radius: 12px; border: 1px solid var(--trait-2); background: var(--verre-2);
  font-weight: 550; font-size: 14px; display: inline-flex; align-items: center; gap: 8px; transition: background .2s;
}
.bouton-second:hover { background: var(--verre-3); }
.bouton-danger {
  height: 40px; padding: 0 16px; border-radius: 12px; border: 0; background: #e5484d; color: #fff; font-weight: 600; font-size: 14px;
}
.bouton-danger:hover { background: #f05a5f; }

/* ---------- Reprendre ---------- */
.rangee {
  display: grid; grid-auto-flow: column; grid-auto-columns: minmax(260px, 300px); gap: 14px;
  overflow-x: auto; padding: 2px 2px 12px; margin: 0 -2px; scroll-snap-type: x mandatory; scrollbar-width: thin;
}
.rangee > * { scroll-snap-align: start; }

/* ---------- Outils de la bibliothèque ---------- */
.outils { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; margin-bottom: 18px; }
.recherche {
  display: flex; align-items: center; gap: 8px; height: 40px; padding: 0 12px; border-radius: 12px;
  background: var(--verre); border: 1px solid var(--trait); color: var(--texte-3); flex: 0 1 260px; min-width: 160px;
}
.recherche:focus-within { border-color: var(--trait-2); background: var(--verre-2); }
.recherche input { border: 0; outline: 0; background: transparent; width: 100%; height: 100%; color: var(--texte); }
.recherche input::-webkit-search-cancel-button { filter: invert(1) opacity(.5); }
.filtres { display: flex; gap: 6px; flex: 1; overflow-x: auto; scrollbar-width: none; padding: 2px; }
.filtres::-webkit-scrollbar { display: none; }
.filtres { -webkit-mask-image: linear-gradient(90deg, #000 calc(100% - 32px), transparent); mask-image: linear-gradient(90deg, #000 calc(100% - 32px), transparent); padding-right: 28px; }
.filtre {
  height: 34px; padding: 0 13px; border-radius: 99px; border: 1px solid var(--trait); background: transparent;
  color: var(--texte-2); font-size: 13.5px; font-weight: 500; white-space: nowrap; display: inline-flex; align-items: center; gap: 7px;
  transition: all .2s;
}
.filtre .mini { width: 16px; height: 16px; border-radius: 5px; font-size: 9px; }
.filtre:hover { color: var(--texte); border-color: var(--trait-2); }
.filtre.actif { background: var(--texte); color: #0b0c10; border-color: var(--texte); }
.filtre .nb { color: var(--texte-3); font-size: 12px; }
.filtre.actif .nb { color: #555a6a; }
.tri select {
  height: 40px; padding: 0 34px 0 12px; border-radius: 12px; border: 1px solid var(--trait); background: var(--verre);
  appearance: none; -webkit-appearance: none; font-size: 14px; color: var(--texte-2);
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23a7acbd' stroke-width='2' stroke-linecap='round'%3E%3Cpath d='m7 10 5 5 5-5'/%3E%3C/svg%3E");
  background-repeat: no-repeat; background-position: right 10px center; background-size: 16px;
}
.tri select option { background: #15171d; }

/* ---------- Grille ---------- */
.grille { display: grid; grid-template-columns: repeat(auto-fill, minmax(268px, 1fr)); gap: 26px 18px; }
.carte { position: relative; min-width: 0; animation: entree .45s var(--courbe) both; }
.vignette {
  position: relative; display: block; width: 100%; aspect-ratio: 16/9; border-radius: var(--r); overflow: hidden;
  background: linear-gradient(135deg, #1a1d27, #10121a); border: 0; padding: 0; isolation: isolate;
  box-shadow: 0 0 0 1px var(--trait);
  transition: transform .35s var(--courbe), box-shadow .35s;
}
.vignette img { width: 100%; height: 100%; object-fit: cover; transition: transform .6s var(--courbe), opacity .4s; }
.vignette .flou { position: absolute; inset: -20px; width: calc(100% + 40px); height: calc(100% + 40px); filter: blur(24px) saturate(1.3); opacity: .7; }
.vignette .pochette { position: relative; height: 100%; width: auto; aspect-ratio: 1; margin: 0 auto; object-fit: cover; box-shadow: 0 10px 30px rgba(0, 0, 0, .5); }
.vignette::after { content: ""; position: absolute; inset: 0; background: linear-gradient(180deg, rgba(0, 0, 0, .25) 0%, transparent 30%, transparent 55%, rgba(0, 0, 0, .65) 100%); pointer-events: none; }
.carte:hover .vignette { transform: translateY(-3px); box-shadow: 0 0 0 1px var(--trait-2), 0 22px 40px -18px rgba(0, 0, 0, .9), 0 0 50px -20px rgba(255, 140, 80, .35); }
.carte:hover .vignette > img:not(.flou):not(.pochette) { transform: scale(1.045); }
.vide-image { position: absolute; inset: 0; display: grid; place-items: center; color: var(--texte-3); }
.vide-image svg { width: 36px; height: 36px; stroke-width: 1.5; }
.lecture {
  position: absolute; inset: 0; margin: auto; z-index: 2; width: 56px; height: 56px; border-radius: 50%;
  display: grid; place-items: center; background: rgba(255, 255, 255, .16); border: 1px solid rgba(255, 255, 255, .3);
  backdrop-filter: blur(12px); -webkit-backdrop-filter: blur(12px);
  opacity: 0; transform: scale(.85); transition: opacity .25s, transform .3s var(--courbe);
}
.lecture svg { width: 22px; height: 22px; fill: #fff; stroke: none; margin-left: 3px; }
.carte:hover .lecture, .vignette:focus-visible .lecture { opacity: 1; transform: none; }
.badge {
  position: absolute; z-index: 2; display: inline-flex; align-items: center; gap: 5px;
  height: 24px; padding: 0 8px; border-radius: 8px; font-size: 12px; font-weight: 600; font-variant-numeric: tabular-nums;
  background: rgba(10, 11, 15, .62); color: #fff; backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px);
  border: 1px solid rgba(255, 255, 255, .1);
}
.badge.duree { right: 8px; bottom: 8px; }
.badge.source { left: 8px; top: 8px; padding-left: 3px; }
.badge.source .mini { width: 18px; height: 18px; border-radius: 6px; font-size: 10px; }
.badge.type { right: 8px; top: 8px; }
.badge.type svg { width: 13px; height: 13px; }
.avance { position: absolute; left: 0; right: 0; bottom: 0; height: 4px; z-index: 3; background: rgba(255, 255, 255, .18); }
.avance i { display: block; height: 100%; background: var(--degrade); }
.carte-infos { display: flex; gap: 6px; align-items: flex-start; padding: 12px 2px 0; }
.carte-textes { flex: 1; min-width: 0; }
.carte-titre {
  margin: 0; font-size: 15px; font-weight: 600; line-height: 1.35; letter-spacing: -.01em;
  display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; cursor: pointer;
}
.carte-meta { margin-top: 4px; color: var(--texte-3); font-size: 13px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.carte-meta .hd { color: var(--texte-2); font-weight: 600; }
.plus-bouton {
  width: 32px; height: 32px; border-radius: 10px; border: 0; background: transparent; color: var(--texte-3);
  display: grid; place-items: center; flex: none; margin-top: -4px; transition: background .2s, color .2s;
}
.plus-bouton:hover, .plus-bouton[aria-expanded="true"] { background: var(--verre-2); color: var(--texte); }

.carte.compacte .carte-infos { padding-top: 10px; }
.carte.compacte .carte-titre { -webkit-line-clamp: 1; }

.vide {
  grid-column: 1 / -1; text-align: center; padding: 56px 20px; border-radius: var(--r-l);
  border: 1px dashed var(--trait-2); background: var(--verre); color: var(--texte-2);
}
.vide svg { width: 56px; height: 56px; stroke-width: 1.4; color: var(--ambre); margin-bottom: 14px; }
.vide b { display: block; color: var(--texte); font-size: 17px; font-weight: 600; margin-bottom: 6px; }

.pied { margin: 64px 0 40px; text-align: center; color: var(--texte-3); font-size: 13px; padding-bottom: env(safe-area-inset-bottom); }

/* ---------- Menu contextuel ---------- */
.menu {
  position: fixed; z-index: 60; min-width: 230px; padding: 6px; border-radius: 14px;
  background: rgba(22, 24, 31, .92); border: 1px solid var(--trait-2); box-shadow: 0 24px 60px -12px rgba(0, 0, 0, .8);
  backdrop-filter: blur(20px) saturate(1.4); -webkit-backdrop-filter: blur(20px) saturate(1.4);
  animation: pop .18s var(--courbe);
}
@keyframes pop { from { opacity: 0; transform: scale(.96) translateY(-4px); } }
.menu button, .menu a {
  display: flex; align-items: center; gap: 10px; width: 100%; padding: 10px 12px; border-radius: 9px; border: 0;
  background: transparent; color: var(--texte); font-size: 14px; text-align: left;
}
.menu button:hover, .menu a:hover { background: var(--verre-3); }
.menu svg { color: var(--texte-2); }
.menu .rouge, .menu .rouge svg { color: var(--danger); }
.menu hr { border: 0; border-top: 1px solid var(--trait); margin: 5px 4px; }

/* ---------- Lecteur ---------- */
.lecteur {
  width: 100vw; height: 100vh; height: 100dvh; max-width: none; max-height: none; margin: 0; padding: 0; border: 0;
  background: #000; color: var(--texte); overflow: hidden;
}
.lecteur[open] { animation: ouvre .35s var(--courbe); }
@keyframes ouvre { from { opacity: 0; transform: scale(.985); } }
.lecteur::backdrop { background: #000; }
.lecteur-fond {
  position: absolute; inset: -80px; background: center/cover no-repeat; filter: blur(70px) saturate(1.5) brightness(.45);
  transform: scale(1.1); opacity: .9; transition: background-image .4s;
}
.lecteur-int {
  position: relative; height: 100%; display: flex; flex-direction: column; max-width: 1180px; margin: 0 auto;
  padding: calc(14px + env(safe-area-inset-top)) 16px calc(16px + env(safe-area-inset-bottom)); overflow-y: auto;
}
.lecteur-tete { display: flex; align-items: center; gap: 12px; margin-bottom: 14px; }
.lecteur-tete .icone-bouton { background: rgba(0, 0, 0, .3); backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px); }
.lecteur-titres { flex: 1; min-width: 0; }
.lecteur-titres h3 { margin: 0; font-size: 17px; font-weight: 650; letter-spacing: -.015em; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.lecteur-titres p { margin: 2px 0 0; font-size: 13px; color: var(--texte-2); display: flex; align-items: center; gap: 6px; white-space: nowrap; overflow: hidden; }
.lecteur-titres p .mini { width: 16px; height: 16px; border-radius: 5px; font-size: 9px; }
.scene {
  position: relative; flex: 1 1 auto; min-height: 200px; display: grid; place-items: center;
  border-radius: 20px; overflow: hidden; background: rgba(0, 0, 0, .55);
  box-shadow: 0 40px 100px -30px rgba(0, 0, 0, .9), 0 0 0 1px rgba(255, 255, 255, .06);
}
.scene video { width: 100%; height: 100%; max-height: 72vh; display: block; background: #000; }
.scene.audio video { background: transparent; }
.reprise {
  align-self: center; margin-top: 12px; padding: 7px 8px 7px 14px; border-radius: 99px; font-size: 13px; color: var(--texte-2);
  background: rgba(0, 0, 0, .35); border: 1px solid var(--trait); display: flex; align-items: center; gap: 10px;
  backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px);
}
.reprise button { border: 0; background: var(--verre-3); color: var(--texte); border-radius: 99px; padding: 4px 10px; font-size: 12.5px; }
.panneau {
  margin-top: 14px; padding: 14px; border-radius: 20px; display: grid; gap: 12px;
  background: rgba(14, 15, 20, .55); border: 1px solid var(--trait); backdrop-filter: blur(24px); -webkit-backdrop-filter: blur(24px);
}
.panneau-ligne { display: flex; align-items: center; justify-content: space-between; }
.panneau-titre { display: inline-flex; align-items: center; gap: 8px; font-weight: 600; font-size: 14px; }
.panneau-titre svg { color: var(--ambre); }
.compte { font-variant-numeric: tabular-nums; color: var(--ambre); font-size: 14px; font-weight: 600; }
.puces { display: flex; gap: 6px; overflow-x: auto; scrollbar-width: none; }
.puces::-webkit-scrollbar { display: none; }
.puce {
  height: 36px; padding: 0 14px; border-radius: 99px; border: 1px solid var(--trait-2); background: transparent; color: var(--texte-2);
  font-size: 13.5px; font-weight: 500; white-space: nowrap; transition: all .2s;
}
.puce:hover { color: var(--texte); background: var(--verre-2); }
.puce.active { background: var(--degrade); color: #1d1006; border-color: transparent; font-weight: 650; }
.bouton-nuit {
  height: 46px; border-radius: 14px; border: 1px solid var(--trait-2); background: rgba(0, 0, 0, .35); color: var(--texte);
  display: inline-flex; align-items: center; justify-content: center; gap: 8px; font-weight: 600; font-size: 14.5px; transition: background .2s;
}
.bouton-nuit:hover { background: rgba(0, 0, 0, .55); }
.bouton-nuit small { color: var(--texte-3); font-weight: 400; }
@media (min-width: 900px) {
  .panneau { grid-template-columns: auto 1fr auto; align-items: center; gap: 16px; padding: 12px 12px 12px 18px; }
  .panneau-ligne { gap: 12px; }
  .bouton-nuit { padding: 0 18px; }
}

.nuit { position: fixed; inset: 0; z-index: 30; background: #000; display: none; align-items: flex-end; justify-content: center; padding-bottom: 48px; cursor: pointer; }
.nuit.on { display: flex; }
.nuit span { color: #23262f; font-size: 13px; transition: color .5s; }
.nuit.indice span { color: #5d6275; }

/* ---------- Confirmation ---------- */
.confirmation {
  width: min(400px, calc(100vw - 32px)); padding: 22px; border-radius: 20px; border: 1px solid var(--trait-2);
  background: #14161c; color: var(--texte); box-shadow: 0 40px 100px -20px rgba(0, 0, 0, .9);
}
.confirmation::backdrop { background: rgba(0, 0, 0, .6); backdrop-filter: blur(6px); }
.confirmation[open] { animation: pop .2s var(--courbe); }
.confirmation h3 { margin: 0 0 8px; font-size: 18px; letter-spacing: -.02em; }
.confirmation p { margin: 0 0 20px; color: var(--texte-2); font-size: 14px; line-height: 1.5; word-break: break-word; }
.confirmation-boutons { display: flex; justify-content: flex-end; gap: 8px; }

/* ---------- Toast ---------- */
.toast {
  position: fixed; left: 50%; bottom: calc(24px + env(safe-area-inset-bottom)); z-index: 80; max-width: calc(100vw - 32px);
  transform: translate(-50%, 16px); opacity: 0; pointer-events: none;
  padding: 11px 16px; border-radius: 14px; font-size: 14px; font-weight: 500;
  background: rgba(28, 30, 38, .92); border: 1px solid var(--trait-2); box-shadow: 0 20px 50px -10px rgba(0, 0, 0, .8);
  backdrop-filter: blur(16px); -webkit-backdrop-filter: blur(16px); transition: all .3s var(--courbe);
}
.toast.on { opacity: 1; transform: translate(-50%, 0); }

/* ---------- Téléphone ---------- */
@media (max-width: 640px) {
  .barre-haut-int { height: 56px; }
  .stockage-barre { width: 44px; }
  .accroche { padding-top: 28px; }
  .sous-titre { margin-bottom: 22px; }
  .composeur { padding: 8px; border-radius: 20px; }
  .composeur-bas { flex-direction: column; }
  .segments button { padding: 8px 2px; }
  .segments button b { font-size: 13px; }
  .segments button small { font-size: 10.5px; }
  .bouton-principal { height: 52px; width: 100%; }
  .bouton-coller span { display: none; }
  .sous-composeur { flex-direction: column; align-items: flex-start; }
  .bloc { margin-top: 40px; }
  .tache { grid-template-columns: 84px 1fr; gap: 12px; }
  .tache-image { width: 84px; }
  .tache-droite { grid-column: 1 / -1; justify-content: space-between; }
  .pourcent { text-align: left; }
  .outils .recherche { flex: 1 1 100%; }
  .filtres { flex: 1 1 0; }
  .grille { grid-template-columns: 1fr; gap: 22px; }
  .rangee { grid-auto-columns: 78%; }
  .lecteur-int { padding-left: 10px; padding-right: 10px; }
  .scene { border-radius: 14px; flex: 0 0 auto; }
  .scene video { max-height: 48vh; }
}
@media (min-width: 641px) and (max-width: 900px) { .grille { grid-template-columns: repeat(2, 1fr); } }
