/**
 * Aïda Agence Cookies - Styles
 * 
 * @package AidaAgence_Cookies
 * @version 1.0.0
 */

/* Variables */
:root {
    --cookie-primary: #6366F1;
    --cookie-primary-light: #818CF8;
    --cookie-dark: #0A0A0F;
    --cookie-dark-card: #12121A;
    --cookie-dark-elevated: #1A1A25;
    --cookie-dark-border: rgba(99, 102, 241, 0.15);
    --cookie-text: #F1F5F9;
    --cookie-text-muted: #94A3B8;
    --cookie-text-dim: #64748B;
    --cookie-emerald: #34D399;
}

/* Cookie Banner */
.aidaagence-cookie-banner {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    background: var(--cookie-dark-card);
    border-top: 1px solid var(--cookie-dark-border);
    padding: 1.5rem 5%;
    display: none;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 1.5rem;
    z-index: 9999;
    backdrop-filter: blur(20px);
    animation: slideUp 0.4s ease;
}

.aidaagence-cookie-banner.active {
    display: flex;
}

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

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

.aidaagence-cookie-banner.closing {
    animation: slideDown 0.3s ease forwards;
}

.cookie-content {
    display: flex;
    align-items: flex-start;
    gap: 1rem;
    flex: 1;
    min-width: 280px;
}

.cookie-icon { font-size: 2rem; flex-shrink: 0; }

.cookie-text h4 {
    font-family: 'Sora', sans-serif;
    font-size: 1rem;
    font-weight: 600;
    color: var(--cookie-text);
    margin: 0 0 0.25rem 0;
}

.cookie-text p {
    font-family: 'Sora', sans-serif;
    font-size: 0.85rem;
    color: var(--cookie-text-muted);
    margin: 0;
    line-height: 1.5;
}

.cookie-text a {
    color: var(--cookie-primary-light);
    text-decoration: none;
}

.cookie-text a:hover { color: var(--cookie-text); }

.cookie-actions {
    display: flex;
    gap: 0.75rem;
    flex-wrap: wrap;
}

/* Buttons */
.cookie-btn {
    font-family: 'Sora', sans-serif;
    padding: 0.75rem 1.25rem;
    border-radius: 10px;
    font-size: 0.85rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    border: none;
    white-space: nowrap;
}

.cookie-btn-settings {
    background: transparent;
    color: var(--cookie-text-muted);
    border: 1px solid var(--cookie-dark-border);
}

.cookie-btn-settings:hover {
    background: var(--cookie-dark-elevated);
    color: var(--cookie-text);
}

.cookie-btn-reject {
    background: linear-gradient(135deg, #64748B 0%, #475569 100%);
    color: white;
    border: none;
    box-shadow: 0 4px 15px rgba(100, 116, 139, 0.3);
}

.cookie-btn-reject:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 25px rgba(100, 116, 139, 0.4);
}

.cookie-btn-accept {
    background: linear-gradient(135deg, #6366F1 0%, #8B5CF6 50%, #A855F7 100%);
    color: white;
    box-shadow: 0 4px 15px rgba(99, 102, 241, 0.3);
}

.cookie-btn-accept:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 25px rgba(99, 102, 241, 0.4);
}

/* Modal */
.cookie-modal-overlay {
    position: fixed;
    top: 0; left: 0; right: 0; bottom: 0;
    background: rgba(0, 0, 0, 0.85);
    backdrop-filter: blur(10px);
    display: none;
    align-items: center;
    justify-content: center;
    z-index: 10000;
    padding: 1rem;
}

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

.cookie-modal {
    background: var(--cookie-dark-card);
    border: 1px solid var(--cookie-dark-border);
    border-radius: 20px;
    max-width: 500px;
    width: 100%;
    animation: modalIn 0.3s ease;
}

@keyframes modalIn {
    from { opacity: 0; transform: scale(0.95); }
    to { opacity: 1; transform: scale(1); }
}

.cookie-modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1.5rem;
    border-bottom: 1px solid var(--cookie-dark-border);
}

.cookie-modal-header h3 {
    font-family: 'Sora', sans-serif;
    font-size: 1.2rem;
    font-weight: 600;
    color: var(--cookie-text);
    margin: 0;
}

.cookie-modal-close {
    width: 36px; height: 36px;
    background: var(--cookie-dark-elevated);
    border: 1px solid var(--cookie-dark-border);
    border-radius: 10px;
    color: var(--cookie-text-muted);
    font-size: 1.5rem;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
}

.cookie-modal-close:hover {
    background: rgba(251, 113, 133, 0.15);
    color: #FB7185;
}

.cookie-modal-body {
    padding: 1.5rem;
    max-height: 400px;
    overflow-y: auto;
}

.cookie-category {
    background: var(--cookie-dark-elevated);
    border: 1px solid var(--cookie-dark-border);
    border-radius: 12px;
    padding: 1rem;
    margin-bottom: 1rem;
}

.cookie-category:last-child { margin-bottom: 0; }

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

.cookie-category h4 {
    font-family: 'Sora', sans-serif;
    font-size: 0.95rem;
    font-weight: 600;
    color: var(--cookie-text);
    margin: 0 0 0.25rem 0;
}

.cookie-category p {
    font-family: 'Sora', sans-serif;
    font-size: 0.8rem;
    color: var(--cookie-text-dim);
    margin: 0;
}

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

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

.cookie-slider {
    position: absolute;
    cursor: pointer;
    top: 0; left: 0; right: 0; bottom: 0;
    background: var(--cookie-dark);
    border: 1px solid var(--cookie-dark-border);
    border-radius: 28px;
    transition: all 0.3s ease;
}

.cookie-slider::before {
    position: absolute;
    content: "";
    height: 20px; width: 20px;
    left: 3px; bottom: 3px;
    background: var(--cookie-text-muted);
    border-radius: 50%;
    transition: all 0.3s ease;
}

.cookie-toggle input:checked + .cookie-slider {
    background: var(--cookie-primary);
    border-color: var(--cookie-primary);
}

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

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

.cookie-toggle.disabled .cookie-slider {
    cursor: not-allowed;
    background: var(--cookie-emerald);
    border-color: var(--cookie-emerald);
}

.cookie-toggle.disabled .cookie-slider::before {
    transform: translateX(24px);
    background: white;
}

.cookie-modal-footer {
    display: flex;
    justify-content: flex-end;
    gap: 0.75rem;
    padding: 1.5rem;
    border-top: 1px solid var(--cookie-dark-border);
}

/* Responsive */
@media (max-width: 768px) {
    .aidaagence-cookie-banner {
        flex-direction: column;
        text-align: center;
        padding: 1rem;
        gap: 1rem;
    }
    .cookie-content {
        flex-direction: row;
        align-items: center;
        gap: 0.75rem;
    }
    .cookie-icon { font-size: 1.5rem; }
    .cookie-text h4 { font-size: 0.9rem; }
    .cookie-text p { font-size: 0.75rem; display: none; }
    .cookie-actions {
        justify-content: center;
        width: 100%;
        gap: 0.5rem;
    }
    .cookie-btn {
        flex: 1;
        min-width: 80px;
        padding: 0.6rem 0.75rem;
        font-size: 0.75rem;
    }
    .cookie-btn-settings { display: none; }
    .cookie-modal { max-width: 95%; }
    .cookie-modal-header { padding: 1rem; }
    .cookie-modal-header h3 { font-size: 1rem; }
    .cookie-modal-body { padding: 1rem; max-height: 300px; }
    .cookie-category { padding: 0.75rem; }
    .cookie-category h4 { font-size: 0.85rem; }
    .cookie-category p { font-size: 0.7rem; }
    .cookie-modal-footer {
        flex-direction: column;
        padding: 1rem;
        gap: 0.5rem;
    }
    .cookie-modal-footer .cookie-btn { width: 100%; }
}
