/* ==============================================
   DESIGN SYSTEM — FDECHIARA.COM
   Style : Futuriste + Sport
   Version : 4.0 — Multi-pages
   ============================================== */

/* --- CUSTOM PROPERTIES --- */
:root {
    /* Couleurs */
    --primary-black: #050508;
    --primary-yellow: #FFBE0A;
    --primary-red: #91171F;
    --accent-red: #C72028;
    --dark-gray: #0D0D12;
    --mid-gray: #8A8B94;
    --light-gray: #E8E8EA;
    --white: #F0F0F5;
    --surface-1: #1A1A1A;
    --surface-2: #2A2A2A;
    --surface-3: #3A3A3A;

    /* RGB pour opacites dynamiques */
    --red-rgb: 145, 23, 31;
    --yellow-rgb: 255, 190, 10;
    --accent-red-rgb: 199, 32, 40;
    --gray-rgb: 108, 109, 117;

    /* Gradients */
    --gradient-yellow: linear-gradient(135deg, #FFBE0A 0%, #FF9500 100%);
    --gradient-red: linear-gradient(135deg, #91171F 0%, #C72028 100%);
    --gradient-dark: linear-gradient(135deg, #050508 0%, #0D0D12 100%);
    --gradient-hero: linear-gradient(135deg,
        rgba(145, 23, 31, 0.9) 0%,
        rgba(5, 5, 8, 0.98) 40%,
        rgba(0, 240, 255, 0.15) 100%);

    /* Typographie */
    --font-display: 'Orbitron', 'Inter', sans-serif;
    --font-heading: 'Orbitron', 'Inter', sans-serif;
    --font-main: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, sans-serif;
    --font-mono: 'JetBrains Mono', 'Fira Code', 'Consolas', monospace;

    /* Espacement */
    --space-xs: 0.5rem;
    --space-sm: 1rem;
    --space-md: 2rem;
    --space-lg: 4rem;
    --space-xl: 7.5rem;

    /* Animations */
    --ease-smooth: cubic-bezier(0.4, 0, 0.2, 1);
    --ease-bounce: cubic-bezier(0.68, -0.55, 0.265, 1.55);

    /* Ombres */
    --shadow-sm: 0 2px 8px rgba(0,0,0,0.1);
    --shadow-md: 0 4px 16px rgba(0,0,0,0.12);
    --shadow-lg: 0 8px 32px rgba(0,0,0,0.16);
    --shadow-xl: 0 20px 60px rgba(0,0,0,0.24);
    --glow-yellow: 0 0 40px rgba(var(--yellow-rgb),0.4);
    --glow-red: 0 0 40px rgba(var(--red-rgb),0.4);
    --glow-accent: 0 0 40px rgba(var(--accent-red-rgb),0.5);

    /* Grille */
    --grid-line: rgba(var(--red-rgb),0.07);
    --nav-height: 80px;
}

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

html {
    scroll-behavior: smooth;
    -webkit-text-size-adjust: 100%;
}

body {
    font-family: var(--font-main);
    background: var(--primary-black);
    color: var(--white);
    font-size: 16px;
    line-height: 1.75;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    overflow-x: hidden;
    position: relative;
}

/* Grille HUD globale */
body::before {
    content: '';
    position: fixed;
    inset: 0;
    z-index: 0;
    pointer-events: none;
    background-image:
        linear-gradient(var(--grid-line) 1px, transparent 1px),
        linear-gradient(90deg, var(--grid-line) 1px, transparent 1px);
    background-size: 60px 60px;
    mask-image: radial-gradient(ellipse at 50% 50%, black 30%, transparent 70%);
    -webkit-mask-image: radial-gradient(ellipse at 50% 50%, black 30%, transparent 70%);
}

body > * {
    position: relative;
    z-index: 1;
}

img, svg {
    display: block;
    max-width: 100%;
}

a {
    color: inherit;
    text-decoration: none;
}

button {
    font: inherit;
    cursor: pointer;
    border: none;
    background: none;
    color: inherit;
}

ul, ol {
    list-style: none;
}

/* --- SCREEN READER ONLY --- */
.sr-only {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0,0,0,0);
    white-space: nowrap;
    border: 0;
}

/* --- FOCUS VISIBLE --- */
:focus-visible {
    outline: 3px solid var(--primary-yellow);
    outline-offset: 3px;
    border-radius: 4px;
}

:focus:not(:focus-visible) {
    outline: none;
}

/* --- SKIP TO CONTENT --- */
.skip-link {
    position: absolute;
    top: -100%;
    left: var(--space-sm);
    background: var(--primary-yellow);
    color: var(--primary-black);
    padding: var(--space-xs) var(--space-sm);
    border-radius: 0 0 8px 8px;
    font-weight: 700;
    font-size: 14px;
    z-index: 10000;
    transition: top 0.3s var(--ease-smooth);
    min-height: 44px;
    display: inline-flex;
    align-items: center;
}

.skip-link:focus {
    top: 0;
}

/* ==============================================
   LOADER — HUD System Boot
   ============================================== */
.loader {
    position: fixed;
    inset: 0;
    z-index: 9999;
    background: var(--primary-black);
    display: flex;
    align-items: center;
    justify-content: center;
    flex-direction: column;
    transition: opacity 0.8s var(--ease-smooth), visibility 0.8s;
}

.loader.loaded {
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
}

.loader-hud {
    position: relative;
    width: 200px;
    height: 200px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-direction: column;
}

.loader-ring {
    position: absolute;
    inset: 0;
    border: 2px solid transparent;
    border-top-color: var(--accent-red);
    border-radius: 50%;
    animation: spin 1.2s linear infinite;
}

.loader-ring:nth-child(2) {
    inset: 15px;
    border-top-color: var(--primary-yellow);
    animation-duration: 0.8s;
    animation-direction: reverse;
}

.loader-text {
    font-family: var(--font-display);
    font-size: 16px;
    font-weight: 700;
    letter-spacing: 0.2em;
    color: var(--primary-yellow);
    text-shadow: var(--glow-yellow);
}

.loader-progress {
    position: absolute;
    bottom: -40px;
    width: 150px;
    height: 2px;
    background: rgba(var(--red-rgb),0.2);
    border-radius: 2px;
    overflow: hidden;
}

.loader-progress-bar {
    height: 100%;
    width: 0;
    background: var(--gradient-red);
    animation: loadBar 2s var(--ease-smooth) forwards;
}

@keyframes loadBar {
    to { width: 100%; }
}

.loader-status {
    position: absolute;
    bottom: -60px;
    font-family: var(--font-display);
    font-size: 9px;
    letter-spacing: 0.3em;
    color: rgba(var(--yellow-rgb),0.6);
}

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

/* ==============================================
   ANIMATIONS — Scroll reveal
   ============================================== */
.reveal {
    opacity: 0;
    transform: translateY(40px);
    transition: opacity 0.8s var(--ease-smooth),
                transform 0.8s var(--ease-smooth);
    will-change: opacity, transform;
}

.reveal-left {
    opacity: 0;
    transform: translateX(-60px);
    transition: opacity 0.8s var(--ease-smooth),
                transform 0.8s var(--ease-smooth);
    will-change: opacity, transform;
}

.reveal-right {
    opacity: 0;
    transform: translateX(60px);
    transition: opacity 0.8s var(--ease-smooth),
                transform 0.8s var(--ease-smooth);
    will-change: opacity, transform;
}

.reveal.visible,
.reveal-left.visible,
.reveal-right.visible {
    opacity: 1;
    transform: none;
}

/* Staggered children */
.reveal-stagger > .reveal {
    transition-delay: calc(var(--stagger, 0) * 120ms);
}



/* SEO static content — présent dans le HTML source, masqué visuellement */
.seo-static-content {
    position: absolute;
    width: 1px;
    height: 1px;
    overflow: hidden;
    clip: rect(0 0 0 0);
    clip-path: inset(50%);
    white-space: nowrap;
    border: 0;
}
