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



:root {
    --primary-color: #0a0a1a;
    --secondary-color: #1a1a2e;
    --accent-color: #16213e;
    --chess-gold: #9037d4;
    --chess-silver: #c0c0c0;
    --ghost-purple: #9945ff;
    --ghost-cyan: #00d4ff;
    --neon-purple: #9945ff;
    --text-light: #ffffff;
    --text-muted: #b0b0b0;
    --text-dark: #0a0a1a;
    --gradient-primary: linear-gradient(135deg, #0a0a1a 0%, #16213e 30%, #1a1a2e 70%, #2d1b69 100%);
    --gradient-gold: linear-gradient(135deg, #d43769 0%, #0022ff 50%, #ffed4e 100%);
    --gradient-neon: linear-gradient(135deg, #9945ff 0%, #00d4ff 50%, #9945ff 100%);
    --shadow-premium: 0 20px 60px rgba(153, 69, 255, 0.3);
    --shadow-gold: 0 15px 40px rgba(212, 175, 55, 0.4);
    --glow-neon: 0 0 30px rgba(153, 69, 255, 0.6);
    --glow-purple: 0 0 25px rgba(153, 69, 255, 0.5);
    --border-glow: 1px solid rgba(153, 69, 255, 0.4);
}

body {
    font-family: 'Inter', 'SF Pro Display', -apple-system, sans-serif;
    line-height: 1.6;
    color: var(--text-light);
    overflow-x: hidden;
    background: var(--primary-color);
    scroll-behavior: smooth;
    width: 100%;
    max-width: 100vw;
    
}


/* Animations améliorées */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(40px) scale(0.95);
    }
    to {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

@keyframes float {
    0%, 100% { transform: translateY(0px) rotate(0deg); }
    25% { transform: translateY(-8px) rotate(2deg); }
    50% { transform: translateY(-15px) rotate(0deg); }
    75% { transform: translateY(-8px) rotate(-2deg); }
}

@keyframes chessFloat {
    0%, 100% { transform: translate(0px, 0px) rotate(0deg) scale(1); }
    20% { transform: translate(15px, -20px) rotate(10deg) scale(1.1); }
    40% { transform: translate(-10px, -30px) rotate(-5deg) scale(0.9); }
    60% { transform: translate(-20px, -15px) rotate(15deg) scale(1.05); }
    80% { transform: translate(5px, -25px) rotate(-10deg) scale(0.95); }
}

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

@keyframes counterGlow {
    0%, 100% { 
        box-shadow: 0 0 25px rgba(153, 69, 255, 0.4);
        border-color: rgba(153, 69, 255, 0.4);
    }
    50% { 
        box-shadow: 0 0 40px rgba(153, 69, 255, 0.7);
        border-color: rgba(153, 69, 255, 0.7);
    }
}

@keyframes shimmer {
    0% { transform: translateX(-100%); }
    100% { transform: translateX(100%); }
}

@keyframes rotateGlow {
    0% { filter: hue-rotate(0deg); }
    100% { filter: hue-rotate(360deg); }
}

/* Animation améliorée Queen's Gambit */
@keyframes queensGambitAppear {
    0% { 
        opacity: 0; 
        transform: scale(0.2) rotate(0deg) translateY(50px); 
        filter: blur(10px);
    }
    30% { 
        opacity: 0.9; 
        transform: scale(1.3) rotate(180deg) translateY(-10px); 
        filter: blur(0px);
    }
    70% { 
        opacity: 0.7; 
        transform: scale(0.8) rotate(270deg) translateY(-30px); 
        filter: blur(2px);
    }
    100% { 
        opacity: 0; 
        transform: scale(0.3) rotate(360deg) translateY(-100px); 
        filter: blur(15px);
    }
}

.queens-gambit-piece {
    position: fixed;
    font-size: 0.4rem;
    color: rgba(212, 55, 55, 0.507);
    animation: queensGambitAppear 12s ease-in-out infinite;
    pointer-events: none;
    z-index: 1;
    text-shadow: 0 0 15px rgba(212, 55, 55, 0.4);
    background: radial-gradient(circle, rgba(255, 0, 0, 0.1) 0%, transparent 70%);
    border-radius: 50%;
    padding: 10px;
}

/* Pluie de pièces améliorée */
@keyframes chessPieceRain {
    0% {
        transform: translateY(-100vh) rotate(0deg) scale(0.5);
        opacity: 0;
    }
    15% {
        opacity: 1;
        transform: translateY(-80vh) rotate(45deg) scale(1);
    }
    85% {
        opacity: 0.8;
        transform: translateY(80vh) rotate(315deg) scale(0.8);
    }
    100% {
        transform: translateY(120vh) rotate(360deg) scale(0.3);
        opacity: 0;
    }
}

.chess-rain {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    overflow: hidden;
    z-index: 9999;
}

.rain-piece {
    position: absolute;
    font-size: 1.8rem;
    color: rgba(153, 69, 255, 0.12);
    animation: chessPieceRain linear infinite;
    text-shadow: 0 0 15px rgba(12, 219, 98, 0.457);
    filter: drop-shadow(0 0 8px rgba(69, 255, 205, 0.2));
}

.animate-on-scroll {
    opacity: 0;
    transform: translateY(50px) scale(0.9);
    transition: all 1s cubic-bezier(0.4, 0, 0.2, 1);
}

.animate-on-scroll.animate {
    opacity: 1;
    transform: translateY(0) scale(1);
}

/* Arrière-plan dynamique amélioré */
.chess-background {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: -1;
    overflow: hidden;
}

.chess-piece {
    position: absolute;
    font-size: 2.5rem;
    color: rgba(153, 69, 255, 0.08);
    animation: chessFloat 12s ease-in-out infinite;
    text-shadow: 0 0 20px rgba(153, 69, 255, 0.15);
    filter: drop-shadow(0 0 10px rgba(153, 69, 255, 0.1));
}

.chess-piece:nth-child(1) { top: 5%; left: 8%; animation-delay: 0s; font-size: 3rem; }
.chess-piece:nth-child(2) { top: 15%; left: 85%; animation-delay: 2s; font-size: 2rem; }
.chess-piece:nth-child(3) { top: 65%; left: 12%; animation-delay: 4s; font-size: 2.8rem; }
.chess-piece:nth-child(4) { top: 85%; left: 75%; animation-delay: 6s; font-size: 2.2rem; }
.chess-piece:nth-child(5) { top: 35%; left: 92%; animation-delay: 1s; font-size: 2.6rem; }
.chess-piece:nth-child(6) { top: 75%; left: 35%; animation-delay: 3s; font-size: 3.2rem; }
.chess-piece:nth-child(7) { top: 25%; left: 45%; animation-delay: 5s; font-size: 1.8rem; }
.chess-piece:nth-child(8) { top: 55%; left: 65%; animation-delay: 7s; font-size: 2.4rem; }

/* Compteur de visites premium */
.visit-counter {
    position: fixed;
    bottom: 25px;
    left: 25px;
    z-index: 999;
    background: rgba(10, 10, 26, 0.95);
    backdrop-filter: blur(20px);
    padding: 1.5rem;
    border-radius: 20px;
    border: var(--border-glow);
    animation: counterGlow 4s ease-in-out infinite;
    min-width: 180px;
    text-align: center;
    position: relative;
    overflow: hidden;
}

.visit-counter::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 2px;
    background: var(--gradient-neon);
    animation: shimmer 2s infinite;
}

.visit-counter h4 {
    color: var(--ghost-purple);
    font-size: 0.95rem;
    margin-bottom: 0.8rem;
    text-shadow: var(--glow-neon);
    font-weight: 600;
    letter-spacing: 0.5px;
}

.visit-counter .count {
    font-size: 1.8rem;
    font-weight: 700;
    color: var(--text-light);
    text-shadow: 0 0 15px rgba(153, 69, 255, 0.6);
    font-family: 'SF Mono', monospace;
}

.visit-counter .icon {
    color: var(--ghost-purple);
    margin-right: 0.5rem;
    animation: pulse 2.5s infinite;
    font-size: 1.1rem;
}

/* Header premium */
.header {
    position: fixed;
    top: 0;
    width: 100%;
    max-width: 100vw;
    background: rgba(10, 10, 26, 0.95);
    backdrop-filter: blur(25px);
    z-index: 1000;
    padding: 1.2rem 0;
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    border-bottom: 1px solid rgba(153, 69, 255, 0.2);
}

.header.scrolled {
    background: rgba(10, 10, 26, 0.98);
    box-shadow: 0 5px 40px rgba(153, 69, 255, 0.15);
    border-bottom-color: rgba(153, 69, 255, 0.4);
}

.nav-container {
    max-width: 1400px;
    margin: 0 auto;
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0 1.5rem;
    width: 100%;
    box-sizing: border-box;
}

.logo {
    font-size: 1.8rem;
    font-weight: 800;
    color: var(--text-light);
    display: flex;
    align-items: center;
    gap: 0.6rem;
    letter-spacing: -0.5px;
    flex-shrink: 0;
}

.logo i {
    color: var(--chess-gold);
    animation: float 3s ease-in-out infinite;
    text-shadow: var(--shadow-gold);
    font-size: 2rem;
    filter: drop-shadow(0 0 10px rgba(157, 55, 212, 0.5));
}

.nav-menu {
    display: flex;
    list-style: none;
    gap: 2rem;
    margin: 0;
}

.nav-menu a {
    color: var(--text-light);
    text-decoration: none;
    transition: all 0.3s ease;
    position: relative;
    font-weight: 500;
    font-size: 1rem;
    letter-spacing: 0.3px;
    white-space: nowrap;
}

.nav-menu a:hover {
    color: var(--ghost-purple);
    text-shadow: var(--glow-neon);
    transform: translateY(-2px);
}

.nav-menu a::after {
    content: '';
    position: absolute;
    width: 0;
    height: 2px;
    bottom: -8px;
    left: 0;
    background: var(--gradient-neon);
    box-shadow: var(--glow-neon);
    transition: width 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

.nav-menu a:hover::after {
    width: 100%;
}

.mobile-menu-btn {
    display: none;
    color: var(--text-light);
    font-size: 1.8rem;
    cursor: pointer;
    transition: all 0.3s ease;
    background: none;
    border: none;
    padding: 0.5rem;
}

.mobile-menu-btn:hover {
    color: var(--ghost-purple);
    text-shadow: var(--glow-neon);
}

/* Hero Section premium */
.hero {
    min-height: 100vh;
    width: 100%;
    max-width: 100vw;
    background: var(--gradient-primary);
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    color: var(--text-light);
    position: relative;
    overflow: hidden;
    padding: 2rem 0;
    box-sizing: border-box;
}

.hero::before {
    content: '';
    position: absolute;
    width: 300%;
    height: 300%;
    background: url("data:image/svg+xml,%3Csvg width='80' height='80' viewBox='0 0 80 80' xmlns='http://www.w3.org/2000/svg'%3E%3Cg fill='none' fill-rule='evenodd'%3E%3Cg fill='%239945ff' fill-opacity='0.08'%3E%3Ccircle cx='40' cy='40' r='3'/%3E%3C/g%3E%3C/g%3E%3C/svg%3E");
    animation: float 30s linear infinite;
    opacity: 0.6;
}

.hero::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: 
        radial-gradient(circle at 25% 75%, rgba(153, 69, 255, 0.15) 0%, transparent 60%),
        radial-gradient(circle at 75% 25%, rgba(0, 212, 255, 0.12) 0%, transparent 65%),
        radial-gradient(circle at 50% 50%, rgba(153, 69, 255, 0.08) 0%, transparent 70%);
    pointer-events: none;
}

.hero-content {
    position: relative;
    z-index: 2;
    max-width: 900px;
    padding: 0 1.5rem;
    width: 100%;
    box-sizing: border-box;
}

.hero h1 {
    font-size: clamp(2.5rem, 8vw, 4.5rem);
    margin-bottom: 1.5rem;
    animation: fadeInUp 1s ease;
    background: var(--gradient-neon);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    font-weight: 900;
    line-height: 1.1;
    letter-spacing: -1px;
    text-shadow: none;
    word-wrap: break-word;
}

.hero p {
    font-size: clamp(1.1rem, 4vw, 1.4rem);
    margin-bottom: 2.5rem;
    animation: fadeInUp 1s ease 0.3s both;
    color: var(--text-muted);
    max-width: 600px;
    margin-left: auto;
    margin-right: auto;
    line-height: 1.6;
    font-weight: 400;
}

.cta-button {
    display: inline-block;
    background: var(--gradient-neon);
    color: var(--text-dark);
    padding: 1.2rem 2.5rem;
    text-decoration: none;
    border-radius: 50px;
    font-weight: 700;
    font-size: clamp(1rem, 3vw, 1.1rem);
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    animation: fadeInUp 1s ease 0.6s both;
    box-shadow: var(--shadow-premium);
    position: relative;
    overflow: hidden;
    letter-spacing: 0.5px;
    text-transform: uppercase;
    white-space: nowrap;
}

.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.6s ease;
}

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

.cta-button:hover {
    transform: translateY(-5px) scale(1.05);
    box-shadow: 0 15px 60px rgba(153, 69, 255, 0.4);
    text-shadow: 0 0 10px rgba(0, 0, 0, 0.3);
}

/* Sections générales améliorées */
.section {
    padding: 4rem 0;
    position: relative;
    width: 100%;
    max-width: 100vw;
    overflow-x: hidden;
}

.container {
    max-width: 1400px;
    margin: 0 auto;
        padding: 0 1.5rem;
        width: 100%;
    box-sizing: border-box;
}

.section-title {
    text-align: center;
    font-size: clamp(2rem, 6vw, 3rem);
    margin-bottom: 4rem;
    color: var(--text-light);
    position: relative;
    font-weight: 800;
    letter-spacing: -1px;
    background: linear-gradient(135deg, var(--text-light) 0%, var(--ghost-purple) 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    word-wrap: break-word;
    hyphens: auto;
}

.section-title::after {
    content: '';
    position: absolute;
    width: 120px;
    height: 4px;
    background: var(--gradient-neon);
    bottom: -15px;
    left: 50%;
    transform: translateX(-50%);
    box-shadow: var(--glow-neon);
    border-radius: 2px;
}

/* Section À propos premium */
.about {
    background: var(--secondary-color);
    position: relative;
}

.about::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: 
        url("data:image/svg+xml,%3Csvg width='60' height='60' viewBox='0 0 60 60' xmlns='http://www.w3.org/2000/svg'%3E%3Cg fill='none' fill-rule='evenodd'%3E%3Cg fill='%239945ff' fill-opacity='0.04'%3E%3Cpath d='M30 30c0-8.3-6.7-15-15-15s-15 6.7-15 15 6.7 15 15 15 15-6.7 15-15zm15 0c0-8.3-6.7-15-15-15s-15 6.7-15 15 6.7 15 15 15 15-6.7 15-15z'/%3E%3C/g%3E%3C/svg%3E"),
        radial-gradient(circle at 30% 70%, rgba(153, 69, 255, 0.05) 0%, transparent 60%);
    pointer-events: none;
}

.about-content {
    display: grid;
    grid-template-columns: 1fr;
    gap: 3rem;
    align-items: center;
    text-align: center;
}

.about-image {
    text-align: center;
    position: relative;
    z-index: 2;
}

.about-image i {
    font-size: clamp(6rem, 15vw, 10rem);
    color: var(--chess-gold);
    animation: float 4s ease-in-out infinite;
    text-shadow: var(--shadow-gold);
    filter: drop-shadow(0 0 30px rgba(212, 175, 55, 0.6));
}

.about-text {
    position: relative;
    z-index: 2;
}

.about-text h3 {
    font-size: clamp(1.8rem, 5vw, 2.5rem);
    margin-bottom: 1.5rem;
    color: var(--ghost-purple);
    text-shadow: var(--glow-neon);
    font-weight: 700;
    letter-spacing: -0.5px;
    text-align: center;
    word-wrap: break-word;
}

.about-text p {
    margin-bottom: 2rem;
    color: var(--text-muted);
    line-height: 1.8;
    font-size: clamp(1rem, 3vw, 1.2rem);
    font-weight: 400;
    text-align: left;
}

/* Section Lichess TV premium */
.lichess-tv {
    background: var(--primary-color);
    position: relative;
}

.lichess-tv::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: radial-gradient(circle at 50% 50%, rgba(153, 69, 255, 0.06) 0%, transparent 70%);
    pointer-events: none;
}

.tv-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 2rem;
    max-width: 1600px;
    margin: 0 auto;
    width: 100%;
}

.tv-container {
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    text-align: center;
    width: 100%;
    max-width: 100%;
}

.tv-container:hover {
    transform: translateY(-5px) scale(1.01);
}

.tv-info {
    padding: 1.5rem 0 2rem 0;
    text-align: center;
}

.tv-info h3 {
    color: var(--chess-gold);
    font-size: clamp(1.2rem, 4vw, 1.8rem);
    margin-bottom: 0.8rem;
    text-shadow: var(--shadow-gold);
    font-weight: 700;
    letter-spacing: 0.5px;
    word-wrap: break-word;
}

.tv-info p {
    color: var(--text-muted);
    font-size: clamp(0.9rem, 3vw, 1.1rem);
    margin-bottom: 1.5rem;
    font-weight: 400;
}

.lichess-embed {
    position: relative;
    width: 100%;
    max-width: 100%;
    padding-bottom: 110%;
    background: #2b2926;
    border-radius: 20px;
    overflow: hidden;
    min-height: 300px;
    box-shadow: var(--shadow-premium);
    border: var(--border-glow);
    transition: all 0.3s ease;
}

.lichess-embed:hover {
    box-shadow: 0 25px 80px rgba(153, 69, 255, 0.4);
    border-color: rgba(153, 69, 255, 0.6);
}

.lichess-frame {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    border: none;
    border-radius: 20px;
}

/* Émojis animés améliorés */
.bullet-emoji {
    color: var(--chess-gold);
    animation: pulse 1.5s infinite;
    margin-left: 0.8rem;
    font-size: 1.2rem;
    filter: drop-shadow(0 0 8px rgba(212, 175, 55, 0.5));
}

.blitz-fire {
    color: #ff6b35;
    animation: pulseFire 2s infinite;
    margin-left: 0.8rem;
    font-size: 1.2rem;
}

@keyframes pulseFire {
    0%, 100% { 
        text-shadow: 0 0 8px #ff6b35, 0 0 20px #ff4500; 
        transform: scale(1);
        filter: hue-rotate(0deg);
    }
    50% { 
        text-shadow: 0 0 20px #ff6b35, 0 0 40px #ff4500; 
        transform: scale(1.2);
        filter: hue-rotate(30deg);
    }
}

/* Services premium */
.services {
    background: var(--secondary-color);
    position: relative;
}

.services::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: radial-gradient(circle at 70% 30%, rgba(0, 212, 255, 0.06) 0%, transparent 60%);
    pointer-events: none;
}

.services-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 2rem;
    width: 100%;
}

.service-card {
    background: rgba(10, 10, 26, 0.8);
    backdrop-filter: blur(20px);
    padding: 2rem;
    border-radius: 25px;
    box-shadow: var(--shadow-premium);
    text-align: center;
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
    overflow: hidden;
    border: var(--border-glow);
    width: 100%;
    max-width: 100%;
    box-sizing: border-box;
}

.service-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 4px;
    background: var(--gradient-neon);
    transition: left 0.4s ease;
    box-shadow: var(--glow-neon);
}

.service-card:hover::before {
    left: 0;
}

.service-card:hover {
    transform: translateY(-10px) scale(1.02);
    box-shadow: 0 30px 80px rgba(153, 69, 255, 0.25);
    border-color: rgba(153, 69, 255, 0.6);
}

.service-card i {
    font-size: clamp(2.5rem, 8vw, 4rem);
    color: var(--ghost-purple);
    margin-bottom: 1.5rem;
    text-shadow: var(--glow-neon);
    animation: float 3s ease-in-out infinite;
}

.service-card h3 {
    font-size: clamp(1.2rem, 4vw, 1.8rem);
    margin-bottom: 1.5rem;
    color: var(--text-light);
    font-weight: 700;
    letter-spacing: 0.3px;
    word-wrap: break-word;
}

.service-card p {
    color: var(--text-muted);
    font-size: clamp(0.9rem, 3vw, 1.1rem);
    line-height: 1.7;
    font-weight: 400;
}

/* Formulaire premium */
.join-group {
    background: var(--gradient-primary);
    color: var(--text-light);
    text-align: center;
    position: relative;
    overflow: hidden;
}

.enhanced-form-container {
    max-width: 1000px;
    margin: 0 auto;
    background: rgba(10, 10, 26, 0.9);
    backdrop-filter: blur(25px);
    padding: 4rem;
    border-radius: 30px;
    border: 2px solid rgba(153, 69, 255, 0.4);
    box-shadow: var(--shadow-premium);
    position: relative;
    overflow: hidden;
}

.enhanced-form-container::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 4px;
    background: var(--gradient-neon);
    animation: shimmer 3s ease-in-out infinite;
    box-shadow: var(--glow-neon);
}

/* Vidéos premium */
.videos {
    background: var(--primary-color);
    position: relative;
}

.videos::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: radial-gradient(circle at 80% 20%, rgba(153, 69, 255, 0.06) 0%, transparent 60%);
    pointer-events: none;
}

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

.video-card {
    background: rgba(10, 10, 26, 0.9);
    backdrop-filter: blur(20px);
    border-radius: 25px;
    overflow: hidden;
    box-shadow: var(--shadow-premium);
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    border: var(--border-glow);
    position: relative;
    width: 100%;
    max-width: 100%;
    box-sizing: border-box;
}

.video-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 3px;
    background: var(--gradient-neon);
    opacity: 0;
    transition: opacity 0.3s ease;
}

.video-card:hover::before {
    opacity: 1;
}

.video-card:hover {
    transform: translateY(-5px) scale(1.01);
    box-shadow: 0 25px 70px rgba(153, 69, 255, 0.25);
    border-color: rgba(153, 69, 255, 0.6);
}

.video-embed {
    width: 100%;
    height: 250px;
    border: none;
    transition: all 0.3s ease;
}

.video-info {
    padding: 1.5rem;
}

.video-info h4 {
    color: var(--chess-gold);
    margin-bottom: 1rem;
    text-shadow: var(--shadow-gold);
    font-size: clamp(1.1rem, 3vw, 1.4rem);
    font-weight: 700;
    letter-spacing: 0.3px;
    word-wrap: break-word;
}

.video-info p {
    color: var(--text-muted);
    font-size: clamp(0.9rem, 3vw, 1.1rem);
    line-height: 1.6;
    font-weight: 400;
}

/* Profils premium */
.profiles {
    text-align: center;
    background: var(--secondary-color);
    position: relative;
}

.profiles::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: radial-gradient(circle at 50% 50%, rgba(153, 69, 255, 0.06) 0%, transparent 70%);
    pointer-events: none;
}

.profile-buttons {
    display: flex;
    justify-content: center;
    gap: 1.5rem;
    flex-wrap: wrap;
    width: 100%;
}

.profile-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.6rem;
    background: rgba(10, 10, 26, 0.9);
    backdrop-filter: blur(20px);
    color: var(--text-light);
    padding: 1rem 2rem;
    border-radius: 50px;
    text-decoration: none;
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    font-weight: 600;
    font-size: clamp(0.9rem, 3vw, 1.1rem);
    border: var(--border-glow);
    position: relative;
    overflow: hidden;
    letter-spacing: 0.3px;
    white-space: nowrap;
    min-width: 0;
    flex-shrink: 0;
}

.profile-btn::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(153, 69, 255, 0.15), transparent);
    transition: left 0.6s ease;
}

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

.profile-btn:hover {
    background: rgba(153, 69, 255, 0.15);
    transform: translateY(-5px) scale(1.05);
    box-shadow: var(--shadow-premium);
    border-color: var(--ghost-purple);
    color: var(--ghost-purple);
    text-shadow: var(--glow-neon);
}

.profile-btn i {
    font-size: 1.2rem;
    transition: all 0.3s ease;
}

.profile-btn:hover i {
    transform: scale(1.2) rotate(10deg);
}

/* Formulaire amélioré */
.form-header {
    text-align: center;
    margin-bottom: 3rem;
}

.form-header h3 {
    color: var(--ghost-purple);
    font-size: clamp(1.8rem, 5vw, 2.5rem);
    margin-bottom: 1.5rem;
    text-shadow: var(--glow-neon);
    font-weight: 800;
    letter-spacing: -0.5px;
    word-wrap: break-word;
}

.form-header p {
    color: var(--text-muted);
    font-size: clamp(1rem, 3vw, 1.2rem);
    max-width: 600px;
    margin: 0 auto;
    line-height: 1.6;
}

.form-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 2rem;
    margin-bottom: 2rem;
    width: 100%;
}

.form-group {
    margin-bottom: 1.5rem;
    position: relative;
    width: 100%;
    box-sizing: border-box;
}

.form-group.full-width {
    grid-column: 1 / -1;
}

.form-group label {
    display: block;
    margin-bottom: 0.8rem;
    color: var(--ghost-purple);
    font-weight: 600;
    text-shadow: var(--glow-neon);
    font-size: clamp(0.9rem, 3vw, 1rem);
    letter-spacing: 0.3px;
}

.form-group label .required {
    color: #ff6b6b;
    margin-left: 3px;
    font-size: 1.1rem;
}

.form-group input,
.form-group textarea {
    width: 100%;
    padding: 1rem;
    border: 2px solid rgba(153, 69, 255, 0.3);
    border-radius: 15px;
    font-size: clamp(0.9rem, 3vw, 1.1rem);
    background: rgba(255, 255, 255, 0.08);
    color: var(--text-light);
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    backdrop-filter: blur(10px);
    font-weight: 400;
    box-sizing: border-box;
    max-width: 100%;
}

.form-group select {
    width: 100%;
    padding: 1rem;
    border: 2px solid rgba(153, 69, 255, 0.3);
    border-radius: 15px;
    font-size: clamp(0.9rem, 3vw, 1.1rem);
    background: rgb(255, 255, 255);
    color: var(--text-dark);
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    backdrop-filter: blur(10px);
    font-weight: 400;
    box-sizing: border-box;
    max-width: 100%;
}

.form-group input:focus,
.form-group textarea:focus,
.form-group select:focus {
    outline: none;
    border-color: var(--ghost-purple);
    box-shadow: 0 0 25px rgba(153, 69, 255, 0.4);
    background: rgba(255, 255, 255, 0.12);
    transform: translateY(-2px);
}

.form-group input::placeholder,
.form-group textarea::placeholder {
    color: rgba(255, 255, 255, 0.4);
    font-weight: 300;
}

.input-icon {
    position: absolute;
    right: 20px;
    top: 45px;
    color: var(--ghost-purple);
    pointer-events: none;
    font-size: 1.2rem;
}

.checkbox-group {
    display: flex;
    align-items: flex-start;
    gap: 1rem;
    margin: 1.5rem 0;
    padding: 1.2rem;
    background: rgba(153, 69, 255, 0.05);
    border-radius: 15px;
    border: 1px solid rgba(153, 69, 255, 0.2);
    width: 100%;
    box-sizing: border-box;
}

.checkbox-group input[type="checkbox"] {
    width: 20px;
    height: 20px;
    accent-color: var(--ghost-purple);
    flex-shrink: 0;
    margin-top: 2px;
}

.checkbox-group label {
    margin: 0;
    color: var(--text-muted);
    font-weight: 400;
    font-size: clamp(0.8rem, 3vw, 1rem);
    line-height: 1.4;
    flex: 1;
}

.enhanced-submit-btn, .submit-btn {
    background: var(--gradient-neon);
    color: var(--text-dark);
    padding: 1.2rem 3rem;
    border: none;
    border-radius: 50px;
    cursor: pointer;
    font-size: clamp(1rem, 3vw, 1.2rem);
    font-weight: 700;
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: var(--shadow-premium);
    position: relative;
    overflow: hidden;
    width: 100%;
    margin-top: 2rem;
    letter-spacing: 0.5px;
    text-transform: uppercase;
    box-sizing: border-box;
    max-width: 100%;
}

.enhanced-submit-btn::before, .submit-btn::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.6s ease;
}

.enhanced-submit-btn:hover::before, .submit-btn:hover::before {
    left: 100%;
}

.enhanced-submit-btn:hover, .submit-btn:hover {
    transform: translateY(-3px) scale(1.02);
    box-shadow: 0 20px 60px rgba(153, 69, 255, 0.5);
}

.enhanced-submit-btn:disabled, .submit-btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
    transform: none;
}

.success-message {
    background: rgba(153, 69, 255, 0.15);
    border: 2px solid var(--ghost-purple);
    color: var(--ghost-purple);
    padding: 2rem;
    border-radius: 20px;
    margin-top: 2rem;
    text-align: center;
    backdrop-filter: blur(15px);
    animation: fadeInUp 0.6s ease;
    box-shadow: var(--glow-neon);
    width: 100%;
    box-sizing: border-box;
}

.tab-content {
    display: none;
    animation: fadeInUp 0.5s ease;
}

.tab-content.active {
    display: block;
}

.form-navigation {
    display: flex;
    justify-content: space-between;
    margin-top: 1.5rem;
    gap: 1rem;
    flex-wrap: wrap;
}

.nav-btn {
    background: rgba(255, 255, 255, 0.1);
    color: var(--text-light);
    padding: 0.8rem 1.5rem;
    border: 1px solid var(--border-glow);
    border-radius: 50px;
    cursor: pointer;
    font-size: clamp(0.8rem, 3vw, 1rem);
    font-weight: 600;
    transition: all 0.3s ease;
    flex: 1;
    min-width: 120px;
}

.nav-btn:hover {
    background: var(--ghost-purple);
    color: var(--text-dark);
    box-shadow: var(--shadow-premium);
}

.nav-btn:disabled {
    opacity: 0.4;
    cursor: not-allowed;
}

.form-progress {
    display: flex;
    justify-content: space-between;
    margin-bottom: 2rem;
    padding: 0 1rem;
    gap: 0.5rem;
    flex-wrap: wrap;
}

.progress-step {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    color: rgba(255, 255, 255, 0.4);
    font-size: clamp(0.8rem, 3vw, 1rem);
    font-weight: 500;
    flex: 1;
    min-width: 0;
    text-align: center;
}

.progress-step.active {
    color: var(--ghost-purple);
    text-shadow: var(--glow-neon);
}

.progress-step i {
    width: 20px;
    text-align: center;
    font-size: 1rem;
    flex-shrink: 0;
}

/* Contact premium */
.contact {
    background: var(--secondary-color);
    position: relative;
    overflow: hidden;
}

.contact::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: radial-gradient(circle at 80% 20%, rgba(0, 212, 255, 0.06) 0%, transparent 60%);
    pointer-events: none;
}

.contact-content {
    display: grid;
    grid-template-columns: 1fr;
    justify-items: center;
    gap: 3rem;
    width: 100%;
}

.contact-info h3 {
    color: var(--ghost-purple);
    margin-bottom: 2rem;
    text-shadow: var(--glow-neon);
    font-size: clamp(1.5rem, 4vw, 2rem);
    font-weight: 700;
    letter-spacing: 0.3px;
    text-align: center;
    word-wrap: break-word;
}

.contact-item {
    display: flex;
    align-items: center;
    gap: 1rem;
    margin-bottom: 1.5rem;
    padding: 1.2rem;
    background: rgba(10, 10, 26, 0.9);
    backdrop-filter: blur(15px);
    border-radius: 15px;
    box-shadow: 0 8px 35px rgba(153, 69, 255, 0.1);
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    border: var(--border-glow);
    width: 100%;
    box-sizing: border-box;
}

.contact-item:hover {
    transform: translateX(5px) translateY(-3px);
    box-shadow: 0 12px 50px rgba(153, 69, 255, 0.25);
    border-color: rgba(153, 69, 255, 0.6);
}

.contact-item i {
    color: var(--ghost-purple);
    font-size: 1.5rem;
    text-shadow: var(--glow-neon);
    animation: pulse 3s infinite;
    flex-shrink: 0;
}

.contact-item div {
    color: var(--text-light);
    font-size: clamp(0.9rem, 3vw, 1.1rem);
    font-weight: 400;
    word-break: break-word;
    flex: 1;
}

.contact-form {
    max-width: 1000px;
    margin: 0 auto;
    background: rgba(10, 10, 26, 0.9);
    backdrop-filter: blur(25px);
    padding: 4rem;
    border-radius: 30px;
    box-shadow: var(--shadow-premium);
    border: 2px solid rgba(153, 69, 255, 0.4);
    width: 100%;
    box-sizing: border-box;    
}

.contact-form h3 {
    color: var(--ghost-purple);
    text-shadow: var(--glow-neon);
    margin-bottom: 1.5rem;
    font-size: clamp(1.5rem, 4vw, 2rem);
    font-weight: 700;
    letter-spacing: 0.3px;
    text-align: center;
    word-wrap: break-word;
}

.contact-form .form-group label {
    color: var(--text-light);
    font-weight: 500;
}

/* Footer premium */
.footer {
    background: var(--primary-color);
    color: var(--text-light);
    text-align: center;
    padding: 3rem 0 2rem;
    position: relative;
}

.footer::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 1px;
    background: var(--gradient-neon);
    box-shadow: var(--glow-neon);
}

.footer-content {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 2rem;
    margin-bottom: 2rem;
    width: 100%;
}

.footer-section h4 {
    margin-bottom: 1rem;
    color: var(--ghost-purple);
    text-shadow: var(--glow-neon);
    font-size: clamp(1rem, 3vw, 1.3rem);
    font-weight: 700;
    letter-spacing: 0.3px;
    word-wrap: break-word;
}

.footer-section a {
    color: var(--text-muted);
    text-decoration: none;
    transition: all 0.3s ease;
    font-size: clamp(0.8rem, 3vw, 1rem);
    font-weight: 400;
    display: block;
    margin-bottom: 0.5rem;
}

.footer-section a:hover {
    color: var(--ghost-purple);
    text-shadow: var(--glow-neon);
    transform: translateX(5px);
}

.social-links {
    display: flex;
    justify-content: center;
    gap: 1rem;
    margin: 2rem 0;
    flex-wrap: wrap;
}

.social-links a {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 50px;
    height: 50px;
    background: rgba(10, 10, 26, 0.8);
    color: var(--ghost-purple);
    border-radius: 50%;
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    border: var(--border-glow);
    backdrop-filter: blur(15px);
    font-size: 1.2rem;
    text-decoration: none;
}

.social-links a:hover {
    background: rgba(153, 69, 255, 0.15);
    transform: translateY(-5px) scale(1.1);
    box-shadow: var(--shadow-premium);
    border-color: var(--ghost-purple);
    animation: rotateGlow 2s infinite;
}

.footer-bottom {
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    padding-top: 1.5rem;
    color: var(--text-muted);
    font-size: clamp(0.8rem, 3vw, 0.95rem);
    font-weight: 400;
}

/* Notification système premium */
.notification {
    position: fixed;
    top: 20px;
    right: 20px;
    background: var(--gradient-neon);
    color: var(--text-dark);
    padding: 1rem 1.5rem;
    border-radius: 15px;
    box-shadow: var(--shadow-premium);
    z-index: 10000;
    transform: translateX(100%);
    transition: transform 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    font-weight: 600;
    font-size: clamp(0.8rem, 3vw, 1rem);
    letter-spacing: 0.3px;
    max-width: calc(100vw - 40px);
    box-sizing: border-box;
    word-wrap: break-word;
}

.notification.show {
    transform: translateX(0);
}

.notification i {
    margin-right: 0.5rem;
    font-size: 1rem;
}

/* Effets de survol globaux */
*:focus {
    outline: 2px solid rgba(153, 69, 255, 0.5);
    outline-offset: 2px;
}

/* Scrollbar personnalisée */
::-webkit-scrollbar {
    width: 8px;
}

::-webkit-scrollbar-track {
    background: var(--primary-color);
}

::-webkit-scrollbar-thumb {
    background: var(--gradient-neon);
    border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
    background: var(--ghost-purple);
}

/* Sélection de texte personnalisée */
::selection {
    background: rgba(153, 69, 255, 0.3);
    color: var(--text-light);
}

/* RESPONSIVE AMÉLIORÉ */

/* Tablettes (768px - 1024px) */
@media (max-width: 1024px) {
    .nav-container {
        padding: 0 2rem;
    }
    
    .container {
        padding: 0 2rem;
    }
    
    .about-content {
        grid-template-columns: 1fr;
        gap: 2rem;
    }
    
    .tv-grid {
        grid-template-columns: repeat(auto-fit, minmax(350px, 1fr));
        gap: 2rem;
    }
    
    .form-grid {
        grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    }
    
    .visit-counter {
        bottom: 20px;
        left: 20px;
        padding: 1.2rem;
        min-width: 160px;
    }
}

/* Mobile Large (480px - 768px) */
@media (max-width: 768px) {
    body {
        overflow-x: hidden;
    }
    
    .mobile-menu-btn {
        display: block;
    }

    .nav-menu {
        display: none;
        position: fixed;
        top: 0;
        left: 0;
        width: 100vw;
        height: 100vh;
        background: rgba(10, 10, 26, 0.98);
        backdrop-filter: blur(20px);
        flex-direction: column;
        justify-content: center;
        align-items: center;
        gap: 2rem;
        z-index: 9999;
        padding: 0;
        margin: 0;
        box-sizing: border-box;
    }

    .nav-menu.active {
        display: flex;
    }
    
    .nav-menu a {
        font-size: 1.3rem;
        padding: 1rem;
    }

    .nav-container {
        padding: 0 1.5rem;
    }
    
    .container {
        padding: 0 1.5rem;
    }

    .section {
        padding: 3rem 0;
    }

    .section-title {
        margin-bottom: 3rem;
    }

    .hero {
        min-height: 100vh;
        padding: 2rem 0;
    }
    
    .hero-content {
        padding: 0 1.5rem;
    }

    .cta-button {
        padding: 1rem 2rem;
        font-size: 1rem;
    }

    .about-content {
        text-align: center;
        gap: 2rem;
    }

    .about-image i {
        font-size: clamp(5rem, 20vw, 8rem);
    }

    .tv-grid {
        grid-template-columns: 1fr;
        gap: 2rem;
    }

    .lichess-embed {
        min-height: 300px;
    }

    .services-grid,
    .videos-grid {
        grid-template-columns: 1fr;
        gap: 2rem;
    }

    .service-card,
    .video-card {
        padding: 2rem 1.5rem;
    }

    .profile-buttons {
        gap: 1rem;
        justify-content: center;
    }

    .profile-btn {
        padding: 0.8rem 1.5rem;
        font-size: 0.9rem;
        min-width: 140px;
        flex: 0 0 auto;
    }

    .enhanced-form-container,
    .contact-form {
        padding: 2rem 1.5rem;
        margin: 0 1rem;
        max-width: calc(100vw - 2rem);
    }

    .form-grid {
        grid-template-columns: 1fr;
        gap: 1.5rem;
    }

    .form-navigation {
        flex-direction: column;
        gap: 1rem;
    }

    .nav-btn {
        width: 100%;
        min-width: auto;
    }

    .form-progress {
        flex-direction: column;
        gap: 0.8rem;
        align-items: center;
        text-align: center;
    }

    .progress-step {
        justify-content: center;
    }

    .contact-content {
        gap: 2rem;
    }

    .contact-item {
        flex-direction: row;
        text-align: left;
        gap: 1rem;
        padding: 1rem;
    }

    .footer-content {
        grid-template-columns: 1fr;
        gap: 2rem;
        text-align: center;
    }

    .social-links {
        gap: 1rem;
    }

    .social-links a {
        width: 45px;
        height: 45px;
        font-size: 1.1rem;
    }

    .visit-counter {
        bottom: 15px;
        left: 15px;
        padding: 1rem;
        min-width: 140px;
        font-size: 0.8rem;
    }

    .visit-counter .count {
        font-size: 1.5rem;
    }

    .notification {
        top: 15px;
        right: 15px;
        left: 15px;
        max-width: calc(100vw - 30px);
        transform: translateY(-100%);
    }

    .notification.show {
        transform: translateY(0);
    }
}

/* Mobile Small (320px - 480px) */
@media (max-width: 480px) {
    .nav-container {
        padding: 0 1rem;
    }
    
    .container {
        padding: 0 1rem;
    }

    .hero-content {
        padding: 0 1rem;
    }

    .logo {
        font-size: 1.5rem;
    }

    .logo i {
        font-size: 1.8rem;
    }

    .section {
        padding: 2rem 0;
    }

    .section-title {
        margin-bottom: 2rem;
    }

    .service-card,
    .video-card {
        padding: 1.5rem 1rem;
    }

    .video-embed {
        height: 200px;
    }

    .profile-btn {
        padding: 0.7rem 1.2rem;
        font-size: 0.8rem;
        gap: 0.4rem;
        min-width: 120px;
    }

    .profile-buttons {
        gap: 0.8rem;
        flex-wrap: wrap;
        justify-content: center;
    }

    .enhanced-form-container,
    .contact-form {
        padding: 1.5rem 1rem;
        border-radius: 20px;
        margin: 0 0.5rem;
        max-width: calc(100vw - 1rem);
    }

    .form-group input,
    .form-group textarea,
    .form-group select {
        padding: 0.8rem;
        font-size: 1rem;
        border-radius: 12px;
    }

    .checkbox-group {
        padding: 1rem;
        gap: 0.8rem;
        flex-direction: row;
        align-items: flex-start;
    }

    .enhanced-submit-btn,
    .submit-btn {
        padding: 1rem 2rem;
        font-size: 1rem;
        margin-top: 1.5rem;
    }

    .contact-item {
        padding: 0.8rem;
        gap: 0.8rem;
        margin-bottom: 1rem;
    }

    .contact-item i {
        font-size: 1.3rem;
    }

    .social-links a {
        width: 40px;
        height: 40px;
        font-size: 1rem;
    }

    .visit-counter {
        bottom: 10px;
        left: 10px;
        padding: 0.8rem;
        min-width: 120px;
        border-radius: 15px;
    }

    .visit-counter h4 {
        font-size: 0.8rem;
        margin-bottom: 0.5rem;
    }

    .visit-counter .count {
        font-size: 1.3rem;
    }

    .notification {
        padding: 0.8rem 1.2rem;
        font-size: 0.8rem;
        border-radius: 12px;
    }

    /* Ajustements spécifiques pour très petits écrans */
    .chess-piece {
        font-size: 1.5rem;
    }

    .queens-gambit-piece {
        font-size: 2rem;
    }

    .rain-piece {
        font-size: 1.2rem;
    }
}

/* Mobile très petit (320px et moins) */
@media (max-width: 320px) {
    .nav-container {
        padding: 0 0.8rem;
    }
    
    .container {
        padding: 0 0.8rem;
    }

    .hero-content {
        padding: 0 0.8rem;
    }

    .logo {
        font-size: 1.3rem;
        gap: 0.4rem;
    }

    .logo i {
        font-size: 1.5rem;
    }

    .cta-button {
        padding: 0.8rem 1.5rem;
        font-size: 0.9rem;
    }

    .service-card,
    .video-card {
        padding: 1.2rem 0.8rem;
        border-radius: 20px;
    }

    .profile-btn {
        padding: 0.6rem 1rem;
        font-size: 0.75rem;
        min-width: 100px;
    }

    .enhanced-form-container,
    .contact-form {
        padding: 1.2rem 0.8rem;
        margin: 0 0.3rem;
        max-width: calc(100vw - 0.6rem);
    }

    .visit-counter {
        bottom: 8px;
        left: 8px;
        padding: 0.6rem;
        min-width: 100px;
        font-size: 0.7rem;
    }

    .visit-counter .count {
        font-size: 1.1rem;
    }

    .contact-item {
        flex-direction: column;
        text-align: center;
        gap: 0.5rem;
        padding: 1rem 0.8rem;
    }

    .contact-item i {
        font-size: 1.5rem;
        margin-bottom: 0.3rem;
    }
}

/* Corrections pour éviter le scroll horizontal */
* {
    max-width: 100%;
    box-sizing: border-box;
}

html {
    overflow-x: hidden;
    width: 100%;
}

body {
    overflow-x: hidden;
    width: 100%;
    max-width: 100vw;
}

/* Assurer que tous les éléments de largeur fixe s'adaptent */
.chess-background,
.chess-rain,
.hero::before,
.hero::after {
    max-width: 100vw;
}

/* Ajustements pour les éléments flottants sur mobile */
@media (max-width: 768px) {
    .chess-piece {
        font-size: 1.8rem;
    }
    
    .queens-gambit-piece {
        font-size: 2.5rem;
    }
    
    .rain-piece {
        font-size: 1.4rem;
    }
    
    /* Réduire les animations sur mobile pour de meilleures performances */
    .chess-piece {
        animation-duration: 15s;
    }
    
    .queens-gambit-piece {
        animation-duration: 8s;
    }
    
    .rain-piece {
        animation-duration: 12s;
    }
    
    /* Masquer certains effets décoratifs sur très petits écrans */
    @media (max-width: 480px) {
        .chess-background {
            opacity: 0.5;
        }
        
        .chess-rain {
            opacity: 0.3;
        }
        
        .hero::before {
            opacity: 0.3;
        }
    }
}

/* Améliorations pour l'accessibilité sur mobile */
@media (max-width: 768px) {
    /* Augmenter les zones de toucher */
    button,
    .cta-button,
    .profile-btn,
    .nav-btn,
    .enhanced-submit-btn,
    .submit-btn {
        min-height: 44px;
        min-width: 44px;
    }
    
    /* Améliorer l'espacement pour les doigts */
    .nav-menu a {
        padding: 1rem 2rem;
        margin: 0.5rem 0;
    }
    
    .form-group {
        margin-bottom: 1.5rem;
    }
    
    /* Focus visible amélioré pour mobile */
    *:focus {
        outline: 3px solid rgba(153, 69, 255, 0.6);
        outline-offset: 3px;
    }
}

/* Corrections spécifiques pour WebKit (Safari mobile) */
@supports (-webkit-touch-callout: none) {
    .hero {
        min-height: 100vh;
        min-height: -webkit-fill-available;
    }
    
    body {
        min-height: 100vh;
        min-height: -webkit-fill-available;
    }
}

/* Amélioration de la lisibilité sur petits écrans */
@media (max-width: 480px) {
    .about-text p,
    .service-card p,
    .video-info p {
        line-height: 1.6;
        font-size: 1rem;
    }
    
    /* Espacement amélioré pour les listes */
    .footer-section a {
        padding: 0.3rem 0;
        margin-bottom: 0.3rem;
    }
}

/* Performance optimizations pour mobile */
@media (max-width: 768px) {
    /* Réduire la complexité des gradients sur mobile */
    .hero {
        background: var(--primary-color);
    }
    
    /* Simplifier les box-shadows sur mobile */
    .service-card:hover,
    .video-card:hover,
    .profile-btn:hover {
        box-shadow: 0 10px 30px rgba(153, 69, 255, 0.2);
    }
    
    /* Réduire les transformations pour améliorer les performances */
    .service-card:hover,
    .video-card:hover {
        transform: translateY(-3px);
    }
}

/* Corrections finales pour garantir l'absence de scroll horizontal */
.section,
.container,
.nav-container,
.hero,
.hero-content,
.about-content,
.tv-grid,
.services-grid,
.videos-grid,
.profile-buttons,
.contact-content,
.footer-content {
    max-width: 100%;
    box-sizing: border-box;
}

/* S'assurer que les grilles ne débordent jamais */
.tv-grid,
.services-grid,
.videos-grid,
.footer-content {
    width: 100%;
    max-width: 100%;
}

/* Correction pour les éléments avec position fixed */
.header,
.visit-counter,
.notification {
    max-width: 100vw;
    box-sizing: border-box;
}

/* Dernières corrections pour mobile */
@media (max-width: 768px) {
    /* S'assurer que rien ne dépasse */
    * {
        max-width: 100vw;
    }
    
    /* Corrections spécifiques pour les conteneurs flexibles */
    .profile-buttons,
    .form-navigation,
    .social-links {
        width: 100%;
        max-width: 100%;
        box-sizing: border-box;
    }
    
    /* Assurer que les inputs ne dépassent jamais */
    .form-group input,
    .form-group textarea,
    .form-group select {
        width: 100%;
        max-width: 100%;
    }
}