/*==================================
  =          SWISSNORTON           =
  ==================================
	
  Créé le : 03.01.2026
  Mis à jour le : 10.02.2026
  Par : Rui Dos Santos

  page : ./assets/css/equipe.css
==================================*/

.page-equipe {
  	max-width: var(--container-width);
	margin: var(--margin-top) auto;
	padding: var(--spacing-xxs) var(--spacing-xl);
	line-height: var(--line-height-normal);
}

/* Header de page */
.page-header {
    text-align: center;
    margin-bottom: 1.5rem;
}

.page-header h1 {
    text-align: left;
	margin: 0 0 var(--spacing-sm) 0;
    font-size: var(--font-size-4xl);
    color: var(--primary-red);
	text-shadow: var(--shadow-soft);
}

.page-header p {
    font-size: var(--font-size-lg);
    color: var(--text-dark-gray);
    margin: 0 0 var(--spacing-xl) 0;
}

/* ========================================
   GRILLE DE L'EQUIPE
======================================== */
.equipe-section {
    min-height: 200px;
}

/* Empty state */
.empty-state {
    text-align: center;
    padding: 3rem 1rem;
    color: #6c757d;
}

.empty-state svg {
    margin-bottom: 1rem;
    opacity: 0.5;
}

.empty-state h3 {
    font-size: 1.2rem;
    font-weight: 500;
    margin: 0;
}

.equipe-grid {
	display: grid;
    grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
    gap: var(--spacing-lg, 1.5rem);
    margin-bottom: var(--spacing-xl, 2rem);
}

/* Carte membre */
.equipe-card {
	background: var(--bg-white);
    border: 2px solid var(--border-light);
    border-radius: var(--radius-lg, 12px);
    overflow: hidden;
    transition: var(--transition-standard);
    box-shadow: var(--shadow-sm);
    display: flex;
    flex-direction: column;
}

.equipe-card:hover {
	transform: scale(1.05);
    box-shadow: var(--shadow-lg);
    border-color: rgba(220, 53, 69, 0.3);
}

/* Image (maintenant un bouton) */
.equipe-image {
    position: relative;
    width: 100%;
    height: 200px;
    overflow: hidden;
    background-color: #f0f0f0;
    border: none;
    padding: 0;
    cursor: pointer;
    transition: opacity 0.3s ease;
}

.equipe-image:hover {
    opacity: 0.9;
}

.equipe-image:focus-visible {
    outline: 3px solid var(--accent-red);
    outline-offset: -3px;
}

.equipe-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

/* Contenu */
.equipe-content {
    padding: 1rem;
    display: flex;
    flex-direction: column;
    flex: 1;
}

.equipe-header {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

/* Badge */
.equipe-badge {
    display: inline-block;
    background-color: var(--primary-red);
    color: var(--text-light);
    padding: 0.3rem 0.75rem;
    border-radius: 4px;
    border: none;
    font-size: 0.85rem;
    font-weight: 600;
    cursor: pointer;
    transition: var(--transition-standard);
    text-align: left;
    font-family: inherit;
}

.equipe-badge:hover {
    background-color: var(--accent-red);
    transform: scale(1.02);
}

.equipe-badge:focus-visible {
    outline: 2px solid var(--accent-red);
    outline-offset: 2px;
}

.equipe-header h3 {
    font-size: 1rem;
    color: var(--text-dark);
    margin: 0;
    font-weight: 500;
}

/* ========================================
   MODAL INFOS
======================================== */
.modal-overlay {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.7);
    z-index: 1100;
    align-items: center;
    justify-content: center;
    padding: 20px;
}

.modal-overlay.active {
    display: flex;
}

.modal-content {
    background: white;
    border-radius: 12px;
    max-width: 900px;
    width: 100%;
    max-height: 90vh;
    overflow-y: auto;
    position: relative;
    animation: modalSlideIn 0.3s ease;
    box-shadow: 0 10px 40px rgba(0,0,0,0.3);
}

@keyframes modalSlideIn {
    from {
        opacity: 0;
        transform: translateY(-20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.modal-header {
    position: relative;
    padding: 0;
}

.modal-header img {
    width: 100%;
    height: 350px;
    object-fit: cover;
    border-radius: 12px 12px 0 0;
    display: block;
}

.modal-close {
    position: absolute;
    top: 15px;
    right: 15px;
    background: rgba(0, 0, 0, 0.7);
    color: white;
    border: none;
    border-radius: 50%;
    width: 40px;
    height: 40px;
    font-size: 24px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background 0.2s;
    font-family: Arial, sans-serif;
}

.modal-close:hover {
    background: rgba(0, 0, 0, 0.9);
}

.modal-close:focus-visible {
    outline: 2px solid white;
    outline-offset: 2px;
}

.modal-body {
    padding: 2rem;
}

.modal-title {
    font-size: 1.5rem;
    margin-bottom: 1rem;
    color: var(--text-dark);
    font-weight: 700;
}

.modal-description {
    line-height: 1.7;
    color: #495057;
    margin-bottom: 1.5rem;
}

.modal-description p {
    margin: 0 0 1rem 0;
}

.modal-description p:last-child {
    margin-bottom: 0;
}

/* =====================================
   RESPONSIVE - max-width: 1024px
===================================== */
@media screen and (max-width: 1024px) {
    .page-equipe {
        margin: calc(var(--header-height) - 40px) auto;
        padding: 0.875rem;
    }

    .page-header h1 {
        font-size: var(--font-size-xl);
    }

    /* Grille équipe - 2 colonnes */
    .equipe-grid {
        grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
        gap: var(--spacing-md, 1.25rem);
    }

    .equipe-image {
        height: 180px;
    }

    /* Modal */
    .modal-content {
        max-width: 800px;
    }

    .modal-header img {
        height: 300px;
    }

    .modal-body {
        padding: 1.5rem;
    }

    .modal-title {
        font-size: 1.35rem;
    }
}

/* =====================================
   RESPONSIVE - max-width: 768px
===================================== */
@media screen and (max-width: 768px) {
    .page-equipe {
        margin: calc(var(--header-height) - 30px) auto;
        padding: 0.75rem;
    }

    .page-header {
        margin-bottom: 0.75em;
    }

    .page-header h1 {
        font-size: var(--font-size-lg);
    }

    /* Grille équipe - colonnes adaptatives */
    .equipe-grid {
        grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
        gap: var(--spacing-sm, 1rem);
        margin-bottom: var(--spacing-lg, 1.5rem);
    }

    /* Carte membre */
    .equipe-card:hover {
        transform: scale(1.02);
    }

    .equipe-image {
        height: 160px;
    }

    .equipe-content {
        padding: 0.875rem;
    }

    .equipe-header {
        gap: 0.4rem;
    }

    .equipe-badge {
        font-size: 0.8rem;
        padding: 0.25rem 0.65rem;
    }

    .equipe-header h3 {
        font-size: 0.95rem;
    }

    /* Modal */
    .modal-overlay {
        padding: 15px;
    }

    .modal-content {
        max-width: 700px;
        max-height: 85vh;
    }

    .modal-header img {
        height: 250px;
    }

    .modal-close {
        width: 36px;
        height: 36px;
        font-size: 22px;
        top: 12px;
        right: 12px;
    }

    .modal-body {
        padding: 1.25rem;
    }

    .modal-title {
        font-size: 1.25rem;
        margin-bottom: 0.875rem;
    }

    .modal-description {
        font-size: 0.95rem;
        line-height: 1.6;
    }

    /* Empty state */
    .empty-state {
        padding: 2.5rem 1rem;
    }

    .empty-state h3 {
        font-size: 1.1rem;
    }
}

/* =====================================
   RESPONSIVE - max-width: 480px
===================================== */
@media screen and (max-width: 480px) {
    .page-equipe {
        margin: calc(var(--header-height) - 20px) auto;
        padding: 0.5rem;
    }

    .page-header {
        margin-bottom: 0.5em;
    }

    .page-header h1 {
        font-size: var(--font-size-md);
    }

    /* Grille équipe - 1 colonne */
    .equipe-grid {
        grid-template-columns: 1fr;
        gap: var(--spacing-xs, 0.75rem);
        margin-bottom: var(--spacing-md, 1rem);
    }

    /* Carte membre */
    .equipe-card {
        border-radius: var(--radius-md, 8px);
    }

    .equipe-card:hover {
        transform: scale(1.01);
    }

    .equipe-image {
        height: 200px;
    }

    .equipe-content {
        padding: 0.75rem;
    }

    .equipe-header {
        gap: 0.35rem;
    }

    .equipe-badge {
        font-size: 0.75rem;
        padding: 0.25rem 0.6rem;
        align-self: flex-start;
    }

    .equipe-header h3 {
        font-size: 0.9rem;
    }

    /* Modal */
    .modal-overlay {
        padding: 10px;
        align-items: flex-start;
        padding-top: 20px;
    }

    .modal-content {
        max-height: calc(100vh - 40px);
        border-radius: 8px;
    }

    .modal-header img {
        height: 200px;
        border-radius: 8px 8px 0 0;
    }

    .modal-close {
        width: 32px;
        height: 32px;
        font-size: 20px;
        top: 10px;
        right: 10px;
    }

    .modal-body {
        padding: 1rem;
    }

    .modal-title {
        font-size: 1.1rem;
        margin-bottom: 0.75rem;
    }

    .modal-description {
        font-size: 0.9rem;
        line-height: 1.5;
        margin-bottom: 1rem;
    }

    .modal-description p {
        margin: 0 0 0.75rem 0;
    }

    /* Empty state */
    .empty-state {
        padding: 2rem 0.5rem;
    }

    .empty-state svg {
        width: 48px;
        height: 48px;
    }

    .empty-state h3 {
        font-size: 1rem;
    }

    /* Animation modal plus douce sur mobile */
    @keyframes modalSlideIn {
        from {
            opacity: 0;
            transform: translateY(-10px);
        }
        to {
            opacity: 1;
            transform: translateY(0);
        }
    }
}

/* =====================================
   RESPONSIVE - max-width: 360px
===================================== */
@media screen and (max-width: 360px) {
    .page-equipe {
        margin: calc(var(--header-height) - 15px) auto;
        padding: 0.375rem;
    }

    .page-header h1 {
        font-size: var(--font-size-sm);
    }

    .equipe-grid {
        gap: var(--spacing-xs, 0.5rem);
    }

    .equipe-image {
        height: 180px;
    }

    .equipe-content {
        padding: 0.625rem;
    }

    .equipe-badge {
        font-size: 0.7rem;
        padding: 0.2rem 0.5rem;
    }

    .equipe-header h3 {
        font-size: 0.85rem;
    }

    .modal-header img {
        height: 160px;
    }

    .modal-body {
        padding: 0.875rem;
    }

    .modal-title {
        font-size: 1rem;
    }

    .modal-description {
        font-size: 0.85rem;
    }
}

/* =====================================
   ORIENTATION PAYSAGE MOBILE
===================================== */
@media screen and (max-height: 500px) and (orientation: landscape) {
    .page-equipe {
        margin: var(--spacing-md, 1rem) auto;
    }

    /* Grille en 2 colonnes en paysage */
    .equipe-grid {
        grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
    }

    .equipe-image {
        height: 140px;
    }

    /* Modal adapté pour paysage */
    .modal-overlay {
        padding: 10px;
    }

    .modal-content {
        max-height: calc(100vh - 20px);
        display: flex;
        flex-direction: row;
    }

    .modal-header {
        flex: 0 0 40%;
        height: 100%;
    }

    .modal-header img {
        width: 100%;
        height: 100%;
        border-radius: 12px 0 0 12px;
    }

    .modal-close {
        top: 10px;
        right: 10px;
    }

    .modal-body {
        flex: 1;
        padding: 1rem;
        overflow-y: auto;
    }

    .modal-title {
        font-size: 1.1rem;
    }

    .modal-description {
        font-size: 0.9rem;
    }
}

/* =====================================
   AMÉLIORATION TOUCH/MOBILE
===================================== */
@media (hover: none) and (pointer: coarse) {
    /* Désactivation du hover sur tactile */
    .equipe-card:hover {
        transform: none;
    }

    /* Zone tactile augmentée pour les boutons */
    .equipe-image {
        min-height: 44px;
    }

    .equipe-badge {
        min-height: 32px;
        padding: 0.4rem 0.75rem;
    }

    .modal-close {
        min-width: 44px;
        min-height: 44px;
    }

    /* Meilleur espacement pour le touch */
    .equipe-header {
        gap: 0.625rem;
    }
}

/* =====================================
   HAUTE RÉSOLUTION / RETINA
===================================== */
@media (-webkit-min-device-pixel-ratio: 2), (min-resolution: 192dpi) {
    .equipe-image img {
        image-rendering: -webkit-optimize-contrast;
        image-rendering: crisp-edges;
    }

    .modal-header img {
        image-rendering: -webkit-optimize-contrast;
        image-rendering: crisp-edges;
    }
}

/* =====================================
   PRÉFÉRENCE MOUVEMENT RÉDUIT
===================================== */
@media (prefers-reduced-motion: reduce) {
    .equipe-card {
        transition: none;
    }

    .equipe-card:hover {
        transform: none;
    }

    .equipe-image,
    .equipe-badge {
        transition: none;
    }

    .equipe-badge:hover {
        transform: none;
    }

    .modal-content {
        animation: none;
    }

    @keyframes modalSlideIn {
        from {
            opacity: 1;
        }
        to {
            opacity: 1;
        }
    }
}

/* =====================================
   OPTIMISATIONS PRINT
===================================== */
@media print {
    .page-equipe {
        margin: 0;
    }

    .equipe-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 1rem;
    }

    .equipe-card {
        page-break-inside: avoid;
        box-shadow: none;
        border: 1px solid #ddd;
    }

    .equipe-card:hover {
        transform: none;
        box-shadow: none;
    }

    .equipe-image,
    .equipe-badge {
        cursor: default;
    }

    .modal-overlay {
        display: none !important;
    }

    @media (max-width: 768px) {
        .equipe-grid {
            grid-template-columns: 1fr;
        }
    }
}

/* =====================================
   ACCESSIBILITÉ - FOCUS VISIBLE
===================================== */
@media (prefers-reduced-motion: no-preference) {
    .equipe-badge:focus-visible,
    .equipe-image:focus-visible {
        transition: outline 0.2s ease;
    }
}

/* =====================================
   MODAL RESPONSIVE AVANCÉ
===================================== */
/* Tablette en portrait - modal centré */
@media screen and (min-width: 481px) and (max-width: 768px) and (orientation: portrait) {
    .modal-content {
        margin: auto;
    }

    .modal-header img {
        height: 280px;
    }
}

/* Gestion du scroll dans le modal sur petits écrans */
@media screen and (max-width: 480px) {
    .modal-content {
        overflow-y: auto;
        -webkit-overflow-scrolling: touch;
    }

    .modal-body {
        padding-bottom: 1.5rem;
    }
}