/**
 * Styles pour la bannière de consentement aux cookies
 */

/* Bannière de consentement */
.cookie-consent-banner {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    background: linear-gradient(135deg, #0043FF 0%, #0066FF 100%);
    color: white;
    padding: 24px;
    box-shadow: 0 -4px 20px rgba(0, 0, 0, 0.2);
    z-index: 10000;
    transform: translateY(100%);
    transition: transform 0.3s ease-in-out;
    font-family: 'Inter', sans-serif;
}

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

.cookie-consent-content {
    max-width: 1200px;
    margin: 0 auto;
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.cookie-consent-text h3 {
    margin: 0 0 12px 0;
    font-size: 20px;
    font-weight: 700;
    color: white;
}

.cookie-consent-text p {
    margin: 8px 0;
    font-size: 14px;
    line-height: 1.6;
    color: rgba(255, 255, 255, 0.95);
}

.cookie-consent-links {
    margin-top: 12px;
}

.cookie-consent-links a {
    color: rgba(255, 255, 255, 0.9);
    text-decoration: underline;
    font-size: 13px;
    transition: color 0.2s;
}

.cookie-consent-links a:hover {
    color: white;
}

.cookie-consent-buttons {
    display: flex;
    gap: 12px;
    flex-wrap: wrap;
}

.cookie-btn {
    padding: 12px 24px;
    border: none;
    border-radius: 8px;
    font-family: 'Inter', sans-serif;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s;
    white-space: nowrap;
}

.cookie-btn-accept {
    background: #4CFF00;
    color: #0043FF;
}

.cookie-btn-accept:hover {
    background: #3de000;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(76, 255, 0, 0.4);
}

.cookie-btn-necessary {
    background: rgba(255, 255, 255, 0.2);
    color: white;
    border: 2px solid rgba(255, 255, 255, 0.5);
}

.cookie-btn-necessary:hover {
    background: rgba(255, 255, 255, 0.3);
    border-color: white;
}

.cookie-btn-reject {
    background: rgba(255, 255, 255, 0.1);
    color: white;
    border: 2px solid rgba(255, 255, 255, 0.3);
}

.cookie-btn-reject:hover {
    background: rgba(255, 255, 255, 0.2);
    border-color: rgba(255, 255, 255, 0.5);
}

.cookie-btn-secondary {
    background: #6b7280;
    color: white;
}

.cookie-btn-secondary:hover {
    background: #4b5563;
}

/* Modal de préférences */
.cookie-preferences-modal {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.7);
    z-index: 10001;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
    opacity: 0;
    transition: opacity 0.3s ease-in-out;
    backdrop-filter: blur(4px);
}

.cookie-preferences-modal.show {
    opacity: 1;
}

.cookie-preferences-content {
    background: white;
    border-radius: 16px;
    max-width: 600px;
    width: 100%;
    max-height: 90vh;
    overflow-y: auto;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
    transform: scale(0.9);
    transition: transform 0.3s ease-in-out;
}

.cookie-preferences-modal.show .cookie-preferences-content {
    transform: scale(1);
}

.cookie-preferences-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 24px;
    border-bottom: 1px solid #e5e7eb;
    background: linear-gradient(135deg, #0043FF 0%, #0066FF 100%);
    border-radius: 16px 16px 0 0;
}

.cookie-preferences-header h2 {
    margin: 0;
    color: white;
    font-size: 24px;
    font-weight: 700;
    font-family: 'Inter', sans-serif;
}

.cookie-close-btn {
    background: none;
    border: none;
    color: white;
    font-size: 32px;
    cursor: pointer;
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    transition: background 0.2s;
    line-height: 1;
    padding: 0;
}

.cookie-close-btn:hover {
    background: rgba(255, 255, 255, 0.2);
}

.cookie-preferences-body {
    padding: 24px;
}

.cookie-preferences-body > p {
    margin: 0 0 24px 0;
    color: #6b7280;
    font-size: 14px;
    line-height: 1.6;
}

.cookie-preference-item {
    margin-bottom: 24px;
    padding: 20px;
    background: #f9fafb;
    border-radius: 12px;
    border: 1px solid #e5e7eb;
}

.cookie-preference-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 12px;
}

.cookie-preference-header h3 {
    margin: 0;
    font-size: 18px;
    font-weight: 600;
    color: #111827;
    font-family: 'Inter', sans-serif;
}

.cookie-preference-desc {
    margin: 0;
    color: #6b7280;
    font-size: 14px;
    line-height: 1.6;
}

/* Toggle Switch */
.cookie-switch {
    position: relative;
    display: inline-block;
    width: 50px;
    height: 26px;
}

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

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

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

.cookie-switch input:checked + .cookie-slider {
    background-color: #4CFF00;
}

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

.cookie-switch input:disabled + .cookie-slider {
    background-color: #0043FF;
    cursor: not-allowed;
    opacity: 0.7;
}

.cookie-preferences-actions {
    display: flex;
    gap: 12px;
    margin-top: 24px;
    padding-top: 24px;
    border-top: 1px solid #e5e7eb;
}

.cookie-preferences-actions .cookie-btn {
    flex: 1;
}

/* Responsive */
@media (max-width: 768px) {
    .cookie-consent-banner {
        padding: 20px;
    }

    .cookie-consent-content {
        gap: 16px;
    }

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

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

    .cookie-consent-buttons {
        flex-direction: column;
    }

    .cookie-btn {
        width: 100%;
    }

    .cookie-preferences-content {
        max-width: 100%;
        margin: 0;
        border-radius: 16px 16px 0 0;
    }

    .cookie-preferences-header {
        padding: 20px;
    }

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

    .cookie-preferences-body {
        padding: 20px;
    }

    .cookie-preference-item {
        padding: 16px;
    }

    .cookie-preferences-actions {
        flex-direction: column;
    }

    .cookie-preferences-actions .cookie-btn {
        width: 100%;
    }
}
