@import url('https://fonts.googleapis.com/css2?family=Poppins:wght@300;400;500;600;700;800;900&display=swap');

:root {
    --bg-light: #f8fafc;
    --card-bg: rgba(255, 255, 255, 0.7);
    --accent-primary: #3b82f6;
    --accent-secondary: #8b5cf6;
    --text-main: #1e293b;
    --text-muted: #64748b;
    --border-color: rgba(0, 0, 0, 0.05);
    --mouse-x: 50%;
    --mouse-y: 50%;
}

body.dark-mode {
    --bg-light: #0f172a;
    --card-bg: rgba(30, 41, 59, 0.7);
    --text-main: #f1f5f9;
    --text-muted: #94a3b8;
    --border-color: rgba(255, 255, 255, 0.1);
}


* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Poppins', sans-serif;
}

body {
    background-color: var(--bg-light);
    color: var(--text-main);
    overflow-x: hidden;
}

/* Premium Scrollbar */
::-webkit-scrollbar {
    width: 8px;
}
::-webkit-scrollbar-track {
    background: var(--bg-light);
}
::-webkit-scrollbar-thumb {
    background: #e2e8f0;
    border-radius: 10px;
}
::-webkit-scrollbar-thumb:hover {
    background: var(--accent-primary);
}

/* Animated Mesh Background - AC Nova Style */
.mesh-bg {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: -1;
    background-color: var(--bg-light);
    overflow: hidden;
    pointer-events: none; /* Fix click issues */
}

.mesh-bg::before,
.mesh-bg::after {
    content: '';
    position: absolute;
    width: 800px;
    height: 800px;
    border-radius: 50%;
    filter: blur(120px);
    opacity: 0.15;
    z-index: -1;
    transition: transform 0.5s cubic-bezier(0.23, 1, 0.32, 1);
    pointer-events: none;
}

.mesh-bg::before {
    background: var(--accent-primary);
    top: var(--mouse-y);
    left: var(--mouse-x);
    transform: translate(-50%, -50%);
}

.mesh-bg::after {
    background: var(--accent-secondary);
    top: calc(100% - var(--mouse-y));
    left: calc(100% - var(--mouse-x));
    transform: translate(-50%, -50%);
}


/* Glassmorphism Cards - Nova Style */
.nova-card {
    background: var(--card-bg);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border: 1px solid var(--border-color);
    border-radius: 32px;
    transition: all 0.5s cubic-bezier(0.23, 1, 0.32, 1);
    position: relative;
    box-shadow: 0 4px 30px rgba(0, 0, 0, 0.03);
}

.nova-card:hover {
    transform: translateY(-10px) scale(1.02);
    border-color: rgba(59, 130, 246, 0.3);
    box-shadow: 0 30px 60px rgba(0, 0, 0, 0.12);
}

.dark-mode .nova-card {
    background: rgba(15, 23, 42, 0.6);
    box-shadow: 0 4px 30px rgba(0, 0, 0, 0.3);
}

.dark-mode .nova-card:hover {
    border-color: rgba(139, 92, 246, 0.4);
    box-shadow: 0 30px 60px rgba(0, 0, 0, 0.5);
}


/* Buttons - Nova Style */
.btn-nova {
    background: linear-gradient(135deg, var(--accent-primary), var(--accent-secondary));
    color: white;
    padding: 16px 36px;
    border-radius: 50px;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 1.5px;
    font-size: 0.85rem;
    border: none;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 10px 25px rgba(59, 130, 246, 0.3);
    display: inline-flex;
    align-items: center;
    gap: 12px;
    text-decoration: none;
    position: relative;
    z-index: 10; /* Ensure buttons are clickable */
}

.btn-nova:hover {
    transform: translateY(-2px);
    box-shadow: 0 15px 35px rgba(59, 130, 246, 0.4);
}

.btn-nova.btn-white {
    background: white !important;
    color: var(--text-main) !important;
    border: 1px solid var(--border-color);
}

.btn-nova:active {
    transform: scale(0.95);
}

/* Typography & Colors */
.text-gradient {
    background: linear-gradient(135deg, var(--accent-primary), var(--accent-secondary));
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
}

.status-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: #10b981;
    box-shadow: 0 0 10px #10b981;
}

/* Animations */
@keyframes slideUp {
    from { opacity: 0; transform: translateY(40px); }
    to { opacity: 1; transform: translateY(0); }
}

@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

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

@keyframes shimmer {
    0% { background-position: -200% 0; }
    100% { background-position: 200% 0; }
}

.animate-nova {
    opacity: 0;
    animation: slideUp 1s cubic-bezier(0.23, 1, 0.32, 1) forwards;
}

.delay-100 { animation-delay: 0.1s; }
.delay-200 { animation-delay: 0.2s; }
.delay-300 { animation-delay: 0.3s; }
.delay-400 { animation-delay: 0.4s; }
.delay-500 { animation-delay: 0.5s; }

.animate-float {
    animation: float 6s ease-in-out infinite;
}

/* Button Shimmer Effect */
.btn-nova {
    position: relative;
    overflow: hidden;
}

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

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

/* Cursus Styles */
.roadmap-step {
    position: relative;
    padding-left: 50px;
}

.roadmap-step::before {
    content: '';
    position: absolute;
    left: 24px;
    top: 40px;
    width: 2px;
    height: 100%;
    background: linear-gradient(to bottom, var(--accent-primary), transparent);
}

.roadmap-step:last-child::before {
    display: none;
}

.roadmap-icon {
    position: absolute;
    left: 0;
    top: 0;
    width: 50px;
    height: 50px;
    border-radius: 15px;
    background: white;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.2rem;
    box-shadow: 0 10px 20px rgba(0,0,0,0.05);
    z-index: 2;
}

.dark-mode .roadmap-icon {
    background: #1e293b;
    box-shadow: 0 10px 20px rgba(0,0,0,0.3);
}

/* Status Bar Widget */
.status-widget {
    background: rgba(255, 255, 255, 0.5);
    padding: 8px 16px;
    border-radius: 12px;
    font-size: 0.7rem;
    font-weight: 800;
    display: flex;
    align-items: center;
    gap: 8px;
    border: 1px solid var(--border-color);
}

.dark-mode .status-widget {
    background: rgba(15, 23, 42, 0.5);
}

/* Theme Toggle */
.theme-toggle {
    width: 44px;
    height: 44px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    background: var(--card-bg);
    border: 1px solid var(--border-color);
    color: var(--text-main);
    transition: all 0.3s ease;
}

.theme-toggle:hover {
    transform: rotate(15deg);
    border-color: var(--accent-primary);
}

/* Map/Sector Grid */
.sector-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(100px, 1fr));
    gap: 15px;
}

.sector-item {
    aspect-ratio: 1;
    border-radius: 18px;
    background: var(--card-bg);
    border: 1px solid var(--border-color);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 8px;
    transition: all 0.3s ease;
    cursor: pointer;
}

.sector-item.active {
    background: linear-gradient(135deg, rgba(59, 130, 246, 0.1), rgba(139, 92, 246, 0.1));
    border-color: var(--accent-primary);
}

.sector-item.locked {
    opacity: 0.5;
    filter: grayscale(1);
    cursor: not-allowed;
}

.sector-item:hover:not(.locked) {
    transform: scale(1.1);
    background: white;
    box-shadow: 0 10px 30px rgba(0,0,0,0.05);
}

.dark-mode .sector-item:hover:not(.locked) {
    background: #1e293b;
}

/* Smooth Scrolling */
html {
    scroll-behavior: smooth;
}

/* PREMIUM "WOW" EFFECTS */

@property --angle {
    syntax: '<angle>';
    initial-value: 0deg;
    inherits: false;
}

.btn-insane {
    position: relative;
    background: linear-gradient(90deg, var(--accent-primary), var(--accent-secondary), var(--accent-primary));
    background-size: 200% auto;
    color: white !important;
    padding: 20px 50px;
    border-radius: 50px;
    font-weight: 900;
    font-size: 1.2rem;
    text-transform: uppercase;
    letter-spacing: 2px;
    border: none;
    cursor: pointer;
    animation: gradientFlow 3s linear infinite;
    box-shadow: 0 0 20px rgba(59, 130, 246, 0.5), inset 0 0 20px rgba(255, 255, 255, 0.2);
    overflow: hidden;
    transition: all 0.3s cubic-bezier(0.25, 0.8, 0.25, 1);
    z-index: 10;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    text-decoration: none;
}

.btn-insane:hover {
    transform: scale(1.05) translateY(-5px);
    box-shadow: 0 0 40px rgba(139, 92, 246, 0.8), inset 0 0 20px rgba(255, 255, 255, 0.4);
    letter-spacing: 3px;
}

.btn-insane::before {
    content: '';
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: radial-gradient(circle, rgba(255,255,255,0.3) 0%, transparent 60%);
    opacity: 0;
    transform: scale(0.5);
    transition: all 0.5s ease;
    pointer-events: none;
}

.btn-insane:hover::before {
    opacity: 1;
    transform: scale(1);
    animation: rotate 2s linear infinite;
}

@keyframes gradientFlow {
    0% { background-position: 0% center; }
    100% { background-position: 200% center; }
}

@keyframes rotate {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* Glowing text effect for hero */
.text-glow {
    text-shadow: 0 0 20px rgba(59, 130, 246, 0.5), 0 0 40px rgba(139, 92, 246, 0.3);
    animation: pulseText 3s infinite alternate;
}
.dark-mode .text-glow {
    text-shadow: 0 0 30px rgba(59, 130, 246, 0.8), 0 0 60px rgba(139, 92, 246, 0.6);
}

@keyframes pulseText {
    0% { filter: brightness(1); }
    100% { filter: brightness(1.3); }
}

/* Floating particles in background */
.particles-container {
    position: absolute;
    top: 0; left: 0; width: 100%; height: 100%;
    overflow: hidden;
    z-index: 0;
    pointer-events: none;
}

.particle {
    position: absolute;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--accent-primary), var(--accent-secondary));
    opacity: 0.3;
    animation: floatParticle linear infinite;
}

@keyframes floatParticle {
    0% { transform: translateY(100vh) scale(0); opacity: 0; }
    10% { opacity: 0.5; }
    90% { opacity: 0.5; }
    100% { transform: translateY(-100px) scale(1); opacity: 0; }
}

/* Enhance cards with glowing borders */
.glow-card {
    position: relative;
}
.glow-card::before {
    content: '';
    position: absolute;
    inset: -2px;
    border-radius: 34px;
    background: linear-gradient(45deg, var(--accent-primary), transparent, var(--accent-secondary), transparent);
    z-index: -1;
    opacity: 0;
    transition: opacity 0.5s ease;
    animation: rotateBorder 4s linear infinite;
    background-size: 200% 200%;
}
.glow-card:hover::before {
    opacity: 1;
}
@keyframes rotateBorder {
    0% { background-position: 0% 0%; }
    50% { background-position: 100% 100%; }
    100% { background-position: 0% 0%; }
}

/* --- Académie Jacques Vaucanson Premium Custom Background --- */
.hero-moulin {
    position: relative;
    background-image: linear-gradient(to bottom, rgba(15, 76, 129, 0.75), rgba(9, 38, 71, 0.85)), url('../school-bg.jpg');
    background-size: cover;
    background-position: center;
    background-attachment: fixed;
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 140px 24px 80px 24px;
}

.banner-moulin {
    background: linear-gradient(90deg, #1e70e5, #00c6ff);
    color: white;
    font-weight: 700;
    text-align: center;
    padding: 12px 24px;
    font-size: 0.95rem;
    box-shadow: 0 4px 15px rgba(30, 112, 229, 0.2);
    letter-spacing: 0.5px;
    z-index: 40;
    position: relative;
}

.card-moulin {
    background: #f4f6fa;
    border-radius: 40px;
    padding: 64px 48px;
    box-shadow: 0 20px 50px rgba(0, 0, 0, 0.15);
    border: 1px solid rgba(255, 255, 255, 0.7);
    max-width: 720px;
    width: 100%;
    text-align: center;
    transform: translateY(0);
    transition: all 0.4s ease;
}

.card-moulin:hover {
    transform: translateY(-5px);
    box-shadow: 0 30px 60px rgba(0, 0, 0, 0.2);
}

/* Ribbon Badge for Announcement Card */
.announcement-container {
    position: relative;
    overflow: hidden;
}

.ribbon-new {
    position: absolute;
    top: 25px;
    right: -40px;
    background: #ff6b6b;
    color: white;
    font-size: 0.75rem;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 1px;
    padding: 6px 40px;
    transform: rotate(45deg);
    box-shadow: 0 4px 10px rgba(255, 107, 107, 0.3);
    z-index: 10;
}

/* Floating contact widgets (bottom right, like screenshot) */
.floating-contact-container {
    position: fixed;
    bottom: 30px;
    right: 30px;
    display: flex;
    flex-direction: column;
    gap: 15px;
    z-index: 100;
}

.floating-contact-btn {
    width: 56px;
    height: 56px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 1.4rem;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.15);
    transition: all 0.3s cubic-bezier(0.23, 1, 0.32, 1);
    cursor: pointer;
    text-decoration: none;
}

.floating-contact-btn:hover {
    transform: scale(1.1) translateY(-3px);
    box-shadow: 0 12px 30px rgba(0, 0, 0, 0.25);
}

.floating-phone {
    background-color: #00c98e;
}

.floating-email {
    background-color: #1e88e5;
}


