/* ========================================
   COOKIE CONSENT BANNER - COMPACT & PREMIUM
   Thème Chronéa Agency
======================================== */

/* Pas d'overlay - bandeau discret */
.cookie-consent-overlay {
    display: none;
}

/* Bandeau compact en bas à droite */
.cookie-consent {
    position: fixed;
    bottom: 2rem;
    right: 2rem;
    width: 420px;
    max-width: calc(100vw - 4rem);
    background: #ffffff;
    border: 1px solid #EAE8E0;
    box-shadow: 0 8px 40px rgba(15, 15, 15, 0.12);
    z-index: 9999;
    transform: translateX(500px);
    opacity: 0;
    transition: all 0.5s cubic-bezier(0.16, 1, 0.3, 1);
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
}

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

.cookie-consent__container {
    padding: 1.5rem;
}

/* En-tête compact */
.cookie-consent__header {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    margin-bottom: 1rem;
}

.cookie-consent__icon {
    width: 28px;
    height: 28px;
    background: #D4AF37;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.cookie-consent__icon svg {
    width: 16px;
    height: 16px;
    color: #ffffff;
}

.cookie-consent__title {
    font-size: 1rem;
    font-weight: 500;
    color: #0F0F0F;
    margin: 0;
    font-family: 'Playfair Display', serif;
    letter-spacing: -0.01em;
}

/* Description compacte */
.cookie-consent__description {
    font-size: 0.8125rem;
    line-height: 1.5;
    color: #666666;
    margin-bottom: 1rem;
}

.cookie-consent__description a {
    color: #D4AF37;
    text-decoration: none;
    border-bottom: 1px solid transparent;
    transition: border-color 0.2s ease;
}

.cookie-consent__description a:hover {
    border-bottom-color: #D4AF37;
}

/* Catégories simplifiées */
.cookie-categories {
    display: none;
    /* Masqué par défaut, visible dans modal */
}

/* Afficher les catégories quand expanded */
.cookie-consent.expanded .cookie-categories {
    display: grid;
    gap: 0.625rem;
    margin-bottom: 1rem;
}

.cookie-category {
    background: #F9F9F7;
    border: 1px solid #EAE8E0;
    padding: 0.75rem;
    transition: all 0.2s ease;
}

.cookie-category:hover {
    border-color: #D4AF37;
    background: #ffffff;
}

.cookie-category__header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    cursor: pointer;
    user-select: none;
}

.cookie-category__info {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    flex: 1;
}

.cookie-category__name {
    font-weight: 500;
    font-size: 0.8125rem;
    color: #0F0F0F;
}

.cookie-category__badge {
    font-size: 0.625rem;
    padding: 0.125rem 0.375rem;
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.cookie-category__badge--required {
    background: #F9F9F7;
    color: #666666;
}

.cookie-category__badge--optional {
    background: #F9F9F7;
    color: #666666;
}

/* Toggle Switch - Style Chronéa */
.cookie-toggle {
    position: relative;
    width: 40px;
    height: 22px;
    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-color: #E0E0E0;
    transition: all 0.3s ease;
    border-radius: 22px;
    /* Added for correct styling */
}

.cookie-toggle__slider:before {
    position: absolute;
    content: "";
    height: 16px;
    width: 16px;
    left: 3px;
    bottom: 3px;
    background-color: #ffffff;
    transition: all 0.3s ease;
    border-radius: 50%;
    /* Added for correct styling */
}

.cookie-toggle input:checked+.cookie-toggle__slider {
    background-color: #D4AF37;
}

.cookie-toggle input:checked+.cookie-toggle__slider:before {
    transform: translateX(18px);
}

.cookie-toggle input:disabled+.cookie-toggle__slider {
    cursor: not-allowed;
    opacity: 0.5;
    background-color: #EAE8E0;
}

/* Description détaillée */
.cookie-category__details {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.3s ease;
    margin-top: 0;
}

.cookie-category__details.active {
    max-height: 100px;
    margin-top: 0.5rem;
}

.cookie-category__description {
    font-size: 0.75rem;
    color: #666666;
    line-height: 1.4;
}

/* Boutons compacts - Style Chronéa */
.cookie-consent__actions {
    display: flex;
    gap: 0.5rem;
    flex-direction: column;
}

.cookie-btn {
    padding: 0.625rem 1rem;
    font-weight: 500;
    font-size: 0.8125rem;
    cursor: pointer;
    transition: all 0.3s ease;
    border: 2px solid transparent;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.375rem;
    text-decoration: none;
    white-space: nowrap;
    letter-spacing: 0.02em;
    border-radius: 0;
    /* Added for correct styling */
}

.cookie-btn--primary {
    background-color: #D4AF37;
    color: #ffffff;
    border-color: #D4AF37;
}

.cookie-btn--primary:hover {
    background-color: #B59325;
    border-color: #B59325;
}

.cookie-btn--secondary {
    background: transparent;
    color: #0F0F0F;
    border-color: #0F0F0F;
}

.cookie-btn--secondary:hover {
    background-color: #0F0F0F;
    color: #ffffff;
}

.cookie-btn--tertiary {
    background: transparent;
    color: #666666;
    padding: 0.5rem 1rem;
    font-size: 0.75rem;
}

.cookie-btn--tertiary:hover {
    color: #0F0F0F;
}

/* Bouton personnaliser */
.cookie-btn--customize {
    background: #F9F9F7;
    color: #0F0F0F;
    border-color: #EAE8E0;
    font-size: 0.75rem;
    padding: 0.5rem 1rem;
}

.cookie-btn--customize:hover {
    background: #EAE8E0;
}

/* Modal paramètres */
.cookie-settings-modal {
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%) scale(0.95);
    background: #ffffff;
    border: 1px solid #EAE8E0;
    max-width: 500px;
    width: 90%;
    max-height: 80vh;
    overflow-y: auto;
    box-shadow: 0 20px 60px rgba(15, 15, 15, 0.2);
    z-index: 10000;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
    padding: 2rem;
    border-radius: 0;
    /* Added for correct styling */
}

.cookie-settings-modal.active {
    opacity: 1;
    visibility: visible;
    transform: translate(-50%, -50%) scale(1);
}

.cookie-settings-modal__header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1.5rem;
    padding-bottom: 1rem;
    border-bottom: 1px solid #EAE8E0;
}

.cookie-settings-modal__title {
    font-size: 1.25rem;
    font-weight: 500;
    color: #0F0F0F;
    font-family: 'Playfair Display', serif;
    letter-spacing: -0.01em;
}

.cookie-settings-modal__close {
    width: 32px;
    height: 32px;
    background: #F9F9F7;
    border: none;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s ease;
    border-radius: 0;
    /* Added for correct styling */
}

.cookie-settings-modal__close:hover {
    background: #EAE8E0;
}

/* Responsive */
@media (max-width: 768px) {
    .cookie-consent {
        bottom: 1rem;
        right: 1rem;
        left: 1rem;
        width: auto;
        max-width: none;
    }

    .cookie-consent__container {
        padding: 1.25rem;
    }

    .cookie-consent__title {
        font-size: 0.9375rem;
    }

    .cookie-consent__description {
        font-size: 0.75rem;
    }
}

@media (max-width: 480px) {
    .cookie-consent {
        bottom: 0;
        right: 0;
        left: 0;
        border-left: none;
        border-right: none;
        border-bottom: none;
    }

    .cookie-btn {
        font-size: 0.75rem;
        padding: 0.5rem 0.875rem;
    }
}

/* Animation de chargement */
@keyframes pulse {

    0%,
    100% {
        opacity: 1;
    }

    50% {
        opacity: 0.5;
    }
}

.cookie-btn--loading {
    position: relative;
    pointer-events: none;
    opacity: 0.7;
}

.cookie-btn--loading::after {
    content: '';
    position: absolute;
    width: 14px;
    height: 14px;
    border: 2px solid rgba(255, 255, 255, 0.3);
    border-top-color: #ffffff;
    border-radius: 50%;
    animation: spin 0.6s linear infinite;
    right: 0.75rem;
}

@keyframes spin {
    to {
        transform: rotate(360deg);
    }
}