/* =====================================================================
   Nautilus : thème « Vingt mille lieues sous les mers »
   Le grand salon du capitaine Nemo : laiton riveté, cuivre, vert-de-gris,
   hublots sur les abysses, typographies des éditions Hetzel.
   ===================================================================== */
:root {
  --nuit: #03121a;
  --bois: #071a22;
  --bois-2: #0a2029;
  --bois-3: #133540;
  --verre: rgba(3, 15, 21, .86);
  --or: #c9a45a;
  --or-clair: #ecd49a;
  --or-sombre: #7a6031;
  --cuivre: #c27a45;
  --lueur: #6ff0dc;
  --lueur-douce: rgba(111, 240, 220, .22);
  --trait: rgba(201, 164, 90, .22);
  --trait-fort: rgba(201, 164, 90, .5);
  --texte: #e9e3d0;
  --texte-2: #b6b9a8;
  --texte-3: #7f8b84;
  --sang: #8a3a22;
  --sang-vif: #b5532e;
  --sang-clair: #ee9c78;
  --parchemin: #eadcbc;
  --encre: #1d1408;
  --ombre: 0 22px 50px rgba(0, 0, 0, .7);
  --laiton: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 400 100' preserveAspectRatio='none'%3E %3Cdefs%3E%3ClinearGradient id='g' x1='0' y1='0' x2='0' y2='1'%3E%3Cstop offset='0' stop-color='%23f6e6b4'/%3E%3Cstop offset='0.3' stop-color='%23dcb96f'/%3E%3Cstop offset='0.6' stop-color='%23a37c3d'/%3E%3Cstop offset='0.82' stop-color='%23c9a45e'/%3E%3Cstop offset='1' stop-color='%23e2c78a'/%3E%3C/linearGradient%3E %3ClinearGradient id='s' x1='0' y1='0' x2='1' y2='1'%3E%3Cstop offset='0' stop-color='%23fff' stop-opacity='0'/%3E%3Cstop offset='.38' stop-color='%23fff' stop-opacity='0'/%3E %3Cstop offset='.47' stop-color='%23fff' stop-opacity='0.22'/%3E%3Cstop offset='.56' stop-color='%23fff' stop-opacity='0'/%3E%3C/linearGradient%3E %3Cfilter id='b' x='0' y='0' width='100%' height='100%'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.004 .55' numOctaves='3' seed='4' stitchTiles='stitch'/%3E %3CfeColorMatrix values='.85 0 0 0 .08 .85 0 0 0 .08 .85 0 0 0 .08 0 0 0 0 1' result='n'/%3E%3CfeBlend in='n' in2='SourceGraphic' mode='overlay'/%3E%3C/filter%3E%3C/defs%3E %3Crect width='400' height='100' fill='url(%23g)' filter='url(%23b)'/%3E%3Crect width='400' height='100' fill='url(%23s)'/%3E%3C/svg%3E");
  --laiton-vif: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 400 100' preserveAspectRatio='none'%3E %3Cdefs%3E%3ClinearGradient id='g' x1='0' y1='0' x2='0' y2='1'%3E%3Cstop offset='0' stop-color='%23fff3cc'/%3E%3Cstop offset='0.3' stop-color='%23ebcb85'/%3E%3Cstop offset='0.6' stop-color='%23b48b49'/%3E%3Cstop offset='0.82' stop-color='%23d6b46c'/%3E%3Cstop offset='1' stop-color='%23efd59a'/%3E%3C/linearGradient%3E %3ClinearGradient id='s' x1='0' y1='0' x2='1' y2='1'%3E%3Cstop offset='0' stop-color='%23fff' stop-opacity='0'/%3E%3Cstop offset='.38' stop-color='%23fff' stop-opacity='0'/%3E %3Cstop offset='.47' stop-color='%23fff' stop-opacity='0.32'/%3E%3Cstop offset='.56' stop-color='%23fff' stop-opacity='0'/%3E%3C/linearGradient%3E %3Cfilter id='b' x='0' y='0' width='100%' height='100%'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.004 .55' numOctaves='3' seed='4' stitchTiles='stitch'/%3E %3CfeColorMatrix values='.85 0 0 0 .08 .85 0 0 0 .08 .85 0 0 0 .08 0 0 0 0 1' result='n'/%3E%3CfeBlend in='n' in2='SourceGraphic' mode='overlay'/%3E%3C/filter%3E%3C/defs%3E %3Crect width='400' height='100' fill='url(%23g)' filter='url(%23b)'/%3E%3Crect width='400' height='100' fill='url(%23s)'/%3E%3C/svg%3E");
  --metal: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='300' height='300'%3E%3Cfilter id='m' x='0' y='0' width='100%' height='100%'%3E %3CfeTurbulence type='fractalNoise' baseFrequency='.9' numOctaves='2' seed='9' stitchTiles='stitch' result='g'/%3E %3CfeTurbulence type='fractalNoise' baseFrequency='.012' numOctaves='3' seed='2' stitchTiles='stitch' result='t'/%3E %3CfeComposite in='g' in2='t' operator='arithmetic' k1='0' k2='.75' k3='.25' k4='0'/%3E %3CfeColorMatrix values='0 0 0 0 .62 0 0 0 0 .78 0 0 0 0 .8 .5 0 0 0 -.17'/%3E%3C/filter%3E%3Crect width='100%' height='100%' filter='url(%23m)'/%3E%3C/svg%3E");
  /* Rivet de laiton : une petite sphère éclairée en haut à gauche */
  --rivet: radial-gradient(circle at 38% 34%, #fffbe8 0, #f0d796 12%, #c39a52 34%, #7d5a24 56%, #2b1c07 68%, rgba(0, 0, 0, .55) 74%, transparent 82%);
  --rivets:
    var(--rivet) top 6px left 6px / 9px 9px no-repeat,
    var(--rivet) top 6px right 6px / 9px 9px no-repeat,
    var(--rivet) bottom 6px left 6px / 9px 9px no-repeat,
    var(--rivet) bottom 6px right 6px / 9px 9px no-repeat;

  --police: "EB Garamond", Garamond, Georgia, serif;
  --police-titre: "Playfair Display", "Didot", Georgia, serif;
  --police-marque: "Cinzel Decorative", "Playfair Display", Georgia, serif;
  --police-technique: "Special Elite", "Courier New", monospace;

  --equerre-hg: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 38 38'%3E%3Cg transform=''%3E %3Cdefs%3E%3ClinearGradient id='l' x1='0' y1='0' x2='1' y2='1'%3E%3Cstop offset='0' stop-color='%23f4e2ab'/%3E%3Cstop offset='.45' stop-color='%23c39b52'/%3E%3Cstop offset='1' stop-color='%236b4f22'/%3E%3C/linearGradient%3E %3CradialGradient id='r' cx='.35' cy='.35' r='.7'%3E%3Cstop offset='0' stop-color='%23fff3cf'/%3E%3Cstop offset='.5' stop-color='%23b38d48'/%3E%3Cstop offset='1' stop-color='%233d2b10'/%3E%3C/radialGradient%3E%3C/defs%3E %3Cpath d='M1 1H37V10H10V37H1Z' fill='url(%23l)' stroke='%233a2a10' stroke-width='.9'/%3E %3Cpath d='M2.6 2.6H35.4' stroke='%23fff1c4' stroke-width='.6' opacity='.6'/%3E %3Ccircle cx='5.5' cy='5.5' r='2.1' fill='url(%23r)'/%3E%3Ccircle cx='23' cy='5.5' r='1.7' fill='url(%23r)'/%3E%3Ccircle cx='5.5' cy='23' r='1.7' fill='url(%23r)'/%3E%3C/g%3E%3C/svg%3E");
  --equerre-hd: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 38 38'%3E%3Cg transform='matrix(-1 0 0 1 38 0)'%3E %3Cdefs%3E%3ClinearGradient id='l' x1='0' y1='0' x2='1' y2='1'%3E%3Cstop offset='0' stop-color='%23f4e2ab'/%3E%3Cstop offset='.45' stop-color='%23c39b52'/%3E%3Cstop offset='1' stop-color='%236b4f22'/%3E%3C/linearGradient%3E %3CradialGradient id='r' cx='.35' cy='.35' r='.7'%3E%3Cstop offset='0' stop-color='%23fff3cf'/%3E%3Cstop offset='.5' stop-color='%23b38d48'/%3E%3Cstop offset='1' stop-color='%233d2b10'/%3E%3C/radialGradient%3E%3C/defs%3E %3Cpath d='M1 1H37V10H10V37H1Z' fill='url(%23l)' stroke='%233a2a10' stroke-width='.9'/%3E %3Cpath d='M2.6 2.6H35.4' stroke='%23fff1c4' stroke-width='.6' opacity='.6'/%3E %3Ccircle cx='5.5' cy='5.5' r='2.1' fill='url(%23r)'/%3E%3Ccircle cx='23' cy='5.5' r='1.7' fill='url(%23r)'/%3E%3Ccircle cx='5.5' cy='23' r='1.7' fill='url(%23r)'/%3E%3C/g%3E%3C/svg%3E");
  --equerre-bg: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 38 38'%3E%3Cg transform='matrix(1 0 0 -1 0 38)'%3E %3Cdefs%3E%3ClinearGradient id='l' x1='0' y1='0' x2='1' y2='1'%3E%3Cstop offset='0' stop-color='%23f4e2ab'/%3E%3Cstop offset='.45' stop-color='%23c39b52'/%3E%3Cstop offset='1' stop-color='%236b4f22'/%3E%3C/linearGradient%3E %3CradialGradient id='r' cx='.35' cy='.35' r='.7'%3E%3Cstop offset='0' stop-color='%23fff3cf'/%3E%3Cstop offset='.5' stop-color='%23b38d48'/%3E%3Cstop offset='1' stop-color='%233d2b10'/%3E%3C/radialGradient%3E%3C/defs%3E %3Cpath d='M1 1H37V10H10V37H1Z' fill='url(%23l)' stroke='%233a2a10' stroke-width='.9'/%3E %3Cpath d='M2.6 2.6H35.4' stroke='%23fff1c4' stroke-width='.6' opacity='.6'/%3E %3Ccircle cx='5.5' cy='5.5' r='2.1' fill='url(%23r)'/%3E%3Ccircle cx='23' cy='5.5' r='1.7' fill='url(%23r)'/%3E%3Ccircle cx='5.5' cy='23' r='1.7' fill='url(%23r)'/%3E%3C/g%3E%3C/svg%3E");
  --equerre-bd: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 38 38'%3E%3Cg transform='matrix(-1 0 0 -1 38 38)'%3E %3Cdefs%3E%3ClinearGradient id='l' x1='0' y1='0' x2='1' y2='1'%3E%3Cstop offset='0' stop-color='%23f4e2ab'/%3E%3Cstop offset='.45' stop-color='%23c39b52'/%3E%3Cstop offset='1' stop-color='%236b4f22'/%3E%3C/linearGradient%3E %3CradialGradient id='r' cx='.35' cy='.35' r='.7'%3E%3Cstop offset='0' stop-color='%23fff3cf'/%3E%3Cstop offset='.5' stop-color='%23b38d48'/%3E%3Cstop offset='1' stop-color='%233d2b10'/%3E%3C/radialGradient%3E%3C/defs%3E %3Cpath d='M1 1H37V10H10V37H1Z' fill='url(%23l)' stroke='%233a2a10' stroke-width='.9'/%3E %3Cpath d='M2.6 2.6H35.4' stroke='%23fff1c4' stroke-width='.6' opacity='.6'/%3E %3Ccircle cx='5.5' cy='5.5' r='2.1' fill='url(%23r)'/%3E%3Ccircle cx='23' cy='5.5' r='1.7' fill='url(%23r)'/%3E%3Ccircle cx='5.5' cy='23' r='1.7' fill='url(%23r)'/%3E%3C/g%3E%3C/svg%3E");
  --engrenage: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='-8 -8 16 16'%3E%3Cg fill='%23d9b468'%3E%3Crect x='-1.3' y='-8' width='2.6' height='3.4' rx='.5' transform='rotate(0)'/%3E%3Crect x='-1.3' y='-8' width='2.6' height='3.4' rx='.5' transform='rotate(36)'/%3E%3Crect x='-1.3' y='-8' width='2.6' height='3.4' rx='.5' transform='rotate(72)'/%3E%3Crect x='-1.3' y='-8' width='2.6' height='3.4' rx='.5' transform='rotate(108)'/%3E%3Crect x='-1.3' y='-8' width='2.6' height='3.4' rx='.5' transform='rotate(144)'/%3E%3Crect x='-1.3' y='-8' width='2.6' height='3.4' rx='.5' transform='rotate(180)'/%3E%3Crect x='-1.3' y='-8' width='2.6' height='3.4' rx='.5' transform='rotate(216)'/%3E%3Crect x='-1.3' y='-8' width='2.6' height='3.4' rx='.5' transform='rotate(252)'/%3E%3Crect x='-1.3' y='-8' width='2.6' height='3.4' rx='.5' transform='rotate(288)'/%3E%3Crect x='-1.3' y='-8' width='2.6' height='3.4' rx='.5' transform='rotate(324)'/%3E%3Ccircle r='5.4'/%3E%3C/g%3E%3Ccircle r='2' fill='%230a2029'/%3E%3C/svg%3E");
  --grain: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='220' height='220'%3E%3Cfilter id='g'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.8' numOctaves='2' stitchTiles='stitch'/%3E%3CfeColorMatrix values='0 0 0 0 .55 0 0 0 0 .8 0 0 0 0 .8 0 0 0 .09 0'/%3E%3C/filter%3E%3Crect width='100%' height='100%' filter='url(%23g)'/%3E%3C/svg%3E");
  --chevron: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 12 8'%3E%3Cpath d='M1 1.5 6 6.5 11 1.5' fill='none' stroke='%23c9a45a' stroke-width='1.4' stroke-linecap='round'/%3E%3C/svg%3E");
  --chevron-sombre: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 12 8'%3E%3Cpath d='M1 1.5 6 6.5 11 1.5' fill='none' stroke='%231d1408' stroke-width='1.6' stroke-linecap='round'/%3E%3C/svg%3E");
  --equerres:
    var(--equerre-hg) top 4px left 4px / 30px 30px no-repeat,
    var(--equerre-hd) top 4px right 4px / 30px 30px no-repeat,
    var(--equerre-bg) bottom 4px left 4px / 30px 30px no-repeat,
    var(--equerre-bd) bottom 4px right 4px / 30px 30px no-repeat;
  color-scheme: dark;
}

* { box-sizing: border-box; }
html {
  -webkit-text-size-adjust: 100%;
  background: var(--nuit);
  min-height: 100%;
}
body {
  margin: 0;
  color: var(--texte);
  font: 16.5px/1.5 var(--police);
  font-variant-numeric: lining-nums;
  min-height: 100vh;
}
/* Les eaux profondes : lumière de surface en haut, abysses en bas, vignetage de hublot.
   Calque fixe peint une seule fois (pas à chaque défilement). */
body::after {
  content: ""; position: fixed; inset: 0; z-index: -3; pointer-events: none;
  background:
    radial-gradient(ellipse 140% 100% at 50% 45%, transparent 50%, rgba(0, 4, 8, .7)),
    radial-gradient(ellipse 900px 380px at 50% -8%, rgba(110, 190, 200, .09), transparent 70%),
    radial-gradient(ellipse 700px 500px at 100% 100%, rgba(194, 122, 69, .05), transparent 70%),
    var(--grain),
    linear-gradient(180deg, #072029 0%, #051923 28%, #030f16 62%, #01070b 100%);
}

button, input, select { font: inherit; color: inherit; }
svg { width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 1.7; stroke-linecap: round; stroke-linejoin: round; flex-shrink: 0; }
[hidden] { display: none !important; }
::selection { background: rgba(111, 240, 220, .3); color: #fff; }
* { scrollbar-width: thin; scrollbar-color: var(--or-sombre) transparent; }

/* ---------- Boutons ---------- */
.btn {
  position: relative; display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  border: 1px solid transparent; border-radius: 3px;
  padding: 7px 16px; font-family: var(--police); font-size: 14px; font-weight: 600;
  letter-spacing: .14em; text-transform: uppercase;
  cursor: pointer; text-decoration: none; white-space: nowrap;
  transition: background .3s, border-color .3s, color .3s, box-shadow .3s, transform .15s;
}
.btn svg { width: 16px; height: 16px; }
.btn:active { transform: translateY(1px) scale(.99); }
.btn:disabled { opacity: .45; cursor: default; }
.btn:focus-visible, .onglet:focus-visible, .carte:focus-visible, input:focus-visible, select:focus-visible,
.ligne-livre:focus-visible, .puce:focus-visible, .bouteille:focus-visible, .bascule button:focus-visible,
.btn-encre:focus-visible, .nav-fleche:focus-visible, .lien-encre:focus-visible, .fermer:focus-visible {
  outline: 1px solid var(--lueur); outline-offset: 3px;
}
/* Laiton poli, riveté : l'action principale */
.btn-principal {
  background: var(--rivet) left 5px center / 6px 6px no-repeat, var(--rivet) right 5px center / 6px 6px no-repeat, var(--laiton);
  color: var(--encre); border-color: #6b4f22;
  box-shadow: inset 0 1px 0 rgba(255, 250, 230, .75), inset 0 -2px 4px rgba(80, 52, 16, .4), 0 2px 8px rgba(0, 0, 0, .5);
  text-shadow: 0 1px 0 rgba(255, 240, 200, .5);
}
.btn-principal:hover {
  background: var(--rivet) left 5px center / 6px 6px no-repeat, var(--rivet) right 5px center / 6px 6px no-repeat, var(--laiton-vif);
  box-shadow: inset 0 1px 0 rgba(255, 252, 238, .9), inset 0 -2px 4px rgba(80, 52, 16, .3), 0 0 20px rgba(236, 212, 154, .35), 0 2px 8px rgba(0, 0, 0, .5);
}
/* Verre teinté cerclé de laiton : actions secondaires, lueur bleu-vert au survol */
.btn-discret { background: rgba(4, 22, 30, .6); color: var(--texte); border-color: var(--trait-fort); }
.btn-discret svg { color: var(--or); transition: color .3s; }
.btn-discret:hover {
  border-color: var(--lueur); color: #fff; background: rgba(111, 240, 220, .09);
  box-shadow: 0 0 16px rgba(111, 240, 220, .22), inset 0 0 12px rgba(111, 240, 220, .08);
}
.btn-discret:hover svg { color: var(--lueur); }
/* Cuivre rouillé : jeter par-dessus bord */
.btn-danger { background: rgba(4, 22, 30, .75); color: var(--sang-clair); border-color: rgba(194, 122, 69, .8); }
.btn-danger:hover {
  background: radial-gradient(circle at 40% 30%, #d0703f, var(--sang) 75%); color: #fbe9d6; border-color: #e0915e;
  box-shadow: 0 0 16px rgba(208, 112, 63, .4);
}
.btn-petit { padding: 5px 12px; font-size: 12.5px; }
.btn-icone { padding: 7px; }
.btn-large { width: 100%; padding: 12px; font-size: 15.5px; }
.tourne svg { animation: tourne 1s linear infinite; }
@keyframes tourne { to { transform: rotate(360deg); } }

select {
  appearance: none; -webkit-appearance: none;
  background: var(--chevron) right 11px center / 11px 8px no-repeat, var(--verre);
  border: 1px solid var(--trait-fort); border-radius: 3px;
  padding: 6px 32px 6px 12px; font-size: 15px; cursor: pointer;
  transition: border-color .3s, box-shadow .3s;
}
select:hover { border-color: var(--lueur); box-shadow: 0 0 12px rgba(111, 240, 220, .16); }
select:disabled { opacity: .4; cursor: default; }
select option { background: var(--bois-2); color: var(--texte); }

/* ---------- Barre du haut : la passerelle ---------- */
.barre {
  position: sticky; top: 0; z-index: 20;
  background:
    var(--metal),
    linear-gradient(180deg, rgba(255, 255, 255, .05), transparent 30%),
    linear-gradient(180deg, #0a2029, #04121a);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, .06), 0 14px 30px rgba(0, 0, 0, .55);
}
/* Conduite de laiton avec ses manchons, en bas de la passerelle */
.barre::after {
  content: ""; position: absolute; left: 0; right: 0; bottom: -4px; height: 8px;
  background:
    repeating-linear-gradient(90deg, transparent 0 180px, #3b2a10 180px 181px, #f1d898 181px 184px, #9c773a 184px 190px, #3b2a10 190px 191px),
    linear-gradient(180deg, rgba(40, 26, 8, .85) 0%, rgba(255, 245, 210, .55) 28%, transparent 45%, rgba(30, 18, 4, .55) 100%),
    var(--laiton);
  box-shadow: 0 3px 8px rgba(0, 0, 0, .55);
}
.barre-ligne {
  display: flex; align-items: center; gap: 22px;
  max-width: 1760px; margin: 0 auto; padding: 12px 24px 6px;
}
.marque { display: flex; align-items: center; gap: 13px; text-decoration: none; color: var(--texte); white-space: nowrap; }

/* Logo : la barre du Nautilus en laiton, une pieuvre agrippée. La barre manœuvre doucement,
   un reflet de lumière glisse sur le métal, et elle s'emballe au survol. */
.embleme {
  position: relative; display: block; flex-shrink: 0; width: 78px; height: 78px; margin: -8px 0 -12px -6px;
  filter: drop-shadow(0 5px 6px rgba(0, 0, 0, .65)) drop-shadow(0 0 16px rgba(111, 240, 220, .14));
}
.barre-logo { position: absolute; inset: 0; display: block; animation: barre 18s cubic-bezier(.45, 0, .55, 1) infinite; }
.barre-logo img { width: 100%; height: 100%; display: block; }
.barre-logo::after {
  content: ""; position: absolute; inset: 0; pointer-events: none;
  -webkit-mask: url("/logo-256.png") center / contain no-repeat; mask: url("/logo-256.png") center / contain no-repeat;
  background: linear-gradient(115deg, transparent 42%, rgba(255, 246, 214, .6) 50%, transparent 58%) 220% 0 / 300% 100% no-repeat;
  mix-blend-mode: screen; animation: reflet 8s ease-in-out infinite;
}
@keyframes barre {
  0%, 100% { transform: rotate(0); }
  22% { transform: rotate(-16deg); }
  48% { transform: rotate(9deg); }
  70% { transform: rotate(-5deg); }
}
@keyframes reflet { 0%, 62% { background-position: 220% 0; } 88%, 100% { background-position: -120% 0; } }
.marque:hover .barre-logo { animation-duration: 3.6s; }
.marque-nom {
  font-family: var(--police-marque); font-weight: 700; font-size: 31px; line-height: 1;
  letter-spacing: .12em; margin-right: -.12em; padding-top: 2px;
  background: var(--laiton); -webkit-background-clip: text; background-clip: text; color: transparent;
  filter: drop-shadow(0 1px 0 rgba(0, 0, 0, .95)) drop-shadow(0 0 12px rgba(111, 240, 220, .12));
}

.recherche { position: relative; flex: 1; max-width: 460px; margin-left: 10px; }
.recherche svg { position: absolute; left: 12px; top: 50%; transform: translateY(-50%); color: var(--or); }
.recherche input {
  width: 100%; padding: 7px 14px 7px 38px; font-size: 16px;
  background: rgba(2, 14, 20, .65); border: 1px solid var(--trait-fort); border-radius: 3px;
  box-shadow: inset 0 2px 6px rgba(0, 0, 0, .45);
  transition: border-color .3s, box-shadow .3s;
}
.recherche input:hover { border-color: rgba(201, 164, 90, .8); }
.recherche input:focus { border-color: var(--lueur); box-shadow: inset 0 2px 6px rgba(0, 0, 0, .45), 0 0 16px rgba(111, 240, 220, .22); outline: none; }
.recherche input::placeholder { color: var(--texte-3); font-style: italic; }
.barre-actions { display: flex; align-items: center; gap: 8px; margin-left: auto; }
.admin-seul, .livre-seul { display: none !important; }
.est-admin .admin-seul { display: inline-flex !important; }

.onglets {
  display: flex; gap: 4px; overflow-x: auto; scrollbar-width: none;
  max-width: 1760px; margin: 0 auto; padding: 4px 24px 2px;
}
.onglets::-webkit-scrollbar { display: none; }
.onglet {
  position: relative; background: none; border: 0;
  padding: 8px 14px 16px; color: var(--texte-2);
  font-family: var(--police); font-weight: 500; font-size: 14px; letter-spacing: .17em; text-transform: uppercase;
  cursor: pointer; white-space: nowrap; display: flex; align-items: baseline; gap: 7px;
  transition: color .3s;
}
/* Sous l'onglet actif : un filet de laiton et un engrenage qui tourne */
.onglet::after {
  content: ""; position: absolute; left: 14px; right: 14px; bottom: 7px; height: 1px;
  background: linear-gradient(90deg, transparent, var(--or) 25%, var(--or) 75%, transparent);
  transform: scaleX(0); transition: transform .4s cubic-bezier(.2, .8, .2, 1);
}
.onglet::before {
  content: ""; position: absolute; left: 50%; bottom: 1px; width: 13px; height: 13px; margin-left: -6.5px;
  background: var(--engrenage) center / contain no-repeat;
  transform: scale(0) rotate(-90deg); transition: transform .45s cubic-bezier(.2, .8, .2, 1);
}
.onglet:hover { color: var(--texte); }
.onglet:hover::after { transform: scaleX(.4); }
.onglet[aria-current="page"] { color: var(--or-clair); text-shadow: 0 0 14px rgba(236, 212, 154, .25); }
.onglet[aria-current="page"]::after { transform: none; }
.onglet[aria-current="page"]::before { transform: scale(1); animation: engrene 9s linear infinite; }
@keyframes engrene { to { transform: rotate(360deg); } }
.compte {
  font-family: var(--police-technique); font-size: 12px;
  letter-spacing: .02em; text-transform: none; color: var(--texte-3);
}
.onglet[aria-current="page"] .compte { color: var(--or); }

/* ---------- Filtres ---------- */
.filtres {
  display: flex; flex-wrap: wrap; align-items: center; gap: 8px;
  max-width: 1760px; margin: 0 auto; padding: 8px 24px 16px;
}
.filtres:empty { display: none; }
.filtre { font-size: 14.5px; padding: 4px 30px 4px 11px; max-width: 230px; }
.filtre-tri { margin-right: 10px; }
.filtre.actif {
  border-color: #6b4f22; color: var(--encre); font-weight: 600;
  background: var(--chevron-sombre) right 11px center / 11px 8px no-repeat, var(--laiton);
}
.filtre.actif option { color: var(--texte); }
.etiquettes { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 12px; }
.etiquette {
  font-size: 13px; font-weight: 500; letter-spacing: .1em; text-transform: uppercase;
  padding: 2px 10px; border-radius: 3px;
  background: rgba(4, 22, 30, .5); border: 1px solid var(--trait-fort); color: var(--texte-2);
}
.etiquette-genre { cursor: pointer; transition: border-color .3s, color .3s, background .3s, box-shadow .3s; }
.etiquette-genre:hover { color: #fff; border-color: var(--lueur); background: rgba(111, 240, 220, .09); box-shadow: 0 0 12px rgba(111, 240, 220, .18); }

/* ---------- Mise en page : grille + journal de bord ---------- */
.page {
  max-width: 1760px; margin: 0 auto; padding: 30px 24px 70px;
  display: grid; grid-template-columns: minmax(0, 1fr) 340px; gap: 34px; align-items: start;
}
main { min-width: 0; }
/* Ligne de résumé façon relevé de bord tapé à la machine */
.resume {
  display: flex; align-items: center; gap: 12px;
  color: var(--texte-2); margin: 0 0 24px; font-family: var(--police-technique); font-size: 14px; letter-spacing: .02em;
}
.resume::before {
  content: ""; width: 12px; height: 12px; flex-shrink: 0;
  background: var(--engrenage) center / contain no-repeat; animation: engrene 14s linear infinite;
}
.resume::after { content: ""; flex: 1; height: 1px; background: linear-gradient(90deg, var(--trait-fort), transparent); }
.bandeau {
  position: relative; color: var(--texte);
  background: linear-gradient(90deg, rgba(111, 240, 220, .1), rgba(111, 240, 220, .02));
  border: 1px solid var(--trait); border-left: 2px solid var(--lueur);
  padding: 10px 16px 10px 38px; margin-bottom: 22px; font-size: 15px; font-style: italic;
}
/* Écho de sonar */
.bandeau::before {
  content: ""; position: absolute; left: 14px; top: 50%; width: 10px; height: 10px; margin-top: -5px; border-radius: 50%;
  background: var(--lueur); box-shadow: 0 0 0 0 rgba(111, 240, 220, .6); animation: sonar 2s ease-out infinite;
}
@keyframes sonar { to { box-shadow: 0 0 0 12px rgba(111, 240, 220, 0); } }
.vide { text-align: center; color: var(--texte-3); padding: 80px 0; font-family: var(--police-titre); font-style: italic; font-size: 19px; }
.grille { display: grid; grid-template-columns: repeat(auto-fill, minmax(165px, 1fr)); gap: 36px 24px; }

/* ---------- Pagination ---------- */
.pagination {
  position: relative; display: flex; align-items: center; justify-content: center; gap: 14px; flex-wrap: wrap;
  margin: 50px 0 0; padding-top: 30px;
}
.pagination::before {
  content: ""; position: absolute; top: 0; left: 8%; right: 8%; height: 6px; border-radius: 3px;
  background: linear-gradient(180deg, #4a3616 0%, #f0d496 30%, #c59f55 50%, #8a6a32 75%, #3a2a10 100%);
  -webkit-mask-image: linear-gradient(90deg, transparent, #000 15%, #000 85%, transparent);
  mask-image: linear-gradient(90deg, transparent, #000 15%, #000 85%, transparent);
}
.pagination::after {
  content: ""; position: absolute; top: -7px; left: 50%; width: 20px; height: 20px; margin-left: -10px;
  background: var(--engrenage) center / contain no-repeat; animation: engrene 12s linear infinite;
}
.page-numeros { display: flex; align-items: center; gap: 6px; }
.page-numero, .page-fleche {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  height: 40px; cursor: pointer; color: var(--texte-2);
  background: rgba(4, 22, 30, .6); border: 1px solid var(--trait); border-radius: 3px;
  transition: background .3s, color .3s, border-color .3s, box-shadow .3s;
}
.page-numero { min-width: 40px; padding: 0 8px; font-family: var(--police-technique); font-size: 16px; line-height: 1; }
.page-fleche { padding: 0 16px; font-size: 13.5px; font-weight: 600; letter-spacing: .16em; text-transform: uppercase; color: var(--or); border-color: var(--trait-fort); }
.page-fleche svg { width: 16px; height: 16px; }
.page-numero:hover, .page-fleche:hover:not(:disabled) {
  border-color: var(--lueur); color: #fff; background: rgba(111, 240, 220, .09); box-shadow: 0 0 14px rgba(111, 240, 220, .2);
}
.page-numero[aria-current="page"] {
  background: var(--laiton); color: var(--encre); border-color: #6b4f22; cursor: default;
  box-shadow: inset 0 1px 0 rgba(255, 250, 230, .75), 0 2px 8px rgba(0, 0, 0, .5);
}
.page-fleche:disabled { opacity: .3; cursor: default; }
.page-ellipse { color: var(--texte-3); font-family: var(--police-technique); font-size: 16px; padding: 0 2px; }
.page-numero:focus-visible, .page-fleche:focus-visible { outline: 1px solid var(--lueur); outline-offset: 3px; }

/* ---------- Cartes : affiches sous verre, dans un cadre de laiton riveté ---------- */
.carte { cursor: pointer; outline: none; min-width: 0; }
.carte.nouvelle { animation: apparition .7s cubic-bezier(.2, .75, .2, 1) both; animation-delay: calc(var(--i, 0) * 28ms); }
@keyframes apparition { from { opacity: 0; transform: translate3d(0, 18px, 0); } }
.cadre {
  position: relative; border-radius: 3px;
  transform: translate3d(0, 0, 0); will-change: transform; backface-visibility: hidden;
  transition: transform .45s cubic-bezier(.2, .8, .2, 1);
}
.carte:hover .cadre, .carte:focus-visible .cadre { transform: translate3d(0, -6px, 0); }
/* Cadre allumé et lueur du survol : une couche dont seule l'opacité change */
.cadre::before {
  content: ""; position: absolute; inset: 0; border-radius: 3px; pointer-events: none;
  box-shadow: 0 0 0 2px #8a6a32, 0 0 0 3px #f2d898, 0 0 0 4px #5a4220, 0 0 30px rgba(111, 240, 220, .22), 0 26px 42px rgba(0, 0, 0, .8);
  opacity: 0; transition: opacity .45s;
}
.carte:hover .cadre::before, .carte:focus-visible .cadre::before { opacity: 1; }
.visuel {
  position: relative; aspect-ratio: 2 / 3; border-radius: 3px; overflow: hidden;
  background: var(--bois-2); container-type: inline-size;
  box-shadow: 0 0 0 2px #6e5426, 0 0 0 3px #d9b874, 0 0 0 4px #4a3616, 0 16px 30px rgba(0, 0, 0, .7);
}
.visuel img {
  width: 100%; height: 100%; object-fit: cover; display: block;
  transform: translate3d(0, 0, 0) scale(1); will-change: transform; backface-visibility: hidden;
  transition: transform .7s cubic-bezier(.2, .8, .2, 1);
}
.carte:hover .visuel img { transform: translate3d(0, 0, 0) scale(1.04); }
/* Reflet sur le verre, qui glisse au survol */
.visuel::before {
  content: ""; position: absolute; inset: 0; z-index: 1; pointer-events: none;
  background: linear-gradient(115deg, transparent 38%, rgba(200, 255, 245, .13) 48%, transparent 58%);
  transform: translate3d(-120%, 0, 0); will-change: transform;
}
.carte:hover .visuel::before { transform: translate3d(120%, 0, 0); transition: transform 1.2s ease; }
/* Rivets aux quatre coins et léger vignetage */
.visuel::after {
  content: ""; position: absolute; inset: 0; z-index: 1; pointer-events: none;
  background:
    var(--rivet) top 4px left 4px / 8px 8px no-repeat,
    var(--rivet) top 4px right 4px / 8px 8px no-repeat,
    var(--rivet) bottom 4px left 4px / 8px 8px no-repeat,
    var(--rivet) bottom 4px right 4px / 8px 8px no-repeat,
    linear-gradient(135deg, rgba(220, 255, 250, .1) 0%, rgba(220, 255, 250, .03) 22%, transparent 34%);
  box-shadow: inset 0 0 26px rgba(0, 10, 16, .55), inset 0 0 0 1px rgba(0, 0, 0, .5);
}
.substitut {
  --teinte: 30;
  width: 100%; height: 100%; display: flex; align-items: flex-end; padding: 16px;
  background:
    radial-gradient(120% 80% at 100% 0%, hsl(calc(180 + var(--teinte) / 12) 45% 22% / .8), transparent 65%),
    linear-gradient(170deg, #0a2530, #030f15);
}
.substitut span { font-family: var(--police-titre); font-weight: 600; font-size: 17px; line-height: 1.2; color: var(--or-clair); overflow-wrap: anywhere; text-shadow: 0 2px 6px #000; }
/* Étiquette de malle (nombre d'épisodes) */
.pastille {
  position: absolute; top: 9px; left: 9px; z-index: 2;
  font-family: var(--police-technique); font-size: 12px; letter-spacing: .04em;
  background: var(--parchemin); color: var(--encre);
  padding: 1px 8px 0; border-radius: 2px; box-shadow: 0 2px 6px rgba(0, 0, 0, .6);
}
/* Plaque de laiton rivetée : année de sortie */
.annee-carte {
  position: absolute; top: 9px; right: 9px; z-index: 2;
  padding: 2px 13px 1px; border-radius: 2px;
  font-family: var(--police-technique); font-size: 14px; line-height: 18px; letter-spacing: .04em;
  color: var(--encre);
  background:
    var(--rivet) left 3px center / 5px 5px no-repeat,
    var(--rivet) right 3px center / 5px 5px no-repeat,
    var(--laiton);
  border: 1px solid #5a4220;
  box-shadow: inset 0 1px 0 rgba(255, 250, 230, .7), 0 2px 8px rgba(0, 0, 0, .6);
}
.actions-carte {
  position: absolute; inset: auto 0 0 0; z-index: 2; display: flex; gap: 6px; padding: 60px 10px 10px;
  background: linear-gradient(180deg, transparent, rgba(2, 14, 20, .72) 40%, rgba(2, 14, 20, .96));
  opacity: 0; transform: translateY(10px); transition: opacity .3s, transform .45s cubic-bezier(.2, .8, .2, 1);
}
.actions-carte .btn { min-width: 0; height: 34px; padding: 0 12px; font-size: 13px; letter-spacing: .12em; }
.actions-carte .btn-principal { flex: 1 1 auto; }
.actions-carte .btn-danger { flex: none; width: 34px; padding: 0; }
.actions-carte .btn.btn-icone { flex: none; width: 34px; padding: 0; }
.actions-carte .btn-discret { flex: 1 1 auto; background: rgba(2, 14, 20, .8); }
.carte:hover .actions-carte, .carte:focus-within .actions-carte { opacity: 1; transform: none; }
@media (hover: none) { .actions-carte { opacity: 1; transform: none; } }
/* Affiche étroite : l'icône seule plutôt qu'un libellé coupé */
@container (max-width: 199px) { .actions-carte .btn span { display: none; } }

.infos { padding: 13px 2px 0; }
.infos h3 {
  margin: 0; font-family: var(--police-titre); font-size: 16.5px; font-weight: 600; line-height: 1.22; color: var(--texte);
  display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden;
  transition: color .3s;
}
.carte:hover .infos h3 { color: var(--or-clair); }
.meta { margin: 4px 0 0; color: var(--texte-2); font-size: 14.5px; }
/* Genres sous la carte : un clic filtre la grille */
.genres-carte { display: flex; flex-wrap: wrap; gap: 4px; margin: 7px 0 0; }
.genre-carte {
  padding: 0 7px; cursor: pointer; border-radius: 3px;
  font-size: 11.5px; font-weight: 500; line-height: 19px; letter-spacing: .1em; text-transform: uppercase;
  color: var(--texte-2); background: rgba(4, 22, 30, .5); border: 1px solid var(--trait);
  transition: border-color .3s, color .3s, background .3s, box-shadow .3s;
}
.genre-carte:hover { border-color: var(--lueur); color: #fff; background: rgba(111, 240, 220, .09); box-shadow: 0 0 10px rgba(111, 240, 220, .18); }
.genre-carte:focus-visible { outline: 1px solid var(--lueur); outline-offset: 2px; }

/* ---------- Journal de bord : tableaux d'instruments rivetés ---------- */
/* La colonne défile avec la page : une seule barre de défilement */
.livre { padding: 4px 4px 12px; margin: -4px -4px 0; }
.livre-entete { display: flex; align-items: center; gap: 11px; margin: 0 0 18px; color: var(--or); }
.livre-entete svg { width: 22px; height: 22px; stroke-width: 1.4; }
.livre-entete h2 {
  margin: 0; flex: 1; font-family: var(--police-marque); font-weight: 700; font-size: 19px; line-height: 1;
  letter-spacing: .06em; color: var(--or-clair); padding-top: 2px;
}
.livre-corps { display: flex; flex-direction: column; gap: 22px; counter-reset: panneau; }
.livre-attente { color: var(--texte-3); font-style: italic; }

.panneau {
  position: relative; color: var(--texte);
  padding: 20px 20px 18px;
  background:
    var(--rivets),
    var(--metal),
    linear-gradient(165deg, rgba(255, 255, 255, .06), transparent 28%),
    linear-gradient(180deg, rgba(8, 28, 36, .94), rgba(3, 13, 19, .97));
  border: 2px solid #6e5426;
  box-shadow: inset 0 0 0 1px rgba(242, 216, 152, .35), inset 0 0 30px rgba(0, 0, 0, .35), 0 16px 32px rgba(0, 0, 0, .5);
  border-radius: 4px;
}
.panneau-titre {
  margin: 0; font-family: var(--police-titre); font-weight: 600; font-size: 18.5px; line-height: 1.2; color: var(--texte);
}
.panneau-titre::before {
  counter-increment: panneau; content: counter(panneau, upper-roman) ". ";
  font-family: var(--police-marque); font-weight: 700; color: var(--or);
}
.panneau-sous { margin: 4px 0 12px; font-size: 14.5px; font-style: italic; color: var(--texte-3); line-height: 1.35; }
.panneau-vide { margin: 6px 0; font-size: 14.5px; font-style: italic; color: var(--texte-3); }

.liste-livre { list-style: none; margin: 6px 0 0; padding: 0; }
.liste-livre li + li { border-top: 1px solid rgba(201, 164, 90, .12); }
.ligne-livre {
  display: flex; align-items: center; gap: 11px; width: 100%; text-align: left;
  padding: 6px 6px; background: none; border: 0; cursor: pointer; color: var(--texte); border-radius: 3px;
  transition: background .3s, box-shadow .3s;
}
.ligne-livre:hover { background: linear-gradient(90deg, rgba(111, 240, 220, .1), transparent 90%); box-shadow: inset 2px 0 0 var(--lueur); }
.ligne-livre:hover .ligne-titre { color: var(--or-clair); }
.ligne-livre:hover .miniature { box-shadow: 0 0 0 1px var(--or-clair), 0 0 12px rgba(111, 240, 220, .3), 0 3px 8px rgba(0, 0, 0, .6); }
.rang { width: 22px; flex-shrink: 0; text-align: center; font-family: var(--police-titre); font-style: italic; font-weight: 600; font-size: 19px; line-height: 1; color: var(--or); }
.miniature {
  --teinte: 30;
  position: relative; flex-shrink: 0; width: 38px; aspect-ratio: 2 / 3; border-radius: 2px; overflow: hidden;
  background: linear-gradient(160deg, hsl(calc(180 + var(--teinte) / 12) 40% 20%), #04121a);
  box-shadow: 0 0 0 1px var(--trait-fort), 0 3px 8px rgba(0, 0, 0, .6);
  transition: box-shadow .3s, transform .45s cubic-bezier(.2, .8, .2, 1);
}
.miniature img { width: 100%; height: 100%; object-fit: cover; display: block; }
.miniature-grande { width: 88px; box-shadow: 0 0 0 2px #6e5426, 0 0 0 3px #d9b874, 0 10px 20px rgba(0, 0, 0, .6); }
.ligne-texte { display: flex; flex-direction: column; min-width: 0; gap: 1px; }
.ligne-titre { font-weight: 500; font-size: 15.5px; line-height: 1.25; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; transition: color .3s; }
.ligne-meta { font-size: 14px; color: var(--texte-3); }

.bouteille {
  display: flex; gap: 15px; align-items: center; width: 100%; text-align: left;
  background: none; border: 0; padding: 4px; cursor: pointer; color: var(--texte);
}
.bouteille:hover .miniature-grande { transform: translateY(-3px) rotate(-1.5deg); box-shadow: 0 0 0 2px #8a6a32, 0 0 0 3px #f2d898, 0 0 24px rgba(111, 240, 220, .3), 0 14px 22px rgba(0, 0, 0, .7); }
.bouteille:hover .bouteille-titre { color: var(--or-clair); }
.bouteille-titre { font-family: var(--police-titre); font-weight: 600; font-size: 19px; line-height: 1.15; margin-bottom: 5px; transition: color .3s; }
.btn-encre, .lien-encre { background: none; border: 0; cursor: pointer; padding: 0; color: var(--or); }
.btn-encre {
  display: flex; align-items: center; justify-content: center; gap: 8px; width: 100%;
  margin-top: 14px; padding: 7px; font-size: 13px; font-weight: 600; letter-spacing: .14em; text-transform: uppercase;
  border: 1px solid var(--trait-fort); border-radius: 3px; transition: background .3s, color .3s, border-color .3s, box-shadow .3s;
}
.btn-encre svg { width: 15px; height: 15px; }
.btn-encre:hover { border-color: var(--lueur); background: rgba(111, 240, 220, .09); color: #fff; box-shadow: 0 0 14px rgba(111, 240, 220, .2); }
.lien-encre { text-decoration: underline; text-decoration-color: var(--trait-fort); text-underline-offset: 3px; text-align: left; font-size: inherit; font-style: italic; transition: color .3s; }
.lien-encre:hover { color: var(--or-clair); text-decoration-color: var(--or); }

.bascule { display: flex; margin: 8px 0 6px; border: 1px solid var(--trait-fort); border-radius: 3px; width: max-content; overflow: hidden; }
.bascule button {
  background: none; border: 0; padding: 3px 18px; cursor: pointer; color: var(--texte-2);
  font-size: 13px; font-weight: 600; letter-spacing: .14em; text-transform: uppercase;
  transition: background .3s, color .3s;
}
.bascule button + button { border-left: 1px solid var(--trait-fort); }
.bascule button:hover { color: #fff; background: rgba(111, 240, 220, .09); }
.bascule button[aria-pressed="true"] { background: var(--laiton); color: var(--encre); }

/* Choix de l'année : une seule barre, flèches et année au même gabarit */
.nav-annee {
  display: grid; grid-template-columns: 38px 1fr 38px; align-items: stretch; height: 42px; margin: 10px 0 4px;
  border: 1px solid var(--trait-fort); border-radius: 3px; background: rgba(2, 14, 20, .55);
  box-shadow: inset 0 2px 6px rgba(0, 0, 0, .4);
  transition: border-color .3s, box-shadow .3s;
}
.nav-annee:hover { border-color: var(--lueur); box-shadow: inset 0 2px 6px rgba(0, 0, 0, .4), 0 0 12px rgba(111, 240, 220, .15); }
.nav-annee select {
  min-width: 0; height: 100%; text-align: center; text-align-last: center;
  font-family: var(--police-technique); font-size: 21px; line-height: 1; letter-spacing: .1em; color: var(--or-clair);
  background: var(--chevron) right 12px center / 10px 7px no-repeat, transparent;
  border: 0; border-left: 1px solid var(--trait); border-right: 1px solid var(--trait); border-radius: 0;
  padding: 0 26px 0 14px;
}
.nav-annee select:hover { box-shadow: none; background-color: rgba(111, 240, 220, .06); }
.nav-annee select option { font-size: 16px; text-align: left; }
.nav-fleche {
  display: grid; place-items: center; padding: 0; border: 0; cursor: pointer;
  background: none; color: var(--or); transition: background .3s, color .3s;
}
.nav-fleche svg { width: 17px; height: 17px; stroke-width: 1.8; }
.nav-fleche:hover:not(:disabled) { background: var(--laiton); color: var(--encre); }
.nav-fleche:disabled { color: var(--texte-3); opacity: .35; cursor: default; }
.nav-fleche:focus-visible { outline-offset: -3px; }
.groupe-annee h4 {
  margin: 14px 0 0; padding-bottom: 3px; font-weight: 600; font-size: 12.5px;
  letter-spacing: .2em; text-transform: uppercase; color: var(--texte-2); border-bottom: 1px solid var(--trait);
}

.puces { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 6px; }
.puce {
  display: inline-flex; align-items: baseline; gap: 6px; cursor: pointer;
  padding: 2px 10px; font-size: 14.5px; color: var(--texte); border-radius: 3px;
  background: rgba(2, 14, 20, .45); border: 1px solid var(--trait); transition: border-color .3s, color .3s, background .3s, box-shadow .3s;
}
.puce span { font-family: var(--police-technique); font-size: 11.5px; color: var(--texte-3); }
.puce:hover { border-color: var(--lueur); color: #fff; background: rgba(111, 240, 220, .09); box-shadow: 0 0 10px rgba(111, 240, 220, .16); }
.puce[aria-pressed="true"] { background: var(--laiton); border-color: #6b4f22; color: var(--encre); }
.puce[aria-pressed="true"] span { color: #5b4220; }

/* Statistiques : petits cadrans de bord */
.stats { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; margin: 14px 0 0; }
.stat:last-child:nth-child(odd) { grid-column: span 2; }
.stat {
  padding: 10px 6px 8px; text-align: center; border-radius: 3px;
  border: 1px solid var(--trait); background: radial-gradient(ellipse at 50% 0%, rgba(111, 240, 220, .07), rgba(2, 14, 20, .5) 70%);
  box-shadow: inset 0 2px 8px rgba(0, 0, 0, .45);
}
.stat dt { font-family: var(--police-technique); font-size: 22px; line-height: 1.1; color: var(--or-clair); text-shadow: 0 0 12px rgba(111, 240, 220, .25); }
.stat dd { margin: 4px 0 0; font-size: 11.5px; letter-spacing: .18em; text-transform: uppercase; color: var(--texte-3); }

.voile { display: none; }

/* ---------- Dialogues : le grand salon, équerres de laiton rivetées ---------- */
.dialogue {
  color: var(--texte); border: 2px solid #6e5426; border-radius: 4px; padding: 36px;
  background:
    var(--equerres),
    radial-gradient(ellipse 80% 50% at 100% 0%, rgba(111, 240, 220, .06), transparent 70%),
    var(--metal),
    linear-gradient(165deg, rgba(255, 255, 255, .05), transparent 25%),
    linear-gradient(180deg, #0a2029, #030f15);
  box-shadow: inset 0 0 0 1px rgba(242, 216, 152, .3), 0 0 0 1px rgba(0, 0, 0, .6), 0 40px 80px rgba(0, 0, 0, .85);
  width: calc(100% - 40px); max-height: 88vh; overflow-y: auto;
}
.dialogue[open] { animation: ouverture .4s cubic-bezier(.2, .8, .2, 1); }
@keyframes ouverture { from { opacity: 0; transform: translateY(14px) scale(.98); } }
.dialogue::backdrop { background: radial-gradient(ellipse at center, rgba(2, 16, 22, .7), rgba(0, 5, 8, .94)); backdrop-filter: blur(4px); }
.dialogue-large { max-width: 920px; }
.dialogue-petit { max-width: 470px; }
.dialogue h2 {
  margin: 0 0 8px; font-family: var(--police-titre); font-weight: 600; font-size: 32px; line-height: 1.1;
  color: var(--texte);
}
.dialogue-petit h2 { font-size: 23px; padding-right: 0; }
.dialogue-petit p { color: var(--texte-2); margin: 0 0 22px; overflow-wrap: anywhere; }
.boutons { display: flex; flex-wrap: wrap; gap: 8px; justify-content: flex-end; }
.fiche-texte .boutons { justify-content: flex-start; margin-top: 22px; }
/* Bouton de fermeture en forme de hublot */
.fermer {
  position: sticky; float: right; top: 0; margin: -14px -14px 0 8px; z-index: 4;
  width: 38px; height: 38px; cursor: pointer; display: inline-flex; align-items: center; justify-content: center;
  font-family: var(--police-titre); font-size: 24px; line-height: 1; color: var(--or-clair); padding: 0 0 3px;
  border: 0; border-radius: 50%;
  background: radial-gradient(circle at 45% 35%, rgba(111, 240, 220, .18), rgba(2, 14, 20, .95) 62%);
  box-shadow: 0 0 0 2px #6e5426, 0 0 0 4px #e3c47f, 0 0 0 5px #4a3616, 0 4px 10px rgba(0, 0, 0, .6);
  transition: background .3s, color .3s, box-shadow .3s, transform .5s cubic-bezier(.2, .8, .2, 1);
}
.fermer:hover {
  color: #fff; transform: rotate(90deg);
  background: radial-gradient(circle at 45% 35%, rgba(111, 240, 220, .45), rgba(4, 40, 48, .95) 65%);
  box-shadow: 0 0 0 2px #8a6a32, 0 0 0 4px #f6dfa4, 0 0 0 5px #5a4220, 0 0 18px rgba(111, 240, 220, .35);
}
.chargement { color: var(--texte-2); padding: 30px 0; text-align: center; font-family: var(--police-technique); font-size: 14px; }

.fiche-entete { display: grid; grid-template-columns: 200px 1fr; gap: 32px; margin-bottom: 8px; }
.fiche-entete .visuel { box-shadow: 0 0 0 2px #6e5426, 0 0 0 4px #e3c47f, 0 0 0 5px #4a3616, 0 0 30px rgba(111, 240, 220, .12), 0 18px 34px rgba(0, 0, 0, .7); }
.fiche-entete h2 { padding-right: 30px; }
.fichier-source { color: var(--texte-3); font-size: 14px; font-style: italic; margin: 8px 0 0; }
/* Résumé avec lettrine, comme dans les éditions Hetzel */
.synopsis {
  margin: 18px 0 0; padding: 4px 0 4px 18px; font-size: 17px; line-height: 1.6; color: var(--texte-2);
  border-left: 1px solid var(--trait-fort);
}
.synopsis::first-letter {
  float: left; font-family: var(--police-marque); font-weight: 700; font-size: 3.1em; line-height: .85;
  padding: 6px 8px 0 0; color: var(--or);
}

.saison { margin-top: 28px; }
.saison-entete { display: flex; align-items: baseline; gap: 10px; flex-wrap: wrap; margin-bottom: 6px; }
.saison-entete h3 { margin: 0; font-family: var(--police-titre); font-weight: 600; font-size: 20px; color: var(--or-clair); }
.saison-entete .btn { margin-left: auto; align-self: center; }

.liste-fichiers { list-style: none; margin: 12px 0 0; padding: 0; border-top: 1px solid var(--trait-fort); }
.liste-fichiers li { display: flex; align-items: center; gap: 10px; padding: 9px 4px; border-bottom: 1px solid var(--trait); transition: background .3s; }
.liste-fichiers li:hover { background: rgba(111, 240, 220, .05); }
.fichier-infos { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.fichier-titre { font-weight: 500; font-size: 16px; overflow-wrap: anywhere; }
.fichier-nom { color: var(--texte-3); font-size: 13.5px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.fichier-taille { color: var(--texte-2); font-family: var(--police-technique); font-size: 13px; white-space: nowrap; }

/* ---------- Doublons ---------- */
.aide { color: var(--texte-3); font-size: 15px; font-style: italic; margin: 8px 0 0; max-width: 660px; }
.doublons-section > h3 {
  margin: 30px 0 4px; padding-bottom: 6px; font-family: var(--police-marque); font-weight: 700; font-size: 17px;
  letter-spacing: .05em; color: var(--or); border-bottom: 1px solid var(--trait-fort);
}
.doublon { margin-top: 18px; }
.doublon-entete { display: flex; align-items: center; gap: 12px; }
.doublon-entete h4 { margin: 0; font-family: var(--police-titre); font-weight: 600; font-size: 17px; line-height: 1.2; }
.doublon .liste-fichiers { margin-top: 8px; }
.copie-gardee .fichier-titre { color: var(--or-clair); }
.alerte { color: var(--sang-clair); font-size: 14px; font-style: italic; }
.alerte::before { content: "⚠ "; font-style: normal; }
.garder {
  font-family: var(--police-technique); font-size: 12px; letter-spacing: .04em; white-space: nowrap;
  padding: 1px 8px; color: var(--encre); background: var(--parchemin); border-radius: 2px;
}
.doublon-entete .ligne-texte { flex: 1; }
.pas-doublon { flex-shrink: 0; }

/* ---------- Correction de la fiche TMDB ---------- */
.correction {
  margin: 24px 0 6px; padding: 20px 20px 18px; border-radius: 4px;
  background: var(--rivets), rgba(2, 14, 20, .5);
  border: 2px solid #6e5426; box-shadow: inset 0 0 0 1px rgba(242, 216, 152, .3);
  animation: ouverture .35s ease-out;
}
.correction h3 { margin: 0; font-family: var(--police-titre); font-weight: 600; font-size: 18.5px; color: var(--or-clair); }
.recherche-tmdb { display: flex; flex-wrap: wrap; gap: 8px; margin: 12px 0 10px; }
.recherche-tmdb input {
  flex: 1 1 220px; min-width: 0; padding: 6px 11px; font-size: 16px;
  background: rgba(2, 14, 20, .7); border: 1px solid var(--trait-fort); border-radius: 3px;
  box-shadow: inset 0 2px 6px rgba(0, 0, 0, .4);
}
.recherche-tmdb input:focus { border-color: var(--lueur); outline: none; box-shadow: inset 0 2px 6px rgba(0, 0, 0, .4), 0 0 14px rgba(111, 240, 220, .2); }
.recherche-tmdb .champ-annee { flex: 0 0 92px; }
.resultats-tmdb { display: grid; gap: 6px; max-height: 420px; overflow-y: auto; padding-right: 4px; }
.resultat-tmdb {
  display: flex; align-items: center; gap: 12px; width: 100%; text-align: left; cursor: pointer;
  padding: 7px 10px 7px 7px; color: var(--texte); border-radius: 3px;
  background: rgba(2, 14, 20, .4); border: 1px solid var(--trait); transition: border-color .3s, background .3s, box-shadow .3s;
}
.resultat-tmdb:hover, .resultat-tmdb:focus-visible { border-color: var(--lueur); background: rgba(111, 240, 220, .06); box-shadow: 0 0 14px rgba(111, 240, 220, .14); outline: none; }
.resultat-tmdb .miniature { width: 46px; }
.resultat-tmdb .ligne-texte { flex: 1; }
.resultat-resume { font-size: 13.5px; color: var(--texte-3); display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; margin-top: 2px; }
.resultat-choisir {
  flex-shrink: 0; font-size: 12px; font-weight: 600; letter-spacing: .14em; text-transform: uppercase;
  color: var(--or); border: 1px solid var(--trait-fort); border-radius: 3px; padding: 2px 10px; transition: background .3s, color .3s;
}
.resultat-tmdb:hover .resultat-choisir { background: var(--laiton); color: var(--encre); }
/* Choix d'une saison : retour aux résultats, puis la série entière mise en avant */
.saisons-entete { display: flex; align-items: center; gap: 14px; margin-bottom: 4px; }
.saisons-entete .aide { margin: 0; }
.saisons-entete .btn { flex-shrink: 0; }
.resultat-serie { border-color: var(--trait-fort); background: rgba(201, 164, 90, .07); }
.lien-retirer { width: auto; margin-top: 12px; padding: 5px 12px; color: var(--texte-2); border-color: var(--trait); }
.lien-retirer:hover { border-color: rgba(194, 122, 69, .85); background: rgba(138, 58, 34, .3); color: var(--sang-clair); box-shadow: none; }

.corbeille-entete { display: flex; align-items: flex-start; justify-content: space-between; gap: 16px; flex-wrap: wrap; padding-right: 30px; }

/* ---------- Notifications : télégrammes du bord ---------- */
.toasts { position: fixed; bottom: 22px; left: 50%; transform: translateX(-50%); display: flex; flex-direction: column; gap: 8px; z-index: 100; width: max-content; max-width: calc(100% - 32px); }
.toast {
  color: var(--texte); font-size: 15.5px; border-radius: 3px;
  background: linear-gradient(90deg, rgba(9, 30, 38, .98), rgba(3, 14, 20, .98));
  border: 1px solid var(--trait-fort); border-left: 3px solid var(--lueur);
  padding: 10px 18px; box-shadow: var(--ombre), 0 0 20px rgba(111, 240, 220, .12);
  animation: entre .3s ease-out; transition: opacity .4s, transform .4s;
}
.toast-succes { border-left-color: var(--or-clair); }
.toast-erreur { border-left-color: var(--sang-vif); }
.toast.sortie { opacity: 0; transform: translateY(8px); }
@keyframes entre { from { opacity: 0; transform: translateY(10px); } }

/* ---------- Connexion : le sas d'entrée ---------- */
.page-connexion { display: grid; place-items: center; padding: 16px; }
.carte-connexion {
  position: relative; width: 100%; max-width: 420px; padding: 44px 38px 40px; border-radius: 4px;
  background:
    var(--equerres),
    radial-gradient(ellipse 90% 60% at 50% 0%, rgba(111, 240, 220, .1), transparent 70%),
    var(--metal),
    linear-gradient(165deg, rgba(255, 255, 255, .05), transparent 25%),
    linear-gradient(180deg, rgba(9, 30, 38, .96), rgba(3, 13, 19, .98));
  border: 2px solid #6e5426;
  box-shadow: inset 0 0 0 1px rgba(242, 216, 152, .3), 0 40px 80px rgba(0, 0, 0, .8);
  display: flex; flex-direction: column; gap: 10px;
  animation: ouverture .7s cubic-bezier(.2, .8, .2, 1);
}
/* Le logo dans un hublot */
.carte-connexion .embleme { width: 168px; height: 168px; margin: -104px auto 2px; }
.page-connexion { padding-top: 110px; }
.carte-connexion .marque-nom { font-size: 34px; text-align: center; margin: 0 -.12em 0 0; line-height: 1.15; }
.sous-titre { text-align: center; color: var(--texte-3); margin: 2px 0 20px; font-family: var(--police-titre); font-style: italic; font-size: 16px; }
.carte-connexion label { font-size: 12.5px; font-weight: 600; letter-spacing: .18em; text-transform: uppercase; color: var(--or); }
.carte-connexion input {
  padding: 10px 12px; font-size: 17px; letter-spacing: .1em;
  background: rgba(2, 14, 20, .75); border: 1px solid var(--trait-fort); border-radius: 3px;
  box-shadow: inset 0 2px 6px rgba(0, 0, 0, .45);
}
.carte-connexion input:focus { border-color: var(--lueur); box-shadow: inset 0 2px 6px rgba(0, 0, 0, .45), 0 0 16px rgba(111, 240, 220, .22); outline: none; }
.carte-connexion .btn { margin-top: 12px; }
.erreur { color: var(--sang-clair); margin: 0; font-size: 15px; font-style: italic; }

/* ---------- Équipage : accès Internet, invités, journal des connexions ---------- */
.etat-internet { font-weight: 600; font-size: 16px; }
.etat-internet::before { content: ""; display: inline-block; width: 10px; height: 10px; margin-right: 9px; border-radius: 50%; vertical-align: 1px; }
.etat-internet.ouvert::before { background: var(--lueur); box-shadow: 0 0 10px var(--lueur); }
.etat-internet.ferme::before { background: var(--sang-vif); box-shadow: 0 0 10px var(--sang-vif); }
.ligne-invite { display: block; }
.ligne-invite .doublon-entete { gap: 10px; }
.ligne-invite form { margin: 4px 0 6px; }
.titre-ajout { margin: 18px 0 0; font-weight: 600; font-size: 12.5px; letter-spacing: .2em; text-transform: uppercase; color: var(--texte-2); }
.form-invite .recherche-tmdb { margin-bottom: 4px; }
.form-invite input[readonly] { opacity: .7; flex: 0 1 160px; }
.journal-defile { max-height: 380px; overflow: auto; margin-top: 10px; border: 1px solid var(--trait); border-radius: 3px; }
.journal { width: 100%; border-collapse: collapse; font-size: 14px; }
.journal th, .journal td { padding: 6px 10px; text-align: left; border-bottom: 1px solid var(--trait); white-space: nowrap; }
.journal th { position: sticky; top: 0; background: #0a2029; font-weight: 600; font-size: 12px; letter-spacing: .14em; text-transform: uppercase; color: var(--texte-2); }
.journal td.ip { font-family: var(--police-technique); font-size: 13px; color: var(--texte-2); }
.journal tr.echec td { color: var(--texte-3); }
.journal tr.echec-internet td { color: var(--sang-clair); }

/* ---------- Lecteur vidéo : plein écran noir, commandes de laiton qui s'effacent pendant la lecture ---------- */
.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::backdrop { background: #000; }
.lecteur-scene { position: relative; width: 100%; height: 100%; background: #000; overflow: hidden; }
.lecteur-scene:not(.commandes-visibles) { cursor: none; }
.lecteur video { width: 100%; height: 100%; display: block; object-fit: contain; background: #000; }
.lecteur-haut, .lecteur-commandes {
  position: absolute; left: 0; right: 0; z-index: 2;
  transition: opacity .35s, transform .35s cubic-bezier(.2, .8, .2, 1);
}
.lecteur-scene:not(.commandes-visibles) .lecteur-haut,
.lecteur-scene:not(.commandes-visibles) .lecteur-commandes { opacity: 0; pointer-events: none; }
.lecteur-scene:not(.commandes-visibles) .lecteur-commandes { transform: translateY(10px); }
.lecteur-haut {
  top: 0; display: flex; align-items: center; gap: 16px; padding: 18px 24px 40px;
  background: linear-gradient(180deg, rgba(0, 0, 0, .8), transparent);
}
.lecteur-titre { flex: 1; margin: 0; font-family: var(--police-titre); font-weight: 600; font-size: 21px; line-height: 1.2; color: var(--or-clair); text-shadow: 0 2px 6px #000; }
.lecteur-haut .fermer { position: relative; float: none; margin: 0 6px 0 0; flex-shrink: 0; }
.lecteur-commandes {
  bottom: 0; padding: 50px 24px 18px;
  background: linear-gradient(0deg, rgba(0, 0, 0, .88), rgba(0, 0, 0, .55) 55%, transparent);
}
/* Barre de progression : rail sombre, partie lue en laiton, curseur en forme de rivet */
.lecteur-barre, .lecteur-volume {
  --avance: 0%;
  -webkit-appearance: none; appearance: none; display: block; height: 6px; margin: 0; cursor: pointer; border-radius: 3px;
  background: linear-gradient(90deg, #e3c47f, #b48b49) 0 0 / var(--avance) 100% no-repeat, rgba(255, 255, 255, .2);
  transition: height .2s;
}
.lecteur-barre { width: 100%; }
.lecteur-barre:hover { height: 9px; }
.lecteur-barre::-webkit-slider-thumb, .lecteur-volume::-webkit-slider-thumb {
  -webkit-appearance: none; appearance: none; width: 16px; height: 16px; border-radius: 50%; border: 0;
  background: radial-gradient(circle at 38% 34%, #fffbe8 0, #f0d796 18%, #c39a52 45%, #7d5a24 80%);
  box-shadow: 0 0 0 1px #3d2c12, 0 2px 6px rgba(0, 0, 0, .7);
}
.lecteur-barre::-moz-range-thumb, .lecteur-volume::-moz-range-thumb {
  width: 16px; height: 16px; border-radius: 50%; border: 0;
  background: radial-gradient(circle at 38% 34%, #fffbe8 0, #f0d796 18%, #c39a52 45%, #7d5a24 80%);
}
.lecteur-barre:focus-visible, .lecteur-volume:focus-visible { outline: 1px solid var(--lueur); outline-offset: 4px; }
.lecteur-ligne { display: flex; align-items: center; gap: 8px; margin-top: 12px; }
.lecteur-bouton {
  display: grid; place-items: center; width: 42px; height: 42px; padding: 0; border: 0; border-radius: 50%; cursor: pointer;
  background: transparent; color: var(--or-clair); transition: background .25s, color .25s, transform .15s;
}
.lecteur-bouton svg { width: 24px; height: 24px; }
.lecteur-bouton:hover { background: rgba(255, 255, 255, .1); color: #fff; }
.lecteur-bouton:active { transform: scale(.94); }
.lecteur-bouton:focus-visible { outline: 1px solid var(--lueur); outline-offset: 2px; }
.lecteur-lire {
  width: 52px; height: 52px; color: var(--encre);
  background: var(--laiton); box-shadow: inset 0 1px 0 rgba(255, 250, 230, .75), 0 0 0 1px #5a4220, 0 3px 10px rgba(0, 0, 0, .6);
}
.lecteur-lire:hover { background: var(--laiton-vif); color: var(--encre); }
.lecteur-lire .icone-pause, .lecteur-lire.en-lecture .icone-lire { display: none; }
.lecteur-lire.en-lecture .icone-pause { display: block; }
.lecteur-son .barre-muet, .lecteur-son.muet .onde { display: none; }
.lecteur-son.muet .barre-muet { display: inline; }
.lecteur-temps { margin-left: 6px; font-family: var(--police-technique); font-size: 15px; color: var(--texte); white-space: nowrap; }
.lecteur-espace { flex: 1; }
.lecteur-volume { width: 96px; }
.lecteur-choix { max-width: 220px; font-size: 14px; padding: 5px 30px 5px 10px; background-color: rgba(0, 0, 0, .55); }
/* Sous-titres, au-dessus des commandes quand elles sont affichées */
.lecteur-soustitre {
  position: absolute; left: 50%; bottom: 7%; z-index: 1; transform: translateX(-50%);
  max-width: min(86%, 1100px); padding: .12em .55em; border-radius: 4px; text-align: center; white-space: pre-line;
  font-family: var(--police); font-weight: 600; font-size: clamp(17px, 2.6vw, 34px); line-height: 1.3; color: #fff;
  background: rgba(0, 0, 0, .5); text-shadow: 0 2px 3px #000, 0 0 2px #000;
  transition: bottom .35s cubic-bezier(.2, .8, .2, 1);
}
.commandes-visibles .lecteur-soustitre { bottom: 150px; }
.lecteur-attente, .lecteur-message, .lecteur-reprise {
  position: absolute; left: 50%; top: 50%; z-index: 3; transform: translate(-50%, -50%); text-align: center;
}
.lecteur-attente { display: flex; flex-direction: column; align-items: center; gap: 14px; font-family: var(--police-technique); font-size: 15px; color: var(--texte-2); pointer-events: none; }
.lecteur-engrenage { width: 54px; height: 54px; background: var(--engrenage) center / contain no-repeat; animation: engrene 2.4s linear infinite; }
.lecteur-message {
  max-width: min(90%, 460px); padding: 22px 26px; border-radius: 4px; line-height: 1.6;
  background: rgba(4, 18, 25, .92); border: 1px solid var(--trait-fort); font-size: 17px;
}
.lecteur-message .btn { margin-top: 14px; }
/* Gros bouton de lancement, quand le navigateur refuse la lecture automatique */
.lecteur-lancer {
  position: absolute; left: 50%; top: 50%; z-index: 4; transform: translate(-50%, -50%);
  width: 92px; height: 92px; border: 0; border-radius: 50%; cursor: pointer; color: var(--encre);
  display: grid; place-items: center; background: var(--laiton);
  box-shadow: inset 0 2px 0 rgba(255, 250, 230, .75), 0 0 0 2px #5a4220, 0 8px 30px rgba(0, 0, 0, .7);
}
.lecteur-lancer svg { width: 44px; height: 44px; margin-left: 6px; }
.lecteur-lancer:hover { background: var(--laiton-vif); }
.lecteur-reprise { display: flex; gap: 12px; flex-wrap: wrap; justify-content: center; }
.lecteur-reprise .btn { font-size: 15px; padding: 11px 20px; }
@media (max-width: 760px), (hover: none) {
  .lecteur-volume { display: none; }
}
@media (max-width: 760px) {
  .lecteur-haut { padding: 12px 14px 30px; }
  .lecteur-titre { font-size: 17px; }
  .lecteur-commandes { padding: 40px 12px 12px; }
  .lecteur-ligne { gap: 4px; flex-wrap: wrap; }
  .lecteur-temps { font-size: 13px; }
  .lecteur-choix { max-width: 140px; font-size: 13px; }
  .commandes-visibles .lecteur-soustitre { bottom: 130px; }
}

/* ---------- Écrans moyens : le journal de bord devient un tiroir ---------- */
@media (max-width: 1180px) {
  .page { grid-template-columns: minmax(0, 1fr); }
  .livre-seul { display: inline-flex !important; }
  .livre {
    position: fixed; z-index: 50; top: 0; right: 0; bottom: 0; width: min(380px, 92vw);
    overflow-y: auto; overscroll-behavior: contain; margin: 0; padding: 20px 18px 30px;
    background: var(--metal), linear-gradient(180deg, #0a2029, #020c12);
    border-left: 3px solid #6e5426;
    box-shadow: inset 1px 0 0 rgba(242, 216, 152, .3), -30px 0 60px rgba(0, 0, 0, .8);
    transform: translateX(110%); visibility: hidden;
    transition: transform .4s cubic-bezier(.2, .8, .2, 1), visibility 0s linear .4s;
  }
  .livre-ouvert .livre { transform: none; visibility: visible; transition: transform .4s cubic-bezier(.2, .8, .2, 1); }
  .livre-entete .fermer { position: relative; float: none; margin: 0 4px 0 0; }
  .livre-ouvert .voile { display: block; position: fixed; inset: 0; z-index: 45; background: rgba(0, 6, 10, .72); backdrop-filter: blur(2px); }
}

/* Barre du haut : les boutons passent en icônes (avec infobulle) quand la place manque */
@media (max-width: 1360px) {
  .barre-actions .btn span { display: none; }
  .barre-actions .btn { padding: 8px; }
  .barre-actions .btn svg { width: 17px; height: 17px; }
}
@media (max-width: 960px) {
  .barre-ligne { flex-wrap: wrap; justify-content: flex-end; gap: 10px 6px; }
  .marque { margin-right: auto; }
  .barre-actions { display: contents; }
  .recherche { order: 3; flex: 1 1 100%; max-width: none; min-width: 0; margin-left: 0; }
}

@media (max-width: 760px) {
  .barre-ligne { padding: 10px 14px 6px; }
  .marque { gap: 9px; }
  .embleme { width: 56px; height: 56px; margin: -6px 0 -8px -4px; }
  .marque-nom { font-size: 20px; letter-spacing: .08em; margin-right: -.08em; }
  .onglets { padding: 0 8px 2px; }
  .onglet { padding: 8px 10px 16px; }
  .filtres { flex-wrap: nowrap; overflow-x: auto; scrollbar-width: none; padding: 8px 14px 14px; }
  .filtres::-webkit-scrollbar { display: none; }
  .filtre { flex-shrink: 0; }
  .page { padding: 24px 14px 50px; }
  .grille { grid-template-columns: repeat(auto-fill, minmax(118px, 1fr)); gap: 26px 14px; }
  .annee-carte { top: 7px; right: 7px; font-size: 12.5px; line-height: 16px; padding: 1px 11px 0; }
  .infos h3 { font-size: 15px; }
  .actions-carte .btn span { display: none; }
  .pagination { gap: 8px; }
  .page-fleche span { display: none; }
  .page-fleche { padding: 0 9px; }
  .page-numeros { gap: 4px; }
  .page-numero { min-width: 32px; height: 36px; font-size: 15px; padding: 0 4px; }
  .page-fleche { height: 36px; }
  .dialogue { padding: 28px 20px; }
  .dialogue h2 { font-size: 25px; }
  .fiche-entete { grid-template-columns: 110px 1fr; gap: 16px; }
  .masque-mobile { display: none; }
}

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