@tailwind base;
@tailwind components;
@tailwind utilities;

:root {
    --primary: #8B0000;
    --secondary: #1E3A8A;
    --accent: #D4AF37;
    --deep-bordeaux: #4A0000;
    --cosmic-blue: #0F172A;
    --golden: #FFD700;
    --neon-glow: rgba(139, 0, 0, 0.6);
    --blue-glow: rgba(30, 58, 138, 0.6);
    --glass-bg: rgba(0, 0, 0, 0.2);
    --glass-border: rgba(212, 175, 55, 0.3);
    --glass-strong-bg: rgba(0, 0, 0, 0.3);
    --glass-strong-border: rgba(212, 175, 55, 0.4);
}

body {
    font-family: 'Inter', sans-serif;
    background: linear-gradient(135deg, 
        #000000 0%,
        #1a0000 20%,
        #4A0000 40%,
        #8B0000 60%,
        #1E3A8A 80%,
        #0F172A 100%
    );
    background-attachment: fixed;
    min-height: 100vh;
    color: white;
    position: relative;
}

body::before {
    content: '';
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: 
        radial-gradient(circle at 20% 80%, rgba(139, 0, 0, 0.2) 0%, transparent 50%),
        radial-gradient(circle at 80% 20%, rgba(30, 58, 138, 0.2) 0%, transparent 50%),
        radial-gradient(circle at 40% 40%, rgba(212, 175, 55, 0.15) 0%, transparent 50%),
        linear-gradient(45deg, transparent 30%, rgba(139, 0, 0, 0.1) 50%, transparent 70%);
    pointer-events: none;
    z-index: 0;
}

body::after {
    content: '';
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-image: 
        radial-gradient(circle at 10% 20%, rgba(139, 0, 0, 0.05) 0%, transparent 20%),
        radial-gradient(circle at 90% 80%, rgba(30, 58, 138, 0.05) 0%, transparent 20%),
        radial-gradient(circle at 50% 50%, rgba(212, 175, 55, 0.03) 0%, transparent 30%);
    pointer-events: none;
    z-index: 0;
}

main {
    position: relative;
    z-index: 1;
}

.glassmorphism {
    background: var(--glass-bg);
    backdrop-filter: blur(30px);
    border: 1px solid var(--glass-border);
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.6);
}

.glassmorphism:hover {
    background: rgba(0, 0, 0, 0.25);
    border-color: var(--accent);
    box-shadow: 0 12px 40px rgba(212, 175, 55, 0.4);
    transform: translateY(-2px);
}

.glassmorphism-strong {
    background: var(--glass-strong-bg);
    backdrop-filter: blur(40px);
    border: 1px solid var(--glass-strong-border);
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: 0 12px 40px rgba(0, 0, 0, 0.7);
}

.glassmorphism-strong:hover {
    border-color: var(--accent);
    box-shadow: 0 16px 48px rgba(212, 175, 55, 0.5);
}

.neon-text {
    background: linear-gradient(45deg, var(--primary), var(--secondary), var(--accent));
    background-clip: text;
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    text-shadow: 0 0 25px var(--neon-glow);
    animation: cosmic-shimmer 4s ease-in-out infinite;
}

.gradient-text {
    background: linear-gradient(45deg, var(--primary), var(--secondary), var(--accent));
    background-clip: text;
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    text-shadow: 0 0 20px var(--neon-glow);
}

@keyframes cosmic-shimmer {
    0%, 100% { filter: brightness(1) saturate(1); }
    50% { filter: brightness(1.4) saturate(1.5); }
}

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

.animate-fade-in {
    animation: fadeIn 1s cubic-bezier(0.4, 0, 0.2, 1) forwards;
}

.portfolio-card {
    transition: all 0.5s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
    overflow: hidden;
    animation: fadeIn 0.8s ease-out forwards;
    opacity: 0;
    background: linear-gradient(135deg, 
        rgba(139, 0, 0, 0.2) 0%,
        rgba(30, 58, 138, 0.2) 100%
    );
    border: 1px solid rgba(212, 175, 55, 0.3);
}

.portfolio-card:nth-child(1) { animation-delay: 0.1s; }

.portfolio-card:hover {
    transform: translateY(-15px) scale(1.03);
    box-shadow: 
        0 25px 50px rgba(139, 0, 0, 0.5),
        0 0 30px rgba(30, 58, 138, 0.4);
    background: linear-gradient(135deg, 
        rgba(139, 0, 0, 0.3) 0%,
        rgba(30, 58, 138, 0.3) 100%
    );
    border-color: var(--accent);
}

.portfolio-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(
        90deg,
        transparent,
        rgba(212, 175, 55, 0.4),
        transparent
    );
    transition: left 0.8s ease;
    pointer-events: none;
    z-index: 1;
}

.portfolio-card:hover::before {
    left: 100%;
}

.portfolio-card::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(45deg, 
        transparent 30%, 
        rgba(139, 0, 0, 0.2) 50%, 
        transparent 70%
    );
    opacity: 0;
    transition: opacity 0.5s ease;
    pointer-events: none;
    z-index: 1;
}

.portfolio-card:hover::after {
    opacity: 1;
}

/* Styles audio simplifiés et fonctionnels */
audio {
    width: 100%;
    margin: 10px 0;
    border-radius: 15px;
    background: linear-gradient(135deg, 
        rgba(139, 0, 0, 0.3) 0%,
        rgba(30, 58, 138, 0.3) 100%
    );
    border: 2px solid rgba(212, 175, 55, 0.4);
    position: relative;
    z-index: 10;
}

video {
    @apply rounded-lg;
    max-height: 360px;
    border: 3px solid rgba(212, 175, 55, 0.5);
}

.aspect-video {
    max-height: 360px;
    margin: 0 auto;
}

.partner-card {
    transition: all 0.5s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
    overflow: hidden;
    animation: fadeIn 0.8s ease-out forwards;
    opacity: 0;
    background: linear-gradient(135deg, 
        rgba(139, 0, 0, 0.2) 0%,
        rgba(30, 58, 138, 0.2) 100%
    );
    border: 1px solid rgba(212, 175, 55, 0.3);
}

.partner-card:hover {
    transform: translateY(-15px) scale(1.03);
    box-shadow: 
        0 25px 50px rgba(139, 0, 0, 0.5),
        0 0 30px rgba(30, 58, 138, 0.4);
    background: linear-gradient(135deg, 
        rgba(139, 0, 0, 0.3) 0%,
        rgba(30, 58, 138, 0.3) 100%
    );
    border-color: var(--accent);
}

.partner-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(
        90deg,
        transparent,
        rgba(212, 175, 55, 0.4),
        transparent
    );
    transition: left 0.8s ease;
    pointer-events: none;
    z-index: 1;
}

.partner-card:hover::before {
    left: 100%;
}

/* Boutons avec dégradés bordeaux-bleu */
.btn-gradient {
    background: linear-gradient(135deg, var(--primary) 0%, var(--secondary) 100%);
    border: none;
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
    box-shadow: 0 4px 15px rgba(139, 0, 0, 0.4);
}

.btn-gradient:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 25px rgba(139, 0, 0, 0.6);
}

.btn-gradient::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(212, 175, 55, 0.3), transparent);
    transition: left 0.6s ease;
}

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

/* Navigation avec effet bordeaux-bleu */
nav .glassmorphism {
    background: linear-gradient(135deg, 
        rgba(139, 0, 0, 0.25) 0%,
        rgba(30, 58, 138, 0.25) 100%
    );
    border: 1px solid rgba(212, 175, 55, 0.4);
}

nav .glassmorphism:hover {
    border-color: var(--accent);
    box-shadow: 0 8px 25px rgba(212, 175, 55, 0.5);
}

/* Effets cosmiques et espagnols */
.cosmic-accent::before {
    content: '⭐';
    position: absolute;
    top: -10px;
    right: -10px;
    font-size: 20px;
    opacity: 0.7;
    animation: cosmic-float 3s ease-in-out infinite;
}

.cosmic-accent::after {
    content: '🌙';
    position: absolute;
    bottom: -10px;
    left: -10px;
    font-size: 18px;
    opacity: 0.7;
    animation: cosmic-float 3s ease-in-out infinite reverse;
}

@keyframes cosmic-float {
    0%, 100% { transform: translateY(0px) rotate(0deg); }
    50% { transform: translateY(-10px) rotate(5deg); }
}

/* Cartes avec effets cosmiques */
.portfolio-card, .partner-card {
    position: relative;
}

.portfolio-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    border-radius: inherit;
    padding: 2px;
    background: linear-gradient(45deg, var(--primary), var(--secondary), var(--accent));
    mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
    mask-composite: exclude;
    opacity: 0;
    transition: opacity 0.3s ease;
    pointer-events: none;
    z-index: 1;
}

.portfolio-card:hover::before,
.partner-card:hover::before {
    opacity: 1;
}

@media (max-width: 768px) {
    .container {
        @apply px-4;
    }
}