/* --- VARIABLES & RESET --- */
:root {
    --primary: #f58220; /* Orange KScada */
    --primary-hover: #d96e11;
    --dark: #0f172a;    /* Bleu nuit profond */
    --dark-light: #1e293b;
    --light: #f8fafc;   /* Blanc cassé */
    --text: #334155;    /* Gris texte lisible */
    --white: #ffffff;
    --shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.1);
    --radius: 8px;
    --font-main: 'Poppins', sans-serif;
}

* { margin: 0; padding: 0; box-sizing: border-box; }

body {
    font-family: var(--font-main);
    color: var(--text);
    background-color: var(--light);
    line-height: 1.6;
}

a { text-decoration: none; color: inherit; transition: 0.3s; }
ul { list-style: none; }
img { max-width: 100%; height: auto; display: block; }

/* --- TYPOGRAPHY --- */
h1, h2, h3 { color: var(--dark); font-weight: 700; line-height: 1.2; }
h1 { font-size: 3rem; margin-bottom: 1rem; }
h2 { font-size: 2.25rem; margin-bottom: 1rem; }
.highlight { color: var(--primary); }

/* --- BUTTONS --- */
.btn {
    display: inline-block;
    padding: 12px 30px;
    border-radius: 50px;
    font-weight: 600;
    text-transform: uppercase;
    font-size: 0.9rem;
    letter-spacing: 1px;
    cursor: pointer;
    border: 2px solid transparent;
}

.btn-primary {
    background-color: var(--primary);
    color: var(--white);
}

.btn-primary:hover {
    background-color: var(--primary-hover);
    transform: translateY(-2px);
}

.btn-outline {
    border-color: var(--primary);
    color: var(--primary);
}

.btn-outline:hover {
    background-color: var(--primary);
    color: var(--white);
}

/* --- HEADER --- */
header {
    background-color: var(--white);
    box-shadow: var(--shadow);
    position: sticky;
    top: 0;
    z-index: 1000;
    padding: 1rem 0;
}

.navbar {
    max-width: 1200px;
    margin: 0 auto;
    display: flex;
    justify-content: space-between; /* Garde l'espace entre Logo et Menu */
    align-items: center; /* Centre verticalement tous les éléments */
    padding: 0 20px;
    height: 40px; /* Fixe une hauteur pour garantir l'alignement */
}

.logo img {
    height: 56px; 
    width: auto; /* Garde les proportions */
    display: block; /* Évite les décalages fantômes des images inline */
}

.nav-links {
    display: flex;
    gap: 30px;
    align-items: center; /* Centre les liens et le bouton verticalement */
    margin: 0; /* Supprime les marges par défaut */
}
    .nav-links > div > a, /* Cible les titres des dropdowns */
    .nav-links > a { /* Cible les liens directs s'il y en a */
        font-size: 1rem;
        font-weight: 500;
        color: var(--dark);
        display: flex;
        align-items: center;
        gap: 5px; /* Espace entre le texte et la petite flèche */
    }

.menu-toggle { display: none; font-size: 1.5rem; cursor: pointer; }

/* --- HERO SECTION --- */
.hero {
    position: relative;
    padding: 60px 20px;
    background: linear-gradient(135deg, var(--dark) 0%, #1e293b 100%);
    color: var(--white);
    overflow: hidden;
}

.hero-content {
    max-width: 1200px;
    margin: 0 auto;
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 50px;
    align-items: center;
    position: relative;
    z-index: 2;
}

.hero-text h1 { color: var(--white); }
.hero-text p { font-size: 1.1rem; color: #cbd5e1; margin-bottom: 2rem; }

@media (max-width: 860px) {
    .hero-btns {
        display: flex;
        flex-direction: column; /* Force l'empilement vertical */
        gap: 15px; /* Ajoute 15px d'espace entre les boutons */
        align-items: center; /* Centre les boutons horizontalement */
        width: 100%;
    }

    .hero-btns .btn {
        /* Annule la marge gauche "desktop" (style inline) */
        margin-left: 0 !important;
        /* Rend les boutons plus larges pour le tactile (optionnel mais recommandé) */
        width: 100%;
        max-width: 300px;
    }
}

/* --- SECTIONS GENERAL --- */
.section { padding: 80px 20px; max-width: 1200px; margin: 0 auto; }
.section-header { text-align: center; max-width: 700px; margin: 0 auto 60px; }

/* --- FEATURES GRID --- */
.grid-3 {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 30px;
}

.card {
    background: var(--white);
    padding: 30px;
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    transition: 0.3s;
    border-top: 4px solid transparent;
}

.card:hover {
    transform: translateY(-5px);
    border-top: 4px solid var(--primary);
}

.card-icon {
    width: 60px;
    height: 60px;
    background: #fff0e6;
    color: var(--primary);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    margin-bottom: 20px;
}

.card h3 { font-size: 1.25rem; margin-bottom: 10px; }

/* --- ALIGNEMENT ICONE + TITRE --- */
.card-header {
    display: flex; /* Active le mode ligne */
    align-items: center; /* Centre verticalement l'icône par rapport au texte */
    gap: 15px; /* Espace entre l'icône et le titre */
    margin-bottom: 15px; /* Espace sous l'en-tête avant le paragraphe */
}

.card-header .card-icon {
    margin-bottom: 0; /* Supprime l'ancienne marge du bas */
    width: 50px; /* (Optionnel) Légèrement plus petit pour l'équilibre */
    height: 50px; /* (Optionnel) Légèrement plus petit pour l'équilibre */
    font-size: 1.2rem; /* Ajuste la taille du symbole */
    flex-shrink: 0; /* Empêche l'icône de s'écraser si le titre est long */
}

.card-header h3 {
    margin-bottom: 0; /* Supprime la marge du bas du titre */
    text-align: left; /* Force l'alignement à gauche */
    line-height: 1.2; /* Interligne serré pour les titres sur 2 lignes */
}

/* --- PREVIEW SECTION (SIVIEW) --- */
.preview-section { background-color: var(--white); }
.preview-content {
    display: flex;
    align-items: center;
    gap: 50px;
    margin-bottom: 40px;
}
.preview-content:nth-child(even) { flex-direction: row-reverse; }
.preview-text { flex: 1; }
.preview-img { flex: 1; border-radius: var(--radius); overflow: hidden; box-shadow: var(--shadow); }

/* --- SECTORS (Carousel style substitute -> Grid) --- */
.sectors-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
    gap: 20px;
}

.sector-item {
    position: relative;
    height: 200px;
    border-radius: var(--radius);
    overflow: hidden;
    cursor: pointer;
}

.sector-item img { width: 100%; height: 100%; object-fit: cover; transition: 0.5s; }
.sector-overlay {
    position: absolute;
    bottom: 0; left: 0; right: 0;
    background: linear-gradient(to top, rgba(0,0,0,0.8), transparent);
    padding: 20px;
    color: white;
}
.sector-item:hover img { transform: scale(1.1); }

/* --- FOOTER --- */
footer {
    background-color: var(--dark);
    color: #94a3b8;
    padding: 60px 20px 20px;
}

.footer-container {
    max-width: 1200px;
    margin: 0 auto;
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 40px;
    margin-bottom: 40px;
}

.footer-col h4 { color: var(--white); margin-bottom: 20px; }
.footer-col ul li { margin-bottom: 10px; }
.footer-col a:hover { color: var(--primary); }

.copyright {
    text-align: center;
    border-top: 1px solid #334155;
    padding-top: 20px;
    font-size: 0.9rem;
}

/* --- CONTACT FORM --- */
.contact-section { background: #f1f5f9; }
.form-box {
    background: var(--white);
    padding: 40px;
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    max-width: 800px;
    margin: 0 auto;
}
.form-group { margin-bottom: 20px; }
.form-group label { display: block; margin-bottom: 8px; font-weight: 500; }
.form-control {
    width: 100%;
    padding: 12px;
    border: 1px solid #e2e8f0;
    border-radius: 6px;
    font-family: inherit;
}
.form-control:focus { outline: none; border-color: var(--primary); }

/* --- RESPONSIVE --- */
@media (max-width: 768px) {
    h1 { font-size: 2.5rem; }
    .nav-links {
        display: none;
        position: absolute;
        top: 70px; left: 0; right: 0;
        background: var(--white);
        flex-direction: column;
        padding: 20px;
        box-shadow: var(--shadow);
        text-align: center;
    }
    .nav-links.active { display: flex; }
    .menu-toggle { display: block; }
    .hero-content { grid-template-columns: 1fr; text-align: center; }
    .preview-content, .preview-content:nth-child(even) { flex-direction: column; }

    h2 {
        font-size: 1.9rem; 
        line-height: 1.3;
    }
}

/* --- AJOUTS NAVIGATION (DROPDOWNS) --- */
.dropdown {
    position: relative;
    display: inline-block;
}

.dropdown-content {
    display: none;
    position: absolute;
    background-color: var(--white);
    min-width: 220px;
    box-shadow: 0 8px 16px rgba(0,0,0,0.1);
    border-radius: var(--radius);
    padding: 10px 0;
    z-index: 1000;
    top: 100%;
    left: 0;
}

    .dropdown-content a {
        color: var(--text);
        padding: 12px 20px;
        text-decoration: none;
        display: block;
        font-size: 0.9rem;
        transition: 0.2s;
    }

        .dropdown-content a:hover {
            background-color: #f1f5f9;
            color: var(--primary);
            padding-left: 25px; /* Petit effet de glissement */
        }

.dropdown:hover .dropdown-content {
    display: block;
}

/* responsive dropdown fix inside hamburger menu would need JS, 
   but for simple hover on desktop this works well */

/* --- AJOUTS CARTES (LIENS DOC) --- */
.card-link {
    display: inline-flex;
    align-items: center;
    margin-top: 15px;
    margin-bottom: 10px;
    font-size: 0.85rem;
    font-weight: 600;
    color: var(--primary);
    border-bottom: 1px solid transparent;
}

    .card-link:hover {
        border-bottom-color: var(--primary);
    }

    .card-link i {
        margin-left: 5px;
        font-size: 0.8rem;
    }

/* --- NOUVELLE SECTION TÉLÉCHARGEMENTS --- */
.download-card {
    background: var(--white);
    border: 1px solid #e2e8f0;
    padding: 25px;
    border-radius: var(--radius);
    display: flex;
    flex-direction: column;
    height: 100%;
    transition: 0.3s;
}

    .download-card:hover {
        border-color: var(--primary);
        box-shadow: var(--shadow);
    }

.download-icon {
    font-size: 2rem;
    color: var(--dark);
    margin-bottom: 15px;
}

.card-header .download-icon {
    margin-bottom: 0;
    font-size: 1.8rem;
    color: var(--dark); /* Garde la couleur sombre */
}

/* --- FORMULAIRE COMPLEXE --- */
.radio-group {
    display: flex;
    background: #e2e8f0;
    border-radius: 50px;
    padding: 4px;
    margin-bottom: 20px;
}

.radio-option {
    flex: 1;
    text-align: center;
    padding: 10px;
    cursor: pointer;
    border-radius: 50px;
    font-weight: 500;
    color: #64748b;
    transition: 0.3s;
    user-select: none;
}

    .radio-option.active {
        background: var(--white);
        color: var(--primary);
        box-shadow: 0 2px 4px rgba(0,0,0,0.1);
    }

.file-upload-wrapper {
    position: relative;
    overflow: hidden;
    display: inline-block;
    width: 100%;
}

.file-upload-btn {
    border: 2px dashed #cbd5e1;
    color: #64748b;
    background: var(--light);
    padding: 15px;
    border-radius: var(--radius);
    text-align: center;
    cursor: pointer;
    transition: 0.3s;
    display: block;
}

    .file-upload-btn:hover {
        border-color: var(--primary);
        color: var(--primary);
        background: #fff7ed; /* Light orange tint */
    }

.file-upload-wrapper input[type=file] {
    font-size: 100px;
    position: absolute;
    left: 0;
    top: 0;
    opacity: 0;
    cursor: pointer;
    width: 100%;
    height: 100%;
}

#file-name-display {
    font-size: 0.85rem;
    color: var(--primary);
    margin-top: 5px;
    display: block;
    text-align: center;
    font-weight: 500;
}

/* --- PAGES LÉGALES --- */
.legal-container {
    background: var(--white);
    padding: 60px;
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    max-width: 900px;
    margin: 0 auto;
}

.legal-content h3 {
    color: var(--primary);
    margin-top: 40px;
    margin-bottom: 20px;
    font-size: 1.25rem;
    border-bottom: 1px solid #e2e8f0;
    padding-bottom: 10px;
}

.legal-content p {
    color: var(--text);
    margin-bottom: 15px;
    text-align: justify;
}

.legal-details-box {
    background-color: #f8fafc;
    border-left: 4px solid var(--dark);
    padding: 20px;
    margin: 20px 0;
    font-size: 0.95rem;
}

.text-link {
    color: var(--primary);
    font-weight: 500;
}

    .text-link:hover {
        text-decoration: underline;
        color: var(--primary-hover);
    }

@media (max-width: 768px) {
    .legal-container {
        padding: 30px 20px;
    }
}

.nav-links a.active {
    color: var(--primary) !important;
    font-weight: 700 !important;
}

/* --- PAGE KSCADA SPECIFIC --- */

/* Bannière "Stats" */
.stats-container {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 30px;
    text-align: center;
    background: var(--white);
    padding: 40px;
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    margin-top: -50px; /* Chevauchement sur le Hero pour effet moderne */
    position: relative;
    z-index: 10;
    max-width: 1000px;
    margin-left: auto;
    margin-right: auto;
}

.stat-item h3 {
    font-size: 2.5rem;
    color: var(--primary);
    margin-bottom: 0;
}

.stat-item p {
    font-size: 0.9rem;
    color: #64748b;
    font-weight: 600;
    text-transform: uppercase;
}

/* Citation Philosophie */
.philosophy-quote {
    font-size: 1.5rem;
    font-weight: 300;
    font-style: italic;
    text-align: center;
    color: var(--dark);
    max-width: 800px;
    margin: 60px auto;
    position: relative;
}

    .philosophy-quote::before {
        content: '\201C'; /* Guillemet */
        font-size: 5rem;
        color: #e2e8f0;
        position: absolute;
        top: -40px;
        left: -20px;
        z-index: -1;
    }

/* Carte Identité (Grid asymétrique) */
.identity-grid {
    display: grid;
    grid-template-columns: 1.5fr 1fr;
    gap: 40px;
}

.identity-card {
    background: var(--dark);
    color: var(--white);
    padding: 40px;
    border-radius: var(--radius);
}

    .identity-card h3 {
        color: var(--white);
        border-bottom: 1px solid #334155;
        padding-bottom: 15px;
        margin-bottom: 20px;
    }

.identity-list li {
    margin-bottom: 15px;
    display: flex;
    align-items: start;
    gap: 15px;
}

.identity-list i {
    color: var(--primary);
    margin-top: 5px;
}

/* Force le titre de la bannière en blanc */
.hero h1 {
    color: var(--white);
}

/* Responsive adjustments */
@media (max-width: 768px) {
    .stats-container {
        margin-top: 20px;
    }

    .identity-grid {
        grid-template-columns: 1fr;
    }
}

.nav-disabled {
    color: #cbd5e1 !important; /* Gris clair (Slate-300) pour l'effet inactif */
    cursor: default; /* Le curseur reste une flèche (pas de main) */
    pointer-events: none; /* Empêche le clic et le survol (hover) */
}

/* --- SECTION TARIFS --- */
.pricing-wrapper {
    background: var(--white);
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    overflow: hidden;
    max-width: 1000px;
    margin: 0 auto;
    border: 1px solid #e2e8f0;
}

/* En-têtes du tableau (Desktop) */
.pricing-header-row {
    display: grid;
    grid-template-columns: 2fr 1fr 1fr; /* 3 colonnes */
    background-color: var(--dark);
    color: var(--white);
    padding: 15px 20px;
    font-weight: 600;
    text-transform: uppercase;
    font-size: 0.9rem;
    letter-spacing: 1px;
}

/* Lignes du tableau */
.pricing-row {
    display: grid;
    grid-template-columns: 2fr 1fr 1fr;
    padding: 20px;
    align-items: center;
    border-bottom: 1px solid #f1f5f9;
    transition: 0.2s;
}

    .pricing-row:hover {
        background-color: #f8fafc;
    }

    .pricing-row:last-child {
        border-bottom: none;
    }

/* Typographie des cellules */
.col-name {
    font-weight: 700;
    color: var(--dark);
    display: flex;
    flex-direction: column;
}

    .col-name span {
        font-size: 0.8rem;
        color: #64748b;
        font-weight: 400;
    }

.col-points {
    font-weight: 600;
    color: #475569;
}

.col-price {
    font-weight: 700;
    color: var(--primary);
    font-size: 1.1rem;
}

.col-upgrade {
    color: #94a3b8;
    font-size: 0.9rem;
}

/* Footer du tableau */
.pricing-footer {
    background-color: #f8fafc;
    padding: 20px;
    text-align: center;
    border-top: 1px solid #e2e8f0;
}

    .pricing-footer p {
        margin: 5px 0;
        color: var(--dark);
    }

/* RESPONSIVE (Transforme le tableau en cartes sur mobile) */
@media (max-width: 768px) {
    .pricing-header-row {
        display: none;
    }
    /* On cache les en-têtes */

    .pricing-row {
        grid-template-columns: 1fr; /* 1 seule colonne */
        text-align: center;
        gap: 10px;
        padding: 30px 20px;
        border-bottom: 4px solid #f1f5f9;
    }

    .col-name {
        font-size: 1.2rem;
        margin-bottom: 5px;
    }

    .col-price {
        font-size: 1.5rem;
    }

    /* On ajoute des labels pour qu'on comprenne les chiffres sur mobile */
    .col-points::before {
        content: "Points : ";
        color: #94a3b8;
        font-weight: 400;
    }

    .col-upgrade::before {
        content: "Coût Upgrade : ";
        color: #94a3b8;
    }

    .more-features-container {
        padding: 40px 20px;
    }

    .compact-grid {
        grid-template-columns: 1fr; /* Une seule colonne sur mobile */
    }

}

.grecaptcha-badge {
    visibility: hidden;
}

label.required::after {
    content: " *";
    color: #e74c3c;
    margin-left: 4px;
}

/* --- SECTION FONCTIONNALITÉS COMPACTES --- */

.more-features-container {
    background-color: var(--dark);
    padding: 60px 40px;
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    color: var(--white);
}

.compact-grid {
    display: grid;
    /* Crée autant de colonnes que possible, minimum 250px de large */
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 20px;
}

.compact-item {
    display: flex;
    align-items: center;
    gap: 15px;
    padding: 15px 20px;
    background: rgba(255, 255, 255, 0.05); /* Effet de transparence léger */
    border-radius: 6px;
    transition: 0.3s;
    border: 1px solid transparent;
}

    .compact-item:hover {
        background: rgba(255, 255, 255, 0.1);
        border-color: var(--primary); /* Bordure orange au survol */
        transform: translateY(-2px);
    }

    .compact-item i {
        color: var(--primary); /* Icônes en orange */
        font-size: 1.2rem;
        width: 25px; /* Largeur fixe pour aligner le texte */
        text-align: center;
    }

    .compact-item span {
        font-weight: 500;
        font-size: 0.95rem;
    }
}