/* ================================================
   Les Amis des Livres — Style YouTube 2011
   Fond gris clair #f8f8f8, header sombre #282828
   Nav rouge #cc0000, liens bleu #2C5F8A, Arial
   ================================================ */

:root {
  --rouge:   #cc0000;
  --rouge-h: #990000;
  --bleu:    #2C5F8A;
  --bleu-h:  #1a4a70;
  --fond:    #f8f8f8;
  --blanc:   #ffffff;
  --gris:    #e8e8e8;
  --gris-b:  #dddddd;
  --gris-d:  #cccccc;
  --txt:     #333333;
  --txt-m:   #666666;
  --txt-l:   #999999;
  --or:      #cc9900;
  --header-d: #282828;
  --header-n: #333333;
}

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }

body {
  font-family: Arial, Helvetica, sans-serif;
  background: var(--fond);
  color: var(--txt);
  font-size: 13px;
  line-height: 1.4;
}

a { color: var(--bleu); text-decoration: none; }
a:hover { color: var(--rouge); text-decoration: underline; }
img { display: block; max-width: 100%; }

/* ── HEADER ── */
.header { background: var(--header-d); }

.header-top {
  background: var(--header-d);
  padding: 6px 12px;
  display: flex; align-items: center; gap: 8px;
  border-bottom: 1px solid #444;
}
.logo-img {
  height: 34px; width: auto;
  filter: invert(1) brightness(1.1);
  flex-shrink: 0;
}
.search-bar {
  display: flex; flex: 1; max-width: 480px; margin: 0 8px;
}
.search-bar input {
  flex: 1; padding: 4px 8px; height: 28px;
  border: 1px solid #999; border-right: none;
  font-family: Arial, sans-serif; font-size: 12px;
  background: #fff; color: #333; outline: none;
  border-radius: 0;
}
.search-bar input:focus { border-color: #6699dd; }
.search-bar button {
  background: var(--gris); border: 1px solid #999; border-left: none;
  padding: 0 10px; height: 28px; cursor: pointer;
  font-size: 11px; font-family: Arial, sans-serif;
  color: #333; border-radius: 0;
}
.search-bar button:hover { background: #d8d8d8; }

.header-nav {
  background: var(--header-n);
  display: flex; align-items: center; height: 30px;
  padding: 0 12px;
  border-bottom: 3px solid var(--rouge);
}
.nav a {
  color: #cccccc; font-size: 12px; font-weight: bold;
  padding: 0 10px; height: 30px;
  display: inline-flex; align-items: center;
  text-decoration: none;
  border-right: 1px solid #555;
  transition: background .12s, color .12s;
}
.nav a:hover { background: #555; color: #fff; text-decoration: none; }
.nav a.actif { background: var(--rouge); color: #fff; }

/* ── LAYOUT PRINCIPAL ── */
.page-wrap {
  max-width: 1000px; margin: 0 auto; padding: 12px;
  display: flex; gap: 16px;
}
.content-main { flex: 1; min-width: 0; }
.sidebar { width: 210px; flex-shrink: 0; }

/* ── SECTIONS ── */
.section { margin-bottom: 18px; }

.sh {
  display: flex; align-items: center; justify-content: space-between;
  border-bottom: 2px solid var(--rouge);
  padding-bottom: 5px; margin-bottom: 10px;
}
.sh-titre { font-size: 14px; font-weight: bold; color: var(--txt); }
.sh-lien { font-size: 11px; color: var(--bleu); }
.sh-lien:hover { color: var(--rouge); }

/* ── GRILLE LIVRES ── */
.livres-grille {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(185px, 1fr));
  gap: 10px;
}

.carte {
  background: var(--blanc);
  border: 1px solid var(--gris-b);
  display: flex; flex-direction: column;
}
.carte:hover .info-titre { color: var(--rouge); }

.couv { position: relative; height: 150px; background: #e0e0e0; overflow: hidden; }
.couv img { width: 100%; height: 100%; object-fit: cover; }
.couv-vide {
  width: 100%; height: 100%;
  display: flex; align-items: center; justify-content: center;
  font-size: 3rem; color: #bbb;
}
.couv-vide.grand { height: 220px; }

.bg-genre {
  position: absolute; top: 4px; left: 4px;
  background: rgba(0,0,0,.72); color: #fff;
  font-size: 10px; padding: 2px 5px; font-weight: bold;
}
.bg-genre.inline { position: static; display: inline-block; background: rgba(0,0,0,.15); color: #333; margin-bottom: 5px; }
.bv {
  position: absolute; bottom: 4px; right: 4px;
  background: rgba(0,0,0,.78); color: #fff;
  font-size: 10px; padding: 1px 4px; font-weight: bold;
}

.info { padding: 6px 7px 8px; flex: 1; display: flex; flex-direction: column; gap: 3px; }
.info-titre { font-size: 12px; font-weight: bold; color: var(--txt); line-height: 1.3; }
.info-auteur { font-size: 11px; color: var(--txt-m); }
.info-meta { display: flex; align-items: center; justify-content: space-between; margin-top: auto; padding-top: 4px; }

.et { font-size: 12px; color: var(--or); }
.et small { font-size: 10px; color: var(--txt-l); }
.pas-note { font-size: 11px; color: var(--txt-l); font-style: italic; }
.ba {
  background: var(--gris); border: 1px solid var(--gris-d);
  font-size: 10px; padding: 1px 4px; color: var(--txt-m);
}

/* ── FICHE LIVRE ── */
.livre-hero { background: var(--blanc); border-bottom: 1px solid var(--gris-b); padding: 12px; }
.livre-fiche { display: flex; gap: 16px; align-items: flex-start; }
.fiche-couv { width: 180px; flex-shrink: 0; border: 1px solid var(--gris-b); }
.fiche-couv img { width: 100%; }

.fiche-titre { font-size: 18px; font-weight: bold; color: var(--txt); margin-bottom: 4px; line-height: 1.2; }
.fiche-auteur { font-size: 13px; color: var(--txt-m); margin-bottom: 8px; }
.fiche-note { display: flex; align-items: center; gap: 6px; margin-bottom: 7px; }
.note-g { font-size: 14px; color: var(--or); }
.note-n { font-weight: bold; font-size: 13px; }
.note-t { color: var(--txt-l); font-size: 11px; }
.fiche-badges { display: flex; flex-wrap: wrap; gap: 5px; margin-bottom: 10px; }
.bp {
  background: var(--gris); border: 1px solid var(--gris-d);
  font-size: 11px; padding: 2px 7px; color: var(--txt-m);
}
.fiche-desc { font-size: 13px; color: #555; line-height: 1.55; }

/* ── VIDÉOS ── */
.videos-grille {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(270px, 1fr));
  gap: 10px;
}
.carte-v { background: var(--blanc); border: 1px solid var(--gris-b); }
.ve { position: relative; padding-top: 56.25%; background: #000; }
.ve iframe { position: absolute; top: 0; left: 0; width: 100%; height: 100%; }
.vi { padding: 7px 8px; }
.vi h3 { font-size: 12px; font-weight: bold; margin-bottom: 4px; color: var(--txt); }
.bt { font-size: 10px; font-weight: bold; padding: 1px 5px; }
.bt-ba { background: #fde8e8; border: 1px solid #f8b3b3; color: #900; }
.bt-in { background: #e8f4e8; border: 1px solid #a0cca0; color: #060; }
.bt-le { background: #e8eef8; border: 1px solid #a0b8e0; color: #006; }
.bt-au { background: var(--gris); border: 1px solid var(--gris-d); color: var(--txt-m); }

/* ── CRITIQUES ── */
.critiques-liste { display: flex; flex-direction: column; gap: 8px; }
.critique {
  background: var(--blanc); border: 1px solid var(--gris-b);
  padding: 8px;
}
.cr-head { display: flex; align-items: flex-start; gap: 7px; margin-bottom: 5px; }
.cr-av {
  width: 32px; height: 32px; flex-shrink: 0;
  background: var(--rouge); color: #fff;
  font-weight: bold; font-size: 14px;
  display: flex; align-items: center; justify-content: center;
}
.cr-pseudo { font-size: 12px; font-weight: bold; color: var(--txt); }
.cr-age {
  background: var(--gris); border: 1px solid var(--gris-d);
  font-size: 10px; padding: 1px 4px; color: var(--txt-m); margin-left: 4px;
}
.cr-note { color: var(--or); font-size: 12px; margin-top: 2px; }
.cr-date { margin-left: auto; font-size: 10px; color: var(--txt-l); }
.cr-texte { font-size: 12px; color: #555; line-height: 1.5; }

/* ── BREADCRUMB ── */
.breadcrumb {
  background: var(--blanc); border-bottom: 1px solid var(--gris-b);
  padding: 5px 12px; font-size: 11px; color: var(--txt-l);
}
.breadcrumb a { color: var(--bleu); }
.breadcrumb a:hover { color: var(--rouge); }

/* ── SIDEBAR ── */
.sidebar-box { background: var(--blanc); border: 1px solid var(--gris-b); margin-bottom: 10px; }
.sb-head {
  background: var(--gris); border-bottom: 1px solid var(--gris-b);
  padding: 5px 8px; font-size: 12px; font-weight: bold; color: var(--txt);
}
.sb-stat { padding: 8px; display: flex; justify-content: space-around; text-align: center; }
.sb-n { font-size: 20px; font-weight: bold; color: var(--rouge); line-height: 1; }
.sb-l { font-size: 10px; color: var(--txt-l); text-transform: uppercase; margin-top: 2px; }
.sb-liens { padding: 6px 8px; display: flex; flex-direction: column; gap: 4px; }
.sb-liens a { font-size: 12px; color: var(--bleu); }
.sb-liens a:hover { color: var(--rouge); }
.sb-liens a::before { content: '» '; }

/* ── BOUTONS ── */
.btn {
  display: inline-block; cursor: pointer; font-family: Arial, sans-serif;
  font-size: 12px; font-weight: bold; padding: 5px 12px;
  border: none; text-decoration: none; text-align: center;
}
.btn:hover { text-decoration: none; }
.bv2 { background: var(--bleu); color: #fff; border: 1px solid var(--bleu-h); }
.bv2:hover { background: var(--bleu-h); color: #fff; }
.bb { background: var(--gris); color: var(--txt); border: 1px solid var(--gris-d); }
.bb:hover { background: #d8d8d8; color: var(--txt); }
.btn-rouge { background: var(--rouge); color: #fff; border: 1px solid var(--rouge-h); }
.btn-rouge:hover { background: var(--rouge-h); color: #fff; }

/* ── FOOTER ── */
.footer {
  background: var(--header-d);
  border-top: 1px solid #444;
  padding: 10px 12px; text-align: center;
  font-size: 11px; color: #888; margin-top: 16px;
}
.footer a { color: #999; }
.footer a:hover { color: #fff; text-decoration: underline; }

/* ── RESPONSIVE ── */
@media (max-width: 700px) {
  .page-wrap { flex-direction: column; }
  .sidebar { width: 100%; }
  .livre-fiche { flex-direction: column; }
  .fiche-couv { width: 150px; }
  .search-bar { max-width: 200px; }
}
