/****************************
   GALERIES — LOGIQUE IDENTIQUE À HOME
****************************/

/* =====================================================
   BASE PAGE
===================================================== */
body.am-galerie {
    min-height: 100vh;
    background: transparent !important;
}

/* =====================================================
   CONTENEUR PORTEUR DU FOND
===================================================== */
body.am-galerie #wrap {
    min-height: 100vh;
    background-color: transparent !important;
}

/* =====================================================
   NEUTRALISATION OCEANWP
===================================================== */
body.am-galerie #outer-wrap,
body.am-galerie #main,
body.am-galerie #content-wrap,
body.am-galerie #primary,
body.am-galerie #content,
body.am-galerie article,
body.am-galerie .single-page-article,
body.am-galerie .container,
body.am-galerie .entry,
body.am-galerie .site-content {
    background: transparent !important;
}

/* =====================================================
   STRUCTURE GALERIE
===================================================== */

.am-gallery-wrap {
    width: 100%;
}

.am-gallery {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 32px;
    width: 100%;
}

.am-gallery-item {
    display: flex;
    flex-direction: column;
    align-items: center;
}

.am-image-wrapper {
    position: relative;
    width: 100%;
    aspect-ratio: 1 / 1;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
}

.am-gallery-item img {
    width: 100%;
    height: 100%;
    object-fit: contain;
}

/************************************************************
    LÉGENDE
*************************************************************/

.am-caption {
    background: rgba(0,0,0,0.70);
    padding: 12px 20px;
    margin-top: 10px;
    border-radius: 20px;
    color: #fff;
    font-size: 0.95em;
    text-align: center;
}

/* ================================
   MOBILE (slider horizontal)
================================ */

@media (max-width: 768px){

  .am-gallery{
      display:flex;
      flex-direction:row;
      gap:20px;
      overflow-x:auto;
      overflow-y:hidden;
      scroll-snap-type:x mandatory;
      -webkit-overflow-scrolling:touch;
      padding-left:16px;
      padding-right:16px;
  }

  .am-gallery-item{
      flex:0 0 85%;
      scroll-snap-align:center;
  }

  .am-gallery::-webkit-scrollbar{
      display:none;
  }

  .am-gallery{
      scrollbar-width:none;
  }
}

/* =========================================
   MOBILE — INDICATION SLIDER (FADE)
========================================= */

@media (max-width:768px){

  .am-gallery-wrap{
    position:relative;
  }

  .am-gallery-indicator{
    position:absolute;
    top:0;
    bottom:0;
    width:56px;
    display:flex;
    align-items:center;
    justify-content:center;
    pointer-events:none;
    opacity:0;
    transition:opacity .25s ease;
    z-index:9999;
  }

  .am-gallery-indicator.left{
    left:0;
    background:linear-gradient(to right, rgba(0,0,0,0.45), rgba(0,0,0,0));
  }

  .am-gallery-indicator.right{
    right:0;
    background:linear-gradient(to left, rgba(0,0,0,0.45), rgba(0,0,0,0));
  }

.am-gallery-indicator span{
  font-size:26px;
  color:#c40000;
  font-weight:900;
  text-shadow:
    0 2px 8px rgba(0,0,0,0.55),
    0 0 6px rgba(196,0,0,0.6);
}

  .am-gallery-indicator.active{
    opacity:1;
  }
}

/************************************************************
    PULSE — VERSION RONDE
*************************************************************/

.am-gallery-floating-pulse {
    position: fixed;
    top: 50%;
    left: -18px; /* effleure le bord gauche */
    transform: translateY(-50%);
    z-index: 5000;
    pointer-events: none;

    width: 110px;
    height: 110px;

    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;

    background: rgba(255,255,255,0.90);
    border: 3px solid #000;
    color: #111;

    font-size: 13px;
    font-weight: 800;
    line-height: 1.2;

    border-radius: 50%;

    box-shadow: 0 8px 24px rgba(0,0,0,0.25);
    opacity: 0;
}

/************************************************************
    MOBILE — PULSE ROND
*************************************************************/

@media (max-width:768px){

  .am-gallery-floating-pulse{
      width: 90px;
      height: 90px;
      font-size: 12px;
  }

}
/************************************************************
   DESCRIPTION
*************************************************************/

body.am-galerie .entry-content {
    background: var(--amup-pres-opaque-bg) !important;
    border-radius: 18px;
    padding: 28px;
}