/**
 * Home Page Styles - Pentathlonmag.com
 * Modern design with glassmorphism and smooth animations
 * Version: 2.0
 */

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

:root {
    /* Color Palette - Logo Colors */
    --primary-gradient: linear-gradient(135deg, #1e3a8a 0%, #2563eb 100%);
    /* Dark Blue to Blue */
    --secondary-gradient: linear-gradient(135deg, #3b82f6 0%, #60a5fa 100%);
    /* Blue to Light Blue */
    --success-gradient: linear-gradient(135deg, #059669 0%, #34d399 100%);

    /* Spacing */
    --section-padding: 4rem 0;
    --card-padding: 1.5rem;

    /* Border Radius */
    --radius-sm: 0.5rem;
    --radius-md: 1rem;
    --radius-lg: 1.25rem;
    --radius-xl: 1.5rem;

    /* Shadows */
    --shadow-sm: 0 2px 8px rgba(0, 0, 0, 0.1);
    --shadow-md: 0 10px 30px rgba(0, 0, 0, 0.1);
    --shadow-lg: 0 20px 40px rgba(0, 0, 0, 0.2);
    --shadow-xl: 0 25px 50px rgba(0, 0, 0, 0.3);

    /* Transitions */
    --transition-base: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    --transition-slow: all 0.6s cubic-bezier(0.4, 0, 0.2, 1);
}

/* ========================================
   BASE STYLES
   ======================================== */
html {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
    scroll-behavior: smooth;
}

body {
    background: #ffffff !important;
    margin: 0 !important;
    padding: 0;
    overflow-x: hidden;
    font-family: 'Inter', sans-serif !important;
}

/* ========================================
   ANIMATED BACKGROUND
   ======================================== */
.animated-bg {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(180deg, #f0f4ff 0%, #ffffff 100%);
    z-index: -2;
}

/*
.animated-bg::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-image:
        radial-gradient(circle at 20% 80%, rgba(30, 58, 138, 0.08) 0%, transparent 50%),
        radial-gradient(circle at 80% 20%, rgba(59, 130, 246, 0.08) 0%, transparent 50%),
        radial-gradient(circle at 40% 40%, rgba(37, 99, 235, 0.06) 0%, transparent 50%);
    animation: float 8s ease-in-out infinite;
}*/

@keyframes float {

    0%,
    100% {
        transform: translateY(0px) scale(1);
    }

    50% {
        transform: translateY(-30px) scale(1.05);
    }
}

/* ========================================
   GLASS MORPHISM
   ======================================== */
.glass {
    background: rgba(255, 255, 255, 0.95) !important;
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.18);
    box-shadow: var(--shadow-md);
}

.glass-dark {
    background: rgba(0, 0, 0, 0.6) !important;
    backdrop-filter: blur(15px);
    -webkit-backdrop-filter: blur(15px);
    border: 1px solid rgba(255, 255, 255, 0.1);
    box-shadow: var(--shadow-lg);
}

/* ========================================
   MAIN CONTENT WRAPPER
   ======================================== */
.main-content-wrapper {
    position: relative;
    z-index: 1;
    margin-left: 0 !important;
    transition: margin-left 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    background: transparent;
    min-height: 100vh;
    width: 100%;
}

/* ========================================
   HERO SECTION
   ======================================== */
.hero-section {
    position: relative;
    min-height: 700px;
    display: flex;
    align-items: center;
    overflow: hidden;
    border-radius: 30px;
    margin: 0 30px 30px 30px;  /* no top margin → flush with nav */
    box-shadow: 0 30px 80px rgba(0, 0, 0, 0.15);
    background-size: cover;
    background-position: center;
    background-color: #1a1a2e;
}

.hero-section::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    height: 150px;
    background: linear-gradient(to top, rgba(0, 0, 0, 0.8), transparent);
    z-index: 1;
}

/* ── Fondu haut : fondu du menu sombre vers le hero ─────────── */
.hero-section::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 140px;
    background: linear-gradient(
        to bottom,
        rgba(10, 14, 28, 0.85) 0%,
        rgba(10, 14, 28, 0.35) 40%,
        transparent 100%
    );
    z-index: 2;
    pointer-events: none;
    border-radius: 30px 30px 0 0;
}

.hero-particles {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-image:
        radial-gradient(circle at 20% 30%, rgba(255, 255, 255, 0.1) 0%, transparent 30%),
        radial-gradient(circle at 80% 70%, rgba(255, 255, 255, 0.08) 0%, transparent 30%),
        radial-gradient(circle at 50% 50%, rgba(102, 126, 234, 0.1) 0%, transparent 40%);
    animation: particles 15s ease-in-out infinite;
    z-index: 0;
}

@keyframes particles {

    0%,
    100% {
        opacity: 0.8;
        transform: scale(1) translateY(0px);
    }

    50% {
        opacity: 1;
        transform: scale(1.1) translateY(-20px);
    }
}

/* ========================================
   ENHANCED CARDS
   ======================================== */
.card-3d {
    background: rgba(255, 255, 255, 0.95) !important;
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border-radius: var(--radius-xl) !important;
    transition: var(--transition-base);
    transform-style: preserve-3d;
    border: 1px solid rgba(255, 255, 255, 0.18);
    box-shadow: var(--shadow-md);
}

.card-3d:hover {
    transform: translateY(-10px) rotateX(5deg);
    box-shadow: var(--shadow-lg);
}

.card-image-side {
    width: 150px;
    height: 100%;
    object-fit: cover;
    border-radius: var(--radius-xl) 0 0 var(--radius-xl);
}

.card-young-athlete {
    height: 300px;
    border-radius: var(--radius-xl);
    overflow: hidden;
}

.card-side {
    min-height: 120px;
    border-radius: var(--radius-xl);
}

/* ========================================
   TYPOGRAPHY
   ======================================== */
.section-title {
    background: var(--primary-gradient);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    position: relative;
    font-weight: 900 !important;
}

.section-title::after {
    content: '';
    position: absolute;
    bottom: -10px;
    left: 0;
    width: 80px;
    height: 4px;
    background: var(--primary-gradient);
    border-radius: 2px;
}

/* ========================================
   BUTTONS
   ======================================== */
.btn-glow {
    position: relative;
    overflow: hidden;
    transition: var(--transition-base);
    font-weight: 700 !important;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.btn-glow::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 0;
    height: 0;
    background: rgba(255, 255, 255, 0.3);
    border-radius: 50%;
    transform: translate(-50%, -50%);
    transition: width 0.6s, height 0.6s;
}

.btn-glow:hover::before {
    width: 300px;
    height: 300px;
}

.btn-glow:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-lg);
}

/* ========================================
   PROMO BANNERS
   ======================================== */
.promo-banner {
    display: flex;
    align-items: center;
    justify-content: center;
    flex-direction: column;
    padding: 2rem;
    border-radius: var(--radius-xl) !important;
    text-align: center;
    min-height: 14rem;
    transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    position: relative;
    overflow: hidden;
    box-shadow: var(--shadow-md);
}

.promo-banner::before {
    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;
    opacity: 0;
}

.promo-banner:hover::before {
    animation: shimmer 0.6s ease-in-out;
}

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

    50% {
        opacity: 1;
    }

    100% {
        transform: translateX(100%) translateY(100%) rotate(45deg);
        opacity: 0;
    }
}

.promo-banner:hover {
    transform: translateY(-8px) scale(1.02);
    box-shadow: var(--shadow-lg);
}

.banner-calendar {
    background: linear-gradient(135deg, #1a202c 0%, #2d3748 100%) !important;
}

.banner-results {
    background: linear-gradient(135deg, #3b82f6 0%, #2563eb 100%) !important;
}

.banner-club {
    background: linear-gradient(135deg, #dc2626 0%, #b91c1c 100%) !important;
}

.banner-salle {
    background: linear-gradient(135deg, #38bdf8 0%, #0ea5e9 100%) !important;
}

/* ========================================
   TEAM SCROLL
   ======================================== */
.team-scroll-container {
    -ms-overflow-style: none;
    scrollbar-width: none;
    scroll-behavior: smooth;
}

.team-scroll-container::-webkit-scrollbar {
    display: none;
}

.athlete-card {
    transition: var(--transition-base);
    cursor: pointer;
}

.athlete-card:hover {
    transform: translateY(-5px);
}

.athlete-card img {
    transition: var(--transition-base);
}

.athlete-card:hover img {
    transform: scale(1.05);
    box-shadow: 0 15px 35px rgba(0, 0, 0, 0.3);
}

/* ========================================
   SOCIAL ICONS
   ======================================== */
.social-icon {
    width: 60px;
    height: 60px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    transition: var(--transition-base);
    position: relative;
}

.social-icon::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    border-radius: 50%;
    background: inherit;
    opacity: 0.3;
    transform: scale(1);
    transition: var(--transition-base);
}

.social-icon:hover::before {
    transform: scale(1.3);
    opacity: 0;
}

.social-icon:hover {
    transform: translateY(-3px);
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.2);
}

/* ========================================
   LIST ARTICLES
   ======================================== */
.list-article {
    transition: all 0.2s ease;
    cursor: pointer;
    border-radius: var(--radius-md);
}

.list-article:hover {
    background: linear-gradient(135deg, rgba(102, 126, 234, 0.1) 0%, rgba(118, 75, 162, 0.1) 100%);
    transform: translateX(5px);
}

.list-article:hover .list-title {
    color: #667eea;
}

/* ========================================
   ANIMATIONS
   ======================================== */
.animate-in {
    animation: slideInUp 0.6s ease-out forwards;
}

@keyframes slideInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }

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

/* Loading state */
body:not(.loaded) .card-3d,
body:not(.loaded) .promo-banner {
    opacity: 0;
    transform: translateY(20px);
}

body.loaded .card-3d,
body.loaded .promo-banner {
    opacity: 1;
    transform: translateY(0);
    transition: opacity 0.6s ease, transform 0.6s ease;
}

/* ========================================
   RESPONSIVE DESIGN
   ======================================== */
@media (max-width: 640px) {
    .card-side figure {
        display: none;
    }

    .hero-section {
        margin: 0 15px 15px 15px;
        border-radius: 20px;
        min-height: 550px;
    }

    .hero-section::after {
        height: 100px;
    }

    .section-title {
        font-size: 2rem !important;
    }

    /* Hero responsive adjustments */
    .hero-section .max-w-4xl h1 {
        font-size: 3.5rem !important;
    }

    .hero-section .max-w-4xl h1 span:last-child {
        font-size: 2.5rem !important;
    }

    .hero-section .max-w-4xl p {
        font-size: 1.125rem !important;
    }

    .hero-section nav {
        flex-direction: column;
        width: 100%;
    }

    .hero-section nav a {
        width: 100%;
        justify-content: center;
    }

    /* Stats mobile - maintenant en dehors du hero */
    section .glass {
        min-width: 150px;
    }
}

/* ========================================
   ACCESSIBILITY
   ======================================== */
.btn-glow:focus,
.promo-banner:focus,
.card-3d:focus {
    outline: 2px solid #667eea;
    outline-offset: 2px;
}

/* Reduce motion for users who prefer it */
@media (prefers-reduced-motion: reduce) {

    *,
    *::before,
    *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
}

/* ========================================
   BADGE STYLES
   ======================================== */
.badge-yellow-400 {
    background: #facc15;
    color: #1f2937;
    font-weight: 700;
}

/* Enhanced scrollbar for webkit browsers */
.team-scroll-container::-webkit-scrollbar {
    height: 6px;
}

.team-scroll-container::-webkit-scrollbar-track {
    background: rgba(255, 255, 255, 0.1);
    border-radius: 3px;
}

.team-scroll-container::-webkit-scrollbar-thumb {
    background: rgba(255, 255, 255, 0.3);
    border-radius: 3px;
}

.team-scroll-container::-webkit-scrollbar-thumb:hover {
    background: rgba(255, 255, 255, 0.5);
}

/* ========================================
   HERO CAROUSEL
   ======================================== */
.hero-carousel {
    position: relative;
}

.hero-slides {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    border-radius: 30px;
    overflow: hidden;
}

.hero-slide {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-size: cover;
    background-position: center;
    opacity: 0;
    transition: opacity 1.2s cubic-bezier(0.4, 0, 0.2, 1), transform 1.2s cubic-bezier(0.4, 0, 0.2, 1);
    pointer-events: none;
    transform: scale(1.05);
}

.hero-slide.active {
    opacity: 1;
    pointer-events: auto;
    z-index: 1;
    transform: scale(1);
}

.hero-slide::before {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(135deg, rgba(26, 26, 46, 0.8) 0%, rgba(26, 26, 46, 0.4) 50%, rgba(0, 0, 0, 0.6) 100%);
    z-index: 1;
}

/* Navigation désactivée - utiliser uniquement les indicateurs */

.hero-indicators {
    position: absolute;
    bottom: 40px;
    left: 50%;
    transform: translateX(-50%);
    z-index: 10;
    display: flex;
    gap: 10px;
    background: rgba(0, 0, 0, 0.3);
    backdrop-filter: blur(10px);
    padding: 12px 20px;
    border-radius: 50px;
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.hero-indicator {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.3);
    border: none;
    cursor: pointer;
    transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

.hero-indicator.active {
    background: linear-gradient(135deg, #facc15 0%, #fbbf24 100%);
    width: 35px;
    border-radius: 5px;
    box-shadow: 0 4px 15px rgba(251, 191, 36, 0.5);
}

.hero-indicator:hover:not(.active) {
    background: rgba(255, 255, 255, 0.5);
    transform: scale(1.3);
}

@media (max-width: 768px) {
    .hero-indicators {
        bottom: 25px;
        padding: 8px 15px;
    }
}

/* ========================================
   EVENTS CAROUSEL & FILTERS
   ======================================== */
.event-filter {
    cursor: pointer;
    transition: all 0.3s ease;
}

.event-filter.active {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%) !important;
    color: white !important;
    box-shadow: 0 4px 15px rgba(102, 126, 234, 0.4);
}

.event-card {
    transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

.event-card.hidden {
    opacity: 0;
    transform: scale(0.8);
    height: 0;
    overflow: hidden;
    margin: 0;
    padding: 0;
}

/* ========================================
   TESTIMONIALS
   ======================================== */
.testimonial-card {
    transition: all 0.4s ease;
    border: 2px solid transparent;
}

.testimonial-card:hover {
    transform: translateY(-10px);
    border-color: rgba(102, 126, 234, 0.3);
    box-shadow: 0 20px 40px rgba(102, 126, 234, 0.2);
}

.trust-indicator {
    opacity: 0;
    transform: translateY(30px);
    animation: fadeInUp 0.6s ease forwards;
}

.trust-indicator:nth-child(1) {
    animation-delay: 0.1s;
}

.trust-indicator:nth-child(2) {
    animation-delay: 0.2s;
}

.trust-indicator:nth-child(3) {
    animation-delay: 0.3s;
}

.trust-indicator:nth-child(4) {
    animation-delay: 0.4s;
}

/* ========================================
   ENHANCED ANIMATIONS
   ======================================== */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }

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

@keyframes fadeIn {
    from {
        opacity: 0;
    }

    to {
        opacity: 1;
    }
}

@keyframes slideUp {
    from {
        opacity: 0;
        transform: translateY(40px);
    }

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

@keyframes scaleIn {
    from {
        opacity: 0;
        transform: scale(0.9);
    }

    to {
        opacity: 1;
        transform: scale(1);
    }
}



.animate-scale-in {
    animation: scaleIn 0.6s ease forwards;
}

/* ========================================
   NEWSLETTER SECTION
   ======================================== */
#newsletterForm input:focus {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(59, 130, 246, 0.25);
}

#newsletterForm button {
    position: relative;
    overflow: hidden;
}

#newsletterForm button::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 0;
    height: 0;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.3);
    transform: translate(-50%, -50%);
    transition: width 0.6s, height 0.6s;
}

#newsletterForm button:hover::after {
    width: 300px;
    height: 300px;
}

/* ========================================
   COUNTER ANIMATIONS
   ======================================== */
.counter-stat,
.counter-trust {
    font-variant-numeric: tabular-nums;
    transition: all 0.3s ease;
}

/* ========================================
   SCROLL REVEAL
   ======================================== */
.scroll-reveal {
    opacity: 0;
    transform: translateY(50px);
    transition: all 0.1s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

.scroll-reveal.revealed {
    opacity: 1;
    transform: translateY(0);
}

/* ========================================
   LOADING STATES
   ======================================== */
.skeleton {
    background: linear-gradient(90deg,
            rgba(255, 255, 255, 0.1) 25%,
            rgba(255, 255, 255, 0.2) 50%,
            rgba(255, 255, 255, 0.1) 75%);
    background-size: 200% 100%;
    animation: skeleton-loading 1.5s ease-in-out infinite;
}

@keyframes skeleton-loading {
    0% {
        background-position: 200% 0;
    }

    100% {
        background-position: -200% 0;
    }
}

/* ========================================
   MICRO-INTERACTIONS
   ======================================== */
.btn-glow:active {
    transform: scale(0.95);
}

.card-3d:active {
    transform: scale(0.98);
}

/* Ripple effect */
.ripple {
    position: relative;
    overflow: hidden;
}

.ripple::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 0;
    height: 0;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.5);
    transform: translate(-50%, -50%);
    transition: width 0.6s, height 0.6s;
}

.ripple:active::after {
    width: 300px;
    height: 300px;
}

/* ========================================
   PERFORMANCE OPTIMIZATIONS
   ======================================== */
.card-3d,
.promo-banner,
.athlete-card,
.event-card,
.testimonial-card {
    will-change: transform;
}

/* Hardware acceleration */
.hero-section,
.animated-bg,
.hero-slide {
    transform: translateZ(0);
    -webkit-transform: translateZ(0);
}

/* Optimize images */
img {
    image-rendering: -webkit-optimize-contrast;
    image-rendering: crisp-edges;
}

/* Smooth transitions */
* {
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

/* ========================================
   DARK MODE SUPPORT (Optional)
   ======================================== */
@media (prefers-color-scheme: dark) {
    /* Future dark mode implementation */
}

/* ========================================
   PRINT STYLES
   ======================================== */
@media print {

    .hero-nav,
    .hero-indicators,
    .event-filter,
    #newsletterForm,
    .social-icon {
        display: none !important;
    }

    .glass,
    .glass-dark {
        background: white !important;
        backdrop-filter: none !important;
    }
}