/* CSS Spécifique pour la page Devis Intelligent */
/* Basé sur le style Impulse mais avec des ajustements demandés */

:root {
    --accent-color: #6366f1;
    --accent-light: #e0e7ff;
    --bg-gradient-start: #f8fafc;
    --bg-gradient-end: #eff6ff;
    --card-bg: #ffffff;
    --text-primary: #1e293b;
    --text-secondary: #64748b;
    --text-accent: #334155;

    --shadow-soft: 0 4px 20px -2px rgba(0, 0, 0, 0.05);
    --shadow-hover: 0 10px 25px -5px rgba(0, 0, 0, 0.1);
}

/* --- Global Overrides --- */
body {
    background: linear-gradient(to bottom, var(--bg-gradient-start), var(--bg-gradient-end));
    color: var(--text-primary);
}

.page-container {
    max-width: 1200px;
    padding: 0 2rem;
    margin: 0 auto;
}

section {
    padding: 2.5rem 0;
    /* Reduced padding generally */
}

h1,
h2,
h3 {
    color: var(--text-primary);
    letter-spacing: -0.02em;
}

p {
    color: var(--text-secondary);
    line-height: 1.7;
}

.section__header h2 {
    color: #1e2a5a;
    font-size: 2.5rem;
    font-weight: 700;
    margin-bottom: 1rem;
}

/* --- 1. Hero Section (Blue Background) --- */
.hero-devis {
    padding-top: 10rem;
    padding-bottom: 6rem;
    position: relative;
    overflow: hidden;
    background-color: #1e2a5a;
    color: white;
}

.hero-devis__content {
    max-width: 900px;
    margin: 0 auto;
    text-align: center;
    position: relative;
    z-index: 2;
}

.hero-devis__badges {
    display: flex;
    gap: 1rem;
    justify-content: center;
    margin-bottom: 2rem;
    flex-wrap: wrap;
}

.badge {
    background: rgba(255, 255, 255, 0.1);
    padding: 0.5rem 1rem;
    border-radius: 999px;
    font-size: 0.875rem;
    font-weight: 600;
    color: white;
    border: 1px solid rgba(255, 255, 255, 0.2);
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.hero-devis h1 {
    font-size: 3.5rem;
    font-weight: 800;
    line-height: 1.1;
    margin-bottom: 1.5rem;
    color: white;
    background: none;
    -webkit-text-fill-color: white;
}

.hero-devis__subtitle {
    font-size: 1.25rem;
    max-width: 650px;
    margin: 0 auto 2.5rem;
    font-weight: 400;
    color: rgba(255, 255, 255, 0.9);
}

.hero-devis__actions {
    display: flex;
    gap: 1rem;
    justify-content: center;
}

.hero-devis .btn--outline {
    border-color: rgba(255, 255, 255, 0.3);
    color: white;
}

.hero-devis .btn--outline:hover {
    background-color: white;
    color: #1e2a5a;
}

/* --- Workflow Updated for Side-by-Side --- */
.workflow-section {
    position: relative;
    background: white;
    padding-bottom: 5rem;
}

.workflow-layout {
    display: grid;
    grid-template-columns: 1.5fr 1fr;
    gap: 4rem;
    align-items: start;
}

/* Vertical Flow Column */
.flow-container--vertical {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
    /* Reduced Gap as requested */
}

/* Reduced card padding/size to fit better */
.flow-card {
    background: white;
    padding: 1.5rem;
    border-radius: 16px;
    box-shadow: var(--shadow-soft);
    width: 100%;
    border: 1px solid #f1f5f9;
    transition: transform 0.3s ease;
    display: flex;
    align-items: center;
    gap: 1.5rem;
    text-align: left;
}

.flow-card:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-hover);
    border-color: var(--color-primary);
}

.flow-icon {
    width: 50px;
    height: 50px;
    background: var(--bg-gradient-end);
    color: var(--color-primary);
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.25rem;
    flex-shrink: 0;
    margin: 0;
}

.preview-item {
    text-align: center;
}

.preview-item h3 {
    text-align: center;
    margin-top: 1rem;
    color: var(--text-secondary);
}

.flow-content h3 {
    margin-bottom: 0.25rem;
    font-size: 1.1rem;
}

.flow-list li {
    font-size: 0.85rem;
    margin-bottom: 0;
}

.flow-arrow {
    color: #cbd5e1;
    font-size: 1.25rem;
    flex-shrink: 0;
    transform: rotate(90deg);
    margin: -0.5rem 0;
    /* Pull arrows closer */
    align-self: center;
}

/* Objective Column (Right Side) */
.objective-column {
    position: sticky;
    top: 100px;
    /* float when scrolling if needed */
}

.problem-statement {
    background: #1e293b;
    color: white;
    padding: 2.5rem;
    border-radius: 20px;
    position: relative;
    overflow: hidden;
    box-shadow: 0 10px 30px -5px rgba(30, 41, 59, 0.3);
}

.problem-statement::before {
    content: '';
    position: absolute;
    top: -20px;
    right: -20px;
    width: 120px;
    height: 120px;
    background: radial-gradient(circle, rgba(255, 255, 255, 0.1) 0%, transparent 70%);
    border-radius: 50%;
}

.problem-statement h3 {
    color: white;
    margin-bottom: 1rem;
    font-size: 1.5rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.problem-statement p {
    color: #94a3b8;
    margin: 0;
    line-height: 1.6;
    font-size: 1rem;
}

/* --- Tech Stack (Moved Up) --- */
.tech-container {
    text-align: center;
    max-width: 800px;
    margin: 0 auto;
}

.tech-chips {
    display: flex;
    gap: 1rem;
    justify-content: center;
    flex-wrap: wrap;
    margin: 2rem 0;
}

.tech-chip {
    background: white;
    border: 1px solid #e2e8f0;
    padding: 0.6rem 1.2rem;
    border-radius: 12px;
    font-weight: 600;
    color: var(--text-primary);
    font-size: 0.9rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

/* --- Code Preview --- */
.code-preview {
    background: #0f172a;
    border-radius: 12px;
    padding: 2rem;
    font-family: 'Fira Code', monospace;
    font-size: 0.9rem;
    color: #e2e8f0;
    overflow-x: auto;
    position: relative;
    margin: 0 auto;
    max-width: 900px;
    box-shadow: 0 20px 40px -10px rgba(0, 0, 0, 0.3);
}

.code-header {
    margin-bottom: 1rem;
    border-bottom: 1px solid #334155;
    padding-bottom: 1rem;
    display: flex;
    justify-content: space-between;
}

/* --- Collapsible Steps --- */
.steps-section {
    background: #f8fafc;
}

.section__header.clickable-header {
    cursor: pointer;
    user-select: none;
    transition: opacity 0.2s;
    display: inline-flex;
    align-items: center;
    gap: 1rem;
    justify-content: center;
    width: 100%;
}

.section__header.clickable-header:hover {
    opacity: 0.8;
}

.section__header h2 i {
    font-size: 0.6em;
    vertical-align: middle;
    transition: transform 0.3s ease;
    margin-left: 10px;
}

.section__header.open h2 i {
    transform: rotate(180deg);
}

.steps-timeline-wrapper {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.5s ease-out, opacity 0.5s ease;
    opacity: 0;
}

.steps-timeline-wrapper.open {
    max-height: 2000px;
    /* Arbitrary large height */
    opacity: 1;
    margin-top: 3rem;
    transition: max-height 0.8s ease-in-out, opacity 0.5s ease;
}

/* Steps timeline styling remains similar */
.steps-timeline {
    position: relative;
    max-width: 800px;
    margin: 0 auto;
}

.steps-timeline::before {
    content: '';
    position: absolute;
    left: 20px;
    top: 0;
    bottom: 0;
    width: 2px;
    background: #e2e8f0;
}

.step-item {
    display: flex;
    gap: 2rem;
    margin-bottom: 2rem;
    position: relative;
}

.step-marker {
    width: 40px;
    height: 40px;
    background: white;
    border: 2px solid var(--color-primary);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: bold;
    color: var(--color-primary);
    z-index: 2;
    flex-shrink: 0;
}

.step-content {
    flex: 1;
    background: white;
    padding: 1.5rem;
    border-radius: 12px;
    border: 1px solid #f1f5f9;
    box-shadow: var(--shadow-soft);
}

/* --- Features Grid --- */
.features-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 2rem;
}

.feature-card {
    background: white;
    padding: 2rem;
    border-radius: 16px;
    border: 1px solid #f1f5f9;
    transition: all 0.3s;
    box-shadow: var(--shadow-soft);
}

/* --- Stats --- */
.stats-section {
    background: #1e293b;
    color: white;
    border-radius: 24px;
    position: relative;
    overflow: hidden;
    margin-top: 4rem;
}

.stats-container {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 2rem;
    text-align: center;
    position: relative;
    z-index: 2;
}

/* --- Images Preview --- */
.preview-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 2rem;
}

.preview-image {
    width: 100%;
    border-radius: 12px;
    box-shadow: var(--shadow-md);
}

/* Responsive */
@media (max-width: 900px) {
    .workflow-layout {
        grid-template-columns: 1fr;
        gap: 2rem;
    }

    .objective-column {
        order: -1;
        /* Put objective on top on mobile? Or bottom? Usually top is better context. */
        position: static;
    }

    .preview-grid {
        grid-template-columns: 1fr;
    }
}

/* Missing stats styling - Added back */
.stat-item h3 {
    font-size: 3.5rem;
    color: #60a5fa;
    /* Re-added lighter blue */
    margin-bottom: 0.5rem;
    font-weight: 800;
}

.stat-item p {
    color: #cbd5e1;
    /* Re-added lighter gray */
    font-size: 1rem;
    font-weight: 500;
}