/* ================================================================
   eLibrary Burundi — CSS Public (pages visiteurs)
   Couleurs drapeau Burundi atténuées
   Vert #27704a · Rouge #c0392b · Blanc/Crème
   ================================================================ */

@import url('https://fonts.googleapis.com/css2?family=Playfair+Display:wght@700;900&family=Nunito:wght@400;600;700;800&display=swap');

:root {
  --green:      #27704a;
  --green-dk:   #1a4a30;
  --green-lt:   #e8f5ee;
  --green-md:   #b2d8c3;
  --red:        #c0392b;
  --red-lt:     #fdf0f0;
  --red-md:     #f5c6c2;
  --cream:      #fafaf7;
  --white:      #ffffff;
  --text:       #1e2d25;
  --muted:      #6c7a72;
  --border:     #dce6df;
  --shadow-sm:  0 2px 8px rgba(39,112,74,.08);
  --shadow-md:  0 6px 24px rgba(39,112,74,.12);
  --shadow-lg:  0 16px 48px rgba(39,112,74,.16);
  --radius:     12px;
  --font-head:  'Playfair Display', Georgia, serif;
  --font-body:  'Nunito', sans-serif;
}

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }
body {
  font-family: var(--font-body);
  background: var(--cream);
  color: var(--text);
  line-height: 1.65;
  min-height: 100vh;
}

/* ── NAVBAR ─────────────────────────────────────────────── */
.pub-nav {
  position: sticky;
  top: 0;
  z-index: 200;
  background: var(--green-dk);
  box-shadow: 0 2px 20px rgba(0,0,0,.2);
}
.pub-nav-inner {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 24px;
  height: 80px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
}
.pub-brand {
  display: flex;
  align-items: center;
  gap: 10px;
  text-decoration: none;
  color: #fff;
  flex-shrink: 0;
}
.pub-brand-icon {
  width: 38px; height: 38px;
  background: var(--red);
  border-radius: 9px;
  display: flex; align-items: center; justify-content: center;
  font-size: 1.3rem;
}
.pub-brand-name {
  font-family: var(--font-head);
  font-size: 1.15rem;
  letter-spacing: .3px;
  line-height: 1.1;
}
.pub-brand-sub {
  font-size: .65rem;
  color: rgba(255,255,255,.55);
  text-transform: uppercase;
  letter-spacing: 1.5px;
  font-family: var(--font-body);
  font-weight: 600;
}
.pub-nav-links {
  display: flex;
  align-items: center;
  gap: 4px;
  list-style: none;
  flex: 1;
  justify-content: center;
}
.pub-nav-links a {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 7px 16px;
  border-radius: 8px;
  color: rgba(255,255,255,.78);
  text-decoration: none;
  font-size: .9rem;
  font-weight: 600;
  transition: background .15s, color .15s;
}
.pub-nav-links a:hover { background: rgba(255,255,255,.1); color: #fff; }
.pub-nav-links a.active {
  background: var(--red);
  color: #fff;
}
.pub-nav-links .nav-icon { font-size: .95rem; }
.pub-nav-right { display: flex; align-items: center; gap: 10px; }
.pub-nav-admin {
  background: rgba(255,255,255,.12);
  color: rgba(255,255,255,.8);
  border: 1px solid rgba(255,255,255,.2);
  border-radius: 7px;
  padding: 6px 14px;
  font-size: .82rem;
  font-weight: 700;
  text-decoration: none;
  transition: background .15s;
}
.pub-nav-admin:hover { background: rgba(255,255,255,.2); color: #fff; }
.hamburger {
  display: none;
  border: none;
  background: none;
  color: #fff;
  font-size: 1.5rem;
  cursor: pointer;
  padding: 4px;
}

/* Mobile nav */
.mobile-nav {
  display: none;
  flex-direction: column;
  background: var(--green-dk);
  padding: 12px 16px 16px;
  border-top: 1px solid rgba(255,255,255,.1);
}
.mobile-nav.open { display: flex; }
.mobile-nav a {
  color: rgba(255,255,255,.85);
  text-decoration: none;
  font-weight: 600;
  font-size: .95rem;
  padding: 10px 12px;
  border-radius: 8px;
  display: flex; align-items: center; gap: 8px;
}
.mobile-nav a.active { background: var(--red); color: #fff; }
.mobile-nav a:hover { background: rgba(255,255,255,.1); }

@media (max-width: 768px) {
  .pub-nav-links, .pub-nav-right { display: none; }
  .hamburger { display: block; }
}

/* ── CARROUSEL ──────────────────────────────────────────── */
.carousel-section {
  background: linear-gradient(160deg, var(--green-dk) 0%, #1f5a3a 60%, #2d3a30 100%);
  padding: 48px 0 56px;
  position: relative;
  overflow: hidden;
}
.carousel-section::before {
  content: '';
  position: absolute;
  inset: 0;
  background: url("data:image/svg+xml,%3Csvg width='60' height='60' viewBox='0 0 60 60' xmlns='http://www.w3.org/2000/svg'%3E%3Cg fill='none' fill-rule='evenodd'%3E%3Cg fill='%23ffffff' fill-opacity='0.03'%3E%3Cpath d='M36 34v-4h-2v4h-4v2h4v4h2v-4h4v-2h-4zm0-30V0h-2v4h-4v2h4v4h2V6h4V4h-4zM6 34v-4H4v4H0v2h4v4h2v-4h4v-2H6zM6 4V0H4v4H0v2h4v4h2V6h4V4H6z'/%3E%3C/g%3E%3C/g%3E%3C/svg%3E");
}
.carousel-inner-wrap {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 24px;
  position: relative;
}
.carousel-label {
  font-family: var(--font-body);
  font-size: .75rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 2.5px;
  color: var(--green-md);
  margin-bottom: 14px;
  display: flex;
  align-items: center;
  gap: 8px;
}
.carousel-label::before {
  content: '';
  display: inline-block;
  width: 24px; height: 2px;
  background: var(--red);
}
.carousel-title {
  font-family: var(--font-head);
  font-size: clamp(1.6rem, 4vw, 2.4rem);
  color: #fff;
  margin-bottom: 32px;
  line-height: 1.2;
}
.carousel-title span { color: var(--green-md); }

/* Swiper-like slider */
.slider-viewport {
  overflow: hidden;
  border-radius: var(--radius);
}
.slider-track {
  display: flex;
  gap: 20px;
  transition: transform .5s cubic-bezier(.25,.46,.45,.94);
}
.book-slide {
  flex-shrink: 0;
  width: calc((100% - 80px) / 5);
  background: rgba(255,255,255,.06);
  border: 1px solid rgba(255,255,255,.1);
  border-radius: var(--radius);
  overflow: hidden;
  transition: transform .25s, box-shadow .25s;
  cursor: pointer;
  text-decoration: none;
}
.book-slide:hover {
  transform: translateY(-6px);
  box-shadow: 0 12px 40px rgba(0,0,0,.3);
  border-color: rgba(255,255,255,.2);
}
.book-slide-cover {
  width: 100%;
  aspect-ratio: 2/3;
  object-fit: cover;
  display: block;
  background: var(--green-dk);
}
.book-slide-cover-placeholder {
  width: 100%;
  aspect-ratio: 2/3;
  background: linear-gradient(135deg, rgba(255,255,255,.05), rgba(255,255,255,.12));
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 3rem;
}
.book-slide-info {
  padding: 12px 14px;
}
.book-slide-title {
  font-family: var(--font-head);
  font-size: .88rem;
  color: #fff;
  font-weight: 700;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  margin-bottom: 4px;
  line-height: 1.3;
}
.book-slide-author {
  font-size: .75rem;
  color: rgba(255,255,255,.5);
}
.book-slide-badge {
  display: inline-block;
  background: var(--red);
  color: #fff;
  font-size: .65rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 1px;
  padding: 2px 7px;
  border-radius: 4px;
  margin-bottom: 6px;
}

/* Slider controls */
.slider-controls {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-top: 24px;
}
.slider-dots {
  display: flex;
  gap: 8px;
}
.slider-dot {
  width: 8px; height: 8px;
  border-radius: 50%;
  background: rgba(255,255,255,.3);
  cursor: pointer;
  transition: background .2s, transform .2s;
  border: none;
}
.slider-dot.active {
  background: var(--red);
  transform: scale(1.3);
}
.slider-btn {
  width: 42px; height: 42px;
  border-radius: 50%;
  border: 1.5px solid rgba(255,255,255,.25);
  background: rgba(255,255,255,.08);
  color: #fff;
  font-size: 1.1rem;
  cursor: pointer;
  transition: background .15s, border-color .15s;
  display: flex; align-items: center; justify-content: center;
}
.slider-btn:hover { background: var(--red); border-color: var(--red); }
.slider-btns { display: flex; gap: 8px; }

@media (max-width: 900px) {
  .book-slide { width: calc((100% - 40px) / 3); }
}
@media (max-width: 600px) {
  .book-slide { width: calc((100% - 20px) / 2); }
}

/* ── PAGE CONTENT WRAPPER ───────────────────────────────── */
.pub-page { max-width: 1200px; margin: 0 auto; padding: 40px 24px; }

/* ── HERO (Accueil) ─────────────────────────────────────── */
.hero-home {
  background: linear-gradient(135deg, var(--green-lt), #fdf0f0);
  border-radius: var(--radius);
  padding: 56px 48px;
  margin-bottom: 40px;
  display: flex;
  align-items: center;
  gap: 48px;
  border: 1px solid var(--border);
  position: relative;
  overflow: hidden;
}
.hero-home::after {
  content: '📚';
  position: absolute;
  right: -20px;
  bottom: -20px;
  font-size: 10rem;
  opacity: .06;
  line-height: 1;
  pointer-events: none;
}
.hero-home-text { flex: 1; }
.hero-eyebrow {
  font-size: .75rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 2px;
  color: var(--red);
  margin-bottom: 12px;
}
.hero-home h1 {
  font-family: var(--font-head);
  font-size: clamp(1.8rem, 4vw, 2.8rem);
  color: var(--green-dk);
  line-height: 1.15;
  margin-bottom: 18px;
}
.hero-home p {
  font-size: 1.05rem;
  color: var(--muted);
  max-width: 520px;
  margin-bottom: 28px;
}
.hero-stats {
  display: flex;
  gap: 28px;
  flex-wrap: wrap;
}
.hero-stat {
  text-align: center;
}
.hero-stat-val {
  font-family: var(--font-head);
  font-size: 1.8rem;
  font-weight: 900;
  color: var(--green);
  line-height: 1;
}
.hero-stat-label {
  font-size: .75rem;
  color: var(--muted);
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .5px;
}

/* ── SECTION TITLES ─────────────────────────────────────── */
.section-head {
  margin-bottom: 28px;
}
.section-head .eyebrow {
  font-size: .72rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 2px;
  color: var(--red);
  margin-bottom: 6px;
}
.section-head h2 {
  font-family: var(--font-head);
  font-size: clamp(1.4rem, 3vw, 1.9rem);
  color: var(--green-dk);
  line-height: 1.2;
}

/* ── CARDS FONCTIONNALITÉS ──────────────────────────────── */
.features-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 20px;
  margin-bottom: 48px;
}
.feature-card {
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 24px 20px;
  box-shadow: var(--shadow-sm);
  transition: transform .2s, box-shadow .2s;
}
.feature-card:hover { transform: translateY(-4px); box-shadow: var(--shadow-md); }
.feature-icon {
  width: 48px; height: 48px;
  border-radius: 12px;
  display: flex; align-items: center; justify-content: center;
  font-size: 1.4rem;
  margin-bottom: 14px;
}
.feature-icon.g { background: var(--green-lt); }
.feature-icon.r { background: var(--red-lt); }
.feature-icon.o { background: #fff4e6; }
.feature-icon.b { background: #e8f0ff; }
.feature-card h3 {
  font-family: var(--font-head);
  font-size: 1rem;
  color: var(--green-dk);
  margin-bottom: 8px;
}
.feature-card p { font-size: .875rem; color: var(--muted); line-height: 1.6; }

/* ── BOUTONS ─────────────────────────────────────────────── */
.btn-primary {
  display: inline-flex; align-items: center; gap: 8px;
  background: var(--green);
  color: #fff;
  text-decoration: none;
  padding: 11px 24px;
  border-radius: 9px;
  font-weight: 800;
  font-size: .9rem;
  border: none;
  cursor: pointer;
  transition: background .15s, transform .1s, box-shadow .15s;
  box-shadow: 0 4px 14px rgba(39,112,74,.25);
}
.btn-primary:hover { background: var(--green-dk); color: #fff; transform: translateY(-1px); box-shadow: 0 6px 20px rgba(39,112,74,.3); }
.btn-secondary {
  display: inline-flex; align-items: center; gap: 8px;
  background: transparent;
  color: var(--green);
  text-decoration: none;
  padding: 11px 24px;
  border-radius: 9px;
  font-weight: 800;
  font-size: .9rem;
  border: 2px solid var(--green);
  cursor: pointer;
  transition: background .15s, color .15s;
}
.btn-secondary:hover { background: var(--green-lt); color: var(--green-dk); }

/* ── BOOKS GRID (Bibliothèque) ──────────────────────────── */
.lib-header {
  display: flex; align-items: flex-end; justify-content: space-between;
  flex-wrap: wrap; gap: 16px; margin-bottom: 20px;
}
.search-box {
  background: var(--white);
  border: 1.5px solid var(--border);
  border-radius: 10px;
  padding: 14px 18px;
  display: flex; gap: 12px; flex-wrap: wrap; align-items: flex-end;
  box-shadow: var(--shadow-sm);
  margin-bottom: 24px;
}
.search-input {
  flex: 1; min-width: 200px;
  border: 1.5px solid var(--border);
  border-radius: 8px;
  padding: 9px 14px;
  font-family: var(--font-body);
  font-size: .9rem;
  outline: none;
  transition: border-color .15s, box-shadow .15s;
}
.search-input:focus { border-color: var(--green); box-shadow: 0 0 0 3px rgba(39,112,74,.1); }
.search-select {
  border: 1.5px solid var(--border);
  border-radius: 8px;
  padding: 9px 14px;
  font-family: var(--font-body);
  font-size: .875rem;
  outline: none;
  background: var(--white);
}
.search-select:focus { border-color: var(--green); box-shadow: 0 0 0 3px rgba(39,112,74,.1); }

.books-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
  gap: 20px;
  margin-bottom: 32px;
}
.book-card {
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: var(--shadow-sm);
  transition: transform .2s, box-shadow .2s;
  display: flex; flex-direction: column;
  text-decoration: none;
  color: inherit;
}
.book-card:hover { transform: translateY(-4px); box-shadow: var(--shadow-md); }
.book-card-cover {
  width: 100%;
  aspect-ratio: 2/3;
  object-fit: cover;
  display: block;
}
.book-card-cover-ph {
  width: 100%; aspect-ratio: 2/3;
  background: linear-gradient(135deg, var(--green-lt), var(--red-lt));
  display: flex; align-items: center; justify-content: center;
  font-size: 3rem;
}
.book-card-body { padding: 12px 14px; flex: 1; display: flex; flex-direction: column; }
.book-card-title {
  font-family: var(--font-head);
  font-size: .9rem;
  font-weight: 700;
  color: var(--text);
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  margin-bottom: 4px;
  line-height: 1.3;
}
.book-card-author { font-size: .78rem; color: var(--muted); margin-bottom: 10px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.book-card-footer { margin-top: auto; display: flex; align-items: center; justify-content: space-between; }
.tag {
  display: inline-block;
  background: var(--green-lt);
  color: var(--green);
  font-size: .68rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .5px;
  padding: 3px 8px;
  border-radius: 5px;
}
.btn-read {
  display: inline-flex; align-items: center; gap: 4px;
  background: var(--green);
  color: #fff;
  text-decoration: none;
  padding: 5px 12px;
  border-radius: 6px;
  font-size: .75rem;
  font-weight: 700;
  transition: background .15s;
}
.btn-read:hover { background: var(--green-dk); color: #fff; }

/* ── À PROPOS ────────────────────────────────────────────── */
.about-hero {
  background: linear-gradient(135deg, var(--green-dk) 0%, #235c3c 100%);
  border-radius: var(--radius);
  padding: 56px 48px;
  color: #fff;
  margin-bottom: 40px;
  position: relative;
  overflow: hidden;
}
.about-hero::before {
  content: '';
  position: absolute;
  top: -60px; right: -60px;
  width: 240px; height: 240px;
  border-radius: 50%;
  background: rgba(255,255,255,.04);
}
.about-hero::after {
  content: '';
  position: absolute;
  bottom: -40px; left: -40px;
  width: 180px; height: 180px;
  border-radius: 50%;
  background: rgba(192,57,43,.15);
}
.about-hero .eyebrow { color: var(--green-md); font-size: .72rem; font-weight: 800; text-transform: uppercase; letter-spacing: 2px; margin-bottom: 12px; }
.about-hero h1 { font-family: var(--font-head); font-size: clamp(1.8rem, 4vw, 2.6rem); margin-bottom: 16px; line-height: 1.15; position: relative; }
.about-hero p { font-size: 1rem; color: rgba(255,255,255,.78); max-width: 580px; line-height: 1.7; position: relative; }

.contact-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 28px;
  margin-bottom: 40px;
}
.contact-info {
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 28px;
  box-shadow: var(--shadow-sm);
}
.contact-info h3 {
  font-family: var(--font-head);
  font-size: 1.2rem;
  color: var(--green-dk);
  margin-bottom: 20px;
  padding-bottom: 12px;
  border-bottom: 2px solid var(--green-lt);
}
.contact-item {
  display: flex;
  gap: 14px;
  align-items: flex-start;
  margin-bottom: 16px;
}
.contact-item-icon {
  width: 38px; height: 38px;
  border-radius: 9px;
  background: var(--green-lt);
  display: flex; align-items: center; justify-content: center;
  font-size: 1rem;
  flex-shrink: 0;
}
.contact-item-text .label { font-size: .72rem; font-weight: 800; text-transform: uppercase; letter-spacing: .5px; color: var(--muted); margin-bottom: 2px; }
.contact-item-text .val { font-size: .9rem; color: var(--text); font-weight: 600; }

.contact-form-card {
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 28px;
  box-shadow: var(--shadow-sm);
}
.contact-form-card h3 {
  font-family: var(--font-head);
  font-size: 1.2rem;
  color: var(--green-dk);
  margin-bottom: 20px;
  padding-bottom: 12px;
  border-bottom: 2px solid var(--green-lt);
}
.form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.form-group { margin-bottom: 14px; }
.form-group label { display: block; font-size: .82rem; font-weight: 700; color: var(--text); margin-bottom: 6px; }
.form-group input,
.form-group select,
.form-group textarea {
  width: 100%;
  border: 1.5px solid var(--border);
  border-radius: 8px;
  padding: 9px 13px;
  font-family: var(--font-body);
  font-size: .875rem;
  outline: none;
  transition: border-color .15s, box-shadow .15s;
  background: var(--cream);
}
.form-group input:focus,
.form-group textarea:focus { border-color: var(--green); box-shadow: 0 0 0 3px rgba(39,112,74,.1); background: #fff; }
.form-group textarea { resize: vertical; min-height: 110px; }

/* Map placeholder */
.map-wrap {
  border-radius: var(--radius);
  overflow: hidden;
  height: 320px;
  margin-bottom: 40px;
  border: 1px solid var(--border);
  box-shadow: var(--shadow-sm);
  background: var(--green-lt);
}
.map-wrap iframe { width: 100%; height: 100%; border: none; }

/* ── FOOTER ──────────────────────────────────────────────── */
.pub-footer {
  background: var(--green-dk);
  color: rgba(255,255,255,.75);
  padding: 56px 0 0;
  margin-top: 64px;
}
.pub-footer-inner {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 24px;
  display: grid;
  grid-template-columns: 2fr 1fr 1fr;
  gap: 48px;
  margin-bottom: 40px;
}
.footer-brand-name {
  font-family: var(--font-head);
  font-size: 1.3rem;
  color: #fff;
  margin-bottom: 10px;
}
.footer-brand-desc { font-size: .875rem; line-height: 1.7; margin-bottom: 20px; color: rgba(255,255,255,.6); }
.footer-col-title {
  font-size: .72rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 2px;
  color: var(--green-md);
  margin-bottom: 16px;
}
.footer-partners {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-bottom: 20px;
}
.partner-badge {
  display: flex; align-items: center; gap: 7px;
  background: rgba(255,255,255,.06);
  border: 1px solid rgba(255,255,255,.1);
  border-radius: 8px;
  padding: 7px 12px;
  font-size: .78rem;
  color: rgba(255,255,255,.75);
  font-weight: 600;
  transition: background .15s;
  text-decoration: none;
}
.partner-badge:hover { background: rgba(255,255,255,.12); color: #fff; }
.partner-logo { font-size: 1.1rem; }
.footer-links { list-style: none; }
.footer-links li { margin-bottom: 10px; }
.footer-links a {
  color: rgba(255,255,255,.65);
  text-decoration: none;
  font-size: .875rem;
  transition: color .15s;
  display: flex; align-items: center; gap: 7px;
}
.footer-links a:hover { color: #fff; }
.footer-links a::before { content: '→'; font-size: .8rem; color: var(--red); }
.pub-footer-bottom {
  border-top: 1px solid rgba(255,255,255,.08);
  padding: 18px 24px;
  max-width: 1200px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 8px;
  font-size: .8rem;
  color: rgba(255,255,255,.4);
}

@media (max-width: 900px) {
  .pub-footer-inner { grid-template-columns: 1fr 1fr; }
  .contact-grid { grid-template-columns: 1fr; }
  .form-row { grid-template-columns: 1fr; }
  .hero-home { flex-direction: column; padding: 36px 28px; }
}
@media (max-width: 600px) {
  .pub-footer-inner { grid-template-columns: 1fr; gap: 32px; }
  .about-hero { padding: 36px 24px; }
}
