/**
 * Styles pour les popups de crédits TCF
 * Design simple, fin et élégant
 */

/* Overlay de la popup */
.tcf-popup-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.4);
    backdrop-filter: blur(2px);
    z-index: 999999;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    visibility: hidden;
    transition: all 0.2s ease;
}

.tcf-popup-overlay.tcf-popup-show {
    opacity: 1;
    visibility: visible;
}

/* Conteneur de la popup */
.tcf-popup {
    background: #ffffff;
    border-radius: 8px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.15);
    max-width: 400px;
    width: 90%;
    max-height: 90vh;
    overflow: hidden;
    transform: scale(0.9) translateY(20px);
    transition: all 0.2s ease;
    border: 1px solid #e5e7eb;
}

.tcf-popup-overlay.tcf-popup-show .tcf-popup {
    transform: scale(1) translateY(0);
}

/* En-tête de la popup */
.tcf-popup-header {
    padding: 20px 24px 0;
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 16px;
}

.tcf-popup-header h3 {
    margin: 0;
    font-size: 18px;
    font-weight: 600;
    color: #111827;
    line-height: 1.4;
    flex: 1;
}

.tcf-popup-close {
    background: none;
    border: none;
    font-size: 24px;
    color: #6b7280;
    cursor: pointer;
    padding: 0;
    width: 24px;
    height: 24px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 4px;
    transition: all 0.15s ease;
    flex-shrink: 0;
}

.tcf-popup-close:hover {
    background: #f3f4f6;
    color: #374151;
}

/* Corps de la popup */
.tcf-popup-body {
    padding: 16px 24px 20px;
}

.tcf-popup-body p {
    margin: 0 0 16px 0;
    font-size: 14px;
    line-height: 1.5;
    color: #4b5563;
}

/* Checkbox "ne plus me rappeler" */
.tcf-popup-checkbox {
    /* margin-top: 16px; */
    /* padding-top: 16px; */
    /* border-top: 1px solid #f3f4f6; */
}

.tcf-popup-checkbox label {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 13px;
    color: #6b7280;
    cursor: pointer;
    user-select: none;
}

.tcf-popup-checkbox input[type="checkbox"] {
    width: 16px;
    height: 16px;
    margin: 0;
    accent-color: #3b82f6;
}

/* Pied de la popup */
.tcf-popup-footer {
    padding: 0 24px 20px;
    display: flex;
    gap: 12px;
    justify-content: flex-end;
}

/* Boutons */
.tcf-btn {
    padding: 8px 16px;
    border: none;
    border-radius: 6px;
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.15s ease;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 80px;
}

.tcf-btn-primary {
    background: #3b82f6;
    color: white;
}

.tcf-btn-primary:hover {
    background: #2563eb;
    transform: translateY(-1px);
}

.tcf-btn-secondary {
    background: #f9fafb;
    color: #374151;
    border: 1px solid #d1d5db;
}

.tcf-btn-secondary:hover {
    background: #f3f4f6;
    border-color: #9ca3af;
}

/* Notifications */
.tcf-notification {
    position: fixed;
    top: 20px;
    right: 20px;
    background: #ffffff;
    border: 1px solid #e5e7eb;
    border-radius: 6px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
    padding: 12px 16px;
    max-width: 350px;
    z-index: 1000000;
    display: flex;
    align-items: center;
    gap: 12px;
    transform: translateX(100%);
    transition: transform 0.3s ease;
}

.tcf-notification.show {
    transform: translateX(0);
}

.tcf-notification-content {
    display: flex;
    align-items: center;
    gap: 8px;
    flex: 1;
    font-size: 14px;
    color: #374151;
}

.tcf-notification-close {
    background: none;
    border: none;
    font-size: 18px;
    color: #9ca3af;
    cursor: pointer;
    padding: 0;
    width: 20px;
    height: 20px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 4px;
    transition: all 0.15s ease;
}

.tcf-notification-close:hover {
    background: #f3f4f6;
    color: #6b7280;
}

/* Types de notifications */
.tcf-notification-success {
    border-left: 4px solid #10b981;
}

.tcf-notification-success i {
    color: #10b981;
}

.tcf-notification-error {
    border-left: 4px solid #ef4444;
}

.tcf-notification-error i {
    color: #ef4444;
}

.tcf-notification-warning {
    border-left: 4px solid #f59e0b;
}

.tcf-notification-warning i {
    color: #f59e0b;
}

/* Icônes */
.tcf-popup-header i,
.tcf-notification-content i {
    width: 20px;
    height: 20px;
    flex-shrink: 0;
}

/* Responsive */
@media (max-width: 480px) {
    .tcf-popup {
        width: 95%;
        margin: 20px;
    }
    
    .tcf-popup-header {
        padding: 16px 20px 0;
    }
    
    .tcf-popup-body {
        padding: 12px 20px 16px;
    }
    
    .tcf-popup-footer {
        padding: 0 20px 16px;
        flex-direction: column;
    }
    
    .tcf-btn {
        width: 100%;
        justify-content: center;
    }
    
    .tcf-notification {
        right: 10px;
        left: 10px;
        max-width: none;
    }
}

/* Animation d'entrée pour les notifications */
@keyframes slideInRight {
    from {
        transform: translateX(100%);
        opacity: 0;
    }
    to {
        transform: translateX(0);
        opacity: 1;
    }
}

@keyframes slideOutRight {
    from {
        transform: translateX(0);
        opacity: 1;
    }
    to {
        transform: translateX(100%);
        opacity: 0;
    }
}

.tcf-notification.slide-in {
    animation: slideInRight 0.3s ease forwards;
}

.tcf-notification.slide-out {
    animation: slideOutRight 0.3s ease forwards;
}

/* Focus et accessibilité */
.tcf-popup-close:focus,
.tcf-btn:focus,
.tcf-notification-close:focus {
    outline: 2px solid #3b82f6;
    outline-offset: 2px;
}

/* État de chargement */
.tcf-btn:disabled {
    opacity: 0.6;
    cursor: not-allowed;
    transform: none !important;
}

/* Scroll bloqué quand popup ouverte */
body.tcf-popup-open {
    overflow: hidden;
}
