/* ============================================================
   style.css — Editions Bleu 47
   Variables | Reset | Typo | Header | Footer | Composants | Utilitaires
   ============================================================ */

:root {
  --bg-primary:      #ffffff;
  --bg-secondary:    #f7f8fa;
  --bg-dark:         #0d1b2a;
  --blue47:          #1a4a8a;
  --blue47-light:    #2563c4;
  --blue47-dark:     #0f2d56;
  --adrenaline:      #cc2200;
  --fictions:        #1a4a8a;
  --bd:              #e8670a;
  --text-primary:    #1a1a2e;
  --text-secondary:  #555570;
  --text-muted:      #8888a0;
  --border:          #e0e4ef;
  --shadow-sm:       0 1px 3px rgba(0,0,0,.08);
  --shadow-md:       0 4px 16px rgba(0,0,0,.10);
  --shadow-lg:       0 8px 32px rgba(0,0,0,.12);
  --radius-sm:       6px;
  --radius-md:       10px;
  --radius-lg:       16px;
  --transition:      .2s ease;
}

/* Reset */
*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  font-family: 'Inter', system-ui, sans-serif;
  font-size: 16px;
  line-height: 1.75;
  color: var(--text-primary);
  background: var(--bg-primary);
}
img { max-width: 100%; height: auto; display: block; }
a { color: var(--blue47); text-decoration: none; transition: color var(--transition); }
a:hover { color: var(--blue47-light); }

/* Typographie */
h1, h2, h3, h4, h5, h6 {
  font-family: 'Playfair Display', Georgia, serif;
  font-weight: 700;
  line-height: 1.2;
  color: var(--text-primary);
}
h1 { font-size: clamp(2.5rem, 6vw, 4rem); letter-spacing: -.02em; }
h2 { font-size: clamp(1.75rem, 4vw, 2.75rem); letter-spacing: -.015em; }
h3 { font-size: clamp(1.2rem, 2.5vw, 1.6rem); }
.section-title {
  font-family: 'Playfair Display', Georgia, serif;
  font-size: clamp(1.9rem, 3.5vw, 2.75rem);
  letter-spacing: -.02em;
  margin-bottom: .5rem;
}
.section-subtitle { color: var(--text-secondary); font-size: 1.05rem; margin-bottom: 2.5rem; }
/* Label overline — catégories, badges texte */
.label-overline {
  font-size: .72rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: .1em;
  color: var(--text-muted);
}

/* Header */
.site-header {
  background: var(--bg-primary);
  border-bottom: 1px solid var(--border);
  position: sticky;
  top: 0;
  z-index: 1000;
  transition: box-shadow var(--transition);
}
.site-header.scrolled { box-shadow: var(--shadow-md); }
.site-header .navbar { padding: .75rem 0; }
.navbar-brand { display: flex; flex-direction: column; line-height: 1.15; text-decoration: none; }
.brand-logo { font-family: 'Playfair Display', Georgia, serif; font-size: 1.75rem; font-weight: 700; color: var(--blue47); letter-spacing: -.02em; }
.brand-num { color: var(--blue47-light); }
.brand-tagline { font-size: .7rem; color: var(--text-muted); font-style: italic; letter-spacing: .02em; }
.navbar-nav .nav-link {
  font-size: .9rem;
  font-weight: 500;
  color: var(--text-primary);
  padding: .4rem .6rem;
  border-radius: var(--radius-sm);
  transition: background var(--transition), color var(--transition);
}
.navbar-nav .nav-link:hover,
.navbar-nav .nav-link.active { color: var(--blue47); background: rgba(26,74,138,.06); }

/* Footer */
.site-footer { background: var(--bg-dark); color: rgba(255,255,255,.75); padding: 4rem 0 1.5rem; margin-top: 5rem; }
.site-footer .brand-logo { color: #fff; }
.site-footer .brand-num { color: var(--blue47-light); }
.site-footer p { font-size: .9rem; }
.footer-tagline { font-style: italic; color: rgba(255,255,255,.45); font-size: .85rem; }
.footer-heading { font-family: 'Playfair Display', Georgia, serif; font-size: 1rem; color: #fff; margin-bottom: 1rem; }
.footer-links { list-style: none; padding: 0; margin: 0; }
.footer-links li + li { margin-top: .4rem; }
.footer-links a { color: rgba(255,255,255,.65); font-size: .9rem; transition: color var(--transition); }
.footer-links a:hover { color: #fff; }
.footer-address { font-style: normal; font-size: .9rem; color: rgba(255,255,255,.65); }
.footer-address a { color: rgba(255,255,255,.65); }
.footer-address a:hover { color: #fff; }
.footer-social { display: flex; gap: 1rem; }
.footer-social-link { font-size: .85rem; color: rgba(255,255,255,.55); transition: color var(--transition); }
.footer-social-link:hover { color: #fff; }
.footer-sep { border-color: rgba(255,255,255,.1); margin: 2.5rem 0 1rem; }
.footer-bottom p { font-size: .8rem; color: rgba(255,255,255,.35); margin: 0; }
.footer-bottom a { color: rgba(255,255,255,.45); }
.footer-bottom a:hover { color: rgba(255,255,255,.8); }

/* Badges collection */
.badge-collection { display: inline-block; padding: .25em .65em; font-size: .72rem; font-weight: 600; border-radius: 999px; color: #fff; letter-spacing: .06em; text-transform: uppercase; }
.badge-adrenaline { background: var(--adrenaline); }
.badge-fictions   { background: var(--fictions); }
.badge-bd         { background: var(--bd); }

/* Cartes livres */
.book-card {
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  overflow: hidden;
  background: var(--bg-primary);
  box-shadow: 3px 6px 20px rgba(0,0,0,.10), 0 1px 4px rgba(0,0,0,.06);
  transition: box-shadow .3s ease, transform .3s ease;
}
.book-card:hover {
  box-shadow: 6px 18px 38px rgba(0,0,0,.15), 0 2px 6px rgba(0,0,0,.08);
  transform: translateY(-4px);
}
/* Couverture — tranche + ombre profondeur */
.book-card-cover {
  position: relative;
  aspect-ratio: 2/3;
  overflow: hidden;
  background: var(--bg-secondary);
  box-shadow: inset 0 -2px 6px rgba(0,0,0,.08);
}
/* Tranche gauche simulant l'épaisseur du livre */
.book-card-cover::after {
  content: '';
  position: absolute;
  left: 0; top: 0; bottom: 0;
  width: 11px;
  background: linear-gradient(to right,
    rgba(0,0,0,.30) 0%,
    rgba(0,0,0,.07) 65%,
    transparent    100%);
  pointer-events: none;
  z-index: 1;
}
.book-card-cover img { width: 100%; height: 100%; object-fit: cover; transition: transform .4s ease; }
.book-card:hover .book-card-cover img { transform: scale(1.03); }
.book-card-cover-placeholder { width: 100%; height: 100%; display: flex; align-items: center; justify-content: center; background: var(--bg-secondary); color: var(--text-muted); font-size: .8rem; }
.book-card-body { padding: 1rem; }
.book-card-title { font-family: 'Playfair Display', Georgia, serif; font-size: 1rem; font-weight: 600; margin: .4rem 0 .25rem; line-height: 1.3; }
.book-card-author { font-size: .85rem; color: var(--text-secondary); }

/* Cartes auteurs */
.author-card { text-align: center; padding: 1.5rem; border: 1px solid var(--border); border-radius: var(--radius-md); transition: box-shadow var(--transition), transform var(--transition); }
.author-card:hover { box-shadow: var(--shadow-md); transform: translateY(-3px); }
.author-avatar { width: 90px; height: 90px; border-radius: 50%; object-fit: cover; margin: 0 auto .75rem; border: 3px solid var(--border); }
.author-avatar-placeholder { width: 90px; height: 90px; border-radius: 50%; background: var(--bg-secondary); margin: 0 auto .75rem; display: flex; align-items: center; justify-content: center; font-size: 1.5rem; border: 3px solid var(--border); }

/* Cartes collections */
.collection-card {
  display: block;
  text-decoration: none;
  color: var(--text-primary);
  border-radius: var(--radius-lg);
  border: 1px solid var(--border);
  border-top: 4px solid var(--blue47); /* couleur surchargée en inline */
  background: #fff;                     /* fond surchargé en inline */
  overflow: hidden;
  transition: box-shadow .3s ease, transform .3s ease;
}
.collection-card:hover {
  box-shadow: var(--shadow-lg);
  transform: translateY(-5px);
  color: var(--text-primary);
}
.collection-card-body { padding: 1.6rem; }
.collection-card-name {
  font-family: 'Playfair Display', Georgia, serif;
  font-size: 1.45rem;
  font-weight: 700;
  color: var(--text-primary);
  margin-bottom: .45rem;
  line-height: 1.2;
}
.collection-card-desc {
  color: var(--text-secondary);
  font-size: .9rem;
  line-height: 1.6;
  margin-bottom: 1.1rem;
}
.collection-card-count {
  font-size: .72rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: .08em;
  color: var(--text-muted);
}

/* Carrousel auteurs */
.authors-carousel { overflow: hidden; }
.authors-track {
  display: flex;
  gap: 1.5rem;
  transition: transform .45s cubic-bezier(.22,.61,.36,1);
  will-change: transform;
}
.author-slide {
  flex: 0 0 calc(33.333% - 1rem); /* 3 visibles desktop, 2 gaps sur 3 = 1rem/slide */
  min-width: 0;
}
@media (max-width: 991px) {
  .author-slide { flex: 0 0 calc(50% - .75rem); } /* 2 visibles tablette */
}
@media (max-width: 767px) {
  .author-slide { flex: 0 0 100%; } /* 1 visible mobile */
}
.carousel-nav { display: flex; gap: .5rem; }
.carousel-btn {
  width: 40px; height: 40px;
  border-radius: 50%;
  border: 1px solid var(--border);
  background: #fff;
  color: var(--text-primary);
  font-size: 1.25rem;
  line-height: 1;
  cursor: pointer;
  display: flex; align-items: center; justify-content: center;
  transition: background var(--transition), border-color var(--transition), color var(--transition);
  padding: 0;
}
.carousel-btn:hover:not(:disabled) {
  background: var(--blue47);
  border-color: var(--blue47);
  color: #fff;
}
.carousel-btn:disabled { opacity: .3; cursor: default; }

/* Hero — fond crème, lignes topographiques */
.hero {
  position: relative;
  background: #fafaf8;
  min-height: 520px;
  display: flex;
  align-items: center;
  padding: 5rem 0 4.5rem;
  overflow: hidden;
  color: var(--text-primary);
}
/* Lignes topographiques SVG en filigrane */
.hero::before {
  content: '';
  position: absolute;
  inset: 0;
  background-image: url("data:image/svg+xml,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 1440 560'><g fill='none' stroke='%231a4a8a' stroke-width='1.2'><path opacity='.05' d='M860 20 C1040 0 1280 55 1400 190 C1440 265 1430 400 1305 472 C1165 555 940 550 792 476 C644 402 592 288 642 168 C688 55 728 38 860 20Z'/><path opacity='.055' d='M878 68 C1042 50 1242 100 1348 222 C1412 295 1400 412 1284 474 C1152 548 944 542 808 472 C672 402 626 298 668 188 C708 85 764 84 878 68Z'/><path opacity='.06' d='M895 114 C1044 100 1208 146 1300 256 C1356 322 1346 424 1240 476 C1118 538 946 532 822 466 C698 400 658 305 694 206 C730 115 800 126 895 114Z'/><path opacity='.065' d='M910 158 C1046 148 1178 190 1256 288 C1304 346 1296 430 1196 474 C1082 524 936 520 826 458 C716 396 682 312 714 222 C746 140 832 166 910 158Z'/><path opacity='.07' d='M924 200 C1048 192 1154 230 1220 316 C1262 370 1256 438 1164 472 C1058 512 926 508 830 450 C734 392 704 318 732 238 C760 162 858 207 924 200Z'/><path opacity='.07' d='M936 240 C1050 234 1136 268 1188 344 C1222 390 1218 448 1134 470 C1036 496 912 492 828 440 C746 388 720 324 744 254 C768 190 878 246 936 240Z'/></g><g fill='none' stroke='%231a4a8a' stroke-width='1' opacity='.04'><path d='M-60 180 C80 158 220 218 268 308 C308 382 262 445 152 458 C32 472 -90 412 -128 330 C-162 254 -158 198 -60 180Z'/><path d='M-40 220 C88 202 214 256 255 336 C288 398 248 452 148 464 C38 476 -72 424 -106 350 C-136 282 -130 236 -40 220Z'/><path d='M-20 258 C96 244 206 290 240 360 C266 408 232 456 144 466 C44 478 -54 433 -86 366 C-112 306 -104 270 -20 258Z'/></g></svg>");
  background-size: 100% 100%;
  pointer-events: none;
}
.hero-content { position: relative; z-index: 1; width: 100%; }

/* Couverture hero — inclinaison naturelle, tranche, ombre */
.hero-book-cover {
  position: relative;
  display: inline-block;
}
/* Tranche gauche du livre hero */
.hero-book-cover::after {
  content: '';
  position: absolute;
  left: 0; top: 0; bottom: 0;
  width: 14px;
  background: linear-gradient(to right,
    rgba(0,0,0,.28) 0%,
    rgba(0,0,0,.06) 60%,
    transparent    100%);
  pointer-events: none;
  z-index: 2;
}
.hero-book-cover img {
  display: block;
  width: 100%;
  max-width: 280px;
  border-radius: 3px 6px 6px 3px;
  transform: rotate(-3deg);
  box-shadow:
    10px 20px 50px rgba(0,0,0,.18),
    4px 6px 18px rgba(0,0,0,.1);
  transition: transform .4s ease, box-shadow .4s ease;
}
.hero-book-cover:hover img {
  transform: rotate(-1deg) translateY(-6px);
  box-shadow: 14px 28px 64px rgba(0,0,0,.22), 4px 6px 18px rgba(0,0,0,.1);
}
/* Placeholder sans couverture */
.hero-book-placeholder {
  width: 220px;
  aspect-ratio: 2/3;
  background: linear-gradient(145deg, #e2e2db, #d2d2c8);
  border-radius: 3px 6px 6px 3px;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1.5rem;
  text-align: center;
  color: var(--text-muted);
  font-family: 'Playfair Display', Georgia, serif;
  font-size: .95rem;
  line-height: 1.45;
  transform: rotate(-3deg);
  box-shadow: 10px 20px 50px rgba(0,0,0,.14);
}
/* Badge "Nouveauté" / "À paraître" */
.hero-book-badge {
  position: absolute;
  top: -10px;
  right: -14px;
  z-index: 2;
  background: var(--adrenaline);
  color: #fff;
  font-size: .67rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .08em;
  padding: .38em .8em;
  border-radius: 4px;
  transform: rotate(2deg);
  box-shadow: 0 2px 10px rgba(204,34,0,.3);
}
.hero-book-badge--deparaitre { background: #f59e0b; box-shadow: 0 2px 10px rgba(245,158,11,.3); }
/* Méta texte gauche */
.hero-book-label {
  font-size: .72rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: .12em;
  color: var(--text-muted);
  margin-bottom: .85rem;
}
.hero-book-title {
  font-family: 'Playfair Display', Georgia, serif;
  font-size: clamp(2.5rem, 5vw, 4rem);
  font-weight: 700;
  color: var(--text-primary);
  letter-spacing: -.025em;
  line-height: 1.08;
  margin: .5rem 0 .8rem;
}
.hero-book-author {
  font-size: 1rem;
  color: var(--text-secondary);
  margin-bottom: 1rem;
}
.hero-book-author a {
  color: var(--text-primary);
  font-weight: 600;
  text-decoration: none;
}
.hero-book-author a:hover { color: var(--blue47); }
.hero-book-meta-sep { display: inline-block; margin: 0 .4em; opacity: .3; }
.hero-book-quatrieme {
  font-size: .975rem;
  color: var(--text-secondary);
  line-height: 1.75;
  max-width: 480px;
  margin-bottom: 2rem;
}
/* Responsive hero */
@media (max-width: 767px) {
  .hero-book-quatrieme { margin-left: auto; margin-right: auto; }
  .hero { text-align: center; }
  .hero-book-cover { display: flex; justify-content: center; margin-bottom: 2.5rem; }
}
/* Fallback hero sans livre */
.hero-brand-mark {
  display: inline-block;
  font-family: 'Playfair Display', Georgia, serif;
  font-size: clamp(3.5rem, 9vw, 6rem);
  font-weight: 700;
  color: var(--text-primary);
  letter-spacing: -.03em;
  line-height: 1;
}
.hero-brand-mark span { color: var(--blue47); }
.hero-title {
  font-size: clamp(1.05rem, 2.5vw, 1.35rem);
  font-style: italic;
  color: var(--text-secondary);
  margin-bottom: .8rem;
}
.hero-tagline {
  font-size: .8rem;
  color: var(--text-muted);
  letter-spacing: .08em;
  text-transform: uppercase;
  margin-bottom: 2.25rem;
}

/* Animations fade-in au chargement */
@keyframes heroFadeUp {
  from { opacity: 0; transform: translateY(22px); }
  to   { opacity: 1; transform: translateY(0); }
}
.hero-animate {
  animation: heroFadeUp .7s cubic-bezier(.22,.61,.36,1) both;
}
.hero-animate:nth-child(1) { animation-delay: .05s; }
.hero-animate:nth-child(2) { animation-delay: .2s; }
.hero-animate:nth-child(3) { animation-delay: .35s; }
.hero-animate:nth-child(4) { animation-delay: .5s; }

/* Sections */
.section { padding: 4rem 0; }
.section-alt { background: var(--bg-secondary); }

/* Statuts livre */
.badge-a-paraitre { background: #f59e0b; color: #fff; font-size: .7rem; font-weight: 600; padding: .2em .6em; border-radius: 999px; }
.badge-epuise { background: #6b7280; color: #fff; font-size: .7rem; font-weight: 600; padding: .2em .6em; border-radius: 999px; }

/* Fil d'Ariane */
.breadcrumb { font-size: .85rem; margin-bottom: 1.5rem; }
.breadcrumb-item a { color: var(--blue47); }

/* Pagination */
.pagination .page-link { color: var(--blue47); border-color: var(--border); }
.pagination .page-item.active .page-link { background: var(--blue47); border-color: var(--blue47); }

/* Formulaires */
.form-control:focus, .form-select:focus { border-color: var(--blue47); box-shadow: 0 0 0 .2rem rgba(26,74,138,.15); }
.btn-primary { background: var(--blue47); border-color: var(--blue47); }
.btn-primary:hover { background: var(--blue47-light); border-color: var(--blue47-light); }
.btn-outline-primary { color: var(--blue47); border-color: var(--blue47); }
.btn-outline-primary:hover { background: var(--blue47); border-color: var(--blue47); }

/* Revue de presse */
.press-quote { border-left: 4px solid var(--blue47); padding: 1rem 1.5rem; background: var(--bg-secondary); border-radius: 0 var(--radius-sm) var(--radius-sm) 0; font-style: italic; color: var(--text-secondary); }

/* Bandeau manuscrit */
.manuscrit-banner { background: var(--blue47); color: #fff; padding: 2.5rem; border-radius: var(--radius-lg); text-align: center; }
.manuscrit-banner h3 { color: #fff; }

/* Cartes actus (page publique) */
.actu-card {
  background: var(--bg-primary);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: 1.4rem;
  height: 100%;
  transition: box-shadow var(--transition), transform var(--transition);
}
.actu-card:hover { box-shadow: var(--shadow-md); transform: translateY(-2px); }

/* Utilitaires */
.text-blue47 { color: var(--blue47) !important; }
.bg-blue47   { background: var(--blue47) !important; }
.font-serif  { font-family: 'Playfair Display', Georgia, serif; }
.fw-500      { font-weight: 500; }

/* ── Phase 2 : Panier / Checkout / Confirmation ────────────────── */

/* Badge panier dans la nav */
.navbar .btn .badge {
  font-size: .58rem;
  min-width: 1.2em;
  height: 1.2em;
  display: flex;
  align-items: center;
  justify-content: center;
}

/* Tableau panier */
.table-panier th { font-size: .82rem; color: var(--text-secondary); font-weight: 500; border-bottom: 2px solid var(--border); }
.table-panier td { vertical-align: middle; border-bottom: 1px solid var(--border); }

/* Récapitulatif commande (sidebar checkout/panier) */
.recap-card {
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  background: var(--bg-secondary);
}
.recap-card .recap-total {
  font-size: 1.1rem;
  font-weight: 700;
  color: var(--text-primary);
}

/* Carte confirmation */
.confirmation-box {
  background: #f0fdf4;
  border: 1px solid #bbf7d0;
  border-radius: var(--radius-md);
  padding: 2rem;
  text-align: center;
}
.confirmation-box .confirmation-icon { font-size: 3.5rem; display: block; margin-bottom: .75rem; }

/* Bloc téléchargement numérique */
.download-block {
  background: #eef3fb;
  border: 1px solid #c3d4f0;
  border-radius: var(--radius-md);
  padding: 1.5rem;
}
.download-block-title { color: var(--blue47); font-weight: 700; margin-bottom: .5rem; }

/* Étapes checkout */
.checkout-steps {
  display: flex;
  gap: 0;
  margin-bottom: 2rem;
  font-size: .8rem;
  font-weight: 600;
}
.checkout-step {
  flex: 1;
  text-align: center;
  padding: .5rem;
  color: var(--text-muted);
  border-bottom: 3px solid var(--border);
}
.checkout-step.active {
  color: var(--blue47);
  border-bottom-color: var(--blue47);
}
