/* ================== VARIABLES & RESET ================== */
:root {
    /* Palette de couleurs basée sur votre logo */
    --sidebar-width: 280px;
    --color-bg-primary: #ffffff; 
    --color-bg-sidebar: #f4f7fa; 
    --color-text-primary: #0d1b3e; 
    --color-text-secondary: #5c6a82; 
    --color-accent: #006eff; 
    --color-accent-light: #76d7ea; 
    --color-border: #dde3e9; 
    
    --transition-speed: 0.5s; 
}
* { margin: 0; padding: 0; box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
    background-color: var(--color-bg-primary);
    color: var(--color-text-primary);
    overflow: hidden; 
    display: flex;
}
h1 { font-size: 2.2rem; margin-bottom: 20px; color: var(--color-text-primary); line-height: 1.3; }
h3 { color: var(--color-text-primary); margin-top: 2.5rem; margin-bottom: 1.5rem; font-size: 1.6rem; border-bottom: 2px solid var(--color-border); padding-bottom: 10px; }
h4 { color: var(--color-accent); font-size: 1.2rem; margin-bottom: 15px; }
p { font-size: 1.1rem; line-height: 1.6; max-width: 800px; color: var(--color-text-secondary); }

/* ================== EFFET INTRO (PRELOADER) ================== */
#preloader {
    position: fixed; top: 0; left: 0; width: 100%; height: 100%;
    background-color: var(--color-bg-primary);
    display: flex; justify-content: center; align-items: center;
    z-index: 10000;
    transition: opacity 0.5s ease-out, visibility 0.5s ease-out;
}
#preloader .loader {
    border: 4px solid rgba(0, 0, 0, 0.1);
    border-left-color: var(--color-accent);
    border-radius: 50%; width: 50px; height: 50px;
    animation: spin 1s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }
#preloader.loaded { opacity: 0; visibility: hidden; }

/* ================== SIDEBAR (FIXE) ================== */
.sidebar {
    width: var(--sidebar-width); height: 100vh;
    position: fixed; top: 0; left: 0;
    background-color: var(--color-bg-sidebar);
    border-right: 1px solid var(--color-border);
    padding: 2rem; display: flex; flex-direction: column;
    z-index: 100;
    transition: transform 0.3s ease-out; /* Pour le mobile */
}
.sidebar-logo { text-align: center; margin-bottom: 2rem; }
.sidebar-logo .logo-img { max-width: 150px; height: auto; }
.sidebar-nav { flex-grow: 1; }
.sidebar-nav ul { list-style: none; }
.sidebar-nav li { margin: 1.5rem 0; }
.sidebar-nav .sidebar-link {
    text-decoration: none; color: var(--color-text-secondary);
    font-size: 1.1rem; font-weight: 500; transition: 0.3s;
    position: relative; padding-left: 20px;
}
.sidebar-nav .sidebar-link::before {
    content: ''; position: absolute; left: 0; top: 50%;
    transform: translateY(-50%); width: 8px; height: 8px;
    border-radius: 50%; background-color: #ccc; transition: 0.3s;
}
.sidebar-nav .sidebar-link:hover { color: var(--color-text-primary); }
.sidebar-nav .sidebar-link.active {
    color: var(--color-accent); font-weight: 700;
}
.sidebar-nav .sidebar-link.active::before {
    background-color: var(--color-accent);
    transform: translateY(-50%) scale(1.3);
}
.sidebar-footer { font-size: 0.9rem; color: var(--color-text-secondary); text-align: center; }

/* ================== CONTENU (HORIZONTAL) ================== */
.main-content {
    flex-grow: 1; margin-left: var(--sidebar-width); 
    height: 100vh; overflow: hidden; 
}
.main-wrapper {
    display: flex; height: 100%;
    width: 500%; /* 100% * 5 sections */
    transition: transform var(--transition-speed) cubic-bezier(0.77, 0, 0.175, 1);
}
.panel {
    width: 20%; /* 100% / 5 sections */
    height: 100vh;
    overflow-y: auto; 
    background-color: var(--color-bg-primary);
}
.panel-content {
    padding: 4rem 5rem; 
    min-height: 100%; 
    display: flex; flex-direction: column;
    justify-content: flex-start; /* Aligné en haut par défaut */
}

/* === STYLE DE SCROLLBAR (BONUS) === */
::-webkit-scrollbar { width: 10px; }
::-webkit-scrollbar-track { background: var(--color-bg-sidebar); }
::-webkit-scrollbar-thumb { background: #ccc; border-radius: 10px; }
::-webkit-scrollbar-thumb:hover { background: #aaa; }

/* ================== SLIDER DE SECTION (CORRIGÉ) ================== */
.section-slider {
    width: 100%;
    height: 350px; /* Hauteur augmentée */
    position: relative;
    overflow: hidden; border-radius: 10px;
    margin-bottom: 2.5rem; 
}
.section-slider .slide {
    position: absolute; top: 0; left: 0; width: 100%; height: 100%;
    background-size: cover; background-position: center;
    opacity: 0; /* Par défaut, tous les slides sont cachés */
    box-shadow: inset 0 -100px 80px -40px rgba(0,0,0,0.5);
}
.slide-caption {
    position: absolute; bottom: 20px; left: 20px; color: #ffffff;
    font-size: 1.8rem; font-weight: 700;
    text-shadow: 2px 2px 4px rgba(0,0,0,0.6);
}

/* === NOUVELLE LOGIQUE D'ANIMATION (ROBUSTE) === */
.panel.active .section-slider .slide-1 { 
    animation: fadeSlide-1 15s linear infinite;
}
.panel.active .section-slider .slide-2 { 
    animation: fadeSlide-2 15s linear infinite;
}
.panel.active .section-slider .slide-3 { 
    animation: fadeSlide-3 15s linear infinite;
}
@keyframes fadeSlide-1 {
    0% { opacity: 0; }
    5% { opacity: 1; } /* Fade-in court */
    33.33% { opacity: 1; }
    38.33% { opacity: 0; } /* Fade-out court */
    100% { opacity: 0; }
}
@keyframes fadeSlide-2 {
    0% { opacity: 0; }
    33.33% { opacity: 0; }
    38.33% { opacity: 1; } /* Fade-in */
    66.66% { opacity: 1; }
    71.66% { opacity: 0; } /* Fade-out */
    100% { opacity: 0; }
}
@keyframes fadeSlide-3 {
    0% { opacity: 0; }
    66.66% { opacity: 0; }
    71.66% { opacity: 1; } /* Fade-in */
    95% { opacity: 1; }
    100% { opacity: 0; } /* Fade-out à la fin */
}

/* === IMAGES POUR LES SLIDERS (GARDÉ) === */
/* (REMPLACEZ CES IMAGES) */
.slide-ia-1 { background-image: url('https://www.redbridgedta.com/us/wp-content/uploads/sites/3/2025/06/what-is-agentic-commerce-hype-reality-and-what-it-means-for-fintech-tn.jpg'); }
.slide-ia-2 { background-image: url('ag2.avif'); }
.slide-ia-3 { background-image: url('https://knect365.imgix.net/uploads/AdobeStock-1257156629-108c40cc617e98b3cb671951ac3baddf.jpeg?auto=format&fit=max&w=412&dpr=5'); }
.slide-paie-1 { background-image: url('https://mobile.ledesk.ma/wp-content/uploads/2025/07/CashPlus-Nabil-Hazim.jpg'); }
.slide-paie-2 { background-image: url('https://images.ctfassets.net/sxag7u4cz1re/5OTL5GJ3CKTo0g1J9wHMjd/d6f72a2f0f862cbf840f388f483177d1/H_-_International_payment_methods-_Cross-border_payment_systems_.png'); }
.slide-paie-3 { background-image: url('https://www.treezor.com/app/uploads/2025/08/3DS.jpg'); }
.slide-erp-1 { background-image: url('https://blog.aqmanager.com/hubfs/Blog_Visuel_difference%20lims%20et%20crm-min.jpg'); }
.slide-erp-2 { background-image: url('crm1.jpg'); }
.slide-erp-3 { background-image: url('https://www.cio.com/wp-content/uploads/2025/03/272362-0-27498000-1741330535-enterprise_resource_planning-ERP.jpg?quality=50&strip=all'); }
.slide-api-1 { background-image: url('https://images.unsplash.com/photo-1542744173-8e7e53415bb0?q=80&w=1920'); }
.slide-api-2 { background-image: url('https://images.unsplash.com/photo-1504384308090-c894fdcc538d?q=80&w=1920'); }
.slide-api-3 { background-image: url('https://images.unsplash.com/photo-1518770660439-4636190af475?q=80&w=1920'); }
.slide-seo-1 { background-image: url('https://www.dbswebsite.com/uploads/illustration-google-sge-search.jpg'); }
.slide-seo-2 { background-image: url('https://images.unsplash.com/photo-1559028012-481c04fa702d?q=80&w=1920'); }
.slide-seo-3 { background-image: url('https://images.unsplash.com/photo-1519389950473-47ba0277781c?q=80&w=1920'); }

/* ================== MISE EN PAGE DU CONTENU (GARDÉ) ================== */
.section-concept {
    background-color: var(--color-bg-sidebar); /* Bleu-gris très clair */
    border-left: 4px solid var(--color-accent); /* Ligne bleue accent */
    padding: 1.5rem;
    margin-bottom: 2.5rem;
    border-radius: 0 8px 8px 0;
}
.concept-label {
    font-size: 0.9rem;
    font-weight: 700;
    color: var(--color-accent);
    text-transform: uppercase;
    letter-spacing: 0.5px;
    display: block;
    margin-bottom: 5px;
}
.section-concept p {
    color: var(--color-text-primary);
    font-size: 1.1rem;
    margin: 0;
}
.solutions-grid {
    display: grid;
    gap: 1.5rem;
}
.grid-2-cols {
    grid-template-columns: repeat(2, 1fr);
}
.solution-card {
    background-color: #ffffff;
    border: 1px solid var(--color-border);
    border-radius: 8px;
    padding: 1.5rem 2rem;
    transition: box-shadow 0.3s, transform 0.3s;
    display: flex;
    flex-direction: column;
}
.solution-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 20px rgba(13, 27, 62, 0.07);
}
.solution-card ul {
    list-style: none;
    padding-left: 0;
    margin-top: 15px;
}
.solution-card li {
    position: relative;
    padding-left: 25px;
    margin-bottom: 10px;
    color: var(--color-text-secondary);
    font-size: 0.95rem;
    line-height: 1.5;
}
.solution-card li::before {
    content: '✓';
    position: absolute;
    left: 0;
    top: 0;
    font-weight: bold;
    color: var(--color-accent-light);
}
.solution-card li strong {
    color: var(--color-text-primary);
}
.animated-content {
    opacity: 0; transform: translateY(20px);
    animation: fadeIn 0.8s ease-out 0.3s forwards;
    animation-delay: 0.5s;
}
@keyframes fadeIn {
    from { opacity: 0; transform: translateY(20px); }
    to { opacity: 1; transform: translateY(0); }
}

/* ================== BLOC : Solution Phare (Waslify) (GARDÉ) ================== */
.featured-solution {
    display: flex;
    align-items: center;
    gap: 2rem;
    background-color: var(--color-bg-sidebar); /* Fond clair pour le faire ressortir */
    border-radius: 8px;
    padding: 2rem;
    margin-top: 2.5rem; /* Espace avant */
    margin-bottom: 1rem; /* Espace avant le H3 suivant */
}
.featured-image {
    flex: 1; /* Prend 1 part de l'espace */
    text-align: center;
}
.featured-image img {
    max-width: 100%;
    border-radius: 8px;
    background-color: #e0e0e0; /* Couleur de placeholder */
    min-height: 200px;
    aspect-ratio: 16/10; /* Garde un ratio */
    object-fit: cover;
    box-shadow: 0 5px 15px rgba(13, 27, 62, 0.1);
}
.featured-text {
    flex: 1.5; /* Prend 1.5 parts (plus de place pour le texte) */
}
.featured-text h4 {
    color: var(--color-text-primary); /* Pas en bleu, plus un titre */
    font-size: 1.5rem;
    border: none; /* Pas de bordure pour ce titre */
    padding: 0;
    margin-top: 0;
}
.featured-text p {
    font-size: 1.05rem;
    margin-bottom: 1rem;
}
.featured-text ul {
    list-style: none; padding-left: 0;
}
.featured-text li {
    position: relative;
    padding-left: 25px;
    margin-bottom: 8px;
    color: var(--color-text-secondary);
    font-size: 0.95rem;
}
.featured-text li::before {
    content: '✓';
    position: absolute;
    left: 0;
    top: 0;
    font-weight: bold;
    color: var(--color-accent); /* Utilise la couleur accent bleu */
}
.featured-solution + h3 {
    margin-top: 3rem;
}

/* ================== BLOC : Cartes de Fonctionnalités (Waslify) (MIS À JOUR) ================== */
/* Grille à 3 colonnes */
.grid-3-cols {
    grid-template-columns: repeat(3, 1fr);
}
.features-title {
    text-align: center;
    border-bottom: none;
    font-size: 2rem;
    margin-top: 3.5rem;
}
.subtitle.features-subtitle {
    text-align: center;
    max-width: 600px;
    margin-left: auto;
    margin-right: auto;
    margin-bottom: 2.5rem;
}
.other-solutions-title {
     margin-top: 3.5rem;
}
.solution-card p.card-description {
    font-size: 0.95rem;
    color: var(--color-text-secondary);
    margin-bottom: 1rem;
    flex-grow: 1; /* Pousse le contenu en bas (s'il n'y a pas de lien) */
}

/* ================== MENU MOBILE (BURGER) (GARDÉ) ================== */
#mobile-menu-toggle {
    display: none; /* Caché sur ordinateur */
    position: fixed;
    top: 20px;
    right: 20px;
    width: 50px;
    height: 50px;
    background-color: var(--color-bg-sidebar);
    border: 1px solid var(--color-border);
    border-radius: 8px;
    z-index: 1001; /* Au-dessus du sidebar */
    cursor: pointer;
}
#mobile-menu-toggle .burger-line {
    width: 25px;
    height: 3px;
    background-color: var(--color-text-primary);
    margin: 5px auto;
    transition: all 0.3s ease-in-out;
}
#mobile-menu-toggle.active .burger-line:nth-child(1) { transform: translateY(8px) rotate(45deg); }
#mobile-menu-toggle.active .burger-line:nth-child(2) { opacity: 0; }
#mobile-menu-toggle.active .burger-line:nth-child(3) { transform: translateY(-8px) rotate(-45deg); }

/* ================== RESPONSIVE (Media Query) (GARDÉ) ================== */
@media (max-width: 768px) {
    body { overflow: auto; }
    #mobile-menu-toggle { display: block; }

    .sidebar { transform: translateX(-100%); width: 300px; }
    .sidebar.mobile-active { transform: translateX(0); }

    .main-content { margin-left: 0; overflow: visible; height: auto; }
    .main-wrapper { flex-direction: column; width: 100%; height: auto; transform: none !important; }
    .panel { width: 100%; height: auto; min-height: 100vh; overflow-y: visible; border-bottom: 1px solid var(--color-border); }
    .panel-content { padding: 4rem 1.5rem; }

    h1 { font-size: 1.8rem; }
    h3 { font-size: 1.4rem; }
    
    .section-slider {
        height: 250px; /* Hauteur augmentée mobile */
    }
    .slide-caption { font-size: 1.3rem; }

    /* Grilles passent à 1 colonne sur mobile */
    .grid-2-cols {
        grid-template-columns: 1fr;
    }
    .grid-3-cols {
        grid-template-columns: 1fr;
    }
    .features-title {
        font-size: 1.6rem;
    }
    .featured-solution {
        flex-direction: column; /* Empiler sur mobile */
        padding: 1.5rem;
    }
}