/* ============================================
   BOOKMAKER CHOICE - STYLES DÉDIÉS
   Version 4.0 - Avec bouton Facebook redesigné
   ============================================ */

/* ============================================
   VARIABLES CSS
   ============================================ */
:root {
    --primary-1xbet: #1e40ff;
    --primary-melbet: #ffd700;
    --accent-color: #ff3d71;
    --facebook-blue: #1877F2;
    --facebook-blue-dark: #0e5fc2;
    --bg-primary: #0a0e27;
    --bg-secondary: #12172e;
    --bg-tertiary: #1a1f3a;
    --bg-glass: rgba(18, 23, 46, 0.85);
    --text-primary: #ffffff;
    --text-secondary: #a0aec0;
    --text-muted: #718096;
    --border-radius-sm: 8px;
    --border-radius-md: 12px;
    --border-radius-lg: 16px;
    --border-radius-xl: 20px;
    --transition-fast: 0.15s ease;
    --transition-normal: 0.3s ease;
    --transition-slow: 0.5s ease;
    --shadow-sm: 0 2px 8px rgba(0, 0, 0, 0.1);
    --shadow-md: 0 4px 16px rgba(0, 0, 0, 0.2);
    --shadow-lg: 0 8px 32px rgba(0, 0, 0, 0.3);
    --shadow-glow: 0 0 20px rgba(30, 64, 255, 0.5);
    --gradient-primary: linear-gradient(135deg, #1e40ff 0%, #4a6fff 100%);
    --gradient-melbet: linear-gradient(135deg, #ffd700 0%, #ffed4e 100%);
    --gradient-glow: conic-gradient(from 0deg, #1e40ff, #00d4ff, #1e40ff);
    --font-family: 'Poppins', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    --primary-color: var(--primary-1xbet);
}

/* ============================================
   PAGE LAYOUT
   ============================================ */
.bookmaker-choice-page {
    background: var(--bg-primary);
    min-height: 100vh;
    position: relative;
    overflow-x: hidden;
    font-family: var(--font-family);
}

/* ============================================
   ANIMATED BACKGROUND
   ============================================ */
.animated-background {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: -1;
    overflow: hidden;
    pointer-events: none;
}

.floating-shape {
    position: absolute;
    background: radial-gradient(circle, rgba(30, 64, 255, 0.15) 0%, transparent 70%);
    border-radius: 50%;
    animation: float-random 20s ease-in-out infinite;
}

.shape-1 { width: 300px; height: 300px; top: 10%; left: 10%; animation-delay: 0s; }
.shape-2 { width: 200px; height: 200px; top: 60%; right: 10%; animation-delay: 5s; }
.shape-3 { width: 250px; height: 250px; bottom: 10%; left: 30%; animation-delay: 10s; }
.shape-4 { width: 180px; height: 180px; top: 30%; right: 25%; animation-delay: 15s; }

@keyframes float-random {
    0%, 100% { transform: translate(0, 0) scale(1); }
    25% { transform: translate(30px, -30px) scale(1.1); }
    50% { transform: translate(-20px, 20px) scale(0.9); }
    75% { transform: translate(20px, 30px) scale(1.05); }
}

/* ============================================
   LANGUAGE SWITCHER
   ============================================ */
.language-switcher-top {
    position: fixed;
    top: 20px;
    right: 20px;
    z-index: 1000;
}

/* ============================================
   MAIN CONTENT
   ============================================ */
.main-content {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 40px 20px;
}

.container-choice {
    width: 100%;
    max-width: 1200px;
    animation: fadeInUp 0.8s cubic-bezier(0.4, 0, 0.2, 1);
}

/* ============================================
   HEADER SECTION
   ============================================ */
.choice-header {
    text-align: center;
    margin-bottom: 56px;
}

.choice-logo-container {
    position: relative;
    margin-bottom: 32px;
    display: inline-block;
    animation: logoEntry 1s cubic-bezier(0.4, 0, 0.2, 1);
}

@keyframes logoEntry {
    0% { opacity: 0; transform: scale(0.8) rotate(-10deg); }
    100% { opacity: 1; transform: scale(1) rotate(0deg); }
}

.choice-logo {
    width: 100px;
    height: 100px;
    border-radius: 24px;
    box-shadow: 0 8px 32px rgba(30, 64, 255, 0.4);
    filter: drop-shadow(0 0 30px rgba(30, 64, 255, 0.6));
    animation: float 4s ease-in-out infinite;
    position: relative;
    z-index: 1;
}

.logo-glow {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 120%;
    height: 120%;
    background: radial-gradient(circle, rgba(30, 64, 255, 0.3) 0%, transparent 70%);
    border-radius: 50%;
    animation: pulse 2s ease-in-out infinite;
}

.choice-title {
    font-size: clamp(2rem, 5vw, 3.5rem);
    font-weight: 800;
    margin-bottom: 16px;
    background: linear-gradient(135deg, #1e40ff 0%, #00d4ff 50%, #1e40ff 100%);
    background-size: 200% 200%;
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    animation: gradientShift 3s ease infinite;
    letter-spacing: -1px;
}

@keyframes gradientShift {
    0%, 100% { background-position: 0% 50%; }
    50% { background-position: 100% 50%; }
}

.choice-subtitle {
    font-size: clamp(1rem, 2vw, 1.2rem);
    color: var(--text-secondary);
    max-width: 600px;
    margin: 0 auto 24px;
    line-height: 1.6;
}

/* ============================================
   BOUTON VIDÉO FACEBOOK - NOUVEAU DESIGN
   ============================================ */
.facebook-video-button {
    display: inline-flex;
    align-items: center;
    gap: 14px;
    background: linear-gradient(135deg, var(--facebook-blue) 0%, #4a90f5 100%);
    color: white;
    padding: 16px 32px;
    border-radius: 16px;
    text-decoration: none;
    font-weight: 600;
    font-size: 1.05em;
    transition: all var(--transition-normal);
    box-shadow: 
        0 8px 24px rgba(24, 119, 242, 0.35),
        0 2px 8px rgba(24, 119, 242, 0.2),
        inset 0 -2px 8px rgba(0, 0, 0, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.1);
    cursor: pointer;
    position: relative;
    overflow: hidden;
    font-family: var(--font-family);
    margin-top: 12px;
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
}

/* Effet de brillance animé */
.fb-button-shine {
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(
        90deg, 
        transparent 0%, 
        rgba(255, 255, 255, 0.3) 50%, 
        transparent 100%
    );
    animation: fbShineSlide 3s ease-in-out infinite;
}

@keyframes fbShineSlide {
    0%, 100% { left: -100%; }
    50% { left: 100%; }
}

/* Logo Facebook */
.fb-button-icon {
    flex-shrink: 0;
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(255, 255, 255, 0.15);
    border-radius: 10px;
    backdrop-filter: blur(5px);
    transition: all var(--transition-fast);
}

.fb-button-icon svg {
    width: 20px;
    height: 20px;
    filter: drop-shadow(0 2px 4px rgba(0, 0, 0, 0.2));
}

/* Contenu central */
.fb-button-content {
    display: flex;
    flex-direction: column;
    gap: 2px;
    text-align: left;
    flex: 1;
}

.fb-button-label {
    font-weight: 700;
    font-size: 1.05em;
    letter-spacing: 0.3px;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.15);
}

.fb-button-subtitle {
    font-size: 0.8em;
    font-weight: 500;
    opacity: 0.9;
    letter-spacing: 0.2px;
}

/* Icône Play */
.fb-button-play {
    flex-shrink: 0;
    width: 36px;
    height: 36px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(255, 255, 255, 0.2);
    border-radius: 50%;
    transition: all var(--transition-normal);
    animation: playPulse 2.5s ease-in-out infinite;
}

.fb-button-play svg {
    width: 16px;
    height: 16px;
    margin-left: 2px;
    filter: drop-shadow(0 2px 4px rgba(0, 0, 0, 0.2));
}

@keyframes playPulse {
    0%, 100% { 
        transform: scale(1);
        box-shadow: 0 0 0 0 rgba(255, 255, 255, 0.4);
    }
    50% { 
        transform: scale(1.08);
        box-shadow: 0 0 0 8px rgba(255, 255, 255, 0);
    }
}

/* Hover Effects */
.facebook-video-button:hover {
    transform: translateY(-3px) scale(1.02);
    box-shadow: 
        0 12px 32px rgba(24, 119, 242, 0.45),
        0 4px 16px rgba(24, 119, 242, 0.3),
        inset 0 -2px 8px rgba(0, 0, 0, 0.1);
    border-color: rgba(255, 255, 255, 0.2);
}

.facebook-video-button:hover .fb-button-icon {
    transform: scale(1.1) rotate(5deg);
    background: rgba(255, 255, 255, 0.25);
}

.facebook-video-button:hover .fb-button-play {
    transform: scale(1.15);
    background: rgba(255, 255, 255, 0.3);
    animation: playPulse 1.5s ease-in-out infinite;
}

/* Active State */
.facebook-video-button:active {
    transform: translateY(-1px) scale(1);
    box-shadow: 
        0 6px 20px rgba(24, 119, 242, 0.35),
        0 2px 8px rgba(24, 119, 242, 0.25);
}

/* Focus State pour accessibilité */
.facebook-video-button:focus-visible {
    outline: 3px solid rgba(24, 119, 242, 0.5);
    outline-offset: 4px;
}

/* ============================================
   BOOKMAKER OPTIONS - TAILLES ÉGALES
   ============================================ */
.bookmaker-options-container {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
    gap: 32px;
    margin-bottom: 56px;
    max-width: 900px;
    margin-left: auto;
    margin-right: auto;
}

.bookmaker-option {
    position: relative;
    text-decoration: none;
    display: block;
    transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    height: 100%;
}

.bookmaker-card-inner {
    background: var(--bg-glass);
    backdrop-filter: blur(20px) saturate(180%);
    -webkit-backdrop-filter: blur(20px) saturate(180%);
    border: 2px solid rgba(255, 255, 255, 0.1);
    border-radius: 24px;
    padding: 32px 24px;
    position: relative;
    overflow: visible;
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    height: 100%;
    display: flex;
    flex-direction: column;
    min-height: 540px;
}

.bookmaker-option:hover {
    transform: translateY(-12px);
}

.bookmaker-option:hover .bookmaker-card-inner {
    border-color: var(--primary-color);
    box-shadow: 0 20px 60px rgba(30, 64, 255, 0.5);
}

.bookmaker-option:active {
    transform: translateY(-8px) scale(0.98);
}

.bookmaker-option[data-bookmaker="1xbet"],
.bookmaker-option[data-bookmaker="melbet"] {
    flex-basis: auto;
    max-width: none;
    opacity: 1;
}

/* Card Shine Effect */
.card-shine {
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.05), transparent);
    transition: left 0.6s ease;
    pointer-events: none;
}

.card-shine.active {
    left: 100%;
}

/* Card Glow */
.card-glow {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 300px;
    height: 300px;
    background: radial-gradient(circle, rgba(30, 64, 255, 0.15) 0%, transparent 70%);
    border-radius: 50%;
    opacity: 0;
    transition: opacity var(--transition-slow);
    pointer-events: none;
    z-index: 0;
}

.card-glow.active {
    opacity: 1;
}

/* Badge */
.bookmaker-badge {
    position: absolute;
    top: 20px;
    right: 20px;
    background: linear-gradient(135deg, var(--primary-1xbet) 0%, #4a6fff 100%);
    color: white;
    padding: 6px 14px;
    border-radius: 20px;
    font-size: 0.75rem;
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 6px;
    box-shadow: 0 4px 12px rgba(30, 64, 255, 0.3);
    z-index: 2;
}

.bookmaker-badge-alt {
    background: linear-gradient(135deg, #ffd700 0%, #ffed4e 100%);
    color: #000;
    box-shadow: 0 4px 12px rgba(255, 215, 0, 0.3);
}

.bookmaker-badge svg {
    width: 14px;
    height: 14px;
}

/* Logo */
.bookmaker-logo-wrapper {
    background: rgba(255, 255, 255, 0.05);
    padding: 20px;
    border-radius: var(--border-radius-lg);
    margin: 20px 0 24px;
    transition: all var(--transition-normal);
}

.bookmaker-option:hover .bookmaker-logo-wrapper {
    background: rgba(255, 255, 255, 0.08);
    transform: scale(1.05);
}

.bookmaker-logo {
    max-width: 180px;
    height: auto;
    filter: drop-shadow(0 4px 12px rgba(0, 0, 0, 0.2));
}

.bookmaker-name {
    font-size: 1.8rem;
    font-weight: 700;
    color: var(--text-primary);
    margin-bottom: 20px;
}

/* Features */
.bookmaker-features {
    width: 100%;
    margin: 16px 0 24px;
}

.feature-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 14px 0;
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
}

.feature-item:last-child {
    border-bottom: none;
}

.feature-icon {
    color: var(--primary-color);
    flex-shrink: 0;
}

.feature-text {
    color: var(--text-secondary);
    font-size: 0.95rem;
    text-align: left;
}

/* CTA Button */
.bookmaker-cta {
    margin-top: auto;
    width: 100%;
    padding: 16px 24px;
    background: linear-gradient(135deg, var(--primary-1xbet) 0%, #4a6fff 100%);
    border-radius: var(--border-radius-md);
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
    font-weight: 600;
    font-size: 1rem;
    color: white;
    transition: all var(--transition-fast);
}

.bookmaker-cta-alt {
    background: linear-gradient(135deg, var(--primary-melbet) 0%, #ffed4e 100%);
    color: #000;
}

.bookmaker-option:hover .bookmaker-cta {
    box-shadow: 0 8px 24px rgba(30, 64, 255, 0.4);
}

.bookmaker-option:hover .bookmaker-cta-alt {
    box-shadow: 0 8px 24px rgba(255, 215, 0, 0.4);
}

.cta-icon {
    transition: transform var(--transition-fast);
}

.bookmaker-option:hover .cta-icon {
    transform: translateX(4px);
}

/* ============================================
   INFO CARDS
   ============================================ */
.info-cards-container {
    display: grid;
    gap: 24px;
    margin-bottom: 40px;
}

.info-card {
    background: var(--bg-glass);
    backdrop-filter: blur(20px) saturate(180%);
    -webkit-backdrop-filter: blur(20px) saturate(180%);
    border-left: 4px solid var(--primary-color);
    border-radius: 16px;
    padding: 24px;
    display: flex;
    gap: 20px;
    align-items: flex-start;
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

.info-card:hover {
    transform: translateX(8px);
    box-shadow: 0 12px 40px rgba(0, 0, 0, 0.2);
}

.info-card-primary {
    border-left-color: var(--primary-color);
    background: linear-gradient(135deg, rgba(30, 64, 255, 0.05) 0%, rgba(0, 212, 255, 0.05) 100%);
}

.info-card-success {
    border-left-color: #00ff88;
    background: linear-gradient(135deg, rgba(0, 255, 136, 0.05) 0%, rgba(0, 212, 255, 0.05) 100%);
}

.info-card-warning {
    border-left-color: #ffd700;
    background: linear-gradient(135deg, rgba(255, 215, 0, 0.05) 0%, rgba(255, 140, 0, 0.05) 100%);
}

.info-card-icon {
    flex-shrink: 0;
    transition: all 0.3s ease;
}

.info-card:hover .info-card-icon {
    transform: scale(1.1) rotate(5deg);
}

.info-card-primary .info-card-icon { color: var(--primary-color); }
.info-card-success .info-card-icon { color: #00ff88; }
.info-card-warning .info-card-icon { color: #ffd700; }

.info-card-content {
    flex-grow: 1;
}

.info-card-title {
    color: var(--text-primary);
    font-size: 1.2rem;
    font-weight: 600;
    margin-bottom: 8px;
}

.info-card-text {
    color: var(--text-secondary);
    line-height: 1.7;
    margin: 0;
}

.promo-highlight {
    color: var(--primary-color);
    font-weight: 700;
    font-size: 1.15em;
    padding: 2px 8px;
    background: rgba(30, 64, 255, 0.1);
    border-radius: 6px;
}

/* ============================================
   FOOTER
   ============================================ */
.choice-footer {
    text-align: center;
    padding: 24px;
    background: rgba(255, 255, 255, 0.03);
    border-radius: 16px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
    animation: fadeIn 1s ease 0.8s both;
}

@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

.footer-icon {
    color: var(--primary-color);
    flex-shrink: 0;
}

.footer-text {
    color: var(--text-muted);
    font-size: 0.95rem;
    margin: 0;
}

/* ============================================
   ANIMATIONS PRINCIPALES
   ============================================ */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(40px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes float {
    0%, 100% { transform: translateY(0px); }
    50% { transform: translateY(-15px); }
}

@keyframes pulse {
    0%, 100% {
        opacity: 0.4;
        transform: translate(-50%, -50%) scale(1);
    }
    50% {
        opacity: 0.6;
        transform: translate(-50%, -50%) scale(1.1);
    }
}

/* ============================================
   RESPONSIVE DESIGN
   ============================================ */
@media (max-width: 768px) {
    .main-content {
        padding: 20px 12px;
    }

    .container-choice {
        width: 96%;
        max-width: 96%;
    }

    .choice-logo {
        width: 80px;
        height: 80px;
    }

    .choice-title {
        font-size: 2rem;
        margin-bottom: 12px;
    }

    .choice-subtitle {
        font-size: 1rem;
    }

    .choice-header {
        margin-bottom: 40px;
    }

    /* Bouton Facebook mobile */
    .facebook-video-button {
        width: 100%;
        justify-content: space-between;
        padding: 14px 20px;
        margin-top: 16px;
    }

    .fb-button-label {
        font-size: 1em;
    }

    .fb-button-subtitle {
        font-size: 0.75em;
    }

    .fb-button-icon {
        width: 28px;
        height: 28px;
    }

    .fb-button-icon svg {
        width: 18px;
        height: 18px;
    }

    .fb-button-play {
        width: 32px;
        height: 32px;
    }

    .fb-button-play svg {
        width: 14px;
        height: 14px;
    }

    .bookmaker-options-container {
        grid-template-columns: 1fr;
        gap: 24px;
        margin-bottom: 40px;
    }

    .bookmaker-card-inner {
        padding: 24px 20px;
        min-height: 500px;
    }

    .bookmaker-badge {
        font-size: 0.7rem;
        padding: 4px 10px;
    }

    .bookmaker-logo {
        max-width: 160px;
    }

    .bookmaker-name {
        font-size: 1.6rem;
    }

    .feature-text {
        font-size: 0.9rem;
    }

    .info-cards-container {
        gap: 16px;
        margin-bottom: 32px;
    }

    .info-card {
        flex-direction: column;
        text-align: center;
        padding: 20px;
    }

    .info-card-icon {
        width: 28px;
        height: 28px;
    }

    .info-card-title {
        font-size: 1.1rem;
    }

    .info-card-text {
        font-size: 0.9rem;
    }

    .choice-footer {
        flex-direction: column;
        gap: 8px;
        padding: 20px;
    }

    .language-switcher-top {
        top: 12px;
        right: 12px;
    }

    .floating-shape {
        opacity: 0.3;
    }
}

@media (max-width: 480px) {
    .container-choice {
        width: 98%;
    }

    .choice-logo {
        width: 70px;
        height: 70px;
    }

    .choice-title {
        font-size: 1.75rem;
    }

    .facebook-video-button {
        font-size: 0.95em;
        padding: 12px 16px;
        gap: 10px;
    }

    .fb-button-icon {
        width: 26px;
        height: 26px;
    }

    .fb-button-play {
        width: 30px;
        height: 30px;
    }

    .bookmaker-card-inner {
        padding: 20px 16px;
        min-height: 480px;
    }

    .bookmaker-logo-wrapper {
        padding: 16px;
        margin: 16px 0 20px;
    }

    .bookmaker-logo {
        max-width: 140px;
    }

    .bookmaker-name {
        font-size: 1.5rem;
        margin-bottom: 16px;
    }

    .feature-item {
        padding: 12px 0;
    }

    .bookmaker-cta {
        padding: 14px 20px;
        font-size: 0.95rem;
    }

    .info-card {
        padding: 16px;
    }
}

/* ============================================
   PERFORMANCE OPTIMIZATIONS
   ============================================ */
.bookmaker-option,
.info-card,
.bookmaker-logo,
.card-glow,
.card-shine,
.facebook-video-button {
    will-change: transform;
}

/* ============================================
   REDUCED MOTION
   ============================================ */
@media (prefers-reduced-motion: reduce) {
    *,
    *::before,
    *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
    
    .floating-shape {
        animation: none;
    }

    .fb-button-shine {
        animation: none;
    }

    .fb-button-play {
        animation: none;
    }
}

/* ============================================
   PRINT STYLES
   ============================================ */
@media print {
    .animated-background,
    .language-switcher-top,
    .floating-shape,
    .facebook-video-button {
        display: none;
    }
    
    .bookmaker-card-inner {
        border: 1px solid #000;
        box-shadow: none;
    }
}

/* ============================================
   ACCESSIBILITY - FOCUS STYLES
   ============================================ */
.facebook-video-button:focus-visible,
.bookmaker-option:focus-visible {
    outline: 2px solid var(--primary-color);
    outline-offset: 2px;
}

/* ============================================
   LOADER STYLES
   ============================================ */
#loader-wrapper {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: var(--bg-primary);
    z-index: 9999;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: opacity 0.5s ease, visibility 0.5s ease;
}

#loader-wrapper.loaded {
    opacity: 0;
    visibility: hidden;
}

.dots-loader {
    display: flex;
    gap: 12px;
}

.dots-loader .dot {
    width: 16px;
    height: 16px;
    background: var(--primary-color);
    border-radius: 50%;
    animation: dotPulse 1.4s ease-in-out infinite;
}

.dots-loader .dot:nth-child(1) {
    animation-delay: 0s;
}

.dots-loader .dot:nth-child(2) {
    animation-delay: 0.2s;
}

.dots-loader .dot:nth-child(3) {
    animation-delay: 0.4s;
}

@keyframes dotPulse {
    0%, 80%, 100% {
        transform: scale(0.8);
        opacity: 0.5;
    }
    40% {
        transform: scale(1.2);
        opacity: 1;
    }
}