/* =============================================================
   UltimatePlugins - Feuille de Style Principale Entière
   Charte Graphique : Dark Theme / Alignement Asymétrique Droite
   ============================================================= */

:root {
    --bg-main: #0B0E14;
    --bg-surface: #131822;
    --bg-surface-alt: #1A2130;
    --primary: #00D2FF;
    --primary-glow: rgba(0, 210, 255, 0.15);
    --text-main: #F1F5F9;
    --text-muted: #94A3B8;
    --text-white: #FFFFFF;
    --border-color: #222C3F;
    --font-sans: 'Inter', sans-serif;
    --font-display: 'Space Grotesk', sans-serif;
    --max-width: 1200px;
    --transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

/* =============================================================
   1. Reset de Base & Polices globales
   ============================================================= */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    scroll-behavior: smooth;
}

body {
    background-color: var(--bg-main);
    color: var(--text-main);
    font-family: var(--font-sans);
    line-height: 1.6;
    overflow-x: hidden;
    -webkit-font-smoothing: antialiased;
}

a {
    text-decoration: none;
    color: inherit;
    transition: var(--transition);
}

/* =============================================================
   2. Architecture du Header (Logo à Gauche, Tout le reste à Droite)
   ============================================================= */
.main-header {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    z-index: 1000;
    background-color: rgba(11, 14, 20, 0.85);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border-bottom: 1px solid var(--border-color);
}

.header-container {
    max-width: var(--max-width);
    margin: 0 auto;
    padding: 16px 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.logo {
    font-family: var(--font-display);
    font-size: 22px;
    font-weight: 700;
    color: var(--text-white);
    display: flex;
    align-items: center;
    gap: 10px;
    letter-spacing: -0.5px;
    flex-shrink: 0;
}

.logo span { color: var(--primary); }
.logo-icon {
    color: var(--primary);
    filter: drop-shadow(0 0 8px var(--primary));
}

.nav-menu {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    flex-grow: 1;
}

.nav-right-wrapper {
    display: flex;
    align-items: center;
    gap: 40px;
}

.nav-links-center {
    display: flex;
    align-items: center;
    gap: 28px;
}

.nav-link {
    font-size: 14px;
    font-weight: 500;
    color: var(--text-muted);
    position: relative;
    padding: 6px 0;
}

.nav-link:hover, .nav-link.active { 
    color: var(--text-white); 
}

.nav-link::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 50%;
    width: 0;
    height: 1.5px;
    background-color: var(--primary);
    transition: var(--transition);
    transform: translateX(-50%);
}

.nav-link:hover::after, .nav-link.active::after {
    width: 100%;
}

/* --- STRUCTURE ET STYLE DU PANIER COMPACT DANS LE HEADER --- */
.header-cart-wrapper {
    display: flex;
    align-items: center;
}

.btn-cart-header {
    background-color: rgba(20, 26, 38, 0.6);
    border: 1px solid var(--border-color);
    color: var(--text-main);
    padding: 9px 16px;
    border-radius: 8px;
    font-size: 13px;
    font-weight: 500;
    display: flex;
    align-items: center;
    gap: 10px;
    cursor: pointer;
    transition: var(--transition);
    position: relative;
}

.btn-cart-header i { 
    color: var(--primary); 
    font-size: 14px; 
}

.btn-cart-header:hover {
    background-color: var(--bg-surface-alt);
    border-color: rgba(0, 210, 255, 0.3);
    color: var(--text-white);
    transform: translateY(-1px);
}

.cart-badge {
    background: var(--primary);
    color: var(--bg-main);
    font-size: 10px;
    font-weight: 700;
    padding: 1px 6px;
    border-radius: 5px;
    min-width: 16px;
    text-align: center;
    box-shadow: 0 0 10px rgba(0, 210, 255, 0.3);
    transition: all 0.2s ease;
}

/* --- RESTE DES ACTIONS DU HEADER --- */
.header-actions-group {
    display: flex;
    align-items: center;
    gap: 14px;
}

.nav-btn {
    background-image: linear-gradient(135deg, rgba(0, 210, 255, 0.15) 0%, rgba(0, 210, 255, 0.05) 100%);
    color: var(--primary);
    padding: 9px 18px;
    border-radius: 8px;
    font-size: 13px;
    font-weight: 600;
    border: 1px solid rgba(0, 210, 255, 0.2);
    display: flex;
    align-items: center;
    gap: 8px;
}

.nav-btn:hover {
    background-image: linear-gradient(135deg, var(--primary) 0%, #00A2C4 100%);
    color: var(--bg-main);
    box-shadow: 0 0 20px rgba(0, 210, 255, 0.35);
    border-color: var(--primary);
    transform: translateY(-1px);
}

.burger-menu {
    display: none;
    background: none;
    border: none;
    cursor: pointer;
    width: 28px;
    height: 20px;
    position: relative;
    z-index: 1001;
}

.burger-menu span {
    display: block;
    width: 100%;
    height: 2px;
    background-color: var(--text-main);
    border-radius: 2px;
    position: absolute;
    transition: var(--transition);
}
.burger-menu span:nth-child(1) { top: 0; }
.burger-menu span:nth-child(2) { top: 9px; }
.burger-menu span:nth-child(3) { top: 18px; }

/* =============================================================
   3. Section Accueil (Hero) & Image arquée intégrée
   ============================================================= */
.hero-section {
    position: relative;
    min-height: 85vh;
    padding-top: 140px;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    z-index: 1;
}

.hero-bg-arc {
    position: absolute;
    top: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 150vw;
    height: 75vh;
    /* Intégration chirurgicale de l'image de fond dans la courbure */
    background-image: 
        linear-gradient(180deg, rgba(11, 14, 20, 0) 40%, rgba(11, 14, 20, 1) 100%),
        radial-gradient(circle at center, rgba(0, 210, 255, 0.15) 0%, rgba(11, 14, 20, 0.4) 70%),
        url('../img/index.png');
    background-size: cover;
    background-position: center top;
    background-repeat: no-repeat;
    border-radius: 0 0 50% 50% / 0 0 100% 100%;
    z-index: -1;
    border-bottom: 1px solid rgba(0, 210, 255, 0.15);
    box-shadow: inset 0 -20px 30px rgba(11, 14, 20, 0.8);
}

.hero-container { max-width: 850px; padding: 0 24px; }
.hero-badge {
    display: inline-block;
    background-color: rgba(0, 210, 255, 0.08);
    border: 1px solid rgba(0, 210, 255, 0.15);
    color: var(--primary);
    padding: 6px 16px;
    border-radius: 30px;
    font-size: 11px;
    font-weight: 600;
    letter-spacing: 1px;
    margin-bottom: 24px;
    font-family: var(--font-display);
}

.hero-section h1 {
    font-family: var(--font-display);
    font-size: 54px;
    font-weight: 700;
    line-height: 1.15;
    color: var(--text-white);
    letter-spacing: -1.5px;
    margin-bottom: 24px;
}

.hero-section p { font-size: 18px; color: var(--text-muted); margin-bottom: 40px; max-width: 700px; margin-left: auto; margin-right: auto; }
.hero-actions { display: flex; justify-content: center; gap: 16px; }
.cta-primary { background-color: var(--primary); color: var(--bg-main); padding: 14px 28px; border-radius: 8px; font-size: 15px; font-weight: 600; box-shadow: 0 4px 25px rgba(0, 210, 255, 0.3); }
.cta-primary:hover { transform: translateY(-2px); box-shadow: 0 6px 30px rgba(0, 210, 255, 0.5); }
.cta-secondary { background-color: transparent; color: var(--text-main); padding: 14px 28px; border-radius: 8px; font-size: 15px; font-weight: 500; border: 1px solid var(--border-color); }
.cta-secondary:hover { background-color: rgba(255, 255, 255, 0.03); border-color: var(--text-muted); transform: translateY(-2px); }

/* =============================================================
   4. Section de Contenu (Grilles & Structures de Cartes)
   ============================================================= */
.section-container { max-width: var(--max-width); margin: 0 auto; padding: 100px 24px; }
.section-header { text-align: center; margin-bottom: 60px; }
.section-header h2 { font-family: var(--font-display); font-size: 36px; font-weight: 700; color: var(--text-white); margin-bottom: 12px; }
.section-header h2 span { color: var(--primary); }
.section-header p { color: var(--text-muted); font-size: 16px; }

.plugins-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 30px; }
.plugin-card { background-color: var(--bg-surface); border: 1px solid var(--border-color); border-radius: 16px; padding: 32px; position: relative; display: flex; flex-direction: column; justify-content: space-between; }
.plugin-card:hover { border-color: rgba(0, 210, 255, 0.3); transform: translateY(-4px); box-shadow: 0 12px 30px rgba(11, 14, 20, 0.5); }
.plugin-card.featured { border-color: rgba(0, 210, 255, 0.4); background-image: linear-gradient(135deg, var(--bg-surface) 0%, rgba(0, 210, 255, 0.02) 100%); }
.card-badge { position: absolute; top: 24px; right: 24px; background-color: var(--primary); color: var(--bg-main); font-size: 11px; font-weight: 700; text-transform: uppercase; padding: 4px 10px; border-radius: 4px; font-family: var(--font-display); }
.card-icon { font-size: 32px; color: var(--primary); margin-bottom: 24px; }
.plugin-card h3 { font-family: var(--font-display); font-size: 22px; font-weight: 700; color: var(--text-white); margin-bottom: 12px; }
.plugin-card .description { color: var(--text-muted); font-size: 14px; line-height: 1.6; margin-bottom: 24px; flex-grow: 1; }
.tech-tags { display: flex; gap: 12px; margin-bottom: 28px; }
.tech-tags span { background-color: var(--bg-surface-alt); border: 1px solid var(--border-color); color: var(--text-main); padding: 4px 12px; border-radius: 6px; font-size: 12px; font-weight: 500; display: flex; align-items: center; gap: 6px; }
.card-footer { display: flex; align-items: center; justify-content: space-between; padding-top: 20px; border-top: 1px solid var(--border-color); gap: 10px; }
.card-footer .price { font-family: var(--font-display); font-size: 20px; font-weight: 700; color: var(--text-white); display: flex; flex-direction: column; }
.card-footer .price small { font-family: var(--font-sans); font-size: 11px; color: var(--text-muted); }
.view-btn { background-color: var(--bg-surface-alt); color: var(--text-white); padding: 10px 16px; border-radius: 8px; font-size: 13px; font-weight: 600; border: 1px solid var(--border-color); display: flex; align-items: center; gap: 8px; }
.plugin-card:hover .view-btn { background-color: var(--primary); color: var(--bg-main); border-color: var(--primary); }

/* =============================================================
   5. Section Atouts / Pied de page (Footer)
   ============================================================= */
.info-section { background-color: var(--bg-surface); border-top: 1px solid var(--border-color); border-bottom: 1px solid var(--border-color); padding: 100px 24px; }
.info-grid { max-width: var(--max-width); margin: 0 auto; display: grid; grid-template-columns: repeat(3, 1fr); gap: 40px; }
.info-box { background-color: var(--bg-main); border: 1px solid var(--border-color); padding: 40px 32px; border-radius: 12px; }
.info-icon { font-size: 28px; color: var(--primary); margin-bottom: 20px; }
.info-box h4 { font-family: var(--font-display); font-size: 18px; font-weight: 700; color: var(--text-white); margin-bottom: 12px; }
.info-box p { color: var(--text-muted); font-size: 14px; }

.main-footer { background-color: var(--bg-main); padding: 80px 24px 40px 24px; border-top: 1px solid var(--border-color); }
.footer-container { max-width: var(--max-width); margin: 0 auto; display: grid; grid-template-columns: 2fr repeat(2, 1fr); gap: 60px; margin-bottom: 60px; }
.footer-brand p { color: var(--text-muted); font-size: 14px; margin-top: 16px; max-width: 360px; }
.social-links { display: flex; gap: 16px; margin-top: 24px; }
.social-links a { width: 40px; height: 40px; border-radius: 50%; background-color: var(--bg-surface); border: 1px solid var(--border-color); color: var(--text-muted); display: flex; align-items: center; justify-content: center; }
.social-links a:hover { color: var(--bg-main); background-color: var(--primary); border-color: var(--primary); transform: translateY(-2px); }
.footer-links-group { display: flex; flex-direction: column; gap: 14px; }
.footer-links-group h4 { font-family: var(--font-display); font-size: 16px; font-weight: 700; color: var(--text-white); margin-bottom: 8px; }
.footer-links-group a { color: var(--text-muted); font-size: 14px; }
.footer-links-group a:hover { color: var(--primary); padding-left: 4px; }
.footer-bottom { max-width: var(--max-width); margin: 0 auto; padding-top: 30px; border-top: 1px solid var(--border-color); text-align: center; color: var(--text-muted); font-size: 13px; }

/* =============================================================
   6. Déclinaison Responsive Mobile & Sécurités Réactives
   ============================================================= */
@media (max-width: 768px) {
    /* Sécurité stricte anti-glissement : Supprime le scroll horizontal */
    html, body {
        overflow-x: hidden !important;
        width: 100%;
        position: relative;
    }

    /* Activation du bouton Burger */
    .burger-menu { 
        display: block !important; 
        position: relative;
        z-index: 999999 !important;
    }

    /* Animation croisée en croix (X) au clic du JS (.active) */
    .burger-menu.active span:nth-child(1) { 
        transform: translateY(9px) rotate(45deg); 
        background-color: var(--primary); 
    }
    .burger-menu.active span:nth-child(2) { 
        opacity: 0; 
    }
    .burger-menu.active span:nth-child(3) { 
        transform: translateY(-9px) rotate(-45deg); 
        background-color: var(--primary); 
    }

    /* Menu de navigation mobile coulissant hermétique */
    .nav-menu {
        position: fixed;
        top: 0;
        right: -100%; /* Complètement masqué hors de l'écran à droite */
        width: 78%;
        max-width: 340px;
        height: 100vh;
        background-color: var(--bg-surface);
        border-left: 1px solid var(--border-color);
        padding: 0 !important;
        transition: var(--transition);
        box-shadow: -10px 0 30px rgba(0,0,0,0.5);
        z-index: 999998;
        visibility: hidden;
    }

    /* Transition d'entrée fluide provoquée par le JavaScript */
    .nav-menu.active { 
        right: 0 !important; 
        visibility: visible;
    }

    /* Alignements verticaux internes pour le volet mobile */
    .nav-right-wrapper {
        flex-direction: column;
        align-items: flex-start;
        justify-content: flex-start;
        padding: 110px 32px;
        gap: 35px;
        width: 100%;
    }

    .nav-links-center {
        flex-direction: column;
        align-items: flex-start;
        gap: 22px;
        width: 100%;
    }

    .nav-link {
        font-size: 17px;
        font-weight: 600;
        width: 100%;
        padding-bottom: 8px;
        border-bottom: 1px solid rgba(255, 255, 255, 0.03);
    }

    .header-cart-wrapper {
        width: 100%;
    }

    .header-actions-group {
        flex-direction: column;
        width: 100%;
        gap: 16px;
    }

    .btn-cart-header, .nav-btn {
        width: 100%;
        justify-content: center;
        font-size: 15px;
        padding: 12px;
    }

    /* Grilles adaptatives */
    .hero-section h1 { font-size: 36px; }
    .hero-section p { font-size: 15px; }
    .hero-actions { flex-direction: column; gap: 12px; }
    .plugins-grid, .info-grid, .footer-container { grid-template-columns: 1fr; gap: 30px; }
}