/**
 * CSS Team Members Manager
 * Version finale avec :
 * - Boutons navigation : fond blanc + flèche noire
 * - Cards optimisées pour 4 colonnes
 * - Hauteur automatique complète
 */

/* ========================================
   VARIABLES CSS
   ======================================== */
:root {
    --team-primary: #e91e8c;
    --team-white: #ffffff;
    --team-text-dark: #333333;
    --team-text-light: #666666;
    --team-gray-light: #f8f8f8;
    --team-gray-border: #dddddd;
    --team-transition: all 0.3s ease;
}

/* ========================================
   1. GRILLE - AFFICHAGE EN COLONNES
   ======================================== */

.team-members-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 24px;
    padding: 20px 0;
}

@media screen and (max-width: 1200px) {
    .team-members-grid {
        grid-template-columns: repeat(3, 1fr);
    }
}

@media screen and (max-width: 900px) {
    .team-members-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media screen and (max-width: 600px) {
    .team-members-grid {
        grid-template-columns: 1fr;
    }
}

/* ========================================
   2. CARTES CLIQUABLES
   ======================================== */

.team-member-card-link {
    text-decoration: none;
    color: inherit;
    display: block;
    height: 100%;
}

.team-member-card {
    background: var(--team-white);
    border-radius: 16px;
    padding: 20px;
    text-align: center;
    box-shadow: 0 2px 12px rgba(0, 0, 0, 0.08);
    transition: var(--team-transition);
    position: relative;
    overflow: hidden;
    cursor: pointer;
    height: 100%;
    display: flex;
    flex-direction: column;
}

/* Effet hover sur la carte */
.team-member-card-link:hover .team-member-card {
    transform: translateY(-8px);
    box-shadow: 0 12px 32px rgba(233, 30, 140, 0.2);
}

/* ========================================
   3. PHOTOS - FORMAT PORTRAIT
   ======================================== */

.team-member-photo {
    margin-bottom: 14px;
    overflow: hidden;
    border-radius: 12px;
    position: relative;
}

.team-member-photo img {
    width: 100%;
    height: auto;
    aspect-ratio: 3/4;
    object-fit: cover;
    border-radius: 12px;
    transition: transform 0.4s ease;
}

.team-member-card-link:hover .team-member-photo img {
    transform: scale(1.05);
}

/* Overlay subtil au hover */
.team-member-photo::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(to bottom, transparent 0%, rgba(233, 30, 140, 0.1) 100%);
    opacity: 0;
    transition: opacity 0.3s ease;
    border-radius: 12px;
}

.team-member-card-link:hover .team-member-photo::after {
    opacity: 1;
}

/* ========================================
   4. TEXTES - TITRES ET CONTENUS
   ======================================== */

.team-member-card h3 {
    margin: 10px 0 4px;
    font-size: 1.2rem;
    font-weight: 700;
    color: var(--team-text-dark);
    line-height: 1.3;
    transition: color 0.3s ease;
}

.team-member-card-link:hover .team-member-card h3 {
    color: var(--team-primary);
}

.team-job-title {
    color: var(--team-primary);
    font-weight: 600;
    margin: 0 0 10px;
    font-size: 0.9rem;
}

.team-bio-short {
    color: var(--team-text-light);
    font-size: 0.9rem;
    line-height: 1.5;
    margin: 10px 0;
    flex: 1;
}

/* ========================================
   5. BOUTON "VOIR LE PROFIL"
   ======================================== */

.team-member-view-profile {
    margin-top: auto;
    padding-top: 14px;
    color: var(--team-primary);
    font-weight: 600;
    font-size: 0.85rem;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    transition: gap 0.3s ease;
}

.team-member-card-link:hover .team-member-view-profile {
    gap: 10px;
}

.team-member-view-profile span {
    transition: transform 0.3s ease;
    display: inline-block;
}

.team-member-card-link:hover .team-member-view-profile span {
    transform: translateX(4px);
}

/* ========================================
   6. SLIDER - CONTENEUR & STRUCTURE
   ======================================== */

.team-slider {
    position: relative;
    padding: 30px 20px 60px 20px;
    margin: 0 40px;
    overflow: hidden;
}

.team-slider .swiper {
    overflow: visible;
    padding: 10px;
    margin: -10px;
}

.team-slider .swiper-wrapper {
    align-items: stretch;
}

.team-slider .swiper-slide {
    height: auto;
    display: flex;
    box-sizing: border-box;
}

.team-slider .team-member-card-link {
    width: 100%;
    display: flex;
    height: auto;
}

.team-slider .team-member-card {
    min-height: 100%;
    display: flex;
    flex-direction: column;
    width: 100%;
    margin: 0;
    animation: none;
    opacity: 1;
}

.team-slider .team-bio-short {
    flex: 1;
}

.team-slider .team-member-view-profile {
    margin-top: auto;
    padding-top: 14px;
}

/* ========================================
   7. SLIDER - NAVIGATION (BOUTONS BLANC/NOIR)
   ======================================== */

.team-slider .swiper-button-prev,
.team-slider .swiper-button-next {
    width: 50px !important;
    height: 50px !important;
    background: var(--team-white) !important;
    border-radius: 50% !important;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.15) !important;
    transition: var(--team-transition) !important;
    top: 40%;
    margin-top: 0;
}

.team-slider .swiper-button-prev:hover,
.team-slider .swiper-button-next:hover {
    background: var(--team-gray-light) !important;
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.2) !important;
    transform: scale(1.05);
}

/* Chevron NOIR */
.team-slider .swiper-button-prev::after,
.team-slider .swiper-button-next::after {
    font-size: 18px !important;
    font-weight: 700 !important;
    color: var(--team-text-dark) !important;
}

.team-slider .swiper-button-prev {
    left: -25px !important;
}

.team-slider .swiper-button-next {
    right: -25px !important;
}

.team-slider .swiper-button-disabled {
    opacity: 0.3 !important;
    cursor: not-allowed !important;
}

/* ========================================
   8. SLIDER - PAGINATION (POINTS)
   ======================================== */

.team-slider .swiper-pagination {
    bottom: 0 !important;
    position: relative !important;
    margin-top: 20px;
}

.team-slider .swiper-pagination-bullet {
    width: 10px;
    height: 10px;
    background: var(--team-gray-border);
    opacity: 1;
    transition: var(--team-transition);
    margin: 0 5px;
}

.team-slider .swiper-pagination-bullet-active {
    background: var(--team-primary);
    transform: scale(1.2);
}

/* ========================================
   9. BADGE DE TYPE
   ======================================== */

.team-type-badge {
    position: absolute;
    top: 14px;
    right: 14px;
    background: rgba(233, 30, 140, 0.9);
    color: white;
    padding: 5px 10px;
    border-radius: 20px;
    font-size: 0.75rem;
    font-weight: 600;
    z-index: 2;
}

/* ========================================
   10. RESPONSIVE
   ======================================== */

@media screen and (max-width: 1200px) {
    .team-slider {
        margin: 0 40px;
    }
    
    .team-slider .swiper-button-prev {
        left: -20px !important;
    }
    
    .team-slider .swiper-button-next {
        right: -20px !important;
    }
}

@media screen and (max-width: 768px) {
    .team-slider {
        margin: 0 20px;
    }
    
    .team-member-card {
        padding: 16px;
    }
    
    .team-member-card h3 {
        font-size: 1.1rem;
    }
    
    .team-slider .swiper-button-prev,
    .team-slider .swiper-button-next {
        width: 40px !important;
        height: 40px !important;
    }
    
    .team-slider .swiper-button-prev::after,
    .team-slider .swiper-button-next::after {
        font-size: 14px !important;
    }
    
    .team-slider .swiper-button-prev {
        left: -10px !important;
    }
    
    .team-slider .swiper-button-next {
        right: -10px !important;
    }
    
    .team-member-card-link:hover .team-member-card {
        transform: translateY(-4px);
    }
}

/* ========================================
   11. ACCESSIBILITÉ
   ======================================== */

.team-member-card-link:focus {
    outline: none;
}

.team-member-card-link:focus-visible {
    outline: 2px solid var(--team-primary);
    outline-offset: 4px;
    border-radius: 16px;
}

.team-member-card-link:focus-visible .team-member-card {
    transform: translateY(-6px);
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.15);
}

@media (prefers-reduced-motion: reduce) {
    .team-member-card,
    .team-member-photo img,
    .team-member-view-profile,
    .team-member-view-profile span {
        transition: none !important;
        animation: none !important;
    }
}

/* ========================================
   12. VARIANTE PHOTO RONDE
   ======================================== */

.team-members-grid.photo-round .team-member-photo img {
    border-radius: 50%;
    width: 180px;
    height: 180px;
    margin: 0 auto;
    aspect-ratio: 1/1;
}

.team-members-grid.photo-round .team-member-photo {
    border-radius: 50%;
}

/* ========================================
   13. DARK MODE (OPTIONNEL)
   ======================================== */

@media (prefers-color-scheme: dark) {
    .team-member-card {
        background: #1a1a1a;
        box-shadow: 0 2px 12px rgba(0, 0, 0, 0.3);
    }
    
    .team-member-card h3 {
        color: #fff;
    }
    
    .team-member-card-link:hover .team-member-card h3 {
        color: #ff6b9d;
    }
    
    .team-bio-short {
        color: #ccc;
    }
    
    .team-slider .swiper-button-prev,
    .team-slider .swiper-button-next {
        background: #333 !important;
    }
    
    .team-slider .swiper-button-prev::after,
    .team-slider .swiper-button-next::after {
        color: #fff !important;
    }
}

/* ========================================
   14. PAGE SINGLE TEAM MEMBER
   Styles pour la page de profil individuel
   ======================================== */

.tm-single-profile {
    max-width: 1200px;
    margin: 0 auto;
    padding: 40px 20px;
}

.tm-single-header {
    background: var(--team-white);
    border-radius: 16px;
    padding: 40px;
    margin-bottom: 40px;
    box-shadow: 0 2px 12px rgba(0,0,0,0.08);
}

.tm-single-header-inner {
    display: flex;
    align-items: flex-start;
    gap: 40px;
    flex-wrap: wrap;
}

.tm-single-photo {
    flex-shrink: 0;
}

.tm-single-photo img {
    width: 200px;
    height: auto;
    aspect-ratio: 3/4;
    border-radius: 12px;
    object-fit: cover;
    box-shadow: 0 4px 12px rgba(0,0,0,0.15);
}

.tm-single-info {
    flex: 1;
    min-width: 300px;
}

.tm-single-name {
    font-size: 2rem;
    font-weight: 900;
    color: var(--team-text-dark);
    margin: 0 0 8px;
    text-transform: none;
}

.tm-single-job {
    font-size: 1.3rem;
    margin: 0 0 12px;
    color: var(--team-primary);
    font-weight: 600;
}

.tm-single-speciality {
    font-size: 1.1rem;
    margin: 0 0 20px;
    color: var(--team-text-light);
}

.tm-single-types {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
    margin-bottom: 20px;
}

.tm-single-type-badge {
    background: #f0f0f0;
    color: var(--team-text-dark);
    padding: 6px 16px;
    border-radius: 20px;
    font-size: 0.9rem;
    font-weight: 600;
}

.tm-single-contact-buttons {
    display: flex;
    gap: 12px;
    flex-wrap: wrap;
    margin-top: 24px;
}

.tm-single-btn {
    background: var(--team-primary);
    color: var(--team-white) !important;
    padding: 12px 24px;
    border-radius: 8px;
    text-decoration: none !important;
    font-weight: 600;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    transition: var(--team-transition);
    border: none;
    cursor: pointer;
}

.tm-single-btn:hover {
    transform: translateY(-2px);
    opacity: 0.9;
    color: var(--team-white) !important;
}

.tm-single-btn--linkedin {
    background: #0077b5;
}

.tm-single-content {
    display: grid;
    grid-template-columns: 2fr 1fr;
    gap: 40px;
    margin-bottom: 60px;
}

.tm-single-bio {
    background: var(--team-white);
    padding: 40px;
    border-radius: 16px;
    box-shadow: 0 2px 12px rgba(0,0,0,0.08);
}

.tm-single-bio-title {
    font-size: 1.8rem;
    margin: 0 0 24px;
    color: var(--team-text-dark);
    border-bottom: 3px solid var(--team-primary);
    padding-bottom: 12px;
    display: inline-block;
}

.tm-single-bio-content {
    font-size: 1.05rem;
    line-height: 1.8;
    color: #555;
}

.tm-single-sidebar-box {
    background: #f9f9f9;
    padding: 24px;
    border-radius: 16px;
    margin-bottom: 24px;
}

.tm-single-sidebar-box--highlight {
    background: #fff3f8;
    border-left: 4px solid var(--team-primary);
}

.tm-single-sidebar-title {
    font-size: 1.2rem;
    margin: 0 0 16px;
    color: var(--team-text-dark);
}

.tm-single-sidebar-text {
    margin: 0 0 12px;
    font-size: 0.95rem;
}

.tm-single-sidebar-text:last-child {
    margin-bottom: 0;
}

.tm-single-sidebar-link {
    color: var(--team-primary);
    text-decoration: none;
}

.tm-single-sidebar-link:hover {
    text-decoration: underline;
}

.tm-single-back-btn {
    display: block;
    background: var(--team-primary);
    color: var(--team-white) !important;
    text-align: center;
    padding: 16px;
    border-radius: 12px;
    text-decoration: none !important;
    font-weight: 600;
    transition: var(--team-transition);
}

.tm-single-back-btn:hover {
    transform: translateY(-2px);
    opacity: 0.9;
    color: var(--team-white) !important;
}

/* Section membres liés */
.tm-related-section {
    margin-top: 60px;
}

.tm-related-title {
    font-size: 2rem;
    margin: 0 0 32px;
    text-align: center;
    color: var(--team-text-dark);
}

.tm-related-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 30px;
}

.tm-related-card-link {
    text-decoration: none !important;
    color: inherit;
}

.tm-related-card {
    background: var(--team-white);
    border-radius: 16px;
    padding: 24px;
    text-align: center;
    box-shadow: 0 2px 12px rgba(0,0,0,0.08);
    transition: var(--team-transition);
    cursor: pointer;
}

.tm-related-card:hover {
    transform: translateY(-8px);
    box-shadow: 0 8px 24px rgba(0,0,0,0.15);
}

.tm-related-photo {
    margin-bottom: 16px;
}

.tm-related-photo img {
    width: 100%;
    height: auto;
    aspect-ratio: 3/4;
    object-fit: cover;
    border-radius: 12px;
}

.tm-related-name {
    margin: 12px 0 4px;
    font-size: 1.2rem;
    font-weight: 700;
    color: var(--team-text-dark);
}

.tm-related-job {
    color: var(--team-primary);
    font-weight: 600;
    margin: 0;
    font-size: 0.9rem;
}

/* Responsive Single Page */
@media screen and (max-width: 768px) {
    .tm-single-header-inner {
        flex-direction: column;
        text-align: center;
    }
    
    .tm-single-content {
        grid-template-columns: 1fr;
    }
    
    .tm-single-contact-buttons {
        justify-content: center;
    }
    
    .tm-single-photo img {
        width: 150px;
        margin: 0 auto;
    }
    
    .tm-single-types {
        justify-content: center;
    }
    
    .tm-single-bio {
        padding: 24px;
    }
    
    .tm-single-header {
        padding: 24px;
    }
}
