:root {
  --based-color: rgba(254,0,0,255);
  --yellow-color: rgba(252,185,6,255);
}

#fanfarons {
    margin: 0;
    padding: 0;
    min-height: 100vh;
    background: linear-gradient(120deg, #e53935 0%, var(--yellow-color) 100%);
    font-family: 'Quicksand', Arial, sans-serif;
    color: var(--yellow-color);
    overflow-x: hidden;
}
.titre-encadre {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 18px;
  margin: 0 0 18px 0;
}

.titre-encadre img.titre-decoration-gauche,
.titre-encadre img.titre-decoration-droite {
  width: 48px;
  height: 48px;
  margin-bottom: 40px;
  object-fit: contain;
  filter: drop-shadow(0 2px 8px #e5393530);
}


#fanfarons-header h1 {
  padding: 10px 28px;
  padding-bottom: 40px;
  font-size: 2.2rem;
  color: var(--yellow-color);
  text-shadow: 0 4px 32px #e53935cc, 0 2px 0 #000000;
  letter-spacing: 4px;
  margin: 0;
  text-align: center;
  position: relative;
  z-index: 2;
}

h1 {
    font-family: 'Montserrat', Arial, sans-serif;
    font-size: 2.5rem;
    color: var(--yellow-color);
    text-shadow: 0 4px 32px #e53935cc, 0 1px 0 var(--yellow-color);
    margin: 0 0 10px 0;
    letter-spacing: 6px;
    animation: popIn 1s cubic-bezier(.77,0,.18,1.01);
    text-transform: uppercase;
}
#titre-repertoire {
    padding: 10px 28px;
    text-align: center;
    position: relative;
    color: var(--yellow-color);
    z-index: 2;
}
h2, h3 {
    font-family: 'Montserrat', Arial, sans-serif;
    color: var(--yellow-color);
    margin: 40px 0 18px 0;
    letter-spacing: 2px;
    text-shadow: 0 2px 12px #e5393550;
}
h2 {
    font-size: 2.2rem;
    text-align: center;
}
h3 {
    font-size: 1.3rem;
    padding-left: 20px;
}
.group-section {
    margin: 12px;
    padding: 0 2vw 30px 2vw;
    background: rgba(30, 30, 30, 0.85);
    border-radius: 24px;
    box-shadow: 0 8px 32px 0 #e5393530, 0 1.5px 8px 0 #ffb30030;
    animation: fadeInUp 1.2s cubic-bezier(.77,0,.18,1.01);
    transition: max-height 0.7s cubic-bezier(.77,0,.18,1.01), opacity 0.7s cubic-bezier(.77,0,.18,1.01);
    max-height: none;
    opacity: 1;
    overflow: hidden;
}
.instrument-section {
    margin-bottom: 40px;
    animation: fadeInUp 1.2s cubic-bezier(.77,0,.18,1.01);
}
.musicien-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 24px;
    margin-top: 18px;
    margin: 12px;
}
.musicien {
    background: linear-gradient(135deg, #fff8e11a 0%, #e5393533 100%);
    border-radius: 16px;
    overflow: hidden;
    box-shadow: 0 4px 24px 0 #e5393530;
    text-align: center;
    transition: transform 0.3s, box-shadow 0.3s;
    position: relative;
    cursor: pointer;
    opacity: 0;
    transform: translateY(40px) scale(0.97);
    animation: cardAppear 0.7s forwards;
    display: flex;
    flex-direction: column;
    align-items: center;
    /* La largeur s'adapte à l'image */
    width: fit-content;
    min-width: 120px;
    max-width: 100%;
    margin: 0 auto;
}
.musicien:hover {
    transform: translateY(-8px) scale(1.04) rotate(-1deg);
    box-shadow: 0 8px 32px 0 #ffb30080, 0 1.5px 8px 0 #e5393550;
    z-index: 2;
}
.musicien img {
    display: block;
    max-width: 100%;
    max-height: 260px; /* Ajuste la hauteur max selon ton design */
    width: auto;
    height: auto;
    object-fit: contain;
    background: #222;
    border-bottom: 2px solid #ffb300;
    margin: 0 auto;
}
.musicien:hover img {
    filter: grayscale(0) brightness(1.13) drop-shadow(0 0 12px #ffd70088);
}
.musicien-info {
    padding: 14px 0 18px 0; /* 0 à gauche/droite, plus d'espace en bas */
    background: linear-gradient(90deg, #ffb30022 0%, #e5393533 100%);
    border-bottom-left-radius: 16px;
    border-bottom-right-radius: 16px;
    width: 100%;           /* Prend toute la largeur du cadre */
    box-sizing: border-box;
    margin: 0;             /* Colle bien aux bords */
    text-align: center;
}
.musicien-info .nom {
    font-family: 'Montserrat', Arial, sans-serif;
    font-weight: bold;
    font-size: 1.08em;
    margin-bottom: 2px;
    color: #fff;
    letter-spacing: 1px;
    text-shadow: 0 1px 4px #e5393530;
}
.musicien-info .surnom {
    font-style: italic;
    color: #ffb300;
    font-size: 0.95em;
    margin-bottom: 3px;
    letter-spacing: 0.5px;
    text-shadow: 0 1px 4px #e5393530;
}
.musicien-info .info {
    font-size: 0.93em;
    color: #ffe082cc;
    margin-top: 2px;
    letter-spacing: 0.5px;
}
#toggleAnciens {
    display: block;
    background: linear-gradient(90deg, #e53935 0%, #ffb300 100%);
    color: #fff;
    border: none;
    padding: 14px 38px;
    font-size: 1.3rem;
    font-family: 'Montserrat', Arial, sans-serif;
    font-weight: 700;
    cursor: pointer;
    border-radius: 40px;
    transition: all 0.5s ease-out;
    margin: 40px auto 20px auto;
    box-shadow: 0 2px 12px 0 #e5393530;
    letter-spacing: 1px;
    outline: none;
    animation: popIn 1.2s cubic-bezier(.77,0,.18,1.01);
}
#toggleAnciens:hover {
    background: linear-gradient(90deg, #fff 0%, var(--yellow-color) 100%);
    color: #e53935;
    box-shadow: 0 4px 24px 0 #ffd70055;
}
#anciens, #titreAnciens {
    overflow: hidden;
    transition: max-height 0.7s cubic-bezier(.77,0,.18,1.01), opacity 0.7s cubic-bezier(.77,0,.18,1.01);
    max-height: none;
    opacity: 1;
}
.cacher {
    max-height: 0 !important;
    opacity: 0 !important;
    pointer-events: none;
}

.musicien {
    animation-delay: calc(var(--i, 0) * 0.08s);
}
/* Responsive */
@media (max-width: 900px) {
    .musicien-grid { gap: 12px; }
    .musicien { min-width: 140px; }
    .musicien img { height: 120px; }
    .group-section { padding: 0 1vw 0px 1vw; }
    #fanfarons-header h1 {
        font-size: 2.2rem;
        padding: 10px 20px;
    }

    .titre-encadre img.titre-decoration-gauche,
    .titre-encadre img.titre-decoration-droite {
        width: 24px;
        height: 24px;
        margin-bottom: 4px;
        object-fit: contain;
        filter: drop-shadow(0 2px 8px #e5393530);
        }
    .musicien-grid {
        grid-template-columns: repeat(auto-fit, minmax(120px, 1fr));
    }

    h2 {
        font-size: 1.8rem;
    }


}
/* @media (max-width: 600px) {
    h1 { font-size: 1.3rem; }
    h2 { font-size: 1rem; }
    .musicien { min-width: 100px; }
    .musicien img { height: 80px; }
    .group-section { padding: 0 0.5vw 10px 0.5vw; }
} */

@keyframes fadeInUp {
  from { opacity: 0; transform: translateY(40px);}
  to { opacity: 1; transform: translateY(0);}
}
@keyframes popIn {
  from { opacity: 0; transform: scale(0.8);}
  to { opacity: 1; transform: scale(1);}
}
@keyframes cardAppear {
  from { opacity: 0; transform: translateY(40px) scale(0.97);}
  to { opacity: 1; transform: translateY(0) scale(1);}
}


/* Animation sur toutes les cartes, sections, blocs */
.accueil-card, .main-card, section, .presentation-container, .fansmare-title, .presentation-image, .footer-jouez, .slider, .slide, .slide-wrapper, .titre-encadre{
  opacity: 0;
  transform: translateY(40px) scale(0.97);
  animation: cardAppear 1s forwards;
}
.accueil-card:nth-child(n), .main-card:nth-child(n), section:nth-child(n), .presentation-container:nth-child(n), .fansmare-title:nth-child(n), .presentation-image:nth-child(n) {
  animation-delay: calc(var(--i, 0) * 0.08s);
}
