/* =========================================================================
   LIBRAIRIE DE FONSORBES — site.css
   Archétype : « Presse littéraire vintage » (encre & papier, éditorial).
   Signature : la COLONNE DE CRITIQUE — lettrines (::first-letter), doubles
   filets d'encre, tuiles « tranche de livre » à liseré laiton, papier grainé.
   ANTI-FOOTPRINT : aucune classe custom — on ne style QUE des classes/ids
   Bootstrap existants, des éléments et des pseudo-éléments.
   ========================================================================= */

:root {
  /* Palette encre & papier */
  --bs-primary: #6b2737;          /* bordeaux profond (encre de couverture) */
  --bs-primary-rgb: 107, 39, 55;
  --bs-secondary: #b8893a;        /* laiton / ocre doré (accent) */
  --bs-secondary-rgb: 184, 137, 58;

  --lf-bordeaux: #6b2737;
  --lf-bordeaux-deep: #501b29;
  --lf-bordeaux-soft: #883645;
  --lf-brass: #b8893a;
  --lf-brass-deep: #9a6f28;
  --lf-paper: #f4ecdd;
  --lf-paper-deep: #ece0cb;
  --lf-paper-card: #fbf6ea;
  --lf-ink: #241b1e;
  --lf-ink-soft: #4d4044;

  --bs-body-bg: var(--lf-paper);
  --bs-body-color: var(--lf-ink);
  --bs-body-font-family: 'Spectral', Georgia, 'Times New Roman', serif;
  --bs-body-font-size: 1.05rem;
  --bs-body-line-height: 1.75;

  --bs-heading-color: var(--lf-bordeaux);
  --bs-link-color: var(--lf-bordeaux);
  --bs-link-color-rgb: 107, 39, 55;
  --bs-link-hover-color: var(--lf-brass-deep);
  --bs-border-color: #ddccae;

  --bs-emphasis-color: var(--lf-ink);
  --bs-secondary-color: var(--lf-ink-soft);

  --bs-light: var(--lf-paper-card);
  --bs-light-rgb: 251, 246, 234;
  --bs-dark: #241b1e;
  --bs-dark-rgb: 36, 27, 30;

  --lf-shadow: 0 22px 48px -22px rgba(36, 27, 30, 0.45),
    0 8px 18px -12px rgba(36, 27, 30, 0.25);
  --lf-shadow-soft: 0 16px 34px -22px rgba(36, 27, 30, 0.4);
}

/* Papier grainé + halos chauds (profondeur, pas de couleur plate) */
body {
  background-color: var(--lf-paper);
  background-image:
    radial-gradient(1200px 560px at 84% -10%, rgba(184, 137, 58, 0.13), transparent 60%),
    radial-gradient(1000px 520px at -8% 2%, rgba(107, 39, 55, 0.10), transparent 58%),
    url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='160' height='160'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.85' numOctaves='2' stitchTiles='stitch'/%3E%3CfeColorMatrix type='saturate' values='0'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)' opacity='0.035'/%3E%3C/svg%3E");
  background-attachment: fixed, fixed, fixed;
  -webkit-font-smoothing: antialiased;
}

/* ---------- Typographie éditoriale ---------- */
h1, h2, h3, h4, h5, h6,
.navbar-brand,
.display-1, .display-2, .display-3, .display-4, .display-5, .display-6,
.blockquote-footer {
  font-family: 'Playfair Display', Georgia, 'Times New Roman', serif;
}
h1, .display-3, .display-4 { font-weight: 800; line-height: 1.06; letter-spacing: -0.01em; }
.display-3 { letter-spacing: -0.02em; }
h2 { font-weight: 700; }
h3, h4 { font-weight: 600; }
p { text-wrap: pretty; }
.lead { font-weight: 400; font-size: 1.3rem; color: var(--lf-ink-soft); }
strong, b { color: var(--lf-bordeaux-deep); }

::selection { background: rgba(184, 137, 58, 0.28); color: var(--lf-ink); }

/* petites capitales d'accent (eyebrows) */
.text-secondary { color: var(--lf-brass-deep) !important; }
.fw-semibold.text-uppercase { letter-spacing: 0.18em; }

a { transition: color 0.18s ease; }

/* =========================================================================
   NAVBAR — papier + double filet d'encre en pied
   ========================================================================= */
.navbar.sticky-top {
  background-color: rgba(244, 236, 221, 0.88) !important;
  backdrop-filter: saturate(150%) blur(10px);
  -webkit-backdrop-filter: saturate(150%) blur(10px);
  border-bottom: 3px double var(--lf-bordeaux);
  box-shadow: 0 8px 24px -20px rgba(36, 27, 30, 0.6);
}
.navbar-brand { line-height: 1; }
.navbar-brand span:first-child { font-size: 1.4rem; font-weight: 800; color: var(--lf-bordeaux); letter-spacing: 0.01em; }
.navbar-brand span:last-child { font-size: 0.66rem; letter-spacing: 0.32em; color: var(--lf-brass-deep); margin-top: 0.2rem; }
.navbar .nav-link {
  font-family: 'Spectral', serif;
  font-weight: 500;
  color: var(--lf-ink) !important;
  position: relative;
  padding-inline: 0.9rem;
}
.navbar .nav-link::after {
  content: '';
  position: absolute;
  left: 0.9rem; right: 0.9rem; bottom: 0.35rem;
  height: 2px;
  background: var(--lf-brass);
  transform: scaleX(0);
  transform-origin: left;
  transition: transform 0.3s cubic-bezier(0.22, 1, 0.36, 1);
}
.navbar .nav-link:hover, .navbar .nav-link:focus { color: var(--lf-bordeaux) !important; }
.navbar .nav-link:hover::after, .navbar .nav-link:focus::after { transform: scaleX(1); }
.navbar .btn-outline-secondary {
  --bs-btn-color: var(--lf-brass-deep);
  --bs-btn-border-color: var(--lf-brass);
  --bs-btn-hover-bg: var(--lf-brass);
  --bs-btn-hover-border-color: var(--lf-brass);
  --bs-btn-hover-color: #fff;
  width: 2.3rem; height: 2.3rem;
}

/* =========================================================================
   BOUTONS — encre pleine + lift, ou laiton
   ========================================================================= */
.btn { --bs-btn-font-family: 'Spectral', serif; --bs-btn-font-weight: 600; border-radius: 2px; letter-spacing: 0.01em; transition: transform 0.2s ease, box-shadow 0.2s ease, background 0.2s ease; }
.btn-primary {
  --bs-btn-bg: var(--lf-bordeaux);
  --bs-btn-border-color: var(--lf-bordeaux);
  --bs-btn-hover-bg: var(--lf-bordeaux-deep);
  --bs-btn-hover-border-color: var(--lf-bordeaux-deep);
  --bs-btn-active-bg: var(--lf-bordeaux-deep);
  box-shadow: 0 10px 22px -12px rgba(107, 39, 55, 0.65);
}
.btn-primary:hover { transform: translateY(-2px); box-shadow: 0 16px 30px -14px rgba(107, 39, 55, 0.7); }
.btn-lg { padding: 0.75rem 1.7rem; }

/* =========================================================================
   HERO — cadre laiton décalé + double filet sous le titre
   ========================================================================= */
#hero { padding-top: 2.5rem; }
#hero h1 { position: relative; padding-bottom: 1.1rem; margin-bottom: 1.5rem; }
#hero h1::after {
  content: '';
  position: absolute;
  left: 0; bottom: 0;
  width: 120px; height: 6px;
  border-top: 2px solid var(--lf-bordeaux);
  border-bottom: 2px solid var(--lf-brass);
}
#hero .lead::first-letter,
#article-body > div > p:first-of-type::first-letter {
  float: left;
  font-family: 'Playfair Display', serif;
  font-weight: 800;
  font-size: 3.6rem;
  line-height: 0.82;
  padding: 0.18rem 0.6rem 0 0;
  color: var(--lf-bordeaux);
}
#hero figure { position: relative; }
#hero figure img {
  position: relative;
  z-index: 1;
  border: 1px solid rgba(36, 27, 30, 0.12);
  box-shadow: var(--lf-shadow);
}
#hero figure::before {
  content: '';
  position: absolute;
  inset: 18px -18px -18px 18px;
  border: 1px solid var(--lf-brass);
  background:
    repeating-linear-gradient(45deg, rgba(184,137,58,0.08) 0 8px, transparent 8px 16px);
  z-index: 0;
}

/* ---------- INTRO ---------- */
#intro p.fs-5 { color: var(--lf-ink); }
#intro .text-uppercase { position: relative; display: inline-block; left: 50%; transform: translateX(-50%); padding: 0 1.2rem; }
#intro .text-uppercase::before,
#intro .text-uppercase::after {
  content: ''; position: absolute; top: 50%; width: 42px; height: 1px; background: var(--lf-brass);
}
#intro .text-uppercase::before { right: 100%; }
#intro .text-uppercase::after { left: 100%; }

/* ---------- GALERIE ---------- */
#gallery figure {
  border: 1px solid rgba(36, 27, 30, 0.12);
  box-shadow: var(--lf-shadow-soft);
  overflow: hidden;
}
#gallery img { transition: transform 0.6s cubic-bezier(0.22, 1, 0.36, 1); display: block; }
#gallery figure:hover img { transform: scale(1.04); }

/* =========================================================================
   LE MOT DE LA LIBRAIRE — bande papier + carte bordeaux
   ========================================================================= */
#mot {
  background:
    linear-gradient(180deg, rgba(236, 224, 203, 0.0), rgba(236, 224, 203, 0.55), rgba(236, 224, 203, 0.0));
  border-top: 1px solid var(--bs-border-color);
  border-bottom: 1px solid var(--bs-border-color);
}
#mot h2 { font-style: italic; }
#mot p.fst-italic { color: var(--lf-ink-soft); }
#signature {
  color: var(--lf-bordeaux);
  font-weight: 600;
  letter-spacing: 0.02em;
}
#signature::before {
  content: '— ';
  color: var(--lf-brass);
}
#mot .blockquote {
  position: relative;
  box-shadow: var(--lf-shadow);
  overflow: hidden;
}
#mot .blockquote::before {
  content: '\201C';
  position: absolute;
  top: -1.6rem; right: 0.6rem;
  font-family: 'Playfair Display', serif;
  font-size: 9rem;
  line-height: 1;
  color: rgba(255, 255, 255, 0.14);
}
#mot .blockquote p.fst-italic { color: #f3dfd0; }
#mot .blockquote-footer { color: var(--lf-brass); }
#mot .blockquote-footer::before { content: ''; }

/* =========================================================================
   COUPS DE CŒUR — tuiles « tranche de livre » + lettrines de colonne
   ========================================================================= */
#page-head h1 { position: relative; padding-bottom: 1rem; }
#page-head h1::after {
  content: '';
  position: absolute; left: 0; bottom: 0;
  width: 140px; height: 6px;
  border-top: 2px solid var(--lf-bordeaux);
  border-bottom: 2px solid var(--lf-brass);
}

#reviews article { position: relative; }
#reviews hr { border-top: 3px double var(--lf-bordeaux); opacity: 0.5; max-width: 100%; }

/* la tuile (col bg-primary) = tranche de livre à liseré laiton */
#reviews .bg-primary {
  min-height: 230px;
  background:
    linear-gradient(150deg, var(--lf-bordeaux) 0%, var(--lf-bordeaux-deep) 100%) !important;
  box-shadow: var(--lf-shadow);
  border: 1px solid rgba(0, 0, 0, 0.15);
}
#reviews .bg-primary::before {
  content: '';
  position: absolute;
  top: 12px; bottom: 12px; left: 12px;
  width: 4px;
  background: var(--lf-brass);
}
#reviews .bg-primary::after {
  content: '';
  position: absolute;
  inset: 10px;
  border: 1px solid rgba(184, 137, 58, 0.4);
  pointer-events: none;
}
#reviews .bg-primary .display-5 { color: var(--lf-brass); font-style: italic; }
#reviews .bg-primary .bi { color: rgba(243, 223, 208, 0.85); }
#reviews .bg-primary span:last-child { color: #f3dfd0; letter-spacing: 0.12em; line-height: 1.5; }

#reviews h2 { color: var(--lf-bordeaux); }
/* lettrine en tête de chaque chronique */
#reviews .col-lg-8 > div > p:first-child::first-letter {
  float: left;
  font-family: 'Playfair Display', serif;
  font-weight: 700;
  font-size: 3rem;
  line-height: 0.84;
  padding: 0.15rem 0.5rem 0 0;
  color: var(--lf-brass-deep);
}

/* =========================================================================
   ARTICLE « A PROPOS » — corps de lecture + commentaires
   ========================================================================= */
#article-hero { border-bottom: 3px double var(--lf-bordeaux); }
#article-body { font-size: 1.12rem; }
#article-body h2 { font-style: italic; margin-top: 2.5rem; }
#article-body figure {
  border: 1px solid rgba(36, 27, 30, 0.12);
  box-shadow: var(--lf-shadow-soft);
}
#article-body .blockquote {
  border-left: 4px solid var(--lf-brass);
  padding: 0.5rem 0 0.5rem 1.4rem;
  font-size: 1.35rem;
  color: var(--lf-bordeaux);
}
#article-body .blockquote-footer { color: var(--lf-ink-soft); font-family: 'Spectral', serif; }
#article-body .blockquote-footer::before { content: ''; }

#comments { border-top: 3px double var(--lf-bordeaux) !important; }
#comments .card.bg-light { border-left: 4px solid var(--lf-brass) !important; box-shadow: var(--lf-shadow-soft); }

/* ---------- FORMULAIRE ---------- */
.form-control {
  background-color: var(--lf-paper-card);
  border: 1px solid var(--bs-border-color);
  border-radius: 2px;
  box-shadow: inset 0 1px 3px rgba(36, 27, 30, 0.06);
}
.form-control:focus {
  background-color: #fff;
  border-color: var(--lf-brass);
  box-shadow: 0 0 0 0.2rem rgba(184, 137, 58, 0.2);
}
.form-label { font-weight: 600; color: var(--lf-bordeaux); }
.form-check-input:checked { background-color: var(--lf-bordeaux); border-color: var(--lf-bordeaux); }

/* ---------- Cartes génériques / divers ---------- */
.bg-light { background-color: var(--lf-paper-card) !important; }
hr { border-top: 1px solid var(--bs-border-color); opacity: 1; }

/* =========================================================================
   FOOTER — encre profonde, liens laiton
   ========================================================================= */
footer.bg-dark {
  background-color: var(--lf-ink) !important;
  border-top: 4px double var(--lf-brass);
}
footer.bg-dark .h4 { color: var(--lf-paper); font-family: 'Playfair Display', serif; }
footer.bg-dark .fst-italic { color: var(--lf-brass); letter-spacing: 0.28em; }
footer.bg-dark p, footer.bg-dark li { color: rgba(244, 236, 221, 0.8); }
footer.bg-dark .text-uppercase { color: var(--lf-brass) !important; letter-spacing: 0.2em; }
footer.bg-dark a { color: rgba(244, 236, 221, 0.85); }
footer.bg-dark a:hover { color: var(--lf-brass); }
footer.bg-dark hr { border-top-color: rgba(184, 137, 58, 0.25); }

/* =========================================================================
   ACCESSIBILITÉ & RESPONSIVE
   ========================================================================= */
a:focus-visible, .btn:focus-visible, .nav-link:focus-visible,
.form-control:focus-visible, .form-check-input:focus-visible {
  outline: 2px solid var(--lf-brass);
  outline-offset: 2px;
}

@media (max-width: 991.98px) {
  #hero figure::before { inset: 12px -12px -12px 12px; }
  .display-3 { font-size: 2.6rem; }
}
@media (max-width: 575.98px) {
  #hero .lead::first-letter { font-size: 3rem; }
  #reviews .bg-primary { min-height: 180px; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { transition: none !important; animation: none !important; }
  #gallery figure:hover img { transform: none; }
  .btn-primary:hover { transform: none; }
}
