/* =========================================
   1. CONFIGURATION GÉNÉRALE (RESET & VARS)
   ========================================= */
:root {
    --bg-main: #0f172a;       /* Bleu nuit profond */
    --bg-card: #1e293b;       /* Bleu gris pour les cartes */
    --primary: #6366f1;       /* Violet Indigo (Couleur principale) */
    --primary-hover: #4f46e5; /* Violet un peu plus foncé au survol */
    --accent: #a855f7;        /* Violet Néon (Accents) */
    --text-white: #f8fafc;
    --text-gray: #94a3b8;
    --green: #10b981;         /* Vert pour les validations */
    --red: #ef4444;           /* Rouge pour les promos */
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Outfit', sans-serif; /* Police moderne */
    scroll-behavior: smooth;
}

body {
    background-color: var(--bg-main);
    color: var(--text-white);
    overflow-x: hidden;
    font-size: 16px;
    line-height: 1.6;
}

a { text-decoration: none; color: inherit; transition: 0.3s; }
ul { list-style: none; }

/* =========================================
   2. EN-TÊTE (HEADER) & NAVIGATION
   ========================================= */
header {
    background: rgba(15, 23, 42, 0.95); /* Fond semi-transparent */
    backdrop-filter: blur(12px);        /* Effet de flou "verre" */
    position: fixed;
    width: 100%;
    top: 0;
    z-index: 1000;
    border-bottom: 1px solid rgba(255,255,255,0.05);
    height: 70px;
    display: flex;
    align-items: center;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

.nav-container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    width: 100%;
}

.logo a {
    font-size: 1.4rem;
    font-weight: 800;
    letter-spacing: 1px;
    color: white;
    display: flex;
    align-items: center;
    gap: 10px;
}
.logo i { color: var(--primary); }

.nav-links { display: flex; gap: 25px; }
.nav-links a { 
    font-weight: 500; 
    font-size: 0.95rem; 
    color: var(--text-gray);
    position: relative;
}
.nav-links a:hover, .nav-links a.active { color: white; }

/* Soulignement au survol */
.nav-links a::after {
    content: '';
    position: absolute;
    width: 0;
    height: 2px;
    bottom: -5px;
    left: 0;
    background-color: var(--primary);
    transition: width 0.3s;
}
.nav-links a:hover::after { width: 100%; }

.auth-buttons { display: flex; gap: 10px; }

.btn-login {
    color: white;
    font-weight: 600;
    font-size: 0.9rem;
    padding: 8px 15px;
    border: 1px solid rgba(255,255,255,0.1);
    border-radius: 6px;
}
.btn-login:hover { background: rgba(255,255,255,0.05); }

.btn-register {
    background-color: var(--primary);
    color: white;
    padding: 8px 20px;
    border-radius: 6px;
    font-weight: 600;
    font-size: 0.9rem;
    box-shadow: 0 4px 15px rgba(99, 102, 241, 0.3);
}
.btn-register:hover { background-color: var(--primary-hover); transform: translateY(-1px); }

/* =========================================
   3. HERO SECTION (ACCUEIL)
   ========================================= */
.hero {
    padding-top: 140px; 
    padding-bottom: 80px;
    text-align: center;
    background: radial-gradient(circle at top, #1e293b 0%, #0f172a 60%);
}

.hero-content {
    max-width: 800px;
    margin: 0 auto;
}

/* Badge Trustpilot */
.trustpilot-badge {
    background: rgba(255,255,255,0.05);
    display: inline-block;
    padding: 5px 15px;
    border-radius: 20px;
    font-size: 0.9rem;
    margin-bottom: 20px;
    border: 1px solid rgba(255,255,255,0.1);
}
.stars { color: #00b67a; letter-spacing: 2px; }
.tp-bold { font-weight: 700; }

.hero h1 {
    font-size: 3.5rem;
    font-weight: 800;
    margin-bottom: 20px;
    line-height: 1.1;
}

.gradient-text {
    background: linear-gradient(to right, var(--primary), var(--accent));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.hero p {
    color: var(--text-gray);
    font-size: 1.2rem;
    margin-bottom: 40px;
}

.hero-buttons { display: flex; justify-content: center; gap: 15px; }

.btn-primary {
    background: var(--primary);
    color: white;
    padding: 12px 30px;
    border-radius: 8px;
    font-weight: 600;
    display: inline-flex;
    align-items: center;
    gap: 8px;
}
.btn-primary:hover { background: var(--primary-hover); box-shadow: 0 0 20px rgba(99, 102, 241, 0.4); }

.btn-secondary {
    background: transparent;
    border: 1px solid rgba(255,255,255,0.2);
    color: white;
    padding: 12px 30px;
    border-radius: 8px;
    font-weight: 600;
}
.btn-secondary:hover { background: rgba(255,255,255,0.1); border-color: white; }

/* =========================================
   4. BARRE DE FONCTIONNALITÉS (Icones)
   ========================================= */
.features-bar {
    background: #1e293b;
    border-top: 1px solid rgba(255,255,255,0.05);
    border-bottom: 1px solid rgba(255,255,255,0.05);
    padding: 25px 0;
}
.features-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 20px;
}
.feature-item {
    display: flex;
    align-items: center;
    gap: 15px;
    justify-content: center;
}
.feature-item i { font-size: 1.8rem; color: var(--primary); }
.feature-item h4 { font-size: 1rem; font-weight: 700; margin-bottom: 2px; }
.feature-item p { font-size: 0.85rem; color: var(--text-gray); line-height: 1.2; }

/* =========================================
   5. GRILLES & CARTES PRODUITS
   ========================================= */
.section-padding { padding: 80px 0; }
.bg-darker { background-color: #0b1120; } /* Fond alterné */

.section-header { text-align: center; margin-bottom: 50px; }
.section-title { font-size: 2.5rem; margin-bottom: 10px; }

.grid-3 {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
    gap: 30px;
}

.card {
    background: var(--bg-card);
    border: 1px solid rgba(255,255,255,0.05);
    border-radius: 16px;
    padding: 30px;
    position: relative;
    transition: transform 0.3s, box-shadow 0.3s;
    display: flex;
    flex-direction: column;
}

.card:hover {
    transform: translateY(-8px);
    border-color: var(--primary);
    box-shadow: 0 10px 40px rgba(0,0,0,0.3);
}

/* Badges (Populaire / Promo) */
.badge {
    position: absolute;
    top: -12px;
    right: 20px;
    background: var(--primary);
    padding: 5px 12px;
    border-radius: 20px;
    font-size: 0.8rem;
    font-weight: bold;
}
.badge-promo {
    position: absolute;
    top: -12px;
    right: 20px;
    background: var(--red);
    color: white;
    padding: 5px 12px;
    border-radius: 20px;
    font-size: 0.8rem;
    font-weight: bold;
}

.card h3 { font-size: 1.6rem; margin-bottom: 5px; }
.price { font-size: 2.2rem; font-weight: 700; margin: 20px 0; color: white; }
.price span { font-size: 1rem; color: var(--text-gray); font-weight: 400; }

.old-price {
    font-size: 1.2rem;
    color: var(--text-gray);
    text-decoration: line-through;
    margin-right: 10px;
}

/* Listes dans les cartes */
.features-list { margin-bottom: 20px; flex-grow: 1; }
.features-list li {
    margin-bottom: 10px;
    font-size: 0.95rem;
    color: var(--text-gray);
    display: flex;
    align-items: center;
    gap: 10px;
}
.features-list li i { color: var(--primary); font-size: 0.9rem; width: 20px; text-align: center; }

/* Boutons des cartes */
.btn-card {
    display: block;
    width: 100%;
    text-align: center;
    padding: 12px;
    background: rgba(255,255,255,0.05);
    color: white;
    border-radius: 8px;
    font-weight: 600;
    transition: 0.3s;
}
.btn-card:hover { background: white; color: black; }

.btn-outline {
    display: block; width: 100%; text-align: center;
    border: 1px solid rgba(255,255,255,0.2); padding: 12px;
    border-radius: 8px; color: white; transition: 0.3s;
}
.btn-outline:hover { border-color: var(--primary); background: rgba(99, 102, 241, 0.1); }

.full-width { width: 100%; display: block; text-align: center; }
.featured-card { border: 1px solid var(--primary); box-shadow: 0 0 20px rgba(99, 102, 241, 0.1); }

/* =========================================
   6. MENU DÉROULANT (ACCORDION)
   ========================================= */
.toggle-details {
    text-align: center;
    cursor: pointer;
    margin: 15px 0;
    color: var(--text-gray);
    font-size: 0.9rem;
    font-weight: 600;
    transition: 0.3s;
    padding: 8px;
    border-radius: 6px;
    border: 1px dashed rgba(255,255,255,0.15);
    background: rgba(255,255,255,0.02);
}

.toggle-details:hover {
    color: var(--primary);
    background: rgba(255,255,255,0.05);
    border-color: var(--primary);
}
.toggle-details i { margin-right: 5px; }

/* Contenu caché */
.details-content {
    display: none; /* Caché par défaut */
    background: rgba(15, 23, 42, 0.5);
    padding: 15px;
    border-radius: 8px;
    margin-bottom: 20px;
    font-size: 0.85rem;
    color: var(--text-gray);
    border-left: 3px solid var(--primary);
    box-shadow: inset 0 0 20px rgba(0,0,0,0.2);
}

.details-content.open {
    display: block;
    animation: fadeIn 0.4s ease;
}

/* Éléments de la liste cachée */
.details-content ul li {
    margin-bottom: 8px;
    list-style: none;
    display: flex;
    align-items: center;
    gap: 10px;
    padding-bottom: 5px;
    border-bottom: 1px solid rgba(255,255,255,0.03);
}
.details-content ul li:last-child { border-bottom: none; }
.details-content strong { color: var(--text-white); }

/* Animation d'apparition */
@keyframes fadeIn {
    from { opacity: 0; transform: translateY(-5px); }
    to { opacity: 1; transform: translateY(0); }
}

/* =========================================
   7. TABLEAU COMPARATIF
   ========================================= */
.specs-table-container {
    overflow-x: auto;
    border-radius: 12px;
    border: 1px solid rgba(255,255,255,0.1);
}

.specs-table {
    width: 100%;
    border-collapse: collapse;
    background: var(--bg-card);
    text-align: left;
    min-width: 600px; /* Force la largeur sur mobile */
}

.specs-table th {
    background: rgba(99, 102, 241, 0.2);
    color: white;
    padding: 15px 20px;
    font-size: 1rem;
    border-bottom: 2px solid var(--primary);
}

.specs-table td {
    padding: 15px 20px;
    color: var(--text-gray);
    border-bottom: 1px solid rgba(255,255,255,0.05);
}

.specs-table tr:nth-child(even) { background-color: rgba(255,255,255,0.02); }
.specs-table tr:hover { background-color: rgba(255,255,255,0.05); }

/* =========================================
   8. FOOTER (PIED DE PAGE)
   ========================================= */
footer {
    background: #0b1120;
    border-top: 1px solid rgba(255,255,255,0.05);
    padding-top: 60px;
    margin-top: 60px;
}

.footer-grid {
    display: grid;
    grid-template-columns: 2fr 1fr 1fr 1fr; /* Colonne 1 plus large */
    gap: 40px;
    margin-bottom: 50px;
}

.footer-col h3 { font-size: 1.2rem; margin-bottom: 20px; font-weight: 800; color: white; }
.footer-col h4 { font-size: 1rem; margin-bottom: 20px; color: white; font-weight: 600; }
.footer-col p { color: var(--text-gray); font-size: 0.9rem; line-height: 1.6; }

.footer-col ul li { margin-bottom: 10px; }
.footer-col ul li a { color: var(--text-gray); font-size: 0.9rem; }
.footer-col ul li a:hover { color: var(--primary); padding-left: 5px; }

.socials { display: flex; gap: 15px; margin-top: 20px; }
.socials a { color: var(--text-gray); font-size: 1.2rem; }
.socials a:hover { color: white; }

.footer-bottom {
    border-top: 1px solid rgba(255,255,255,0.05);
    padding: 20px 0;
    display: flex;
    justify-content: space-between;
    align-items: center;
    color: var(--text-gray);
    font-size: 0.85rem;
}

.payments { display: flex; gap: 15px; font-size: 1.5rem; color: white; opacity: 0.7; }


/* =========================================
   9. RESPONSIVE (MOBILE) & MENU HAMBURGER
   ========================================= */
.mobile-toggle {
    display: none !important; /* On FORCE à cacher sur PC */
    color: white;
    font-size: 1.8rem;
    cursor: pointer;
    z-index: 2000;
}

@media (max-width: 768px) {
    .hero h1 { font-size: 2.5rem; }
    .hero-buttons { flex-direction: column; }
    .footer-grid { grid-template-columns: 1fr; gap: 30px; }
    .footer-bottom { flex-direction: column; gap: 15px; text-align: center; }

    /* --- Corrections Header Mobile --- */
    .auth-buttons { display: none !important; }
    
    .logo a {
        font-size: 1.2rem !important;
        white-space: nowrap;
    }
    
    .nav-container { 
        justify-content: center; 
        position: relative; 
    }
    
    /* Bouton Hamburger */
    .mobile-toggle {
        display: block !important; /* On FORCE à afficher sur Mobile */
        position: absolute;
        right: 20px; 
        top: 50%;
        transform: translateY(-50%);
    }
    
    .nav-links { display: none; } /* Caché par défaut */
    
    /* Animation du menu */
    header {
        transition: height 0.3s ease, background 0.3s ease;
        overflow: hidden;
    }

    /* --- ÉTAT OUVERT (Menu plein écran) --- */
    header.menu-open {
        height: 100vh;
        background: rgba(15, 23, 42, 0.98);
        align-items: flex-start;
        padding-top: 15px;
    }
    
    header.menu-open .nav-container {
        flex-direction: column;
        align-items: center;
        width: 100%;
    }

    /* Repositionnement de la croix de fermeture */
    header.menu-open .mobile-toggle {
        top: 20px;
        right: 20px;
        transform: none;
    }

    header.menu-open nav {
        width: 100%;
        margin-top: 40px;
    }

    header.menu-open .nav-links {
        display: flex !important;
        flex-direction: column;
        gap: 25px;
        text-align: center;
    }

    header.menu-open .auth-buttons {
        display: flex !important;
        flex-direction: column;
        width: 80%;
        margin-top: 30px;
        gap: 15px;
    }

    header.menu-open .auth-buttons a {
        text-align: center;
        width: 100%;
    }
}

/* =========================================
   PAGE LÉGALE (CGV/CGU)
   ========================================= */

.legal-container {
    display: flex;
    gap: 50px;
    align-items: flex-start; /* Important pour le sticky */
}

/* Sidebar (Menu gauche) */
.legal-sidebar {
    width: 25%;
    position: sticky;
    top: 100px; /* Colle le menu en haut quand on scrolle */
    background: var(--bg-card);
    padding: 25px;
    border-radius: 12px;
    border: 1px solid rgba(255,255,255,0.05);
}

.legal-sidebar h3 {
    margin-bottom: 20px;
    color: white;
    font-size: 1.2rem;
    padding-bottom: 10px;
    border-bottom: 2px solid var(--primary);
}

.legal-sidebar ul li {
    margin-bottom: 12px;
}

.legal-sidebar ul li a {
    color: var(--text-gray);
    font-size: 0.95rem;
    display: block;
    padding: 5px 0;
}

.legal-sidebar ul li a:hover {
    color: var(--primary);
    transform: translateX(5px);
}

/* Contenu (Texte droite) */
.legal-content {
    width: 75%;
    background: var(--bg-card);
    padding: 40px;
    border-radius: 12px;
    border: 1px solid rgba(255,255,255,0.05);
}

.legal-article {
    margin-bottom: 50px;
    padding-bottom: 30px;
    border-bottom: 1px solid rgba(255,255,255,0.05);
}

.legal-article:last-child { border-bottom: none; }

.legal-article h2 {
    color: white;
    font-size: 1.8rem;
    margin-bottom: 20px;
}

.legal-article p {
    color: var(--text-gray);
    margin-bottom: 15px;
    text-align: justify;
}

/* Listes dans le texte */
.legal-list {
    margin-left: 20px;
    margin-bottom: 20px;
    list-style: disc;
    color: var(--text-gray);
}
.legal-list li { margin-bottom: 8px; }

/* Boîte d'avertissement */
.warning-box {
    background: rgba(239, 68, 68, 0.1); /* Fond rouge très léger */
    border-left: 4px solid var(--red);
    padding: 15px;
    border-radius: 4px;
    color: #fca5a5; /* Texte rouge clair */
}

/* RESPONSIVE MOBILE LÉGAL */
@media (max-width: 900px) {
    .legal-container {
        flex-direction: column;
    }
    .legal-sidebar {
        width: 100%;
        position: relative;
        top: 0;
        margin-bottom: 30px;
    }
    .legal-content {
        width: 100%;
        padding: 20px;
    }
}

/* =========================================
   PAGE WIKI & DOCUMENTATION
   ========================================= */

/* Barre de recherche */
.search-box {
    position: relative;
    max-width: 600px;
    margin: 30px auto 0 auto;
    display: flex;
    gap: 10px;
}

.search-box input {
    width: 100%;
    padding: 15px 15px 15px 50px; /* Espace à gauche pour la loupe */
    border-radius: 50px;
    border: 1px solid rgba(255,255,255,0.1);
    background: rgba(255,255,255,0.05);
    color: white;
    font-size: 1rem;
    outline: none;
    transition: 0.3s;
}

.search-box input:focus {
    background: rgba(255,255,255,0.1);
    border-color: var(--primary);
    box-shadow: 0 0 15px rgba(99, 102, 241, 0.3);
}

.search-icon {
    position: absolute;
    left: 20px;
    top: 50%;
    transform: translateY(-50%);
    color: var(--text-gray);
}

/* Cartes Wiki */
.wiki-card {
    text-align: left;
}

.wiki-icon {
    font-size: 2.5rem;
    color: var(--primary);
    margin-bottom: 20px;
    text-align: center;
}

.wiki-card h3 {
    text-align: center;
    margin-bottom: 25px;
}

.wiki-list li {
    margin-bottom: 12px;
    padding-bottom: 12px;
    border-bottom: 1px solid rgba(255,255,255,0.05);
}

.wiki-list li:last-child { border-bottom: none; }

.wiki-list li a {
    color: var(--text-gray);
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 0.95rem;
}

.wiki-list li a i {
    color: var(--accent);
    font-size: 0.8rem;
}

.wiki-list li a:hover {
    color: white;
    padding-left: 5px; /* Petit effet de mouvement */
}

/* Grille FAQ */
.faq-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(400px, 1fr));
    gap: 30px;
    margin-top: 30px;
}

.faq-item {
    background: var(--bg-card);
    padding: 30px;
    border-radius: 12px;
    border: 1px solid rgba(255,255,255,0.05);
}

.faq-item h4 {
    color: white;
    font-size: 1.1rem;
    margin-bottom: 15px;
}

.faq-item p {
    color: var(--text-gray);
    font-size: 0.9rem;
    line-height: 1.6;
}

@media (max-width: 768px) {
    .search-box { flex-direction: column; }
    .search-box input { width: 100%; }
    .faq-grid { grid-template-columns: 1fr; }
}