/* ===========================
   PAGE ÉQUIPE - STYLES AVEC FLIP CARDS 3D
=========================== */

/* ===========================
   SECTION ÉQUIPE
=========================== */

.team-section {
    padding: 60px 0 120px;
    background: #fff;
    perspective: 1000px;
}

.team-container {
    max-width: 1320px;
    margin: 0 auto;
    padding: 0 20px;
}

/* En-tête de la section */

.team-header {
    text-align: center;
    margin-bottom: 80px;
}

.team-label {
    display: inline-block;
    font-size: 13px;
    font-weight: 600;
    letter-spacing: 2px;
    text-transform: uppercase;
    color: #C8102E;
    margin-bottom: 20px;
}

.team-title {
    font-family: "Montserrat", Arial, sans-serif;
    font-size: clamp(2rem, 5.1vw, 4.5rem);
    font-weight: 400;
    line-height: 1.1;
    color: #111;
    margin-bottom: 20px;
}

.team-title .highlight-red {
    color: #C8102E;
    font-weight: 600;
}

.team-description {
    font-family: "Montserrat", Arial, sans-serif;
    font-size: clamp(16px, 2vw, 18px);
    line-height: 1.6;
    color: #555;
    max-width: 700px;
    margin: 0 auto;
}

/* ===========================
   ONGLETS DE FILTRAGE
=========================== */

.team-tabs {
    display: flex;
    justify-content: flex-start;
    gap: 30px;
    margin-bottom: 80px;
    flex-wrap: nowrap;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none; /* Firefox */
    -ms-overflow-style: none; /* IE/ancien Edge */
}

.team-tabs .tab-btn {
    flex-shrink: 0;
    white-space: nowrap;
}

.team-tabs::-webkit-scrollbar {
    display: none; /* Chrome/Safari/Edge */
}

.tab-btn {
    background: none;
    border: none;
    font-family: "Montserrat", Arial, sans-serif;
    font-size: 13px;
    font-weight: 600;
    letter-spacing: 1.5px;
    text-transform: uppercase;
    color: #666;
    cursor: pointer;
    padding: 10px 4px;
    min-height: 44px;
    position: relative;
    transition: all 0.3s ease;
    -webkit-tap-highlight-color: transparent;
}

.tab-btn:focus-visible {
    outline: 2px solid #C8102E;
    outline-offset: 3px;
    border-radius: 8px;
}

.tab-btn::after {
    content: "";
    position: absolute;
    bottom: -10px;
    left: 0;
    right: 0;
    height: 3px;
    background: #C8102E;
    transform: scaleX(0);
    transition: transform 0.3s ease;
}

.tab-btn.active {
    color: #111;
}

.tab-btn.active::after {
    transform: scaleX(1);
}

.tab-btn:hover {
    color: #111;
}

.tab-btn:hover::after {
    transform: scaleX(1);
}

/* ===========================
   GRILLE D'ÉQUIPE
=========================== */

.team-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 40px;
    margin-bottom: 60px;
    justify-items: center;
}

/* ===========================
   FLIP CARDS 3D
=========================== */

.team-card {
    perspective: 1000px;
    cursor: pointer;
    width: 100%;
    max-width: 260px;
    aspect-ratio: 360 / 500; /* 0.72 — s'adapte à toute largeur d'écran */
}

/* Conteneur du flip */
.flip-card-inner {
    position: relative;
    width: 100%;
    height: 100%;
    transform-style: preserve-3d;
    -webkit-transform-style: preserve-3d;
    transition: transform 0.6s cubic-bezier(0.68, -0.55, 0.265, 1.55);
    transform: rotateY(0deg);
    backface-visibility: hidden;
    -webkit-backface-visibility: hidden;
    will-change: transform;
}

.flip-card-inner.flipped {
    transform: rotateY(180deg);
}

@media (hover: hover) and (pointer: fine) {
    .team-card:hover .flip-card-inner {
        transform: rotateY(180deg);
    }
}

.flip-card-front,
.flip-card-back {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    transform-style: preserve-3d;
    -webkit-transform-style: preserve-3d;
    backface-visibility: hidden;
    -webkit-backface-visibility: hidden;
}

/* Face image par défaut */
.flip-card-front {
    transform: rotateY(0deg);
    background: #1a1a1a;
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.2);
}

.front-content {
    text-align: center;
    color: white;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 16px;
}

.front-content {
    text-align: center;
    color: white;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 16px;
}

/* Photo circulaire en haut de la face avant */
.front-photo-circle {
    display: none;
}

.front-photo {
    display: none;
}

.team-member-name {
    font-family: "Montserrat", Arial, sans-serif;
    font-size: clamp(1.125rem, 1.7vw, 1.5rem);
    font-weight: 600;
    color: #fff;
    margin: 0;
}

.team-member-role {
    font-family: "Montserrat", Arial, sans-serif;
    font-size: 14px;
    color: #C8102E;
    text-transform: uppercase;
    letter-spacing: 1px;
    margin: 0;
}

/* Face info au survol */
.flip-card-back {
    transform: rotateY(180deg);
    background: #1a1a1a;
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    border-radius: 8px;
    overflow: hidden;
    position: relative;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.2);
}

.person-info-overlay {
    position: absolute;
    left: 0;
    right: 0;
    bottom: 0;
    padding: 16px;
    background: linear-gradient(0deg, rgba(255,255,255,0.95) 15%, rgba(255,255,255,0.7) 45%, rgba(255,255,255,0.1) 100%);
    display: flex;
    align-items: flex-end;
}

.person-info {
    width: 100%;
}

.person-name {
    font-family: "Montserrat", Arial, sans-serif;
    font-size: clamp(0.875rem, 1.3vw, 1.125rem);
    font-weight: 700;
    color: #111;
    margin: 0 0 4px;
}

.person-role {
    font-family: "Montserrat", Arial, sans-serif;
    font-size: 11px;
    font-weight: 600;
    color: #C8102E;
    text-transform: uppercase;
    letter-spacing: 0.6px;
    margin: 0 0 8px;
}

.person-description {
    font-family: "Montserrat", Arial, sans-serif;
    font-size: 11px;
    line-height: 1.4;
    color: #333;
    margin: 0;
    max-height: 66px;
    overflow: hidden;
}

.flip-photo-front {
    width: 120px;
    height: 120px;
    object-fit: cover;
    border-radius: 50%;
    border: 3px solid rgba(255,255,255,0.8);
    box-shadow: 0 10px 20px rgba(0,0,0,.25);
    display: block;
}

/* Overlay semi-transparent pour la lisibilité */
.back-overlay {
    display: none;
}

/* Photo du membre en grand format */
.member-photo-large {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 1;
    overflow: hidden;
    display: flex;
    align-items: center;
    justify-content: center;
}

.photo-image {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.back-content {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 2;
    padding: 24px 20px;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    color: white;
    overflow-y: auto;
    background: linear-gradient(to right, rgba(26, 26, 26, 0.95), rgba(26, 26, 26, 0.7), rgba(26, 26, 26, 0.3));
}

/* Photo du membre - styles anciens (conservés pour compatibilité) */
.member-photo-container {
    display: none;
}

.member-photo {
    display: none;
}

/* Réseaux sociaux */
.social-links {
    display: flex;
    gap: 12px;
    justify-content: flex-start;
}

.social-links a {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 36px;
    height: 36px;
    background: rgba(200, 16, 46, 0.2);
    border-radius: 50%;
    color: #C8102E;
    transition: all 0.3s ease;
    text-decoration: none;
    font-size: 14px;
}

.social-links a:hover {
    background: #C8102E;
    color: white;
    transform: translateY(-3px);
}

.team-btn {
    padding: 16px 32px;
    min-width: 180px;
    min-height: 52px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border: 2px solid transparent;
    border-radius: 8px;
    color: #fff;
    font-family: "Montserrat", Arial, sans-serif;
    font-size: 16px;
    font-weight: 600;
    text-align: center;
    text-decoration: none;
    transition: transform 0.3s ease, box-shadow 0.3s ease, background-color 0.3s ease;
}

.team-btn:hover {
    color: #fff;
    transform: translateY(-4px);
}

.team-btn-black {
    background-color: #010101;
    border-color: #010101;
}

.team-btn-black:hover {
    background-color: #C8102E;
    border-color: #C8102E;
}

.team-btn:focus-visible {
    outline: 2px solid #C8102E;
    outline-offset: 3px;
}

/* ===========================
   RESPONSIVE
=========================== */

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

}

@media (max-width: 768px) {
    .team-grid {
        grid-template-columns: 1fr;
        gap: 20px;
    }

    .team-section {
        padding: 40px 0 80px;
    }

    .team-header {
        margin-bottom: 60px;
    }

    .team-tabs {
        gap: 15px;
        margin-bottom: 60px;
    }

    .tab-btn {
        font-size: 12px;
    }

    .team-title {
        margin-bottom: 15px;
    }

    .person-info-overlay {
        padding: 16px;
    }

    .person-role {
        font-size: 11px;
    }

    .person-description {
        font-size: 12px;
    }
}

@media (max-width: 480px) {
    .team-section {
        padding: 30px 0 60px;
    }

    .team-header {
        margin-bottom: 40px;
    }

    .team-description {
        font-size: 14px;
    }

    .team-label {
        letter-spacing: 1px;
    }

    .team-tabs {
        gap: 10px;
        margin-bottom: 40px;
    }

    .tab-btn {
        font-size: 11px;
        padding: 8px 0;
    }

    .person-info-overlay {
        padding: 12px;
    }

    .person-role {
        font-size: 10px;
    }

    .person-description {
        font-size: 11px;
    }

    .team-btn {
        width: 100%;
        min-width: 0;
    }
}

