/* ==========================================================================
   Page "Nos Artistes" — L'Adresse des Maitres
   Charte : Or Vieilli #8B7500 / Noir Profond Bleute #141419 / Creme #FAF7ED
   ========================================================================== */

#adm-artistes-az,
#adm-artistes-grid {
  font-family: Georgia, 'Times New Roman', serif;
  box-sizing: border-box;
}

#adm-artistes-az *,
#adm-artistes-grid *,
#adm-artistes-grid *::before,
#adm-artistes-grid *::after {
  box-sizing: border-box;
}

/* ---- Barre de navigation A-Z ---- */
#adm-artistes-az {
  position: sticky;
  top: 0;
  z-index: 50;
  display: flex;
  flex-wrap: nowrap;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  gap: 4px;
  align-items: center;
  background: #FAF7ED;
  border-bottom: 1px solid rgba(139, 117, 0, 0.25);
  padding: 12px 16px;
  margin: 0 0 32px;
  scrollbar-width: thin;
}

#adm-artistes-az::-webkit-scrollbar {
  height: 4px;
}

#adm-artistes-az::-webkit-scrollbar-thumb {
  background: rgba(139, 117, 0, 0.4);
  border-radius: 4px;
}

.adm-artistes-az-link {
  flex: 0 0 auto;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 28px;
  height: 28px;
  padding: 0 6px;
  color: #141419;
  text-decoration: none;
  font-size: 14px;
  font-weight: 600;
  letter-spacing: 0.02em;
  border-radius: 6px;
  transition: background-color 0.2s ease, color 0.2s ease;
}

.adm-artistes-az-link:hover,
.adm-artistes-az-link:focus {
  background: #8B7500;
  color: #FAF7ED;
  outline: none;
}

.adm-artistes-az-link:active {
  background: #6e5c00;
  color: #FAF7ED;
}

/* ---- Message d'etat (erreur / vide) ---- */
.adm-artistes-message {
  text-align: center;
  color: #141419;
  font-style: italic;
  font-size: 15px;
  opacity: 0.75;
  padding: 48px 16px;
  grid-column: 1 / -1;
}

/* ---- Grille : 4 visuels par ligne en continu (pas de rupture par lettre) ---- */
#adm-artistes-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 32px 24px;
  padding: 0 16px 48px;
  max-width: 1400px;
  margin: 0 auto;
}

/* ---- Carte artiste ---- */
.adm-artiste-card {
  display: flex;
  flex-direction: column;
  background: #FAF7ED;
  border-radius: 10px;
  overflow: hidden;
  box-shadow: 0 4px 16px rgba(20, 20, 25, 0.08);
  transition: box-shadow 0.25s ease, transform 0.25s ease;
  scroll-margin-top: 64px;
}

.adm-artiste-card:hover {
  box-shadow: 0 10px 28px rgba(20, 20, 25, 0.16);
  transform: translateY(-2px);
}

.adm-artiste-card-img-wrap {
  position: relative;
  width: 100%;
  padding-top: 100%; /* carre */
  overflow: hidden;
  background: #141419;
}

.adm-artiste-card-img-wrap img {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.adm-artiste-card-info {
  display: flex;
  flex-direction: column;
  flex: 1;
  padding: 18px 20px 20px;
}

.adm-artiste-card-nom {
  margin: 0 0 8px;
  font-size: 18px;
  font-weight: 700;
  color: #141419;
  line-height: 1.3;
  /* Hauteur fixe (2 lignes) : certains noms sont longs et passent sur 2
     lignes, d'autres sur 1 seule — sans cette contrainte "Decouvrir ses
     oeuvres" ne serait pas a la meme hauteur sur toutes les cartes. */
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  min-height: calc(1.3em * 2);
}

.adm-artiste-card-bio {
  margin: 0 0 16px;
  font-size: 14px;
  line-height: 1.6;
  color: #141419;
  opacity: 0.85;
  /* Hauteur fixe (4 lignes) pour que "Decouvrir ses oeuvres" s'aligne
     a la meme position sur toutes les cartes, quelle que soit la longueur
     de la bio ou le nombre de liens optionnels en dessous. */
  display: -webkit-box;
  -webkit-line-clamp: 4;
  -webkit-box-orient: vertical;
  overflow: hidden;
  min-height: calc(1.6em * 4);
}

.adm-artiste-card-actions {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  flex: 1;
  gap: 10px;
  margin-top: 16px;
}

.adm-artiste-card-lien {
  align-self: flex-start;
  color: #8B7500;
  font-size: 13px;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  text-decoration: none;
  border-bottom: 1px solid transparent;
  transition: border-color 0.2s ease, color 0.2s ease;
}

.adm-artiste-card-lien:hover,
.adm-artiste-card-lien:focus {
  border-color: #8B7500;
  color: #6e5c00;
}

.adm-artiste-card-lien-secondaire {
  font-size: 12px;
  font-weight: 500;
  letter-spacing: 0.04em;
  text-transform: none;
  opacity: 0.8;
}

/* ---- Presentation Artiste (Version noire / blanche) ---- */
.adm-artiste-card-presentations {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.adm-artiste-card-presentations-titre {
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: #141419;
  opacity: 0.55;
}

.adm-artiste-card-presentations .adm-artiste-card-lien-secondaire {
  align-self: flex-start;
}

/* ---- Catalogues telechargeables ---- */
.adm-artiste-card-catalogues {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

/* Un groupe = une collection (Noir + Blanc ensemble, jamais separes).
   Le filet ne separe que deux groupes/collections differents. */
.adm-artiste-card-groupe-produit {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.adm-artiste-card-groupe-produit:not(:first-child) {
  border-top: 1px solid rgba(139, 117, 0, 0.3);
  margin-top: 8px;
  padding-top: 8px;
}

/* Filet or seulement entre Presentation et Catalogues (pas entre Noir/Blanc) */
.adm-artiste-card-presentations + .adm-artiste-card-catalogues {
  border-top: 1px solid rgba(139, 117, 0, 0.3);
  padding-top: 10px;
}

.adm-artiste-card-lien-catalogue {
  font-family: Georgia, 'Times New Roman', serif;
  font-size: 12px;
  color: #141419;
  opacity: 0.7;
  text-decoration: none;
  border-bottom: 1px solid transparent;
  transition: border-color 0.2s ease, opacity 0.2s ease;
}

.adm-artiste-card-lien-catalogue:hover,
.adm-artiste-card-lien-catalogue:focus {
  opacity: 1;
  border-color: #8B7500;
}

/* ---- Bouton Partager ---- */
.adm-artiste-card-partage {
  font-family: Georgia, 'Times New Roman', serif;
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: #8B7500;
  background: transparent;
  border: 1px solid rgba(139, 117, 0, 0.5);
  border-radius: 20px;
  padding: 6px 16px;
  cursor: pointer;
  transition: background-color 0.2s ease, color 0.2s ease;
  /* Toujours en bas de carte, quel que soit le nombre de liens optionnels
     (presentation/catalogues) au-dessus */
  margin-top: auto;
}

.adm-artiste-card-partage:hover,
.adm-artiste-card-partage:focus {
  background: #8B7500;
  color: #FAF7ED;
  outline: none;
}

/* ---- Responsive ---- */
@media (max-width: 900px) {
  #adm-artistes-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 24px 16px;
  }
}

@media (max-width: 560px) {
  #adm-artistes-grid {
    grid-template-columns: 1fr;
    gap: 20px;
    padding: 0 12px 32px;
  }

  #adm-artistes-az {
    padding: 10px 12px;
    margin-bottom: 24px;
  }
}
