/* Overlay */
.consent-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    z-index: 9998;
    animation: fadeIn 0.3s ease;
}

/* Widget principal */
.consent-widget {
    position: fixed;
    left: 50%;
    transform: translateX(-50%);
    max-width: 600px;
    width: 90%;
    background: #fff;
    border-radius: 12px;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.2);
    z-index: 9999;
    padding: 30px;
    animation: slideUp 0.4s ease;
}

/* Positions */
.consent-bottom {
    bottom: 20px;
}

.consent-top {
    top: 20px;
}

.consent-center {
    top: 50%;
    transform: translate(-50%, -50%);
}

/* Thème clair */
.consent-theme-light {
    background: #ffffff;
    color: #333;
}

/* Thème sombre */
.consent-theme-dark {
    background: #1a1a1a;
    color: #fff;
}

.consent-theme-dark .consent-description {
    color: #ccc;
}

.consent-theme-dark .consent-category p {
    color: #aaa;
}

/* Titre */
.consent-title {
    font-size: 24px;
    font-weight: 700;
    margin: 0 0 15px 0;
    color: inherit;
}

/* Description */
.consent-description {
    font-size: 15px;
    line-height: 1.6;
    color: #666;
    margin: 0 0 25px 0;
}

/* Boutons */
.consent-buttons {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
    margin-top: 20px;
}

.consent-btn {
    padding: 12px 24px;
    border: none;
    border-radius: 8px;
    font-size: 15px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    flex: 1;
    min-width: 140px;
}

.consent-btn-primary {
    background: #4CAF50;
    color: white;
}

.consent-btn-primary:hover {
    background: #45a049;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(76, 175, 80, 0.3);
}

.consent-btn-secondary {
    background: #2196F3;
    color: white;
}

.consent-btn-secondary:hover {
    background: #0b7dda;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(33, 150, 243, 0.3);
}

.consent-btn-outline {
    background: transparent;
    color: #666;
    border: 2px solid #ddd;
}

.consent-btn-outline:hover {
    background: #f5f5f5;
    border-color: #999;
}

.consent-theme-dark .consent-btn-outline {
    color: #fff;
    border-color: #444;
}

.consent-theme-dark .consent-btn-outline:hover {
    background: #333;
}

/* Préférences */
.consent-preferences {
    animation: slideUp 0.3s ease;
}

.consent-category {
    margin-bottom: 20px;
    padding-bottom: 20px;
    border-bottom: 1px solid #eee;
}

.consent-theme-dark .consent-category {
    border-bottom-color: #333;
}

.consent-category:last-of-type {
    border-bottom: none;
}

.consent-category-header {
    display: flex;
    align-items: flex-start;
    gap: 15px;
}

.consent-category strong {
    display: block;
    font-size: 16px;
    margin-bottom: 5px;
}

.consent-category p {
    font-size: 14px;
    color: #777;
    margin: 0;
    line-height: 1.5;
}

/* Switch Toggle */
.consent-switch {
    position: relative;
    display: inline-block;
    width: 50px;
    height: 26px;
    flex-shrink: 0;
}

.consent-switch input {
    opacity: 0;
    width: 0;
    height: 0;
}

.consent-slider {
    position: absolute;
    cursor: pointer;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: #ccc;
    transition: 0.3s;
    border-radius: 34px;
}

.consent-slider:before {
    position: absolute;
    content: "";
    height: 20px;
    width: 20px;
    left: 3px;
    bottom: 3px;
    background-color: white;
    transition: 0.3s;
    border-radius: 50%;
}

.consent-switch input:checked + .consent-slider {
    background-color: #4CAF50;
}

.consent-switch input:checked + .consent-slider:before {
    transform: translateX(24px);
}

.consent-switch input:disabled + .consent-slider {
    opacity: 0.5;
    cursor: not-allowed;
}

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

@keyframes slideUp {
    from {
        opacity: 0;
        transform: translateX(-50%) translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateX(-50%) translateY(0);
    }
}

.consent-center {
    animation: slideCenter 0.4s ease;
}

@keyframes slideCenter {
    from {
        opacity: 0;
        transform: translate(-50%, -45%);
    }
    to {
        opacity: 1;
        transform: translate(-50%, -50%);
    }
}

/* Responsive */
@media (max-width: 768px) {
    .consent-widget {
        width: 95%;
        padding: 20px;
        max-height: 90vh;
        overflow-y: auto;
    }

    .consent-title {
        font-size: 20px;
    }

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

    .consent-btn {
        width: 100%;
        min-width: auto;
    }

    .consent-category-header {
        gap: 10px;
    }
}
