/* ==========================================================================
   CSS - PORTFOLIO LISTING (APPLE x IMMERSIF BLEU - MASTER)
   ========================================================================== */

: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);
}

.edge-immersive-wrapper, .edge-immersive-wrapper * { box-sizing: border-box; }

.edge-immersive-wrapper {
    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 DIGITALE (Tech Thread)
   ========================================== */
.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); }

/* Halos */
.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-center { width: 70vw; height: 50vw; top: -20%; left: 15%; background: var(--primary-blue); }
.glow-center-massive { width: 80vw; height: 80vw; top: 50%; left: 50%; transform: translate(-50%, -50%); background: var(--primary-blue); opacity: 0.1; }

/* Layout Edge-to-Edge */
.fullscreen-edge { min-height: 100vh; display: flex; flex-direction: column; justify-content: center; align-items: center; padding: 6rem 0; position: relative; width: 100vw; border-bottom: 1px solid rgba(255,255,255,0.03); }
.bg-black-deep { background-color: var(--bg-black-deep); }
.edge-container { width: 100%; padding: 0 8vw; position: relative; z-index: 2; }

/* Utilitaires */
.relative { position: relative; } .z-10 { z-index: 10; } .overflow-hidden { overflow: hidden; } .p-0 { padding: 0 !important; } .p-2 { padding: 0.5rem; } .px-4 { padding-left: 2rem; padding-right: 2rem; }
.text-center { text-align: center; } .text-left { text-align: left; } .text-muted { color: var(--text-muted); } .font-bold { font-weight: 700; }
.text-sm { font-size: 0.9rem; } .text-md { font-size: 1.1rem; } .text-lg { font-size: 1.3rem; font-weight: 700; }
.m-0 { margin: 0; } .mx-auto { margin-left: auto; margin-right: auto; }
.justify-start { justify-content: flex-start; } .justify-center { justify-content: center; }
.mt-3 { margin-top: 1.5rem; } .mt-4 { margin-top: 2rem; } .mt-5 { margin-top: 3.5rem; } .mt-6 { margin-top: 5rem; } .mt-auto { margin-top: auto; }
.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; }

/* Typographie */
.edge-title-massive { font-size: clamp(3rem, 7vw, 6.5rem); font-weight: 800; letter-spacing: -0.04em; line-height: 1.05; margin: 0; }
.edge-title-large { font-size: clamp(2.5rem, 4vw, 4rem); font-weight: 700; letter-spacing: -0.03em; line-height: 1.1; margin: 0; }
.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 { font-size: clamp(1.1rem, 1.8vw, 1.3rem); color: var(--text-muted); font-weight: 400; line-height: 1.6; }
.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); }

/* Boutons */
.btn-blue-solid { display: inline-flex; justify-content: center; align-items: center; background: linear-gradient(135deg, var(--primary-blue), #004d99); color: #fff !important; padding: 1rem 2.2rem; border-radius: 40px; font-weight: 700; font-size: 1.05rem; text-decoration: none; box-shadow: 0 10px 30px rgba(0, 102, 204, 0.3); transition: all 0.3s ease; }
.btn-blue-solid:hover { transform: scale(1.03); box-shadow: 0 15px 40px rgba(0, 180, 216, 0.5); }

/* Grilles */
.split-edge { display: grid; grid-template-columns: 1fr 1fr; gap: 6vw; align-items: center; }

/* Panels & Cards */
.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; }
.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); }

/* ==========================================
   COMMAND BAR (Filtres Portfolio)
   ========================================== */
.command-bar-wrapper { width: 100%; max-width: 900px; padding: 0 1rem; }
.command-bar { display: flex; align-items: center; justify-content: space-between; padding: 0.8rem 1.2rem; border-radius: 100px; flex-wrap: nowrap; gap: 1rem; }
.command-icon { display: flex; align-items: center; justify-content: center; width: 44px; height: 44px; background: rgba(0, 180, 216, 0.1); border-radius: 50%; }

.command-segment-group { display: flex; align-items: center; gap: 1rem; }
.command-label { font-size: 0.8rem; font-weight: 700; color: var(--text-muted); text-transform: uppercase; letter-spacing: 0.1em; }
.segmented-control { display: flex; background: rgba(0,0,0,0.5); padding: 4px; border-radius: 100px; border: 1px solid rgba(255,255,255,0.05); }

.segment-btn { background: transparent; border: none; color: var(--text-muted); font-weight: 600; font-size: 0.9rem; padding: 0.6rem 1.2rem; border-radius: 100px; cursor: pointer; transition: all 0.3s ease; font-family: inherit; }
.segment-btn:hover { color: var(--text-main); }
.segment-btn.active { background: linear-gradient(90deg, var(--secondary-cyan), var(--primary-blue)); color: #fff; box-shadow: 0 4px 15px rgba(0, 180, 216, 0.3); }
.command-divider { width: 1px; height: 30px; background: rgba(255,255,255,0.1); margin: 0 0.5rem; }

/* Scroll Indicator */
.scroll-indicator { display: flex; flex-direction: column; align-items: center; gap: 10px; opacity: 0.8; }
.scroll-text { font-size: 0.85rem; text-transform: uppercase; font-weight: 700; letter-spacing: 0.1em; }
.mouse { width: 22px; height: 34px; border: 2px solid var(--secondary-cyan); border-radius: 20px; position: relative; }
.wheel { width: 4px; height: 6px; background: var(--secondary-cyan); border-radius: 4px; position: absolute; top: 6px; left: 50%; transform: translateX(-50%); animation: scrollMouse 1.5s infinite; }
@keyframes scrollMouse { 0% { top: 6px; opacity: 1; } 100% { top: 16px; opacity: 0; } }

/* ==========================================
   BOUCLE PORTFOLIO : IMAGE & CONTENU
   ========================================== */
.portfolio-fullscreen-item { transition: opacity 0.4s ease; }
/* Alternance Gauche/Droite */
.portfolio-fullscreen-item:nth-child(even) .visual-content { order: 2; }
.portfolio-fullscreen-item:nth-child(even) .text-content { order: 1; }

.portfolio-massive-image { width: 100%; height: 65vh; position: relative; border-radius: 30px; box-shadow: 0 40px 80px rgba(0,0,0,0.8); }
.p-img { width: 100%; height: 100%; object-fit: cover; object-position: center top; transition: transform 1s cubic-bezier(0.16, 1, 0.3, 1); }
.portfolio-massive-image:hover .p-img { transform: scale(1.05); }
.p-placeholder { width: 100%; height: 100%; font-size: 5rem; font-family: monospace; font-weight: 900; background: #0a0c10; display: flex; align-items: center; justify-content: center; }

.floating-badge-glass { position: absolute; top: 24px; left: 24px; display: flex; align-items: center; gap: 8px; background: rgba(0,0,0,0.6); backdrop-filter: blur(15px); padding: 0.6rem 1.2rem; border-radius: 100px; font-weight: 700; font-size: 0.85rem; color: var(--text-main); text-transform: uppercase; border: 1px solid var(--glass-border); }
.status-dot { width: 8px; height: 8px; border-radius: 50%; }
.status-dot.cyan { background: var(--secondary-cyan); box-shadow: 0 0 8px var(--secondary-cyan); }
.status-dot.blue { background: var(--primary-blue); box-shadow: 0 0 8px var(--primary-blue); }

.portfolio-fs-content { display: flex; flex-direction: column; justify-content: center; height: 100%; }

/* Grid Méta */
.features-edge-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1.5rem; }
.meta-card { display: flex; align-items: center; gap: 1rem; padding: 1rem 1.5rem; }
.meta-icon { display: flex; align-items: center; justify-content: center; width: 40px; height: 40px; background: rgba(0,0,0,0.4); border-radius: 12px; }
.meta-label { font-size: 0.75rem; color: var(--text-muted); text-transform: uppercase; font-weight: 700; letter-spacing: 0.05em; margin-bottom: 2px; }
.meta-value { font-size: 1rem; font-weight: 700; color: var(--text-main); }

.portfolio-fs-footer { display: flex; align-items: center; gap: 1.5rem; flex-wrap: wrap; }
.portfolio-metric { display: inline-flex; align-items: center; background: rgba(0, 180, 216, 0.05); border-radius: 100px; }

/* ==========================================
   PAGINATION PORTFOLIO
   ========================================== */
.edge-pagination { display: flex; justify-content: center; align-items: center; gap: 10px; flex-wrap: wrap; }
.edge-pagination .page-numbers { display: inline-flex; align-items: center; justify-content: center; height: 45px; min-width: 45px; padding: 0 15px; border-radius: 12px; background: var(--glass-bg); border: 1px solid var(--glass-border); color: var(--text-muted); font-weight: 700; text-decoration: none; transition: all 0.3s ease; }
.edge-pagination .page-numbers:hover { color: var(--text-main); border-color: var(--secondary-cyan); transform: translateY(-2px); }
.edge-pagination .page-numbers.current { background: linear-gradient(135deg, var(--secondary-cyan), var(--primary-blue)); color: #fff; border: none; box-shadow: 0 5px 15px rgba(0, 180, 216, 0.3); }

/* ==========================================
   WIDGET B2B SIMULATOR
   ========================================== */
.b2b-widget-container { padding: 4vw; border-radius: 30px; }
.b2b-simulator-mockup { width: 100%; max-width: 280px; aspect-ratio: 9/19.5; border: 12px solid #111; border-radius: 40px; overflow: hidden; background: #000; box-shadow: 0 25px 50px rgba(0,0,0,0.6), -15px 0 40px rgba(0,102,204,0.3); position: relative; margin: 0 auto; }
.iphone-notch-b2b { position: absolute; top: 0; left: 50%; transform: translateX(-50%); width: 40%; height: 25px; background: #111; border-bottom-left-radius: 15px; border-bottom-right-radius: 15px; z-index: 10; }
.b2b-simulator-mockup iframe { width: 100%; height: 100%; border: none; display: block; background: #fff; }

/* Animations Reveal */
.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
   ========================================== */
@media (max-width: 1200px) {
    .features-edge-grid { grid-template-columns: repeat(2, 1fr); }
    .features-edge-grid .meta-card:last-child { grid-column: span 2; }
}

@media (max-width: 1024px) {
    .tech-thread-wrapper { display: none; }
    .edge-container { padding: 0 6vw; }

    /* Command Bar Mobile : Empilée */
    .command-bar { flex-direction: column; align-items: stretch; border-radius: 30px; padding: 1.5rem; gap: 1.5rem; }
    .command-icon, .command-divider { display: none; }
    .command-segment-group { flex-direction: column; align-items: stretch; gap: 0.8rem; }
    .segmented-control { justify-content: space-between; }
    .segment-btn { font-size: 0.85rem; padding: 0.8rem; flex-grow: 1; text-align: center; }

    /* On casse l'alternance sur mobile pour que l'image soit toujours en haut */
    .split-edge { grid-template-columns: 1fr; gap: 3rem; }
    .portfolio-fullscreen-item:nth-child(even) .visual-content { order: -1; }
    .portfolio-fullscreen-item:nth-child(even) .text-content { order: 1; }
    .visual-content { order: -1; }
    
    .portfolio-massive-image { height: 50vh; }
    
    .fullscreen-edge { min-height: auto; padding: 7rem 0; }
    .hero-screen-portfolio { padding-top: 8rem; }
    
    .b2b-widget-container { padding: 6vw; }
}

@media (max-width: 768px) {
    .edge-container { padding: 0 8vw; }
    .edge-title-massive { font-size: clamp(2.5rem, 12vw, 4rem); }
    
    .features-edge-grid { grid-template-columns: 1fr; }
    .features-edge-grid .meta-card:last-child { grid-column: span 1; }
    
    .portfolio-massive-image { height: 40vh; border-radius: 20px; }
    .floating-badge-glass { top: 15px; left: 15px; padding: 0.5rem 1rem; font-size: 0.75rem; }
    
    .portfolio-fs-footer { flex-direction: column; align-items: stretch; }
    .portfolio-fs-footer .btn-blue-solid { justify-content: center; }
    .portfolio-metric { justify-content: center; }
    
    .b2b-simulator-mockup { max-width: 280px; }
}