/**
 * Process Block - Académie des Étoiles
 * Card-based carousel for step-by-step workflows
 */

.ade-process {
    background: transparent;
    border-radius: 0;
    box-shadow: none;
    padding: var(--ade-space-xl) 0;
}

/* Optional title */
.ade-process__title {
    font-size: var(--ade-font-size-medium);
    font-weight: 700;
    color: var(--ade-gray-dark);
    margin: 0 0 var(--ade-space-xl) 0;
    text-align: center;
}

/* Carousel container */
.ade-process__carousel {
    position: relative;
    max-width: 800px;
    margin: 0 auto;
}

/* Cards container */
.ade-process__cards {
    position: relative;
    min-height: 650px;
    margin-bottom: var(--ade-space-xl);
}

/* Individual card */
.ade-process__card {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    background: var(--ade-white);
    border-radius: 16px;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.12);
    overflow: hidden;
    transition: opacity 0.4s ease-in-out, transform 0.4s ease-in-out, translate 0.4s ease-in-out, z-index 0s;
    opacity: 1;
    transform: scale(1);
    translate: 0 0;
    z-index: 1;  /* Visible card on top */
}

.ade-process__card[hidden] {
    opacity: 0;
    pointer-events: none;
    z-index: 0;  /* Hidden cards at bottom */
}

/* Slide left (when going forward) */
.ade-process__card[data-exit="left"] {
    opacity: 0;
    transform: scale(0.9);
    translate: -100px 0;
}

/* Slide right (when going backward) */
.ade-process__card[data-exit="right"] {
    opacity: 0;
    transform: scale(0.9);
    translate: 100px 0;
}

/* Enter from right (when going forward) */
.ade-process__card[data-enter="right"] {
    opacity: 0;
    transform: scale(0.9);
    translate: 100px 0;
}

/* Enter from left (when going backward) */
.ade-process__card[data-enter="left"] {
    opacity: 0;
    transform: scale(0.9);
    translate: -100px 0;
}

/* Card header (Step label) */
.ade-process__card-header {
    background: linear-gradient(135deg, var(--ade-primary) 0%, var(--ade-primary-dark) 100%);
    padding: var(--ade-space-lg) var(--ade-space-xl);
    text-align: center;
    position: relative;
    z-index: 2;  /* Ensure header stays above card body */
}

.ade-process__step-label {
    font-size: 18px;
    font-weight: 700;
    color: var(--ade-white);
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

/* Card body */
.ade-process__card-body {
    padding: var(--ade-space-2xl);
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: var(--ade-space-xl);
    position: relative;
    z-index: 1;  /* Keep body below header */
}

/* Graphic placeholder */
.ade-process__graphic-placeholder {
    width: 100%;
    max-width: 400px;
    aspect-ratio: 16 / 9;
    background: linear-gradient(135deg, rgba(155, 81, 224, 0.08) 0%, rgba(202, 179, 255, 0.12) 100%);
    border: 2px dashed var(--ade-primary);
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: var(--ade-space-xl);
}

.ade-process__graphic-content {
    text-align: center;
}

.ade-process__graphic-emoji {
    font-size: 80px;
    line-height: 1;
    display: block;
}

.ade-process__graphic-text {
    font-size: 16px;
    color: var(--ade-primary);
    font-weight: 600;
    font-style: italic;
}

/* Card content */
.ade-process__card-content {
    width: 100%;
    text-align: center;
}

.ade-process__card-title {
    font-size: 24px;
    font-weight: 700;
    color: var(--ade-gray-dark);
    margin: 0 0 var(--ade-space-md) 0;
    line-height: 1.3;
}

.ade-process__card-description {
    font-size: var(--ade-font-size-base);
    line-height: 1.7;
    color: var(--ade-gray-medium);
}

.ade-process__card-description p {
    margin: 0 0 var(--ade-space-md) 0;
}

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

/* Navigation arrows */
.ade-process__nav {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    background: var(--ade-white);
    border: 2px solid var(--ade-primary);
    border-radius: 50%;
    width: 56px;
    height: 56px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all var(--ade-transition-fast);
    z-index: 10;
    box-shadow: 0 4px 12px rgba(155, 81, 224, 0.2);
}

.ade-process__nav:hover:not(:disabled) {
    background: var(--ade-primary);
    transform: translateY(-50%) scale(1.1);
    box-shadow: 0 6px 16px rgba(155, 81, 224, 0.4);
}

.ade-process__nav:hover:not(:disabled) svg path {
    stroke: var(--ade-white);
}

.ade-process__nav:focus {
    outline: 3px solid var(--ade-primary);
    outline-offset: 4px;
}

.ade-process__nav:disabled {
    opacity: 0.3;
    cursor: not-allowed;
    box-shadow: none;
}

.ade-process__nav svg path {
    stroke: var(--ade-primary);
    transition: stroke var(--ade-transition-fast);
}

.ade-process__nav--prev {
    left: -28px;
}

.ade-process__nav--next {
    right: -28px;
}

/* Progress indicator */
.ade-process__progress {
    text-align: center;
    font-size: 18px;
    font-weight: 600;
    color: var(--ade-gray-dark);
    padding: var(--ade-space-md);
    background: linear-gradient(135deg, rgba(155, 81, 224, 0.05) 0%, rgba(202, 179, 255, 0.08) 100%);
    border-radius: 8px;
}

.ade-process__current {
    color: var(--ade-primary);
    font-size: 20px;
}

/* Responsive - tablet */
@media screen and (max-width: 768px) {
    .ade-process {
        padding: var(--ade-space-lg) 0;
    }

    .ade-process__cards {
        min-height: 550px;
    }

    .ade-process__card-body {
        padding: var(--ade-space-xl);
        gap: var(--ade-space-lg);
    }

    .ade-process__card-title {
        font-size: 20px;
    }

    .ade-process__graphic-emoji {
        font-size: 60px;
    }

    .ade-process__nav {
        width: 48px;
        height: 48px;
    }

    .ade-process__nav--prev {
        left: -24px;
    }

    .ade-process__nav--next {
        right: -24px;
    }
}

/* Responsive - mobile */
@media screen and (max-width: 480px) {
    .ade-process {
        padding: var(--ade-space-md) 0;
    }

    .ade-process__title {
        font-size: 18px;
    }

    .ade-process__cards {
        min-height: 500px;
    }

    .ade-process__card-header {
        padding: var(--ade-space-md) var(--ade-space-lg);
    }

    .ade-process__step-label {
        font-size: 14px;
    }

    .ade-process__card-body {
        padding: var(--ade-space-lg);
        gap: var(--ade-space-md);
    }

    .ade-process__card-title {
        font-size: 18px;
    }

    .ade-process__card-description {
        font-size: 15px;
    }

    .ade-process__graphic-placeholder {
        max-width: 100%;
    }

    .ade-process__graphic-emoji {
        font-size: 50px;
    }

    .ade-process__graphic-text {
        font-size: 14px;
    }

    /* Position arrows inside on mobile */
    .ade-process__nav {
        width: 40px;
        height: 40px;
    }

    .ade-process__nav--prev {
        left: var(--ade-space-sm);
    }

    .ade-process__nav--next {
        right: var(--ade-space-sm);
    }

    .ade-process__progress {
        font-size: 16px;
    }

    .ade-process__current {
        font-size: 18px;
    }
}

/* Print */
@media print {
    .ade-process {
        /* No styles needed - already transparent */
    }

    .ade-process__card {
        position: relative !important;
        opacity: 1 !important;
        transform: none !important;
        page-break-inside: avoid;
        margin-bottom: var(--ade-space-xl);
    }

    .ade-process__card[hidden] {
        display: block !important;
        opacity: 1 !important;
        pointer-events: auto !important;
    }

    .ade-process__card-header {
        background: transparent;
        border-bottom: 3px solid var(--ade-primary);
    }

    .ade-process__step-label {
        color: var(--ade-primary);
    }

    .ade-process__nav {
        display: none;
    }

    .ade-process__progress {
        display: none;
    }
}
