:root {
    --primary: #2563eb;
    --primary-light: #eff6ff;
    --dark: #0f172a;
    --text: #475569;
    --border: #ccc;
    --white: #ffffff;
    --bg-soft: #f8fafc;
    --bg-main: #f0f7ff;
}

/* Scroll fluide pour toute la page */
html {
    scroll-behavior: smooth !important;
    scroll-padding-top: 60px; /* Très important pour ne pas cacher le titre sous le menu sticky */
}

body {
    font-family: 'Inter', sans-serif;
    background-color: var(--white);
    color: var(--text);
    margin: 0;
    line-height: 1.6;
}

.container { max-width: 1200px; margin: 0 auto; padding: 0 20px; }

/* --- Header Base --- */
.main-header {
    background: #fff;
    border-bottom: 1px solid #e2e8f0;
    padding: 0; /* On gère le padding via la hauteur des liens */
    position: sticky;
    top: 0;
    z-index: 2000;
}

.header-flex {
    display: flex;
    justify-content: space-between;
    align-items: center;
    height: 80px;
    white-space: nowrap;
}

/* --- Navigation --- */
.main-nav { 
    display: flex; 
    gap: 40px; 
    height: 100%; 
    align-items: center; 
}
.logo { font-size: 1.5rem; 
	font-weight: 800; 
	text-decoration: none; 
	color: #0f172a; 
}
.logo span { 
	color: var(--primary); 
}
.logo img { 
	height: 48px; 
	vertical-align: middle; 
	margin-right: 10px; 
}
.logo a { 
	text-decoration: none; 
	color: black; 
}

.nav-link { 
    text-decoration: none; 
    color: #475569; 
    font-weight: 600; 
    font-size: 0.95rem; 
    padding: 30px 0; /* Zone de clic large */
}
.nav-links a {
    text-decoration: none;
    color: var(--text);
    margin-left: 30px;
    font-weight: 500;
    font-size: 0.95rem;
    white-space: nowrap;
}
.btn-login {
    background: var(--primary);
    color: white !important;
    padding: 10px 20px;
    border-radius: 8px;
}

/* --- Mega Menu Logic --- */
.dropdown { position: relative; height: 100%; display: flex; align-items: center; }

.mega-menu {
    position: absolute;
    top: 80px; /* Aligné sur le bas du header */
    left: 50%;
    transform: translateX(-50%);
    background: white;
    width: 800px;
    display: none; /* Caché par défaut */
    grid-template-columns: repeat(3, 1fr);
    gap: 40px;
    padding: 40px;
    border-radius: 0 0 16px 16px;
    box-shadow: 0 20px 40px rgba(0,0,0,0.1);
    border: 1px solid #e2e8f0;
}

.dropdown:hover .mega-menu { 
	display: grid; 
}

.mega-menu.force-close {
    display: none !important;
}

.mega-col { display: flex; flex-direction: column; gap: 12px; }

.col-title {
    font-size: 0.75rem;
    font-weight: 800;
    color: #94a3b8;
    text-transform: uppercase;
    letter-spacing: 1px;
    margin-bottom: 10px;
    display: flex;
    align-items: center;
    gap: 8px;
}

.mega-col a {
    text-decoration: none;
    color: #334155;
    font-size: 0.95rem;
    font-weight: 500;
    transition: 0.2s;
}
.mega-col img {
    height: 24px;
    vertical-align: bottom;
}

.mega-col a:hover { color: #2563eb; transform: translateX(5px); }

/* --- RESPONSIVE NAVIGATION --- */

/* 1. Cacher le bouton burger par défaut (ordinateur) */
.mobile-menu-toggle {
    display: none;
    background: none;
    border: none;
    padding: 0px 20px 0px 0px;
    color: var(--dark);
    font-size: 1.8rem;
    cursor: pointer;
    z-index: 3000;
}

@media (max-width: 992px) {
    .mobile-menu-toggle {
        display: block;
        position: relative;
        z-index: 3001;
    }

    .main-nav {
        position: fixed;
        box-sizing: border-box;
        top: 0;
        left: -100%;
        width: 85%;
        max-width: 350px;
        height: 100dvh;
        background: var(--white);
        flex-direction: column;
        align-items: flex-start !important;
        padding: 60px 20px 40px 60px;
        gap: 0; /* On gère l'espacement via les liens */
        transition: 0.4s cubic-bezier(0.4, 0, 0.2, 1);
        box-shadow: 10px 0 30px rgba(0,0,0,0.2);
        z-index: 2500;
        overflow-y: auto;
    }

    .main-nav.open {
        left: 0;
    }

    /* 1. On transforme le conteneur dropdown en bloc simple */
    .dropdown {
        display: block;
        width: 100%;
        height: auto;
    }

    /* 2. Le titre "Nos Applications" devient un en-tête de section */
    .dropdown > .nav-link {
        display: block;
        padding: 15px 0 5px 0;
        font-weight: 800;
        color: var(--dark);
        border-bottom: none; /* On enlève la bordure ici */
        pointer-events: none; /* Optionnel : rend le texte non cliquable car déjà ouvert */
    }

    /* 3. LE MEGA MENU : On le force à être visible et intégré à la liste */
    .mega-menu {
        display: block !important; /* Force l'affichage permanent */
        position: static; /* Remet dans le flux vertical */
        transform: none;
        width: 100%;
        padding: 0 0 20px 15px; /* Décalage à gauche pour l'effet sous-menu */
        box-shadow: none;
        border: none;
        background: transparent;
    }

    /* 4. On empile les colonnes et les liens */
    .mega-col {
        margin-bottom: 15px;
    }

    .col-title {
        font-size: 0.7rem;
        margin: 10px 0;
    }

    .mega-col a {
        display: block;
        padding: 8px 0;
        border-bottom: 1px solid #f1f5f9;
    }

    /* 5. Les liens Tarif et Aide à la suite */
    .main-nav > .nav-link:not(.dropdown > .nav-link) {
        width: 100%;
        padding: 15px 0;
        border-top: 1px solid var(--border); /* Séparateur avec ce qui précède */
        font-weight: 600;
    }
}

/* Hero */
.hero {
    padding: 120px 10%;
    text-align: center;
    background-image: url(../images/fondecole.png);
    background-size: cover;
}

.badge {
    background: var(--primary-light);
    color: var(--primary);
    padding: 8px 6px;
    border-radius: 50px;
    font-weight: 600;
    font-size: 1rem;
}

.hero h1 {
    font-size: 3.8rem;
    color: var(--dark);
    margin: 30px 0;
    letter-spacing: -2px;
}

.hero h1 span { color: var(--primary); }

.hero p {
    font-size: 1.3rem;
    max-width: 700px;
    margin: 0 auto 40px;
}

/* Grid System */
.app-section { padding: 100px 10%; background-color: var(--bg-main); }
.bg-soft { background-color: var(--bg-soft); }
.bg-main { background-color: var(--bg-main); }

.category-title {
    font-size: 1.8rem;
    color: var(--dark);
    margin-bottom: 50px;
    text-align: center;
}

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

/* Buttons */
.btn-primary {
    background: var(--primary);
    color: white;
    padding: 12px 24px;
    border-radius: 8px;
    text-decoration: none;
    font-weight: 600;
    display: inline-block;
}

.btn-outline {
    border: 1px solid var(--white);
    color: var(--dark);
    padding: 12px 24px;
    border-radius: 12px;
    text-decoration: none;
    font-weight: 600;
    display: inline-block;
    margin: 12px 12px;
}

/* Section */
.app-section { 
    padding: 100px 0; 
    border-bottom: 1px solid var(--border); 
    overflow: hidden; 
}
.app-section:nth-child(even) .app-flex { 
    flex-direction: row-reverse; 
}
.app-flex { 
    display: flex; 
    align-items: center; 
    gap: 80px; 
}
.app-info { 
    flex: 1; 
}
.app-info h2 { 
    font-size: 2.5rem; 
    color: var(--dark); 
    margin-bottom: 15px; 
}
.app-info img { 
    height: 48px; 
    vertical-align: text-bottom;
}

.app-visual { 
    flex: 1.2; 
    position: relative; 
    height: 400px; 
}
.double-mockup { 
    position: relative; 
    width: 100%; 
    height: 100%; 
}
.layer { 
    position: absolute; 
    border-radius: 12px; 
    box-shadow: 0 20px 40px rgba(0,0,0,0.1); 
    border: 4px solid var(--border); 
    overflow: hidden; 
    transition: transform 0.3s ease; 
}
.layer img { 
    width: 100%; 
    display: block; 
}
.layer-back { 
    width: 85%; 
    top: 0; 
    left: 0; 
    z-index: 1; 
}
.layer-front { 
    width: 60%; 
    bottom: -20px; 
    right: 0; 
    z-index: 2; 
    border: 4px solid var(--border); 
}

@media (max-width: 768px) {
    /* 1. L'empilement vertical de la section App */
    .app-flex {
        flex-direction: column !important; /* Force le texte au-dessus de l'image */
        gap: 40px; /* Réduit l'espace vertical entre le texte et l'image */
        text-align: center; /* Centre le texte pour un meilleur rendu mobile */
    }

    /* 2. Gérer le bloc visuel */
    .app-visual {
        width: 100%; /* Prend toute la largeur disponible */
        height: auto; /* Laisse la hauteur s'adapter aux images */
        min-height: 250px; /* Assure un minimum d'espace si les images sont petites */
        display: flex;
        justify-content: center; /* Centre le mockup horizontalement */
        align-items: center;
        margin-top: 20px;
    }

    /* 3. Ajuster le Double Mockup */
    .double-mockup {
        width: 100%; /* S'étend sur toute la largeur de son parent */
        max-width: 320px; /* Limite la largeur pour ne pas que ça devienne géant */
        height: 200px; /* Définit une hauteur fixe pour le positionnement absolu */
        position: relative; /* Nécessaire pour les layers absolute */
        margin: 0 auto; /* Centre le bloc */
    }

    /* 4. Agrandir les images (Layers) */
    .layer {
        border-width: 2px; /* Réduit la bordure pour gagner de l'espace image */
        border-radius: 8px; /* Adoucit un peu les coins */
        box-shadow: 0 10px 20px rgba(0,0,0,0.1); /* Allège l'ombre */
    }

    .layer-back {
        width: 80%; /* Laisser un peu de place pour le layer front */
        top: 0;
        left: 0;
    }

    .layer-front {
        width: 55%; /* Le layer front reste prédominant */
        bottom: -15px; /* Ajuste le dépassement vertical */
        right: 0;
        border-width: 2px;
    }

    /* Optionnel : Ajuster les titres sur mobile */
    .app-info h2 {
        font-size: 1.8rem; /* Réduit la taille du titre */
        justify-content: center; /* Centre le titre et l'icône */
    }
    
    .btn-login {
        display: none;
    }
}

/* Animations */
.reveal { opacity: 0; transform: translateY(40px); transition: 0.8s ease-out; }
.reveal.active { opacity: 1; transform: translateY(0); }

/* Style du Footer Sombre */
.main-footer {
    background-color: #0f172a;
    color: white;
    padding: 80px 10% 40px;
    margin-top: 100px;
    border-top: none;
}

.footer-content {
    max-width: 1200px;
    margin: 0 auto;
    display: grid;
    grid-template-columns: 1.5fr 1fr 1fr 1.2fr;
    gap: 60px;
    padding: 80px 0px;
}

/* Titres des colonnes en blanc */
.footer-col h4 {
    color: #ffffff;
    font-size: 1rem;
    margin-bottom: 25px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.footer-col ul {
    list-style: none;
    padding: 0;
    margin: 0;
}

.footer-col ul li {
    margin-bottom: 12px;
}

.footer-col ul li a {
    text-decoration: none;
    color: #94a3b8;
    font-size: 0.95rem;
    transition: color 0.3s ease;
}

.footer-col ul li a:hover {
    color: #3b82f6; /* Bleu vif au survol */
}

.brand-col .logo {
    color: #ffffff;
    margin-bottom: 20px;
}

.brand-col p {
    margin: 20px 0;
    font-size: 0.9rem;
    line-height: 1.6;
}

/* Badge Sécurité Adapté au sombre */
.security-badge {
    display: flex;
    align-items: center;
    gap: 10px;
    background: rgba(255, 255, 255, 0.05); /* Fond subtil */
    padding: 12px;
    border-radius: 8px;
    color: #60a5fa; /* Bleu plus clair pour lisibilité */
    font-weight: 600;
    font-size: 0.85rem;
    margin-bottom: 15px;
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.eco-text {
    font-size: 0.85rem;
    color: #34d399; /* Vert émeraude */
    display: flex;
    align-items: center;
    gap: 8px;
}

/* Bas du footer (Noir pur) */
.footer-bottom {
    border-top: 1px solid rgba(255, 255, 255, 0.05);
    padding: 25px 0;
    text-align: center;
    font-size: 0.8rem;
}
.footer-bottom .container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 10%;    /* Aligné sur le contenu du haut */
}

/* Icônes sociales */
.social-links a {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 38px;
    height: 38px;
    background: rgba(255, 255, 255, 0.05);
    border-radius: 50%;
    color: #ffffff;
    margin-right: 12px;
    transition: all 0.3s ease;
}

.social-links a:hover {
    background: #3b82f6;
    transform: translateY(-3px);
}

/* Pour le mobile : on empile les colonnes pour éviter qu'elles ne soient trop serrées */
@media (max-width: 900px) {
    .footer-content {
        grid-template-columns: 1fr 1fr; /* 2 colonnes sur tablette */
        gap: 40px;
        padding: 60px 5%;
    }
}

@media (max-width: 600px) {
    .footer-content {
        grid-template-columns: 1fr;     /* 1 seule colonne sur mobile */
        text-align: center;
    }
    
    .brand-col p {
        margin: 20px auto; /* Centre le texte sur mobile */
    }
    
    .security-badge {
        justify-content: center;
    }
}


/* --- Styles pour les pages juridiques --- */

.legal-header {
    background-color: var(--bg-main);
    padding: 80px 0 40px;
    text-align: center;
}

.legal-header h1 {
    font-size: 2.5rem;
    color: var(--dark);
    margin: 20px 0;
}

.legal-content {
    padding: 60px 0;
    line-height: 1.8;
}

.text-block {
    max-width: 800px; /* Plus étroit pour une lecture confortable */
    margin: 0 auto;
    color: var(--text);
}

.text-block h2 {
    color: var(--dark);
    margin-top: 40px;
    margin-bottom: 20px;
    font-size: 1.5rem;
    border-left: 4px solid var(--primary);
    padding-left: 15px;
}

.text-block p {
    margin-bottom: 20px;
}

.text-block ul {
    margin-bottom: 20px;
    padding-left: 20px;
}

.text-block li {
    margin-bottom: 10px;
}

.text-block .intro {
    font-size: 1.1rem;
    font-weight: 500;
    color: var(--dark);
    border-bottom: 2px solid var(--primary-light);
    padding-bottom: 20px;
    margin-bottom: 30px;
}

.contact-box {
    background-color: var(--bg-soft);
    padding: 20px;
    border-radius: 8px;
    margin: 20px 0;
}

.contact-box a {
    color: var(--primary);
    font-weight: bold;
    text-decoration: none;
}

.legal-footer-note {
    margin-top: 50px;
    padding: 20px;
    background-color: var(--primary-light); /* Utilise ton bleu très clair */
    border-radius: 8px;
    font-size: 0.9rem;
    color: var(--dark);
}



/* --- Tarifs --- */

.pricing-header {
    background-color: var(--bg-main);
    padding: 80px 0 40px;
    text-align: center;
}

.pricing-header h1 {
    font-size: 2.5rem;
    color: var(--dark);
    margin: 20px 0;
}

.pricing-section {
    padding: 60px 0 40px;
    text-align: center;
}

.pricing-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 30px;
    margin-bottom: 50px;
}

/* Style spécifique pour la carte "Sur mesure" pour qu'elle soit plus sobre que la "Populaire" */
.pricing-card:not(.featured) {
    background: #ffffff;
    border: 1px solid #e0e0e0;
}

.pricing-card {
    background: #fff;
    margin: 10px;
    padding: 30px;
    border-radius: 20px;
    border: 1px solid #eee;
    text-align: center;
    transition: 0.3s;
}

.pricing-card.featured {
    border: 2px solid var(--primary);
    transform: scale(1.05);
    box-shadow: 0 20px 40px rgba(0,0,0,0.1);
}

.pricing-card ul.features {
    text-align: left;
    margin-bottom: 40px;
}

.price {
    font-size: 2.5rem;
    font-weight: 800;
    color: var(--dark);
    margin: 20px 0;
}

.price span { font-size: 1rem; color: #888; }

.savings { color: #27ae60; font-weight: bold; font-size: 0.9rem; }

.popular {
    background: var(--primary);
    color: #fff;
    padding: 5px 15px;
    border-radius: 20px;
    font-size: 0.8rem;
    text-transform: uppercase;
}

.transition-text {
    text-align: center;
    padding: 0 20px;
}

.transition-text p {
    font-size: 1.2rem;
    color: #444;
    margin-bottom: 15px;
}

.transition-text p span {
    display: block;
    font-weight: bold;
    color: var(--primary);
}

.arrow-down {
    font-size: 1.5rem;
    color: #3498db;
    animation: bounce 2s infinite;
}

@keyframes bounce {
    0%, 20%, 50%, 80%, 100% {transform: translateY(0);}
    40% {transform: translateY(-10px);}
    60% {transform: translateY(-5px);}
}

/* Centrage du tableau */
.pricing-table-wrapper {
    display: flex;
    justify-content: center;
    margin: 0 auto;
    max-width: 700px; /* Largeur réduite pour plus de lisibilité */
    width: 100%;
}

.pricing-table-small {
    width: 100%;
    border-collapse: collapse;
    background: #fff;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 4px 15px rgba(0,0,0,0.3);
}

.pricing-table-small tbody tr:nth-child(even) {
}

.pricing-table-small th, 
.pricing-table-small td {
    padding: 8px 20px;
    text-align: left;
    border-bottom: 1px solid #f0f0f0;
    font-size: 0.95rem;
}

.pricing-table-small th {
    background-color: var(--primary);
    color: white;
    font-weight: 600;
}

.text-right {
    text-align: right !important;
}

/* Style des catégories */
.table-group td {
    background-color: var(--bg-main);
    color: var(--primary);
    font-weight: bold;
    font-size: 0.9rem;
    text-transform: uppercase;
    letter-spacing: 1px;
    padding: 10px 15px !important;
    border-bottom: 2px solid #e2e8f0 !important;
}

/* Effet au survol des lignes */
.pricing-table-small tr:hover:not(.table-group) {
    background-color: #fcfdfe;
}

.pricing-table tr:hover {
    background-color: #f8fafc;
}

.pricing-table td:last-child {
    font-weight: bold;
    color: var(--dark);
}

.pricing-note {
    max-width: 660px;
    margin: 0px auto 0;
    text-align: left;
}


/* Contact */

.contact-header {
    background-color: var(--bg-main);
    padding: 80px 0 40px;
    text-align: center;
}

.contact-header h1 {
    font-size: 2.5rem;
    color: var(--dark);
    margin: 20px 0;
}

.contact-simple {
    padding: 40px 0;
}

.text-center { text-align: center; }

.subtitle {
    max-width: 600px;
    margin: 0 auto 20px;
    color: #666;
}

.contact-cards {
    display: flex;
    justify-content: center;
    gap: 30px;
    flex-wrap: wrap;
}

.contact-card {
    background: #fff;
    padding: 40px;
    border-radius: 20px;
    width: 350px;
    box-shadow: 0 10px 30px rgba(0,0,0,0.1);
    transition: transform 0.3s ease;
}

.contact-card:hover {
    transform: translateY(-10px);
}

.icon-circle {
    width: 70px;
    height: 70px;
    background: var(--primary-light);
    color: var(--primary);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 20px;
    font-size: 1.5rem;
}

.contact-link {
    font-weight: bold;
    color: var(--primary);
    text-decoration: none;
    font-size: 1.2rem;
}

.response-time {
    margin-top: 50px;
    font-size: 0.9rem;
    color: #888;
}


/* Documentation */

.docs-section {
    padding: 60px 0;
    background-color: #f8f9fa;
}

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

.doc-card {
    background: #fff;
    padding: 30px;
    border-radius: 12px;
    box-shadow: 0 4px 15px rgba(0,0,0,0.05);
    transition: transform 0.3s ease;
    border: 1px solid #eee;
}

.doc-card:hover {
    transform: translateY(-5px);
    border-color: #3498db;
}

.doc-icon {
    font-size: 2.5rem;
    color: #3498db;
    margin-bottom: 20px;
}

.doc-card h3 {
    margin-bottom: 15px;
    color: #2c3e50;
}

.doc-card p {
    font-size: 0.95rem;
    color: #666;
    margin-bottom: 25px;
    line-height: 1.6;
}

.doc-links {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.btn-text {
    color: #3498db;
    text-decoration: none;
    font-weight: bold;
}

.btn-pdf {
    background: #f1f1f1;
    color: #e74c3c; /* Rouge pour rappeler le PDF */
    padding: 8px 15px;
    border-radius: 5px;
    text-decoration: none;
    font-size: 0.85rem;
    transition: background 0.2s;
}

.btn-pdf:hover {
    background: #e74c3c;
    color: #fff;
}