/* Reset et base */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

/* IMPORTANT : Masquer complètement les liens d'achat */
.links a[title="Lien d'achat"] {
    display: none !important;
}

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    line-height: 1.6;
    color: #1a202c;
    background-color: #f7fafc;
    /* Optimisations PWA iOS */
    padding-top: env(safe-area-inset-top);
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    /* Améliorer les performances de défilement sur iOS */
    -webkit-overflow-scrolling: touch;
}

/* Styles pour application PWA en plein écran */
@media (display-mode: standalone) {
    body {
        padding-top: env(safe-area-inset-top);
        /* Optimisations spécifiques PWA */
        user-select: none;
        -webkit-user-select: none;
        -webkit-touch-callout: none;
    }
    
    /* Désactiver le zoom sur les inputs en mode PWA */
    input, select, textarea {
        font-size: 16px !important;
    }
}

/* Support pour les préférences de mouvement réduit */
@media (prefers-reduced-motion: reduce) {
    *,
    *::before,
    *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
}

/* ========================================
   NAVIGATION INTER-ONGLETS POUR LES PIÈCES
   ======================================== */

/* Styles pour les icônes SVG modernes */
.icon-svg {
    width: 1.2em;
    height: 1.2em;
    display: inline-block;
    vertical-align: middle;
    margin-right: 0.5em;
    fill: currentColor;
    transition: all 0.2s ease;
    flex-shrink: 0;
}

.tab-button .icon-svg {
    width: 1.1em;
    height: 1.1em;
    margin-right: 0.4em;
}

.mobile-nav-icon .icon-svg {
    width: 1.4em;
    height: 1.4em;
    margin-right: 0;
}

/* Couleurs spécifiques selon l'état */
.tab-button.active .icon-svg {
    fill: url(#gradient-active);
    stroke: url(#gradient-active);
}

.mobile-nav-item.active .icon-svg {
    fill: url(#gradient-active);
    stroke: url(#gradient-active);
}

.mobile-nav-item:not(.active) .icon-svg {
    fill: currentColor;
    opacity: 0.8;
}

/* Styles pour les pièces cliquables dans les événements */
.clickable-piece {
    cursor: pointer;
    position: relative;
    transition: all 0.3s ease;
    border: 2px solid transparent;
}

.clickable-piece:hover {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(102, 126, 234, 0.3);
}

.clickable-piece .piece-click-indicator {
    opacity: 0;
    position: absolute;
    right: 12px;
    top: 50%;
    transform: translateY(-50%);
    font-weight: bold;
    font-size: 1.2rem;
    transition: opacity 0.3s ease;
}

.clickable-piece:hover .piece-click-indicator {
    opacity: 1;
}

/* Animation de mise en évidence délicate pour les pièces trouvées */
.piece-highlighted {
    position: relative;
    animation: subtlePieceHighlight 3.5s ease-in-out;
    border: 2px solid #667eea !important;
    box-shadow: 0 6px 16px rgba(102, 126, 234, 0.25) !important;
    z-index: 5;
}

/* Version renforcée pour mobile - garantit visibilité */
.piece-highlighted-important {
    border: 3px solid #764ba2 !important;
    box-shadow: 0 6px 24px rgba(102, 126, 234, 0.5) !important;
    z-index: 10;
    animation: strongPieceHighlight 1s infinite alternate !important;
}

@keyframes strongPieceHighlight {
    0% { box-shadow: 0 6px 24px rgba(102, 126, 234, 0.5); }
    100% { box-shadow: 0 6px 32px rgba(118, 75, 162, 0.8); }
}

.piece-highlighted::before {
    content: '';
    position: absolute;
    top: -4px;
    left: -4px;
    right: -4px;
    bottom: -4px;
    background: linear-gradient(45deg, #667eea, #764ba2, #667eea, #5a67d8);
    background-size: 300% 300%;
    border-radius: 16px;
    z-index: -1;
    opacity: 0;
    animation: gentleBorderGlow 3.5s ease-in-out, gradientShift 3.5s ease-in-out;
}

@keyframes subtlePieceHighlight {
    0% {
        transform: scale(1);
        border-color: #e2e8f0;
    }
    15% {
        transform: scale(1.02);
        border-color: #667eea;
    }
    30% {
        transform: scale(1.025);
        border-color: #5a67d8;
    }
    50% {
        transform: scale(1.02);
        border-color: #764ba2;
    }
    70% {
        transform: scale(1.015);
        border-color: #667eea;
    }
    100% {
        transform: scale(1);
        border-color: #667eea;
    }
}

@keyframes gentleBorderGlow {
    0% {
        opacity: 0;
    }
    20% {
        opacity: 0.4;
    }
    50% {
        opacity: 0.5;
    }
    80% {
        opacity: 0.3;
    }
    100% {
        opacity: 0;
    }
}

@keyframes gradientShift {
    0% {
        background-position: 0% 50%;
    }
    50% {
        background-position: 100% 50%;
    }
    100% {
        background-position: 0% 50%;
    }
}

/* Amélioration visuelle des piece-items existants */
.piece-item {
    position: relative;
    border-radius: 12px;
    padding: 16px;
    margin-bottom: 12px;
    background: #ffffff;
    border: 2px solid #e2e8f0;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.05);
    transition: all 0.3s ease;
}

.piece-item h5 {
    font-size: 1.1rem;
    font-weight: 600;
    color: #2d3748;
    margin: 0;
    /* Réserver de l'espace pour la flèche sur mobile */
    padding-right: 40px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

/* Responsive pour mobile */
@media (max-width: 768px) {
    .clickable-piece:hover {
        transform: none; /* Pas de translation sur mobile */
    }
    
    .piece-click-indicator {
        opacity: 1 !important; /* Toujours visible sur mobile */
        font-size: 1rem;
        right: 8px; /* Réduire un peu l'espace depuis le bord */
    }
    
    /* Ajuster le padding du titre pour plus d'espace avec la flèche sur mobile */
    .piece-item h5 {
        padding-right: 35px; /* Augmenter l'espace réservé pour la flèche */
        font-size: 1rem; /* Légèrement plus petit sur mobile */
    }
    
    .piece-highlighted {
        transform: scale(1.01) !important; /* Mise à l'échelle légèrement plus visible sur mobile */
    }
    
    .piece-highlighted::before {
        opacity: 0.2 !important; /* Effet un peu plus visible sur mobile */
    }
}

/* Header supprimé - remplacé par la navigation */
header {
    display: none;
}

.header-content {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 2rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 1rem;
}

/* Statistiques du site */
.site-statistics {
    display: flex;
    gap: 2rem;
    align-items: center;
    flex-wrap: wrap;
}

.stat-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 0.5rem;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    border-radius: 12px;
    box-shadow: 0 2px 8px rgba(102, 126, 234, 0.2);
    transition: transform 0.2s ease;
    min-width: 80px;
}

.stat-item:hover {
    transform: translateY(-2px);
}

.stat-number {
    font-size: 1.5rem;
    font-weight: 700;
    line-height: 1;
}

.stat-label {
    font-size: 0.75rem;
    opacity: 0.9;
    font-weight: 500;
    text-align: center;
}

/* Durée des sections */
.section-duration {
    color: #666;
    font-weight: normal;
    font-size: 0.9em;
}

/* Résumé des sections */
.section-summary {
    margin-top: 1.5rem; /* Légèrement augmenté de 1rem à 1.5rem */
    padding: 0 2rem 1.5rem; /* Ajout de padding horizontal et bottom pour équilibrer */
}

.summary-stats {
    display: flex;
    gap: 2rem;
    align-items: center;
    justify-content: center;
    padding: 1rem 0.75rem; /* Augmenté verticalement de 0.75rem à 1rem */
    background: #f8fafc;
    border-radius: 8px;
    border: 1px solid #e2e8f0;
}

.stat-pieces,
.stat-duration {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-weight: 600;
    color: #4a5568;
}

.stat-pieces::before {
    content: "";
    width: 1.1em;
    height: 1.1em;
    margin-right: 0.25em;
    background-image: url("data:image/svg+xml,%3Csvg width='24' height='24' viewBox='0 0 24 24' fill='none' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M12 3v10.55c-.59-.34-1.27-.55-2-.55-2.21 0-4 1.79-4 4s1.79 4 4 4 4-1.79 4-4V7h4V3h-6z' fill='%234a5568'/%3E%3C/svg%3E");
    background-size: contain;
    background-repeat: no-repeat;
    display: inline-block;
}

.stat-duration::before {
    content: "";
    width: 1.1em;
    height: 1.1em;
    margin-right: 0.25em;
    background-image: url("data:image/svg+xml,%3Csvg width='24' height='24' viewBox='0 0 24 24' fill='none' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M12 2C6.48 2 2 6.48 2 12s4.48 10 10 10 10-4.48 10-10S17.52 2 12 2zm0 18c-4.41 0-8-3.59-8-8s3.59-8 8-8 8 3.59 8 8-3.59 8-8 8zm.5-13H11v6l5.25 3.15.75-1.23-4.5-2.67V7z' fill='%234a5568'/%3E%3C/svg%3E");
    background-size: contain;
    background-repeat: no-repeat;
    display: inline-block;
}

@media (max-width: 768px) {
    .summary-stats {
        flex-direction: column;
        gap: 1rem;
    }
}

.header-actions {
    display: flex;
    gap: 1rem;
}

.admin-link {
    background: linear-gradient(135deg, #4CAF50, #45a049);
    color: white;
    text-decoration: none;
    padding: 0.5rem 1rem;
    border-radius: 25px;
    font-size: 0.9rem;
    font-weight: 500;
    transition: all 0.3s ease;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

.admin-link:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(0,0,0,0.2);
}

header h1 {
    font-size: 1.5rem;
    font-weight: 600;
    color: #4a5568;
    letter-spacing: -0.025em;
    margin: 0;
    opacity: 0.9;
}

/* Header mobile simplifié - complètement masqué */
.mobile-header {
    display: none !important;
}

/* Navigation mobile en bas - affichée selon le contexte */
.mobile-bottom-nav {
    display: none; /* Cachée par défaut, affichée via media queries */
}

/* Navigation transformée en header principal */
.tab-navigation {
    background: #ffffff;
    border-bottom: 1px solid #e2e8f0;
    padding: 1rem 0;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.06);
    position: relative;
    transition: all 0.3s ease;
}

.tab-container {
    max-width: 1200px;
    margin: 0 auto;
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 1rem;
    padding: 0 2rem;
    transition: all 0.2s ease;
    position: relative;
}

/* Titre positionné absolument à gauche */
.tab-title {
    font-size: 1.3rem;
    font-weight: 600;
    color: #4a5568;
    margin: 0;
    white-space: nowrap;
    transition: all 0.2s ease;
    position: absolute;
    left: 2rem;
}

.tab-buttons {
    display: flex;
    gap: 0.5rem;
    background: #f7fafc;
    padding: 0.25rem;
    border-radius: 12px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
    border: 1px solid #e2e8f0;
    transition: all 0.2s ease;
    position: relative;
    overflow: hidden;
}

/* 🌊 ANIMATION VAGUE FLUIDE - Indicateur mobile avec couleurs dynamiques */
.tab-buttons::before {
    content: '';
    position: absolute;
    top: 0.25rem;
    bottom: 0.25rem;
    left: 0.25rem;
    width: var(--tab-indicator-width, 0px);
    background: var(--tab-indicator-color, linear-gradient(135deg, #4299e1 0%, #667eea 100%));
    border-radius: 8px;
    box-shadow: var(--tab-indicator-shadow, 0 2px 8px rgba(66, 153, 225, 0.3));
    transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
    transform: var(--tab-indicator-transform, translateX(0));
    z-index: 1;
    opacity: 1;
}

/* Couleurs spécifiques selon l'onglet actif */
.tab-buttons[data-active-tab="prochains-evenements"]::before {
    --tab-indicator-color: linear-gradient(135deg, #48bb78 0%, #38a169 100%);
    --tab-indicator-shadow: 0 2px 8px rgba(72, 187, 120, 0.3);
}

.tab-buttons[data-active-tab="programmes"]::before {
    --tab-indicator-color: linear-gradient(135deg, #4299e1 0%, #667eea 100%);
    --tab-indicator-shadow: 0 2px 8px rgba(66, 153, 225, 0.3);
}

.tab-buttons[data-active-tab="partitions"]::before {
    --tab-indicator-color: linear-gradient(135deg, #e53e3e 0%, #c53030 100%);
    --tab-indicator-shadow: 0 2px 8px rgba(229, 62, 62, 0.3);
}

.tab-button {
    background: transparent;
    border: none;
    padding: 0.75rem 1.25rem;
    font-size: 0.85rem;
    font-weight: 500;
    color: #4a5568;
    cursor: pointer;
    transition: all 0.25s ease;
    border-radius: 8px;
    position: relative;
    white-space: nowrap;
    min-width: max-content;
    z-index: 2;
}

.tab-button:hover {
    color: #2d3748;
    transform: translateY(-1px);
}

.tab-button.active {
    color: #ffffff;
    background: transparent;
    transform: translateY(-1px);
}

/* Statistiques et recherche positionnées absolument à droite */
.site-statistics {
    display: flex;
    gap: 0.75rem;
    align-items: center;
    transition: all 0.2s ease;
    position: absolute;
    right: 260px;
}

.stat-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 0.4rem 0.7rem;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    border-radius: 10px;
    box-shadow: 0 2px 6px rgba(102, 126, 234, 0.2);
    transition: transform 0.2s ease;
    min-width: 55px;
    font-size: 0.8rem;
}

.stat-item:hover {
    transform: translateY(-2px);
}

/* Barre de recherche positionnée absolument à droite */
.search-container {
    transition: all 0.2s ease;
    position: absolute;
    right: 2rem;
    width: 240px;
}

.search-input {
    width: 100%;
    padding: 0.75rem 1rem;
    border: 1px solid #e2e8f0;
    border-radius: 10px;
    font-size: 0.9rem;
    background: #f7fafc;
    color: #4a5568;
    transition: all 0.25s ease;
    outline: none;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.05);
}

.search-input:focus {
    border-color: #4299e1;
    background: #ffffff;
    box-shadow: 0 0 0 3px rgba(66, 153, 225, 0.1), 0 2px 6px rgba(0, 0, 0, 0.1);
    transform: translateY(-1px);
}

.search-input::placeholder {
    color: #a0aec0;
}

/* ========================================
   🎯 CLASSES SPÉCIFIQUES PAR PLATEFORME PWA
   ======================================== */

/* Règles spécifiques pour forcer l'affichage correct */
body.pwa-desktop .mobile-bottom-nav,
body.pwa-ipad-landscape .mobile-bottom-nav {
    display: none !important;
}

body.pwa-desktop .tab-navigation,
body.pwa-ipad-landscape .tab-navigation {
    display: block !important;
}

body.pwa-ios-mobile .tab-navigation,
body.pwa-ipad-portrait .tab-navigation {
    display: none !important;
}

body.pwa-ios-mobile .mobile-bottom-nav,
body.pwa-ipad-portrait .mobile-bottom-nav {
    display: flex !important;
}

/* Ajustements spécifiques pour Mac PWA */
body.pwa-desktop {
    /* Assurer un padding approprié sans dock mobile */
    main {
        padding-bottom: 2rem !important;
    }
}

/* Ajustements spécifiques pour iPad portrait */
body.pwa-ipad-portrait {
    /* Espace supplémentaire pour le dock optimisé */
    main {
        padding-bottom: 180px !important;
    }
}

/* ========================================
   🎯 PWA MODE STANDALONE - STRATÉGIE ADAPTATIVE PAR PLATEFORME
   ======================================== */

/* 📱 PWA MOBILE (iPhone uniquement) - Navigation dock */
@media all and (display-mode: standalone) and (max-width: 768px) and (max-height: 1024px) {
    /* S'assurer que le contenu respecte les zones sûres */
    body {
        padding-top: env(safe-area-inset-top) !important;
        padding-left: env(safe-area-inset-left) !important;
        padding-right: env(safe-area-inset-right) !important;
    }
    
    /* Navigation mobile dock pour iPhone */
    .mobile-bottom-nav {
        display: flex !important;
        justify-content: center !important;
        align-items: center !important;
        position: fixed !important;
        bottom: 0 !important;
        left: 0 !important;
        right: 0 !important;
        z-index: 10000 !important;
        padding: 1rem 1.5rem calc(1rem + env(safe-area-inset-bottom)) !important;
        background: transparent !important;
        pointer-events: none !important;
        /* Optimisations performance */
        transform: translateZ(0) !important;
        will-change: transform !important;
    }
    
    .mobile-nav-container {
        display: flex !important;
        pointer-events: auto !important;
        background: rgba(255, 255, 255, 0.95) !important;
        backdrop-filter: blur(20px) !important;
        -webkit-backdrop-filter: blur(20px) !important;
        border-radius: 25px !important;
        padding: 0.5rem !important;
        box-shadow: 0 8px 32px rgba(0, 0, 0, 0.12), 0 2px 8px rgba(0, 0, 0, 0.08) !important;
        border: 1px solid rgba(255, 255, 255, 0.2) !important;
    }
    
    .tab-navigation {
        display: none !important;
    }
}

/* 💻 PWA DESKTOP (Mac, PC) - Navigation header comme le web */
@media all and (display-mode: standalone) and (min-width: 769px) {
    /* S'assurer que le contenu respecte les zones sûres */
    body {
        padding-top: env(safe-area-inset-top) !important;
        padding-left: env(safe-area-inset-left) !important;
        padding-right: env(safe-area-inset-right) !important;
    }
    
    /* Forcer l'affichage de la navigation desktop */
    .tab-navigation {
        display: block !important;
    }
    
    /* Masquer complètement la navigation mobile */
    .mobile-bottom-nav {
        display: none !important;
    }
    
    /* Ajuster le padding du contenu principal */
    main {
        padding-bottom: 2rem !important;
    }
}

/* 📱 PWA TABLETTE (iPad Pro) - Navigation dock optimisée */
@media all and (display-mode: standalone) and (min-width: 769px) and (max-width: 1366px) and (orientation: portrait) {
    /* Navigation mobile dock pour tablette mais optimisée */
    .mobile-bottom-nav {
        display: flex !important;
        justify-content: center !important;
        align-items: center !important;
        position: fixed !important;
        bottom: 0 !important;
        left: 0 !important;
        right: 0 !important;
        z-index: 10000 !important;
        padding: 1.5rem 2rem calc(1.5rem + env(safe-area-inset-bottom)) !important;
        background: transparent !important;
        pointer-events: none !important;
    }
    
    .mobile-nav-container {
        display: flex !important;
        pointer-events: auto !important;
        background: rgba(255, 255, 255, 0.95) !important;
        backdrop-filter: blur(20px) !important;
        -webkit-backdrop-filter: blur(20px) !important;
        border-radius: 30px !important;
        padding: 0.75rem 1rem !important;
        box-shadow: 0 12px 40px rgba(0, 0, 0, 0.15), 0 4px 12px rgba(0, 0, 0, 0.1) !important;
        border: 1px solid rgba(255, 255, 255, 0.3) !important;
        max-width: 400px !important;
        position: relative !important;
        overflow: hidden !important;
        /* ✅ AJOUT: Optimisations performance comme iPhone */
        will-change: transform !important;
        transform: translateZ(0) !important;
    }
    
    /* ✅ CORRECTION: Indicateur animé pour iPad comme iPhone */
    .mobile-nav-container::before {
        content: '' !important;
        position: absolute !important;
        top: 0.75rem !important;
        bottom: 0.75rem !important;
        left: 0.75rem !important;
        width: calc(33.333% - 0.5rem) !important;
        background: var(--mobile-nav-color, linear-gradient(135deg, #4299e1 0%, #667eea 100%)) !important;
        border-radius: 25px !important;
        transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1) !important;
        transform: translateX(var(--nav-indicator-position, 0)) !important;
        z-index: 1 !important;
        box-shadow: var(--mobile-nav-shadow, 0 4px 12px rgba(66, 153, 225, 0.3)) !important;
    }

    /* ✅ CORRECTION: Couleurs selon l'onglet actif pour iPad */
    .mobile-nav-container[data-active-tab="prochains-evenements"]::before {
        --mobile-nav-color: linear-gradient(135deg, #48bb78 0%, #38a169 100%) !important;
        --mobile-nav-shadow: 0 4px 12px rgba(72, 187, 120, 0.3) !important;
    }

    .mobile-nav-container[data-active-tab="programmes"]::before {
        --mobile-nav-color: linear-gradient(135deg, #4299e1 0%, #667eea 100%) !important;
        --mobile-nav-shadow: 0 4px 12px rgba(66, 153, 225, 0.3) !important;
    }

    .mobile-nav-container[data-active-tab="partitions"]::before {
        --mobile-nav-color: linear-gradient(135deg, #e53e3e 0%, #c53030 100%) !important;
        --mobile-nav-shadow: 0 4px 12px rgba(229, 62, 62, 0.3) !important;
    }
    
    /* ✅ CORRECTION: Onglets optimisés pour tablette avec centrage */
    .mobile-nav-item {
        display: flex !important;
        flex-direction: column !important;
        align-items: center !important;
        justify-content: center !important;
        padding: 1rem 1.5rem !important;
        border-radius: 25px !important;
        transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1) !important;
        cursor: pointer !important;
        flex: 1 !important;
        min-width: 80px !important;
        position: relative !important;
        z-index: 2 !important;
        background: transparent !important;
        text-align: center !important;
    }
    
    /* ✅ CORRECTION: États actif/inactif comme iPhone */
    .mobile-nav-item.active {
        background: transparent !important;
        transform: none !important;
        box-shadow: none !important;
    }
    
    .mobile-nav-icon {
        font-size: 1.6rem !important;
        margin-bottom: 0.5rem !important;
        transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1) !important;
        display: flex !important;
        align-items: center !important;
        justify-content: center !important;
    }
    
    /* ✅ CORRECTION: Couleurs des icônes selon l'état */
    .mobile-nav-item.active .mobile-nav-icon {
        color: #ffffff !important;
        transform: scale(1.1) !important;
    }
    
    .mobile-nav-item:not(.active) .mobile-nav-icon {
        color: #64748b !important;
        transform: scale(0.95) !important;
    }
    
    .mobile-nav-label {
        font-size: 0.8rem !important;
        font-weight: 600 !important;
        transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1) !important;
        text-align: center !important;
        line-height: 1.2 !important;
        opacity: 1 !important;
        margin: 0 !important;
    }
    
    /* ✅ CORRECTION: Couleurs des labels selon l'état */
    .mobile-nav-item.active .mobile-nav-label {
        color: #ffffff !important;
        font-weight: 600 !important;
        transform: translateY(-1px) !important;
    }
    
    .mobile-nav-item:not(.active) .mobile-nav-label {
        color: #64748b !important;
        opacity: 0.8 !important;
    }
    
    /* ✅ CORRECTION: Effet hover/tap pour tablette */
    .mobile-nav-item:not(.active):active {
        transform: scale(0.98) !important;
    }
    
    .tab-navigation {
        display: none !important;
    }
}

/* 📱 PWA TABLETTE PAYSAGE (iPad Pro horizontal) - Navigation desktop */
@media all and (display-mode: standalone) and (min-width: 769px) and (max-width: 1366px) and (orientation: landscape) {
    /* Forcer l'affichage de la navigation desktop en mode paysage */
    .tab-navigation {
        display: block !important;
    }
    
    /* Masquer complètement la navigation mobile */
    .mobile-bottom-nav {
        display: none !important;
    }
    
    /* Ajuster le padding du contenu principal */
    main {
        padding-bottom: 2rem !important;
    }
}

/* Responsive pour interface mobile moderne */
@media (max-width: 768px) {
    /* Masquer complètement la navigation desktop */
    .tab-navigation {
        display: none;
    }
    
    /* Header mobile complètement supprimé */
    .mobile-header {
        display: none !important;
    }
    
    /* 🎨 Navigation mobile moderne style "floating pill" FIXE */
    .mobile-bottom-nav {
        display: flex !important;
        justify-content: center;
        align-items: center;
        position: fixed !important;
        bottom: 0 !important;
        left: 0 !important;
        right: 0 !important;
        background: transparent;
        padding: 1rem 1.5rem calc(1rem + env(safe-area-inset-bottom));
        z-index: 9999 !important;
        pointer-events: none;
    }
    
    /* Container flottant moderne */
    .mobile-nav-container {
        display: flex;
        background: rgba(255, 255, 255, 0.95);
        backdrop-filter: blur(20px);
        -webkit-backdrop-filter: blur(20px);
        border-radius: 25px;
        padding: 0.5rem;
        box-shadow: 0 8px 32px rgba(0, 0, 0, 0.12),
                    0 2px 8px rgba(0, 0, 0, 0.08);
        border: 1px solid rgba(255, 255, 255, 0.2);
        pointer-events: auto;
        position: relative;
        overflow: hidden;
        /* Optimisation pour les performances */
        will-change: transform;
        transform: translateZ(0);
    }
    
    /* Indicateur flottant animé */
    .mobile-nav-container::before {
        content: '';
        position: absolute;
        top: 0.5rem;
        bottom: 0.5rem;
        left: 0.5rem;
        width: calc(33.333% - 0.33rem);
        background: var(--mobile-nav-color, linear-gradient(135deg, #4299e1 0%, #667eea 100%));
        border-radius: 20px;
        transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
        transform: translateX(var(--nav-indicator-position, 0));
        z-index: 1;
        box-shadow: var(--mobile-nav-shadow, 0 4px 12px rgba(66, 153, 225, 0.3));
    }

    /* Couleurs de navigation mobile selon l'onglet actif - même système que desktop */
    .mobile-nav-container[data-active-tab="prochains-evenements"]::before {
        --mobile-nav-color: linear-gradient(135deg, #48bb78 0%, #38a169 100%);
        --mobile-nav-shadow: 0 4px 12px rgba(72, 187, 120, 0.3);
    }

    .mobile-nav-container[data-active-tab="programmes"]::before {
        --mobile-nav-color: linear-gradient(135deg, #4299e1 0%, #667eea 100%);
        --mobile-nav-shadow: 0 4px 12px rgba(66, 153, 225, 0.3);
    }

    .mobile-nav-container[data-active-tab="partitions"]::before {
        --mobile-nav-color: linear-gradient(135deg, #e53e3e 0%, #c53030 100%);
        --mobile-nav-shadow: 0 4px 12px rgba(229, 62, 62, 0.3);
    }
    
    .mobile-nav-item {
        display: flex;
        flex-direction: column;
        align-items: center;
        padding: 0.75rem 1rem;
        border-radius: 20px;
        transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
        cursor: pointer;
        flex: 1;
        min-width: 60px;
        position: relative;
        z-index: 2;
        background: transparent;
    }
    
    /* Pas d'arrière-plan pour l'état actif - l'indicateur s'en charge */
    .mobile-nav-item.active {
        background: transparent;
        transform: none;
        box-shadow: none;
    }
    
    .mobile-nav-icon {
        font-size: 1.4rem;
        margin-bottom: 0.25rem;
        transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    }
    
    /* Icônes toujours colorées, plus de blanc/gris */
    .mobile-nav-item.active .mobile-nav-icon {
        color: #ffffff;
        transform: scale(1.1);
    }
    
    .mobile-nav-item:not(.active) .mobile-nav-icon {
        color: #64748b;
        transform: scale(0.95);
    }
    
    .mobile-nav-label {
        font-size: 0.65rem;
        font-weight: 500;
        transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
        text-align: center;
        line-height: 1.2;
        opacity: 1;
    }
    
    .mobile-nav-item.active .mobile-nav-label {
        color: #ffffff;
        font-weight: 600;
        transform: translateY(-1px);
    }
    
    .mobile-nav-item:not(.active) .mobile-nav-label {
        color: #64748b;
        opacity: 0.8;
    }
    
    /* Effet hover/tap subtil */
    .mobile-nav-item:not(.active):active {
        transform: scale(0.98);
    }
    
    /* Header mobile simplifié */
    .mobile-header {
        display: flex;
        justify-content: space-between;
        align-items: center;
        padding: 1rem;
        background: #ffffff;
        border-bottom: 1px solid #e2e8f0;
        box-shadow: 0 1px 3px rgba(0, 0, 0, 0.05);
        position: sticky;
        top: 0;
        z-index: 100;
        backdrop-filter: blur(10px);
        -webkit-backdrop-filter: blur(10px);
    }
    
    /* Supprimer complètement la recherche mobile */
    .mobile-search {
        display: none !important;
    }
    
    .mobile-stats {
        display: flex;
        gap: 0.5rem;
        justify-content: center;
    }
    
    .mobile-stats .stat-item {
        min-width: 45px;
        padding: 0.3rem 0.5rem;
        font-size: 0.7rem;
    }
    
    /* Ajuster le contenu principal pour la navigation mobile */
    main {
        padding-bottom: 150px; /* Augmenté encore plus pour éviter que le contenu soit coupé */
        padding-top: 0;
        padding-left: 1rem;
        padding-right: 1rem;
    }
    
    /* Assurer que les sections spécifiques ont assez d'espace en bas */
    .partitions-section-clean,
    .tab-content {
        margin-bottom: 2rem;
    }
    
    /* Masquer le lecteur audio modal sur mobile */
    .audio-player {
        display: none !important;
    }
    
    .video-modal {
        display: none !important;
    }
    
    /* Masquer le bouton retour en haut sur mobile */
    .back-to-top {
        display: none !important;
    }
    
    /* Styles pour que les onglets desktop soient cachés sur mobile */
    .tab-content {
        display: none;
    }
    
    .tab-content.active {
        display: block;
    }
}

/* Main content */
main {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 2rem 2rem;
}

/* Modale vidéo YouTube */
.video-modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.4);
    backdrop-filter: blur(3px);
    -webkit-backdrop-filter: blur(3px);
    z-index: 1000;
    padding: 2rem;
    box-sizing: border-box;
    /* Toujours centré quand affiché */
    align-items: center;
    justify-content: center;
}

.video-modal.active {
    display: flex;
}

.video-modal-wrapper {
    position: relative;
    max-width: 900px;
    width: 100%;
}

.video-modal-content {
    background: #000000;
    border-radius: 12px;
    max-height: 80vh;
    overflow: hidden;
    box-shadow: 0 25px 50px rgba(0, 0, 0, 0.5);
}

.video-modal-header {
    display: none; /* Supprimé complètement */
}

.video-controls {
    position: absolute;
    top: -60px;
    right: 0;
    display: flex;
    gap: 0.75rem;
    z-index: 1001;
}

.control-btn {
    background: rgba(0, 0, 0, 0.6);
    color: white;
    border: none;
    width: 48px;
    height: 48px;
    border-radius: 50%;
    cursor: pointer;
    font-size: 1.1rem;
    transition: all 0.2s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.3);
    border: 1px solid rgba(255, 255, 255, 0.2);
}

.control-btn:hover {
    background: rgba(0, 0, 0, 0.8);
    transform: scale(1.05);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.4);
}

.video-container {
    position: relative;
    width: 100%;
    height: 450px;
    background: #000000;
    border-radius: 12px;
    overflow: hidden;
}

/* Mini-lecteur audio */
.audio-player {
    display: none;
    position: fixed;
    bottom: 2rem;
    right: 6rem; /* Décalé vers la gauche pour éviter le bouton retour en haut */
    background: rgba(45, 55, 72, 0.95);
    color: white;
    z-index: 100; /* Réduit pour ne pas interférer avec le scroll */
    border-radius: 16px;
    box-shadow: 0 12px 32px rgba(0, 0, 0, 0.3);
    max-width: 300px;
    /* Retirer backdrop-filter qui peut causer des problèmes de scroll */
    /* backdrop-filter: blur(15px);
    -webkit-backdrop-filter: blur(15px); */
    border: 1px solid rgba(255, 255, 255, 0.1);
    pointer-events: auto; /* S'assurer que les événements de pointeur fonctionnent */
    /* Assurer que l'élément ne bloque pas le scroll */
    will-change: transform;
    transform: translateZ(0); /* Forcer l'accélération matérielle */
}

.audio-player.active {
    display: flex;
    animation: slideInUp 0.3s ease;
}

.audio-player-content {
    display: flex;
    flex-direction: column;
    gap: 1rem;
    padding: 1.25rem;
}

.audio-info {
    text-align: center;
}

.audio-info span {
    font-weight: 500;
    color: #ffffff;
    font-size: 0.95rem;
    display: block;
    max-width: 220px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.audio-controls {
    display: flex;
    gap: 0.75rem;
    justify-content: center;
}

.audio-control-btn {
    background: linear-gradient(135deg, #4299e1 0%, #667eea 100%);
    color: white;
    border: none;
    width: 42px;
    height: 42px;
    border-radius: 50%;
    cursor: pointer;
    font-size: 1rem;
    transition: all 0.2s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 4px 12px rgba(66, 153, 225, 0.3);
}

.audio-control-btn:hover {
    background: linear-gradient(135deg, #3182ce 0%, #5a67d8 100%);
    transform: scale(1.1);
    box-shadow: 0 6px 16px rgba(66, 153, 225, 0.4);
}

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

/* Gestion des onglets */
.tab-content {
    display: none;
}

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

/* Sections vides */
.empty-section {
    background: #f7fafc;
    border: 2px dashed #cbd5e0;
    text-align: center;
}

.empty-content {
    padding: 2rem;
}

.empty-content p {
    margin: 0.5rem 0;
    color: #718096;
}

.empty-content p:first-child {
    font-size: 1.1rem;
    font-weight: 600;
    color: #4a5568;
}

/* Sections */
/* 🧪 TEST DESIGN - Section sans fond blanc */
.concert-section {
    margin-bottom: 2.5rem; /* Réduit de 3rem à 2.5rem */
    background: transparent; /* 🧪 RETIRÉ: #ffffff */
    border-radius: 0; /* 🧪 RETIRÉ: 12px */
    padding: 0;
    box-shadow: none; /* 🧪 RETIRÉ: 0 1px 3px rgba(0, 0, 0, 0.05) */
    border: none; /* 🧪 RETIRÉ: 1px solid #e2e8f0 */
    overflow: visible; /* 🧪 CHANGÉ: de hidden à visible */
}

/* Espacement spécial pour la première section dans l'onglet programmes */
#programmes-content .concert-section:first-child {
    margin-top: 1rem; /* Réduit de 2rem à 1rem pour un espacement plus compact */
}

/* Espacement encore plus réduit sur mobile pour l'onglet programmes */
@media (max-width: 768px) {
    #programmes-content .concert-section:first-child {
        margin-top: 0.5rem; /* Espacement minimal sur mobile */
    }
}

/* 🧪 TEST DESIGN - Header de section épuré */
.section-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 1.75rem;
    flex-wrap: wrap;
    gap: 1rem;
    background: transparent; /* 🧪 RETIRÉ: #f8fafc */
    padding: 1rem 0; /* 🧪 RÉDUIT: de 1.5rem 2rem à 1rem 0 */
    border-radius: 0; /* 🧪 RETIRÉ: 8px */
    box-shadow: none; /* 🧪 RETIRÉ: 0 1px 3px rgba(0, 0, 0, 0.05) */
    position: relative;
    overflow: visible; /* 🧪 CHANGÉ: de hidden à visible */
}

.section-header h2 {
    color: #2d3748;
    font-size: 2rem;
    margin: 0;
    text-align: left;
    position: relative;
    font-weight: 600;
    letter-spacing: -0.025em;
    flex: 1;
    line-height: 1.2;
    z-index: 1;
}

.section-header h2:after {
    content: '';
    position: absolute;
    bottom: -10px;
    left: var(--trait-left-position, 0px);
    width: 60px;
    height: 3px;
    background: #4299e1;
    border-radius: 2px;
}

/* Bouton de téléchargement PDF */
.pdf-download-btn {
    background: linear-gradient(135deg, #4299e1 0%, #667eea 100%);
    color: white;
    border: none;
    padding: 0.75rem 1.5rem;
    border-radius: 8px;
    font-size: 0.95rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    box-shadow: 0 2px 8px rgba(66, 153, 225, 0.3);
    white-space: nowrap;
    height: fit-content;
    margin-top: 0.15rem;
    flex-shrink: 0;
    position: relative;
    z-index: 1;
}

.pdf-download-btn:hover {
    background: linear-gradient(135deg, #3182ce 0%, #5a67d8 100%);
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(66, 153, 225, 0.4);
}

.pdf-download-btn:active {
    transform: translateY(0);
}

/* Anciens styles pour h2 dans les sections sans header */
.concert-section h2 {
    color: #2d3748;
    font-size: 2rem;
    margin-bottom: 2rem;
    text-align: left;
    position: relative;
    font-weight: 600;
    letter-spacing: -0.025em;
    padding: 1.25rem 0;
    background: transparent;
    border-radius: 0;
    box-shadow: none;
    border-left: none;
    display: inline-block;
}

/* Nouvelle bande bleue étendue pour les titres de sections */
.concert-section h2::before {
    /* Suppression de l'arrière-plan */
    display: none;
}

.concert-section h2:after {
    /* Trait bleu centré sous le texte */
    content: '';
    display: block;
    width: 60px;
    height: 3px;
    background: #4299e1;
    border-radius: 2px;
    margin: 8px auto 0;
}

/* Grid des pièces */
.pieces-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(350px, 1fr));
    gap: 1.5rem; /* Réduit de 2rem à 1.5rem pour un espacement plus équilibré */
    padding: 1.5rem 2rem 2rem; /* Padding ajusté : moins en haut, normal sur les côtés */
}

/* Cartes des pièces */
/* 🧪 TEST DESIGN - Cartes avec fond renforcé */
.piece-card {
    background: #ffffff; /* Gardé pour contraste */
    border-radius: 12px; /* 🧪 AUGMENTÉ: de 10px à 12px */
    padding: 1.5rem;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08); /* 🧪 RENFORCÉ: ombre plus visible */
    border: 1px solid #e2e8f0;
    transition: all 0.2s ease;
    position: relative;
    overflow: hidden;
}

.piece-card:before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: #4299e1;
}

.piece-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.12); /* 🧪 RENFORCÉ: ombre plus marquée */
    border-color: #cbd5e0;
}

.piece-card h3 {
    color: #2d3748;
    font-size: 1.3rem; /* Légèrement réduit de 1.4rem à 1.3rem */
    margin-bottom: 1rem; /* Réduit de 1.2rem à 1rem */
    font-weight: 600;
    line-height: 1.3;
}

.piece-card p {
    margin-bottom: 0.7rem; /* Réduit de 0.8rem à 0.7rem */
    font-size: 0.95rem;
    color: #4a5568;
    line-height: 1.5;
}

.piece-card strong {
    color: #2d3748;
    font-weight: 600;
}

/* Liens */
.links {
    display: flex;
    gap: 1rem;
    margin-top: 1.25rem; /* Réduit de 1.5rem à 1.25rem */
    flex-wrap: wrap;
}

.links a {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.75rem 1.25rem;
    background: linear-gradient(135deg, #4299e1 0%, #667eea 100%);
    color: white;
    text-decoration: none;
    border-radius: 8px;
    font-size: 0.9rem;
    font-weight: 500;
    transition: all 0.2s ease;
    border: 1px solid transparent;
    box-shadow: 0 2px 8px rgba(66, 153, 225, 0.3);
}

.links a svg {
    flex-shrink: 0;
    width: 16px;
    height: 16px;
}

.links a:hover {
    background: linear-gradient(135deg, #3182ce 0%, #5a67d8 100%);
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(66, 153, 225, 0.4);
}

/* Section financement */
.funding-section {
    background: #ffffff;
    border-radius: 12px;
    padding: 2.5rem;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.05);
    border: 1px solid #e2e8f0;
    border-left: 4px solid #48bb78;
}

.funding-section h2 {
    color: #2d3748;
    font-size: 2.2rem;
    margin-bottom: 2.5rem;
    text-align: center;
    position: relative;
    font-weight: 600;
    letter-spacing: -0.025em;
}

.funding-section h2:after {
    content: '';
    position: absolute;
    bottom: -12px;
    left: 50%;
    transform: translateX(-50%);
    width: 60px;
    height: 3px;
    background: #48bb78;
    border-radius: 2px;
}

/* Styles sobres et élégants pour l'onglet Partitions */

/* Message principal d'avertissement */
.main-notice {
    background: linear-gradient(135deg, #fff5f5 0%, #fed7d7 100%);
    border-left: 4px solid #e53e3e;
    border-radius: 12px;
    padding: 2rem;
    margin: 2rem 0 3rem 0;
    box-shadow: 0 4px 15px rgba(229, 62, 62, 0.1);
}

.notice-header {
    display: flex;
    align-items: center;
    gap: 1rem;
    margin-bottom: 1.5rem;
}

.notice-icon {
    font-size: 1.8rem;
}

.notice-header h3 {
    color: #c53030;
    font-size: 1.4rem;
    font-weight: 600;
    margin: 0;
}

.notice-text p {
    color: #742a2a;
    font-size: 1.1rem;
    line-height: 1.7;
    margin: 0;
    font-weight: 500;
}

/* Section des exemples */
.examples-section {
    margin: 3rem 0;
}

.examples-title {
    display: flex;
    align-items: center;
    gap: 1rem;
    color: #2d3748;
    font-size: 1.3rem;
    font-weight: 600;
    margin: 0 0 2rem 0;
    padding-bottom: 0.8rem;
    border-bottom: 2px solid #e2e8f0;
}

.examples-icon {
    font-size: 1.5rem;
}

/* Cartes d'exemples */
.example-card {
    background: white;
    border-radius: 15px;
    padding: 2rem;
    margin: 2rem 0;
    box-shadow: 0 6px 20px rgba(0,0,0,0.08);
    border: 2px solid transparent;
    transition: all 0.3s ease;
}

.example-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(0,0,0,0.12);
}

.restrictive {
    border-color: #fed7d7;
    background: linear-gradient(135deg, #fff5f5 0%, #fffbfb 100%);
}

.flexible {
    border-color: #c6f6d5;
    background: linear-gradient(135deg, #f0fff4 0%, #fafffe 100%);
}

.example-content p {
    color: #2d3748;
    font-size: 1.05rem;
    line-height: 1.6;
    margin: 0 0 1.5rem 0;
}

/* Affichage des formules */
.formula-display {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 1.5rem;
    background: rgba(255, 255, 255, 0.7);
    padding: 1.5rem;
    border-radius: 12px;
    margin: 1.5rem 0;
    flex-wrap: wrap;
}

.copies-info {
    background: #4a5568;
    color: white;
    padding: 0.6rem 1.2rem;
    border-radius: 20px;
    font-weight: 600;
    font-family: 'Courier New', monospace;
    font-size: 0.95rem;
    box-shadow: 0 3px 10px rgba(74, 85, 104, 0.2);
}

.arrow {
    font-size: 1.5rem;
    color: #4a5568;
    font-weight: bold;
}

.result {
    background: #667eea;
    color: white;
    padding: 0.6rem 1.2rem;
    border-radius: 20px;
    font-weight: 600;
    text-align: center;
    box-shadow: 0 3px 10px rgba(102, 126, 234, 0.2);
    flex: 1;
    min-width: 220px;
}

/* Détails d'usage */
.usage-details {
    margin-top: 1.5rem;
    padding: 1rem 1.5rem;
    background: rgba(255, 255, 255, 0.6);
    border-radius: 10px;
    border-left: 3px solid #48bb78;
}

.usage-details p {
    color: #2d3748;
    font-style: italic;
    margin: 0;
    font-size: 1rem;
    line-height: 1.5;
}

/* Section téléchargement (conservée) */
.download-section {
    margin: 3rem 0;
}

.download-card {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    border-radius: 20px;
    padding: 2.5rem;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 2rem;
    box-shadow: 0 15px 40px rgba(102, 126, 234, 0.3);
    position: relative;
    overflow: hidden;
}

.download-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 100 100"><circle cx="20" cy="20" r="2" fill="rgba(255,255,255,0.1)"/><circle cx="80" cy="40" r="1.5" fill="rgba(255,255,255,0.1)"/><circle cx="40" cy="80" r="1" fill="rgba(255,255,255,0.1)"/></svg>');
    pointer-events: none;
}

.download-info {
    display: flex;
    align-items: center;
    gap: 2rem;
    color: white;
    position: relative;
    z-index: 1;
}

.download-icon {
    font-size: 3rem;
    filter: drop-shadow(2px 2px 4px rgba(0,0,0,0.3));
}

.download-text h4 {
    font-size: 1.5rem;
    margin: 0 0 0.5rem 0;
    font-weight: 600;
}

.download-text p {
    margin: 0;
    opacity: 0.9;
    font-size: 1rem;
}

.partitions-button {
    background: rgba(255, 255, 255, 0.2);
    backdrop-filter: blur(10px);
    border: 2px solid rgba(255, 255, 255, 0.3);
    color: white;
    text-decoration: none;
    padding: 1rem 2rem;
    border-radius: 15px;
    display: flex;
    align-items: center;
    gap: 1rem;
    font-weight: 600;
    font-size: 1.1rem;
    transition: all 0.3s ease;
    position: relative;
    z-index: 1;
}

.partitions-button:hover {
    background: rgba(255, 255, 255, 0.3);
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.2);
    text-decoration: none;
    color: white;
}

.button-arrow {
    font-size: 1.2rem;
    transition: transform 0.3s ease;
}

.partitions-button:hover .button-arrow {
    transform: translateX(5px);
}

/* Responsive design */
@media (max-width: 768px) {
    .main-notice, .example-card {
        padding: 1.5rem;
    }
    
    .formula-display {
        flex-direction: column;
        text-align: center;
        gap: 1rem;
    }
    
    .examples-title {
        flex-direction: column;
        text-align: center;
        gap: 0.5rem;
    }
    
    .download-card {
        flex-direction: column;
        text-align: center;
        padding: 2rem;
    }
}
.partitions-main-text {
    background: #fff5f5;
    border-left: 4px solid #e53e3e;
    padding: 2rem;
    margin: 2rem 0;
    border-radius: 8px;
    font-size: 1.1rem;
    line-height: 1.6;
}

.partitions-main-text p {
    margin-bottom: 1.5rem;
    color: #2d3748;
}

.partitions-main-text p:last-child {
    margin-bottom: 0;
}

.highlight {
    background: #fed7aa;
    padding: 0.2rem 0.5rem;
    border-radius: 4px;
    font-weight: 600;
    color: #c05621;
}

.download-section {
    text-align: center;
    margin: 2rem 0;
}

.partitions-link {
    display: inline-block;
    background: linear-gradient(135deg, #48bb78 0%, #38a169 100%);
    color: white;
    text-decoration: none;
    padding: 1rem 2rem;
    border-radius: 8px;
    font-size: 1.1rem;
    font-weight: 600;
    transition: all 0.3s ease;
    box-shadow: 0 4px 15px rgba(72, 187, 120, 0.3);
}

.partitions-link:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(72, 187, 120, 0.4);
    text-decoration: none;
    color: white;
}

/* Section partitions existante - nettoyage */
.download-section {
    text-align: center;
    margin: 2rem 0;
}

.download-button-container {
    margin: 2rem 0;
}

.partitions-download-btn {
    display: inline-block;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    text-decoration: none;
    padding: 1.2rem 2.5rem;
    border-radius: 10px;
    font-size: 1.2rem;
    font-weight: 600;
    transition: all 0.3s ease;
    box-shadow: 0 4px 15px rgba(102, 126, 234, 0.3);
}

.partitions-download-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(102, 126, 234, 0.4);
    text-decoration: none;
    color: white;
}

.instructions-section {
    background: #fff5f5;
    border: 2px solid #fc8181;
    border-radius: 12px;
    padding: 2rem;
    margin: 2rem 0;
    border-left: 5px solid #e53e3e;
}

.instructions-section h3 {
    color: #c53030;
    font-size: 1.5rem;
    margin-bottom: 1.5rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.instruction-text p {
    color: #2d3748;
    line-height: 1.6;
    margin-bottom: 1.5rem;
    font-size: 1rem;
}

.instruction-text p:last-child {
    margin-bottom: 0;
}

/* Section partitions - Version sobre et élégante */
.partitions-section-clean {
    background: transparent; /* Retiré le fond blanc pour cohérence avec les autres onglets */
    border-radius: 12px;
    padding: 3rem;
    box-shadow: none; /* Retiré l'ombre qui n'a plus de sens sans fond */
    border: none; /* Retiré la bordure pour un look plus épuré */
    max-width: 900px;
    margin: 0 auto;
}

.partitions-header {
    text-align: center;
    margin-bottom: 3rem;
    padding-bottom: 1.5rem;
    border-bottom: 2px solid #f7fafc;
}

.partitions-header h2 {
    color: #2d3748;
    font-size: 2.2rem;
    font-weight: 600;
    margin: 0;
    letter-spacing: -0.025em;
}

.partitions-content-clean {
    line-height: 1.7;
}

/* Section d'avertissement */
.warning-section {
    background: #fff5f5;
    border: 1px solid #fed7d7;
    border-left: 4px solid #e53e3e;
    border-radius: 8px;
    padding: 2rem;
    margin-bottom: 2.5rem;
}

.warning-header {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    margin-bottom: 1rem;
}

.warning-icon {
    font-size: 1.5rem;
    color: #e53e3e;
    display: flex;
    align-items: center;
    justify-content: center;
}

.warning-icon svg {
    width: 1.5rem;
    height: 1.5rem;
    fill: #e53e3e;
}

.warning-header h3 {
    color: #c53030;
    font-size: 1.3rem;
    font-weight: 600;
    margin: 0;
}

.warning-text p {
    color: #742a2a;
    font-size: 1.05rem;
    font-weight: 500;
    margin: 0;
    line-height: 1.6;
}

/* Section des exemples */
.examples-section-clean {
    margin-bottom: 2.5rem;
}

.examples-section-clean h4 {
    color: #2d3748;
    font-size: 1.2rem;
    font-weight: 600;
    margin-bottom: 1.5rem;
    padding-bottom: 0.5rem;
    border-bottom: 1px solid #e2e8f0;
}

.example-item {
    background: #ffffff; /* Fond blanc pour meilleure lisibilité */
    border: 1px solid #e2e8f0;
    border-radius: 8px;
    padding: 1.5rem;
    margin-bottom: 1rem;
}

.example-item:last-child {
    margin-bottom: 0;
}

.example-item p {
    color: #2d3748;
    font-size: 1rem;
    margin: 0;
    line-height: 1.6;
}

.example-item strong {
    color: #1a202c;
    font-weight: 600;
}

/* Section d'accès */
.access-section {
    margin-top: 2.5rem;
}

.access-card {
    background: #ffffff; /* Fond blanc pour meilleure lisibilité */
    border: 1px solid #e2e8f0;
    border-radius: 12px;
    padding: 2rem;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 2rem;
    transition: all 0.2s ease;
}

.access-card:hover {
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
    border-color: #cbd5e0;
}

.access-info {
    display: flex;
    align-items: center;
    gap: 1.5rem;
}

.folder-icon {
    font-size: 2.5rem;
    color: #4299e1;
    display: flex;
    align-items: center;
    justify-content: center;
}

.folder-icon svg {
    width: 2.5rem;
    height: 2.5rem;
    fill: #4299e1;
}

.access-text h4 {
    color: #2d3748;
    font-size: 1.3rem;
    font-weight: 600;
    margin: 0 0 0.5rem 0;
}

.access-text p {
    color: #4a5568;
    font-size: 1rem;
    margin: 0;
    line-height: 1.5;
}

.access-button {
    background: linear-gradient(135deg, #4299e1 0%, #667eea 100%);
    color: white;
    text-decoration: none;
    padding: 1rem 2rem;
    border-radius: 8px;
    font-size: 1rem;
    font-weight: 600;
    transition: all 0.2s ease;
    white-space: nowrap;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    box-shadow: 0 2px 8px rgba(66, 153, 225, 0.3);
}

.access-button:hover {
    background: linear-gradient(135deg, #3182ce 0%, #5a67d8 100%);
    color: white;
    text-decoration: none;
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(66, 153, 225, 0.4);
}

/* Responsive pour la section partitions clean */
@media (max-width: 768px) {
    .partitions-section-clean {
        padding: 2rem;
        margin: 0;
        max-width: none;
        border-radius: 0;
    }
    
    .partitions-header h2 {
        font-size: 1.8rem;
    }
    
    .access-card {
        flex-direction: column;
        text-align: center;
        gap: 1.5rem;
    }
    
    .access-info {
        flex-direction: column;
        text-align: center;
        gap: 1rem;
    }
}

@media (max-width: 480px) {
    .partitions-section-clean {
        padding: 1.5rem;
        margin: 0;
    }
    
    .partitions-header {
        margin-bottom: 2rem;
    }
    
    .partitions-header h2 {
        font-size: 1.6rem;
    }
    
    .warning-section {
        padding: 1.5rem;
    }
    
    .warning-header {
        flex-direction: column;
        text-align: center;
        gap: 0.5rem;
    }
    
    .warning-header h3 {
        font-size: 1.1rem;
    }
    
    .warning-text p {
        font-size: 1rem;
    }
    
    .example-item {
        padding: 1.2rem;
    }
    
    .example-item p {
        font-size: 0.95rem;
    }
    
    .access-button {
        padding: 0.8rem 1.5rem;
        font-size: 0.95rem;
    }
}

.partitions-card {
    background: #fff8e1;
    border: 2px solid #ffc107;
    border-radius: 12px;
    padding: 2rem;
    margin-bottom: 2rem;
    position: relative;
}

.partitions-card h3 {
    color: #d69e2e;
    font-size: 1.5rem;
    margin-bottom: 1rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.warning-content p {
    color: #2d3748;
    line-height: 1.6;
    margin-bottom: 1rem;
    font-size: 1rem;
}

.warning-content p:last-child {
    margin-bottom: 0;
}

.download-section {
    margin: 2rem 0;
}

.download-section h3 {
    color: #2d3748;
    font-size: 1.8rem;
    margin-bottom: 1.5rem;
    font-weight: 600;
}

.download-card {
    background: #f7fafc;
    border: 1px solid #e2e8f0;
    border-radius: 12px;
    padding: 2rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 2rem;
}

.download-info h4 {
    color: #2d3748;
    font-size: 1.3rem;
    margin-bottom: 0.5rem;
    font-weight: 600;
}

.download-info p {
    color: #4a5568;
    line-height: 1.5;
    margin: 0;
}

.download-btn {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    padding: 1rem 2rem;
    border-radius: 8px;
    text-decoration: none;
    font-weight: 600;
    font-size: 1.1rem;
    transition: all 0.3s ease;
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    white-space: nowrap;
}

.download-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(102, 126, 234, 0.4);
    text-decoration: none;
    color: white;
}

/* Nouveaux styles pour les instructions d'impression */
.partitions-header {
    text-align: center;
    margin-bottom: 3rem;
}

.partitions-subtitle {
    color: #666;
    font-size: 1.1rem;
    margin: 0.5rem 0 0 0;
    font-style: italic;
}

.partitions-access-card {
    background: #ffffff;
    border-radius: 15px;
    padding: 2rem;
    margin-bottom: 2rem;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
    display: flex;
    align-items: center;
    gap: 2rem;
    border: 2px solid #e2e8f0;
}

.access-card-icon .icon-large {
    font-size: 3rem;
}

.access-card-content h3 {
    color: #2d3748;
    font-size: 1.8rem;
    margin-bottom: 1rem;
    font-weight: 600;
}

.access-card-content p {
    color: #4a5568;
    margin-bottom: 1.5rem;
    line-height: 1.6;
}

.drive-button {
    display: inline-flex;
    align-items: center;
    gap: 0.75rem;
    background: linear-gradient(135deg, #48bb78 0%, #38a169 100%);
    color: white;
    text-decoration: none;
    padding: 1rem 2rem;
    border-radius: 50px;
    font-weight: 600;
    transition: all 0.3s ease;
    box-shadow: 0 4px 15px rgba(72, 187, 120, 0.3);
}

.drive-button:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(72, 187, 120, 0.4);
    text-decoration: none;
    color: white;
}

.button-icon {
    font-size: 1.2rem;
}

.button-arrow {
    transition: transform 0.3s ease;
}

.drive-button:hover .button-arrow {
    transform: translateX(3px);
}

.printing-instructions {
    background: #fff5f5;
    border: 2px solid #fc8181;
    border-radius: 15px;
    padding: 2rem;
    margin-bottom: 2rem;
}

.instruction-header {
    display: flex;
    align-items: center;
    gap: 1rem;
    margin-bottom: 1.5rem;
}

.warning-icon {
    font-size: 2rem;
    animation: pulse 2s infinite;
}

@keyframes pulse {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.7; }
}

.instruction-header h3 {
    color: #c53030;
    font-size: 1.6rem;
    margin: 0;
    font-weight: 700;
}

.main-rule {
    background: #fed7d7;
    padding: 1.5rem;
    border-radius: 10px;
    margin-bottom: 2rem;
    border-left: 5px solid #e53e3e;
}

.main-rule p {
    color: #742a2a;
    font-size: 1.1rem;
    margin: 0;
    line-height: 1.6;
}

.examples-section h4 {
    color: #2d3748;
    font-size: 1.4rem;
    margin-bottom: 1.5rem;
    font-weight: 600;
}

.example-card {
    background: white;
    border: 1px solid #e2e8f0;
    border-radius: 12px;
    padding: 1.5rem;
    margin-bottom: 1.5rem;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
}

.example-scenario {
    display: flex;
    align-items: flex-start;
    gap: 1rem;
}

.scenario-icon {
    font-size: 2rem;
    flex-shrink: 0;
    margin-top: 0.25rem;
}

.scenario-text p {
    color: #2d3748;
    margin-bottom: 1rem;
    line-height: 1.6;
}

.scenario-text ul {
    margin: 0;
    padding-left: 1.5rem;
}

.scenario-text li {
    color: #4a5568;
    margin-bottom: 0.5rem;
    line-height: 1.5;
}

.highlight {
    background: #fed7aa;
    padding: 0.2rem 0.5rem;
    border-radius: 4px;
    font-weight: 600;
    color: #c05621;
}

.copyright-notice-modern {
    background: #f7fafc;
    border: 1px solid #e2e8f0;
    border-radius: 12px;
    padding: 2rem;
    border-left: 4px solid #805ad5;
}

.copyright-header {
    display: flex;
    align-items: center;
    gap: 1rem;
    margin-bottom: 1.5rem;
}

.copyright-icon {
    font-size: 1.8rem;
}

.copyright-header h3 {
    color: #2d3748;
    font-size: 1.5rem;
    margin: 0;
    font-weight: 600;
}

.copyright-text p {
    color: #4a5568;
    line-height: 1.6;
    margin-bottom: 1.5rem;
}

.engagement-section {
    background: #e6fffa;
    padding: 1.5rem;
    border-radius: 8px;
    display: flex;
    align-items: center;
    gap: 1rem;
    border: 1px solid #81e6d9;
}

.engagement-icon {
    font-size: 1.5rem;
    flex-shrink: 0;
}

.engagement-section p {
    margin: 0;
    color: #234e52;
    font-weight: 500;
}

.usage-tips {
    margin-top: 2rem;
}

.usage-tips h3 {
    color: #2d3748;
    font-size: 1.8rem;
    margin-bottom: 1.5rem;
    font-weight: 600;
}

.tips-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 1.5rem;
}

.tip-card {
    background: #ffffff;
    border: 1px solid #e2e8f0;
    border-radius: 10px;
    padding: 1.5rem;
    transition: all 0.3s ease;
}

.tip-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

.tip-card h4 {
    color: #2d3748;
    font-size: 1.1rem;
    margin-bottom: 0.8rem;
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.tip-card p {
    color: #4a5568;
    line-height: 1.5;
    margin: 0;
    font-size: 0.95rem;
}

/* Table */
.funding-table {
    overflow-x: auto;
    margin-top: 2rem;
}

table {
    width: 100%;
    border-collapse: collapse;
    background: #ffffff;
    border-radius: 10px;
    overflow: hidden;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.05);
    border: 1px solid #e2e8f0;
}

thead {
    background: #48bb78;
    color: white;
}

th {
    padding: 1.2rem 1rem;
    text-align: left;
    font-weight: 600;
    font-size: 0.9rem;
    letter-spacing: 0.025em;
}

td {
    padding: 1rem;
    border-bottom: 1px solid #e2e8f0;
    font-size: 0.9rem;
    color: #4a5568;
}

tr:nth-child(even) {
    background-color: #f7fafc;
}

tbody tr:hover {
    background-color: #edf2f7;
}

/* Responsive design */
@media (max-width: 768px) {
    .header-content {
        padding: 0 1rem;
    }
    
    header h1 {
        font-size: 1.8rem;
    }
    
    .tab-container {
        flex-direction: column;
        gap: 1rem;
        padding: 1rem;
    }
    
    .tab-buttons {
        width: 100%;
        justify-content: center;
    }
    
    .tab-button {
        text-align: center;
        border-bottom: none;
        border-right: 3px solid transparent;
    }
    
    .tab-button.active {
        border-right-color: #4299e1;
    }
    
    .search-container {
        width: 100%;
    }
    
    .search-input {
        width: 100%;
    }
    
    .pieces-grid {
        grid-template-columns: 1fr;
        padding: 1rem 1.5rem 1.5rem; /* Ajustement pour mobile : moins en haut */
        gap: 1.25rem; /* Légèrement réduit pour mobile */
    }
    
    main {
        padding: 0 1rem 2rem;
    }
    
    .concert-section {
        padding: 0;
        margin-bottom: 2rem; /* Réduit pour mobile */
    }
    
    .links {
        justify-content: center;
    }
    
    table {
        font-size: 0.8rem;
    }
    
    th, td {
        padding: 0.5rem;
    }
    
    /* Responsive pour la section partitions */
    .partitions-section {
        padding: 1.5rem;
    }
    
    .partitions-card {
        padding: 1.5rem;
    }
    
    .download-card {
        flex-direction: column;
        text-align: center;
        gap: 1.5rem;
    }
    
    .download-btn {
        padding: 0.8rem 1.5rem;
        font-size: 1rem;
    }
    
    .tips-grid {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 480px) {
    header h1 {
        font-size: 1.5rem;
    }
    
    .tab-button {
        padding: 0.75rem 1rem;
        font-size: 0.9rem;
    }
    
    .concert-section h2 {
        font-size: 1.4rem;
        padding: 1rem 1.25rem;
        margin-bottom: 1.5rem;
    }
    
    /* Responsive pour les en-têtes de section avec boutons PDF */
    .section-header {
        flex-direction: column;
        align-items: stretch;
        gap: 1.25rem; /* Réduit de 1.5rem */
        padding: 1.25rem 1.5rem; /* Ajustement padding pour mobile */
        margin-bottom: 1.5rem; /* Réduit pour mobile */
    }
    
    .section-header h2 {
        text-align: center;
        font-size: 1.4rem; /* Légèrement réduit de 1.5rem */
        padding-top: 0;
    }
    
    .pdf-download-btn {
        align-self: center;
        font-size: 0.9rem;
        padding: 0.7rem 1.3rem;
        margin-top: 0;
    }
    
    /* Responsive spécifique pour la section partitions */
    .partitions-section {
        padding: 1rem;
    }
    
    .partitions-section h2 {
        font-size: 1.8rem;
    }
    
    .partitions-card {
        padding: 1.2rem;
    }
    
    .partitions-card h3 {
        font-size: 1.2rem;
    }
    
    .warning-content p {
        font-size: 0.9rem;
    }
    
    .download-section h3,
    .usage-tips h3 {
        font-size: 1.5rem;
    }
    
    .download-btn {
        padding: 0.8rem 1.2rem;
        font-size: 0.9rem;
    }
     .piece-card {
        padding: 1rem;
    }
    
    /* Protection supplémentaire pour les très petits écrans */
    .piece-item h5 {
        padding-right: 40px; /* Plus d'espace pour éviter la superposition */
        font-size: 0.95rem; /* Texte légèrement plus petit */
    }
    
    .piece-click-indicator {
        right: 6px !important; /* Encore plus près du bord */
        font-size: 0.9rem !important; /* Flèche plus petite */
    }

    .links a {
        font-size: 0.8rem;
        padding: 0.4rem 0.8rem;
    }
    
    /* Responsive pour la modale vidéo */
    .video-modal {
        padding: 1rem;
    }
    
    .video-modal-content {
        max-height: 90vh;
    }
    
    .video-controls {
        top: -50px;
        right: 0;
        gap: 0.5rem;
    }
    
    .control-btn {
        width: 42px;
        height: 42px;
        font-size: 1rem;
    }
    
    .video-container {
        height: 250px;
    }
    
    /* Responsive pour le mini-lecteur */
    .audio-player {
        bottom: 1rem;
        right: 1rem; /* Sur mobile, on garde la position normale car moins de place */
        max-width: 260px;
    }
    
    .audio-player-content {
        padding: 1rem;
        gap: 0.75rem;
    }
    
    .audio-info span {
        font-size: 0.85rem;
        max-width: 180px;
    }
    
    .audio-control-btn {
        width: 38px;
        height: 38px;
        font-size: 0.9rem;
    }
}

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

/* Animation pour première visite seulement - sera activée par JavaScript */
.concert-section.animate-first-visit {
    animation: fadeInUp 0.6s ease-out;
}

/* Scroll behavior */
html {
    scroll-behavior: smooth;
}

/* Highlight effect for sections */
section:target {
    animation: highlight 2s ease-in-out;
}

@keyframes highlight {
    0% { background-color: rgba(66, 153, 225, 0.1); }
    50% { background-color: rgba(66, 153, 225, 0.05); }
    100% { background-color: transparent; }
}

/* Styles pour la recherche */
.piece-card.search-match {
    /* Pas de bordure bleue, juste un léger effet de mise en valeur */
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
    transform: translateY(-1px);
    transition: all 0.3s ease;
}

/* ========================================
   STYLES POUR LES PROCHAINS ÉVÉNEMENTS
   ======================================== */

/* Section principale des événements */
.next-events-section {
    max-width: 1200px;
    margin: 0 auto;
    padding: 2rem;
}

/* Carte de l'événement principal - Design épuré et compact */
.main-next-event {
    background: white;
    border-radius: 16px;
    padding: 1.5rem;
    margin-bottom: 3rem;
    border: 2px solid #e2e8f0;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.05);
    position: relative;
    overflow: hidden;
}

/* ========================================
   COULEURS SPÉCIFIQUES SELON L'ONGLET ACTIF
   ======================================== */

/* 🟢 ONGLET ÉVÉNEMENTS - Couleurs vertes */
/* Seulement la carte principale en vert */
#prochains-evenements .main-next-event::before {
    background: linear-gradient(90deg, #48bb78, #38a169) !important;
}

/* Les lignes verticales des pièces en vert */
#prochains-evenements .piece-item {
    border-left-color: #48bb78 !important;
}

/* Bouton d'ajout au calendrier en vert avec le même dégradé que l'onglet */
#prochains-evenements .add-to-calendar-btn {
    background: linear-gradient(135deg, #48bb78 0%, #38a169 100%) !important;
    box-shadow: 0 2px 4px rgba(72, 187, 120, 0.3) !important;
}

#prochains-evenements .add-to-calendar-btn:hover {
    background: linear-gradient(135deg, #38a169 0%, #2f855a 100%) !important;
    box-shadow: 0 4px 8px rgba(72, 187, 120, 0.4) !important;
}

/* Les mini-cartes gardent leurs couleurs d'origine selon le type d'événement */
/* (pas de surcharge, elles utilisent les couleurs définies plus bas dans le CSS) */

/* ========================================
   BOUTON RETOUR EN HAUT - COULEURS DYNAMIQUES
   ======================================== */

/* 🟢 ONGLET ÉVÉNEMENTS - Bouton vert */
.tab-buttons[data-active-tab="prochains-evenements"] ~ * .back-to-top,
body:has(.tab-buttons[data-active-tab="prochains-evenements"]) .back-to-top {
    --back-to-top-bg: linear-gradient(135deg, #48bb78 0%, #38a169 100%);
    --back-to-top-shadow: 0 4px 12px rgba(72, 187, 120, 0.3);
}

/* 🔵 ONGLET PROGRAMMES - Bouton bleu (par défaut) */
.tab-buttons[data-active-tab="programmes"] ~ * .back-to-top,
body:has(.tab-buttons[data-active-tab="programmes"]) .back-to-top {
    --back-to-top-bg: linear-gradient(135deg, #4299e1 0%, #667eea 100%);
    --back-to-top-shadow: 0 4px 12px rgba(66, 153, 225, 0.3);
}

/* 🔴 ONGLET PARTITIONS - Bouton rouge */
.tab-buttons[data-active-tab="partitions"] ~ * .back-to-top,
body:has(.tab-buttons[data-active-tab="partitions"]) .back-to-top {
    --back-to-top-bg: linear-gradient(135deg, #e53e3e 0%, #c53030 100%);
    --back-to-top-shadow: 0 4px 12px rgba(229, 62, 62, 0.3);
}

/* Style hover pour le bouton retour en haut */
.back-to-top:hover {
    transform: translateY(-3px) scale(1.05);
    filter: brightness(1.1);
}

/* 🔵 ONGLET PROGRAMMES - Couleurs bleues (inchangées, pour référence) */
#programmes .section-header h2:after,
#programmes .concert-section h2:after {
    background: #4299e1;
}

#programmes .piece-card:before {
    background: #4299e1;
}

/* 🔴 ONGLET PARTITIONS - Couleurs rouges */
#partitions .partitions-header h2:after,
#partitions .warning-section {
    border-left-color: #e53e3e;
}

/* Bouton "Ouvrir le Drive" en rouge avec dégradé */
#partitions .access-button {
    background: linear-gradient(135deg, #e53e3e 0%, #c53030 100%) !important;
    box-shadow: 0 2px 8px rgba(229, 62, 62, 0.3) !important;
}

#partitions .access-button:hover {
    background: linear-gradient(135deg, #c53030 0%, #9c2c2c 100%) !important;
    box-shadow: 0 4px 12px rgba(229, 62, 62, 0.4) !important;
}

/* Icône de dossier en rouge */
#partitions .folder-icon {
    color: #e53e3e !important;
}

#partitions .folder-icon svg {
    fill: #e53e3e !important;
}

.main-next-event::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: linear-gradient(90deg, #667eea, #764ba2);
}

.main-event-content {
    position: relative;
    z-index: 1;
}

/* Header avec indicateur live en haut à droite */
.main-event-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1rem;
}

/* Container pour la partie gauche du header */
.header-left {
    display: flex;
    align-items: center;
    gap: 12px;
}

/* Container pour la partie droite du header */
.header-right {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

/* Indicateur "Live" déplacé en haut à droite */
.live-indicator {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    background: #f7fafc;
    padding: 0.3rem 0.7rem;
    border-radius: 15px;
    border: 1px solid #e2e8f0;
    font-size: 0.75rem;
    color: #4a5568;
    flex-shrink: 0;
}

/* Bouton d'ajout au calendrier principal */
.add-to-calendar-btn {
    background: #4299e1;
    color: white;
    border: none;
    border-radius: 8px;
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    font-size: 0.875rem;
    transition: all 0.2s ease;
    box-shadow: 0 2px 4px rgba(66, 153, 225, 0.2);
    flex-shrink: 0; /* ✅ Empêche le bouton de rétrécir */
    min-width: 32px; /* ✅ Taille minimum garantie */
}

.add-to-calendar-btn:hover {
    background: #3182ce;
    transform: translateY(-1px);
    box-shadow: 0 4px 8px rgba(66, 153, 225, 0.3);
}

/* ✅ Header-right avec protection débordement */
.header-right {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    flex-shrink: 0;
    min-width: 0;
}

.live-dot {
    width: 6px;
    height: 6px;
    background: #48bb78;
    border-radius: 50%;
    animation: pulse 2s infinite;
}

@keyframes pulse {
    0% { opacity: 1; }
    50% { opacity: 0.5; }
    100% { opacity: 1; }
}

/* Badge de type d'événement - Plus petit */
.event-type-badge {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    padding: 0.3rem 0.8rem;
    border-radius: 20px;
    font-size: 0.8rem;
    font-weight: 600;
    color: white;
    position: relative;
}

.event-type-badge.repetition {
    background: rgba(107, 114, 128, 0.1) !important;
    color: #374151 !important;
}

/* Forcer la couleur pour le badge principal spécifiquement */
.main-event-header .event-type-badge.repetition,
.main-event-header .event-type-badge.event-gray {
    background: rgba(107, 114, 128, 0.1) !important;
    color: #374151 !important;
    font-weight: 600 !important;
}

/* Test spécifique pour event-gray */
.main-event-header .event-type-badge.event-gray {
    background: rgba(107, 114, 128, 0.1) !important;
    color: #374151 !important;
    font-weight: 600 !important;
}

/* Test spécifique pour event-blue (selon commentaires JS, les répétitions) */
.main-event-header .event-type-badge.event-blue {
    background: rgba(107, 114, 128, 0.1) !important;
    color: #374151 !important;
    font-weight: 600 !important;
}

/* Test spécifique pour event-default */
.main-event-header .event-type-badge.event-default {
    background: rgba(107, 114, 128, 0.1) !important;
    color: #374151 !important;
    font-weight: 600 !important;
}

.event-type-badge.concert {
    background: #f56565;
}

.event-type-badge.vacances {
    background: #4299e1;
}

.event-type-badge.other {
    background: #ed8936;
}

/* Couleurs Notion pour les badges d'événements */
.event-type-badge.event-default {
    background: #6b7280;
    color: white;
}

.event-type-badge.event-gray {
    background: rgba(107, 114, 128, 0.1);
    color: #374151;
}

.event-type-badge.event-brown {
    background: #92400e;
    color: white;
}

.event-type-badge.event-orange {
    background: #ea580c;
    color: white;
}

.event-type-badge.event-yellow {
    background: #d97706;
    color: white;
}

.event-type-badge.event-green {
    background: rgba(72, 187, 120, 0.1) !important;
    color: #2f855a !important;
}

.event-type-badge.event-blue {
    background: rgba(2, 132, 199, 0.1);
    color: #0284c7;
}

.event-type-badge.event-purple {
    background: rgba(124, 58, 237, 0.1);
    color: #7c3aed;
}

.event-type-badge.event-pink {
    background: rgba(190, 24, 93, 0.1);
    color: #be185d;
}

.event-type-badge.event-red {
    background: rgba(220, 38, 38, 0.1);
    color: #dc2626;
}

/* Titre d'événement plus sobre */
/* Date et countdown sur une ligne fluide */
.event-meta {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    margin-bottom: 1.2rem;
    padding-bottom: 1.2rem;
    border-bottom: 1px solid #e2e8f0;
    font-size: 0.9rem;
    color: #4a5568;
}

.event-date {
    font-weight: 500;
}

.event-countdown {
    display: flex;
    align-items: center;
    gap: 0.3rem;
    color: #718096;
}

.countdown-number {
    background: #f7fafc;
    padding: 0.2rem 0.5rem;
    border-radius: 6px;
    font-weight: 600;
    color: #4a5568;
}

/* Focus sur les pièces - Layout en colonnes */
.event-pieces {
    margin-bottom: 1rem;
}

.event-pieces h4 {
    font-size: 1.1rem;
    color: #2d3748;
    margin-bottom: 1rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-weight: 600;
}

.pieces-list {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 0.8rem;
}

.piece-item {
    background: #f8fafc;
    padding: 0.8rem;
    border-radius: 10px;
    border-left: 4px solid #667eea;
    transition: all 0.2s ease;
}

.piece-item:hover {
    background: #edf2f7;
    transform: translateX(2px);
    border-left: 4px solid #667eea;
}

.piece-item h5 {
    font-size: 1rem;
    margin-bottom: 0;
    color: #2d3748;
    font-weight: 600;
}

/* Couleurs Notion pour les pièces musicales */
.piece-item.piece-default {
    border-left-color: #6b7280;
}

.piece-item.piece-gray {
    border-left-color: #6b7280;
}

.piece-item.piece-brown {
    border-left-color: #92400e;
}

.piece-item.piece-orange {
    border-left-color: #ea580c;
}

.piece-item.piece-yellow {
    border-left-color: #d97706;
}

.piece-item.piece-green {
    border-left-color: #059669;
}

.piece-item.piece-blue {
    border-left-color: #0284c7;
}

.piece-item.piece-purple {
    border-left-color: #7c3aed;
}

.piece-item.piece-pink {
    border-left-color: #be185d;
}

.piece-item.piece-red {
    border-left-color: #dc2626;
}

/* Notes - Plus discrètes */
.event-notes {
    background: #fffaf0;
    padding: 0.8rem;
    border-radius: 8px;
    border-left: 3px solid #ed8936;
    font-size: 0.85rem;
    color: #744210;
}

/* Aperçu des événements suivants */
.upcoming-events-preview {
    margin-bottom: 2rem;
}

.upcoming-events-preview h3 {
    font-size: 1.4rem;
    font-weight: 600;
    color: #2d3748;
    margin-bottom: 1.5rem;
    text-align: center;
}

.upcoming-events-list {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 1.2rem;
    margin-bottom: 2rem;
}

/* Mini cartes d'événements - Design épuré */
.mini-event-card {
    background: white;
    border-radius: 12px;
    padding: 1.2rem;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.06);
    border: 1px solid #e2e8f0;
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
}

.mini-event-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 3px;
    background: linear-gradient(90deg, #667eea, #764ba2);
}

.mini-event-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.12);
}

.mini-event-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 0.75rem;
}

.mini-event-type {
    font-size: 0.75rem;
    color: #4a5568;
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 0.25rem;
}

/* Container pour actions à droite des mini-cartes */
.mini-event-actions {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.mini-event-countdown {
    font-size: 0.7rem;
    color: #718096;
    background: #f7fafc;
    padding: 0.2rem 0.5rem;
    border-radius: 6px;
    font-weight: 500;
}

/* Bouton calendrier pour mini-cartes */
.mini-add-to-calendar-btn {
    background: #48bb78;
    color: white;
    border: none;
    border-radius: 6px;
    width: 24px;
    height: 24px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    font-size: 0.75rem;
    transition: all 0.2s ease;
    box-shadow: 0 1px 3px rgba(72, 187, 120, 0.2);
    flex-shrink: 0; /* ✅ Empêche le bouton de rétrécir */
    min-width: 24px; /* ✅ Taille minimum garantie */
}

.mini-add-to-calendar-btn:hover {
    background: #38a169;
    transform: translateY(-1px);
    box-shadow: 0 2px 6px rgba(72, 187, 120, 0.3);
}

/* ✅ Actions container avec protection débordement */
.mini-event-actions {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    flex-shrink: 0;
    min-width: 0;
}

/* ✅ Date container avec protection débordement */
.mini-event-date-container {
    display: flex;
    align-items: center;
    justify-content: space-between;
    width: 100%;
    min-width: 0;
    overflow: hidden;
}

.mini-event-date {
    font-size: 0.85rem;
    color: #2d3748;
    font-weight: 500;
    margin-bottom: 0.75rem;
}

.mini-event-pieces {
    font-size: 0.8rem;
    color: #718096;
    line-height: 1.4;
}

/* Tuile d'événement sélectionnée */
.mini-event-card.selected {
    border: none;
    box-shadow: 
        inset 0 0 0 4px #6b7280,
        0 2px 8px rgba(107, 114, 128, 0.15),
        inset 0 1px 3px rgba(107, 114, 128, 0.1);
    transform: none;
    background: inherit;
}

.mini-event-card.selected .mini-event-type {
    color: inherit;
    font-weight: 600 !important;
}

.mini-event-card.selected .mini-event-date,
.mini-event-card.selected .mini-event-location,
.mini-event-card.selected .mini-event-pieces,
.mini-event-card.selected .mini-event-countdown {
    color: inherit;
}

/* Styles pour les mini-cartes cliquables */
.mini-event-card.clickable-event {
    cursor: pointer;
    transition: all 0.3s ease;
}

/* Trigger pour le scroll infini des événements */
.events-load-more-trigger {
    height: 20px;
    margin: 1rem 0;
    /* Invisible mais présent pour l'intersection observer */
}

/* Bouton de retour à l'événement actuel */
.back-to-current-container {
    margin-bottom: 1.5rem;
    text-align: center;
}

.back-to-current-btn {
    background: #ed8936;
    color: white;
    border: none;
    padding: 0.7rem 1.2rem;
    border-radius: 25px;
    font-size: 0.9rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 2px 8px rgba(237, 137, 54, 0.3);
}

.back-to-current-btn:hover {
    background: #dd7724;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(237, 137, 54, 0.4);
}

/* Section tous les événements */
.all-events-section {
    margin-top: 3rem;
    padding-top: 3rem;
    border-top: 2px solid #e2e8f0;
}

.all-events-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 2rem;
}

.all-events-header h3 {
    font-size: 1.5rem;
    font-weight: 600;
    color: #2d3748;
}

.all-events-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 1.5rem;
}

/* States de chargement */
.loading-placeholder {
    text-align: center;
    padding: 2rem;
    color: #718096;
    font-style: italic;
}

/* Responsive design */
@media (max-width: 768px) {
    .next-events-section {
        padding: 1rem;
    }
    
    .next-events-header h2 {
        font-size: 1.8rem;
    }
    
    .main-next-event {
        padding: 1.5rem;
    }
    
    .event-meta {
        flex-direction: column;
        align-items: flex-start;
        gap: 0.5rem;
    }
    
    .upcoming-events-list {
        grid-template-columns: 1fr;
    }
    
    .all-events-header {
        flex-direction: column;
        gap: 1rem;
        text-align: center;
    }
}

.mini-event-card.repetition::before {
    background: linear-gradient(90deg, #48bb78, #38a169);
}

.mini-event-card.concert::before {
    background: linear-gradient(90deg, #ff6b6b, #ee5a52);
}

.mini-event-card.vacances::before {
    background: linear-gradient(90deg, #818cf8, #6366f1);
}

/* Couleurs Notion pour les mini-event-card */
.mini-event-card.event-default::before,
.mini-event-card.event-gray::before {
    background: linear-gradient(90deg, #6b7280, #4b5563);
}

.mini-event-card.event-brown::before {
    background: linear-gradient(90deg, #92400e, #78350f);
}

.mini-event-card.event-orange::before {
    background: linear-gradient(90deg, #ea580c, #c2410c);
}

.mini-event-card.event-yellow::before {
    background: linear-gradient(90deg, #d97706, #b45309);
}

.mini-event-card.event-green::before {
    background: linear-gradient(90deg, #059669, #047857);
}

.mini-event-card.event-blue::before {
    background: linear-gradient(90deg, #0284c7, #0369a1);
}

.mini-event-card.event-purple::before {
    background: linear-gradient(90deg, #7c3aed, #6d28d9);
}

.mini-event-card.event-pink::before {
    background: linear-gradient(90deg, #be185d, #9d174d);
}

.mini-event-card.event-red::before {
    background: linear-gradient(90deg, #dc2626, #b91c1c);
}

.mini-event-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.12);
}

/* Garder le style de sélection même au hover */
.mini-event-card.selected:hover {
    transform: none;
    box-shadow: 
        inset 0 0 0 4px #6b7280,
        0 2px 8px rgba(107, 114, 128, 0.15),
        inset 0 1px 3px rgba(107, 114, 128, 0.1);
}

/* Changer la couleur de la bande du dessus quand la carte est sélectionnée */
.mini-event-card.selected::before {
    background: linear-gradient(90deg, #6b7280, #4b5563) !important;
}

/* Bouton moderne flat design à gauche du badge */
.back-to-default-btn-modern {
    background: #f5f5f5;
    color: #666;
    border: 1px solid #e0e0e0;
    width: 32px;
    height: 32px;
    border-radius: 8px;
    font-size: 16px;
    font-weight: 400;
    cursor: pointer;
    transition: all 0.2s ease;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.back-to-default-btn-modern:hover {
    background: #e8e8e8;
    border-color: #d0d0d0;
    color: #333;
}

.back-to-default-btn-modern:active {
    background: #ddd;
}

.mini-event-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1rem;
    flex-wrap: wrap;
    gap: 0.5rem;
}

.mini-event-type {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.25rem 0.75rem;
    border-radius: 20px;
    font-size: 0.8rem;
    font-weight: 600;
}

.mini-event-type.repetition {
    background: rgba(107, 114, 128, 0.1);
    color: #374151;
}

.mini-event-type.concert {
    background: rgba(255, 107, 107, 0.1);
    color: #c53030;
}

.mini-event-type.vacances {
    background: rgba(129, 140, 248, 0.1);
    color: #5a67d8;
}

.mini-event-type.other {
    background: rgba(236, 201, 75, 0.1);
    color: #d69e2e;
}

/* Couleurs Notion pour les mini-event-type */
.mini-event-type.event-default,
.mini-event-type.event-gray {
    background: rgba(107, 114, 128, 0.1);
    color: #374151;
}

.mini-event-type.event-brown {
    background: rgba(146, 64, 14, 0.1);
    color: #92400e;
}

.mini-event-type.event-orange {
    background: rgba(234, 88, 12, 0.1);
    color: #ea580c;
}

.mini-event-type.event-yellow {
    background: rgba(217, 119, 6, 0.1);
    color: #d97706;
}

.mini-event-type.event-green {
    background: rgba(5, 150, 105, 0.1);
    color: #059669;
}

.mini-event-type.event-blue {
    background: rgba(2, 132, 199, 0.1);
    color: #0284c7;
}

.mini-event-type.event-purple {
    background: rgba(124, 58, 237, 0.1);
    color: #7c3aed;
}

.mini-event-type.event-pink {
    background: rgba(190, 24, 93, 0.1);
    color: #be185d;
}

.mini-event-type.event-red {
    background: rgba(220, 38, 38, 0.1);
    color: #dc2626;
}

.mini-event-date {
    font-size: 0.85rem;
    color: #4a5568;
    font-weight: 500;
}

.mini-event-title {
    font-size: 1.1rem;
    font-weight: 600;
    color: #2d3748;
    margin-bottom: 0.75rem;
    line-height: 1.3;
}

.mini-event-pieces {
    font-size: 0.9rem;
    color: #4a5568;
    margin-bottom: 0.75rem;
    line-height: 1.4;
}

.mini-event-notes {
    font-size: 0.85rem;
    color: #718096;
    background: #f7fafc;
    padding: 0.5rem;
    border-radius: 6px;
    border-left: 3px solid #e2e8f0;
}

/* Section de tous les événements (obsolète - maintenant scroll infini) */
.all-events-section {
    margin-top: 3rem;
}

.all-events-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 2rem;
    flex-wrap: wrap;
    gap: 1rem;
}

.all-events-header h3 {
    font-size: 1.5rem;
    font-weight: 600;
    color: #2d3748;
}

.all-events-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 1.5rem;
}

/* Messages d'état */
.no-events-message {
    text-align: center;
    padding: 3rem 1rem;
    background: white;
    border-radius: 16px;
    border: 2px dashed #e2e8f0;
}

.no-events-message h3 {
    font-size: 1.3rem;
    color: #4a5568;
    margin-bottom: 0.5rem;
}

.no-events-message p {
    color: #718096;
}

.loading-placeholder {
    text-align: center;
    padding: 2rem;
    color: #718096;
}

/* Responsive */
@media (max-width: 768px) {
    .next-events-section {
        padding: 1rem;
    }
    
    .next-events-header h2 {
        font-size: 2rem;
    }
    
    .main-next-event {
        padding: 1.5rem;
        border-radius: 16px;
    }
    
    .event-title {
        font-size: 1.6rem;
    }
    
    .event-countdown {
        flex-direction: column;
        align-items: flex-start;
        gap: 0.5rem;
    }
    
    .upcoming-events-list, .all-events-grid {
        grid-template-columns: 1fr;
        gap: 1rem;
    }
    
    .mini-event-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 0.5rem;
    }
    
    .all-events-header {
        flex-direction: column;
        align-items: flex-start;
    }
    
    /* 📱 OPTIMISATIONS BOUTONS CALENDRIER MOBILE */
    .add-to-calendar-btn {
        width: 28px;
        height: 28px;
        font-size: 0.75rem;
        flex-shrink: 0;
    }
    
    .mini-add-to-calendar-btn {
        width: 20px;
        height: 20px;
        font-size: 0.65rem;
        flex-shrink: 0;
        margin-left: 0.5rem;
    }
    
    /* 📱 CONTENEURS POUR ÉVITER DÉBORDEMENT */
    .event-meta, .mini-event-meta {
        overflow: hidden;
        min-width: 0;
    }
    
    .mini-event-header {
        width: 100%;
        min-width: 0;
        overflow: hidden;
    }
    
    .mini-event-date-container {
        display: flex;
        align-items: center;
        justify-content: space-between;
        width: 100%;
        min-width: 0;
    }
    
    .mini-event-date {
        flex: 1;
        min-width: 0;
        overflow: hidden;
        text-overflow: ellipsis;
        white-space: nowrap;
    }
    
    /* 📱 DESIGN BULLE CENTRÉE - Titre + Icône PDF */
    
    /* Header mobile avec bulle centrée */
    #programmes .section-header {
        background: transparent;
        padding: 1.5rem 1rem 1rem;
        border-radius: 0;
        margin-bottom: 1rem;
        box-shadow: none;
        border: none;
        flex-direction: column;
        align-items: center;
        justify-content: center;
        gap: 0;
    }
    
    /* Bulle conteneur pour titre + PDF - TITRE CENTRÉ ET BOUTON SUR CÔTÉ */
    #programmes .section-header .header-bubble {
        display: flex !important;
        align-items: center !important; /* ✨ RÉTABLI: alignement centré verticalement */
        justify-content: center !important; /* ✨ RÉTABLI: centrage général */
        gap: 0.5rem !important;
        background: #ffffff !important; /* ✨ MODIFIÉ: fond blanc au lieu de gris clair */
        padding: 0.75rem 1.25rem !important;
        border-radius: 20px !important;
        box-shadow: 0 2px 12px rgba(0, 0, 0, 0.08) !important;
        border: 1px solid #e2e8f0 !important;
        position: relative !important;
        backdrop-filter: blur(10px) !important;
        -webkit-backdrop-filter: blur(10px) !important;
        min-height: auto !important;
        width: 90% !important;
        max-width: 500px !important;
        margin: 0 auto !important;
        height: auto !important;
        box-sizing: border-box !important;
        flex-wrap: nowrap !important;
    }
    
    #programmes .section-header h2 {
        color: #2d3748;
        font-size: 1.5rem;
        text-align: center;
        margin: 0;
        font-weight: 600;
        letter-spacing: -0.02em;
        position: relative;
        background: transparent;
        padding: 0;
        border-radius: 0;
        box-shadow: none;
        border: none;
        flex: 0 0 auto;
        line-height: 1.3;
        white-space: nowrap;
    }
    
    #programmes .section-header h2:after {
        display: none;
    }
    
    /* Icône PDF dans la bulle - ADAPTATIF AVEC TEXTE LONG */
    #programmes .header-bubble .pdf-download-btn {
        background: linear-gradient(135deg, #4299e1 0%, #667eea 100%) !important;
        color: white !important;
        padding: 0.5rem !important;
        border-radius: 6px !important;
        font-size: 0 !important;
        width: 32px !important;
        height: 32px !important;
        min-width: 32px !important;
        min-height: 32px !important;
        display: flex !important;
        align-items: center !important;
        justify-content: center !important;
        box-shadow: 0 2px 8px rgba(66, 153, 225, 0.3) !important;
        margin: 0.25rem 0 !important; /* 🔄 AJOUTÉ: marges verticales pour les cas où il passe à la ligne */
        margin-top: 0 !important;
        flex-shrink: 0 !important;
        transition: all 0.2s ease !important;
        border: none !important;
        cursor: pointer !important;
        gap: 0 !important;
        white-space: nowrap !important;
        position: relative !important;
        z-index: auto !important;
        align-self: center !important; /* 🔄 AJOUTÉ: reste centré verticalement */
    }
    
    #programmes .header-bubble .pdf-download-btn svg {
        width: 16px !important;
        height: 16px !important;
        flex-shrink: 0 !important;
        margin: 0 !important;
    }
    
    #programmes .header-bubble .pdf-download-btn:hover {
        background: linear-gradient(135deg, #3182ce 0%, #5a67d8 100%) !important;
        transform: translateY(-1px) scale(1.03) !important;
        box-shadow: 0 4px 12px rgba(66, 153, 225, 0.4) !important;
    }
    
    /* Masquer le texte du bouton PDF - garder seulement SVG */
    #programmes .header-bubble .pdf-download-btn .btn-text {
        display: none !important;
    }
    
    #programmes .header-bubble .pdf-download-btn:before {
        display: none !important;
    }
    
    /* Règle spéciale pour les écrans très étroits (<350px) - BOUTON TOUJOURS À DROITE */
    @media (max-width: 350px) {
        #programmes .section-header .header-bubble {
            padding: 0.75rem 1rem !important;
            gap: 0.3rem !important; /* ✨ RÉDUIT: encore plus serré pour petits écrans */
            width: 95% !important;
        }
        
        #programmes .header-bubble h2 {
            font-size: 1.1rem !important; /* ✨ RÉDUIT: de 1.15rem à 1.1rem */
            max-width: calc(100% - 40px) !important; /* ✨ MODIFIÉ: pour laisser de l'espace au bouton */
        }
        
        #programmes .header-bubble .pdf-download-btn {
            width: 28px !important; /* ✨ RÉDUIT: de 32px à 28px pour les petits écrans */
            height: 28px !important;
            min-width: 28px !important;
            min-height: 28px !important;
        }
    }
    
    /* Neutraliser les styles h2 conflictuels dans la bulle - TEXTE ALIGNÉ À GAUCHE SI SUR PLUSIEURS LIGNES */
    #programmes .header-bubble h2 {
        color: #2d3748 !important;
        font-size: 1.25rem !important;
        text-align: left !important; /* ✨ MODIFIÉ: alignement à gauche pour les titres longs sur plusieurs lignes */
        margin: 0 !important;
        font-weight: 600 !important;
        letter-spacing: -0.02em !important;
        position: relative !important;
        background: transparent !important;
        padding: 0 !important;
        border-radius: 0 !important;
        box-shadow: none !important;
        border: none !important;
        flex: 1 1 auto !important;
        line-height: 1.2 !important;
        white-space: normal !important;
        height: auto !important;
        min-height: auto !important;
        display: block !important;
        overflow-wrap: break-word !important;
        word-wrap: break-word !important;
        max-width: calc(100% - 50px) !important; 
        padding-right: 0.5rem !important;
    }
    
    /* Container de pièces mobile délicat */
    #programmes .pieces-grid {
        grid-template-columns: 1fr;
        gap: 1rem;
        padding: 1rem;
        background: transparent;
        border-radius: 0;
        margin-top: 0;
    }
    
    /* Cartes délicates pour mobile - comme desktop */
    #programmes .piece-card {
        background: white;
        border-radius: 10px;
        padding: 1.2rem;
        box-shadow: 0 1px 3px rgba(0, 0, 0, 0.05);
        border: 1px solid #e2e8f0;
        transition: all 0.2s ease;
        position: relative;
        overflow: hidden;
    }
    
    #programmes .piece-card:before {
        height: 4px;
        background: #4299e1;
        border-radius: 0;
    }
    
    #programmes .piece-card:hover,
    #programmes .piece-card:active {
        transform: translateY(-2px);
        box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
        border-color: #cbd5e0;
    }
    
    /* Titre des pièces mobile délicat */
    #programmes .piece-card h3 {
        color: #2d3748;
        font-size: 1.2rem;
        margin-bottom: 0.8rem;
        font-weight: 600;
        line-height: 1.3;
    }
    
    /* Métadonnées compactes */
    #programmes .piece-card p {
        margin-bottom: 0.5rem;
        font-size: 0.9rem;
        color: #4a5568;
        line-height: 1.4;
    }
    
    /* Liens mobile délicats - comme desktop */
    #programmes .links {
        display: flex;
        gap: 0.8rem;
        margin-top: 1rem;
        flex-wrap: wrap;
    }
    
    #programmes .links a {
        flex: 1;
        min-width: 120px;
        padding: 0.75rem 1rem;
        background: linear-gradient(135deg, #4299e1 0%, #667eea 100%);
        color: white;
        text-decoration: none;
        border-radius: 8px;
        font-size: 0.85rem;
        font-weight: 500;
        text-align: center;
        transition: all 0.2s ease;
        box-shadow: 0 2px 8px rgba(66, 153, 225, 0.3);
        display: flex;
        align-items: center;
        justify-content: center;
        gap: 0.4rem;
        border: 1px solid transparent;
    }
    
    #programmes .links a:hover,
    #programmes .links a:active {
        transform: translateY(-1px);
        box-shadow: 0 4px 12px rgba(66, 153, 225, 0.4);
        background: linear-gradient(135deg, #3182ce 0%, #5a67d8 100%);
    }
    
    /* Suppression de la barre bleue sur h2 standards */
    #programmes .concert-section h2:after {
        display: none;
    }
    
    /* H2 standards mobile épurés - SANS encadré */
    #programmes .concert-section h2 {
        background: transparent;
        color: #2d3748;
        padding: 1rem 0;
        border-radius: 0;
        font-size: 1.4rem;
        font-weight: 600;
        text-align: left;
        margin-bottom: 1.5rem;
        box-shadow: none;
        border: none;
        display: block;
        letter-spacing: -0.01em;
        position: relative;
    }
}

@media (max-width: 480px) {
    .main-next-event {
        padding: 1rem;
    }
    
    .event-title {
        font-size: 1.4rem;
    }
    
    .mini-event-card {
        padding: 1rem;
    }
    
    .show-all-events-btn, .hide-all-events-btn {
        padding: 0.6rem 1.5rem;
        font-size: 0.9rem;
    }
    
    /* 📱 ULTRA-MOBILE : Simplifications drastiques */
    .add-to-calendar-btn {
        width: 24px;
        height: 24px;
        font-size: 0.7rem;
    }
    
    .mini-add-to-calendar-btn {
        width: 18px;
        height: 18px;
        font-size: 0.6rem;
        border-radius: 4px;
    }
    
    /* 📱 Remplacer texte par points verts sur très petits écrans */
    .live-indicator-text {
        display: none;
    }
    
    .live-dot {
        width: 8px;
        height: 8px;
        margin-right: 0.25rem;
    }
    
    /* 📱 Simplifier l'affichage des dates */
    .mini-event-date {
        font-size: 0.8rem;
    }
    
    /* 📱 Éviter débordement sur très petits écrans */
    .event-meta {
        flex-wrap: wrap;
        gap: 0.25rem;
    }
    
    .mini-event-header {
        gap: 0.25rem;
    }
    
    /* 📱 Masquer éléments non-essentiels sur petit mobile */
    .event-description {
        font-size: 0.85rem;
        line-height: 1.4;
    }
}

/* ========================================
   STYLES POUR LES BULLES DE PIÈCES MUSICALES
   ======================================== */

/* Container pour les bulles de pièces */
.pieces-bubbles-container {
    display: flex;
    flex-wrap: wrap;
    gap: 0.4rem;
    align-items: center;
}

/* Styles pour les bulles individuelles */
.piece-bubble {
    display: inline-block;
    padding: 0.25rem 0.6rem;
    background: linear-gradient(135deg, #f8fafc 0%, #e2e8f0 100%);
    border: 1px solid #cbd5e0;
    border-radius: 12px;
    font-size: 0.75rem;
    font-weight: 500;
    color: #4a5568;
    transition: all 0.25s ease;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.08);
    line-height: 1.2;
    max-width: 140px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

/* Effet hover sur les bulles */
.piece-bubble:hover {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    border-color: #667eea;
    transform: translateY(-1px);
    box-shadow: 0 3px 8px rgba(102, 126, 234, 0.25);
}

/* Bulle pour le compteur "+X autres" */
.piece-bubble.extra {
    background: linear-gradient(135deg, #edf2f7 0%, #e2e8f0 100%);
    color: #718096;
    font-style: italic;
    border-color: #e2e8f0;
}

.piece-bubble.extra:hover {
    background: linear-gradient(135deg, #cbd5e0 0%, #a0aec0 100%);
    color: #4a5568;
    border-color: #a0aec0;
}

/* Bulle pour "Programme à définir" */
.piece-bubble.placeholder {
    background: linear-gradient(135deg, #f8fafc 0%, #f1f5f9 100%);
    color: #94a3b8;
    border-color: #e2e8f0;
    font-style: italic;
    opacity: 0.8;
}

.piece-bubble.placeholder:hover {
    background: linear-gradient(135deg, #f1f5f9 0%, #e2e8f0 100%);
    color: #64748b;
    border-color: #cbd5e0;
    opacity: 1;
}

/* Mise en page pour les bulles (sans icône) */
.mini-event-pieces {
    margin-top: 0.5rem;
    padding-top: 0.5rem;
    border-top: 1px solid #e2e8f0;
}

/* Responsive pour les bulles sur mobile */
@media (max-width: 480px) {
    .piece-bubble {
        padding: 0.2rem 0.5rem;
        font-size: 0.7rem;
        border-radius: 10px;
        max-width: 120px;
    }
    
    .pieces-bubbles-container {
        gap: 0.3rem;
    }
    
    .mini-event-pieces {
        gap: 0.4rem;
    }
}

/* Animation délicate pour l'apparition des bulles */
@keyframes bubbleAppear {
    from {
        opacity: 0;
        transform: scale(0.8) translateY(5px);
    }
    to {
        opacity: 1;
        transform: scale(1) translateY(0);
    }
}

.piece-bubble {
    animation: bubbleAppear 0.3s ease forwards;
}

/* Délai d'animation pour créer un effet en cascade */
.piece-bubble:nth-child(1) { animation-delay: 0ms; }
.piece-bubble:nth-child(2) { animation-delay: 50ms; }
.piece-bubble:nth-child(3) { animation-delay: 100ms; }
.piece-bubble:nth-child(4) { animation-delay: 150ms; }

/* ========================================
   PWA iOS OPTIMISÉ - MASQUER BARRE IPHONE
   ======================================== */
