/* ====================================================================
   Process Section Premium - Style SaaS/Stripe
   Timeline connectée + Cards minimalistes + Micro-interactions
   ==================================================================== */

/* ==================== Variables ==================== */
:root {
    --primary-color: #FF5630;
    --primary-light: #FF6B47;
    --primary-dark: #E8491C;
    --success-color: #16A34A;
    --success-light: #22C55E;
    --warning-color: #F59E0B;
    --warning-light: #FCD34D;
    --bg-section: #F8FAFC;
    --bg-card: #FFFFFF;
    --border-color: #E5E7EB;
    --border-hover: #CBD5E1;
    --text-primary: #0F172A;
    --text-secondary: #475569;
    --text-muted: #94A3B8;
    --shadow-sm: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
    --shadow: 0 1px 3px 0 rgba(0, 0, 0, 0.1), 0 1px 2px 0 rgba(0, 0, 0, 0.06);
    --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
    --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05);
    --shadow-xl: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 10px 10px -5px rgba(0, 0, 0, 0.04);
}

/* ==================== Section Container ==================== */
.process-premium-section {
    background: var(--bg-section);
    padding: 5rem 0;
    position: relative;
    overflow: hidden;
}

.process-premium-section::before {
    content: '';
    position: absolute;
    top: 0;
    right: 0;
    width: 40%;
    height: 100%;
    background: linear-gradient(135deg, rgba(255, 86, 48, 0.03) 0%, transparent 100%);
    pointer-events: none;
}

.process-container {
    max-width: 1280px;
    margin: 0 auto;
    padding: 0 2rem;
}

/* ==================== Header ==================== */
.process-header {
    text-align: center;
    margin-bottom: 4rem;
}

.process-header h2 {
    font-size: 2.5rem;
    font-weight: 700;
    color: var(--text-primary);
    margin-bottom: 1rem;
    letter-spacing: -0.025em;
}

.process-header p {
    font-size: 1.125rem;
    color: var(--text-secondary);
    max-width: 600px;
    margin: 0 auto;
    line-height: 1.7;
}

/* ==================== Timeline Container ==================== */
.process-timeline {
    position: relative;
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 2rem;
    margin-bottom: 3rem;
}

/* Timeline Line (Desktop) */
.process-timeline::before {
    content: '';
    position: absolute;
    top: 60px;
    left: 16.66%;
    right: 16.66%;
    height: 2px;
    background: linear-gradient(
        90deg,
        var(--border-color) 0%,
        var(--primary-color) 20%,
        var(--primary-color) 80%,
        var(--border-color) 100%
    );
    z-index: 0;
}

/* ==================== Process Step Card ==================== */
.process-step {
    position: relative;
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: 1rem;
    padding: 2rem 1.5rem;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    z-index: 1;
    opacity: 0;
    transform: translateY(20px);
    animation: fadeInUp 0.6s ease-out forwards;
}

.process-step:nth-child(1) { animation-delay: 0.1s; }
.process-step:nth-child(2) { animation-delay: 0.2s; }
.process-step:nth-child(3) { animation-delay: 0.3s; }
.process-step:nth-child(4) { animation-delay: 0.4s; }
.process-step:nth-child(5) { animation-delay: 0.5s; }

@keyframes fadeInUp {
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.process-step:hover {
    transform: translateY(-4px);
    border-color: var(--primary-color);
    box-shadow: 0 20px 25px -5px rgba(255, 86, 48, 0.1),
                0 10px 10px -5px rgba(255, 86, 48, 0.04),
                0 0 0 1px rgba(255, 86, 48, 0.1);
}

/* ==================== Step Number Badge ==================== */
.process-step-number {
    position: absolute;
    top: -12px;
    left: 50%;
    transform: translateX(-50%);
    width: 40px;
    height: 40px;
    background: white;
    border: 2px solid var(--primary-color);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1rem;
    font-weight: 700;
    color: var(--primary-color);
    box-shadow: 0 4px 6px -1px rgba(255, 86, 48, 0.2);
    z-index: 2;
    transition: all 0.3s ease;
}

.process-step:hover .process-step-number {
    background: var(--primary-color);
    color: white;
    transform: translateX(-50%) scale(1.1);
    box-shadow: 0 8px 12px -2px rgba(255, 86, 48, 0.3);
}

/* Success step (dernière étape) */
.process-step.success .process-step-number {
    border-color: var(--success-color);
    color: var(--success-color);
}

.process-step.success:hover .process-step-number {
    background: var(--success-color);
    color: white;
}

/* ==================== Icon Container ==================== */
.process-icon {
    width: 56px;
    height: 56px;
    margin: 1.5rem auto 1.25rem;
    background: linear-gradient(135deg, rgba(255, 86, 48, 0.08) 0%, rgba(255, 86, 48, 0.03) 100%);
    border-radius: 0.75rem;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
}

.process-icon i {
    font-size: 1.75rem;
    color: var(--primary-color);
    transition: transform 0.3s ease;
}

.process-step:hover .process-icon {
    background: linear-gradient(135deg, rgba(255, 86, 48, 0.15) 0%, rgba(255, 86, 48, 0.08) 100%);
    transform: scale(1.05);
}

.process-step:hover .process-icon i {
    transform: scale(1.1);
}

/* Success step icon */
.process-step.success .process-icon {
    background: linear-gradient(135deg, rgba(22, 163, 74, 0.08) 0%, rgba(22, 163, 74, 0.03) 100%);
}

.process-step.success .process-icon i {
    color: var(--success-color);
}

.process-step.success:hover .process-icon {
    background: linear-gradient(135deg, rgba(22, 163, 74, 0.15) 0%, rgba(22, 163, 74, 0.08) 100%);
}

/* ==================== Step Title ==================== */
.process-step-title {
    font-size: 1.25rem;
    font-weight: 700;
    color: var(--text-primary);
    margin-bottom: 0.75rem;
    text-align: center;
    line-height: 1.4;
    letter-spacing: -0.015em;
    transition: color 0.3s ease;
}

.process-step:hover .process-step-title {
    color: var(--primary-color);
}

.process-step.success:hover .process-step-title {
    color: var(--success-color);
}

/* ==================== Step Description ==================== */
.process-step-description {
    font-size: 0.9375rem;
    color: var(--text-secondary);
    line-height: 1.7;
    text-align: center;
    margin: 0;
}

/* ==================== Badges ==================== */
.process-badge {
    display: inline-flex;
    align-items: center;
    padding: 0.25rem 0.75rem;
    border-radius: 9999px;
    font-size: 0.75rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    margin-left: 0.5rem;
}

/* Badge Optionnel (jaune) */
.badge-optional {
    background: rgba(245, 158, 11, 0.1);
    color: #D97706;
}

/* Badge Livraison sécurisée (vert) */
.badge-secure {
    background: rgba(22, 163, 74, 0.1);
    color: var(--success-color);
}

/* ==================== CTA Section ==================== */
.process-cta {
    text-align: center;
    margin-top: 3rem;
}

.process-cta .btn-primary {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 1rem 2rem;
    background: var(--primary-color);
    color: white;
    font-size: 1rem;
    font-weight: 600;
    border: none;
    border-radius: 0.75rem;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 4px 6px -1px rgba(255, 86, 48, 0.3),
                0 2px 4px -1px rgba(255, 86, 48, 0.2);
    text-decoration: none;
}

.process-cta .btn-primary:hover {
    background: var(--primary-dark);
    transform: translateY(-2px);
    box-shadow: 0 10px 15px -3px rgba(255, 86, 48, 0.3),
                0 4px 6px -2px rgba(255, 86, 48, 0.2);
}

.process-cta .btn-primary i {
    font-size: 1.125rem;
}

/* ==================== Responsive Layout ==================== */

/* Tablet: 2 colonnes + 1 centrée */
@media (max-width: 1024px) {
    .process-timeline {
        grid-template-columns: repeat(2, 1fr);
    }

    .process-step:nth-child(5) {
        grid-column: 1 / -1;
        max-width: 450px;
        margin: 0 auto;
    }

    .process-timeline::before {
        display: none;
    }
}

/* Mobile: 1 colonne avec timeline verticale */
@media (max-width: 768px) {
    .process-premium-section {
        padding: 3rem 0;
    }

    .process-container {
        padding: 0 1rem;
    }

    .process-header h2 {
        font-size: 2rem;
    }

    .process-header p {
        font-size: 1rem;
    }

    .process-header {
        margin-bottom: 2.5rem;
    }

    .process-timeline {
        grid-template-columns: 1fr;
        gap: 2.5rem;
        position: relative;
        padding-left: 2rem;
    }

    /* Timeline verticale à gauche */
    .process-timeline::before {
        display: block;
        top: 0;
        left: 20px;
        right: auto;
        bottom: 0;
        width: 2px;
        height: 100%;
        background: linear-gradient(
            180deg,
            var(--border-color) 0%,
            var(--primary-color) 10%,
            var(--primary-color) 90%,
            var(--border-color) 100%
        );
    }

    .process-step {
        padding: 1.5rem 1.25rem;
    }

    .process-step:nth-child(5) {
        max-width: 100%;
    }

    /* Badge numéro à gauche (sur la timeline) */
    .process-step-number {
        left: -2rem;
        top: 1.5rem;
        transform: none;
        width: 36px;
        height: 36px;
        font-size: 0.9375rem;
    }

    .process-step:hover .process-step-number {
        transform: scale(1.1);
    }

    .process-icon {
        margin: 0.5rem auto 1rem;
        width: 52px;
        height: 52px;
    }

    .process-icon i {
        font-size: 1.5rem;
    }

    .process-step-title {
        font-size: 1.125rem;
        margin-bottom: 0.5rem;
    }

    .process-step-description {
        font-size: 0.875rem;
    }

    .process-cta {
        margin-top: 2rem;
    }

    .process-cta .btn-primary {
        width: 100%;
        justify-content: center;
        padding: 0.875rem 1.5rem;
    }
}

/* Très petit mobile */
@media (max-width: 480px) {
    .process-header h2 {
        font-size: 1.75rem;
    }

    .process-step {
        padding: 1.25rem 1rem;
    }

    .process-badge {
        display: block;
        margin: 0.5rem auto 0;
        width: fit-content;
    }
}

/* ==================== Accessibilité ==================== */

/* Focus visible pour navigation clavier */
.process-step:focus-within {
    outline: 2px solid var(--primary-color);
    outline-offset: 2px;
}

.process-cta .btn-primary:focus {
    outline: 2px solid var(--primary-color);
    outline-offset: 2px;
}

/* Réduction des animations pour préférences utilisateur */
@media (prefers-reduced-motion: reduce) {
    .process-step,
    .process-step-number,
    .process-icon,
    .process-icon i,
    .process-step-title {
        animation: none !important;
        transition: none !important;
    }

    .process-step:hover {
        transform: none;
    }
}

/* ==================== Print ==================== */
@media print {
    .process-premium-section {
        background: white;
        padding: 2rem 0;
    }

    .process-timeline::before {
        display: none;
    }

    .process-step {
        break-inside: avoid;
        page-break-inside: avoid;
        box-shadow: none;
        border: 1px solid #ccc;
    }

    .process-cta {
        display: none;
    }
}

/* ==================== Dark Mode Ready (optionnel) ==================== */
@media (prefers-color-scheme: dark) {
    .process-premium-section {
        background: #0F172A;
    }

    .process-step {
        background: #1E293B;
        border-color: #334155;
    }

    .process-header h2 {
        color: #F8FAFC;
    }

    .process-header p,
    .process-step-description {
        color: #CBD5E1;
    }

    .process-step-title {
        color: #F8FAFC;
    }
}

/* ==================== Hide Old Process Step Number ==================== */
/* Remplacé par step-badge inline dans homepage-premium-saas.css */
.process-step-number {
    display: none !important;
}
