/* AeroDrive : bibliothèque Aérophile. Bleu nuit, noyer, laiton et papier. */
:root {
  color-scheme: dark;
  --nuit: #131b32;
  --nuit-claire: #1c2747;
  --nuit-profonde: #0a1020;
  --noyer: #4b2f1e;
  --noyer-sombre: #26170d;
  --or: #c9a45c;
  --or-clair: #ecd398;
  --or-sombre: #7d5f2a;
  --papier: #f3ecdd;
  --encre: #ebe7dc;
  --encre-pale: #b8bfd2;
  --encre-faible: #8992ab;
  --sang: #b0443a;
  --ciel: #8fb0dc;
  --serif: "Iowan Old Style", "Palatino Linotype", Palatino, "URW Palladio L", P052, "Book Antiqua", Georgia, serif;
  --sans: "Gill Sans Nova", "Gill Sans", Seravek, Optima, Candara, "Noto Sans", "Segoe UI", system-ui, sans-serif;
  --couv-h: 186px;
  --planche: 34px;
  --marge: clamp(16px, 4vw, 56px);
  --lx: 640; --ly: 120; --scroll: 0;
  --dorure: linear-gradient(115deg, #7d5f2a 0%, #e9cf8f 22%, #b38a3e 38%, #fff3c9 50%, #a5782f 64%, #f1d79a 82%, #8a6a2f 100%);
}
@media (max-width: 640px) { :root { --couv-h: 146px; --planche: 30px; } }
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-padding-top: 120px; }
body { margin: 0; min-height: 100vh; background: var(--nuit); color: var(--encre); font: 16px/1.5 var(--sans); }
[hidden] { display: none !important; }
:focus-visible { outline: 2px solid var(--or-clair); outline-offset: 2px; }
a { color: var(--or-clair); }
.hors-champ { position: absolute !important; left: -9999px; width: 1px; height: 1px; overflow: hidden; }
.icone { flex: none; display: block; }
button { font: inherit; }

/* Ciel de nuit, poussière d'étoiles et lampe de lecture qui suit le pointeur */
body::before {
  content: ""; position: fixed; inset: 0; z-index: 0; pointer-events: none;
  background:
    radial-gradient(circle 60vmax at calc(var(--lx) * 1px) calc(var(--ly) * 1px), rgb(255 214 150 / .14), rgb(255 200 130 / .05) 42%, transparent 72%),
    radial-gradient(1px 1px at 12% 18%, rgb(255 255 255 / .5), transparent 60%),
    radial-gradient(1px 1px at 72% 9%, rgb(255 255 255 / .4), transparent 60%),
    radial-gradient(1.5px 1.5px at 38% 31%, rgb(255 240 210 / .35), transparent 60%),
    radial-gradient(1px 1px at 88% 41%, rgb(255 255 255 / .35), transparent 60%),
    radial-gradient(1px 1px at 22% 64%, rgb(255 255 255 / .25), transparent 60%),
    radial-gradient(ellipse 120% 90% at 50% 0%, transparent 55%, rgb(0 0 0 / .5) 100%),
    linear-gradient(var(--nuit-claire), var(--nuit) 45%, var(--nuit-profonde));
}

/* ── Porte d'entrée ── */
.page-porte { display: grid; }
.porte { position: relative; z-index: 1; min-height: 100vh; min-height: 100dvh; display: grid; place-items: center; align-content: center; gap: 18px; padding: 28px 18px 48px; }
.porte-blason, .blason-mini, .ballon-montant, .carte-blason {
  -webkit-mask: url(../img/aerophile.svg) center / contain no-repeat;
  mask: url(../img/aerophile.svg) center / contain no-repeat;
  background: var(--dorure); background-size: 260% 100%;
}
.porte-blason { width: min(400px, 78vw); aspect-ratio: 145 / 89; animation: dorure 10s ease-in-out infinite alternate; filter: drop-shadow(0 6px 18px rgb(0 0 0 / .45)); }
@keyframes dorure { from { background-position: 0% 0; } to { background-position: 100% 0; } }
.porte-carte {
  width: min(430px, 100%); padding: 30px 30px 26px; border-radius: 16px;
  border: 1px solid rgb(201 164 92 / .38); background: linear-gradient(rgb(28 39 71 / .94), rgb(14 21 40 / .96));
  box-shadow: 0 30px 80px -30px rgb(0 0 0 / .9), inset 0 1px 0 rgb(255 255 255 / .05);
}
.porte-large { width: min(560px, 100%); }
.porte-sur { margin: 0; font: italic 16px var(--serif); color: var(--or-clair); }
.porte-carte h1 { margin: 2px 0 18px; font: 400 clamp(32px, 7vw, 42px)/1.05 var(--serif); color: var(--papier); }
.porte-carte label { display: block; margin: 14px 0 6px; font-size: 14px; color: var(--encre-pale); }
.porte-carte label .aide, .aide { color: var(--encre-faible); }
.porte-carte input, .porte-carte textarea, .champ {
  width: 100%; padding: 11px 14px; border-radius: 10px; border: 1px solid rgb(201 164 92 / .35);
  background: rgb(0 0 0 / .3); color: var(--encre); font: inherit; font-size: 16px; outline: none;
}
.porte-carte input:focus-visible, .porte-carte textarea:focus-visible, .champ:focus-visible { border-color: var(--or); box-shadow: 0 0 0 3px rgb(201 164 92 / .22); }
.champ-code { font-size: 24px !important; letter-spacing: .25em; text-align: center; font-variant-numeric: tabular-nums; }
.porte-bouton {
  display: block; width: 100%; margin-top: 18px; padding: 12px; border: 0; border-radius: 999px;
  background: var(--or); color: #1d150b; font: inherit; font-size: 16px; text-align: center; text-decoration: none; cursor: pointer;
}
.porte-bouton:hover { background: var(--or-clair); }
.porte-erreur { margin: 12px 0 0; padding-left: 0; color: #f3aa9f; font-size: 14.5px; list-style-position: inside; }
.porte-info { padding: 10px 12px; border-radius: 10px; background: rgb(143 176 220 / .12); color: var(--encre); }
.porte-texte { color: var(--encre-pale); }
.porte-note { margin: 16px 0 0; font-size: 13.5px; color: var(--encre-faible); }
.porte-lien { margin: 14px 0 0; text-align: center; font-size: 14.5px; }
.lien-bouton { border: 0; background: none; color: var(--or-clair); text-decoration: underline; cursor: pointer; font-size: 14.5px; }
.etapes { padding-left: 20px; color: var(--encre-pale); }
.etapes li { margin: 6px 0; }
.qr-cadre { width: 220px; margin: 14px auto; padding: 12px; border-radius: 12px; background: #fff; }
.qr-cadre svg { display: block; width: 100%; height: auto; }
.qr-cadre .qr-code .dark, .qr-cadre path { fill: #131b32; }
.cle-manuelle summary { cursor: pointer; color: var(--or-clair); font-size: 14.5px; }
.cle-manuelle code { font-size: 17px; letter-spacing: .08em; word-break: break-all; }
.codes-secours { display: grid; grid-template-columns: repeat(2, 1fr); gap: 8px 18px; padding-left: 22px; font-size: 18px; }
.codes-secours code { letter-spacing: .06em; }
.carte-delivree { margin: 18px 0 6px; padding: 14px 16px; border-radius: 12px; border: 1px dashed rgb(201 164 92 / .5); }
.numero-carte { margin: 4px 0; font: 600 26px/1.2 var(--serif); letter-spacing: .12em; color: var(--or-clair); }

/* ── Application ── */
.page-app { min-height: 100vh; }
#app { position: relative; z-index: 1; }
.chargement-initial { min-height: 70vh; display: grid; place-content: center; justify-items: center; gap: 14px; color: var(--encre-pale); font: italic 18px var(--serif); }
.ballon-montant {
  width: 74px; aspect-ratio: 64 / 78;
  -webkit-mask-image: url(../img/globe.svg); mask-image: url(../img/globe.svg);
  animation: ascension 2.4s ease-in-out infinite alternate, dorure 6s linear infinite alternate;
}
@keyframes ascension { from { transform: translateY(8px) rotate(-2deg); } to { transform: translateY(-10px) rotate(2deg); } }
.sans-js { padding: 40px; text-align: center; }

.entete { position: sticky; top: 0; z-index: 20; background: linear-gradient(rgb(13 19 36 / .97) 75%, rgb(13 19 36 / 0)); backdrop-filter: blur(6px); }
.entete-ligne { display: flex; flex-wrap: wrap; align-items: center; gap: 10px 16px; padding: 12px var(--marge) 6px; }
.marque { display: flex; align-items: center; gap: 10px; color: var(--papier); text-decoration: none; margin-right: auto; }
.blason-mini { width: 58px; aspect-ratio: 145 / 89; background-position: 30% 0; }
.marque-nom { font: 400 26px/1 var(--serif); }
.marque-nom em { display: block; font: italic 13px var(--serif); color: var(--or-clair); }
.onglets { display: flex; flex-wrap: wrap; gap: 4px; padding: 3px; border-radius: 999px; background: rgb(0 0 0 / .28); border: 1px solid rgb(201 164 92 / .22); }
.onglet { display: inline-flex; align-items: center; gap: 7px; padding: 7px 14px; border: 0; border-radius: 999px; background: transparent; color: var(--encre-pale); cursor: pointer; font-size: 14.5px; }
.onglet:hover { color: var(--encre); }
.onglet[aria-current="page"] { background: var(--or); color: #1d150b; }
.onglet .compte { font-size: 12px; opacity: .8; }
.outils { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; }
.outil, .bouton {
  display: inline-flex; align-items: center; gap: 7px; min-height: 36px; padding: 7px 13px;
  border: 1px solid rgb(201 164 92 / .3); border-radius: 999px; background: rgb(0 0 0 / .26);
  color: var(--encre); cursor: pointer; text-decoration: none; font-size: 14px;
}
.outil:hover, .bouton:hover { border-color: var(--or); }
.bouton-plein { background: var(--or); border-color: var(--or); color: #1d150b; }
.bouton-plein:hover { background: var(--or-clair); }
.outil:disabled, .bouton:disabled { opacity: .4; cursor: default; }
.sous-onglets { display: flex; flex-wrap: wrap; gap: 8px 12px; align-items: center; padding: 4px var(--marge) 10px; }
.recherche { position: relative; flex: 1 1 240px; max-width: 380px; display: flex; align-items: center; }
.recherche .icone { position: absolute; left: 12px; color: var(--encre-faible); pointer-events: none; }
.recherche input { width: 100%; padding: 8px 14px 8px 38px; border-radius: 999px; border: 1px solid rgb(201 164 92 / .28); background: rgb(0 0 0 / .28); color: var(--encre); font: inherit; font-size: 15px; outline: none; }
.recherche input:focus-visible { border-color: var(--or); }
.tri { padding: 7px 12px; border-radius: 999px; border: 1px solid rgb(201 164 92 / .28); background: rgb(0 0 0 / .28); color: var(--encre); font: inherit; font-size: 14px; }
@media (max-width: 760px) { .texte-outil { display: none; } .marque-nom em { display: none; } }

/* Pleine largeur : l'étagère s'étend sur tout l'écran ; seuls les textes courants gardent une longueur de ligne lisible. */
.vue { padding: 8px var(--marge) 60px; }
.vue-titre { display: flex; flex-wrap: wrap; align-items: baseline; gap: 6px 14px; margin: 18px 0 8px; font: 400 clamp(26px, 3vw, 38px)/1.1 var(--serif); color: var(--papier); }
.vue-titre small { font: 14px var(--sans); color: var(--encre-faible); }
.vue-intro { max-width: 70ch; margin: 0 0 14px; font: italic 17px var(--serif); color: var(--encre-pale); }
.rayon-titre { margin: 26px 0 4px; font: 400 22px var(--serif); color: var(--or-clair); }
.vide { max-width: 620px; margin: 8vh auto; text-align: center; color: var(--encre-pale); }
.vide-titre { font: 400 26px/1.25 var(--serif); color: var(--papier); }

/* ── Étagère en noyer (livres, DVD) ── */
.etagere {
  --rang: calc(var(--couv-h) + 56px + var(--planche));
  list-style: none; margin: 10px 0 24px; padding: 0 clamp(24px, 4vw, 58px);
  display: flex; flex-wrap: wrap; align-items: flex-end; column-gap: clamp(22px, 3vw, 40px);
  border-radius: 3px; background-color: rgb(0 0 0 / .22);
  background-image: repeating-linear-gradient(to bottom,
    rgb(0 0 0 / .34) 0, rgb(0 0 0 / 0) 26px, rgb(0 0 0 / 0) calc(var(--rang) - var(--planche) - 8px),
    rgb(0 0 0 / .3) calc(var(--rang) - var(--planche)), #93623c calc(var(--rang) - var(--planche)),
    #6f482b calc(var(--rang) - var(--planche) + 8px), #573721 calc(var(--rang) - var(--planche) + 8px),
    #3c2516 calc(var(--rang) - 3px), #1c110a calc(var(--rang) - 3px), #1c110a var(--rang));
  box-shadow: inset 12px 0 0 var(--noyer-sombre), inset -12px 0 0 var(--noyer-sombre), inset 0 14px 0 #2f1d11, 0 34px 60px -34px rgb(0 0 0 / .7);
}
.piece { position: relative; flex: none; height: var(--rang); }
.livre, .dvd { --bx: 0; --by: 0; width: var(--w); transition: width .5s cubic-bezier(.2, .7, .2, 1); }
.livre { --w: calc(var(--couv-h) * var(--ratio, .7071)); }
.dvd { --w: calc(var(--couv-h) * .71); }
.objet {
  position: absolute; left: 0; bottom: calc(var(--planche) - 5px); width: var(--w); height: var(--couv-h);
  padding: 0; border: 0; background: none; color: inherit; cursor: pointer;
  transform-style: preserve-3d; transform-origin: 50% 100%; transform: perspective(1100px) rotateY(16deg);
  transition: transform .45s cubic-bezier(.2, .7, .2, 1);
}
.piece:hover .objet, .objet:focus-visible { transform: perspective(1100px) translateY(-12px) rotateY(3deg) translateZ(22px); }
.tranche { position: absolute; top: 0; bottom: 0; left: calc(var(--ep, 12px) * -1); width: var(--ep, 12px); transform-origin: 100% 50%; transform: rotateY(-90deg);
  background: linear-gradient(to bottom, transparent 9%, rgb(236 211 152 / .7) 9% 10.5%, transparent 10.5% 89.5%, rgb(236 211 152 / .7) 89.5% 91%, transparent 91%), linear-gradient(90deg, rgb(0 0 0 / .4), rgb(255 255 255 / .1) 45%, rgb(0 0 0 / .3)), var(--dos, #6b4a1f); }
.couverture { position: absolute; inset: 0; overflow: hidden; border-radius: 1px 3px 3px 1px; background: var(--toile, #27406b); box-shadow: inset 3px 0 6px -2px rgb(0 0 0 / .45), 0 1px 2px rgb(0 0 0 / .5); }
.couverture::before { content: ""; position: absolute; z-index: 2; top: 0; bottom: 0; left: 6px; width: 3px; background: linear-gradient(90deg, rgb(0 0 0 / .2), rgb(255 255 255 / .14), rgb(0 0 0 / .1)); }
.couverture img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; opacity: 0; transition: opacity .6s; }
.prete .couverture img { opacity: 1; }
.toile { position: absolute; inset: 0; display: grid; grid-template-rows: 1fr auto; justify-items: center; padding: 14% 12% 12%; text-align: center;
  background: repeating-linear-gradient(45deg, rgb(255 255 255 / .035) 0 2px, transparent 2px 4px), repeating-linear-gradient(-45deg, rgb(0 0 0 / .06) 0 2px, transparent 2px 4px), var(--toile, #27406b);
  box-shadow: inset 0 0 0 7px var(--toile, #27406b), inset 0 0 0 8px rgb(236 211 152 / .55), inset 0 0 0 11px var(--toile, #27406b), inset 0 0 0 12px rgb(236 211 152 / .3); }
.toile::before { content: ""; width: 72%; aspect-ratio: 145 / 89; -webkit-mask: url(../img/aerophile.svg) center / contain no-repeat; mask: url(../img/aerophile.svg) center / contain no-repeat; background: rgb(0 0 0 / .32); filter: drop-shadow(0 1px 0 rgb(255 255 255 / .12)); align-self: center; }
.toile-titre { font: italic 600 clamp(11px, calc(var(--couv-h) * .075), 15px)/1.15 var(--serif); color: var(--or-clair); text-wrap: balance; display: -webkit-box; -webkit-line-clamp: 4; -webkit-box-orient: vertical; overflow: hidden; }
.reflet { position: absolute; inset: 0; z-index: 3; pointer-events: none; mix-blend-mode: soft-light;
  background: radial-gradient(circle at calc(50% + (var(--lx) - var(--bx)) * .35px) calc(30% + (var(--ly) + var(--scroll) - var(--by)) * .25px), rgb(255 246 225 / .38), rgb(255 246 225 / 0) 58%); }
.ombre { position: absolute; left: 4%; bottom: calc(var(--planche) - 2px); width: calc(var(--w) * .94); height: calc(var(--couv-h) * .95); border-radius: 2px; background: rgb(0 0 0 / .6); filter: blur(9px); pointer-events: none; transform-origin: 50% 100%;
  transform: translate(clamp(-30px, calc((var(--bx) - var(--lx)) * .045px), 30px), 0) skewX(clamp(-14deg, calc((var(--lx) - var(--bx)) * .02deg), 14deg)); }
.etiquette { position: absolute; left: 50%; bottom: 5px; z-index: 2; transform: translateX(-50%); width: calc(var(--w) + 12px); max-width: 240px; height: calc(var(--planche) - 13px);
  display: flex; align-items: center; justify-content: center; padding: 0 7px; overflow: hidden; border-radius: 2px;
  background: linear-gradient(#f6eedb, #e6dbc1); color: #2b2012; font: italic 12.5px/1.15 var(--serif); white-space: nowrap;
  box-shadow: 0 0 0 2px var(--or-sombre), 0 0 0 3px var(--or), 0 3px 4px 2px rgb(0 0 0 / .45), inset 0 1px 2px rgb(0 0 0 / .22); }
.etiquette span { overflow: hidden; text-overflow: ellipsis; }
.etiquette-progres { position: absolute; left: 0; bottom: 0; height: 2px; width: calc(var(--p, 0) * 100%); background: var(--sang); }

/* DVD : boîtier en plastique, jaquette imprimée */
.dvd .boitier { position: absolute; inset: 0; overflow: hidden; border-radius: 3px; background: #0d0f16; box-shadow: inset 0 0 0 1px rgb(255 255 255 / .12), 0 1px 2px rgb(0 0 0 / .6); }
.jaquette { position: absolute; inset: 4px 4px 4px 10px; display: grid; grid-template-rows: 58% 1fr; overflow: hidden; border-radius: 1px; background: var(--nuit); }
.jaquette-image { position: relative; overflow: hidden; background: #000; }
.jaquette-image img { width: 100%; height: 100%; object-fit: cover; opacity: 0; transition: opacity .5s; }
.prete .jaquette-image img { opacity: 1; }
.jaquette-texte { display: grid; align-content: center; gap: 3px; padding: 5px 8px; background: linear-gradient(var(--nuit), #0b1122); }
.jaquette-titre { font: 600 clamp(10px, calc(var(--couv-h) * .068), 14px)/1.12 var(--serif); color: var(--papier); display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; }
.jaquette-source { font: 9.5px/1 var(--sans); letter-spacing: .04em; color: var(--or-clair); }
.dvd .boitier::after { content: ""; position: absolute; inset: 0; pointer-events: none; background: linear-gradient(105deg, rgb(255 255 255 / 0) 30%, rgb(255 255 255 / .14) 38%, rgb(255 255 255 / 0) 46%); }
.dvd .tranche { background: linear-gradient(90deg, #05060a, #20232c 50%, #05060a); }

/* Podcasts : cassettes sur un présentoir */
.presentoir { list-style: none; margin: 12px 0 26px; padding: 22px clamp(18px, 3vw, 36px) 26px; display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 230px), 1fr)); gap: 26px 24px; border-radius: 6px;
  background: linear-gradient(rgb(0 0 0 / .25), rgb(0 0 0 / .32)), repeating-linear-gradient(90deg, #3a2516 0 3px, #4b2f1e 3px 34px); box-shadow: inset 0 0 0 10px var(--noyer-sombre), 0 30px 60px -30px rgb(0 0 0 / .7); }
.k7 { position: relative; }
.k7-objet { position: relative; display: block; width: 100%; aspect-ratio: 100 / 63; padding: 0; border: 0; border-radius: 7px; cursor: pointer; color: inherit; transition: transform .35s cubic-bezier(.2, .7, .2, 1), box-shadow .35s;
  background: linear-gradient(160deg, color-mix(in srgb, var(--teinte, #2c3e66) 88%, #fff 12%), var(--teinte, #2c3e66) 55%, color-mix(in srgb, var(--teinte, #2c3e66) 70%, #000 30%));
  box-shadow: inset 0 0 0 1px rgb(255 255 255 / .12), 0 10px 22px -10px rgb(0 0 0 / .8); }
.k7:hover .k7-objet, .k7-objet:focus-visible { transform: translateY(-4px) rotate(-1.2deg); box-shadow: inset 0 0 0 1px rgb(255 255 255 / .18), 0 18px 30px -12px rgb(0 0 0 / .85); }
.k7-etiquette { position: absolute; left: 7%; right: 7%; top: 9%; height: 52%; padding: 6px 10px; border-radius: 3px; text-align: left;
  background: linear-gradient(#f7f0e0 0 26%, var(--teinte-claire, #e8d9b0) 26% 30%, #f7f0e0 30%); color: #2b2012; box-shadow: inset 0 0 0 1px rgb(0 0 0 / .1); }
.k7-titre { display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; font: italic 600 15px/1.15 var(--serif); }
.k7-auteur { display: block; margin-top: 6px; font-size: 11px; color: #6b5a40; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.k7-fenetre { position: absolute; left: 50%; top: 36%; transform: translateX(-50%); width: 46%; height: 18%; border-radius: 30px; background: rgb(10 12 20 / .75); box-shadow: inset 0 0 0 2px rgb(0 0 0 / .4); display: flex; justify-content: space-between; align-items: center; padding: 0 6%; }
.bobine { width: 26%; aspect-ratio: 1; border-radius: 50%; background: radial-gradient(circle, #ddd 0 18%, #333 19% 24%, #6b4a2f 25% var(--bande, 60%), transparent calc(var(--bande, 60%) + 1%)); }
.k7-bas { position: absolute; left: 22%; right: 22%; bottom: 0; height: 17%; border-radius: 4px 4px 0 0; background: rgb(0 0 0 / .25); }
.k7 .badges { top: -8px; left: 8px; }

/* Kiosque : présentoir à revues */
.kiosque { list-style: none; margin: 12px 0 26px; padding: 18px clamp(16px, 3vw, 34px) 30px; display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 190px), 1fr)); gap: 34px 22px; }
.revue .badges { top: -8px; left: 8px; }
.revue .legende { margin-top: 14px; }
.revue { position: relative; }
.revue-objet { position: relative; display: grid; grid-template-rows: auto 1fr auto; width: 100%; aspect-ratio: 3 / 4; padding: 0; border: 0; border-radius: 2px; overflow: hidden; cursor: pointer; text-align: left; color: #fff;
  background: var(--couleur, #0a66c2); box-shadow: 0 14px 26px -14px rgb(0 0 0 / .85), 0 7px 0 -3px rgb(201 164 92 / .65); transform: perspective(900px) rotateX(6deg); transform-origin: 50% 100%; transition: transform .35s; }
.revue:hover .revue-objet, .revue-objet:focus-visible { transform: perspective(900px) rotateX(0) translateY(-6px); }
.revue-titre-journal { padding: 8px 10px 4px; font: 700 21px/1 var(--serif); letter-spacing: -.01em; }
.revue-image { position: relative; min-height: 0; overflow: hidden; background: rgb(0 0 0 / .18); }
.revue-image img { width: 100%; height: 100%; object-fit: cover; }
.revue-une { padding: 8px 10px 10px; font: italic 600 14px/1.2 var(--serif); background: linear-gradient(transparent, rgb(0 0 0 / .45)); }
.revue-instagram { --couleur: linear-gradient(160deg, #feda75, #fa7e1e 25%, #d62976 50%, #962fbf 75%, #4f5bd5); }
.revue-linkedin { --couleur: linear-gradient(170deg, #0a66c2, #004182); }

/* Contrôles communs : étoile, ballons de notation, menu, pastilles */
.commandes { position: absolute; z-index: 6; display: flex; gap: 5px; opacity: 0; pointer-events: none; transition: opacity .2s; }
.piece .commandes { right: -6px; bottom: calc(var(--planche) + var(--couv-h) - 30px); }
.k7 .commandes, .revue .commandes { top: 8px; right: 8px; }
.piece:hover .commandes, .piece:focus-within .commandes, .k7:hover .commandes, .k7:focus-within .commandes, .revue:hover .commandes, .revue:focus-within .commandes { opacity: 1; pointer-events: auto; }
.commande { width: 30px; height: 30px; display: grid; place-items: center; padding: 0; border-radius: 50%; border: 1px solid rgb(255 255 255 / .2); background: rgb(10 14 28 / .85); color: var(--encre); cursor: pointer; }
.commande:hover { background: var(--or); color: #1d150b; border-color: var(--or); }
.commande-favori[aria-pressed="true"] { background: var(--or); border-color: var(--or); color: #1d150b; }
.commande-favori[aria-pressed="false"] path { fill: none; }
@media (hover: none) { .commandes { opacity: 1; pointer-events: auto; } }
.badges { position: absolute; z-index: 5; display: flex; gap: 4px; pointer-events: none; }
.piece .badges { left: 4px; bottom: calc(var(--planche) + var(--couv-h) - 8px); }
.badge { padding: 2px 7px; border-radius: 2px; font: 11.5px/1.3 var(--sans); background: var(--papier); color: #2b2012; box-shadow: 0 2px 6px rgb(0 0 0 / .45); white-space: nowrap; }
.badge-emprunte { background: var(--or); }
.badge-favori { background: #f6d77c; }
.legende { margin: 8px 2px 0; font-size: 13px; color: var(--encre-faible); }
.ballons { display: inline-flex; gap: 1px; vertical-align: middle; }
.ballon-note { width: 18px; height: 20px; padding: 0; border: 0; background: none; color: rgb(255 255 255 / .28); cursor: pointer; }
.ballon-note[aria-pressed="true"], .ballon-note.allume { color: var(--or); }
.ballon-note:hover, .ballon-note:hover ~ .ballon-note { color: inherit; }
.ballons:hover .ballon-note { color: var(--or-clair); }
.ballons .ballon-note:hover ~ .ballon-note { color: rgb(255 255 255 / .28); }
.note-moyenne { font-size: 12.5px; color: var(--encre-faible); margin-left: 4px; }

/* Glisser-déposer : quai de dépôt */
.quai { position: fixed; z-index: 40; left: 50%; bottom: 18px; transform: translate(-50%, 140%); display: flex; gap: 14px; transition: transform .25s cubic-bezier(.2, .7, .2, 1); }
.quai.visible { transform: translate(-50%, 0); }
.cible { display: flex; align-items: center; gap: 10px; min-width: 210px; padding: 16px 20px; border-radius: 14px; border: 2px dashed rgb(201 164 92 / .6); background: rgb(10 14 28 / .95); color: var(--encre); font: 15px var(--sans); box-shadow: 0 20px 40px rgb(0 0 0 / .5); }
.cible.survolee { border-style: solid; background: var(--or); color: #1d150b; transform: scale(1.04); }
.cible-poubelle.survolee { background: var(--sang); color: #fff; border-color: var(--sang); }
.en-glisse { opacity: .45; }

/* Mon étagère : rayons personnels */
.rayon-perso { margin: 18px 0 26px; padding: 14px 18px 18px; border-radius: 12px; border: 1px solid rgb(201 164 92 / .22); background: rgb(0 0 0 / .2); }
.rayon-perso.survole { border-color: var(--or); background: rgb(201 164 92 / .08); }
.rayon-entete { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 12px; margin-bottom: 10px; }
.rayon-nom { font: 400 22px/1.2 var(--serif); color: var(--papier); margin: 0; }
.rayon-entete .outil { min-height: 30px; padding: 4px 10px; font-size: 13px; }
.planche { list-style: none; margin: 0; padding: 8px 4px 14px; min-height: 110px; display: flex; gap: 14px; overflow-x: auto; border-bottom: 10px solid #573721; box-shadow: 0 6px 0 -2px #2b1a0e; scrollbar-width: thin; }
.planche-vide { align-self: center; color: var(--encre-faible); font: italic 15px var(--serif); padding: 0 6px; }
.fiche { position: relative; flex: none; width: 150px; padding: 8px; border-radius: 8px; background: rgb(255 255 255 / .05); border: 1px solid rgb(255 255 255 / .08); cursor: grab; user-select: none; }
.fiche:active { cursor: grabbing; }
.fiche.marque-insertion-avant { box-shadow: -4px 0 0 var(--or); }
.fiche.marque-insertion-apres { box-shadow: 4px 0 0 var(--or); }
.fiche-vignette { display: block; width: 100%; aspect-ratio: 3 / 4; border-radius: 4px; overflow: hidden; background: var(--toile, #27406b); border: 0; padding: 0; cursor: pointer; position: relative; }
.fiche-vignette img { width: 100%; height: 100%; object-fit: cover; }
.fiche-type { position: absolute; left: 6px; bottom: 6px; padding: 1px 6px; border-radius: 2px; font-size: 11px; background: rgb(0 0 0 / .7); color: #fff; }
.fiche-titre { margin: 6px 0 2px; font: 14px/1.2 var(--serif); color: var(--papier); display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.fiche-pied { display: flex; align-items: center; justify-content: space-between; gap: 4px; }
.fiche-pied .commande { width: 26px; height: 26px; }

/* Poubelle */
.poubelle-liste { list-style: none; margin: 0; padding: 0; display: grid; gap: 12px; }
.dechet { display: grid; grid-template-columns: 88px 1fr auto; gap: 14px; align-items: start; padding: 14px; border-radius: 10px; border: 1px solid rgb(255 255 255 / .08); background: rgb(0 0 0 / .22); }
.dechet-vignette { width: 88px; aspect-ratio: 3 / 4; border-radius: 4px; overflow: hidden; background: var(--toile, #27406b); filter: grayscale(.7) brightness(.8); }
.dechet-vignette img { width: 100%; height: 100%; object-fit: cover; }
.dechet h3 { margin: 0 0 4px; font: 400 19px var(--serif); color: var(--papier); }
.dechet-raison { margin: 0; font: italic 16px var(--serif); color: var(--or-clair); }
.dechet-meta { margin: 4px 0 0; font-size: 13px; color: var(--encre-faible); }
.dechet details { margin-top: 6px; font-size: 13.5px; color: var(--encre-pale); }
@media (max-width: 640px) { .dechet { grid-template-columns: 64px 1fr; } .dechet > .bouton { grid-column: 2; justify-self: start; } .dechet-vignette { width: 64px; } }

/* Carte de bibliothèque : dorure, hologramme, recto verso */
.carte-scene { display: grid; justify-items: center; gap: 16px; padding: 10px 0 20px; perspective: 1400px; }
.carte { position: relative; width: min(520px, 92vw); aspect-ratio: 85.6 / 54; transform-style: preserve-3d; transition: transform .9s cubic-bezier(.2, .7, .2, 1); cursor: pointer;
  transform: rotateX(calc(var(--ty, 0) * 1deg)) rotateY(calc(var(--tx, 0) * 1deg)); }
.carte.retournee { transform: rotateX(calc(var(--ty, 0) * 1deg)) rotateY(calc(180deg + var(--tx, 0) * 1deg)); }
.carte-face { position: absolute; inset: 0; border-radius: 18px; overflow: hidden; backface-visibility: hidden; padding: 6% 7%; box-shadow: 0 40px 70px -30px rgb(0 0 0 / .9), inset 0 0 0 1px rgb(255 255 255 / .14);
  background: radial-gradient(120% 90% at 0% 0%, #22305a, var(--nuit) 55%, #0b1122); color: var(--papier); }
.carte-recto { display: grid; grid-template-columns: 38% 1fr; grid-template-rows: auto 1fr auto; gap: 4% 5%; }
.carte-blason { grid-row: 1 / 3; width: 100%; aspect-ratio: 145 / 89; align-self: start; }
.carte-ligne-titre { font: italic 15px var(--serif); color: var(--or-clair); }
.carte-nom { margin: 2px 0 0; font: 400 clamp(19px, 4vw, 26px)/1.1 var(--serif); }
.carte-detail { font-size: clamp(11px, 2.1vw, 13px); color: var(--encre-pale); line-height: 1.4; }
.carte-numero { grid-column: 1 / 3; align-self: end; font: 600 clamp(18px, 4.4vw, 28px)/1 var(--serif); letter-spacing: .16em; text-shadow: 0 1px 0 rgb(0 0 0 / .6), 0 -1px 0 rgb(255 255 255 / .15); }
.carte-puce { position: absolute; right: 7%; top: 36%; width: 13%; aspect-ratio: 1.3; border-radius: 6px; background: linear-gradient(135deg, #b38a3e, #f3d98f 40%, #8a6a2f 60%, #e9cf8f); box-shadow: inset 0 0 0 1px rgb(0 0 0 / .3); }
.holo { position: absolute; inset: 0; border-radius: 18px; pointer-events: none; mix-blend-mode: color-dodge; opacity: .55;
  background: linear-gradient(calc(115deg + var(--tx, 0) * 2deg), transparent 20%, rgb(255 0 150 / .25) 32%, rgb(0 210 255 / .28) 42%, rgb(140 255 120 / .25) 52%, rgb(255 220 0 / .2) 62%, transparent 75%);
  background-size: 200% 200%; background-position: calc(50% + var(--tx, 0) * 3%) calc(50% + var(--ty, 0) * 3%); }
.carte-verso { transform: rotateY(180deg); display: grid; grid-template-rows: 18% auto 1fr auto; gap: 5%; padding: 0 0 6%; }
.bande-magnetique { background: #050608; }
.carte-verso > *:not(.bande-magnetique) { margin: 0 7%; }
.code-barres { background: #fff; padding: 8px 10px 4px; border-radius: 6px; }
.code-barres svg { display: block; width: 100%; height: 52px; }
.code-barres p { margin: 2px 0 0; text-align: center; font: 12px/1.2 var(--sans); color: #131b32; letter-spacing: .2em; }
.carte-mention { font-size: clamp(10px, 2vw, 12px); color: var(--encre-pale); line-height: 1.4; }
.signature { height: 26px; border-radius: 3px; background: repeating-linear-gradient(-45deg, #f3ecdd 0 6px, #e8dfc8 6px 12px); color: #2b2012; font: italic 15px/26px var(--serif); padding: 0 10px; overflow: hidden; white-space: nowrap; }
.carte-actions { display: flex; flex-wrap: wrap; gap: 10px; justify-content: center; }
.carte-explication { max-width: 62ch; text-align: center; color: var(--encre-pale); }

/* Tampon d'emprunt */
.tampon { position: fixed; z-index: 70; left: 50%; top: 42%; width: min(360px, 80vw); padding: 18px 22px; border: 4px double rgb(176 68 58 / .9); border-radius: 10px; color: rgb(176 68 58 / .95); text-align: center; font: 700 22px/1.2 var(--serif); letter-spacing: .04em; background: rgb(243 236 221 / .94); pointer-events: none; animation: tampon 1.6s cubic-bezier(.2, .7, .2, 1) forwards; }
.tampon small { display: block; margin-top: 4px; font: 600 14px var(--sans); letter-spacing: .08em; }
.tampon::before { content: ""; display: block; width: 54%; margin: 0 auto 8px; aspect-ratio: 145 / 89; -webkit-mask: url(../img/aerophile.svg) center / contain no-repeat; mask: url(../img/aerophile.svg) center / contain no-repeat; background: currentColor; }
@keyframes tampon { 0% { opacity: 0; transform: translate(-50%, -50%) scale(2.2) rotate(-14deg); } 18% { opacity: 1; transform: translate(-50%, -50%) scale(.96) rotate(-8deg); } 26% { transform: translate(-50%, -50%) scale(1) rotate(-8deg); } 80% { opacity: 1; } 100% { opacity: 0; transform: translate(-50%, -50%) scale(1) rotate(-8deg); } }

/* Boîtes de dialogue */
dialog { color: var(--encre); }
dialog::backdrop { background: rgb(5 8 16 / .86); backdrop-filter: blur(6px); }
.modale { width: min(460px, 94vw); padding: 24px 24px 20px; border: 1px solid rgb(201 164 92 / .35); border-radius: 16px; background: linear-gradient(#1c2747, #101830); }
.modale[open] { animation: monte .28s cubic-bezier(.2, .7, .2, 1); }
@keyframes monte { from { opacity: 0; transform: translateY(12px) scale(.985); } }
.modale h2 { margin: 0 0 6px; font: 400 26px/1.15 var(--serif); color: var(--papier); }
.modale p { color: var(--encre-pale); }
.modale label { display: block; margin: 12px 0 6px; font-size: 14px; color: var(--encre-pale); }
.modale input, .modale textarea { width: 100%; padding: 10px 12px; border-radius: 10px; border: 1px solid rgb(201 164 92 / .35); background: rgb(0 0 0 / .3); color: var(--encre); font: inherit; font-size: 16px; }
.modale .champ-carte { font: 600 24px/1 var(--serif); letter-spacing: .14em; text-align: center; text-transform: uppercase; }
.modale-actions { display: flex; flex-wrap: wrap; justify-content: flex-end; gap: 8px; margin-top: 18px; }
.modale-erreur { min-height: 1.3em; margin: 10px 0 0; color: #f3aa9f !important; font-size: 14.5px; }
.puces { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 8px; }
.puce { padding: 4px 10px; border-radius: 999px; border: 1px solid rgb(201 164 92 / .3); background: transparent; color: var(--encre-pale); cursor: pointer; font-size: 13px; }
.puce:hover { border-color: var(--or); color: var(--encre); }

/* Lecteur intégré (YouTube, Instagram, LinkedIn…) */
.integre { width: min(1100px, 96vw); max-height: 96vh; padding: 0; border: 0; background: transparent; overflow: visible; }
.integre[open] { animation: monte .3s cubic-bezier(.2, .7, .2, 1); }
.integre-cadre { position: relative; margin: 0 auto; border-radius: 10px; overflow: hidden; background: #000; box-shadow: 0 30px 80px -20px rgb(0 0 0 / .85); }
.integre-cadre iframe { display: block; width: 100%; height: 100%; border: 0; }
.integre-video { aspect-ratio: 16 / 9; max-height: 72vh; }
.integre-social { width: min(560px, 96vw); height: min(78vh, 820px); background: #fff; }
.integre-audio { width: min(720px, 96vw); height: 352px; background: #121212; }
.panneau-infos { margin-top: 14px; padding: 14px 18px; border-radius: 12px; border: 1px solid rgb(201 164 92 / .2); background: rgb(14 21 40 / .95); }
.panneau-ligne { display: flex; flex-wrap: wrap; gap: 10px 16px; align-items: flex-start; justify-content: space-between; }
.panneau-titre { margin: 0; font: 400 clamp(19px, 2.3vw, 26px)/1.2 var(--serif); color: var(--papier); }
.panneau-meta { margin: 4px 0 0; font-size: 14px; color: var(--encre-pale); }
.panneau-outils { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; }

/* Platine à cassette (podcasts) */
.platine { width: min(760px, 96vw); padding: 0; border: 0; background: transparent; overflow: visible; }
.platine[open] { animation: monte .3s cubic-bezier(.2, .7, .2, 1); }
.platine-corps { position: relative; padding: 26px 26px 22px; border-radius: 18px; background: linear-gradient(#2a2f3c, #14171f); box-shadow: inset 0 1px 0 rgb(255 255 255 / .1), 0 30px 80px -20px rgb(0 0 0 / .9); }
.platine-visu { position: absolute; inset: 12px; border-radius: 12px; opacity: .55; pointer-events: none; }
.platine-k7 { position: relative; width: min(460px, 82vw); margin: 0 auto; aspect-ratio: 100 / 63; border-radius: 10px; background: linear-gradient(160deg, color-mix(in srgb, var(--teinte, #2c3e66) 85%, #fff 15%), var(--teinte, #2c3e66)); box-shadow: inset 0 0 0 1px rgb(255 255 255 / .15), 0 16px 30px -12px rgb(0 0 0 / .8); }
.platine-k7 .k7-etiquette { top: 8%; }
.platine-k7 .k7-titre { font-size: clamp(14px, 3vw, 20px); }
.platine-k7 .k7-fenetre { width: 56%; height: 24%; top: 38%; }
.platine-k7 .bobine { width: 30%; background: radial-gradient(circle, #ddd 0 14%, transparent 15%), conic-gradient(from 0deg, #555 0 10%, #222 10% 33%, #555 33% 43%, #222 43% 66%, #555 66% 76%, #222 76%); border-radius: 50%; box-shadow: 0 0 0 calc(var(--bande, 6) * 1px) #5b3b22; animation: tourne 2.2s linear infinite; animation-play-state: paused; }
.platine.joue .bobine { animation-play-state: running; }
@keyframes tourne { to { transform: rotate(-360deg); } }
.platine-commandes { display: flex; flex-wrap: wrap; justify-content: center; gap: 10px; margin-top: 20px; }
.touche { min-width: 64px; padding: 10px 14px; border: 0; border-radius: 8px; background: linear-gradient(#e9e4d6, #b9b2a0); color: #1c1c1c; font: 600 14px var(--sans); box-shadow: 0 4px 0 #6d685d, 0 6px 10px rgb(0 0 0 / .5); cursor: pointer; }
.touche:active, .touche[aria-pressed="true"] { transform: translateY(3px); box-shadow: 0 1px 0 #6d685d, 0 2px 4px rgb(0 0 0 / .5); }
.platine-barre { display: flex; align-items: center; gap: 10px; margin-top: 16px; font-variant-numeric: tabular-nums; font-size: 13px; color: var(--encre-pale); }
.platine-barre input { flex: 1; accent-color: var(--or); }

/* Liseuse et lecteur vidéo (moteur repris de la médiathèque) */
.liseuse { width: 100vw; height: 100vh; height: 100dvh; max-width: none; max-height: none; margin: 0; padding: 0; border: 0; background: radial-gradient(ellipse 70% 62% at 50% 46%, #26304d 0%, #141b30 56%, #080c18 100%); }
.liseuse[open] { display: grid; grid-template-rows: auto minmax(0, 1fr) auto; }
.liseuse::backdrop { background: #080c18; }
.liseuse-haut { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 10px 14px; padding: max(10px, env(safe-area-inset-top)) clamp(12px, 3vw, 28px) 10px; background: linear-gradient(rgb(0 0 0 / .45), transparent); }
.liseuse-texte { min-width: 0; flex: 1 1 260px; }
.liseuse-titre { margin: 0; font: 400 clamp(18px, 2.2vw, 24px)/1.2 var(--serif); color: var(--papier); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.liseuse-sous { display: flex; align-items: center; gap: 10px; margin-top: 2px; }
.liseuse-pages { margin: 0; font-size: 14px; color: var(--encre-pale); font-variant-numeric: tabular-nums; }
.versions { font: inherit; font-size: 13px; color: var(--encre); background: rgb(0 0 0 / .35); border: 1px solid rgb(201 164 92 / .35); border-radius: 999px; padding: 3px 10px; }
.liseuse-outils, .lecteur-outils { display: flex; flex-wrap: wrap; gap: 6px; }
.liseuse-outils .outil, .lecteur-outils .outil { padding: 7px 10px; }
.outil-fav[aria-pressed="true"] { background: var(--or); border-color: var(--or); color: #1d150b; }
.outil-fav:not([aria-pressed="true"]) path { fill: none; }
.liseuse-scene { position: relative; min-height: 0; overflow: hidden; }
.liseuse-canvas { position: absolute; inset: 0; width: 100%; height: 100%; display: block; touch-action: none; cursor: pointer; }
.liseuse-canvas.zoome { cursor: grab; }
.liseuse-chargement { position: absolute; inset: 0; display: grid; place-content: center; justify-items: center; gap: 14px; padding: 20px; font: italic 18px var(--serif); color: var(--encre-pale); text-align: center; }
.chargement-livre { width: 60px; aspect-ratio: 64 / 78; -webkit-mask-image: url(../img/globe.svg); mask-image: url(../img/globe.svg); background: var(--dorure); background-size: 260% 100%; animation: ascension 2s ease-in-out infinite alternate, dorure 5s linear infinite alternate; }
.tourner { position: absolute; z-index: 2; top: 50%; transform: translateY(-50%); width: 46px; height: 84px; display: grid; place-items: center; border: 0; border-radius: 10px; background: rgb(0 0 0 / .25); color: var(--encre-pale); cursor: pointer; opacity: .55; }
.tourner:hover, .tourner:focus-visible { opacity: 1; background: rgb(0 0 0 / .45); color: var(--papier); }
.tourner:disabled { opacity: 0; pointer-events: none; }
.tourner-prec { left: max(8px, env(safe-area-inset-left)); }
.tourner-suiv { right: max(8px, env(safe-area-inset-right)); }
@media (hover: none) { .tourner { display: none; } }
.liseuse-bas { padding: 6px clamp(16px, 6vw, 80px) max(12px, env(safe-area-inset-bottom)); }
.curseur-pages { width: 100%; accent-color: var(--or); }
.liseuse-repli { position: absolute; inset: 22px 64px; display: flex; justify-content: center; align-items: center; }
.repli-page { height: 100%; max-width: 50%; aspect-ratio: var(--ratio); background: #fff; box-shadow: 0 22px 50px rgb(0 0 0 / .5); }
.repli-page canvas { display: block; width: 100%; height: 100%; }
.lecteur { width: min(1180px, 96vw); max-height: 96vh; padding: 0; border: 0; background: transparent; overflow: visible; }
.lecteur[open] { animation: monte .3s cubic-bezier(.2, .7, .2, 1); }
.lecteur-scene { position: relative; aspect-ratio: 16 / 9; max-height: 70vh; margin: 0 auto; }
.lecteur-halo { position: absolute; inset: 0; width: 100%; height: 100%; filter: blur(48px) saturate(1.5) brightness(1.1); transform: scale(1.14); opacity: .78; pointer-events: none; }
.lecteur-video { position: relative; display: block; width: 100%; height: 100%; border-radius: 8px; background: #000; box-shadow: 0 30px 80px -20px rgb(0 0 0 / .85); }
.lecteur-infos { margin-top: 16px; padding: 16px 18px; max-height: 24vh; overflow: auto; border-radius: 12px; border: 1px solid rgb(201 164 92 / .2); background: rgb(14 21 40 / .95); }
.lecteur-ligne { display: flex; flex-wrap: wrap; gap: 12px 16px; align-items: flex-start; justify-content: space-between; }
.lecteur-texte { min-width: 0; flex: 1 1 320px; }
.lecteur-titre { margin: 0; font: 400 clamp(20px, 2.4vw, 28px)/1.2 var(--serif); color: var(--papier); }
.lecteur-meta { margin: 4px 0 0; font-size: 14.5px; color: var(--encre-pale); }
.chapitres-bloc h3 { margin: 14px 0 6px; font: 400 17px var(--serif); color: var(--papier); }
.chapitres { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: 6px; }
.chapitre { display: inline-flex; gap: 8px; padding: 5px 11px; border-radius: 999px; border: 1px solid rgb(201 164 92 / .25); background: rgb(0 0 0 / .25); color: var(--encre); cursor: pointer; font-size: 14px; }
.chapitre[aria-current="true"] { background: var(--or); border-color: var(--or); color: #1d150b; }
.chapitre-temps { opacity: .75; font-variant-numeric: tabular-nums; }
.description-bloc { margin-top: 12px; color: var(--encre-pale); }
.description { white-space: pre-line; font-size: 14.5px; }

/* Annonces */
.toasts { position: fixed; z-index: 90; left: 50%; bottom: max(18px, env(safe-area-inset-bottom)); transform: translateX(-50%); width: min(92vw, 560px); display: flex; flex-direction: column; align-items: center; gap: 8px; pointer-events: none; }
.toast { display: flex; align-items: center; gap: 12px; padding: 10px 14px 10px 16px; border-radius: 12px; border: 1px solid rgb(201 164 92 / .45); background: rgb(12 18 34 / .97); color: var(--encre); font-size: 14.5px; box-shadow: 0 12px 36px rgb(0 0 0 / .5); pointer-events: auto; animation: monte .25s ease-out; }
.toast-out { opacity: 0; transition: opacity .4s; }
.toast-action { flex: none; padding: 5px 12px; border: 0; border-radius: 999px; background: var(--or); color: #1d150b; cursor: pointer; font-size: 14px; }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .01ms !important; animation-iteration-count: 1 !important; transition-duration: .01ms !important; }
}

/* ── L'Œil : la bibliothèque en direct des réseaux sociaux ── */
:root { --site-a: #e9cf8f; --site-b: #8fb0dc; --site-c: #d9715f; --direct: #e5484d; }
.point-direct { display: inline-block; width: 8px; height: 8px; margin-right: 2px; border-radius: 50%; background: var(--direct); box-shadow: 0 0 0 0 rgb(229 72 77 / .6); animation: pouls 1.8s ease-out infinite; flex: none; }
@keyframes pouls { 0% { box-shadow: 0 0 0 0 rgb(229 72 77 / .55); } 70% { box-shadow: 0 0 0 7px rgb(229 72 77 / 0); } 100% { box-shadow: 0 0 0 0 rgb(229 72 77 / 0); } }
.oeil-marque { color: var(--or-clair); flex: none; }
.oeil-marque .pupille { transition: transform .08s linear; }
.oeil-ouverture { min-height: 62vh; display: grid; place-content: center; justify-items: center; gap: 18px; color: var(--or-clair); text-align: center; }
.oeil-ouverture p { font: italic 19px var(--serif); color: var(--encre-pale); }
.oeil-journal { list-style: none; margin: 0; padding: 0; display: grid; gap: 6px; font: italic 19px/1.3 var(--serif); color: var(--papier); }
.oeil-journal li { animation: monte .3s cubic-bezier(.2, .7, .2, 1); }
.oeil-collecte { margin: 0 0 0 auto; font: italic 15px var(--serif); color: var(--encre-pale); }
.oeil-tete { display: flex; align-items: center; gap: 16px; }
.oeil-tete .vue-intro { margin-bottom: 6px; }
.oeil-perime { margin: 4px 0 10px; color: #f0b27a; font-size: 14.5px; }
.oeil-reglages { display: flex; flex-wrap: wrap; gap: 10px; margin: 10px 0; }
.segment { display: inline-flex; flex-wrap: wrap; padding: 3px; border-radius: 10px; border: 1px solid rgb(201 164 92 / .25); background: rgb(0 0 0 / .25); }
.segment button { padding: 6px 12px; border: 0; border-radius: 7px; background: transparent; color: var(--encre-pale); cursor: pointer; font-size: 14px; }
.segment button[aria-pressed="true"] { background: var(--nuit-claire); color: var(--papier); box-shadow: inset 0 0 0 1px rgb(201 164 92 / .5); }
.puces-sites { display: flex; flex-wrap: wrap; gap: 6px; margin: 4px 0 18px; }
.puce-site { display: inline-flex; align-items: baseline; gap: 6px; padding: 5px 11px 5px 9px; border-radius: 999px; border: 1px solid rgb(255 255 255 / .1); background: rgb(0 0 0 / .22); color: var(--encre); cursor: pointer; font-size: 14px; }
.puce-site::before { content: ""; width: 8px; height: 8px; border-radius: 50%; background: var(--encre-faible); align-self: center; }
.puce-site.k-a::before { background: var(--site-a); } .puce-site.k-b::before { background: var(--site-b); } .puce-site.k-c::before { background: var(--site-c); }
.puce-site small { color: var(--encre-faible); font-variant-numeric: tabular-nums; }
.puce-site[aria-pressed="true"] { border-color: var(--or); background: rgb(201 164 92 / .14); }
.a-la-une { margin: 6px 0 22px; }
.a-la-une h2 { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; margin: 0 0 10px; font: 400 21px var(--serif); color: var(--papier); }
.actus-rang { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 250px), 1fr)); gap: 12px; }
.actus { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 320px), 1fr)); gap: 12px; }
.actus .oeil-jour { grid-column: 1 / -1; }
.actu { display: grid; align-content: start; gap: 6px; padding: 14px 16px; border-radius: 10px; border: 1px solid rgb(255 255 255 / .08); border-left: 3px solid var(--or); background: rgb(14 21 40 / .9); color: var(--encre); text-decoration: none; }
.actu:hover { border-color: rgb(201 164 92 / .5); border-left-color: var(--or-clair); }
.actu small { display: flex; justify-content: space-between; gap: 10px; color: var(--encre-faible); font-size: 12.5px; }
.actu b { font: 400 17px/1.3 var(--serif); color: var(--papier); }
.actu p { margin: 0; font-size: 14px; color: var(--encre-pale); }
.actu-reglementation { border-left-color: var(--site-b); } .actu-aerostats { border-left-color: var(--site-c); } .actu-evenement { border-left-color: #9fd3a8; }
.oeil-jour { margin: 22px 0 10px; font: italic 400 18px var(--serif); color: var(--or-clair); text-transform: none; }
.oeil-jour::first-letter { text-transform: uppercase; }
.oeil-semaine.oeil-vignettes, .oeil-flux { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 330px), 1fr)); gap: 16px; align-items: start; }
.oeil-semaine.oeil-vignettes .oeil-jour, .oeil-semaine .vide, .oeil-flux .vide { grid-column: 1 / -1; }
.publication { display: grid; gap: 10px; padding: 12px; border-radius: 12px; border: 1px solid rgb(255 255 255 / .08); background: rgb(14 21 40 / .92); }
.publication > header { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 4px 10px; font-size: 14px; }
.publication > header b { font: 400 16px var(--serif); color: var(--papier); }
.publication > header span { color: var(--encre-faible); }
.publication > footer { display: grid; gap: 10px; }
.publication-actions { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 8px; font-size: 14px; }
.cadre-ig { position: relative; height: 560px; overflow: hidden; border-radius: 6px; background: #fff; display: grid; place-items: center; }
.cadre-ig iframe { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; }
.cadre-attente { color: #5b6478; font: italic 15px var(--serif); padding: 20px; text-align: center; }
.etiquettes { display: flex; flex-wrap: wrap; gap: 5px; }
.etq { padding: 2px 8px; border-radius: 999px; font-size: 12px; background: rgb(255 255 255 / .07); color: var(--encre-pale); }
.etq-M { background: rgb(240 178 122 / .16); color: #f3c38f; } .etq-S { background: rgb(229 72 77 / .18); color: #f5a3a5; } .etq-W { background: rgb(143 176 220 / .18); color: #b9cdea; }
.etq-K { background: rgb(217 113 95 / .18); color: #eba596; } .etq-O { background: rgb(159 211 168 / .16); color: #b8e0bf; } .etq-A { background: rgb(143 176 220 / .14); color: var(--site-b); }
.bouton-fonds { min-height: 32px; padding: 5px 12px; font-size: 13.5px; }
.bouton-fonds.au-fonds { border-color: rgb(201 164 92 / .5); background: rgb(201 164 92 / .14); color: var(--or-clair); opacity: 1; cursor: default; }
.oeil-liste { display: grid; gap: 2px; }
.oeil-liste .oeil-jour { margin-top: 18px; }
.publication-ligne { display: grid; grid-template-columns: 1fr auto auto; align-items: center; gap: 10px; padding: 8px 10px; border-radius: 8px; background: rgb(255 255 255 / .03); }
.publication-ligne:hover { background: rgb(255 255 255 / .06); }
.publication-ouvrir { display: grid; grid-template-columns: minmax(110px, 180px) minmax(100px, 170px) 1fr; gap: 12px; align-items: baseline; padding: 0; border: 0; background: none; color: var(--encre); text-align: left; cursor: pointer; font-size: 14.5px; min-width: 0; }
.pl-site { color: var(--papier); font-family: var(--serif); }
.pl-compte { color: var(--encre-faible); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.pl-texte { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; color: var(--encre-pale); }
@media (max-width: 760px) { .publication-ligne { grid-template-columns: 1fr auto; } .publication-ligne .etiquettes { grid-column: 1 / -1; grid-row: 2; } .publication-ouvrir { grid-template-columns: 1fr; gap: 2px; } }
.oeil-publication .integre-social { height: min(70vh, 760px); }
.oeil-legende { margin: 10px 0; font: 15px/1.5 var(--serif); color: var(--encre); max-width: 75ch; white-space: pre-line; }
.mini { display: grid; gap: 3px; width: 100%; padding: 8px 10px; border: 0; border-radius: 8px; background: rgb(255 255 255 / .04); color: var(--encre); text-align: left; text-decoration: none; cursor: pointer; font: inherit; font-size: 14px; }
.mini:hover, .mini:focus-visible { background: rgb(201 164 92 / .12); }
.mini small { color: var(--encre-faible); font-size: 12.5px; }
.mini small span + span::before { content: ", "; }
.mini-texte { display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; color: var(--encre-pale); }
.mini-vide { color: var(--encre-faible); font: italic 15px var(--serif); }
.angles-morts { max-width: 90ch; padding: 10px 14px; border-radius: 10px; border: 1px dashed rgb(201 164 92 / .45); color: var(--encre-pale); font-size: 14.5px; }
.radar-defile { overflow-x: auto; border-radius: 10px; border: 1px solid rgb(255 255 255 / .08); }
.radar { width: 100%; border-collapse: collapse; font-size: 14px; font-variant-numeric: tabular-nums; }
.radar th, .radar td { padding: 8px 10px; text-align: left; white-space: nowrap; border-bottom: 1px solid rgb(255 255 255 / .06); }
.radar thead th { position: sticky; top: 0; background: #111a33; }
.radar thead button { padding: 0; border: 0; background: none; color: var(--encre-pale); cursor: pointer; font: inherit; font-weight: 600; }
.radar thead th[aria-sort] button { color: var(--or-clair); }
.radar tbody th { font: 400 15px var(--serif); color: var(--papier); }
.radar tbody tr { cursor: pointer; }
.radar tbody tr:hover, .radar tbody tr:focus-visible { background: rgb(201 164 92 / .08); outline: none; }
.radar .nombre { text-align: right; }
.radar .vent { color: var(--site-b); }
.radar td.k-a { color: var(--site-a); } .radar td.k-b { color: var(--site-b); } .radar td.k-c { color: var(--site-c); }
.hausse { color: #9fd3a8; } .baisse { color: #f5a3a5; } .discret { color: var(--encre-faible); }
.globe-scene { position: relative; height: max(560px, calc(100vh - 170px)); margin: 0 calc(var(--marge) * -1); overflow: hidden; }
.globe-toile { position: absolute; inset: 0; width: 100%; height: 100%; display: block; touch-action: none; cursor: grab; }
.globe-toile.saisi { cursor: grabbing; }
.globe-compteurs { position: absolute; top: 14px; left: var(--marge); display: grid; grid-template-columns: repeat(3, auto); gap: 6px 22px; pointer-events: none; }
.globe-compteurs p { margin: 0; display: grid; }
.globe-compteurs b { font: 400 26px/1.05 var(--serif); color: var(--papier); font-variant-numeric: tabular-nums; }
.globe-compteurs span { font-size: 12.5px; color: var(--encre-faible); }
.globe-depeches { position: absolute; left: var(--marge); top: 170px; bottom: 96px; width: min(300px, 30vw); display: flex; flex-direction: column; }
.globe-depeches h2 { display: flex; align-items: center; gap: 8px; margin: 0 0 8px; font: 400 17px var(--serif); color: var(--papier); }
.globe-fil { list-style: none; margin: 0; padding: 0; display: grid; gap: 6px; overflow: hidden; mask-image: linear-gradient(#000 70%, transparent); }
.globe-fil li { animation: monte .4s cubic-bezier(.2, .7, .2, 1); }
.globe-fil button { display: grid; gap: 2px; width: 100%; padding: 8px 10px; border: 0; border-left: 2px solid rgb(201 164 92 / .5); border-radius: 0 8px 8px 0; background: rgb(10 16 32 / .72); color: var(--encre); text-align: left; cursor: pointer; font-size: 13px; }
.globe-fil button:hover { background: rgb(28 39 71 / .9); }
.globe-fil small { color: var(--encre-faible); font-size: 12px; }
.globe-fil small span + span::before { content: ", "; }
.globe-fil b { font: 400 14.5px var(--serif); color: var(--papier); }
.globe-fil button > span { display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; color: var(--encre-pale); }
.globe-dossier { position: absolute; top: 14px; right: var(--marge); bottom: 14px; width: min(380px, 92vw); padding: 18px 18px 14px; overflow-y: auto; border-radius: 14px; border: 1px solid rgb(201 164 92 / .3); background: rgb(14 21 40 / .94); backdrop-filter: blur(6px); transform: translateX(calc(100% + 80px)); visibility: hidden; transition: transform .45s cubic-bezier(.2, .7, .2, 1), visibility 0s .45s; }
.globe-dossier.ouvert { transform: none; visibility: visible; transition: transform .45s cubic-bezier(.2, .7, .2, 1); }
.globe-dossier h2 { margin: 6px 0 4px; font: 400 26px/1.1 var(--serif); color: var(--papier); }
.globe-dossier h3 { margin: 16px 0 6px; font: 400 15.5px var(--serif); color: var(--or-clair); }
.dossier-type { display: inline-block; margin: 0; padding: 2px 9px; border-radius: 999px; font-size: 12.5px; background: rgb(255 255 255 / .08); }
.dossier-type.k-a { color: var(--site-a); } .dossier-type.k-b { color: var(--site-b); } .dossier-type.k-c { color: var(--site-c); }
.dossier-detail { margin: 0; color: var(--encre-pale); font-size: 14px; }
.dossier-chiffres { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; margin: 12px 0 0; }
.dossier-chiffres p { margin: 0; display: grid; font-size: 12.5px; color: var(--encre-faible); }
.dossier-chiffres b { font: 400 22px var(--serif); color: var(--papier); font-variant-numeric: tabular-nums; }
.dossier-courbe { display: flex; align-items: flex-end; gap: 2px; height: 56px; }
.dossier-courbe i, .globe-chrono i { flex: 1; min-width: 2px; height: calc(var(--h) * 100%); border-radius: 2px 2px 0 0; background: linear-gradient(var(--or-clair), var(--or-sombre)); }
.barre { display: grid; grid-template-columns: minmax(0, 1fr) 90px auto; align-items: center; gap: 8px; margin: 3px 0; font-size: 13.5px; }
.barre span:first-child { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; color: var(--encre-pale); }
.barre i { display: block; height: 6px; width: calc(var(--l) * 100%); border-radius: 3px; background: var(--or); }
.barre span:last-child { color: var(--encre-faible); font-variant-numeric: tabular-nums; text-align: right; }
.dossier-actions { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 16px; }
.dossier-attente { color: var(--encre-pale); font: italic 16px var(--serif); }
.globe-dossier .mini { margin-top: 4px; }
.globe-dossier .vent { color: var(--site-b); font-size: 13.5px; }
.globe-bas { position: absolute; left: var(--marge); right: var(--marge); bottom: 12px; display: grid; gap: 8px; pointer-events: none; }
.globe-legende { display: flex; flex-wrap: wrap; gap: 6px 16px; margin: 0; font-size: 12.5px; color: var(--encre-faible); }
.globe-legende span { display: inline-flex; align-items: center; gap: 6px; }
.globe-legende i { width: 9px; height: 9px; border-radius: 50%; background: var(--c); }
.globe-chrono { display: flex; align-items: flex-end; gap: 1px; height: 34px; pointer-events: auto; }
.globe-bulle { position: absolute; z-index: 5; max-width: 280px; display: grid; gap: 2px; padding: 9px 12px; border-radius: 10px; border: 1px solid rgb(201 164 92 / .4); background: rgb(10 16 32 / .96); font-size: 13px; color: var(--encre-pale); pointer-events: none; }
.globe-bulle b { font: 400 16px var(--serif); color: var(--papier); }
@media (max-width: 900px) { .globe-depeches { display: none; } .globe-compteurs { grid-template-columns: repeat(3, auto); gap: 4px 14px; } .globe-compteurs b { font-size: 20px; } .globe-dossier { top: auto; height: 62%; } }
.mur { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 300px), 1fr)); gap: 16px; }
.ecran { display: grid; gap: 8px; padding: 10px; border-radius: 12px; border: 1px solid rgb(255 255 255 / .08); border-top: 3px solid var(--site-a); background: #0c1326; }
.ecran.k-b { border-top-color: var(--site-b); } .ecran.k-c { border-top-color: var(--site-c); }
.ecran header { display: flex; justify-content: space-between; align-items: center; gap: 8px; font-size: 13.5px; color: var(--encre-faible); }
.ecran header b { display: inline-flex; align-items: center; gap: 6px; font: 400 15.5px var(--serif); color: var(--papier); }
.ecran .cadre-ig { height: 500px; }
.ecran footer { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.ecran-position { font-size: 12.5px; color: var(--encre-faible); text-align: center; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.filtres { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; margin: 6px 0 12px; }
.filtres select { max-width: 260px; padding: 7px 10px; border-radius: 10px; border: 1px solid rgb(201 164 92 / .28); background: rgb(0 0 0 / .28); color: var(--encre); font: inherit; font-size: 14px; }
.filtres .recherche { flex: 1 1 200px; max-width: 300px; }
.oeil-compte { margin: 0 0 12px; color: var(--encre-pale); font: italic 16px var(--serif); }
.oeil-suite { display: flex; justify-content: center; margin: 18px 0; }
.alertes { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 250px), 1fr)); gap: 14px; align-items: start; }
.alerte { display: grid; gap: 6px; padding: 12px; border-radius: 12px; border: 1px solid rgb(255 255 255 / .07); border-top: 3px solid var(--or); background: rgb(14 21 40 / .9); }
.alerte h2 { display: flex; justify-content: space-between; align-items: baseline; gap: 8px; margin: 0 0 4px; font: 400 18px var(--serif); color: var(--papier); }
.alerte .lien-bouton { font-size: 13.5px; }
.alerte-S { border-top-color: var(--direct); } .alerte-W { border-top-color: var(--site-b); } .alerte-K { border-top-color: var(--site-c); } .alerte-O { border-top-color: #9fd3a8; } .alerte-M { border-top-color: #f0b27a; }
.reseaux { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 270px), 1fr)); gap: 14px; }
.reseau { display: grid; grid-template-rows: auto 1fr auto; gap: 8px; padding: 10px; border-radius: 12px; border: 1px solid rgb(255 255 255 / .08); background: rgb(14 21 40 / .9); }
.reseau-image { display: grid; place-items: center; aspect-ratio: 16 / 9; overflow: hidden; border-radius: 8px; background: linear-gradient(135deg, #1c2747, #0a1020); color: var(--or-clair); font: italic 20px var(--serif); text-decoration: none; }
.reseau-image img { width: 100%; height: 100%; object-fit: cover; }
.reseau-texte { display: grid; gap: 3px; }
.reseau-texte small { color: var(--encre-faible); font-size: 12.5px; }
.reseau-texte a { color: var(--papier); font: 400 15.5px/1.3 var(--serif); text-decoration: none; }
.reseau-texte a:hover { text-decoration: underline; }
.reseau .bouton-fonds { justify-self: start; }

/* ── Assistant d'installation ── */
.porte-assistant { width: min(660px, 100%); }
.etapes-installation { list-style: none; display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 6px; margin: 0 0 20px; padding: 0; counter-reset: etape; }
.etapes-installation li { counter-increment: etape; display: grid; justify-items: center; gap: 6px; text-align: center; font-size: 12px; line-height: 1.25; color: var(--encre-faible); }
.etapes-installation li::before { content: counter(etape); display: grid; place-items: center; width: 28px; height: 28px; border-radius: 50%; border: 1px solid rgb(201 164 92 / .35); font: 600 13px var(--sans); color: var(--encre-pale); }
.etapes-installation li.faite::before { content: "✓"; border-color: rgb(201 164 92 / .6); background: rgb(201 164 92 / .16); color: var(--or-clair); }
.etapes-installation li[aria-current="step"] { color: var(--papier); }
.etapes-installation li[aria-current="step"]::before { border-color: var(--or); background: var(--or); color: #1d150b; }
@media (max-width: 520px) { .etapes-installation li span { display: none; } .etapes-installation li[aria-current="step"] span { display: block; } }
.bandeau-http { margin: 0 0 16px; padding: 8px 12px; border-radius: 10px; background: rgb(240 178 122 / .12); color: #f3c38f; font-size: 13.5px; }
.verifications { list-style: none; margin: 0 0 16px; padding: 0; }
.verifications li { display: grid; grid-template-columns: 22px minmax(0, 170px) 1fr; gap: 10px; align-items: baseline; padding: 8px 0; border-bottom: 1px solid rgb(255 255 255 / .06); font-size: 14.5px; }
.verifications b { font-weight: 600; color: var(--papier); }
.verifications li > span:last-child { color: var(--encre-pale); }
@media (max-width: 520px) { .verifications li { grid-template-columns: 22px 1fr; } .verifications li > span:last-child { grid-column: 2; } }
.etat { font-weight: 700; }
.etat-ok { color: #9fd3a8; } .etat-attention { color: #f0b27a; } .etat-echec { color: #f5a3a5; }
.porte-bouton:disabled { opacity: .45; cursor: not-allowed; }
.porte-bouton-second { background: transparent; border: 1px solid var(--or); color: var(--or-clair); }
.porte-bouton-second:hover { background: rgb(201 164 92 / .14); }
.chemin-bloc { margin: 10px 0 4px; }
.chemin { padding: 3px 8px; border-radius: 6px; background: rgb(0 0 0 / .35); font-size: 14.5px; word-break: break-all; color: var(--or-clair); }
.code-installation { font: 600 24px/1 var(--serif) !important; letter-spacing: .14em; text-align: center; text-transform: uppercase; }
.test-https { margin: 12px 0; color: var(--encre-pale); }
.option { margin: 14px 0 0; padding: 14px 16px; border-radius: 12px; border: 1px solid rgb(201 164 92 / .28); background: rgb(0 0 0 / .18); }
.option-conseillee { border-color: var(--or); background: rgb(201 164 92 / .08); }
.option h2 { margin: 0 0 4px; font: 400 20px var(--serif); color: var(--papier); }
.porte-carte label.case { display: flex; gap: 10px; align-items: flex-start; margin: 14px 0 0; color: var(--encre); font-size: 14.5px; }
.porte-carte label.case input { width: auto; margin-top: 3px; flex: none; accent-color: var(--or); }

/* Accès autonome : code d'accueil */
.repli-code { margin: 14px 0 0; padding: 10px 14px; border-radius: 10px; border: 1px dashed rgb(201 164 92 / .45); }
.repli-code summary { cursor: pointer; color: var(--or-clair); font-size: 14.5px; }
.repli-code[open] summary { margin-bottom: 4px; }
