/* assets/recherche-avancee.css
   Recherche avancee d'artistes : colonne de criteres + grille de resultats.
   Prefixe `ras-` (recherche avancee sur les artistes) pour ne pas entrer en
   collision avec les classes des autres pages, qui vivent dans styles.css. */

.ras{
  background:
    radial-gradient(circle at top left, rgba(176,138,58,.16), transparent 32%),
    radial-gradient(circle at 90% 10%, rgba(31,47,74,.10), transparent 36%),
    linear-gradient(180deg, rgba(255,255,255,.4), rgba(255,255,255,0));
}
.ras__inner{ padding: 34px 0 64px; }

.ras-hero{ margin-bottom: 24px; }
.ras-hero__eyebrow{
  margin: 0 0 8px;
  color: var(--gold);
  font-size: 12px;
  font-weight: 700;
  letter-spacing: .14em;
  text-transform: uppercase;
}
.ras-hero h1{
  margin: 0;
  font-family: Georgia, "Times New Roman", serif;
  font-size: clamp(30px, 3.4vw, 44px);
  color: var(--navy);
  line-height: 1.05;
}
.ras-hero__lead{
  margin: 8px 0 0;
  color: #4d4d4d;
  max-width: 720px;
}

.ras__layout{
  display: grid;
  grid-template-columns: 316px minmax(0, 1fr);
  gap: 26px;
  align-items: start;
}

/* --- Colonne des criteres ---------------------------------------------- */

.ras-filters{
  position: sticky;
  /* 82px : hauteur du header colle, pour que la colonne ne passe pas dessous. */
  top: 82px;
  max-height: calc(100vh - 100px);
  overflow-y: auto;
  border: 1px solid var(--border);
  background: rgba(255,255,255,.9);
  border-radius: 18px;
  padding: 6px 18px 18px;
  box-shadow: 0 14px 30px rgba(13,19,31,.06);
}
.ras-filters.is-busy{ opacity: .6; }
.ras-filters__mobile-bar{ display: none; }

.ras-group{
  border: 0;
  border-top: 1px solid var(--border);
  margin: 0;
  padding: 14px 0 4px;
}
.ras-group:first-of-type{ border-top: 0; }
.ras-group legend{
  padding: 0;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: .1em;
  text-transform: uppercase;
  color: var(--gold);
}

.ras-field{ display: block; margin-top: 12px; }
.ras-field > span{
  display: block;
  margin-bottom: 6px;
  font-size: 13px;
  font-weight: 700;
  color: var(--navy);
}
.ras-field > span em,
.ras-hint em{
  font-style: normal;
  font-weight: 400;
  color: var(--muted);
}
.ras-field input[type="search"],
.ras-field input[type="number"],
.ras-field select{
  width: 100%;
  padding: 9px 11px;
  border: 1px solid var(--border);
  border-radius: 12px;
  background: #fff;
  font: inherit;
  color: var(--ink);
}
.ras-field input:focus,
.ras-field select:focus,
.ras-panel__filter:focus{
  outline: none;
  border-color: var(--navy);
  box-shadow: 0 0 0 3px rgba(31,47,74,.12);
}

.ras-range{ display: flex; align-items: center; gap: 8px; }
.ras-range input{ width: 100%; min-width: 0; }
.ras-range__sep{ color: var(--muted); flex: none; }

.ras-radios{ display: flex; flex-wrap: wrap; gap: 6px 14px; }
.ras-radios--stack{ flex-direction: column; gap: 6px; }
.ras-radio,
.ras-check{
  display: flex;
  align-items: flex-start;
  gap: 7px;
  font-size: 13.5px;
  cursor: pointer;
  line-height: 1.35;
}
.ras-radio input,
.ras-check input{ flex: none; margin-top: 2px; }
.ras-check--inline{ margin-top: 10px; }
.ras-check em{
  font-style: normal;
  color: var(--muted);
  font-size: 12px;
}

.ras-checklist{ display: flex; flex-direction: column; gap: 6px; }

.ras-hint{
  margin: 10px 0 0;
  font-size: 12px;
  color: var(--muted);
  line-height: 1.45;
}

/* Panneau multi-selection replie derriere un <summary> : sans ca, six listes
   de plusieurs dizaines d'entrees rendraient la colonne interminable. */
.ras-panel{
  border: 1px solid var(--border);
  border-radius: 12px;
  background: #fff;
}
.ras-panel summary{
  list-style: none;
  cursor: pointer;
  padding: 9px 30px 9px 11px;
  position: relative;
  font-size: 13.5px;
  color: var(--ink);
}
.ras-panel summary::-webkit-details-marker{ display: none; }
.ras-panel summary::after{
  content: "\25BE";
  position: absolute;
  right: 11px;
  top: 50%;
  transform: translateY(-50%);
  color: var(--muted);
}
.ras-panel[open] summary::after{ transform: translateY(-50%) rotate(180deg); }
.ras-panel[open] summary{ border-bottom: 1px solid var(--border); }
.ras-panel__body{ padding: 9px; }
.ras-panel__filter{
  width: 100%;
  padding: 7px 9px;
  border: 1px solid var(--border);
  border-radius: 10px;
  margin-bottom: 8px;
  font: inherit;
  font-size: 13px;
}
.ras-panel__list{
  list-style: none;
  margin: 0;
  padding: 0;
  max-height: 232px;
  overflow-y: auto;
}
.ras-panel__list li{ padding: 0; }
.ras-panel__list .ras-check{
  padding: 5px 7px;
  border-radius: 8px;
  font-size: 13px;
}
.ras-panel__list .ras-check:hover{ background: rgba(31,47,74,.06); }

.ras-filters__actions{
  display: flex;
  gap: 8px;
  margin-top: 18px;
  padding-top: 14px;
  border-top: 1px solid var(--border);
}
.ras-btn{
  display: inline-block;
  padding: 10px 18px;
  border: 1px solid var(--border);
  border-radius: 999px;
  background: #fff;
  color: var(--navy);
  font: inherit;
  font-weight: 700;
  cursor: pointer;
  text-align: center;
}
.ras-btn:hover{ background: rgba(31,47,74,.06); text-decoration: none; }
.ras-btn--primary{
  background: var(--navy);
  color: #fff;
  border-color: var(--navy);
  flex: 1;
}
.ras-btn--primary:hover{ background: #18253b; }
.ras-btn--block{ width: 100%; }
.ras-btn.is-busy{ opacity: .6; cursor: progress; }

/* --- Colonne des resultats ---------------------------------------------- */

.ras-results{ min-width: 0; }

.ras-results__bar{
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
  margin-bottom: 12px;
}
.ras-results__count{
  margin: 0;
  color: var(--muted);
  font-size: 14px;
}
.ras-results__count strong{ color: var(--navy); font-size: 17px; }
.ras-sort select{
  padding: 8px 12px;
  border: 1px solid var(--border);
  border-radius: 999px;
  background: #fff;
  font: inherit;
  font-size: 13px;
  color: var(--navy);
  font-weight: 700;
  cursor: pointer;
}

.ras-chips{
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 16px;
}
.ras-chip{
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 5px 11px;
  border-radius: 999px;
  background: rgba(176,138,58,.16);
  color: var(--navy);
  font-size: 13px;
  font-weight: 700;
}
.ras-chip:hover{ background: rgba(176,138,58,.3); text-decoration: none; }
.ras-chip__x{
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 18px;
  height: 18px;
  border-radius: 50%;
  background: rgba(31,47,74,.18);
  color: #fff;
  font-size: 13px;
  line-height: 1;
}
.ras-chip:hover .ras-chip__x{ background: var(--navy); }

.ras-grid{
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(196px, 1fr));
  gap: 16px;
}

.ras-card{
  border: 1px solid var(--border);
  border-radius: 16px;
  overflow: hidden;
  background: #fff;
  box-shadow: 0 10px 22px rgba(13,19,31,.07);
  transition: transform .15s ease, box-shadow .15s ease;
}
.ras-card:hover{
  transform: translateY(-3px);
  box-shadow: 0 18px 32px rgba(13,19,31,.12);
}
.ras-card__link{ display: block; color: inherit; }
.ras-card__link:hover{ text-decoration: none; }
.ras-card__media{
  position: relative;
  aspect-ratio: 4/5;
  background: linear-gradient(135deg, #f5efe2, #ece2cb);
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
}
.ras-card__placeholder{
  font-size: 40px;
  line-height: 1;
  filter: grayscale(1) opacity(.45);
}
.ras-card__img{
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}
.ras-card__body{ padding: 12px 14px 14px; }
.ras-card__name{
  margin: 0;
  font-family: Georgia, "Times New Roman", serif;
  font-size: 16px;
  color: var(--navy);
  line-height: 1.25;
}
.ras-card__years{
  margin: 4px 0 0;
  color: var(--gold);
  font-weight: 700;
  font-size: 12.5px;
}
.ras-card__disciplines{
  margin: 6px 0 0;
  font-size: 12.5px;
  color: var(--muted);
  line-height: 1.35;
}
.ras-card__meta{
  margin: 8px 0 0;
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  font-size: 11.5px;
  color: var(--muted);
}
.ras-card__meta span{
  padding: 2px 8px;
  background: rgba(31,47,74,.06);
  border-radius: 999px;
}

.ras-empty{
  margin: 0;
  padding: 22px;
  text-align: center;
  color: var(--muted);
  background: rgba(31,47,74,.04);
  border: 1px dashed var(--border);
  border-radius: 14px;
  font-style: italic;
}

.ras-more-wrap{ text-align: center; margin-top: 22px; }

/* --- Bascule entre rubriques --------------------------------------------- */

.ras-hero__eyebrow a{ color: inherit; }

.ras-nav{
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 22px;
}
.ras-nav__link{
  padding: 6px 14px;
  border: 1px solid var(--border);
  border-radius: 999px;
  background: rgba(255,255,255,.9);
  color: var(--navy);
  font-size: 13px;
  font-weight: 700;
}
.ras-nav__link:hover{ background: rgba(31,47,74,.06); text-decoration: none; }
.ras-nav__link.is-active{
  background: var(--navy);
  border-color: var(--navy);
  color: #fff;
}

/* --- Pages transversales (par role, par geographie) ----------------------- */

/* Liste a choix unique affichee en clair (pas de <details>) : c'est le seul
   critere de la page, elle peut occuper la hauteur de la colonne. */
.ras-panel__list--tall{ max-height: min(52vh, 460px); }

.ras-jump{
  margin: 0;
  display: flex;
  flex-wrap: wrap;
  gap: 6px 14px;
  font-size: 13px;
  font-weight: 700;
}
.ras-jump em,
.ras-section__title em{
  font-style: normal;
  font-weight: 400;
  color: var(--muted);
}
.ras-section{ margin-top: 26px; scroll-margin-top: 96px; }
.ras-section:first-of-type{ margin-top: 8px; }
.ras-section__title{
  margin: 0 0 12px;
  font-family: Georgia, "Times New Roman", serif;
  font-size: 22px;
  color: var(--navy);
}
.ras-section__title em{ font-size: 15px; }

/* --- Adaptatif ----------------------------------------------------------- */

@media (max-width: 980px){
  .ras__layout{ grid-template-columns: 1fr; }
  .ras-filters{
    position: static;
    max-height: none;
    overflow: visible;
    padding: 12px;
  }
  .ras-filters__mobile-bar{ display: block; }
  /* Les criteres sont replies par defaut en mobile ; le bouton les deploie.
     Sans JS la classe `is-open` n'arrive jamais : la regle suivante ne
     s'applique donc que si le bouton est reellement operant. */
  .js .ras-filters:not(.is-open) .ras-filters__body{ display: none; }
}

@media (max-width: 560px){
  .ras-grid{ grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); }
  .ras-results__bar{ align-items: flex-start; }
}
