
/* ========================================
   SPACEWARE - STYLES CSS RESTRUCTURÉS
   ======================================== */

/* ========================================
   1. VARIABLES CSS ET CONFIGURATION
   ======================================== */

:root {
    /* Variables principales */
    --primary: #ff1a1a;
    --primary-hover: #e60000;
    --primary-transparent: rgba(255, 26, 26, 0.1);
    --transition: all 0.3s cubic-bezier(0.25, 0.8, 0.25, 1);
    
    /* Variables du thème clair (par défaut) */
    --dark: #2a2a2a;
    --gray: #444444;
    --light-gray: #555555;
    --bg-light: #f5f5f5;
    --text-dark: #212121;
    --white: #ffffff;
    --border-color: #e0e0e0;
    
    /* Variables de référence pour le thème actif */
    --text-color: var(--text-dark);
    --bg-color: var(--bg-light);
    --card-bg: var(--white);
    --header-bg: rgba(42, 42, 42, 0.85);
    --footer-bg: var(--dark);
    --header-height: 70px;
}

/* Configuration du mode sombre */
body.dark-mode {
    --dark: #1a1a1a;
    --gray: #333333;
    --light-gray: #444444;
    --bg-light: var(--dark);
    --text-dark: #f5f5f5;
    --border-color: #444444;
    --text-color: #f5f5f5;
    --bg-color: var(--dark);
    --card-bg: var(--gray);
    --header-bg: rgba(26, 26, 26, 0.85);
    --footer-bg: #121212;
}

/* ========================================
   2. RESET ET STYLES DE BASE
   ======================================== */

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
}

html {
    scroll-behavior: smooth;
    scrollbar-width: thin;
    scrollbar-color: var(--primary) var(--dark);
}

::-webkit-scrollbar {
    width: 8px;
}

::-webkit-scrollbar-track {
    background: var(--dark);
}

::-webkit-scrollbar-thumb {
    background-color: var(--primary);
    border-radius: 4px;
}

body {
    background-color: var(--bg-color);
    color: var(--text-color);
    line-height: 1.6;
    overflow-x: hidden;
    padding-top: var(--header-height);
    transition: background-color 0.3s ease, color 0.3s ease;
}

/* Transition douce pour le changement de mode */
body, 
body *, 
body *::before, 
body *::after {
    transition: background-color 0.5s ease, 
                color 0.5s ease, 
                border-color 0.5s ease,
                box-shadow 0.5s ease;
}

/* Flash de protection pour les yeux lors du passage au mode clair */
body::before {
    content: '';
    position: fixed;
    inset: 0;
    background-color: rgba(255, 230, 230, 0);
    z-index: 10000;
    pointer-events: none;
    transition: background-color 0.5s ease;
}

body.transition-to-light::before {
    background-color: rgba(255, 230, 230, 0.2);
    animation: fadeProtection 1s forwards;
}

/* ========================================
   3. ANIMATIONS ET KEYFRAMES
   ======================================== */

@keyframes slideInMenuItem {
    0% { 
        opacity: 0; 
        transform: translateX(-30px); 
    }
    100% { 
        opacity: 1; 
        transform: translateX(0); 
    }
}

@keyframes fadeIn {
    from { opacity: 0; transform: translateY(20px); }
    to { opacity: 1; transform: translateY(0); }
}

@keyframes fadeInUp {
    from { opacity: 0; transform: translateY(30px); }
    to { opacity: 1; transform: translateY(0); }
}

@keyframes slideDown {
    from { opacity: 0; transform: translateY(-20px); }
    to { opacity: 1; transform: translateY(0); }
}

@keyframes slideInFromLeft {
    0% { transform: translateX(-30px); opacity: 0; }
    100% { transform: translateX(0); opacity: 1; }
}

@keyframes slideInFromRight {
    0% { transform: translateX(30px); opacity: 0; }
    100% { transform: translateX(0); opacity: 1; }
}

@keyframes pulse {
    0% { transform: scale(1); opacity: 0.8; }
    50% { transform: scale(1.05); opacity: 1; }
    100% { transform: scale(1); opacity: 0.8; }
}

@keyframes float {
    0% { transform: translateY(0px); }
    50% { transform: translateY(-10px); }
    100% { transform: translateY(0px); }
}

@keyframes glow {
    0% { box-shadow: 0 0 5px rgba(255, 26, 26, 0.5); }
    50% { box-shadow: 0 0 20px rgba(255, 26, 26, 0.8); }
    100% { box-shadow: 0 0 5px rgba(255, 26, 26, 0.5); }
}

@keyframes pulsate {
    0% { transform: scale(1); box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1); }
    50% { transform: scale(1.02); box-shadow: 0 10px 25px rgba(0, 0, 0, 0.2); }
    100% { transform: scale(1); box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1); }
}

@keyframes fadeProtection {
    0% { background-color: rgba(255, 230, 230, 0.2); }
    100% { background-color: rgba(255, 230, 230, 0); }
}

@keyframes gradientShift {
    0% { background-position: 0% 50%; }
    50% { background-position: 100% 50%; }
    100% { background-position: 0% 50%; }
}

@keyframes particlesEffect {
    0% { opacity: 0; transform: scale(1); }
    50% { opacity: 1; transform: scale(1.1); }
    100% { opacity: 0; transform: scale(1); }
}

@keyframes logoPulse {
    0% { opacity: 0; transform: scale(0.8); }
    100% { opacity: 1; transform: scale(1.2); }
}

@keyframes glowPulse {
    0% { box-shadow: 0 0 30px 10px rgba(255, 0, 0, 0.4), 0 0 100px 20px rgba(255, 26, 26, 0.2); }
    50% { box-shadow: 0 0 40px 15px rgba(255, 0, 0, 0.6), 0 0 120px 30px rgba(255, 26, 26, 0.3); }
    100% { box-shadow: 0 0 30px 10px rgba(255, 0, 0, 0.4), 0 0 100px 20px rgba(255, 26, 26, 0.2); }
}

@keyframes borderGlow {
    0% { opacity: 0.7; transform: scale(1); }
    100% { opacity: 1; transform: scale(1.03); }
}

@keyframes moveBacklight {
    0% { transform: translate(-10%, -10%); }
    25% { transform: translate(10%, -10%); }
    50% { transform: translate(10%, 10%); }
    75% { transform: translate(-10%, 10%); }
    100% { transform: translate(-10%, -10%); }
}

/* ========================================
   4. HEADER ET NAVIGATION
   ======================================== */

header {
    background: linear-gradient(90deg, 
        rgba(25, 5, 5, 0.95) 0%, 
        rgba(40, 10, 10, 0.95) 25%, 
        rgba(60, 15, 15, 0.95) 50%,
        rgba(40, 10, 10, 0.95) 75%,
        rgba(25, 5, 5, 0.95) 100%);
    background-size: 200% 100%;
    animation: gradientShift 15s infinite linear;
    padding: 1rem;
    box-shadow: 0 2px 15px rgba(0, 0, 0, 0.4);
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    height: var(--header-height);
    z-index: 1000;
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    color: var(--white);
    transition: background-color 0.3s ease, transform 0.3s ease;
    border-bottom: 1px solid rgba(255, 26, 26, 0.1);
}

header::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    height: 1px;
    background: linear-gradient(90deg, transparent 0%, rgba(255, 26, 26, 0.3) 50%, transparent 100%);
}

header::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-image: 
        radial-gradient(circle at 20% 50%, rgba(255, 0, 0, 0.1) 0%, transparent 20%),
        radial-gradient(circle at 80% 30%, rgba(255, 0, 0, 0.1) 0%, transparent 20%),
        radial-gradient(circle at 40% 80%, rgba(255, 0, 0, 0.1) 0%, transparent 20%);
    opacity: 0;
    animation: particlesEffect 8s infinite alternate ease-in-out;
    pointer-events: none;
    z-index: 0;
}

header.scrolled {
    background: rgba(20, 5, 5, 0.95);
    transform: translateY(-2px);
    box-shadow: 0 5px 20px rgba(0, 0, 0, 0.5);
}

header.hidden {
    transform: translateY(-100%);
    transition: transform 0.5s cubic-bezier(0.47, 0, 0.745, 0.715);
}

header.visible {
    transform: translateY(0);
    transition: transform 0.5s cubic-bezier(0.075, 0.82, 0.165, 1);
}

.navbar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    max-width: 1300px;
    margin: 0 auto;
    position: relative;
    height: 100%;
}

/* Logo */
.logo {
    font-size: 1.7rem;
    font-weight: bold;
    color: var(--white);
    text-decoration: none;
    transition: var(--transition);
    margin-right: auto;
    letter-spacing: 1px;
    text-shadow: 0 0 10px rgba(255, 26, 26, 0.3);
}

.logo:hover { 
    transform: scale(1.05); 
    text-shadow: 0 0 15px rgba(255, 26, 26, 0.5);
}

.logo span { 
    color: var(--primary);
    position: relative;
    background: linear-gradient(135deg, var(--primary) 0%, #ff6b6b 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.logo::before {
    content: '';
    position: absolute;
    inset: -8px;
    background: radial-gradient(circle, rgba(255, 26, 26, 0.2) 0%, transparent 70%);
    border-radius: 500%;
    opacity: 0;
    z-index: -1;
    animation: logoPulse 3s infinite alternate ease-in-out;
}

/* Navigation */
.nav-links {
    display: flex;
    gap: 1.7rem;
    list-style: none;
    margin: 0 auto;
    margin-left: 3rem;
}

.nav-links a {
    color: rgba(255, 255, 255, 0.9);
    text-decoration: none;
    font-weight: 500;
    transition: var(--transition);
    padding: 0.5rem 0;
    position: relative;
}

.nav-links a::after {
    content: '';
    position: absolute;
    width: 0;
    height: 2px;
    bottom: 0;
    left: 0;
    background: linear-gradient(90deg, var(--primary), rgba(255, 107, 107, 0.5));
    transition: var(--transition);
}

.nav-links a:hover {
    color: var(--white);
    transform: translateY(-2px);
    text-shadow: 0 0 8px rgba(255, 255, 255, 0.6), 0 0 12px rgba(255, 26, 26, 0.4);
}

.nav-links a:hover::after {
    width: 100%;
}

/* CORRECTION: Boutons Theme et Don */
.header-buttons {
    display: flex;
    align-items: center;
    gap: 15px;
    margin-left: 10px;
}

.theme-toggle {
    margin: 0;
}

.theme-toggle button {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.08);
    border: 1px solid rgba(255, 255, 255, 0.15);
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    color: white;
    font-size: 1.2rem;
    transition: all 0.3s ease;
}

.theme-toggle button i {
    color: white;
}

.theme-toggle button:hover {
    background: rgba(255, 26, 26, 0.1);
    transform: translateY(-2px);
}

.donate-btn {
    background: linear-gradient(135deg, var(--primary) 0%, #ff3b3b 100%);
    box-shadow: 0 4px 15px rgba(255, 0, 0, 0.3);
    border-radius: 20px;
    padding: 0.5rem 1rem;
    color: var(--white);
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    transition: var(--transition);
    margin: 0;
}

.donate-btn:hover {
    box-shadow: 0 7px 20px rgba(255, 0, 0, 0.4);
    transform: translateY(-3px);
    color: var(--white);
}

.donate-btn i {
    font-size: 1rem;
}

.donate-btn::after {
    content: '';
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: radial-gradient(circle, rgba(255, 255, 255, 0.3) 0%, transparent 35%);
    opacity: 0;
    transform: scale(0);
    transition: transform 0.5s, opacity 0.5s;
    pointer-events: none;
}

.donate-btn:hover::after {
    opacity: 1;
    transform: scale(1);
}

/* Bouton menu mobile */
.mobile-menu-btn {
    display: none;
    position: absolute;
    left: 1rem;
    top: 50%;
    transform: translateY(-50%);
    background: none;
    border: none;
    font-size: 1.5rem;
    color: var(--white);
    cursor: pointer;
    z-index: 1600;
    transition: var(--transition);
    padding: 5px;
}

.mobile-menu-btn:hover {
    color: var(--primary);
}

/* ========================================
   5. SECTIONS PRINCIPALES
   ======================================== */

/* Section backgrounds */
.section-bg {
    position: relative;
    padding: 6rem 2rem;
    overflow: hidden;
    background-color: var(--bg-color);
    transition: background-color 0.5s ease;
}

.section-bg::before {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(rgba(42, 42, 42, 0.03), rgba(42, 42, 42, 0.08));
    z-index: -1;
}

.section-bg.configs-bg::before {
    background: linear-gradient(rgba(42, 42, 42, 0.03), rgba(42, 42, 42, 0.08));
    filter: hue-rotate(30deg);
}

.section-bg.components-bg::before {
    background: linear-gradient(rgba(42, 42, 42, 0.03), rgba(42, 42, 42, 0.08));
    filter: hue-rotate(60deg);
}

.section-bg.contact-bg::before {
    background: linear-gradient(rgba(42, 42, 42, 0.03), rgba(42, 42, 42, 0.08));
    filter: hue-rotate(90deg);
}

/* Hero Section */
.hero {
    background: linear-gradient(135deg, #0f0000 0%, #1f0000 50%, #2a0000 100%);
    height: 80vh;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    padding: 0 2rem;
    position: relative;
    color: var(--white);
    overflow: hidden;
    margin-top: calc(-1 * var(--header-height));
    padding-top: var(--header-height);
    will-change: transform;
    transition: transform 0.1s linear;
}

.hero::before {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(135deg, 
        rgba(255, 26, 26, 0.1) 0%, 
        rgba(255, 26, 26, 0.15) 50%, 
        rgba(255, 26, 26, 0.1) 100%);
    filter: blur(80px);
    animation: pulse 15s infinite ease-in-out alternate;
}

.hero::after {
    content: '';
    position: absolute;
    width: 150%;
    height: 150%;
    top: -25%;
    left: -25%;
    background: radial-gradient(
        circle at center,
        rgba(255, 0, 0, 0.4) 0%,
        rgba(255, 0, 0, 0.1) 20%,
        transparent 70%
    );
    pointer-events: none;
    z-index: 1;
    animation: moveBacklight 10s infinite ease-in-out;
}

.hero-content {
    max-width: 800px;
    position: relative;
    z-index: 3;
    backdrop-filter: blur(10px);
    padding: 2.5rem;
    border-radius: 15px;
    background: rgba(20, 0, 0, 0.3);
    border: 1px solid rgba(255, 50, 50, 0.1);
    box-shadow: 0 0 30px 10px rgba(255, 0, 0, 0.4), 
                0 0 100px 20px rgba(255, 26, 26, 0.2);
    animation: fadeIn 1s ease-out, glowPulse 4s infinite alternate ease-in-out;
}

.hero-content::before {
    content: '';
    position: absolute;
    inset: -3px;
    border-radius: 18px;
    background: rgba(255, 0, 0, 0.1);
    z-index: -1;
    box-shadow: 0 0 20px 5px rgba(255, 0, 0, 0.5);
    animation: borderGlow 4s infinite alternate ease-in-out;
}

.hero h1 {
    font-size: clamp(2rem, 5vw, 3.5rem);
    margin-bottom: 1.5rem;
    text-shadow: 0 2px 10px rgba(0, 0, 0, 0.7);
}

.hero h1 span {
    color: var(--primary);
    position: relative;
    display: inline-block;
}

.hero h1 span::after {
    content: '';
    position: absolute;
    bottom: -5px;
    left: 0;
    width: 100%;
    height: 2px;
    background-color: var(--primary);
    animation: pulse 3s infinite;
}

.hero p {
    font-size: clamp(1rem, 2vw, 1.2rem);
    margin-bottom: 2.5rem;
    color: #eaeaea;
    max-width: 600px;
    margin-inline: auto;
}

/* Hero Small */
.hero-small {
    background: linear-gradient(135deg, #0f0000 0%, #1f0000 50%, #2a0000 100%);
    height: 30vh;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    padding: 0 2rem;
    position: relative;
    color: var(--white);
    overflow: hidden;
    margin-top: calc(-1 * var(--header-height));
    padding-top: var(--header-height);
}

.hero-small::before {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(135deg, 
        rgba(255, 26, 26, 0.1) 0%, 
        rgba(255, 26, 26, 0.15) 50%, 
        rgba(255, 26, 26, 0.1) 100%);
    filter: blur(80px);
    animation: pulse 15s infinite ease-in-out alternate;
}

.hero-small::after {
    content: '';
    position: absolute;
    inset: 0;
    background: url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" width="100" height="100" viewBox="0 0 100 100"><rect width="100" height="100" fill="none" stroke="rgba(255,255,255,0.03)" stroke-width="0.5"/></svg>');
    opacity: 0.2;
    animation: moveBacklight 8s infinite ease-in-out;
}

.hero-small .hero-content {
    padding: 1.5rem;
    background: rgba(20, 0, 0, 0.3);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 50, 50, 0.1);
    animation-duration: 3s;
}

.hero-small h1 {
    font-size: clamp(2rem, 4vw, 3rem);
    margin-bottom: 1rem;
    text-shadow: 0 2px 10px rgba(0, 0, 0, 0.7);
}

.hero-small h1 span {
    color: var(--primary);
    position: relative;
    display: inline-block;
}

.hero-small h1 span::after {
    content: '';
    position: absolute;
    bottom: -5px;
    left: 0;
    width: 100%;
    height: 2px;
    background-color: var(--primary);
    animation: pulse 3s infinite;
}

.hero-small p {
    font-size: clamp(1rem, 1.5vw, 1.1rem);
    color: #eaeaea;
}

/* Sections communes */
section {
    padding: 5rem 2rem;
}

.section-title {
    font-size: clamp(1.8rem, 3vw, 2.5rem);
    margin-bottom: 3rem;
    text-align: center;
    position: relative;
    padding-bottom: 1rem;
    color: var(--text-color);
    opacity: 0;
    transform: translateY(30px);
    transition: opacity 0.8s ease, transform 0.8s ease, color 0.5s ease;
}

.section-title.visible {
    opacity: 1;
    transform: translateY(0);
}

.section-title::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 100px;
    height: 3px;
    background: linear-gradient(90deg, transparent, var(--primary), transparent);
}

.section-subtitle {
    text-align: center;
    font-size: 1.1rem;
    color: var(--text-color);
    opacity: 0.7;
    margin-bottom: 3rem;
    max-width: 600px;
    margin-left: auto;
    margin-right: auto;
    transition: color 0.5s ease;
}

/* ========================================
   6. COMPOSANTS UI
   ======================================== */

/* Boutons */
.btn {
    display: inline-block;
    background-color: var(--primary);
    color: var(--white);
    padding: 0.8rem 1.8rem;
    border-radius: 5px;
    text-decoration: none;
    font-weight: bold;
    border: none;
    cursor: pointer;
    transition: var(--transition);
    position: relative;
    overflow: hidden;
    z-index: 1;
    box-shadow: 0 4px 15px rgba(255, 26, 26, 0.3);
}

.btn::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, var(--primary) 0%, #ff7b7b 100%);
    z-index: -1;
    transition: opacity 0.3s ease;
    opacity: 0;
}

.btn:hover::before {
    opacity: 1;
}

.btn:hover {
    transform: translateY(-3px);
    box-shadow: 0 7px 20px rgba(255, 26, 26, 0.4);
    color: var(--white);
}

.btn:active {
    transform: translateY(-1px);
    box-shadow: 0 3px 10px rgba(255, 26, 26, 0.4);
}

.btn-outline {
    background-color: transparent;
    border: 2px solid var(--primary);
    color: var(--primary);
    box-shadow: none;
    position: relative;
    overflow: hidden;
    z-index: 1;
}

.btn-outline::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: var(--primary);
    transition: left 0.3s ease;
    z-index: -1;
}

.btn-outline:hover::before {
    left: 0;
}

.btn-outline:hover {
    background-color: transparent;
    color: var(--white);
}

/* Cartes de configuration */
.configs {
    max-width: 1200px;
    margin: 0 auto;
}

.configs-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
    gap: 2.5rem;
}

.config-card {
    background-color: var(--card-bg);
    color: var(--text-color);
    border-radius: 15px;
    overflow: hidden;
    transition: transform 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275), 
                box-shadow 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275),
                background-color 0.3s ease;
    box-shadow: 0 10px 20px rgba(0, 0, 0, 0.1);
    cursor: pointer;
    position: relative;
    will-change: opacity, transform;
}
.configs-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)) !important;
    gap: 2.5rem;
    max-width: 1200px;
    margin: 0 auto;
}

.config-card {
    width: 100% !important;
    max-width: 350px !important;
    justify-self: center !important;
    flex: none !important;
}

.config-card:hover {
    transform: translateY(-15px) scale(1.02);
    box-shadow: 0 30px 40px rgba(0, 0, 0, 0.15);
}

.config-img {
    height: 220px;
    background-color: #f0f0f0;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    overflow: hidden;
}

.config-img img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 5s ease;
}

.config-card:hover .config-img img {
    transform: scale(1.1);
}

.card-badge {
    position: absolute;
    top: 1rem;
    right: 1rem;
    background-color: var(--primary);
    padding: 0.4rem 1rem;
    border-radius: 20px;
    font-size: 0.8rem;
    font-weight: bold;
    z-index: 2;
    color: var(--white);
    box-shadow: 0 3px 10px rgba(0, 0, 0, 0.2);
    transform: translateY(0);
    transition: transform 0.3s ease;
}

.config-card:hover .card-badge {
    transform: translateY(-5px);
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.3);
}

.config-content {
    padding: 1.8rem;
}

.config-title {
    font-size: 1.4rem;
    margin-bottom: 0.8rem;
    color: var(--text-color);
    transition: color 0.3s ease;
}

.config-card:hover .config-title {
    color: var(--primary);
}

.config-desc {
    color: var(--text-color);
    opacity: 0.7;
    margin-bottom: 1.2rem;
    font-size: 0.95rem;
}

.config-price {
    color: var(--primary);
    font-size: 1.7rem;
    font-weight: bold;
    margin-bottom: 1.2rem;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.config-specs {
    margin-bottom: 1.5rem;
    background-color: var(--bg-color);
    border-radius: 8px;
    overflow: hidden;
    transition: transform 0.3s ease, background-color 0.5s ease;
}

.config-card:hover .config-specs {
    transform: translateY(-5px);
}

.spec {
    display: flex;
    justify-content: space-between;
    border-bottom: 1px solid var(--border-color);
    padding: 0.7rem 1rem;
    font-size: 0.9rem;
    transition: var(--transition), background-color 0.5s ease, border-color 0.5s ease;
    background-color: var(--card-bg);
}

.spec:last-child {
    border-bottom: none;
}

.spec:hover {
    background-color: rgba(255, 26, 26, 0.05);
    transform: translateX(5px);
}

.spec-label {
    color: var(--text-color);
    opacity: 0.7;
}

.spec-value {
    font-weight: 500;
    color: var(--text-color);
}

/* Catégories */
.categories {
    max-width: 1200px;
    margin: 0 auto;
}

.category-cards {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
    gap: 2rem;
}

.category-card {
    background-color: var(--card-bg);
    color: var(--text-color);
    border-radius: 15px;
    padding: 2rem 1.5rem;
    text-align: center;
    transition: transform 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275), 
                box-shadow 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275),
                background-color 0.3s ease;
    cursor: pointer;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
    height: 100%;
    position: relative;
    overflow: hidden;
    z-index: 1;
}

.category-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 5px;
    background: var(--primary);
    transform: scaleX(0);
    transform-origin: center;
    transition: transform 0.3s ease;
    z-index: -1;
}

.category-card:hover::before {
    transform: scaleX(1);
}

.category-card:hover {
    transform: translateY(-10px);
    box-shadow: 0 15px 30px rgba(0, 0, 0, 0.15);
}

.category-icon {
    font-size: 3rem;
    margin-bottom: 1.5rem;
    transition: var(--transition);
    color: var(--primary);
    display: inline-block;
}

.category-card:hover .category-icon {
    transform: scale(1.1) translateY(-5px);
    filter: drop-shadow(0 5px 15px rgba(255, 26, 26, 0.3));
}

.category-title {
    font-size: 1.2rem;
    margin-bottom: 0.8rem;
    color: var(--text-color);
    transition: color 0.3s ease;
}

.category-card:hover .category-title {
    color: var(--primary);
}

.category-desc {
    font-size: 0.9rem;
    color: var(--text-color);
    opacity: 0.7;
}

/* Section Accessoires */
.accessories-bg {
    background: linear-gradient(135deg, #f8f9fa 0%, #e9ecef 100%);
    position: relative;
    overflow: hidden;
    transition: background 0.5s ease;
}

.accessories-bg::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: radial-gradient(circle at 20% 50%, rgba(220, 38, 38, 0.05) 0%, transparent 50%),
                radial-gradient(circle at 80% 20%, rgba(220, 38, 38, 0.03) 0%, transparent 50%);
    pointer-events: none;
    transition: opacity 0.5s ease;
}

.accessories {
    max-width: 1200px;
    margin: 0 auto;
    padding: 80px 20px;
    position: relative;
    z-index: 1;
}

.accessories-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 1.5rem;
    margin-top: 3rem;
}

.accessory-card {
    background: var(--card-bg);
    border-radius: 20px;
    padding: 1.5rem;
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.1);
    transition: all 0.3s ease, background-color 0.5s ease, color 0.5s ease;
    position: relative;
    border: 2px solid transparent;
    text-align: center;
    opacity: 0;
    transform: translateY(30px);
}

.accessory-card.visible {
    opacity: 1;
    transform: translateY(0);
}

.accessory-card:hover {
    transform: translateY(-8px);
    box-shadow: 0 15px 35px rgba(0, 0, 0, 0.15);
    border-color: #dc2626;
}

.accessory-img {
    position: relative;
    width: 120px;
    height: 120px;
    margin: 0 auto 1.5rem;
    border-radius: 16px;
    overflow: hidden;
    background: linear-gradient(135deg, #f8f9fa 0%, #e9ecef 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background 0.5s ease;
}

.accessory-img img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s ease;
    border-radius: 12px;
}

.accessory-card:hover .accessory-img img {
    transform: scale(1.1);
}

.accessory-badge {
    position: absolute;
    top: -8px;
    right: -8px;
    background: #dc2626;
    color: white;
    padding: 4px 10px;
    border-radius: 15px;
    font-size: 0.75rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    z-index: 2;
    box-shadow: 0 2px 8px rgba(220, 38, 38, 0.3);
}

.accessory-content {
    padding: 0;
}

.accessory-title {
    font-size: 1.1rem;
    font-weight: 700;
    color: var(--text-color);
    margin-bottom: 0.75rem;
    line-height: 1.3;
    transition: color 0.5s ease;
}

.accessory-desc {
    color: var(--text-color);
    opacity: 0.7;
    font-size: 0.9rem;
    line-height: 1.4;
    margin-bottom: 1rem;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    transition: color 0.5s ease;
}

.accessory-price {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    margin-bottom: 0.75rem;
}

.price-current {
    font-size: 1.3rem;
    font-weight: 700;
    color: #dc2626;
}

.price-original {
    font-size: 1rem;
    color: var(--text-color);
    opacity: 0.5;
    text-decoration: line-through;
    transition: color 0.5s ease;
}

.accessory-rating {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    margin-bottom: 1.25rem;
}

.stars {
    display: flex;
    gap: 1px;
    color: #fbbf24;
    font-size: 0.9rem;
}

.rating-text {
    font-size: 0.8rem;
    color: var(--text-color);
    opacity: 0.6;
    transition: color 0.5s ease;
}

.accessory-btn {
    width: 100%;
    background: linear-gradient(135deg, #dc2626 0%, #b91c1c 100%);
    color: white;
    border: none;
    padding: 10px 20px;
    border-radius: 12px;
    font-weight: 600;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    transition: all 0.3s ease;
    font-size: 0.9rem;
}

.accessory-btn:hover {
    background: linear-gradient(135deg, #b91c1c 0%, #991b1b 100%);
    transform: translateY(-2px);
    box-shadow: 0 6px 15px rgba(220, 38, 38, 0.3);
    color: white;
}

.accessory-btn i {
    font-size: 1rem;
}

/* Contact */
.contact-container {
    max-width: 1200px;
    margin: 0 auto;
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(350px, 1fr));
    gap: 3rem;
}

.contact-form {
    background-color: var(--card-bg);
    color: var(--text-color);
    padding: 2.5rem;
    border-radius: 15px;
    box-shadow: 0 15px 30px rgba(0, 0, 0, 0.1);
    transition: var(--transition), background-color 0.5s ease, color 0.5s ease;
    position: relative;
    overflow: hidden;
}

.contact-form input,
.contact-form textarea {
    background-color: #fff;
    color: var(--text-color);
    border: 1px solid var(--border-color);
    border-radius: 8px;
    padding: 1rem;
    width: 100%;
    resize: vertical;
    transition: var(--transition), background-color 0.5s ease, border-color 0.5s ease, color 0.5s ease;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.05);
}

.contact-form input::placeholder,
.contact-form textarea::placeholder {
    color: #999;
}

.contact-form input:focus,
.contact-form textarea:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(255, 26, 26, 0.1);
    transform: translateY(-2px);
}

.contact-form::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 5px;
    background: linear-gradient(90deg, transparent, var(--primary), transparent);
    opacity: 0;
    transition: opacity 0.3s ease;
}

.contact-form:hover::before {
    opacity: 1;
}

.contact-form:hover {
    transform: translateY(-10px);
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.15);
}

.form-group {
    margin-bottom: 1.8rem;
    position: relative;
    opacity: 0;
    transform: translateX(-30px);
    transition: opacity 0.6s ease, transform 0.6s ease;
}

.form-group.visible {
    opacity: 1;
    transform: translateX(0);
}

.form-label {
    display: block;
    margin-bottom: 0.7rem;
    font-weight: 500;
    color: var(--text-color);
    transition: color 0.3s ease;
}

.form-input,
.form-textarea {
    width: 100%;
    padding: 1rem;
    border-radius: 8px;
    border: 1px solid var(--border-color);
    background-color: var(--card-bg);
    color: var(--text-color);
    resize: vertical;
    transition: var(--transition), background-color 0.5s ease, border-color 0.5s ease, color 0.5s ease;
}

.form-input:focus,
.form-textarea:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(255, 26, 26, 0.1);
    transform: translateY(-2px);
}

.form-input:focus + .form-label,
.form-textarea:focus + .form-label {
    color: var(--primary);
}

.contact-info {
    display: flex;
    flex-direction: column;
    justify-content: center;
    color: var(--text-color);
    background-color: transparent;
    transition: color 0.5s ease;
}

.contact-item {
    display: flex;
    align-items: flex-start;
    margin-bottom: 2rem;
    transition: var(--transition);
    padding: 1rem;
    border-radius: 8px;
    background-color: transparent;
}

.contact-item:hover {
    transform: translateX(10px);
    background-color: rgba(255, 26, 26, 0.05);
}

.contact-icon {
    font-size: 1.5rem;
    color: var(--primary);
    margin-right: 1.2rem;
    transition: var(--transition);
}

.contact-item:hover .contact-icon {
    transform: scale(1.2) rotateY(180deg);
}

.contact-text h4 {
    margin-bottom: 0.4rem;
    color: var(--text-color);
    transition: color 0.5s ease;
}

.contact-text p {
    color: var(--text-color);
    opacity: 0.7;
    font-size: 0.95rem;
    transition: color 0.5s ease;
}

.contact-text a {
    color: var(--primary);
    text-decoration: none;
    position: relative;
    transition: color 0.3s ease;
}

.contact-text a::after {
    content: '';
    position: absolute;
    bottom: -2px;
    left: 0;
    width: 100%;
    height: 1px;
    background-color: var(--primary);
    transform: scaleX(0);
    transform-origin: right;
    transition: transform 0.3s ease;
}

.contact-text a:hover::after {
    transform: scaleX(1);
    transform-origin: left;
}

.contact-text {
    text-align: center; /* Centre le texte à l'intérieur */
    display: flex;
    flex-direction: column;
    align-items: center; /* Centre horizontalement les enfants */
    justify-content: center; /* Centre verticalement si tu veux aussi centrer sur toute la page */
}


/* Modaux */
.modal {
    display: none;
    position: fixed;
    inset: 0;
    background-color: rgba(0, 0, 0, 0.7);
    z-index: 1000;
    overflow-y: auto;
    backdrop-filter: blur(5px);
    opacity: 0;
    transition: opacity 0.3s ease;
}

.modal.active {
    display: block;
    opacity: 1;
}

.modal-content {
    background-color: var(--card-bg);
    color: var(--text-color);
    margin: 5vh auto;
    max-width: 900px;
    width: 90%;
    border-radius: 15px;
    overflow: hidden;
    animation: fadeIn 0.4s ease-out;
    box-shadow: 0 25px 50px rgba(0, 0, 0, 0.3);
    transition: background-color 0.5s ease, color 0.5s ease;
}

.modal-header {
    padding: 1.5rem 2rem;
    background: linear-gradient(135deg, var(--gray) 0%, #222222 100%);
    color: var(--white);
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.close-modal {
    background: none;
    border: none;
    color: var(--white);
    cursor: pointer;
    width: 36px;
    height: 36px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    font-size: 1.5rem;
    transition: var(--transition);
}

.close-modal:hover {
    background-color: rgba(255, 255, 255, 0.1);
    color: var(--primary);
    transform: rotate(90deg);
}

.modal-body {
    padding: 2rem;
}

.modal-tabs {
    display: flex;
    overflow-x: auto;
    scrollbar-width: none;
    -ms-overflow-style: none;
    position: relative;
    -webkit-overflow-scrolling: touch;
    padding: 0 10px;
    cursor: grab;
    background-color: #f5f5f5;
    border-bottom: 1px solid #e0e0e0;
    transition: background-color 0.5s ease;
}

.modal-tabs::-webkit-scrollbar {
    display: none;
}

.modal-tab {
    white-space: nowrap;
    padding: 12px 16px;
    cursor: pointer;
    position: relative;
    flex-shrink: 0;
    transition: all 0.3s ease;
    font-weight: 500;
    color: var(--text-color);
}

.modal-tab:hover {
    color: var(--primary);
    background-color: rgba(255, 26, 26, 0.05);
}

.modal-tab.active {
    color: var(--primary);
    font-weight: 600;
}

.modal-tab.active::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 10%;
    width: 80%;
    height: 3px;
    background-color: var(--primary);
    border-radius: 1px;
}

.modal-tab i {
    margin-right: 5px;
}

.tab-content {
    display: none;
}

.tab-content.active {
    display: block;
    animation: fadeIn 0.3s ease-out;
}

/* ========================================
   7. CONFIGURATEUR PC (BUILDER)
   ======================================== */

.builder-section {
    padding: 4rem 2rem;
    background-color: var(--bg-color);
    transition: background-color 0.5s ease;
}

.builder-container {
    max-width: 1200px;
    margin: 0 auto;
}

.builder-intro {
    text-align: center;
    max-width: 800px;
    margin: 0 auto 3rem;
    color: var(--text-color);
}

.builder-intro h2 {
    font-size: clamp(1.8rem, 3vw, 2.5rem);
    margin-bottom: 1rem;
    color: var(--text-color);
    position: relative;
    display: inline-block;
}

.builder-intro h2::after {
    content: '';
    position: absolute;
    bottom: -10px;
    left: 50%;
    transform: translateX(-50%);
    width: 80px;
    height: 3px;
    background: linear-gradient(90deg, transparent, var(--primary), transparent);
}

.builder-intro p {
    color: var(--text-color);
    opacity: 0.7;
    margin-bottom: 2rem;
}

.builder-steps {
    display: flex;
    justify-content: center;
    gap: 2rem;
    margin-bottom: 3rem;
    flex-wrap: wrap;
}

.step {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    transition: transform 0.3s ease;
}

.step:hover {
    transform: translateY(-5px);
}

.step-number {
    width: 30px;
    height: 30px;
    background-color: var(--primary);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: bold;
    font-size: 0.9rem;
    color: var(--white);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.step:hover .step-number {
    transform: scale(1.1);
    box-shadow: 0 0 15px rgba(255, 26, 26, 0.5);
}

.step-text {
    color: var(--text-color);
    font-weight: 500;
    display: flex;
    align-items: center;
}

.step-text i {
    margin-right: 8px;
}

.builder-grid {
    display: grid;
    grid-template-columns: 3fr 1fr;
    gap: 2rem;
}

.component-select {
    background-color: var(--card-bg);
    color: var(--text-color);
    border-radius: 10px;
    padding: 2rem;
    margin-bottom: 2rem;
    box-shadow: 0 10px 20px rgba(0, 0, 0, 0.1);
    transition: transform 0.3s ease, box-shadow 0.3s ease, background-color 0.5s ease, color 0.5s ease;
}

.component-select:hover {
    transform: translateY(-5px);
    box-shadow: 0 15px 30px rgba(0, 0, 0, 0.15);
}

.component-select h3 {
    margin-bottom: 1.5rem;
    padding-bottom: 0.8rem;
    border-bottom: 1px solid var(--border-color);
    display: flex;
    align-items: center;
    gap: 0.5rem;
    color: var(--text-color);
    position: relative;
    transition: border-color 0.5s ease;
}

.component-select h3::after {
    content: '';
    position: absolute;
    bottom: -1px;
    left: 0;
    width: 50px;
    height: 3px;
    background: var(--primary);
    transition: width 0.3s ease;
}

.component-select:hover h3::after {
    width: 100px;
}

.component-select h3 i {
    color: var(--primary);
}

.builder-row {
    display: grid;
    grid-template-columns: 60px 3fr 1fr;
    gap: 1rem;
    padding: 1rem;
    border-bottom: 1px solid var(--border-color);
    align-items: center;
    transition: all 0.3s ease, border-color 0.5s ease;
    border-radius: 5px;
}

.builder-row:hover {
    background-color: rgba(0, 0, 0, 0.02);
    padding-left: 1.5rem;
}

.builder-row:last-child {
    border-bottom: none;
}

.builder-icon {
    font-size: 1.5rem;
    color: var(--primary);
    text-align: center;
    transition: transform 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
}

.builder-row:hover .builder-icon {
    transform: scale(1.2);
}

.builder-component {
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.builder-title {
    font-weight: 500;
    margin-bottom: 0.3rem;
    color: var(--text-color);
    display: flex;
    align-items: center;
    transition: color 0.5s ease;
}

.builder-title i {
    margin-right: 8px;
    vertical-align: middle;
}

.builder-selected {
    color: var(--text-color);
    opacity: 0.7;
    font-size: 0.9rem;
    transition: color 0.5s ease;
}

.builder-price {
    font-weight: bold;
    color: var(--primary);
    text-align: right;
}

.builder-add {
    padding: 0.5rem 1rem;
    background-color: rgba(255, 26, 26, 0.1);
    border: none;
    color: var(--primary);
    border-radius: 5px;
    cursor: pointer;
    transition: var(--transition);
    font-weight: 500;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.3rem;
    position: relative;
    overflow: hidden;
    z-index: 1;
}

.builder-add::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: var(--primary);
    transition: left 0.3s ease;
    z-index: -1;
}

.builder-add:hover::before {
    left: 0;
}

.builder-add:hover {
    color: var(--white);
    transform: translateY(-2px);
}

.builder-add i {
    transition: transform 0.3s ease;
}

.builder-add:hover i {
    transform: rotate(90deg);
}

.builder-remove {
    padding: 0.5rem;
    background-color: rgba(255, 0, 0, 0.1);
    border: none;
    color: #ff6b6b;
    border-radius: 5px;
    cursor: pointer;
    transition: var(--transition);
    font-size: 0.9rem;
    margin-left: 0.5rem;
    position: relative;
    overflow: hidden;
    z-index: 1;
}

.builder-remove::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: #ff6b6b;
    transition: left 0.3s ease;
    z-index: -1;
}

.builder-remove:hover::before {
    left: 0;
}

.builder-remove:hover {
    color: var(--white);
    transform: translateY(-2px);
}

.builder-remove i {
    transition: transform 0.3s ease;
}

.builder-remove:hover i {
    transform: rotate(90deg);
}

.builder-controls {
    display: flex;
    align-items: center;
}

.builder-summary {
    background-color: var(--card-bg);
    color: var(--text-color);
    border-radius: 10px;
    padding: 2rem;
    position: sticky;
    top: 100px;
    box-shadow: 0 10px 20px rgba(0, 0, 0, 0.1);
    transition: transform 0.3s ease, box-shadow 0.3s ease, background-color 0.5s ease, color 0.5s ease;
}

.builder-summary:hover {
    transform: translateY(-5px);
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.15);
}

.summary-title {
    font-size: 1.2rem;
    margin-bottom: 1.5rem;
    padding-bottom: 0.5rem;
    border-bottom: 1px solid var(--border-color);
    display: flex;
    align-items: center;
    gap: 0.5rem;
    color: var(--text-color);
    position: relative;
    transition: border-color 0.5s ease;
}

.summary-title::after {
    content: '';
    position: absolute;
    bottom: -1px;
    left: 0;
    width: 50px;
    height: 2px;
    background: var(--primary);
    transition: width 0.3s ease;
}

.builder-summary:hover .summary-title::after {
    width: 100px;
}

.summary-title i {
    color: var(--primary);
    margin-right: 8px;
}

.summary-price {
    font-weight: bold;
    color: var(--primary);
    text-align: right;
}

.summary-item {
    display: flex;
    justify-content: space-between;
    margin-bottom: 0.8rem;
    padding-bottom: 0.8rem;
    border-bottom: 1px solid var(--border-color);
    font-size: 0.95rem;
    transition: transform 0.3s ease, background-color 0.3s ease, border-color 0.5s ease;
    padding: 0.5rem;
    border-radius: 4px;
    align-items: center;
}

.summary-item:hover {
    background-color: rgba(255, 26, 26, 0.05);
    transform: translateX(5px);
}

.summary-item:last-child {
    border-bottom: none;
}

.summary-label {
    color: var(--text-color);
    font-weight: 500;
    display: flex;
    align-items: center;
    transition: color 0.5s ease;
}

.summary-label i {
    margin-right: 8px;
}

.summary-value {
    font-weight: 500;
    margin-left: 1rem;
    color: var(--text-color);
    transition: color 0.5s ease;
}

.summary-bottom {
    margin-top: 2rem;
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.summary-bottom .btn {
    text-align: center;
}

.compatibility-check {
    background-color: rgba(255, 26, 26, 0.1);
    border-radius: 10px;
    padding: 1.5rem;
    margin-bottom: 1.5rem;
    display: flex;
    align-items: flex-start;
    gap: 0.8rem;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    border-left: 4px solid var(--primary);
}

.compatibility-check:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 20px rgba(255, 26, 26, 0.2);
}

.compatibility-check i {
    color: var(--primary);
    margin-top: 0.2rem;
    font-size: 1.2rem;
    transition: transform 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
}

.compatibility-check:hover i {
    transform: scale(1.2);
}

.compatibility-text h4 {
    margin-bottom: 0.3rem;
    color: var(--primary);
    font-size: 1.1rem;
}

.compatibility-text p {
    font-size: 0.9rem;
    color: var(--text-color);
    line-height: 1.5;
}

.component-selector {
    position: fixed;
    inset: 0;
    background-color: rgba(0, 0, 0, 0.7);
    z-index: 1000;
    display: none;
    align-items: center;
    justify-content: center;
    backdrop-filter: blur(5px);
}

.component-selector.active {
    display: flex !important;
    animation: fadeIn 0.3s ease-out forwards;
}

.selector-content {
    background-color: var(--card-bg);
    color: var(--text-color);
    width: 90%;
    max-width: 900px;
    border-radius: 15px;
    max-height: 80vh;
    overflow-y: auto;
    box-shadow: 0 25px 50px rgba(0, 0, 0, 0.2);
    animation: fadeIn 0.5s ease;
    transition: background-color 0.5s ease, color 0.5s ease;
}

.selector-header {
    padding: 1.5rem;
    background: linear-gradient(135deg, var(--gray) 0%, #222222 100%);
    color: var(--white);
    display: flex;
    justify-content: space-between;
    align-items: center;
    position: sticky;
    top: 0;
    z-index: 10;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 15px 15px 0 0;
}

.selector-title {
    font-size: 1.3rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    color: var(--white);
}

.selector-title i {
    color: var(--primary);
}

.selector-body {
    padding: 1.5rem;
}

.selector-search {
    margin-bottom: 1.5rem;
    display: flex;
    gap: 0.5rem;
}

.selector-search input {
    flex: 1;
    padding: 1rem 1.5rem;
    background-color: var(--bg-color);
    border: 1px solid var(--border-color);
    border-radius: 5px;
    color: var(--text-color);
    transition: var(--transition), background-color 0.5s ease, border-color 0.5s ease, color 0.5s ease;
}

.selector-search input:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(255, 26, 26, 0.1);
    transform: translateY(-2px);
}

.option-card {
    display: grid;
    grid-template-columns: 80px 1fr auto;
    gap: 1rem;
    padding: 1.2rem;
    border-bottom: 1px solid var(--border-color);
    align-items: center;
    cursor: pointer;
    transition: var(--transition), background-color 0.5s ease, border-color 0.5s ease;
    background-color: var(--card-bg);
    border-radius: 8px;
    margin-bottom: 0.8rem;
}

.option-card:hover {
    background-color: rgba(255, 26, 26, 0.05);
    transform: translateY(-5px) scale(1.01);
    box-shadow: 0 10px 15px rgba(0, 0, 0, 0.05);
}

.option-img {
    width: 80px;
    height: 80px;
    background-color: #f0f0f0;
    border-radius: 5px;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    transition: transform 0.3s ease;
}

.option-card:hover .option-img {
    transform: scale(1.1);
}

.option-info {
    display: flex;
    flex-direction: column;
}

.option-name {
    font-weight: 500;
    margin-bottom: 0.3rem;
    color: var(--text-color);
    transition: color 0.3s ease;
}

.option-card:hover .option-name {
    color: var(--primary);
}

.option-specs {
    color: var(--text-color);
    opacity: 0.7;
    font-size: 0.85rem;
    display: flex;
    flex-direction: column;
    gap: 0.2rem;
}

.option-spec {
    display: flex;
    gap: 0.5rem;
    transition: transform 0.3s ease;
}

.option-card:hover .option-spec {
    transform: translateX(5px);
}

.option-spec i {
    color: var(--primary);
    width: 16px;
    text-align: center;
}

.option-price {
    font-weight: bold;
    color: var(--primary);
    text-align: right;
    font-size: 1.2rem;
    transition: transform 0.3s ease;
}

.option-card:hover .option-price {
    transform: scale(1.1);
}

.option-select {
    padding: 0.5rem 1rem;
    background-color: rgba(255, 26, 26, 0.1);
    border: none;
    color: var(--primary);
    border-radius: 5px;
    cursor: pointer;
    transition: var(--transition);
    font-weight: 500;
    margin-top: 0.5rem;
    position: relative;
    overflow: hidden;
    z-index: 1;
}

.option-select::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: var(--primary);
    transition: left 0.3s ease;
    z-index: -1;
}

.option-select:hover::before {
    left: 0;
}

.option-select:hover {
    color: var(--white);
    transform: translateY(-2px);
}

.component-sort {
    margin-bottom: 1.5rem;
    display: flex;
    align-items: center;
    gap: 1rem;
}

.component-sort label {
    font-weight: 500;
    color: var(--text-color);
    transition: color 0.5s ease;
}

.component-sort select {
    padding: 0.6rem 1rem;
    background-color: var(--bg-color);
    border: 1px solid var(--border-color);
    border-radius: 5px;
    color: var(--text-color);
    cursor: pointer;
    transition: var(--transition), background-color 0.5s ease, border-color 0.5s ease, color 0.5s ease;
    font-size: 0.9rem;
    min-width: 180px;
    appearance: none;
    background-image: url("data:image/svg+xml;charset=UTF-8,%3csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' fill='%23ff1a1a' viewBox='0 0 16 16'%3e%3cpath d='M7.247 11.14 2.451 5.658C1.885 5.013 2.345 4 3.204 4h9.592a1 1 0 0 1 .753 1.659l-4.796 5.48a1 1 0 0 1-1.506 0z'/%3e%3c/svg%3e");
    background-repeat: no-repeat;
    background-position: right 1rem center;
    background-size: 12px;
}

.component-sort select:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(255, 26, 26, 0.1);
    transform: translateY(-2px);
}

.component-sort select:hover {
    border-color: var(--primary);
}

.alert-box {
    position: fixed;
    top: 20px;
    right: 20px;
    background-color: var(--card-bg);
    color: var(--text-color);
    border-radius: 8px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
    padding: 0;
    z-index: 1000;
    max-width: 350px;
    transform: translateX(120%);
    transition: transform 0.3s ease-in-out, background-color 0.5s ease, color 0.5s ease;
}

.alert-box.active {
    transform: translateX(0);
}

.alert-content {
    display: flex;
    align-items: center;
    padding: 15px 20px;
}

.alert-content i.fas {
    font-size: 20px;
    color: var(--primary);
    margin-right: 15px;
}

.alert-content p {
    margin: 0;
    flex-grow: 1;
    color: var(--text-color);
}

.alert-close {
    background: none;
    border: none;
    color: var(--text-color);
    cursor: pointer;
    font-size: 16px;
    padding: 0;
    margin-left: 10px;
    transition: transform 0.3s ease, color 0.5s ease;
}

.alert-close:hover {
    transform: rotate(90deg);
    color: var(--primary);
}

#shareConfig.success {
    background: linear-gradient(135deg, #4CAF50 0%, #45a049 100%);
    border-color: #4CAF50;
    color: white;
    animation: pulse 1s linear;
}

/* Config Detail pour les modaux */
.config-detail {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 2.5rem;
}

.config-image {
    background-color: #f0f0f0;
    border-radius: 10px;
    aspect-ratio: 4/3;
    overflow: hidden;
    position: relative;
}

.config-image::after {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(to bottom, transparent 80%, rgba(0, 0, 0, 0.2) 100%);
    opacity: 0;
    transition: opacity 0.3s ease;
}

.config-detail:hover .config-image::after {
    opacity: 1;
}

.config-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 5s ease;
}

.config-detail:hover .config-image img {
    transform: scale(1.1);
}

.config-price-large {
    color: var(--primary);
    font-size: 2.2rem;
    font-weight: bold;
    margin-bottom: 1.5rem;
    display: flex;
    align-items: center;
    gap: 1rem;
    transition: transform 0.3s ease;
}

.config-detail:hover .config-price-large {
    transform: scale(1.05);
}

.price-info {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.9rem;
    color: var(--text-color);
    opacity:  0.7;
}

.price-info i {
    color: var(--primary);
}

.old-price {
    font-size: 1.1rem;
    color: var(--text-color);
    opacity: 0.5;
    text-decoration: line-through;
    margin-right: 0.5rem;
}

.discount {
    background-color: var(--primary-transparent);
    color: var(--primary);
    padding: 0.2rem 0.5rem;
    border-radius: 4px;
    font-size: 0.9rem;
    transition: transform 0.3s ease, background-color 0.3s ease;
}

.config-detail:hover .discount {
    transform: scale(1.1);
    background-color: var(--primary);
    color: var(--white);
}

.rating {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    margin-bottom: 1rem;
}

.config-detail:hover .stars {
    transform: scale(1.1);
}

.rating-count {
    color: var(--text-color);
    opacity: 0.7;
    font-size: 0.9rem;
}

.components-list {
    margin-top: 2.5rem;
    background-color: var(--bg-color);
    border-radius: 10px;
    overflow: hidden;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.05);
    transition: transform 0.3s ease, box-shadow 0.3s ease, background-color 0.5s ease;
}

.config-detail:hover .components-list {
    transform: translateY(-5px);
    box-shadow: 0 15px 30px rgba(0, 0, 0, 0.1);
}

.components-header {
    background: linear-gradient(135deg, var(--gray) 0%, #222222 100%);
    color: var(--white);
    padding: 1rem 1.5rem;
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.components-header i {
    color: var(--primary);
}

.component-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1rem 1.5rem;
    border-bottom: 1px solid var(--border-color);
    transition: var(--transition), background-color 0.5s ease, border-color 0.5s ease;
    color: var(--text-color);
    background-color: var(--card-bg);
}

.component-item:last-child {
    border-bottom: none;
}

.component-item:hover {
    background-color: rgba(255, 26, 26, 0.05);
    padding-left: 2rem;
}

.component-name {
    font-weight: 500;
    color: var(--text-color);
    transition: color 0.3s ease;
}

.component-item:hover .component-name {
    color: var(--primary);
}

.component-model {
    color: var(--text-color);
    opacity: 0.7;
    font-size: 0.9rem;
    margin-top: 0.2rem;
}

.component-link {
    color: var(--primary);
    text-decoration: none;
    padding: 0.5rem 0.8rem;
    border-radius: 4px;
    background-color: rgba(255, 26, 26, 0.1);
    transition: var(--transition);
    display: flex;
    align-items: center;
    gap: 0.3rem;
    position: relative;
    overflow: hidden;
    z-index: 1;
}

.component-link::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: var(--primary);
    transition: left 0.3s ease;
    z-index: -1;
}

.component-link:hover::before {
    left: 0;
}

.component-link:hover {
    color: var(--white);
    transform: translateX(5px);
}

.performance {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
    gap: 1.5rem;
    margin-bottom: 2rem;
}

.performance-item {
    background-color: var(--bg-color);
    padding: 1.5rem;
    border-radius: 8px;
    text-align: center;
    color: var(--text-color);
    transition: transform 0.3s ease, box-shadow 0.3s ease, background-color 0.5s ease;
    position: relative;
    overflow: hidden;
    z-index: 1;
}

.performance-item::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 3px;
    background: var(--primary);
    transform: scaleX(0);
    transform-origin: right;
    transition: transform 0.3s ease;
    z-index: -1;
}

.performance-item:hover::before {
    transform: scaleX(1);
    transform-origin: left;
}

.performance-item:hover {
    transform: translateY(-10px);
    box-shadow: 0 10px 20px rgba(0, 0, 0, 0.1);
}

.game-title {
    font-size: 0.9rem;
    margin-bottom: 0.8rem;
    font-weight: 500;
    color: var(--text-color);
    transition: color 0.3s ease;
}

.performance-item:hover .game-title {
    color: var(--primary);
}

.fps {
    font-size: 1.8rem;
    font-weight: bold;
    color: var(--primary);
    transition: transform 0.3s ease;
}

.performance-item:hover .fps {
    transform: scale(1.1);
}

.resolution {
    color: var(--text-color);
    opacity: 0.7;
    font-size: 0.8rem;
    margin-top: 0.3rem;
}

.specs-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: 1.5rem;
}

.spec-item {
    background-color: var(--bg-color);
    padding: 1.2rem;
    border-radius: 8px;
    text-align: center;
    transition: var(--transition), background-color 0.5s ease;
    color: var(--text-color);
    position: relative;
    overflow: hidden;
    z-index: 1;
}

.spec-item::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 3px;
    background: var(--primary);
    transform: scaleX(0);
    transform-origin: right;
    transition: transform 0.3s ease;
    z-index: -1;
}

.spec-item:hover::before {
    transform: scaleX(1);
    transform-origin: left;
}

.spec-item:hover {
    transform: translateY(-10px);
    box-shadow: 0 10px 20px rgba(0, 0, 0, 0.1);
}

.spec-icon {
    color: var(--primary);
    font-size: 1.8rem;
    margin-bottom: 0.8rem;
    transition: transform 0.3s ease;
}

.spec-item:hover .spec-icon {
    transform: scale(1.2);
}

.spec-title {
    font-size: 1rem;
    margin-bottom: 0.3rem;
    font-weight: 500;
    color: var(--text-color);
    transition: color 0.3s ease;
}

.spec-item:hover .spec-title {
    color: var(--primary);
}

.spec-value {
    color: var(--text-color);
    opacity: 0.7;
    font-size: 0.9rem;
}

/* ========================================
   8. FOOTER ET ÉLÉMENTS FIXES
   ======================================== */

footer {
    background: linear-gradient(135deg, var(--dark) 0%, #1a1a1a 100%);
    padding: 4rem 2rem 2rem;
    text-align: center;
    color: var(--white);
    position: relative;
}

footer::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 5px;
    background: linear-gradient(90deg, transparent, var(--primary), transparent);
}

.footer-content {
    max-width: 1200px;
    margin: 0 auto;
}

.footer-logo {
    font-size: 2rem;
    font-weight: bold;
    margin-bottom: 1.5rem;
    display: inline-block;
    color: var(--white);
    transition: transform 0.3s ease;
}

.footer-logo:hover {
    transform: scale(1.05);
    text-shadow: 0 0 10px rgba(255, 255, 255, 0.5);
}

.footer-logo span {
    color: var(--primary);
}

.footer-links {
    display: flex;
    justify-content: center;
    flex-wrap: wrap;
    gap: 2rem;
    list-style: none;
    margin: 2rem 0;
}

.footer-links a {
    color: #cccccc;
    text-decoration: none;
    transition: var(--transition);
    position: relative;
}

.footer-links a::after {
    content: '';
    position: absolute;
    bottom: -5px;
    left: 0;
    width: 100%;
    height: 2px;
    background-color: var(--primary);
    transform: scaleX(0);
    transform-origin: right;
    transition: transform 0.3s ease;
}

.footer-links a:hover::after {
    transform: scaleX(1);
    transform-origin: left;
}

.footer-links a:hover {
    color: var(--primary);
}

.social-icons {
    display: flex;
    justify-content: center;
    gap: 1.2rem;
    margin-bottom: 2rem;
    margin-top: 2rem;
}

.social-icon {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background-color: var(--gray);
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--white);
    text-decoration: none;
    transition: transform 0.5s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    font-size: 1.2rem;
    position: relative;
    overflow: hidden;
    z-index: 1;
}

.social-icon::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: var(--primary);
    border-radius: 50%;
    transform: scale(0);
    transition: transform 0.3s ease;
    z-index: -1;
}

.social-icon:hover::before {
    transform: scale(1);
}

.social-icon:hover {
    color: var(--white);
    transform: translateY(-5px);
    box-shadow: 0 5px 15px rgba(255, 26, 26, 0.5);
}

.copyright {
    color: #999999;
    font-size: 0.9rem;
    padding-top: 2rem;
    border-top: 3px solid var(--primary);
    border-radius: 15px 15px 0 0;
    border-left: 1px solid rgba(255, 26, 26, 0.2);
    border-right: 1px solid rgba(255, 26, 26, 0.2);
}

.cookie-consent.show {
    bottom: 20px;
}

.cookie-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 1.5rem;
}

.cookie-text {
    flex: 1;
    min-width: 200px;
}

.cookie-text h3 {
    margin-bottom: 0.5rem;
    color: var(--text-color);
    font-size: 1.1rem;
}

.cookie-text p {
    margin: 0;
    color: var(--text-color);
    opacity: 0.8;
    font-size: 0.9rem;
    line-height: 1.4;
}

.cookie-buttons {
    display: flex;
    gap: 1rem;
    flex-shrink: 0;
}

.cookie-buttons .btn {
    padding: 0.6rem 1.2rem;
    font-size: 0.9rem;
    white-space: nowrap;
}

/* ========================================
   9. CLASSES UTILITAIRES ET EFFETS
   ======================================== */

/* Classes pour animations et effets */
.visible {
    opacity: 1 !important;
    transform: translateY(0) !important;
}

.reveal {
    opacity: 1;
    transition: all 1s ease-in-out;
}

.reveal.active {
    opacity: 1;
    animation: fadeInUp 0.7s ease-in-out forwards;
}

.float-card {
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    will-change: transform, box-shadow;
}

.float-card:hover {
    transform: translateY(-10px);
    box-shadow: 0 15px 30px rgba(0, 0, 0, 0.15);
}

.focus-glow:focus {
    outline: none;
    box-shadow: 0 0 0 3px rgba(255, 26, 26, 0.3);
}

.rise-on-hover {
    transition: transform 0.3s ease;
}

.rise-on-hover:hover {
    transform: translateY(-5px);
}

.sliding-bg {
    position: relative;
    overflow: hidden;
    z-index: 1;
}

.sliding-bg::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: var(--primary);
    transition: left 0.3s ease;
    z-index: -1;
}

.sliding-bg:hover::before {
    left: 0;
}

.title-emphasis {
    position: relative;
    display: inline-block;
}

.title-emphasis::after {
    content: '';
    position: absolute;
    bottom: -5px;
    left: 0;
    width: 50px;
    height: 3px;
    background: linear-gradient(90deg, var(--primary), transparent);
    transition: width 0.3s ease;
}

.title-emphasis:hover::after {
    width: 100%;
}

.expand-hover {
    transition: padding 0.3s ease, background-color 0.3s ease;
}

.expand-hover:hover {
    padding: 1.2rem;
    background-color: rgba(255, 26, 26, 0.05);
}

.icon-pop {
    transition: transform 0.3s ease, color 0.3s ease;
}

.icon-pop:hover {
    transform: scale(1.2);
    color: var(--primary);
}

.glow-shadow {
    transition: box-shadow 0.3s ease;
}

.glow-shadow:hover {
    box-shadow: 0 0 20px rgba(255, 26, 26, 0.4);
}

.hover-underline {
    position: relative;
    display: inline-block;
}

.hover-underline::after {
    content: '';
    position: absolute;
    width: 100%;
    height: 2px;
    bottom: -2px;
    left: 0;
    background-color: var(--primary);
    transform: scaleX(0);
    transform-origin: bottom right;
    transition: transform 0.3s ease-out;
}

.hover-underline:hover::after {
    transform: scaleX(1);
    transform-origin: bottom left;
}

.fade-bg {
    position: relative;
    z-index: 1;
    overflow: hidden;
}

.fade-bg::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(135deg, var(--primary) 0%, #ff7b7b 100%);
    z-index: -1;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.fade-bg:hover::before {
    opacity: 1;
}

.fade-bg:hover {
    color: white;
}

.shadow-depth {
    box-shadow: 
        0 5px 10px rgba(0, 0, 0, 0.05),
        0 15px 30px rgba(0, 0, 0, 0.1);
    transition: box-shadow 0.3s ease;
}

.shadow-depth:hover {
    box-shadow: 
        0 10px 20px rgba(0, 0, 0, 0.1),
        0 20px 40px rgba(0, 0, 0, 0.15);
}

.highlight-pulse {
    animation: pulsate 2s infinite ease-in-out;
}

/* ========================================
   10. CORRECTIONS MODE SOMBRE
   ======================================== */

/* Mode sombre pour les accessoires */
body.dark-mode .accessories-bg {
    background: linear-gradient(135deg, #1a1a1a 0%, #2d2d2d 100%);
}

body.dark-mode .accessories-bg::before {
    background: radial-gradient(circle at 20% 50%, rgba(220, 38, 38, 0.1) 0%, transparent 50%),
                radial-gradient(circle at 80% 20%, rgba(220, 38, 38, 0.08) 0%, transparent 50%);
}

body.dark-mode .accessory-card {
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.3);
    border-color: rgba(255, 255, 255, 0.1);
}

body.dark-mode .accessory-card:hover {
    border-color: #dc2626;
    box-shadow: 0 15px 35px rgba(220, 38, 38, 0.2);
}

body.dark-mode .accessory-img {
    background: linear-gradient(135deg, #2a2a2a 0%, #3a3a3a 100%);
}

body.dark-mode .accessory-badge {
    box-shadow: 0 2px 12px rgba(0, 0, 0, 0.5);
}

body.dark-mode .accessory-btn:hover {
    box-shadow: 0 6px 20px rgba(220, 38, 38, 0.5);
}


/* Mode sombre pour les cookies */
body.dark-mode .cookie-consent {
    background-color: var(--gray);
    border-left: 1px solid rgba(255, 26, 26, 0.3);
    border-right: 1px solid rgba(255, 26, 26, 0.3);
    box-shadow: 0 -5px 35px rgba(0, 0, 0, 0.4);
}

body.dark-mode .cookie-text h3,
body.dark-mode .cookie-text p {
    color: var(--text-color);
}

/* Mode sombre pour les modaux */
body.dark-mode .modal-tabs {
    background-color: #2a2a2a;
}

body.dark-mode .modal-tab {
    color: #ffffff;
}

body.dark-mode .modal-tab:hover {
    background-color: rgba(255, 26, 26, 0.1);
}

/* Mode sombre pour le builder */
body.dark-mode .builder-row:hover {
    background-color: rgba(255, 255, 255, 0.02);
}

body.dark-mode .builder-add {
    background-color: rgba(255, 26, 26, 0.3);
    color: #ff3333;
    font-weight: 600;
}

body.dark-mode .builder-add:hover {
    background-color: var(--primary);
    color: white;
}

body.dark-mode .builder-remove {
    background-color: rgba(255, 107, 107, 0.3);
    color: #ff6b6b;
    font-weight: 600;
}

body.dark-mode .builder-remove:hover {
    background-color: #ff6b6b;
    color: white;
}

body.dark-mode .selector-search input {
    background-color: var(--dark);
    color: var(--text-color);
}

body.dark-mode .option-card {
    background-color: var(--gray);
    border-color: var(--border-color);
}

body.dark-mode .component-sort select {
    background-color: var(--gray);
    color: var(--text-color);
}

body.dark-mode .component-sort select option {
    background-color: var(--dark);
    color: var(--text-color);
}

/* Mode sombre pour les formulaires */
body.dark-mode .form-input,
body.dark-mode .form-textarea {
    background-color: var(--dark);
    border-color: var(--border-color);
}

/* Mode sombre - éléments spécifiques */
body.dark-mode .config-card,
body.dark-mode .category-card,
body.dark-mode .contact-form,
body.dark-mode .modal-content,
body.dark-mode .performance-item,
body.dark-mode .spec-item {
    background-color: var(--gray);
}

body.dark-mode .config-specs,
body.dark-mode .components-list {
    background-color: var(--dark);
}

body.dark-mode .spec {
    border-color: var(--border-color);
    background-color: var(--gray);
}

/* Corrections pour les textes générés dynamiquement */
body.dark-mode .builder-component .builder-title,
body.dark-mode .builder-component .builder-selected,
body.dark-mode .selected-component .selected-name,
body.dark-mode .selected-component .selected-price,
body.dark-mode .summary-label,
body.dark-mode .summary-value,
body.dark-mode .summary-title,
body.dark-mode #componentOptions .option-name,
body.dark-mode #componentOptions .option-spec,
body.dark-mode #componentOptions .option-spec span {
    color: var(--text-color) !important;
}

body.dark-mode #componentsContainer .option-card {
    background-color: var(--gray);
}

body.dark-mode #componentsContainer .option-name,
body.dark-mode #componentsContainer .option-spec span {
    color: var(--text-color) !important;
}

body.dark-mode .summary-price,
body.dark-mode .option-price,
body.dark-mode .config-price {
    color: var(--primary) !important;
}

body.dark-mode .selected-component,
body.dark-mode .selected-details,
body.dark-mode .option-specs,
body.dark-mode .component-option,
body.dark-mode .component-item,
body.dark-mode .component-name,
body.dark-mode .component-model {
    color: var(--text-color) !important;
}

body.dark-mode .selected-name,
body.dark-mode .selected-details,
body.dark-mode #componentsContainer .option-spec span {
    color: var(--text-color) !important;
}

body.dark-mode .modal-content h3,
body.dark-mode .modal-content p,
body.dark-mode .modal-content .config-info,
body.dark-mode .modal-content .game-title,
body.dark-mode .modal-content .spec-title,
body.dark-mode .modal-content .spec-value {
    color: var(--text-color);
}

body.dark-mode .modal-tab.active {
    color: var(--primary);
}

body.dark-mode .step-text,
body.dark-mode .summary-value {
    color: var(--text-color) !important;
}

body.dark-mode .selector-content {
    background-color: var(--dark);
}

body.dark-mode .option-name,
body.dark-mode .option-specs,
body.dark-mode .component-sort label,
body.dark-mode .selector-search input,
body.dark-mode .selector-search input::placeholder {
    color: var(--text-color);
}

body.dark-mode input,
body.dark-mode textarea,
body.dark-mode select,
body.dark-mode .selector-search input {
    background-color: var(--dark);
    color: var(--text-color);
    border-color: var(--border-color);
}

body.dark-mode .option-card {
    background-color: var(--gray);
    border-color: var(--border-color);
}

body.dark-mode .config-specs .spec {
    background-color: var(--dark);
}

body.dark-mode .config-info h3,
body.dark-mode .config-description {
    color: var(--text-color);
}

body.dark-mode {
    --border-color: #666666;
}

/* Forcer les couleurs du thème toggle */
#themeToggle,
#themeToggle span,
#themeToggle i {
    color: #ffffff !important;
}

/* ========================================
   11. MEDIA QUERIES RESPONSIVE
   ======================================== */

/* Navigation mobile */
@media (max-width: 768px) {
    .mobile-menu-btn {
        display: block;
        font-size: 1.5rem;
        color: white;
        background: none;
        border: none;
        cursor: pointer;
        z-index: 2000;
        padding: 10px;
    }

    .nav-links {
        display: none;
        position: fixed;
        top: 70px; /* Hauteur du header */
        left: 0;
        width: 100%;
        height: calc(100vh - 70px);
        background: rgba(20, 5, 5, 0.98);
        padding: 2rem;
        z-index: 1500;
    }

    .nav-links.active {
        display: flex;
        flex-direction: column;
        gap: 2rem;
        align-items: center;
    }

    .nav-links li {
        width: 100%;
        text-align: center;
    }

    .nav-links a {
        display: block;
        padding: 1rem;
        width: 100%;
        font-size: 1.2rem;
    }

    body.menu-open {
        overflow: hidden;
    }
}

/* Tablettes et écrans moyens */
@media (max-width: 992px) {
    .builder-grid {
        grid-template-columns: 1fr;
    }
    
    .builder-summary {
        position: static;
        margin-top: 2rem;
    }
    
    .config-detail {
        grid-template-columns: 1fr;
    }
    
    .theme-toggle {
        margin-right: 0;
    }
    
    .donate-btn {
        margin-left: 0;
        width: 40px;
        height: 40px;
        padding: 0;
        border-radius: 50%;
        display: flex;
        align-items: center;
        justify-content: center;
    }

    .donate-btn span {
        display: none !important; /* Cache le texte du don UNIQUEMENT sur mobile */
    }

    .donate-btn i {
        font-size: 1.1rem;
        margin: 0 !important;
    }

    .mobile-menu-btn {
        display: block;
        position: absolute;
        left: 1rem;
    }
    
    .logo {
        position: absolute;
        left: 50%;
        transform: translateX(-50%);
        margin: 0;
    }
    
    .nav-links {
        margin-left: 2rem;
    }
}

/* Smartphones et tablettes */
@media (max-width: 768px) {
    .navbar {
        display: grid !important;
        grid-template-columns: auto 1fr auto !important;
        align-items: center;
        padding: 0 1rem;
        height: 100%;
        position: relative;
    }
    
    .mobile-menu-btn {
        display: block;
        grid-column: 1;
        position: relative;
        left: 0;
    }
    
    .logo {
        grid-column: 2;
        justify-self: center;
        position: relative;
        transform: none;
        left: 0;
    }

    .header-buttons {
        display: flex;
        align-items: center;
        justify-content: flex-end;
        gap: 10px;
    }

    .theme-toggle {
        margin: 0;
    }

    .theme-toggle button {
        width: 40px;
        height: 40px;
    }

    .donate-btn {
        background: linear-gradient(135deg, var(--primary) 0%, #ff3b3b 100%);
        border-radius: 50%;
        width: 38px;
        height: 38px;
        min-width: unset;
        min-height: unset;
        padding: 0;
        font-size: 1.1rem;
        box-shadow: 0 2px 10px rgba(255,0,0,0.12);
        display: flex;
        align-items: center;
        justify-content: center;
        border: none;
    }

    .donate-btn .donate-text {
        display: none !important; /* Cache le texte du don UNIQUEMENT sur mobile */
    }

    .donate-btn i {
        font-size: 1.1rem;
        margin: 0 !important;
    }

    .nav-links {
        display: none;
    }
}
/* Petits smartphones */
@media (max-width: 576px) {
    .cookie-consent {
        position: fixed;
        bottom: -100%;
        left: 50%;
        transform: translateX(-50%);
        width: 95%;
        max-width: none;
        margin: 0;
        border-radius: 15px;
        padding: 1.25rem;
        box-shadow: 0 0 25px rgba(0, 0, 0, 0.3);
    }
    
    .cookie-consent.show {
        bottom: 15px;
    }
    
    .cookie-content {
        flex-direction: column;
        text-align: center;
        gap: 1.25rem;
    }
    
    .cookie-buttons {
        width: 100%;
        justify-content: center;
        gap: 0.75rem;
        flex-wrap: wrap;
    }
    
    .cookie-buttons .btn {
        flex: 1;
        min-width: 100px;
        max-width: 140px;
        padding: 0.7rem 1rem;
        font-size: 0.85rem;
        text-align: center;
    }
}

/* Très petits écrans */
@media (max-width: 480px) {
    .cookie-consent {
        width: 95%;
        padding: 1rem;
    }
    
    .cookie-text h3 {
        font-size: 1rem;
    }
    
    .cookie-text p {
        font-size: 0.85rem;
    }
    
    .cookie-buttons .btn {
        padding: 0.7rem 1rem;
        font-size: 0.85rem;
        min-width: 100px;
    }
}

/* ========================================
   14. BOUTON YOUTUBE FLOTTANT
   ======================================== */

.youtube-float {
    position: fixed;
    bottom: 32px;
    right: 32px;
    z-index: 999;
    background: #ff1a1a;
    border-radius: 50%;
    width: 58px;
    height: 58px;
    display: flex;
    justify-content: center;
    align-items: center;
    box-shadow: 0 6px 32px rgba(0,0,0,0.12);
    color: #fff;
    font-size: 2.2rem;
    animation: bounce 2s infinite;
    transition: background .25s;
}

.youtube-float:hover { 
    background: #e60000; 
}

@keyframes bounce {
    0%, 100% { transform: translateY(0);}
    30% { transform: translateY(-12px);}
    50% { transform: translateY(0);}
    60% { transform: translateY(-8px);}
    80% { transform: translateY(-3px);}
}

/* Responsive pour le bouton YouTube */
@media (max-width: 768px) {
    .youtube-float {
        bottom: 20px;
        right: 20px;
        width: 50px;
        height: 50px;
        font-size: 1.8rem;
    }
}

@media (max-width: 480px) {
    .youtube-float {
        bottom: 16px;
        right: 16px;
        width: 45px;
        height: 45px;
        font-size: 1.6rem;
    }
}

/* ========================================
   15. SECTION VIDÉOS
   ======================================== */

.videos-section {
    max-width: 900px;
    margin: 0 auto;
    padding: 48px 18px;
}

.video-category {
    margin-top: 42px;
    color: #ff1a1a;
}

.videos-grid {
    display: flex;
    flex-wrap: wrap;
    gap: 22px 32px;
    margin-top: 30px;
}

.titre-videos {
    text-align: left;
    margin-bottom: 40px;
    font-size: 1.5rem;
    color: var(--text-color);
    font-weight: bold;
    color: white;
    text-shadow: 0 0 10px rgb(13, 26, 141);
}

.video-box {
    flex: 1 1 350px;
    max-width: 360px;
}

@media (max-width: 700px) {
    .videos-grid {
        flex-direction: column;
        align-items: center;
    }
    
    .video-box {
        max-width: 98vw;
    }
}