/* ==========================================================================
   CSS - SINGLE PROJET (APPLE x IMMERSIF BLEU - ULTIMATE)
   ========================================================================== */

:root {
    --bg-dark: #030406;
    --bg-black-deep: #000000;
    --primary-blue: #0066cc;
    --secondary-cyan: #00b4d8;
    --text-main: #ffffff;
    --text-muted: #8b949e;
    
    --glass-bg: rgba(255, 255, 255, 0.02);
    --glass-border: rgba(0, 180, 216, 0.15);
    
    --transition: 0.8s cubic-bezier(0.16, 1, 0.3, 1);
}

.single-project-page, .single-project-page * { box-sizing: border-box; }

.single-project-page {
    background-color: var(--bg-dark);
    color: var(--text-main);
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
    line-height: 1.5;
    overflow-x: hidden;
    width: 100vw;
    margin: 0;
    padding: 0;
    -webkit-font-smoothing: antialiased;
}

/* ==========================================
   LIGNE DE SCROLL & HALOS
   ========================================== */
.tech-thread-wrapper { position: fixed; top: 0; left: 2vw; width: 2px; height: 100vh; z-index: 9999; pointer-events: none; }
.tech-thread-track { width: 100%; height: 100%; background: rgba(255, 255, 255, 0.05); position: relative; }
.tech-thread-fill { position: absolute; top: 0; left: 0; width: 100%; height: 0%; background: linear-gradient(to bottom, var(--secondary-cyan), var(--primary-blue)); box-shadow: 0 0 15px var(--secondary-cyan); will-change: height; }
.tech-thread-glow { position: absolute; bottom: 0; left: 50%; transform: translate(-50%, 50%); width: 12px; height: 12px; border-radius: 50%; background: #ffffff; box-shadow: 0 0 20px 8px var(--secondary-cyan); }

.ambient-glow { position: absolute; border-radius: 50%; filter: blur(150px); opacity: 0.15; pointer-events: none; mix-blend-mode: screen; z-index: 0; }
.glow-top-left { width: 60vw; height: 60vw; top: -10%; left: -20%; background: var(--primary-blue); }
.glow-top-center { width: 70vw; height: 50vw; top: -20%; left: 15%; background: var(--primary-blue); }
.glow-center-right { width: 50vw; height: 50vw; top: 40%; right: -10%; background: var(--secondary-cyan); }
.glow-center-massive { width: 80vw; height: 80vw; top: 50%; left: 50%; transform: translate(-50%, -50%); background: var(--primary-blue); opacity: 0.1; }
.glow-corner { position: absolute; background: var(--secondary-cyan); filter: blur(90px); opacity: 0.2; border-radius: 50%; pointer-events: none; }

/* ==========================================
   LAYOUT EDGE-TO-EDGE & GRILLES
   ========================================== */
.bg-black-deep { background-color: var(--bg-black-deep); }
.edge-section { padding: 6rem 0; width: 100vw; position: relative; }
.border-top-cyan { border-top: 1px solid rgba(0, 180, 216, 0.1); }
.edge-container { width: 100%; padding: 0 8vw; position: relative; z-index: 2; }

/* Grille Split (Hero et Résultat) */
.split-edge { display: grid; grid-template-columns: 1fr 1fr; gap: 6vw; align-items: center; }
.hero-split { grid-template-columns: 0.9fr 1.1fr; } 

/* Utilitaires */
.relative { position: relative; } .z-10 { z-index: 10; } .overflow-hidden { overflow: hidden; } .p-0 { padding: 0 !important; }
.text-center { text-align: center; } .text-right { text-align: right; } .text-left { text-align: left; }
.text-muted { color: var(--text-muted); } .italic { font-style: italic; } .font-bold { font-weight: 700; } .uppercase { text-transform: uppercase; }
.text-sm { font-size: 0.9rem; } .text-md { font-size: 1.15rem; } .text-lg { font-size: 1.4rem; font-weight: 700; }
.m-0 { margin: 0; } .mx-auto { margin-left: auto; margin-right: auto; }
.mt-3 { margin-top: 1.5rem; } .mt-4 { margin-top: 2rem; } .mt-5 { margin-top: 3.5rem; } .mt-6 { margin-top: 5rem; } 
.mb-2 { margin-bottom: 0.5rem; } .mb-3 { margin-bottom: 1.2rem; } .mb-4 { margin-bottom: 2rem; } .mb-5 { margin-bottom: 3.5rem; } .mb-6 { margin-bottom: 5rem; }
.mr-3 { margin-right: 1.5rem; } .pt-5 { padding-top: 3rem; }
.w-100 { width: 100%; } .h-100 { height: 100%; }

/* Typographie */
.edge-title-massive { font-size: clamp(3rem, 6vw, 5.5rem); font-weight: 800; letter-spacing: -0.04em; margin: 0; color: var(--text-main); }
.edge-title-large { font-size: clamp(2.5rem, 5vw, 4.5rem); font-weight: 700; letter-spacing: -0.03em; line-height: 1.1; margin: 0; color: var(--text-main); }
.text-gradient-blue { background: linear-gradient(90deg, var(--secondary-cyan), var(--primary-blue)); -webkit-background-clip: text; -webkit-text-fill-color: transparent; }
.text-gradient-cyan { background: linear-gradient(90deg, #fff, var(--secondary-cyan)); -webkit-background-clip: text; -webkit-text-fill-color: transparent; }
.text-main { color: var(--text-main); }

.edge-desc { color: var(--text-muted); font-weight: 400; font-size: 1.15rem; }
.edge-desc strong { color: var(--text-main); font-weight: 600; }
.cyber-eyebrow { font-size: 0.95rem; font-weight: 700; letter-spacing: 0.2em; text-transform: uppercase; color: var(--secondary-cyan); display: inline-block; padding: 6px 18px; border: 1px solid var(--glass-border); border-radius: 30px; background: rgba(0, 180, 216, 0.05); }

/* Listes formatées dynamiquement */
.edge-list { list-style: none; padding: 0; margin: 0; display: flex; flex-direction: column; gap: 1.2rem;}
.edge-list li { font-size: 1.15rem; color: var(--text-muted); position: relative; padding-left: 2rem; line-height: 1.6; }
.edge-list li::before { content: '→'; position: absolute; left: 0; color: var(--secondary-cyan); font-weight: bold; }

/* ==========================================
   BOUTONS & LIENS
   ========================================== */
.btn-blue-solid { display: inline-flex; justify-content: center; align-items: center; background: linear-gradient(135deg, var(--primary-blue), #004d99); color: #fff !important; padding: 1.2rem 2.8rem; border-radius: 40px; font-weight: 700; font-size: 1.1rem; text-decoration: none; box-shadow: 0 10px 30px rgba(0, 102, 204, 0.3); transition: all 0.3s ease; border: none; cursor: pointer; }
.btn-blue-solid:hover { transform: scale(1.03); box-shadow: 0 15px 40px rgba(0, 180, 216, 0.5); }
.btn-blue-outline { display: inline-flex; justify-content: center; align-items: center; background-color: transparent; color: var(--text-main) !important; padding: 1.2rem 2.8rem; border-radius: 40px; font-weight: 700; font-size: 1.1rem; text-decoration: none; backdrop-filter: blur(10px); transition: all 0.3s ease; border: 2px solid var(--glass-border); cursor: pointer; }
.btn-blue-outline:hover { border-color: var(--secondary-cyan); background: rgba(0, 180, 216, 0.1); }
.massive-btn { padding: 1.4rem 3.5rem; }

.btn-link-cyan { color: var(--secondary-cyan); font-weight: 700; text-decoration: none; transition: var(--transition); }
.btn-link-cyan:hover { color: var(--primary-blue); transform: translateX(-5px); }

/* Composant Retour au portfolio & Tags Hero */
.back-link { display: inline-flex; align-items: center; justify-content: center; color: var(--text-main) !important; text-decoration: none; font-weight: 600; font-size: 0.9rem; text-transform: uppercase; letter-spacing: 0.05em; padding: 10px 20px; border-radius: 30px; background: rgba(255,255,255,0.03); border: 1px solid rgba(255,255,255,0.1); transition: all 0.3s ease; }
.back-link:hover { color: #fff !important; border-color: var(--secondary-cyan); background: rgba(0, 180, 216, 0.1); transform: translateX(-5px); }
.back-link svg { margin-right: 8px; }

.hero-meta-tags { display: flex; align-items: center; gap: 15px; flex-wrap: wrap; }
.hero-tag-category { font-weight: 700; text-transform: uppercase; letter-spacing: 0.1em; font-size: 0.95rem; display: flex; align-items: center; gap: 6px; }

/* ==========================================
   GLASSMORPHISM & PANELS
   ========================================== */
.glass-card { background: var(--glass-bg); border: 1px solid var(--glass-border); padding: 2vw; border-radius: 24px; text-align: left; backdrop-filter: blur(20px); transition: all 0.3s ease; }
.glass-card:hover { border-color: var(--secondary-cyan); transform: translateY(-5px); box-shadow: 0 20px 40px rgba(0,0,0,0.5); }
.edge-glass-panel { background: var(--glass-bg); padding: 3vw; border-radius: 30px; backdrop-filter: blur(20px); border: 1px solid rgba(255,255,255,0.05); }
.border-cyan { border-color: var(--glass-border) !important; box-shadow: inset 0 0 40px rgba(0, 180, 216, 0.05); }
.border-blue { border-color: var(--primary-blue) !important; box-shadow: inset 0 0 40px rgba(0, 102, 204, 0.05); }

/* ==========================================
   COMPOSANTS SPÉCIFIQUES (HERO & BENTO)
   ========================================== */
/* Image Hero (Droite) */
.hero-project-image { width: 100%; aspect-ratio: 4/3; border-radius: 24px; overflow: hidden; box-shadow: 0 40px 100px rgba(0,0,0,0.8), -20px 0 60px rgba(0,180,216,0.2); }
.glass-topbar { background: rgba(20, 25, 35, 0.8); backdrop-filter: blur(10px); padding: 12px 16px; display: flex; align-items: center; border-bottom: 1px solid rgba(255,255,255,0.08); position: absolute; top: 0; width: 100%; z-index: 5; }
.glass-topbar .dot { width: 10px; height: 10px; border-radius: 50%; display: block; margin-right: 8px;}
.glass-topbar .red { background: #ff5f56; } .glass-topbar .yellow { background: #ffbd2e; } .glass-topbar .green { background: #27c93f; }
.browser-url-mock { margin: 0 auto; padding: 4px 16px; background: rgba(0,0,0,0.4); border-radius: 6px; font-family: monospace; font-size: 0.75rem; color: rgba(255,255,255,0.5); }
.hero-project-image .p-img { width: 100%; height: 100%; object-fit: cover; object-position: top center; transition: transform 1.5s ease; }
.hero-project-image:hover .p-img { transform: scale(1.03); }
.flex-center { display: flex; align-items: center; justify-content: center; }

/* Meta Grid (Bento) */
.features-edge-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 2vw; }
.meta-card { display: flex; flex-direction: column; align-items: flex-start; justify-content: center; gap: 1rem; padding: 2.5rem; text-align: left; }
.meta-icon { display: flex; align-items: center; justify-content: center; width: 50px; height: 50px; background: rgba(0,0,0,0.4); border-radius: 14px; border: 1px solid rgba(255,255,255,0.05); color: var(--secondary-cyan); }
.meta-label { font-size: 0.85rem; color: var(--text-muted); text-transform: uppercase; font-weight: 700; letter-spacing: 0.1em; margin-bottom: 6px; }
.meta-value { font-size: 1.3rem; font-weight: 700; color: var(--text-main); }

/* Tags d'outils */
.tech-tags { display: flex; flex-wrap: wrap; gap: 10px; }
.tag { font-family: monospace; font-size: 0.9rem; font-weight: 700; padding: 8px 16px; border-radius: 8px; }
.cyan-badge { color: #81e6d9; background: rgba(129, 230, 217, 0.1); border: 1px solid rgba(129, 230, 217, 0.2); }

/* Contenu Formaté (La Solution) pleine largeur */
.content-format p { color: var(--text-muted); font-size: 1.15rem; line-height: 1.8; margin-bottom: 1.5rem; }
.content-format h2, .content-format h3, .content-format h4 { color: var(--text-main); font-weight: 700; margin-top: 2.5rem; margin-bottom: 1.2rem; }
.content-format ul { color: var(--text-muted); font-size: 1.15rem; line-height: 1.8; margin-bottom: 1.5rem; padding-left: 2rem; list-style-type: none; }
.content-format ul li { margin-bottom: 0.5rem; position: relative; }
.content-format ul li::before { content: '→'; position: absolute; left: -1.5rem; color: var(--secondary-cyan); font-weight: bold; }
.content-format strong { color: var(--text-main); }

/* Bloc Métrique Géant */
.massive-metric-box { display: flex; flex-direction: column; justify-content: center; align-items: center; box-shadow: 0 30px 60px rgba(0,0,0,0.8); }
.metric-value { font-size: clamp(4rem, 8vw, 7rem); font-weight: 900; line-height: 1; text-shadow: 0 0 30px rgba(0, 180, 216, 0.4); }

/* Quote / Testimonial */
.portfolio-review { box-shadow: 0 20px 50px rgba(0,0,0,0.5); }
.quote-mark { position: absolute; font-size: 8rem; font-family: Georgia, serif; line-height: 1; opacity: 0.2; transform: translateY(-20px); }

/* Animations */
.float-animation { animation: floatEdge 6s ease-in-out infinite; }
.float-animation-slow { animation: floatEdge 8s ease-in-out infinite; }
@keyframes floatEdge { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(-20px); } }

.reveal { opacity: 0; transition: opacity var(--transition), transform var(--transition); }
.reveal-up { transform: translateY(50px); }
.reveal-left { transform: translateX(-50px); }
.reveal-right { transform: translateX(50px); }
.reveal.is-visible { opacity: 1; transform: translate(0); }
.stagger-1 { transition-delay: 0.2s; }
.stagger-2 { transition-delay: 0.4s; }

/* ==========================================
   RESPONSIVE SINGLE
   ========================================== */
@media (max-width: 1024px) {
    .tech-thread-wrapper { display: none; }
    .edge-container { padding: 0 6vw; }
    
    .split-edge { grid-template-columns: 1fr; gap: 4rem; }
    .hero-split { grid-template-columns: 1fr; text-align: center; }
    
    .hero-text-col { text-align: center; }
    .hero-meta-tags { justify-content: center; }
    
    .hero-visual { order: -1; margin-bottom: 2rem; margin-top: 0; }
    .hero-project-image { aspect-ratio: 16/9; }
    
    .features-edge-grid { grid-template-columns: repeat(2, 1fr); gap: 2rem; }
    .features-edge-grid .meta-card:last-child { grid-column: span 2; }
}

@media (max-width: 768px) {
    .edge-container { padding: 0 8vw; }
    .edge-title-massive { font-size: clamp(2.5rem, 10vw, 4rem); }
    .edge-title-large { font-size: clamp(2.2rem, 10vw, 3.5rem); }
    
    .features-edge-grid { grid-template-columns: 1fr; gap: 1.5rem; }
    .features-edge-grid .meta-card:last-child { grid-column: span 1; }
    .meta-card { padding: 1.5rem; flex-direction: row; align-items: center; }
    .meta-icon { width: 40px; height: 40px; }
    
    .edge-list li { text-align: left; }
    .content-format { padding: 2rem; }
    
    .hero-project-image { border-radius: 20px; aspect-ratio: 4/3; }
    .glass-topbar { padding: 8px 12px; }
    .browser-url-mock { display: none; /* Cache l'URL sur mobile pour gagner de la place */ }
    
    .massive-metric-box { padding: 3rem 1.5rem !important; }
    .portfolio-review { padding: 2rem !important; }
    
    .single-footer-actions { display: flex; flex-direction: column; gap: 1rem; }
    .mr-3 { margin-right: 0; }
    .massive-btn { width: 100%; justify-content: center; padding: 1.2rem; }
}