/* ============================================
   RGPD Cookie Consent Banner & Modal
   Conforme CNIL/RGPD
============================================ */

/* Cookie Consent Banner */
.cookie-consent-banner {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    background: linear-gradient(135deg, #FFFFFF 0%, #F8F9FA 100%);
    box-shadow: 0 -4px 20px rgba(0, 0, 0, 0.15);
    z-index: 10000;
    animation: slideIn 0.4s ease-out;
    border-top: 3px solid #FF6B35;
}

.cookie-consent-content {
    max-width: 1200px;
    margin: 0 auto;
    padding: 24px 32px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 32px;
}

.cookie-consent-text h3 {
    font-size: 1.125rem;
    font-weight: 700;
    color: #1A1A1A;
    margin-bottom: 8px;
}

.cookie-consent-text p {
    font-size: 0.9375rem;
    color: #495057;
    line-height: 1.6;
    margin-bottom: 8px;
}

.cookie-link {
    font-size: 0.875rem;
    color: #FF6B35;
    text-decoration: underline;
    transition: color 0.2s ease;
}

.cookie-link:hover {
    color: #E55A2B;
}

.cookie-consent-actions {
    display: flex;
    gap: 12px;
    flex-shrink: 0;
}

.cookie-consent-actions .btn {
    padding: 12px 24px;
    font-size: 0.9375rem;
    white-space: nowrap;
}

.cookie-consent-actions .btn-text {
    background: transparent;
    color: #6C757D;
    border: none;
}

.cookie-consent-actions .btn-text:hover {
    background: #E9ECEF;
    color: #495057;
}

/* Cookie Modal */
.cookie-modal {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 10001;
    display: flex;
    align-items: center;
    justify-content: center;
    animation: fadeIn 0.3s ease;
}

.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;
    background: white;
    border-radius: 16px;
    max-width: 600px;
    width: 90%;
    max-height: 80vh;
    overflow-y: auto;
    padding: 32px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
    z-index: 1;
}

.cookie-modal-close {
    position: absolute;
    top: 16px;
    right: 16px;
    background: transparent;
    border: none;
    font-size: 32px;
    line-height: 1;
    color: #6C757D;
    cursor: pointer;
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    transition: all 0.2s ease;
}

.cookie-modal-close:hover {
    background: #E9ECEF;
    color: #1A1A1A;
}

.cookie-modal-container h2 {
    font-size: 1.75rem;
    font-weight: 800;
    color: #1A1A1A;
    margin-bottom: 12px;
}

.cookie-modal-container > p {
    font-size: 1rem;
    color: #495057;
    margin-bottom: 24px;
}

.cookie-category {
    border: 1px solid #DEE2E6;
    border-radius: 12px;
    padding: 20px;
    margin-bottom: 16px;
    transition: all 0.2s ease;
}

.cookie-category:hover {
    border-color: #FF6B35;
    box-shadow: 0 4px 12px rgba(255, 107, 53, 0.1);
}

.cookie-category-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 16px;
}

.cookie-category h4 {
    font-size: 1.125rem;
    font-weight: 700;
    color: #1A1A1A;
    margin-bottom: 4px;
}

.cookie-category p {
    font-size: 0.9375rem;
    color: #6C757D;
    margin: 0;
}

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

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

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

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

.toggle-switch input:checked + .toggle-slider {
    background-color: #FF6B35;
}

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

.toggle-switch input:disabled + .toggle-slider {
    background-color: #E9ECEF;
    cursor: not-allowed;
    opacity: 0.6;
}

.cookie-modal-actions {
    margin-top: 32px;
    display: flex;
    justify-content: center;
}

.cookie-modal-actions .btn {
    padding: 14px 32px;
    font-size: 1rem;
}

/* Animations */
@keyframes slideIn {
    from {
        transform: translateY(100%);
        opacity: 0;
    }
    to {
        transform: translateY(0);
        opacity: 1;
    }
}

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

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

/* Responsive */
@media (max-width: 768px) {
    .cookie-consent-content {
        flex-direction: column;
        align-items: flex-start;
        padding: 20px;
        gap: 20px;
    }

    .cookie-consent-actions {
        flex-direction: column;
        width: 100%;
    }

    .cookie-consent-actions .btn {
        width: 100%;
        justify-content: center;
    }

    .cookie-modal-container {
        padding: 24px;
        width: 95%;
    }

    .cookie-modal-container h2 {
        font-size: 1.5rem;
        padding-right: 32px;
    }

    .cookie-category-header {
        flex-direction: column;
        align-items: flex-start;
    }

    .toggle-switch {
        align-self: flex-end;
    }
}

@media (max-width: 480px) {
    .cookie-consent-text h3 {
        font-size: 1rem;
    }

    .cookie-consent-text p {
        font-size: 0.875rem;
    }

    .cookie-consent-actions .btn {
        padding: 10px 16px;
        font-size: 0.875rem;
    }
}
