/*!
 * Cookie Consent Discret - Style CookieYes
 * Bannière simple + Modale complète optionnelle
 */

/* ========================================
   BANNIÈRE DISCRÈTE (affichage par défaut)
   ======================================== */

.cc-banner {
    position: fixed;
    bottom: 1rem;
    right: 1rem;
    max-width: 420px;
    width: calc(100% - 2rem);
    background: linear-gradient(135deg, rgba(10, 10, 30, 0.98) 0%, rgba(26, 26, 46, 0.98) 100%);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border: 2px solid rgba(102, 126, 234, 0.4);
    border-radius: 16px;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.5), 0 0 20px rgba(102, 126, 234, 0.2);
    padding: 1.5rem;
    z-index: 999999;
    display: none;
    animation: slideUpBanner 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

.cc-banner.active {
    display: block;
}

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

.cc-banner::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 3px;
    background: linear-gradient(90deg, #667eea 0%, #764ba2 50%, #f093fb 100%);
    border-radius: 16px 16px 0 0;
}

/* Contenu bannière */
.cc-banner-content {
    margin-bottom: 1rem;
}

.cc-banner-title {
    font-size: 1.1rem;
    font-weight: 700;
    color: #ffffff;
    margin-bottom: 0.5rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.cc-banner-text {
    color: rgba(255, 255, 255, 0.85);
    font-size: 0.9rem;
    line-height: 1.5;
}

/* Boutons bannière */
.cc-banner-actions {
    display: flex;
    gap: 0.75rem;
    flex-wrap: wrap;
}

.cc-btn-accept {
    flex: 1;
    min-width: 120px;
    padding: 0.75rem 1.5rem;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: #ffffff;
    border: none;
    border-radius: 10px;
    font-weight: 700;
    font-size: 0.9rem;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 4px 15px rgba(102, 126, 234, 0.4);
}

.cc-btn-accept:hover {
    background: linear-gradient(135deg, #7c8ef5 0%, #8a5cb5 100%);
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(102, 126, 234, 0.6);
}

.cc-btn-reject {
    padding: 0.75rem 1.25rem;
    background: rgba(255, 255, 255, 0.08);
    color: rgba(255, 255, 255, 0.9);
    border: 2px solid rgba(255, 255, 255, 0.2);
    border-radius: 10px;
    font-weight: 600;
    font-size: 0.9rem;
    cursor: pointer;
    transition: all 0.3s ease;
}

.cc-btn-reject:hover {
    background: rgba(255, 255, 255, 0.15);
    border-color: rgba(255, 255, 255, 0.4);
    transform: translateY(-2px);
}

.cc-btn-customize {
    padding: 0.5rem 0;
    background: transparent;
    color: #00d4ff;
    border: none;
    font-weight: 600;
    font-size: 0.85rem;
    cursor: pointer;
    transition: all 0.3s ease;
    text-decoration: underline;
    text-underline-offset: 3px;
    width: 100%;
    text-align: center;
}

.cc-btn-customize:hover {
    color: #4facfe;
}

/* ========================================
   MODALE COMPLÈTE (s'ouvre sur "Personnaliser")
   ======================================== */

.cc-modal {
    position: fixed;
    bottom: 2rem;
    right: 2rem;
    max-width: 600px;
    width: calc(100% - 4rem);
    max-height: 85vh;
    background: linear-gradient(135deg, rgba(10, 10, 30, 0.98) 0%, rgba(26, 26, 46, 0.98) 100%);
    backdrop-filter: blur(25px);
    -webkit-backdrop-filter: blur(25px);
    border: 2px solid rgba(102, 126, 234, 0.4);
    border-radius: 20px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.6), 0 0 40px rgba(102, 126, 234, 0.2);
    padding: 2rem;
    z-index: 1000000;
    overflow-y: auto;
    display: none;
}

.cc-modal.active {
    display: block;
    animation: slideUp 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

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

.cc-modal::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 3px;
    background: linear-gradient(90deg, #667eea 0%, #764ba2 50%, #f093fb 100%);
    border-radius: 20px 20px 0 0;
}

/* Header modale */
.cc-modal-header {
    margin-bottom: 1.5rem;
}

.cc-modal-title {
    font-size: 1.75rem;
    font-weight: 800;
    color: #ffffff;
    margin-bottom: 0.25rem;
    text-shadow: 0 0 20px rgba(102, 126, 234, 0.5);
}

.cc-modal-subtitle {
    font-size: 0.9rem;
    color: rgba(255, 255, 255, 0.6);
    font-weight: 500;
}

/* Bouton fermer */
.cc-close-btn {
    position: absolute;
    top: 1.5rem;
    right: 1.5rem;
    width: 32px;
    height: 32px;
    background: rgba(255, 255, 255, 0.1);
    border: none;
    border-radius: 8px;
    color: rgba(255, 255, 255, 0.7);
    cursor: pointer;
    font-size: 1.2rem;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
}

.cc-close-btn:hover {
    background: rgba(255, 255, 255, 0.2);
    color: #ffffff;
}

/* Onglets */
.cc-tabs {
    display: flex;
    gap: 0.5rem;
    margin-bottom: 1.5rem;
    border-bottom: 2px solid rgba(255, 255, 255, 0.1);
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
}

.cc-tab {
    padding: 0.75rem 1.25rem;
    background: transparent;
    color: rgba(255, 255, 255, 0.6);
    border: none;
    border-bottom: 3px solid transparent;
    cursor: pointer;
    font-weight: 600;
    font-size: 0.9rem;
    transition: all 0.3s ease;
    margin-bottom: -2px;
    white-space: nowrap;
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
}

.cc-tab:hover {
    color: rgba(255, 255, 255, 0.9);
    background: rgba(255, 255, 255, 0.05);
}

.cc-tab.active {
    color: #ffffff;
    border-bottom-color: #667eea;
    background: rgba(102, 126, 234, 0.1);
}

/* Contenu onglets */
.cc-content {
    margin-top: 1.5rem;
}

.cc-tab-content {
    display: none;
}

.cc-tab-content.active {
    display: block;
    animation: fadeInContent 0.3s ease;
}

@keyframes fadeInContent {
    from {
        opacity: 0;
        transform: translateY(10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.cc-intro {
    color: rgba(255, 255, 255, 0.9);
    font-size: 0.95rem;
    line-height: 1.6;
    margin-bottom: 1.5rem;
}

/* Catégories */
.cc-category {
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 12px;
    padding: 1.25rem;
    margin-bottom: 1rem;
    transition: all 0.3s ease;
}

.cc-category:hover {
    background: rgba(255, 255, 255, 0.05);
    border-color: rgba(102, 126, 234, 0.3);
}

.cc-category-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 0.75rem;
}

.cc-category-info {
    flex: 1;
}

.cc-category-title {
    color: #ffffff;
    font-weight: 700;
    font-size: 1.05rem;
    margin-bottom: 0.25rem;
}

.cc-category-count {
    color: rgba(255, 255, 255, 0.5);
    font-size: 0.85rem;
}

.cc-category-description {
    color: rgba(255, 255, 255, 0.7);
    font-size: 0.9rem;
    line-height: 1.5;
}

.cc-category-badge {
    display: inline-block;
    background: linear-gradient(135deg, #51cf66 0%, #37b24d 100%);
    color: #ffffff;
    padding: 0.25rem 0.75rem;
    border-radius: 20px;
    font-size: 0.75rem;
    font-weight: 600;
    margin-top: 0.5rem;
}

/* Toggle */
.cc-toggle {
    position: relative;
    display: inline-block;
    width: 52px;
    height: 28px;
    flex-shrink: 0;
}

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

.cc-toggle-slider {
    position: absolute;
    cursor: pointer;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: rgba(255, 255, 255, 0.2);
    transition: 0.3s;
    border-radius: 28px;
}

.cc-toggle-slider:before {
    position: absolute;
    content: "";
    height: 22px;
    width: 22px;
    left: 3px;
    bottom: 3px;
    background-color: white;
    transition: 0.3s;
    border-radius: 50%;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
}

input:checked + .cc-toggle-slider {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
}

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

input:disabled + .cc-toggle-slider {
    opacity: 0.6;
    cursor: not-allowed;
}

input:disabled:checked + .cc-toggle-slider {
    background: linear-gradient(135deg, #51cf66 0%, #37b24d 100%);
}

/* Détails cookies */
.cc-detail-category {
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 12px;
    padding: 1.5rem;
    margin-bottom: 1.5rem;
}

.cc-detail-title {
    color: #ffffff;
    font-size: 1.15rem;
    font-weight: 700;
    margin-bottom: 0.75rem;
}

.cc-detail-description {
    color: rgba(255, 255, 255, 0.7);
    font-size: 0.9rem;
    line-height: 1.5;
    margin-bottom: 1rem;
}

.cc-cookies-list {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.cc-cookie-item {
    background: rgba(0, 0, 0, 0.3);
    border-radius: 8px;
    padding: 1rem;
    border-left: 3px solid #667eea;
}

.cc-cookie-name {
    color: #00d4ff;
    font-weight: 700;
    font-size: 1rem;
    margin-bottom: 0.75rem;
    font-family: 'Courier New', monospace;
}

.cc-cookie-details {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.cc-cookie-detail {
    display: flex;
    font-size: 0.875rem;
}

.cc-cookie-label {
    font-weight: 600;
    color: rgba(255, 255, 255, 0.8);
    min-width: 100px;
    flex-shrink: 0;
}

.cc-cookie-value {
    color: rgba(255, 255, 255, 0.6);
    flex: 1;
}

/* À propos */
.cc-section-title {
    color: #ffffff;
    font-size: 1.1rem;
    font-weight: 700;
    margin-top: 1.5rem;
    margin-bottom: 0.75rem;
}

.cc-section-title:first-child {
    margin-top: 0;
}

.cc-text {
    color: rgba(255, 255, 255, 0.8);
    font-size: 0.9rem;
    line-height: 1.6;
    margin-bottom: 1rem;
}

.cc-list {
    list-style: none;
    padding: 0;
    margin: 1rem 0;
}

.cc-list li {
    color: rgba(255, 255, 255, 0.8);
    font-size: 0.9rem;
    line-height: 1.6;
    padding: 0.5rem 0 0.5rem 1.5rem;
    position: relative;
}

.cc-list li::before {
    content: '✓';
    position: absolute;
    left: 0;
    color: #51cf66;
    font-weight: bold;
    font-size: 1.1rem;
}

.cc-link {
    color: #00d4ff;
    text-decoration: none;
    font-weight: 600;
    border-bottom: 1px solid rgba(0, 212, 255, 0.3);
    transition: all 0.3s ease;
}

.cc-link:hover {
    color: #4facfe;
    border-bottom-color: #4facfe;
}

.cc-footer-text {
    background: rgba(255, 255, 255, 0.05);
    border-left: 3px solid #667eea;
    padding: 1rem;
    border-radius: 8px;
    font-size: 0.85rem;
    margin-top: 1.5rem;
}

/* Actions modale */
.cc-modal-actions {
    display: flex;
    gap: 0.75rem;
    margin-top: 2rem;
    padding-top: 1.5rem;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
}

.cc-btn {
    flex: 1;
    padding: 0.9rem 1.5rem;
    border-radius: 12px;
    font-weight: 700;
    font-size: 0.95rem;
    cursor: pointer;
    transition: all 0.3s ease;
    border: none;
    text-align: center;
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
}

.cc-btn-primary {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: #ffffff;
    box-shadow: 0 4px 15px rgba(102, 126, 234, 0.4);
}

.cc-btn-primary:hover {
    background: linear-gradient(135deg, #7c8ef5 0%, #8a5cb5 100%);
    transform: translateY(-2px);
    box-shadow: 0 6px 25px rgba(102, 126, 234, 0.6);
}

.cc-btn-secondary {
    background: rgba(255, 255, 255, 0.08);
    color: rgba(255, 255, 255, 0.9);
    border: 2px solid rgba(255, 255, 255, 0.2);
}

.cc-btn-secondary:hover {
    background: rgba(255, 255, 255, 0.15);
    border-color: rgba(255, 255, 255, 0.4);
    transform: translateY(-2px);
}

/* Scrollbar */
.cc-modal::-webkit-scrollbar {
    width: 8px;
}

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

.cc-modal::-webkit-scrollbar-thumb {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    border-radius: 10px;
}

/* Responsive */
@media (max-width: 768px) {
    .cc-banner {
        bottom: 0;
        right: 0;
        left: 0;
        width: 100%;
        max-width: 100%;
        border-radius: 20px 20px 0 0;
    }
    
    .cc-modal {
        bottom: 0;
        right: 0;
        left: 0;
        width: 100%;
        max-width: 100%;
        border-radius: 20px 20px 0 0;
        max-height: 90vh;
        padding: 1.5rem;
    }
    
    .cc-banner-actions {
        flex-direction: column;
    }
    
    .cc-btn-accept,
    .cc-btn-reject {
        width: 100%;
    }
    
    .cc-modal-actions {
        flex-direction: column;
    }
    
    .cc-cookie-detail {
        flex-direction: column;
        gap: 0.25rem;
    }
    
    .cc-cookie-label {
        min-width: auto;
    }
}

/* Accessibility */
.cc-btn:focus,
.cc-tab:focus,
.cc-toggle input:focus + .cc-toggle-slider,
.cc-close-btn:focus {
    outline: 2px solid #00d4ff;
    outline-offset: 2px;
}

/* Print */
@media print {
    .cc-banner,
    .cc-modal {
        display: none !important;
    }
}
