/*
 * Swiss Art Gallery · recherche prédictive des artistes
 */

.sag-artist-ac-wrap{
  position:relative;
  display:block;
  flex:1 1 390px;
  min-width:min(100%,280px);
  z-index:40;
}

.sag-artist-ac-wrap > #directory-search{
  width:100%;
}

.sag-artist-ac{
  position:absolute;
  z-index:999;
  top:calc(100% + 9px);
  left:0;
  right:0;
  overflow:hidden;
  max-height:min(500px,68vh);
  overflow-y:auto;
  background:
    linear-gradient(180deg,rgba(255,253,247,.995),rgba(249,244,232,.995));
  color:#1c1913;
  border:1px solid rgba(166,127,37,.42);
  border-radius:14px;
  box-shadow:
    0 24px 60px rgba(20,16,8,.18),
    0 4px 14px rgba(20,16,8,.08);
  backdrop-filter:blur(14px);
  -webkit-backdrop-filter:blur(14px);
}

.sag-artist-ac[hidden]{
  display:none !important;
}

.sag-artist-ac-item{
  position:relative;
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:22px;
  width:100%;
  min-height:66px;
  padding:12px 16px 12px 18px;
  color:#1d1a14;
  text-decoration:none;
  border-bottom:1px solid rgba(96,76,34,.11);
  transition:
    background .15s ease,
    padding-left .15s ease;
}

.sag-artist-ac-item:last-child{
  border-bottom:0;
}

.sag-artist-ac-item::before{
  content:"";
  position:absolute;
  left:0;
  top:9px;
  bottom:9px;
  width:2px;
  background:#b58a2d;
  opacity:0;
  transform:scaleY(.45);
  transition:.15s ease;
}

.sag-artist-ac-item:hover,
.sag-artist-ac-item.is-active{
  background:rgba(202,165,81,.13);
  padding-left:22px;
}

.sag-artist-ac-item:hover::before,
.sag-artist-ac-item.is-active::before{
  opacity:1;
  transform:scaleY(1);
}

.sag-artist-ac-copy{
  min-width:0;
  display:flex;
  flex-direction:column;
  gap:1px;
}

.sag-artist-ac-copy strong{
  display:block;
  overflow:hidden;
  color:#18150f;
  font-family:
    "Cormorant Garamond",
    Georgia,
    "Times New Roman",
    serif;
  font-size:1.18rem;
  font-weight:600;
  line-height:1.13;
  text-overflow:ellipsis;
  white-space:nowrap;
}

.sag-artist-ac-years{
  color:#7b715e;
  font-size:.77rem;
  font-weight:600;
  letter-spacing:.04em;
}

.sag-artist-ac-action{
  flex:0 0 auto;
  color:#866515;
  font-size:.68rem;
  font-weight:800;
  letter-spacing:.055em;
  text-transform:uppercase;
  white-space:nowrap;
}

.sag-artist-ac-status{
  padding:17px 18px;
  color:#756b58;
  font-size:.82rem;
}

@media (max-width:700px){
  .sag-artist-ac-wrap{
    flex-basis:100%;
    width:100%;
    min-width:100%;
  }

  .sag-artist-ac{
    top:calc(100% + 7px);
    left:0;
    right:0;
    max-height:55vh;
    border-radius:12px;
  }

  .sag-artist-ac-item{
    min-height:62px;
    padding:11px 13px 11px 15px;
    gap:10px;
  }

  .sag-artist-ac-item:hover,
  .sag-artist-ac-item.is-active{
    padding-left:18px;
  }

  .sag-artist-ac-copy strong{
    font-size:1.08rem;
  }

  .sag-artist-ac-action{
    max-width:92px;
    text-align:right;
    white-space:normal;
    line-height:1.2;
  }
}

@media (max-width:420px){
  .sag-artist-ac-action{
    font-size:0;
  }

  .sag-artist-ac-action::after{
    content:"↗";
    font-size:1rem;
  }
}

/* =========================================================
   Swiss Art Gallery
   Correctif visibilité autocomplete — 18.09.2026
   ========================================================= */

/* Le bloc recherche doit toujours passer devant l'alphabet */
.directory-tools{
  position:relative !important;
  z-index:100 !important;
  overflow:visible !important;
}

.directory-search{
  position:relative !important;
  z-index:200 !important;
  overflow:visible !important;
}

.sag-artist-ac-wrap{
  position:relative !important;
  z-index:500 !important;
  overflow:visible !important;
}

/* Les éléments situés dessous restent réellement derrière */
.directory-alphabet-wrap{
  position:relative !important;
  z-index:1 !important;
}

.directory-resultbar,
.directory-group,
.directory-pagination{
  position:relative !important;
  z-index:0 !important;
}

/* Menu de suggestions : totalement opaque et nettement détaché */
.sag-artist-ac{
  z-index:99999 !important;

  background:#fffaf0 !important;
  background-image:none !important;

  opacity:1 !important;

  border:1px solid rgba(176,132,34,.62) !important;
  border-radius:15px !important;

  box-shadow:
    0 22px 55px rgba(0,0,0,.28),
    0 7px 20px rgba(96,65,10,.16),
    0 0 0 1px rgba(255,255,255,.72) inset !important;

  backdrop-filter:none !important;
  -webkit-backdrop-filter:none !important;

  max-height:390px !important;
  overflow-y:auto !important;
}

/* Une suggestion = une vraie ligne lisible */
.sag-artist-ac-item{
  background:#fffaf0 !important;

  min-height:58px !important;
  padding:10px 17px !important;

  border-bottom:
    1px solid rgba(119,87,25,.16) !important;

  opacity:1 !important;
}

/* Alternance très légère pour mieux séparer les noms */
.sag-artist-ac-item:nth-child(even){
  background:#fcf5e7 !important;
}

/* Survol clavier / souris */
.sag-artist-ac-item:hover,
.sag-artist-ac-item.is-active{
  background:#f3e5c3 !important;
  padding-left:21px !important;
}

/* Nom de l'artiste nettement plus lisible */
.sag-artist-ac-copy strong{
  color:#17130c !important;
  font-size:1.16rem !important;
  font-weight:600 !important;
  line-height:1.1 !important;
}

/* Dates */
.sag-artist-ac-years{
  color:#74664e !important;
  margin-top:3px !important;
}

/* Lien de droite */
.sag-artist-ac-action{
  color:#825e0d !important;
  font-weight:800 !important;
}

/* Petit filet doré à gauche de la ligne active */
.sag-artist-ac-item::before{
  width:3px !important;
  background:#c59427 !important;
}

/* Mobile */
@media (max-width:700px){

  .directory-tools,
  .directory-search{
    overflow:visible !important;
  }

  .sag-artist-ac{
    max-height:330px !important;
    border-radius:12px !important;

    box-shadow:
      0 18px 40px rgba(0,0,0,.30),
      0 5px 15px rgba(96,65,10,.14) !important;
  }

  .sag-artist-ac-item{
    min-height:58px !important;
    padding:10px 14px !important;
  }

  .sag-artist-ac-item:hover,
  .sag-artist-ac-item.is-active{
    padding-left:18px !important;
  }
}

