:root {
    --accent: #ff0000;
    --bg-dark: #050505; 
    --card-bg: rgba(17, 17, 17, 0.7); 
    --text-main: #fff;
    --text-muted: #888;
    --svg-line-dr: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='200' height='200'%3E%3Cline x1='0' y1='0' x2='200' y2='200' stroke='%23ff0000' stroke-width='2' style='filter: drop-shadow(0 0 5px %23ff0000);' /%3E%3C/svg%3E");
    --svg-line-dl: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='200' height='200'%3E%3Cline x1='200' y1='0' x2='0' y2='200' stroke='%23ff0000' stroke-width='2' style='filter: drop-shadow(0 0 5px %23ff0000);' /%3E%3C/svg%3E");
}

* { box-sizing: border-box; }

html { background-color: var(--bg-dark); }

body {
    margin: 0; 
    background-color: transparent; 
    color: var(--text-main);
    font-family: 'Inter', sans-serif; 
    overflow-x: hidden;
    display: flex; 
    flex-direction: column; 
    min-height: 100vh;
}

main { flex: 1; }

body::before {
    content: "";
    position: fixed;
    top: 0; left: 0; right: 0; bottom: 0;
    z-index: -999;
    background-color: var(--bg-dark);
    -webkit-mask-image: linear-gradient(90deg, black 0%, black 8%, transparent 20%, transparent 80%, black 92%, black 100%);
    mask-image: linear-gradient(90deg, black 0%, black 8%, transparent 20%, transparent 80%, black 92%, black 100%);
    background-image: 
        var(--svg-line-dr), var(--svg-line-dr), var(--svg-line-dr),
        var(--svg-line-dl), var(--svg-line-dl), var(--svg-line-dl),
        linear-gradient(45deg, transparent calc(50% - 1px), #1a1a1a calc(50% - 1px), #1a1a1a calc(50% + 1px), transparent calc(50% + 1px)),
        linear-gradient(-45deg, transparent calc(50% - 1px), #1a1a1a calc(50% - 1px), #1a1a1a calc(50% + 1px), transparent calc(50% + 1px));
    background-size: 
        200px 200px, 200px 200px, 200px 200px, 
        200px 200px, 200px 200px, 200px 200px, 
        60px 60px, 60px 60px;
    background-repeat: no-repeat, no-repeat, no-repeat, no-repeat, no-repeat, no-repeat, repeat, repeat;
    animation: dataFlow 10s linear infinite;
    pointer-events: none;
}

@keyframes dataFlow {
    0% { background-position: -200px -200px, -200px -800px, -200px -1400px, 1800px -500px, 1800px -1100px, 1800px -1700px, 0 0, 0 0; }
    100% { background-position: 2000px 2000px, 2000px 1400px, 2000px 800px, -400px 1700px, -400px 1100px, -400px 500px, 0 0, 0 0; }
}

.reveal-on-scroll {
    opacity: 0; transform: translateY(60px) scale(0.95); filter: blur(10px);
    transition: opacity 0.8s cubic-bezier(0.16, 1, 0.3, 1), transform 0.8s cubic-bezier(0.16, 1, 0.3, 1), filter 0.8s cubic-bezier(0.16, 1, 0.3, 1);
    will-change: opacity, transform, filter;
}

.reveal-on-scroll.is-visible { opacity: 1; transform: translateY(0) scale(1); filter: blur(0); }

header { position: fixed; top: 0; width: 100%; z-index: 1000; transition: transform 0.4s cubic-bezier(0.16, 1, 0.3, 1); }

.glass-nav {
    display: flex; justify-content: space-between; align-items: center;
    padding: 20px 80px; 
    background: rgba(5, 5, 5, 0.4); 
    backdrop-filter: blur(24px); -webkit-backdrop-filter: blur(24px);
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

.logo { font-family: 'Orbitron'; font-weight: 900; letter-spacing: 3px; font-size: 1.8rem; text-transform: uppercase; }
.logo span { color: var(--accent); text-shadow: 0 0 20px var(--accent); }
nav ul { display: flex; list-style: none; gap: 40px; margin: 0; }

nav a {
    color: var(--text-main); text-decoration: none; font-weight: 700; text-transform: uppercase;
    font-size: 0.85rem; letter-spacing: 1.5px; position: relative; padding-bottom: 5px;
}

nav a::after {
    content: ''; position: absolute; width: 0; height: 2px; bottom: 0; left: 0;
    background-color: var(--accent); transition: width 0.4s ease; box-shadow: 0 0 10px var(--accent);
}

nav a:hover::after { width: 100%; }
nav a:hover { color: var(--accent); }

.hero-video-container { position: relative; height: 100vh; width: 100%; display: flex; align-items: center; justify-content: center; overflow: hidden; z-index: 1; }
#bg-video { position: absolute; top: 50%; left: 50%; min-width: 100%; min-height: 100%; width: auto; height: auto; transform: translate(-50%, -50%); z-index: -3; filter: saturate(1.2) contrast(1.1); }
.overlay-depth { position: absolute; top: 0; left: 0; width: 100%; height: 100%; background: linear-gradient(180deg, rgba(0,0,0,0.8) 0%, rgba(0,0,0,0) 40%, rgba(0,0,0,0) 60%, rgba(0,0,0,1) 100%); z-index: -2; }
.hero-content { text-align: center; z-index: 1; padding: 0 20px; display: flex; flex-direction: column; align-items: center; }

.reveal-text {
    font-family: 'Archivo Black', sans-serif !important;
    font-size: clamp(3rem, 12vw, 9rem);
    text-transform: uppercase; letter-spacing: -1px; margin: 0;
    color: rgba(0, 0, 0, 0.2) !important;
    -webkit-text-stroke: 1.5px #ffffff !important;
    background: url('media/cinematic.mp4') center center / cover no-repeat;
    -webkit-background-clip: text !important; background-clip: text !important;
    -webkit-font-smoothing: antialiased;
    filter: drop-shadow(0 0 20px rgba(255, 255, 255, 0.2));
    animation: textAppear 1.5s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

@keyframes textAppear {
    0% { transform: translateY(50px) scale(1.1); letter-spacing: 20px; opacity: 0; }
    100% { transform: translateY(0) scale(1); letter-spacing: -2px; opacity: 1; }
}

.hero-divider { width: 60px; height: 4px; background: var(--accent); margin: 20px auto; box-shadow: 0 0 20px var(--accent); border-radius: 2px; }
.subtitle { font-size: 1.2rem; font-weight: 200; color: rgba(255, 255, 255, 0.7); margin-bottom: 50px; letter-spacing: 4px; text-transform: uppercase; opacity: 0; animation: fadeIn 1s ease forwards 0.8s; }

@keyframes fadeIn { to { opacity: 1; } }

.page-title { text-align: center; margin-bottom: 70px; position: relative; z-index: 10; padding-top: 150px; }
.page-title h2 { font-family: 'Archivo Black', sans-serif; font-size: clamp(1.8rem, 5vw, 3rem); margin: 0; text-transform: uppercase; letter-spacing: 1px; overflow-wrap: break-word; line-height: 1.2; }
.divider-glow { width: 80px; height: 4px; background: var(--accent); margin: 20px auto; box-shadow: 0 0 20px var(--accent); }
.page-subtitle { color: var(--text-muted); font-size: 1.1rem; }

.container-catalogue { padding: 0 clamp(15px, 5vw, 50px) 80px; max-width: 1400px; margin: 0 auto; position: relative; z-index: 10; width: 100%; overflow: hidden; }

/* 1. GRILLE : 3 COLONNES MAX SUR ORDINATEUR */
.grid-catalogue { 
    display: grid; 
    grid-template-columns: repeat(3, 1fr); 
    gap: clamp(40px, 6vw, 60px) 20px; 
    justify-content: center; 
    width: 100%; 
    max-width: 1200px; 
    margin: 0 auto; 
}

.card-advanced {
    background: var(--card-bg); 
    border: 1px solid rgba(255,255,255,0.08); border-radius: 8px;
    backdrop-filter: blur(12px); -webkit-backdrop-filter: blur(12px);
    transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275); 
    position: relative; overflow: visible; 
    display: flex; flex-direction: column; padding-top: 140px; 
    width: 100%; 
    max-width: 450px; 
    margin: 0 auto;
    box-shadow: 0 10px 30px rgba(0,0,0,0.5);
}

.card-image-png {
    position: absolute; top: -60px; left: 50%; transform: translateX(-50%);
    width: 90%; height: 180px; background-size: contain; background-repeat: no-repeat; background-position: center bottom;
    transition: all 0.5s ease; filter: grayscale(100%) drop-shadow(0 20px 15px rgba(0,0,0,0.7)); z-index: 5; display: block;
}

.card-advanced:hover { background: rgba(25, 25, 25, 0.85); border-color: rgba(255,0,0,0.5); transform: translateY(-15px) scale(1.02); box-shadow: 0 20px 60px rgba(0,0,0,0.8); }
.card-advanced:hover .card-image-png { filter: grayscale(0%) drop-shadow(0 30px 25px rgba(255,0,0,0.3)); transform: translateX(-50%) scale(1.1) translateY(-10px); cursor: pointer; }

.card-content { padding: 0 30px 30px 30px; position: relative; z-index: 2; margin-top: 15px; }
.card-brand { color: var(--accent); font-size: 0.75rem; text-transform: uppercase; font-weight: 800; letter-spacing: 2px; }
.card-content h3 { font-family: 'Archivo Black', sans-serif; font-size: 1.6rem; margin: 5px 0 15px 0; min-height: 60px; line-height: 1.2; display: flex; align-items: flex-start; text-transform: uppercase; letter-spacing: 1px; }
.card-stats { display: flex; justify-content: space-between; gap: 10px; margin: 10px 0 20px 0; padding: 15px; background: rgba(255, 255, 255, 0.03); border-radius: 5px; }
.stat-item { text-align: center; flex: 1; }
.stat-item span { display: block; font-size: 0.65rem; color: var(--text-muted); text-transform: uppercase; margin-bottom: 5px; }
.stat-item strong { display: block; font-size: 1.1rem; color: var(--text-main); font-weight: 700; }
.card-description { font-size: 0.85rem; color: #ccc; margin-bottom: 25px; line-height: 1.6; min-height: 50px; }
.price-solid { font-size: 1.5rem; font-weight: 800; color: var(--accent); }

.card-overlay-glow {
    position: absolute; top: 0; left: 0; width: 100%; height: 100%;
    background: radial-gradient(circle at 50% 130%, rgba(255,0,0,0.2) 0%, rgba(0,0,0,0) 80%);
    opacity: 0; transition: opacity 0.5s ease; z-index: 1; pointer-events: none; border-radius: 8px;
}
.card-advanced:hover .card-overlay-glow { opacity: 1; }

.css-modal {
    position: fixed; top: 0; left: 0; width: 100%; height: 100vh;
    background: rgba(0, 0, 0, 0.96); backdrop-filter: blur(15px); -webkit-backdrop-filter: blur(15px);
    z-index: 9999; display: flex; flex-direction: column; align-items: center; justify-content: center;
    opacity: 0; pointer-events: none; transition: opacity 0.4s ease;
}
.css-modal:target { opacity: 1; pointer-events: auto; }

/* FIX : CROIX AU PREMIER PLAN */
.modal-close { position: absolute; top: 100px; right: 50px; color: #fff; font-size: 4rem; text-decoration: none; font-family: 'Inter', sans-serif; font-weight: 200; transition: 0.3s; z-index: 10000; }
.modal-close:hover { color: var(--accent); transform: rotate(90deg); }

.modal-content { text-align: center; }
.modal-content img { max-width: 90vw; max-height: 70vh; object-fit: contain; filter: drop-shadow(0 30px 50px rgba(255,0,0,0.2)); transform: scale(0.8) translateY(50px); transition: transform 0.6s cubic-bezier(0.175, 0.885, 0.32, 1.275); }
.css-modal:target .modal-content img { transform: scale(1) translateY(0); }
.modal-content h2 { font-family: 'Orbitron', sans-serif; font-size: 3rem; margin-top: 30px; color: var(--text-main); letter-spacing: 5px; text-transform: uppercase; }
.modal-content span { color: var(--accent); }

.container-search { padding: 0 20px 100px; max-width: 800px; margin: 0 auto; text-align: center; position: relative; z-index: 10; }
.error-box { background-color: rgba(255, 0, 0, 0.05); border: 1px solid var(--accent); color: var(--accent); padding: 15px; margin-bottom: 25px; border-radius: 5px; font-weight: bold; text-align: left; }
.form-wrapper { background: var(--card-bg); padding: 50px; border: 1px solid rgba(255, 255, 255, 0.05); border-radius: 5px; box-shadow: 0 20px 50px rgba(0,0,0,0.6); }
.search-form .input-group { display: flex; flex-direction: column; text-align: left; margin-bottom: 30px; }
.search-form label { font-family: 'Montserrat', sans-serif; font-size: 0.85rem; text-transform: uppercase; color: var(--accent); margin-bottom: 10px; letter-spacing: 1px; }
.search-form input { background: #000; border: 1px solid #222; padding: 15px; color: #fff; font-family: 'Montserrat', sans-serif; font-size: 1rem; transition: 0.3s; }
.search-form input:focus { border-color: var(--accent); outline: none; box-shadow: 0 0 15px var(--accent-glow); }
.form-actions { display: flex; gap: 20px; justify-content: center; }
.search-term { color: var(--accent); font-weight: 800; text-shadow: 0 0 10px var(--accent-glow); }

.btn-primary-reveal { background: transparent; color: #fff; border: 1px solid rgba(255,255,255,0.1); padding: 18px 50px; text-decoration: none; font-weight: 800; text-transform: uppercase; font-size: 0.9rem; letter-spacing: 2px; transition: 0.5s; display: inline-flex; align-items: center; gap: 15px; cursor: pointer; }
.btn-primary-reveal:hover { background: var(--accent); border-color: var(--accent); box-shadow: 0 0 40px var(--accent-glow); }

footer { padding: 60px; background: rgba(0,0,0,0.8); border-top: 1px solid rgba(255,255,255,0.03); color: #555; text-align: center; position: relative; z-index: 10; }

.hamburger { display: none; flex-direction: column; cursor: pointer; gap: 6px; z-index: 1001; padding: 10px; }
.hamburger span { width: 30px; height: 2px; background-color: var(--text-main); transition: 0.3s; }

/* 2. BREAKPOINT 1 : MENU BURGER ET TABLETTES (900px) - PASSAGE A 2 COLONNES */
@media (max-width: 900px) {
    .hamburger { display: flex; }
    .glass-nav { padding: 15px 20px; flex-wrap: wrap; }
    nav { width: 100%; order: 3; }
    .nav-list { 
        display: none; flex-direction: column; width: 100%; 
        background: rgba(5, 5, 5, 0.95); backdrop-filter: blur(24px); 
        padding: 30px 0; text-align: center; gap: 25px; margin-top: 15px;
    }
    #menu-toggle:checked ~ nav .nav-list { display: flex; }
    #menu-toggle:checked ~ .hamburger span:nth-child(1) { transform: translateY(8px) rotate(45deg); }
    #menu-toggle:checked ~ .hamburger span:nth-child(2) { opacity: 0; }
    #menu-toggle:checked ~ .hamburger span:nth-child(3) { transform: translateY(-8px) rotate(-45deg); }
    
    .page-title { padding-top: 130px; }
    
    .grid-catalogue { grid-template-columns: repeat(2, 1fr); gap: 50px 20px; }
}

/* 3. BREAKPOINT 2 : TÉLÉPHONES (576px) - PASSAGE A 1 COLONNE STRICTE */
@media (max-width: 576px) {
    .grid-catalogue { grid-template-columns: 1fr; } 
    .page-title { padding-top: 120px; }
    .form-wrapper { padding: 30px 15px; }
    .card-advanced { padding-top: 120px; }
    .card-image-png { width: 95%; height: 160px; top: -50px; }
}