/**
 * Page: Classes de dépaysement
 *
 * Styles extracted from static classe-ferme.html.
 * Enqueued conditionally on the depaysement page only.
 *
 * @package ecole-du-bonheur
 */

/* Introduction Block */
.intro-block {
    margin-bottom: 2rem;
}

.intro-block p {
    color: var(--text-medium);
    font-size: 1.05rem;
    line-height: 1.8;
    margin-bottom: 0.5rem;
}

/* ==================== CLASSES SHOWCASE ==================== */
.classes-showcase {
    position: relative;
    min-height: 400px;
}

/* Classes Overview - Circle Grid */
.classes-overview {
    padding: 2rem 0;
}

.circles-grid {
    display: flex;
    justify-content: center;
    flex-wrap: wrap;
    gap: 3rem;
    max-width: 1100px;
    margin: 0 auto;
    padding: 1rem;
}

/* Class Circle */
.class-circle {
    width: 300px;
    height: 300px;
    border-radius: 50%;
    position: relative;
    border: none;
    padding: 0;
    cursor: pointer;
    box-shadow:
        0 10px 40px rgba(0, 0, 0, 0.15),
        0 0 30px -10px var(--class-color);
    transition: all 0.4s cubic-bezier(0.34, 1.56, 0.64, 1);
    animation: circleEnter 0.6s cubic-bezier(0.34, 1.56, 0.64, 1) backwards;
}

.class-circle:nth-child(1) { animation-delay: 0.1s; }
.class-circle:nth-child(2) { animation-delay: 0.2s; }
.class-circle:nth-child(3) { animation-delay: 0.3s; }
.class-circle:nth-child(4) { animation-delay: 0.4s; }

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

.class-circle:hover {
    transform: scale(1.05) translateY(-3px) !important;
    box-shadow:
        0 15px 40px rgba(0, 0, 0, 0.2),
        0 0 0 3px var(--class-color);
}

.class-circle:focus {
    outline: none;
    box-shadow:
        0 15px 40px rgba(0, 0, 0, 0.2),
        0 0 0 3px var(--class-color),
        0 0 0 6px rgba(var(--class-color), 0.3);
}

/* Circle Image Wrapper */
.circle-image-wrapper {
    position: absolute;
    inset: 0;
    border-radius: 50%;
    overflow: hidden;
}

.circle-image-wrapper img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.5s ease;
}

.class-circle:hover .circle-image-wrapper img {
    transform: scale(1.1);
}

.circle-gradient-overlay {
    position: absolute;
    inset: 0;
    background: linear-gradient(
        to top,
        rgba(0, 0, 0, 0.4) 0%,
        rgba(0, 0, 0, 0.15) 35%,
        rgba(0, 0, 0, 0.05) 60%,
        transparent 100%
    );
    border-radius: 50%;
}

/* Circle Content */
.circle-content {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    padding: 1.5rem;
    text-align: center;
    z-index: 2;
}

.circle-level {
    display: inline-block;
    font-size: 0.75rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    color: var(--class-color);
    background: rgba(255, 255, 255, 0.95);
    padding: 0.25rem 0.75rem;
    border-radius: 20px;
    margin-bottom: 0.5rem;
}

.circle-title {
    font-size: 1.2rem;
    font-weight: 700;
    color: white;
    margin: 0;
    text-shadow: 0 2px 10px rgba(0, 0, 0, 0.3);
    line-height: 1.3;
}

/* Icon Badge on hover */
.circle-icon-badge {
    position: absolute;
    top: 1rem;
    right: 1rem;
    width: 44px;
    height: 44px;
    border-radius: 50%;
    background: white;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.1rem;
    color: var(--class-color);
    opacity: 0;
    transform: scale(0.8) translateY(-10px);
    transition: all 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
    z-index: 3;
}

.circle-icon-badge i {
    color: inherit;
    font-size: inherit;
}

.class-circle:hover .circle-icon-badge {
    opacity: 1;
    transform: scale(1) translateY(0);
}

/* ==================== CLASS DETAIL VIEW ==================== */
.class-detail {
    display: none;
    position: relative;
    background: white;
    border-radius: var(--radius);
    box-shadow: var(--shadow-lg);
    overflow: hidden;
    animation: detailFadeIn 0.4s ease;
}

.class-detail.active {
    display: block;
}

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

/* Back Button */
.back-to-overview {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.75rem 1.25rem;
    margin: 1.5rem;
    background: var(--light-bg);
    border: none;
    border-radius: var(--radius-full);
    cursor: pointer;
    font-size: 0.95rem;
    font-weight: 600;
    color: var(--text-dark);
    transition: all 0.3s ease;
}

.back-to-overview:hover {
    background: var(--primary);
    color: white;
    transform: translateX(-5px);
}

.back-to-overview i {
    transition: transform 0.3s ease;
}

.back-to-overview:hover i {
    transform: translateX(-3px);
}

/* Class Content Wrapper */
.class-content-wrapper {
    padding: 0 2rem 2rem;
    position: relative;
}

/* Bottom Navigation Bar */
.class-bottom-nav {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 1rem 1.5rem;
    background: var(--light-bg);
    border-top: 1px solid var(--border-light);
    gap: 1rem;
}

.nav-prev,
.nav-next {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.75rem 1rem;
    background: white;
    border: 1px solid var(--border-light);
    border-radius: var(--radius-sm);
    cursor: pointer;
    font-size: 0.9rem;
    font-weight: 600;
    color: var(--text-medium);
    transition: all 0.3s ease;
    min-width: 140px;
}

.nav-prev {
    justify-content: flex-start;
}

.nav-next {
    justify-content: flex-end;
}

.nav-prev:hover,
.nav-next:hover {
    background: var(--primary);
    border-color: var(--primary);
    color: white;
}

.nav-prev i,
.nav-next i {
    font-size: 0.8rem;
    transition: transform 0.3s ease;
}

.nav-prev:hover i {
    transform: translateX(-3px);
}

.nav-next:hover i {
    transform: translateX(3px);
}

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

/* Class Dots Navigation */
.class-dots {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 0.75rem;
    padding: 0;
}

.class-dot {
    width: 12px;
    height: 12px;
    border-radius: 50%;
    background: var(--border-light);
    border: none;
    cursor: pointer;
    transition: all 0.3s ease;
    padding: 0;
}

.class-dot:hover {
    background: var(--primary-light);
    transform: scale(1.2);
}

.class-dot.active {
    background: var(--primary);
    transform: scale(1.3);
}

/* Tab content styles for cloned content */
.class-content-wrapper .tab-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 1.5rem;
    flex-wrap: wrap;
    gap: 1rem;
}

.class-content-wrapper .tab-header h2 {
    font-size: 1.75rem;
    font-weight: 800;
    color: var(--dark);
    margin: 0;
}

.class-content-wrapper .tab-body {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

.tab-location {
    color: var(--text-light);
    font-size: 0.95rem;
    margin-top: 0.25rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.tab-location i {
    color: var(--primary);
}

#ferme .tab-location i {
    color: #10B981;
}

#mer .tab-location i {
    color: #3B82F6;
}

#brugges .tab-location i {
    color: #F59E0B;
}

#neige .tab-location i {
    color: #06B6D4;
}

.tab-badge {
    padding: 0.5rem 1rem;
    border-radius: 50px;
    font-weight: 600;
    font-size: 0.85rem;
    color: white;
}

/* Badge background color comes from dep_color ACF field via inline style */

.description-block p {
    color: var(--text-medium);
    font-size: 1.05rem;
    line-height: 1.8;
    margin-bottom: 0.5rem;
}

.description-block p:last-child {
    margin-bottom: 0;
}

.conclusion-block {
    background: var(--light-bg);
    padding: 1.25rem 1.5rem;
    border-radius: 12px;
}

.conclusion-block p {
    color: var(--text-medium);
    font-size: 1rem;
    line-height: 1.7;
    margin: 0;
}

/* Activities Block */
.activities-block {
    padding: 1rem 0;
}

.activities-block h3 {
    font-size: 1.1rem;
    font-weight: 700;
    color: var(--dark);
    margin-bottom: 1rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.activities-block h3 i {
    color: var(--primary);
}

.activities-list {
    list-style: none;
    padding: 0;
    margin: 0;
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 0.75rem;
}

.activities-list li {
    display: flex;
    align-items: flex-start;
    gap: 0.75rem;
    padding: 0.5rem 0;
    color: var(--text-medium);
    font-size: 0.95rem;
    line-height: 1.5;
}

.activities-list li i {
    color: var(--primary);
    font-size: 1rem;
    margin-top: 0.15rem;
    flex-shrink: 0;
}

#ferme .activities-list li i,
.class-content-wrapper #ferme .activities-list li i {
    color: #10B981;
}

#mer .activities-list li i,
.class-content-wrapper #mer .activities-list li i {
    color: #3B82F6;
}

#brugges .activities-list li i,
.class-content-wrapper #brugges .activities-list li i {
    color: #F59E0B;
}

#neige .activities-list li i,
.class-content-wrapper #neige .activities-list li i {
    color: #06B6D4;
}

/* Photo Gallery */
.photo-gallery-section {
    margin-top: 0.5rem;
}

.gallery-title {
    font-size: 1.1rem;
    font-weight: 700;
    color: var(--dark);
    margin-bottom: 1rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.gallery-title i {
    color: var(--primary);
}

#ferme .gallery-title i {
    color: #10B981;
}

#mer .gallery-title i {
    color: #3B82F6;
}

#brugges .gallery-title i {
    color: #F59E0B;
}

#neige .gallery-title i {
    color: #06B6D4;
}

.photo-gallery {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
    gap: 1rem;
}

.gallery-item {
    position: relative;
    border-radius: 12px;
    overflow: hidden;
    aspect-ratio: 4/3;
    cursor: pointer;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.gallery-item:hover {
    transform: translateY(-5px);
    box-shadow: 0 12px 30px rgba(0, 0, 0, 0.2);
}

.gallery-item img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s ease;
}

.gallery-item:hover img {
    transform: scale(1.05);
}

.gallery-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.4);
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.gallery-overlay i {
    color: white;
    font-size: 1.75rem;
}

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

/* Gallery theme colors */
.ferme-gallery .gallery-item:hover {
    box-shadow: 0 12px 30px rgba(16, 185, 129, 0.25);
}

.mer-gallery .gallery-item:hover {
    box-shadow: 0 12px 30px rgba(59, 130, 246, 0.25);
}

.brugges-gallery .gallery-item:hover {
    box-shadow: 0 12px 30px rgba(245, 158, 11, 0.25);
}

.neige-gallery .gallery-item:hover {
    box-shadow: 0 12px 30px rgba(6, 182, 212, 0.25);
}

/* Lightbox */
.lightbox {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.95);
    z-index: 9999;
    align-items: center;
    justify-content: center;
    padding: 2rem;
}

.lightbox.active {
    display: flex;
}

.lightbox img {
    max-width: 90%;
    max-height: 80vh;
    border-radius: 8px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.5);
}

.lightbox-close {
    position: absolute;
    top: 1.5rem;
    right: 2rem;
    color: white;
    font-size: 3rem;
    cursor: pointer;
    transition: transform 0.2s;
    z-index: 10;
}

.lightbox-close:hover {
    transform: scale(1.2);
}

.lightbox-nav {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    width: 56px;
    height: 56px;
    background: rgba(255,255,255,0.1);
    border: 2px solid rgba(255,255,255,0.3);
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.25rem;
    color: white;
    transition: all 0.3s ease;
}

.lightbox-nav:hover {
    background: rgba(255,255,255,0.2);
    border-color: white;
}

.lightbox-prev {
    left: 2rem;
}

.lightbox-next {
    right: 2rem;
}

.lightbox-caption {
    position: absolute;
    bottom: 2rem;
    left: 50%;
    transform: translateX(-50%);
    color: white;
    font-size: 1rem;
    text-align: center;
    max-width: 80%;
    padding: 0.75rem 1.5rem;
    background: rgba(0,0,0,0.6);
    border-radius: 8px;
}

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

/* Tablet */
@media (max-width: 768px) {
    .circles-grid {
        flex-direction: column;
        align-items: center;
        gap: 2rem;
    }

    .class-circle {
        width: 260px;
        height: 260px;
    }

    .circle-title {
        font-size: 1.1rem;
    }

    .back-to-overview {
        margin: 1rem;
        font-size: 0.9rem;
    }

    .class-content-wrapper {
        padding: 0 1.5rem 1.5rem;
    }

    .class-content-wrapper .tab-header {
        flex-direction: column;
    }

    .class-content-wrapper .tab-header h2 {
        font-size: 1.4rem;
    }

    .activities-list {
        grid-template-columns: 1fr;
    }

    /* Bottom nav mobile */
    .class-bottom-nav {
        flex-wrap: wrap;
        padding: 1rem;
        gap: 0.75rem;
    }

    .nav-prev,
    .nav-next {
        min-width: 0;
        flex: 1;
        padding: 0.6rem 0.75rem;
        font-size: 0.85rem;
    }

    .class-dots {
        order: -1;
        width: 100%;
        justify-content: center;
        padding-bottom: 0.5rem;
    }

    .lightbox-nav {
        width: 44px;
        height: 44px;
    }

    .lightbox-prev {
        left: 0.5rem;
    }

    .lightbox-next {
        right: 0.5rem;
    }

    .photo-gallery {
        grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
        gap: 0.75rem;
    }
}

@media (max-width: 480px) {
    .class-circle {
        width: 220px;
        height: 220px;
    }

    .circle-content {
        padding: 1rem;
    }

    .circle-title {
        font-size: 1rem;
    }

    .class-content-wrapper {
        padding: 0 1rem 1rem;
    }

    .photo-gallery {
        grid-template-columns: repeat(2, 1fr);
        gap: 0.5rem;
    }

    .gallery-item {
        border-radius: 8px;
    }
}

/* Reduced motion */
@media (prefers-reduced-motion: reduce) {
    .class-circle {
        animation: none;
    }

    .class-circle,
    .class-circle:hover,
    .circle-image-wrapper img,
    .circle-icon-badge,
    .back-to-overview,
    .nav-prev,
    .nav-next {
        transition: none;
    }
}
