/* ============================================
   CSS PAGE D'ACCUEIL (HOME)
   Nettoyé et réorganisé - classes utilisées uniquement
============================================ */

@import url("https://fonts.googleapis.com/css2?family=Poppins:wght@400;600;700&display=swap");

/* ----------- WRAPPER & GRILLE ----------- */
.home-wrapper {
  max-width: 95%;
  margin: 0 auto;
  padding: 2rem 0 4rem;
}
.home-content-grid {
  display: grid;
  grid-template-columns: 1.3fr 270px;
  gap: 1.5rem;
  width: 98%;
  padding: 20px 20px 0 20px;
}
.home-main-content {
  grid-column: 1;
  max-width: 99%;
}
.home-sidebar {
  grid-column: 2;
  max-width: 270px;
}

/* ----------- SECTIONS GAUCHE (ARTICLES) ----------- */
.left-sections {
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
}

/* ----------- CARDS SMEG (SIDEBAR) ----------- */
.card-smeg-stack {
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
}
.card-smeg {
  border-radius: 42px;
  border: 2px solid #7a3e00;
  background: radial-gradient(
    ellipse at center,
    #fff6df 0%,
    #f8ddb0 45%,
    #ebc58c 75%,
    #d4a468 100%
  );
  box-shadow:
    0 18px 36px rgba(0, 0, 0, 0.18),
    inset 0 0 0 5px rgba(255, 245, 220, 0.9),
    inset 0 -6px 10px rgba(0, 0, 0, 0.1),
    inset 0 8px 14px rgba(255, 255, 255, 0.55),
    inset 0 0 0 10px rgba(122, 62, 0, 0.22);
  overflow: hidden;
  padding: 25px;
}
.card-smeg .list-group {
  margin: 0;
  padding: 0;
  list-style: none;
}
.card-smeg .list-group-item {
  display: flex;
  align-items: flex-start;
  gap: 1rem;
  border: none;
  padding: 0.75rem 1rem;
  margin-bottom: 0.5rem;
  background: transparent;
  border-top: 1px solid #e9ecef;
}
.card-smeg .list-group-item:first-child {
  border-top: none;
  padding-top: 0;
}
.card-smeg .list-group-item:last-child {
  margin-bottom: 0;
}
.card-smeg .list-group-item img {
  width: 56px;
  height: 56px;
  object-fit: cover;
  border-radius: 10px;
  flex-shrink: 0;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.07);
}
.card-smeg .list-group-item .article-info {
  display: flex;
  flex-direction: column;
  justify-content: center;
  min-width: 0;
}
.card-smeg .list-group-item .article-title {
  font-size: 1rem;
  font-weight: 600;
  color: #7a3e00;
  margin-bottom: 0.25rem;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.card-smeg .list-group-item .article-meta {
  font-size: 0.85rem;
  color: #b88a4a;
}

/* ----------- ARTICLE CARDS (TEXTE + IMAGE) ----------- */

.home-featured-layout {
  display: flex;
  flex-direction: row;
  align-items: stretch;

  height: auto;
  min-height: unset;
  max-height: unset;
}

.home-featured-card {
  height: auto;
  min-height: unset;
  max-height: unset;
  display: flex;
  align-items: stretch;
  position: relative;
  border-radius: 42px;
  
  background: radial-gradient(
    ellipse at center,
    #fff6df 0%,
    #f8ddb0 45%,
    #ebc58c 75%,
    #d4a468 100%
  );
  
  overflow: hidden;
  
}
.article-card-text {
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: flex-start;
  gap: 1rem;
  width: 50%;
  left: 0;
  top: 0;
  bottom: 0;
  padding: 2.5rem 2rem 2.5rem 2.5rem;
}
.article-card-title {
  font-size: 1.2rem;
  line-height: 1.2;
  font-weight: 700;
  color: black;
}
.article-card-author {
  font-size: 0.95rem;
  color: black;
  margin-bottom: 0.25rem;
}
.article-card-link {
  margin-top: 0.5rem;
  font-weight: 700;
  color: #9a4f18;
  text-decoration: none;
}
.article-card-link:hover {
  color: #7a3e00;
}
.article-card-image-wrapper {
  position: relative;
  width: 50%;
  border-radius: 0 18px 18px 0;
  background: transparent;
  box-shadow:
    0 0 0 5px rgba(255, 245, 220, 0.9) inset,
    0 0 0 10px rgba(255, 255, 255, 0.55) inset;
  display: flex;
  align-items: center;
  justify-content: center;
}

.article-card-image-wrapper img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
  border-radius: 0 18px 18px 0 !important;
  box-shadow: none !important;
  transition: none !important;
}

.article-card-image-wrapper img:hover {
  /* Aucun effet visuel sur hover */
  box-shadow: none !important;
  filter: none !important;
  transform: none !important;
}

/* ----------- SIDEBAR : Derniers articles ----------- */
.sidebar-article-link {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  text-decoration: none;
  padding: 0.5rem 0.25rem;
  border-radius: 8px;
  transition: background 0.18s;
}
.sidebar-article-link:hover {
  background: #f7c99233;
}
.sidebar-article-img-wrapper {
  flex-shrink: 0;
  width: 48px;
  height: 48px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 8px;
  background: #fff6df;
  overflow: hidden;
  box-shadow: 0 1px 4px rgba(0, 0, 0, 0.06);
}
.sidebar-article-img-wrapper img,
.sidebar-article-img-placeholder {
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: 8px;
  display: block;
}
.sidebar-article-info {
  display: flex;
  flex-direction: column;
  min-width: 0;
  flex: 1;
}
.sidebar-article-title {
  font-size: 1rem;
  font-weight: 600;
  color: #7a3e00;
  margin-bottom: 0.15rem;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: normal;
  max-width: 140px;
}
.sidebar-article-meta {
  font-size: 0.85rem;
  color: #b88a4a;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 100%;
}

/* ----------- RESPONSIVE ----------- */
@media (max-width: 576px) {
  html, body {
    min-height: 100% !important;
    height: 100% !important;
    width: 100% !important;
    overflow-x: hidden !important;
    background-color: #fff6df !important; /* couleur de fond proche de l'image */
  }
  body {
    background-image: url('../ratio10.png') !important;
    background-size: contain !important;
    background-position: center top !important;
    background-attachment: scroll !important;
    background-repeat: repeat !important;
  }
  .home-featured-articles,
  .left-sections,
  .smeg-frame {
    margin: 0 !important;
    height: auto;
    min-height: unset;
    max-height: unset;
    overflow: visible;
  }

  .article-card-image-wrapper {
    order: 1;
  }
  .article-card-text {
    order: 2;
  }
  .home-content-grid {
    display: flex;
    flex-direction: column;
    gap: 1.25rem;
    width: 100% !important;
    max-width: 100% !important;
    padding: 0 !important;
    margin: 0 !important;
  }
  .home-main-content,
  .home-sidebar {
    max-width: 100% !important;
    width: 100% !important;
    padding: 0 !important;
    margin: 0 !important;
  }
  .home-wrapper {
    max-width: 100% !important;
    width: 100% !important;
    padding: 0 !important;
    margin: 0 !important;
  }
  .left-sections {
    gap: 1rem;
  }

  .card-smeg .list-group-item img {
    width: 40px;
    height: 40px;
    border-radius: 8px;
  }
  .home-featured-layout {
    flex-direction: column !important;
    height: auto;
    min-height: unset;
    max-height: unset;
    gap: 0.5rem;
    align-items: stretch;
  }
  .home-featured-card {
    height: auto;
    min-height: unset;
    max-height: unset;
  }

   .article-card-image-wrapper {
    width: 100%;
    min-height: 140px;
    max-height: 220px;
    
    
    box-shadow: none !important;
    background: transparent !important;
   
    display: flex;
    justify-content: center;
    align-items: center;
  }
  .article-card-image-wrapper img {
    width: 97% !important;
    height: auto;
    max-height: 220px;
    object-fit: cover;
    border-radius: 32px 32px 0 0 !important;
    margin-top: 5px;
    border: none !important;
    display: block;
  }

  .article-card-text {
    width: 100%;
    gap: 0.5rem;
    padding: 1.1rem 1.2rem 1.3rem 1.2rem;
    border-radius: 0 0 32px 32px;
    
  }

  .home-featured-card {
    border-radius: 32px;
    overflow: hidden;
  }

  .home-sidebar {
    margin: 0 !important;
    width: 100% !important;
  }
  .carousel-wrapper {
    margin-left: 17px !important;
    margin-right: 20px;
    width: 100% !important;
  }
  .sections-wrapper{
    margin-top: 15px;
    margin-left: 40px !important;
    margin-right: 40px !important;
    padding-right: 30px;
    /* Le padding à droite permet d'égaliser l'espace avec la gauche pour les cards */
    
  }
  
}
