/* ========================================
   AYIRA MUSEUM - HOME PAGE STYLES
   public/css/home.css
   ✅ Compatible avec le système de thème clair/sombre COMPLET
   ======================================== */

:root {
    --primary-black: #000000;
    --secondary-black: #0a0a0a;
    --ayira-orange: #f39c12;
    --ayira-red: #d32f2f;
    --gold: #ffd700;
    --white: #ffffff;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Inter', sans-serif;
    overflow-x: hidden;
    background: var(--bg-primary, #000000);
    color: var(--text-color, #ffffff);
    transition: background 0.3s ease, color 0.3s ease;
}

/* ========================================
   THÈME CLAIR - Variables spécifiques
   ======================================== */
body.light-theme {
    --hero-bg: #ffffff;
    --hero-gradient-start: #ffffff;
    --hero-gradient-mid: #f5f5f5;
    --hero-gradient-end: #ffffff;
    --text-primary: #1a1a1a;
    --text-secondary: rgba(26, 26, 26, 0.7);
    --card-bg: rgba(0, 0, 0, 0.03);
    --card-border: rgba(243, 156, 18, 0.25);
    --neon-orb-opacity: 0.12;
    --grid-opacity: 0.25;
    --section-bg: #f8f9fa;
    --section-alt-bg: #ffffff;
    --glow-intensity: 0.3;
    --shadow-color: rgba(0, 0, 0, 0.1);
    --splash-orange: rgba(243, 156, 18, 0.85);
    --splash-red: rgba(211, 47, 47, 0.75);
    --splash-blue: rgba(30, 136, 229, 0.7);
    --splash-yellow: rgba(255, 215, 0, 0.8);
    --splash-opacity: 1;
    --splash-mix-mode: normal;
}

/* THÈME SOMBRE - Variables par défaut */
body:not(.light-theme) {
    --hero-bg: #000000;
    --hero-gradient-start: #000000;
    --hero-gradient-mid: #0a0505;
    --hero-gradient-end: #000000;
    --text-primary: #ffffff;
    --text-secondary: rgba(255, 255, 255, 0.8);
    --card-bg: rgba(255, 255, 255, 0.02);
    --card-border: rgba(243, 156, 18, 0.2);
    --neon-orb-opacity: 0.3;
    --grid-opacity: 0.5;
    --section-bg: #0a0505;
    --section-alt-bg: #000000;
    --glow-intensity: 1;
    --shadow-color: rgba(243, 156, 18, 0.4);
    --splash-orange: rgba(243, 156, 18, 0.6);
    --splash-red: rgba(255, 80, 60, 0.5);
    --splash-blue: rgba(30, 200, 255, 0.45);
    --splash-yellow: rgba(255, 230, 50, 0.55);
    --splash-opacity: 0.85;
    --splash-mix-mode: screen;
}

html, body {
    margin: 0;
    padding: 0;
    border: 0;
}

.main-content {
    margin-top: 0;
    padding-top: 0;
}

/* ========================================
   HERO SECTION
   ======================================== */

.hero-immersive {
    position: relative;
    min-height: 100vh;
    padding-top: 80px;
    background: var(--hero-bg);
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    transition: background 0.3s ease;
}

/* ========================================
   LUMIÈRES NÉON
   ======================================== */

.neon-lights {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 2;
    pointer-events: none;
}

.neon-orb {
    position: absolute;
    border-radius: 50%;
    filter: blur(80px);
    animation: float 8s ease-in-out infinite;
    opacity: var(--neon-orb-opacity);
    transition: opacity 0.3s ease;
}

.neon-orb.orange {
    width: 400px;
    height: 400px;
    background: radial-gradient(circle, rgba(243, 156, 18, 0.3), transparent);
    top: 10%;
    left: 10%;
    animation-delay: 0s;
}

.neon-orb.red {
    width: 350px;
    height: 350px;
    background: radial-gradient(circle, rgba(211, 47, 47, 0.2), transparent);
    bottom: 20%;
    right: 15%;
    animation-delay: 2s;
}

.neon-orb.gold {
    width: 300px;
    height: 300px;
    background: radial-gradient(circle, rgba(255, 215, 0, 0.2), transparent);
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    animation-delay: 4s;
}

body.light-theme .neon-orb.orange {
    background: radial-gradient(circle, rgba(243, 156, 18, 0.12), transparent);
}

body.light-theme .neon-orb.red {
    background: radial-gradient(circle, rgba(211, 47, 47, 0.08), transparent);
}

body.light-theme .neon-orb.gold {
    background: radial-gradient(circle, rgba(255, 215, 0, 0.08), transparent);
}

@keyframes float {
    0%, 100% { transform: translateY(0px); }
    50%       { transform: translateY(-30px); }
}

/* ========================================
   HERO LAYOUT
   ======================================== */

.hero-layout {
    display: flex;
    align-items: center;
    justify-content: space-between;
    width: 100%;
    max-width: 1400px;
    padding: 0 4rem;
    position: relative;
    z-index: 10;
}

.hero-left {
    flex: 0 0 520px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.hero-right {
    flex: 1;
    display: flex;
    justify-content: flex-end;
    padding-left: 4rem;
}

.hero-content {
    text-align: right;
    max-width: 700px;
}

/* ========================================
   HERO VISUAL WRAPPER
   Paint-splash + canvas 3D groupés ensemble
   pour rester parfaitement centrés à toute taille
   ======================================== */

.hero-visual-wrapper {
    position: relative;
    width: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
}

/* ── Paint splash ── */
.paint-splash-img {
    width: 100%;
    height: auto;
    display: block;
    border-radius: 50%;
    animation: splashPulse 6s ease-in-out infinite;
    pointer-events: none;
    user-select: none;
}

body:not(.light-theme) .paint-splash-img {
    opacity: 0.43;
    mix-blend-mode: screen;
    filter: blur(1.5px) brightness(1.1) saturate(1.5);
}

body.light-theme .paint-splash-img {
    opacity: 0;
    mix-blend-mode: multiply;
    filter: blur(0.5px) saturate(1.3) brightness(0.95);
}

@keyframes splashPulse {
    0%, 100% { transform: scale(1)    rotate(0deg);   }
    33%       { transform: scale(1.03) rotate(0.5deg); }
    66%       { transform: scale(0.98) rotate(-0.5deg);}
}

/* ── Canvas 3D : centré exactement sur le splash ── */
.lion-3d-container {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 90%;
    aspect-ratio: 1 / 1;
    z-index: 4;
}

#lion-canvas {
    width: 100%;
    height: 100%;
    cursor: pointer;
    opacity: 0;
    transition: opacity 1s ease-in-out, filter 0.3s ease;
    will-change: transform;
}

#lion-canvas.loaded { opacity: 1; }

body.light-theme #lion-canvas {
    filter: brightness(1.1) contrast(1.05);
}

/* ========================================
   HERO TITLE
   ======================================== */

.hero-title {
    font-family: 'Cinzel', serif;
    font-size: 6rem;
    font-weight: 700;
    background: linear-gradient(135deg, var(--ayira-orange), var(--gold), var(--ayira-red));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    margin-bottom: 1rem;
    transition: all 0.3s ease;
}

body:not(.light-theme) .hero-title {
    text-shadow: 0 0 40px rgba(243, 156, 18, 0.5);
    filter: drop-shadow(0 0 20px rgba(243, 156, 18, 0.5));
    animation: titleGlow 2s ease-in-out infinite alternate;
}

body.light-theme .hero-title {
    text-shadow: 0 0 15px rgba(243, 156, 18, 0.15);
    filter: drop-shadow(0 0 8px rgba(243, 156, 18, 0.2));
    animation: titleGlowLight 2s ease-in-out infinite alternate;
}

@keyframes titleGlow {
    from { filter: drop-shadow(0 0 20px rgba(243, 156, 18, 0.5)); }
    to   { filter: drop-shadow(0 0 40px rgba(243, 156, 18, 0.8)); }
}

@keyframes titleGlowLight {
    from { filter: drop-shadow(0 0 5px  rgba(243, 156, 18, 0.2));  }
    to   { filter: drop-shadow(0 0 12px rgba(243, 156, 18, 0.35)); }
}

/* ========================================
   HERO SUBTITLE & DESCRIPTION
   ======================================== */

.hero-subtitle {
    font-family: 'Cinzel', serif;
    font-size: 2rem;
    color: var(--gold);
    margin-bottom: 2rem;
    letter-spacing: 4px;
}

body.light-theme .hero-subtitle {
    color: var(--ayira-orange);
    font-weight: 600;
}

.hero-description {
    font-size: 1.2rem;
    line-height: 1.8;
    color: var(--text-secondary);
    margin-bottom: 3rem;
    transition: color 0.3s ease;
}

/* ========================================
   CTA BUTTON
   ======================================== */

.cta-button {
    display: inline-flex;
    align-items: center;
    gap: 1rem;
    padding: 1.5rem 3rem;
    font-size: 1.2rem;
    font-weight: 600;
    color: #000;
    background: linear-gradient(135deg, var(--ayira-orange), var(--gold));
    border: none;
    border-radius: 50px;
    text-decoration: none;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 0 30px rgba(243, 156, 18, 0.5);
    position: relative;
    overflow: hidden;
}

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

.cta-button:hover::before { left: 100%; }

.cta-button:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 35px rgba(243, 156, 18, 0.7), 0 0 40px rgba(211, 47, 47, 0.4);
}

body.light-theme .cta-button:hover {
    box-shadow: 0 8px 35px rgba(243, 156, 18, 0.5), 0 0 30px rgba(211, 47, 47, 0.3);
}

/* ========================================
   SCROLL INDICATOR
   ======================================== */

.scroll-indicator {
    position: absolute;
    bottom: 3rem;
    left: 50%;
    transform: translateX(-50%);
    z-index: 10;
}

.scroll-mouse {
    width: 30px;
    height: 50px;
    border: 2px solid var(--ayira-orange);
    border-radius: 20px;
    position: relative;
}

.scroll-wheel {
    width: 4px;
    height: 10px;
    background: var(--ayira-orange);
    border-radius: 2px;
    position: absolute;
    top: 8px;
    left: 50%;
    transform: translateX(-50%);
    animation: scrollWheel 1.5s ease-in-out infinite;
}

@keyframes scrollWheel {
    0%   { top: 8px;  opacity: 1; }
    100% { top: 25px; opacity: 0; }
}

/* ========================================
   COLLECTIONS SECTION
   ======================================== */

.collections-section {
    padding: 5rem 2rem;
    background: var(--section-bg);
    transition: background 0.3s ease;
}

.collections-section:nth-child(even) {
    background: var(--section-alt-bg);
}

body.light-theme .collections-section                    { background: #f8f9fa; }
body.light-theme .collections-section:nth-child(even)   { background: #ffffff; }
body:not(.light-theme) .collections-section              { background: #0a0505; }
body:not(.light-theme) .collections-section:nth-child(even) { background: #000000; }

.collections-container {
    max-width: 1400px;
    margin: 0 auto;
}

.collections-title {
    font-family: 'Cinzel', serif;
    font-size: 3rem;
    text-align: center;
    background: linear-gradient(135deg, var(--ayira-orange), var(--gold));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    margin-bottom: 4rem;
    opacity: 0;
    transform: translateY(30px);
    transition: all 0.8s ease-out;
}

body:not(.light-theme) .collections-title { filter: drop-shadow(0 0 20px rgba(243,156,18,0.4)); }
body.light-theme       .collections-title { filter: drop-shadow(0 0 8px  rgba(243,156,18,0.15)); }

.collections-title.visible {
    opacity: 1;
    transform: translateY(0);
}

/* ========================================
   COLLECTIONS GRID
   ======================================== */

.collections-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 2rem;
}

.collection-card {
    background: var(--card-bg);
    border: 1px solid var(--card-border);
    border-radius: 12px;
    padding: 0;
    text-align: center;
    cursor: pointer;
    overflow: hidden;
    opacity: 0;
    transform: translateY(50px) scale(0.95);
    transition: all 0.6s cubic-bezier(0.4, 0, 0.2, 1);
}

body.light-theme .collection-card {
    background: rgba(255,255,255,0.8);
    border: 1px solid rgba(243,156,18,0.2);
}

.collection-card.visible { opacity: 1; transform: translateY(0) scale(1); }
.collection-card:nth-child(1).visible { transition-delay: 0.1s; }
.collection-card:nth-child(2).visible { transition-delay: 0.2s; }
.collection-card:nth-child(3).visible { transition-delay: 0.3s; }

.collection-card:hover {
    transform: translateY(-10px) scale(1.02);
    border-color: var(--ayira-orange);
}

body:not(.light-theme) .collection-card:hover { box-shadow: 0 10px 40px rgba(243,156,18,0.3); }
body.light-theme       .collection-card:hover { box-shadow: 0 10px 40px rgba(243,156,18,0.2); }

.collection-image {
    width: 100%;
    height: 220px;
    object-fit: cover;
    transition: transform 0.5s ease;
}

.collection-card:hover .collection-image { transform: scale(1.1); }

.collection-info { padding: 2rem; }

.collection-title {
    font-family: 'Cinzel', serif;
    color: var(--ayira-orange);
    margin-bottom: 1rem;
    font-size: 1.5rem;
}

.collection-description {
    color: var(--text-secondary);
    line-height: 1.6;
    transition: color 0.3s ease;
}

body.light-theme .collection-description { color: rgba(26,26,26,0.7); }

/* ========================================
   PROFESSIONAL CATEGORY ICONS
   ======================================== */

.cat-icon-wrap {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 64px;
    height: 64px;
    border-radius: 16px;
    margin: 0 auto 1rem;
    background: linear-gradient(135deg, rgba(243,156,18,0.15), rgba(255,215,0,0.1));
    border: 1.5px solid rgba(243,156,18,0.25);
    transition: all 0.3s ease;
}

.collection-card:hover .cat-icon-wrap {
    background: linear-gradient(135deg, rgba(243,156,18,0.25), rgba(255,215,0,0.2));
    border-color: var(--ayira-orange);
    transform: scale(1.1);
    box-shadow: 0 4px 20px rgba(243,156,18,0.3);
}

.cat-icon-wrap svg {
    width: 32px;
    height: 32px;
    stroke: var(--ayira-orange);
    fill: none;
    stroke-width: 1.5;
    stroke-linecap: round;
    stroke-linejoin: round;
    transition: all 0.3s ease;
}

.collection-card:hover .cat-icon-wrap svg {
    stroke: var(--gold);
    filter: drop-shadow(0 0 6px rgba(243,156,18,0.6));
}

/* ========================================
   IMAGE UNAVAILABLE
   ======================================== */

.image-unavailable {
    width: 100%;
    height: 220px;
    display: flex !important;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    background: linear-gradient(135deg, rgba(243,156,18,0.05), rgba(255,215,0,0.03));
    color: rgba(243,156,18,0.4);
    font-size: 0.85rem;
}

.image-unavailable i { font-size: 2rem; }

/* ========================================
   EVENT CARDS - MÉTAVERSE
   ======================================== */

.event-card {
    position: relative;
    cursor: pointer;
    transition: all 0.4s cubic-bezier(0.4,0,0.2,1);
    overflow: hidden;
}

.event-card::before {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(135deg, rgba(102,126,234,0.2), rgba(118,75,162,0.2));
    opacity: 0;
    transition: opacity 0.4s ease;
    pointer-events: none;
    z-index: 1;
}

body.light-theme .event-card::before {
    background: linear-gradient(135deg, rgba(102,126,234,0.1), rgba(118,75,162,0.1));
}

.event-card:hover::before { opacity: 1; }
.event-card:hover { transform: translateY(-15px) scale(1.03); }

body:not(.light-theme) .event-card:hover { box-shadow: 0 25px 70px rgba(102,126,234,0.4);  }
body.light-theme       .event-card:hover { box-shadow: 0 25px 70px rgba(102,126,234,0.25); }

.event-card .collection-image {
    height: 350px;
    object-fit: cover;
    transition: transform 0.6s ease;
}

.event-card:hover .collection-image { transform: scale(1.1); }

.event-badge {
    position: absolute;
    top: 1rem; right: 1rem;
    background: linear-gradient(135deg, #ff6b35, #ff8c42);
    color: white;
    padding: 0.5rem 1rem;
    border-radius: 20px;
    font-size: 0.85rem;
    font-weight: 600;
    z-index: 10;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    box-shadow: 0 4px 15px rgba(255,107,53,0.3);
    animation: pulse 2s ease-in-out infinite;
}

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

.event-cta { animation: pulseOpacity 2s infinite; }

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

.event-card::after {
    content: '';
    position: absolute;
    top: -50%; left: -50%;
    width: 200%; height: 200%;
    background: linear-gradient(45deg, transparent 30%, rgba(255,255,255,0.1) 50%, transparent 70%);
    transform: rotate(45deg);
    transition: all 0.6s ease;
    pointer-events: none;
    z-index: 2;
}

body.light-theme .event-card::after {
    background: linear-gradient(45deg, transparent 30%, rgba(255,255,255,0.5) 50%, transparent 70%);
}

.event-card:hover::after { animation: shine 1.5s ease-in-out; }

@keyframes shine {
    0%   { transform: translateX(-100%) translateY(-100%) rotate(45deg); }
    100% { transform: translateX(100%)  translateY(100%)  rotate(45deg); }
}

/* ========================================
   RESPONSIVE
   ======================================== */

@media (max-width: 1200px) {
    .hero-layout  { padding: 0 2rem; }
    .hero-left    { flex: 0 0 440px; }
    .hero-title   { font-size: 4.5rem; }
    .hero-right   { padding-left: 2rem; }
}

@media (max-width: 1024px) {
    .hero-layout {
        flex-direction: column;
        text-align: center;
        padding: 4rem 2rem;
    }
    .hero-left    { flex: none; width: 360px; margin-bottom: 3rem; }
    .hero-right   { flex: none; padding-left: 0; }
    .hero-content { text-align: center; }
    .hero-title   { font-size: 3.5rem; }
}

@media (max-width: 768px) {
    .hero-left         { width: 300px; }
    .hero-title        { font-size: 2.5rem; }
    .hero-subtitle     { font-size: 1.5rem; }
    .hero-description  { font-size: 1rem; }
    .collections-title { font-size: 2rem; }
    .collection-image  { height: 180px; }
    .event-card .collection-image { height: 250px; }
    .event-badge       { font-size: 0.75rem; padding: 0.4rem 0.8rem; }
}

@media (max-width: 480px) {
    .hero-left  { width: 260px; }
    .hero-title { font-size: 2rem; }
    .cta-button { padding: 1.1rem 2rem; font-size: 1rem; }
}