/* ==================== */
/* GLOBALS              */
/* ==================== */
html, body {
  width: 100%;
  overflow-x: hidden;
}

body {
  display: flex;
  flex-direction: column;
}

.content-wrapper {
  flex: 1 0 auto;
}

/* ==================== */
/* CARTE EBOOK          */
/* ==================== */
.ebook-card {
  display: flex;
  flex-direction: column;
  align-items: center;
  background-color: #fff;
  border-radius: 12px;
  padding: 1rem;
  box-shadow: 0 4px 12px rgba(0,0,0,0.1);
  max-width: 400px; /* largeur maximale */
  width: 90%;       /* largeur flexible */
  transition: transform 0.2s ease, box-shadow 0.2s ease;
  margin: 0 auto; /* centrage horizontal */
}

.ebook-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 8px 20px rgba(0,0,0,0.15);
}

.ebook-card img {
  width: 100%;
  height: auto;
  max-height: 400px;
  object-fit: cover;
  border-radius: 8px;
}

.ebook-card p {
  margin-top: 0.5rem;
  text-align: center;
  font-size: 1.1rem;
}

.ebook-card .btn {
  margin-top: 1rem;
  width: 100%;
}

/* ==================== */
/* CARTE ARTICLE        */
/* ==================== */
.article-card {
  background-color: #1e1e2f;
  transition: transform 0.3s ease, box-shadow 0.3s ease;
  border-radius: 12px;
  overflow: hidden;
}

.article-card:hover {
  transform: translateY(-6px);
  box-shadow: 0 12px 30px rgba(0, 0, 0, 0.25);
}

/* Image de fond */
.article-bg {
  width: 100%;
  height: 300px;
  background-repeat: no-repeat;
  background-size: cover;
  background-position: center;
  background-color: #000;
  transition: transform 0.6s ease;
}

.article-card:hover .article-bg {
  transform: scale(1.05);
}

/* Overlay sombre */
.gradient-overlay {
  background: linear-gradient(to top, rgba(0,0,0,0.75), rgba(0,0,0,0.1));
  z-index: 1;
}

.card-img-overlay {
  z-index: 2;
}

.card-title,
.card-text {
  color: #fff;
  text-shadow: 0 2px 4px rgba(0,0,0,0.8);
}

/* ==================== */
/* RESPONSIVE BREAKPOINTS */
/* ==================== */

/* XS: <576px */
@media (max-width: 575px) {
  .ebook-card img {
    max-height: 200px;
  }
  .ebook-card p {
    font-size: 0.9rem;
  }
  .article-bg {
    height: 180px;
  }
}

/* SM: 576px - 767px */
@media (min-width: 576px) and (max-width: 767px) {
  .ebook-card img {
    max-height: 250px;
  }
  .ebook-card p {
    font-size: 1rem;
  }
  .article-bg {
    height: 220px;
  }
}

/* MD: 768px - 991px */
@media (min-width: 768px) and (max-width: 991px) {
  .ebook-card img {
    max-height: 300px;
  }
  .ebook-card p {
    font-size: 1.05rem;
  }
  .article-bg {
    height: 260px;
  }
}

/* LG: 992px - 1199px */
@media (min-width: 992px) and (max-width: 1199px) {
  .ebook-card img {
    max-height: 350px;
  }
  .ebook-card p {
    font-size: 1.1rem;
  }
  .article-bg {
    height: 300px;
  }
}

/* XL: 1200px - 1399px */
@media (min-width: 1200px) and (max-width: 1399px) {
  .ebook-card img {
    max-height: 380px;
  }
  .ebook-card p {
    font-size: 1.15rem;
  }
  .article-bg {
    height: 330px;
  }
}

/* XXL: 1400px - 1599px */
@media (min-width: 1400px) and (max-width: 1599px) {
  .ebook-card img {
    max-height: 400px;
  }
  .ebook-card p {
    font-size: 1.2rem;
  }
  .article-bg {
    height: 360px;
  }
}

/* 2XL: 1600px+ */
@media (min-width: 1600px) {
  .ebook-card img {
    max-height: 450px;
  }
  .ebook-card p {
    font-size: 1.25rem;
  }
  .article-bg {
    height: 400px;
  }
}
