/* Quilalu — feuille de styles. Polices auto-hébergées (licence OFL). */
@font-face { font-family: "Baloo 2"; font-weight: 700; font-display: swap; src: url("../fonts/baloo-2-latin-700-normal.4d7711a795ae.woff2") format("woff2"); }
@font-face { font-family: "Baloo 2"; font-weight: 800; font-display: swap; src: url("../fonts/baloo-2-latin-800-normal.ac10b2674176.woff2") format("woff2"); }
@font-face { font-family: "IBM Plex Sans"; font-weight: 400; font-display: swap; src: url("../fonts/ibm-plex-sans-latin-400-normal.77bc02670657.woff2") format("woff2"); }
@font-face { font-family: "IBM Plex Sans"; font-weight: 500; font-display: swap; src: url("../fonts/ibm-plex-sans-latin-500-normal.f7016cd446d2.woff2") format("woff2"); }
@font-face { font-family: "IBM Plex Sans"; font-weight: 600; font-display: swap; src: url("../fonts/ibm-plex-sans-latin-600-normal.196e3cbc5fee.woff2") format("woff2"); }

:root {
  --creme: #FBF8F3;
  --encre: #2A211B;
  --noyer: #2B211A;
  --noyer-clair: #3D3027;
  --sarcelle: #0F7F7A;
  --sarcelle-fonce: #0A5A56;
  --orange: #F28C3A;
  --framboise: #E04A6E;
  --framboise-texte: #9E2643;
  --vert: #2E8B57;
  --bordure: #E6E0D6;
  --bordure-forte: #C9BFB1;
  --discret: #5E5850;
  --blanc: #FFFFFF;
  --titre: "Baloo 2", "Segoe UI", system-ui, sans-serif;
  --texte: "IBM Plex Sans", "Segoe UI", system-ui, sans-serif;
}

* { box-sizing: border-box; }
body { margin: 0; background: var(--creme); color: var(--encre); font-family: var(--texte); font-size: 15px; line-height: 1.45; }
a { color: var(--sarcelle); }
a:hover { color: var(--sarcelle-fonce); }
h1, h2, h3 { font-family: var(--titre); line-height: 1.1; margin: 0; }
h1 { font-size: 40px; font-weight: 800; letter-spacing: -0.01em; }
h2 { font-size: 22px; font-weight: 700; }
.visuellement-cache { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

/* Mise en page */
.page { display: flex; flex-wrap: wrap; min-height: 100vh; }
.menu { flex: 1 1 232px; background: var(--noyer); color: #F3ECE3; padding: 24px 18px; display: flex; flex-direction: column; gap: 24px; }
.marque { display: flex; align-items: center; gap: 10px; color: #FBF8F3; text-decoration: none; padding: 0 6px; }
.marque span { font-family: var(--titre); font-size: 32px; font-weight: 800; line-height: 1; }
.menu ul { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 2px; }
.menu a.lien { display: flex; align-items: center; min-height: 44px; padding: 0 12px; border-radius: 8px; color: #E3D8CC; text-decoration: none; }
.menu a.lien[aria-current="page"] { background: var(--noyer-clair); color: #FFFFFF; font-weight: 500; }
.menu a.lien:hover { background: var(--noyer-clair); color: #FFFFFF; }
.menu .action { background: var(--orange); color: #2A1606; font-weight: 600; justify-content: center; }
.menu .action:hover { background: #F6A15E; color: #2A1606; }
.menu .pied { margin-top: auto; border-top: 1px solid #4A3B30; padding: 16px 6px 0; font-size: 13px; color: #C4B6A6; display: flex; flex-direction: column; gap: 6px; }
.menu .pied a { color: #E3D8CC; }
.menu .pied button { background: none; border: 0; padding: 0; color: #E3D8CC; font: inherit; text-decoration: underline; cursor: pointer; text-align: left; }
.contenu { flex: 999 1 640px; min-width: 0; padding: 32px 40px 56px; display: flex; flex-direction: column; gap: 24px; }
@media (max-width: 700px) { .contenu { padding: 20px 16px 40px; } h1 { font-size: 32px; } }

.entete { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: flex-end; gap: 16px; }
.sous-titre { color: var(--discret); font-size: 14px; }

/* Éléments */
.bouton { display: inline-flex; align-items: center; justify-content: center; min-height: 44px; padding: 0 18px; border-radius: 10px; border: 0; background: var(--sarcelle); color: #FFFFFF; font: inherit; font-weight: 600; text-decoration: none; cursor: pointer; }
.bouton:hover { background: var(--sarcelle-fonce); color: #FFFFFF; }
.bouton.secondaire { background: var(--blanc); color: var(--encre); border: 1px solid var(--bordure-forte); font-weight: 500; }
.carte { background: var(--blanc); border: 1px solid var(--bordure); border-radius: 14px; padding: 20px; display: flex; flex-direction: column; gap: 12px; }
.pastilles { display: flex; flex-wrap: wrap; gap: 8px; }
.pastille { display: inline-flex; align-items: center; min-height: 40px; padding: 0 16px; border-radius: 999px; border: 1px solid #D9D0C3; background: var(--blanc); color: var(--encre); text-decoration: none; font-size: 14px; }
.pastille[aria-current="true"] { background: var(--encre); border-color: var(--encre); color: #FFFFFF; }
.badge { display: inline-block; font-size: 12px; font-weight: 500; padding: 2px 8px; border-radius: 999px; }
.badge.dispo { background: #D6EEEC; color: var(--sarcelle-fonce); }
.badge.prete { background: #FBE1E8; color: var(--framboise-texte); }
.badge.a_lire { background: #FDEBD9; color: #8A4A12; }
.badge.envie { background: #DDF0E4; color: #1F6A41; }
.etoiles { color: var(--sarcelle); letter-spacing: 1px; font-size: 13px; }

/* Grille de livres */
.grille { display: grid; grid-template-columns: repeat(auto-fill, minmax(140px, 1fr)); gap: 28px 20px; }
.livre { display: flex; flex-direction: column; gap: 8px; color: var(--encre); text-decoration: none; }
.couverture { aspect-ratio: 2 / 3; border-radius: 6px; overflow: hidden; box-shadow: 0 1px 2px rgba(42,33,27,.18), 0 10px 18px -12px rgba(42,33,27,.5); }
.couverture img { width: 100%; height: 100%; object-fit: cover; display: block; }
.couverture .typo { height: 100%; padding: 14px 12px; display: flex; flex-direction: column; justify-content: space-between; color: #FFFFFF; }
.couverture .typo strong { font-family: var(--titre); font-size: 18px; font-weight: 700; line-height: 1.12; }
.couverture .typo span { font-size: 12px; opacity: .9; }
.livre .titre { font-weight: 600; font-size: 14px; line-height: 1.3; }
.livre .auteur { font-size: 13px; color: var(--discret); }

/* Formulaires */
form .champ { display: flex; flex-direction: column; gap: 6px; }
label { font-size: 13px; font-weight: 600; }
input[type=text], input[type=search], input[type=email], input[type=password], textarea, select {
  min-height: 44px; padding: 10px 12px; border: 1px solid #D9D0C3; border-radius: 10px; background: var(--blanc); color: var(--encre); font: inherit; width: 100%;
}
textarea { min-height: 200px; font-family: ui-monospace, Consolas, monospace; font-size: 14px; }
input:focus, textarea:focus, select:focus, .bouton:focus-visible, a:focus-visible { outline: 3px solid rgba(15,127,122,.35); outline-offset: 1px; }
.aide { font-size: 13px; color: var(--discret); }
.erreur { color: var(--framboise-texte); font-size: 14px; }
.messages { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 8px; }
.messages li { padding: 12px 16px; border-radius: 10px; background: #D6EEEC; color: var(--sarcelle-fonce); }
.messages li.error { background: #FBE1E8; color: var(--framboise-texte); }
.colonnes { display: flex; flex-wrap: wrap; gap: 32px; align-items: flex-start; }
.colonnes > .principal { flex: 999 1 480px; min-width: 0; display: flex; flex-direction: column; gap: 16px; }
.colonnes > .lateral { flex: 1 1 300px; min-width: 0; display: flex; flex-direction: column; gap: 16px; }

/* Verdict de vérification */
.verdict { border-radius: 18px; padding: 20px; display: flex; flex-direction: column; gap: 6px; }
.verdict.meme_edition, .verdict.autre_edition { background: var(--sarcelle); color: #FFFFFF; }
.verdict.chez_un_proche { background: #FBE1E8; color: #7A1D35; }
.verdict.absent { background: #FDEBD9; color: #6E3A0E; }
.verdict h2 { font-size: 26px; font-weight: 800; }

.tableau { width: 100%; border-collapse: collapse; font-size: 14px; }
.tableau th { text-align: left; color: var(--discret); font-weight: 500; padding: 8px 10px; border-bottom: 1px solid var(--bordure); }
.tableau td { padding: 8px 10px; border-bottom: 1px solid #EFE9E0; }
.defilement { overflow-x: auto; }
.progression { height: 8px; border-radius: 4px; background: #EFE9E0; overflow: hidden; }
.progression > div { height: 100%; background: var(--sarcelle); }

.connexion { min-height: 100vh; display: flex; align-items: center; justify-content: center; padding: 24px 16px; }
.connexion .carte { width: 100%; max-width: 400px; padding: 28px; gap: 16px; }
