:root{--vert:#008751;--jaune:#FCD116;--rouge:#E8112D;--noir:#1a1a1a;}
  *{margin:0;padding:0;box-sizing:border-box;font-family:'Poppins', sans-serif;}
  body{background:linear-gradient(135deg,#FCD116 0%,#fff 100%);color:var(--noir);scroll-behavior:smooth;}
  .bandeau{width:100%;background:var(--rouge);color:#fff;text-align:center;padding:10px;font-weight:bold;animation:clignote 1.5s infinite;}
  @keyframes clignote{0%,100%{opacity:1;} 50%{opacity:0.6;}}
  header{position:fixed;top:40px;width:100%;background:linear-gradient(90deg,var(--vert),var(--jaune),var(--rouge));z-index:1000;}
  nav{display:flex;justify-content:space-between;align-items:center;max-width:1200px;margin:auto;padding:15px 20px;}
  nav h1{font-size:1.5rem;color:#fff;text-shadow:2px 2px 4px rgba(0,0,0,0.4);}
  nav ul{display:flex;list-style:none;gap:20px;flex-wrap:wrap;}
  nav a{color:#fff;text-decoration:none;font-weight:bold;}
  section{padding:120px 20px;max-width:1200px;margin:auto;}
  h2{text-align:center;margin-bottom:40px;font-size:2.5rem;color:var(--rouge);text-transform:uppercase;}
  .hero{text-align:center;padding-top:180px;padding-bottom:80px;background:linear-gradient(45deg,var(--vert),var(--rouge));color:#fff;}
  .hero h2{color:#fff;font-size:3rem;}
  .btn{background:var(--jaune);color:var(--noir);padding:12px 25px;border-radius:50px;text-decoration:none;font-weight:bold;display:inline-block;margin:5px;}
  .btn:hover{background:#fff;}
  .grid{display:grid;grid-template-columns:repeat(auto-fit,minmax(260px,1fr));gap:25px;}
  .card{background:#fff;padding:20px;border-radius:15px;box-shadow:0 8px 20px rgba(0,0,0,0.15);border-bottom:5px solid var(--vert);position:relative;}
  .card:hover{transform:translateY(-8px);border-bottom-color:var(--rouge);}
  .card img{width:100%;height:380px;object-fit:cover;border-radius:10px;}
  .badge{position:absolute;top:10px;right:10px;background:var(--rouge);color:#fff;padding:5px 12px;border-radius:20px;font-weight:bold;font-size:0.8rem;}
  .bio{display:flex;gap:40px;align-items:flex-start;flex-wrap:wrap;background:#fff;padding:40px;border-radius:20px;}
  .bio img{width:300px;border-radius:15px;border:5px solid var(--jaune);}
  .bio p{margin-bottom:15px;line-height:1.7;}
  .audio-player{background:linear-gradient(90deg,var(--vert),var(--rouge));padding:20px;border-radius:15px;color:#fff;margin:15px 0;}
  audio{width:100%;margin-top:10px;}
  .liens{columns:2;gap:30px;}
  .liens a{display:block;margin-bottom:12px;color:var(--vert);text-decoration:none;}
  .liens a:hover{color:var(--rouge);text-decoration:underline;}
  form{display:flex;flex-direction:column;gap:15px;max-width:600px;margin:auto;background:#fff;padding:30px;border-radius:15px;}
  input,textarea{padding:14px;border:2px solid var(--jaune);border-radius:8px;}
  button{background:linear-gradient(90deg,var(--vert),var(--rouge));color:#fff;padding:15px;border:none;border-radius:8px;cursor:pointer;font-weight:bold;}
  footer{text-align:center;padding:30px;background:var(--noir);color:#fff;}
  .modal{
display:none;
position:fixed;
left:0;
top:0;
width:100%;
height:100%;
background:rgba(0,0,0,.7);
z-index:9999;
overflow:auto;
}
.modal-content{
background:white;
margin:40px auto;
width:min(900px,95%);
padding:30px;
border-radius:15px;
position:relative;
}
.close{
position:absolute;
right:20px;
top:10px;
font-size:35px;
cursor:pointer;
font-weight:bold;
}
#modalImage{
display:block;
margin:auto;
width:250px;
border-radius:10px;
margin-bottom:20px;
}
#reviewsContainer{
max-height:300px;
overflow-y:auto;
padding:10px;
background:#f6f6f6;
border-radius:10px;
}
@media(max-width:768px){.bio{flex-direction:column;text-align:center;} .liens{columns:1;}}


/* =========================================================
   POP-UP LIVRE ET AVIS — amélioration visuelle uniquement
   Le design général du site reste inchangé.
   ========================================================= */

body.modal-open {
  overflow: hidden;
}

.modal {
  display: none;
  position: fixed;
  inset: 0;
  width: 100%;
  height: 100%;
  padding: 24px;
  background: rgba(0, 0, 0, 0.76);
  z-index: 9999;
  overflow-y: auto;
  overscroll-behavior: contain;
}

.modal.is-open {
  display: block;
  animation: modalFadeIn 180ms ease-out;
}

.modal-content {
  background: #fff;
  width: min(1050px, 100%);
  margin: 16px auto;
  padding: 34px;
  border-radius: 20px;
  position: relative;
  box-shadow: 0 24px 70px rgba(0, 0, 0, 0.34);
  animation: modalSlideIn 220ms ease-out;
}

@keyframes modalFadeIn {
  from { opacity: 0; }
  to { opacity: 1; }
}

@keyframes modalSlideIn {
  from { opacity: 0; transform: translateY(20px) scale(.985); }
  to { opacity: 1; transform: translateY(0) scale(1); }
}

.close {
  position: sticky;
  float: right;
  top: 8px;
  z-index: 5;
  width: 44px;
  height: 44px;
  display: grid;
  place-items: center;
  margin: -10px -10px 0 12px;
  border-radius: 50%;
  background: #fff;
  color: var(--noir);
  box-shadow: 0 4px 18px rgba(0, 0, 0, .16);
  font-size: 31px;
  line-height: 1;
  cursor: pointer;
  font-weight: bold;
  transition: transform .18s ease, background .18s ease;
}

.close:hover,
.close:focus {
  background: #f4f4f4;
  transform: scale(1.05);
  outline: 3px solid rgba(252, 209, 22, .5);
}

.book-modal-header {
  display: grid;
  grid-template-columns: minmax(210px, 280px) 1fr;
  gap: 34px;
  align-items: start;
  margin-bottom: 28px;
}

#modalImage {
  display: block;
  width: 100%;
  max-width: 280px;
  height: auto;
  max-height: 430px;
  object-fit: contain;
  margin: 0 auto;
  border-radius: 12px;
  box-shadow: 0 12px 28px rgba(0, 0, 0, .18);
  background: #f7f7f7;
}

.book-modal-info {
  min-width: 0;
}

#modalTitle {
  text-align: left;
  margin: 0 52px 10px 0;
  font-size: clamp(1.8rem, 4vw, 2.65rem);
  line-height: 1.15;
  color: var(--rouge);
  text-transform: none;
}

#modalPublisher {
  color: #5d5d5d;
  font-weight: 700;
  margin-bottom: 18px;
}

#modalSummary {
  line-height: 1.75;
  white-space: pre-line;
  color: #303030;
}

.modal-divider {
  border: 0;
  height: 1px;
  margin: 28px 0;
  background: linear-gradient(90deg, transparent, #ddd 10%, #ddd 90%, transparent);
}

.reviews-heading,
.form-heading {
  margin-bottom: 16px;
  color: var(--noir);
}

.rating-summary {
  display: grid;
  grid-template-columns: 180px 1fr;
  gap: 28px;
  align-items: center;
  padding: 22px;
  margin: 12px 0 26px;
  border: 1px solid #ececec;
  border-radius: 16px;
  background: linear-gradient(135deg, #fff, #fffbea);
}

.rating-main {
  text-align: center;
}

.rating-score {
  font-size: 3.1rem;
  line-height: 1;
  font-weight: 800;
  color: var(--noir);
}

.rating-stars {
  margin: 8px 0 5px;
  color: #e5a800;
  font-size: 1.45rem;
  letter-spacing: 2px;
}

.rating-count {
  color: #666;
  font-size: .95rem;
}

.rating-bars {
  display: grid;
  gap: 8px;
}

.rating-bar-row {
  display: grid;
  grid-template-columns: 48px 1fr 42px;
  gap: 9px;
  align-items: center;
  font-size: .9rem;
  color: #555;
}

.rating-bar-track {
  height: 9px;
  overflow: hidden;
  border-radius: 999px;
  background: #e7e7e7;
}

.rating-bar-fill {
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, var(--jaune), #e5a800);
}

.reviews-toolbar {
  display: flex;
  justify-content: flex-end;
  align-items: center;
  gap: 10px;
  margin: 0 0 14px;
}

.reviews-toolbar label {
  font-weight: 700;
  color: #555;
}

.reviews-toolbar select,
#reviewForm select {
  padding: 11px 12px;
  border: 2px solid var(--jaune);
  border-radius: 8px;
  background: #fff;
  color: var(--noir);
}

#reviewsContainer {
  max-height: 520px;
  overflow-y: auto;
  padding: 4px 8px 4px 2px;
  background: transparent;
  border-radius: 0;
  scrollbar-width: thin;
}

.review-card {
  display: grid;
  grid-template-columns: 50px 1fr;
  gap: 14px;
  padding: 18px;
  margin-bottom: 14px;
  border: 1px solid #ececec;
  border-radius: 15px;
  background: #fff;
  box-shadow: 0 5px 18px rgba(0, 0, 0, .07);
}

.review-avatar {
  width: 48px;
  height: 48px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--vert), var(--rouge));
  color: #fff;
  font-size: 1.2rem;
  font-weight: 800;
  text-transform: uppercase;
  box-shadow: 0 4px 11px rgba(0, 0, 0, .15);
}

.review-body {
  min-width: 0;
}

.review-head {
  display: flex;
  justify-content: space-between;
  gap: 14px;
  align-items: flex-start;
  margin-bottom: 5px;
}

.review-author {
  font-weight: 800;
  color: #252525;
  word-break: break-word;
}

.review-date {
  flex: 0 0 auto;
  color: #777;
  font-size: .83rem;
}

.review-stars {
  color: #e5a800;
  letter-spacing: 1.5px;
  font-size: 1.05rem;
  margin-bottom: 8px;
}

.review-comment {
  color: #333;
  line-height: 1.68;
  white-space: pre-line;
  overflow-wrap: anywhere;
}

.review-toggle {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  margin-top: 10px;
  color: var(--vert);
  background: transparent;
  padding: 0;
  border: 0;
  border-radius: 0;
  font-weight: 800;
  cursor: pointer;
}

.review-toggle:hover {
  color: var(--rouge);
  text-decoration: underline;
  background: transparent;
}

.reviews-empty,
.reviews-error,
.reviews-loading {
  padding: 22px;
  text-align: center;
  border-radius: 12px;
  background: #f8f8f8;
  color: #666;
}

.reviews-error {
  color: #9d1024;
  background: #fff0f2;
}

#reviewForm {
  max-width: none;
  margin: 0;
  padding: 24px;
  border: 1px solid #ececec;
  background: #fbfbfb;
}

#reviewForm input,
#reviewForm textarea,
#reviewForm select {
  width: 100%;
}

#reviewForm textarea {
  min-height: 135px;
  resize: vertical;
}

.review-form-note {
  color: #666;
  font-size: .88rem;
  line-height: 1.5;
}

.form-status {
  display: none;
  padding: 12px 14px;
  border-radius: 8px;
  font-weight: 700;
}

.form-status.is-visible {
  display: block;
}

.form-status.success {
  color: #075c39;
  background: #e8f8f1;
  border: 1px solid #b6e5cf;
}

.form-status.error {
  color: #9d1024;
  background: #fff0f2;
  border: 1px solid #efbcc4;
}

#reviewForm button[type="submit"][disabled] {
  cursor: wait;
  opacity: .68;
}

.modal-noscript {
  padding: 12px;
  color: #8b1425;
  background: #fff0f2;
  border-radius: 8px;
}

@media (max-width: 760px) {
  .modal {
    padding: 0;
  }

  .modal-content {
    min-height: 100%;
    width: 100%;
    margin: 0;
    border-radius: 0;
    padding: 22px 18px 30px;
  }

  .book-modal-header {
    grid-template-columns: 1fr;
    gap: 22px;
  }

  #modalImage {
    max-width: 230px;
    max-height: 350px;
  }

  #modalTitle {
    text-align: center;
    margin-right: 0;
    font-size: 2rem;
  }

  #modalPublisher {
    text-align: center;
  }

  .rating-summary {
    grid-template-columns: 1fr;
  }

  .review-card {
    grid-template-columns: 42px 1fr;
    padding: 15px;
  }

  .review-avatar {
    width: 42px;
    height: 42px;
  }

  .review-head {
    display: block;
  }

  .review-date {
    display: block;
    margin-top: 3px;
  }
}

.review-stars.review-testimonial {
  display: inline-block;
  width: fit-content;
  padding: 5px 10px;
  margin-bottom: 9px;
  border-radius: 20px;
  background: #eef8f4;
  color: var(--vert);
  font-size: 0.88rem;
  font-weight: 800;
  letter-spacing: 0;
}
