* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

:root {
    --primary-color: #ffffff;
    --secondary-color: #e0e0e0;
    --accent-color: #cccccc;
    --bg-dark: #0a0a0a;
    --bg-gradient-start: #1a1a1a;
    --bg-gradient-end: #0f0f0f;
    --text-light: #ffffff;
    --text-muted: #a0a0a0;
    --card-bg: rgba(255, 255, 255, 0.05);
    --border-color: rgba(255, 255, 255, 0.15);
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background: linear-gradient(135deg, var(--bg-dark) 0%, var(--bg-gradient-start) 50%, var(--bg-gradient-end) 100%);
    color: var(--text-light);
    min-height: 100vh;
    overflow-x: hidden;
    scrollbar-width: none; /* Firefox */
    -ms-overflow-style: none; /* IE et Edge */
}

body::-webkit-scrollbar {
    display: none; /* Chrome, Safari et Opera */
}

.container {
    max-width: 1800px;
    margin: 0 auto;
    padding: 0.5rem 2rem;
}

header {
    text-align: center;
    margin-bottom: 0.3rem;
    animation: fadeInDown 0.8s ease-out;
}

header h1 {
    font-size: 1.3rem;
    font-weight: 600;
    background: linear-gradient(135deg, var(--primary-color), var(--accent-color));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    margin-bottom: 0.2rem;
}

.subtitle {
    font-size: 1.2rem;
    color: var(--text-muted);
    font-weight: 300;
}

.current-year-display {
    text-align: center;
    margin-bottom: 2rem;
    animation: fadeIn 1s ease-out;
}

.year-label {
    display: block;
    font-size: 0.9rem;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 2px;
    margin-bottom: 0.5rem;
}

.year-number {
    display: block;
    font-size: 4rem;
    font-weight: 700;
    background: linear-gradient(135deg, var(--primary-color), var(--accent-color));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    transition: all 0.3s ease;
}

.year-number.changing {
    animation: yearReveal 0.8s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.timeline-wrapper {
    margin-bottom: 0.5rem;
    position: relative;
    min-height: 120px;
}

.timeline-container {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 2rem 4rem 2rem 4rem;
    padding-right: 8rem; /* Padding supplémentaire à droite pour afficher l'année 2026 complète */
    overflow-x: auto;
    scroll-behavior: smooth;
    margin-top: 2rem;
    scrollbar-width: none; /* Firefox */
    -ms-overflow-style: none; /* IE et Edge */
}

.timeline-container::-webkit-scrollbar {
    display: none; /* Chrome, Safari et Opera */
}

/* Affichage centralisé de l'année courante avec effet de révélation */
.year-reveal-container {
    position: relative;
    display: none;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    min-height: 100px;
    perspective: 1000px;
}

.year-circle {
    position: relative;
    width: 120px;
    height: 120px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--primary-color), var(--accent-color));
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    box-shadow: 0 20px 60px rgba(255, 255, 255, 0.3);
    animation: float 3s ease-in-out infinite;
}

.year-circle::before {
    content: '';
    position: absolute;
    inset: 5px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--bg-gradient-start), var(--bg-gradient-end));
}

.year-circle-content {
    position: relative;
    z-index: 1;
    text-align: center;
}

.year-circle-number {
    font-size: 2rem;
    font-weight: 700;
    background: linear-gradient(135deg, var(--primary-color), var(--accent-color));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    margin-bottom: 0.2rem;
}

.year-circle-label {
    font-size: 0.65rem;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 2px;
}

.progress-bar-container {
    margin-top: 2rem;
    width: 100%;
    max-width: 600px;
    position: relative;
}

.progress-bar {
    width: 100%;
    height: 8px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 10px;
    overflow: hidden;
    position: relative;
}

.progress-bar-fill {
    height: 100%;
    background: linear-gradient(90deg, var(--primary-color), var(--accent-color));
    border-radius: 10px;
    transition: width 0.8s cubic-bezier(0.34, 1.56, 0.64, 1);
    position: relative;
    box-shadow: 0 0 20px rgba(255, 255, 255, 0.6);
}

.progress-bar-fill::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.3), transparent);
    animation: shimmer 2s infinite;
}

.progress-labels {
    display: flex;
    justify-content: space-between;
    margin-top: 0.5rem;
    font-size: 0.85rem;
    color: var(--text-muted);
}

.timeline {
    position: relative;
    display: flex;
    align-items: center;
    gap: 0;
    min-width: 100%;
    padding: 2rem 0;
}

.timeline::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 0;
    right: 0;
    height: 3px;
    background: linear-gradient(90deg,
        transparent 0%,
        var(--primary-color) 20%,
        var(--accent-color) 80%,
        transparent 100%);
    transform: translateY(-50%);
}

.timeline-item {
    position: relative;
    display: flex;
    flex-direction: column;
    align-items: center;
    min-width: 120px;
    cursor: pointer;
    transition: all 0.3s ease;
    opacity: 0.2;
}

.timeline-item.visited {
    opacity: 1;
    animation: revealMarker 0.6s cubic-bezier(0.34, 1.56, 0.64, 1) forwards;
}

.timeline-item.future {
    opacity: 0.2;
}

.timeline-item:nth-child(n) {
    animation-delay: calc(0.05s * var(--item-index));
}

.timeline-marker {
    width: 16px;
    height: 16px;
    border-radius: 50%;
    background: var(--card-bg);
    border: 3px solid var(--border-color);
    transition: all 0.3s ease;
    z-index: 2;
}

.timeline-item.visited .timeline-marker {
    background: rgba(255, 255, 255, 0.3);
    border-color: var(--primary-color);
}

.timeline-item.future .timeline-marker {
    background: transparent;
    border-color: rgba(255, 255, 255, 0.1);
}

.timeline-item.milestone .timeline-marker {
    width: 24px;
    height: 24px;
    background: linear-gradient(135deg, var(--primary-color), var(--accent-color));
    border: 3px solid var(--text-light);
    box-shadow: 0 0 20px rgba(255, 255, 255, 0.5);
}

.timeline-item.active .timeline-marker {
    width: 28px;
    height: 28px;
    background: linear-gradient(135deg, var(--accent-color), var(--primary-color));
    border: 4px solid var(--text-light);
    box-shadow: 0 0 30px rgba(255, 255, 255, 0.8);
    animation: pulse 2s infinite;
}

.timeline-year {
    position: absolute;
    top: -60px;
    font-size: 0.9rem;
    font-weight: 600;
    color: var(--text-muted);
    transition: all 0.3s ease;
    white-space: nowrap;
    opacity: 0;
}

.timeline-item.visited .timeline-year {
    opacity: 1;
}

.timeline-item.future .timeline-year {
    opacity: 0.2;
}

.timeline-item.milestone .timeline-year {
    font-size: 1.1rem;
    color: var(--text-light);
    font-weight: 700;
}

.timeline-item.active .timeline-year {
    color: var(--primary-color);
    font-size: 2rem;
    font-weight: 900;
    transform: translateY(-5px);
    text-shadow: 0 0 20px rgba(255, 255, 255, 0.8);
}

.timeline-label {
    position: absolute;
    top: 40px;
    font-size: 0.75rem;
    color: var(--text-muted);
    text-align: center;
    max-width: 100px;
    opacity: 0;
    transition: all 0.3s ease;
}

.timeline-item.milestone .timeline-label {
    opacity: 0.7;
}

.timeline-item.active .timeline-label,
.timeline-item:hover .timeline-label {
    opacity: 1;
    color: var(--text-light);
}

.timeline-item:hover .timeline-marker {
    transform: scale(1.2);
}

/* Layout principal avec 3 colonnes */
.main-content {
    display: flex;
    gap: 1.5rem;
    margin-bottom: 0.5rem;
    align-items: flex-start;
    transition: gap 0.6s ease;
}

/* Quand la zone centrale est cachée, ajuster l'espacement */
.main-content:has(.event-details[style*="display: none"]) {
    gap: 3rem;
    justify-content: center;
}

/* Colonnes latérales pour accumulation des images - Style mur de photos */
.life-column {
    flex: 0 0 480px;
    background:
        linear-gradient(135deg,
            rgba(30, 30, 45, 0.95) 0%,
            rgba(20, 20, 35, 0.98) 100%
        ),
        repeating-linear-gradient(
            0deg,
            transparent,
            transparent 2px,
            rgba(255, 255, 255, 0.03) 2px,
            rgba(255, 255, 255, 0.03) 4px
        ),
        repeating-linear-gradient(
            90deg,
            transparent,
            transparent 2px,
            rgba(255, 255, 255, 0.03) 2px,
            rgba(255, 255, 255, 0.03) 4px
        );
    background-color: #1a1a2e;
    backdrop-filter: blur(15px);
    border: 1px solid rgba(102, 126, 234, 0.3);
    border-radius: 15px;
    padding: 1rem 0.8rem;
    min-height: 550px;
    max-height: 100%;
    overflow: visible;
    box-shadow:
        inset 0 1px 0 rgba(255, 255, 255, 0.1),
        inset 0 -1px 0 rgba(0, 0, 0, 0.3),
        0 8px 32px rgba(0, 0, 0, 0.4),
        0 0 0 1px rgba(0, 0, 0, 0.2);
    position: relative;
    transition: flex-basis 0.6s ease;
}

/* Élargir les colonnes quand la zone centrale est cachée */
.main-content:has(.event-details[style*="display: none"]) .life-column {
    flex: 1 1 auto;
    max-width: 850px;
}

.life-column::-webkit-scrollbar {
    width: 6px;
}

.life-column::-webkit-scrollbar-track {
    background: rgba(255, 255, 255, 0.05);
    border-radius: 3px;
}

.life-column::-webkit-scrollbar-thumb {
    background: rgba(255, 255, 255, 0.3);
    border-radius: 3px;
}

.life-personal {
    border-left: 3px solid rgba(255, 255, 255, 0.6);
}

.life-professional {
    border-right: 3px solid rgba(255, 255, 255, 0.6);
}

.column-header {
    font-size: 0.85rem;
    font-weight: 600;
    text-align: center;
    margin-bottom: 1rem;
    padding: 0.5rem 0.8rem;
    background: rgba(255, 255, 255, 0.98);
    color: #2d2d2d;
    border-radius: 3px;
    box-shadow:
        0 3px 6px rgba(0, 0, 0, 0.25),
        0 1px 2px rgba(0, 0, 0, 0.15);
    transform: rotate(-1deg);
    position: relative;
    letter-spacing: 0.5px;
}

/* Effet scotch sur les en-têtes */
.column-header::before {
    content: '';
    position: absolute;
    top: -8px;
    left: 50%;
    transform: translateX(-50%);
    width: 60px;
    height: 16px;
    background: rgba(255, 255, 255, 0.3);
    border: 1px solid rgba(255, 255, 255, 0.4);
    border-radius: 2px;
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.1);
}

.accumulated-images {
    position: relative;
    min-height: 100px;
    padding: 0.5rem;
}

/* Wrapper pour chaque Polaroid - Style patchwork */
.polaroid-wrapper {
    position: relative;
    display: inline-block;
    margin: 0.25rem;
    vertical-align: top;
    background: #d8d8d8;
    padding: 0.4rem 0.4rem 1.5rem 0.4rem;
    border-radius: 3px;
    border: 1px solid rgba(180, 180, 180, 0.5);
    box-shadow:
        0 3px 5px rgba(0, 0, 0, 0.1),
        0 1px 2px rgba(0, 0, 0, 0.08),
        0 0 0 1px rgba(0, 0, 0, 0.05);
}

/* Effet punaise en haut de chaque photo */
.polaroid-wrapper::before {
    content: '';
    position: absolute;
    top: -4px;
    left: 50%;
    transform: translateX(-50%);
    width: 8px;
    height: 8px;
    background: radial-gradient(circle,
        rgba(220, 220, 220, 1) 0%,
        rgba(180, 180, 180, 1) 50%,
        rgba(140, 140, 140, 1) 100%);
    border-radius: 50%;
    box-shadow:
        0 1px 3px rgba(0, 0, 0, 0.3),
        inset 0 -1px 1px rgba(0, 0, 0, 0.2);
    z-index: 10;
}

/* Style Polaroid pour les images accumulées - Patchwork désorganisé */
.accumulated-images img {
    width: 70px;
    height: 60px;
    object-fit: contain;
    background: white;
    border-radius: 2px;
    border: 1px solid rgba(220, 220, 220, 0.6);
    transition: all 0.3s ease;
    display: block;
    position: relative;
    z-index: 1;
}

.polaroid-wrapper {
    opacity: 0;
    animation: slideInPolaroid 0.6s ease-out forwards;
}

/* Année affichée dans la partie basse du Polaroid */
.polaroid-year {
    position: absolute;
    bottom: 0.3rem;
    left: 0;
    right: 0;
    text-align: center;
    font-size: 0.6rem;
    font-weight: 600;
    color: #666;
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    letter-spacing: 0.3px;
}

/* Rotations variées et désorganisées pour effet patchwork */
.polaroid-wrapper:nth-child(1) { transform: rotate(-5deg); }
.polaroid-wrapper:nth-child(2) { transform: rotate(3deg); }
.polaroid-wrapper:nth-child(3) { transform: rotate(-8deg); }
.polaroid-wrapper:nth-child(4) { transform: rotate(6deg); }
.polaroid-wrapper:nth-child(5) { transform: rotate(-3deg); }
.polaroid-wrapper:nth-child(6) { transform: rotate(7deg); }
.polaroid-wrapper:nth-child(7) { transform: rotate(-6deg); }
.polaroid-wrapper:nth-child(8) { transform: rotate(4deg); }
.polaroid-wrapper:nth-child(9) { transform: rotate(-4deg); }
.polaroid-wrapper:nth-child(10) { transform: rotate(5deg); }
.polaroid-wrapper:nth-child(11) { transform: rotate(-7deg); }
.polaroid-wrapper:nth-child(12) { transform: rotate(2deg); }
.polaroid-wrapper:nth-child(13) { transform: rotate(-4deg); }
.polaroid-wrapper:nth-child(14) { transform: rotate(8deg); }
.polaroid-wrapper:nth-child(15) { transform: rotate(-5deg); }

/* Variantes de largeur pour plus de désordre */
.polaroid-wrapper:nth-child(4n) img { width: 75px; }
.polaroid-wrapper:nth-child(5n) img { width: 65px; }
.polaroid-wrapper:nth-child(7n) img { width: 72px; }

.polaroid-wrapper:hover {
    transform: scale(1.15) rotate(0deg) !important;
    z-index: 100;
    transition: all 0.3s ease;
    box-shadow:
        0 20px 40px rgba(0, 0, 0, 0.5),
        0 8px 16px rgba(255, 255, 255, 0.3);
    cursor: pointer;
}

@keyframes slideInPolaroid {
    from {
        opacity: 0;
        transform: scale(0.8);
    }
    to {
        opacity: 1;
        transform: scale(1);
    }
}

/* Zone centrale réduite */
.event-details {
    flex: 1;
    background: var(--card-bg);
    backdrop-filter: blur(10px);
    border: 1px solid var(--border-color);
    border-radius: 20px;
    padding: 1.5rem;
    min-height: 550px;
    animation: fadeIn 0.5s ease-out;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.3);
}

.event-content {
    display: flex;
    flex-direction: column;
    gap: 2rem;
    align-items: stretch;
}

.event-text-content {
    flex: 1;
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.event-content h2 {
    font-size: 2rem;
    background: linear-gradient(135deg, var(--primary-color), var(--accent-color));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    margin-bottom: 0.8rem;
}

.event-content h3 {
    font-size: 1.5rem;
    margin-bottom: 0.8rem;
    color: var(--text-light);
}

.event-content p {
    font-size: 1.1rem;
    line-height: 1.8;
    color: var(--text-muted);
    margin-bottom: 1.5rem;
}

.event-image-container {
    flex: 1;
    display: grid;
    grid-template-columns: repeat(3, 1fr); /* Grille par défaut 3 colonnes */
    gap: 1rem;
    padding: 1.5rem;
    background: rgba(255, 255, 255, 0.02);
    border-radius: 15px;
    border: 1px solid var(--border-color);
    align-content: center;
    justify-content: center;
    overflow: hidden; /* Pas de scroll */
}

/* Classe dynamique pour 1-2 logos */
.event-image-container.logos-small {
    grid-template-columns: repeat(auto-fit, minmax(150px, 200px));
}

/* Classe dynamique pour 3-4 logos */
.event-image-container.logos-medium {
    grid-template-columns: repeat(2, 1fr);
}

/* Classe dynamique pour 5-9 logos */
.event-image-container.logos-large {
    grid-template-columns: repeat(3, 1fr);
}

/* Classe dynamique pour 10+ logos */
.event-image-container.logos-xlarge {
    grid-template-columns: repeat(4, 1fr);
    gap: 0.8rem;
}

.event-image-container img {
    width: 100%;
    height: 200px;
    object-fit: contain;
    background: white;
    padding: 1.5rem;
    border-radius: 8px;
    border: 2px solid var(--border-color);
    transition: all 0.3s ease;
    filter: brightness(1) contrast(1.1);
}

/* Réduction pour grilles denses */
.event-image-container.logos-large img {
    height: 170px;
    padding: 1.2rem;
}

.event-image-container.logos-xlarge img {
    height: 140px;
    padding: 1rem;
}

.event-image-container img:hover {
    transform: scale(1.1);
    border-color: var(--primary-color);
    box-shadow: 0 8px 25px rgba(255, 255, 255, 0.4);
    background: rgba(255, 255, 255, 0.98);
    z-index: 10;
}

.navigation-hints {
    display: flex;
    justify-content: center;
    gap: 2rem;
    flex-wrap: wrap;
    padding: 2rem;
    background: var(--card-bg);
    backdrop-filter: blur(10px);
    border: 1px solid var(--border-color);
    border-radius: 15px;
    animation: fadeInUp 1s ease-out;
}

.hint {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    color: var(--text-muted);
    font-size: 0.9rem;
}

kbd {
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid var(--border-color);
    border-radius: 5px;
    padding: 0.3rem 0.6rem;
    font-family: monospace;
    font-size: 0.9rem;
    color: var(--text-light);
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.2);
}

@keyframes fadeIn {
    from {
        opacity: 0;
    }
    to {
        opacity: 1;
    }
}

@keyframes fadeInDown {
    from {
        opacity: 0;
        transform: translateY(-30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

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

@keyframes pulse {
    0%, 100% {
        transform: scale(1);
    }
    50% {
        transform: scale(1.1);
    }
}

@keyframes float {
    0%, 100% {
        transform: translateY(0);
    }
    50% {
        transform: translateY(-20px);
    }
}

@keyframes shimmer {
    0% {
        transform: translateX(-100%);
    }
    100% {
        transform: translateX(100%);
    }
}

@keyframes yearReveal {
    0% {
        opacity: 0;
        transform: scale(0.5) rotateY(90deg);
    }
    50% {
        opacity: 1;
        transform: scale(1.2) rotateY(0deg);
    }
    100% {
        opacity: 1;
        transform: scale(1) rotateY(0deg);
    }
}

@keyframes slideInFromRight {
    from {
        opacity: 0;
        transform: translateX(100px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

@keyframes slideInFromLeft {
    from {
        opacity: 0;
        transform: translateX(-100px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

@keyframes revealMarker {
    0% {
        transform: scale(0) rotate(0deg);
        opacity: 0;
    }
    50% {
        transform: scale(1.3) rotate(180deg);
        opacity: 1;
    }
    100% {
        transform: scale(1) rotate(360deg);
        opacity: 1;
    }
}

/* Pagination des événements */
.event-pagination {
    display: flex;
    align-items: center;
    justify-content: flex-start;
    gap: 0.8rem;
    margin-top: 2rem;
    padding-top: 1.5rem;
    border-top: 1px solid var(--border-color);
}

.pagination-dot {
    width: 12px;
    height: 12px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.2);
    border: 2px solid rgba(255, 255, 255, 0.3);
    cursor: pointer;
    transition: all 0.3s ease;
    position: relative;
}

.pagination-dot:hover {
    background: rgba(255, 255, 255, 0.4);
    transform: scale(1.2);
}

.pagination-dot.active {
    background: linear-gradient(135deg, var(--primary-color), var(--accent-color));
    border-color: var(--accent-color);
    transform: scale(1.3);
    box-shadow: 0 0 15px rgba(255, 255, 255, 0.6);
}

.pagination-dot.active::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 20px;
    height: 20px;
    border-radius: 50%;
    border: 2px solid var(--accent-color);
    animation: pulse 2s infinite;
}

.event-counter {
    margin-left: 1rem;
    padding: 0.4rem 1rem;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 20px;
    font-size: 0.9rem;
    color: var(--text-light);
    font-weight: 600;
    border: 1px solid var(--border-color);
}

@media (max-width: 768px) {
    header h1 {
        font-size: 1.5rem;
    }

    .year-number {
        font-size: 2rem;
    }

    .year-circle {
        width: 140px;
        height: 140px;
    }

    .year-circle-number {
        font-size: 2rem;
    }

    .main-content {
        flex-direction: column;
    }

    .life-column {
        flex: 1;
        width: 100%;
        max-height: 350px;
        order: 3;
    }

    .polaroid-wrapper:nth-child(3n) img { width: 130px; }
    .polaroid-wrapper:nth-child(5n) img { width: 110px; }
    .polaroid-wrapper:nth-child(7n) img { width: 120px; }

    .accumulated-images img {
        width: 120px;
        height: 100px;
    }

    .event-details {
        padding: 2rem;
        order: 1;
    }

    .event-content {
        flex-direction: column;
        gap: 2rem;
    }

    .event-text-content {
        order: 1;
    }

    .event-image-container {
        order: 2;
        grid-template-columns: repeat(auto-fit, minmax(80px, 1fr));
        max-height: 300px;
    }

    .event-content h2 {
        font-size: 2rem;
    }

    .event-content h3 {
        font-size: 1.5rem;
    }

    .event-image-container img {
        height: 70px;
    }

    .navigation-hints {
        gap: 1rem;
    }

    .timeline-item {
        min-width: 80px;
    }
}
