/* ===========================================
   Cookie Consent Banner - DeepBetting
   Style: Cyberpunk / Neon Pink accent
   =========================================== */

/* Variables héritées du site + spécifiques */
:root {
    --cookie-accent: #ff2d92;
    --cookie-accent-glow: rgba(255, 45, 146, 0.4);
    --cookie-bg: rgba(18, 18, 26, 0.95);
    --cookie-border: rgba(255, 45, 146, 0.3);
    --cookie-text: #ffffff;
    --cookie-text-muted: #8892a4;
}

/* ===== BANDEAU PRINCIPAL ===== */
.cookie-consent {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    z-index: 9999;
    background: var(--cookie-bg);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border-top: 1px solid var(--cookie-border);
    box-shadow: 0 -10px 60px rgba(255, 45, 146, 0.15);
    padding: 1.5rem 5%;
    transform: translateY(100%);
    opacity: 0;
    transition: transform 0.5s cubic-bezier(0.16, 1, 0.3, 1), 
                opacity 0.4s ease;
}

.cookie-consent.active {
    transform: translateY(0);
    opacity: 1;
}

.cookie-consent.hiding {
    transform: translateY(100%);
    opacity: 0;
}

/* Container principal */
.cookie-consent__container {
    max-width: 1400px;
    margin: 0 auto;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 2rem;
}

/* ===== CONTENU TEXTE ===== */
.cookie-consent__content {
    flex: 1;
    min-width: 0;
}

.cookie-consent__title {
    font-family: 'Orbitron', sans-serif;
    font-size: 1.1rem;
    font-weight: 700;
    color: var(--cookie-accent);
    margin-bottom: 0.5rem;
    display: flex;
    align-items: center;
    gap: 0.6rem;
    text-shadow: 0 0 20px var(--cookie-accent-glow);
}

.cookie-consent__title i {
    font-size: 1.2rem;
}

.cookie-consent__text {
    font-family: 'Rajdhani', sans-serif;
    font-size: 0.95rem;
    color: var(--cookie-text-muted);
    line-height: 1.5;
    margin: 0;
}

.cookie-consent__text a {
    color: var(--cookie-accent);
    text-decoration: none;
    transition: all 0.3s ease;
}

.cookie-consent__text a:hover {
    text-decoration: underline;
    text-shadow: 0 0 10px var(--cookie-accent-glow);
}

/* ===== BOUTONS ===== */
.cookie-consent__actions {
    display: flex;
    gap: 0.75rem;
    flex-shrink: 0;
}

.cookie-btn {
    font-family: 'Rajdhani', sans-serif;
    font-size: 0.9rem;
    font-weight: 600;
    letter-spacing: 0.5px;
    padding: 0.7rem 1.4rem;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.3s ease;
    border: none;
    white-space: nowrap;
}

/* Bouton Refuser */
.cookie-btn--decline {
    background: transparent;
    border: 1px solid var(--cookie-text-muted);
    color: var(--cookie-text-muted);
}

.cookie-btn--decline:hover {
    border-color: var(--cookie-text);
    color: var(--cookie-text);
    background: rgba(255, 255, 255, 0.05);
}

/* Bouton Personnaliser */
.cookie-btn--settings {
    background: transparent;
    border: 1px solid var(--cookie-accent);
    color: var(--cookie-accent);
}

.cookie-btn--settings:hover {
    background: rgba(255, 45, 146, 0.1);
    box-shadow: 0 0 20px var(--cookie-accent-glow);
}

/* Bouton Accepter tout */
.cookie-btn--accept {
    background: linear-gradient(135deg, var(--cookie-accent) 0%, #b14aed 100%);
    color: #0a0a0f;
    position: relative;
    overflow: hidden;
}

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

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

.cookie-btn--accept:hover {
    box-shadow: 0 0 30px var(--cookie-accent-glow);
    transform: translateY(-2px);
}

/* ===== MODAL PERSONNALISATION ===== */
.cookie-modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.85);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    z-index: 10000;
    display: none;
    align-items: center;
    justify-content: center;
    padding: 1rem;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.cookie-modal-overlay.active {
    display: flex;
    opacity: 1;
}

.cookie-modal {
    background: var(--cookie-bg);
    border: 1px solid var(--cookie-border);
    border-radius: 16px;
    width: 100%;
    max-width: 550px;
    max-height: 90vh;
    overflow-y: auto;
    box-shadow: 0 0 60px var(--cookie-accent-glow);
    transform: scale(0.9);
    opacity: 0;
    transition: transform 0.4s cubic-bezier(0.16, 1, 0.3, 1),
                opacity 0.3s ease;
}

.cookie-modal-overlay.active .cookie-modal {
    transform: scale(1);
    opacity: 1;
}

/* Scrollbar personnalisée pour la modal */
.cookie-modal::-webkit-scrollbar {
    width: 6px;
}

.cookie-modal::-webkit-scrollbar-track {
    background: rgba(255, 255, 255, 0.05);
}

.cookie-modal::-webkit-scrollbar-thumb {
    background: var(--cookie-accent);
    border-radius: 3px;
}

/* Header de la modal */
.cookie-modal__header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1.5rem;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.cookie-modal__title {
    font-family: 'Orbitron', sans-serif;
    font-size: 1.2rem;
    font-weight: 700;
    color: var(--cookie-text);
    margin: 0;
}

.cookie-modal__close {
    background: none;
    border: none;
    color: var(--cookie-text-muted);
    font-size: 1.5rem;
    cursor: pointer;
    padding: 0.25rem;
    line-height: 1;
    transition: all 0.3s ease;
}

.cookie-modal__close:hover {
    color: var(--cookie-accent);
    transform: rotate(90deg);
}

/* Corps de la modal */
.cookie-modal__body {
    padding: 1.5rem;
}

.cookie-modal__intro {
    font-family: 'Rajdhani', sans-serif;
    font-size: 0.95rem;
    color: var(--cookie-text-muted);
    line-height: 1.6;
    margin-bottom: 1.5rem;
}

/* Catégories de cookies */
.cookie-category {
    background: rgba(0, 0, 0, 0.3);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 12px;
    padding: 1.25rem;
    margin-bottom: 1rem;
    transition: border-color 0.3s ease;
}

.cookie-category:hover {
    border-color: rgba(255, 45, 146, 0.3);
}

.cookie-category:last-child {
    margin-bottom: 0;
}

.cookie-category__header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 0.75rem;
}

.cookie-category__name {
    font-family: 'Orbitron', sans-serif;
    font-size: 0.95rem;
    font-weight: 600;
    color: var(--cookie-text);
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.cookie-category__name i {
    color: var(--cookie-accent);
    font-size: 1rem;
}

.cookie-category__description {
    font-family: 'Rajdhani', sans-serif;
    font-size: 0.9rem;
    color: var(--cookie-text-muted);
    line-height: 1.5;
    margin: 0;
}

/* Badge "Toujours actif" */
.cookie-badge {
    font-family: 'Rajdhani', sans-serif;
    font-size: 0.75rem;
    font-weight: 600;
    padding: 0.3rem 0.6rem;
    border-radius: 4px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.cookie-badge--required {
    background: rgba(0, 240, 255, 0.15);
    color: #00f0ff;
    border: 1px solid rgba(0, 240, 255, 0.3);
}

/* Toggle Switch */
.cookie-toggle {
    position: relative;
    width: 48px;
    height: 26px;
    flex-shrink: 0;
}

.cookie-toggle input {
    opacity: 0;
    width: 0;
    height: 0;
}

.cookie-toggle__slider {
    position: absolute;
    cursor: pointer;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 26px;
    transition: all 0.3s ease;
}

.cookie-toggle__slider::before {
    content: '';
    position: absolute;
    height: 18px;
    width: 18px;
    left: 3px;
    bottom: 3px;
    background: var(--cookie-text-muted);
    border-radius: 50%;
    transition: all 0.3s cubic-bezier(0.68, -0.55, 0.265, 1.55);
}

.cookie-toggle input:checked + .cookie-toggle__slider {
    background: rgba(255, 45, 146, 0.3);
    border-color: var(--cookie-accent);
}

.cookie-toggle input:checked + .cookie-toggle__slider::before {
    transform: translateX(22px);
    background: var(--cookie-accent);
    box-shadow: 0 0 10px var(--cookie-accent-glow);
}

.cookie-toggle input:focus + .cookie-toggle__slider {
    box-shadow: 0 0 0 2px var(--cookie-accent-glow);
}

/* Footer de la modal */
.cookie-modal__footer {
    display: flex;
    gap: 0.75rem;
    padding: 1.5rem;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
}

.cookie-modal__footer .cookie-btn {
    flex: 1;
    text-align: center;
}

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

/* Tablette */
@media (max-width: 900px) {
    .cookie-consent__container {
        flex-direction: column;
        align-items: stretch;
        gap: 1.25rem;
    }
    
    .cookie-consent__actions {
        justify-content: stretch;
    }
    
    .cookie-btn {
        flex: 1;
        text-align: center;
    }
}

/* Mobile */
@media (max-width: 600px) {
    .cookie-consent {
        padding: 1.25rem 4%;
    }
    
    .cookie-consent__title {
        font-size: 1rem;
    }
    
    .cookie-consent__text {
        font-size: 0.85rem;
    }
    
    .cookie-consent__actions {
        flex-direction: column;
        gap: 0.5rem;
    }
    
    .cookie-btn {
        width: 100%;
        padding: 0.85rem 1rem;
    }
    
    /* Modal mobile */
    .cookie-modal {
        max-height: 85vh;
        border-radius: 16px 16px 0 0;
        position: fixed;
        bottom: 0;
        left: 0;
        right: 0;
        max-width: 100%;
    }
    
    .cookie-modal-overlay {
        align-items: flex-end;
        padding: 0;
    }
    
    .cookie-modal__header,
    .cookie-modal__body,
    .cookie-modal__footer {
        padding: 1.25rem;
    }
    
    .cookie-modal__footer {
        flex-direction: column;
    }
    
    .cookie-category {
        padding: 1rem;
    }
    
    .cookie-category__header {
        flex-wrap: wrap;
        gap: 0.5rem;
    }
}

/* Très petit écran */
@media (max-width: 380px) {
    .cookie-consent__title {
        font-size: 0.9rem;
    }
    
    .cookie-btn {
        font-size: 0.85rem;
        padding: 0.75rem 0.8rem;
    }
}

/* ===== ANIMATIONS ===== */
@keyframes pulseGlow {
    0%, 100% {
        box-shadow: 0 -10px 60px rgba(255, 45, 146, 0.15);
    }
    50% {
        box-shadow: 0 -10px 80px rgba(255, 45, 146, 0.25);
    }
}

.cookie-consent.active {
    animation: pulseGlow 3s ease-in-out infinite;
}

/* Préférence pour les mouvements réduits */
@media (prefers-reduced-motion: reduce) {
    .cookie-consent,
    .cookie-modal,
    .cookie-toggle__slider,
    .cookie-toggle__slider::before,
    .cookie-btn {
        transition: none;
    }
    
    .cookie-consent.active {
        animation: none;
    }
}
