/* ==============================================
   PAGE HISTORIQUE DES SORTIES MODERNE - GRILLE 3 COLONNES
   Créé le 25/01/2026 - Inspiré du design du Staff
=============================================== */

/* Masquer le header visuel (comme Espace Membres et Staff) */
/* Note : WordPress génère la classe avec ou sans -php selon la version */
.page-template-template-historique-sorties .header .overlay-layer,
.page-template-template-historique-sorties-php .header .overlay-layer {
    display: none !important;
    height: 0 !important;
    padding: 0 !important;
    margin: 0 !important;
}

.page-template-template-historique-sorties .intro-section,
.page-template-template-historique-sorties-php .intro-section {
    display: none !important;
}

/* Réduire l'espace du header au minimum */
.page-template-template-historique-sorties .header,
.page-template-template-historique-sorties-php .header {
    min-height: 0 !important;
    height: 0 !important;
    padding: 0 !important;
    margin: 0 !important;
}

/* Section principale historique - fond texture comme la prod */
.historique-section-modern {
    position: relative;
    padding: 40px 0 100px 0;
    background-image: url('/wp-content/uploads/2019/01/fond.jpg') !important;
    background-size: cover !important;
    background-position: center center !important;
    background-repeat: no-repeat !important;
    background-attachment: scroll !important; /* scroll = compatible tous navigateurs (comme Staff) */
    overflow: hidden;
}

/* Particules */
.historique-particles {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: 0;
}

.historique-particles .particle {
    position: absolute;
    width: 4px;
    height: 4px;
    background: rgba(241, 108, 32, 0.3);
    border-radius: 50%;
    animation: particleFloat 15s infinite ease-in-out;
}

@keyframes particleFloat {
    0%, 100% {
        transform: translateY(0) translateX(0);
        opacity: 0;
    }
    10% {
        opacity: 0.5;
    }
    50% {
        transform: translateY(-100vh) translateX(50px);
        opacity: 0.3;
    }
    90% {
        opacity: 0.5;
    }
}

.historique-overlay-modern {
    position: relative;
    z-index: 1;
}

/* Header moderne */
.historique-header-modern {
    text-align: center;
    margin-bottom: 60px;
    margin-top: 100px;
    position: relative;
}

.historique-title-modern {
    font-size: 56px;
    font-weight: 800;
    color: #ffffff;
    margin-top: 0;
    margin-bottom: 30px;
    line-height: 1.2;
    background: linear-gradient(135deg, #ffffff 0%, #f0f0f0 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

/* Ligne décorative */
.historique-line-modern {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    margin: 30px auto;
}

.historique-line-modern span {
    height: 3px;
    background: #f16c20;
    border-radius: 3px;
    animation: lineGrow 2s ease-in-out infinite;
}

.historique-line-modern span:nth-child(1) {
    width: 60px;
    animation-delay: 0s;
}

.historique-line-modern span:nth-child(2) {
    width: 100px;
    animation-delay: 0.3s;
}

.historique-line-modern span:nth-child(3) {
    width: 60px;
    animation-delay: 0.6s;
}

@keyframes lineGrow {
    0%, 100% {
        transform: scaleX(1);
        opacity: 1;
    }
    50% {
        transform: scaleX(1.2);
        opacity: 0.8;
    }
}

/* Intro de l'historique */
.historique-intro-modern {
    max-width: 800px;
    margin: 30px auto;
    font-size: 18px;
    line-height: 1.8;
    color: rgba(255, 255, 255, 0.8);
    text-align: center;
}

.historique-intro-modern strong {
    color: #f16c20;
    font-weight: 600;
}

/* ==============================================
   ONGLETS PAR ANNÉE
=============================================== */

/* Conteneur des onglets */
.historique-tabs-container {
    max-width: 1400px;
    margin: 0 auto 50px;
    padding: 0 20px;
}

.historique-tabs-wrapper {
    position: relative;
    display: flex;
    justify-content: center;
    gap: 10px;
    background: rgba(20, 20, 20, 0.6);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 16px;
    padding: 8px;
    overflow-x: auto;
    overflow-y: hidden;
    -webkit-overflow-scrolling: touch;
}

/* Masquer la scrollbar mais garder la fonctionnalité */
.historique-tabs-wrapper::-webkit-scrollbar {
    height: 0;
}

/* Bouton d'onglet */
.historique-tab {
    position: relative;
    flex: 0 0 auto;
    min-width: 100px;
    padding: 14px 28px;
    background: transparent;
    border: none;
    border-radius: 12px;
    color: rgba(255, 255, 255, 0.6);
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    z-index: 2;
    white-space: nowrap;
}

.historique-tab:hover {
    color: rgba(255, 255, 255, 0.9);
    background: rgba(255, 255, 255, 0.05);
}

.historique-tab.active {
    color: #ffffff;
}

/* Indicateur animé sous l'onglet actif */
.historique-tab-indicator {
    position: absolute;
    bottom: 8px;
    left: 8px;
    height: calc(100% - 16px);
    background: linear-gradient(135deg, #f16c20 0%, #e85d12 100%);
    border-radius: 12px;
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    z-index: 1;
    box-shadow: 0 4px 20px rgba(241, 108, 32, 0.4);
}

/* Conteneur du contenu des onglets */
.historique-content-wrapper {
    position: relative;
    min-height: 400px;
}

/* Contenu d'un onglet */
.historique-tab-content {
    opacity: 0;
    transform: translateY(20px);
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    display: none;
}

.historique-tab-content.active {
    opacity: 1;
    transform: translateY(0);
    display: block;
}

/* Info de l'année */
.historique-year-info {
    text-align: center;
    margin-bottom: 40px;
}

.historique-year-title {
    font-size: 32px;
    font-weight: 700;
    color: #ffffff;
    margin: 0 0 15px 0;
    background: linear-gradient(135deg, #ffffff 0%, #f16c20 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.historique-year-count {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    color: rgba(255, 255, 255, 0.7);
    font-size: 16px;
    font-weight: 500;
    background: rgba(241, 108, 32, 0.1);
    padding: 8px 20px;
    border-radius: 20px;
    border: 1px solid rgba(241, 108, 32, 0.3);
}

.historique-year-count svg {
    color: #f16c20;
}

/* État vide */
.historique-empty-state {
    text-align: center;
    padding: 80px 20px;
    color: rgba(255, 255, 255, 0.6);
}

.historique-empty-state svg {
    margin-bottom: 30px;
    opacity: 0.3;
}

.historique-empty-state h3 {
    font-size: 24px;
    font-weight: 700;
    color: rgba(255, 255, 255, 0.8);
    margin: 0 0 15px 0;
}

.historique-empty-state p {
    font-size: 16px;
    color: rgba(255, 255, 255, 0.5);
    margin: 0;
}

/* Grille des sorties - 3 COLONNES */
.historique-grid-modern {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 30px;
    margin: 0 auto;
    max-width: 1400px;
    padding: 0 20px;
}

/* ==============================================
   AFFICHAGE EN LISTE
=============================================== */

/* Conteneur de la liste */
.historique-list-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

/* Item de liste */
.historique-list-item {
    position: relative;
    opacity: 0;
    transform: translateY(20px);
    transition: all 0.5s cubic-bezier(0.4, 0, 0.2, 1);
    margin-bottom: 15px;
}

.historique-list-item.aos-animate {
    opacity: 1;
    transform: translateY(0);
}

.historique-list-glow {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: radial-gradient(circle at 50% 50%, rgba(241, 108, 32, 0.1) 0%, transparent 70%);
    border-radius: 12px;
    opacity: 0;
    transition: opacity 0.3s ease;
    pointer-events: none;
    z-index: 0;
}

.historique-list-item:hover .historique-list-glow {
    opacity: 1;
}

.historique-list-inner {
    position: relative;
    display: flex;
    align-items: center;
    gap: 20px;
    background: rgba(20, 20, 20, 0.6);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 12px;
    padding: 20px 25px;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    overflow: hidden;
}

.historique-list-item:hover .historique-list-inner {
    transform: translateX(8px);
    border-color: rgba(241, 108, 32, 0.3);
    background: rgba(20, 20, 20, 0.8);
    box-shadow: 0 8px 30px rgba(0, 0, 0, 0.4),
                0 0 0 1px rgba(241, 108, 32, 0.2);
}

/* Icône */
.historique-list-icon {
    flex-shrink: 0;
    width: 48px;
    height: 48px;
    background: linear-gradient(135deg, rgba(241, 108, 32, 0.2) 0%, rgba(232, 93, 18, 0.2) 100%);
    border: 2px solid rgba(241, 108, 32, 0.3);
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
}

.historique-list-item:hover .historique-list-icon {
    background: linear-gradient(135deg, #f16c20 0%, #e85d12 100%);
    border-color: #f16c20;
    transform: rotate(360deg) scale(1.1);
}

.historique-list-icon svg {
    color: #f16c20;
    transition: color 0.3s ease;
}

.historique-list-item:hover .historique-list-icon svg {
    color: #ffffff;
}

/* Contenu */
.historique-list-content {
    flex: 1;
    min-width: 0;
}

.historique-list-title {
    font-size: 18px;
    font-weight: 600;
    color: #ffffff;
    margin: 0 0 5px 0;
    line-height: 1.3;
    transition: color 0.3s ease;
}

.historique-list-item:hover .historique-list-title {
    color: #f16c20;
}

.historique-list-date {
    font-size: 14px;
    color: rgba(255, 255, 255, 0.6);
    font-weight: 500;
}

/* Description (optionnelle) */
.historique-list-description {
    flex: 0 0 auto;
    max-width: 300px;
    font-size: 13px;
    color: rgba(255, 255, 255, 0.5);
    display: none;
}

/* Conteneur des téléchargements */
.historique-list-downloads {
    display: flex;
    gap: 8px;
    margin-left: auto;
    flex-shrink: 0;
}

/* Bouton de téléchargement */
.historique-download-btn {
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 8px 12px;
    background: rgba(241, 108, 32, 0.1);
    border: 1px solid rgba(241, 108, 32, 0.3);
    border-radius: 8px;
    color: #f16c20;
    font-size: 12px;
    font-weight: 600;
    text-transform: uppercase;
    transition: all 0.3s ease;
    cursor: pointer;
    text-decoration: none;
}

.historique-download-btn:hover {
    background: linear-gradient(135deg, #f16c20 0%, #e85d12 100%);
    border-color: #f16c20;
    color: #ffffff;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(241, 108, 32, 0.4);
}

.historique-download-btn svg {
    flex-shrink: 0;
    transition: transform 0.3s ease;
}

.historique-download-btn:hover svg {
    transform: scale(1.1);
}

.download-label {
    white-space: nowrap;
}

/* Lien vers galerie */
.historique-list-link {
    flex-shrink: 0;
    width: 40px;
    height: 40px;
    background: rgba(241, 108, 32, 0.1);
    border: 1px solid rgba(241, 108, 32, 0.3);
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
    color: #f16c20;
}

.historique-list-item:hover .historique-list-link {
    background: linear-gradient(135deg, #f16c20 0%, #e85d12 100%);
    border-color: #f16c20;
    transform: translateX(4px);
}

.historique-list-link svg {
    color: #f16c20;
    transition: color 0.3s ease;
}

.historique-list-item:hover .historique-list-link svg {
    color: #ffffff;
}

/* Ligne hover */
.historique-list-hover-line {
    position: absolute;
    bottom: 0;
    left: 70px;
    right: 70px;
    height: 2px;
    background: linear-gradient(90deg, transparent 0%, #f16c20 50%, transparent 100%);
    transform: scaleX(0);
    transition: transform 0.4s ease;
    border-radius: 2px;
}

.historique-list-item:hover .historique-list-hover-line {
    transform: scaleX(1);
}

/* Cartes des sorties */
.historique-card-modern {
    position: relative;
    opacity: 0;
    transform: translateY(30px);
    transition: all 0.6s cubic-bezier(0.4, 0, 0.2, 1);
}

.historique-card-modern.aos-animate {
    opacity: 1;
    transform: translateY(0);
}

.historique-card-glow {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: radial-gradient(circle at 50% 50%, rgba(241, 108, 32, 0.15) 0%, transparent 70%);
    border-radius: 20px;
    opacity: 0;
    transition: opacity 0.4s ease;
    pointer-events: none;
    z-index: 0;
}

.historique-card-modern:hover .historique-card-glow {
    opacity: 1;
}

.historique-card-inner-modern {
    position: relative;
    background: rgba(20, 20, 20, 0.8);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 20px;
    overflow: hidden;
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    height: 100%;
    display: flex;
    flex-direction: column;
}

.historique-card-modern:hover .historique-card-inner-modern {
    transform: translateY(-8px);
    border-color: rgba(241, 108, 32, 0.3);
    box-shadow: 0 20px 50px rgba(0, 0, 0, 0.5),
                0 0 0 1px rgba(241, 108, 32, 0.2);
}

/* Image de la sortie */
.historique-card-image-modern {
    position: relative;
    height: 250px;
    overflow: hidden;
}

.historique-image-wrapper {
    width: 100%;
    height: 100%;
    overflow: hidden;
}

.historique-image-wrapper img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.6s cubic-bezier(0.4, 0, 0.2, 1);
}

.historique-card-modern:hover .historique-image-wrapper img {
    transform: scale(1.1);
}

.historique-card-gradient {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    height: 60%;
    background: linear-gradient(180deg, transparent 0%, rgba(20, 20, 20, 0.95) 100%);
    pointer-events: none;
}

/* Badge de la date */
.historique-date-badge {
    position: absolute;
    top: 15px;
    right: 15px;
    background: rgba(241, 108, 32, 0.9);
    backdrop-filter: blur(10px);
    border-radius: 12px;
    padding: 8px 12px;
    box-shadow: 0 4px 16px rgba(241, 108, 32, 0.3);
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    gap: 6px;
}

.historique-card-modern:hover .historique-date-badge {
    transform: scale(1.05);
    background: rgba(241, 108, 32, 1);
}

.historique-date-badge .badge-icon svg {
    width: 16px;
    height: 16px;
    color: #ffffff;
}

.historique-date-badge span {
    color: #ffffff;
    font-size: 13px;
    font-weight: 600;
    white-space: nowrap;
}

/* Contenu de la carte */
.historique-card-content-modern {
    padding: 25px;
    flex: 1;
    display: flex;
    flex-direction: column;
}

.historique-card-title-modern {
    font-size: 20px;
    font-weight: 700;
    color: #ffffff;
    margin: 0 0 15px 0;
    line-height: 1.3;
}

/* Statistiques de la sortie */
.historique-card-stats {
    display: flex;
    gap: 20px;
    margin-bottom: 15px;
}

.stat-item {
    display: flex;
    align-items: center;
    gap: 6px;
    color: rgba(255, 255, 255, 0.6);
    font-size: 14px;
}

.stat-item svg {
    flex-shrink: 0;
}

.historique-card-description-modern {
    font-size: 14px;
    line-height: 1.6;
    color: rgba(255, 255, 255, 0.7);
    margin: 0 0 20px 0;
    flex: 1;
}

/* Carte simple sans stats */
.historique-card-content-simple {
    min-height: 120px;
    justify-content: space-between;
}

.historique-card-content-simple .historique-card-title-modern {
    margin-bottom: 10px;
}

.historique-card-content-simple .historique-card-link {
    margin-top: 10px;
}

/* Lien vers la galerie */
.historique-card-link {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    color: #f16c20;
    font-size: 14px;
    font-weight: 600;
    text-decoration: none;
    transition: all 0.3s ease;
    margin-top: auto;
}

.historique-card-link:hover {
    color: #ff8040;
    gap: 12px;
}

.historique-card-link svg {
    transition: transform 0.3s ease;
}

.historique-card-link:hover svg {
    transform: translateX(4px);
}

/* Ligne hover */
.historique-card-hover-line {
    position: absolute;
    bottom: 0;
    left: 25px;
    right: 25px;
    height: 3px;
    background: linear-gradient(90deg, transparent 0%, #f16c20 50%, transparent 100%);
    transform: scaleX(0);
    transition: transform 0.4s ease;
    border-radius: 3px;
}

.historique-card-modern:hover .historique-card-hover-line {
    transform: scaleX(1);
}

/* Responsive Design */
@media (max-width: 1200px) {
    .historique-grid-modern {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 991px) {
    .historique-title-modern {
        font-size: 42px;
    }
    
    .historique-grid-modern {
        grid-template-columns: repeat(2, 1fr);
        gap: 25px;
    }
    
    .historique-intro-modern {
        font-size: 16px;
    }
}

@media (max-width: 767px) {
    .historique-section-modern {
        padding: 60px 0;
    }
    
    .historique-header-modern {
        margin-bottom: 50px;
        margin-top: 80px;
    }
    
    .historique-title-modern {
        font-size: 32px;
    }
    
    .historique-intro-modern {
        font-size: 15px;
        padding: 0 15px;
    }
    
    /* Onglets en mode mobile */
    .historique-tabs-container {
        margin-bottom: 40px;
        padding: 0 15px;
    }
    
    .historique-tabs-wrapper {
        justify-content: flex-start;
        padding: 6px;
    }
    
    .historique-tab {
        min-width: 80px;
        padding: 12px 20px;
        font-size: 14px;
    }
    
    .historique-empty-state {
        padding: 60px 15px;
    }
    
    .historique-empty-state svg {
        width: 60px;
        height: 60px;
    }
    
    .historique-empty-state h3 {
        font-size: 20px;
    }
    
    .historique-empty-state p {
        font-size: 14px;
    }
    
    /* Liste en mode mobile */
    .historique-list-container {
        padding: 0 15px;
    }
    
    .historique-list-item {
        margin-bottom: 12px;
    }
    
    .historique-list-inner {
        padding: 15px;
        gap: 12px;
        flex-wrap: wrap;
    }
    
    .historique-list-icon {
        width: 40px;
        height: 40px;
    }
    
    .historique-list-icon svg {
        width: 20px;
        height: 20px;
    }
    
    .historique-list-content {
        flex: 1 1 100%;
        min-width: 100%;
        order: 1;
    }
    
    .historique-list-title {
        font-size: 16px;
    }
    
    .historique-list-date {
        font-size: 13px;
    }
    
    /* Téléchargements en mobile */
    .historique-list-downloads {
        order: 2;
        margin-left: 0;
        gap: 6px;
    }
    
    .historique-download-btn {
        padding: 6px 10px;
        font-size: 11px;
        gap: 4px;
    }
    
    .historique-download-btn svg {
        width: 14px;
        height: 14px;
    }
    
    .download-label {
        display: none;
    }
    
    .historique-list-link {
        width: 36px;
        height: 36px;
        order: 3;
    }
    
    .historique-list-link svg {
        width: 16px;
        height: 16px;
    }
    
    .historique-list-hover-line {
        left: 20px;
        right: 20px;
    }
    
    .historique-grid-modern {
        grid-template-columns: 1fr;
        gap: 20px;
        padding: 0 15px;
    }
    
    .historique-card-image-modern {
        height: 200px;
    }
    
    .historique-card-content-modern {
        padding: 20px;
    }
    
    .historique-card-title-modern {
        font-size: 18px;
    }
    
    .historique-card-description-modern {
        font-size: 13px;
    }
    
    .historique-card-stats {
        flex-wrap: wrap;
        gap: 15px;
    }
}

/* Animation pour les navigateurs qui supportent */
@media (prefers-reduced-motion: no-preference) {
    .historique-card-modern {
        will-change: opacity, transform;
    }
}

/* Mode sombre optimisé */
@media (prefers-color-scheme: dark) {
    .historique-section-modern {
        background: linear-gradient(135deg, #000000 0%, #0a0a0a 50%, #000000 100%);
    }
}

/* Print styles */
@media print {
    .historique-section-modern {
        background: #ffffff;
    }
    
    .historique-card-inner-modern {
        border: 1px solid #cccccc;
    }
    
    .historique-particles,
    .historique-card-glow {
        display: none;
    }
    
    .historique-card-link {
        color: #000000;
    }
}
