
/* ===== BANDEAU PRINCIPAL ===== */
.cookie-banner {
    position: fixed !important;
    z-index: 999999 !important;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
    font-size: 14px;
    line-height: 1.5;
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
    transition: opacity 0.4s ease, visibility 0.4s ease;
    margin: 0 !important;
    padding: 0 !important;
    border: none !important;
    box-shadow: none !important;
    background: transparent !important;
    box-sizing: border-box !important;
}

/* Forcer le bandeau à ne pas être affecté par le layout */
.cookie-banner * {
    box-sizing: border-box !important;
}

/* Etat visible : priorité maximale */
#cookie-banner.cookie-banner--visible {
    opacity: 1 !important;
    visibility: visible !important;
    pointer-events: auto !important;
}

/* Position bas (par défaut) */
#cookie-banner.cookie-banner--bottom {
    bottom: 0 !important;
    left: 0 !important;
    right: 0 !important;
    top: auto !important;
}

/* Position haut */
#cookie-banner.cookie-banner--top {
    top: 0 !important;
    left: 0 !important;
    right: 0 !important;
    bottom: auto !important;
}

/* Position centre (modal) */
.cookie-banner--center {
    top: 50% !important;
    left: 50% !important;
    transform: translate(-50%, -50%) !important;
    max-width: 600px !important;
    width: 90% !important;
    border-radius: 12px !important;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3) !important;
}

/* ===== THÈME CLAIR ===== */
#cookie-banner.cookie-banner--light {
    background: #ffffff !important;
    color: #333333 !important;
    box-shadow: 0 -4px 20px rgba(0, 0, 0, 0.15) !important;
}

#cookie-banner.cookie-banner--light.cookie-banner--top {
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.15) !important;
}

/* ===== THÈME SOMBRE ===== */
#cookie-banner.cookie-banner--dark {
    background: #1a1a2e !important;
    color: #ffffff !important;
    box-shadow: 0 -4px 20px rgba(0, 0, 0, 0.3) !important;
}

#cookie-banner.cookie-banner--dark.cookie-banner--top {
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.3) !important;
}

/* ===== CONTENEUR ===== */
.cookie-banner__container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 20px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 30px;
}

@media (max-width: 768px) {
    .cookie-banner__container {
        flex-direction: column;
        text-align: center;
        gap: 20px;
    }
}

/* ===== CONTENU ===== */
.cookie-banner__content {
    flex: 1;
}

.cookie-banner__title {
    margin: 0 0 10px 0;
    font-size: 18px;
    font-weight: 600;
}

.cookie-banner__text {
    margin: 0 0 10px 0;
    line-height: 1.6;
}

.cookie-banner__link {
    color: #0066cc;
    text-decoration: underline;
    font-weight: 500;
    transition: color 0.2s;
}

.cookie-banner--dark .cookie-banner__link {
    color: #66b3ff;
}

.cookie-banner__link:hover {
    color: #0052a3;
}

/* ===== ACTIONS ===== */
.cookie-banner__actions {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    justify-content: center;
}

/* ===== BOUTONS ===== */
.cookie-banner__btn {
    padding: 12px 24px;
    border-radius: 6px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s ease;
    border: 2px solid transparent;
    font-size: 14px;
    white-space: nowrap;
}

/* Bouton principal (Tout accepter) */
.cookie-banner__btn--accept-all {
    background: #10b981;
    color: white;
    border-color: #10b981;
}

.cookie-banner__btn--accept-all:hover {
    background: #059669;
    border-color: #059669;
}

/* Bouton refuser */
.cookie-banner__btn--reject {
    background: transparent;
    color: #666;
    border-color: #ddd;
    display: none;
}

.cookie-banner--dark .cookie-banner__btn--reject {
    color: #ccc;
    border-color: #444;
}

.cookie-banner__btn--reject:hover {
    background: #f3f4f6;
    border-color: #ccc;
}

.cookie-banner--dark .cookie-banner__btn--reject:hover {
    background: #2d2d44;
    border-color: #555;
}

/* Bouton personnaliser */
.cookie-banner__btn--customize {
    background: transparent;
    color: #0066cc;
    border-color: #0066cc;
}

.cookie-banner--dark .cookie-banner__btn--customize {
    color: #66b3ff;
    border-color: #66b3ff;
}

.cookie-banner__btn--customize:hover {
    background: #0066cc;
    color: white;
}

.cookie-banner--dark .cookie-banner__btn--customize:hover {
    background: #66b3ff;
    color: #1a1a2e;
}

/* Bouton sauvegarder */
.cookie-banner__btn--save {
    background: #10b981;
    color: white;
    border-color: #10b981;
    padding: 14px 32px;
    font-size: 16px;
}

.cookie-banner__btn--save:hover {
    background: #059669;
    border-color: #059669;
}

/* ===== MODAL DE PERSONNALISATION ===== */
.cookie-modal {
    position: fixed !important;
    top: 0 !important;
    left: 0 !important;
    right: 0 !important;
    bottom: 0 !important;
    z-index: 9999999 !important;
    display: none !important;
    align-items: center !important;
    justify-content: center !important;
    padding: 20px !important;
    margin: 0 !important;
    background: transparent !important;
    border: none !important;
    box-sizing: border-box !important;
}

.cookie-modal.cookie-modal--visible {
    display: flex !important;
}

.cookie-modal * {
    box-sizing: border-box !important;
}

.cookie-modal__overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.6);
    backdrop-filter: blur(4px);
}

.cookie-modal__container {
    position: relative !important;
    background: white !important;
    border-radius: 16px !important;
    max-width: 600px !important;
    width: 100% !important;
    max-height: 90vh !important;
    overflow-y: auto !important;
    box-shadow: 0 25px 80px rgba(0, 0, 0, 0.3) !important;
    animation: modalSlideIn 0.3s ease !important;
    border: none !important;
    padding: 0 !important;
    margin: 0 !important;
}

@keyframes modalSlideIn {
    from {
        opacity: 0;
        transform: translateY(-30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.cookie-modal__header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 24px 24px 0;
    border-bottom: 1px solid #e5e7eb;
    margin-bottom: 20px;
}

.cookie-modal__title {
    margin: 0;
    font-size: 20px;
    font-weight: 600;
    color: #111827;
    padding-bottom: 20px;
}

.cookie-modal__close {
    background: none;
    border: none;
    font-size: 28px;
    cursor: pointer;
    color: #6b7280;
    padding: 0;
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    transition: all 0.2s;
    margin-bottom: 10px;
}

.cookie-modal__close:hover {
    background: #f3f4f6;
    color: #111827;
}

.cookie-modal__body {
    padding: 0 24px;
}

.cookie-modal__footer {
    padding: 24px;
    border-top: 1px solid #e5e7eb;
    text-align: center;
}

/* ===== CATÉGORIES DE COOKIES ===== */
.cookie-category {
    border-bottom: 1px solid #e5e7eb;
    padding: 20px 0;
}

.cookie-category:last-child {
    border-bottom: none;
}

.cookie-category__header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 20px;
}

@media (max-width: 480px) {
    .cookie-category__header {
        flex-direction: column;
        align-items: stretch;
    }
}

.cookie-category__info {
    flex: 1;
}

.cookie-category__title {
    margin: 0 0 8px 0;
    font-size: 16px;
    font-weight: 600;
    color: #111827;
}

.cookie-category__description {
    margin: 0;
    color: #6b7280;
    font-size: 14px;
    line-height: 1.5;
}

/* ===== TOGGLE SWITCH ===== */
.cookie-toggle {
    display: flex;
    align-items: center;
    flex-shrink: 0;
}

.cookie-toggle__input {
    display: none;
}

.cookie-toggle__label {
    display: flex;
    align-items: center;
    cursor: pointer;
    user-select: none;
    gap: 10px;
}

.cookie-toggle__switch {
    position: relative;
    width: 52px;
    height: 28px;
    background: #d1d5db;
    border-radius: 14px;
    transition: background 0.3s;
    flex-shrink: 0;
}

.cookie-toggle__switch::after {
    content: '';
    position: absolute;
    top: 2px;
    left: 2px;
    width: 24px;
    height: 24px;
    background: white;
    border-radius: 50%;
    transition: transform 0.3s;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
}

.cookie-toggle__input:checked + .cookie-toggle__label .cookie-toggle__switch {
    background: #10b981;
}

.cookie-toggle__input:checked + .cookie-toggle__label .cookie-toggle__switch::after {
    transform: translateX(24px);
}

.cookie-toggle__input:disabled + .cookie-toggle__label .cookie-toggle__switch {
    background: #10b981;
    opacity: 0.6;
}

.cookie-toggle__input:disabled + .cookie-toggle__label {
    cursor: not-allowed;
}

.cookie-toggle__status {
    font-size: 12px;
    color: #10b981;
    font-weight: 500;
    white-space: nowrap;
}

/* ===== WIDGET RÉOUVERTURE ===== */
.cookie-widget {
    position: fixed !important;
    bottom: 20px !important;
    left: 20px !important;
    z-index: 99999 !important;
    display: block !important;
    margin: 0 !important;
    padding: 0 !important;
}

.cookie-widget--hidden {
    display: none !important;
}

.cookie-widget__btn {
    width: 48px;
    height: 48px;
    border-radius: 50%;
    background: #ffffff;
    border: none;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
    cursor: pointer;
    display: none;
    align-items: center;
    justify-content: center;
    transition: all 0.3s;
    color: #333;
}

.cookie-widget__btn:hover {
    transform: scale(1.1);
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.25);
}

.cookie-widget__btn svg {
    width: 24px;
    height: 24px;
}

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

@keyframes slideDown {
    from {
        transform: translateY(-100%);
        opacity: 0;
    }
    to {
        transform: translateY(0);
        opacity: 1;
    }
}

#cookie-banner.cookie-banner--bottom.cookie-banner--visible {
    animation: slideUp 0.4s ease;
}

#cookie-banner.cookie-banner--top.cookie-banner--visible {
    animation: slideDown 0.4s ease;
}

/* ===== SCROLLBAR MODAL ===== */
.cookie-modal__container::-webkit-scrollbar {
    width: 8px;
}

.cookie-modal__container::-webkit-scrollbar-track {
    background: #f3f4f6;
    border-radius: 4px;
}

.cookie-modal__container::-webkit-scrollbar-thumb {
    background: #d1d5db;
    border-radius: 4px;
}

.cookie-modal__container::-webkit-scrollbar-thumb:hover {
    background: #9ca3af;
}

/* ===== BODY QUAND MODAL OUVERT ===== */
body.cookie-modal-open {
    overflow: hidden !important;
    padding-right: 17px; /* Compense la scrollbar */
}
