/**
 * HIGH-TECH 2026 - Theme CSS
 * Styles communs pour toutes les pages du redesign 2026
 */

/* ========================================
   CSS VARIABLES
   ======================================== */

:root {
    /* Couleurs High-Tech */
    --tech-yellow: #d4ff00;
    --tech-green: #6bff6b;
    --tech-green-dark: #4a9d4a;
    --tech-blue: #4dd4ff;
    --tech-purple: #a78bfa;
    --tech-pink: #ff4da6;

    /* Backgrounds */
    --bg-primary: #0a0a0f;
    --bg-secondary: #12121a;
    --bg-card: #1a1a28;
    --bg-elevated: #222235;

    /* Text */
    --text-primary: #f0f0f5;
    --text-secondary: #b8b8c8;
    --text-muted: #80808f;

    /* Gradients */
    --gradient-hero: linear-gradient(135deg, #667eea 0%, #764ba2 50%, #f093fb 100%);
    --gradient-card: linear-gradient(145deg, rgba(212, 255, 0, 0.05) 0%, rgba(107, 255, 107, 0.05) 100%);
    --gradient-yellow-green: linear-gradient(135deg, var(--tech-yellow) 0%, var(--tech-green) 100%);
    --gradient-blue-purple: linear-gradient(135deg, var(--tech-blue) 0%, var(--tech-purple) 100%);

    /* Glows */
    --glow-soft: 0 0 20px rgba(212, 255, 0, 0.15);
    --glow-yellow: 0 0 30px rgba(212, 255, 0, 0.3);
    --glow-blue: 0 0 30px rgba(77, 212, 255, 0.3);

    /* Spacing */
    --section-padding: 2rem;
    --container-max-width: 1800px;

    /* Border radius */
    --radius-sm: 12px;
    --radius-md: 20px;
    --radius-lg: 24px;
    --radius-full: 50px;

    /* Transitions */
    --transition-fast: 0.3s ease;
    --transition-smooth: 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

/* ========================================
   BASE RESET
   ======================================== */

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: 'Poppins', sans-serif;
    background: var(--bg-primary);
    color: var(--text-primary);
    overflow-x: hidden;
    position: relative;
    min-height: 100vh;
}

/* Background dynamique */
body::before {
    content: '';
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background:
        radial-gradient(circle at 20% 30%, rgba(102, 126, 234, 0.25) 0%, transparent 50%),
        radial-gradient(circle at 80% 70%, rgba(118, 75, 162, 0.25) 0%, transparent 50%),
        radial-gradient(circle at 50% 50%, rgba(212, 255, 0, 0.1) 0%, transparent 60%);
    z-index: 0;
    animation: bgPulse 15s ease-in-out infinite;
    pointer-events: none;
}

body::after {
    content: '';
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-image:
        radial-gradient(circle at 15% 20%, rgba(212, 255, 0, 0.18) 0%, transparent 30%),
        radial-gradient(circle at 85% 80%, rgba(107, 255, 107, 0.18) 0%, transparent 30%),
        radial-gradient(circle at 70% 30%, rgba(167, 139, 250, 0.15) 0%, transparent 25%),
        radial-gradient(circle at 40% 60%, rgba(77, 212, 255, 0.12) 0%, transparent 28%);
    z-index: 0;
    animation: shapesMove 20s ease-in-out infinite alternate;
    pointer-events: none;
}

@keyframes bgPulse {
    0%, 100% { opacity: 0.8; transform: scale(1); }
    50% { opacity: 1; transform: scale(1.08); }
}

@keyframes shapesMove {
    0% { transform: translate(0, 0) rotate(0deg); }
    100% { transform: translate(30px, -30px) rotate(8deg); }
}

/* ========================================
   TYPOGRAPHY
   ======================================== */

h1, h2, h3, h4 {
    font-family: 'Orbitron', sans-serif;
}

.gradient-text {
    background: var(--gradient-yellow-green);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

/* ========================================
   HEADER
   ======================================== */

.header {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 1000;
    background: rgba(10, 10, 15, 0.8);
    backdrop-filter: blur(20px);
    border-bottom: 1px solid rgba(212, 255, 0, 0.2);
    box-shadow: 0 4px 30px rgba(0, 0, 0, 0.3);
    transition: var(--transition-fast);
}

.nav-container {
    max-width: var(--container-max-width);
    margin: 0 auto;
    padding: 1.2rem 3rem;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 2rem;
}

.logo-section {
    display: flex;
    align-items: center;
    gap: 1rem;
    cursor: pointer;
    text-decoration: none;
}

.logo {
    width: 50px;
    height: 50px;
    border: 2px solid var(--tech-yellow);
    border-radius: var(--radius-sm);
    box-shadow: var(--glow-yellow);
    transition: var(--transition-smooth);
}

.logo:hover {
    transform: scale(1.08) rotate(-5deg);
    box-shadow: 0 0 30px rgba(212, 255, 0, 0.5);
}

.logo-text {
    font-family: 'Orbitron', sans-serif;
    font-size: 1.8rem;
    font-weight: 700;
    background: var(--gradient-yellow-green);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.nav-links {
    display: flex;
    gap: 0.5rem;
}

.nav-link {
    color: var(--text-secondary);
    text-decoration: none;
    padding: 0.7rem 1.5rem;
    font-weight: 500;
    font-size: 0.95rem;
    border-radius: var(--radius-sm);
    transition: var(--transition-fast);
    position: relative;
}

.nav-link:hover {
    color: var(--tech-yellow);
    background: rgba(212, 255, 0, 0.05);
    transform: translateY(-2px);
}

.nav-link.active {
    color: var(--tech-yellow);
    background: rgba(212, 255, 0, 0.1);
}

/* ========================================
   BUTTONS
   ======================================== */

.btn {
    padding: 1rem 2.5rem;
    border-radius: var(--radius-full);
    font-weight: 600;
    font-size: 1rem;
    text-decoration: none;
    transition: var(--transition-smooth);
    cursor: pointer;
    border: none;
    position: relative;
    overflow: hidden;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
}

.btn::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%) scale(0);
    width: 300px;
    height: 300px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 50%;
    transition: transform 0.6s ease;
}

.btn:hover::before {
    transform: translate(-50%, -50%) scale(1);
}

.btn-primary {
    background: var(--gradient-yellow-green);
    color: var(--bg-primary);
    box-shadow: 0 10px 30px rgba(212, 255, 0, 0.3);
}

.btn-primary:hover {
    transform: translateY(-3px);
    box-shadow: 0 15px 40px rgba(212, 255, 0, 0.4);
}

.btn-secondary {
    background: var(--bg-card);
    border: 1px solid rgba(212, 255, 0, 0.3);
    color: var(--text-primary);
}

.btn-secondary:hover {
    background: rgba(212, 255, 0, 0.1);
    transform: translateY(-3px);
}

.btn-outline {
    background: rgba(212, 255, 0, 0.1);
    border: 1px solid var(--tech-yellow);
    color: var(--tech-yellow);
}

.btn-outline:hover {
    background: var(--tech-yellow);
    color: var(--bg-primary);
}

/* ========================================
   CARDS
   ======================================== */

.card {
    background: var(--bg-card);
    border-radius: var(--radius-lg);
    border: 1px solid rgba(255, 255, 255, 0.05);
    transition: var(--transition-smooth);
    position: relative;
    overflow: hidden;
}

.card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: var(--gradient-card);
    opacity: 0;
    transition: opacity 0.5s ease;
    z-index: 0;
}

.card:hover {
    transform: translateY(-8px);
    border-color: rgba(212, 255, 0, 0.3);
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3), 0 0 40px rgba(212, 255, 0, 0.15);
}

.card:hover::before {
    opacity: 1;
}

.card-content {
    position: relative;
    z-index: 1;
}

/* ========================================
   SECTIONS
   ======================================== */

.section {
    padding: var(--section-padding);
    position: relative;
    z-index: 1;
}

.section-header {
    text-align: center;
    margin-bottom: 2.5rem;
}

.section-title {
    font-family: 'Orbitron', sans-serif;
    font-size: clamp(2rem, 5vw, 3.5rem);
    font-weight: 700;
    margin-bottom: 1rem;
    background: var(--gradient-yellow-green);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.section-subtitle {
    color: var(--text-secondary);
    font-size: 1.1rem;
}

.container {
    max-width: var(--container-max-width);
    margin: 0 auto;
    padding: 0 1rem;
}

/* ========================================
   FOOTER
   ======================================== */

.footer {
    background: var(--bg-secondary);
    border-top: 1px solid rgba(212, 255, 0, 0.2);
    padding: 3rem 3rem 2rem;
    margin-top: 3rem;
    position: relative;
    z-index: 1;
}

.footer-content {
    max-width: var(--container-max-width);
    margin: 0 auto;
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 3rem;
    margin-bottom: 2rem;
}

.footer-section h3 {
    font-family: 'Orbitron', sans-serif;
    color: var(--tech-yellow);
    font-size: 1.2rem;
    margin-bottom: 1.5rem;
}

.footer-links {
    list-style: none;
}

.footer-links li {
    margin-bottom: 0.8rem;
}

.footer-links a {
    color: var(--text-secondary);
    text-decoration: none;
    transition: var(--transition-fast);
    display: inline-block;
}

.footer-links a:hover {
    color: var(--tech-yellow);
    transform: translateX(5px);
}

.footer-bottom {
    text-align: center;
    padding-top: 2rem;
    border-top: 1px solid rgba(255, 255, 255, 0.05);
    color: var(--text-muted);
}

/* ========================================
   SCROLL TO TOP
   ======================================== */

.scroll-top {
    position: fixed;
    bottom: 2rem;
    right: 2rem;
    width: 55px;
    height: 55px;
    background: var(--bg-card);
    border: 2px solid var(--tech-yellow);
    color: var(--tech-yellow);
    border-radius: 50%;
    font-size: 1.5rem;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    opacity: 0;
    transform: translateY(100px);
    transition: var(--transition-smooth);
    z-index: 999;
}

.scroll-top.visible {
    opacity: 1;
    transform: translateY(0);
}

.scroll-top:hover {
    background: var(--tech-yellow);
    color: var(--bg-primary);
    transform: translateY(-5px);
}

/* ========================================
   BADGES
   ======================================== */

.badge {
    display: inline-block;
    padding: 0.3rem 0.8rem;
    border-radius: var(--radius-full);
    font-size: 0.8rem;
    font-weight: 600;
}

.badge-hot {
    background: linear-gradient(135deg, #ff6b6b, #ffd700);
    color: white;
}

.badge-new {
    background: var(--gradient-blue-purple);
    color: white;
}

.badge-promo {
    background: linear-gradient(135deg, var(--tech-pink), #ff6b6b);
    color: white;
}

/* ========================================
   LOADING STATES
   ======================================== */

.loading {
    text-align: center;
    padding: 3rem;
    color: var(--text-muted);
}

.loading-spinner {
    width: 50px;
    height: 50px;
    border: 3px solid rgba(212, 255, 0, 0.1);
    border-top-color: var(--tech-yellow);
    border-radius: 50%;
    animation: spin 1s linear infinite;
    margin: 0 auto 1rem;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

/* ========================================
   RESPONSIVE
   ======================================== */

@media (max-width: 1024px) {
    .nav-container {
        padding: 1rem 2rem;
    }
}

@media (max-width: 768px) {
    /* MOBILE ULTRA COMPACT */

    /* Reset global */
    * {
        box-sizing: border-box !important;
        word-break: break-word !important;
        overflow-wrap: anywhere !important;
    }

    html {
        font-size: 12px !important;
    }

    body {
        font-size: 12px !important;
        padding: 0 !important;
        margin: 0 !important;
    }

    /* Navigation ultra compacte */
    .nav-links { display: none !important; }

    .header, header {
        padding: 0 !important;
        height: 28px !important;
        min-height: 28px !important;
        max-height: 28px !important;
    }

    .nav-container {
        padding: 0.1rem 0.3rem !important;
        height: 28px !important;
    }

    .logo, .logo svg {
        width: 18px !important;
        height: 18px !important;
        min-width: 18px !important;
    }

    .logo-text {
        font-size: 0.5rem !important;
        white-space: nowrap;
    }

    .logo-section {
        gap: 0.15rem !important;
    }

    /* Main - padding top réduit */
    main {
        padding-top: 32px !important;
        padding-left: 0.2rem !important;
        padding-right: 0.2rem !important;
    }

    .container, .products-container, .comparatif-container, section {
        padding: 0.25rem !important;
        margin: 0 !important;
        max-width: 100vw !important;
        overflow-x: hidden !important;
    }

    /* Tous les titres centrés et petits */
    h1, .page-title, .hero-title {
        font-size: 0.9rem !important;
        text-align: center !important;
        margin: 0.25rem 0 !important;
        line-height: 1.2 !important;
    }

    h2, .section-title, .section-header h2 {
        font-size: 0.75rem !important;
        text-align: center !important;
        margin: 0.2rem 0 !important;
    }

    h3 {
        font-size: 0.6rem !important;
        text-align: center !important;
    }

    p, span, li, a {
        font-size: 0.55rem !important;
        line-height: 1.25 !important;
    }

    /* GRILLES - 2 colonnes serrées */
    .products-grid, .compare-grid, .categories-grid, .stats-grid, .steps-grid {
        display: grid !important;
        grid-template-columns: 1fr 1fr !important;
        gap: 0.2rem !important;
        padding: 0.2rem !important;
    }

    /* CARTES - ultra compactes */
    .product-card, .compare-card, .category-card, .stat-card, .step-card {
        padding: 0.25rem !important;
        margin: 0 !important;
        border-radius: 6px !important;
        text-align: center !important;
    }

    /* Images produits petites */
    .product-card picture, .compare-card picture {
        display: block !important;
        width: 100% !important;
    }
    .product-card img, .compare-card img, .product-image img {
        max-height: 50px !important;
        max-width: 50px !important;
        width: auto !important;
        height: auto !important;
        margin: 0 auto 0.15rem !important;
        display: block !important;
        object-fit: contain !important;
    }

    /* Titres produits - 2 lignes max */
    .product-title, .compare-card-title, .product-card h3 {
        font-size: 0.55rem !important;
        line-height: 1.15 !important;
        max-height: 2.3em !important;
        overflow: hidden !important;
        display: -webkit-box !important;
        -webkit-line-clamp: 2 !important;
        -webkit-box-orient: vertical !important;
        margin: 0.1rem 0 !important;
    }

    /* Prix visible */
    .product-price, .price-value, .price {
        font-size: 0.65rem !important;
        font-weight: 700 !important;
        color: var(--tech-green) !important;
    }

    /* Catégorie petite */
    .product-category, .compare-card-category, .category {
        font-size: 0.45rem !important;
        margin: 0.1rem 0 !important;
    }

    /* Descriptions masquées */
    .product-description, .compare-card-description, .description {
        display: none !important;
    }

    /* Badges mini */
    .badge, .tag, .product-badges span, .product-badge {
        font-size: 0.4rem !important;
        padding: 0.05rem 0.15rem !important;
        border-radius: 2px !important;
    }

    .product-badges {
        gap: 0.1rem !important;
        justify-content: center !important;
        margin: 0.1rem 0 !important;
    }

    /* Boutons ultra-compacts mobile */
    .btn, button, .product-actions .btn {
        padding: 0.15rem 0.25rem !important;
        font-size: 0.4rem !important;
        min-height: 18px !important;
        max-height: 22px !important;
        border-radius: 3px !important;
        line-height: 1 !important;
    }

    .product-actions {
        display: flex !important;
        gap: 0.15rem !important;
        margin-top: 0.2rem !important;
    }

    .product-actions .btn {
        flex: 1 !important;
    }

    /* Recherche */
    .search-input, .search-bar input, input[type="search"], input[type="text"] {
        font-size: 16px !important; /* évite zoom iOS */
        padding: 0.3rem 0.5rem !important;
        height: 32px !important;
    }

    /* Filtres en ligne */
    .filters-container, .filters-section, .category-filters, .filter-group {
        display: flex !important;
        flex-wrap: wrap !important;
        justify-content: center !important;
        gap: 0.15rem !important;
        padding: 0.2rem !important;
    }

    .filter-btn, .category-btn {
        padding: 0.2rem 0.35rem !important;
        font-size: 0.45rem !important;
        border-radius: 3px !important;
    }

    /* Hero ultra minimaliste */
    .hero, .hero-section {
        padding: 0.3rem 0.2rem !important;
        min-height: auto !important;
    }

    .hero-content {
        padding: 0 !important;
    }

    .hero-badge {
        font-size: 0.4rem !important;
        padding: 0.1rem 0.2rem !important;
        margin-bottom: 0.15rem !important;
        display: inline-block !important;
    }

    .hero-title {
        font-size: 0.8rem !important;
        margin: 0.15rem 0 !important;
    }

    .hero-subtitle {
        font-size: 0.5rem !important;
        margin: 0.1rem 0 !important;
        line-height: 1.2 !important;
    }

    .hero-subtitle br {
        display: none !important;
    }

    .hero-cta {
        flex-direction: row !important;
        flex-wrap: wrap !important;
        gap: 0.2rem !important;
        margin-top: 0.2rem !important;
        justify-content: center !important;
    }

    .hero-cta .btn {
        flex: 1 1 45% !important;
        padding: 0.1rem 0.2rem !important;
        font-size: 0.35rem !important;
        min-height: 16px !important;
        max-height: 20px !important;
    }

    /* News/Annonces compactes */
    .news-section, .news-card, .news-content {
        padding: 0.2rem !important;
    }

    .news-title {
        font-size: 0.55rem !important;
    }

    .news-text, .news-description {
        font-size: 0.45rem !important;
        display: -webkit-box !important;
        -webkit-line-clamp: 2 !important;
        -webkit-box-orient: vertical !important;
        overflow: hidden !important;
    }

    .news-badge {
        font-size: 0.35rem !important;
        padding: 0.05rem 0.15rem !important;
    }

    /* Stats ultra compactes */
    .stats-grid {
        grid-template-columns: repeat(4, 1fr) !important;
        gap: 0.15rem !important;
    }

    .stat-card {
        padding: 0.2rem !important;
        min-height: auto !important;
    }

    .stat-value {
        font-size: 0.6rem !important;
        line-height: 1 !important;
        margin: 0 !important;
    }

    .stat-label {
        font-size: 0.35rem !important;
        line-height: 1 !important;
        margin: 0 !important;
    }

    .stat-icon {
        font-size: 0.5rem !important;
        margin-bottom: 0.1rem !important;
    }

    /* Categories compactes */
    .category-icon {
        font-size: 0.8rem !important;
    }

    .category-card h3, .category-name {
        font-size: 0.45rem !important;
    }

    /* Actions bar en bas */
    .actions-bar {
        display: flex !important;
        flex-wrap: wrap !important;
        justify-content: center !important;
        gap: 0.2rem !important;
        padding: 0.25rem !important;
    }

    .actions-bar .btn {
        flex: 1 1 48% !important;
    }

    /* Footer ultra-compact */
    .footer, footer {
        padding: 0.3rem 0.2rem !important;
        margin-top: 0.5rem !important;
    }

    .footer-content {
        display: none !important;
    }

    .footer-bottom {
        padding: 0.2rem 0 !important;
        border: none !important;
    }

    .footer-bottom p {
        font-size: 0.3rem !important;
        line-height: 1.2 !important;
    }

    /* Scroll top mini */
    .scroll-top {
        bottom: 5px !important;
        right: 5px !important;
        width: 22px !important;
        height: 22px !important;
        font-size: 0.5rem !important;
    }

    /* Compare bar fixe en bas */
    .compare-bar {
        flex-direction: column;
        gap: 0.4rem;
        padding: 0.5rem;
        border-radius: 0;
    }
}

/* ========================================
   UTILITIES
   ======================================== */

.text-center { text-align: center; }
.text-left { text-align: left; }
.text-right { text-align: right; }

.mt-1 { margin-top: 0.5rem; }
.mt-2 { margin-top: 1rem; }
.mt-3 { margin-top: 1.5rem; }
.mt-4 { margin-top: 2rem; }

.mb-1 { margin-bottom: 0.5rem; }
.mb-2 { margin-bottom: 1rem; }
.mb-3 { margin-bottom: 1.5rem; }
.mb-4 { margin-bottom: 2rem; }

.hidden { display: none !important; }
.visible { display: block !important; }
