/* Tilted Card Styles (Ported from React) */
.tilted-card-figure {
    position: relative;
    width: 450px;
    /* Increased size (+50% from 300px) */
    height: 450px;
    perspective: 800px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    margin: 0;
    flex-shrink: 0;
}

.tilted-card-inner {
    position: relative;
    width: 100%;
    height: 100%;
    transform-style: preserve-3d;
    will-change: transform;
}

.tilted-card-img {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: 15px;
    will-change: transform;
    transform: translateZ(0);
    /* optimize */
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.2);
}

/* Overlay hidden as requested, text moved to side box */
.tilted-card-overlay {
    display: none;
}

/* New Side Text Box */
.tilted-text-box {
    background: white;
    padding: 20px;
    border-radius: 8px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
    width: 250px;
    margin-left: 20px;
    /* "à côté" */
    position: relative;
    z-index: 10;
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.tilted-text-box h4 {
    color: var(--color-primary, #1A2E49);
    margin-bottom: 8px;
    font-size: 1.1rem;
    line-height: 1.2;
    text-transform: uppercase;
    font-family: var(--font-heading, sans-serif);
}

.tilted-text-box p {
    color: var(--color-accent, #64D2FF);
    font-size: 0.9rem;
    margin: 0;
    font-weight: 600;
}


.tilted-card-caption {
    pointer-events: none;
    position: absolute;
    left: 0;
    top: 0;
    border-radius: 4px;
    background-color: #fff;
    padding: 4px 10px;
    font-size: 10px;
    color: #2d2d2d;
    opacity: 0;
    z-index: 3;
    transition: opacity 0.2s ease;
    white-space: nowrap;
}

.tilted-card-mobile-alert {
    position: absolute;
    top: 1rem;
    width: 100%;
    text-align: center;
    font-size: 0.875rem;
    display: none;
    color: white;
    background: rgba(0, 0, 0, 0.5);
    padding: 5px;
}

@media (max-width: 640px) {
    .tilted-card-mobile-alert {
        display: block;
    }

    .tilted-card-caption {
        display: none;
    }
}

/* Carousel / Slider Wrapper */
.tilted-carousel-container {
    padding-bottom: 40px;
    /* Space for dots */
    position: relative;
    width: 700px;
    /* Increased to fit image+text */
    height: 480px;
    margin-left: auto;
    /* Align right in flex container if needed */
}

/* The individual items in the carousel */
.tilted-carousel-item {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    opacity: 0;
    visibility: hidden;
    transition: opacity 1.2s ease, visibility 1.2s ease;
    z-index: 1;

    /* Layout for Image + Text Side-by-Side */
    display: flex;
    align-items: center;
    justify-content: flex-start;
    /* Image Left, Text Right */
}

.tilted-carousel-item.active {
    opacity: 1;
    visibility: visible;
    z-index: 2;
}

/* Dots Navigation */
.tilted-carousel-dots {
    position: absolute;
    bottom: -10px;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    gap: 10px;
    z-index: 10;
}

.tilted-dot {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    /* Darker for white bg context? Or stays over image? */
    /* Dots are at bottom of Container. Container height covers image. Dots are likely below image. */
    background-color: rgba(26, 46, 73, 0.3);
    cursor: pointer;
    transition: background-color 0.3s ease, transform 0.3s ease;
}

.tilted-dot.active {
    background-color: var(--color-accent, #64D2FF);
    transform: scale(1.2);
}

.tilted-dot:hover {
    background-color: var(--color-primary, #1A2E49);
}

/* Responsive Scaling */
@media (max-width: 992px) {
    .tilted-carousel-container {
        width: 100%;
        max-width: 500px;
        height: auto;
        min-height: 550px;
        margin: 0 auto;
    }

    .tilted-carousel-item {
        flex-direction: column;
        justify-content: center;
        text-align: center;
    }

    .tilted-card-figure {
        width: 300px;
        height: 300px;
        margin-bottom: 20px;
    }

    .tilted-text-box {
        margin-left: 0;
        width: 100%;
        max-width: 300px;
    }
}