/**
 * GDPR COOKIE CONSENT BANNER
 * Ultra-professionnel, conforme RGPD, design moderne
 */

/* ================================================
   BANDEAU PRINCIPAL - VERSION ÉQUILIBRÉE
   ================================================ */
.gdpr-cookie-banner {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    background: linear-gradient(135deg, rgba(15, 23, 42, 0.98) 0%, rgba(30, 41, 59, 0.98) 100%);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    color: white;
    padding: 1.2rem 0;
    box-shadow: 0 -8px 30px rgba(0, 0, 0, 0.3);
    z-index: 999999;
    transform: translateY(100%);
    transition: transform 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    border-top: 2px solid #3b82f6;
}

.gdpr-cookie-banner.show {
    transform: translateY(0);
}

.gdpr-cookie-banner.hide {
    transform: translateY(100%);
}

.gdpr-banner-container {
    max-width: 1300px;
    margin: 0 auto;
    padding: 0 1.5rem;
    display: flex;
    align-items: center;
    gap: 1.5rem;
    flex-wrap: wrap;
}

/* ================================================
   CONTENU - VERSION COMPACTE
   ================================================ */
.gdpr-banner-content {
    flex: 1;
    min-width: 300px;
}

.gdpr-banner-title {
    font-size: 1.05rem;
    font-weight: 700;
    margin-bottom: 0.5rem;
    color: white;
    line-height: 1.3;
}

.gdpr-banner-text {
    font-size: 0.9rem;
    line-height: 1.5;
    color: #cbd5e1;
    margin: 0;
}

.gdpr-banner-text a {
    color: #60a5fa;
    text-decoration: underline;
    font-weight: 600;
    white-space: nowrap;
}

.gdpr-banner-text a:hover {
    color: #93c5fd;
}

/* Badge supprimé pour gain de hauteur */
.gdpr-security-badge {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    background: rgba(16, 185, 129, 0.12);
    border: 1px solid rgba(16, 185, 129, 0.25);
    padding: 0.4rem 0.9rem;
    border-radius: 6px;
    font-size: 0.8rem;
    font-weight: 600;
    color: #34d399;
    margin-top: 0.5rem;
}

.gdpr-security-badge i {
    font-size: 0.9rem;
}

/* ================================================
   BOUTONS D'ACTION - VERSION COMPACTE
   ================================================ */
.gdpr-banner-actions {
    display: flex;
    gap: 0.75rem;
    align-items: center;
    flex-wrap: wrap;
}

.gdpr-btn {
    padding: 0.65rem 1.25rem;
    border: none;
    border-radius: 8px;
    font-size: 0.9rem;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.3s ease;
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    white-space: nowrap;
    text-decoration: none;
}

.gdpr-btn-accept {
    background: linear-gradient(135deg, #10b981 0%, #059669 100%);
    color: white;
    box-shadow: 0 3px 12px rgba(16, 185, 129, 0.3);
}

.gdpr-btn-accept:hover {
    background: linear-gradient(135deg, #059669 0%, #047857 100%);
    transform: translateY(-2px);
    box-shadow: 0 5px 20px rgba(16, 185, 129, 0.4);
}

.gdpr-btn-customize {
    background: rgba(255, 255, 255, 0.1);
    color: white;
    border: 2px solid rgba(255, 255, 255, 0.2);
    padding: 0.6rem 1.15rem;
}

.gdpr-btn-customize:hover {
    background: rgba(255, 255, 255, 0.15);
    border-color: rgba(255, 255, 255, 0.3);
}

.gdpr-btn-reject {
    background: transparent;
    color: #94a3b8;
    border: 2px solid transparent;
    padding: 0.6rem 1rem;
    font-size: 0.875rem;
}

.gdpr-btn-reject:hover {
    color: #cbd5e1;
    border-color: rgba(148, 163, 184, 0.3);
}

/* ================================================
   MODAL DE PERSONNALISATION
   ================================================ */
.gdpr-modal {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.7);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    z-index: 1000000;
    display: none;
    align-items: center;
    justify-content: center;
    padding: 1.5rem;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.gdpr-modal.show {
    display: flex;
    opacity: 1;
}

.gdpr-modal-content {
    background: white;
    border-radius: 20px;
    max-width: 700px;
    width: 100%;
    max-height: 85vh;
    overflow-y: auto;
    box-shadow: 0 25px 50px rgba(0, 0, 0, 0.5);
    animation: modalSlideUp 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

@keyframes modalSlideUp {
    from {
        opacity: 0;
        transform: translateY(30px) scale(0.95);
    }
    to {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

.gdpr-modal-header {
    background: linear-gradient(135deg, #1e40af 0%, #0891b2 100%);
    color: white;
    padding: 2rem;
    border-radius: 20px 20px 0 0;
    position: relative;
}

.gdpr-modal-close {
    position: absolute;
    top: 1.5rem;
    right: 1.5rem;
    background: rgba(255, 255, 255, 0.2);
    border: none;
    color: white;
    width: 36px;
    height: 36px;
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.25rem;
    transition: all 0.3s ease;
}

.gdpr-modal-close:hover {
    background: rgba(255, 255, 255, 0.3);
    transform: rotate(90deg);
}

.gdpr-modal-title {
    display: flex;
    align-items: center;
    gap: 1rem;
    font-size: 1.75rem;
    font-weight: 800;
    margin: 0;
}

.gdpr-modal-title i {
    font-size: 2rem;
}

.gdpr-modal-subtitle {
    margin: 0.75rem 0 0;
    font-size: 0.95rem;
    opacity: 0.9;
}

.gdpr-modal-body {
    padding: 2rem;
}

/* ================================================
   CATÉGORIES DE COOKIES
   ================================================ */
.gdpr-cookie-category {
    background: #f8fafc;
    border: 2px solid #e2e8f0;
    border-radius: 12px;
    padding: 1.5rem;
    margin-bottom: 1.25rem;
    transition: all 0.3s ease;
}

.gdpr-cookie-category:hover {
    border-color: #cbd5e1;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.05);
}

.gdpr-cookie-category.disabled {
    opacity: 0.6;
}

.gdpr-category-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1rem;
    cursor: pointer;
}

.gdpr-category-info {
    flex: 1;
}

.gdpr-category-title {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    font-size: 1.15rem;
    font-weight: 700;
    color: #1e293b;
    margin-bottom: 0.5rem;
}

.gdpr-category-title i {
    font-size: 1.25rem;
    color: #3b82f6;
}

.gdpr-category-badge {
    display: inline-block;
    background: #10b981;
    color: white;
    padding: 0.25rem 0.75rem;
    border-radius: 20px;
    font-size: 0.75rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-left: 0.5rem;
}

.gdpr-category-description {
    font-size: 0.9rem;
    color: #64748b;
    line-height: 1.6;
}

.gdpr-category-details {
    font-size: 0.85rem;
    color: #94a3b8;
    margin-top: 0.75rem;
    padding-top: 0.75rem;
    border-top: 1px solid #e2e8f0;
}

.gdpr-category-details strong {
    color: #475569;
}

/* ================================================
   TOGGLE SWITCH
   ================================================ */
.gdpr-toggle {
    position: relative;
    display: inline-block;
    width: 60px;
    height: 32px;
}

.gdpr-toggle input {
    opacity: 0;
    width: 0;
    height: 0;
}

.gdpr-toggle-slider {
    position: absolute;
    cursor: pointer;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: #cbd5e1;
    transition: 0.3s;
    border-radius: 34px;
}

.gdpr-toggle-slider:before {
    position: absolute;
    content: "";
    height: 24px;
    width: 24px;
    left: 4px;
    bottom: 4px;
    background: white;
    transition: 0.3s;
    border-radius: 50%;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.2);
}

.gdpr-toggle input:checked + .gdpr-toggle-slider {
    background: linear-gradient(135deg, #10b981 0%, #059669 100%);
}

.gdpr-toggle input:checked + .gdpr-toggle-slider:before {
    transform: translateX(28px);
}

.gdpr-toggle input:disabled + .gdpr-toggle-slider {
    opacity: 0.5;
    cursor: not-allowed;
}

/* ================================================
   FOOTER MODAL
   ================================================ */
.gdpr-modal-footer {
    background: #f8fafc;
    padding: 1.5rem 2rem;
    border-radius: 0 0 20px 20px;
    border-top: 1px solid #e2e8f0;
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 1rem;
    flex-wrap: wrap;
}

.gdpr-modal-footer .gdpr-btn {
    min-width: 150px;
    justify-content: center;
}

/* ================================================
   INFORMATIONS SÉCURITÉ
   ================================================ */
.gdpr-security-info {
    background: linear-gradient(135deg, #eff6ff 0%, #dbeafe 100%);
    border-left: 4px solid #3b82f6;
    padding: 1.5rem;
    border-radius: 10px;
    margin: 1.5rem 0;
}

.gdpr-security-info h4 {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    color: #1e40af;
    font-size: 1.1rem;
    font-weight: 700;
    margin-bottom: 0.75rem;
}

.gdpr-security-info ul {
    list-style: none;
    padding: 0;
    margin: 0;
}

.gdpr-security-info li {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.5rem 0;
    color: #475569;
    font-size: 0.9rem;
}

.gdpr-security-info li i {
    color: #10b981;
    font-size: 1rem;
}

/* ================================================
   RESPONSIVE - VERSION COMPACTE
   ================================================ */
@media (max-width: 768px) {
    .gdpr-cookie-banner {
        padding: 0.85rem 0;
    }
    
    .gdpr-banner-container {
        flex-direction: column;
        align-items: stretch;
        gap: 1rem;
        padding: 0 1rem;
    }
    
    .gdpr-banner-title {
        font-size: 0.95rem;
        margin-bottom: 0.3rem;
    }
    
    .gdpr-banner-text {
        font-size: 0.825rem;
    }
    
    .gdpr-banner-actions {
        gap: 0.5rem;
    }
    
    .gdpr-btn {
        font-size: 0.85rem;
        padding: 0.6rem 1rem;
        flex: 1;
        justify-content: center;
    }
    
    .gdpr-btn-reject {
        padding: 0.55rem 0.9rem;
    }
    
    .gdpr-modal-content {
        margin: 1rem;
        max-height: 90vh;
    }
    
    .gdpr-modal-header,
    .gdpr-modal-body,
    .gdpr-modal-footer {
        padding: 1.5rem;
    }
    
    .gdpr-modal-title {
        font-size: 1.5rem;
    }
    
    .gdpr-modal-footer {
        flex-direction: column;
    }
}

/* ================================================
   ANIMATIONS
   ================================================ */
@keyframes fadeIn {
    from {
        opacity: 0;
    }
    to {
        opacity: 1;
    }
}

.gdpr-cookie-banner {
    animation: fadeIn 0.3s ease;
}
