/* ============================================
   EVENTS.CSS — Styles spécifiques à events.html
   ============================================ */

/* ============================================
   EVENT CONTAINER & THÈMES
   ============================================ */

.event-container {
    background: rgba(255, 255, 255, 0.35);
    border: 2px solid rgba(122, 158, 114, 0.2);
    border-radius: var(--radius-xl);
    padding: var(--spacing-lg);
    backdrop-filter: blur(20px);
    position: relative;
    overflow: hidden;
    box-shadow: 0 4px 24px rgba(63, 47, 37, 0.07);
}

.event-container::before {
    content: attr(data-emoji);
    position: absolute;
    font-size: 15em;
    opacity: 0.10;
    top: -50px;
    right: -50px;
    animation: rotate 20s linear infinite;
}

@keyframes rotate {
    from { transform: rotate(0deg); }
    to   { transform: rotate(360deg); }
}

/* Thème automne (Baguettectober) */
.event-container.theme-autumn {
    background: linear-gradient(135deg, rgba(242, 193, 107, 0.10), rgba(197, 106, 82, 0.08));
    border-color: rgba(197, 106, 82, 0.22);
}

/* Thème game (DTI) */
.event-container.theme-game {
    background: linear-gradient(135deg, rgba(162, 89, 255, 0.10), rgba(218, 100, 220, 0.08));
    border-color: rgba(162, 89, 255, 0.22);
}

/* ============================================
   EVENT INTRO & BADGES
   ============================================ */

.event-title {
    font-size: 2.4em;
    font-weight: 800;
    color: var(--text-primary);
    margin: 12px 0 20px;
    line-height: 1.15;
}

.event-intro {
    text-align: center;
    margin-bottom: 60px;
    position: relative;
    z-index: 1;
}

.event-badge {
    display: inline-block;
    color: white;
    padding: 12px 30px;
    border-radius: var(--radius-full);
    font-size: 1.3em;
    font-weight: 700;
    margin-bottom: 20px;
}

.theme-autumn .event-badge {
    background: linear-gradient(135deg, #c47a5a, #f2c96b);
    box-shadow: 0 8px 24px rgba(196, 122, 90, 0.30);
}

.theme-game .event-badge {
    background: linear-gradient(135deg, #a259ff, #da64dc);
    box-shadow: 0 8px 24px rgba(162, 89, 255, 0.30);
}

.event-description {
    font-size: 1.3em;
    color: var(--text-secondary);
    max-width: 800px;
    margin: 0 auto;
    line-height: 1.8;
}

/* ============================================
   STATS STRIP
   ============================================ */

.event-stats-strip {
    display: flex;
    gap: 16px;
    flex-wrap: wrap;
    justify-content: center;
    margin-bottom: 48px;
}

.event-stat-chip {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 2px;
    padding: 18px 32px;
    background: rgba(255, 255, 255, 0.25);
    border: 1px solid rgba(255, 255, 255, 0.4);
    border-radius: var(--radius-lg);
    min-width: 110px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
}

.event-stat-number {
    font-size: 2em;
    font-weight: 800;
    color: #2c3e50;
    line-height: 1;
}

.event-stat-label {
    font-size: 0.8em;
    font-weight: 700;
    color: #4a5568;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

/* ============================================
   GALERIE BAGUETTECTOBER
   ============================================ */

.gallery-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(230px, 1fr));
    gap: 24px;
    max-width: 840px;
    margin-left: auto;
    margin-right: auto;
    position: relative;
    z-index: 1;
}

.gallery-item {
    background: rgba(255, 255, 255, 0.65);
    border: 1.5px solid rgba(63, 47, 37, 0.10);
    border-radius: 25px;
    padding: 20px;
    transition: all 0.4s ease;
    position: relative;
    overflow: hidden;
    cursor: pointer;
    box-shadow: 0 2px 12px rgba(63, 47, 37, 0.07);
}

.gallery-item::before {
    content: '';
    position: absolute;
    inset: 0;
    opacity: 0;
    transition: opacity 0.4s ease;
}

.gallery-item:hover::before { opacity: 1; }

.gallery-item:hover {
    transform: translateY(-8px) scale(1.02);
    box-shadow: 0 16px 40px rgba(63, 47, 37, 0.12);
    background: rgba(255, 255, 255, 0.88);
}

/* Variantes thématiques */
.theme-autumn .gallery-item {
    background: rgba(255, 248, 240, 0.72);
    border-color: rgba(197, 106, 82, 0.15);
}

.theme-autumn .gallery-item::before {
    background: linear-gradient(135deg, rgba(242, 193, 107, 0.10), rgba(197, 106, 82, 0.08));
}

.theme-autumn .gallery-item:hover {
    border-color: rgba(197, 106, 82, 0.35);
    box-shadow: 0 16px 40px rgba(197, 106, 82, 0.14);
}

.theme-winter .gallery-item {
    background: rgba(245, 252, 248, 0.72);
    border: 1.5px solid rgba(127, 184, 147, 0.18);
}

.theme-winter .gallery-item::before {
    background: linear-gradient(135deg, rgba(127, 184, 147, 0.10), rgba(180, 231, 206, 0.10));
}

.theme-winter .gallery-item:hover {
    border-color: rgba(127, 184, 147, 0.40);
    box-shadow: 0 16px 40px rgba(127, 184, 147, 0.18);
    animation: gentleSnow 0.6s ease-out;
}

@keyframes gentleSnow {
    0%   { transform: translateY(-8px) scale(1.02); }
    50%  { transform: translateY(-10px) scale(1.025); }
    100% { transform: translateY(-8px) scale(1.02); }
}

/* Placeholder (pas encore d'images) */
.gallery-placeholder {
    aspect-ratio: 1;
    background: linear-gradient(135deg, rgba(127, 184, 147, 0.12), rgba(242, 193, 107, 0.10));
    border-radius: 15px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    margin-bottom: 15px;
    border: 2px dashed rgba(63, 47, 37, 0.12);
    position: relative;
    z-index: 1;
    overflow: hidden;
}

.theme-autumn .gallery-placeholder {
    background: linear-gradient(135deg, rgba(242, 193, 107, 0.18), rgba(197, 106, 82, 0.10));
    border-color: rgba(197, 106, 82, 0.22);
}

.theme-winter .gallery-placeholder {
    background: linear-gradient(135deg, rgba(127, 184, 147, 0.18), rgba(180, 231, 206, 0.14));
    border: 2px dashed rgba(127, 184, 147, 0.35);
}

.gallery-icon {
    font-size: 4em;
    margin-bottom: 10px;
}

.theme-winter .gallery-icon {
    filter: drop-shadow(0 0 8px rgba(127, 184, 147, 0.4));
}

.gallery-week-label {
    color: var(--text-tertiary);
    font-size: 1em;
}

.theme-winter .gallery-week-label { color: #5c936f; font-weight: 600; }
.theme-autumn .gallery-week-label { color: #a0533a; font-weight: 600; }

.gallery-week {
    font-size: 1.3em;
    font-weight: 700;
    color: var(--text-primary);
    margin: 20px 0 8px;
    position: relative;
    z-index: 1;
}

.gallery-artist {
    color: var(--text-tertiary);
    position: relative;
    z-index: 1;
}

/* Mosaïque floutée (quand il y a des images) */
.gallery-mosaic {
    position: relative;
    border-radius: 15px;
    overflow: hidden;
    aspect-ratio: 1;
    margin-bottom: 10px;
}

.gallery-mosaic-inner {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    grid-template-rows: repeat(2, 1fr);
    gap: 3px;
    width: 100%;
    height: 100%;
    border-radius: 15px;
    filter: blur(5px) brightness(0.8);
    transform: scale(1.02);
    transition: filter 0.4s ease, transform 0.4s ease;
}

.gallery-mosaic div {
    background-size: cover;
    background-position: center;
    width: 100%;
    height: 100%;
}

.has-gallery { position: relative; }

.has-gallery .gallery-mosaic {
    position: relative;
    z-index: 1;
}

.has-gallery .gallery-mosaic::after {
    content: "Découvrir les créations 🎨";
    position: absolute;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: 0.82em;
    text-align: center;
    padding: 8px;
    color: #fff;
    background: rgba(0, 0, 0, 0.45);
    opacity: 0;
    transition: opacity 0.3s ease;
    border-radius: 15px;
    pointer-events: none;
    z-index: 2;
}

.has-gallery:hover .gallery-mosaic::after { opacity: 1; }

.has-gallery:hover .gallery-mosaic-inner {
    filter: blur(5px) brightness(1);
    transform: scale(1.05);
}

.theme-winter .has-gallery:hover .gallery-mosaic-inner {
    filter: blur(5px) brightness(1.1);
}

.no-gallery { cursor: default; }
.no-gallery:hover { transform: none; box-shadow: none; }

/* ============================================
   PODIUM
   ============================================ */

.event-podium-section {
    margin-top: 48px;
    margin-bottom: 60px;
}

.event-podium-title {
    text-align: center;
    font-size: 1.4em;
    font-weight: 700;
    color: var(--text-secondary);
    margin-bottom: 32px;
    letter-spacing: 0.3px;
}

.event-podium {
    display: flex;
    justify-content: center;
    align-items: flex-end;
    gap: 20px;
}

.podium-card {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 10px;
    padding: 20px;
    border-radius: 20px;
    text-align: center;
    background: rgba(255, 255, 255, 0.6);
    backdrop-filter: blur(10px);
    border: 2px solid transparent;
    transition: all 0.3s ease;
    min-width: 140px;
}

.podium-card:hover { transform: translateY(-4px); }

.podium-medal { font-size: 2.2em; }

.podium-name {
    font-size: 1em;
    font-weight: 800;
}

.podium-card.rank-1 {
    background: linear-gradient(135deg, rgba(255, 215, 0, 0.15), rgba(255, 165, 0, 0.10));
    border-color: rgb(255 157 0 / 27%);
    padding-bottom: 40px;
}

.podium-card.rank-2 {
    background: linear-gradient(135deg, rgba(192, 192, 192, 0.12), rgba(150, 150, 150, 0.08));
    border-color: rgba(192, 192, 192, 0.30);
}

.podium-card.rank-3 {
    background: linear-gradient(135deg, rgba(205, 127, 50, 0.12), rgba(180, 100, 30, 0.08));
    border-color: rgba(205, 127, 50, 0.28);
}

.podium-card .podium-name    { color: #2c2c2c; }
.podium-card.rank-1 .podium-name { color: #3a2e00; }
.podium-card.rank-2 .podium-name { color: #2f2f2f; }
.podium-card.rank-3 .podium-name { color: #3a2416; }

/* ============================================
   DTI PHOTO GRID
   ============================================ */

.dti-photo-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 22px;
    position: relative;
    z-index: 1;
}

.dti-gallery-block {
    position: relative;
    z-index: 1;
    margin-top: 48px;
    max-width: 800px;
    margin-left: auto;
    margin-right: auto;
}

.dti-gallery-block:first-of-type { margin-top: 0; }

.dti-gallery-block-highlight {
    padding: 28px;
    border-radius: var(--radius-xl);
    background: rgba(255, 255, 255, 0.18);
    border: 1px solid rgba(255, 255, 255, 0.22);
    box-shadow: 0 4px 18px rgba(0, 0, 0, 0.04);
}

.dti-section-title {
    font-size: 1.45em;
    font-weight: 800;
    color: var(--text-primary);
    margin: 0 0 12px;
    text-align: center;
}

.dti-section-text {
    font-size: 1.05em;
    line-height: 1.7;
    color: var(--text-secondary);
    text-align: center;
    max-width: 760px;
    margin: 0 auto 24px;
}

.dti-photo-item {
    margin: 0;
    position: relative;
    border-radius: var(--radius-lg);
    overflow: hidden;
    box-shadow: 0 8px 24px rgba(63, 47, 37, 0.08);
    transition: transform var(--transition-smooth), box-shadow var(--transition-smooth);
}

.dti-photo-item:hover {
    transform: translateY(-4px);
    box-shadow: 0 14px 34px rgba(63, 47, 37, 0.14);
}

.dti-photo-item a {
    display: block;
    position: relative;
    aspect-ratio: 4 / 5;
    background: rgba(255, 255, 255, 0.06);
    border: 1px solid rgba(255, 255, 255, 0.12);
    overflow: hidden;
}

.dti-photo-item img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.dti-photo-caption {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    padding: 36px 12px 12px;
    background: linear-gradient(to top, rgba(50, 10, 80, 0.82) 0%, transparent 100%);
    color: rgba(255, 255, 255, 0.95);
    font-size: 0.85em;
    font-weight: 700;
    text-align: center;
    letter-spacing: 0.1px;
    pointer-events: none;
    z-index: 2;
}

.dti-photo-item a::after {
    content: "Voir";
    position: absolute;
    top: 50%;
    left: 50%;
    background: rgba(255, 255, 255, 0.92);
    color: #3d2e1e;
    font-size: 0.85em;
    font-weight: 700;
    padding: 8px 18px;
    border-radius: 999px;
    opacity: 0;
    transform: translate(-50%, calc(-50% + 8px));
    transition: opacity 0.25s ease, transform 0.25s ease;
    pointer-events: none;
    z-index: 3;
}

.dti-photo-item:hover a::after,
.dti-photo-item a:focus-visible::after {
    opacity: 1;
    transform: translate(-50%, -50%);
}

.lightbox-link { cursor: zoom-in; }

.dti-photo-grid-finale {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    max-width: 560px;
    margin: 0 auto;
}

.dti-photo-grid-backstage {
    grid-template-columns: minmax(0, 420px);
    justify-content: center;
}

/* ============================================
   RESPONSIVE — Events
   ============================================ */

@media (max-width: 768px) {
    .event-title { font-size: 1.8em; }

    .event-container {
        padding: var(--spacing-md) var(--spacing-sm);
        border-radius: 25px;
    }

    .event-container::before { font-size: 8em; }
    .event-container.theme-winter::after { font-size: 5em; }

    /* Galerie 2 colonnes */
    .gallery-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 12px;
        max-width: 100%;
    }

    /* Overlay toujours visible (pas de hover sur mobile) */
    .has-gallery .gallery-mosaic::after { opacity: 1; }
    .has-gallery .gallery-mosaic-inner { filter: blur(5px) brightness(0.82); }

    /* Description cachée, titre clampé */
    .gallery-artist { display: none; }

    .gallery-week {
        font-size: 0.92em;
        display: -webkit-box;
        -webkit-line-clamp: 2;
        -webkit-box-orient: vertical;
        overflow: hidden;
    }

    .gallery-week-label { font-size: 0.78em; }

    /* Mosaïque en 4:3 (moins haute que le carré) */
    .gallery-placeholder { aspect-ratio: 4 / 3; }

    /* DTI */
    .dti-gallery-block-highlight { padding: 20px; }
    .dti-section-title { font-size: 1.25em; }
    .dti-section-text  { font-size: 1em; }
}

@media (max-width: 640px) {
    /* Podium compact horizontal */
    .event-podium { gap: 12px; }

    .podium-card {
        flex: 1;
        min-width: 0;
        padding: 14px 8px;
    }

    .podium-medal  { font-size: 1.9em; }
    .podium-rank   { font-size: 0.9em; }

    .podium-name {
        font-size: 0.82em;
        word-break: break-word;
        hyphens: auto;
    }

    .podium-card.rank-1 { padding-bottom: 30px; }

    /* DTI en 2 colonnes */
    .dti-photo-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: 12px;
    }

    .dti-photo-grid-backstage { grid-template-columns: 1fr; }
    .dti-photo-caption { font-size: 0.85em; }
}

@media (max-width: 480px) {
    .event-container { padding: 30px 15px; }

    .event-stat-chip {
        padding: 14px 20px;
        min-width: 90px;
    }

    .event-badge, .baguettectober-badge {
        font-size: 1.15em;
        padding: 10px 24px;
    }

    .event-description, .baguettectober-desc {
        font-size: 1.15em;
        line-height: 1.6;
    }

    .gallery-item  { padding: 12px; }
    .gallery-week  { margin-top: 8px; margin-bottom: 4px; }
    .gallery-icon  { font-size: 2.8em; margin-bottom: 6px; }
}

@media (max-width: 380px) {
    .dti-photo-grid { grid-template-columns: 1fr; }
}
