/*==========================================================
  E-BOOKS (grille)
==========================================================*/
.cstw-ebooks__grid{
  display:grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 18px;
}

@media (max-width: 900px){
  .cstw-ebooks__grid{ grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 640px){
  .cstw-ebooks__grid{ grid-template-columns: 1fr; }
}

.cstw-ebook{
  background:#fff;
  border-radius: 16px;
  padding: 18px;
  box-shadow: 0 8px 24px rgba(0,0,0,.08);
}

.cstw-ebook.is-featured{
  background:#e10074; /* rose */
  color:#fff;
}

.cstw-ebook__link{
  display:block;
  text-decoration:none;
  color:inherit;
}

.cstw-ebook__head{
  display:flex;
  gap: 12px;
  align-items:flex-start;
  margin-bottom: 10px;
}

.cstw-ebook__icon{
  width: 34px;
  height: 34px;
  object-fit: contain;
  flex: 0 0 34px;
}

.cstw-ebook__icon--placeholder{
  display:inline-block;
  width:34px;
  height:34px;
  border-radius:10px;
  background: rgba(0,0,0,.08);
}

.cstw-ebook__title{
  margin:0;
  font-size: 18px;
  line-height: 1.2;
  font-weight: 800;
}

.cstw-ebook__excerpt{
  margin:0 0 14px 0;
  opacity:.85;
  font-size: 13px;
  line-height: 1.35;
}

.cstw-ebook__more{
  font-weight: 700;
  font-size: 12px;
  display:inline-block;
  opacity:.95;
}

.cstw-ebook.is-featured .cstw-ebook__excerpt{
  opacity:.92;
}

.subtitle-ebooks { 
    margin: 0; 
    line-height: 1.2;
    font-weight: 800; 
}
.cstw-ebooks-title-ebooks {
    padding: 2%;
}
button.button_ebooks_list {
    color: #E10073;
    border-width: 2px!important;
    border-radius: 10px;
    font-family: 'Inter',Helvetica,Arial,Lucida,sans-serif!important;
    font-weight: 700!important;
    background-color: RGBA(255,255,255,0);
    border: #E10073 1px solid;
    padding: 2%;
    font-size: 1rem;
    margin-top: 3vh;
}
button.button_ebooks_list:hover {
    background-color: #E10073;
    color: white;
}

/* MODIFICATIONS ROTATION DE CARTES */
.cstw-ebook{
  position: relative;
  border-radius: 16px; 
}
.cstw-ebook.is-featured {
    background: unset;
    color: #fff;
    z-index: 99;
}

/* Contenu au-dessus du fond */
.cstw-ebook__link{
  position: relative;
  z-index: 1;
  display: block;
  padding: 20px;
  color: #111;
  text-decoration: none;
  transition: color .5s ease;
}

/* “Fond” indépendant */
.cstw-ebook::before {
    content: "";
    position: absolute;
    inset: -10px;
    border-radius: inherit;
    z-index: 0;
    background: #fff;
    border: 1px solid rgba(0,0,0,.08);
    transform: rotate(0deg);
    transition: transform .25s ease, background .25s ease, border-color .25s ease;
    margin: 2%;
    width: 90;
}

/* État featured = rose + penché + texte blanc */
.cstw-ebook.is-featured::before{
  background: #ff4fa3;          /* ton rose */
  border-color: transparent;
  transform: rotate(3deg);
}

.cstw-ebook.is-featured .cstw-ebook__link{
  color: #fff;
}

.cstw-ebook.is-featured .cstw-ebook__more{
  color: #fff;
}

/* si tu as des éléments qui doivent rester blancs aussi */
.cstw-ebook.is-featured .cstw-ebook__title,
.cstw-ebook.is-featured .cstw-ebook__excerpt{
  color: #fff;
}
