/* ==============================================
   PAGE LIVRE D'OR MODERNE v4.0
   Créé le 29/01/2026 - Design avec onglets par année
   Structure identique à l'Historique des Sorties
   Modifications : Années centrées + Stats après messages
=============================================== */

/* Masquer le header visuel */
.page-template-template-livre-dor .header .overlay-layer {
    display: none !important;
    height: 0 !important;
    padding: 0 !important;
    margin: 0 !important;
}

.page-template-template-livre-dor .intro-section {
    display: none !important;
}

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

/* Section principale livre d'or */
.livredor-section-modern {
    position: relative;
    padding: 40px 0 100px 0;
    background: linear-gradient(135deg, #0f0f0f 0%, #1a1a1a 50%, #0f0f0f 100%);
    overflow: hidden;
    min-height: 100vh;
}

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

.livredor-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;
    }
}

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

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

.livredor-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 */
.livredor-line-modern {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    margin: 30px auto;
}

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

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

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

.livredor-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 */
.livredor-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;
}

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

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

.livredor-tabs-container {
    max-width: 1400px;
    margin: 0 auto 50px;
    padding: 0 20px;
    position: relative;
}

.livredor-tabs-wrapper {
    display: flex;
    gap: 8px;
    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;
    position: relative;
    overflow-x: auto;
    scrollbar-width: thin;
    justify-content: center; /* MODIFICATION : Centrer les onglets */
}

.livredor-tabs-wrapper::-webkit-scrollbar {
    height: 4px;
}

.livredor-tabs-wrapper::-webkit-scrollbar-track {
    background: rgba(255, 255, 255, 0.05);
    border-radius: 2px;
}

.livredor-tabs-wrapper::-webkit-scrollbar-thumb {
    background: rgba(241, 108, 32, 0.5);
    border-radius: 2px;
}

.livredor-tab {
    flex: 0 0 auto;
    padding: 12px 28px;
    background: transparent;
    border: none;
    border-radius: 10px;
    color: rgba(255, 255, 255, 0.6);
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    position: relative;
    z-index: 2;
    white-space: nowrap;
}

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

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

.livredor-tab-indicator {
    position: absolute;
    bottom: 8px;
    left: 8px;
    height: calc(100% - 16px);
    background: linear-gradient(135deg, #f16c20 0%, #d85e1a 100%);
    border-radius: 10px;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    z-index: 1;
}

/* ==============================================
   STATISTIQUES (APRÈS LES MESSAGES)
=============================================== */

.livredor-stats-grid {
    max-width: 1400px;
    margin: 60px auto 0; /* MODIFICATION : Marge en haut au lieu du bas */
    padding: 0 20px;
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 20px;
}

.livredor-stat-card {
    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: 28px;
    display: flex;
    align-items: center;
    gap: 20px;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.livredor-stat-card:hover {
    transform: translateY(-5px);
    border-color: rgba(241, 108, 32, 0.3);
    box-shadow: 0 10px 30px rgba(241, 108, 32, 0.2);
}

.stat-icon {
    flex-shrink: 0;
    width: 60px;
    height: 60px;
    background: linear-gradient(135deg, rgba(241, 108, 32, 0.2) 0%, rgba(241, 108, 32, 0.1) 100%);
    border: 2px solid rgba(241, 108, 32, 0.3);
    border-radius: 14px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #f16c20;
}

.stat-content {
    flex: 1;
}

.stat-number {
    font-size: 36px;
    font-weight: 800;
    color: #ffffff;
    line-height: 1;
    margin-bottom: 8px;
    background: linear-gradient(135deg, #ffffff 0%, #f0f0f0 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.stat-label {
    font-size: 14px;
    color: rgba(255, 255, 255, 0.6);
    text-transform: uppercase;
    letter-spacing: 0.5px;
    font-weight: 600;
}

/* ==============================================
   CONTENU DES ONGLETS
=============================================== */

.livredor-content-wrapper {
    max-width: 1400px;
    margin: 0 auto;
    padding: 0 20px;
    position: relative;
}

.livredor-tab-content {
    display: none;
    animation: fadeIn 0.4s ease-out;
}

.livredor-tab-content.active {
    display: block;
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

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

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

.livredor-year-count {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    color: rgba(255, 255, 255, 0.7);
    font-size: 16px;
    font-weight: 500;
    margin: 0;
}

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

/* ==============================================
   MESSAGES
=============================================== */

.livredor-messages-container {
    min-height: 300px;
}

/* Carte de message */
.livredor-message-card {
    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: 28px;
    margin-bottom: 20px;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
    overflow: hidden;
}

.livredor-message-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 4px;
    height: 100%;
    background: linear-gradient(180deg, #f16c20 0%, #d85e1a 100%);
    opacity: 0;
    transition: opacity 0.3s ease;
}

.livredor-message-card:hover {
    transform: translateX(8px);
    border-color: rgba(241, 108, 32, 0.3);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3);
}

.livredor-message-card:hover::before {
    opacity: 1;
}

/* Header du message */
.message-header {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    margin-bottom: 16px;
    flex-wrap: wrap;
    gap: 12px;
}

.message-author-info {
    display: flex;
    align-items: flex-start;
    gap: 14px;
    flex: 1;
}

.message-avatar {
    width: 52px;
    height: 52px;
    background: linear-gradient(135deg, rgba(241, 108, 32, 0.2) 0%, rgba(241, 108, 32, 0.1) 100%);
    border: 2px solid rgba(241, 108, 32, 0.3);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #f16c20;
    font-weight: 700;
    font-size: 20px;
    text-transform: uppercase;
    flex-shrink: 0;
}

.message-meta {
    flex: 1;
}

.message-author {
    color: #ffffff;
    font-size: 17px;
    font-weight: 600;
    margin-bottom: 4px;
}

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

.message-sortie svg {
    width: 14px;
    height: 14px;
    color: #f16c20;
}

.message-date {
    color: rgba(255, 255, 255, 0.5);
    font-size: 14px;
    display: flex;
    align-items: center;
    gap: 6px;
    flex-shrink: 0;
}

.message-date svg {
    width: 16px;
    height: 16px;
}

/* Corps du message */
.message-body {
    color: rgba(255, 255, 255, 0.85);
    font-size: 15px;
    line-height: 1.7;
    margin-top: 16px;
}

/* ==============================================
   ÉTAT VIDE
=============================================== */

.livredor-empty-state {
    text-align: center;
    padding: 80px 20px;
    max-width: 600px;
    margin: 0 auto;
}

.livredor-empty-state svg {
    color: rgba(255, 255, 255, 0.2);
    margin-bottom: 24px;
}

.livredor-empty-state h3 {
    font-size: 28px;
    color: #ffffff;
    margin-bottom: 12px;
    font-weight: 700;
}

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

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

@media (max-width: 992px) {
    .livredor-stats-grid {
        grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    }
}

@media (max-width: 768px) {
    .livredor-header-modern {
        margin-top: 80px;
    }
    
    .livredor-title-modern {
        font-size: 42px;
    }
    
    .livredor-intro-modern {
        font-size: 16px;
        padding: 0 10px;
    }
    
    .livredor-tabs-wrapper {
        gap: 4px;
        padding: 6px;
    }
    
    .livredor-tab {
        padding: 10px 20px;
        font-size: 15px;
    }
    
    .livredor-stats-grid {
        grid-template-columns: 1fr;
    }
    
    .livredor-stat-card {
        padding: 24px;
    }
    
    .stat-icon {
        width: 56px;
        height: 56px;
    }
    
    .stat-number {
        font-size: 32px;
    }
    
    .livredor-year-title {
        font-size: 28px;
    }
    
    .livredor-message-card {
        padding: 24px;
    }
    
    .message-header {
        flex-direction: column;
        align-items: flex-start;
    }
}

@media (max-width: 480px) {
    .livredor-header-modern {
        margin-top: 60px;
        margin-bottom: 40px;
    }
    
    .livredor-title-modern {
        font-size: 32px;
    }
    
    .livredor-intro-modern {
        font-size: 15px;
    }
    
    .livredor-tab {
        padding: 8px 16px;
        font-size: 14px;
    }
    
    .stat-number {
        font-size: 28px;
    }
    
    .stat-icon {
        width: 48px;
        height: 48px;
    }
    
    .livredor-year-title {
        font-size: 24px;
    }
    
    .message-avatar {
        width: 44px;
        height: 44px;
        font-size: 18px;
    }
    
    .message-author {
        font-size: 16px;
    }
    
    .livredor-message-card {
        padding: 20px;
    }
}

/* Animations d'entrée */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.livredor-message-card {
    animation: fadeInUp 0.5s ease-out backwards;
}

.livredor-message-card:nth-child(1) { animation-delay: 0.05s; }
.livredor-message-card:nth-child(2) { animation-delay: 0.1s; }
.livredor-message-card:nth-child(3) { animation-delay: 0.15s; }
.livredor-message-card:nth-child(4) { animation-delay: 0.2s; }
.livredor-message-card:nth-child(5) { animation-delay: 0.25s; }
