/* ============================================
   Cookie Consent Pop-up - Vendoprone
   Design blanc, sobre, 2 boutons: Choisir | Accepter
   ============================================ */

/* Overlay */
.cookie-consent-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.4);
    z-index: 9998;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.3s ease, visibility 0.3s ease;
}

.cookie-consent-overlay.active {
    opacity: 1;
    visibility: visible;
}

/* Pop-up Container - mobile : en bas ; desktop : coin gauche en bas */
.cookie-consent-popup {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    transform: translateY(100%);
    background: #ffffff;
    box-shadow: 0 -4px 24px rgba(0, 0, 0, 0.15);
    z-index: 9999;
    padding: 0;
    max-width: 100%;
    width: 100%;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.3s ease, visibility 0.3s ease, transform 0.3s ease;
    border-radius: 16px 16px 0 0;
}

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

@media (min-width: 768px) {
    .cookie-consent-popup {
        bottom: 24px;
        left: 24px;
        right: auto;
        width: 520px;
        max-width: calc(100vw - 48px);
        transform: translateX(-120%);
        box-shadow: 0 8px 32px rgba(0, 0, 0, 0.15);
        border-radius: 12px;
    }

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

/* Bouton fermer (X) - coin supérieur droit */
.cookie-consent-close {
    position: absolute;
    top: 16px;
    right: 16px;
    width: 28px;
    height: 28px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: none;
    border: none;
    font-size: 22px;
    color: #999;
    cursor: pointer;
    padding: 0;
    line-height: 1;
    font-family: system-ui, sans-serif;
    transition: color 0.2s ease;
}

.cookie-consent-close:hover {
    color: #333;
}

/* Header - titre */
.cookie-consent-header {
    padding: 24px 48px 0 24px;
    margin-bottom: 16px;
}

.cookie-consent-header h3 {
    margin: 0;
    font-size: 18px;
    font-weight: 700;
    color: #1F1F25;
}

/* Content - texte et lien */
.cookie-consent-content {
    padding: 0 24px;
    margin-bottom: 20px;
}

.cookie-consent-content p {
    margin: 0 0 12px 0;
    font-size: 14px;
    line-height: 1.6;
    color: #333;
}

.cookie-consent-content a {
    color: #1F1F25;
    text-decoration: underline;
    font-size: 14px;
    transition: color 0.2s ease;
}

.cookie-consent-content a:hover {
    color: #d25400;
}

/* Catégories (masquées par défaut, affichées au clic sur Choisir) */
.cookie-categories {
    display: none;
    padding: 0 24px 20px;
    margin-bottom: 0;
    border-top: 1px solid #eee;
    padding-top: 20px;
    margin: 0 24px 20px;
}

.cookie-categories.active {
    display: block;
}

.cookie-category {
    background: #f9f9f9;
    border: 1px solid #e5e5e5;
    border-radius: 8px;
    padding: 12px 14px;
    margin-bottom: 10px;
    transition: all 0.2s ease;
}

.cookie-category.active {
    border-color: #d25400;
    background: #fff8f5;
}

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

.cookie-category-title {
    font-weight: 600;
    color: #1F1F25;
    font-size: 14px;
}

.cookie-category-toggle {
    position: relative;
    width: 44px;
    height: 24px;
    background: #ccc;
    border-radius: 12px;
    cursor: pointer;
    transition: background 0.2s ease;
    flex-shrink: 0;
}

.cookie-category-toggle.active {
    background: #d25400;
}

.cookie-category-toggle::after {
    content: '';
    position: absolute;
    width: 20px;
    height: 20px;
    border-radius: 50%;
    background: white;
    top: 2px;
    left: 2px;
    transition: transform 0.2s ease;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.2);
}

.cookie-category-toggle.active::after {
    transform: translateX(20px);
}

.cookie-category-description {
    margin-top: 8px;
    font-size: 12px;
    color: #666;
    line-height: 1.5;
    display: none;
}

.cookie-category.active .cookie-category-description {
    display: block;
}

.cookie-consent-btn-save {
    margin-top: 16px;
    width: 100%;
    background: #1F1F25 !important;
    color: #fff !important;
}

/* Boutons - Choisir | Accepter */
.cookie-consent-buttons {
    display: flex;
    gap: 12px;
    padding: 20px 24px 24px;
    border-top: 1px solid #eee;
}

.cookie-consent-btn {
    flex: 1;
    min-width: 0;
    padding: 12px 20px;
    border-radius: 8px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
    text-align: center;
}

/* Choisir - bordure noire, fond blanc */
.cookie-consent-btn-outline {
    background: #ffffff;
    color: #1F1F25;
    border: 2px solid #1F1F25;
}

.cookie-consent-btn-outline:hover {
    background: #f5f5f5;
    border-color: #1F1F25;
}

/* Accepter - fond orange Vendoprone */
.cookie-consent-btn-primary {
    background: #1F1F25;
    color: #ffffff;
    border: 2px solid #1F1F25;
}

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

/* Responsive mobile */
@media (max-width: 767px) {
    .cookie-consent-popup {
        width: 100%;
    }

    .cookie-consent-header {
        padding-right: 40px;
    }

    .cookie-consent-buttons {
        flex-direction: column;
    }

    .cookie-consent-btn {
        width: 100%;
    }
}
