/* =====================================================
   Grille Membres — grille-membres.css
   ===================================================== */

/* --- Grille responsive --- */
.gm-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 24px;
    width: 100%;
    box-sizing: border-box;
}

@media (max-width: 1024px) {
    .gm-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 600px) {
    .gm-grid {
        grid-template-columns: 1fr;
    }
}

/* --- Card --- */
.gm-card {
    position: relative;
    min-height: 400px;
    border-radius: 15px;
    overflow: hidden;
    background-color: #1a1a1a; /* fallback si pas de photo */
    background-size: cover;
    background-position: center top;
    background-repeat: no-repeat;
    display: flex;
    flex-direction: column;
    justify-content: flex-end;
    box-shadow: 0 4px 24px rgba(0, 0, 0, 0.18);
    transition: transform 0.25s ease, box-shadow 0.25s ease;
}

/* Dégradé noir de bas en haut : opaque en bas, transparent en haut */
.gm-overlay {
    position: absolute;
    inset: 0;
    background: linear-gradient(
        to top,
        rgba(0, 0, 0, 0.82) 0%,
        rgba(0, 0, 0, 0.45) 45%,
        rgba(0, 0, 0, 0.00) 100%
    );
    border-radius: inherit;
    pointer-events: none;
}

/* --- Contenu texte --- */
.gm-content {
    position: relative;
    z-index: 2;
    padding: 30px;
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    gap: 8px;
}

.gm-name {
    margin: 0;
    font-size: 1.35rem;
    font-weight: 700;
    color: #ffffff;
    line-height: 1.25;
    letter-spacing: 0.01em;
}

.gm-description {
    margin: 0;
    font-size: 0.92rem;
    color: rgba(255, 255, 255, 0.88);
    line-height: 1.55;
}

/* --- Icônes sociales --- */
.gm-social {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 14px;
    margin-top: 10px;
}

.gm-social-link {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    color: #ffffff;
    text-decoration: none;
    transition: opacity 0.2s ease, transform 0.2s ease;
    line-height: 1;
}

.gm-social-link:hover,
.gm-social-link:focus-visible {
    opacity: 0.72;
    transform: scale(1.12);
    outline: none;
}

.gm-social-link svg {
    display: block;
}

/* --- État vide --- */
.gm-empty {
    text-align: center;
    color: #888;
    font-style: italic;
}

/* =====================================================
   Carrousel Membres
   ===================================================== */

.gm-carousel-wrapper {
    position: relative;
    width: 100%;
    box-sizing: border-box;
    user-select: none;
}

/* Viewport : masque le débordement */
.gm-carousel-viewport {
    overflow: hidden;
    border-radius: 15px;
    /* légère marge pour que les flèches ne chevauchent pas les cards */
    margin: 0 52px;
}

.gm-carousel-track {
    display: flex;
    gap: 24px;
    transition: transform 0.45s cubic-bezier(0.25, 0.46, 0.45, 0.94);
    will-change: transform;
}

/* --- Slides --- */
.gm-carousel-slide {
    flex: 0 0 calc((100% - 2 * 24px) / 3); /* 3 colonnes, 2 gaps */
    min-width: 0;
}

@media (max-width: 1024px) {
    .gm-carousel-slide {
        flex: 0 0 calc((100% - 24px) / 2); /* 2 colonnes, 1 gap */
    }
}

@media (max-width: 600px) {
    .gm-carousel-slide {
        flex: 0 0 100%; /* 1 colonne */
    }
    .gm-carousel-viewport {
        margin: 0 42px;
    }
}

/* Les cards dans le carrousel occupent toute la hauteur du slide */
.gm-carousel-slide .gm-card {
    height: 100%;
}

/* --- Flèches --- */
.gm-carousel-arrow {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    z-index: 10;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    border: none;
    background: rgba(255, 255, 255, 0.92);
    color: #222;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.18);
    transition: background 0.2s ease, opacity 0.2s ease, transform 0.2s ease;
    padding: 0;
}

.gm-carousel-arrow:hover {
    background: #fff;
    transform: translateY(-50%) scale(1.08);
}

.gm-carousel-arrow:disabled {
    opacity: 0.3;
    cursor: default;
    transform: translateY(-50%) scale(1);
}

.gm-carousel-prev { left: 0; }
.gm-carousel-next { right: 0; }

/* --- Dots --- */
.gm-carousel-dots {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 8px;
    margin-top: 20px;
}

.gm-carousel-dot {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    border: none;
    background: rgba(0, 0, 0, 0.2);
    cursor: pointer;
    padding: 0;
    transition: background 0.25s ease, transform 0.25s ease;
    flex-shrink: 0;
}

.gm-carousel-dot:hover {
    background: rgba(0, 0, 0, 0.45);
}

.gm-carousel-dot.gm-dot-active {
    background: #222;
    transform: scale(1.3);
}
