/* AbracadaBook — feuille de style */
/* L'ambiance suit l'heure : html[data-light] = dawn | day | dusk | night (posé par app.js) */
:root {
  color-scheme: light;
  /* interface */
  --bg: #E6E3D3;
  --bar: rgba(236, 233, 220, .72);
  --paper: rgba(252, 251, 246, .88);
  --paper-line: rgba(255, 255, 255, .6);
  --surface: #FFFFFF;
  --surface-2: #F5F4EE;
  --ink: #1F2420;
  --muted: #5C6459;
  --line: #DAD8CB;
  --accent: #2F6B4F;
  --accent-ink: #FFFFFF;
  --accent-soft: #E0ECE2;
  --ok: #5A5596;
  --ok-soft: #E8E6F4;
  --danger: #B3261E;
  --spoiler: #E8E7DE;
  --shadow: 0 1px 2px rgba(40, 35, 20, .06), 0 6px 20px rgba(40, 35, 20, .08);
  /* décor */
  --wall: #E6E3D3; --wall2: #D8D3BC; --frame: #F6F3E8;
  --floor: #B08D6A; --floor2: #97754F; --rug: #C9A27E;
  --sky1: #8EC5E8; --sky2: #DCEFF6; --hill: #8FB39A; --hill2: #7AA387;
  --orb: #FFF3C4; --orb-x: 395px; --orb-y: 205px; --moon: 0;
  --stars: 0; --lamp: 0; --lights: .15;
  --beamc: #FFF7DA; --beamop: .45;
  --leaf1: #3E7A4D; --leaf2: #5C9A5E; --leaf3: #2D5C3D;
  --pot: #C8775A; --pot2: #B5664B; --wood: #8A6446; --shade: #EAD9B8;
  --wash: rgba(0, 0, 0, 0);
  --f-ui: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --f-read: "Iowan Old Style", "Palatino Linotype", Palatino, "Book Antiqua", Georgia, serif;
}
html[data-light="dawn"] {
  --bg: #EAD8CD; --bar: rgba(240, 224, 214, .72); --paper: rgba(255, 250, 246, .88); --surface: #FFFBF8;
  --wall: #EAD8CD; --wall2: #DCC5B6; --frame: #F8EFE8;
  --sky1: #F4B49A; --sky2: #C6D2EC; --hill: #A3A6BA; --hill2: #8E93AB;
  --orb: #FFE1B0; --orb-x: 150px; --orb-y: 440px;
  --beamc: #FFD9C4; --beamop: .35; --lights: .25;
  --wash: rgba(255, 160, 130, .07);
}
html[data-light="dusk"] {
  --bg: #D9B593; --bar: rgba(226, 196, 168, .74); --paper: rgba(255, 248, 239, .88); --surface: #FFFBF5;
  --wall: #D9B593; --wall2: #C89E7B; --frame: #F1E2D0; --floor: #8E6647; --floor2: #795539;
  --sky1: #5A4A8A; --sky2: #F29A62; --hill: #6C5970; --hill2: #574660;
  --orb: #FF9F5F; --orb-x: 430px; --orb-y: 450px;
  --beamc: #FFB374; --beamop: .5; --lamp: .55; --lights: .7;
  --wash: rgba(255, 120, 40, .09);
}
html[data-light="night"] {
  color-scheme: dark;
  --bg: #1B1F2E; --bar: rgba(22, 26, 40, .74); --paper: rgba(26, 30, 44, .88); --paper-line: rgba(255, 255, 255, .06);
  --surface: #232839; --surface-2: #2A3043; --ink: #ECE9E1; --muted: #A4A9B6; --line: #373D52;
  --accent: #8FCBA5; --accent-ink: #10251A; --accent-soft: #243A2E;
  --ok: #B7B2EC; --ok-soft: #2F2D4A; --danger: #F08A80; --spoiler: #2D3346;
  --shadow: 0 1px 2px rgba(0, 0, 0, .35), 0 6px 20px rgba(0, 0, 0, .3);
  --wall: #262B3E; --wall2: #1F2335; --frame: #3A4058; --floor: #3B302D; --floor2: #2F2624; --rug: #4A3A3A;
  --sky1: #0B1030; --sky2: #2B3368; --hill: #1B2040; --hill2: #151935;
  --orb: #F2F0DF; --orb-x: 380px; --orb-y: 215px; --moon: 1;
  --stars: 1; --lamp: 1; --lights: 1;
  --beamc: #9DB0FF; --beamop: .12;
  --leaf1: #24462F; --leaf2: #33603F; --leaf3: #1A3526;
  --pot: #7A4A3A; --pot2: #6A3E31; --wood: #4E3A2C; --shade: #F3D29A;
  --wash: rgba(10, 14, 40, .2);
}
/* V1.6.2 : ambiance selon l'heure (maquettes validées par Max le 30/09, 22 h 50, archives/AMBIANCES-PROPOSITION.md).
   Le jour, la répartition d'aujourd'hui (beige majoritaire, touches de vert) ; seule la teinte du « verre » (--glass : page,
   cartes, barres sur le décor photo) suit le moment ; texte secondaire et vert foncés d'un cran pour rester lisibles à 80 %.
   Le soir, le bleu nuit d'aujourd'hui ; après minuit (nuit profonde), la même nuit en plus doux. data-phase est posé par light.js. */
html[data-phase="aube"], html[data-phase="matin"], html[data-phase="midi"], html[data-phase="apres-midi"], html[data-phase="coucher"] { --muted: #414943; --accent: #285E45; }
html[data-phase="aube"] { --glass: #FBEFEA; }
html[data-phase="matin"] { --glass: #FAF8F0; }
html[data-phase="midi"] { --glass: #FCFBF6; }
html[data-phase="apres-midi"] { --glass: #FBF1E0; }
html[data-phase="coucher"] { --glass: #FBE7D8; }
html[data-phase="crepuscule"], html[data-phase="nuit"] { --glass: #1A1E2C; }
html[data-phase="nuit-profonde"] {
  --glass: #161720; --surface: #1C1D28; --surface-2: #232431;
  --ink: #D8D4CB; --muted: #A6A49D; --accent: #7DAE90; --accent-ink: #0F1F16; --accent-soft: #1F2E26;
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }   /* 1.8.62 (X4, audit du 14/10) : toutes les tailles de texte sont en rem (16 px = 1rem) : le réglage « texte plus grand » du téléphone agit ; restent en px la géométrie (couvertures, logo, chrono) */
html { scrollbar-width: thin; scrollbar-color: color-mix(in srgb, var(--ink) 30%, transparent) transparent; }   /* 1.8.75 (retour 9) : ascenseur fin sur piste transparente ; 1.8.76 : sans overflow-x: clip ; 1.8.79 : plus de scrollbar-gutter (voir .ovs) */
/* 1.8.79 (Max, 6/11, 23 h 30 : « le décor devrait prendre toute la place et l'ascenseur passer par-dessus ») : sur PC, l'ascenseur natif et sa gouttière
   laissaient une bande sombre à droite — Chrome ne peint jamais l'image de fond dans la gouttière, seulement la couleur. On cache l'ascenseur natif
   (la page défile toujours : molette, clavier, pavé tactile inchangés), le décor prend toute la largeur et un ascenseur maison, fin, passe par-dessus :
   visible pendant le défilement et au survol du bord droit, glissable, clic sur la piste = saut. Téléphone : rien ne change (ascenseur déjà en surimpression). */
@media (min-width: 821px) and (pointer: fine) { html { scrollbar-width: none; } html::-webkit-scrollbar { width: 0; height: 0; display: none; } }
.ovs { position: fixed; top: 4px; right: 2px; bottom: 4px; width: 10px; z-index: 70; display: none; touch-action: none; }
@media (min-width: 821px) and (pointer: fine) { .ovs.on { display: block; } }
.ovs i { position: absolute; left: 1px; right: 1px; top: 0; height: 40px; border-radius: 4px; background: color-mix(in srgb, var(--ink) 42%, transparent); opacity: 0; transition: opacity .35s; }
.ovs.show i, .ovs:hover i, .ovs.drag i { opacity: 1; transition: none; }
.ovs.drag i, .ovs i:hover { background: color-mix(in srgb, var(--ink) 60%, transparent); }
html[data-bg="photo"] { background-color: var(--wall); background-size: cover; background-attachment: fixed; background-repeat: no-repeat; }
html[data-bg="photo"] body { background: transparent; }   /* 1.8.76 bis : la racine ayant un fond, celui de body ne remonte plus sur le canevas et recouvrirait le calque photo (#bg, z-index -1) */   /* 1.8.76 (Max, 18 h 48) : la photo du moment est aussi le fond de la racine (light.js), le canevas la peint sous la gouttière de l'ascenseur */
html.app-installed { touch-action: pan-x pan-y; } /* 1.6.3 (décision de Max, 02/10) : appli installée, pas de zoom au pincement ; le défilement reste */
body {
  margin: 0;
  background: var(--wall);
  color: var(--ink);
  font: 0.9375rem/1.5 var(--f-ui);
  padding-bottom: env(safe-area-inset-bottom, 0px);
}
button, input, select, textarea { font: inherit; color: inherit; }
a { color: var(--accent); }
h1, h2, h3 { margin: 0; line-height: 1.2; text-wrap: balance; }
p { margin: 0; }
[hidden] { display: none !important; }
.dialog:focus { outline: none; } /* le focus posé sur la fenêtre elle-même (lecteurs d'écran, Échap) ne dessine pas de cadre */
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; } /* lu par les lecteurs d'écran seulement */
:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; border-radius: 4px; }
.num { font-variant-numeric: tabular-nums; }
.muted { color: var(--muted); }
.small { font-size: 0.8125rem; }
.grow { flex: 1; min-width: 0; }
/* coupure des mots trop longs seulement là où un titre de membre peut arriver (V1.5.3) ; jamais sur les titres de page */
.notice .grow, .scard .grow { overflow-wrap: anywhere; }
/* 1.6.3 (audit du 01/10, 3.1 et 3.2) : dans une bannière ou une note de forum, le texte garde au moins 200 px et les boutons passent
   dessous s'il le faut ; avant, « flex: 1 » + « min-width: 0 » laissaient les boutons écraser le texte en colonne d'une lettre (320 px) */
.notice .grow, .compose-note .grow { flex: 1 1 200px; }
.boot { padding: 40px 16px; text-align: center; color: var(--muted); }

/* ---------- Barre du haut ---------- */
.top {
  position: sticky; top: 0; z-index: 10;
  background: var(--bar);
  backdrop-filter: blur(12px) saturate(1.1);
  -webkit-backdrop-filter: blur(12px) saturate(1.1);
  border-bottom: 1px solid var(--line);
  padding-top: env(safe-area-inset-top, 0px);
}
.top-in {
  max-width: 1080px; margin: 0 auto; padding: 10px 16px;
  display: flex; align-items: center; gap: 12px 20px; flex-wrap: wrap;
}
/* Police du nom du site : « Citadel of Blackrose » (BlackFridayFont), sous-ensemble latin, hébergée avec le site
   (font-src 'self'). Réservée au titre : trop calligraphique pour le texte courant. Licence : 2 € par projet, à
   acheter avant la V2.0 si elle est retenue au playtest (voir ROADMAP). */
@font-face { font-family: 'Citadel of Blackrose'; src: url('fonts/citadel-of-blackrose.woff2') format('woff2'), url('fonts/citadel-of-blackrose.woff') format('woff'); font-weight: 400; font-style: normal; font-display: swap; }
.brand {
  display: flex; align-items: center; gap: 8px; text-decoration: none; color: var(--ink);
  font: normal 400 27px/1 'Citadel of Blackrose', var(--f-read); font-size: calc(27px * var(--fete-scale, 1)); letter-spacing: 0;   /* 1.8.13 : --fete-scale (jours spéciaux) */
}
.brand svg { flex: none; width: 1.12em; height: 1.12em; } /* logo V1.6 : suit la taille du titre (en-tête, téléphone, connexion) */
/* logo V1.6 : couverture vert forêt, pages crème, or ; les couleurs suivent le moment de la journée (et les jours spéciaux) */
.brand { --logo-cover: #1F3D33; --logo-page: #FCFBF6; --logo-gold: #C9A86A; }
[data-light="dawn"] .brand { --logo-cover: #3B3148; --logo-page: #FFF6F0; --logo-gold: #C99A6A; }
[data-light="dusk"] .brand { --logo-cover: #4A2E1E; --logo-page: #FFF3E4; --logo-gold: #D9954A; }
[data-light="night"] .brand { --logo-cover: #ECE9E1; --logo-page: #2A3043; --logo-gold: #E0C284; }
.brand .lg-c { fill: var(--logo-cover); }
.brand .lg-p { fill: var(--logo-page); stroke: var(--logo-cover); }
.brand .lg-l { fill: none; stroke: var(--logo-cover); opacity: .45; }
.brand .lg-o { fill: var(--logo-gold); }
.brand svg path { transition: fill 2.5s ease, stroke 2.5s ease; }
.brand-link { text-decoration: none; color: inherit; }
.tools { display: flex; gap: 4px; flex-wrap: wrap; }
.tool {
  text-decoration: none; color: var(--muted); font-weight: 600; font-size: 0.875rem;
  padding: 7px 12px; border-radius: 999px; display: inline-flex; gap: 7px; align-items: center;
}
@media (hover: hover) { .tool:hover { color: var(--ink); background: var(--surface-2); } }
.tool[aria-current="page"] { color: var(--ink); background: var(--surface); box-shadow: var(--shadow); }
.tool[aria-disabled="true"] { opacity: .45; cursor: default; }
@media (hover: hover) { .tool[aria-disabled="true"]:hover { background: none; color: var(--muted); } }
.badge {
  background: var(--accent); color: var(--accent-ink); border-radius: 999px;
  font-size: 0.75rem; min-width: 18px; height: 18px; padding: 0 5px;
  display: inline-grid; place-items: center;
}
.me { margin-left: auto; display: flex; align-items: center; gap: 8px; text-decoration: none; color: var(--ink); font-weight: 600; font-size: 0.875rem; }

main {
  width: calc(100% - 24px); max-width: 1080px; margin: 20px auto 48px; padding: 28px 24px 40px;
  background: var(--paper); border: 1px solid var(--paper-line); border-radius: 18px;
  backdrop-filter: blur(16px) saturate(1.1); -webkit-backdrop-filter: blur(16px) saturate(1.1);
  box-shadow: 0 12px 48px rgba(30, 25, 15, .14);
}
@media (max-width: 520px) { main { padding: 20px 14px 32px; margin-top: 12px; border-radius: 14px; } }

/* ---------- Décor photo : image du moment, fondu enchaîné ---------- */
#bg { position: fixed; inset: 0; width: 100vw; z-index: -1; background: var(--wall); }   /* 1.8.75 : 100vw couvre la gouttière de l'ascenseur */
.bg-layer { position: absolute; inset: 0; background-size: cover; background-position: 36% center; opacity: 0; transition: opacity 2.5s ease; }
.bg-layer.show { opacity: 1; }
html[data-bg="photo"] #scene { display: none; }

/* V1.6.2 : page et barres à 80 %, cartes à 90 % (étaient 84 %, 92 %, 82 %), teintées selon le moment (--glass) */
html[data-bg="photo"] main { background: color-mix(in srgb, var(--glass, var(--surface)) 80%, transparent); }
html[data-bg="photo"] .card, html[data-bg="photo"] .person, html[data-bg="photo"] .stat, html[data-bg="photo"] .forum, html[data-bg="photo"] .sitem, html[data-bg="photo"] .badge-card { background: color-mix(in srgb, var(--glass, var(--surface)) 90%, transparent); }
html[data-bg="photo"] .top, html[data-bg="photo"] .tabbar { background: color-mix(in srgb, var(--glass, var(--surface)) 80%, transparent); }
/* 1.8.53 (capture de Max, 29/10, 16 h 11) : la carte de connexion / d'invitation en verre lisible comme le cadre des pages (elle était restée à 94 % opaque, 1.8.3) */
/* 1.8.53 (Max, 16 h 12 : la feuille blanche est « dissonante ») : les fenêtres et feuilles prennent la matière des tuiles (teinte du moment,
   flou, liseré) mais plus couvrante — 86 % — pour que les champs d'un formulaire restent nets ; plus un bloc blanc dans un monde de verre */
html[data-bg="photo"] #modal .dialog { background-color: color-mix(in srgb, var(--glass, var(--surface)) 86%, transparent); -webkit-backdrop-filter: blur(24px) saturate(1.5); backdrop-filter: blur(24px) saturate(1.5); border: 1px solid var(--t-edge, var(--line)); }
/* 1.8.53 (Max, 16 h 40 : « le contraste marche pas hyper bien avec les barres de progression ») : sur le tableau, le rail de la barre n'est plus
   la couleur de filet (--line, invisible sur le verre teinté) mais de l'encre translucide — foncée le jour, claire la nuit — avec un liseré */
html[data-bg="photo"] .bar { background: color-mix(in srgb, var(--ink) 16%, transparent); box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--ink) 10%, transparent); }
html[data-bg="photo"] .login-card { background: color-mix(in srgb, var(--glass, var(--surface)) var(--t-mix, 58%), transparent); -webkit-backdrop-filter: blur(24px) saturate(1.5); backdrop-filter: blur(24px) saturate(1.5); border: 1px solid var(--t-edge, var(--line)); box-shadow: var(--t-shadow, var(--shadow)); }
@media (prefers-reduced-motion: reduce) { .bg-layer { transition: none; } }

/* ---------- Décor : intérieur végétal ---------- */
#scene { position: fixed; inset: 0; width: 100vw; height: 100%; z-index: -1; display: block; pointer-events: none; }
#scene .f-wall { fill: var(--wall); } #scene .f-wall2 { fill: var(--wall2); } #scene .f-frame { fill: var(--frame); }
#scene .f-floor { fill: var(--floor); } #scene .st-floor { stroke: var(--floor2); stroke-width: 3; fill: none; }
#scene .f-rug { fill: var(--rug); } #scene .f-hill { fill: var(--hill); } #scene .f-hill2 { fill: var(--hill2); }
#scene .s-sky1 { stop-color: var(--sky1); } #scene .s-sky2 { stop-color: var(--sky2); } #scene .s-beam { stop-color: var(--beamc); }
#scene .orb { transform: translate(var(--orb-x), var(--orb-y)); } #scene .f-orb { fill: var(--orb); }
#scene .moonshade { fill: var(--sky1); opacity: var(--moon); } #scene .stars { fill: #FFFFFF; opacity: var(--stars); }
#scene .beam { opacity: var(--beamop); } #scene .glow { opacity: var(--lamp); } #scene .bulb { fill: #FFD27A; opacity: var(--lights); }
#scene .f-l1 { fill: var(--leaf1); } #scene .f-l2 { fill: var(--leaf2); } #scene .f-l3 { fill: var(--leaf3); }
#scene .st-stem { stroke: var(--leaf3); stroke-width: 4; fill: none; stroke-linecap: round; }
#scene .st-vine { stroke: var(--leaf3); stroke-width: 2.5; fill: none; }
#scene .slit { stroke: var(--wall); stroke-width: 5; stroke-linecap: round; }
#scene .f-pot { fill: var(--pot); } #scene .f-pot2 { fill: var(--pot2); } #scene .f-wood { fill: var(--wood); }
#scene .st-wood { stroke: var(--wood); stroke-width: 2; } #scene .f-shade { fill: var(--shade); }
#scene .wash { fill: var(--wash); }
#scene .sway { transform-origin: 170px 0; animation: sway 7s ease-in-out infinite alternate; }
@keyframes sway { from { transform: rotate(-1.2deg); } to { transform: rotate(1.2deg); } }

/* ---------- Titres de page ---------- */
.page-head { display: flex; align-items: flex-end; gap: 12px 16px; flex-wrap: wrap; margin-bottom: 20px; }
.page-head h1 { font: 600 1.875rem/1.1 var(--f-read); letter-spacing: -.01em; overflow-wrap: anywhere; } /* 03/10 : pseudo de 30 lettres sans espace */
.friend-top > div { min-width: 0; }
.page-head .sub { color: var(--muted); margin-top: 4px; }
.page-head > .grow { flex: 1 1 240px; } /* titre et sous-titre gardent leur largeur : les boutons passent dessous sur téléphone */
.sec-title { font-size: 0.75rem; text-transform: uppercase; letter-spacing: .08em; color: var(--muted); font-weight: 700; margin: 28px 0 12px; }
.sec-title:first-child { margin-top: 0; }

/* ---------- Boutons, champs ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 6px;
  border: 1px solid var(--line); background: var(--surface); color: var(--ink);
  padding: 8px 14px; border-radius: 8px; font-weight: 600; font-size: 0.875rem; cursor: pointer;
  text-decoration: none; white-space: nowrap;
}
/* 1.8.81 (Max, 7/11, 10 h 12 : « sur mobile quand je clique, une frame du bouton en noir, puis il se scale ») : c'était le surlignage de tap
   d'Android (un voile sombre sur toute la boîte de l'élément — pour une pastille, sa zone tactile de 44 px, plus grande que la bulle visible —
   pendant une image, avant notre enfoncement). Il n'existe plus nulle part : le seul retour au toucher est .pressed, le même que le clic. Les boutons
   répondent aussi sans l'attente du double-tap (touch-action: manipulation). PC et téléphone : même apparence, même retour ; seule la taille change. */
*, *::before, *::after { -webkit-tap-highlight-color: transparent; }
.btn, button.primary, .acts > button, .tool, .chip, .mact, .linkbtn, .cal-nav, .cal-ym, .cal-day, .cover-btn, .mode, .bravo, .tabbar a, .tabbar button, summary, .seg button { touch-action: manipulation; }
/* 1.8.80 (Max, 7/11, 9 h 06 : « le mouseover du PC se déclenche quand je touche ») : tout survol n'existe qu'à la souris (hover: hover) ; au toucher, le retour est l'enfoncement .pressed, le même sur PC et téléphone */
@media (hover: hover) { .btn:hover { border-color: var(--muted); } }
.btn:disabled { opacity: .55; cursor: default; }
.btn.primary { background: var(--accent); border-color: var(--accent); color: var(--accent-ink); }
@media (hover: hover) { .btn.primary:hover { filter: brightness(1.08); } }
.btn.ghost { background: transparent; border-color: transparent; color: var(--muted); }
@media (hover: hover) { .btn.ghost:hover { color: var(--ink); background: var(--surface-2); } }
.btn.danger { color: var(--danger); background: transparent; border-color: transparent; }
@media (hover: hover) { .btn.danger:hover { background: color-mix(in srgb, var(--danger) 10%, transparent); } }
.btn.sm { padding: 5px 10px; font-size: 0.8125rem; border-radius: 7px; }
.linkbtn { background: none; border: 0; padding: 6px 4px; margin: -6px -4px; color: var(--muted); font-size: 0.75rem; min-height: 32px; cursor: pointer; text-decoration: underline; text-underline-offset: 2px; }
@media (hover: hover) { .linkbtn:hover { color: var(--danger); } } /* écran tactile : pas de survol collant sur le bouton suivant */
.linkbtn[data-armed] { color: var(--danger); font-weight: 600; text-decoration: none; }
/* 1.8.11 (A-R8, recette de Max, 09/10) : un bouton « armé » porte sa question (« Bloquer Test00 ? Vous ne vous verrez plus… ») : elle se replie
   sur plusieurs lignes au lieu de sortir de la carte ou du menu ••• */
.btn[data-armed] { white-space: normal; text-align: left; height: auto; line-height: 1.3; }

.field { display: grid; grid-template-columns: minmax(0, 1fr); gap: 6px; margin-bottom: 14px; border: 0; padding: 0; min-width: 0; }
.field > label, .field > legend { font-weight: 600; font-size: 0.8125rem; padding: 0; margin-bottom: 2px; }
input[type="text"], input[type="email"], input[type="number"], input:not([type]), input[type="search"], select, textarea {
  width: 100%; border: 1px solid var(--line); background: var(--surface-2);
  border-radius: 8px; padding: 9px 11px; min-width: 0;
}
textarea { resize: vertical; line-height: 1.5; }
input:focus, select:focus, textarea:focus { outline: 2px solid var(--accent); outline-offset: -1px; border-color: transparent; }
.row2 { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.check, .radio { display: flex; gap: 10px; align-items: center; padding: 8px 10px; border-radius: 8px; cursor: pointer; border: 1px solid var(--line); background: var(--surface-2); }
.radio { align-items: flex-start; }
.radio input { margin-top: 3px; }
.choices { display: grid; gap: 8px; }
input[type="range"] { width: 100%; accent-color: var(--accent); }
input[type="checkbox"], input[type="radio"] { accent-color: var(--accent); width: 16px; height: 16px; flex: none; }

/* ---------- Pastilles ---------- */
.pill { display: inline-flex; align-items: center; font-size: 0.75rem; font-weight: 600; padding: 2px 8px; border-radius: 999px; border: 1px solid var(--line); color: var(--muted); white-space: nowrap; }
.pill.reading { background: var(--accent-soft); color: var(--accent); border-color: transparent; }
.pill.done { background: var(--ok-soft); color: var(--ok); border-color: transparent; }
.pill.paused { background: #F3E7C9; color: #7A5A12; border-color: transparent; }
.pill.dropped { background: var(--surface-2); color: var(--muted); text-decoration: line-through; }
html[data-light="night"] .pill.paused { background: #4A3B18; color: #F2D48A; }
.pill.priv { border-style: dashed; }
.pill.visit { background: var(--surface-2); color: var(--ink); border-color: transparent; font-style: italic; } /* V1.6 : visiteur d'une lecture publique */
.pill.club { background: color-mix(in srgb, var(--accent) 14%, var(--surface)); border-color: transparent; color: var(--accent); } /* V1.7.5 : lecture de club */
/* 1.8.94 (V1.8.37) : l'étage d'une lecture de club — « à venir » (pas encore ouverte), « en clôture » (fermée aux nouveaux lecteurs) */
.pill.stage-up { background: var(--ok-soft); color: var(--ok); border-color: transparent; }
.pill.stage-clo { background: #F3E7C9; color: #7A5A12; border-color: transparent; }
html[data-light="night"] .pill.stage-clo { background: #4A3B18; color: #F2D48A; }
.stage-line { display: block; }
/* 1.8.102 (Max, 12/11, 20 h 45, sur iPhone : « les champs début et dernier jour se chevauchent ») : un champ de date d'iOS garde sa largeur
   propre tant qu'il a son apparence d'origine — même remède que .se-times (V1.6.2) : apparence retirée, colonnes minmax(0, …). Sans
   apparence, un champ vide s'aplatit : hauteur minimale. Les deux champs s'alignent par le bas quand un libellé passe sur deux lignes. */
.date-pair { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); align-items: end; gap: 12px; margin-top: 12px; }
.date-pair .field { min-width: 0; margin: 0; }
.date-pair input[type="date"] { display: block; width: 100%; min-width: 0; max-width: 100%; min-height: 2.75rem; box-sizing: border-box; -webkit-appearance: none; appearance: none; text-align: left; border: 1px solid var(--line); background: var(--surface-2); border-radius: 8px; padding: 9px 11px; }
.date-pair input[type="date"]::-webkit-date-and-time-value { text-align: left; }
.date-pair .label { display: block; font-size: 0.8125rem; font-weight: 600; margin-bottom: 2px; }
.date-fixed { margin: 0; padding: 9px 0; }
.date-hint { margin: 6px 0 12px; }
/* 1.8.95 (V1.8.38) : le vote d'un club */
.vote-card { margin: 4px 0 16px; padding: 12px 14px 14px; border: 1px solid var(--line); border-radius: 14px; background: var(--surface); }
.vote-card .sec-title { margin-top: 0; }
.vote-when { margin: 0 0 10px; }
.vote-opts { display: grid; gap: 8px; }
.vote-opt { display: flex; gap: 12px; align-items: center; text-align: left; width: 100%; min-height: 56px; padding: 8px 10px; border: 1px solid var(--line); border-radius: 12px; background: var(--surface-2); color: inherit; font: inherit; cursor: pointer; }
.vote-opt:disabled { cursor: default; }
.vote-opt.on { border-color: var(--accent); box-shadow: inset 0 0 0 1px var(--accent); background: var(--accent-soft); }
.vote-opt:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
.vote-opt-main { display: grid; gap: 2px; min-width: 0; }
.vote-opt-main strong { overflow-wrap: anywhere; }
.vote-bar { display: block; height: 6px; border-radius: 999px; background: color-mix(in srgb, var(--ink) 10%, transparent); overflow: hidden; margin-top: 4px; }
.vote-bar i { display: block; height: 100%; border-radius: 999px; background: var(--accent); }
.vote-n { font-size: 1.0625rem; min-width: 1.5em; text-align: right; }
.vote-title { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
.vote-mine { flex: none; }
.vote-foot { margin: 10px 0 0; }
.vote-acts { display: flex; gap: 8px; flex-wrap: wrap; margin-top: 10px; }
/* 1.8.103 (Max, 12/11, 23 h 18) : un livre par ligne, sur toute la largeur — le bouton armé (« Choisir « titre » ? ») reste à sa place */
.vote-decide { display: grid; grid-template-columns: minmax(0, 1fr); gap: 8px; margin-top: 10px; padding: 10px 12px; border-radius: 10px; background: var(--accent-soft); }
.vote-decide .btn { width: 100%; justify-content: flex-start; text-align: left; white-space: normal; height: auto; min-height: 2.5rem; line-height: 1.3; padding-top: 7px; padding-bottom: 7px; overflow-wrap: anywhere; }
.vote-decide .btn[data-armed] { outline: 2px solid var(--accent); outline-offset: 2px; font-weight: 700; }
.vote-last { margin: 4px 0 12px; }
/* 1.8.96 (V1.8.39) : l'animation automatique d'un club, la santé de l'horloge (Mesures) */
.auto-line { margin: 4px 0 12px; }
.auto-stopped { padding: 10px 12px; border-radius: 10px; background: #F3E7C9; color: #4A3A10; }
html[data-light="night"] .auto-stopped { background: #4A3B18; color: #F2E3B8; }
.auto-switch { margin: 4px 0 14px; }
.clock-line { margin: 0 0 4px; }
.clock-rouge { padding: 8px 10px; border-radius: 10px; background: #F8E1DE; color: #8A2A22; }
html[data-light="night"] .clock-rouge { background: #4A2420; color: #F6C9C3; }
/* 1.8.101 : veille du schéma (page Mesures), même dessin que l'horloge */
.schema-line { margin: 0 0 4px; }
.schema-rouge { padding: 8px 10px; border-radius: 10px; background: #F8E1DE; color: #8A2A22; }
html[data-light="night"] .schema-rouge { background: #4A2420; color: #F6C9C3; }
.club-launch { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; margin: 6px 0 4px; }
/* 1.8.97 (Max, 11/11, 23 h 58) : l'étagère des places d'un club de membres — couvertures, silhouette « ? » du vote, emplacements libres */
.club-shelf { display: flex; flex-wrap: wrap; align-items: flex-start; gap: 8px 14px; margin: 8px 0 14px; }
.club-shelf .shelf-title { flex-basis: 100%; }
.shelf-slot { display: flex; flex-direction: column; align-items: center; gap: 4px; width: 48px; text-decoration: none; color: inherit; }
a.shelf-slot { border-radius: 6px; }
a.shelf-slot:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; }
.shelf-slot .cover.xs, .shelf-ghost { width: 44px; flex: none; }
.shelf-cap { font-size: 11px; line-height: 1.2; color: var(--muted); white-space: nowrap; }
/* 1.8.100 (Max, 12/11, 10 h 21 : « je valide B ») : l'étagère d'un club officiel — deux groupes de places, « à l'honneur » et « à venir » :
   côte à côte sur PC, séparés d'un filet ; l'un sous l'autre sur téléphone. La largeur d'un groupe suit son nombre de places. */
.club-shelf-off { gap: 12px 26px; }
.shelf-row { display: flex; flex-direction: column; gap: 8px; min-width: 0; }
.shelf-slots { display: flex; flex-wrap: wrap; align-items: flex-start; gap: 8px 14px; }
@media (min-width: 700px) { .shelf-row + .shelf-row { border-left: 1px solid var(--line); padding-left: 26px; } }
@media (max-width: 699px) { .club-shelf-off { flex-direction: column; } }
/* l'emplacement libre : le contour d'un livre, son dos à peine marqué */
.shelf-ghost { aspect-ratio: 2 / 3; border-radius: 3px 7px 7px 3px; border: 1.5px dashed color-mix(in srgb, var(--muted) 55%, transparent);
  background: linear-gradient(90deg, color-mix(in srgb, var(--muted) 16%, transparent) 0 4px, transparent 4px); }
/* la place que tient un vote (Max, 12/11, 0 h 15 : « comme une cover sans nom ») : une vraie couverture — toile, dos, filet doré — sans titre, un « ? » au centre */
.cover.xs.cover-mystery, .cover.cover-mystery { --gold: #D9B96A; display: grid; place-items: center; place-content: center; padding: 0 0 0 3px;
  background:
    linear-gradient(90deg, rgba(0,0,0,.34) 0, rgba(255,255,255,.12) 4%, rgba(0,0,0,0) 9%, rgba(0,0,0,0) 94%, rgba(0,0,0,.14) 100%),
    radial-gradient(110% 80% at 55% 40%, rgba(217,185,106,.26), rgba(217,185,106,0) 62%),
    linear-gradient(160deg, #3A3D63, #1D1F33); }
.cover.cover-mystery::after { border-color: rgba(217,185,106,.6); }
.mystery-mark { position: relative; font: 700 22px/1 var(--f-read); color: var(--gold); text-shadow: 0 0 9px rgba(217,185,106,.5), 0 1px 0 rgba(0,0,0,.35); }
.club-launch .club-new-read { margin: 0; }
.vote-pick { display: grid; gap: 8px; }
.vote-cat { margin: 4px 0 12px; }
.vote-cat > summary { list-style: none; display: inline-flex; margin-bottom: 10px; }
.vote-cat > summary::-webkit-details-marker { display: none; }
.vote-added { display: grid; gap: 6px; margin: 0 0 12px; }
.vote-added:empty { display: none; }
@media (max-width: 520px) { .date-pair { grid-template-columns: minmax(0, 1fr); } }   /* 1.8.102 : sur tout téléphone (420 px avant), les deux dates l'une sous l'autre — un champ ne peut plus toucher l'autre ni le bord */
.stage-note { margin: -2px 0 8px; }
.stage-band { margin: 12px 0 0; padding: 10px 12px; border-radius: 10px; font-size: 0.875rem; line-height: 1.45; background: var(--accent-soft); color: var(--ink); }
.stage-band.stage-upcoming { background: var(--ok-soft); }
.stage-band.stage-closing, .stage-band.stage-ended { background: #F3E7C9; color: #4A3A10; }
html[data-light="night"] .stage-band.stage-closing, html[data-light="night"] .stage-band.stage-ended { background: #4A3B18; color: #F2E3B8; }
.chips { display: flex; gap: 6px; flex-wrap: wrap; margin-bottom: 18px; }
.chip { border: 1px solid var(--line); background: transparent; border-radius: 999px; padding: 5px 12px; font-size: 0.8125rem; font-weight: 600; color: var(--muted); cursor: pointer; max-width: 100%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; } /* 03/10 : une étiquette de 40 lettres sans espace élargissait la page */
.chip[aria-pressed="true"] { background: var(--ink); color: var(--bg); border-color: var(--ink); }

/* ---------- Avatars ---------- */
.av {
  --c: #7B2D5B;
  width: 26px; height: 26px; border-radius: 50%; flex: none;
  display: inline-grid; place-items: center;
  background: var(--c); color: #fff; font-size: 0.75rem; font-weight: 700; line-height: 1;
}
.av.lg { width: 44px; height: 44px; font-size: 1.125rem; }
/* icône de profil (V1.6) : au trait, blanche, ~62 % du rond. 1.8.48 (retour de Max, 23/10 : « la tête de chat n'est pas centrée dans le rond »
   sur PC) : des tailles entières à chaque taille de rond — 62 % de 26 px = 16,12 px, et avec l'échelle d'affichage de Windows (125 %) le trait
   tombait entre deux pixels, plus épais d'un côté : l'icône paraissait décalée. Mesuré dans qa-interface-tactile (PC et téléphone). */
.av svg { width: 16px; height: 16px; display: block; }
.av.sm svg { width: 14px; height: 14px; }
.av.lg svg { width: 28px; height: 28px; }
/* profil : choix de la couleur et de l'icône (aperçu dans la couleur choisie : --pc) */
.swatches { display: flex; flex-wrap: wrap; gap: 8px; }
.swatch { position: relative; display: inline-grid; cursor: pointer; border-radius: 50%; }
.swatch input { position: absolute; inset: 0; margin: 0; opacity: 0; cursor: pointer; }
.swatch .av { width: 40px; height: 40px; font-size: 1rem; transition: box-shadow .15s; }
.swatch .av svg { width: 24px; height: 24px; }
.swatch .av.pc { background: var(--pc, #7B2D5B); }
.swatch input:checked + .av { box-shadow: 0 0 0 3px var(--surface), 0 0 0 5px var(--accent); }
.swatch input:focus-visible + .av { outline: 2px solid var(--accent); outline-offset: 5px; }
.swatches.icons { gap: 8px 8px; }
.swatch-fam { flex-basis: 100%; font-size: 0.75rem; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; color: var(--muted); margin-top: 6px; }
.swatch-fam:first-child { margin-top: 0; }
fieldset[disabled] .swatch { cursor: not-allowed; opacity: .5; }
.avs { display: inline-flex; }
.avs .av { box-shadow: 0 0 0 2px var(--surface); }
.avs .av + .av { margin-left: -6px; }

/* ---------- Couvertures générées ----------
   Une couverture = un style (data-style) + une couleur (--cloth, --cloth2, --ink-c).
   Styles : cloth (toile), leather (cuir doré), band (broché à bande), stripes (poche rayé), stars (constellations), deco (art déco). */
.cover {
  --cloth: #264A41; --cloth2: #1B352F; --gold: #D9B96A; --ink-c: #F3EEE4;
  position: relative; aspect-ratio: 2 / 3; width: 100%; max-width: 100%;
  border-radius: 3px 7px 7px 3px;
  background:
    linear-gradient(90deg, rgba(0,0,0,.32) 0, rgba(255,255,255,.10) 4%, rgba(0,0,0,0) 8%, rgba(0,0,0,0) 94%, rgba(0,0,0,.12) 100%),
    var(--cloth);
  color: var(--ink-c); box-shadow: var(--shadow);
  display: flex; flex-direction: column; justify-content: space-between;
  padding: 16% 12% 12% 16%; overflow: hidden;
}
.cover::after { content: ""; position: absolute; inset: 7px 7px 7px 11px; border: 1px solid rgba(243,238,228,.28); border-radius: 2px; pointer-events: none; }
.cover::before { content: ""; position: absolute; inset: 0; pointer-events: none; }
.c-title { position: relative; font: italic 600 clamp(14px, 2.2vw, 19px)/1.15 var(--f-read); overflow-wrap: anywhere; hyphens: auto; -webkit-hyphens: auto; display: -webkit-box; -webkit-line-clamp: 5; -webkit-box-orient: vertical; overflow: hidden; }
.c-author { position: relative; font-size: 10px; text-transform: uppercase; letter-spacing: .12em; opacity: .8; overflow-wrap: anywhere; }
.ribbon { position: absolute; top: 0; right: 16%; width: 11px; height: 30%; background: #C0487F; clip-path: polygon(0 0, 100% 0, 100% 100%, 50% 86%, 0 100%); z-index: 1; }

/* couverture officielle : photo du catalogue, titre caché sauf si l'image manque */
.cover.photo { background: var(--surface-2); padding: 0; }
.cover.photo::after { border-color: rgba(0,0,0,.15); }
.cover.photo img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.cover.photo .c-title, .cover.photo .c-author { display: none; }
.cover.photo.broken { --cloth: #264A41; background: var(--cloth); padding: 16% 12% 12% 16%; }
.cover.photo.broken img { display: none; }
.cover.photo.broken .c-title { display: -webkit-box; } .cover.photo.broken .c-author { display: block; }
.cover.photo.broken.sm .c-author, .cover.photo.broken.xs .c-author { display: none; }
.cover-pick .cover.photo .c-title { display: none; }

/* cuir : grain + double filet doré, titre doré */
.cover[data-style="leather"] { color: var(--gold); background: linear-gradient(90deg, rgba(0,0,0,.4) 0, rgba(255,255,255,.08) 4%, rgba(0,0,0,0) 8%, rgba(0,0,0,0) 94%, rgba(0,0,0,.15) 100%), radial-gradient(circle at 30% 20%, rgba(255,255,255,.08), transparent 60%), var(--cloth2); }
.cover[data-style="leather"]::after { inset: 6px 6px 6px 10px; border: 2px double var(--gold); opacity: .8; }
.cover[data-style="leather"], .cover[data-style="deco"] { padding-left: 11%; padding-right: 8%; }
.cover[data-style="leather"] .c-title { font-style: normal; text-transform: uppercase; letter-spacing: .02em; font-size: clamp(10px, 1.5vw, 13px); text-align: center; overflow-wrap: anywhere; hyphens: auto; -webkit-hyphens: auto; }
.cover[data-style="leather"] .c-author { text-align: center; }
/* broché à bande : fond clair, bande de couleur, titre sombre */
.cover[data-style="band"] { background: linear-gradient(90deg, rgba(0,0,0,.18) 0, rgba(255,255,255,.2) 4%, transparent 8%), #F1EBDD; color: #23201A; }
.cover[data-style="band"]::before { display: none; }
.cover[data-style="band"] { justify-content: flex-start; padding-top: 22%; }
.cover[data-style="band"]::after { border-color: rgba(0,0,0,.12); }
.cover[data-style="band"] .c-title { color: #FBF8F0; font-style: normal; font-weight: 700; margin: 0 -12% 0 -16%; padding: 9% 12% 9% 16%; background: var(--cloth); min-height: 30%; display: flex; align-items: center; box-sizing: border-box; -webkit-line-clamp: unset; }
.cover[data-style="band"] .c-author { margin-top: auto; }
.cover.sm[data-style="band"] .c-title, .cover.xs[data-style="band"] .c-title { margin: 0 -8px 0 -11px; padding: 6px 8px 6px 11px; }
.cover.xs[data-style="band"] .c-title { margin: 0 -5px 0 -8px; padding: 4px 5px 4px 8px; }
.cover[data-style="band"] .c-author { color: #4A443A; }
/* rayures : rayures diagonales fines, titre sur cartouche */
.cover[data-style="stripes"] { background: linear-gradient(90deg, rgba(0,0,0,.3) 0, rgba(255,255,255,.1) 4%, transparent 8%), repeating-linear-gradient(135deg, var(--cloth) 0 10px, var(--cloth2) 10px 20px); }
.cover[data-style="stripes"] .c-title { background: rgba(20,16,12,.55); padding: 5px 6px; font-size: clamp(13px, 2vw, 17px); border-radius: 3px; font-style: normal; align-self: flex-start; max-width: 100%; }
.cover[data-style="stripes"] .c-author { background: rgba(20,16,12,.45); padding: 3px 6px; border-radius: 3px; align-self: flex-start; }
/* constellations : nuit profonde, étoiles, titre fin */
.cover[data-style="stars"] { background: linear-gradient(90deg, rgba(0,0,0,.35) 0, rgba(255,255,255,.08) 4%, transparent 8%), radial-gradient(circle at 70% 25%, var(--cloth) 0, var(--cloth2) 70%); }
.cover[data-style="stars"]::before { background:
  radial-gradient(circle at 20% 18%, #fff 0 1.2px, transparent 2px), radial-gradient(circle at 76% 12%, #fff 0 1px, transparent 2px),
  radial-gradient(circle at 60% 32%, #fff 0 1.4px, transparent 2.4px), radial-gradient(circle at 34% 44%, #fff 0 .9px, transparent 1.8px),
  radial-gradient(circle at 82% 52%, #fff 0 1.1px, transparent 2px), radial-gradient(circle at 24% 70%, #fff 0 1px, transparent 2px),
  radial-gradient(circle at 66% 78%, #fff 0 1.3px, transparent 2.2px), radial-gradient(circle at 48% 90%, #fff 0 .9px, transparent 1.8px),
  radial-gradient(circle at 88% 86%, #fff 0 1px, transparent 2px); opacity: .85; }
.cover[data-style="stars"] .c-title { font-weight: 400; letter-spacing: .02em; }
/* art déco : éventail doré en haut, titre centré capitales */
.cover[data-style="deco"] { color: var(--gold); background: linear-gradient(90deg, rgba(0,0,0,.35) 0, rgba(255,255,255,.08) 4%, transparent 8%), var(--cloth2); }
.cover[data-style="deco"]::before { background:
  repeating-conic-gradient(from 240deg at 50% -10%, var(--gold) 0 3deg, transparent 3deg 12deg);
  -webkit-mask: linear-gradient(180deg, #000 0 28%, transparent 46%); mask: linear-gradient(180deg, #000 0 28%, transparent 46%); opacity: .5; }
.cover[data-style="deco"]::after { border: 1px solid var(--gold); inset: 6px 6px 6px 10px; opacity: .7; }
.cover[data-style="deco"] .c-title { font-style: normal; text-transform: uppercase; letter-spacing: .02em; text-align: center; font-weight: 700; font-size: clamp(10px, 1.5vw, 13px); overflow-wrap: anywhere; hyphens: auto; -webkit-hyphens: auto; margin-top: 34%; background: var(--cloth2); padding: 6px 5px; box-shadow: 0 0 0 1px var(--gold); align-self: center; max-width: 100%; }
.cover[data-style="deco"] .c-author { text-align: center; }

.cover.sm { width: 64px; padding: 10px 8px 8px 11px; }
.cover.sm .c-title { font-size: 10px !important; -webkit-line-clamp: 4; padding: 2px 4px; }
.cover.sm .c-author, .cover.xs .c-author { display: none; }
.cover.sm::after, .cover.xs::after { inset: 3px 3px 3px 6px; }
.cover.xs { width: 44px; padding: 6px 5px 5px 8px; }
.cover.xs .c-title { font-size: 8px !important; -webkit-line-clamp: 4; padding: 1px 3px; }
.cover.xs[data-style="deco"] .c-title, .cover.sm[data-style="deco"] .c-title { margin-top: 20%; }
.cover.md { width: 120px; }

/* grille de choix de couverture */
.cover-pick { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); gap: 8px; }
.cover-pick label { position: relative; cursor: pointer; display: block; }
.cover-pick input { position: absolute; opacity: 0; inset: 0; margin: 0; }
.cover-pick .cover { width: 100%; padding: 12% 10% 10% 14%; }
.cover-pick .cover .c-title { font-size: 8px !important; -webkit-line-clamp: 3; }
.cover-pick .cover .c-author { display: none; }
.cover-pick input:checked + .cover { outline: 3px solid var(--accent); outline-offset: 2px; }
.cover-pick input:focus-visible + .cover { outline: 3px solid var(--accent); outline-offset: 2px; }
.cover-pick .auto { aspect-ratio: 2 / 3; border: 2px dashed var(--line); border-radius: 6px; display: grid; place-items: center; text-align: center; font-size: 0.75rem; font-weight: 600; color: var(--muted); padding: 4px; }
.cover-pick input:checked + .auto { outline: 3px solid var(--accent); outline-offset: 2px; color: var(--ink); }
.pick-styles { display: flex; gap: 6px; flex-wrap: wrap; margin-bottom: 10px; }

/* ---------- Grille de livres ---------- */
.books { display: grid; grid-template-columns: repeat(auto-fill, minmax(160px, 1fr)); gap: 28px 20px; }
.book { display: flex; flex-direction: column; gap: 10px; min-width: 0; } /* 03/10 : la colonne de la carte ne suit plus une étiquette sans espace (les enfants restaient à 327 px dans une carte de 161) ; 1.8.32 (Max, 21/10) : colonne souple, le bouton « Lire » se cale en bas de cartes de même hauteur */
.book > * { min-width: 0; }
.book > .b-actions { margin-top: auto; }   /* 1.8.32 : « Lire » à la même hauteur sur toute la rangée */
/* 1.6.3 (audit QA 1, 4, 5) : un titre ou une note sans espace (adresse web collée) ne doit jamais élargir la page : repli partout
   où un texte de membre arrive hors des cartes de collection (envies en grille, liste « Ma collection » de Nouvelle lecture, en-tête des feuilles) */
.book .si-title, .book .si-meta, .book > p, .catalog-item, .catalog-item strong, .catalog-item span, .sheet-book, .sheet-book .grow { overflow-wrap: anywhere; min-width: 0; }
.b-title { font: 600 1rem/1.25 var(--f-read); overflow-wrap: anywhere; min-height: 2.5em; overflow: hidden; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; }   /* 1.8.32 (Max, 21/10) : deux lignes réservées, comme le rayon (1.8.29) : pages et barres alignées */
/* 1.8.56 (Max, 29/10, 20 h 36, iPhone : « l'espace entre le titre et le reste est plutôt grand ») : les cartes d'une même rangée partagent
   leurs lignes (subgrid) — titre, auteur, pages, étiquettes, barre, rythme, note, boutons sont chacun sur une ligne commune ; le titre ne
   réserve deux lignes que si un voisin de la rangée en a deux, et tout reste aligné (le but du 1.8.32). Sans subgrid (vieux navigateurs),
   les deux lignes réservées restent. */
@supports (grid-template-rows: subgrid) {
  .books { row-gap: 0; }   /* l'écart de la grille serait aussi compté autour des lignes vides d'une carte ; il passe en marge sous chaque carte */
  .books > .book { display: grid; grid-template-rows: subgrid; grid-row: span 9; row-gap: 0; align-content: start; padding-bottom: 28px; }
  .books > .book > * { margin-top: 10px; }
  .books > .book > .cover-btn, .books > .book > .cover { grid-row: 1; margin-top: 0; }
  .books > .book > .b-title { grid-row: 2; min-height: 0; }
  .books > .book > .b-author { grid-row: 3; }
  .books > .book > .b-meta { grid-row: 4; }
  .books > .book > .tags { grid-row: 5; }
  .books > .book > .bar { grid-row: 6; }
  .books > .book > .pace { grid-row: 7; }
  .books > .book > p.small:not(.pace) { grid-row: 8; }
  .books > .book > .b-actions { grid-row: 9; margin-top: 10px; }
}
.b-author { overflow-wrap: anywhere; } /* 03/10 (chasse aux débordements, Fable) : un auteur sans espace élargissait « Mes livres » */
.b-author { color: var(--muted); font-size: 0.8125rem; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }   /* 1.8.32 : une ligne, coupée par « … » (le nom complet est sur la fiche) */
.b-meta { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; font-size: 0.8125rem; color: var(--muted); }
.b-actions { display: flex; gap: 6px; flex-wrap: wrap; }
.bar { --c: var(--accent); height: 6px; border-radius: 999px; background: var(--line); position: relative; overflow: visible; }
.bar > i { position: absolute; inset: 0 auto 0 0; background: var(--c); border-radius: 999px; }
.bar.lg { height: 8px; }
.bar .thr { position: absolute; top: -3px; bottom: -3px; width: 2px; background: var(--ink); opacity: .5; border-radius: 1px; }

/* ---------- Cartes génériques ---------- */
.card { background: var(--surface); border: 1px solid var(--line); border-radius: 12px; padding: 16px; }
.empty { text-align: center; padding: 40px 20px; border: 1px dashed var(--line); border-radius: 12px; display: grid; gap: 10px; justify-items: center; color: var(--muted); }
.empty h2 { font: 600 1.25rem/1.2 var(--f-read); color: var(--ink); }
.empty p { max-width: 46ch; }
.notice { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; background: var(--accent-soft); border-radius: 10px; padding: 10px 14px; margin-bottom: 18px; font-size: 0.875rem; }

/* ---------- Accueil ---------- */
.home { display: grid; grid-template-columns: minmax(0, 1fr) 320px; grid-template-areas: "main side"; gap: 32px; align-items: start; }
.home-main { grid-area: main; min-width: 0; }
.home-side { grid-area: side; display: grid; grid-template-columns: minmax(0, 1fr); gap: 24px; min-width: 0; } /* titre très long : la colonne ne s'élargit pas */
@media (min-width: 861px) {
  .home-side .home-feed { order: -1; }
  /* 1.8.35 (Max, 22/10, 0 h 07 : « la mise en page est toujours pas bonne pour le fil sur PC ») : la colonne de droite (le fil en tête)
     commence à la hauteur de « Ma lecture », comme sur la maquette A, au lieu d'attendre la fin de la carte. La page d'accueil
     devient la grille : « Ma lecture » et « Mes livres » à gauche, le fil et le reste à droite ; les bandeaux gardent toute la largeur. */
  body[data-route="home"] main { display: grid; grid-template-columns: minmax(0, 1fr) 320px; column-gap: 32px; grid-auto-flow: dense; align-items: start; }
  body[data-route="home"] main > * { grid-column: 1; min-width: 0; }
  body[data-route="home"] main > .notice, body[data-route="home"] main > .welcome, body[data-route="home"] main > .boot, body[data-route="home"] main > .empty { grid-column: 1 / -1; }
  body[data-route="home"] .home { display: contents; }
  body[data-route="home"] .home-main { grid-area: auto; grid-column: 1; }   /* grid-area « main/side » de .home n'a plus de sens ici */
  body[data-route="home"] .home-side { grid-area: auto; grid-column: 2; grid-row: span 40; }
}   /* 1.8.32 (Max, 21/10, maquette A) : sur PC, le fil d'activité en tête de la colonne de droite ; sur téléphone, l'ordre des onglets ne bouge pas */
@media (max-width: 860px) { .home { grid-template-columns: minmax(0, 1fr); grid-template-areas: "side" "main"; gap: 0; } }   /* 1.8.54 (Max, 29/10, 20 h 30, iPhone) : un seul volet visible à la fois sous les onglets ; l'écart de 32 px entre les deux rangées laissait « Mes livres » 32 px plus bas qu'« Activité » (rangée vide + écart) */
.people { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: minmax(0, 1fr); gap: 10px; }
.person { background: var(--surface); border: 1px solid var(--line); border-radius: 12px; padding: 12px 14px; display: grid; gap: 10px; }
.person-top { display: flex; gap: 8px; align-items: center; }
/* Choisir avec qui lire : champ avec autocomplétion (V1.5.4) */
.pp { display: grid; grid-template-columns: minmax(0, 1fr); gap: 8px; min-width: 0; }
.pp-chips { display: flex; flex-wrap: wrap; gap: 6px; }
.pp-chips:empty { display: none; }
.pp-chip { display: inline-flex; align-items: center; gap: 6px; max-width: 100%; min-width: 0; background: var(--surface-2); border: 1px solid var(--line); border-radius: 999px; padding: 3px 2px 3px 4px; font-weight: 600; font-size: 0.875rem; }
.pp-chip > span:not(.av) { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.pp-x { flex: none; width: 30px; height: 30px; border: 0; border-radius: 50%; background: none; color: var(--muted); font-size: 1.125rem; line-height: 1; cursor: pointer; }
.pp-x:focus-visible { background: var(--line); color: var(--ink); }
@media (hover: hover) { .pp-x:hover { background: var(--line); color: var(--ink); } }
.pp-sugg { list-style: none; margin: 0; padding: 4px; display: grid; gap: 2px; background: var(--surface); border: 1px solid var(--line); border-radius: 10px; box-shadow: var(--shadow); }
.pp-opt { display: flex; align-items: center; gap: 10px; width: 100%; min-height: 44px; padding: 6px 8px; border: 0; border-radius: 8px; background: none; text-align: left; cursor: pointer; }
.pp-opt:focus-visible { background: var(--surface-2); }
@media (hover: hover) { .pp-opt:hover { background: var(--surface-2); } }
.pp-opt[disabled] { opacity: .55; cursor: not-allowed; }
.pp-opt .small { flex: none; }
.pp-none { padding: 8px; }
.people-more .btn { width: 100%; justify-content: center; }
.feed-more { display: flex; margin: 10px auto 0; }
.pr { display: grid; grid-template-columns: minmax(0, 1fr); gap: 5px; }
.pr-top { display: flex; gap: 8px; align-items: baseline; }
.pr-title { flex: 1; min-width: 0; font: 600 0.875rem/1.3 var(--f-read); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.feed { list-style: none; margin: 0; padding: 0; display: grid; }
.feed li { display: flex; align-items: center; gap: 10px; padding: 9px 0; border-bottom: 1px solid var(--line); font-size: 0.875rem; flex-wrap: wrap; }   /* 1.8.43 : rien ne s'étire sur la hauteur de la ligne ; 1.8.56 (Max, 29/10, 20 h 37, iPhone : « livres et icônes pas centrés sur leur ligne ») : avatar et couverture au centre du texte, qui prend deux ou trois lignes sur téléphone (le texte en haut, 1.8.43, les laissait collés en haut) */
/* 1.8.33 (polish du fil) : la journée en tête de son premier événement (contenu généré : rien de plus à compter dans le fil), la couverture en miniature, les filtres */
.feed li.day-first::before { content: attr(data-day); flex: 0 0 100%; font-size: 0.75rem; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; color: var(--muted); padding: 6px 0 2px; }
.feed li.day-first:not(:first-child)::before { padding-top: 12px; }
.feed li > .feed-av, .feed li > .feed-cov { flex: none; }
/* 1.8.43 (Max, 22/10, 23 h 03 : « les covers sont mal centrées sur mobile ») : sur tactile, la zone de 44 px du lien de l'avatar s'étirait sur
   toute la ligne et centrait l'avatar au milieu, la couverture restant en haut ; sur PC l'avatar restait collé en haut, 11 px au-dessus du
   centre de la miniature. Même règle PC et téléphone : le lien fait la hauteur de la miniature (48 px), l'avatar y est centré, donc centré
   sur la couverture ; le texte en haut comme avant. Mesuré par qa-interface-tactile.py dans les deux modes. */
.feed li > .feed-av { min-height: 48px; display: inline-flex; align-items: center; }
.feed li > p { flex: 1 1 0; min-width: 0; }
.feed-cov .cover.xs { width: 32px; padding: 4px 3px 3px 6px; }
.feed-cov .cover.xs .c-title { font-size: 6px !important; -webkit-line-clamp: 3; }
.feed-head { display: flex; align-items: baseline; justify-content: space-between; gap: 10px; flex-wrap: wrap; }
.feed-filters { display: flex; gap: 4px; margin-bottom: 10px; }
.feed-filters .chip { padding: 3px 10px; font-size: 0.75rem; }
.feed li:last-child { border-bottom: 0; }
.feed p { min-width: 0; overflow-wrap: anywhere; }
.feed a { color: inherit; font-weight: 600; }
.newform { max-width: 620px; }
.choices.cols { grid-template-columns: repeat(auto-fill, minmax(170px, 1fr)); }
.sitem-link { color: inherit; text-decoration: none; overflow-wrap: anywhere; }
/* V1.6.2 (retour de Max) : toucher n'importe où sur la carte d'une lecture l'ouvre (lien étiré) ; boutons et liens restent au-dessus */
.sitem, .scard { position: relative; }
.sitem .sitem-link::after, .scard .sitem-link::after { content: ''; position: absolute; inset: 0; border-radius: inherit; z-index: 0; }
.sitem button, .sitem a:not(.sitem-link), .scard button, .scard a:not(.sitem-link), .sitem .sitem-acts, .scard .b-actions { position: relative; z-index: 1; }
@media (hover: hover) { .sitem-link:hover { text-decoration: underline; } }

/* ---------- Liste des lectures ---------- */
.slist { display: grid; grid-template-columns: minmax(0, 1fr); gap: 10px; }
.sitem { display: flex; gap: 14px; align-items: center; background: var(--surface); border: 1px solid var(--line); border-radius: 12px; padding: 12px 14px; text-decoration: none; color: inherit; flex-wrap: wrap; }
@media (hover: hover) { a.sitem:hover { border-color: var(--muted); } }
.sitem-main { flex: 1 1 220px; min-width: 0; display: grid; grid-template-columns: minmax(0, 1fr); gap: 4px; }
.sitem-main strong { font: 600 1rem/1.25 var(--f-read); overflow-wrap: anywhere; }
.sitem-line { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; font-size: 0.8125rem; color: var(--muted); }
.sitem-acts { display: flex; gap: 6px; flex-wrap: wrap; }
.minibars { display: grid; gap: 4px; width: 140px; flex: none; }
.minibars .bar { height: 4px; }
@media (max-width: 560px) { .minibars { width: 100%; } }

/* ---------- Vue lecture (forum) ---------- */
.back { display: inline-flex; gap: 6px; color: var(--muted); text-decoration: none; font-weight: 600; font-size: 0.875rem; margin-bottom: 14px; }
@media (hover: hover) { .back:hover { color: var(--ink); } }
.sv-grid { display: grid; grid-template-columns: minmax(0, 330px) minmax(0, 1fr); gap: 24px; align-items: start; }
@media (max-width: 820px) { .sv-grid { grid-template-columns: minmax(0, 1fr); } }
.sv-side { display: grid; gap: 16px; }
.sv-head { display: flex; gap: 14px; align-items: flex-start; } /* 1.8.7 (retour de Max, 07/10) : la couverture n'est plus étirée à la hauteur du texte sur PC */
.sv-head h1 { font: 600 1.375rem/1.2 var(--f-read); overflow-wrap: anywhere; }
.sv-head-txt { display: grid; gap: 6px; align-content: start; min-width: 0; }
.sv-actions { display: flex; gap: 6px; flex-wrap: wrap; }
.panel-title { font-size: 0.75rem; text-transform: uppercase; letter-spacing: .08em; color: var(--muted); font-weight: 700; margin-bottom: 10px; }
.mine-row { display: flex; gap: 8px; align-items: center; }
.mine-row input[type="number"] { width: 96px; }
.mine-quick { display: flex; gap: 6px; flex-wrap: wrap; margin-top: 10px; }
.lanes { list-style: none; margin: 12px 0 0; padding: 0; display: grid; gap: 14px; }
.lane { display: grid; gap: 6px; }
.lane-top { display: flex; gap: 8px; align-items: center; font-size: 0.875rem; }
.lane-name { font-weight: 600; flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

.forum { background: var(--surface); border: 1px solid var(--line); border-radius: 12px; display: flex; flex-direction: column; min-height: 420px; }
.forum-head { display: flex; align-items: baseline; gap: 10px; padding: 14px 16px; border-bottom: 1px solid var(--line); flex-wrap: wrap; }
.forum-head h2 { font: 600 1.125rem/1.2 var(--f-read); }
.msgs { flex: 1; overflow-y: auto; overflow-x: hidden; max-height: min(62vh, 640px); padding: 8px 16px; display: grid; gap: 2px; align-content: start; }   /* 1.8.84 (Max, 7/11, 14 h 38 : « le scroll marche dans toutes les directions ») : Chrome compte le padding de fin d'une grille dans son débordement (2 px de plus que la largeur visible) et laissait la boîte glisser de côté au doigt et au pavé tactile ; on ne défile que de haut en bas */
.msg { display: flex; gap: 10px; padding: 10px 0; border-bottom: 1px solid color-mix(in srgb, var(--line) 60%, transparent); }
.msg:last-child { border-bottom: 0; }
.m-body { min-width: 0; flex: 1; display: grid; gap: 4px; }
.m-meta { display: flex; gap: 8px; align-items: baseline; flex-wrap: wrap; font-size: 0.8125rem; }
.m-text { font: 1rem/1.55 var(--f-read); white-space: pre-wrap; overflow-wrap: anywhere; }
.ptag { font-size: 0.75rem; font-weight: 700; padding: 1px 7px; border-radius: 999px; background: var(--surface-2); border: 1px solid var(--line); color: var(--muted); }
.ptag.gen { font-weight: 600; }
.spoiler {
  display: flex; gap: 10px; align-items: center; flex-wrap: wrap; justify-content: space-between;
  padding: 10px 12px; border-radius: 8px; font-size: 0.875rem; color: var(--muted);
  background: repeating-linear-gradient(135deg, var(--spoiler) 0 8px, transparent 8px 16px), var(--surface-2);
  border: 1px dashed var(--line);
}
.msgs-empty { color: var(--muted); padding: 30px 0; text-align: center; }
.compose { border-top: 1px solid var(--line); padding: 12px 16px 14px; display: grid; gap: 8px; }
.compose textarea { min-height: 64px; }
/* V1.7.17 : mentions « @Pseudo » — surlignage dans les messages, liste de choix sous la zone de saisie */
.mention { color: var(--accent); background: var(--accent-soft); border-radius: 6px; padding: 0 4px; font-weight: 600; } /* 1.8.6 (retour de Max, 07/10) : l'encre « sur accent » était blanche sur le fond pâle, illisible sur PC */
.mention.self { color: var(--accent-ink); background: var(--accent); }
.lrow-new.at { margin-right: 4px; }
/* V1.7.18 : inscription (15 ans), mes données, suppression de compte */
.check-row { display: flex; gap: 10px; align-items: flex-start; font-size: 0.875rem; line-height: 1.4; margin: -4px 0 4px; }
.check-row input { width: 20px; height: 20px; margin: 1px 0 0; flex: none; accent-color: var(--accent); }
.login-legal { text-align: center; margin: 6px 0 0; }
.data-acts { display: flex; gap: 8px; flex-wrap: wrap; margin-top: 10px; }
.data-acts .btn.danger { margin-left: auto; }
.notice.danger-notice { background: color-mix(in srgb, var(--danger) 12%, var(--surface)); }
.data-card .notice { margin: 12px 0 0; }
.hello-steps { margin: -6px 0 10px; }
.home-clubs { margin-bottom: 18px; } .home-clubs .lrows { margin-top: 8px; }
.hello-icons { max-height: 168px; overflow: auto; padding: 2px; }
.choice-card { display: flex; gap: 12px; align-items: flex-start; padding: 12px 14px; border: 1px solid var(--line); border-radius: 12px; margin-bottom: 10px; cursor: pointer; }
.choice-card:has(input:checked) { border-color: var(--accent); background: var(--accent-soft); }
.choice-card input { width: 20px; height: 20px; margin: 2px 0 0; flex: none; accent-color: var(--accent); }
.choice-card .pill { margin-left: 6px; vertical-align: middle; }
.compose { position: relative; }
.mention-pick { position: absolute; left: 16px; right: 16px; bottom: calc(100% - 8px); z-index: 5; background: var(--surface); border: 1px solid var(--line); border-radius: 12px; box-shadow: 0 8px 24px rgba(0, 0, 0, .14); padding: 4px; display: grid; max-height: 260px; overflow: auto; }
.mention-pick[hidden] { display: none; }
.mention-opt { display: flex; align-items: center; gap: 10px; width: 100%; min-height: 44px; padding: 6px 10px; border: 0; border-radius: 8px; background: none; color: inherit; font: inherit; text-align: left; cursor: pointer; }
.mention-opt[aria-selected="true"] { background: var(--accent-soft); }
@media (hover: hover) { .mention-opt:hover { background: var(--accent-soft); } }
.compose-row { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
.compose-row select { width: auto; flex: 1 1 180px; }
.compose-row input[type="number"] { width: 90px; }
.compose-hint { margin: 8px 0 0; }
.rate-note { margin: 12px 0 0; }
.rate-note label { font-size: 0.8125rem; font-weight: 600; }
.rate-note textarea { width: 100%; min-height: 60px; }
/* 1.6.3 (retour de Max, 02/10 : bouton mal placé) : « Enregistrer la note » prend la forme des actions de la fiche, collé sous la note, en vert ;
   il n'apparaît que quand la note a changé. Les actions de la fiche gardent 16 px d'air sous la note (audit 3.3). */
.rate-note-act { margin-top: 8px; }
.rate-note-act:has(button[hidden]) { display: none; }
.rate-note ~ .acts:not(.rate-note-act) { margin-top: 16px; }
.track-more { margin-top: 10px; }
.compose-note { padding: 16px; border-top: 1px solid var(--line); display: flex; gap: 10px; align-items: center; flex-wrap: wrap; color: var(--muted); font-size: 0.875rem; }

/* ---------- Connexion ---------- */
.login { min-height: 100vh; min-height: 100dvh; display: grid; place-items: center; padding: 24px 16px; }
.login-card { width: 100%; max-width: 400px; background: var(--surface); border: 1px solid var(--line); border-radius: 14px; padding: 28px 24px; box-shadow: var(--shadow); display: grid; gap: 16px; }
.login-card .brand { font-size: calc(36px * var(--fete-scale, 1)); }
.login-card h1 { font: 600 1.25rem/1.25 var(--f-read); }
.code-input { font: 600 1.5rem/1 var(--f-ui) !important; letter-spacing: .3em; text-align: center; font-variant-numeric: tabular-nums; }
.err { color: var(--danger); font-size: 0.875rem; }
.login-note { background: var(--accent-soft); color: var(--ink); border-radius: 10px; padding: 10px 12px; font-size: 0.875rem; line-height: 1.45; }
.login-links { display: flex; gap: 10px; flex-wrap: wrap; justify-content: space-between; }

/* ---------- Fenêtre modale ---------- */
.overlay { position: fixed; inset: 0; background: rgba(10, 14, 20, .5); z-index: 50; display: grid; place-items: center; padding: 16px; }
.dialog { background: var(--surface); border-radius: 14px; width: 100%; max-width: 520px; max-height: calc(100vh - 32px); overflow: auto; padding: 22px; box-shadow: var(--shadow); }
.dialog h2 { font: 600 1.3125rem/1.2 var(--f-read); margin-bottom: 16px; }
.m-actions { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; margin-top: 8px; }

/* ---------- Toast ---------- */
#toast { position: fixed; left: 50%; bottom: calc(20px + env(safe-area-inset-bottom, 0px)); transform: translate(-50%, 20px); background: var(--ink); color: var(--bg); padding: 10px 16px; border-radius: 10px; font-weight: 600; font-size: 0.875rem; opacity: 0; pointer-events: none; transition: opacity .2s, transform .2s; z-index: 60; max-width: calc(100% - 32px); }
#toast.show { opacity: 1; transform: translate(-50%, 0); }
/* 1.8.108, repris au 1.8.109 (Max, 14/11, 13 h 39 puis 15 h 09, sur maquettes) : tirer pour actualiser, sur l'accueil du téléphone.
   La page descend avec le doigt ; dans le vide qui s'ouvre entre le bandeau et la première tuile, un anneau dans la matière de l'appli
   (verre teinté du moment sur un tableau, carte ordinaire sinon) apparaît en fondu, se dessine avec le tirage, tourne pendant
   l'actualisation, puis s'efface quand la page reprend sa place. #ptr est la hauteur de ce vide (--ptr-h), posée sous le bandeau dans le
   fil de la page : l'anneau y est centré et ne déborde jamais (--ptr-s le réduit tant que la place manque). Sur l'accueil du téléphone,
   le tirage du navigateur lui-même est neutralisé (overscroll-behavior), pour qu'il n'y ait qu'un seul geste. */
#ptr { position: absolute; left: 0; right: 0; top: var(--ptr-top, 59px); height: var(--ptr-h, 0px); z-index: 5; display: grid; place-items: center; pointer-events: none; visibility: hidden; }
#ptr.show { visibility: visible; }
#ptr.anim { transition: height .22s ease; }
.ptr-disc { display: grid; place-items: center; width: 36px; height: 36px; box-sizing: border-box; border-radius: 50%; background: var(--surface); border: 1px solid var(--line); box-shadow: var(--shadow);
  opacity: var(--ptr-o, 0); transform: scale(var(--ptr-s, 0)); }
#ptr.anim .ptr-disc { transition: opacity .18s ease, transform .22s ease; }
html[data-bg="photo"] .ptr-disc { background-color: color-mix(in srgb, var(--glass, var(--surface)) var(--t-mix, 58%), transparent); -webkit-backdrop-filter: blur(24px) saturate(1.5); backdrop-filter: blur(24px) saturate(1.5);
  border: 1px solid var(--t-edge, var(--line)); box-shadow: var(--t-shadow, var(--shadow)); }
.ptr-ring { display: block; width: 20px; height: 20px; transform: rotate(-90deg); }
.ptr-track { fill: none; stroke: color-mix(in srgb, var(--ink) 16%, transparent); stroke-width: 2.5; }
.ptr-arc { fill: none; stroke: var(--accent); stroke-width: 2.5; stroke-linecap: round; stroke-dasharray: 50.27; stroke-dashoffset: calc(50.27px * (1 - var(--ptr, 0))); }
#ptr[data-state="armed"] .ptr-arc { stroke-dashoffset: 0; }
#ptr[data-state="busy"] .ptr-arc { stroke-dashoffset: 16px; }
#ptr[data-state="busy"] .ptr-ring { animation: ptr-spin .8s linear infinite; }
@keyframes ptr-spin { from { transform: rotate(-90deg); } to { transform: rotate(270deg); } }
@media (prefers-reduced-motion: reduce) { #ptr.anim, #ptr.anim .ptr-disc { transition: none; } #ptr[data-state="busy"] .ptr-ring { animation: none; } #ptr[data-state="busy"] .ptr-arc { stroke-dashoffset: 0; } }
@media (max-width: 820px) { html:has(body[data-route="home"]) { overscroll-behavior-y: contain; } }

@media (max-width: 520px) {
  .row2 { grid-template-columns: 1fr; }
  .books { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 22px 14px; }
  @supports (grid-template-rows: subgrid) { .books { row-gap: 0; } .books > .book { padding-bottom: 22px; } }
  .page-head h1 { font-size: 1.5625rem; }
  .me span.me-name { display: none; }
  .tool span:not(.badge) { display: none; }
  .tool { padding: 8px 10px; }
  .top-in { flex-wrap: nowrap; }
  .brand { font-size: calc(18px * var(--fete-scale, 1)); }
}
@media (prefers-reduced-motion: reduce) { * { transition: none !important; animation: none !important; scroll-behavior: auto !important; } }

/* ---------- Mobile d'abord (80 % des visites) ---------- */
input, select, textarea { font-size: 1rem; } /* évite le zoom automatique d'iOS */
.av.sm { width: 24px; height: 24px; font-size: 0.75rem; }
.tabbar, .seg { display: none; }
details.track > summary { cursor: pointer; list-style-position: inside; }
details.track > summary::-webkit-details-marker { color: var(--muted); }
details.track:not([open]) > summary { margin-bottom: 0; }
.sum-note { text-transform: none; letter-spacing: 0; font-weight: 600; }
details.track[open] .sum-note { display: none; }

@media (max-width: 820px) {
  /* V1.6.2 (retour de Max) : le bandeau (logo et nom de l'appli) reste en haut quand on fait défiler (il était « static »).
     Relecture de Fable (01/10, 1 h 45, capture de Max en prod) : en « sticky », l'appli installée sur iPhone ouvrait la page en position
     de rebond (bandeau et contenu descendus d'un bloc jusqu'au premier défilement, barre du bas bien placée) ; le bandeau est donc en
     « fixed », comme la barre du bas, éprouvée. Le corps réserve sa hauteur (44 px + zone d'encoche). */
  .top { position: fixed; top: 0; left: 0; right: 0; z-index: 10; background: var(--bar); border-bottom: 1px solid var(--line); backdrop-filter: blur(12px) saturate(1.1); -webkit-backdrop-filter: blur(12px) saturate(1.1); }
  .top .tools, .top .me { display: none; }
  .top-in { padding: calc(14px + env(safe-area-inset-top, 0px)) 16px 10px; }
  .top { padding-top: 0; }
  body { padding-top: var(--top-h, calc(45px + env(safe-area-inset-top, 0px))); padding-bottom: calc(64px + env(safe-area-inset-bottom, 0px)); } /* --top-h : hauteur réelle du bandeau (app.js), plus haut pendant une fête */
  /* 1.8.86 (décision de Max, 7/11, 15 h 12 : « comme les autres pages, le bandeau… abracadabook avec les infos de série ») : dans une lecture, le bandeau
     de l'appli reste affiché et fixé en haut, comme partout ; il était masqué sur téléphone depuis le 1.8.25 (place à la discussion) et la carte du livre
     passait sous l'heure de l'appli installée (capture de Max de 14 h 54 ; le 1.8.85 avait posé une simple bande de verre, remplacée par ceci). */
  body.typing .top { position: absolute; } /* clavier ouvert (Nouvelle lecture, profil) : iOS déplace les éléments fixes, le bandeau suit la page à la place */
  body[data-route="home"] main { margin-top: 12px; }   /* 1.8.12 (Q-11, Max, 09/10) : la carte d'accueil à la même hauteur que les autres écrans (avant : 36 px) */
  body.typing { padding-bottom: 0; }

  .tabbar {
    display: flex; position: fixed; left: 0; right: 0; bottom: 0; z-index: 20;
    background: var(--bar); border-top: 1px solid var(--line);
    backdrop-filter: blur(14px) saturate(1.1); -webkit-backdrop-filter: blur(14px) saturate(1.1);
    padding: 4px 4px calc(4px + env(safe-area-inset-bottom, 0px));
  }
  .tabbar > a, .tabbar > span, .tabbar > button {
    flex: 1; position: relative; min-height: 52px; border-radius: 12px; border: 0; background: transparent; font-family: inherit; cursor: pointer; padding: 0;
    display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 3px;
    color: var(--muted); text-decoration: none; font-size: 0.75rem; font-weight: 600;
    -webkit-tap-highlight-color: transparent;
  }
  .tabbar svg { width: 22px; height: 22px; }
  .tabbar > a, .tabbar > span, .tabbar > button { font-size: 0.75rem; } /* 1.6.3 (audit 2.1) : 12 px minimum */
  #toast { bottom: calc(98px + env(safe-area-inset-bottom, 0px)); } /* 1.6.3 (audit 4.3) : au-dessus de la barre du bas, qui reste touchable ; 1.8.12 (Q-3) : au-dessus du disque Lire aussi (il monte de 22 px au-dessus de la barre) */
  body.typing #toast { bottom: calc(20px + env(safe-area-inset-bottom, 0px)); }
  /* 1.6.3 (audit 2.3, 2.4) : au coucher du soleil, le vert actif de la barre et le mot « Bronze » passaient juste sous 4,5:1 sur le verre abricot */
  .tabbar [aria-current="page"] { color: var(--accent); }
  html[data-phase="coucher"] .tabbar [aria-current="page"] { color: #224F3A; }
  .tabbar [aria-current="page"] .av { box-shadow: 0 0 0 2px var(--accent); }
  .tabbar [aria-disabled="true"] { opacity: .4; }
  .tabbar .badge { position: absolute; top: 4px; left: calc(50% + 5px); }
  .tabbar > button.lire i { display: grid; place-items: center; width: 46px; height: 46px; border-radius: 50%; background: var(--accent); color: var(--accent-ink, #fff); margin-top: -22px; box-shadow: 0 6px 16px rgba(0, 0, 0, .25); border: 3px solid var(--surface); }
  .tabbar > button.lire span { color: var(--accent); font-weight: 700; }
  .tabbar > button.lire.on i { animation: breathe 2.4s ease-in-out infinite; }
  body.timer-on:not(.timer-open) main { padding-bottom: 150px; }
  /* 1.8.88 (régression du 1.8.87 : « forum avec pastille : le bouton Envoyer reste touchable ») : la page s'ouvrant en haut, la zone d'écriture collante
     est tirée jusqu'au bord haut du forum et ne peut pas remonter davantage ; avec « bottom: 134px » elle restait sous la pastille du chrono. Dans une
     lecture, c'est la pastille qui monte au-dessus de la zone d'écriture (160 px : textarea, ligne du bouton, citation éventuelle). */
  body.timer-on[data-route="session"]:not(.timer-open) #timer .mini { bottom: calc(74px + 160px + env(safe-area-inset-bottom, 0px)); }
  body.typing #timer .mini { display: none; }
  body.typing .tabbar { display: none; }

  .seg { display: flex; gap: 2px; background: var(--surface-2); border: 1px solid var(--line); border-radius: 12px; padding: 3px; margin-bottom: 18px; }
  .seg button { flex: 1; border: 0; background: transparent; min-height: 40px; border-radius: 9px; font-weight: 600; color: var(--muted); cursor: pointer; }
  .seg button[aria-pressed="true"] { background: var(--surface); color: var(--ink); box-shadow: var(--shadow); }
  .home[data-tab="feed"] .home-main, .home[data-tab="books"] .home-side, .home[data-tab="sessions"] .home-main { display: none; }
  .home[data-tab="feed"] .home-sessions, .home[data-tab="sessions"] .home-now, .home[data-tab="sessions"] .home-feed, .home[data-tab="sessions"] .home-clubs { display: none; }   /* 1.8.75 (recette de Max, 6/11, retour 1) : « Les clubs, pour commencer » sous Activité seulement, pas sous Lectures */

  .forum { min-height: 0; }
  .msgs { padding: 4px 14px; }   /* 1.8.75 (retour 10) : la conversation garde sa propre zone de défilement (62 vh), comme le salon d'un club ; avant, toute la page défilait */
  #sv-compose { position: sticky; bottom: calc(60px + env(safe-area-inset-bottom, 0px)); z-index: 5; }
  body.typing #sv-compose { bottom: 0; }
  .compose { background: var(--surface); border-radius: 14px; box-shadow: 0 -8px 18px rgba(0, 0, 0, .08); padding: 10px 12px; gap: 8px; }
  /* 1.8.75 (retour 11, maquette) : dans un club, « Envoyer » à droite du champ ; le mode lent et l'erreur passent dessous sur toute la largeur */
  .club-compose { grid-template-columns: minmax(0, 1fr) auto; grid-auto-flow: dense; align-items: end; }
  .club-compose > * { grid-column: 1 / -1; }
  .club-compose textarea { grid-column: 1; }
  .club-compose .compose-row { display: contents; }
  .club-compose .compose-row > .grow { grid-column: 1 / -1; }
  .club-compose .compose-row > .grow:empty { display: none; }
  .club-compose .compose-row > .btn { grid-column: 2; }
  html[data-bg="photo"] .compose { background: color-mix(in srgb, var(--glass, var(--surface)) 60%, transparent); -webkit-backdrop-filter: blur(18px) saturate(1.3); backdrop-filter: blur(18px) saturate(1.3); border: 1px solid var(--t-edge, var(--line)); box-shadow: var(--t-shadow, var(--shadow)); }   /* 1.8.75 (retour 11) : même verre que les cartes */
  /* 1.8.6 (retour de BlackCat, 07/10) : la bande « Rejoins la lecture… » est collée en bas comme la zone d'écriture : même fond, sinon elle passe par-dessus le titre Discussion */
  #sv-compose .compose-note { background: var(--surface); border-radius: 0 0 12px 12px; box-shadow: 0 -8px 18px rgba(0, 0, 0, .08); padding: 12px; }
  .compose > label, .compose-row > label, .compose-hint { display: none; }
  .compose textarea { min-height: 46px; height: 46px; }
  .compose textarea:focus, .compose textarea:not(:placeholder-shown) { height: 96px; } /* V1.6.2 : pas de saut tant qu'un brouillon est là */

  /* Audit du projet, point 10 (Max, 06/10, 8 h 49) : zones tactiles de 44 px sur téléphone, sans changer l'apparence (le lien garde
     sa place grâce à la marge négative) ; textes à 12 px minimum (les 11 px sont passés à 12 partout) */
  .btn, .btn.sm, .more-btn, .shelf-add, .seg button, .seg.club-tabs button, .acts > button, .mode { min-height: 44px; }
  /* 1.8.75 (recette de Max, 6/11, retours 2-4 : « la bulle épaissit le bandeau », « Favori trop épais », « pareil pour Voir plus ») : les pastilles
     (.chip, série du bandeau) reprennent leur hauteur fine ; la zone tactile de 44 px est faite d'une bordure transparente haut/bas que des marges
     négatives compensent (le trait visible passe en ombre intérieure, le fond s'arrête au rembourrage). Les vrais boutons restent à 44 px. */
  .chip { border-width: 8px 0; border-color: transparent; background-clip: padding-box; margin-top: -8px; margin-bottom: -8px; box-shadow: inset 0 0 0 1px var(--line); border-radius: 14px / 22px; }   /* 1.8.76 (Max, 18 h 43 : « une pointe en extrémité ») : l'arrondi se calcule sur la bulle visible (rayon intérieur 14 px, rond), pas sur la boîte tactile */
  .chip[aria-pressed="true"] { background-clip: padding-box; border-color: transparent; }   /* 1.8.76 (Max, 18 h 43 : « l'état utilisé récupère une taille grande ») : le fond coché reste dans la bulle (le raccourci background remettait border-box) */
  .chip[aria-pressed="true"] { box-shadow: inset 0 0 0 1px var(--ink); }
  html[data-bg="photo"] .chip:not([aria-pressed="true"]) { box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--ink) 30%, transparent); }
  @media (hover: hover) { .badges-title .badges-toggle:hover { box-shadow: inset 0 0 0 1px var(--ink); } }
  .feed-filters .chip { border-width: 10px 0; margin-top: -10px; margin-bottom: -10px; border-radius: 12px / 22px; }   /* rembourrage plus petit (3 px) : bordure plus haute pour les 44 px */
  .badges-title .badges-toggle.chip { border-width: 10px 0; margin-top: -10px; margin-bottom: -10px; box-shadow: none; }   /* « Voir plus » : 26 px visibles, 46 de boîte ; 1.8.76 : fantôme, donc sans le trait (Max, 18 h 43) */
  .chips { row-gap: 8px; }   /* les zones tactiles de deux rangées se recouvrent de 8 px, les pastilles gardent leur air */
  .shelf-add, .more-btn { min-width: 44px; }
  .linkbtn { min-height: 44px; padding: 12px 6px; margin: -12px -6px; }
  .overlay { align-items: end; padding: 0; }
  .dialog { border-radius: 18px 18px 0 0; max-height: 92vh; max-height: 92dvh; padding-bottom: calc(22px + env(safe-area-inset-bottom, 0px)); }
}
.sv-card { display: grid; gap: 14px; }
.launched { flex-basis: 100%; }
.more > summary { list-style: none; }
.more > summary::-webkit-details-marker { display: none; }
.more[open] > summary { background: var(--surface-2); color: var(--ink); }
.more-menu { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 8px; }
.more { flex-basis: auto; }
@media (max-width: 820px) {
  .sv-side { gap: 10px; }
  .sv-side .card { padding: 12px 14px; }
  .sv-card { gap: 10px; }
  .sv-head { gap: 12px; align-items: center; }
  .sv-head .cover.sm { width: 46px; padding: 7px 6px 6px 9px; }
  .sv-head .cover.sm .c-title { font-size: 8px; }
  .sv-head h1 { font-size: 1.1875rem; }
  .sv-head-txt { gap: 4px; }
  .more[open] { flex-basis: 100%; }
  .member-more[open], .club-head .more[open] { flex-basis: auto; }   /* 1.8.12 (Q-4) : ces deux menus sont posés en absolu, le bouton reste à sa place quand ils s'ouvrent */
  #pg-range { display: none; }
  .mine-quick { margin-top: 8px; }
  .panel-title { margin-bottom: 8px; }
  details.track:not([open]) { padding-block: 10px; }
  .back { margin-bottom: 10px; }
}
@media (max-width: 820px) {
  body[data-route="session"] .back { display: none; }   /* 1.8.86 : le bandeau reste (décision de Max) ; seul « ← Lectures » est retiré, la barre du bas y mène */
  body[data-route="session"] main { margin-top: 10px; }
  .sv-card { position: relative; }
  .sv-card .sv-head-txt { padding-right: 44px; }
  .more-btn { position: absolute; top: 8px; right: 8px; letter-spacing: 1px; }
  /* 1.8.86 (CI rouge depuis le 6/11 sur v1-8-75 (3) : « besideMenu: false » sur le runner) : dans l'en-tête d'un club, le ••• n'est plus posé en absolu —
     avec une police de repli plus large, le bouton dépassait ses 44 px et chevauchait l'étoile Favori ; en flux dans .club-acts, il prend sa vraie
     largeur et l'étoile reste à sa gauche, alignée en haut. */
  .club-acts .more { width: auto; }
  .club-acts .more-btn { position: static; }
  /* 1.8.11 (A-R6) : sur téléphone le bouton ••• est posé en absolu ; son conteneur (largeur 0) ne réservait aucune place, et la ligne
     « 2 membres · responsable : … » filait dessous. Il garde désormais la largeur du bouton (44 px + 8 px de marge). */
  .club-head .more, .member-more { width: 52px; min-height: 44px; }   /* 1.8.12 (Q-4) : la page d'un membre aussi : le menu ••• ne recouvre plus son bouton */
  .member-head > .grow { flex-basis: 200px; }   /* 1.8.12 (Q-4) : le bouton ••• reste sur la ligne du pseudo, à droite */
  .launched { display: none; }
  #sv-mine .panel-title { display: none; }
  #sv-mine .mine-row label { display: none; }
  #sv-mine .mine-row input[type="number"] { width: 84px; }
}

/* ---------- V1.1 : profils, badges, streaks ---------- */
.person-top { text-decoration: none; color: inherit; }
@media (hover: hover) { a.person-top:hover strong { text-decoration: underline; } }
.feed-av, .feed-name { text-decoration: none; color: inherit; }
/* 1.8.16 (audit du 14/10, X4) : les liens d'action font au moins 44 px de haut sur l'écran tactile (ils faisaient 17 à 26 px) */
@media (pointer: coarse) { .feed-name, .back, .feed-av { min-height: 44px; display: inline-flex; align-items: center; } }   /* 1.8.75 : .top-streak retirée (sa zone de 44 px est un pseudo-élément, voir plus bas) */
/* 1.8.62 (X4, suite) : les dernières cibles sous 44 px sur l'écran tactile, sans bouger les lignes (marges négatives qui compensent le rembourrage) */
@media (pointer: coarse) {
  .brand-link { min-height: 44px; display: inline-flex; align-items: center; }
  .top-streak { position: relative; }   /* 1.8.75 (retour 2) : bulle fine, zone tactile de 44 px invisible autour */
  .top-streak::before { content: ''; position: absolute; left: -6px; right: -6px; top: -10px; bottom: -10px; }
  .top-in { padding-top: calc(8px + env(safe-area-inset-top, 0px)); padding-bottom: 6px; }   /* 1.8.75 : le bandeau redescend (76 → 58 px) */   /* 4/11 (CI rouge sur 8ec2d33) : la zone de 44 px ne prend pas de place dans la barre : à 390 px, « Fête de la musique » doit garder ses 8 px */
  html[data-fete] .top-in > .top-streak { margin-left: -4px; }
  .feed-av { padding: 0 9px; margin: 0 -9px; box-sizing: content-box; }
  .person-top { padding: 9px 0; margin: -9px 0; }
  .feed a:not(.feed-av):not(.feed-name):not(.person-top), .sitem-link, .feed-join, .name-link { padding: 14px 4px; margin: -14px -4px; }
  .feed-name { padding: 0 6px; margin: 0 -6px; }   /* la hauteur fait 44 ; la largeur suit le pseudo (un pseudo de deux lettres reste étroit) */
  .m-meta .linkbtn { position: relative; z-index: 1; }   /* 4/11 : quand la ligne du message se replie sur deux lignes, la zone élargie du pseudo (position: relative, 1.8.18) couvrait « Signaler » ; les boutons passent dessus */
  .btn.sm { min-width: 44px; }
}
/* X4 : les placeholders de nuit étaient à 2,84:1 */
html[data-light="night"] ::placeholder, html[data-phase="nuit-profonde"] ::placeholder { color: #8E94A3; opacity: 1; }

@media (hover: hover) { .feed-name:hover { text-decoration: underline; } }
/* 1.8.18 : nom d'un membre cliquable dans les couloirs d'une lecture, le forum et le salon ; zone de toucher élargie au doigt sans bouger la ligne */
.name-link { color: inherit; text-decoration: none; position: relative; }
.name-link:focus-visible { text-decoration: underline; }
@media (hover: hover) { .name-link:hover { text-decoration: underline; } }
@media (pointer: coarse) { .name-link::after { content: ""; position: absolute; inset: -14px -10px; } }
.streak { display: inline-flex; align-items: center; gap: 3px; font-size: 0.75rem; font-weight: 700; color: var(--muted); padding: 1px 7px; border-radius: 999px; border: 1px solid var(--line); font-variant-numeric: tabular-nums; }
.streak.hot { color: #9A4414; border-color: transparent; background: #FBE7D6; } /* contraste AA (5,4:1) */
html[data-light="night"] .streak.hot { color: #FFB27A; background: #4A2E1E; }
/* 1.8.13 (série, décision de Max du 11/10, option B) : « protégée » = un jour a sauté, un marque-page tient la série : la flamme passe en
   simple contour doré (là, mais pas allumée), le chiffre reste gris, le bord de la pastille est doré */
.streak.saved { border-color: #C9A86A; }
.streak.saved svg { fill: none; stroke: #B08A3E; stroke-width: 1.8; stroke-linejoin: round; }
html[data-light="night"] .streak.saved { border-color: #8A7445; }
html[data-light="night"] .streak.saved svg { stroke: #E0C284; }
.me-sub.saved { color: #B08A3E; }
html[data-light="night"] .me-sub.saved { color: #E0C284; }
.member-head { align-items: center; }
/* 1.8.82 (Max, 7/11, 11 h 08 : « Mes amis sur mobile pas à l'endroit attendu, sur la 2e ligne ») : les deux boutons de mon profil forment un bloc
   insécable ; sur téléphone il prend la ligne entière et se partage l'espace, les deux restent côte à côte */
.me-acts { display: flex; gap: 8px; flex-wrap: nowrap; }
.me-acts .btn { white-space: nowrap; }
@media (max-width: 820px) { .me-acts { width: 100%; } .me-acts .btn { flex: 1 1 0; min-width: 0; justify-content: center; padding-left: 8px; padding-right: 8px; } }
.friend-top { display: flex; gap: 12px; align-items: center; }
.stats { display: grid; grid-template-columns: repeat(auto-fit, minmax(120px, 1fr)); gap: 10px; margin-bottom: 8px; }
.stat { background: var(--surface); border: 1px solid var(--line); border-radius: 12px; padding: 12px 14px; display: grid; gap: 2px; }
.stat b { font: 600 1.5rem/1.1 var(--f-read); }
.stat span { font-size: 0.75rem; color: var(--muted); }
.badges { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); gap: 10px; }
/* 1.8.67 : Mon calendrier — une tuile à part sous Mes livres (décisions de Max du 5/11 ; maquette recherche/calendrier-2026-11-04) */
.home-cal { margin-top: 16px; }
.cal-title { margin: 0 0 8px; }
.cal-head { display: flex; align-items: center; gap: 8px; margin-bottom: 8px; flex-wrap: wrap; }
.cal-head .cal-month { margin: 0; font-size: 1rem; font-weight: 700; flex: 1; text-transform: capitalize; text-align: center; white-space: nowrap; font-variant-numeric: tabular-nums; }
.cal-head .cal-nav { min-width: 44px; min-height: 44px; display: inline-flex; align-items: center; justify-content: center; border: 1px solid var(--line); border-radius: 12px; background: var(--surface); color: var(--ink); font-size: 1.125rem; cursor: pointer; }
.cal-head .cal-views { display: flex; gap: 6px; margin: 0 0 0 4px; }
.cal-head .cal-views .chip { min-height: 36px; }
.cal-dow { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); gap: 4px; font-size: 0.75rem; color: var(--muted); text-transform: uppercase; letter-spacing: .06em; text-align: center; margin-bottom: 4px; }
.cal-grid { position: relative; display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); gap: 4px; }
.cal-day { position: relative; aspect-ratio: 1 / 1.3; border-radius: 10px; background: var(--surface-2); border: 1px solid transparent; padding: 4px 0 0 6px; font: inherit; font-size: 0.75rem; color: var(--muted); display: flex; flex-direction: column; min-width: 0; text-align: left; cursor: default; }
button.cal-day { cursor: pointer; }
.cal-day.out { opacity: .35; }
.cal-day.read { border: 1px dashed var(--accent); color: var(--ink); }
.cal-day.today { box-shadow: inset 0 0 0 2px var(--accent); font-weight: 700; color: var(--ink); }
.cal-day.fin { background: color-mix(in srgb, #D9B96A 18%, var(--surface-2)); }
.cal-day.open { box-shadow: inset 0 0 0 2px var(--accent); }
/* 1.8.78 (Max, 6/11, 20 h 19) : les jours d'avant la création du compte sont grisés : ce qui s'y trouve (lectures passées) est hors statistiques */
.cal-day.before { opacity: .5; }
.cal-day.before.read, .cal-day.before.fin { opacity: .6; border-style: dotted; border-color: var(--muted); background: var(--surface-2); }
.cal-day .cal-n { position: relative; z-index: 1; }
.cal-day .cal-cov { position: absolute; right: 3px; bottom: 3px; width: 44%; max-width: 30px; }
.cal-day .cal-cov .cover { width: 100%; padding: 3px 2px 2px 4px; border-radius: 2px 4px 4px 2px; box-shadow: 0 1px 3px rgba(0,0,0,.25); }
.cal-day .cal-cov .cover::after { inset: 2px 2px 2px 3px; }
.cal-day .cal-cov .c-title { font-size: 6px !important; line-height: 1.1; -webkit-line-clamp: 3; }
.cal-day .cal-cov .c-author { display: none; }
.cal-day .cal-cov.done .cover { outline: 2px solid #D9B96A; outline-offset: 1px; }
.cal-day .cal-done { position: absolute; right: -6px; top: -6px; width: 17px; height: 17px; border-radius: 50%; background: #D9B96A; color: #1F2420; font: 700 0.75rem/17px var(--f-ui); text-align: center; font-style: normal; box-shadow: 0 1px 2px rgba(0,0,0,.3); }
.cal-day .cal-n-books { position: absolute; left: -7px; bottom: -5px; min-width: 18px; height: 18px; padding: 0 5px; border-radius: 999px; background: var(--accent); color: #fff; font: 700 0.75rem/18px var(--f-ui); font-style: normal; text-align: center; box-shadow: 0 1px 2px rgba(0,0,0,.3); }
.cal-pop-pc { position: absolute; z-index: 4; min-width: 240px; max-width: 320px; }
.cal-pop { background: var(--surface); border: 1px solid var(--line); border-radius: 12px; box-shadow: var(--shadow); padding: 8px 12px 10px; display: grid; gap: 6px; font-size: 0.8125rem; color: var(--ink); text-align: left; }
.cal-pop-h { display: flex; align-items: center; gap: 8px; font-weight: 600; color: var(--muted); }
.cal-pop-h span { flex: 1; }
.cal-pop-h .cal-close { min-width: 36px; min-height: 36px; padding: 0; }
.cal-pop-row { display: flex; gap: 8px; align-items: center; text-decoration: none; color: inherit; border-radius: 8px; padding: 2px; }
@media (hover: hover) { .cal-pop-row:hover { background: var(--surface-2); } }
.cal-pop-row .cover { width: 28px; padding: 3px 2px 2px 4px; flex: none; }
.cal-pop-row .cover .c-title { font-size: 6px !important; }
.cal-pop-row .cover .c-author { display: none; }
.cal-pop-t { display: grid; line-height: 1.25; }
.cal-pop-t small { color: var(--muted); }
.cal-pop-t em { color: #8A6A1A; font-style: normal; font-weight: 600; }
.cal-sheet { display: none; margin-top: 8px; }
.cal-sheet[hidden], .cal-foot[hidden] { display: none; }   /* 1.8.78 : nœuds toujours présents, cachés au besoin */
.cal-sum { font-size: 0.8125rem; color: var(--ink); margin: 8px 0 0; }
.cal-foot { display: flex; flex-wrap: wrap; gap: 6px 14px; margin-top: 6px; font-size: 0.75rem; color: var(--muted); align-items: center; }
.cal-foot .cal-mini { display: inline-block; width: 8px; height: 11px; border-radius: 1px 2px 2px 1px; background: #264A41; vertical-align: middle; margin-right: 4px; }
.cal-foot .cal-mini.fin { outline: 2px solid #D9B96A; outline-offset: 1px; }
.cal-year { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 10px; }
.cal-ym { background: var(--surface-2); border: 0; border-radius: 10px; padding: 8px; font: inherit; color: var(--ink); cursor: pointer; text-align: left; }
.cal-ym .cal-ym-h { display: flex; justify-content: space-between; font-size: 0.75rem; font-weight: 700; margin-bottom: 4px; }
.cal-ym .cal-ym-h .num { color: var(--muted); font-weight: 500; }
.cal-ym .cal-ymg { display: grid; grid-template-columns: repeat(7, 1fr); gap: 2px; }
.cal-ym .cal-ymg i { display: block; aspect-ratio: 1; border-radius: 2px; background: var(--line); opacity: .55; }
.cal-ym .cal-ymg i.read { background: var(--accent); opacity: 1; }
.cal-ym .cal-ymg i.book { background: #6A2C39; opacity: 1; }
.cal-ym .cal-ymg i.out { visibility: hidden; }
.cal-ym .cal-ymg i.past { background: var(--muted); opacity: .45; }   /* 1.8.78 : lecture passée (hors statistiques) */
.cal-ym.before { opacity: .55; }
.cal-ym.cur { outline: 2px solid var(--accent); outline-offset: -2px; }
@media (min-width: 861px) { .cal-day { aspect-ratio: auto; height: 72px; } .cal-day .cal-cov { width: 36px; max-width: 36px; right: 4px; bottom: 4px; } .cal-day .cal-cov .c-title { font-size: 7px !important; } }   /* 1.8.70 (Max, 5/11, 18 h 47) : miniature plus grande sur PC (une seule par case, le nombre est sur la pastille) */
@media (max-width: 860px) {
  .home-cal { grid-row: 3; margin-top: 12px; }
  .cal-grid, .cal-dow { gap: 3px; }   /* à 390 px : des cases de 44 px */
  .cal-pop-pc { display: none; } .cal-sheet { display: block; }
  .cal-head .cal-title { flex: 1 0 100%; }
  .cal-head .cal-views { flex: 1 0 100%; justify-content: flex-end; margin: 2px 0 0; } .cal-head .cal-views .chip { min-height: 40px; }
  .cal-year { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}

/* 1.8.65 : répondre à un message — citation au-dessus du message, barre « En réponse à » dans la zone de saisie */
.m-quote { display: grid; gap: 1px; text-align: left; width: 100%; max-width: 100%; margin: 4px 0 4px; padding: 4px 10px; border: 0; border-left: 3px solid var(--accent); border-radius: 0 8px 8px 0; background: color-mix(in srgb, var(--accent-soft) 60%, transparent); color: var(--ink); font: inherit; font-size: 0.8125rem; cursor: pointer; min-height: 36px; }
.m-quote .mq-who { font-weight: 700; color: var(--accent); }
.m-quote .mq-txt { color: var(--muted); overflow-wrap: anywhere; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.m-quote-far { border-left-color: var(--line); }
.m-quote-far .mq-who { color: var(--muted); }
.m-quote:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
.reply-bar { display: flex; align-items: center; gap: 8px; min-width: 0; max-width: 100%; box-sizing: border-box; margin-bottom: 6px; padding: 4px 4px 4px 10px; border-left: 3px solid var(--accent); border-radius: 0 8px 8px 0; background: color-mix(in srgb, var(--accent-soft) 60%, transparent); font-size: 0.8125rem; }
.reply-bar .grow { flex: 1 1 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; min-width: 0; }
.reply-bar .btn { min-width: 44px; min-height: 36px; }
.msg.m-flash { animation: m-flash 1.6s ease-out; }
@keyframes m-flash { 0%, 40% { background: color-mix(in srgb, var(--accent-soft) 80%, transparent); } 100% { background: transparent; } }
@media (prefers-reduced-motion: reduce) { .msg.m-flash { animation: none; } }

/* 1.8.64 (espace sûr) : la boîte « Signalements » de l'animateur, en tête de la discussion d'une lecture */
#sv-reports .club-reports { margin: 10px 16px 4px; }
@media (max-width: 820px) { #sv-reports .club-reports { margin: 8px 14px 4px; } }

/* 1.8.63 : « Voir les messages précédents » en tête de la discussion */
.msgs-older { justify-self: center; margin: 2px 0 6px; min-height: 44px; }
.msgs-new { display: block; position: relative; z-index: 3; margin: -40px auto 12px; padding: 7px 14px; border: 0; border-radius: 999px; background: var(--ink); color: var(--bg); font: 600 0.8125rem var(--f-ui); box-shadow: var(--shadow); cursor: pointer; }   /* 1.8.75 (retour 10) : « ↓ Nouveaux messages » quand on a remonté le fil */
.club-msgs .msgs-older { display: block; margin: 2px auto 6px; }

/* 1.8.62 (X5) : un seul bandeau à la fois ; « 1 / 3 · suivant » fait venir les autres */
.notice-more { display: block; margin: -4px 0 10px auto; background: none; border: 0; color: var(--muted); font-size: 0.75rem; font-weight: 700; min-height: 44px; padding: 0 8px; cursor: pointer; }
@media (hover: hover) { .notice-more:hover { color: var(--ink); text-decoration: underline; } }
/* 1.8.61 : badges compacts sur le profil — une rangée de médaillons (44 px, cible tactile), « Voir plus » déplie les cartes */
.badges-title { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.badges-title .badges-toggle { text-transform: none; letter-spacing: 0; font-size: 0.8125rem; min-height: 36px; display: inline-flex; align-items: center; gap: 4px; border-color: transparent; background: transparent; }   /* 1.8.75 (Max, 6/11, 16 h 19 : « on revient sur texte seul et survol, même comportement pour tous les boutons fantômes ») */   /* 1.8.69 (Max, 5/11) : pastille bordée + chevron, comme « Mois · Année » : « donne pas l'impression d'être interactible » */
.badges-title .badges-toggle .chev { font-size: 0.75rem; line-height: 1; }
@media (hover: hover) { .badges-title .badges-toggle:hover { color: var(--ink); background: var(--surface-2); } }
.badges-compact { display: flex; flex-wrap: wrap; gap: 6px; }
.badges-compact .medal { width: 44px; height: 44px; display: inline-flex; align-items: center; justify-content: center; border-radius: 12px; background: var(--surface); border: 1px solid var(--line); }
.badges-compact .medal.locked .badge-ic { opacity: .5; }
.badges-compact .medal.locked .badge-ic .hex { fill: var(--line); } .badges-compact .medal.locked .badge-ic .hex2 { fill: var(--surface-2); } .badges-compact .medal.locked .badge-ic .glyph { fill: var(--muted); }
.badge-card { display: flex; gap: 12px; align-items: center; background: var(--surface); border: 1px solid var(--line); border-radius: 12px; padding: 10px 12px; }
.badge-card > div { display: grid; gap: 2px; min-width: 0; }
.badge-card strong { font-size: 0.9375rem; }
.badge-card .tier { font-size: 0.75rem; font-weight: 700; text-transform: uppercase; letter-spacing: .06em; }
.badge-card.locked .badge-ic { opacity: .5; } /* 1.6.3 (audit 2.2) : seul l'hexagone est grisé ; le texte « dès 500 » reste lisible (était toute la carte à .55 : 2,7:1) */
.badge-card.locked .tier { color: var(--muted); }
.badge-card.locked .badge-ic .hex { fill: var(--line); } .badge-card.locked .badge-ic .hex2 { fill: var(--surface-2); } .badge-card.locked .badge-ic .glyph { fill: var(--muted); }
.badge-card.t1 .tier { color: #9A5B2C; } .badge-card.t2 .tier { color: #5E6670; } .badge-card.t3 .tier { color: #8A6508; } .badge-card.t4 .tier { color: #2E7179; } .badge-card.t5 .tier { color: #1A7248; } .badge-card.t6 .tier { color: #4A5CC4; } .badge-card.t7 .tier { color: #2A2A36; }
/* niveaux de badge lisibles la nuit (contraste AA, V1.5.5) */
html[data-light="dusk"] .badge-card.t1 .tier { color: #8A4F24; }
html[data-light="night"] .badge-card.t1 .tier { color: #D49A6A; } html[data-light="night"] .badge-card.t2 .tier { color: #B4BCC6; } html[data-light="night"] .badge-card.t3 .tier { color: #E0B84A; } html[data-light="night"] .badge-card.t4 .tier { color: #6FC3CB; } html[data-light="night"] .badge-card.t5 .tier { color: #6FD6A0; } html[data-light="night"] .badge-card.t6 .tier { color: #9AA8F0; } html[data-light="night"] .badge-card.t7 .tier { color: #D8D8E8; }

/* médaillons : hexagone métal + glyphe */
.badge-ic { flex: none; vertical-align: middle; filter: drop-shadow(0 1px 1px rgba(0,0,0,.25)); }
.badge-ic .hex { fill: #8A6A4A; } .badge-ic .hex2 { fill: #C08A5A; } .badge-ic .glyph { fill: #FFF3E3; }
.badge-ic.t1 .hex { fill: #7A4E2A; } .badge-ic.t1 .hex2 { fill: #C48A5B; } .badge-ic.t1 .glyph { fill: #FFF2E0; }
.badge-ic.t2 .hex { fill: #6B7280; } .badge-ic.t2 .hex2 { fill: #C9CED6; } .badge-ic.t2 .glyph { fill: #2B2F36; }
.badge-ic.t3 .hex { fill: #A67C0F; } .badge-ic.t3 .hex2 { fill: #F1C548; } .badge-ic.t3 .glyph { fill: #4A3500; }
.badge-ic.t4 .hex { fill: #2E6F76; } .badge-ic.t4 .hex2 { fill: #8FD5DB; } .badge-ic.t4 .glyph { fill: #0F3A3E; }
/* V1.6 : Émeraude (5), Diamant (6, l'ancien palier 5), Diamant noir (7) */
.badge-ic.t5 .hex { fill: #1E6F48; } .badge-ic.t5 .hex2 { fill: #7FD9A8; } .badge-ic.t5 .glyph { fill: #0B3A24; }
.badge-ic.t6 .hex { fill: #3F52B8; } .badge-ic.t6 .hex2 { fill: #B9C4FF; } .badge-ic.t6 .glyph { fill: #1B2570; }
.badge-ic.t7 .hex { fill: #121218; } .badge-ic.t7 .hex2 { fill: #3C3C4E; } .badge-ic.t7 .glyph { fill: #F4F1FF; }
.badge-ic.t7 { filter: drop-shadow(0 0 3px rgba(190, 170, 255, .55)) drop-shadow(0 1px 1px rgba(0,0,0,.3)); }
@media (max-width: 520px) { .stats { grid-template-columns: repeat(3, minmax(0, 1fr)); } .stat b { font-size: 1.25rem; } .badges-full { grid-template-columns: 1fr; } .cover-pick { grid-template-columns: repeat(4, minmax(0, 1fr)); } }

/* ---------- V1.3 : ISBN, historique ---------- */
.isbn-line { display: flex; gap: 8px; }
/* 1.8.107 (Max, 14/11, 12 h 42 : « la réponse dépasse du cadre ») : les boutons posés sous le message d'une recherche (« autre réponse »,
   « Ne pas utiliser cette couverture ») tiennent dans le formulaire — chacun sur sa ligne, et un libellé long passe à la ligne au lieu de
   sortir du cadre. Ce sont de vrais boutons (bord et fond), pas un texte gras : au téléphone, rien d'autre ne dit qu'ils se touchent. */
#isbn-msg .btn { display: flex; width: fit-content; max-width: 100%; margin-top: 6px; white-space: normal; height: auto; text-align: left; justify-content: flex-start; line-height: 1.3; overflow-wrap: anywhere; }
.isbn-line input { flex: 1; }
.catalog-results { display: grid; gap: 6px; margin: -6px 0 14px; }
.catalog-item { display: flex; gap: 10px; align-items: center; text-align: left; background: var(--surface-2); border: 1px solid var(--line); border-radius: 10px; padding: 8px 10px; cursor: pointer; }
@media (hover: hover) { .catalog-item:hover { border-color: var(--accent); } }
.catalog-item img { width: 36px; height: 54px; object-fit: cover; border-radius: 3px; flex: none; }
.catalog-item .cover.xs { width: 36px; }
.hist { list-style: none; margin: 0; padding: 0; display: grid; }
.hist li { display: grid; grid-template-columns: 1fr auto auto auto; gap: 10px; padding: 7px 0; border-bottom: 1px solid var(--line); font-size: 0.875rem; }
.hist li:last-child { border-bottom: 0; }
.hist li.corr { color: var(--muted); font-style: italic; }

/* ---------- V1.4 : mode lecture ---------- */
@keyframes breathe { 0%, 100% { box-shadow: 0 6px 16px rgba(0, 0, 0, .25), 0 0 0 0 color-mix(in srgb, var(--accent) 45%, transparent); } 50% { box-shadow: 0 6px 16px rgba(0, 0, 0, .25), 0 0 0 10px transparent; } }
.tool.lire { border: 0; background: var(--accent); color: var(--accent-ink, #fff); font-family: inherit; cursor: pointer; }
@media (hover: hover) { .tool.lire:hover { background: var(--accent); color: var(--accent-ink, #fff); filter: brightness(1.08); } }
.tool.lire.on { animation: breathe 2.4s ease-in-out infinite; }
:root { --mood: var(--accent); --mood-ink: var(--accent-ink, #fff); }
html[data-light="dusk"] { --mood: #E5915A; --mood-ink: #2B1608; }
html[data-light="night"] { --mood: #8FCBA5; --mood-ink: #10251A; }
html[data-light="dawn"] { --mood: #D98A93; --mood-ink: #2B0F14; }
.cover-btn { border: 0; padding: 0; background: transparent; cursor: pointer; text-align: left; display: block; width: 100%; border-radius: 6px; -webkit-tap-highlight-color: transparent; }
.cover-btn:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; }
.pace { margin-top: -4px; }
.b-actions .btn svg { width: 16px; height: 16px; margin-right: 4px; vertical-align: -3px; }
.live { display: flex; align-items: center; gap: 4px; font-size: 0.75rem; color: var(--accent); font-weight: 600; white-space: nowrap; overflow: hidden; min-width: 0; margin-top: -4px; }
/* V1.6.2 (relecture de Fable, 01/10) : avec un titre long, c'est le titre qui se coupe (…), la durée « 3 min » reste visible ;
   avant, la ligne entière se coupait et la durée disparaissait sur téléphone (balayage : .dur à 394 px sur 390) */
.live em { font-style: normal; font-weight: 500; min-width: 0; overflow: hidden; text-overflow: ellipsis; }
.live .dur { flex: none; }
.live-dot { display: inline-block; flex: none; width: 8px; height: 8px; border-radius: 50%; background: var(--accent); margin-right: 2px; vertical-align: 1px; animation: breathe-dot 2s ease-in-out infinite; }
@keyframes breathe-dot { 0%, 100% { opacity: 1; } 50% { opacity: .35; } }
.person { min-width: 0; }
/* accueil : lectures communes en cours */
.sess { display: grid; gap: 10px; }
.scard { display: grid; grid-template-columns: minmax(0, 1fr); gap: 8px; }
.scard .row { display: flex; align-items: center; gap: 10px; }
.scard .row.small { font-size: 0.8125rem; }
.scard .bar { height: 6px; }
.cover-link { display: block; }
.sess-new, .sess-all { justify-content: center; }
.sess-new svg, .sess-all svg { width: 16px; height: 16px; margin-right: 4px; }
@media (min-width: 821px) { .sess-all { display: none; } } /* PC : « Toutes les lectures » est dans la barre du haut */
/* feuille d'actions (en bas sur mobile) */
.sheet-wrap { align-items: end; padding: 0; }
.sheet { border-radius: 18px 18px 0 0; max-width: none; padding: 18px 20px calc(24px + env(safe-area-inset-bottom, 0px)); }
@media (min-width: 821px) { .sheet-wrap { place-items: center; padding: 16px; } .sheet { border-radius: 14px; max-width: 520px; padding: 22px; } }
/* V1.6.2 : poignée des fenêtres sur téléphone (on les ferme en les glissant vers le bas) */
@media (max-width: 820px) { #modal .dialog::before { content: ''; display: block; width: 40px; height: 4px; border-radius: 2px; background: var(--muted); opacity: .4; margin: -8px auto 12px; } }
.sheet-book { display: flex; gap: 12px; align-items: center; margin-bottom: 14px; }
.acts { display: grid; gap: 8px; }
.acts > button, .acts > a { width: 100%; min-height: 48px; border-radius: 12px; border: 1px solid var(--line); background: var(--surface-2); color: var(--ink); font: 600 1rem/1.2 var(--f-ui, inherit); font-family: inherit; text-align: left; padding: 8px 14px; display: flex; gap: 12px; align-items: center; cursor: pointer; text-decoration: none; }
.acts > button.primary { background: var(--accent); color: var(--accent-ink, #fff); border-color: transparent; }
.acts > button:disabled { opacity: .5; cursor: default; }
.acts > button small { margin-left: auto; font-weight: 500; font-size: 0.75rem; opacity: .8; }
.acts > button svg { flex: none; width: 20px; height: 20px; }
.acts.pick > button { min-height: 64px; }
.acts.pick .cover.xs, .acts .auto-ic { flex: none; }
.auto-ic { width: 38px; height: 54px; border: 2px dashed var(--line); border-radius: 4px; display: grid; place-items: center; color: var(--muted); font-weight: 700; }
/* Lire : avec ou sans chrono (V1.6) */
.mode-book { margin: 4px 0 14px; padding: 10px 12px; border-radius: 12px; background: var(--surface-2); }
.mode-book strong { display: block; overflow-wrap: anywhere; }
.modes { display: grid; gap: 10px; }
.mode { width: 100%; min-height: 84px; display: flex; align-items: center; gap: 14px; padding: 14px 16px; border-radius: 14px; border: 1px solid var(--line); background: var(--surface); color: var(--ink); font: inherit; text-align: left; cursor: pointer; box-shadow: var(--shadow); transition: border-color .15s, transform .15s; }
.mode:active { transform: scale(.99); }
.mode:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
@media (hover: hover) { .mode:not(:disabled):hover { border-color: var(--accent); } }
.mode:disabled { opacity: .55; cursor: default; box-shadow: none; }
.mode-ic { flex: none; width: 48px; height: 48px; border-radius: 50%; display: grid; place-items: center; background: var(--accent-soft); color: var(--accent); }
.mode-ic svg { width: 24px; height: 24px; }
.mode-tx { flex: 1; min-width: 0; display: grid; gap: 3px; }
.mode-tx strong { font-family: var(--f-read); font-size: 1.1875rem; font-weight: 600; line-height: 1.2; }
.mode-tx span { font-size: 0.875rem; line-height: 1.35; color: var(--muted); }
.mode-go { flex: none; font-size: 1.625rem; line-height: 1; color: var(--muted); }
/* fin de séance */
.stepper { display: flex; align-items: center; justify-content: center; gap: 14px; margin: 14px 0; }
.stepper button { width: 52px; height: 52px; border-radius: 50%; border: 1px solid var(--line); background: var(--surface-2); color: var(--ink); font-size: 1.5rem; cursor: pointer; }
.stepper input { width: 120px; text-align: center; font-size: 2.125rem; font-weight: 700; border: 0; border-bottom: 2px solid var(--line); background: transparent; color: var(--ink); border-radius: 0; padding: 4px; }
.stepper input:focus { outline: none; border-bottom-color: var(--accent); }
.kpi { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; margin: 6px 0 16px; }
.kpi div { background: var(--surface-2); border-radius: 10px; padding: 8px; text-align: center; display: grid; gap: 2px; }
.kpi b { font-size: 1.125rem; } .kpi span { font-size: 0.75rem; color: var(--muted); }
/* chrono : pastille repliée */
#timer .mini { position: fixed; left: 12px; width: calc(100% - 24px); box-sizing: border-box; bottom: calc(74px + env(safe-area-inset-bottom, 0px)); z-index: 30; display: flex; align-items: center; gap: 10px; padding: 4px 8px 4px 4px; border-radius: 14px; border: 1px solid var(--line); background: color-mix(in srgb, var(--surface) 94%, transparent); color: var(--ink); box-shadow: 0 8px 24px rgba(0, 0, 0, .18); backdrop-filter: blur(8px); -webkit-backdrop-filter: blur(8px); }
#timer .mini .t { border: 0; background: transparent; color: inherit; font-family: inherit; cursor: pointer; text-align: left; padding: 6px 10px; min-height: 44px; border-radius: 10px; }
#timer .mini .pp { border: 0; cursor: pointer; font-family: inherit; }
@media (min-width: 821px) { #timer .mini { left: auto; right: 24px; bottom: 24px; width: 340px; } }
#timer .mini .t { flex: 1; min-width: 0; display: grid; overflow: hidden; }
#timer .mini .t strong { font-size: 0.875rem; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
#timer .mini .t span { font-size: 0.75rem; color: var(--muted); }
#timer .mini .time { font-weight: 700; font-size: 1.125rem; font-variant-numeric: tabular-nums; }
#timer .mini .pp { width: 38px; height: 38px; border-radius: 50%; background: var(--accent-soft); color: var(--accent); display: grid; place-items: center; font-size: 0.875rem; }
/* chrono : plein écran */
#timer .chrono { position: fixed; inset: 0; z-index: 45; display: flex; flex-direction: column; align-items: center; justify-content: space-between; padding: calc(14px + env(safe-area-inset-top, 0px)) 24px calc(36px + env(safe-area-inset-bottom, 0px)); color: #fff; text-align: center; background: linear-gradient(180deg, rgba(10, 14, 20, .25), rgba(10, 14, 20, .55) 60%, rgba(10, 14, 20, .78)); animation: fadein .35s ease; }
html:not([data-bg="photo"]) #timer .chrono { background: linear-gradient(180deg, rgba(10, 14, 20, .55), rgba(10, 14, 20, .85)); }
@keyframes fadein { from { opacity: 0; } to { opacity: 1; } }
body.timer-open #app { opacity: 0; transition: opacity .4s ease; pointer-events: none; }
#app { transition: opacity .4s ease; }

/* ----- Écran de chargement (lot de polish, 05/10 ; décision de Max 20 h 41) : l'icône en fondu puis en respiration, le nom dessous.
   Retiré par app.js au premier rendu, ou à 2,5 s ; rien en mode calme. ----- */
#splash { position: fixed; inset: 0; z-index: 60; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 14px; background: var(--bg); color: var(--ink); transition: opacity .28s ease; }
#splash.out { opacity: 0; pointer-events: none; }
html.calm-boot #splash { display: none; }
#splash svg { width: 104px; height: 104px; overflow: visible; }
#splash .cover { fill: #1F3D33; } #splash .page { fill: #FCFBF6; stroke: #1F3D33; stroke-width: 2.2; stroke-linejoin: round; }
#splash .lines { fill: none; stroke: #1F3D33; stroke-width: 1.3; stroke-linecap: round; opacity: .45; } #splash .mark, #splash .star { fill: #C9A86A; }
html[data-phase="crepuscule"] #splash .cover, html[data-phase="nuit"] #splash .cover, html[data-phase="nuit-profonde"] #splash .cover { fill: #DCE7E0; }
html[data-phase="crepuscule"] #splash .page, html[data-phase="nuit"] #splash .page, html[data-phase="nuit-profonde"] #splash .page { fill: #262B29; stroke: #DCE7E0; }
html[data-phase="crepuscule"] #splash .lines, html[data-phase="nuit"] #splash .lines, html[data-phase="nuit-profonde"] #splash .lines { stroke: #DCE7E0; }
#splash .wordmark { font-family: var(--f-read); font-size: 1.25rem; letter-spacing: .02em; }
/* V2 « le livre s'ouvre », choisie par Max le 05/10 à 21 h 12 (« V2 est super ! ») : les deux pages s'ouvrent depuis la reliure,
   les lignes apparaissent, l'étoile surgit puis respire ; le nom se resserre en dessous. */
#splash svg { animation: splash-in .5s ease-out both; }
#splash .page-l, #splash .page-r { transform-origin: 32px 20px; animation: splash-open 1.1s cubic-bezier(.2, .8, .2, 1) .35s both; }
#splash .lines { animation: splash-fade .6s ease-out 1.1s both; }
#splash .star { transform-origin: 32px 7px; animation: splash-star .8s ease-out 1.25s both, splash-breathe 2.6s ease-in-out 2.1s infinite; }
#splash .wordmark { animation: splash-word .9s ease-out 1.2s both; }
@keyframes splash-in { from { opacity: 0; transform: translateY(6px); } to { opacity: 1; transform: none; } }
@keyframes splash-open { from { transform: scaleX(.04); } to { transform: scaleX(1); } }
@keyframes splash-fade { from { opacity: 0; } to { opacity: .45; } }
@keyframes splash-star { from { opacity: 0; transform: scale(.2) rotate(-40deg); } to { opacity: 1; transform: none; } }
@keyframes splash-breathe { 0%, 100% { transform: scale(1); } 50% { transform: scale(1.12); } }
@keyframes splash-word { from { opacity: 0; letter-spacing: .18em; } to { opacity: 1; letter-spacing: .02em; } }
@media (prefers-reduced-motion: reduce) { #splash *, #splash svg { animation: none !important; } }
body.timer-open { overflow: hidden; }
#timer .grab { width: 44px; height: 24px; border: 0; background: transparent; cursor: pointer; position: relative; }
#timer .grab::before { content: ''; position: absolute; left: 4px; right: 4px; top: 10px; height: 5px; border-radius: 3px; background: rgba(255, 255, 255, .55); }
#timer .c-mid { display: grid; gap: 4px; justify-items: center; }
#timer .big { font-size: 72px; font-weight: 300; letter-spacing: -1px; line-height: 1; font-variant-numeric: tabular-nums; text-shadow: 0 2px 18px rgba(0, 0, 0, .5); }
#timer .chrono.paused .big { opacity: .6; }
#timer .clock { font-size: 0.9375rem; opacity: .8; margin-top: 8px; }
#timer .c-book { font-family: var(--f-read); font-size: 1.375rem; margin-top: 26px; text-shadow: 0 1px 10px rgba(0, 0, 0, .6); max-width: 90vw; }
#timer .c-meta { font-size: 0.9375rem; opacity: .9; margin-top: 4px; }
#timer .c-hint { font-size: 0.875rem; opacity: .8; margin-top: 16px; }
#timer .c-bottom { display: grid; gap: 18px; justify-items: center; }
#timer .ctl { display: flex; gap: 14px; align-items: center; flex-wrap: wrap; justify-content: center; }
/* V1.6 : libellés explicites (« Mettre en pause », « Terminer la séance ») dans des boutons en pilule */
#timer .ctl button { min-width: 150px; height: 56px; padding: 0 20px; gap: 8px; margin: 0; display: inline-flex; align-items: center; justify-content: center; text-align: center; white-space: nowrap; border-radius: 999px; border: 1px solid rgba(255, 255, 255, .45); background: rgba(255, 255, 255, .14); color: #fff; font: 600 0.9375rem/1 inherit; font-family: inherit; letter-spacing: -.01em; backdrop-filter: blur(6px); -webkit-backdrop-filter: blur(6px); cursor: pointer; -webkit-appearance: none; appearance: none; }
#timer .ctl button svg { width: 18px; height: 18px; flex: none; }
#timer .ctl button.stop { background: var(--mood); color: var(--mood-ink); border-color: transparent; box-shadow: 0 0 0 6px color-mix(in srgb, var(--mood) 25%, transparent); }
#timer .c-strk { font-size: 0.8125rem; opacity: .8; }
/* V1.6 : animation douce pendant la séance (halo qui respire, poussières de lumière), à l'arrêt pendant une pause */
#timer .c-aura { position: absolute; inset: 0; pointer-events: none; overflow: hidden; z-index: 0; transition: opacity 1.2s ease; }
#timer .chrono > :not(.c-aura) { position: relative; z-index: 1; }
#timer .c-aura .halo { position: absolute; left: 50%; top: 40%; width: min(86vw, 520px); aspect-ratio: 1; border-radius: 50%; background: radial-gradient(circle, color-mix(in srgb, var(--mood, #FFE2A8) 42%, transparent) 0%, color-mix(in srgb, var(--mood, #FFE2A8) 12%, transparent) 45%, transparent 70%); transform: translate(-50%, -50%) scale(.92); opacity: .45; animation: aura-breathe 8s ease-in-out infinite; }
@keyframes aura-breathe { 0%, 100% { transform: translate(-50%, -50%) scale(.92); opacity: .45; } 50% { transform: translate(-50%, -50%) scale(1.06); opacity: .9; } }
#timer .c-aura i { position: absolute; bottom: -12px; border-radius: 50%; background: rgba(255, 244, 214, .8); box-shadow: 0 0 10px rgba(255, 236, 190, .85); opacity: 0; animation-name: aura-drift; animation-timing-function: linear; animation-iteration-count: infinite; }
@keyframes aura-drift { 0% { transform: translate(0, 0); opacity: 0; } 15% { opacity: .7; } 80% { opacity: .45; } 100% { transform: translate(var(--dx, 0), -104vh); opacity: 0; } }
#timer .chrono.paused .c-aura { opacity: .35; }
#timer .chrono.paused .c-aura * { animation-play-state: paused; }
#timer .mini .pulse { flex: none; width: 8px; height: 8px; border-radius: 50%; background: var(--accent); animation: soft-pulse 4s ease-in-out infinite; }
#timer .mini .pulse.off { animation: none; opacity: .35; }
@keyframes soft-pulse { 0%, 100% { opacity: .35; transform: scale(.85); } 50% { opacity: 1; transform: scale(1.15); } }
@media (prefers-reduced-motion: reduce) { #timer .c-aura .halo, #timer .mini .pulse { animation: none; } #timer .c-aura i { display: none; } }
#timer .c-strk .linkbtn { color: inherit; opacity: .9; }
.stats-timer { margin-top: -2px; }
@media (prefers-reduced-motion: reduce) { .tabbar > button.lire.on i, .tool.lire.on { animation: none; } #timer .chrono { animation: none; } body.timer-open #app { transition: none; } #app { transition: none; } }

/* ---------- V1.4.1 : retours ---------- */
.fb-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 10px; }
.fb-item { border: 1px solid var(--line); border-radius: 10px; padding: 10px 12px; display: grid; gap: 6px; }
.fb-item.new { border-color: var(--accent); background: var(--accent-soft); }
.fb-top { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
.fb-item, .fb-item a { overflow-wrap: anywhere; min-width: 0; } /* 03/10 : adresse de contexte sans espace (« #/lecture/… ») */
.fb-item p { white-space: pre-wrap; margin: 0; font-size: 0.875rem; overflow-wrap: anywhere; }
.me .badge { position: static; margin-left: 6px; }
.pill.bug { background: #F8E1DE; color: #8A2A22; border-color: transparent; }
html[data-light="night"] .pill.bug { background: #4A2622; color: #F2B3AB; }

/* ---------- V1.4.5 : choix du livre (Nouvelle lecture), actions du livre dans une lecture ---------- */
.book-pick { display: grid; gap: 10px; }
.src-toggle { display: flex; gap: 2px; background: var(--surface-2); border: 1px solid var(--line); border-radius: 12px; padding: 3px; }
.src-toggle label { flex: 1; position: relative; }
.src-toggle input { position: absolute; opacity: 0; inset: 0; margin: 0; cursor: pointer; }
.src-toggle span { display: flex; align-items: center; justify-content: center; min-height: 38px; padding: 0 8px; border-radius: 9px; font-weight: 600; font-size: 0.875rem; color: var(--muted); text-align: center; line-height: 1.2; }
.src-toggle input:checked + span { background: var(--surface); color: var(--ink); box-shadow: var(--shadow); }
.src-toggle input:focus-visible + span { outline: 2px solid var(--accent); outline-offset: 1px; }
#sf-q { width: 100%; margin-bottom: 8px; }
#sf-sugg { display: grid; gap: 6px; max-height: 320px; overflow-y: auto; }
#sf-sugg .catalog-item { width: 100%; }
.catalog-item.chosen { cursor: default; border-color: var(--accent); }
@media (hover: hover) { .catalog-item.chosen:hover { border-color: var(--accent); } }
.catalog-item .grow { min-width: 0; }
.sv-book { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; margin-top: 12px; padding-top: 12px; border-top: 1px solid var(--line); }
.sv-book .small { flex-basis: 100%; }
.end-warn { background: color-mix(in srgb, var(--danger) 10%, var(--surface)); border: 1px solid color-mix(in srgb, var(--danger) 35%, transparent); color: var(--ink); border-radius: 10px; padding: 8px 10px; font-size: 0.875rem; margin: 8px 0; }

/* ---------- V1.5 : rayons (Mes livres, Toutes les lectures) ---------- */
.shelf { margin-top: 22px; }
.page-head + .shelf { margin-top: 6px; }
.shelf-h { display: flex; align-items: center; gap: 8px; margin-bottom: 10px; }
.shelf-h h2 { margin: 0; font: 600 1.25rem/1.2 var(--f-read); }
.shelf-h .n { color: var(--muted); font-size: 0.875rem; }
.shelf-add { width: 36px; height: 36px; padding: 0; display: inline-grid; place-items: center; }
.shelf-add svg { width: 18px; height: 18px; }
.shelf-wrap { position: relative; }
/* 1.6.3 (retour de Palakoslip, 02/10 : « on peut dézoomer sur le profil ») : le rayon est le repère de ce qu'il contient. Sans cela, le texte
   invisible « Avis : J'adore » d'un livre noté (position absolue, .sr-only) prenait pour repère .shelf-wrap, échappait au rognage du rayon
   et élargissait la page jusqu'au dernier livre noté (685 px au lieu de 390) : iOS laissait alors dézoomer. */
.shelf-track { position: relative; display: flex; align-items: flex-start; gap: 14px; overflow-x: auto; overscroll-behavior-x: contain; scroll-snap-type: x mandatory; scroll-padding-left: 0; padding: 2px 2px 6px; scrollbar-width: none; -webkit-overflow-scrolling: touch; }
.shelf-track::-webkit-scrollbar { display: none; }
.shelf-wrap.more-right .shelf-track { -webkit-mask-image: linear-gradient(90deg, #000 calc(100% - 64px), transparent); mask-image: linear-gradient(90deg, #000 calc(100% - 64px), transparent); }
.shelf-wrap.more-right.more-left .shelf-track { -webkit-mask-image: linear-gradient(90deg, transparent, #000 40px, #000 calc(100% - 64px), transparent); mask-image: linear-gradient(90deg, transparent, #000 40px, #000 calc(100% - 64px), transparent); }
.shelf-wrap.more-left:not(.more-right) .shelf-track { -webkit-mask-image: linear-gradient(90deg, transparent, #000 40px); mask-image: linear-gradient(90deg, transparent, #000 40px); }
.shelf-item { flex: 0 0 132px; scroll-snap-align: start; display: grid; gap: 6px; align-content: start; min-width: 0; }
.shelf-item.wide { flex-basis: min(300px, 82vw); }
.shelf-item.wide > .card { box-sizing: border-box; margin: 0; }
.shelf-item .si-title { font: 600 0.875rem/1.25 var(--f-read); min-height: 2.5em; overflow: hidden; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow-wrap: anywhere; }   /* 1.8.29 (Max, 21/10) : deux lignes réservées : pages et barres alignées sur tout le rayon */
.shelf-item .si-meta { font-size: 0.75rem; }
.shelf-item .bar { height: 4px; }
.shelf-item .si-lire { justify-self: start; margin-top: 2px; }
.si-tag { justify-self: start; font-size: 0.75rem; font-weight: 600; color: #8A5A1E; background: #F6E6C8; border-radius: 999px; padding: 2px 8px; max-width: 100%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; } /* 03/10 : « vu chez » + pseudo de 30 lettres */
.shelf-empty { margin: 4px 0 0; }
.shelf-more { display: flex; justify-content: center; margin-top: 8px; }
.shelf-arrow { display: none; position: absolute; top: 38%; transform: translateY(-50%); width: 34px; height: 34px; border-radius: 50%; border: 1px solid var(--line); background: var(--surface); color: var(--ink); box-shadow: var(--shadow); font-size: 1.25rem; line-height: 1; cursor: pointer; z-index: 2; }
.shelf-arrow.prev { left: -8px; } .shelf-arrow.next { right: -8px; }
@media (hover: hover) and (pointer: fine) { .shelf-arrow:not([hidden]) { display: grid; place-items: center; } }
@media (prefers-reduced-motion: reduce) { .shelf-track { scroll-behavior: auto; } }
@media (max-width: 820px) {
  .shelf-arrow { display: none !important; }
  .shelf-item { flex-basis: 108px; }
  .shelf-item .si-title { font-size: 0.8125rem; }
  .seg button { white-space: nowrap; padding: 0 4px; font-size: 0.9375rem; }
  .seg button .badge { margin-left: 2px; }
}

/* ---------- V1.5 : envies ---------- */
.acts > button.danger { color: var(--danger); }
.pill.wish-pill { background: #F6E6C8; color: #8A5A1E; border-color: transparent; }
.sf-copy { margin-top: 10px; align-items: flex-start; }
.sf-copy input { margin-top: 3px; }
.sf-have { margin-top: 8px; }
.book.wish .cover-btn { cursor: pointer; }

/* ---------- V1.5 : étiquettes et tirage ---------- */
.tags { display: flex; flex-wrap: wrap; gap: 4px; align-items: flex-start; align-content: flex-start; }   /* 1.8.60 (membre, 2/11, iPhone) : dans une rangée en subgrid (1.8.56), la carte à 2 étiquettes partage la hauteur de sa voisine à 3 ; sans ceci, les pilules s'étiraient à 52 px */
.tag { display: inline-flex; align-items: center; gap: 3px; font-size: 0.75rem; font-weight: 600; color: var(--accent); background: var(--accent-soft); border-radius: 999px; padding: 2px 7px; max-width: 100%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.tag.priv { color: var(--muted); background: var(--surface-2); border: 1px dashed var(--line); }
.tag-box { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; border: 1px solid var(--line); background: var(--surface-2); border-radius: 10px; padding: 6px 8px; min-height: 44px; }
.tag-box:focus-within { border-color: var(--accent); }
.tag-box input { flex: 1 1 120px; min-width: 100px; border: 0 !important; background: transparent !important; padding: 4px 2px !important; outline: none; box-shadow: none !important; }
.tag-pill { display: inline-flex; align-items: center; gap: 2px; font-size: 0.8125rem; font-weight: 600; background: var(--accent-soft); color: var(--accent); border-radius: 999px; padding: 2px 4px 2px 2px; }
.tag-pill.priv { background: var(--surface); color: var(--ink); border: 1px dashed var(--muted); }
.tag-pill button { border: 0; background: transparent; color: inherit; cursor: pointer; width: 24px; height: 24px; border-radius: 50%; display: inline-grid; place-items: center; padding: 0; font-size: 1rem; line-height: 1; }
@media (hover: hover) { .tag-pill button:hover { background: color-mix(in srgb, currentColor 12%, transparent); } }
.tag-sugg { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 6px; }
.tag-sugg:empty { display: none; }
.tag-chips { margin-top: -6px; }
.sec-row { display: flex; align-items: center; gap: 10px 14px; flex-wrap: wrap; margin: 28px 0 12px; }
.sec-row .sec-title { flex: 1 1 auto; min-width: 0; margin: 0; }
.sec-row .btn { flex: none; white-space: nowrap; }
@media (max-width: 820px) { .sec-row .btn { flex: 1 1 100%; min-height: 40px; } }
.draw-opts { display: grid; gap: 10px; margin: 10px 0 14px; }
.draw-stage { min-height: 150px; display: grid; place-items: center; }
.draw-go { min-height: 48px; padding: 0 22px; }
.draw-shuffle { width: 88px; transform: rotate(-3deg); transition: transform .12s; }
.draw-shuffle.land { transform: rotate(0) scale(1.06); transition: transform .3s cubic-bezier(.2, 1.4, .4, 1); }
.draw-result { display: flex; gap: 14px; align-items: flex-start; width: 100%; margin-bottom: 12px; }
.draw-result > .cover { width: 76px; flex: none; }
.draw-shuffle > .cover { width: 100%; }
.draw-result > div:last-child { display: grid; gap: 4px; min-width: 0; }
.draw-stage .acts { width: 100%; }
@media (prefers-reduced-motion: reduce) { .draw-shuffle, .draw-shuffle.land { transition: none; transform: none; } }

/* ---------- V1.5.1 : chacun son exemplaire ---------- */
.sheet-book.foreign { align-items: flex-start; }
.sheet-book.foreign > .cover { width: 76px; flex: none; }
.sheet-book.foreign > div { display: grid; gap: 4px; min-width: 0; justify-items: start; }
.check.off { opacity: .6; cursor: not-allowed; }
.check.off input { cursor: not-allowed; }
.sf-missing { margin-top: 10px; }
.b-actions > .pill { align-self: center; }

/* Installer l'appli (V1.6) */
.install { display: grid; gap: 10px; }
.install .chips { margin: 0; }
.install-steps { margin: 0; padding-left: 22px; display: grid; gap: 6px; line-height: 1.45; }
.install-steps .inl { width: 18px; height: 18px; vertical-align: -3px; }
.install-hint .btn { flex: none; }

/* ---------- Jours spéciaux (V1.6) : police du titre, couleur, teinte du bandeau, puce et motif ----------
   Polices libres (SIL Open Font License, fichiers OFL-*.txt à côté), sous-ensemble latin, chargées seulement pendant la fête. */
@font-face { font-family: 'Cinzel Decorative F'; src: url('fonts/fetes/cinzel-decorative.woff2') format('woff2'), url('fonts/fetes/cinzel-decorative.woff') format('woff'); font-display: swap; }
@font-face { font-family: 'Great Vibes F'; src: url('fonts/fetes/great-vibes.woff2') format('woff2'), url('fonts/fetes/great-vibes.woff') format('woff'); font-display: swap; }
@font-face { font-family: 'Pacifico F'; src: url('fonts/fetes/pacifico.woff2') format('woff2'), url('fonts/fetes/pacifico.woff') format('woff'); font-display: swap; }
@font-face { font-family: 'IM Fell SC F'; src: url('fonts/fetes/im-fell-sc.woff2') format('woff2'), url('fonts/fetes/im-fell-sc.woff') format('woff'); font-display: swap; }
@font-face { font-family: 'Cinzel F'; src: url('fonts/fetes/cinzel.woff2') format('woff2'), url('fonts/fetes/cinzel.woff') format('woff'); font-display: swap; }
@font-face { font-family: 'Monoton F'; src: url('fonts/fetes/monoton.woff2') format('woff2'), url('fonts/fetes/monoton.woff') format('woff'); font-display: swap; }
@font-face { font-family: 'Poiret One F'; src: url('fonts/fetes/poiret-one.woff2') format('woff2'), url('fonts/fetes/poiret-one.woff') format('woff'); font-display: swap; }
@font-face { font-family: 'Caveat F'; src: url('fonts/fetes/caveat.woff2') format('woff2'), url('fonts/fetes/caveat.woff') format('woff'); font-display: swap; }
@font-face { font-family: 'Creepster F'; src: url('fonts/fetes/creepster.woff2') format('woff2'), url('fonts/fetes/creepster.woff') format('woff'); font-display: swap; }
@font-face { font-family: 'Sniglet F'; src: url('fonts/fetes/sniglet.woff2') format('woff2'), url('fonts/fetes/sniglet.woff') format('woff'); font-display: swap; }
@font-face { font-family: 'Berkshire Swash F'; src: url('fonts/fetes/berkshire-swash.woff2') format('woff2'), url('fonts/fetes/berkshire-swash.woff') format('woff'); font-display: swap; }
html[data-fete="nouvel-an"] { --fete-scale: .82; --fete-font: 'Cinzel Decorative F'; --fete-a: #7A5A12; --fete-an: #F2CF7A; --fete-tint: rgba(201,168,106,.20); --fete-gold: #C9A86A; }
html[data-fete="valentin"] { --fete-scale: 1.25; --fete-font: 'Great Vibes F'; --fete-a: #A3264F; --fete-an: #F49AB8; --fete-tint: rgba(220,90,130,.14); --fete-gold: #E07A9A; }
html[data-fete="poesie"] { --fete-scale: 1.25; --fete-font: 'Great Vibes F'; --fete-a: #5B3A8C; --fete-an: #CDB4F2; --fete-tint: rgba(130,90,190,.14); --fete-gold: #E3B04D; }
html[data-fete="livre"] { --fete-scale: 1.07; --fete-font: 'IM Fell SC F'; --fete-a: #6B3F1D; --fete-an: #E8C39A; --fete-tint: rgba(170,120,70,.14); --fete-gold: #C9A86A; }
html[data-fete="musique"] { --fete-scale: .71; --fete-font: 'Monoton F'; --fete-a: #7A2E8C; --fete-an: #E0A6EE; --fete-tint: rgba(170,80,190,.14); --fete-gold: #E07ADB; }
html[data-fete="biodiversite"] { --fete-scale: 1.07; --fete-font: 'Pacifico F'; --fete-a: #1F6B4A; --fete-an: #8FD9B8; --fete-tint: rgba(40,160,110,.14); --fete-gold: #C9D46A; }
html[data-fete="amitie"] { --fete-scale: .87; --fete-font: 'Sniglet F'; --fete-a: #9C4219; --fete-an: #F7B38A; --fete-tint: rgba(240,150,100,.14); --fete-gold: #F2A64D; }
html[data-fete="etoiles"] { --fete-scale: 1.04; --fete-font: 'Poiret One F'; --fete-a: #2F3D8A; --fete-an: #C9D2FF; --fete-tint: rgba(80,90,200,.16); --fete-gold: #E6D38A; }
html[data-fete="langues"] { --fete-scale: 1.26; --fete-font: 'Caveat F'; --fete-a: #0F6464; --fete-an: #8FD9D6; --fete-tint: rgba(40,160,160,.14); --fete-gold: #E3B04D; }
html[data-fete="halloween"] { --fete-scale: 1.22; --fete-font: 'Creepster F'; --fete-a: #A93C0C; --fete-an: #FF9A4D; --fete-tint: rgba(230,110,30,.18); --fete-gold: #FF8A1F; }
html[data-fete="enfance"] { --fete-scale: 1.07; --fete-font: 'Pacifico F'; --fete-a: #1F5FA8; --fete-an: #9CC7FF; --fete-tint: rgba(70,140,230,.14); --fete-gold: #F2C14E; }
html[data-fete="noel"] { --fete-scale: 1.04; --fete-font: 'Berkshire Swash F'; --fete-a: #A31621; --fete-an: #F5837A; --fete-tint: rgba(200,40,40,.16); --fete-gold: #D4AF37; }
html[data-fete] { --fete-c: var(--fete-a); }
html[data-fete][data-light="night"] { --fete-c: var(--fete-an); }
html[data-fete] .top { background-image: linear-gradient(100deg, var(--fete-tint), transparent 75%); }
html[data-fete] .brand { font-family: var(--fete-font), 'Citadel of Blackrose', var(--f-read); color: var(--fete-c); --logo-cover: var(--fete-c); --logo-gold: var(--fete-gold); }
/* 1.8.13 (jours spéciaux, Max, 10/10 : « pas uniformes en taille, certains coupés sur PC ») : chaque police a sa largeur pour le même mot
   (de 157 à 280 px à 24 px) ; --fete-scale ramène « AbracadaBook » à la largeur du logo habituel (198 px), partout (bandeau, PC, connexion) */
html[data-fete="musique"] .brand { letter-spacing: .02em; }
.fete-chip { display: inline-flex; align-items: center; gap: 6px; min-width: 0; max-width: 100%; padding: 4px 11px 4px 8px; border-radius: 999px; font: 600 0.8125rem/1.2 var(--f-ui); color: var(--fete-c); background: color-mix(in srgb, var(--fete-c) 12%, var(--surface)); border: 1px solid color-mix(in srgb, var(--fete-c) 30%, transparent); }
.fete-chip span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.fete-chip svg { flex: none; width: 16px; height: 16px; }
.fete-motif { order: 3; flex: 1 1 60px; min-width: 0; height: 30px; display: flex; align-items: center; justify-content: space-evenly; overflow: hidden; color: var(--fete-c); pointer-events: none; -webkit-mask-image: linear-gradient(90deg, transparent, #000 25%, #000 75%, transparent); mask-image: linear-gradient(90deg, transparent, #000 25%, #000 75%, transparent); }
.fete-motif svg { flex: none; opacity: .32; animation: fete-float 9s ease-in-out infinite; }
.fete-motif .m0 { width: 14px; height: 14px; transform: rotate(-12deg); }
.fete-motif .m1 { width: 20px; height: 20px; animation-delay: -2s; }
.fete-motif .m2 { width: 12px; height: 12px; transform: rotate(18deg); animation-delay: -4s; }
.fete-motif .m3 { width: 18px; height: 18px; transform: rotate(-6deg); animation-delay: -6s; }
.fete-motif .m4 { width: 13px; height: 13px; animation-delay: -1s; }
@keyframes fete-float { 0%, 100% { translate: 0 0; } 50% { translate: 0 -3px; } }
.top .tools { order: 2; } .top .me { order: 4; }
/* le message long sur PC, le court sur téléphone (7e champ de FETES) */
.fete-chip .fc-short { display: none; }
@media (max-width: 820px) {
  /* 1.8.57 (Max, 29/10, 23 h 08 : « la bonne mise en forme, c'est un bandeau sur une ligne ») : titre, série, motif et message sur une seule
     ligne ; le message court ; le motif cède la place en premier (base 0), le message se coupe par « … » en dernier recours */
  html[data-fete] .top-in { flex-wrap: nowrap; gap: 12px 8px; padding-left: 12px; padding-right: 12px; }
  html[data-fete] .top-in > .brand-link, html[data-fete] .top-in > .top-streak { flex: none; }
  html[data-fete] .top-streak { margin-left: 0; }
  .fete-chip { order: 5; font-size: 0.75rem; margin-left: auto; flex: 0 1 auto; min-width: 0; padding: 4px 9px 4px 7px; gap: 5px; }
  .fete-chip svg { width: 14px; height: 14px; }
  /* en dessous de 390 px (Android 360, iPhone SE / mini 375) le titre et le message se serrent un peu pour que les douze messages restent entiers avec la série */
  @media (max-width: 389px) { html[data-fete] .brand { font-size: calc(16px * var(--fete-scale, 1)); } .fete-chip { font-size: 0.71875rem; padding: 4px 8px 4px 6px; } }
  /* 30/10, 1 h 53 (Max) : à 320 px, plutôt que couper le message, le bandeau accepte une seconde ligne — on doit pouvoir lire l'événement */
  @media (max-width: 340px) { html[data-fete] .top-in { flex-wrap: wrap; row-gap: 6px; } .fete-chip { flex: 0 0 auto; max-width: 100%; margin-left: 0; } }   /* se coupe par « … » quand même le motif ne suffit plus (320 px) */
  .fete-chip .fc-long { display: none; } .fete-chip .fc-short { display: inline; }
  .fete-motif { height: 24px; flex: 1 1 0; min-width: 0; }   /* prend seulement la place qui reste : le message passe avant le motif */
}
@media (max-width: 380px) { .fete-motif { display: none; } }
@media (prefers-reduced-motion: reduce) { .fete-motif svg { animation: none; } }


/* Avis sur un livre (V1.6) : pastille en bas à droite de la couverture, choix dans la feuille du livre */
.rate-pin { position: absolute; right: 6%; bottom: 5%; z-index: 2; width: 30%; max-width: 30px; min-width: 15px; aspect-ratio: 1; border-radius: 50%; display: grid; place-items: center; background: #FFFDF8; box-shadow: 0 1px 3px rgba(0, 0, 0, .35); --pin-bg: #FFFDF8; }
.rate-pin svg { width: 64%; height: 64%; }
.r-love { color: #C2185B; } .r-ok { color: #2F7A4F; } .r-neutral { color: #5E6670; } .r-notok { color: #A65B12; } .r-dislike { color: #7E2A3A; }
.rate-pin .crack, .rate-opt .crack { stroke: var(--pin-bg, #FFFDF8); }
.rate-label { margin: 0 0 6px; }
.rate-row { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 6px; margin-bottom: 12px; }
.rate-opt { display: grid; justify-items: center; gap: 4px; padding: 10px 4px 8px; border-radius: 12px; border: 1px solid var(--line); background: var(--surface-2); font: 600 0.75rem/1.2 var(--f-ui); color: var(--ink); cursor: pointer; text-align: center; --pin-bg: var(--surface-2); }
.rate-opt svg { width: 26px; height: 26px; }
.rate-opt span { color: var(--ink); }
.rate-opt.r-love { color: #C2185B; } .rate-opt.r-ok { color: #2F7A4F; } .rate-opt.r-neutral { color: #5E6670; } .rate-opt.r-notok { color: #A65B12; } .rate-opt.r-dislike { color: #7E2A3A; }   /* 1.8.75 (retour 12) : la règle .rate-opt { color: ink } l'emportait sur .r-* : icônes noires dans le formulaire, colorées ailleurs */
html[data-light="night"] .rate-opt.r-love { color: #F48FB1; } html[data-light="night"] .rate-opt.r-ok { color: #8FCBA5; } html[data-light="night"] .rate-opt.r-neutral { color: #B4BCC6; } html[data-light="night"] .rate-opt.r-notok { color: #F0B35A; } html[data-light="night"] .rate-opt.r-dislike { color: #E88A9A; }
.rate-opt[aria-pressed="true"] { border-color: currentColor; background: color-mix(in srgb, currentColor 12%, var(--surface)); box-shadow: inset 0 0 0 1px currentColor; --pin-bg: color-mix(in srgb, currentColor 12%, var(--surface)); }
html[data-light="night"] .r-love { color: #F48FB1; } html[data-light="night"] .r-ok { color: #8FCBA5; } html[data-light="night"] .r-neutral { color: #B4BCC6; } html[data-light="night"] .r-notok { color: #F0B35A; } html[data-light="night"] .r-dislike { color: #E88A9A; }
html[data-light="night"] .rate-pin.r-love { color: #C2185B; } html[data-light="night"] .rate-pin.r-ok { color: #2F7A4F; } html[data-light="night"] .rate-pin.r-neutral { color: #5E6670; } html[data-light="night"] .rate-pin.r-notok { color: #A65B12; } html[data-light="night"] .rate-pin.r-dislike { color: #7E2A3A; }
/* Pause vue par les autres (V1.6) et correction d'une séance */
.live.paused { color: #7A5A12; } /* V1.6.2 : en pause en orange, comme la pastille « En pause » d'un livre (décision de Max, 30/09) */
.live.paused .live-dot { background: #C9A86A; animation: none; box-shadow: none; }
html[data-light="night"] .live.paused { color: #F2D48A; }
.se-times { display: grid; grid-template-columns: minmax(0, 1.4fr) minmax(0, 1fr) minmax(0, 1fr); gap: 8px; margin: 10px 0 2px; }
.se-times .field { margin: 0; min-width: 0; } /* V1.6.2 : sur iPhone, la case « Fin » débordait du bord (retour de Palakoslip) */
.se-times input { width: 100%; min-width: 0; box-sizing: border-box; -webkit-appearance: none; appearance: none; padding-left: 8px; padding-right: 8px; }
.hist .hist-edit { grid-column: 1 / -1; justify-self: start; font-size: 0.8125rem; padding: 0; margin-top: -4px; }
@media (max-width: 380px) { .se-times { grid-template-columns: 1fr 1fr; } .se-times .field:first-child { grid-column: 1 / -1; } }

/* ---------- V1.6.5 : lot rétention (maquettes validées par Max le 03/10) ---------- */
/* Flamme de la série dans le bandeau (R4) */
.top-streak { text-decoration: none; margin-left: 8px; font-size: 0.8125rem; padding: 2px 8px; }
.top-streak svg { width: 14px; height: 14px; }
/* Ma lecture (R2) */
.my-reading { background: var(--paper); border: 1px solid var(--paper-line); border-radius: 16px; padding: 14px 16px; margin-bottom: 18px; box-shadow: var(--shadow); max-width: 720px; }
.my-reading .sec-title { margin: 0 0 10px; }
.mr-body { display: flex; gap: 14px; align-items: center; min-width: 0; }
.mr-body .cover-btn { flex: none; width: 64px; padding: 0; border: 0; background: none; cursor: pointer; }
.mr-txt { display: flex; flex-direction: column; gap: 4px; min-width: 0; flex: 1; }
.mr-title { font: 600 1.1875rem/1.2 var(--f-read); overflow-wrap: anywhere; }
.mr-txt .small { overflow-wrap: anywhere; }
.mr-bar { margin: 4px 0 2px; }
.mr-acts, .resume-acts { display: flex; gap: 8px; flex-wrap: wrap; margin-top: 12px; }
.mr-acts .btn, .resume-acts .btn { flex: 1 1 140px; min-height: 44px; }
.mr-acts .btn svg, .resume-acts .btn svg { width: 18px; height: 18px; }
.mr-none p { margin: 0; }
/* 1.8.9 (retour de BlackCat, décision de Max 08/10, 11 h 27) : la part gagnée s'allonge en clair puis se fond dans la couleur pleine, partout
   pareil (Ma lecture après un chrono, bilan de séance) ; sans animation (mode calme, « réduire les animations »), elle est pleine d'emblée */
.bar { --seg-light: color-mix(in srgb, var(--c) 55%, #fff); }
html[data-light="night"] .bar { --seg-light: color-mix(in srgb, var(--c) 70%, #000); }
.bar > i.seg-new { background: var(--c); border-radius: 0 999px 999px 0; }
.bar > i.seg-pre { border-radius: 999px 0 0 999px; }   /* 1.8.29 : la part gagnée prolonge la barre, sans point détaché */
/* Rappel du soir (R4) */
/* 1.8.12 (Q-12, Max, 09/10, capture iPhone en thème nuit) : le rappel de série tenait sur deux rangées (la croix rejetée seule sous le texte)
   et portait ses propres couleurs brun-orangé. Désormais une seule rangée (flamme, texte, Noter, croix), les couleurs des autres
   bandeaux (« Du nouveau dans… ») ; seule la flamme garde son orange. */
.notice.evening, .notice.streak-lost { flex-wrap: nowrap; gap: 8px; }
.notice.evening .grow, .notice.streak-lost .grow { flex: 1 1 auto; min-width: 0; }
.notice.evening .ev-flame, .notice.streak-lost .ev-flame { color: #C2571A; display: inline-flex; flex: none; }
.notice.evening .ev-flame svg, .notice.streak-lost .ev-flame svg { width: 18px; height: 18px; }
.notice.evening .btn, .notice.streak-lost .btn { flex: none; }
.notice.evening .ev-x, .notice.streak-lost .ev-x { min-width: 36px; padding: 0; height: 32px; font-size: 1.125rem; line-height: 1; color: inherit; }   /* même hauteur que Noter (44 px sur téléphone, par .btn) */
html[data-light="night"] .notice.evening .ev-flame, html[data-light="night"] .notice.streak-lost .ev-flame { color: #FFB27A; }
.notice.streak-lost .ev-flame { color: var(--muted); }   /* 1.8.16 (R2) : la flamme éteinte, grise */
/* Premiers pas (R3) */
.welcome { position: relative; overflow: hidden; background: var(--surface); border: 1px solid var(--line); border-radius: 16px; padding: 16px; margin-bottom: 18px; box-shadow: var(--shadow); max-width: 720px; }
.welcome h2 { font: 600 1.375rem/1.2 var(--f-read); margin: 0; }
.welcome p { margin: 4px 0 0; }
.w-head { display: flex; align-items: baseline; justify-content: space-between; gap: 10px; }
.w-n { font-size: 0.8125rem; font-weight: 700; color: var(--accent); }
.welcome .w-bar { margin: 10px 0 6px; }
.w-steps { list-style: none; margin: 0; padding: 0; display: grid; }
.w-step { display: flex; align-items: center; gap: 12px; min-height: 50px; padding: 4px 0; }
.w-dot { flex: none; width: 26px; height: 26px; border-radius: 50%; border: 2px solid var(--line); display: grid; place-items: center; box-sizing: border-box; color: var(--accent-ink); }
.w-dot svg { width: 14px; height: 14px; }
.w-step.ok .w-dot { background: var(--accent); border-color: var(--accent); }
.w-txt { flex: 1; display: flex; flex-direction: column; gap: 2px; min-width: 0; overflow-wrap: anywhere; font-size: 0.9375rem; }
.w-step.ok .w-txt > span:first-child { color: var(--muted); text-decoration: line-through; }
.w-go { flex: none; }
.w-later { margin-top: 6px; font-size: 0.875rem; }
.welcome.done { text-align: center; padding-top: 22px; }
.welcome.done p { margin: 6px auto 0; max-width: 420px; }
.w-check { width: 56px; height: 56px; border-radius: 50%; background: var(--accent); color: var(--accent-ink); display: inline-grid; place-items: center; margin: 8px 0 10px; }
.w-install { display: grid; gap: 6px; text-align: left; background: var(--accent-soft); border-radius: 14px; padding: 12px 14px; margin-top: 14px; }
.welcome .mr-acts { justify-content: center; }
.w-install .mr-acts { justify-content: flex-start; margin-top: 4px; }
.w-install .mr-acts .btn { flex: 0 1 auto; min-height: 40px; }
/* Lignes de liste : Lectures sur téléphone (P2), À rejoindre (O1), feuille Lire (R2) */
.lrows { display: grid; gap: 8px; }
.lrow { display: flex; align-items: center; gap: 12px; width: 100%; box-sizing: border-box; padding: 10px 12px; border-radius: 12px; border: 1px solid var(--line); background: var(--surface); color: var(--ink); text-decoration: none; font: inherit; text-align: left; cursor: pointer; min-width: 0; }
.lrow .cover.xs { flex: none; }
.lrow-main { display: flex; flex-direction: column; gap: 2px; min-width: 0; overflow-wrap: anywhere; }
.lrow-main strong { font-family: var(--f-read); font-size: 1rem; }
.lrow-top { display: flex; align-items: baseline; gap: 8px; flex-wrap: wrap; }
.lrow-new { font-size: 0.75rem; font-weight: 700; color: var(--accent-ink); background: var(--accent); border-radius: 999px; padding: 1px 7px; }
.lrow-prev { display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.lrow-page { flex: none; color: var(--muted); }
.lrow-go { flex: none; font-weight: 600; font-size: 0.875rem; color: var(--accent); }
.lrow-acts { display: flex; gap: 8px; margin-top: 6px; flex-wrap: wrap; }
.lrow .btn { flex: none; }
.lrow-inv { align-items: flex-start; }
.open-list { margin-top: 14px; display: grid; gap: 8px; }
.sec-sub { font-size: 0.75rem; text-transform: uppercase; letter-spacing: .08em; color: var(--muted); font-weight: 700; margin: 14px 0 8px; }
.open-list .sec-sub { margin: 0; }
.open-shelf { margin-top: 28px; }
.open-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 320px), 1fr)); gap: 10px; }
.feed-join { font-weight: 600; }
.resume-book { display: flex; gap: 12px; align-items: center; padding: 10px 12px; border-radius: 12px; background: var(--surface-2); min-width: 0; }
.resume-book strong { display: block; font-family: var(--f-read); font-size: 1.0625rem; overflow-wrap: anywhere; }
.resume-book .bar { margin-top: 6px; }
/* Profil : mode calme et rappel dans l'agenda (R14, R4) */
.calm-box { border: 1px solid var(--line); border-radius: 12px; padding: 12px 14px; display: grid; gap: 14px; }
.calm-box legend { padding: 0 4px; }
.switch-row { display: flex; gap: 12px; align-items: center; cursor: pointer; }
.switch-row .grow { display: flex; flex-direction: column; gap: 2px; }
.switch-row input[type=checkbox] { flex: none; appearance: none; -webkit-appearance: none; width: 48px; height: 28px; border-radius: 999px; background: var(--line); position: relative; cursor: pointer; transition: background .2s; margin: 0; }
.switch-row input[type=checkbox]::after { content: ''; position: absolute; top: 3px; left: 3px; width: 22px; height: 22px; border-radius: 50%; background: #fff; box-shadow: 0 1px 2px rgba(0,0,0,.25); transition: transform .2s; }
.switch-row input[type=checkbox]:checked { background: var(--accent); }
.switch-row input[type=checkbox]:checked::after { transform: translateX(20px); }
.switch-row input[type=checkbox]:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
.ics-row { display: grid; gap: 8px; }
.ics-row > div:first-child { display: flex; flex-direction: column; gap: 2px; }
.ics-ctl { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
.ics-ctl input[type=time] { width: auto; min-width: 0; }
/* Bilan de séance (R5) */
.bilan { display: grid; gap: 14px; }
.bilan h2 { font: 600 1.5rem/1.2 var(--f-read); margin: 0; }
.bilan > p { margin: -10px 0 0; }
.bilan-head { display: flex; align-items: baseline; justify-content: space-between; gap: 10px; }
.bilan-plus { font: 600 1.625rem/1 var(--f-read); color: var(--accent); }
.bilan-tiles { display: grid; grid-template-columns: repeat(auto-fit, minmax(90px, 1fr)); gap: 10px; }
.bilan-tiles > div { background: var(--surface); border: 1px solid var(--line); border-radius: 14px; padding: 10px 12px; display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.bilan-tiles b { font: 600 1.625rem/1.1 var(--f-read); }
.bilan-tiles span { font-size: 0.8125rem; color: var(--muted); }
.bilan-flame { display: flex; align-items: center; gap: 12px; background: #FBE7D6; color: #7A3510; border-radius: 14px; padding: 10px 14px; }
.bilan-flame > span:last-child { display: flex; flex-direction: column; gap: 2px; }
.bf-ic { color: #C2571A; display: inline-flex; }
.bf-ic svg { width: 32px; height: 32px; }
html[data-light="night"] .bilan-flame { background: #4A2E1E; color: #FFE2CC; }
html[data-light="night"] .bf-ic { color: #FFB27A; }
.bilan-book { display: grid; gap: 6px; }
.bb-top { display: flex; justify-content: space-between; gap: 10px; flex-wrap: wrap; }
.bb-top strong { font-family: var(--f-read); font-size: 1rem; overflow-wrap: anywhere; min-width: 0; }
.bilan .bar.lg { height: 10px; overflow: hidden; }
.bilan-step { display: flex; align-items: center; gap: 12px; border: 1px solid var(--line); border-radius: 14px; padding: 10px 14px; background: var(--surface); font-size: 0.875rem; }
.bilan-step .grow { display: grid; gap: 6px; min-width: 0; }
.bilan-step .sm-bar { --c: #8A6A3A; height: 6px; overflow: hidden; }
.bilan-step.won { border-color: transparent; background: var(--ok-soft); }
.bilan-pass { display: grid; gap: 8px; background: var(--accent-soft); border-radius: 14px; padding: 12px 14px; font-size: 0.875rem; }
.bilan-pass .btn { justify-self: start; }
.bilan-ok { min-height: 50px; }
/* Lecture commune : proposition de clore, bilan épinglé (O3), ma progression (P1) */
.close-offer { display: grid; gap: 6px; background: var(--accent-soft); border-radius: 12px; padding: 12px 14px; margin-top: 12px; }
.close-offer .btn { justify-self: start; }
.sess-bilan { margin-bottom: 12px; display: grid; gap: 12px; }
.sess-bilan .panel-title { margin: 0; }
.sess-bilan .btn { justify-self: start; }
.bl-ops { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.bl-op { display: inline-flex; align-items: center; gap: 2px; }
.rate-pin-inline { display: inline-grid; place-items: center; width: 22px; height: 22px; }
.rate-pin-inline svg { width: 18px; height: 18px; }
.mine-p1 .mine-row { display: flex; align-items: center; gap: 10px; margin-bottom: 10px; }
.solo-bilan { position: relative; overflow: hidden; margin: 10px 0 4px; }
.solo-bilan .sec-sub { margin-top: 0; }
/* Notification au-dessus d'une feuille ouverte (F8) : en haut de l'écran, loin des boutons de la feuille */
#modal:not(:empty) + #toast { top: calc(12px + env(safe-area-inset-top, 0px)); bottom: auto; transform: translate(-50%, -20px); }
#modal:not(:empty) + #toast.show { transform: translate(-50%, 0); }
/* Animations (décision de Max, 03/10) : une fois chacune ; jamais en mode calme (le site ne les pose pas) ;
   « réduire les animations » du téléphone : état final directement (règle générale plus haut) */
@keyframes mp-grow { 0% { transform: scaleX(0); background: var(--seg-light); } 40% { transform: scaleX(1); background: var(--seg-light); } 70% { background: var(--seg-light); } 100% { transform: scaleX(1); background: var(--c); } }
@keyframes mp-ignite { 0% { color: #CFC5B8; transform: scale(.85); } 45% { color: #E07A2E; transform: scale(1.18); } 100% { transform: scale(1); } }
@keyframes mp-glow { 0% { box-shadow: 0 0 0 0 rgba(194, 87, 26, 0); } 50% { box-shadow: 0 0 0 10px rgba(194, 87, 26, .18); } 100% { box-shadow: 0 0 0 0 rgba(194, 87, 26, 0); } }
@keyframes mp-pop { 0% { transform: scale(0); } 60% { transform: scale(1.15); } 100% { transform: scale(1); } }
@keyframes mp-draw { from { stroke-dashoffset: 24; } to { stroke-dashoffset: 0; } }
@keyframes mp-fall { 0% { opacity: 0; transform: translateY(-24px) rotate(0); } 15% { opacity: 1; } 80% { opacity: 1; } 100% { opacity: 0; transform: translateY(90px) rotate(160deg); } }
@keyframes mp-spin { 0% { transform: rotate(-120deg) scale(.6); } 60% { transform: rotate(12deg) scale(1.12); filter: brightness(1.25); } 100% { transform: none; } }
.anim-grow { transform-origin: left center; animation: mp-grow 1.6s cubic-bezier(.2, .8, .2, 1) .15s both; }
.anim-ignite { transform-origin: 50% 80%; animation: mp-ignite .7s ease-out .25s both; }
.anim-glow { animation: mp-glow 1s ease-out .3s both; }
.anim-pop { animation: mp-pop .45s cubic-bezier(.2, .8, .2, 1) both; }
.anim-draw { stroke-dasharray: 24; animation: mp-draw .4s ease-out .3s both; }
.anim-spin { animation: mp-spin .8s cubic-bezier(.2, .8, .2, 1) .2s both; }
/* Effets du 05/10 (décision de Max, 20 h 41), posés par le site hors mode calme et hors « réduire les animations » */
.confetti-burst { position: fixed; inset: 0; z-index: 70; pointer-events: none; overflow: hidden; }
.confetti-burst i { position: absolute; top: -16px; width: 9px; height: 15px; border-radius: 2px; background: var(--c); opacity: 0; transform: scale(var(--s, 1)); animation: mp-burst 1.9s cubic-bezier(.3, .6, .6, 1) both; }
.confetti-burst i:nth-child(3n) { border-radius: 50%; width: 10px; height: 10px; } .confetti-burst i:nth-child(4n) { width: 6px; height: 18px; }
@keyframes mp-burst { 0% { opacity: 0; transform: translate(0, 0) rotate(var(--r)) scale(var(--s, 1)); } 10% { opacity: 1; } 75% { opacity: 1; } 100% { opacity: 0; transform: translate(var(--dx), 110vh) rotate(calc(var(--r) + 540deg)) scale(var(--s, 1)); } }
.anim-medal { transform-origin: 50% 50%; animation: mp-medal 1.1s cubic-bezier(.2, .8, .2, 1) .2s both; }
@keyframes mp-medal { 0% { transform: perspective(300px) rotateY(-180deg) scale(.5); opacity: 0; } 55% { transform: perspective(300px) rotateY(20deg) scale(1.18); opacity: 1; filter: brightness(1.35); } 100% { transform: none; filter: none; } }
.bilan-step.won.shine { position: relative; overflow: hidden; }
.bilan-step.won.shine::after { content: ''; position: absolute; top: -60%; bottom: -60%; left: -70%; width: 45%; background: linear-gradient(100deg, transparent, rgba(255, 255, 255, .6), transparent); transform: skewX(-20deg); animation: mp-shine 1.1s ease-out 1s both; pointer-events: none; }
@keyframes mp-shine { to { left: 140%; } }
.anim-flare { transform-origin: 50% 85%; animation: mp-flare 1.6s ease-in-out .95s 2; }
.anim-ignite.anim-flare { animation: mp-ignite .7s ease-out .25s both, mp-flare 1.6s ease-in-out 1s 2; }
@keyframes mp-flare { 0%, 100% { transform: scale(1); filter: none; } 30% { transform: scale(1.3) translateY(-2px); filter: drop-shadow(0 0 8px rgba(224, 122, 46, .7)) brightness(1.15); } 60% { transform: scale(1.12); } }
.top-streak.ignite svg { animation: mp-ignite 1.1s ease both, mp-flare 1.6s ease-in-out 1.2s 1; }
@media (prefers-reduced-motion: reduce) { .confetti-burst { display: none; } .anim-medal, .anim-flare, .bilan-step.won.shine::after { animation: none; } }
.confetti { position: absolute; inset: 0 0 auto 0; height: 0; pointer-events: none; }
.confetti i { position: absolute; top: 6px; width: 8px; height: 14px; border-radius: 2px; background: var(--c); opacity: 0; animation: mp-fall 1.2s ease-in both; }
@media (prefers-reduced-motion: reduce) { .confetti { display: none; } }
@media (max-width: 820px) {
  .my-reading, .welcome { margin-left: 0; margin-right: 0; }
  .top-streak { margin-left: 6px; }
}
.switch-row .small, .ics-row .small.muted { font-weight: 400; }
.lrow-main .small strong { font-family: inherit; font-size: inherit; }
/* débordement trouvé par la chasse étendue (03/10) : pseudo de 30 lettres sans espace dans « En ce moment », titres longs dans le fil */
.person-top { min-width: 0; }
.person-top strong { min-width: 0; overflow-wrap: anywhere; }
.person-top .streak, .person-top .small { flex: none; }
.feed p { min-width: 0; overflow-wrap: anywhere; }

/* ---------- V1.7 : comptes et amis ---------- */
.find-friend { display: flex; gap: 8px; align-items: center; min-width: 0; }
.find-friend input { flex: 1; min-width: 0; }
.find-results { display: grid; gap: 8px; margin-top: 8px; }
.find-results:empty { display: none; }
.find-row { background: var(--surface-2); border-color: transparent; }
.find-row .btn, .friend-row .btn { flex: none; }
.invite-card { display: grid; gap: 8px; margin-top: 12px; }
.invite-code { display: block; font: 600 0.875rem/1.4 ui-monospace, Menlo, Consolas, monospace; background: var(--surface-2); border-radius: 8px; padding: 8px 10px; overflow-wrap: anywhere; user-select: all; }
.invite-card .mr-acts { margin-top: 2px; }
.first-friends { display: grid; gap: 10px; }
.first-friends .ff-title { font: 600 1.125rem/1.2 var(--f-read); }
.friend-row { padding: 6px 8px 6px 6px; }
.friend-link { display: flex; align-items: center; gap: 12px; flex: 1; min-width: 0; color: inherit; text-decoration: none; }
@media (hover: hover) { .friend-link:hover strong { text-decoration: underline; } }
.live-txt { color: var(--accent); font-weight: 600; }
.friend-bar { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; margin: 4px 0 16px; }
.private-card { display: grid; justify-items: center; text-align: center; gap: 8px; padding: 24px 16px; max-width: 520px; color: var(--ink); }
.private-card p { margin: 0; }
.private-card .friend-bar { margin: 6px 0 0; justify-content: center; }
.link-ok { display: grid; justify-items: center; text-align: center; gap: 10px; padding: 28px 18px; max-width: 520px; margin: 24px auto; }
.link-ok h1 { font: 600 1.375rem/1.25 var(--f-read); margin: 0; overflow-wrap: anywhere; }
.link-ok p { margin: 0; }
.link-ok .mr-acts { justify-content: center; }
.link-ok .mr-acts .btn { flex: 0 1 auto; }

/* ---------- V1.7.1 : pseudo#numéro, bravo, lectures passées, données ---------- */
/* le numéro se lit en second : plus petit, plus pâle, collé au pseudo (décision de Max, 04/10) */
.ptag-num { font-family: ui-monospace, Menlo, Consolas, monospace; font-size: .72em; font-weight: 500; color: var(--muted); margin-left: 3px; letter-spacing: .02em; white-space: nowrap; }
h1 .ptag-num { font-size: .5em; vertical-align: .25em; }
.my-tag { display: flex; align-items: center; gap: 12px; margin-bottom: 4px; }
.my-tag > .grow { display: grid; gap: 2px; min-width: 0; }
.my-tag-id { font: 600 1.25rem/1.2 var(--f-read); overflow-wrap: anywhere; }
.my-tag-id .ptag-num { font-size: .7em; }
.pseudo-row { display: flex; align-items: center; gap: 8px; }
.pseudo-row input { flex: 1; min-width: 0; }
.pseudo-tag { font-size: 0.9375rem; flex: none; }
/* Bravo : discret au repos, chaleureux quand on le donne */
.bravo { position: relative; display: inline-flex; align-items: center; gap: 4px; margin-left: 8px; padding: 2px 9px 2px 7px; min-height: 28px; border-radius: 999px; border: 1px solid var(--line); background: transparent; color: var(--muted); font: 600 0.75rem/1 inherit; cursor: pointer; vertical-align: middle; transition: background .2s, color .2s, border-color .2s; }
@media (hover: hover) { .bravo:hover { color: var(--ink); border-color: var(--muted); } }
.bravo.on { background: color-mix(in srgb, #C9A86A 22%, var(--surface)); border-color: color-mix(in srgb, #C9A86A 55%, transparent); color: #8A6A2A; }
html[data-light="night"] .bravo.on { color: #E4C88E; background: color-mix(in srgb, #C9A86A 18%, var(--surface)); }
.bravo svg { flex: none; }
.m-meta .bravo { margin-left: auto; min-height: 26px; }
/* 1.8.75 (recette de Max, 6/11, retour 7, choix V1) : Répondre · Supprimer · Signaler en icônes seules, libellé au survol (title) et pour les lecteurs d'écran */
.m-acts { display: inline-flex; align-items: center; gap: 2px; margin-left: auto; }
.mact { width: 28px; height: 28px; border: 0; background: transparent; color: var(--muted); border-radius: 8px; display: inline-grid; place-items: center; cursor: pointer; padding: 0; }
.mact svg { width: 17px; height: 17px; }
@media (hover: hover) { .mact:hover { color: var(--ink); background: var(--surface-2); } }   /* 1.8.77 : à la souris seulement (le fond restait collé après un toucher) */
.mact[data-armed] { width: auto; padding: 0 8px; color: var(--danger); background: color-mix(in srgb, var(--danger) 12%, transparent); font: 600 0.75rem var(--f-ui); white-space: nowrap; }   /* armé : « Supprimer ? » en rouge, comme avant */
@media (hover: hover) { .mact[data-act$="delete"]:hover, .mact[data-act="sess-msg-remove"]:hover { color: var(--danger); } }   /* à la souris seulement : pas de rouge collant sous le doigt (qa-interface-suppression-message) */
@media (pointer: coarse) { .mact { position: relative; } .mact::before { content: ''; position: absolute; inset: -8px -4px; } }
.anim-bravo svg { animation: mp-bravo .55s cubic-bezier(.2, .8, .2, 1) both; }
.bravo-burst { position: absolute; left: 14px; top: 50%; width: 0; height: 0; pointer-events: none; }
.bravo-burst::before, .bravo-burst::after { content: ''; position: absolute; left: -16px; top: -16px; width: 32px; height: 32px; border-radius: 50%; border: 2px solid #C9A86A; opacity: 0; animation: mp-ring .6s ease-out both; }
.bravo-burst::after { border-color: var(--accent); animation-delay: .08s; }
@keyframes mp-bravo { 0% { transform: scale(.6) rotate(-20deg); } 55% { transform: scale(1.35) rotate(12deg); } 100% { transform: none; } }
@keyframes mp-ring { 0% { opacity: .9; transform: scale(.3); } 100% { opacity: 0; transform: scale(1.6); } }
.bravo-notice .bn-ic { color: #B08A3E; display: inline-flex; }
.bravo-notice .bn-ic svg { width: 20px; height: 20px; }
/* Lectures passées (D8) */
.past-mark { font-style: italic; }
.past-intro, .past-switch { margin: -4px 0 12px; }
.sf-missing.soft { background: var(--accent-soft); border-color: transparent; }
/* Usage (administrateur) */
.ev-bars { display: grid; grid-template-columns: repeat(7, 1fr); gap: 6px; align-items: end; height: 84px; margin: 6px 0 14px; }
.ev-bar { display: grid; grid-template-rows: 1fr auto; height: 100%; align-items: end; justify-items: center; gap: 4px; }
.ev-bar i { display: block; width: 100%; max-width: 28px; min-height: 2px; border-radius: 4px 4px 0 0; background: var(--accent); opacity: .8; }
.ev-bar b { font-size: 0.75rem; color: var(--muted); }
.ev-table { width: 100%; border-collapse: collapse; font-size: 0.8125rem; }
.ev-table th, .ev-table td { padding: 5px 4px; border-bottom: 1px solid var(--line); text-align: left; }
.ev-table td.num, .ev-table th.num { text-align: right; white-space: nowrap; }
.err-list { list-style: none; padding: 0; margin: 0; display: grid; gap: 8px; } .err-list li { background: var(--surface-2); border-radius: 10px; padding: 8px 10px; } .err-list code { font-size: 0.75rem; word-break: break-word; }
/* 1.8.113 (Max, 15/11) : la gravité d'une ligne — le même triangle, rouge (ça a cassé chez nous), jaune (avertissement) ou sans couleur
   (sans impact). Le mot est écrit à côté : la couleur ne porte jamais l'information seule. Couleurs fixes, lisibles sur les deux lumières
   (le jaune a son contour sombre, le point d'exclamation est blanc sur le rouge et brun sur le jaune). */
.err-list li { display: grid; grid-template-columns: auto minmax(0, 1fr); gap: 9px; align-items: start; }
.err-ico { display: inline-grid; place-items: center; width: 18px; height: 18px; margin-top: 1px; color: var(--muted); vertical-align: -4px; }
.err-warn .err-ico .tri { fill: #F5C542; stroke: #8A5A00; } .err-warn .err-ico .bang { stroke: #3D2A00; }
.err-error .err-ico .tri { fill: #C62828; stroke: #C62828; } .err-error .err-ico .bang { stroke: #FFFFFF; }
.err-list li.err-error { box-shadow: inset 3px 0 0 #C62828; } .err-list li.err-error .err-word { font-weight: 700; color: var(--ink); }
/* 1.8.114 : trois tiroirs, un par gravité ; l'en-tête est un vrai bouton (clavier, lecteur d'écran : aria-expanded) */
.err-drawers { display: grid; gap: 6px; } .err-drawer > .err-list { margin: 4px 0 8px; }
.err-head { display: grid; grid-template-columns: auto minmax(0, 1fr) auto; gap: 8px; align-items: start; width: 100%; min-height: 44px; padding: 10px 10px; border: 1px solid var(--line); border-radius: 10px; background: transparent; color: inherit; font: inherit; font-size: 0.9rem; text-align: left; cursor: pointer; }
.err-head:disabled { cursor: default; opacity: 0.7; } .err-head:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
.err-chev { font-size: 1.2rem; line-height: 1; transition: transform 0.15s ease; } .err-drawer.open .err-chev { transform: rotate(90deg); }
.err-drawer.err-error > .err-head { border-color: #C62828; }
.err-rule { margin: 8px 0 0; }
.err-why { color: var(--muted); }
.ev-table thead th { font-size: 0.75rem; text-transform: uppercase; letter-spacing: .06em; color: var(--muted); }
/* 1.8.52 : ouvertures par minute (open_rate, administrateur) et bandeau orange / rouge de capacité */
.ev-rate { display: grid; grid-template-columns: repeat(2, 1fr); gap: 8px; margin: 6px 0 8px; }
.ev-rate span { display: grid; gap: 2px; padding: 8px 10px; border-radius: 10px; background: var(--surface-2); font-size: 0.75rem; color: var(--muted); }
.ev-rate b { font-size: 1.25rem; color: var(--ink); }
.ev-rate.orange b, .ev-alert.orange { color: #8A5A00; } .ev-rate.rouge b, .ev-alert.rouge { color: var(--danger); }
.ev-alert { margin: 6px 0 8px; padding: 8px 10px; border-radius: 10px; font-size: 0.8125rem; border: 1px solid currentColor; background: color-mix(in srgb, currentColor 10%, transparent); }
@media (min-width: 560px) { .ev-rate { grid-template-columns: repeat(4, 1fr); } }
/* 1.8.68 (V1.8.27) : retour des nouveaux inscrits, trois cases (classe à part : les suites lisent .ev-rate pour les ouvertures) */
.ev-ret { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; margin: 6px 0 8px; }
.ev-ret span { display: grid; gap: 2px; padding: 8px 10px; border-radius: 10px; background: var(--surface-2); font-size: 0.75rem; color: var(--muted); }
.ev-ret b { font-size: 1.25rem; color: var(--ink); }
.data-card p { margin: 0 0 8px; }
@media (prefers-reduced-motion: reduce) { .anim-bravo svg, .bravo-burst::before, .bravo-burst::after { animation: none; } .bravo-burst { display: none; } }

/* ---------- V1.7.5 : clubs, blocage, marque-pages ---------- */
.club-em { display: inline-grid; place-items: center; flex: none; background: var(--c); color: #FFFFFF; box-shadow: inset 0 0 0 2px rgba(255, 255, 255, .18); }
.club-em b { font-family: var(--f-read); font-weight: 600; line-height: 1; }
.club-row { padding: 6px 8px 6px 6px; }
.club-link { display: flex; align-items: center; gap: 12px; flex: 1; min-width: 0; color: inherit; text-decoration: none; }
@media (hover: hover) { .club-link:hover strong { text-decoration: underline; } }
.club-row .btn { flex: none; }
.club-off-intro { margin: -4px 0 10px; }
.club-offs { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 10px; }
.club-off { display: grid; gap: 10px; align-content: space-between; padding: 14px; }
.club-off-link { display: grid; gap: 6px; justify-items: start; color: inherit; text-decoration: none; min-width: 0; }
.club-off-link strong { font: 600 1rem/1.2 var(--f-read); overflow-wrap: anywhere; }
.club-off-link .small { display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; }
.club-find { display: grid; gap: 10px; }
.club-found { margin-top: 10px; }
.pill.official { background: color-mix(in srgb, #C9A86A 22%, var(--surface)); border-color: transparent; color: #7A5C22; }
/* 1.8.10 : « Vérifié » = organisme réel attesté par l'administrateur (distinct d'« Officiel »). 1.8.11 (A-R4, recette de Max, 09/10) : la
   couleur sombre suivait prefers-color-scheme (l'OS) et non la lumière du site : sur un PC en mode sombre avec le site en thème clair, le
   texte devenait vert pâle sur fond clair (1,1 : 1). Désormais keyée sur data-light / data-phase comme les autres pastilles ; mesuré :
   clair ≥ 6,5 : 1 sur les trois surfaces claires, nuit ≥ 8 : 1. */
.pill.verified { background: color-mix(in srgb, #2F7A4F 24%, var(--surface)); border-color: transparent; color: #174A2E; font-weight: 700; gap: 4px; }
.pill.verified svg { flex: none; }
.verif-mark { display: inline-flex; align-items: center; justify-content: center; width: 16px; height: 16px; margin-left: 5px; border-radius: 50%; background: #2F7A4F; color: #fff; vertical-align: -3px; }
.verif-mark svg { width: 10px; height: 10px; }
.verif-note { margin: 6px 0 0; }
.verif-item { padding: 10px 0; border-top: 1px solid var(--line); }
.verif-item:first-child { border-top: 0; }
.verif-item .fb-top { display: flex; justify-content: space-between; gap: 8px; align-items: baseline; }
.verif-org { margin: 4px 0; }
.verif-msg { font-style: italic; }
.verif-item .mr-acts { margin-top: 8px; }
html[data-light="night"] .pill.verified, html[data-phase="nuit-profonde"] .pill.verified { color: #B9EACB; }
html[data-light="night"] .pill.official { color: #E4C88E; }
.pill.priv svg { margin-right: 3px; }
.club-head { display: flex; align-items: center; gap: 14px; margin: 4px 0 8px; min-width: 0; }
.club-head-txt { min-width: 0; }
/* 1.8.77 (Max, 6/11, 19 h 50 : « le positionnement de Favori n'est pas optimal… je suis ta reco ») : une étoile seule, 44 px, en haut à droite à côté
   du ••• (le coin des actions) ; le bloc flotte, un titre long passe dessous au lieu de rester coincé */
.club-acts { float: right; display: flex; align-items: flex-start; gap: 2px; margin: -8px -8px 0 8px; }
.club-fav.mact { width: 44px; height: 44px; color: var(--muted); }
@media (hover: hover) { .club-fav.mact:hover { color: var(--ink); } }
.club-fav.mact.on { color: var(--accent); }
@media (hover: hover) { .club-fav.mact.on:hover { color: var(--accent); } }
.club-fav.mact.on svg { fill: currentColor; }
.club-fav.mact svg { width: 22px; height: 22px; }
.club-head-txt::after { content: ''; display: block; clear: both; }
.club-head h1 { font: 600 1.5rem/1.15 var(--f-read); margin: 0 0 4px; overflow-wrap: break-word; }   /* 1.8.75 (retour 3) : coupure entre les mots ; un seul mot plus large que l'écran se coupe quand même */
.club-meta { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.club-meta { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; min-width: 0; }
.club-meta-txt { min-width: 0; overflow-wrap: anywhere; }   /* 1.8.11 (A-R6) : la ligne « 2 membres · responsable : … » se replie au lieu de filer sous le bouton ••• */
.club-desc { margin: 0 0 8px; color: var(--muted); overflow-wrap: anywhere; }
.club-tags { margin: 0 0 10px; }
.club-action { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; margin: 4px 0 14px; }
.club-stats { margin-top: 6px; grid-template-columns: repeat(4, minmax(0, 1fr)); }
@media (max-width: 560px) { .club-stats { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
.club-tabs { margin: 10px 0 6px; }
.club-body { min-width: 0; }
.club-msgs { max-height: min(62vh, 640px); overflow-y: auto; padding: 4px 2px; }
.cmsg.mine .m-body, .msg.mine .m-body { background: color-mix(in srgb, var(--accent) 9%, transparent); border-radius: 12px; padding: 6px 10px; }   /* 1.8.75 (Max, 6/11, 16 h 19 : variante B) : teinte légère au lieu du fond plein ; lectures communes aussi */
html[data-light="night"] .cmsg.mine .m-body, html[data-light="night"] .msg.mine .m-body { background: color-mix(in srgb, var(--accent) 12%, transparent); }
.club-compose { margin-top: 8px; }
.compose-err { margin: 6px 0 0; }
.club-reports { display: grid; gap: 10px; margin-bottom: 12px; border-color: color-mix(in srgb, var(--danger) 35%, transparent); }
.cr-item p { margin: 0 0 6px; overflow-wrap: anywhere; }
.club-invite { margin: 4px 0 10px; }
.club-invite summary { list-style: none; display: inline-flex; cursor: pointer; }
.club-invite summary::-webkit-details-marker { display: none; }
.club-invite .lrows { margin-top: 8px; }
.club-new-read { margin: 6px 0 4px; }
.club-owner-note { margin-top: 12px; }
/* 1.8.25 (échelle O3) : une liste coupée au plafond de l'API le dit, en bas */
.list-cut { margin: 12px 0 0; text-align: center; }
.avatars-row { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; }
.club-form .swatches.icons .av { background: var(--pc); color: #FFFFFF; }
.club-preview { display: flex; align-items: center; gap: 12px; padding: 10px 12px; border-radius: 12px; background: var(--surface-2); margin-bottom: 14px; }
.club-preview > div { display: grid; gap: 2px; min-width: 0; }
.club-preview strong { font: 600 1.125rem/1.2 var(--f-read); overflow-wrap: anywhere; }
.member-more { margin-left: auto; }
/* Marque-pages (D9) : en réserve, gagnés, qui sauvent la série */
.bm-reserve { display: inline-flex; align-items: center; gap: 4px; color: #8A6A2A; font-weight: 600; font-size: 0.8125rem; }
html[data-light="night"] .bm-reserve { color: #E4C88E; }
/* 1.8.13 (option E, Max, 11/10) : la tuile « marque-page » dans la grille des chiffres de ma page, dorée comme le ruban de la flamme protégée */
.stat.stat-bm { background: color-mix(in srgb, #C9A86A 22%, var(--surface)); border-color: color-mix(in srgb, #C9A86A 45%, transparent); color: #6E5A2A; }
.stat.stat-bm { display: flex; flex-wrap: wrap; align-items: baseline; gap: 4px 10px; margin-bottom: 10px; }   /* 1.8.14 : un bandeau doré au-dessus des chiffres (Max, 11/10 : dans la grille, il la coupait en deux) */
.stat.stat-bm .num { display: inline-flex; align-items: center; gap: 6px; color: inherit; }
.stat.stat-bm .bm-hint { flex: 1 1 260px; min-width: 0; opacity: .85; }
.stat.stat-bm .num svg { width: 16px; height: 16px; color: #B08A3E; }
.stat.stat-bm span { color: inherit; }
html[data-light="night"] .stat.stat-bm { background: color-mix(in srgb, #C9A86A 16%, var(--surface)); color: #E8D29A; }
html[data-light="night"] .stat.stat-bm .num svg { color: #E0C284; }
.bilan-bm { display: flex; align-items: center; gap: 12px; padding: 10px 12px; border-radius: 12px; background: color-mix(in srgb, #C9A86A 16%, var(--surface)); margin: 10px 0; }
.bilan-bm > span:last-child { display: grid; gap: 2px; }
.bm-ic { display: inline-grid; place-items: center; width: 36px; height: 36px; border-radius: 10px; background: #C9A86A; color: #FFFFFF; flex: none; }
.bm-ic svg { width: 20px; height: 20px; }
.anim-bm { animation: mp-bm .8s cubic-bezier(.2, .8, .2, 1) .2s both; }
@keyframes mp-bm { 0% { transform: translateY(-18px) rotate(-12deg) scale(.6); opacity: 0; } 60% { transform: translateY(3px) rotate(4deg) scale(1.1); opacity: 1; } 100% { transform: none; } }
.bm-notice .bn-ic { color: #B08A3E; display: inline-flex; }
.bm-notice .bn-ic svg { width: 20px; height: 20px; }
/* les rubriques d'un club se voient aussi sur PC (les onglets de l'accueil, non) */
.seg.club-tabs { display: flex; gap: 2px; background: var(--surface-2); border: 1px solid var(--line); border-radius: 12px; padding: 3px; max-width: 520px; }
.seg.club-tabs button { flex: 1; border: 0; background: transparent; min-height: 40px; border-radius: 9px; font-weight: 600; color: var(--muted); cursor: pointer; white-space: nowrap; }
.seg.club-tabs button[aria-pressed="true"] { background: var(--surface); color: var(--ink); box-shadow: var(--shadow); }
.seg.club-tabs .badge { position: static; margin-left: 4px; }
@media (max-width: 820px) { .seg.club-tabs button { min-height: 44px; } }   /* point 10 de l'audit : 44 px sur téléphone */

/* ---------- V1.7.5 : menu à gauche sur grand écran (décision du 30/09, maquettes PC-Accueil, PC-Club, PC-Mes-livres) ----------
   La barre du haut devient un panneau vitré fixe : Lire, Nouvelle lecture, Accueil, Lectures, Mes livres, Clubs et mes clubs,
   profil en bas. En dessous de 1180 px, la barre du haut reste (et la barre du bas sur téléphone). */
.side-only, .side-clubs, .me-sub { display: none; }
.me-txt { display: flex; flex-direction: column; gap: 3px; min-width: 0; }
@media (min-width: 1180px) {
  body.side-nav { padding-left: 264px; }
  body.side-nav .top { position: fixed; top: 16px; bottom: 16px; left: 16px; width: 232px; padding: 0; z-index: 20;
    border: 1px solid var(--paper-line); border-radius: 18px; box-shadow: 0 6px 24px rgba(0, 0, 0, .18); overflow: hidden; } /* fond : le verre du moment (règles des ambiances) */
  body.side-nav .top-in { max-width: none; height: 100%; box-sizing: border-box; padding: 18px 12px 12px; flex-direction: column; align-items: stretch; flex-wrap: nowrap; gap: 6px; overflow-y: auto; overscroll-behavior: contain; }
  body.side-nav .brand-link { padding: 0 8px 10px; }
  body.side-nav .brand { font-size: calc(24px * var(--fete-scale, 1)); }
  body.side-nav .top-streak { display: none; } /* la série est rappelée sous le pseudo, en bas */
  body.side-nav .fete-motif { display: none; }
  body.side-nav .fete-chip { order: 1; align-self: flex-start; margin: 0 4px 6px; white-space: normal; }
  body.side-nav .fete-chip span { white-space: normal; }
  body.side-nav .tools { order: 2; flex-direction: column; flex-wrap: nowrap; gap: 2px; }
  body.side-nav .side-only { display: inline-flex; }
  body.side-nav .tool { min-height: 42px; padding: 0 12px; border-radius: 10px; gap: 12px; font-size: 0.9375rem; color: var(--ink); }
  body.side-nav .tool svg { flex: none; }
  body.side-nav .tool .badge { margin-left: auto; position: static; }
  body.side-nav .tool[aria-current="page"] { background: color-mix(in srgb, var(--accent) 16%, var(--surface)); color: var(--accent); box-shadow: none; font-weight: 700; }
  body.side-nav .tool.lire { order: -2; justify-content: center; min-height: 46px; border-radius: 12px; font-weight: 700; color: var(--accent-ink, #fff); box-shadow: 0 6px 16px color-mix(in srgb, var(--accent) 28%, transparent); }
  body.side-nav .tool.lire svg { width: 20px; height: 20px; }
  body.side-nav .tool.new { order: -1; justify-content: center; min-height: 40px; margin: 4px 0 12px; background: var(--surface); border: 1px solid var(--line); font-size: 0.875rem; }
  body.side-nav .tool.new[aria-current="page"] { border-color: var(--accent); }
  body.side-nav .side-clubs { display: flex; flex-direction: column; gap: 2px; margin: 2px 0 0; }
  .side-clubs a { display: flex; align-items: center; gap: 10px; min-height: 38px; padding: 0 10px 0 14px; border-radius: 10px; text-decoration: none; color: var(--ink); font-size: 0.875rem; font-weight: 500; }
  @media (hover: hover) { .side-clubs a:hover { background: var(--surface-2); } }
  .side-clubs a[aria-current="page"] { background: color-mix(in srgb, var(--accent) 12%, var(--surface)); font-weight: 700; }
  .side-clubs .club-em { flex: none; }
  .side-clubs .sc-name { flex: 1; min-width: 0; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
  .side-clubs .badge { flex: none; }
  .side-clubs .sc-more { color: var(--muted); font-weight: 600; }   /* 1.8.67 : « Voir les autres clubs » */
  .side-clubs .sc-more-ic { width: 24px; height: 24px; display: inline-flex; align-items: center; justify-content: center; flex: none; }
  .side-clubs .sc-more-ic svg { width: 18px; height: 18px; }
  /* 1.8.68 (V1.8.27) : favoris (3 au plus) en tête ; 1.8.70 (Max, 5/11, 18 h 50) : une seule liste, les favoris épinglés avec une ★, ordre figé pour la session */
  .side-clubs .sc-star { flex: none; width: 12px; margin-left: -4px; color: var(--accent); font-size: 0.8125rem; line-height: 1; }
  body.side-nav .me { order: 3; margin: auto 0 0; padding: 10px; border-radius: 12px; background: var(--surface); border: 1px solid var(--line); }
  body.side-nav .me .av { width: 36px; height: 36px; flex: none; }
  body.side-nav .me .av svg { width: 22px; height: 22px; }
  body.side-nav .me-sub { display: block; font-size: 0.75rem; font-weight: 400; color: var(--muted); }
  body.side-nav .me .badge { margin-left: auto; }
  body.side-nav main { margin-top: 16px; }
}
/* V1.7.5 : menus ••• d'un membre (Bloquer) et d'un club : une petite fenêtre sous le bouton, alignée à droite (en flux, elle poussait la page) */
.member-more, .club-head .more { position: relative; flex: none; align-self: flex-start; }
.member-more > .more-menu, .club-head .more > .more-menu { position: absolute; right: 0; top: calc(100% + 6px); z-index: 6; flex-direction: column; flex-wrap: nowrap; align-items: stretch; gap: 4px; min-width: 210px; max-width: min(280px, calc(100vw - 32px)); margin: 0; padding: 8px; background: var(--surface); border: 1px solid var(--line); border-radius: 12px; box-shadow: 0 10px 30px rgba(0, 0, 0, .22); }
.member-more > .more-menu .btn, .club-head .more > .more-menu .btn { justify-content: flex-start; text-align: left; }
@media (max-width: 820px) { .member-more > .more-menu, .club-head .more > .more-menu { top: calc(100% + 12px); } }   /* 1.8.12 (Q-4) : le bouton ••• (44 px, posé 8 px plus bas sur téléphone) reste visible, menu ouvert */

/* ---------- Retours visuels (passe QA de la fin, demande de Max : récompenser chaque progression, en douceur) ----------
   Une fois, en CSS, jamais en mode calme (les classes ne sont pas posées), état final direct si le téléphone réduit les animations. */
/* toast enrichi : une petite icône qui pope à gauche du texte */
#toast { display: flex; align-items: center; gap: 10px; width: max-content; } /* largeur du texte (avant : la moitié de l'écran, donc trois lignes sur téléphone) */
#toast .toast-txt { min-width: 0; }
#toast.rich { padding: 8px 16px 8px 9px; border-radius: 14px; }
#toast .toast-ic { flex: none; display: grid; place-items: center; width: 30px; height: 30px; border-radius: 50%; background: color-mix(in srgb, var(--accent) 85%, #fff); color: var(--accent-ink, #fff); }
#toast .toast-ic svg { width: 17px; height: 17px; }
#toast .toast-ic .club-em { width: 26px !important; height: 26px !important; }
#toast .toast-ic:has(.club-em), #toast .toast-ic:has(.toast-badge) { background: none; }
#toast.show .toast-ic { animation: mp-toast-pop .5s cubic-bezier(.3, 1.6, .5, 1) .05s both; }
#toast .toast-badge { position: relative; display: grid; place-items: center; overflow: hidden; border-radius: 6px; }
#toast .toast-badge .badge-ic { width: 30px; height: 30px; }
#toast.show .toast-badge::after { content: ''; position: absolute; inset: -40% -60%; background: linear-gradient(105deg, transparent 40%, rgba(255, 255, 255, .75) 50%, transparent 60%); animation: mp-shine 1.1s ease .45s both; }
@keyframes mp-toast-pop { 0% { transform: scale(0) rotate(-25deg); } 60% { transform: scale(1.18) rotate(6deg); } 100% { transform: scale(1) rotate(0); } }
@keyframes mp-shine { from { transform: translateX(-70%); } to { transform: translateX(70%); } }
/* un message qu'on vient d'envoyer arrive en glissant (forum, salon de club) */
.msg.anim-in { animation: mp-msg-in .42s cubic-bezier(.2, .9, .3, 1.2) both; transform-origin: 0 100%; }
.cmsg.mine.anim-in { transform-origin: 100% 100%; }
@keyframes mp-msg-in { from { opacity: 0; transform: translateY(14px) scale(.96); } to { opacity: 1; transform: none; } }
/* club rejoint : l'emblème tourne sur lui-même, un anneau s'élargit */
.club-joined { position: relative; display: inline-grid; flex: none; }
.club-joined > .club-em { animation: mp-spin .9s cubic-bezier(.3, 1.4, .5, 1) both, mp-flare 1.4s ease-in-out .9s 1; }
.club-joined > i { position: absolute; inset: -6px; border-radius: 22px; border: 3px solid var(--accent); animation: mp-ring .9s ease-out .15s both; pointer-events: none; }
.club-joined > i::after { content: ''; position: absolute; inset: -3px; border-radius: inherit; border: 2px solid var(--accent); opacity: .6; animation: mp-ring 1.1s ease-out .45s both; }
/* onglet choisi : son icône rebondit (barre du bas) */
.tabbar a.pop svg, .tabbar a.pop .av { animation: mp-tab .45s cubic-bezier(.3, 1.6, .5, 1); }
@keyframes mp-tab { 0% { transform: scale(.7) translateY(3px); } 60% { transform: scale(1.18) translateY(-2px); } 100% { transform: none; } }
/* flamme du bandeau : elle s'allume en s'animant à la première lecture du jour */
.top-streak.ignite svg { animation: mp-ignite 1.1s ease both; }
.top-streak.ignite { animation: mp-glow 1.2s ease both; border-radius: 999px; }
/* boutons : un léger enfoncement au toucher (sensation tactile) */
.btn, button.primary, .acts > button, .tool, .tabbar a, .tabbar button, .chip { transition: transform .08s ease, filter .15s ease, background-color .15s ease; }
.btn:active:not(:disabled), button.primary:active:not(:disabled), .acts > button:active:not(:disabled), .tool:active, .chip:active { transform: translateY(1px) scale(.97); }
/* 1.8.80 (Max, 7/11 : « les boutons n'ont pas les bonnes animations sur mobile… pour ne plus avoir de différence d'interaction ») : au toucher, :active
   ne dure que le temps du doigt (souvent trop court pour être vu) ; pressFX() pose .pressed au pointerdown et le garde au moins 140 ms : le même
   enfoncement sur PC (clic) et téléphone (tap), pour les boutons, les pastilles, les outils et les boutons icône */
.btn, button.primary, .acts > button, .tool, .tabbar a, .tabbar button, .chip, .mact, .linkbtn, .cal-nav, .cal-ym, .cal-day, .cover-btn, .mode, .bravo { transition: transform .08s ease, filter .15s ease, background-color .15s ease, color .15s ease; }
.pressed:not(:disabled) { transform: translateY(1px) scale(.97); }
.mact.pressed, .linkbtn.pressed, .cal-nav.pressed { transform: scale(.9); }
.cal-day.pressed, .cover-btn.pressed, .cal-ym.pressed { transform: scale(.95); }
@media (prefers-reduced-motion: reduce) { .pressed:not(:disabled), .mact.pressed, .linkbtn.pressed { transform: none; } }
@media (prefers-reduced-motion: reduce) {
  #toast.show .toast-ic, #toast.show .toast-badge::after, .msg.anim-in, .club-joined > .club-em, .club-joined > i, .tabbar a.pop svg, .top-streak.ignite, .top-streak.ignite svg { animation: none; }
  .club-joined > i { display: none; }
}
/* V1.7.9 : propositions de lecture d'un club (membres → modérateurs) */
.prop-row { flex-wrap: wrap; }
.prop-acts { display: flex; align-items: center; gap: 6px; flex: none; }
.bilan-step .sm-bar > i.grow-to { transition: width .7s cubic-bezier(.2, .8, .2, 1); }
@media (prefers-reduced-motion: reduce) { .bilan-step .sm-bar > i.grow-to { transition: none; } }

/* 1.8.8 : livre à l'honneur depuis le catalogue (maquette validée par Max le 07/10) */
.crc-results { display: grid; gap: 8px; margin: 4px 0 10px; }
.crc-item { display: flex; gap: 12px; align-items: center; text-align: left; width: 100%; padding: 10px; border: 1px solid var(--line); border-radius: 12px; background: var(--surface); color: inherit; font: inherit; cursor: pointer; min-height: 44px; }
.crc-item:focus-visible { border-color: var(--accent); }
@media (hover: hover) { .crc-item:hover { border-color: var(--accent); } }
.crc-item .grow { display: grid; gap: 2px; min-width: 0; }
.crc-chosen { padding: 10px 12px; border-radius: 12px; background: var(--accent-soft); margin-bottom: 10px; }
.crc-chosen .sheet-book { margin-bottom: 0; }
.crc-join { display: flex; gap: 12px; align-items: flex-start; padding: 12px; border: 1px dashed var(--gold, #C9A86A); border-radius: 12px; margin: 4px 0 10px; cursor: pointer; }
.crc-join input { width: 22px; height: 22px; margin: 2px 0 0; flex: 0 0 auto; }

/* 1.8.8 (2e partie) : Lectures, une seule page, téléphone et PC (maquettes validées par Max le 07/10) */
.lect-chips { margin-bottom: 14px; }
.lect-grid { display: grid; grid-template-columns: minmax(0, 1fr); gap: 20px 16px; align-items: start; }
@media (min-width: 900px) { .lect-cur .lrows, .lect-done .lrows, .lect-open .lrows { grid-template-columns: repeat(2, minmax(0, 1fr)); } }   /* 1.8.75 (recette de Max, 6/11 : grand vide sous « À rejoindre · 1 ») : les rubriques s'empilent, les cartes vont par deux */
.lect-col { display: grid; gap: 20px; min-width: 0; }
.lect-sec .sec-title { margin: 0 0 10px 4px; }
.lect-row { align-items: center; }
.lect-row .lrow-main { gap: 4px; flex: 1 1 auto; }
.lect-row .lrow-top { align-items: center; }
.lect-row .lrow-top .pill { font-size: 0.75rem; padding: 1px 7px; }
.lect-row .lrow-top strong { flex: 0 1 auto; }
.lect-bar { display: block; height: 5px; border-radius: 3px; background: var(--line); position: relative; overflow: hidden; margin: 2px 0; }
.lect-bar > i { position: absolute; inset: 0 auto 0 0; background: var(--accent); border-radius: 3px; }
.lect-act .lrow-new { font-size: 0.75rem; }
.lect-empty { margin-top: 8px; }
.lect-head { flex-wrap: nowrap; align-items: flex-start; }
.lect-head .btn { flex: none; margin-top: 4px; }

/* 1.8.9 (retour de Max, 08/10) : la pastille des non-lus sur les cartes de l'accueil, et la ligne « Du nouveau dans … » du fil */
.scard .lrow-top { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.scard.has-new { border-color: color-mix(in srgb, var(--accent) 45%, var(--line)); }
.unread-notice a { color: inherit; }

/* 1.8.38 : le livre de l'animateur, verrouillé pendant la lecture (formulaire du livre, formulaire « Nouvelle lecture ») */
form[data-form="book"] .lock-note { margin-bottom: 12px; }
form[data-form="book"] input[readonly] { color: var(--muted, #6b6b6b); background: var(--bg-soft, rgba(0, 0, 0, 0.04)); cursor: not-allowed; }
form[data-form="book"] .lock-cover .label { display: block; font-weight: 600; margin-bottom: 6px; }
form[data-form="book"] .lock-cover .row { align-items: center; gap: 12px; }
form[data-form="session"] .lock-hint { margin: 4px 0 10px; }

/* ---------- 1.8.49 : la DA mise en valeur (recherche du 27/10 avec Max, recherche/da-2026-10-27/LISEZMOI.md ; décision de Max du 28/10, 11 h 10 :
   « une première version de la nouvelle DA qu'on push sur dev pour tester »). Trois choses, seulement quand le tableau photo est là
   (html[data-bg="photo"] ; sinon le décor vectoriel garde le panneau d'avant) :
   1. l'accueil n'a plus de panneau qui englobe tout : chaque zone est une tuile posée sur le tableau ;
   2. la matière des tuiles, des barres et du menu est un « verre lisible » : flou fort, couleurs du tableau ravivées, liseré et reflet,
      et une teinte qui suit le moment (plus couvrante à l'aube et au coucher) avec le texte un cran plus contrasté — mesuré à 4,5:1 partout ;
   3. sur PC, le menu garde sa largeur mais devient deux tuiles : les options du site en haut, le profil seul en bas. ---------- */
/* ---------- 1. La matière : verre lisible ---------- */
/* Ce qui fait le verre : flou fort, couleurs du tableau ravivées, liseré et reflet blancs.
   Ce qui le rend lisible : une teinte qui suit le moment, le texte un cran plus contrasté. */
html[data-bg="photo"] {
  --t-mix: 58%;                                   /* part de la teinte du moment (--glass) ; le reste laisse passer le tableau */
  --t-filter: blur(24px) saturate(1.5);         /* 1.8.54 : valeur documentaire ; les règles l'écrivent en clair, Safari 18 / iOS 18 ignore un
                                                   backdrop-filter dont la valeur vient d'une variable (bugs WebKit 289800, 297620 ; iPhone de Max, 29/10, 20 h 09) */
  --t-edge: rgba(255, 255, 255, .7);
  --t-shadow: inset 0 1px 0 rgba(255, 255, 255, .6), 0 10px 30px rgba(0, 0, 0, .12);
  --t-line: rgba(31, 36, 32, .10);                /* filets entre rangées dans une tuile */
  --t-bar-mix: 70%;                               /* barres du téléphone : le contenu défile dessous, plus couvrantes */
  --t-soft: color-mix(in srgb, var(--surface) 62%, transparent);   /* boutons secondaires : du verre plus clair, plus des blocs blancs */
}
html[data-bg="photo"][data-phase="aube"] { --t-mix: 66%; --t-bar-mix: 74%; }      /* tableaux clairs et contrastés : plus couvrant */
html[data-bg="photo"][data-phase="coucher"] { --t-mix: 68%; --t-bar-mix: 76%; }
html[data-bg="photo"][data-phase="apres-midi"] { --t-mix: 62%; --t-bar-mix: 72%; }   /* verre miel, plus foncé : le gris secondaire passait à 4,49:1 au pire fond */
html[data-bg="photo"]:not([data-light="night"]) { --ink: #171B18; --muted: #2E352F; --accent: #1C4733; }   /* le jour : un cran plus foncé */
html[data-bg="photo"][data-light="night"] {
  --t-mix: 56%; --t-edge: rgba(255, 255, 255, .14);
  --t-shadow: inset 0 1px 0 rgba(255, 255, 255, .08), 0 10px 30px rgba(0, 0, 0, .25); --t-line: rgba(255, 255, 255, .08);
  --ink: #F3F1EB; --muted: #CDD1DA; --accent: #9AD6B0; --accent-ink: #0E2418;       /* la nuit : un cran plus clair */
  --t-soft: color-mix(in srgb, var(--surface) 55%, transparent);
}
/* nuit profonde (après minuit, décision de Max du 30/09) : moins éclatant, sur le verre aussi ; le gris secondaire reste celui de la nuit (4,5:1) */
html[data-bg="photo"][data-phase="nuit-profonde"] { --ink: #E4E0D7; --accent: #8CC4A0; }

/* ---------- 2. Plus de panneau : la page de l'ACCUEIL devient transparente (1.8.50 : les autres pages gardent leur cadre ; la 1.8.49
   l'enlevait partout — Max, 28/10, 12 h 09 : « ça a cassé le reste ») ---------- */
html[data-bg="photo"] body[data-route="home"] main {
  background: transparent !important; border-color: transparent !important; box-shadow: none !important;
  -webkit-backdrop-filter: none !important; backdrop-filter: none !important;
}
@media (min-width: 861px) {
  /* PC : les tuiles prennent la largeur de l'ancien panneau, 16 px d'écart partout ; rien ne change de place, la largeur utile
     du texte varie de −12 px (Mes livres) à +30 px (Ma lecture) — mesures dans LISEZMOI.md */
  html[data-bg="photo"] body[data-route="home"] main { padding: 0 0 40px; border-width: 0; grid-template-columns: minmax(0, 1fr) 352px; column-gap: 16px; }
  html[data-bg="photo"] body[data-route="home"] .home-side { gap: 16px; }
  html[data-bg="photo"] body[data-route="home"] .notice { padding: 10px 12px 10px 18px; min-height: 56px; }
  html[data-bg="photo"] body[data-route="home"] .my-reading { padding: 16px 18px; }
  html[data-bg="photo"] body[data-route="home"] .home-main { padding: 20px 22px 18px; }
  html[data-bg="photo"] body[data-route="home"] .home-feed, html[data-bg="photo"] body[data-route="home"] .home-now, html[data-bg="photo"] body[data-route="home"] .home-sessions, html[data-bg="photo"] body[data-route="home"] .home-clubs { padding: 16px 18px; }
}
@media (max-width: 860px) {
  /* téléphone : avis et « Ma lecture » gardent leur largeur à 2 px près (boutons toujours empilés) ; le fil, désormais dans une
     tuile, perd 30 px (336 → 306) — point ouvert dans LISEZMOI.md */
  html[data-bg="photo"] body[data-route="home"] main { padding: 0 14px 32px; border-width: 0; }
  html[data-bg="photo"] body[data-route="home"] .home-side { gap: 12px; }
  html[data-bg="photo"] body[data-route="home"] .notice { padding: 10px 12px 10px 15px; }
  html[data-bg="photo"] body[data-route="home"] .my-reading { padding: 14px 18px; }
  html[data-bg="photo"] body[data-route="home"] .home-feed, html[data-bg="photo"] body[data-route="home"] .home-now, html[data-bg="photo"] body[data-route="home"] .home-sessions, html[data-bg="photo"] body[data-route="home"] .home-clubs, html[data-bg="photo"] body[data-route="home"] .home-main { padding: 14px 15px; }
}
html[data-bg="photo"] body[data-route="home"] .notice, html[data-bg="photo"] body[data-route="home"] .my-reading, html[data-bg="photo"] body[data-route="home"] .seg { margin-bottom: 16px; }
@media (max-width: 860px) { html[data-bg="photo"] body[data-route="home"] .notice, html[data-bg="photo"] body[data-route="home"] .my-reading, html[data-bg="photo"] body[data-route="home"] .seg { margin-bottom: 12px; } }

/* ---------- 3. Les tuiles ---------- */
html[data-bg="photo"] body[data-route="home"] .notice,
html[data-bg="photo"] body[data-route="home"] .my-reading,
html[data-bg="photo"] body[data-route="home"] .home-main,
html[data-bg="photo"] body[data-route="home"] .home-feed,
html[data-bg="photo"] body[data-route="home"] .home-now,
html[data-bg="photo"] body[data-route="home"] .home-sessions,
html[data-bg="photo"] body[data-route="home"] .home-clubs,
html[data-bg="photo"] body[data-route="home"] .welcome,
html[data-bg="photo"] body[data-route="home"] .seg {
  background-color: color-mix(in srgb, var(--glass, var(--surface)) var(--t-mix), transparent);
  -webkit-backdrop-filter: blur(24px) saturate(1.5); backdrop-filter: blur(24px) saturate(1.5);
  border: 1px solid var(--t-edge); box-shadow: var(--t-shadow); border-radius: 18px;
}
html[data-bg="photo"] body[data-route="home"] .notice { background-color: color-mix(in srgb, var(--accent-soft) var(--t-mix), transparent); }
html[data-bg="photo"] body[data-route="home"] .seg { border-radius: 14px; }
html[data-bg="photo"] body[data-route="home"] .seg button[aria-pressed="true"] { background: var(--t-soft); }

/* dans une tuile, les cartes deviennent des rangées séparées par un filet (pas de carte sur une tuile) */
html[data-bg="photo"] .home-now .people { gap: 0; }
html[data-bg="photo"] .home-sessions .sess { gap: 0; }
html[data-bg="photo"] .home-now .person,
html[data-bg="photo"] .home-sessions .card {
  background: transparent !important; border: 0; border-top: 1px solid var(--t-line); border-radius: 0; box-shadow: none;
  padding: 12px 0 10px;
}
html[data-bg="photo"] .home-now .person:first-child,
html[data-bg="photo"] .home-sessions .sess > .card:first-child,
html[data-bg="photo"] .home-sessions .sec-title + .card { border-top: 0; padding-top: 4px; }
html[data-bg="photo"] .feed li { border-bottom-color: var(--t-line); }
/* 1.8.53 (retour de Max, 29/10, 15 h 50 : « tout se mélange ») : « Les clubs, pour commencer » (compte sans ami) est une tuile comme les
   autres ; ses six clubs sont des rangées séparées par un filet, plus des cartes blanches posées sur la photo */
html[data-bg="photo"] body[data-route="home"] .home-clubs { margin-bottom: 0; }
/* 1.8.53 : la carte « Premiers pas » (nouveau membre) est une tuile aussi (capture de Max, 15 h 59 : « le tuto est pas traité ») */
html[data-bg="photo"] body[data-route="home"] .welcome { margin-bottom: 16px; }
@media (max-width: 860px) { html[data-bg="photo"] body[data-route="home"] .welcome { margin-bottom: 12px; } }
html[data-bg="photo"] body[data-route="home"] .home-clubs .lrows { gap: 0; margin-top: 4px; }
html[data-bg="photo"] body[data-route="home"] .home-clubs .lrow { background: transparent !important; border: 0; border-top: 1px solid var(--t-line); border-radius: 0; box-shadow: none; padding: 10px 0; }
html[data-bg="photo"] body[data-route="home"] .home-clubs .lrow:first-child { border-top: 0; padding-top: 4px; }

/* boutons blancs : du verre plus clair au lieu de blocs opaques */
html[data-bg="photo"] body[data-route="home"] .btn:not(.primary):not(.ghost):not(.danger),
html[data-bg="photo"] body.side-nav .tool.new { background: var(--t-soft); border-color: var(--t-edge); }

/* ---------- 4. Barres (téléphone et écrans moyens) : la même matière ---------- */
html[data-bg="photo"] .top, html[data-bg="photo"] .tabbar {
  background-color: color-mix(in srgb, var(--glass, var(--surface)) var(--t-bar-mix), transparent);
  -webkit-backdrop-filter: blur(24px) saturate(1.5); backdrop-filter: blur(24px) saturate(1.5);
}
@media (max-width: 820px) {
  html[data-bg="photo"] .top { border-bottom-color: var(--t-line); }
  html[data-bg="photo"] .tabbar { border-top-color: var(--t-line); }
}

/* ---------- 5. Menu PC (≥ 1 180 px) : même largeur, deux tuiles (Max, 27/10, 16 h 13 : « garder la largeur mais séparer le profil des options du site ») ---------- */
@media (min-width: 1180px) {
  /* le conteneur du menu n'a plus de fond ; il s'arrête après son contenu */
  /* 28/10 : la tuile du haut est bornée (fenêtre − profil 64 px − marges 16 + 16 − écart 12) et défile en elle-même,
     comme le menu d'aujourd'hui ; sans cela, avec 8 clubs sur 1 280 × 720, elle passait 99 px sous le profil (mesuré, suite verre). */
  html[data-bg="photo"] body.side-nav .top { bottom: auto; max-height: calc(100vh - 32px); overflow-y: auto; overscroll-behavior: contain; background: none !important; border: 0; box-shadow: none; -webkit-backdrop-filter: none !important; backdrop-filter: none !important; }   /* 1.8.67 : le profil est dans la colonne, la hauteur disponible va jusqu'en bas */
  html[data-bg="photo"] body.side-nav .top-in { height: auto; position: relative; overflow: visible; }
  /* tuile des options du site : portée par un pseudo-élément, pour que le profil (position fixe) ne soit pas capturé
     par un ancêtre à backdrop-filter (qui deviendrait son bloc conteneur) */
  html[data-bg="photo"] body.side-nav .top-in::before {
    content: ""; position: absolute; inset: 0; z-index: -1; border-radius: 18px;   /* 1.8.70 (Max, 5/11, 18 h 57, maquette B2) : la tuile englobe le profil */
    background-color: color-mix(in srgb, var(--glass, var(--surface)) var(--t-mix), transparent);
    -webkit-backdrop-filter: blur(24px) saturate(1.5); backdrop-filter: blur(24px) saturate(1.5);
    border: 1px solid var(--t-edge); box-shadow: var(--t-shadow);
  }
  /* carte du profil : 1.8.67 (variante A : attachée sous la tuile du menu) ; 1.8.70 (Max, 5/11, 18 h 57 : « B2 c'est super ! ») — DANS la tuile du
     menu, en bas, sur une carte en creux (plus claire), 12 px de marge, 14 px d'écart avec le dernier club */
  html[data-bg="photo"] body.side-nav .me {
    position: relative; left: auto; bottom: auto; width: 216px; margin: 14px -4px -4px; padding: 7px 12px; border-radius: 14px; box-sizing: border-box; min-height: 58px; height: auto;   /* 1.8.120 (Max, 16/11, 20 h 46) : 58 px au moins, plus si le texte passe sur deux lignes (« Série de 7 jours · protégée » à côté d'une pastille débordait d'une tuile à hauteur fixe de 58 px ; sur une ligne le texte fait 42 px : 7 px de marge au lieu de 10 gardent les 58 px) */
    background-color: color-mix(in srgb, var(--surface) 55%, transparent);
    -webkit-backdrop-filter: none; backdrop-filter: none;
    border: 1px solid var(--t-edge); box-shadow: none;
  }
  /* 1.8.67 : au plus 5 clubs + « Voir les autres clubs » dans le menu, le profil juste dessous ; à 1 280 × 720 la colonne entière défile (qa-interface-verre.py) */
}

/* ---------- 1.8.51 : le verre partout (Max, 28/10, 12 h 19 : « on étend l'ensemble de la DA au site pour tester sur dev »).
   Les autres pages gardent leur cadre et leur structure, mais le cadre devient le même verre lisible que les tuiles de l'accueil
   (teinte du moment à --t-mix, flou, liseré, reflet), et les cartes à l'intérieur deviennent du verre plus léger au lieu de blocs
   à 90 %. Le rework page par page (fond moins présent quand la page s'y prête, clarté et segmentation d'abord) est un lot à part
   (ROADMAP › Décisions, 28/10, 12 h 21). Les fenêtres et feuilles restent opaques. ---------- */
html[data-bg="photo"] body:not([data-route="home"]) main {
  background: color-mix(in srgb, var(--glass, var(--surface)) var(--t-mix), transparent);
  -webkit-backdrop-filter: blur(24px) saturate(1.5); backdrop-filter: blur(24px) saturate(1.5);
  border: 1px solid var(--t-edge); box-shadow: var(--t-shadow);
}
html[data-bg="photo"] body:not([data-route="home"]) :is(.card, .person, .stat, .forum, .sitem, .badge-card, .lrow, .btn:not(.primary):not(.ghost):not(.danger)) {
  background: var(--t-soft); border-color: var(--t-edge);
}
html[data-bg="photo"] body:not([data-route="home"]) .seg { background: color-mix(in srgb, var(--glass, var(--surface)) 40%, transparent); border-color: var(--t-edge); }
html[data-bg="photo"] body:not([data-route="home"]) .seg button[aria-pressed="true"] { background: var(--t-soft); }
/* le forum garde ses messages lisibles : son fond est le verre léger, la zone d'écriture aussi */
html[data-bg="photo"] body:not([data-route="home"]) .forum .compose-note { border-top-color: var(--t-line); }
@media (hover: hover) { html[data-bg="photo"] body:not([data-route="home"]) .lrow:hover, html[data-bg="photo"] body:not([data-route="home"]) .sitem:hover { background: color-mix(in srgb, var(--surface) 75%, transparent); } }
/* les fenêtres, feuilles et menus flottants restent opaques (règle des ambiances, V1.6.2) : rien à faire, ils ne sont pas dans main */
/* pastilles et étiquettes (retour de Max, 13 h 08 : « les pastilles sont moins visibles, ajout d'un contour ») : un contour net dans la
   couleur du texte, et un fond qui ne se dissout plus dans le verre */
html[data-bg="photo"] :is(.tag, .pill) { border: 1px solid color-mix(in srgb, currentColor 45%, transparent); }
html[data-bg="photo"] .tag:not(.priv) { background: color-mix(in srgb, var(--accent-soft) 70%, var(--surface)); }
html[data-bg="photo"] .pill:not(.reading):not(.done):not(.paused):not(.dropped):not(.club):not(.verified) { background: color-mix(in srgb, var(--surface) 70%, transparent); }
html[data-bg="photo"] .chip:not([aria-pressed="true"]) { border-color: color-mix(in srgb, var(--ink) 30%, transparent); background: color-mix(in srgb, var(--surface) 45%, transparent); }
@media (pointer: coarse) { html[data-bg="photo"] .chip:not([aria-pressed="true"]) { border-color: transparent; background-clip: padding-box; } html[data-bg="photo"] .badges-title .badges-toggle.chip { box-shadow: none; } }   /* 1.8.75 : la bordure transparente est la zone tactile ; le trait est en ombre intérieure (plus haut) ; 1.8.76 : le fond reste dans la bulle, « Voir plus » sans trait */
html[data-bg="photo"] .badges-title .badges-toggle { border-color: transparent; background: transparent; }   /* 1.8.75 (Max, 16 h 19) : « Voir plus » fantôme, en mode photo aussi */
@media (hover: hover) { html[data-bg="photo"] .badges-title .badges-toggle:hover { background: color-mix(in srgb, var(--surface) 45%, transparent); } }

/* repli : sans backdrop-filter (vieux Android, Firefox ESR), la teinte couvre davantage pour garder la lisibilité */
@supports not ((backdrop-filter: blur(1px)) or (-webkit-backdrop-filter: blur(1px))) {
  html[data-bg="photo"] { --t-mix: 88%; --t-bar-mix: 90%; }
  html[data-bg="photo"][data-phase="aube"], html[data-bg="photo"][data-phase="coucher"] { --t-mix: 90%; --t-bar-mix: 92%; }
}

/* 1.8.111 (base V1.8.47) : l'avertissement d'un livre incomplet — « pages à compléter ». Une pastille qu'on lit (la couverture ouvre la
   fiche, où se trouve « Compléter ») ; des couleurs à elle, lisibles sur le verre de jour comme de nuit (texte 8,2:1 sur son fond). */
.warn-pill { display: inline-flex; align-items: center; gap: 5px; padding: 2px 9px 2px 4px; border-radius: 999px; border: 1px solid #B7791F; background: #FFF6E0; color: #6B4100; font-size: 0.75rem; font-weight: 600; line-height: 1.3; white-space: nowrap; }
.warn-pill::before { content: "!"; display: inline-grid; place-items: center; width: 15px; height: 15px; border-radius: 50%; background: #6B4100; color: #FFF6E0; font-size: 0.6875rem; font-weight: 700; }
.notice.warn-note { background: #FFF6E0; color: #4A2D00; border: 1px solid #B7791F; margin: 12px 0 4px; }
form[data-form=ask-pages] .field { margin-top: 14px; }

/* 1.8.116 (V1.8.48) : l'avis en six phrases, le commentaire, ce qui se partage */
.rate-row { grid-template-columns: repeat(3, minmax(0, 1fr)); }   /* six phrases : trois par rangée, elles sont plus longues que les cinq mots d'avant */
.rate-opt { min-height: 68px; align-content: start; }
.r-great { color: #B5540A; } .r-meh { color: #4F6587; }
.rate-opt.r-great { color: #B5540A; } .rate-opt.r-meh { color: #4F6587; }
html[data-light="night"] .r-great, html[data-light="night"] .rate-opt.r-great { color: #F7B36B; }
html[data-light="night"] .r-meh, html[data-light="night"] .rate-opt.r-meh { color: #A9BBD9; }
html[data-light="night"] .rate-pin.r-great { color: #B5540A; } html[data-light="night"] .rate-pin.r-meh { color: #4F6587; }
.rate-texts { display: grid; gap: 10px; margin-top: 12px; }
.rate-texts ~ .acts:not(.rate-note-act) { margin-top: 16px; }   /* la règle d'avant visait .rate-note, qui vit maintenant dans .rate-texts */
.rate-texts .field { margin: 0; }
.rt-head { display: flex; align-items: center; justify-content: space-between; gap: 8px; margin-bottom: 4px; }
.rt-head label { margin: 0; }
.share-sw { display: inline-flex; align-items: center; gap: 6px; min-height: 32px; padding: 4px 10px; border-radius: 999px; border: 1px solid var(--line); background: var(--surface-2); color: var(--ink-2, var(--ink)); font: 600 0.75rem/1.2 var(--f-ui); cursor: pointer; white-space: nowrap; }
.share-sw.on { border-color: #2F7A4F; color: #1F5C3A; background: color-mix(in srgb, #2F7A4F 12%, var(--surface)); }
html[data-light="night"] .share-sw.on { border-color: #8FCBA5; color: #BFE6CD; background: color-mix(in srgb, #8FCBA5 16%, var(--surface)); }
@media (pointer: coarse) { .share-sw { min-height: 44px; padding: 6px 12px; } }
.peer-rate { display: inline-flex; align-items: center; gap: 6px; margin-top: 6px; font: 600 0.8125rem/1.2 var(--f-ui); }
.peer-rate svg { width: 18px; height: 18px; flex: none; }
.peer-rate span { color: var(--ink); }
.peer-rate .crack { stroke: var(--surface, #FFFDF8); }
.peer-texts:empty { display: none; }
.peer-texts { display: grid; gap: 10px; margin: 12px 0; }
.peer-text p { margin: 0 0 4px; }
.peer-text blockquote, .peer-text .peer-comment { margin: 0; padding: 8px 12px; border-radius: 10px; background: var(--surface-2); border-left: 3px solid var(--line); white-space: pre-wrap; overflow-wrap: anywhere; font-size: 0.9375rem; line-height: 1.45; }
.peer-text blockquote { font-style: italic; }
.err-more { margin: 10px 0 0; }
/* 1.8.117 (V1.8.49) : signaler une note ou un commentaire public ; les textes signalés du super admin ; le texte retiré du partage */
.peer-text .peer-report { display: inline-block; margin-top: 4px; }
.share-locked { display: inline-flex; align-items: center; gap: 6px; min-height: 32px; padding: 4px 10px; border-radius: 999px; border: 1px dashed var(--line); color: var(--muted); font: 600 0.75rem/1.2 var(--f-ui); text-align: left; }
.share-locked svg { flex: none; }
.tr-item .tr-text { margin: 8px 0 0; padding: 8px 12px; border-radius: 10px; background: var(--surface-2); border-left: 3px solid var(--line); white-space: pre-wrap; overflow-wrap: anywhere; font-size: 0.9375rem; line-height: 1.45; }
.tr-item .tr-now { border-left-color: var(--accent, #C2571A); }
.tr-item .tr-reasons, .tr-item .tr-state { margin: 8px 0 0; overflow-wrap: anywhere; }

/* 1.8.119 (V1.8.50) : la feuille « Participants » d'une lecture (exclure, réintégrer) */
.sp-list { list-style: none; margin: 10px 0 0; padding: 0; display: grid; gap: 8px; }
.sp-item { display: flex; align-items: center; gap: 10px; min-height: 44px; }
.sp-item .grow { min-width: 0; overflow-wrap: anywhere; }
.sp-item .btn { flex: 0 0 auto; }
.sp-title { margin: 18px 0 0; font-size: 1rem; }
.sess-reports .mr-acts .sess-report-ban { flex-basis: 100%; }

/* 1.8.120 : le livre d'une lecture de club se cherche dans la collection (plus de liste déroulante) */
/* 1.8.124 (Max, 17/11, 20 h 09, sur son téléphone : « un overlap entre le champ "titre ou auteur" et le premier livre de la liste ») :
   le champ et la liste étaient collés (0 px), comme le libellé et le texte au-dessus — 8 px et 12 px */
.crf-pick #crf-search { display: grid; gap: 8px; }
form[data-form="club-read"] > p + .crf-pick { margin-top: 12px; }
.crf-pick #crf-q { width: 100%; }
.crf-pick .catalog-results { margin: 0; max-height: min(46vh, 380px); overflow-y: auto; }
.crf-pick .catalog-item { width: 100%; }
.crf-pick .crf-more, .crf-pick .crf-none { margin: 2px 0 0; }

/* 1.8.121 : moins de 10 pages, l'appli demande confirmation sous le champ (jamais un refus) */
.few-pages { margin: 6px 0 0; color: #8A5A00; font-weight: 600; }
html[data-light="night"] .few-pages { color: #E0C284; }
