:root {
    --primary: #00f0ff; /* Neon Cyan */
    --primary-glow: rgba(0, 240, 255, 0.25);
    --bg-dark: #020406; /* Dark background */
    --bg-light: #0a111a; /* Dark blue/grey mist */
    --card-bg: #090d14; /* Mat dark card background */
    --card-border: rgba(0, 240, 255, 0.15); /* Neon border */
    --text-muted: #8a99ad;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    cursor: default;
}

body {
    font-family: 'Space Grotesk', sans-serif;
    background-color: var(--bg-dark);
    background-image: 
        linear-gradient(to top, rgba(2, 4, 6, 0.98) 0%, rgba(2, 4, 6, 0.7) 15%, transparent 50%),
        radial-gradient(circle at center, rgba(10, 17, 26, 0.65) 15%, rgba(2, 4, 6, 0.85) 100%), 
        url('img/1.png');
    background-size: cover;
    background-position: center center;
    background-repeat: no-repeat;
    background-attachment: fixed;
    color: #fff;
    overflow-x: hidden;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    align-items: center;
}

/* --- ARTISTIC BACKGROUND --- */
.aurora-container {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: -100;
    overflow: hidden;
    filter: blur(120px);
    opacity: 0.4;
    pointer-events: none;
    will-change: transform;
}

.aurora {
    position: absolute;
    width: 70vw;
    height: 70vw;
    border-radius: 50%;
    background: rgba(0, 240, 255, 0.15);
    left: -10vw;
    top: -10vw;
    pointer-events: none;
}

.aurora-2 {
    background: rgba(0, 168, 181, 0.1);
    right: -10vw;
    bottom: -10vw;
}

/* --- ANIMATED FOG AT THE BOTTOM --- */
.fog-container {
    position: fixed;
    bottom: 0;
    left: 0;
    width: 100%;
    height: 30vh;
    z-index: -90; /* Devant le fond d'écran mais derrière les cartes */
    overflow: hidden;
    pointer-events: none;
    filter: blur(25px);
}

.fog-layer {
    position: absolute;
    bottom: -15vh;
    left: -20%;
    width: 140%;
    height: 135%;
    /* Gradients de fumée très doux : blanc, gris ardoise et une pointe de cyan */
    background: radial-gradient(circle at 35% 85%, rgba(0, 240, 255, 0.05) 0%, transparent 50%),
                radial-gradient(circle at 65% 90%, rgba(255, 255, 255, 0.04) 0%, transparent 45%),
                radial-gradient(circle at 50% 75%, rgba(148, 163, 184, 0.03) 0%, transparent 55%);
    opacity: 0.9;
    filter: url(#fog-filter); /* Filtre SVG de déformation turbulente */
    will-change: transform;
}

.fog-layer-1 {
    animation: drift 16s infinite ease-in-out;
}

.fog-layer-2 {
    animation: drift-reverse 24s infinite ease-in-out;
    opacity: 0.6;
}

@keyframes drift {
    0% { transform: translateX(0) translateY(0) scale(1) rotate(0deg); }
    50% { transform: translateX(18%) translateY(-6%) scale(1.15) rotate(3deg); }
    100% { transform: translateX(0) translateY(0) scale(1) rotate(0deg); }
}

@keyframes drift-reverse {
    0% { transform: translateX(18%) translateY(-6%) scale(1.15) rotate(0deg); }
    50% { transform: translateX(-5%) translateY(6%) scale(0.9) rotate(-3deg); }
    100% { transform: translateX(18%) translateY(-6%) scale(1.15) rotate(0deg); }
}

.grain {
    position: fixed;
    inset: 0;
    z-index: -1;
    background: url('https://grainy-gradients.vercel.app/noise.svg');
    opacity: 0.15;
    pointer-events: none;
}

#cursor {
    position: fixed;
    width: 24px;
    height: 24px;
    background: transparent;
    pointer-events: none;
    z-index: 9999;
    display: flex;
    align-items: center;
    justify-content: center;
    transform: translate(-50%, -50%);
    transition: transform 0.08s ease-out;
    user-select: none;
}

#cursor::after {
    content: '';
    display: inline-block;
    width: 8px;
    height: 8px;
    background-color: var(--primary);
    box-shadow: 0 0 10px var(--primary);
    border-radius: 50%;
    animation: pulse 1s infinite alternate;
}

body:has(a:hover) #cursor::after,
body:has(button:hover) #cursor::after {
    transform: scale(2.5);
    background-color: #fff;
    box-shadow: 0 0 15px #fff, 0 0 30px var(--primary);
}

@keyframes pulse {
    0% { transform: scale(0.8); opacity: 0.7; }
    100% { transform: scale(1.2); opacity: 1; }
}

@media (pointer: coarse) { #cursor { display: none; } }

/* --- TERMINAL HEADER --- */
.terminal-header {
    width: 100%;
    max-width: 1000px;
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 0 20px;
    font-family: 'Courier New', Courier, monospace;
    font-size: 0.75rem;
    color: var(--primary);
    opacity: 0.8;
    margin-bottom: 20px;
    letter-spacing: 1px;
}

.status-dot {
    width: 6px;
    height: 6px;
    background-color: var(--primary);
    border-radius: 50%;
    box-shadow: 0 0 8px var(--primary);
    animation: blink 1s infinite alternate;
}

@keyframes blink {
    0% { opacity: 0.3; }
    100% { opacity: 1; }
}

/* --- HERO SECTION --- */
.hero {
    width: 100%;
    max-width: 1000px;
    padding: 60px 20px 20px;
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
}

.hero-title-wrap {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 30px;
    margin-bottom: 30px;
    width: 100%;
}

.logo-glow-wrap {
    position: relative;
    flex-shrink: 0;
}

.logo-glow-wrap::before {
    content: '';
    position: absolute;
    inset: -15px;
    background: var(--primary);
    filter: blur(25px);
    opacity: 0.35;
    border-radius: 50%;
}

.top-logo {
    width: 90px;
    height: 90px;
    position: relative;
    z-index: 1;
    border-radius: 50%;
    border: 2px solid var(--primary);
    object-fit: cover;
    background: #000;
    box-shadow: 0 0 30px var(--primary-glow);
}

.hero-titles {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    text-align: left;
}

/* Glitch Effect */
h1.glitch {
    font-family: 'Space Grotesk', sans-serif;
    font-weight: 800;
    font-size: clamp(2rem, 6vw, 3.5rem);
    color: #fff;
    line-height: 1.1;
    position: relative;
    letter-spacing: 2px;
}

h1.glitch::before, h1.glitch::after {
    content: attr(data-text);
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: var(--bg-dark);
}

h1.glitch::before {
    left: 2px;
    text-shadow: -1px 0 var(--primary);
    clip: rect(44px, 450px, 56px, 0);
    animation: glitch-anim 5s infinite linear alternate-reverse;
}

h1.glitch::after {
    left: -2px;
    text-shadow: -1px 0 #ff00ea;
    clip: rect(85px, 450px, 140px, 0);
    animation: glitch-anim2 5s infinite linear alternate-reverse;
}

@keyframes glitch-anim {
    0% { clip: rect(15px, 9999px, 66px, 0); }
    10% { clip: rect(85px, 9999px, 5px, 0); }
    20% { clip: rect(34px, 9999px, 92px, 0); }
    30% { clip: rect(70px, 9999px, 12px, 0); }
    40% { clip: rect(5px, 9999px, 78px, 0); }
    50% { clip: rect(50px, 9999px, 45px, 0); }
    60% { clip: rect(12px, 9999px, 88px, 0); }
    70% { clip: rect(95px, 9999px, 23px, 0); }
    80% { clip: rect(30px, 9999px, 60px, 0); }
    90% { clip: rect(78px, 9999px, 95px, 0); }
    100% { clip: rect(40px, 9999px, 15px, 0); }
}

@keyframes glitch-anim2 {
    0% { clip: rect(65px, 9999px, 30px, 0); }
    10% { clip: rect(5px, 9999px, 85px, 0); }
    20% { clip: rect(90px, 9999px, 40px, 0); }
    30% { clip: rect(15px, 9999px, 75px, 0); }
    40% { clip: rect(80px, 9999px, 10px, 0); }
    50% { clip: rect(45px, 9999px, 95px, 0); }
    60% { clip: rect(25px, 9999px, 50px, 0); }
    70% { clip: rect(100px, 9999px, 15px, 0); }
    80% { clip: rect(35px, 9999px, 85px, 0); }
    90% { clip: rect(10px, 9999px, 60px, 0); }
    100% { clip: rect(55px, 9999px, 30px, 0); }
}

.slogan {
    font-size: clamp(0.9rem, 2.5vw, 1.25rem);
    color: #fff;
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 3px;
    margin-top: 5px;
    font-family: 'Space Grotesk', sans-serif;
}

.cyan-glow {
    color: var(--primary);
    text-shadow: 0 0 10px var(--primary-glow);
}

/* --- CONSOLE BOX --- */
.console-box {
    width: 100%;
    max-width: 600px;
    background: rgba(3, 5, 8, 0.95);
    border: 1px solid rgba(0, 240, 255, 0.25);
    border-radius: 12px;
    margin-top: 30px;
    text-align: left;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.8), inset 0 0 10px rgba(0, 240, 255, 0.05);
    backdrop-filter: blur(10px);
}

.console-titlebar {
    background: rgba(10, 16, 25, 0.9);
    padding: 10px 15px;
    border-bottom: 1px solid rgba(0, 240, 255, 0.15);
    display: flex;
    align-items: center;
    gap: 8px;
    border-radius: 11px 11px 0 0;
}

.console-btn {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background-color: #ff5f56;
}
.console-btn:nth-child(2) { background-color: #ffbd2e; }
.console-btn:nth-child(3) { background-color: #27c93f; }

.console-title {
    font-family: 'Courier New', Courier, monospace;
    font-size: 0.7rem;
    color: var(--text-muted);
    margin-left: 10px;
    letter-spacing: 1px;
}

.console-body {
    padding: 20px;
    font-family: 'Courier New', Courier, monospace;
    font-size: 0.95rem;
    line-height: 1.6;
    color: var(--primary);
    height: 165px;
    box-sizing: border-box;
}

#typewriter {
    display: inline;
    margin: 0;
}

.cursor-blink {
    display: inline;
    animation: blink-anim 0.8s infinite;
}

@keyframes blink-anim {
    0% { opacity: 0; }
    50% { opacity: 1; }
    100% { opacity: 0; }
}

/* --- CANVAS & TILES --- */
.canvas {
    width: 100%;
    max-width: 1100px;
    margin: 0 auto;
    padding: 40px 20px;
}

.canvas.single-layout {
    display: flex;
    justify-content: center;
    align-items: center;
}

.tile-wrap {
    perspective: 1500px;
    width: 100%;
    max-width: 480px;
    margin: 0 auto;
    position: relative;
}

.tile {
    background: rgba(9, 13, 20, 0.85); /* Mat card background */
    border: 1px solid var(--card-border);
    border-radius: 30px;
    position: relative;
    transform-style: preserve-3d;
    transition: transform 0.15s ease-out, box-shadow 0.3s ease;
    backdrop-filter: blur(15px);
    width: 100%;
    overflow: hidden;
    box-shadow: 0 15px 35px rgba(0, 0, 0, 0.7);
}

.tile::before {
    content: '';
    position: absolute;
    inset: 0;
    background: radial-gradient(circle at var(--x) var(--y), rgba(0, 240, 255, 0.15) 0%, transparent 45%);
    pointer-events: none;
    z-index: 5;
}

.tile-banner {
    width: 100%;
    aspect-ratio: 2.8 / 1;
    overflow: hidden;
    position: relative;
    background: #020406;
}

.tile-banner img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: all 0.6s cubic-bezier(0.2, 0.8, 0.2, 1);
    filter: brightness(0.85) contrast(1.1);
}

.tile-banner::after {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(to top, rgba(9, 13, 20, 1) 0%, transparent 100%);
    pointer-events: none;
}

.tile:hover .tile-banner img { 
    transform: scale(1.03); 
    filter: brightness(1) contrast(1.15);
}

.tile-header-overlay {
    position: absolute;
    top: 24%;
    left: 20px;
    z-index: 10;
    display: flex;
    align-items: flex-end;
    gap: 15px;
    width: calc(100% - 40px);
    transform: translateZ(40px);
}

.tile-avatar {
    width: 80px;
    height: 80px;
    border-radius: 50%;
    border: 2px solid var(--primary);
    background: #000;
    box-shadow: 0 0 20px var(--primary-glow);
    flex-shrink: 0;
    object-fit: cover;
}

.tile-titles-box {
    margin-bottom: 5px;
}

.tile-title {
    font-family: 'Space Grotesk', sans-serif;
    font-weight: 700;
    font-size: clamp(1.1rem, 3vw, 1.4rem);
    color: #fff;
    margin: 0;
    display: flex;
    align-items: center;
    gap: 8px;
}

.badge-verif {
    color: var(--primary);
    font-size: 0.9rem;
    font-weight: 900;
    text-shadow: 0 0 8px var(--primary-glow);
}

.tile-handle {
    font-size: 0.85rem;
    color: var(--text-muted);
    font-weight: 500;
    font-family: 'Courier New', Courier, monospace;
}

.tile-info {
    padding: 40px 20px 60px; 
}

.tile-bio {
    font-size: 0.98rem;
    color: #cbd5e1;
    margin-bottom: 30px;
    min-height: 80px;
    line-height: 1.7;
    font-family: 'Space Grotesk', sans-serif;
    border-left: 2px solid var(--primary);
    padding-left: 15px;
}

.tile-links {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 12px;
}

.icon-link {
    aspect-ratio: 1;
    background: rgba(255, 255, 255, 0.02);
    border: 1px solid rgba(0, 240, 255, 0.1);
    border-radius: 14px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s cubic-bezier(0.2, 0.8, 0.2, 1);
    position: relative;
}

.icon-link img { 
    width: 22px; 
    height: 22px; 
    filter: grayscale(1) brightness(1.8); 
    opacity: 0.7; 
    transition: 0.3s; 
}

.icon-link:hover { 
    transform: translateY(-5px); 
    box-shadow: 0 8px 20px rgba(0, 240, 255, 0.15); 
    background: rgba(0, 240, 255, 0.05); 
    border-color: var(--primary);
}

.icon-link:hover img { 
    filter: grayscale(0) brightness(5); 
    opacity: 1; 
}

.icon-link::before {
    content: attr(data-label);
    position: absolute;
    bottom: 120%;
    left: 50%;
    transform: translateX(-50%) translateY(10px);
    background: rgba(3, 5, 8, 0.95);
    color: var(--primary);
    padding: 5px 12px;
    border-radius: 8px;
    font-size: 0.7rem;
    font-weight: 700;
    white-space: nowrap;
    opacity: 0;
    pointer-events: none;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    border: 1px solid var(--primary);
    backdrop-filter: blur(5px);
    font-family: 'Courier New', Courier, monospace;
}

.icon-link:hover::before {
    opacity: 1;
    transform: translateX(-50%) translateY(0);
}

/* --- FOOTER & CONTACT --- */
.foot-hub {
    width: 100%;
    max-width: 800px;
    padding: 60px 20px 80px;
    text-align: center;
    display: flex;
    flex-direction: column;
    align-items: center;
    margin: 0 auto;
}

.big-button {
    padding: 20px 50px;
    background: transparent;
    color: var(--primary);
    font-family: 'Space Grotesk', sans-serif;
    font-weight: 700;
    font-size: 1.15rem;
    letter-spacing: 1px;
    text-decoration: none;
    border-radius: 50px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 15px;
    transition: all 0.3s ease;
    box-shadow: 0 0 15px rgba(0, 240, 255, 0.1);
    border: 2px solid var(--primary);
    cursor: pointer;
}

.big-button:hover {
    background: var(--primary);
    color: #000;
    transform: translateY(-3px);
    box-shadow: 0 0 25px rgba(0, 240, 255, 0.4);
}

.big-button svg { transition: 0.3s; }
.big-button:hover svg { transform: translateX(5px); }

.legal { 
    margin-top: 60px; 
    font-size: 0.85rem; 
    color: #4b5869; 
    font-family: 'Courier New', Courier, monospace;
}
.legal a {
    color: #4b5869;
    text-decoration: none;
    transition: color 0.3s;
}
.legal a:hover { color: var(--primary); }

/* --- RESPONSIVE --- */
@media (max-width: 600px) {
    .hero { padding-top: 30px; }
    .hero-title-wrap { flex-direction: column; gap: 15px; }
    .hero-titles { align-items: center; text-align: center; }
    .top-logo { width: 75px; height: 75px; }
    .console-box { margin-top: 20px; }
    .console-body { font-size: 0.82rem; line-height: 1.5; min-height: 200px; height: auto; padding: 20px 20px 25px; box-sizing: border-box; }
    
    .tile-avatar { width: 70px; height: 70px; }
    .tile-header-overlay { top: 20%; left: 15px; }
    .tile-info { padding: 30px 15px 40px; }
    .tile-bio { font-size: 0.9rem; }
    .tile-links { gap: 8px; }
}

/* --- LIGHTNING FLASH OVERLAY --- */
.lightning-flash {
    position: fixed;
    inset: 0;
    background: #fff;
    opacity: 0;
    pointer-events: none;
    z-index: -95;
}

.flash-active {
    animation: lightning 0.5s ease-out;
}

@keyframes lightning {
    0% { opacity: 0; }
    5% { opacity: 0.75; background: #00f0ff; }
    10% { opacity: 0.15; }
    15% { opacity: 0.85; background: #ffffff; }
    100% { opacity: 0; }
}

/* --- AUDIO TOGGLE BUTTON --- */
#audio-toggle {
    margin-left: auto;
    background: transparent;
    border: 1px solid var(--primary);
    color: var(--text-muted);
    font-family: 'Courier New', Courier, monospace;
    font-size: 0.7rem;
    padding: 3px 8px;
    border-radius: 4px;
    cursor: pointer;
    transition: all 0.3s;
}

#audio-toggle:hover {
    background: var(--primary-glow);
    color: #fff;
    box-shadow: 0 0 8px var(--primary-glow);
}

/* Pulsating animation to attract click */
.pulse-highlight {
    animation: button-pulse 1.6s infinite alternate;
}

@keyframes button-pulse {
    0% { 
        box-shadow: 0 0 4px rgba(0, 240, 255, 0.1); 
        border-color: rgba(0, 240, 255, 0.4); 
        color: var(--text-muted); 
    }
    100% { 
        box-shadow: 0 0 12px var(--primary-glow); 
        border-color: var(--primary); 
        color: var(--primary); 
        transform: scale(1.03);
    }
}
