/* ========================================
   VARIABLES CSS (Couleurs KEYENCE)
   ======================================== */
:root {
    --keyence-red: #E60012;
    --keyence-dark: #1a1a1a;
    --keyence-gray: #4a4a4a;
    --light-gray: #f8fafc;
    --white: #ffffff;
    --border-light: #e2e8f0; /* ✅ AJOUTÉE */
    
    --shadow-sm: 0 2px 8px rgba(0, 0, 0, 0.1);
    --shadow-md: 0 4px 16px rgba(0, 0, 0, 0.15);
    --shadow-lg: 0 8px 32px rgba(0, 0, 0, 0.2);
    
    --transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

/* ========================================
   RESET & BASE
   ======================================== */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
    background: var(--white);
    color: var(--keyence-dark);
    line-height: 1.6;
    overflow-x: hidden;
    padding-top: 80px;
    font-size: 18px;
}

.container {
    max-width: 1400px;
    margin: 0 auto;
    padding: 0 32px;
}
/* ========================================
   HEADER PRINCIPAL (avec logo)
   ======================================== */
.main-header {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    z-index: 1000;
    background: rgba(255, 255, 255, 0.98);
    backdrop-filter: blur(10px);
    box-shadow: 0 2px 12px rgba(0, 0, 0, 0.08);
    transition: var(--transition);
}

.main-header.scrolled {
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.12);
    background: rgba(255, 255, 255, 1);
}

.header-container {
    max-width: 1600px;
    margin: 0 auto;
    padding: 0 32px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    height: 80px;
}

/* Logo KEYENCE avec image */
.logo {
    display: flex;
    align-items: center;
    gap: 12px;
}

.logo img {
    height: 40px;
    width: auto;
    transition: var(--transition);
}

.logo:hover img {
    transform: scale(1.05);
}

/* Texte logo (si pas d'image) */
.logo h1 {
    font-size: 28px;
    font-weight: 800;
    color: var(--keyence-dark);
    letter-spacing: -0.5px;
    margin: 0;
}

.logo-dot {
    color: var(--keyence-red);
}

/* Navigation principale - 5 liens */
.main-nav {
    display: flex;
    gap: 8px;
    align-items: center;
}

.nav-link {
    display: flex;
    align-items: center;
    gap: 8px;
    color: var(--keyence-gray);
    text-decoration: none;
    font-weight: 600;
    font-size: 18px; /* ✅ Réduit légèrement pour 5 liens */
    padding: 12px 20px; /* ✅ Padding ajusté */
    border-radius: 10px;
    transition: var(--transition);
    position: relative;
    background: transparent;
    border: 2px solid transparent;
    white-space: nowrap; /* ✅ Empêche le retour à la ligne */
}

.nav-link:hover {
    background: linear-gradient(135deg, #fff5f5 0%, #ffe5e5 100%);
    border-color: var(--keyence-red);
    color: var(--keyence-red);
    transform: translateY(-2px);
}

.nav-link.active {
    background: linear-gradient(135deg, var(--keyence-red) 0%, #ff3333 100%);
    color: white;
    border-color: var(--keyence-red);
    box-shadow: 0 4px 12px rgba(230, 0, 18, 0.3);
}

.nav-link.active:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 16px rgba(230, 0, 18, 0.4);
}

/* ========================================
   RESPONSIVE HEADER - 5 liens
   ======================================== */

@media (max-width: 1200px) {
    .nav-link {
        font-size: 13px;
        padding: 10px 14px;
    }
}

@media (max-width: 992px) {
    .header-container {
        height: auto;
        min-height: 70px;
        padding: 12px 24px;
    }
    
    .main-nav {
        gap: 6px;
        flex-wrap: wrap; /* ✅ Permet le retour à la ligne si nécessaire */
    }
    
    .nav-link {
        font-size: 12px;
        padding: 8px 12px;
    }
}

@media (max-width: 768px) {
    /* Logo K seulement */
    .logo-full {
        display: none;
    }
    
    .logo-compact {
        display: block;
    }
    
    /* Navigation compacte */
    .header-container {
        flex-direction: column;
        gap: 12px;
        padding: 16px;
    }
    
    .main-nav {
        width: 100%;
        justify-content: space-between;
        gap: 4px;
    }
    
    .nav-link {
        flex: 1;
        justify-content: center;
        padding: 10px 8px;
        font-size: 11px;
    }
}

@media (max-width: 480px) {
    /* Icônes seulement sur très petits écrans */
    .nav-link {
        font-size: 0; /* ✅ Cache le texte */
        padding: 12px;
    }
    
    .nav-link::before {
        content: attr(data-icon);
        font-size: 20px;
    }
}

/* ========================================
   HERO SECTION (avec parallax)
   ======================================== */
.hero {
    position: relative;
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    padding-top: 80px;
}

.hero-background {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, #f8fafc 0%, #e2e8f0 100%);
    z-index: -1;
}

/* Effet parallax sera géré en JS */
.hero-background::before {
    content: '';
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: 
        radial-gradient(circle at 20% 30%, rgba(230, 0, 18, 0.08) 0%, transparent 50%),
        radial-gradient(circle at 80% 70%, rgba(230, 0, 18, 0.05) 0%, transparent 50%);
    animation: float 20s ease-in-out infinite;
}

@keyframes float {
    0%, 100% { transform: translate(0, 0); }
    50% { transform: translate(-20px, -20px); }
}

.hero-content {
    text-align: center;
    z-index: 10;
    max-width: 900px;
    padding: 0 24px;
}

.hero-logo {
    margin-bottom: 32px;
}

.hero-title {
    font-size: 84px;
    font-weight: 800;
    line-height: 1.1;
    margin-bottom: 24px;
}

.keyence-red {
    color: var(--keyence-red);
}

.hero-title-separator {
    color: var(--keyence-gray);
    font-weight: 300;
    margin: 0 24px;
}

.hero-subtitle-text {
    color: var(--keyence-dark);
}

.hero-tagline {
    font-size: 28px;
    color: var(--keyence-gray);
    margin-bottom: 48px;
    line-height: 1.6;
}

.hero-tagline strong {
    color: var(--keyence-red);
    font-weight: 700;
}

.btn-hero {
    display: inline-flex;
    align-items: center;
    gap: 12px;
    padding: 24px 56px;
    background: linear-gradient(135deg, var(--keyence-red) 0%, #ff3333 100%);
    color: var(--white);
    text-decoration: none;
    font-size: 24px;
    font-weight: 700;
    border-radius: 12px;
    box-shadow: var(--shadow-md);
    transition: var(--transition);
}

.btn-hero:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-lg);
}

.btn-arrow {
    font-size: 24px;
    transition: transform 0.3s ease;
}

.btn-hero:hover .btn-arrow {
    transform: translateX(8px);
}

/* ========================================
   SECTION HERO KEYENCE (Section 1)
   ======================================== */
.hero-keyence {
    position: relative;
    min-height: 80vh;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    padding-top: 80px;
}

/* ========================================
   SECTION PRÉSENTATION IM-X (Section 2)
   ======================================== */
.imx-presentation {
    padding: 100px 0;
    background: linear-gradient(135deg, #f8fafc 0%, #ffffff 100%);
}

.imx-header {
    text-align: center;
    margin-bottom: 80px;
}

.imx-title {
    font-size: 64px;
    font-weight: 900;
    color: var(--keyence-dark);
    margin-bottom: 24px;
}

.highlight-red {
    color: var(--keyence-red);
}

.imx-subtitle {
    font-size: 26px;
    color: var(--keyence-gray);
    line-height: 1.6;
    margin-bottom: 16px;
}

.imx-tagline {
    font-size: 32px;
    color: var(--keyence-red);
    font-weight: 700;
}

.imx-cta {
    text-align: center;
    margin-top: 60px;
}

/* Chiffres clés - Fond blanc au lieu de dark */
.imx-presentation .figures-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 32px;
    margin-bottom: 0;
}

.imx-presentation .figure-card {
    background: white;
    border: 2px solid #e2e8f0;
    padding: 40px 24px;
    border-radius: 20px;
    text-align: center;
    transition: var(--transition);
}

.imx-presentation .figure-card:hover {
    transform: translateY(-8px);
    box-shadow: var(--shadow-lg);
    border-color: var(--keyence-red);
}

.imx-presentation .figure-icon {
    font-size: 48px;
    margin-bottom: 16px;
}

.imx-presentation .figure-number {
    font-size: 56px;
    font-weight: 800;
    color: var(--keyence-red);
    margin-bottom: 8px;
}

.imx-presentation .figure-unit {
    font-size: 32px;
}

.imx-presentation .figure-label {
    font-size: 16px;
    color: var(--keyence-gray);
    line-height: 1.5;
}

/* ========================================
   ANIMATIONS AU SCROLL (géré en JS)
   ======================================== */
[data-animate] {
    opacity: 0;
    transform: translateY(30px);
    transition: opacity 0.6s ease, transform 0.6s ease;
}

[data-animate].animated {
    opacity: 1;
    transform: translateY(0);
}

/* ========================================
   3 CARTES DE NAVIGATION
   ======================================== */
.navigation-cards {
    padding: 120px 0;
    background: var(--white);
}

.section-title {
    text-align: center;
    font-size: 56px;
    font-weight: 800;
    color: var(--keyence-dark);
    margin-bottom: 80px;
}

.cards-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(350px, 1fr));
    gap: 40px;
}

.nav-card {
    position: relative;
    background: var(--white);
    border: 2px solid #e2e8f0;
    border-radius: 24px;
    padding: 48px 32px;
    text-decoration: none;
    color: var(--keyence-dark);
    transition: var(--transition);
    overflow: hidden;
}

.nav-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 4px;
    background: linear-gradient(90deg, var(--keyence-red), #ff6b6b);
    transform: scaleX(0);
    transform-origin: left;
    transition: transform 0.4s ease;
}

.nav-card:hover {
    transform: translateY(-8px);
    box-shadow: var(--shadow-lg);
    border-color: var(--keyence-red);
}

.nav-card:hover::before {
    transform: scaleX(1);
}

.card-highlight {
    border-color: var(--keyence-red);
    background: linear-gradient(135deg, #fff5f5 0%, var(--white) 100%);
}

.card-badge {
    position: absolute;
    top: 24px;
    right: 24px;
    background: var(--keyence-red);
    color: var(--white);
    padding: 6px 16px;
    border-radius: 20px;
    font-size: 12px;
    font-weight: 700;
    text-transform: uppercase;
}

.card-icon {
    margin-bottom: 24px;
}

.icon-large {
    font-size: 64px;
    display: block;
}

.card-title {
    font-size: 32px;
    font-weight: 700;
    margin-bottom: 16px;
    color: var(--keyence-dark);
}

.card-description {
    font-size: 18px;
    color: var(--keyence-gray);
    line-height: 1.6;
    margin-bottom: 24px;
}

.card-footer {
    margin-top: auto;
}

.card-link {
    color: var(--keyence-red);
    font-weight: 700;
    font-size: 16px;
    transition: var(--transition);
}

.nav-card:hover .card-link {
    transform: translateX(8px);
    display: inline-block;
}

/* ========================================
   CHIFFRES CLÉS
   ======================================== */
.key-figures {
    padding: 120px 0;
    background: linear-gradient(135deg, var(--keyence-dark) 0%, #2d2d2d 100%);
}

.section-title.light {
    color: var(--white);
}

.figures-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 40px;
}

.figure-card {
    text-align: center;
    padding: 40px 24px;
    background: rgba(255, 255, 255, 0.05);
    border-radius: 20px;
    border: 1px solid rgba(255, 255, 255, 0.1);
    transition: var(--transition);
}

.figure-card:hover {
    transform: translateY(-8px);
    background: rgba(255, 255, 255, 0.08);
    border-color: var(--keyence-red);
}

.figure-icon {
    font-size: 48px;
    margin-bottom: 16px;
}

.figure-number {
    font-size: 72px;
    font-weight: 800;
    color: var(--keyence-red);
    margin-bottom: 8px;
}

.figure-unit {
    font-size: 32px;
}

.figure-label {
    font-size: 20px;
    color: rgba(255, 255, 255, 0.8);
    line-height: 1.5;
}

/* ========================================
   FOOTER MODERNE ET VISIBLE
   ======================================== */
.main-footer {
    background: linear-gradient(135deg, #1a1a1a 0%, #2d2d2d 100%);
    color: var(--white);
    padding: 80px 0 32px;
    position: relative;
    overflow: hidden;
}

/* Effet de fond animé */
.main-footer::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: linear-gradient(90deg, 
        var(--keyence-red) 0%, 
        #ff6b6b 50%, 
        var(--keyence-red) 100%);
    background-size: 200% 100%;
    animation: gradientShift 3s ease infinite;
}

@keyframes gradientShift {
    0%, 100% { background-position: 0% 50%; }
    50% { background-position: 100% 50%; }
}

.footer-content {
    display: grid;
    grid-template-columns: 2fr 1fr 1fr;
    gap: 60px;
    margin-bottom: 60px;
}

/* Logo section - AMÉLIORÉ */
.footer-logo {
    display: flex;
    flex-direction: column;
    gap: 20px;
    max-width: 100%;
}

.footer-logo-image {
    display: flex;
    align-items: center;
    gap: 16px;
    margin-bottom: 8px;
}

.footer-logo-image img {
    height: 48px; /* ✅ Plus grand */
    width: auto;
    filter: drop-shadow(0 4px 12px rgba(230, 0, 18, 0.4));
}

.footer-logo h3 {
    font-size: 32px; /* ✅ Plus grand */
    font-weight: 900;
    margin: 0;
    color: var(--white);
    text-shadow: 0 2px 8px rgba(0, 0, 0, 0.5);
}

.footer-logo .logo-dot {
    color: var(--keyence-red);
}

.footer-logo p {
    color: rgba(255, 255, 255, 0.85); /* ✅ Plus visible */
    font-size: 16px; /* ✅ Plus grand */
    line-height: 1.6;
    font-weight: 500;
    margin: 0;
}

/* Liens footer */
.footer-links h4,
.footer-contact h4 {
    font-size: 18px;
    font-weight: 800;
    margin-bottom: 20px;
    color: var(--keyence-red);
    text-transform: uppercase;
    letter-spacing: 1px;
    border-bottom: 2px solid var(--keyence-red);
    padding-bottom: 8px;
}

.footer-links a {
    display: block;
    color: rgba(255, 255, 255, 0.8);
    text-decoration: none;
    margin-bottom: 12px;
    font-size: 15px;
    font-weight: 500;
    transition: var(--transition);
    padding-left: 0;
}

.footer-links a:hover {
    color: var(--white);
    padding-left: 12px;
    transform: translateX(4px);
}

.footer-links a::before {
    content: '→ ';
    color: var(--keyence-red);
    opacity: 0;
    transition: var(--transition);
}

.footer-links a:hover::before {
    opacity: 1;
}

/* Contact footer */
.footer-contact p {
    color: rgba(255, 255, 255, 0.85);
    margin-bottom: 12px;
    font-size: 15px;
    font-weight: 500;
    display: flex;
    align-items: center;
    gap: 12px;
}

.footer-contact p::before {
    font-size: 20px;
}

/* Footer bottom */
.footer-bottom {
    text-align: center;
    padding-top: 32px;
    border-top: 2px solid rgba(255, 255, 255, 0.1);
    color: rgba(255, 255, 255, 0.7);
    font-size: 14px;
    font-weight: 500;
}

.footer-bottom p {
    margin: 0;
}

/* Responsive footer */
@media (max-width: 1024px) {
    .footer-content {
        grid-template-columns: 1fr 1fr;
        gap: 40px;
    }
    
    .footer-logo {
        grid-column: 1 / -1;
    }
}
/* ========================================
   Large screen (desktop fullscreen) tweaks
   Target typical 22" 1920x1080 and larger to avoid overflow
   ======================================== */
@media (min-width: 1600px) {
    /* Cap sidebar width so it doesn't expand too much in fullscreen */
    .config-sidebar {
        max-width: 420px;
    }

    /* Make financing and mandatory boxes wrap text and avoid huge fonts */
    .financing-section, .mandatory-accessories {
        max-width: 100%;
        word-break: break-word;
    }

    .financing-section h3,
    .mandatory-accessories h3 {
        font-size: 1rem; /* reasonable size for fullscreen */
        line-height: 1.15;
    }

    .mandatory-accessories li {
        font-size: 14px;
        line-height: 1.3;
    }

    /* Ensure the header container doesn't push content under large font-sizes */
    .header-container {
        max-width: 1920px;
        padding: 0 24px;
    }

    /* Make sure footer content uses available width but caps internal max-width */
    .config-footer .footer-content {
        max-width: 1600px;
        padding: 0 16px;
    }
}

@media (max-width: 768px) {
    .main-footer {
        padding: 60px 0 24px;
    }
    
    .footer-content {
        grid-template-columns: 1fr;
        gap: 40px;
        margin-bottom: 40px;
    }
    
    .footer-logo h3 {
        font-size: 28px;
    }
    
    .footer-logo-image img {
        height: 40px;
    }
}

/* ========================================
   RESPONSIVE
   ======================================== */
@media (max-width: 1024px) {
    .hero-title {
        font-size: 56px;
    }
    
    .cards-grid {
        grid-template-columns: 1fr;
    }
    
    .footer-content {
        grid-template-columns: 1fr;
        gap: 40px;
    }
}

@media (max-width: 768px) {
    .header-container {
        flex-direction: column;
        height: auto;
        padding: 16px 24px;
    }
    
    .main-nav {
        flex-wrap: wrap;
        gap: 16px;
    }
    
    .hero-title {
        font-size: 40px;
    }
    
    .hero-tagline {
        font-size: 28px;
    }
    
    .section-title {
        font-size: 56px;
    }
    
    .figures-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}
/* ========================================
   PAGE PRÉSENTATION KEYENCE
   ======================================== */

/* --- HERO PRÉSENTATION --- */
.hero-presentation {
    position: relative;
    min-height: 80vh;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    padding-top: 80px;
}

.hero-content-center {
    text-align: center;
    z-index: 10;
}

.logo-showcase {
    margin-bottom: 48px;
}

.logo-massive {
    font-size: 120px;
    font-weight: 900;
    color: var(--keyence-red);
    letter-spacing: -2px;
    margin-bottom: 16px;
    text-shadow: 0 4px 20px rgba(230, 0, 18, 0.3);
}

.logo-tagline {
    font-size: 32px;
    font-weight: 600;
    color: var(--keyence-dark);
    font-style: italic;
}

.hero-description {
    font-size: 20px;
    color: var(--keyence-gray);
    line-height: 1.6;
    max-width: 800px;
    margin: 0 auto;
}

/* --- SECTION HISTOIRE (TIMELINE) --- */
.history-section {
    padding: 120px 0;
    background: var(--white);
}

.section-subtitle {
    text-align: center;
    font-size: 20px;
    color: var(--keyence-gray);
    margin-bottom: 80px;
}

.timeline {
    position: relative;
    max-width: 900px;
    margin: 0 auto;
    padding-left: 60px;
}

/* Ligne verticale */
.timeline::before {
    content: '';
    position: absolute;
    left: 20px;
    top: 0;
    bottom: 0;
    width: 4px;
    background: linear-gradient(180deg, var(--keyence-red), #ff6b6b);
    border-radius: 2px;
}

.timeline-item {
    position: relative;
    margin-bottom: 60px;
}

.timeline-dot {
    position: absolute;
    left: -54px;
    top: 8px;
    width: 20px;
    height: 20px;
    background: var(--keyence-red);
    border-radius: 50%;
    border: 4px solid var(--white);
    box-shadow: 0 0 0 4px rgba(230, 0, 18, 0.2);
    z-index: 10;
}

.timeline-content {
    background: var(--light-gray);
    padding: 32px;
    border-radius: 16px;
    border-left: 4px solid var(--keyence-red);
    transition: var(--transition);
}

.timeline-item:hover .timeline-content {
    transform: translateX(8px);
    box-shadow: var(--shadow-md);
}

.timeline-year {
    font-size: 28px;
    font-weight: 800;
    color: var(--keyence-red);
    margin-bottom: 8px;
}

.timeline-title {
    font-size: 24px;
    font-weight: 700;
    color: var(--keyence-dark);
    margin-bottom: 12px;
}

.timeline-description {
    font-size: 16px;
    color: var(--keyence-gray);
    line-height: 1.6;
}

/* --- CHIFFRES CLÉS DÉTAILLÉS --- */
.key-stats {
    padding: 120px 0;
    background: linear-gradient(135deg, var(--keyence-dark) 0%, #2d2d2d 100%);
}

.stats-grid {
    display: grid;
    /* Force 4 colonnes sur grand écran pour obtenir 2 lignes x 4 tuiles */
    grid-template-columns: repeat(4, 1fr);
    gap: 24px;
}

.stat-card {
    text-align: center;
    padding: 32px 20px; /* réduire un peu la hauteur des tuiles */
    background: rgba(255, 255, 255, 0.05);
    border-radius: 20px;
    border: 2px solid rgba(255, 255, 255, 0.1);
    transition: var(--transition);
}

.stat-card:hover {
    transform: translateY(-8px) scale(1.05);
    background: rgba(255, 255, 255, 0.08);
    border-color: var(--keyence-red);
    box-shadow: 0 8px 32px rgba(230, 0, 18, 0.3);
}

.stat-icon {
    font-size: 56px;
    margin-bottom: 24px;
}

.stat-number {
    font-size: 64px;
    font-weight: 900;
    color: var(--keyence-red);
    line-height: 1;
}

.stat-unit {
    font-size: 24px;
    font-weight: 700;
    color: rgba(255, 255, 255, 0.8);
    margin-bottom: 16px;
}

.stat-label {
    font-size: 16px;
    color: rgba(255, 255, 255, 0.7);
    line-height: 1.4;
}

/* --- VALEURS --- */
.values-section {
    padding: 120px 0;
    background: var(--light-gray);
}

.values-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 40px;
}

.value-card {
    background: var(--white);
    padding: 48px 32px;
    border-radius: 20px;
    border: 2px solid #e2e8f0;
    transition: var(--transition);
}

.value-card:hover {
    transform: translateY(-8px);
    box-shadow: var(--shadow-lg);
    border-color: var(--keyence-red);
}

.value-icon {
    font-size: 64px;
    margin-bottom: 24px;
}

.value-title {
    font-size: 24px;
    font-weight: 700;
    color: var(--keyence-dark);
    margin-bottom: 16px;
}

.value-description {
    font-size: 16px;
    color: var(--keyence-gray);
    line-height: 1.6;
}

/* --- CTA SECTION --- */
.cta-section {
    padding: 120px 0;
    background: linear-gradient(135deg, #fff5f5 0%, var(--white) 100%);
}

.cta-content {
    text-align: center;
    max-width: 800px;
    margin: 0 auto;
}

.cta-title {
    font-size: 48px;
    font-weight: 800;
    color: var(--keyence-dark);
    margin-bottom: 24px;
}

.cta-description {
    font-size: 20px;
    color: var(--keyence-gray);
    margin-bottom: 48px;
}

.cta-buttons {
    display: flex;
    gap: 24px;
    justify-content: center;
    flex-wrap: wrap;
}

.btn-cta {
    display: inline-flex;
    align-items: center;
    gap: 12px;
    padding: 20px 48px;
    text-decoration: none;
    font-size: 18px;
    font-weight: 700;
    border-radius: 12px;
    transition: var(--transition);
}

.btn-cta.primary {
    background: linear-gradient(135deg, var(--keyence-red) 0%, #ff3333 100%);
    color: var(--white);
    box-shadow: var(--shadow-md);
}

.btn-cta.primary:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-lg);
}

.btn-cta.primary:hover .btn-arrow {
    transform: translateX(8px);
}

.btn-cta.secondary {
    background: var(--white);
    color: var(--keyence-red);
    border: 2px solid var(--keyence-red);
}

.btn-cta.secondary:hover {
    background: var(--keyence-red);
    color: var(--white);
    transform: translateY(-4px);
}

/* --- RESPONSIVE --- */
@media (max-width: 1024px) {
    .logo-massive {
        font-size: 80px;
    }
    
    .stats-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 20px;
    }
}

@media (max-width: 768px) {
    .logo-massive {
        font-size: 56px;
    }
    
    .logo-tagline {
        font-size: 20px;
    }
    
    .hero-description {
        font-size: 16px;
    }
    
    .timeline {
        padding-left: 40px;
    }
    
    .timeline::before {
        left: 10px;
    }
    
    .timeline-dot {
        left: -44px;
        width: 16px;
        height: 16px;
    }
    
    .timeline-year {
        font-size: 20px;
    }
    
    .timeline-title {
        font-size: 18px;
    }
    
    .stats-grid {
        grid-template-columns: 1fr;
    }
    
    .stat-number {
        font-size: 48px;
    }
    
    .cta-title {
        font-size: 32px;
    }
    
    .cta-buttons {
        flex-direction: column;
    }
}
/* ========================================
   PAGE PRÉSENTATION GAMME
   ======================================== */

/* --- HERO GAMME --- */
.hero-gamme {
    position: relative;
    min-height: 60vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding-top: 80px;
}

.hero-title-large {
    font-size: 80px;
    font-weight: 900;
    letter-spacing: -1px;
    margin-bottom: 24px;
}

.hero-tagline-large {
    font-size: 28px;
    color: var(--keyence-gray);
}

/* --- METROLOGY LINEUP --- */
.metrology-lineup {
    padding: 120px 0;
    background: linear-gradient(135deg, #f0fdf4 0%, #dcfce7 100%);
}

.instruments-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 32px;
    margin-bottom: 80px;
}

.instrument-group {
    background: var(--white);
    padding: 32px 24px;
    border-radius: 16px;
    box-shadow: var(--shadow-sm);
    text-align: center;
}

.instrument-title {
    font-size: 16px;
    font-weight: 700;
    color: var(--keyence-dark);
    margin-bottom: 24px;
    min-height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.instrument-images {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(80px, 1fr));
    gap: 16px;
}

.instrument-images.single {
    grid-template-columns: 1fr;
}

.instrument-images img {
    width: 100%;
    height: 100px;
    object-fit: contain;
}

/* --- FLÈCHE TRANSFORMATION --- */
.transformation-arrow {
    text-align: center;
    margin: 80px 0;
}

.arrow-circle {
    width: 100px;
    height: 100px;
    background: linear-gradient(135deg, #3b82f6, #60a5fa);
    border-radius: 50%;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 8px 24px rgba(59, 130, 246, 0.4);
    margin-bottom: 24px;
}

.arrow-icon {
    font-size: 48px;
    color: var(--white);
}

.arrow-text {
    font-size: 28px;
    font-weight: 800;
    color: #10b981;
    letter-spacing: 2px;
}

/* --- SOLUTIONS GRID --- */
.solutions-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 32px;
}

.solution-card {
    background: var(--white);
    padding: 32px 24px;
    border-radius: 20px;
    text-align: center;
    border: 4px solid #e2e8f0;
    transition: var(--transition);
    position: relative;
    cursor: pointer;
}

.solution-card.imx {
    border-color: var(--keyence-red);
    box-shadow: 0 4px 20px rgba(230, 0, 18, 0.2);
}

.solution-card.lmx {
    border-color: #10b981;
    box-shadow: 0 4px 20px rgba(16, 185, 129, 0.2);
}

.solution-card.xm {
    border-color: #3b82f6;
    box-shadow: 0 4px 20px rgba(59, 130, 246, 0.2);
}

.solution-card.wm {
    border-color: #f59e0b;
    box-shadow: 0 4px 20px rgba(245, 158, 11, 0.2);
}

.solution-card:hover {
    transform: scale(1.05);
}

.solution-card img {
    width: 100%;
    height: 180px;
    object-fit: contain;
    margin-bottom: 16px;
}

.solution-card h3 {
    font-size: 24px;
    font-weight: 800;
    margin-bottom: 8px;
}

.solution-card p {
    font-size: 14px;
    color: var(--keyence-gray);
}

.play-overlay {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    padding: 16px 32px; /* Bouton rectangulaire */
    background: rgba(255, 255, 255, 0.95); /* Blanc presque opaque */
    backdrop-filter: blur(8px);
    border-radius: 50px; /* Coins très arrondis */
    display: flex;
    align-items: center;
    gap: 12px; /* Espace entre icône et texte */
    opacity: 0;
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    pointer-events: none;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.25); /* Ombre marquée */
    font-size: 18px;
    font-weight: 700;
    color: #1a1a1a;
    white-space: nowrap; /* Évite le retour à la ligne */
}

.solution-card:hover .play-overlay {
    opacity: 1;
    transform: translate(-50%, -50%) scale(1.05); /* Légère croissance */
}

.play-icon {
    color: var(--keyence-red); /* Triangle rouge Keyence */
    font-size: 24px;
    margin: 0;
    filter: none;
}

/* --- LES 3 PILIERS --- */
.pillars-section {
    padding: 120px 0;
    background: var(--white);
}

.pillars-container {
    display: flex;
    flex-direction: column;
    gap: 32px;
    max-width: 1000px;
    margin: 0 auto;
}

.pillar-card {
    background: linear-gradient(135deg, #ffffff 0%, #f0fdf4 100%);
    border: 4px solid #10b981;
    border-radius: 24px;
    padding: 48px 40px;
    position: relative;
    transition: var(--transition);
}

.pillar-card:hover {
    transform: translateX(8px);
    box-shadow: var(--shadow-lg);
}

.pillar-badge {
    position: absolute;
    top: -20px;
    left: 40px;
    background: var(--white);
    padding: 12px 32px;
    border: 4px solid #10b981;
    border-radius: 16px;
    font-size: 20px;
    font-weight: 800;
    color: #10b981;
}

.pillar-card h3 {
    font-size: 28px;
    font-weight: 700;
    color: var(--keyence-dark);
    margin: 24px 0 16px;
}

.pillar-highlight {
    text-align: center;
    font-size: 20px;
    font-weight: 700;
    color: #10b981;
    margin: 16px 0 24px;
}

.pillar-list {
    list-style: none;
    padding: 0;
    font-size: 18px;
    line-height: 2;
}

.pillar-list li {
    padding-left: 32px;
    position: relative;
}

.pillar-list strong {
    color: #10b981;
}

/* --- CONFIGUREZ VOTRE SYSTÈME --- */
.configure-system {
    padding: 120px 0;
    background: var(--light-gray);
}

.system-grid {
    display: grid;
    gap: 48px;
}

.system-category {
    background: var(--white);
    padding: 40px;
    border-radius: 20px;
    box-shadow: var(--shadow-sm);
}

.category-title {
    font-size: 24px;
    font-weight: 700;
    color: var(--keyence-red);
    margin-bottom: 32px;
    padding-bottom: 16px;
    border-bottom: 3px solid var(--keyence-red);
}

.system-items {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: 24px;
}

.system-items.accessories {
    grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
}

.system-item {
    background: var(--light-gray);
    padding: 24px;
    border-radius: 16px;
    text-align: center;
    cursor: pointer;
    border: 2px solid transparent;
    transition: var(--transition);
}

.system-item:hover {
    transform: translateY(-8px);
    box-shadow: var(--shadow-md);
    border-color: var(--keyence-red);
}

.system-item img {
    width: 100%;
    height: 120px;
    object-fit: contain;
    margin-bottom: 16px;
}

.system-item.small {
    padding: 16px;
}

.icon-emoji {
    font-size: 48px;
    display: block;
    margin-bottom: 12px;
}

.system-item h4 {
    font-size: 16px;
    font-weight: 700;
    color: var(--keyence-dark);
    margin-bottom: 4px;
}

.system-item p {
    font-size: 13px;
    color: var(--keyence-gray);
}

/* --- ZONES DE MESURE --- */
.measurement-zones {
    padding: 120px 0;
    background: var(--white);
}

.zones-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(400px, 1fr));
    gap: 40px;
}

.zone-card {
    background: linear-gradient(135deg, #fef3f2 0%, var(--white) 100%);
    border: 3px solid var(--keyence-red);
    border-radius: 20px;
    padding: 32px;
    position: relative;
}

.zone-card.recommended {
    background: linear-gradient(135deg, #f0fdf4 0%, var(--white) 100%);
    border-color: #10b981;
}

.recommended-badge {
    position: absolute;
    top: 16px;
    right: 16px;
    background: #10b981;
    color: var(--white);
    padding: 8px 20px;
    border-radius: 20px;
    font-size: 14px;
    font-weight: 700;
}

.zone-card h3 {
    font-size: 20px;
    font-weight: 700;
    color: var(--keyence-dark);
    margin-bottom: 24px;
}

.zone-card img {
    width: 100%;
    height: auto;
    border-radius: 12px;
    margin-bottom: 16px;
}

.zone-card p {
    font-size: 15px;
    line-height: 1.6;
    margin-bottom: 8px;
}

.zone-card .warning {
    color: #dc2626;
    font-weight: 600;
}

.zone-card .success {
    color: #10b981;
    font-weight: 600;
}

/* --- TECHNOLOGIES --- */
.technologies-section {
    padding: 120px 0;
    background: linear-gradient(135deg, #f8fafc 0%, #e2e8f0 100%);
}

.technologies-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(500px, 1fr));
    gap: 40px;
    margin-bottom: 60px;
}

.tech-card {
    background: var(--white);
    border-radius: 20px;
    padding: 40px;
    box-shadow: var(--shadow-md);
}

.tech-header {
    display: flex;
    align-items: center;
    gap: 16px;
    margin-bottom: 24px;
}

.tech-icon {
    font-size: 48px;
}

.tech-card h3 {
    font-size: 24px;
    font-weight: 700;
}

.tech-card > img {
    width: 100%;
    height: 200px;
    object-fit: contain;
    background: var(--light-gray);
    border-radius: 12px;
    padding: 20px;
    margin-bottom: 24px;
}

.tech-card p {
    font-size: 16px;
    color: var(--keyence-gray);
    line-height: 1.6;
    margin-bottom: 24px;
}

.tech-card h4 {
    font-size: 18px;
    font-weight: 700;
    color: var(--keyence-red);
    margin-bottom: 16px;
}

.tech-examples {
    display: grid;
    gap: 16px;
}

.tech-examples img {
    width: 100%;
    border-radius: 12px;
    box-shadow: var(--shadow-sm);
}

.rotary-section {
    background: white;
    border: 3px solid var(--keyence-red);
    border-radius: 20px;
    padding: 40px;
    text-align: center;
}

.rotary-section h3 {
    font-size: 28px;
    font-weight: 700;
    color: var(--keyence-red);
    margin-bottom: 32px;
}

.rotary-section img {
    width: 100%;
    max-width: 900px;
    border-radius: 12px;
    margin-bottom: 32px;
}

.advantages-list {
    list-style: none;
    padding: 0;
    display: inline-block;
    text-align: left;
    font-size: 18px;
    line-height: 2.5;
}

/* --- MODALS --- */
.modal-overlay {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.9);
    z-index: 9999;
    align-items: center;
    justify-content: center;
    backdrop-filter: blur(8px);
}

.modal-overlay.active {
    display: flex;
}

.modal-video-container {
    position: relative;
    width: 90%;
    max-width: 1200px;
}

.modal-video-container video {
    width: 100%;
    border-radius: 12px;
}

.modal-accessory-container {
    position: relative;
    background: var(--white);
    border-radius: 20px;
    padding: 48px;
    max-width: 700px;
    width: 90%;
    max-height: 90vh;
    overflow-y: auto;
}

.modal-close {
    position: absolute;
    top: 16px;
    right: 16px;
    width: 48px;
    height: 48px;
    background: var(--keyence-red);
    color: var(--white);
    border: none;
    border-radius: 50%;
    font-size: 28px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: var(--transition);
    z-index: 10;
}

.modal-close:hover {
    transform: scale(1.1);
}

/* --- RESPONSIVE --- */
@media (max-width: 1024px) {
    .instruments-grid,
    .solutions-grid {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .technologies-grid {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 768px) {
    .hero-title-large {
        font-size: 48px;
    }
    
    .instruments-grid,
    .solutions-grid {
        grid-template-columns: 1fr;
    }
    
    .zones-grid {
        grid-template-columns: 1fr;
    }
}
/* --- CONTENU MODAL ACCESSOIRE --- */
.accessory-details {
    display: grid;
    grid-template-columns: 1fr 1.5fr;
    gap: 40px;
    align-items: start;
}

.accessory-image {
    background: var(--light-gray);
    border-radius: 16px;
    padding: 32px;
    text-align: center;
}

.accessory-image img {
    width: 100%;
    max-width: 300px;
    height: auto;
}

.accessory-category {
    font-size: 14px;
    font-weight: 700;
    color: var(--keyence-red);
    text-transform: uppercase;
    letter-spacing: 1px;
    margin-bottom: 8px;
}

.accessory-name {
    font-size: 32px;
    font-weight: 800;
    color: var(--keyence-dark);
    margin-bottom: 16px;
}

.accessory-description {
    font-size: 18px;
    color: var(--keyence-gray);
    margin-bottom: 16px;
    font-weight: 600;
}

.accessory-details-text {
    font-size: 16px;
    color: var(--keyence-gray);
    line-height: 1.6;
    margin-bottom: 24px;
}

.accessory-price {
    font-size: 36px;
    font-weight: 900;
    color: var(--keyence-red);
    margin-bottom: 32px;
}

@media (max-width: 768px) {
    .accessory-details {
        grid-template-columns: 1fr;
    }
}
/* ========================================
   PAGE CONFIGURATEUR
   ======================================== */

/* --- BARRE CLIENT (sticky) --- */
.client-bar {
    position: sticky;
    top: 80px;
    background: var(--white);
    border-bottom: 2px solid var(--border-light);
    padding: 16px 0;
    z-index: 999;
}

.client-inputs {
    display: flex;
    gap: 16px;
    flex: 1;
}

.client-input {
    flex: 1;
    padding: 12px 16px;
    border: 2px solid var(--border-light);
    border-radius: 8px;
    font-size: 14px;
    transition: var(--transition);
}

.client-input:focus {
    outline: none;
    border-color: var(--keyence-red);
}

.client-actions {
    display: flex;
    gap: 12px;
}

.btn-sm {
    padding: 10px 20px;
    font-size: 14px;
    border-radius: 8px;
    border: none;
    cursor: pointer;
    font-weight: 600;
    transition: var(--transition);
}

.btn-outline {
    background: var(--white);
    color: var(--keyence-red);
    border: 2px solid var(--keyence-red);
}

.btn-outline:hover {
    background: var(--keyence-red);
    color: var(--white);
}

.btn-ghost {
    background: transparent;
    color: var(--keyence-gray);
}

.btn-ghost:hover {
    background: var(--light-gray);
}

/* --- PROGRESS BAR --- */
.progress-bar-container {
    position: sticky;
    top: 130px;
    background: var(--white);
    padding: 24px 0;
    border-bottom: 2px solid var(--border-light);
    z-index: 998;
}

.progress-steps {
    display: flex;
    justify-content: space-between;
    position: relative;
    max-width: 800px;
    margin: 0 auto;
}

.progress-line {
    position: absolute;
    top: 20px;
    left: 40px;
    right: 40px;
    height: 4px;
    background: var(--border-light);
    border-radius: 2px;
}

.progress-line-fill {
    height: 100%;
    background: linear-gradient(90deg, var(--keyence-red), #ff6b6b);
    border-radius: 2px;
    width: 0%;
    transition: width 0.6s cubic-bezier(0.4, 0, 0.2, 1);
}

.progress-step {
    position: relative;
    text-align: center;
    cursor: pointer;
    z-index: 10;
}

.step-circle {
    width: 40px;
    height: 40px;
    background: var(--white);
    border: 4px solid var(--border-light);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: 16px;
    margin: 0 auto 8px;
    transition: var(--transition);
}

.progress-step.active .step-circle,
.progress-step.completed .step-circle {
    background: var(--keyence-red);
    color: var(--white);
    border-color: var(--keyence-red);
}

.step-label {
    font-size: 13px;
    color: var(--keyence-gray);
    font-weight: 600;
}

.progress-step.active .step-label {
    color: var(--keyence-red);
}

/* --- LAYOUT CONFIGURATEUR --- */
.configurator-main {
    padding: 40px 0 80px;
    background: var(--light-gray);
}

.configurator-layout {
    display: grid;
    grid-template-columns: 1fr 380px;
    gap: 32px;
}

/* --- COLONNE ÉTAPES --- */
.steps-column {
    background: var(--white);
    border-radius: 16px;
    padding: 40px;
    box-shadow: var(--shadow-sm);
}

.step-content {
    display: none;
}

.step-content.active {
    display: block;
    animation: fadeIn 0.4s ease;
}

.step-title {
    font-size: 32px;
    font-weight: 800;
    color: var(--keyence-dark);
    margin-bottom: 8px;
}

.step-subtitle {
    font-size: 16px;
    color: var(--keyence-gray);
    margin-bottom: 40px;
}

/* --- CONFIG SECTION --- */
.config-section {
    margin-bottom: 48px;
}

.config-section-title {
    font-size: 20px;
    font-weight: 700;
    color: var(--keyence-red);
    margin-bottom: 24px;
    padding-bottom: 12px;
    border-bottom: 3px solid var(--keyence-red);
}

.config-options {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 20px;
}

.config-card {
    background: var(--light-gray);
    border: 3px solid transparent;
    border-radius: 16px;
    padding: 24px;
    text-align: center;
    cursor: pointer;
    transition: var(--transition);
}

.config-card:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-md);
    border-color: var(--keyence-red);
}

.config-card.selected {
    background: linear-gradient(135deg, #fff5f5 0%, var(--white) 100%);
    border-color: var(--keyence-red);
    box-shadow: var(--shadow-md);
}

.config-card img {
    width: 100%;
    height: 120px;
    object-fit: contain;
    margin-bottom: 16px;
}

.config-card.small img {
    height: 80px;
}

.config-card h4 {
    font-size: 18px;
    font-weight: 700;
    color: var(--keyence-dark);
    margin-bottom: 8px;
}

.config-card p {
    font-size: 13px;
    color: var(--keyence-gray);
    margin-bottom: 12px;
}

.config-price {
    font-size: 16px;
    font-weight: 700;
    color: var(--keyence-red);
}

/* --- HEAD SERIES TABS --- */
.head-series-tabs {
    display: flex;
    gap: 12px;
    margin-bottom: 24px;
}

.tab-btn {
    flex: 1;
    padding: 12px 24px;
    background: var(--light-gray);
    border: 2px solid var(--border-light);
    border-radius: 8px;
    font-size: 15px;
    font-weight: 600;
    cursor: pointer;
    transition: var(--transition);
}

.tab-btn.active {
    background: var(--keyence-red);
    color: var(--white);
    border-color: var(--keyence-red);
}

/* --- OPTIONS --- */
.options-list {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.option-checkbox {
    display: flex;
    align-items: center;
    padding: 20px;
    background: var(--light-gray);
    border: 2px solid transparent;
    border-radius: 12px;
    cursor: pointer;
    transition: var(--transition);
}

.option-checkbox:hover {
    border-color: var(--keyence-red);
}

.option-checkbox input[type="checkbox"] {
    width: 24px;
    height: 24px;
    margin-right: 16px;
    cursor: pointer;
}

.option-content {
    display: flex;
    align-items: center;
    gap: 16px;
    flex: 1;
}

.option-icon {
    font-size: 32px;
}

.option-content strong {
    display: block;
    font-size: 16px;
    color: var(--keyence-dark);
    margin-bottom: 4px;
}

.option-content p {
    font-size: 13px;
    color: var(--keyence-gray);
    margin: 0;
}

/* --- FORM --- */
.form-section {
    margin-bottom: 40px;
}

.form-section h3 {
    font-size: 18px;
    font-weight: 700;
    color: var(--keyence-dark);
    margin-bottom: 20px;
}

.form-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 20px;
}

.form-group label {
    display: block;
    font-size: 14px;
    font-weight: 600;
    color: var(--keyence-gray);
    margin-bottom: 8px;
}

.form-input {
    width: 100%;
    padding: 14px 18px;
    border: 2px solid var(--border-light);
    border-radius: 8px;
    font-size: 20px;
    transition: var(--transition);
}

.form-input:focus {
    outline: none;
    border-color: var(--keyence-red);
}

/* --- SHIFT SELECTOR --- */
.shift-selector {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 16px;
    margin-bottom: 24px;
}

.shift-card {
    padding: 24px;
    background: var(--light-gray);
    border: 3px solid transparent;
    border-radius: 12px;
    text-align: center;
    cursor: pointer;
    transition: var(--transition);
}

.shift-card:hover {
    border-color: var(--keyence-red);
}

.shift-card.active {
    background: var(--keyence-red);
    color: var(--white);
    border-color: var(--keyence-red);
}

.shift-card h4 {
    font-size: 24px;
    font-weight: 700;
    margin-bottom: 4px;
}

/* --- RESULTS --- */
.results-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 24px;
    margin-bottom: 40px;
}

.result-card {
    background: var(--light-gray);
    padding: 32px 24px;
    border-radius: 16px;
    text-align: center;
}

.result-card.highlight {
    background: linear-gradient(135deg, var(--keyence-red), #ff6b6b);
    color: var(--white);
}

.result-icon {
    font-size: 48px;
    margin-bottom: 16px;
}

.result-label {
    font-size: 14px;
    font-weight: 600;
    color: var(--keyence-gray);
    margin-bottom: 12px;
}

.result-card.highlight .result-label {
    color: rgba(255, 255, 255, 0.9);
}

.result-value {
    font-size: 32px;
    font-weight: 900;
    color: var(--keyence-red);
}

.result-card.highlight .result-value {
    color: var(--white);
}

/* --- CHART --- */
.chart-section {
    background: var(--light-gray);
    padding: 32px;
    border-radius: 16px;
    margin-bottom: 40px;
}

.chart-section h3 {
    font-size: 20px;
    font-weight: 700;
    margin-bottom: 24px;
}

.chart-container {
    height: 300px;
}

/* --- GAINS DETAIL --- */
.gains-detail {
    background: var(--light-gray);
    padding: 32px;
    border-radius: 16px;
}

.gains-detail h3 {
    font-size: 20px;
    font-weight: 700;
    margin-bottom: 24px;
}

.gain-row {
    display: flex;
    justify-content: space-between;
    padding: 16px 0;
    border-bottom: 1px solid var(--border-light);
    font-size: 16px;
}

.gain-row.total {
    border-bottom: none;
    font-size: 20px;
    font-weight: 700;
    color: var(--keyence-red);
    padding-top: 24px;
    border-top: 3px solid var(--keyence-red);
}

/* --- STEP ACTIONS --- */
.step-actions {
    display: flex;
    justify-content: space-between;
    gap: 16px;
    margin-top: 48px;
    padding-top: 32px;
    border-top: 2px solid var(--border-light);
}

.btn-step {
    padding: 16px 32px;
    border-radius: 12px;
    font-size: 16px;
    font-weight: 700;
    cursor: pointer;
    border: none;
    transition: var(--transition);
}

.btn-step.btn-primary {
    background: linear-gradient(135deg, var(--keyence-red), #ff6b6b);
    color: var(--white);
}

.btn-step.btn-primary:hover:not(:disabled) {
    transform: translateY(-2px);
    box-shadow: var(--shadow-md);
}

.btn-step:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

.btn-step.btn-secondary {
    background: var(--keyence-gray);
    color: var(--white);
}

/* --- SUMMARY COLUMN --- */
.summary-column {
    position: sticky;
    top: 190px;
    height: fit-content;
}

.summary-card {
    background: var(--white);
    border-radius: 16px;
    padding: 32px;
    box-shadow: var(--shadow-md);
    border: 2px solid var(--border-light);
}

.summary-card h3 {
    font-size: 20px;
    font-weight: 700;
    margin-bottom: 24px;
    color: var(--keyence-dark);
}

.summary-section {
    padding: 16px 0;
    border-bottom: 1px solid var(--border-light);
}

.summary-label {
    font-size: 13px;
    font-weight: 600;
    color: var(--keyence-gray);
    margin-bottom: 8px;
}

.summary-value {
    font-size: 18px;
    font-weight: 700;
    color: var(--keyence-dark);
}

.summary-value.highlight {
    font-size: 24px;
    color: var(--keyence-red);
}

.summary-divider {
    height: 2px;
    background: var(--border-light);
    margin: 16px 0;
}

.summary-section.total {
    border-bottom: none;
    padding-top: 24px;
}

.summary-label-total {
    font-size: 14px;
    font-weight: 700;
    color: var(--keyence-gray);
    margin-bottom: 12px;
}

.summary-value-total {
    font-size: 28px;
    font-weight: 900;
    color: var(--keyence-red);
}

/* --- RESPONSIVE --- */
@media (max-width: 1200px) {
    .configurator-layout {
        grid-template-columns: 1fr;
    }
    
    .summary-column {
        position: static;
    }
}

@media (max-width: 768px) {
    .client-bar .container {
        flex-direction: column;
    }
    
    .config-options {
        grid-template-columns: 1fr;
    }
    
    .results-grid {
        grid-template-columns: 1fr;
    }
    
    .step-actions {
        flex-direction: column;
    }
}
/* --- VIDÉO IM-X PRINCIPALE --- */
.imx-video-section {
    padding: 120px 0;
    background: linear-gradient(135deg, #1a1a1a 0%, #2d2d2d 100%);
}

.imx-video-section .section-title {
    color: var(--white);
}

.imx-video-section .section-subtitle {
    text-align: center;
    font-size: 20px;
    color: rgba(255, 255, 255, 0.8);
    margin-bottom: 60px;
}

.video-showcase {
    max-width: 1100px;
    margin: 0 auto;
}

.video-wrapper-large {
    position: relative;
    padding-bottom: 56.25%; /* Ratio 16:9 */
    height: 0;
    overflow: hidden;
    border-radius: 20px;
    box-shadow: 0 8px 40px rgba(0, 0, 0, 0.5);
    background: #000;
}

.video-wrapper-large video {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: contain;
}
/* Images dans les options/accessoires */
.component-info-inline img {
    flex-shrink: 0;
    margin-right: 12px;
    background: #f8f9fa;
    padding: 8px;
    border-radius: 8px;
}
/* ========================================
   NOUVEAU CONFIGURATEUR - LAYOUT GROUPÉ
   ======================================== */

.configurator-container {
    padding: 120px 0 60px;
    background: #f8fafc;
    min-height: 100vh;
}

/* Barre client */
.client-bar-new {
    display: flex;
    gap: 12px;
    margin-bottom: 32px;
    padding: 20px;
    background: white;
    border-radius: 12px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
}

.input-client {
    flex: 1;
    padding: 12px 16px;
    border: 2px solid #e2e8f0;
    border-radius: 8px;
    font-size: 14px;
}

.input-client:focus {
    outline: none;
    border-color: var(--keyence-red);
}

.btn-save, .btn-load {
    padding: 12px 24px;
    border: none;
    border-radius: 8px;
    font-weight: 600;
    cursor: pointer;
    transition: var(--transition);
}

.btn-save {
    background: var(--keyence-red);
    color: white;
}

.btn-save:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-md);
}

.btn-load {
    background: #e2e8f0;
    color: var(--keyence-dark);
}

/* Layout 2 colonnes */
.config-layout-new {
    display: grid;
    grid-template-columns: 2fr 1fr;
    gap: 24px;
}

/* Groupes de configuration */
.config-group {
    background: white;
    border-radius: 16px;
    padding: 32px;
    margin-bottom: 24px;
    box-shadow: 0 2px 12px rgba(0,0,0,0.08);
    border: 2px solid #e2e8f0;
}

.config-group.compact {
    padding: 20px;
}

.group-title {
    font-size: 24px;
    font-weight: 800;
    color: var(--keyence-dark);
    margin-bottom: 24px;
    padding-bottom: 16px;
    border-bottom: 3px solid var(--keyence-red);
}

.group-title-small {
    font-size: 18px;
    font-weight: 700;
    color: var(--keyence-dark);
    margin-bottom: 16px;
    padding-bottom: 12px;
    border-bottom: 2px solid var(--keyence-red);
}

/* Stage grid */
.stage-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 20px;
}

.stage-card {
    background: #f8fafc;
    border: 3px solid transparent;
    border-radius: 12px;
    padding: 20px;
    text-align: center;
    cursor: pointer;
    transition: var(--transition);
}

.stage-card:hover {
    border-color: var(--keyence-red);
    transform: translateY(-4px);
    box-shadow: var(--shadow-md);
}

.stage-card.selected {
    background: linear-gradient(135deg, #fff5f5, white);
    border-color: var(--keyence-red);
    box-shadow: 0 0 0 4px rgba(230, 0, 18, 0.1);
}

.stage-card img {
    width: 100%;
    height: 120px;
    object-fit: contain;
    margin-bottom: 12px;
}

.stage-card h3 {
    font-size: 18px;
    font-weight: 700;
    margin-bottom: 8px;
}

.stage-card p {
    font-size: 14px;
    color: #64748b;
    margin-bottom: 12px;
}

.stage-card .price {
    font-size: 16px;
    font-weight: 700;
    color: var(--keyence-red);
}

/* Series tabs */
.series-tabs {
    display: flex;
    gap: 12px;
    margin-bottom: 20px;
}

.series-tabs .tab {
    flex: 1;
    padding: 12px 20px;
    background: #f8fafc;
    border: 2px solid #e2e8f0;
    border-radius: 8px;
    font-size: 15px;
    font-weight: 600;
    cursor: pointer;
    transition: var(--transition);
}

.series-tabs .tab.active {
    background: var(--keyence-red);
    color: white;
    border-color: var(--keyence-red);
}

/* Heads grid */
.heads-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 16px;
}

.head-card {
    background: #f8fafc;
    border: 3px solid transparent;
    border-radius: 12px;
    padding: 16px;
    text-align: center;
    cursor: pointer;
    transition: var(--transition);
}

.head-card:hover {
    border-color: var(--keyence-red);
    transform: translateY(-4px);
}

.head-card.selected {
    background: linear-gradient(135deg, #fff5f5, white);
    border-color: var(--keyence-red);
    box-shadow: 0 0 0 4px rgba(230, 0, 18, 0.1);
}

.head-card img {
    width: 100%;
    height: 80px;
    object-fit: contain;
    margin-bottom: 12px;
}

.head-card h4 {
    font-size: 16px;
    font-weight: 700;
    margin-bottom: 6px;
}

.head-card p {
    font-size: 13px;
    color: #64748b;
    margin-bottom: 8px;
}

.head-card .price {
    font-size: 14px;
    font-weight: 700;
    color: var(--keyence-red);
}

/* Options list (Software) */
.options-list {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.option-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px;
    background: #f8fafc;
    border: 2px solid transparent;
    border-radius: 8px;
    cursor: pointer;
    transition: var(--transition);
}

.option-item:hover {
    border-color: var(--keyence-red);
}

.option-item input[type="checkbox"] {
    width: 20px;
    height: 20px;
    cursor: pointer;
}

.option-item img {
    width: 50px;
    height: 50px;
    object-fit: contain;
    background: white;
    padding: 4px;
    border-radius: 6px;
}

.option-info {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.option-info strong {
    font-size: 14px;
    color: var(--keyence-dark);
}

.option-info span {
    font-size: 12px;
    color: #64748b;
}

/* PC selector */
.pc-selector {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 12px;
}

.pc-option {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 16px;
    background: #f8fafc;
    border: 2px solid transparent;
    border-radius: 8px;
    cursor: pointer;
    transition: var(--transition);
}

.pc-option:hover {
    border-color: var(--keyence-red);
}

.pc-option input[type="radio"]:checked ~ img {
    border: 2px solid var(--keyence-red);
}

.pc-option img {
    width: 60px;
    height: 60px;
    object-fit: contain;
    background: white;
    padding: 8px;
    border-radius: 8px;
}

.pc-option div {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.pc-option strong {
    font-size: 14px;
}

.pc-option span {
    font-size: 13px;
    color: var(--keyence-red);
    font-weight: 700;
}

/* Options grid (Options compactes) */
.options-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 12px;
}

.option-compact {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 12px;
    background: #f8fafc;
    border: 2px solid transparent;
    border-radius: 8px;
    cursor: pointer;
    transition: var(--transition);
}

.option-compact:hover {
    border-color: var(--keyence-red);
}

.option-compact input[type="checkbox"] {
    width: 18px;
    height: 18px;
}

.option-compact img {
    width: 40px;
    height: 40px;
    object-fit: contain;
    background: white;
    padding: 4px;
    border-radius: 6px;
}

.option-compact span {
    font-size: 12px;
    font-weight: 600;
}

/* Prix box */
.price-box {
    background: linear-gradient(135deg, var(--keyence-red), #ff3333);
    border-radius: 16px;
    padding: 32px;
    text-align: center;
    color: white;
    box-shadow: 0 8px 24px rgba(230, 0, 18, 0.3);
}

.price-box h3 {
    font-size: 20px;
    font-weight: 700;
    margin-bottom: 16px;
}

.price-total {
    font-size: 48px;
    font-weight: 900;
    margin-bottom: 24px;
}

.btn-reset, .btn-next {
    width: 100%;
    padding: 14px;
    margin-bottom: 12px;
    border: none;
    border-radius: 8px;
    font-size: 16px;
    font-weight: 700;
    cursor: pointer;
    transition: var(--transition);
}

.btn-reset {
    background: rgba(255,255,255,0.2);
    color: white;
}

.btn-reset:hover {
    background: rgba(255,255,255,0.3);
}

.btn-next {
    background: white;
    color: var(--keyence-red);
}

.btn-next:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

.btn-next:not(:disabled):hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0,0,0,0.2);
}

/* Responsive */
@media (max-width: 1200px) {
    .config-layout-new {
        grid-template-columns: 1fr;
    }
    
    .stage-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 768px) {
    .client-bar-new {
        flex-direction: column;
    }
    
    .stage-grid,
    .heads-grid,
    .pc-selector,
    .options-grid {
        grid-template-columns: 1fr;
    }
}
/* ========================================
   INCOMPATIBILITÉS - STYLES
   ======================================== */

/* Carte de tête incompatible */
.head-card.incompatible {
    opacity: 0.4;
    position: relative;
    cursor: not-allowed !important;
}

.head-card.incompatible::after {
    content: '🚫';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    font-size: 48px;
    z-index: 10;
}

.head-card.incompatible:hover {
    border-color: #cbd5e1 !important;
    transform: none !important;
}

/* Message d'avertissement */
.compatibility-warning {
    display: flex;
    align-items: center;
    gap: 16px;
    padding: 16px 20px;
    background: linear-gradient(135deg, #fef3c7 0%, #fde68a 100%);
    border: 2px solid #f59e0b;
    border-radius: 12px;
    margin-bottom: 20px;
    animation: slideDown 0.4s ease;
}

@keyframes slideDown {
    from {
        opacity: 0;
        transform: translateY(-20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.warning-icon {
    font-size: 32px;
    flex-shrink: 0;
}

.warning-text {
    flex: 1;
    font-size: 14px;
    color: #92400e;
    line-height: 1.5;
}

.warning-text strong {
    font-weight: 700;
    color: #78350f;
}

}
/* Empêcher le tooltip de déborder */
.solution-card:first-child .solution-tooltip {
    left: 0;
    transform: translateY(20px);
}

.solution-card:first-child:hover .solution-tooltip {
    transform: translateY(10px);
}

.solution-card:last-child .solution-tooltip {
    left: auto;
    right: 0;
    transform: translateY(20px);
}

.solution-card:last-child:hover .solution-tooltip {
    transform: translateY(10px);
}

.solution-card:last-child .solution-tooltip::before {
    left: auto;
    right: 24px;
}
/* ========================================
   PAGE ROI CALCULATOR
   ======================================== */

/* ========================================
   BARRE DE CONFIGURATION STICKY (ROI)
   ======================================== */
.config-summary-bar {
    position: sticky;
    top: 80px;
    background: white;
    border-bottom: 3px solid #e2e8f0;
    padding: 24px 0;
    z-index: 999;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
}

.config-summary-content {
    max-width: 1400px;
    margin: 0 auto;
    padding: 0 32px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 24px;
}

.config-info {
    display: flex;
    flex-direction: column;
    gap: 6px;
    background: linear-gradient(135deg, #f8fafc 0%, #e2e8f0 100%);
    padding: 16px 24px;
    border-radius: 12px;
    border-left: 4px solid var(--keyence-red);
    min-width: 250px;
}

.config-label {
    font-size: 12px;
    font-weight: 700;
    color: #64748b;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.config-value {
    font-size: 16px;
    font-weight: 800;
    color: var(--keyence-dark);
}

.config-value.highlight {
    color: var(--keyence-red);
    font-size: 24px;
    text-shadow: 0 2px 4px rgba(230, 0, 18, 0.2);
}

/* Bouton retour configurateur */
.config-summary-content .btn-outline {
    padding: 12px 24px;
    background: white;
    color: var(--keyence-red);
    border: 2px solid var(--keyence-red);
    border-radius: 10px;
    font-size: 14px;
    font-weight: 700;
    cursor: pointer;
    transition: var(--transition);
    white-space: nowrap;
}

.config-summary-content .btn-outline:hover {
    background: var(--keyence-red);
    color: white;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(230, 0, 18, 0.3);
}

/* --- PROGRESS BAR ROI --- */
.roi-progress-container {
    position: sticky;
    top: 140px;
    background: white;
    padding: 32px 0;
    border-bottom: 2px solid #e2e8f0;
    z-index: 998;
}

.roi-progress-steps {
    position: relative;
    max-width: 900px;
    margin: 0 auto;
    display: flex;
    justify-content: space-between;
}

.progress-line {
    position: absolute;
    top: 24px;
    left: 60px;
    right: 60px;
    height: 4px;
    background: #e2e8f0;
    border-radius: 2px;
}

.progress-line-active {
    height: 100%;
    background: linear-gradient(90deg, var(--keyence-red), #ff6b6b);
    border-radius: 2px;
    transition: width 0.6s cubic-bezier(0.4, 0, 0.2, 1);
}

.roi-step {
    position: relative;
    text-align: center;
    cursor: pointer;
    z-index: 10;
}

.roi-step .step-circle {
    width: 48px;
    height: 48px;
    background: white;
    border: 4px solid #e2e8f0;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 800;
    font-size: 18px;
    color: #94a3b8;
    margin: 0 auto 12px;
    transition: all 0.3s ease;
}

.roi-step.active .step-circle,
.roi-step.completed .step-circle {
    background: var(--keyence-red);
    color: white;
    border-color: var(--keyence-red);
    transform: scale(1.1);
}

.roi-step .step-label {
    font-size: 14px;
    font-weight: 600;
    color: #64748b;
}

.roi-step.active .step-label {
    color: var(--keyence-red);
    font-weight: 700;
}

/* --- CONTENEUR PRINCIPAL ROI --- */
.roi-container {
    padding: 40px 0 80px;
    background: #f8fafc;
    min-height: 100vh;
}

.roi-content-wrapper {
    max-width: 1600px;
    margin: 0 auto;
    padding: 0 32px;
    box-sizing: border-box; /* ensure padding is inside width */
    display: grid;
    /* Allow the sidebar to shrink on smaller viewports while keeping a readable min width */
    grid-template-columns: 1fr minmax(300px, 380px);
    gap: 32px;
    align-items: start;
}

/* ✅ NOUVEAU : Forcer le box-sizing sur tous les enfants */
.roi-content-wrapper * {
    box-sizing: border-box;
}

/* --- ÉTAPES ROI --- */
.roi-step-content {
    display: none;
    background: white;
    border-radius: 16px;
    padding: 48px;
    box-shadow: 0 2px 12px rgba(0, 0, 0, 0.08);
    /* Prevent important fields from being cut off on small viewports
       Make the step content vertically scrollable and limit its height
       so sticky sidebar/header don't overlap the form fields. */
    max-height: calc(100vh - 220px);
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
}

.roi-step-content.active {
    display: block;
    animation: fadeInUp 0.4s ease;
}

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

.roi-step-content h2 {
    font-size: 42px;
    font-weight: 800;
    color: var(--keyence-dark);
    margin-bottom: 32px;
}

/* ========================================
   AMÉLIORATION DASHBOARD ROI - VERSION MODERNE
   ======================================== */

/* Carte ROI% avec indicateur de rentabilité */
.roi-dashboard-card.roi-percent .dashboard-subvalue {
    font-size: 18px;
    font-weight: 700;
    padding: 8px 16px;
    background: rgba(255, 255, 255, 0.2);
    border-radius: 20px;
    margin-top: 12px;
    display: inline-block;
}

/* Animation pulsation pour les gains positifs */
@keyframes pulse {
    0%, 100% { transform: scale(1); }
    50% { transform: scale(1.05); }
}

.roi-dashboard-card.gains-1year:hover,
.roi-dashboard-card.gains-3years:hover {
    animation: pulse 2s infinite;
}

/* Badge "RENTABLE" / "NON RENTABLE" */
.profitability-badge {
    display: inline-block;
    padding: 8px 20px;
    border-radius: 20px;
    font-size: 14px;
    font-weight: 800;
    letter-spacing: 1px;
    margin-top: 12px;
}

.profitability-badge.profitable {
    background: rgba(16, 185, 129, 0.2);
    color: #10b981;
    border: 2px solid #10b981;
}

.profitability-badge.not-profitable {
    background: rgba(239, 68, 68, 0.2);
    color: #ef4444;
    border: 2px solid #ef4444;
}

/* --- INFO BOX --- */
.info-box {
    background: linear-gradient(135deg, #dbeafe 0%, #bfdbfe 100%);
    border: 2px solid #3b82f6;
    border-radius: 12px;
    padding: 20px 24px;
    margin-bottom: 32px;
    font-size: 15px;
    line-height: 1.6;
    color: #1e40af;
}

/* --- FORM SECTION --- */
.form-section {
    margin-bottom: 40px;
}

.form-section h3 {
    font-size: 20px;
    font-weight: 700;
    color: var(--keyence-dark);
    margin-bottom: 24px;
    padding-bottom: 12px;
    border-bottom: 2px solid var(--keyence-red);
}

.form-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 24px;
}

.form-group {
    position: relative;
}

.form-label {
    display: block;
    font-size: 18px;
    font-weight: 600;
    color: #475569;
    margin-bottom: 8px;
}

.form-input {
    width: 100%;
    padding: 12px 16px;
    border: 2px solid #e2e8f0;
    border-radius: 8px;
    font-size: 15px;
    transition: var(--transition);
}

.form-input:focus {
    outline: none;
    border-color: var(--keyence-red);
}

.input-unit {
    position: absolute;
    right: 16px;
    bottom: 12px;
    font-size: 14px;
    font-weight: 600;
    color: #94a3b8;
    pointer-events: none;
}

/* --- SHIFT SELECTOR --- */
.shift-selector {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 16px;
    margin-bottom: 24px;
}

.shift-option {
    padding: 20px;
    background: #f8fafc;
    border: 3px solid #e2e8f0;
    border-radius: 12px;
    text-align: center;
    cursor: pointer;
    transition: var(--transition);
}

.shift-option:hover {
    border-color: var(--keyence-red);
    transform: translateY(-4px);
}

.shift-option.selected {
    background: var(--keyence-red);
    color: white;
    border-color: var(--keyence-red);
    box-shadow: 0 4px 16px rgba(230, 0, 18, 0.3);
}

.shift-name {
    font-size: 24px;
    font-weight: 800;
    margin-bottom: 4px;
}

.shift-hours {
    font-size: 14px;
    opacity: 0.9;
}

/* --- TABLE RÉFÉRENCES ROI --- */
.reference-table-roi {
    background: #f8fafc;
    border-radius: 12px;
    padding: 20px;
    margin-bottom: 24px;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
}

.reference-header-roi {
    display: grid;
    /* Columns: reference, current time, IM-X time, batch, % control, series/year, gain, actions */
    grid-template-columns: 1.8fr 0.7fr 0.7fr 0.8fr 0.6fr 0.7fr 0.7fr 80px;
    min-width: 920px;
    gap: 12px;
    padding: 12px;
    background: white;
    border-radius: 8px;
    font-size: 13px;
    font-weight: 700;
    color: #475569;
    margin-bottom: 12px;
    align-items: center; /* center header cell content vertically */
}

.reference-row-roi {
    display: grid;
    /* Keep same template as header so columns line up exactly */
    grid-template-columns: 1.8fr 0.7fr 0.7fr 0.8fr 0.6fr 0.7fr 0.7fr 80px;
    min-width: 920px;
    gap: 12px;
    align-items: center;
    padding: 12px;
    background: white;
    border-radius: 8px;
    margin-bottom: 8px;
    transition: var(--transition);
}

/* Ensure header cells and row children are flex containers so text and inputs align */
.reference-header-roi > div,
.reference-row-roi > * {
    display: flex;
    align-items: center;
}

/* Make inputs fill their cell */
.reference-row-roi .ref-input {
    width: 100%;
}

.reference-row-roi:hover {
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.ref-input {
    padding: 10px 12px;
    border: 2px solid #e2e8f0;
    border-radius: 6px;
    font-size: 14px;
    transition: var(--transition);
}

.ref-input:focus {
    outline: none;
    border-color: var(--keyence-red);
}

.input-wrapper {
    position: relative;
}

.input-wrapper .unit {
    position: absolute;
    right: 12px;
    top: 50%;
    transform: translateY(-50%);
    font-size: 12px;
    font-weight: 600;
    color: #94a3b8;
    pointer-events: none;
}

.gain-display {
    text-align: center;
    font-weight: 700;
    font-size: 14px;
    padding: 8px;
    background: #f0fdf4;
    border-radius: 6px;
    color: #10b981;
}

/* Ensure gain badges have enough room and don't wrap/cut on desktop */
.reference-row-roi .gain-display {
    min-width: 80px;
    white-space: nowrap;
}

.btn-remove {
    width: 40px;
    height: 40px;
    background: #fee2e2;
    color: #dc2626;
    border: none;
    border-radius: 8px;
    font-size: 24px;
    font-weight: 700;
    cursor: pointer;
    transition: var(--transition);
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0;
    line-height: 1; /* ensure glyph is vertically centered */
}

.btn-remove:hover {
    background: #dc2626;
    color: white;
    transform: scale(1.1);
}

/* --- CALCULATION SUMMARY --- */
.calculation-summary {
    background: linear-gradient(135deg, #f0fdf4 0%, #dcfce7 100%);
    border: 3px solid #10b981;
    border-radius: 16px;
    padding: 32px;
    margin: 32px 0;
}

.calculation-summary h3 {
    font-size: 24px;
    font-weight: 800;
    color: #10b981;
    margin-bottom: 24px;
}

.summary-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 20px;
}

.summary-item {
    background: white;
    padding: 20px;
    border-radius: 12px;
    text-align: center;
}

.summary-item.full-width {
    grid-column: 1 / -1;
}

.summary-label {
    font-size: 13px;
    font-weight: 600;
    color: #64748b;
    margin-bottom: 8px;
}

.summary-value {
    font-size: 24px;
    font-weight: 800;
    color: var(--keyence-dark);
}

.summary-value.highlight {
    font-size: 28px;
    color: #10b981;
}

.summary-value-large {
    font-size: 36px;
    font-weight: 900;
    color: var(--keyence-red);
}

/* --- ACTION BAR --- */
.action-bar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: 48px;
    padding-top: 32px;
    border-top: 2px solid #e2e8f0;
}

.btn {
    padding: 14px 32px;
    border-radius: 10px;
    font-size: 16px;
    font-weight: 700;
    cursor: pointer;
    border: none;
    transition: var(--transition);
}

.btn-primary {
    background: linear-gradient(135deg, var(--keyence-red), #ff6b6b);
    color: white;
    box-shadow: 0 4px 16px rgba(230, 0, 18, 0.3);
}

.btn-primary:hover:not(:disabled) {
    transform: translateY(-3px);
    box-shadow: 0 6px 24px rgba(230, 0, 18, 0.4);
}

.btn-primary:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

.btn-secondary {
    background: #64748b;
    color: white;
}

.btn-secondary:hover {
    background: #475569;
}

.btn-outline {
    background: white;
    color: var(--keyence-red);
    border: 2px solid var(--keyence-red);
}

.btn-outline:hover {
    background: var(--keyence-red);
    color: white;
}

/* Bouton de fin de parcours ROI */
.roi-footer-actions {
    margin: 32px 32px 56px;
    text-align: right;
}

.roi-footer-actions .btn {
    font-size: 1.125rem;
    padding: 16px 32px;
}

.btn-ghost {
    background: transparent;
    color: #64748b;
}

.btn-ghost:hover {
    background: #f8fafc;
}

/* --- DASHBOARD RESULTS --- */
.roi-dashboard-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 24px;
    margin-bottom: 48px;
}

.roi-dashboard-card {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    padding: 32px 24px;
    border-radius: 16px;
    color: white;
    text-align: center;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.15);
    transition: var(--transition);
}

.roi-dashboard-card:hover {
    transform: translateY(-8px);
    box-shadow: 0 12px 32px rgba(0, 0, 0, 0.25);
}

.roi-dashboard-card.payback {
    background: linear-gradient(135deg, var(--keyence-red) 0%, #ff6b6b 100%);
}

.roi-dashboard-card.posts {
    background: linear-gradient(135deg, #4facfe 0%, #00f2fe 100%);
}

.dashboard-icon {
    font-size: 56px;
    margin-bottom: 16px;
}

.dashboard-label {
    font-size: 18px;
    font-weight: 600;
    margin-bottom: 12px;
    opacity: 0.9;
}

.dashboard-value {
    font-size: 40px;
    font-weight: 900;
    line-height: 1;
}

/* --- CHART CONTAINER --- */
.chart-container-roi {
    background: white;
    padding: 32px;
    border-radius: 16px;
    margin-bottom: 32px;
    box-shadow: 0 2px 12px rgba(0, 0, 0, 0.08);
    height: 400px;
}

/* --- GAINS BREAKDOWN --- */
.gains-breakdown {
    background: #f8fafc;
    padding: 24px;
    border-radius: 12px;
}

.gain-item {
    display: flex;
    align-items: center;
    gap: 16px;
    padding: 20px;
    background: white;
    border-radius: 12px;
    margin-bottom: 12px;
    transition: var(--transition);
}

.gain-item:hover {
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.1);
    transform: translateX(4px);
}

.gain-item.total {
    background: linear-gradient(135deg, #fff5f5 0%, white 100%);
    border: 2px solid var(--keyence-red);
    margin-top: 16px;
}

.gain-icon {
    font-size: 40px;
    flex-shrink: 0;
}

.gain-info {
    flex: 1;
}

.gain-label {
    font-size: 16px;
    font-weight: 700;
    color: var(--keyence-dark);
    margin-bottom: 4px;
}

.gain-details {
    font-size: 13px;
    color: #64748b;
}

.gain-value {
    font-size: 24px;
    font-weight: 800;
    color: var(--keyence-red);
}

/* ========================================
   SIDEBAR ROI - VERSION ROBUSTE
   ======================================== */
.roi-sidebar {
    position: sticky;
    /* Make sticky distance consistent with header/navbar height so the panel remains visible */
    top: 88px;
    width: 100%;
    max-width: 360px; /* constrain width so the recap has enough space */
    box-sizing: border-box;
    height: fit-content;
    /* keep a small buffer from top and bottom of viewport */
    max-height: calc(100vh - 112px);
    overflow-y: auto;
    overflow-x: hidden; /* Empêche débordement horizontal */
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.12);
    border-radius: 20px;
    padding-bottom: 8px;
}

.sidebar-header {
    background: linear-gradient(135deg, var(--keyence-red) 0%, #c4000f 100%);
    color: white;
    padding: 18px 14px; /* reduced header padding to free horizontal space */
    position: relative;
    overflow: hidden;
}

.sidebar-header::before {
    content: '';
    position: absolute;
    top: -50%;
    right: -50%;
    width: 200%;
    height: 200%;
    background: radial-gradient(circle, rgba(255,255,255,0.12) 0%, transparent 70%);
}

.sidebar-header h3 {
    font-size: 18px !important; /* smaller to avoid clipping */
    font-weight: 800;
    margin: 0;
    position: relative;
    z-index: 1;
    word-wrap: break-word;
    white-space: normal;
    line-height: 1.05;
}

.sidebar-section {
    background: white;
    padding: 12px 14px; /* slightly reduced padding to fit more content vertically */
    border-bottom: 2px solid #f1f5f9;
    transition: var(--transition);
    word-wrap: break-word;
    overflow-wrap: break-word;
}

.sidebar-section:hover {
    background: #f8fafc;
}

.sidebar-section.total {
    background: linear-gradient(135deg, #fff5f5 0%, white 100%);
    padding: 28px 20px;
    border-bottom: none;
}

.sidebar-section.posts-info {
    background: linear-gradient(135deg, #dbeafe 0%, #eff6ff 100%);
    border-left: 4px solid #3b82f6;
}

.sidebar-label {
    font-size: 11px; /* slightly smaller */
    font-weight: 700;
    color: #64748b;
    margin-bottom: 6px;
    text-transform: uppercase;
    letter-spacing: 0.4px;
    word-wrap: break-word;
}

.sidebar-value {
    font-size: 20px; /* ✅ Réduit de 22px */
    font-weight: 800;
    color: var(--keyence-dark);
    word-wrap: break-word;
    line-height: 1.2;
}

.sidebar-value.highlight {
    color: #10b981;
    font-size: 22px;
}

.sidebar-label-total {
    font-size: 13px;
    font-weight: 800;
    color: #64748b;
    margin-bottom: 12px;
    letter-spacing: 1px;
}

.sidebar-value-total {
    font-size: 34px; /* ✅ Réduit de 40px */
    font-weight: 900;
    color: var(--keyence-red);
    line-height: 1;
    text-shadow: 0 2px 8px rgba(230, 0, 18, 0.2);
    word-wrap: break-word;
}

.sidebar-value-posts {
    font-size: 30px; /* ✅ Réduit de 36px */
    font-weight: 900;
    color: #3b82f6;
    word-wrap: break-word;
}

.sidebar-note {
    font-size: 11px;
    color: #94a3b8;
    margin-top: 6px;
    font-style: italic;
}

/* Scrollbar sidebar */
.roi-sidebar::-webkit-scrollbar {
    width: 6px;
}

.roi-sidebar::-webkit-scrollbar-track {
    background: #f1f5f9;
    border-radius: 10px;
}

.roi-sidebar::-webkit-scrollbar-thumb {
    background: #cbd5e0;
    border-radius: 10px;
}

.roi-sidebar::-webkit-scrollbar-thumb:hover {
    background: var(--keyence-red);
}

/* Ensure the overall roi container never causes horizontal scroll */
.roi-container {
    overflow-x: hidden;
}

/* --- RESPONSIVE ROI --- */
@media (max-width: 1200px) {
    .roi-content-wrapper {
        grid-template-columns: 1fr;
    }
    
    .roi-sidebar {
        position: static;
    }
    
    .input-wrapper .unit {
        position: static;
        display: block;
        margin-top: 4px;
    }
}

@media (max-width: 768px) {
    .config-summary-content {
        flex-direction: column;
        align-items: flex-start;
    }
    
    .roi-progress-steps {
        flex-wrap: wrap;
    }
    
    .roi-step-content {
        padding: 24px;
    }
    
    .form-grid {
        grid-template-columns: 1fr;
    }
    
    .shift-selector {
        grid-template-columns: 1fr;
    }
    
    /* Table références : empiler les colonnes sur téléphone */
    .reference-header-roi,
    .reference-row-roi {
        grid-template-columns: 1fr;
        min-width: 0;
        gap: 8px;
    }
    
    .roi-dashboard-grid {
        grid-template-columns: 1fr;
    }
    
    .action-bar {
        flex-direction: column;
        gap: 12px;
    }
    
    .btn {
        width: 100%;
    }
}

/* --- KPI HIGHLIGHTS (amélioration visuelle) --- */
.kpi-highlights {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 24px;
    margin: 40px 0;
}

.kpi-card {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    padding: 32px 24px;
    border-radius: 16px;
    color: white;
    text-align: center;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.15);
    transition: var(--transition);
}

.kpi-card:hover {
    transform: translateY(-8px) scale(1.02);
    box-shadow: 0 12px 32px rgba(0, 0, 0, 0.25);
}

.kpi-card.payback { 
    background: linear-gradient(135deg, var(--keyence-red) 0%, #c4000f 100%); 
}

.kpi-card.gains { 
    background: linear-gradient(135deg, #11998e 0%, #38ef7d 100%); 
}

.kpi-card.posts { 
    background: linear-gradient(135deg, #4facfe 0%, #00f2fe 100%); 
}

.kpi-card.productivity { 
    background: linear-gradient(135deg, #fa709a 0%, #fee140 100%); 
}

.kpi-icon {
    font-size: 56px;
    margin-bottom: 16px;
}

.kpi-value {
    font-size: 40px;
    font-weight: 900;
    margin-bottom: 12px;
    line-height: 1;
}

.kpi-label {
    font-size: 14px;
    font-weight: 600;
    opacity: 0.95;
    line-height: 1.4;
}
/* ========================================
   MODAL AGRANDISSEMENT D'IMAGES
   ======================================== */
.image-modal-overlay {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.95);
    z-index: 10000;
    align-items: center;
    justify-content: center;
    backdrop-filter: blur(8px);
}

.image-modal-overlay.active {
    display: flex;
}

.image-modal-container {
    position: relative;
    max-width: 95%;
    max-height: 95vh;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 20px;
}

.image-modal-container img {
    max-width: 100%;
    max-height: 85vh;
    object-fit: contain;
    border-radius: 12px;
    box-shadow: 0 8px 40px rgba(0, 0, 0, 0.5);
}

.modal-caption {
    background: white;
    padding: 16px 32px;
    border-radius: 12px;
    font-size: 18px;
    font-weight: 700;
    color: var(--keyence-dark);
    text-align: center;
}

.image-modal-overlay .modal-close {
    position: fixed;
    top: 32px;
    right: 32px;
    width: 56px;
    height: 56px;
    background: var(--keyence-red);
    color: white;
    border: none;
    border-radius: 50%;
    font-size: 32px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: var(--transition);
    z-index: 10001;
}

.image-modal-overlay .modal-close:hover {
    transform: scale(1.15) rotate(90deg);
    background: #c4000f;
}
/* ========================================
   MODAL VIDÉO AVEC DÉTAILS CÔTE À CÔTE
   ======================================== */

.modal-video-split {
    position: relative;
    display: grid;
    grid-template-columns: 380px 1fr; /* ✅ Réduit de 400px à 380px */
    gap: 40px; /* ✅ Augmenté de 32px à 40px */
    width: 90%;
    max-width: 1400px;
    max-height: 90vh;
    background: white;
    border-radius: 20px;
    padding: 48px;
    overflow: hidden;
}

/* Colonne détails (gauche) */
.modal-details-column {
    flex: 1;
    padding: 40px;
    background: linear-gradient(135deg, #f5f7fa 0%, #c3cfe2 100%);
    overflow-y: auto;           /* Active le scroll vertical */
    max-height: 85vh;           /* Limite la hauteur à 85% de l'écran */
    padding-right: 30px;        /* Compense visuellement la barre de scroll */
}

.modal-series-icon {
    font-size: 64px; /* ✅ Réduit de 72px à 64px */
    text-align: center;
    margin-bottom: 12px; /* ✅ Réduit de 16px */
}

.modal-series-title {
    font-size: 28px; /* ✅ Réduit de 32px à 28px */
    font-weight: 900;
    color: var(--keyence-dark);
    text-align: center;
    margin: 0;
    word-wrap: break-word; /* ✅ Gestion des longs mots */
}

.modal-series-subtitle {
    font-size: 16px; /* ✅ Réduit de 18px à 16px */
    color: var(--keyence-gray);
    text-align: center;
    font-weight: 600;
    margin: 0 0 20px 0; /* ✅ Réduit de 24px */
    word-wrap: break-word; /* ✅ Gestion des longs mots */
}

.modal-description {
    background: linear-gradient(135deg, #f8fafc 0%, #e2e8f0 100%);
    padding: 18px; /* ✅ Réduit de 20px */
    border-radius: 12px;
    border-left: 4px solid var(--keyence-red);
}

.modal-description p {
    font-size: 14px; /* ✅ Réduit de 16px à 14px */
    line-height: 1.6;
    color: var(--keyence-dark);
    margin: 0;
    font-style: italic;
    word-wrap: break-word; /* ✅ Gestion des longs mots */
    overflow-wrap: break-word; /* ✅ Pour navigateurs modernes */
}

.modal-advantages {
    background: linear-gradient(135deg, #f0fdf4 0%, #dcfce7 100%);
    padding: 20px; /* ✅ Réduit de 24px */
    border-radius: 12px;
    border: 2px solid #10b981;
}

.modal-advantages h3 {
    font-size: 16px; /* ✅ Réduit de 18px */
    font-weight: 800;
    color: #10b981;
    margin: 0 0 14px 0; /* ✅ Réduit de 16px */
}

.modal-advantages ul {
    list-style: none;
    padding: 0;
    margin: 0;
}

.modal-advantages li {
    font-size: 13px; /* ✅ Réduit de 15px à 13px */
    line-height: 1.8; /* ✅ Réduit de 2 à 1.8 */
    color: var(--keyence-dark);
    padding-left: 8px;
    position: relative;
    margin-bottom: 8px; /* ✅ Espacement entre les items */
    word-wrap: break-word; /* ✅ Gestion des longs mots */
    overflow-wrap: break-word;
}

.modal-advantages li::before {
    content: '✓';
    position: absolute;
    left: -16px;
    color: #10b981;
    font-weight: 700;
}

.modal-advantages li strong {
    font-weight: 700;
    color: var(--keyence-dark);
}

/* Colonne vidéo (droite) */
.modal-video-column {
    display: flex;
    align-items: center;
    justify-content: center;
    background: #000;
    border-radius: 16px;
    overflow: hidden;
    min-width: 0; /* ✅ Important pour éviter le débordement */
}

.modal-video-column video {
    width: 100%;
    height: auto;
    max-height: 80vh;
    object-fit: contain;
}

/* Bouton fermer */
.modal-video-split .modal-close {
    position: absolute;
    top: 16px;
    right: 16px;
    width: 48px;
    height: 48px;
    background: var(--keyence-red);
    color: white;
    border: none;
    border-radius: 50%;
    font-size: 28px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: var(--transition);
    z-index: 10;
}

.modal-video-split .modal-close:hover {
    transform: scale(1.15) rotate(90deg);
    background: #c4000f;
}

/* Scrollbar personnalisée pour la colonne détails */
.modal-details-column::-webkit-scrollbar {
    width: 6px;
}

.modal-details-column::-webkit-scrollbar-track {
    background: #f1f1f1;
    border-radius: 10px;
}

.modal-details-column::-webkit-scrollbar-thumb {
    background: #cbd5e0;
    border-radius: 10px;
}

.modal-details-column::-webkit-scrollbar-thumb:hover {
    background: #a0aec0;
}

/* Responsive */
@media (max-width: 1200px) {
    .modal-video-split {
        grid-template-columns: 1fr;
        grid-template-rows: auto 1fr;
        max-height: 95vh;
        overflow-y: auto;
        gap: 24px;
    }
    
    .modal-details-column {
        padding-right: 0;
        max-height: none;
        overflow-y: visible;
        order: 2;
    }
    
    .modal-video-column {
        order: 1;
        min-height: 200px;
    }

    .modal-video-column video {
        max-height: 50vh;
    }
}

@media (max-width: 768px) {
    .modal-video-split {
        padding: 24px;
        width: 95%;
    }
    
    .modal-series-title {
        font-size: 22px;
    }
    
    .modal-series-subtitle {
        font-size: 14px;
    }
    
    .modal-advantages li {
        font-size: 12px;
    }
}
/* ========================================
   DASHBOARD ROI - DESIGN MODERNE
   ======================================== */

/* --- KPI CARDS AMÉLIORÉES --- */
.roi-dashboard-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 24px;
    margin-bottom: 48px;
}

.roi-dashboard-card {
    position: relative;
    padding: 32px 24px;
    border-radius: 20px;
    color: white;
    text-align: center;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.15);
    transition: var(--transition);
    overflow: hidden;
}

.roi-dashboard-card::before {
    content: '';
    position: absolute;
    top: -50%;
    right: -50%;
    width: 200%;
    height: 200%;
    background: radial-gradient(circle, rgba(255,255,255,0.1) 0%, transparent 70%);
    animation: shimmer 3s infinite;
}

@keyframes shimmer {
    0%, 100% { transform: translate(0, 0); }
    50% { transform: translate(-30px, -30px); }
}

.roi-dashboard-card:hover {
    transform: translateY(-12px) scale(1.03);
    box-shadow: 0 16px 40px rgba(0, 0, 0, 0.25);
}

.roi-dashboard-card.gains-1year {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
}

.roi-dashboard-card.gains-3years {
    background: linear-gradient(135deg, #f093fb 0%, #f5576c 100%);
}

.roi-dashboard-card.payback {
    background: linear-gradient(135deg, var(--keyence-red) 0%, #c4000f 100%);
}

.roi-dashboard-card.posts {
    background: linear-gradient(135deg, #4facfe 0%, #00f2fe 100%);
}

.roi-dashboard-card.roi-percent {
    background: linear-gradient(135deg, #43e97b 0%, #38f9d7 100%);
}

.dashboard-icon {
    font-size: 64px;
    margin-bottom: 16px;
    filter: drop-shadow(0 4px 8px rgba(0,0,0,0.2));
}

.dashboard-label {
    font-size: 18px;
    font-weight: 600;
    margin-bottom: 12px;
    opacity: 0.95;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.dashboard-value {
    font-size: 60px;
    font-weight: 900;
    line-height: 1;
    text-shadow: 0 2px 8px rgba(0,0,0,0.2);
}

.dashboard-subvalue {
    font-size: 14px;
    margin-top: 8px;
    opacity: 0.9;
    font-weight: 600;
}

/* --- GRAPHIQUE AMÉLIORÉ --- */
.chart-container-roi {
    background: white;
    padding: 40px;
    border-radius: 20px;
    margin-bottom: 40px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.1);
    border: 2px solid #e2e8f0;
    height: 450px;
}

.chart-container-roi h3 {
    font-size: 24px;
    font-weight: 800;
    color: var(--keyence-dark);
    margin-bottom: 24px;
    text-align: center;
}

/* --- GAINS BREAKDOWN AMÉLIORÉ --- */
.gains-breakdown {
    background: linear-gradient(135deg, #f8fafc 0%, #e2e8f0 100%);
    padding: 32px;
    border-radius: 20px;
    border: 2px solid #cbd5e1;
}

.gain-item {
    display: flex;
    align-items: center;
    gap: 20px;
    padding: 24px;
    background: white;
    border-radius: 16px;
    margin-bottom: 16px;
    transition: var(--transition);
    border: 2px solid transparent;
}

.gain-item:hover {
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.12);
    transform: translateX(8px);
    border-color: var(--keyence-red);
}

.gain-item.total {
    background: linear-gradient(135deg, #fff5f5 0%, white 100%);
    border: 3px solid var(--keyence-red);
    margin-top: 24px;
    padding: 32px 24px;
}

.gain-icon {
    font-size: 48px;
    flex-shrink: 0;
    filter: drop-shadow(0 2px 4px rgba(0,0,0,0.1));
}

.gain-info {
    flex: 1;
}

.gain-label {
    font-size: 18px;
    font-weight: 800;
    color: var(--keyence-dark);
    margin-bottom: 6px;
}

.gain-details {
    font-size: 14px;
    color: #64748b;
    font-weight: 600;
}

.gain-value {
    font-size: 28px;
    font-weight: 900;
    color: var(--keyence-red);
    text-shadow: 0 2px 4px rgba(230, 0, 18, 0.2);
}

/* --- SIDEBAR AMÉLIORÉE (VERSION COMPACTE) --- */
.roi-sidebar {
    position: sticky;
    top: 220px; /* Start lower to clear sticky headers */
    height: fit-content;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.12);
    border-radius: 20px;
    overflow: hidden;
}

.sidebar-header {
    background: linear-gradient(135deg, var(--keyence-red) 0%, #c4000f 100%);
    color: white;
    padding: 16px 20px; /* Reduced padding */
    position: relative;
    overflow: hidden;
}

.sidebar-header::before {
    content: '';
    position: absolute;
    top: -50%;
    right: -50%;
    width: 200%;
    height: 200%;
    background: radial-gradient(circle, rgba(255,255,255,0.15) 0%, transparent 70%);
}

.sidebar-header h3 {
    font-size: 20px; /* Reduced font size */
    font-weight: 900;
    margin: 0;
    position: relative;
    z-index: 1;
}

.sidebar-section {
    background: white;
    padding: 16px 20px; /* Reduced padding */
    border-bottom: 1px solid #f1f5f9;
    transition: var(--transition);
}

.sidebar-section:hover {
    background: #f8fafc;
}

.sidebar-section.total {
    background: linear-gradient(135deg, #fff5f5 0%, white 100%);
    padding: 20px 20px; /* Reduced padding */
    border-bottom: none;
}

.sidebar-section.posts-info {
    background: linear-gradient(135deg, #dbeafe 0%, #eff6ff 100%);
    border-left: 4px solid #3b82f6;
}

.sidebar-label {
    font-size: 11px; /* Reduced font size */
    font-weight: 700;
    color: #64748b;
    margin-bottom: 4px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.sidebar-value {
    font-size: 18px; /* Reduced from 22px */
    font-weight: 800;
    color: var(--keyence-dark);
}

.sidebar-value.highlight {
    color: #10b981;
    font-size: 20px; /* Reduced from 24px */
}

.sidebar-value-total {
    font-size: 32px; /* Reduced from 40px */
    font-weight: 900;
    color: var(--keyence-red);
    line-height: 1;
    text-shadow: 0 2px 8px rgba(230, 0, 18, 0.2);
}

.sidebar-value-posts {
    font-size: 28px; /* Reduced from 36px */
    font-weight: 900;
    color: #3b82f6;
}

.sidebar-note {
    font-size: 12px;
    color: #94a3b8;
    margin-top: 8px;
    font-style: italic;
}

/* --- ANIMATIONS D'ENTRÉE --- */
@keyframes slideInUp {
    from {
        opacity: 0;
        transform: translateY(40px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.roi-dashboard-card {
    animation: slideInUp 0.6s ease;
}

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

/* --- RESPONSIVE ROI AMÉLIORÉ --- */
@media (max-width: 1400px) {
    .roi-content-wrapper {
        grid-template-columns: 1fr 350px; /* Sidebar plus étroite sur écrans moyens */
        gap: 32px;
    }
}

@media (max-width: 1200px) {
    .roi-content-wrapper {
        grid-template-columns: 1fr; /* Une seule colonne sur petits écrans */
    }
    
    .roi-sidebar {
        position: static; /* Plus de sticky sur mobile */
        max-height: none;
        margin-top: 40px;
    }
    
    .config-summary-content {
        flex-direction: column;
        align-items: flex-start;
    }
    
    .config-info {
        width: 100%;
    }
}

@media (max-width: 768px) {
    .config-summary-bar {
        position: relative; /* Désactiver sticky sur mobile */
        top: 0;
    }
    
    .roi-progress-container {
        position: relative;
        top: 0;
    }
}

/* =============================================
   TABLETTE — iPad Air (769 px – 1200 px)
   Corrige l'affichage de la partie ROI sur iPad
   ============================================= */
@media (min-width: 769px) and (max-width: 1200px) {
    /* Supprimer le double-scroll : laisser la page défiler naturellement */
    .roi-step-content {
        max-height: none;
        overflow-y: visible;
        padding: 32px;
    }

    /* Barre de config en ligne sur iPad paysage */
    .config-summary-content {
        flex-direction: row;
        flex-wrap: wrap;
        align-items: center;
    }

    .config-info {
        width: auto;
        min-width: 180px;
    }

    /* Grille de formulaire : 2 colonnes sur tablette */
    .form-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    /* Sélecteur d'équipes : 3 colonnes conservées */
    .shift-selector {
        grid-template-columns: repeat(3, 1fr);
    }

    /* Dashboard résultats : 3 colonnes max */
    .roi-dashboard-grid {
        grid-template-columns: repeat(3, 1fr);
    }

    /* Action bar : wrappable mais pas empilée */
    .action-bar {
        flex-wrap: wrap;
        gap: 16px;
    }

    /* Sidebar sous le contenu, pleine largeur */
    .roi-sidebar {
        max-width: 100%;
        margin-top: 32px;
    }
}

/* --- FLOATING SIDEBAR ON LARGE SCREENS --- */
@media (min-width: 1200px) {
    .roi-sidebar {
        /* make the recap panel float relative to the viewport */
        position: fixed !important;
        top: 220px;
        right: 32px;
        width: 360px;
        max-height: calc(100vh - 240px);
        overflow-y: auto;
        z-index: 990; /* below sticky headers (999/998) or adjusted */
    }

    /* reserve space on the right so main content doesn't sit under the fixed sidebar */
    .roi-content-wrapper {
        /* USE SINGLE CCOLUMN so content expands into the space left by the fixed sidebar (minus padding) */
        grid-template-columns: 100% !important; 
        display: block !important;
        /* reserve space for the fixed sidebar to avoid overlap using margin instead of padding to shift layout context */
        margin-right: 420px !important; 
        margin-left: 32px !important;
        width: auto !important;
        max-width: none !important;
        padding-right: 0 !important;
    }

    /* Also reserve space for the footer action button if it's outside the wrapper */
    .roi-footer-actions {
        margin-right: 420px !important;
        padding-right: 0 !important;
    }
}

/* --- BOUTONS D'ACTION AMÉLIORÉS --- */
.action-bar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: 48px;
    padding-top: 32px;
    border-top: 3px solid #e2e8f0;
}

.btn {
    padding: 16px 36px;
    border-radius: 12px;
    font-size: 16px;
    font-weight: 700;
    cursor: pointer;
    border: none;
    transition: var(--transition);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

.btn:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.15);
}

.btn-primary {
    background: linear-gradient(135deg, var(--keyence-red) 0%, #ff6b6b 100%);
    color: white;
}

.btn-primary:hover:not(:disabled) {
    background: linear-gradient(135deg, #c4000f 0%, var(--keyence-red) 100%);
}

.btn-primary:disabled {
    opacity: 0.5;
    cursor: not-allowed;
    transform: none;
}

.btn-outline {
    background: white;
    color: var(--keyence-red);
    border: 2px solid var(--keyence-red);
}

.btn-outline:hover {
    background: var(--keyence-red);
    color: white;
}

/* --- RESPONSIVE AMÉLIORÉ --- */
@media (max-width: 1200px) {
    .roi-content-wrapper {
        grid-template-columns: 1fr;
    }
    
    .roi-sidebar {
        position: static;
        margin-top: 40px;
    }
    
    .roi-dashboard-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 768px) {
    .roi-dashboard-grid {
        grid-template-columns: 1fr;
    }
    
    .dashboard-value {
        font-size: 36px;
    }
    
    .chart-container-roi {
        padding: 24px;
        height: 350px;
    }
    
    .gain-item {
        flex-direction: column;
        text-align: center;
    }

    .roi-footer-actions {
        margin: 24px 16px 40px;
        text-align: center;
    }
}
/* ========================================
   LOGOS RESPONSIVE
   ======================================== */

/* Logo complet (desktop) */
.logo-full {
    display: block;
    height: 40px;
    width: auto;
}

/* Logo compact (mobile) */
.logo-compact {
    display: none;
    height: 36px;
    width: auto;
}

/* Sur mobile : afficher K seulement */
@media (max-width: 768px) {
    .logo-full {
        display: none;
    }
    
    .logo-compact {
        display: block;
    }
    
    .header-container {
        height: 70px;
        padding: 0 16px;
    }
    
    .main-nav {
        gap: 4px;
    }
    
    .nav-link {
        padding: 10px 12px;
        font-size: 13px;
    }
}

@media (max-width: 480px) {
    /* Encore plus compact sur très petits écrans */
    .nav-link {
        padding: 8px;
        font-size: 0; /* Cache le texte */
    }
    
    .nav-link::before {
        font-size: 24px; /* Affiche que les icônes */
    }
}
/* ========================================
   SUPPRIMER LES FLÈCHES DES INPUTS NUMBER
   ======================================== */

/* Chrome, Safari, Edge, Opera */
input[type="number"]::-webkit-outer-spin-button,
input[type="number"]::-webkit-inner-spin-button {
    -webkit-appearance: none;
    margin: 0;
}

/* Firefox */
input[type="number"] {
    -moz-appearance: textfield;
    appearance: textfield;
}
/* ========================================
   SECTION AVANTAGES KEYENCE
   ======================================== */
.advantages-section {
    padding: 120px 0;
    background: linear-gradient(135deg, #f0fdf4 0%, #dcfce7 100%);
}

.advantages-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
    gap: 40px;
}

.advantage-card {
    background: white;
    padding: 48px 32px;
    border-radius: 20px;
    border: 3px solid #10b981;
    position: relative;
    transition: var(--transition);
}

.advantage-card:hover {
    transform: translateY(-12px);
    box-shadow: var(--shadow-lg);
}

.advantage-card.highlight {
    background: linear-gradient(135deg, #fff5f5 0%, white 100%);
    border-color: var(--keyence-red);
}

.advantage-badge {
    position: absolute;
    top: 20px;
    right: 20px;
    background: var(--keyence-red);
    color: white;
    padding: 8px 16px;
    border-radius: 20px;
    font-size: 13px;
    font-weight: 700;
}

.advantage-icon {
    font-size: 64px;
    margin-bottom: 24px;
}

.advantage-title {
    font-size: 28px;
    font-weight: 800;
    color: var(--keyence-dark);
    margin-bottom: 16px;
}

.advantage-description {
    font-size: 16px;
    color: var(--keyence-gray);
    line-height: 1.6;
    margin-bottom: 24px;
}

.advantage-description strong {
    color: #10b981;
}

.advantage-card.highlight .advantage-description strong {
    color: var(--keyence-red);
}

.advantage-list {
    list-style: none;
    padding: 0;
    margin: 0;
}

.advantage-list li {
    font-size: 15px;
    color: var(--keyence-dark);
    padding: 8px 0;
    font-weight: 600;
}
/* ========================================
   VIDÉOS FONCTIONNALITÉS IM-X
   ======================================== */
.features-videos-section {
    padding: 120px 0;
    background: linear-gradient(135deg, #f8fafc 0%, #e2e8f0 100%);
}

.videos-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
    gap: 32px;
}

.video-card {
    background: white;
    border-radius: 16px;
    overflow: hidden;
    box-shadow: var(--shadow-sm);
    transition: var(--transition);
    cursor: pointer;
    border: 2px solid transparent;
}

.video-card:hover {
    transform: translateY(-8px);
    box-shadow: var(--shadow-lg);
    border-color: var(--keyence-red);
}

.video-thumb {
    position: relative;
    width: 100%;
    height: 180px;
    background: #1a1a1a;
    overflow: hidden;
}

.video-thumb img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: var(--transition);
}

.video-card:hover .video-thumb img {
    transform: scale(1.1);
}

.play-overlay-small {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 60px;
    height: 60px;
    background: rgba(230, 0, 18, 0.9);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: var(--transition);
}

.video-card:hover .play-overlay-small {
    transform: translate(-50%, -50%) scale(1.2);
}

.play-overlay-small .play-icon {
    color: white;
    font-size: 24px;
    margin-left: 4px;
}

.video-info {
    padding: 24px;
}

.video-icon {
    font-size: 32px;
    display: block;
    margin-bottom: 12px;
}

.video-info h4 {
    font-size: 18px;
    font-weight: 700;
    color: var(--keyence-dark);
    margin-bottom: 12px;
}

.video-info p {
    font-size: 14px;
    color: var(--keyence-gray);
    line-height: 1.6;
}

/* ========================================
   STAGE UNITS CLIQUABLES
   ======================================== */
.system-item-link {
    text-decoration: none;
    color: inherit;
    position: relative;
}

.system-item-link.recommended {
    border: 3px solid #10b981;
    background: linear-gradient(135deg, #f0fdf4 0%, white 100%);
}

.item-badge {
    display: inline-block;
    margin-top: 8px;
    padding: 6px 16px;
    background: var(--keyence-red);
    color: white;
    border-radius: 20px;
    font-size: 12px;
    font-weight: 700;
}

.item-badge-top {
    position: absolute;
    top: 12px;
    right: 12px;
    padding: 6px 12px;
    background: #10b981;
    color: white;
    border-radius: 20px;
    font-size: 11px;
    font-weight: 700;
}

/* ========================================
   ZONES DE MESURE - AMÉLIORÉES
   ======================================== */
.zones-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(380px, 1fr));
    gap: 32px;
}

.zone-card .info {
    color: #3b82f6;
    font-weight: 600;
    font-size: 14px;
    margin-top: 8px;
}

/* ========================================
   TECHNOLOGIES - LISTES
   ======================================== */
.tech-features {
    list-style: none;
    padding: 0;
    margin: 0 0 24px 0;
    font-size: 15px;
    line-height: 2;
}

.tech-features li {
    color: var(--keyence-gray);
    padding-left: 8px;
}

/* ========================================
   RESPONSIVE
   ======================================== */
@media (max-width: 768px) {
    .videos-grid {
        grid-template-columns: 1fr;
    }
    
    .zones-grid {
        grid-template-columns: 1fr;
    }
}
/* --- CORRECTION MINIATURES VIDÉO --- */
.video-thumb-simple {
    position: relative;
    width: 100%;
    height: 200px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    border-radius: 12px;
    cursor: pointer;
    transition: all 0.3s ease;
}

.video-thumb-simple:hover {
    transform: scale(1.05);
    box-shadow: 0 10px 30px rgba(102, 126, 234, 0.3);
}

.play-overlay-center {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
}

.play-icon-large {
    color: var(--keyence-red); /* Triangle rouge Keyence */
    font-size: 24px;
    margin: 0;
    filter: none;
}

/* Ajoute "Voir la vidéo" après l'icône play */
.play-overlay::after {
    content: 'Voir la vidéo';
    font-size: 16px;
    font-weight: 700;
    color: #1a1a1a;
    letter-spacing: 0.5px;
}

/* --- CTA SIMPLE --- */
.cta-section-simple {
    padding: 60px 0;
    background: linear-gradient(135deg, #f5f7fa 0%, #c3cfe2 100%);
}

.btn-cta-single {
    display: inline-block;
    padding: 20px 40px;
    background: #e60012;
    color: white;
    font-size: 20px;
    font-weight: bold;
    text-decoration: none;
    border-radius: 50px;
    box-shadow: 0 10px 30px rgba(230, 0, 18, 0.3);
    transition: all 0.3s ease;
}

.btn-cta-single:hover {
    transform: translateY(-5px);
    box-shadow: 0 15px 40px rgba(230, 0, 18, 0.4);
}
/* --- PLACEHOLDER POUR IMAGES MANQUANTES --- */
.no-image-placeholder {
    width: 100%;
    height: 300px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, #f5f7fa 0%, #c3cfe2 100%);
    border-radius: 12px;
    font-size: 48px;
    color: #666;
    text-align: center;
}

.no-image-placeholder br + * {
    font-size: 16px;
    margin-top: 10px;
}
/* ========================================
   GRILLE DES BÉNÉFICES (4 colonnes)
   ======================================== */
.benefits-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 15px;
    margin: 25px 0;
}

.benefit-card {
    background: linear-gradient(135deg, #fff5f5 0%, #ffffff 100%);
    padding: 20px;
    border-radius: 10px;
    text-align: center;
    border: 2px solid #ffebee;
    transition: all 0.3s;
}

.benefit-icon {
    font-size: 2.5rem;
    margin-bottom: 10px;
}

.benefit-label {
    font-size: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 1px;
    color: #E60012;
    font-weight: 600;
    margin-bottom: 5px;
}

.benefit-value {
    font-size: 1rem;
    font-weight: 700;
    color: #2c3e50;
}

/* ========================================
   HARDWARE GRID (Platine + Tête côte à côte)
   ======================================== */
.hardware-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 25px;
    margin: 30px 0;
    page-break-inside: avoid;
}

.hardware-card {
    background: white;
    border: 2px solid #e2e8f0;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 2px 10px rgba(0,0,0,0.06);
}

.hardware-image {
    background: #f8f9fa;
    height: 250px;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
    border-bottom: 2px solid #e2e8f0;
}

.hardware-image img {
    max-width: 100%;
    max-height: 100%;
    object-fit: contain;
}

.hardware-image .no-image {
    font-size: 4rem;
    color: #cbd5e1;
}

.hardware-info {
    padding: 20px;
}

.hardware-badge {
    display: inline-block;
    background: #E60012;
    color: white;
    padding: 4px 12px;
    border-radius: 4px;
    font-size: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    font-weight: 600;
    margin-bottom: 10px;
}

.hardware-name {
    font-size: 1.3rem;
    font-weight: 700;
    color: #1a1a1a;
    margin-bottom: 15px;
}

.hardware-specs {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.spec-item {
    display: flex;
    justify-content: space-between;
    padding: 8px 0;
    border-bottom: 1px solid #f1f5f9;
    font-size: 0.9rem;
}

.spec-item:last-child {
    border-bottom: none;
}

.spec-label {
    color: #64748b;
    font-weight: 500;
}

.spec-value {
    color: #1a1a1a;
    font-weight: 600;
    text-align: right;
}

/* ========================================
   FONCTIONNALITÉS OPTIONNELLES
   ======================================== */
.features-section {
    margin-top: 30px;
    padding-top: 30px;
    border-top: 2px solid #e2e8f0;
}

.features-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 20px;
    margin-top: 20px;
}

.feature-detail-card {
    background: linear-gradient(135deg, #fff5f5 0%, #ffffff 100%);
    border: 2px solid #ffcdd2;
    border-radius: 12px;
    padding: 25px;
    page-break-inside: avoid;
}

.feature-icon-large {
    font-size: 3rem;
    margin-bottom: 15px;
}

.feature-detail-card h4 {
    font-size: 1.2rem;
    color: #E60012;
    margin-bottom: 15px;
    font-weight: 700;
}

.feature-bullets {
    list-style: none;
    padding: 0;
    margin: 15px 0;
}

.feature-bullets li {
    padding: 8px 0;
    padding-left: 25px;
    position: relative;
    font-size: 0.95rem;
    line-height: 1.5;
    color: #475569;
}

.feature-bullets li:before {
    content: "✓";
    position: absolute;
    left: 0;
    color: #E60012;
    font-weight: bold;
    font-size: 1.1rem;
}

.feature-images-small {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 10px;
    margin-top: 15px;
}

.feature-images-small img {
    width: 100%;
    height: 120px;
    object-fit: contain;
    border-radius: 8px;
    background: white;
    padding: 10px;
    border: 1px solid #e2e8f0;
}

/* ========================================
   RESPONSIVE (pour impression)
   ======================================== */
@media print {
    .hardware-grid {
        page-break-inside: avoid;
        break-inside: avoid;
    }
    
    .hardware-card {
        page-break-inside: avoid;
        break-inside: avoid;
    }
    
    .features-grid {
        page-break-inside: avoid;
        break-inside: avoid;
    }
    
    .feature-detail-card {
        page-break-inside: avoid;
        break-inside: avoid;
    }
    
    /* Si la grille ne tient pas, passer en 1 colonne */
    @page {
        size: A4 portrait;
    }
}

/* Version 1 colonne si nécessaire (pour petites pages) */
@media print and (max-width: 700px) {
    .hardware-grid,
    .features-grid {
        grid-template-columns: 1fr;
    }
}
/* Essais - VERSION AMÉLIORÉE */
.essai-block { 
    background: white; 
    border: 2px solid #e0e0e0; 
    border-radius: 12px; 
    padding: 32px; 
    margin: 24px 0; 
    box-shadow: 0 4px 16px rgba(0,0,0,0.08); 
}

.essai-title { 
    font-size: 1.4rem; 
    font-weight: 700; 
    color: #E60012; 
    margin-bottom: 16px; 
    padding-bottom: 12px;
    border-bottom: 2px solid #ffebee;
}

.essai-images-rapport { 
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(350px, 1fr)); /* ✅ 350px minimum */
    gap: 24px; 
    margin-top: 20px; 
}

.essai-image-rapport { 
    position: relative;
    background: #f8f9fa;
    border-radius: 12px;
    overflow: hidden;
    border: 2px solid #e2e8f0;
    box-shadow: 0 2px 8px rgba(0,0,0,0.06);
}

.image-number {
    position: absolute;
    top: 12px;
    left: 12px;
    background: #E60012;
    color: white;
    padding: 6px 12px;
    border-radius: 6px;
    font-size: 0.75rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    z-index: 10;
    box-shadow: 0 2px 8px rgba(230, 0, 18, 0.3);
}

.essai-image-rapport img { 
    width: 100%; 
    height: 400px; /* ✅ 400px de hauteur */
    object-fit: contain; /* ✅ Contenir toute l'image */
    background: white;
    padding: 16px; /* ✅ Padding autour de l'image */
}

.image-caption { 
    font-size: 0.95rem; /* ✅ Plus gros */
    color: #1a1a1a; /* ✅ Plus foncé */
    font-style: italic; 
    padding: 16px; /* ✅ Plus de padding */
    background: #f8fafc;
    border-top: 2px solid #e2e8f0;
    line-height: 1.5;
}

/* Version print */
@media print {
    .essai-image-rapport img {
        height: auto;
        max-height: 500px;
    }
}
@media (max-width: 768px) {
    .images-grid {
        grid-template-columns: 1fr; /* Une seule colonne sur mobile */
    }
    
    .essai-images-rapport {
        grid-template-columns: 1fr;
    }
    
    .image-preview {
        height: 220px; /* Moins haut sur mobile */
    }
}
/* ========================================
   PAGE SERVICE KEYENCE - VERSION SIMPLE
   ======================================== */

/* --- HERO SERVICE --- */
.hero-service {
    position: relative;
    min-height: 70vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding-top: 80px;
    background: linear-gradient(135deg, #f0fdf4 0%, #dcfce7 100%);
}

/* --- SECTION SERVICES --- */
.services-section {
    padding: 120px 0;
    background: var(--white);
}

.services-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 40px;
    margin-top: 60px;
}

.service-card {
    background: white;
    border: 3px solid #e2e8f0;
    border-radius: 20px;
    padding: 48px 32px;
    text-align: center;
    transition: all 0.4s ease;
}

.service-card:hover {
    transform: translateY(-12px);
    box-shadow: 0 12px 40px rgba(0, 0, 0, 0.15);
    border-color: var(--keyence-red);
}

.service-icon {
    font-size: 80px;
    margin-bottom: 24px;
    filter: drop-shadow(0 4px 8px rgba(0, 0, 0, 0.1));
}

.service-card h3 {
    font-size: 22px;
    font-weight: 800;
    color: var(--keyence-dark);
    margin-bottom: 16px;
    line-height: 1.3;
}

.service-time {
    font-size: 16px;
    color: var(--keyence-gray);
    margin-bottom: 12px;
    font-weight: 600;
}

.service-detail {
    font-size: 15px;
    color: var(--keyence-gray);
    line-height: 1.5;
}

.service-detail strong {
    color: var(--keyence-red);
    font-weight: 700;
}

/* --- RESPONSIVE --- */
@media (max-width: 1024px) {
    .services-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 32px;
    }
}

@media (max-width: 640px) {
    .services-grid {
        grid-template-columns: 1fr;
        gap: 24px;
    }
    
    .service-card {
        padding: 36px 24px;
    }
    
    .service-icon {
        font-size: 64px;
    }
    
    .service-card h3 {
        font-size: 20px;
    }
}
/* ========================================
   PLATEFORME VIDÉO - CARTE SERVICE
   ======================================== */

.video-platform-info {
    margin-top: 24px;
    padding-top: 24px;
    border-top: 2px dashed #e2e8f0;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 12px;
}

.video-icon {
    font-size: 40px;
    margin-bottom: 8px;
}

.video-text {
    font-size: 14px;
    color: var(--keyence-gray);
    text-align: center;
    line-height: 1.5;
    margin: 0;
}

.video-text strong {
    color: var(--keyence-dark);
    font-size: 15px;
}

.btn-video-demo {
    display: inline-block;
    padding: 10px 20px;
    background: linear-gradient(135deg, var(--keyence-red) 0%, #ff3333 100%);
    color: white;
    text-decoration: none;
    border-radius: 8px;
    font-size: 13px;
    font-weight: 700;
    transition: all 0.3s ease;
    margin-top: 8px;
}

.btn-video-demo:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(230, 0, 18, 0.3);
}
/* ========================================
   MODALE VIDÉO - POPUP
   ======================================== */

.video-modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.95);
    z-index: 10000;
    align-items: center;
    justify-content: center;
    backdrop-filter: blur(8px);
    animation: fadeIn 0.3s ease;
}

.video-modal.active {
    display: flex;
}

.video-modal-content {
    position: relative;
    width: 90%;
    max-width: 1200px;
    background: #000;
    border-radius: 16px;
    overflow: hidden;
    box-shadow: 0 8px 40px rgba(0, 0, 0, 0.5);
    animation: slideUp 0.4s ease;
}

.video-modal-content video {
    width: 100%;
    height: auto;
    display: block;
}

.video-modal-close {
    position: absolute;
    top: -50px;
    right: 0;
    width: 48px;
    height: 48px;
    background: var(--keyence-red);
    color: white;
    border: none;
    border-radius: 50%;
    font-size: 32px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
    z-index: 10;
    font-weight: 300;
    line-height: 1;
}

.video-modal-close:hover {
    transform: scale(1.15) rotate(90deg);
    background: #c4000f;
}

@keyframes fadeIn {
    from {
        opacity: 0;
    }
    to {
        opacity: 1;
    }
}

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

/* Responsive */
@media (max-width: 768px) {
    .video-modal-content {
        width: 95%;
    }
    
    .video-modal-close {
        top: -60px;
        right: 10px;
    }
}
/* ========================================
   SECTION ROTATIVE CLIQUABLE
   ======================================== */

.rotary-clickable {
    cursor: pointer;
    position: relative;
    transition: all 0.4s ease;
}

.rotary-clickable:hover {
    transform: scale(1.03);
    box-shadow: 0 12px 40px rgba(230, 0, 18, 0.4);
}

/* Indicateur "Cliquez pour voir la vidéo" */
.click-hint {
    position: absolute;
    top: 20px;
    right: 20px;
    background: rgba(230, 0, 18, 0.95);
    color: white;
    padding: 8px 16px;
    border-radius: 20px;
    font-size: 13px;
    font-weight: 700;
    opacity: 0;
    transition: all 0.3s ease;
    pointer-events: none;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
}

.rotary-clickable:hover .click-hint {
    opacity: 1;
    transform: translateY(-5px);
}

/* Animation subtile au survol */
.rotary-clickable::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    border: 3px solid var(--keyence-red);
    border-radius: 20px;
    opacity: 0;
    transition: opacity 0.3s ease;
    pointer-events: none;
}

.rotary-clickable:hover::after {
    opacity: 1;
}

/* ========================================
   SECTION ÉCLAIRAGE IM-X
   ======================================== */
.lighting-section {
    padding: 120px 0;
    background: linear-gradient(135deg, #fef3c7 0%, #fef9c3 100%);
}

.lighting-content {
    display: grid;
    grid-template-columns: 1fr 1.2fr;
    gap: 48px;
    margin-top: 48px;
    align-items: start;
}

.lighting-image-main {
    position: sticky;
    top: 120px;
}

.lighting-image-main img {
    width: 100%;
    border-radius: 16px;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.15);
    transition: transform 0.3s ease;
}

.lighting-image-main img:hover {
    transform: scale(1.02);
}

.lighting-description {
    display: flex;
    flex-direction: column;
    gap: 32px;
}

.lighting-intro {
    background: white;
    padding: 24px;
    border-radius: 12px;
    border-left: 4px solid #f59e0b;
}

.lighting-intro p {
    font-size: 16px;
    line-height: 1.7;
    color: var(--keyence-dark);
    margin-bottom: 12px;
}

.lighting-intro p:last-child {
    margin-bottom: 0;
}

.lighting-intro strong {
    color: #f59e0b;
}

/* Types d'éclairage - Grille 2x2 */
.lighting-types-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 16px;
}

.lighting-type-card {
    background: white;
    padding: 20px;
    border-radius: 12px;
    border: 2px solid #fbbf24;
    text-align: center;
    transition: all 0.3s ease;
}

.lighting-type-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 8px 24px rgba(251, 191, 36, 0.3);
}

.lighting-type-card.highlight {
    background: linear-gradient(135deg, #fff7ed 0%, white 100%);
    border-color: #f59e0b;
    box-shadow: 0 4px 16px rgba(245, 158, 11, 0.2);
}

.lighting-type-icon {
    font-size: 32px;
    margin-bottom: 8px;
}

.lighting-type-card h4 {
    font-size: 16px;
    font-weight: 700;
    color: var(--keyence-dark);
    margin-bottom: 8px;
}

.lighting-type-card p {
    font-size: 13px;
    color: #64748b;
    margin: 0;
}

/* Avantages */
.lighting-advantages {
    background: white;
    padding: 24px;
    border-radius: 12px;
    border: 2px solid #fbbf24;
}

.lighting-advantages h4 {
    font-size: 18px;
    font-weight: 700;
    color: #f59e0b;
    margin-bottom: 16px;
}

.lighting-advantages ul {
    list-style: none;
    padding: 0;
    margin: 0;
}

.lighting-advantages li {
    font-size: 15px;
    line-height: 2;
    color: var(--keyence-dark);
}

.lighting-advantages strong {
    color: #f59e0b;
}

/* Responsive */
@media (max-width: 1024px) {
    .lighting-content {
        grid-template-columns: 1fr;
        gap: 32px;
    }
    
    .lighting-image-main {
        position: static;
    }
}

@media (max-width: 640px) {
    .lighting-types-grid {
        grid-template-columns: 1fr;
    }
}
/* ========================================
   CONCEPT SECTION - VERSION SIMPLIFIÉE
   ======================================== */
.concept-section {
    padding: 80px 0;
    background: linear-gradient(135deg, #f5f7fa 0%, #e9ecef 100%);
}

.concept-story {
    max-width: 1200px;
    margin: 0 auto;
}

/* Intro narrative */
.story-intro {
    text-align: center;
    margin-bottom: 60px;
    padding: 32px;
    background: white;
    border-radius: 16px;
    box-shadow: 0 4px 20px rgba(0,0,0,0.08);
}

.story-lead {
    font-size: 1.25rem;
    line-height: 1.8;
    color: #2c3e50;
    font-weight: 500;
    margin-bottom: 20px;
}

.story-lead:last-child {
    margin-bottom: 0;
}

.story-lead strong {
    color: #e63946;
}

.story-lead em {
    font-style: italic;
    color: #1d3557;
    font-size: 1.35rem;
}

/* ========================================
   LES 2 IMAGES CÔTE À CÔTE - VERSION 3+1
   ======================================== */
.dual-problem-section {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 40px;
    margin: 60px 0;
}

.problem-image-block {
    background: white;
    padding: 32px 24px;
    border-radius: 16px;
    box-shadow: 0 4px 20px rgba(0,0,0,0.1);
    transition: all 0.3s ease;
}

.problem-image-block:hover {
    transform: translateY(-8px);
    box-shadow: 0 8px 32px rgba(0,0,0,0.15);
}

.problem-image-block.traditional {
    border: 3px solid #e63946; /* Rouge pour problèmes tradi */
}

.problem-image-block.competitor {
    border: 3px solid #f97316; /* Orange pour concurrent */
}

.problem-image-block h4 {
    font-size: 1.3rem;
    font-weight: 800;
    color: #1a1a1a;
    margin-bottom: 24px;
    text-align: center;
}

/* Grille 3 outils traditionnels */
.traditional-tools-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 20px;
    margin-bottom: 24px;
}

.tool-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 12px;
}

.tool-item img {
    width: 100%;
    height: 120px;
    object-fit: contain;
    padding: 12px;
    background: #f8f9fa;
    border-radius: 10px;
    transition: transform 0.3s ease;
}

.tool-item img:hover {
    transform: scale(1.1);
}

.tool-name {
    font-size: 0.85rem;
    font-weight: 600;
    color: #475569;
    text-align: center;
    margin: 0;
}

/* Image concurrent (VMM) */
.competitor-image {
    display: flex;
    justify-content: center;
    align-items: center;
    margin-bottom: 24px;
    min-height: 200px;
}

.competitor-image img {
    width: 100%;
    max-width: 350px;
    height: auto;
    border-radius: 12px;
    transition: transform 0.3s ease;
}

.competitor-image img:hover {
    transform: scale(1.05);
}

/* Légendes */
.block-caption {
    font-size: 0.95rem;
    line-height: 1.6;
    color: #374151;
    text-align: center;
    font-weight: 500;
    padding-top: 16px;
    border-top: 2px solid #f1f5f9;
}

.block-caption strong {
    color: #1a1a1a;
    display: block;
    margin-bottom: 6px;
    font-size: 1rem;
}

/* ========================================
   RESPONSIVE
   ======================================== */
@media (max-width: 1024px) {
    .dual-problem-section {
        grid-template-columns: 1fr;
        gap: 32px;
    }
    
    .traditional-tools-grid {
        grid-template-columns: repeat(3, 1fr);
    }
}

@media (max-width: 640px) {
    .traditional-tools-grid {
        grid-template-columns: 1fr;
    }
    
    .tool-item img {
        height: 100px;
    }
    
    .competitor-image {
        min-height: 150px;
    }
}

/* La solution KEYENCE */
.solution-keyence {
    margin: 60px 0 0 0;
    padding: 40px;
    background: linear-gradient(135deg, #e63946 0%, #d62839 100%);
    border-radius: 16px;
    color: white;
}

.solution-keyence h3 {
    font-size: 1.75rem;
    margin-bottom: 20px;
    text-align: center;
}

.solution-text {
    font-size: 1.15rem;
    line-height: 1.8;
    text-align: center;
    margin-bottom: 40px;
}

.solution-features {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 24px;
}

.feature-item {
    display: flex;
    align-items: flex-start;
    gap: 16px;
    padding: 20px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 12px;
    backdrop-filter: blur(10px);
}

.feature-icon {
    font-size: 2rem;
    flex-shrink: 0;
}

.feature-content h4 {
    font-size: 1.1rem;
    margin-bottom: 8px;
}

.feature-content p {
    font-size: 0.95rem;
    opacity: 0.9;
    line-height: 1.6;
}

/* ========================================
   RESPONSIVE
   ======================================== */
@media (max-width: 1024px) {
    .dual-problem-section {
        grid-template-columns: 1fr;
        gap: 32px;
    }
}

@media (max-width: 768px) {
    .concept-section {
        padding: 60px 0;
    }
    
    .story-lead {
        font-size: 1.1rem;
    }
    
    .story-lead em {
        font-size: 1.2rem;
    }
    
    .solution-features {
        grid-template-columns: 1fr;
    }
}
/* ========================================
   CONSTRUCTION ET INNOVATION
   ======================================== */
.construction-section {
    padding: 120px 0;
    background: linear-gradient(135deg, #dbeafe 0%, #bfdbfe 100%);
}

.construction-content {
    display: grid;
    grid-template-columns: 1fr 1.2fr;
    gap: 48px;
    margin-top: 60px;
    align-items: start;
}

/* Image principale */
.construction-image {
    position: sticky;
    top: 120px;
}

.construction-image img {
    width: 100%;
    border-radius: 20px;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.15);
    transition: transform 0.3s ease;
    border: 4px solid white;
}

.construction-image img:hover {
    transform: scale(1.03);
    box-shadow: 0 12px 40px rgba(0, 0, 0, 0.25);
}

/* Détails techniques */
.construction-details {
    display: flex;
    flex-direction: column;
    gap: 24px;
}

.tech-detail-card {
    background: white;
    padding: 32px;
    border-radius: 16px;
    border: 2px solid #93c5fd;
    transition: all 0.3s ease;
}

.tech-detail-card:hover {
    transform: translateX(8px);
    box-shadow: 0 8px 24px rgba(59, 130, 246, 0.2);
    border-color: #3b82f6;
}

.tech-detail-card.highlight {
    background: linear-gradient(135deg, #fff7ed 0%, white 100%);
    border-color: #f59e0b;
    box-shadow: 0 4px 16px rgba(245, 158, 11, 0.15);
}

.tech-detail-icon {
    font-size: 48px;
    margin-bottom: 16px;
    display: block;
}

.tech-detail-card h3 {
    font-size: 22px;
    font-weight: 800;
    color: var(--keyence-dark);
    margin-bottom: 16px;
}

.tech-detail-card p {
    font-size: 15px;
    line-height: 1.7;
    color: #475569;
    margin-bottom: 12px;
}

.tech-detail-card p:last-child {
    margin-bottom: 0;
}

.tech-detail-card strong {
    color: #1e40af;
    font-weight: 700;
}

.tech-detail-card.highlight strong {
    color: #f59e0b;
}

.tech-highlight {
    background: linear-gradient(135deg, #f0f9ff 0%, #e0f2fe 100%);
    padding: 16px 20px;
    border-radius: 10px;
    border-left: 4px solid #3b82f6;
    font-weight: 600;
    font-size: 14px !important;
}

.tech-detail-card.highlight .tech-highlight {
    background: linear-gradient(135deg, #fffbeb 0%, #fef3c7 100%);
    border-left-color: #f59e0b;
}

/* Responsive */
@media (max-width: 1024px) {
    .construction-content {
        grid-template-columns: 1fr;
        gap: 40px;
    }
    
    .construction-image {
        position: static;
    }
}

@media (max-width: 768px) {
    .construction-section {
        padding: 80px 0;
    }
    
    .tech-detail-card {
        padding: 24px;
    }
    
    .tech-detail-icon {
        font-size: 40px;
    }
    
    .tech-detail-card h3 {
        font-size: 18px;
    }
}
/* ========================================
   TECHNOLOGIES - BLOCS ENRICHIS
   ======================================== */

/* Bloc "Pourquoi cette techno ?" */
.tech-why-box {
    background: linear-gradient(135deg, #fff7ed 0%, #ffedd5 100%);
    border: 2px solid #fb923c;
    border-radius: 12px;
    padding: 20px 24px;
    margin: 24px 0;
}

.tech-why-box h4 {
    font-size: 18px;
    font-weight: 800;
    color: #ea580c;
    margin-bottom: 12px;
}

.tech-why-box p {
    font-size: 15px;
    line-height: 1.7;
    color: #1a1a1a;
    margin: 0;
}

.tech-why-box strong {
    color: #ea580c;
}

/* Bloc "VS traditionnel" */
.tech-vs-box {
    background: linear-gradient(135deg, #f0fdf4 0%, #dcfce7 100%);
    border: 2px solid #4ade80;
    border-radius: 12px;
    padding: 20px 24px;
    margin: 24px 0;
}

.tech-vs-box h4 {
    font-size: 18px;
    font-weight: 800;
    color: #16a34a;
    margin-bottom: 16px;
}

.tech-vs-list {
    list-style: none;
    padding: 0;
    margin: 0;
    font-size: 15px;
}

.tech-vs-list li {
    padding: 10px 0;
    padding-left: 28px;
    position: relative;
    line-height: 1.6;
    color: #1a1a1a;
}

.tech-vs-list li::before {
    content: '✅';
    position: absolute;
    left: 0;
    font-size: 18px;
}

.tech-vs-list strong {
    color: #16a34a;
    font-weight: 700;
}

/* Images exemples cliquables */
.tech-examples img {
    cursor: pointer;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.tech-examples img:hover {
    transform: scale(1.05);
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.2);
}

/* Responsive */
@media (max-width: 768px) {
    .tech-why-box,
    .tech-vs-box {
        padding: 16px 20px;
    }
    
    .tech-why-box h4,
    .tech-vs-box h4 {
        font-size: 16px;
    }
    
    .tech-why-box p,
    .tech-vs-list li {
        font-size: 14px;
    }
}
/* Note complémentaire (plus discrète que highlight) */
.tech-note {
    background: #f8fafc;
    padding: 12px 16px;
    border-radius: 8px;
    border-left: 3px solid #64748b;
    font-size: 13px !important;
    line-height: 1.6;
    color: #475569;
    margin-top: 12px;
}

.tech-note strong {
    color: #1e293b;
    font-weight: 700;
}


.fiscal-info-box {
    background: #eff6ff;
    border-left: 4px solid #3b82f6;
    padding: 15px;
    border-radius: 8px;
    margin-top: 20px;
    font-size: 0.9rem;
    color: #1e40af;
    line-height: 1.6;
}

.fiscal-info-box strong {
    display: block;
    margin-bottom: 8px;
    font-size: 1rem;
    color: #1e40af;
}
/* Carte offline améliorée */
.offline-card {
    background: white;
    padding: 24px;
    border-radius: 16px;
    box-shadow: 0 2px 12px rgba(0, 0, 0, 0.08);
}

.offline-status {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 16px;
    background: #f8fafc;
    border-radius: 12px;
    margin-bottom: 16px;
}

.status-icon {
    font-size: 2rem;
}

.status-text {
    flex: 1;
}

.status-label {
    font-size: 0.75rem;
    font-weight: 600;
    color: #64748b;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-bottom: 4px;
}

.status-value {
    font-size: 0.875rem;
    font-weight: 700;
    color: #1a1a1a;
}

.btn-download-offline {
    width: 100%;
    padding: 14px 20px;
    background: linear-gradient(135deg, #10b981 0%, #059669 100%);
    color: white;
    border: none;
    border-radius: 10px;
    font-size: 1rem;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 4px 12px rgba(16, 185, 129, 0.3);
}

.btn-download-offline:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 16px rgba(16, 185, 129, 0.4);
}

.btn-download-offline:disabled {
    opacity: 0.5;
    cursor: not-allowed;
    transform: none;
}

.cache-info {
    margin-top: 16px;
    padding: 12px;
    background: #f0fdf4;
    border-radius: 8px;
    border: 2px solid #bbf7d0;
}

/* Modal téléchargement */
.download-modal {
    background: white;
    border-radius: 20px;
    padding: 40px;
    max-width: 600px;
    width: 90%;
}

.download-modal h2 {
    font-size: 1.75rem;
    font-weight: 800;
    color: #1a1a1a;
    margin-bottom: 24px;
}

.download-levels {
    display: flex;
    flex-direction: column;
    gap: 16px;
    margin-bottom: 32px;
}

.level-card {
    padding: 20px;
    background: #f8fafc;
    border: 3px solid #e2e8f0;
    border-radius: 12px;
    cursor: pointer;
    transition: all 0.3s ease;
}

.level-card:hover {
    border-color: #10b981;
    transform: translateY(-4px);
    box-shadow: 0 4px 16px rgba(16, 185, 129, 0.2);
}

.level-card.selected {
    background: linear-gradient(135deg, #f0fdf4 0%, #dcfce7 100%);
    border-color: #10b981;
    box-shadow: 0 4px 16px rgba(16, 185, 129, 0.3);
}

.level-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 12px;
}

.level-title {
    font-size: 1.125rem;
    font-weight: 700;
    color: #1a1a1a;
}

.level-badge {
    padding: 4px 12px;
    background: #10b981;
    color: white;
    border-radius: 12px;
    font-size: 0.75rem;
    font-weight: 700;
}

.level-description {
    font-size: 0.875rem;
    color: #64748b;
    margin-bottom: 12px;
}

.level-stats {
    display: flex;
    gap: 16px;
    font-size: 0.75rem;
    color: #94a3b8;
}

.level-stats strong {
    color: #475569;
}

/* Barre de progression */
.progress-container {
    display: none;
    margin-top: 24px;
}

.progress-container.active {
    display: block;
}

.progress-bar-bg {
    width: 100%;
    height: 40px;
    background: #f1f5f9;
    border-radius: 20px;
    overflow: hidden;
    position: relative;
}

.progress-bar-fill {
    height: 100%;
    background: linear-gradient(90deg, #10b981 0%, #059669 100%);
    width: 0%;
    transition: width 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-weight: 700;
    font-size: 0.875rem;
}

.progress-details {
    margin-top: 12px;
    text-align: center;
    font-size: 0.875rem;
    color: #64748b;
}

.progress-details strong {
    color: #1a1a1a;
}