/* ===== Stepper ===== */
.stepper {
    position: sticky;
    top: 56px; /* hauteur navbar */
    z-index: 50;
    background: #f8f9fa;
    margin-bottom: 2.5rem;
    padding: 1rem 1rem 0.75rem;
    border-bottom: 1px solid #e5e7eb;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.06);
}

.stepper-track {
    position: absolute;
    top: calc(1rem + 22px); /* padding-top + centre du cercle */
    left: calc(10% + 1rem);
    right: calc(10% + 1rem);
    height: 4px;
    background: #e5e7eb;
    border-radius: 2px;
    z-index: 0;
}

.stepper-progress {
    height: 100%;
    background: #5b6abf;
    border-radius: 2px;
    transition: width 0.4s ease;
    width: 0%;
}

.stepper-steps {
    display: flex;
    justify-content: space-between;
    position: relative;
    z-index: 1;
}

.stepper-step {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.5rem;
    background: none;
    border: none;
    cursor: pointer;
    padding: 0;
    min-width: 0;
    flex: 1;
}

.stepper-number {
    width: 44px;
    height: 44px;
    border-radius: 50%;
    background: #e5e7eb;
    color: #767676;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.1rem;
    font-weight: 700;
    transition: background 0.3s, color 0.3s, box-shadow 0.3s;
    flex-shrink: 0;
}

.stepper-step.active .stepper-number {
    background: #5b6abf;
    color: white;
    box-shadow: 0 2px 8px rgba(91, 106, 191, 0.4);
}

.stepper-step.completed .stepper-number {
    background: #27ae60;
    color: white;
}

.stepper-step.completed .stepper-number::after {
    content: "\2713";
    font-size: 1.1rem;
}

.stepper-step.completed .stepper-number span {
    display: none;
}

.stepper-label {
    font-size: 0.8rem;
    color: #767676;
    font-weight: 500;
    transition: color 0.3s;
    white-space: nowrap;
}

.stepper-step.active .stepper-label {
    color: #5b6abf;
    font-weight: 600;
}

.stepper-step.completed .stepper-label {
    color: #27ae60;
}

/* ===== Step Panels ===== */
.step-panel {
    display: none;
    animation: stepFadeIn 0.3s ease;
}

.step-panel.active {
    display: block;
}

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

.step-panel-title {
    text-align: center;
    font-size: 1.6rem;
    color: #2c3e50;
    margin-bottom: 0.5rem;
}

.step-panel-subtitle {
    text-align: center;
    color: #666;
    margin-bottom: 2rem;
}

.step-panel-section {
    margin-top: 3rem;
}

.step-panel-section-title {
    text-align: center;
    font-size: 1.3rem;
    color: #2c3e50;
    margin-bottom: 0.5rem;
}

/* ===== Step Nav (prev/next) ===== */
.step-nav {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin: 2.5rem 0 3rem;
    padding-top: 1.5rem;
    border-top: 1px solid #e5e7eb;
}

.step-nav-prev,
.step-nav-next {
    min-width: 140px;
}

.step-nav-prev:disabled,
.step-nav-next:disabled {
    opacity: 0;
    pointer-events: none;
}

.step-nav-indicator {
    font-size: 0.9rem;
    color: #767676;
    font-weight: 500;
}

/* ===== Prereq Cards ===== */
.prereq-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 1.5rem;
}

.prereq-card {
    background: white;
    border-radius: 12px;
    padding: 2rem 1.5rem;
    text-align: center;
    box-shadow: 0 2px 12px rgba(0, 0, 0, 0.06);
}

.prereq-icon {
    font-size: 2.5rem;
    margin-bottom: 1rem;
}

.prereq-card h3 {
    font-size: 1.1rem;
    color: #2c3e50;
    margin-bottom: 0.5rem;
}

.prereq-card p {
    color: #666;
    font-size: 0.9rem;
    line-height: 1.6;
}

.prereq-card a {
    color: #5b6abf;
    text-decoration: underline;
}

/* ===== Download Block ===== */
.download-block {
    max-width: 600px;
    margin: 0 auto;
}

.download-block-available {
    display: flex;
    align-items: center;
    gap: 2rem;
    flex-wrap: wrap;
    justify-content: center;
    padding: 2rem 0;
}

.download-block-apk,
.download-block-qr {
    text-align: center;
}

.download-block-unavailable {
    text-align: center;
    padding: 2rem 0;
}

/* ===== FAQ Block ===== */
.faq-block {
    background: #f8f9fa;
    border-radius: 12px;
    padding: 1.5rem 2rem;
    margin-top: 2rem;
}

.faq-block h3 {
    font-size: 1.05rem;
    color: #2c3e50;
    margin-bottom: 0.75rem;
}

.faq-block p {
    color: #666;
    line-height: 1.8;
    margin-bottom: 0.75rem;
}

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

/* ===== Step Panel CTA ===== */
.step-panel-cta {
    text-align: center;
    margin-top: 2.5rem;
    padding-top: 2rem;
    border-top: 1px solid #e5e7eb;
}

.step-panel-cta-buttons {
    display: flex;
    gap: 1rem;
    justify-content: center;
    flex-wrap: wrap;
}

/* ===== Responsive ===== */
@media (max-width: 768px) {
    .stepper {
        top: 46px; /* navbar plus petite en mobile */
        padding: 0.75rem 0.5rem 0.5rem;
    }

    .stepper-label {
        display: none;
    }

    .stepper-number {
        width: 36px;
        height: 36px;
        font-size: 0.95rem;
    }

    .stepper-track {
        top: calc(0.75rem + 18px);
    }

    .prereq-grid {
        grid-template-columns: 1fr;
        gap: 1rem;
    }

    .step-nav-prev,
    .step-nav-next {
        min-width: 110px;
        font-size: 0.9rem;
    }

    .step-nav-indicator {
        font-size: 0.8rem;
    }

    .step-panel-title {
        font-size: 1.3rem;
    }

    .faq-block {
        padding: 1.25rem 1.5rem;
    }

    .download-block-available {
        flex-direction: column;
        gap: 1.5rem;
    }
}

@media (max-width: 480px) {
    .stepper {
        padding: 0.5rem 0.25rem 0.4rem;
    }

    .stepper-number {
        width: 32px;
        height: 32px;
        font-size: 0.85rem;
    }

    .stepper-track {
        top: calc(0.5rem + 16px);
        left: calc(10% + 0.25rem);
        right: calc(10% + 0.25rem);
    }

    .step-panel-cta-buttons {
        flex-direction: column;
        align-items: center;
    }
}
