/* ===========================================
   KAOSTYL - Page Link in Bio
   Design moderne et accessible
   =========================================== */

/* ----------- Variables CSS ----------- */
:root {
    /* Couleurs principales */
    --primary-color: #8b5cf6;
    --primary-light: #a78bfa;
    --primary-dark: #7c3aed;
    --secondary-color: #ec4899;
    --accent-color: #06b6d4;
    
    /* Couleurs de fond */
    --bg-dark: #0f0f23;
    --bg-card: rgba(255, 255, 255, 0.05);
    --bg-card-hover: rgba(255, 255, 255, 0.1);
    
    /* Couleurs de texte */
    --text-primary: #ffffff;
    --text-secondary: rgba(255, 255, 255, 0.7);
    --text-muted: rgba(255, 255, 255, 0.5);
    
    /* Effets */
    --glow-primary: 0 0 40px rgba(139, 92, 246, 0.4);
    --glow-secondary: 0 0 40px rgba(236, 72, 153, 0.3);
    --border-radius: 16px;
    --border-radius-sm: 12px;
    --transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

/* ----------- Reset & Base ----------- */
*,
*::before,
*::after {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: 'Poppins', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    background: var(--bg-dark);
    color: var(--text-primary);
    min-height: 100vh;
    line-height: 1.6;
    overflow-x: hidden;
}

/* ----------- Canvas Three.js ----------- */
#bg-canvas {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: -2;
    pointer-events: none;
}

/* ----------- Matrix Rain Canvas ----------- */
#matrix-canvas {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: -3;
    pointer-events: none;
    opacity: 0.15;
}

/* ----------- Curseur Personnalisé ----------- */
.custom-cursor {
    width: 12px;
    height: 12px;
    background: var(--primary-color);
    border-radius: 50%;
    position: fixed;
    pointer-events: none;
    z-index: 10000;
    transform: translate(-50%, -50%);
    transition: transform 0.1s ease, background 0.2s ease;
    box-shadow: 0 0 20px var(--primary-color), 0 0 40px var(--primary-color);
    mix-blend-mode: screen;
}

.cursor-trail {
    width: 30px;
    height: 30px;
    border: 2px solid var(--primary-color);
    border-radius: 50%;
    position: fixed;
    pointer-events: none;
    z-index: 9999;
    transform: translate(-50%, -50%);
    opacity: 0.5;
    transition: width 0.3s ease, height 0.3s ease, opacity 0.3s ease;
}

.custom-cursor.cursor-hover {
    transform: translate(-50%, -50%) scale(2);
    background: var(--secondary-color);
    box-shadow: 0 0 30px var(--secondary-color), 0 0 60px var(--secondary-color);
}

.cursor-trail.trail-hover {
    width: 50px;
    height: 50px;
    border-color: var(--secondary-color);
    opacity: 0.8;
}

/* Cacher le curseur par défaut sur desktop */
@media (hover: hover) {
    body {
        cursor: none;
    }
    
    a, button {
        cursor: none;
    }
}

/* Afficher curseur normal sur mobile */
@media (hover: none) {
    .custom-cursor,
    .cursor-trail {
        display: none;
    }
}

/* ----------- Arrière-plan Animé ----------- */
.background-animation {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: -1;
    overflow: hidden;
    opacity: 0.5;
}

.gradient-orb {
    position: absolute;
    border-radius: 50%;
    filter: blur(80px);
    opacity: 0.6;
    animation: float 20s ease-in-out infinite;
}

.orb-1 {
    width: 600px;
    height: 600px;
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
    top: -200px;
    right: -200px;
    animation-delay: 0s;
}

.orb-2 {
    width: 500px;
    height: 500px;
    background: linear-gradient(135deg, var(--accent-color), var(--primary-color));
    bottom: -150px;
    left: -150px;
    animation-delay: -7s;
}

.orb-3 {
    width: 400px;
    height: 400px;
    background: linear-gradient(135deg, var(--secondary-color), var(--accent-color));
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    animation-delay: -14s;
}

@keyframes float {
    0%, 100% {
        transform: translate(0, 0) scale(1);
    }
    25% {
        transform: translate(50px, -50px) scale(1.1);
    }
    50% {
        transform: translate(-30px, 30px) scale(0.95);
    }
    75% {
        transform: translate(-50px, -30px) scale(1.05);
    }
}

/* ----------- Container Principal ----------- */
.container {
    max-width: 480px;
    margin: 0 auto;
    padding: 40px 20px;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    align-items: center;
}

/* ----------- Section Profil ----------- */
.profile-section {
    text-align: center;
    margin-bottom: 32px;
    animation: fadeInDown 0.8s ease-out;
}

@keyframes fadeInDown {
    from {
        opacity: 0;
        transform: translateY(-30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Avatar */
.avatar-container {
    position: relative;
    width: 120px;
    height: 120px;
    margin: 0 auto 20px;
}

.avatar-glow {
    position: absolute;
    inset: -4px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color), var(--accent-color));
    animation: rotate 3s linear infinite;
    filter: blur(8px);
    opacity: 0.8;
}

@keyframes rotate {
    from {
        transform: rotate(0deg);
    }
    to {
        transform: rotate(360deg);
    }
}

.avatar {
    position: relative;
    width: 100%;
    height: 100%;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 48px;
    font-weight: 700;
    color: white;
    text-shadow: 0 2px 10px rgba(0, 0, 0, 0.3);
    box-shadow: var(--glow-primary);
    z-index: 1;
    overflow: hidden;
}

.avatar-img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: 50%;
    animation: pulse 2s ease-in-out infinite;
}

/* ----------- HOLOGRAM EFFECT ----------- */
.hologram {
    position: relative;
}

.hologram::before {
    content: '';
    position: absolute;
    inset: -10px;
    border-radius: 50%;
    background: linear-gradient(
        0deg,
        transparent 0%,
        rgba(6, 182, 212, 0.1) 50%,
        transparent 100%
    );
    animation: hologram-scan 2s linear infinite;
    pointer-events: none;
    z-index: 3;
}

.hologram-lines {
    position: absolute;
    inset: 0;
    border-radius: 50%;
    background: repeating-linear-gradient(
        0deg,
        transparent 0px,
        transparent 2px,
        rgba(6, 182, 212, 0.03) 2px,
        rgba(6, 182, 212, 0.03) 4px
    );
    pointer-events: none;
    z-index: 4;
    animation: hologram-flicker 0.1s infinite;
}

@keyframes hologram-scan {
    0% {
        transform: translateY(-100%);
    }
    100% {
        transform: translateY(100%);
    }
}

@keyframes hologram-flicker {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.95; }
}

.hologram .avatar {
    animation: hologram-float 3s ease-in-out infinite;
}

@keyframes hologram-float {
    0%, 100% { transform: translateY(0) rotateY(0deg); }
    25% { transform: translateY(-3px) rotateY(2deg); }
    75% { transform: translateY(3px) rotateY(-2deg); }
}

.avatar-text {
    animation: pulse 2s ease-in-out infinite;
}

@keyframes pulse {
    0%, 100% {
        transform: scale(1);
    }
    50% {
        transform: scale(1.05);
    }
}

.status-indicator {
    position: absolute;
    bottom: 8px;
    right: 8px;
    width: 20px;
    height: 20px;
    background: #22c55e;
    border: 3px solid var(--bg-dark);
    border-radius: 50%;
    z-index: 2;
    animation: statusPulse 2s ease-in-out infinite;
}

@keyframes statusPulse {
    0%, 100% {
        box-shadow: 0 0 0 0 rgba(34, 197, 94, 0.5);
    }
    50% {
        box-shadow: 0 0 0 8px rgba(34, 197, 94, 0);
    }
}

/* Nom et Handle */
.name {
    font-size: 2rem;
    font-weight: 700;
    background: linear-gradient(135deg, var(--text-primary), var(--primary-light));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    margin-bottom: 4px;
    position: relative;
}

/* ----------- GLITCH EFFECT ----------- */
.glitch {
    position: relative;
    animation: glitch-skew 4s infinite linear alternate-reverse;
}

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

.glitch::before {
    left: 2px;
    text-shadow: -2px 0 #ff00ff;
    clip-path: inset(0 0 0 0);
    animation: glitch-anim 2s infinite linear alternate-reverse;
    -webkit-text-fill-color: transparent;
    opacity: 0;
}

.glitch::after {
    left: -2px;
    text-shadow: 2px 0 #00ffff;
    clip-path: inset(0 0 0 0);
    animation: glitch-anim2 2s infinite linear alternate-reverse;
    -webkit-text-fill-color: transparent;
    opacity: 0;
}

.glitch.glitching::before,
.glitch.glitching::after {
    opacity: 0.8;
}

@keyframes glitch-anim {
    0% { clip-path: inset(40% 0 61% 0); }
    20% { clip-path: inset(92% 0 1% 0); }
    40% { clip-path: inset(43% 0 1% 0); }
    60% { clip-path: inset(25% 0 58% 0); }
    80% { clip-path: inset(54% 0 7% 0); }
    100% { clip-path: inset(58% 0 43% 0); }
}

@keyframes glitch-anim2 {
    0% { clip-path: inset(65% 0 25% 0); }
    20% { clip-path: inset(10% 0 85% 0); }
    40% { clip-path: inset(80% 0 5% 0); }
    60% { clip-path: inset(15% 0 60% 0); }
    80% { clip-path: inset(45% 0 40% 0); }
    100% { clip-path: inset(5% 0 90% 0); }
}

@keyframes glitch-skew {
    0% { transform: skew(0deg); }
    10% { transform: skew(0deg); }
    11% { transform: skew(2deg); }
    12% { transform: skew(0deg); }
    50% { transform: skew(0deg); }
    51% { transform: skew(-1deg); }
    52% { transform: skew(0deg); }
    100% { transform: skew(0deg); }
}

.handle {
    font-size: 1rem;
    color: var(--text-secondary);
    font-weight: 400;
}

/* Punchline stylisée */
.punchline {
    margin-top: 16px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    flex-wrap: wrap;
}

.punch-word {
    font-size: 1rem;
    font-weight: 600;
    background: linear-gradient(135deg, var(--primary-light), var(--secondary-color), var(--accent-color));
    background-size: 200% 200%;
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    animation: gradientShift 3s ease-in-out infinite;
}

.punch-word:nth-child(1) {
    animation-delay: 0s;
}

.punch-word:nth-child(3) {
    animation-delay: 0.5s;
}

.punch-word:nth-child(5) {
    animation-delay: 1s;
}

@keyframes gradientShift {
    0%, 100% {
        background-position: 0% 50%;
    }
    50% {
        background-position: 100% 50%;
    }
}

.punch-separator {
    color: var(--primary-color);
    font-size: 0.6rem;
    opacity: 0.8;
}

/* Bio */
.bio {
    margin-top: 16px;
    font-size: 0.9rem;
    color: var(--text-secondary);
    line-height: 1.6;
    text-align: center;
}

/* ----------- Liens Réseaux Sociaux ----------- */
.social-links {
    display: flex;
    gap: 12px;
    margin-bottom: 32px;
    flex-wrap: wrap;
    justify-content: center;
    animation: fadeInUp 0.8s ease-out 0.2s backwards;
}

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.social-icon {
    width: 48px;
    height: 48px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    background: var(--bg-card);
    color: var(--text-primary);
    text-decoration: none;
    font-size: 1.2rem;
    transition: var(--transition);
    border: 1px solid rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(10px);
}

.social-icon:hover {
    transform: translateY(-4px) scale(1.1);
    background: var(--primary-color);
    box-shadow: var(--glow-primary);
    border-color: var(--primary-color);
}

.social-icon:focus {
    outline: 2px solid var(--primary-light);
    outline-offset: 2px;
}

/* Couleurs spécifiques au survol */
.social-icon[aria-label="Facebook"]:hover {
    background: #1877f2;
    box-shadow: 0 0 30px rgba(24, 119, 242, 0.5);
}

.social-icon[aria-label*="Twitter"]:hover,
.social-icon[aria-label="X (Twitter)"]:hover {
    background: #000000;
    box-shadow: 0 0 30px rgba(255, 255, 255, 0.3);
}

.social-icon[aria-label="Instagram"]:hover {
    background: linear-gradient(45deg, #f09433, #e6683c, #dc2743, #cc2366, #bc1888);
    box-shadow: 0 0 30px rgba(225, 48, 108, 0.5);
}

.social-icon[aria-label="YouTube"]:hover {
    background: #ff0000;
    box-shadow: 0 0 30px rgba(255, 0, 0, 0.5);
}

.social-icon[aria-label="LinkedIn"]:hover {
    background: #0a66c2;
    box-shadow: 0 0 30px rgba(10, 102, 194, 0.5);
}

.social-icon[aria-label="TikTok"]:hover {
    background: linear-gradient(135deg, #00f2ea, #ff0050);
    box-shadow: 0 0 30px rgba(255, 0, 80, 0.5);
}

/* Google Profile social */
.social-icon[aria-label="Suis-moi sur Google"]:hover {
    background: #4285f4;
    box-shadow: 0 0 30px rgba(66, 133, 244, 0.55);
}

/* ----------- Section Liens ----------- */
.links-section {
    width: 100%;
    margin-bottom: 32px;
}

.section-title {
    font-size: 1rem;
    font-weight: 600;
    color: var(--text-secondary);
    margin-bottom: 16px;
    display: flex;
    align-items: center;
    gap: 8px;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.section-title i {
    color: var(--primary-color);
}

.link-card {
    display: flex;
    align-items: center;
    gap: 16px;
    padding: 20px;
    background: var(--bg-card);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: var(--border-radius);
    text-decoration: none;
    color: var(--text-primary);
    transition: var(--transition);
    backdrop-filter: blur(20px);
    opacity: 0;
    transform: translateY(20px);
}

.link-card.visible {
    opacity: 1;
    transform: translateY(0);
}

.links-section .link-card {
    margin-bottom: 12px;
}

.links-section .link-card:last-child {
    margin-bottom: 0;
}

.link-card:hover {
    background: var(--bg-card-hover);
    border-color: var(--primary-color);
    box-shadow: var(--glow-primary);
}

.link-card:focus {
    outline: 2px solid var(--primary-light);
    outline-offset: 2px;
}

.link-card.featured {
    background: linear-gradient(135deg, rgba(139, 92, 246, 0.2), rgba(236, 72, 153, 0.2));
    border-color: rgba(139, 92, 246, 0.3);
}

.link-card.featured:hover {
    background: linear-gradient(135deg, rgba(139, 92, 246, 0.3), rgba(236, 72, 153, 0.3));
}

.link-icon {
    width: 56px;
    height: 56px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
    border-radius: var(--border-radius-sm);
    font-size: 1.5rem;
    flex-shrink: 0;
    overflow: hidden;
}

.link-icon-img {
    background: transparent;
}

.formation-img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: var(--border-radius-sm);
}

.link-content {
    flex: 1;
}

.link-badge {
    display: inline-block;
    padding: 4px 10px;
    background: rgba(139, 92, 246, 0.2);
    color: var(--primary-light);
    font-size: 0.7rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    border-radius: 20px;
    margin-bottom: 6px;
}

.badge-formation {
    background: rgba(239, 68, 68, 0.2);
    color: #fca5a5;
}

.badge-outil {
    background: rgba(16, 185, 129, 0.2);
    color: #6ee7b7;
}

.badge-promo {
    background: linear-gradient(135deg, rgba(249, 115, 22, 0.3), rgba(234, 179, 8, 0.3));
    color: #fcd34d;
    animation: pulse-badge 2s ease-in-out infinite;
}

.badge-site {
    background: linear-gradient(135deg, rgba(59, 130, 246, 0.2), rgba(139, 92, 246, 0.2));
    color: #93c5fd;
}

@keyframes pulse-badge {
    0%, 100% {
        box-shadow: 0 0 0 0 rgba(249, 115, 22, 0.4);
    }
    50% {
        box-shadow: 0 0 0 6px rgba(249, 115, 22, 0);
    }
}

.link-title {
    font-size: 1.1rem;
    font-weight: 600;
    margin-bottom: 4px;
}

.link-description {
    font-size: 0.85rem;
    color: var(--text-secondary);
}

.link-arrow {
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 50%;
    transition: var(--transition);
}

.link-card:hover .link-arrow {
    background: var(--primary-color);
    transform: translateX(4px);
}

/* ----------- Section Newsletter ----------- */
.newsletter-section {
    width: 100%;
    padding: 28px;
    background: var(--bg-card);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: var(--border-radius);
    backdrop-filter: blur(20px);
    opacity: 0;
    transform: translateY(20px);
    transition: opacity 0.6s ease, transform 0.6s ease;
}

.newsletter-section.visible {
    opacity: 1;
    transform: translateY(0);
}

.newsletter-header {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 24px;
}

.newsletter-icon {
    width: 48px;
    height: 48px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
    border-radius: var(--border-radius-sm);
    font-size: 1.2rem;
}

.newsletter-title {
    font-size: 1.3rem;
    font-weight: 600;
    background: linear-gradient(135deg, var(--text-primary), var(--primary-light));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

/* Formulaire */
.newsletter-form {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.form-group {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.form-label {
    font-size: 0.9rem;
    font-weight: 500;
    color: var(--text-secondary);
}

.input-wrapper {
    position: relative;
    display: flex;
    align-items: center;
}

.input-icon {
    position: absolute;
    left: 16px;
    color: var(--text-muted);
    font-size: 1rem;
    pointer-events: none;
    transition: var(--transition);
}

.form-input {
    width: 100%;
    padding: 14px 16px 14px 48px;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: var(--border-radius-sm);
    color: var(--text-primary);
    font-family: inherit;
    font-size: 1rem;
    transition: var(--transition);
}

.form-input::placeholder {
    color: var(--text-muted);
}

.form-input:focus {
    outline: none;
    border-color: var(--primary-color);
    background: rgba(139, 92, 246, 0.1);
    box-shadow: 0 0 0 3px rgba(139, 92, 246, 0.2);
}

.form-input:focus + .input-icon,
.input-wrapper:has(.form-input:focus) .input-icon {
    color: var(--primary-color);
}

/* Bouton Submit */
.submit-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
    padding: 16px 24px;
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
    border: none;
    border-radius: var(--border-radius-sm);
    color: white;
    font-family: inherit;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: var(--transition);
    position: relative;
    overflow: hidden;
    margin-top: 8px;
}

.submit-btn::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.2), transparent);
    transition: left 0.5s ease;
}

.submit-btn:hover::before {
    left: 100%;
}

.submit-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 10px 40px rgba(139, 92, 246, 0.4);
}

.submit-btn:focus {
    outline: 2px solid var(--primary-light);
    outline-offset: 2px;
}

.submit-btn:active {
    transform: translateY(0);
}

.btn-icon {
    display: flex;
    align-items: center;
    transition: var(--transition);
}

.submit-btn:hover .btn-icon {
    transform: translateX(4px);
}

.submit-btn.loading {
    pointer-events: none;
    opacity: 0.8;
}

.submit-btn.loading .btn-icon i {
    animation: spin 1s linear infinite;
}

@keyframes spin {
    from {
        transform: rotate(0deg);
    }
    to {
        transform: rotate(360deg);
    }
}

.submit-btn.success {
    background: linear-gradient(135deg, #22c55e, #16a34a);
}

/* ----------- Section Partage & QR Code ----------- */
.share-section {
    width: 100%;
    display: flex;
    flex-direction: column;
    gap: 12px;
    align-items: center;
    margin-top: 16px;
    margin-bottom: 16px;
}

.share-btn,
.qr-toggle {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 12px 24px;
    background: var(--bg-card);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 50px;
    color: var(--text-secondary);
    font-family: inherit;
    font-size: 0.9rem;
    cursor: pointer;
    transition: var(--transition);
    backdrop-filter: blur(10px);
}

.share-btn:hover,
.qr-toggle:hover {
    background: var(--bg-card-hover);
    color: var(--text-primary);
    border-color: var(--primary-color);
}

.share-btn:focus,
.qr-toggle:focus {
    outline: 2px solid var(--primary-light);
    outline-offset: 2px;
}

.share-btn.copied {
    background: rgba(34, 197, 94, 0.2);
    border-color: #22c55e;
    color: #22c55e;
}

.qr-container {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 12px;
}

.qr-code {
    background: white;
    padding: 16px;
    border-radius: var(--border-radius);
    text-align: center;
    animation: fadeIn 0.3s ease-out;
}

.qr-code img {
    border-radius: 8px;
}

.qr-text {
    margin-top: 8px;
    font-size: 0.75rem;
    color: #666;
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(-10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* ----------- Footer ----------- */
.footer {
    margin-top: auto;
    padding-top: 32px;
    text-align: center;
}

.footer-text {
    font-size: 0.8rem;
    color: var(--text-muted);
}

/* ----------- Responsive ----------- */
@media (max-width: 480px) {
    .container {
        padding: 24px 16px;
    }
    
    .avatar-container {
        width: 100px;
        height: 100px;
    }
    
    .avatar {
        font-size: 40px;
    }
    
    .name {
        font-size: 1.75rem;
    }
    
    .social-icon {
        width: 44px;
        height: 44px;
        font-size: 1.1rem;
    }
    
    .link-card {
        padding: 16px;
    }
    
    .link-icon {
        width: 48px;
        height: 48px;
        font-size: 1.3rem;
    }
    
    .link-title {
        font-size: 1rem;
    }
    
    .newsletter-section {
        padding: 20px;
    }
    
    .newsletter-title {
        font-size: 1.1rem;
    }
}

/* ----------- Réduction des animations pour accessibilité ----------- */
@media (prefers-reduced-motion: reduce) {
    *,
    *::before,
    *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
    
    .gradient-orb {
        animation: none;
    }
    
    .avatar-glow {
        animation: none;
    }
}

/* ----------- Mode sombre système (déjà sombre par défaut) ----------- */
@media (prefers-color-scheme: light) {
    /* Le design reste sombre car c'est le style voulu */
}

/* ----------- Focus visible pour la navigation clavier ----------- */
:focus-visible {
    outline: 2px solid var(--primary-light);
    outline-offset: 2px;
}

/* ----------- Sélection de texte ----------- */
::selection {
    background: var(--primary-color);
    color: white;
}

/* ===========================================
   MINI TERMINAL INTÉGRÉ
   =========================================== */
.mini-terminal {
    width: 380px;
    margin: 20px auto 0;
    background: rgba(13, 17, 23, 0.9);
    border: 1px solid rgba(139, 92, 246, 0.3);
    border-radius: 12px;
    box-shadow: 
        0 0 30px rgba(139, 92, 246, 0.2),
        0 0 60px rgba(139, 92, 246, 0.1),
        inset 0 1px 0 rgba(255, 255, 255, 0.05);
    font-family: 'Fira Code', 'Consolas', monospace;
    overflow: hidden;
    animation: terminalOpen 0.6s ease-out 0.3s backwards;
    backdrop-filter: blur(10px);
    position: relative;
}

@keyframes terminalOpen {
    from {
        opacity: 0;
        transform: translateY(20px) scale(0.95);
    }
    to {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

.terminal-header {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 8px 12px;
    background: rgba(22, 27, 34, 0.95);
    border-bottom: 1px solid rgba(48, 54, 61, 0.5);
}

.terminal-buttons {
    display: flex;
    gap: 6px;
}

.terminal-btn {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    transition: all 0.2s ease;
}

.terminal-btn.red {
    background: #ff5f57;
    box-shadow: 0 0 6px rgba(255, 95, 87, 0.4);
}

.terminal-btn.yellow {
    background: #ffbd2e;
    box-shadow: 0 0 6px rgba(255, 189, 46, 0.4);
}

.terminal-btn.green {
    background: #28c840;
    box-shadow: 0 0 6px rgba(40, 200, 64, 0.4);
}

.terminal-title {
    color: #6b7280;
    font-size: 0.65rem;
    font-weight: 500;
    letter-spacing: 0.5px;
}

.terminal-body {
    padding: 12px 14px;
    height: 280px;
    overflow-y: auto;
    scrollbar-width: none;
}

.terminal-body::-webkit-scrollbar {
    display: none;
}

.terminal-line {
    display: flex;
    align-items: center;
    gap: 6px;
    margin-bottom: 3px;
    font-size: 0.72rem;
    line-height: 1.5;
    min-height: 1.4em;
    white-space: nowrap;
}

.terminal-line.completed {
    opacity: 1;
}

.terminal-line.completed .command {
    text-shadow: 0 0 10px currentColor;
}

.prompt {
    color: var(--primary-color);
    font-weight: 600;
    text-shadow: 0 0 8px rgba(139, 92, 246, 0.6);
    font-size: 0.9rem;
}

.command {
    color: #e5e7eb;
    word-break: break-word;
    font-weight: 500;
}

.cursor {
    color: var(--primary-color);
    animation: blink 0.8s step-end infinite;
    text-shadow: 0 0 8px var(--primary-color);
    font-size: 0.9rem;
}

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

/* Scanline effect subtil */
.mini-terminal::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: repeating-linear-gradient(
        0deg,
        transparent,
        transparent 2px,
        rgba(0, 0, 0, 0.03) 2px,
        rgba(0, 0, 0, 0.03) 4px
    );
    pointer-events: none;
    z-index: 1;
}

/* Glow animé sur le bord */
.mini-terminal::after {
    content: '';
    position: absolute;
    top: -1px;
    left: -1px;
    right: -1px;
    bottom: -1px;
    border-radius: 12px;
    background: linear-gradient(
        45deg,
        transparent 30%,
        rgba(139, 92, 246, 0.3) 50%,
        transparent 70%
    );
    background-size: 200% 200%;
    animation: borderGlow 3s ease-in-out infinite;
    z-index: -1;
    opacity: 0.5;
}

@keyframes borderGlow {
    0%, 100% {
        background-position: 0% 50%;
    }
    50% {
        background-position: 100% 50%;
    }
}

/* Responsive mini terminal */
@media (max-width: 480px) {
    .mini-terminal {
        width: calc(100vw - 40px);
        max-width: 320px;
    }
    
    .terminal-body {
        padding: 10px 12px;
        height: 180px;
    }
    
    .terminal-line {
        font-size: 0.7rem;
    }
    
    .terminal-title {
        font-size: 0.6rem;
    }
}

/* Très petits écrans */
@media (max-width: 360px) {
    .mini-terminal {
        width: calc(100vw - 32px);
        max-width: none;
    }
    
    .terminal-body {
        height: 160px;
        padding: 8px 10px;
    }
    
    .terminal-line {
        font-size: 0.65rem;
    }
}

/* Animation de grille cyberpunk pour le fond */
.background-animation::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-image: 
        linear-gradient(rgba(139, 92, 246, 0.03) 1px, transparent 1px),
        linear-gradient(90deg, rgba(139, 92, 246, 0.03) 1px, transparent 1px);
    background-size: 50px 50px;
    animation: gridMove 20s linear infinite;
}

@keyframes gridMove {
    0% {
        transform: perspective(500px) rotateX(60deg) translateY(0);
    }
    100% {
        transform: perspective(500px) rotateX(60deg) translateY(50px);
    }
}

/* ===========================================
   VISITOR COUNTER
   =========================================== */
.visitor-counter {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 12px 20px;
    background: rgba(13, 17, 23, 0.8);
    border: 1px solid rgba(34, 197, 94, 0.3);
    border-radius: 8px;
    font-family: 'Fira Code', monospace;
    font-size: 0.7rem;
    margin: 20px auto;
    width: fit-content;
    backdrop-filter: blur(10px);
}

.counter-label {
    color: #22c55e;
}

.counter-value {
    color: #06b6d4;
    font-weight: 600;
    text-shadow: 0 0 10px rgba(6, 182, 212, 0.5);
}

.counter-separator {
    color: #374151;
}

/* ===========================================
   HACK MODE BUTTON
   =========================================== */
.hack-btn {
    position: fixed;
    bottom: 20px;
    right: 20px;
    width: 50px;
    height: 50px;
    border-radius: 50%;
    background: rgba(13, 17, 23, 0.9);
    border: 2px solid rgba(34, 197, 94, 0.5);
    color: #22c55e;
    font-size: 1.2rem;
    cursor: pointer;
    transition: all 0.3s ease;
    z-index: 1000;
    display: flex;
    align-items: center;
    justify-content: center;
}

.hack-btn:hover {
    background: rgba(34, 197, 94, 0.2);
    border-color: #22c55e;
    box-shadow: 0 0 30px rgba(34, 197, 94, 0.5);
    transform: scale(1.1);
}

/* ===========================================
   SOUND TOGGLE
   =========================================== */
.sound-toggle {
    position: fixed;
    bottom: 80px;
    right: 20px;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: rgba(13, 17, 23, 0.9);
    border: 1px solid rgba(139, 92, 246, 0.5);
    color: var(--primary-color);
    font-size: 0.9rem;
    cursor: pointer;
    transition: all 0.3s ease;
    z-index: 1000;
    display: flex;
    align-items: center;
    justify-content: center;
}

.sound-toggle:hover {
    background: rgba(139, 92, 246, 0.2);
    border-color: var(--primary-color);
}

/* ===========================================
   HACK MODE STYLES
   =========================================== */
body.hack-mode {
    background: #000 !important;
}

body.hack-mode .background-animation,
body.hack-mode #bg-canvas {
    opacity: 0 !important;
}

body.hack-mode #matrix-canvas {
    opacity: 0.5 !important;
}

body.hack-mode .container {
    filter: hue-rotate(90deg) saturate(2);
}

body.hack-mode * {
    border-color: #22c55e !important;
}

body.hack-mode .link-card,
body.hack-mode .mini-terminal,
body.hack-mode .newsletter-section {
    background: rgba(0, 20, 0, 0.9) !important;
    border: 1px solid #22c55e !important;
}

body.hack-mode .name,
body.hack-mode .section-title,
body.hack-mode .link-title {
    color: #22c55e !important;
    -webkit-text-fill-color: #22c55e !important;
    text-shadow: 0 0 10px #22c55e;
}

.hack-message {
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    background: rgba(0, 20, 0, 0.95);
    border: 2px solid #22c55e;
    padding: 30px 50px;
    font-family: 'Fira Code', monospace;
    font-size: 1.5rem;
    color: #22c55e;
    text-shadow: 0 0 20px #22c55e;
    z-index: 10001;
    animation: hack-msg-anim 0.5s ease-out;
}

@keyframes hack-msg-anim {
    0% {
        opacity: 0;
        transform: translate(-50%, -50%) scale(0.5);
    }
    50% {
        transform: translate(-50%, -50%) scale(1.1);
    }
    100% {
        opacity: 1;
        transform: translate(-50%, -50%) scale(1);
    }
}

/* ===========================================
   EASTER EGG - SECRET MESSAGE
   =========================================== */
.secret-message {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.95);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 10002;
    animation: secret-fade 0.5s ease-out;
}

.secret-content {
    text-align: center;
    animation: secret-zoom 0.5s ease-out;
}

.secret-content h2 {
    font-size: 3rem;
    color: #f59e0b;
    text-shadow: 0 0 30px #f59e0b, 0 0 60px #f59e0b;
    margin-bottom: 20px;
    animation: rainbow 2s linear infinite;
}

.secret-content p {
    font-size: 1.2rem;
    color: #e5e7eb;
    margin: 10px 0;
}

.secret-code {
    font-family: 'Fira Code', monospace;
    color: #22c55e !important;
    text-shadow: 0 0 10px #22c55e;
}

@keyframes secret-fade {
    from { opacity: 0; }
    to { opacity: 1; }
}

@keyframes secret-zoom {
    from { transform: scale(0.5) rotate(-10deg); }
    to { transform: scale(1) rotate(0deg); }
}

@keyframes rainbow {
    0% { filter: hue-rotate(0deg); }
    100% { filter: hue-rotate(360deg); }
}

/* ===========================================
   EXPLOSION PARTICLES
   =========================================== */
.explosion-particle {
    position: fixed;
    width: 10px;
    height: 10px;
    border-radius: 50%;
    pointer-events: none;
    z-index: 10003;
    animation: explode 1.5s ease-out forwards;
}

@keyframes explode {
    0% {
        transform: translate(-50%, -50%) scale(1);
        opacity: 1;
    }
    100% {
        transform: translate(calc(-50% + var(--tx)), calc(-50% + var(--ty))) scale(0);
        opacity: 0;
    }
}

/* ===========================================
   FOOTER HINT
   =========================================== */
.footer-hint {
    font-size: 0.7rem;
    color: var(--text-muted);
    margin-top: 8px;
    opacity: 0.5;
    transition: opacity 0.3s ease;
}

.footer-hint:hover {
    opacity: 1;
}

/* ===========================================
   RESPONSIVE ADJUSTMENTS
   =========================================== */
@media (max-width: 480px) {
    .hack-btn {
        width: 45px;
        height: 45px;
        bottom: 15px;
        right: 15px;
    }
    
    .sound-toggle {
        width: 35px;
        height: 35px;
        bottom: 70px;
        right: 15px;
    }
    
    .visitor-counter {
        flex-wrap: wrap;
        font-size: 0.6rem;
        padding: 10px 15px;
    }
    
    .secret-content h2 {
        font-size: 2rem;
    }
}
