/* Repris à l'identique de l'ancien pages/accueil.php */
/* Bannière featured plus compacte */
  .hero-featured.hero-compact {
    height: clamp(220px, 35vh, 420px);
    border-radius: 18px;
    background-position: center;
    background-size: cover;
    overflow: hidden;
  }
  .hero-featured.hero-compact .hero-content h1{
    font-size: clamp(22px, 3.2vw, 44px);
    margin: .2rem 0 1rem;
    line-height: 1.15;
  }
  .hero-featured.hero-compact .btn-cta{
    padding: .55rem 1.1rem;
    font-size: .95rem;
  }
  .hero-featured.hero-compact .hero-label{
    padding: .25rem .55rem;
    font-size: .8rem;
  }

  /* Conteneur centralisé un poil plus large */
  .home-max {
    max-width: 1350px;
    margin: 0 auto;
    padding: 0 1rem;
  }

  /* Grille centrée : 5 / 4 / 3 / 2 / 1 cartes par ligne */
  .mods-grid{
    display: flex;
    flex-wrap: wrap;
    gap: 20px;
    justify-content: center; /* centre la dernière ligne */
  }
  .mods-grid > .tilt{
    flex: 0 1 calc(25% - 20px); /* 5 par ligne */
  }
  @media (max-width: 1399.98px){
    .mods-grid > .tilt{ flex-basis: calc(30% - 20px); } /* 4 par ligne */
  }
  @media (max-width: 991.98px){
    .mods-grid > .tilt{ flex-basis: calc(50% - 20px); } /* 3 par ligne */
  }
  @media (max-width: 767.98px){
    .mods-grid > .tilt{ flex-basis: calc(70% - 20px); } /* 2 par ligne */
  }
  @media (max-width: 450.98px){
    .mods-grid > .tilt{ flex-basis: 100%; } /* 1 par ligne */
  }

  /* Option : légère rotation */
  .mods-grid .tilt { transform: rotate(var(--r, 0deg)); }

  /* Le carrousel DLC reste centré pendant tout le défilement */
  .dlc-slider,
  .dlc-swiper {
    width: 100%;
    min-width: 0;
    overflow: hidden;
  }

  .dlc-swiper .swiper-wrapper {
    align-items: stretch;
  }

  .dlc-swiper .swiper-slide {
    display: flex;
    justify-content: center;
    align-items: stretch;
    box-sizing: border-box;
  }

  .dlc-swiper .swiper-slide > .hero-featured {
    flex: 0 0 90%;
    width: 90%;
    margin-right: auto;
    margin-left: auto;
  }

  /* Affichage de secours avant l'initialisation de Swiper. */
  .dlc-swiper:not(.swiper-initialized) .swiper-wrapper {
    display: flex;
    width: 100%;
  }

  .dlc-swiper:not(.swiper-initialized) .swiper-slide {
    flex: 0 0 100%;
    width: 100%;
  }

  .dlc-swiper:not(.swiper-initialized) .swiper-slide:not(:first-child) {
    display: none;
  }

  /* Trois derniers articles : cartes paysage entre les DLC et les packs */
  .pm-home-articles-section {
    max-width: 1450px;
    margin: 34px auto 0;
    padding: 0 1rem;
  }
  .pm-home-articles-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 18px;
  }
  .pm-home-article-card {
    position: relative;
    display: block;
    min-height: 235px;
    aspect-ratio: 16 / 8;
    overflow: hidden;
    border: 1px solid rgba(255,255,255,.10);
    border-radius: 18px;
    color: #fff;
    text-decoration: none;
    background:
      linear-gradient(135deg, rgba(33,58,42,.95), rgba(25,38,58,.95));
    box-shadow: 0 16px 38px rgba(0,0,0,.24);
    isolation: isolate;
    transition: transform .2s ease, border-color .2s ease, box-shadow .2s ease;
  }
  .pm-home-article-card:hover,
  .pm-home-article-card:focus {
    color: #fff;
    transform: translateY(-4px);
    border-color: rgba(126,190,47,.65);
    box-shadow: 0 20px 46px rgba(0,0,0,.32);
  }
  .pm-home-article-cover {
    position: absolute;
    inset: 0;
    z-index: -3;
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform .35s ease;
  }
  .pm-home-article-card:hover .pm-home-article-cover {
    transform: scale(1.035);
  }
  .pm-home-article-ai-label {
    position: absolute;
    right: 10px;
    top: 10px;
    z-index: 2;
    padding: 4px 7px;
    border-radius: 6px;
    background: rgba(0,0,0,.68);
    color: rgba(255,255,255,.9);
    font-size: .64rem;
    font-weight: 700;
    backdrop-filter: blur(4px);
  }
  .pm-home-article-overlay {
    position: absolute;
    inset: 0;
    z-index: -2;
    background:
      linear-gradient(180deg, rgba(7,9,12,.12) 0%, rgba(7,9,12,.32) 38%, rgba(7,9,12,.94) 100%);
  }
  .pm-home-article-content {
    position: absolute;
    right: 0;
    bottom: 0;
    left: 0;
    padding: 18px 20px 17px;
    text-align: left;
  }
  .pm-home-article-badge {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    margin-bottom: 8px;
    padding: 5px 9px;
    border-radius: 999px;
    color: #101810;
    background: #8bc832;
    font-size: .69rem;
    font-weight: 900;
    letter-spacing: .045em;
    text-transform: uppercase;
  }
  .pm-home-article-title {
    display: -webkit-box;
    overflow: hidden;
    margin: 0;
    color: #fff;
    font-size: clamp(1.05rem, 1.55vw, 1.45rem);
    font-weight: 800;
    line-height: 1.2;
    text-shadow: 0 2px 10px rgba(0,0,0,.6);
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
  }
  .pm-home-article-excerpt {
    display: -webkit-box;
    overflow: hidden;
    margin: 7px 0 0;
    color: rgba(239,243,246,.84);
    font-size: .82rem;
    line-height: 1.4;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
  }
  .pm-home-article-meta {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 10px;
    margin-top: 10px;
    color: rgba(230,235,240,.74);
    font-size: .72rem;
    font-weight: 650;
  }
  @media (max-width: 1050px) {
    .pm-home-articles-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .pm-home-articles-grid .pm-home-article-card:last-child:nth-child(odd) {
      grid-column: 1 / -1;
      max-width: 720px;
      width: 100%;
      justify-self: center;
    }
  }
  @media (max-width: 680px) {
    .pm-home-articles-grid { grid-template-columns: 1fr; }
    .pm-home-article-card {
      min-height: 210px;
      aspect-ratio: 16 / 9;
    }
    .pm-home-articles-grid .pm-home-article-card:last-child:nth-child(odd) {
      grid-column: auto;
      max-width: none;
    }
    .pm-home-article-content { padding: 16px; }
  }

  /* Packs publics : même gabarit visuel que les fiches mods de l’accueil */
  .pm-home-packs-section {
    margin-top: 34px;
  }
  .pm-home-pack-modstyle {
    max-width: 320px;
    height: 370px;
    font-size: .85rem;
    flex: 0 0 auto;
  }
  .pm-home-pack-modstyle .card { height: 100%; }
  .pm-home-pack-modstyle .card-body { padding: .75rem; height: 180px; }
  .pm-home-pack-modstyle .card-img-wrapper {
    position: relative;
    height: 170px;
    overflow: hidden;
    background: linear-gradient(135deg, rgba(122,165,46,.24), rgba(37,99,235,.22));
  }
  .pm-home-pack-modstyle .card-img-top {
    width: 100%;
    height: 170px;
    object-fit: cover;
  }
  .pm-home-pack-cover-empty {
    height: 170px;
    display: grid;
    place-items: center;
    color: rgba(255,255,255,.72);
    font-size: 2.15rem;
  }
  .pm-home-pack-badge {
    position: absolute;
    z-index: 5;
    top: 10px;
    left: 10px;
    display: inline-flex;
    align-items: center;
    gap: 5px;
    padding: 5px 8px;
    border-radius: 999px;
    background: rgba(10,10,10,.82);
    color: #fff;
    font-size: .7rem;
    font-weight: 900;
    backdrop-filter: blur(5px);
  }
  .pm-home-pack-modstyle .card-body {
    display: flex;
    flex-direction: column;
    align-items: center;
  }
  .pm-home-pack-modstyle .card-title {
    width: 100%;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
  }
  .pm-home-pack-modstyle .pm-home-pack-count-line {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    margin: 2px 0 7px;
    color: #8db83f;
    font-size: .78rem;
    font-weight: 900;
  }
  .pm-home-pack-modstyle .card-author {
    min-height: 32px;
  }
  .pm-home-pack-modstyle .author-avatar-placeholder {
    display: grid;
    place-items: center;
    color: #bbb;
  }
  .pm-home-pack-modstyle .stats {
    margin-top: auto;
  }
  @media (max-width: 768px) {
    .pm-home-pack-modstyle .card-img-wrapper,
    .pm-home-pack-modstyle .card-img-top,
    .pm-home-pack-cover-empty { height: 160px; }
  }
