/* ============================================
   COOKIE CONSENT - LEKYN DARK THEME
   Professional GDPR-compliant cookie banner
   ============================================ */

/* Cookie Consent Banner */
.cookie-consent-banner {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    z-index: 9998;
    opacity: 0;
    transform: translateY(100%);
    transition: opacity 0.3s ease, transform 0.3s ease;
}

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

.cookie-consent-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(20, 20, 18, 0.7);
    backdrop-filter: blur(4px);
}

.cookie-consent-container {
    position: relative;
    background: #2A2A27;
    border-top: 2px solid #FABF03;
    box-shadow: 0 -4px 20px rgba(0, 0, 0, 0.5);
}

.cookie-consent-content {
    max-width: 1400px;
    margin: 0 auto;
    padding: 2rem;
    display: grid;
    grid-template-columns: auto 1fr auto;
    gap: 2rem;
    align-items: center;
}

.cookie-consent-icon {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 60px;
    height: 60px;
    background: rgba(250, 191, 3, 0.1);
    border-radius: 12px;
    flex-shrink: 0;
}

.cookie-consent-message {
    flex: 1;
}

.cookie-consent-actions {
    display: flex;
    gap: 0.75rem;
    flex-shrink: 0;
    flex-wrap: wrap;
}

.cookie-consent-actions button {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    white-space: nowrap;
}

/* Cookie Preferences Modal */
.cookie-preferences-modal {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 9999;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 1rem;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.cookie-preferences-modal.show {
    opacity: 1;
}

.cookie-modal-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(20, 20, 18, 0.9);
    backdrop-filter: blur(8px);
}

.cookie-modal-container {
    position: relative;
    background: #2A2A27;
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 16px;
    max-width: 600px;  /* Réduit de 700px à 600px pour plus de compacité */
    width: 100%;
    max-height: 90vh;
    display: flex;
    flex-direction: column;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.6);
    transform: scale(0.95);
    transition: transform 0.3s ease;
}

.cookie-preferences-modal.show .cookie-modal-container {
    transform: scale(1);
}

.cookie-modal-header {
    padding: 1.5rem;  /* Réduit de 2rem à 1.5rem */
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.cookie-modal-close {
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 8px;
    color: #F5F5F3;
    cursor: pointer;
    transition: all 0.25s ease;
}

.cookie-modal-close:hover {
    background: #FABF03;
    color: #1D1D1B;
    border-color: #FABF03;
    transform: rotate(90deg);
}

.cookie-modal-body {
    padding: 1.5rem;  /* Réduit de 2rem à 1.5rem */
    overflow-y: auto;
    flex: 1;
}

.cookie-modal-body::-webkit-scrollbar {
    width: 8px;
}

.cookie-modal-body::-webkit-scrollbar-track {
    background: rgba(255, 255, 255, 0.05);
    border-radius: 4px;
}

.cookie-modal-body::-webkit-scrollbar-thumb {
    background: #FABF03;
    border-radius: 4px;
}

.cookie-category {
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 12px;
    padding: 1rem;  /* Réduit de 1.5rem à 1rem */
    margin-bottom: 0.75rem;  /* Réduit de 1rem à 0.75rem */
    transition: all 0.25s ease;
}

.cookie-category:hover {
    background: rgba(255, 255, 255, 0.05);
    border-color: rgba(250, 191, 3, 0.2);
}

.cookie-category-header {
    display: flex;
    align-items: center;  /* Changé de flex-start à center pour aligner icône et texte */
    justify-content: space-between;
    gap: 0.75rem;  /* Réduit de 1rem à 0.75rem */
    margin-bottom: 0.5rem;  /* Réduit de 0.75rem à 0.5rem */
}

.cookie-category-details {
    padding-left: 2rem;
    margin-top: 0.25rem;  /* Ajout d'un petit espacement */
}

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

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

.cookie-toggle label {
    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: 28px;
    transition: all 0.3s ease;
}

.cookie-toggle label:before {
    position: absolute;
    content: "";
    height: 20px;
    width: 20px;
    left: 3px;
    bottom: 3px;
    background: #F5F5F3;
    border-radius: 50%;
    transition: all 0.3s ease;
}

.cookie-toggle input:checked + label {
    background: #FABF03;
    border-color: #FABF03;
}

.cookie-toggle input:checked + label:before {
    transform: translateX(24px);
    background: #1D1D1B;
}

.cookie-toggle-disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

.cookie-toggle-disabled label {
    cursor: not-allowed;
    background: rgba(250, 191, 3, 0.3);
    border-color: rgba(250, 191, 3, 0.5);
}

.cookie-modal-footer {
    padding: 1.5rem;  /* Réduit de 2rem à 1.5rem */
    border-top: 1px solid rgba(255, 255, 255, 0.08);
    display: flex;
    gap: 0.75rem;  /* Réduit de 1rem à 0.75rem */
    justify-content: flex-end;
}

.cookie-modal-footer button {
    padding: 0.625rem 1.25rem;  /* Réduit le padding (10px 20px au lieu de 12px 24px) */
    font-size: 0.875rem;  /* Réduit la taille de police (14px) */
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    white-space: nowrap;
}

/* Cookie Settings Button (Fixed) */
.cookie-settings-button {
    position: fixed;
    bottom: 9rem;  /* Positionné au-dessus du scroll to top (qui est à 5rem) avec espacement */
    right: 1.5rem;  /* Même alignement que scroll to top */
    width: 48px;  /* Même taille exacte que scroll to top */
    height: 48px;
    background: #FABF03;
    color: #1D1D1B;
    border: none;
    border-radius: 50%;  /* Même border-radius que scroll to top */
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    box-shadow: 0 4px 20px rgba(250, 191, 3, 0.4);
    transition: all 0.3s ease;
    z-index: 9997;
    opacity: 0;
    transform: scale(0);
}

.cookie-settings-button.show {
    opacity: 1;
    transform: scale(1);
}

.cookie-settings-button:hover {
    transform: scale(1.1);
    box-shadow: 0 6px 30px rgba(250, 191, 3, 0.6);
    background: #FFC933;
}

.cookie-settings-button:active {
    transform: scale(0.95);
}

/* Responsive Design */
@media (max-width: 1024px) {
    .cookie-consent-content {
        grid-template-columns: 1fr;
        gap: 1.5rem;
        text-align: center;
    }
    
    .cookie-consent-icon {
        margin: 0 auto;
    }
    
    .cookie-consent-actions {
        justify-content: center;
    }
}

@media (max-width: 768px) {
    .cookie-consent-content {
        padding: 1.5rem;
    }
    
    .cookie-consent-actions {
        flex-direction: column;
        width: 100%;
    }
    
    .cookie-consent-actions button {
        width: 100%;
        justify-content: center;
    }
    
    .cookie-modal-header,
    .cookie-modal-body,
    .cookie-modal-footer {
        padding: 1.25rem;  /* Réduit de 1.5rem à 1.25rem sur mobile */
    }
    
    .cookie-modal-footer {
        flex-direction: column;
        gap: 0.5rem;  /* Réduit l'espacement sur mobile */
    }
    
    .cookie-modal-footer button {
        width: 100%;
        justify-content: center;
        padding: 0.625rem 1rem;  /* Padding compact sur mobile */
    }
    
    .cookie-settings-button {
        bottom: 9rem;  /* Au-dessus du scroll to top (5rem) avec espacement de 4rem (64px) */
        right: 1rem;  /* Aligné à droite comme scroll to top */
        width: 48px;  /* Même taille sur mobile */
        height: 48px;
    }
    
    .cookie-category {
        padding: 1rem;
    }
    
    .cookie-category-header {
        align-items: center;  /* Garde l'alignement centré sur mobile */
    }
    
    .cookie-toggle {
        flex-shrink: 0;  /* Empêche le toggle de rétrécir */
    }
}

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

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

/* Accessibility */
.cookie-toggle input:focus + label {
    outline: 2px solid #FABF03;
    outline-offset: 2px;
}

.cookie-modal-close:focus,
.cookie-settings-button:focus {
    outline: 2px solid #FABF03;
    outline-offset: 2px;
}

/* Print styles */
@media print {
    .cookie-consent-banner,
    .cookie-preferences-modal,
    .cookie-settings-button {
        display: none !important;
    }
}
