/* ============================================
   COOKIE CONSENT - FRÈRES CONGO
   ULTRA PROFESSIONAL DESIGN
   ============================================ */

/* ============================================
   COOKIE BANNER - SLIDE UP WITH GLASS MORPHISM
   ============================================ */
.cookie-consent-banner {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    z-index: 99999;
    background: rgba(10, 44, 74, 0.95);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    padding: 0;
    box-shadow: 0 -20px 60px rgba(0, 0, 0, 0.4);
    transform: translateY(100%);
    transition: transform 0.8s cubic-bezier(0.22, 1, 0.36, 1);
    border-top: 3px solid rgba(88, 155, 221, 0.4);
}

.cookie-consent-banner::before {
    content: '';
    position: absolute;
    top: -3px;
    left: 0;
    right: 0;
    height: 3px;
    background: linear-gradient(90deg, #589bdd, #3a7bb5, #589bdd);
    background-size: 200% 100%;
    animation: gradientMove 3s ease-in-out infinite;
}

@keyframes gradientMove {
    0% { background-position: 0% 0%; }
    50% { background-position: 100% 0%; }
    100% { background-position: 0% 0%; }
}

.cookie-consent-banner.show {
    transform: translateY(0);
}

.cookie-consent-banner.hidden {
    transform: translateY(100%);
}

/* ============================================
   BANNER INNER CONTENT
   ============================================ */
.cookie-consent-container {
    max-width: 1400px;
    margin: 0 auto;
    padding: 28px 40px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 40px;
    flex-wrap: wrap;
}

/* ============================================
   LEFT SIDE - ICON & TEXT
   ============================================ */
.cookie-consent-content {
    flex: 1;
    min-width: 280px;
    display: flex;
    align-items: flex-start;
    gap: 24px;
}

.cookie-consent-icon-wrapper {
    flex-shrink: 0;
    position: relative;
    width: 64px;
    height: 64px;
}

.cookie-consent-icon-wrapper::before {
    content: '';
    position: absolute;
    inset: -4px;
    border-radius: 50%;
    background: linear-gradient(135deg, rgba(88, 155, 221, 0.2), rgba(88, 155, 221, 0.05));
    animation: pulseRing 3s ease-in-out infinite;
}

@keyframes pulseRing {
    0%, 100% {
        transform: scale(1);
        opacity: 0.5;
    }
    50% {
        transform: scale(1.1);
        opacity: 0.1;
    }
}

.cookie-consent-icon {
    width: 64px;
    height: 64px;
    background: linear-gradient(135deg, #589bdd, #3a7bb5);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #ffffff;
    font-size: 28px;
    position: relative;
    z-index: 2;
    box-shadow: 0 8px 30px rgba(88, 155, 221, 0.3);
    transition: transform 0.3s ease;
}

.cookie-consent-banner:hover .cookie-consent-icon {
    transform: scale(1.05) rotate(-5deg);
}

.cookie-consent-text {
    flex: 1;
    padding-top: 4px;
}

.cookie-consent-text h3 {
    color: #ffffff;
    font-size: 20px;
    font-weight: 700;
    margin-bottom: 6px;
    font-family: 'Urbanist', sans-serif;
    letter-spacing: -0.3px;
}

.cookie-consent-text h3 .emoji {
    margin-right: 8px;
}

.cookie-consent-text p {
    color: rgba(255, 255, 255, 0.8);
    font-size: 14px;
    line-height: 1.7;
    font-family: 'Urbanist', sans-serif;
    margin-bottom: 0;
    max-width: 700px;
}

.cookie-consent-text a {
    color: #589bdd;
    text-decoration: none;
    font-weight: 600;
    transition: all 0.3s ease;
    position: relative;
}

.cookie-consent-text a::after {
    content: '';
    position: absolute;
    bottom: -2px;
    left: 0;
    width: 0;
    height: 2px;
    background: #589bdd;
    transition: width 0.3s ease;
}

.cookie-consent-text a:hover::after {
    width: 100%;
}

.cookie-consent-text a:hover {
    color: #7bb5e8;
}

/* ============================================
   RIGHT SIDE - BUTTONS
   ============================================ */
.cookie-consent-buttons {
    display: flex;
    align-items: center;
    gap: 12px;
    flex-shrink: 0;
    flex-wrap: wrap;
}

.cookie-btn {
    padding: 13px 28px;
    border: none;
    border-radius: 50px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.4s cubic-bezier(0.22, 1, 0.36, 1);
    font-family: 'Urbanist', sans-serif;
    letter-spacing: 0.3px;
    position: relative;
    overflow: hidden;
}

/* Primary Button - Accept All */
.cookie-btn-primary {
    background: linear-gradient(135deg, #589bdd, #3a7bb5);
    color: #ffffff;
    box-shadow: 0 4px 20px rgba(88, 155, 221, 0.3);
}

.cookie-btn-primary::before {
    content: '';
    position: absolute;
    inset: 0;
    border-radius: 50px;
    background: linear-gradient(135deg, #3a7bb5, #589bdd);
    opacity: 0;
    transition: opacity 0.4s ease;
}

.cookie-btn-primary:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 35px rgba(88, 155, 221, 0.4);
}

.cookie-btn-primary:hover::before {
    opacity: 1;
}

.cookie-btn-primary span {
    position: relative;
    z-index: 1;
    display: flex;
    align-items: center;
    gap: 8px;
}

.cookie-btn-primary span i {
    font-size: 16px;
    transition: transform 0.3s ease;
}

.cookie-btn-primary:hover span i {
    transform: rotate(90deg);
}

/* Secondary Button - Reject */
.cookie-btn-secondary {
    background: rgba(255, 255, 255, 0.08);
    color: rgba(255, 255, 255, 0.9);
    border: 1px solid rgba(255, 255, 255, 0.15);
}

.cookie-btn-secondary:hover {
    background: rgba(255, 255, 255, 0.15);
    transform: translateY(-3px);
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.2);
}

/* Settings Button */
.cookie-btn-settings {
    background: transparent;
    color: rgba(255, 255, 255, 0.6);
    border: 1px solid rgba(255, 255, 255, 0.1);
    padding: 13px 20px;
}

.cookie-btn-settings:hover {
    background: rgba(255, 255, 255, 0.08);
    color: #ffffff;
    transform: translateY(-3px);
}

.cookie-btn-settings i {
    margin-right: 6px;
    font-size: 14px;
}

/* ============================================
   COOKIE PREFERENCES MODAL - ULTRA PREMIUM
   ============================================ */
.cookie-modal-overlay {
    position: fixed;
    inset: 0;
    z-index: 100000;
    background: rgba(0, 0, 0, 0.6);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    display: none;
    align-items: center;
    justify-content: center;
    padding: 20px;
    animation: modalFadeIn 0.4s cubic-bezier(0.22, 1, 0.36, 1);
}

.cookie-modal-overlay.active {
    display: flex;
}

@keyframes modalFadeIn {
    from {
        opacity: 0;
        transform: scale(0.96) translateY(20px);
    }
    to {
        opacity: 1;
        transform: scale(1) translateY(0);
    }
}

.cookie-modal {
    background: #ffffff;
    border-radius: 28px;
    max-width: 740px;
    width: 100%;
    max-height: 90vh;
    overflow-y: auto;
    padding: 0;
    box-shadow: 0 40px 80px rgba(0, 0, 0, 0.3);
    position: relative;
}

.cookie-modal::-webkit-scrollbar {
    width: 6px;
}

.cookie-modal::-webkit-scrollbar-track {
    background: #f0f4f8;
    border-radius: 3px;
}

.cookie-modal::-webkit-scrollbar-thumb {
    background: #589bdd;
    border-radius: 3px;
}

/* Modal Header with Gradient */
.cookie-modal-header {
    padding: 32px 40px 28px;
    background: linear-gradient(135deg, #0a2c4a, #1a4a6e);
    border-radius: 28px 28px 0 0;
    position: relative;
    overflow: hidden;
}

.cookie-modal-header::before {
    content: '';
    position: absolute;
    top: -50%;
    right: -20%;
    width: 60%;
    height: 200%;
    background: rgba(255, 255, 255, 0.03);
    transform: rotate(45deg);
    pointer-events: none;
}

.cookie-modal-header::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    height: 3px;
    background: linear-gradient(90deg, #589bdd, #3a7bb5, #589bdd);
    background-size: 200% 100%;
    animation: gradientMove 3s ease-in-out infinite;
}

.cookie-modal-header .modal-icon {
    width: 56px;
    height: 56px;
    background: rgba(88, 155, 221, 0.15);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #589bdd;
    font-size: 28px;
    margin-bottom: 16px;
    border: 1px solid rgba(88, 155, 221, 0.2);
}

.cookie-modal-header h2 {
    font-size: 28px;
    font-weight: 800;
    color: #ffffff;
    font-family: 'Playfair Display', serif;
    margin-bottom: 8px;
}

.cookie-modal-header p {
    color: rgba(255, 255, 255, 0.8);
    font-size: 15px;
    line-height: 1.7;
    font-family: 'Urbanist', sans-serif;
    margin-bottom: 0;
}

.cookie-modal-header p a {
    color: #589bdd;
    text-decoration: none;
    font-weight: 600;
}

.cookie-modal-close {
    position: absolute;
    top: 20px;
    right: 24px;
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.15);
    color: rgba(255, 255, 255, 0.7);
    font-size: 20px;
    cursor: pointer;
    transition: all 0.3s ease;
    width: 44px;
    height: 44px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    z-index: 10;
}

.cookie-modal-close:hover {
    background: rgba(255, 255, 255, 0.2);
    color: #ffffff;
    transform: rotate(90deg);
}

/* Modal Body - Preferences */
.cookie-modal-body {
    padding: 32px 40px 24px;
}

.cookie-preferences {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.cookie-preference {
    background: #f8fafc;
    border-radius: 16px;
    padding: 20px 24px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 20px;
    transition: all 0.3s ease;
    border: 1px solid transparent;
}

.cookie-preference:hover {
    border-color: #e8edf4;
    background: #f0f7ff;
    transform: translateX(4px);
}

.cookie-preference-info {
    flex: 1;
}

.cookie-preference-info .pref-header {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 4px;
}

.cookie-preference-info .pref-header h4 {
    font-size: 16px;
    font-weight: 700;
    color: #0a2c4a;
    font-family: 'Urbanist', sans-serif;
    margin: 0;
}

.cookie-preference-info p {
    font-size: 13px;
    color: #64748b;
    line-height: 1.5;
    font-family: 'Urbanist', sans-serif;
    margin: 0;
}

.cookie-preference-badge {
    display: inline-block;
    padding: 2px 12px;
    border-radius: 20px;
    font-size: 10px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.badge-essential {
    background: #dbeafe;
    color: #1d4ed8;
}

.badge-functional {
    background: #fef3c7;
    color: #92400e;
}

.badge-analytics {
    background: #d1fae5;
    color: #065f46;
}

.badge-marketing {
    background: #fce4ec;
    color: #c62828;
}

/* Toggle Switch - Premium Design */
.cookie-toggle {
    position: relative;
    width: 52px;
    height: 28px;
    flex-shrink: 0;
    cursor: pointer;
}

.cookie-toggle input {
    opacity: 0;
    width: 0;
    height: 0;
    position: absolute;
}

.cookie-toggle .slider {
    position: absolute;
    cursor: pointer;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: #cbd5e1;
    transition: all 0.4s cubic-bezier(0.22, 1, 0.36, 1);
    border-radius: 30px;
    box-shadow: inset 0 2px 4px rgba(0, 0, 0, 0.1);
}

.cookie-toggle .slider::before {
    content: '';
    position: absolute;
    height: 20px;
    width: 20px;
    left: 4px;
    bottom: 4px;
    background: white;
    transition: all 0.4s cubic-bezier(0.22, 1, 0.36, 1);
    border-radius: 50%;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);
}

.cookie-toggle input:checked + .slider {
    background: linear-gradient(135deg, #589bdd, #3a7bb5);
}

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

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

.cookie-toggle input:disabled + .slider::before {
    opacity: 0.8;
}

.cookie-toggle .slider .toggle-label {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    font-size: 9px;
    font-weight: 700;
    color: white;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.cookie-toggle .slider .toggle-label.on {
    left: 7px;
}

.cookie-toggle .slider .toggle-label.off {
    right: 7px;
}

.cookie-toggle input:checked + .slider .toggle-label.on {
    opacity: 1;
}

.cookie-toggle input:not(:checked) + .slider .toggle-label.off {
    opacity: 1;
}

/* Modal Footer */
.cookie-modal-footer {
    padding: 20px 40px 32px;
    border-top: 1px solid #e8edf4;
    display: flex;
    justify-content: flex-end;
    gap: 12px;
    flex-wrap: wrap;
}

.cookie-modal-footer .cookie-btn {
    padding: 12px 28px;
    font-size: 14px;
}

.cookie-modal-footer .cookie-btn-secondary {
    background: #f0f4f8;
    color: #0a2c4a;
    border: 1px solid #e0e8f0;
}

.cookie-modal-footer .cookie-btn-secondary:hover {
    background: #e0e8f0;
    transform: translateY(-2px);
}

.cookie-modal-footer .cookie-btn-primary {
    background: linear-gradient(135deg, #589bdd, #3a7bb5);
    color: #ffffff;
    box-shadow: 0 4px 20px rgba(88, 155, 221, 0.3);
}

.cookie-modal-footer .cookie-btn-primary:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 35px rgba(88, 155, 221, 0.4);
}

/* ============================================
   SUCCESS NOTIFICATION
   ============================================ */
.cookie-notification {
    position: fixed;
    bottom: 120px;
    right: 30px;
    z-index: 99998;
    background: #10b981;
    color: white;
    padding: 16px 24px;
    border-radius: 16px;
    font-family: 'Urbanist', sans-serif;
    font-weight: 500;
    font-size: 14px;
    box-shadow: 0 10px 30px rgba(16, 185, 129, 0.3);
    transform: translateX(120%);
    transition: transform 0.6s cubic-bezier(0.22, 1, 0.36, 1);
    display: flex;
    align-items: center;
    gap: 12px;
}

.cookie-notification.show {
    transform: translateX(0);
}

.cookie-notification i {
    font-size: 20px;
}

/* ============================================
   RESPONSIVE
   ============================================ */
@media (max-width: 1200px) {
    .cookie-consent-container {
        padding: 24px 30px;
        gap: 30px;
    }
}

@media (max-width: 1024px) {
    .cookie-consent-container {
        flex-direction: column;
        align-items: stretch;
        gap: 20px;
    }

    .cookie-consent-buttons {
        justify-content: center;
        gap: 10px;
    }

    .cookie-consent-content {
        align-items: center;
        text-align: center;
    }

    .cookie-consent-text p {
        max-width: 100%;
    }
}

@media (max-width: 768px) {
    .cookie-consent-container {
        padding: 20px 20px;
    }

    .cookie-consent-content {
        flex-direction: column;
        text-align: center;
        gap: 16px;
    }

    .cookie-consent-icon-wrapper {
        width: 56px;
        height: 56px;
    }

    .cookie-consent-icon {
        width: 56px;
        height: 56px;
        font-size: 24px;
    }

    .cookie-consent-text h3 {
        font-size: 18px;
    }

    .cookie-consent-text p {
        font-size: 13px;
        line-height: 1.6;
    }

    .cookie-consent-buttons {
        flex-direction: column;
        width: 100%;
        gap: 10px;
    }

    .cookie-btn {
        width: 100%;
        justify-content: center;
        padding: 12px 20px;
        font-size: 13px;
    }

    /* Modal */
    .cookie-modal {
        border-radius: 20px;
        max-height: 95vh;
    }

    .cookie-modal-header {
        padding: 24px 20px 20px;
        border-radius: 20px 20px 0 0;
    }

    .cookie-modal-header .modal-icon {
        width: 48px;
        height: 48px;
        font-size: 22px;
        margin-bottom: 12px;
    }

    .cookie-modal-header h2 {
        font-size: 24px;
    }

    .cookie-modal-header p {
        font-size: 14px;
    }

    .cookie-modal-body {
        padding: 24px 20px 16px;
    }

    .cookie-preference {
        flex-direction: column;
        align-items: flex-start;
        gap: 14px;
        padding: 16px 18px;
        border-radius: 14px;
    }

    .cookie-preference:hover {
        transform: none;
    }

    .cookie-preference-info .pref-header h4 {
        font-size: 15px;
    }

    .cookie-preference-info p {
        font-size: 12px;
    }

    .cookie-toggle {
        width: 48px;
        height: 26px;
    }

    .cookie-toggle .slider::before {
        height: 18px;
        width: 18px;
        left: 4px;
        bottom: 4px;
    }

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

    .cookie-modal-footer {
        padding: 16px 20px 24px;
        flex-direction: column;
    }

    .cookie-modal-footer .cookie-btn {
        width: 100%;
        justify-content: center;
    }

    .cookie-modal-close {
        top: 16px;
        right: 16px;
        width: 40px;
        height: 40px;
        font-size: 18px;
    }

    .cookie-notification {
        bottom: 100px;
        right: 20px;
        left: 20px;
        padding: 14px 18px;
        font-size: 13px;
    }
}

@media (max-width: 480px) {
    .cookie-consent-container {
        padding: 16px 14px;
    }

    .cookie-consent-icon-wrapper {
        width: 48px;
        height: 48px;
    }

    .cookie-consent-icon {
        width: 48px;
        height: 48px;
        font-size: 20px;
    }

    .cookie-consent-text h3 {
        font-size: 16px;
    }

    .cookie-consent-text p {
        font-size: 12px;
    }

    .cookie-btn {
        padding: 10px 16px;
        font-size: 12px;
        border-radius: 40px;
    }

    .cookie-modal-header h2 {
        font-size: 20px;
    }

    .cookie-modal-header p {
        font-size: 13px;
    }

    .cookie-preference {
        padding: 14px 14px;
        border-radius: 12px;
    }

    .cookie-preference-info .pref-header h4 {
        font-size: 14px;
    }

    .cookie-modal-footer .cookie-btn {
        padding: 10px 20px;
        font-size: 13px;
    }

    .cookie-notification {
        bottom: 90px;
        padding: 12px 16px;
        font-size: 12px;
        border-radius: 12px;
    }
}

/* ============================================
   REDUCED MOTION PREFERENCE
   ============================================ */
@media (prefers-reduced-motion: reduce) {
    .cookie-consent-banner,
    .cookie-modal-overlay,
    .cookie-notification {
        animation: none !important;
        transition: none !important;
    }

    .cookie-consent-banner::before,
    .cookie-modal-header::after {
        animation: none !important;
    }

    .cookie-consent-icon-wrapper::before {
        animation: none !important;
    }

    .cookie-modal-close:hover {
        transform: none !important;
    }

    .cookie-btn:hover {
        transform: none !important;
    }
}