/* Importation de la police Montserrat */
@import url('https://fonts.googleapis.com/css2?family=Montserrat:wght@400;600;700&display=swap');

:root {
    --tmg-bg-color: #ffffff;
    --tmg-card-radius: 0px; /* Cartes aux angles vifs */
    --tmg-text-primary: #1e293b;
    /* Nouvelle couleur principale */
    --tmg-accent-color: #1D2B6A; 
    --tmg-font-family: 'Montserrat', sans-serif;
    --tmg-shadow-color: rgba(0, 0, 0, 0.05);
}

.tmg-team-container {
    display: grid;
    grid-template-columns: repeat(var(--tmg-user-cols, 3), 1fr);
    gap: 2rem;
    font-family: var(--tmg-font-family);
    padding: 1rem 0;
}

/* --- Carte Membre --- */
.tmg-member-card {
    background: var(--tmg-bg-color);
    border-radius: var(--tmg-card-radius);
    overflow: hidden;
    position: relative;
    border: none;
    box-shadow: 0 4px 15px var(--tmg-shadow-color);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.tmg-member-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 25px rgba(29, 43, 106, 0.15); /* Ombre à la couleur d'accent */
}

/* --- Image : Forcer Carré et Aigu --- */
.tmg-img-wrapper {
    position: relative;
    width: 100%;
    /* Ratio 1:1 pour forcer le carré */
    aspect-ratio: 1 / 1; 
    overflow: hidden;
    background: #f1f5f9;
}

.tmg-member-img {
    width: 100%;
    height: 100%;
    object-fit: cover; /* Remplit le carré sans déformer */
    display: block;
    border: none !important; /* Force la suppression de bordure */
    border-radius: 0 !important; /* Force les angles vifs */
    margin: 0;
    padding: 0;
    transition: transform 0.4s ease;
}

.tmg-member-card:hover .tmg-member-img {
    transform: scale(1.05);
}

/* --- Informations --- */
.tmg-member-info {
    padding: 1.5rem;
    text-align: center;
}

.tmg-member-name {
    margin: 0;
    font-size: 1.2rem;
    font-weight: 700;
    color: var(--tmg-text-primary);
    line-height: 1.2;
}

.tmg-member-role {
    margin: 0;
    padding-top: 4px;
    font-size: 0.85rem;
    color: var(--tmg-accent-color); /* Couleur #1D2B6A */
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

/* --- Liens Réseaux Sociaux (Bas) --- */
.tmg-social-links {
    display: flex;
    justify-content: center;
    gap: 10px;
    margin-top: 15px;
}

.tmg-social-icon {
    width: 34px;
    height: 34px;
    background: #f1f5f9;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #475569;
    transition: all 0.3s ease;
    text-decoration: none;
}

.tmg-social-icon svg {
    width: 17px;
    height: 17px;
    fill: currentColor;
}

.tmg-social-icon:hover {
    background: var(--tmg-accent-color); /* Fond #1D2B6A au hover */
    color: #fff;
    transform: translateY(-2px);
}

/* --- NOUVEAU Widget Partage Flottant --- */
.tmg-share-widget {
    position: absolute;
    bottom: 15px; /* Positionné sur l'image en bas à droite */
    right: 15px;
    z-index: 10;
    display: flex;
    align-items: center;
    gap: 10px;
}

/* Les icônes FB/IN (cachées par défaut) */
.tmg-share-options {
    display: flex;
    gap: 8px;
    opacity: 0;
    visibility: hidden;
    transform: translateX(20px);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

/* Icône de partage principale */
.tmg-share-trigger {
    width: 36px;
    height: 36px;
    background: rgba(255, 255, 255, 0.9);
    color: var(--tmg-accent-color);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    box-shadow: 0 2px 8px rgba(0,0,0,0.15);
    transition: all 0.3s ease;
}

.tmg-share-trigger svg {
    width: 18px;
    height: 18px;
    stroke: currentColor;
}

/* Boutons popup FB/IN */
.tmg-share-popup-btn {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    background: #ffffff;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 2px 8px rgba(0,0,0,0.15);
    transition: transform 0.2s ease, background 0.2s ease;
    text-decoration: none;
}

.tmg-share-popup-btn svg {
    width: 16px;
    height: 16px;
    fill: #475569;
}

/* HOVER STATE : Déclenchement de l'animation */
.tmg-share-widget:hover .tmg-share-options {
    opacity: 1;
    visibility: visible;
    transform: translateX(0);
}

.tmg-share-widget:hover .tmg-share-trigger {
    background: var(--tmg-accent-color);
    color: #fff;
    transform: rotate(-30px);
}

/* Hover spécifique des boutons popup */
.tmg-share-popup-btn:hover {
    transform: scale(1.1);
}

.tmg-share-popup-btn.fb:hover { background: #1877F2; }
.tmg-share-popup-btn.fb:hover svg { fill: #fff; }

.tmg-share-popup-btn.in:hover { background: #0A66C2; }
.tmg-share-popup-btn.in:hover svg { fill: #fff; }

/* Mobile adaptation */
@media (max-width: 768px) {
    .tmg-team-container {
        grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
        gap: 1.5rem;
    }
}

