/* Modern CSS: Transitions de Vues natives (API View Transitions) */
@view-transition {
    navigation: auto;
}

:root {
    --ha-bg: #040707;
    --ha-green: #22c55e;
    --ha-green-dark: #16a34a;
    --ha-red: #ef4444;
    --ha-purple: #a855f7;
    --ha-amber: #fbbf24;
    --ha-lime: #4ade80;
}

body {
    background-color: var(--ha-bg);
    color: #e2e8f0;
    font-family: 'Inter', sans-serif;
    background-image: radial-gradient(circle at 50% -20%, #052e16 0%, var(--ha-bg) 80%);
    background-attachment: fixed;
    margin: 0;
    display: flex;
    flex-direction: column;
    min-height: 100vh;
}

/* Custom Scrollbar */
::-webkit-scrollbar {
    width: 10px;
    height: 10px;
}
::-webkit-scrollbar-track {
    background: rgba(255, 255, 255, 0.02);
}
::-webkit-scrollbar-thumb {
    background: rgba(255, 255, 255, 0.1);
    border-radius: 5px;
}
::-webkit-scrollbar-thumb:hover {
    background: var(--ha-green);
}

.glass {
    background: rgba(255, 255, 255, 0.02);
    backdrop-filter: blur(15px);
    border: 1px solid rgba(255, 255, 255, 0.05);
    transition: all 0.4s ease;
}

.brutal-card {
    background: rgba(255, 255, 255, 0.02);
    backdrop-filter: blur(15px);
    border: 1px solid rgba(255, 255, 255, 0.05);
    border-radius: 2.5rem;
    padding: 2rem;
    transition: all 0.4s ease;
    display: flex;
    flex-direction: column;
    height: 100%;
}

.brutal-card:hover {
    border-color: rgba(255, 255, 255, 0.2);
    background: rgba(255, 255, 255, 0.04);
    /* Utilisation de la propriété indépendante 'translate' pour ne pas gêner le transform du scroll */
    translate: 0 -5px;
}

.nav-link {
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    font-size: 11px;
    color: #94a3b8;
    transition: all 0.3s ease;
}

/* .nav-link:hover {
    color: var(--ha-cyan);
} */

.nav-link.active {
    color: var(--ha-green);
    position: relative;
}

.nav-link.active::after {
    content: '';
    position: absolute;
    bottom: -4px;
    left: 0;
    width: 100%;
    height: 2px;
    background: var(--ha-green);
    box-shadow: 0 0 8px var(--ha-green);
}

.text-neon {
    color: #fff;
    text-shadow: 0 0 10px rgba(255, 255, 255, 0.5), 0 0 20px rgba(34, 197, 94, 0.3);
}

.text-neon-cyan {
    color: var(--ha-green);
    text-shadow: 0 0 15px rgba(34, 197, 94, 0.6);
}

.btn-action {
    background: linear-gradient(90deg, var(--ha-green) 0%, var(--ha-green-dark) 100%);
    box-shadow: 0 5px 20px rgba(34, 197, 94, 0.4);
    transition: all 0.3s ease;
}

.btn-action:hover {
    box-shadow: 0 8px 25px rgba(34, 197, 94, 0.6);
    transform: translateY(-3px);
}

.code-block,
.tech-terminal-box {
    background: #000;
    padding: 1.5rem;
    border-radius: 1rem;
    font-family: 'monospace';
    border: 1px solid var(--ha-green);
    color: var(--ha-green);
    margin: 1rem 0;
    font-size: 0.9rem;
    overflow-x: auto;
    position: relative;
    user-select: all;
}

.step-number {
    background: var(--ha-green);
    color: black;
    width: 32px;
    height: 32px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 8px;
    font-weight: 900;
    margin-right: 12px;
    flex-shrink: 0;
}

.btn-social {
    transition: all 0.3s ease;
    color: #94a3b8;
}

.btn-social:hover {
    color: #fff;
}

.hidden {
    display: none;
}

.active-page {
    display: block;
    animation: fadeInPage 0.8s ease;
}

@keyframes fadeInPage {
    from {
        opacity: 0;
        transform: translateY(20px);
    }

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

.leading-brutal {
    line-height: 1.1;
    letter-spacing: -0.02em;
}

.flash-step {
    position: relative;
    padding-left: 3rem;
    border-left: 2px solid rgba(34, 197, 94, 0.2);
    padding-bottom: 3rem;
}

.flash-step::before {
    content: '';
    position: absolute;
    left: -9px;
    top: 0;
    width: 16px;
    height: 16px;
    border-radius: 50%;
    background: var(--ha-cyan);
    box-shadow: 0 0 15px var(--ha-cyan);
}

.link-card {
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(255, 255, 255, 0.1);
    padding: 1rem;
    border-radius: 1rem;
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
    transition: all 0.3s ease;
}

.link-card:hover {
    border-color: var(--ha-cyan);
    background: rgba(34, 197, 94, 0.05);
}

.lexique-icon {
    font-size: 2rem;
    margin-bottom: 1rem;
    background: linear-gradient(135deg, var(--ha-green), var(--ha-lime));
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
}

.proto-badge {
    font-size: 10px;
    font-weight: 900;
    padding: 2px 8px;
    border-radius: 4px;
    text-transform: uppercase;
}

/* Modern CSS: Animations au défilement (exclus: sections de bas de page pour éviter les bugs d'opacité) */
@supports (animation-timeline: view()) {
    .brutal-card:not(#community-section):not(footer):not(header), 
    .link-card {
        animation: slide-up-reveal linear both;
        animation-timeline: view();
        animation-range: entry 0% entry 40%;
    }
}

@keyframes slide-up-reveal {
    from {
        opacity: 0;
        transform: translateY(40px) scale(0.97);
    }
    to {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

/* Accessibilité: Respect des préférences utilisateur */
@media (prefers-reduced-motion: reduce) {
    *, ::before, ::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
        scroll-behavior: auto !important;
    }
}

/* ══════════════════════════════════════════════════
   V2 — VISUAL REFINEMENTS & MICRO-INTERACTIONS
   ══════════════════════════════════════════════════ */

:root {
    --ease-bounce: cubic-bezier(0.34, 1.56, 0.64, 1);
    --ease-out:    cubic-bezier(0.23, 1, 0.32, 1);
}

/* — Animated gradient for "ABSOLU." text — */
@keyframes gradient-flow {
    0%   { background-position: 0% center; }
    50%  { background-position: 100% center; }
    100% { background-position: 0% center; }
}
.animate-gradient {
    animation: gradient-flow 5s ease infinite;
}

/* — Enhanced Glass Morphism — */
.glass {
    background: rgba(255, 255, 255, 0.025);
    backdrop-filter: blur(20px) saturate(150%);
    -webkit-backdrop-filter: blur(20px) saturate(150%);
    border-color: rgba(255, 255, 255, 0.07);
    box-shadow:
        0 1px 0 rgba(255, 255, 255, 0.06) inset,
        0 8px 32px -4px rgba(0, 0, 0, 0.5);
    transition: all 0.35s var(--ease-out);
}

/* — Enhanced brutal-card depth — */
.brutal-card {
    box-shadow:
        0 24px 48px -12px rgba(0, 0, 0, 0.7),
        0 4px 8px -2px rgba(0, 0, 0, 0.4),
        0 1px 0 rgba(255, 255, 255, 0.03) inset;
}
.brutal-card:hover {
    box-shadow:
        0 32px 64px -16px rgba(0, 0, 0, 0.85),
        0 8px 16px -4px rgba(0, 0, 0, 0.5),
        0 1px 0 rgba(255, 255, 255, 0.05) inset;
}

/* — Hero badge shimmer — */
@keyframes badge-shimmer {
    0%   { transform: translateX(-100%) skewX(-15deg); opacity: 0; }
    10%  { opacity: 1; }
    90%  { opacity: 1; }
    100% { transform: translateX(350%) skewX(-15deg); opacity: 0; }
}
.badge-shimmer {
    position: relative;
    overflow: hidden;
}
.badge-shimmer::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 35%;
    height: 100%;
    background: linear-gradient(
        90deg,
        transparent,
        rgba(34, 197, 94, 0.28),
        transparent
    );
    animation: badge-shimmer 4s ease-in-out infinite;
    pointer-events: none;
}

/* — Nav: gradient hairline at bottom — */
.nav-enhanced {
    position: relative;
}
.nav-enhanced::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 5%;
    right: 5%;
    height: 1px;
    background: linear-gradient(
        90deg,
        transparent,
        rgba(34, 197, 94, 0.18),
        rgba(34, 197, 94, 0.35),
        rgba(34, 197, 94, 0.18),
        transparent
    );
    pointer-events: none;
}

/* — Quiz heading glow (replaces animate-pulse) — */
@keyframes glow-pulse-fuchsia {
    0%, 100% {
        text-shadow: 0 0 12px rgba(217, 70, 239, 0.25);
    }
    50% {
        text-shadow: 0 0 22px rgba(217, 70, 239, 0.5),
                     0 0 40px rgba(217, 70, 239, 0.15);
    }
}
.quiz-heading {
    animation: glow-pulse-fuchsia 4.5s ease-in-out infinite;
}

/* — Social card brand hover glows — */
.btn-social-tiktok { transition: all 0.35s var(--ease-out); }
.btn-social-tiktok:hover {
    border-color: rgba(255, 255, 255, 0.12) !important;
    box-shadow: 0 10px 30px -6px rgba(0, 0, 0, 0.65),
                inset 0 0 30px rgba(255, 255, 255, 0.03);
    translate: 0 -4px;
}

.btn-social-discord { transition: all 0.35s var(--ease-out); }
.btn-social-discord:hover {
    border-color: rgba(88, 101, 242, 0.3) !important;
    box-shadow: 0 10px 30px -6px rgba(0, 0, 0, 0.65),
                0 0 28px rgba(88, 101, 242, 0.18) !important;
    translate: 0 -4px;
}

.btn-social-github { transition: all 0.35s var(--ease-out); }
.btn-social-github:hover {
    border-color: rgba(160, 130, 255, 0.25) !important;
    box-shadow: 0 10px 30px -6px rgba(0, 0, 0, 0.65),
                0 0 28px rgba(160, 130, 255, 0.14) !important;
    translate: 0 -4px;
}

.btn-social-x { transition: all 0.35s var(--ease-out); }
.btn-social-x:hover {
    border-color: rgba(255, 255, 255, 0.12) !important;
    box-shadow: 0 10px 30px -6px rgba(0, 0, 0, 0.65),
                inset 0 0 40px rgba(255, 255, 255, 0.02) !important;
    translate: 0 -4px;
}

/* — Glass CTA button shine — */
@keyframes btn-shine {
    0%   { left: -80%; opacity: 0; }
    5%   { opacity: 1; }
    95%  { opacity: 1; }
    100% { left: 200%; opacity: 0; }
}
.btn-glass-cta {
    position: relative;
    overflow: hidden;
}
.btn-glass-cta::after {
    content: '';
    position: absolute;
    top: 0;
    left: -80%;
    width: 40%;
    height: 100%;
    background: linear-gradient(
        90deg,
        transparent,
        rgba(255, 255, 255, 0.09),
        transparent
    );
    transform: skewX(-20deg);
    animation: btn-shine 7s ease-in-out infinite;
    pointer-events: none;
}

/* — Footer gradient hairline — */
footer::before {
    content: '';
    position: absolute;
    top: 0;
    left: 8%;
    right: 8%;
    height: 1px;
    background: linear-gradient(
        90deg,
        transparent,
        rgba(34, 197, 94, 0.18),
        rgba(148, 163, 184, 0.08),
        transparent
    );
    pointer-events: none;
}

/* — Improved scrollbar — */
::-webkit-scrollbar-thumb {
    background: rgba(255, 255, 255, 0.08);
    border-radius: 8px;
    border: 2px solid transparent;
    background-clip: padding-box;
}
::-webkit-scrollbar-thumb:hover {
    background: rgba(34, 197, 94, 0.45);
    border: 2px solid transparent;
    background-clip: padding-box;
}

/* Alignement parfait du prix et des boutons en bas de toutes les cartes bons plans */
.brutal-card .flex.items-center.justify-between,
.brutal-card .flex.items-end.justify-between {
    align-items: flex-end !important;
}