/* =========================================
   1. VARIABLES & CONFIGURATION GLOBALE
   ========================================= */
@import url('https://fonts.googleapis.com/css2?family=Plus+Jakarta+Sans:wght@300;400;600;700;800&display=swap');

:root {
    --bg: #050810;
    /* Noir profond bleuté */
    --card-bg: rgba(15, 23, 42, 0.6);
    /* Fond de carte vitré */
    --primary: #00d4ff;
    /* Bleu Cyan Néon */
    --secondary: #7000ff;
    /* Violet Néon */
    --text: #ffffff;
    --text-dim: #94a3b8;
    /* Gris bleuté pour le texte secondaire */
    --glass-border: rgba(255, 255, 255, 0.1);
    /* Bordure subtile */
    --radius: 30px;
    /* Arrondi général */
    --transition: all 0.4s cubic-bezier(0.25, 1, 0.5, 1);
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Plus Jakarta Sans', sans-serif;
}

html {
    scroll-behavior: smooth;
}

body {
    background-color: var(--bg);
    color: var(--text);
    overflow-x: hidden;
    line-height: 1.6;
}

/* Fond animé (Blobs) - Fonctionne sur toutes les pages */
.blob-c {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: -1;
    filter: blur(90px);
    opacity: 0.3;
    pointer-events: none;
}

.shape-blob {
    position: absolute;
    width: 500px;
    height: 500px;
    background: var(--primary);
    border-radius: 50%;
    top: -10%;
    right: -10%;
    animation: move 25s infinite alternate;
}

.shape-blob.one {
    background: var(--secondary);
    width: 600px;
    height: 600px;
    bottom: -10%;
    left: -10%;
}

@keyframes move {
    from {
        transform: translate(0, 0);
    }

    to {
        transform: translate(100px, 100px);
    }
}

/* Images responsives partout */
img {
    max-width: 100%;
    height: auto;
    display: block;
    border-radius: 20px;
}

/* =========================================
   2. NAVIGATION (HEADER FLOTTANT)
   ========================================= */
.glass-nav {
    position: fixed;
    top: 20px;
    left: 50%;
    transform: translateX(-50%);
    width: 90%;
    max-width: 1100px;
    padding: 15px 30px;
    background: rgba(5, 8, 16, 0.85);
    backdrop-filter: blur(20px);
    border-radius: 50px;
    border: 1px solid var(--glass-border);
    display: flex;
    justify-content: space-between;
    align-items: center;
    z-index: 1000;
}

.logo {
    font-size: 1.2rem;
    font-weight: 800;
    letter-spacing: 1px;
}

.logo span {
    color: var(--primary);
}

.glass-nav ul {
    display: flex;
    list-style: none;
    gap: 30px;
}

.glass-nav a {
    text-decoration: none;
    color: var(--text);
    font-weight: 600;
    font-size: 0.9rem;
    transition: 0.3s;
}

.glass-nav a:hover {
    color: var(--primary);
}

/* Bouton Contact & Retour */
.nav-contact {
    background: var(--primary);
    color: var(--bg) !important;
    padding: 8px 20px;
    border-radius: 20px;
}

.simple-nav {
    position: fixed;
    top: 30px;
    /* Ecart du haut */
    left: 30px;
    /* Ecart de la gauche */
    z-index: 1000;
    /* Toujours au dessus */

    /* On enlève tout le style "Barre" */
    width: auto;
    background: transparent;
    border: none;
    padding: 0;
    backdrop-filter: none;
}

/* Le bouton garde son style, mais on s'assure qu'il est beau tout seul */
.simple-nav .btn-back {
    /* On remet le style "Verre" directement sur le bouton */
    background: rgba(15, 23, 42, 0.6);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 50px;
    padding: 12px 25px;
    color: white;
    text-decoration: none;
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 10px;
    transition: 0.3s;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.3);
}

.simple-nav .btn-back:hover {
    background: rgba(0, 212, 255, 0.15);
    border-color: #00d4ff;
    color: #00d4ff;
    transform: translateY(-3px);
    box-shadow: 0 0 20px rgba(0, 212, 255, 0.3);
}

/* =========================================
   3. HERO SECTIONS (TITRES)
   ========================================= */

/* Hero Accueil (Index) */
.modern-hero {
    height: 90vh;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    padding: 0 5%;
}

.badge {
    background: rgba(0, 212, 255, 0.1);
    color: var(--primary);
    padding: 6px 16px;
    border-radius: 20px;
    font-size: 0.75rem;
    font-weight: 700;
    border: 1px solid var(--primary);
    display: inline-block;
    margin-bottom: 20px;
}

.modern-hero h1 {
    font-size: clamp(2.5rem, 6vw, 5rem);
    line-height: 1.1;
    font-weight: 800;
    margin-bottom: 20px;
}

.text-gradient {
    background: linear-gradient(90deg, var(--primary), var(--secondary));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.modern-hero p {
    color: var(--text-dim);
    font-size: 1.2rem;
    max-width: 600px;
    margin: 0 auto 40px;
}

.btn-primary {
    background: var(--text);
    color: var(--bg);
    padding: 15px 35px;
    border-radius: 30px;
    text-decoration: none;
    font-weight: 800;
    transition: 0.3s;
    display: inline-block;
}

.btn-primary:hover {
    transform: scale(1.05);
    box-shadow: 0 0 20px rgba(255, 255, 255, 0.3);
}

/* Hero Pages Projets (PC, NAS, etc.) */
.project-hero {
    height: 60vh;
    /* Hauteur fixe */
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    background-size: cover;
    background-position: center;
    position: relative;
    border-bottom: 1px solid var(--glass-border);
}

.hero-content {
    background: rgba(5, 8, 16, 0.6);
    /* Fond sombre derrière le texte */
    padding: 40px;
    border-radius: var(--radius);
    backdrop-filter: blur(5px);
    border: 1px solid var(--glass-border);
}

.tag {
    color: var(--primary);
    font-weight: 700;
    letter-spacing: 2px;
    text-transform: uppercase;
    font-size: 0.8rem;
    display: block;
    margin-bottom: 10px;
}

.hero-content h1 {
    font-size: clamp(2rem, 4vw, 3.5rem);
    margin-bottom: 10px;
    line-height: 1.2;
}

.highlight {
    color: var(--primary);
}

/* --- BENTO GRID (INDEX) --- */
.bento-section { padding: 80px 5%; max-width: 1400px; margin: 0 auto; }

.bento-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    grid-template-rows: repeat(2, 320px);
    gap: 20px;
}

.bento-item {
    background: var(--card-bg);
    border-radius: var(--radius);
    padding: 35px;
    text-decoration: none;
    color: white;
    border: 1px solid var(--glass-border);
    position: relative; /* Important pour l'icône */
    overflow: hidden;
    transition: 0.3s ease; /* Transition simple au survol */
}

/* Effet simple au survol (plus de 3D) */
.bento-item:hover {
    border-color: var(--primary);
    background: rgba(15, 23, 42, 0.8);
    transform: translateY(-5px); /* Monte légèrement */
}

/* Tailles des tuiles */
.big { grid-column: span 2; }
.tall { grid-row: span 2; }
.wide { grid-column: span 2; }

/* Typographie interne */
.category {
    color: var(--primary);
    font-size: 0.75rem;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 1.5px;
    margin-bottom: 10px;
    display: block;
}

.bento-item h3 {
    font-size: 1.8rem;
    font-weight: 700;
    line-height: 1.2;
    margin-bottom: 10px;
}

.bento-item p {
    color: var(--text-dim);
    font-size: 1rem;
    line-height: 1.5;
    max-width: 85%; /* Pour ne pas chevaucher l'icône */
}

/* L'icône subtile en bas à droite */
.card-icon {
    position: absolute;
    bottom: -20px;
    right: -20px;
    font-size: 8rem; /* Très gros */
    color: white;
    opacity: 0.03; /* Très subtil */
    transform: rotate(-15deg); /* Légèrement penché */
    transition: 0.4s ease;
}

/* Au survol, l'icône devient un peu plus visible */
.bento-item:hover .card-icon {
    opacity: 0.1;
    transform: rotate(0deg) scale(1.1);
    color: var(--primary);
}

/* =========================================
   5. CONTENU DES PAGES DÉTAILS (PC, NAS...)
   ========================================= */
.detail-content {
    padding: 80px 8%;
    max-width: 1200px;
    margin: 0 auto;
}

/* Sections de texte */
.info-section {
    margin-bottom: 60px;
    text-align: center;
    max-width: 800px;
    margin-left: auto;
    margin-right: auto;
}

.info-section h2 {
    font-size: 2rem;
    margin-bottom: 20px;
    color: var(--text);
}

.info-section i {
    color: var(--primary);
    margin-right: 10px;
}

.info-section p {
    color: var(--text-dim);
    font-size: 1.1rem;
}

.section-subtitle {
    font-size: 2rem;
    text-align: center;
    margin: 80px 0 40px;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.05), transparent);
    padding: 10px;
    border-radius: 50px;
}

/* Grilles Techniques (Hardware Grid) */
.hardware-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 20px;
    margin-bottom: 80px;
}

.hw-card {
    background: var(--card-bg);
    padding: 30px;
    border-radius: 20px;
    border: 1px solid var(--glass-border);
    text-align: center;
    transition: 0.3s;
}

.hw-card:hover {
    border-color: var(--primary);
    transform: translateY(-5px);
}

.hw-card i {
    font-size: 2.5rem;
    color: var(--primary);
    margin-bottom: 15px;
}

.hw-card h4 {
    font-size: 1.1rem;
    margin-bottom: 5px;
}

.hw-card p {
    color: var(--text-dim);
    font-size: 0.9rem;
}

/* Étapes (Step by Step) */
.step-item {
    display: flex;
    align-items: center;
    gap: 50px;
    margin-bottom: 100px;
    background: rgba(255, 255, 255, 0.02);
    padding: 30px;
    border-radius: var(--radius);
    border: 1px solid transparent;
    transition: 0.3s;
}

.step-item:hover {
    border-color: var(--glass-border);
    background: rgba(255, 255, 255, 0.03);
}

.step-item.reverse {
    flex-direction: row-reverse;
}

.step-text {
    flex: 1;
}

.step-text h3 {
    font-size: 1.8rem;
    margin-bottom: 15px;
    color: var(--primary);
}

.step-text p {
    color: var(--text-dim);
    margin-bottom: 20px;
}

.step-img {
    flex: 1;
}

.step-img img {
    width: 100%;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3);
}

/* Médias & Vidéos */
.detail-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 40px;
    margin-top: 40px;
}

.media-gallery {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.media-item {
    background: var(--card-bg);
    padding: 15px;
    border-radius: 20px;
    border: 1px solid var(--glass-border);
}

.video-wrapper {
    position: relative;
    padding-bottom: 56.25%;
    height: 0;
    overflow: hidden;
    border-radius: 10px;
}

.video-wrapper iframe,
.video-wrapper video {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    border: none;
}

.caption {
    text-align: center;
    font-size: 0.8rem;
    color: var(--text-dim);
    margin-top: 10px;
    font-style: italic;
}

/* Boîte de Résultats */
.results-box {
    background: linear-gradient(135deg, rgba(0, 212, 255, 0.1), rgba(0, 0, 0, 0));
    padding: 60px;
    border-radius: 40px;
    text-align: center;
    border: 1px solid var(--primary);
    position: relative;
    overflow: hidden;
}

.results-grid {
    display: flex;
    justify-content: space-around;
    flex-wrap: wrap;
    gap: 30px;
    margin-top: 40px;
}

.res-val {
    display: block;
    font-size: 2.5rem;
    font-weight: 800;
    color: var(--primary);
    text-shadow: 0 0 20px rgba(0, 212, 255, 0.4);
}

.res-item p {
    color: var(--text-dim);
    text-transform: uppercase;
    font-size: 0.8rem;
    letter-spacing: 1px;
    margin-top: 5px;
}

/* =========================================
   6. FOOTER
   ========================================= */
footer {
    text-align: center;
    padding: 50px;
    border-top: 1px solid var(--glass-border);
    color: var(--text-dim);
    font-size: 0.9rem;
    margin-top: 50px;
}

/* =========================================
   7. RESPONSIVE (MOBILE & TABLETTE)
   ========================================= */
@media (max-width: 1024px) {
    .bento-grid {
        grid-template-columns: repeat(2, 1fr);
        grid-template-rows: auto;
    }

    .big,
    .tall,
    .wide {
        grid-column: span 2;
        grid-row: span 1;
    }

    .step-item,
    .step-item.reverse {
        flex-direction: column;
        text-align: center;
        gap: 30px;
    }

    .detail-grid {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 600px) {
    .bento-grid {
        grid-template-columns: 1fr;
    }

    .big,
    .tall,
    .wide {
        grid-column: span 1;
    }

    .glass-nav {
        width: 95%;
        padding: 10px 20px;
    }

    .glass-nav ul {
        display: none;
    }

    /* Menu caché sur mobile */
    .modern-hero h1 {
        font-size: 2.5rem;
    }

    .res-val {
        font-size: 2rem;
    }
}