:root {
    /* --- REFINED MAGIC DESIGN SYSTEM --- */
    --primary: #00ffa3;
    /* Bio-Green */
    --primary-glow: rgba(0, 255, 163, 0.4);
    --secondary: #7000ff;
    /* Circuit Purple */
    --secondary-glow: rgba(112, 0, 255, 0.4);
    --gold: #ffd700;
    /* Solaris Gold */
    --gold-glow: rgba(255, 215, 0, 0.4);

    --bg-darker: #020504;
    --bg-dark: #050a08;
    --card-bg: rgba(10, 15, 13, 0.8);
    --glass-border: rgba(0, 255, 163, 0.2);

    --text-main: #e0fcf4;
    --text-muted: #8ba39a;

    --font-heading: 'Orbitron', sans-serif;
    --font-body: 'Rajdhani', sans-serif;

    --transition-smooth: all 0.4s cubic-bezier(0.23, 1, 0.32, 1);
    --shadow-pro: 0 15px 45px rgba(0, 0, 0, 0.8);
}

* {
    box-sizing: border-box;
    max-width: 100%;
}

/* --- CUSTOM SCROLLBAR --- */
::-webkit-scrollbar {
    width: 10px;
}

::-webkit-scrollbar-track {
    background: var(--bg-darker);
}

::-webkit-scrollbar-thumb {
    background: var(--primary);
    border-radius: 5px;
    box-shadow: 0 0 10px var(--primary-glow);
}

::-webkit-scrollbar-thumb:hover {
    background: #fff;
    box-shadow: 0 0 20px var(--primary);
}

html,
body {
    margin: 0;
    padding: 0;
    width: 100%;
    max-width: 100vw;
    overflow-x: hidden;
}

body {
    font-family: var(--font-body);
    background-color: #050a08;
    background-image:
        linear-gradient(45deg, rgba(0, 255, 163, 0.03) 1px, transparent 1px),
        linear-gradient(-45deg, rgba(0, 255, 163, 0.03) 1px, transparent 1px),
        radial-gradient(circle at 50% 0%, #0a1f16 0%, #050a08 80%);
    background-size: 40px 40px, 40px 40px, 100% 100%;
    color: var(--text-main);
    display: flex;
    justify-content: center;
    min-height: 100vh;
    -webkit-overflow-scrolling: touch;
}

.container {
    width: 100%;
    max-width: 850px;
    background: var(--card-bg);
    padding: 40px;
    border-radius: 24px;
    border: 1px solid var(--glass-border);
    box-shadow: var(--shadow-pro), inset 0 0 40px rgba(0, 255, 163, 0.05);
    backdrop-filter: blur(25px);
    -webkit-backdrop-filter: blur(25px);
    position: relative;
    margin-top: 40px;
    padding-bottom: 100px;
}

.container.visible {
    display: block;
    opacity: 1;
    transform: none;
}

.container::before {
    content: '';
    position: absolute;
    inset: 0;
    border-radius: 24px;
    padding: 2px;
    background: linear-gradient(135deg, var(--primary), transparent, var(--secondary));
    mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
    -webkit-mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
    mask-composite: exclude;
    -webkit-mask-composite: destination-out;
    pointer-events: none;
    opacity: 0.3;
}

/* --- SCROLL INSTRUCTION --- */
.scroll-instruction {
    text-align: center;
    font-family: var(--font-heading);
    color: var(--gold);
    font-size: 0.8rem;
    letter-spacing: 2px;
    margin-bottom: 20px;
    text-shadow: 0 0 10px var(--gold-glow);
    opacity: 0.8;
}

/* --- HEADER & LOGO --- */
.header-section {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 30px;
    margin-bottom: 50px;
}

.logo-img {
    width: 90px;
    height: 90px;
    object-fit: contain;
    filter: drop-shadow(0 0 15px var(--primary-glow));
    animation: floating 4s ease-in-out infinite;
    cursor: pointer;
    transition: var(--transition-smooth);
    border-radius: 50%;
    background: rgba(0, 255, 163, 0.05);
    padding: 10px;
}

.title-block {
    text-align: left;
}

h1 {
    font-family: var(--font-heading);
    color: var(--primary);
    font-weight: 900;
    font-size: 2.2rem;
    text-transform: uppercase;
    letter-spacing: 4px;
    margin: 0;
    text-shadow: 0 0 20px var(--primary-glow);
    line-height: 1;
}

.subtitle {
    font-family: var(--font-body);
    color: var(--gold);
    font-size: 1rem;
    letter-spacing: 6px;
    text-transform: uppercase;
    margin-top: 8px;
    font-weight: 700;
}

@keyframes floating {

    0%,
    100% {
        transform: translateY(0) rotate(0);
    }

    50% {
        transform: translateY(-15px) rotate(2deg);
    }
}

/* Market Alert */
.market-alert {
    background: rgba(0, 0, 0, 0.3);
    border: 1px solid var(--gold);
    color: var(--gold);
    padding: 15px;
    border-radius: 4px;
    margin-bottom: 25px;
    display: flex;
    align-items: center;
    gap: 15px;
    font-size: 0.8rem;
    line-height: 1.4;
}

.market-alert i {
    font-size: 1.5rem;
}

/* --- INPUTS --- */
.section {
    margin-bottom: 30px;
    position: relative;
    background: rgba(255, 255, 255, 0.02);
    padding: 20px;
    border-radius: 16px;
    border: 1px solid rgba(255, 255, 255, 0.05);
    transition: var(--transition-smooth);
}

@media (hover: hover) {
    .section:hover {
        background: rgba(255, 255, 255, 0.04);
        border-color: rgba(0, 255, 163, 0.2);
    }
}

label {
    display: block;
    margin-bottom: 12px;
    color: var(--primary);
    font-family: var(--font-heading);
    font-size: 0.8rem;
    letter-spacing: 2px;
    text-transform: uppercase;
    font-weight: 700;
}

.input-group {
    display: flex;
    gap: 15px;
    align-items: center;
    background: rgba(0, 0, 0, 0.3);
    padding: 12px 18px;
    border-radius: 12px;
    border: 1px solid rgba(255, 255, 255, 0.1);
    transition: var(--transition-smooth);
}

select {
    flex: 1;
    padding: 8px;
    border: none;
    background: #000 !important;
    color: var(--text-main) !important;
    font-family: var(--font-body);
    font-size: 1.15rem;
    font-weight: 600;
    outline: none;
    cursor: pointer;
    text-transform: uppercase;
}

select option {
    background: #000 !important;
    color: var(--primary) !important;
    padding: 10px;
    font-family: var(--font-body);
}

select:hover,
select:focus {
    color: var(--primary) !important;
}

/* --- NOUVELLES FONCTIONNALITÉS --- */

/* Conseils du Farfadet */
#farfadet-advice-container {
    position: fixed;
    top: 20px;
    right: 20px;
    width: 320px;
    background: var(--card-bg);
    border: 1px solid var(--primary);
    border-radius: 16px;
    z-index: 15000;
    box-shadow: 0 15px 45px rgba(0, 0, 0, 0.6);
    backdrop-filter: blur(25px);
    overflow: hidden;
    transition: var(--transition-smooth);
}

.advice-header {
    background: var(--primary-dim);
    color: var(--primary);
    padding: 12px;
    font-family: 'Orbitron', sans-serif;
    font-weight: 700;
    font-size: 0.8rem;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 10px;
    border-bottom: 1px solid rgba(0, 255, 157, 0.2);
}

.advice-content {
    padding: 15px;
    font-size: 0.95rem;
    line-height: 1.4;
    color: var(--text-main);
    max-height: 300px;
    overflow-y: auto;
}

.advice-collapsed {
    height: 45px !important;
}

/* Modèles de Butin (Presets) */
.presets-section {
    margin-bottom: 40px;
}

.presets-buttons {
    display: flex;
    gap: 15px;
    margin-top: 15px;
}

.btn-preset {
    flex: 1;
    padding: 14px;
    background: rgba(0, 0, 0, 0.4);
    border: 1px solid var(--gold);
    color: var(--gold);
    cursor: pointer;
    font-family: var(--font-heading);
    font-size: 0.75rem;
    font-weight: 800;
    letter-spacing: 1px;
    transition: var(--transition-smooth);
    text-transform: uppercase;
    clip-path: polygon(10px 0%, 100% 0%, 100% calc(100% - 10px), calc(100% - 10px) 100%, 0% 100%, 0% 10px);
    -webkit-clip-path: polygon(10px 0%, 100% 0%, 100% calc(100% - 10px), calc(100% - 10px) 100%, 0% 100%, 0% 10px);
}

@media (hover: hover) {
    .btn-preset:hover {
        background: var(--gold);
        color: #000;
        box-shadow: 0 0 25px var(--gold-glow);
        transform: translateY(-3px);
    }
}

/* Floating Advice Badge */
.advice-badge {
    position: fixed;
    top: 20px;
    right: 20px;
    background: rgba(0, 255, 163, 0.1);
    border: 1px solid var(--primary);
    color: var(--primary);
    padding: 8px 15px;
    font-family: var(--font-heading);
    font-size: 0.65rem;
    text-transform: uppercase;
    cursor: pointer;
    z-index: 1000;
    text-decoration: none;
    transition: var(--transition-fast);
}

.advice-badge:hover {
    background: var(--primary);
    color: #000;
}

/* Primary Action Buttons */
.btn-export,
.btn-share,
.btn-enter-config {
    position: relative;
    background: var(--primary);
    color: #000;
    border: none;
    padding: 18px 30px;
    font-family: var(--font-heading);
    font-weight: 900;
    font-size: 1rem;
    cursor: pointer;
    text-transform: uppercase;
    letter-spacing: 2px;
    border-radius: 0;
    overflow: hidden;
    transition: var(--transition-smooth);
    z-index: 1;
    clip-path: polygon(15px 0%, 100% 0%, 100% calc(100% - 15px), calc(100% - 15px) 100%, 0% 100%, 0% 15px);
    -webkit-clip-path: polygon(15px 0%, 100% 0%, 100% calc(100% - 15px), calc(100% - 15px) 100%, 0% 100%, 0% 15px);
}

.btn-export::before,
.btn-share::before,
.btn-enter-config::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.4), transparent);
    transition: 0.5s;
    z-index: -1;
}

@media (hover: hover) {

    .btn-export:hover::before,
    .btn-share:hover::before,
    .btn-enter-config:hover::before {
        left: 100%;
    }

    .btn-export:hover,
    .btn-share:hover,
    .btn-enter-config:hover {
        background: #fff;
        box-shadow: 0 0 30px var(--primary);
        transform: translateY(-3px) scale(1.02);
    }
}

.btn-share {
    background: var(--primary);
    width: 100%;
    margin-top: 25px;
}

.btn-export {
    background: var(--gold);
    width: 100%;
    margin-top: 15px;
}

.btn-export:hover {
    box-shadow: 0 0 30px var(--gold-glow);
}

@media (max-width: 1100px) {
    #farfadet-advice-container {
        position: relative;
        top: 0;
        right: 0;
        width: 100%;
        margin-bottom: 20px;
    }
}

.btn-search,
.btn-idealo {
    width: 38px;
    height: 38px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: #000;
    border: 1px solid rgba(255, 255, 255, 0.1);
    cursor: pointer;
    transition: var(--transition-fast);
}

.btn-search {
    color: var(--gold);
    border-color: rgba(255, 215, 0, 0.3);
}

.btn-idealo {
    color: var(--primary);
    border-color: rgba(0, 255, 163, 0.3);
}

@media (hover: hover) {

    .btn-search:hover,
    .btn-idealo:hover {
        background: rgba(255, 255, 255, 0.05);
        border-color: currentColor;
    }
}

/* --- TOTAL & FOOTER --- */
.total-container {
    margin-top: 30px;
    padding: 20px;
    background: rgba(0, 0, 0, 0.5);
    border: 1px solid var(--primary);
    text-align: center;
}

#prix-total {
    font-family: var(--font-heading);
    font-size: 2.5rem;
    font-weight: 700;
    color: white;
    text-shadow: 0 0 10px var(--primary);
    display: block;
    margin: 10px 0;
}

.buttons-container {
    display: flex;
    justify-content: center;
    gap: 15px;
    margin-top: 20px;
    font-size: 1rem;
    width: 100%;
}

@media (hover: hover) {
    .btn-share:hover {
        background: white;
        box-shadow: 0 0 30px var(--primary);
    }
}

/* --- SOCIAL LINKS --- */
.social-links {
    position: absolute;
    bottom: 30px;
    left: 0;
    right: 0;
    display: flex;
    justify-content: center;
    gap: 30px;
    padding: 20px 0;
    border-top: 1px solid rgba(255, 255, 255, 0.05);
}

.social-link {
    font-size: 1.5rem;
    color: var(--text-muted);
    opacity: 0.7;
    transition: var(--transition-smooth);
}

@media (hover: hover) {
    .social-link:hover {
        opacity: 1;
        color: #fff;
        transform: translateY(-5px) scale(1.1);
        animation: glitch-anim 0.3s cubic-bezier(.25, .46, .45, .94) both infinite;
    }

    .social-link.insta:hover {
        color: #E1306C;
        text-shadow: 0 0 20px #E1306C;
    }

    .social-link.discord:hover {
        color: #5865F2;
        text-shadow: 0 0 20px #5865F2;
    }

    .social-link.youtube:hover {
        color: #FF0000;
        text-shadow: 0 0 20px #FF0000;
    }

    .social-link.twitch:hover {
        color: #9146FF;
        text-shadow: 0 0 20px #9146FF;
    }
}

/* --- ANIMATIONS --- */
@keyframes float {
    0% {
        transform: translateY(px);
    }

    50% {
        transform: translateY(-10px);
    }

    100% {
        transform: translateY(0px);
    }
}

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

    100% {
        transform: translateX(100%);
    }
}

/* --- CREATIVE ANIMATIONS --- */

.wisp {
    position: fixed;
    width: 200px; /* Slightly larger */
    height: 200px;
    border-radius: 50%;
    background: radial-gradient(circle, rgba(255, 215, 0, 0.3) 0%, rgba(255, 120, 0, 0.1) 40%, transparent 70%);
    pointer-events: none;
    z-index: 2; /* Moved in front of the background but behind interactive cards if possible */
    mix-blend-mode: screen;
    filter: blur(25px);
    transition: all 4s cubic-bezier(0.4, 0, 0.2, 1);
    opacity: 0.9;
    will-change: transform;
}

.particle {
    position: fixed;
    width: 4px;
    height: 4px;
    background: var(--gold);
    border-radius: 50%;
    pointer-events: none;
    z-index: 9999;
    animation: particleFade 1.2s cubic-bezier(0.4, 0, 0.2, 1) forwards;
    box-shadow: 0 0 10px var(--gold);
    will-change: transform, opacity;
}

@keyframes particleFade {
    0% {
        opacity: 1;
        transform: scale(1) translate(0, 0);
    }

    100% {
        opacity: 0;
        transform: scale(0) translate(var(--tx, 20px), var(--ty, 20px));
    }
}

.glitch-active {
    animation: glitch-anim 0.3s cubic-bezier(.25, .46, .45, .94) both infinite;
    color: var(--primary);
}

@keyframes glitch-anim {
    0% {
        transform: translate(0);
        text-shadow: 2px 2px #ff00ff, -2px -2px #00ff9d;
    }

    20% {
        transform: translate(-2px, 2px);
    }

    40% {
        transform: translate(-2px, -2px);
        text-shadow: 0 0 transparent;
    }

    60% {
        transform: translate(2px, 2px);
    }

    80% {
        transform: translate(2px, -2px);
        text-shadow: 2px 2px #ff00ff, -2px -2px #00ff9d;
    }

    100% {
        transform: translate(0);
    }
}

.lock-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.9);
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    z-index: 10000;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.5s ease;
}

.lock-overlay.active {
    opacity: 1;
    pointer-events: all;
}

.lock-icon {
    font-size: 8rem;
    color: var(--gold);
    text-shadow: 0 0 30px var(--gold-glow);
    transition: transform 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275), color 0.3s ease;
}

.lock-icon.locked {
    color: var(--primary);
    text-shadow: 0 0 30px var(--primary);
    transform: scale(0.9);
}

.lock-text {
    margin-top: 30px;
    font-family: 'Orbitron', sans-serif;
    font-size: 2rem;
    color: var(--text-main);
    opacity: 0;
    transform: translateY(20px);
    transition: all 0.5s ease;
}

.lock-text.visible {
    opacity: 1;
    transform: translateY(0);
}

@keyframes shake {

    0%,
    100% {
        transform: translateX(0);
    }

    10%,
    30%,
    50%,
    70%,
    90% {
        transform: translateX(-5px);
    }

    20%,
    40%,
    60%,
    80% {
        transform: translateX(5px);
    }
}

.lock-shake {
    animation: shake 0.4s cubic-bezier(.36, .07, .19, .97) both;
}

.lock-particle {
    position: fixed;
    width: 8px;
    height: 8px;
    border-radius: 50%;
    pointer-events: none;
    z-index: 10002;
}

.shockwave {
    position: fixed;
    border-radius: 50%;
    border: 2px solid var(--primary);
    transform: translate(-50%, -50%);
    pointer-events: none;
    z-index: 10001;
    box-shadow: 0 0 50px var(--primary), inset 0 0 50px var(--primary);
}

/* --- FARFADET NOTIFICATIONS --- */
.farfadet-notification {
    position: fixed;
    bottom: 30px;
    right: 30px;
    background: var(--card-bg);
    border: 1px solid var(--primary);
    border-left: 5px solid var(--primary);
    padding: 20px;
    border-radius: 12px;
    z-index: 30000;
    width: 350px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.5), 0 0 15px var(--primary-glow);
    backdrop-filter: blur(15px);
    display: flex;
    align-items: center;
    gap: 15px;
    transform: translateX(120%);
    transition: transform 0.5s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

.farfadet-notification.visible {
    transform: translateX(0);
}

.farfadet-notification i {
    font-size: 1.5rem;
    color: var(--primary);
}

.farfadet-notification-content {
    font-size: 0.9rem;
    color: var(--text-main);
}

.farfadet-notification.error {
    border-color: #ff4444;
    border-left-color: #ff4444;
}

.farfadet-notification.error i {
    color: #ff4444;
}

/* --- RESET BUTTON STYLE --- */
.btn-reset {
    background: rgba(255, 68, 68, 0.1);
    border: 1px solid #ff4444;
    color: #ff4444;
    padding: 18px 30px;
    font-family: var(--font-heading);
    font-weight: 800;
    font-size: 0.9rem;
    cursor: pointer;
    text-transform: uppercase;
    letter-spacing: 1px;
    border-radius: 0;
    transition: var(--transition-smooth);
    clip-path: polygon(15px 0%, 100% 0%, 100% calc(100% - 15px), calc(100% - 15px) 100%, 0% 100%, 0% 15px);
    -webkit-clip-path: polygon(15px 0%, 100% 0%, 100% calc(100% - 15px), calc(100% - 15px) 100%, 0% 100%, 0% 15px);
    margin-top: 15px;
    width: 100%;
}

@media (hover: hover) {
    .btn-reset:hover {
        background: rgba(212, 175, 55, 0.4);
        box-shadow: 0 0 20px rgba(212, 175, 55, 0.4);
        transform: translateY(-2px);
    }
}

/* --- DOUBLE STOCKAGE --- */
.btn-add-storage {
    background: rgba(0, 255, 153, 0.1);
    border: 1px solid var(--neon-green);
    color: var(--neon-green);
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 4px;
    cursor: pointer;
    transition: all 0.3s ease;
    margin-left: 10px;
}

@media (hover: hover) {
    .btn-add-storage:hover {
        background: var(--neon-green);
        color: var(--dark-bg);
        box-shadow: 0 0 15px var(--neon-green);
    }
}

.section-secondary {
    margin-top: 10px;
    border-top: 1px dashed rgba(0, 255, 153, 0.2);
    padding-top: 10px;
    display: none;
    animation: slideDown 0.4s ease forwards;
}

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

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

#portfolio-home {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100vh;
    background: radial-gradient(circle at center, #0a1f16 0%, #050a08 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 20000;
    transition: var(--transition-premium);
    overflow: hidden;
}

#portfolio-home.hidden {
    opacity: 0;
    transform: scale(1.05);
    visibility: hidden;
}

.portfolio-container {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 60px;
    max-width: 1100px;
    width: 100%;
    margin: 0 auto;
    padding: 40px;
}

.portfolio-left {
    flex-shrink: 0;
    width: 380px;
    height: 380px;
    border-radius: 12px;
    border: 1px solid var(--primary);
    box-shadow: 0 0 30px var(--primary-glow), inset 0 0 20px var(--primary-glow);
    overflow: hidden;
    position: relative;
    background: #000;
}

.character-img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    filter: contrast(1.1);
    transition: var(--transition-smooth);
}

@media (hover: hover) {
    .portfolio-left:hover .character-img {
        transform: scale(1.05);
    }
}

.portfolio-right {
    display: flex;
    flex-direction: column;
    justify-content: center;
    flex: 1;
    text-align: left;
}

.portfolio-title {
    font-family: var(--font-heading);
    font-size: 3.5rem;
    font-weight: 900;
    line-height: 1.1;
    margin: 0;
    color: var(--primary);
    text-shadow: 0 0 20px var(--primary-glow);
    letter-spacing: 2px;
}

.portfolio-subtitle {
    font-size: 0.9rem;
    letter-spacing: 5px;
    text-transform: uppercase;
    color: var(--gold);
    margin: 15px 0 30px;
    font-weight: 700;
}

.portfolio-bio {
    background: rgba(0, 255, 163, 0.03);
    border: 1px solid rgba(0, 255, 163, 0.1);
    border-left: 3px solid var(--primary);
    padding: 25px;
    border-radius: 4px 16px 16px 4px;
    color: var(--text-main);
    font-size: 1rem;
    line-height: 1.6;
    max-width: 500px;
    backdrop-filter: blur(10px);
}

.portfolio-actions {
    display: flex;
    gap: 25px;
    align-items: center;
    margin-top: 40px;
}

.btn-enter-config {
    background: var(--primary);
    color: #000;
    padding: 18px 35px;
    font-family: var(--font-heading);
    font-weight: 900;
    font-size: 1rem;
    letter-spacing: 2px;
    transition: var(--transition-smooth);
    cursor: pointer;
    border: none;
    text-transform: uppercase;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
    clip-path: polygon(15px 0%, 100% 0%, 100% calc(100% - 15px), calc(100% - 15px) 100%, 0% 100%, 0% 15px);
    -webkit-clip-path: polygon(15px 0%, 100% 0%, 100% calc(100% - 15px), calc(100% - 15px) 100%, 0% 100%, 0% 15px);
}

@media (hover: hover) {
    .btn-enter-config:hover {
        background: #fff;
        box-shadow: 0 0 30px var(--primary);
        transform: translateY(-3px);
    }
}

.portfolio-socials {
    display: flex;
    gap: 30px;
    justify-content: center;
}

.portfolio-social-link {
    font-size: 24px;
    color: var(--text-muted);
    transition: var(--transition-smooth);
}

@media (hover: hover) {
    .portfolio-social-link:hover {
        color: #fff;
        transform: translateY(-5px) scale(1.1);
        animation: glitch-anim 0.3s cubic-bezier(.25, .46, .45, .94) both infinite;
    }

    .portfolio-social-link.insta:hover {
        color: #E1306C;
        text-shadow: 0 0 20px #E1306C, 2px 2px #ff00ff;
    }

    .portfolio-social-link.discord:hover {
        color: #5865F2;
        text-shadow: 0 0 20px #5865F2, 2px 2px #00ffff;
    }

    .portfolio-social-link.youtube:hover {
        color: #FF0000;
        text-shadow: 0 0 20px #FF0000, 2px 2px #ff6600;
    }

    .portfolio-social-link.twitch:hover {
        color: #9146FF;
        text-shadow: 0 0 20px #9146FF, 2px 2px #6441a5;
    }
}

/* --- CONFIGURATOR CONTAINER --- */
.container {
    opacity: 0;
    transform: translateY(20px);
    transition: opacity 1s ease 0.5s, transform 1s ease 0.5s;
}

.container.visible {
    opacity: 1;
    transform: translateY(0);
}

/* --- MOBILE OPTIMIZATION --- */
@media (max-width: 900px) {
    #portfolio-home {
        position: relative;
        height: auto;
        min-height: 100vh;
        overflow: visible;
        padding: 40px 0;
        display: block;
    }

    .portfolio-container {
        display: block;
        padding: 40px 20px;
        margin: 0 auto;
        width: 100%;
    }

    .portfolio-left {
        width: 180px;
        height: 180px;
        margin: 0 auto;
    }

    .portfolio-right {
        text-align: center;
        align-items: center;
        width: 100%;
    }

    .portfolio-title {
        font-size: 2rem;
        text-align: center;
        word-wrap: break-word;
    }

    .portfolio-subtitle {
        font-size: 0.8rem;
        text-align: center;
        margin: 10px 0 20px;
    }

    .portfolio-bio {
        border-left: none;
        border-top: 3px solid var(--primary);
        border-radius: 0 0 16px 16px;
        text-align: center;
        margin: 0 auto;
        padding: 15px;
        width: 100%;
    }

    .portfolio-actions {
        flex-direction: column;
        gap: 20px;
        width: 100%;
    }

    .btn-enter-config {
        width: 100%;
        max-width: 100%;
        justify-content: center;
    }
}

/* Extra aggressive centering for Portrait Phones */
@media (max-width: 480px) {
    .portfolio-title {
        font-size: 1.6rem !important;
    }

    h1 {
        font-size: 1.1rem !important;
        letter-spacing: 2px !important;
    }

    .portfolio-subtitle {
        letter-spacing: 2px !important;
    }

    .portfolio-container {
        padding: 40px 15px;
    }

    .container {
        margin: 10px auto;
        padding: 20px 10px;
    }
}

@media (max-width: 768px) {
    body {
        padding: 0 5px 5px;
        /* Suppression du padding-top */
        display: block !important;
        overflow-x: hidden;
    }

    .container {
        padding: 20px 12px;
        margin: 0 auto !important;
        /* Retrait du margin-top pour coller au haut */
        width: 96% !important;
        max-width: 96% !important;
        overflow-x: hidden;
        display: block;
        box-shadow: 0 0 20px rgba(0, 0, 0, 0.5);
    }

    .input-group {
        padding: 6px 8px;
        gap: 8px;
        width: 100%;
        overflow: hidden;
        /* Prevent horizontal spill */
    }

    select {
        font-size: 16px !important;
        /* Empêche l'iPhone de zoomer tout seul */
        min-width: 0;
        width: 100%;
    }

    .btn-search,
    .btn-idealo {
        width: 40px;
        height: 40px;
        font-size: 0.9rem;
        flex-shrink: 0;
    }

    .header-section {
        flex-direction: column;
        gap: 15px;
        text-align: center;
        align-items: center;
        margin-bottom: 20px !important;
    }

    .title-block {
        text-align: center;
    }

    h1 {
        font-size: 1.2rem;
        text-align: center;
    }

    .subtitle {
        text-align: center;
        letter-spacing: 3px;
    }

    #prix-total {
        font-size: 2.5rem;
    }

    .farfadet-notification {
        width: calc(100% - 40px) !important;
        right: 20px !important;
        left: 20px !important;
        max-width: 350px;
    }

    .social-links {
        position: relative !important;
        bottom: auto !important;
        left: auto !important;
        right: auto !important;
        margin-top: 30px !important;
        padding: 20px 0 !important;
        width: 100% !important;
    }

    .social-link {
        font-size: 20px;
    }

    .presets-section {
        margin-bottom: 20px !important;
    }

    .market-alert {
        margin-bottom: 15px !important;
        padding: 10px !important;
    }

    .section {
        margin-bottom: 15px !important;
        padding: 12px 10px !important;
    }

    .total-container {
        margin-top: 15px !important;
        padding: 15px !important;
    }

    .container {
        padding-bottom: 40px !important;
    }

    /* --- MOBILE PERF: disable heavy effects --- */
    .wisp {
        display: none !important;
    }

    .container,
    .farfadet-notification,
    .portfolio-bio {
        backdrop-filter: none;
        -webkit-backdrop-filter: none;
    }

    .container {
        background: rgba(10, 15, 13, 0.95);
    }

    .farfadet-notification {
        background: rgba(10, 15, 13, 0.95);
    }

    .portfolio-bio {
        background: rgba(0, 255, 163, 0.05);
        backdrop-filter: none;
    }

    .container::before {
        display: none;
    }

    .logo-img {
        animation: none;
    }

    .btn-preset,
    .btn-share,
    .btn-export,
    .btn-reset,
    .btn-enter-config,
    .btn-search,
    .btn-idealo {
        min-height: 44px;
    }

    .presets-buttons {
        flex-direction: column;
        gap: 8px;
    }
}

/* --- ACCESSIBILITY: Reduced Motion --- */
@media (prefers-reduced-motion: reduce) {

    *,
    *::before,
    *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }

    .wisp {
        display: none !important;
    }

    .logo-img {
        animation: none;
    }
}