/* ==========================================================================
   🎮 SwissBorg Guardians — Cookie Consent & Privacy Manager
   ========================================================================== */

.cookie-banner {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    z-index: 99999;
    background: rgba(15, 23, 42, 0.96);
    backdrop-filter: blur(14px);
    -webkit-backdrop-filter: blur(14px);
    border-top: 2px solid #00e5ff;
    box-shadow: 0 -8px 32px rgba(0, 0, 0, 0.6), 0 0 20px rgba(0, 229, 255, 0.2);
    padding: 16px 24px;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
    color: #e2e8f0;
    transition: transform 0.35s cubic-bezier(0.16, 1, 0.3, 1), opacity 0.35s ease;
}

.cookie-banner.hidden {
    display: none !important;
}

.cookie-container {
    max-width: 1240px;
    margin: 0 auto;
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
}

.cookie-content {
    flex: 1 1 500px;
}

.cookie-title {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 1.05rem;
    font-weight: 700;
    color: #00e5ff;
    margin-bottom: 6px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.cookie-text {
    font-size: 0.88rem;
    line-height: 1.45;
    color: #94a3b8;
    margin: 0;
}

.cookie-text strong {
    color: #f8fafc;
}

.cookie-actions {
    display: flex;
    align-items: center;
    gap: 10px;
    flex-wrap: wrap;
}

.cookie-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    padding: 9px 18px;
    font-size: 0.88rem;
    font-weight: 600;
    border-radius: 6px;
    cursor: pointer;
    border: 1px solid transparent;
    transition: all 0.2s ease;
    text-decoration: none;
    white-space: nowrap;
}

.cookie-btn-accept {
    background: linear-gradient(135deg, #10b981, #059669);
    color: #ffffff;
    box-shadow: 0 0 12px rgba(16, 185, 129, 0.35);
}

.cookie-btn-accept:hover {
    background: linear-gradient(135deg, #059669, #047857);
    box-shadow: 0 0 18px rgba(16, 185, 129, 0.6);
    transform: translateY(-1px);
}

.cookie-btn-refuse {
    background: #1e293b;
    color: #cbd5e1;
    border-color: #334155;
}

.cookie-btn-refuse:hover {
    background: #334155;
    color: #f8fafc;
    border-color: #475569;
}

.cookie-btn-customize {
    background: transparent;
    color: #38bdf8;
    border-color: rgba(56, 189, 248, 0.4);
}

.cookie-btn-customize:hover {
    background: rgba(56, 189, 248, 0.1);
    color: #7dd3fc;
    border-color: #38bdf8;
}

/* Modal de personnalisation */
.cookie-modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 100000;
    background: rgba(0, 0, 0, 0.78);
    backdrop-filter: blur(8px);
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 16px;
    opacity: 1;
    transition: opacity 0.25s ease;
}

.cookie-modal-overlay.hidden {
    display: none !important;
}

.cookie-modal-card {
    background: #0f172a;
    border: 1px solid #00e5ff;
    box-shadow: 0 12px 48px rgba(0, 0, 0, 0.8), 0 0 24px rgba(0, 229, 255, 0.25);
    border-radius: 12px;
    max-width: 580px;
    width: 100%;
    overflow: hidden;
    color: #f8fafc;
    animation: cookieModalIn 0.3s cubic-bezier(0.16, 1, 0.3, 1);
}

@keyframes cookieModalIn {
    from {
        opacity: 0;
        transform: scale(0.94) translateY(12px);
    }
    to {
        opacity: 1;
        transform: scale(1) translateY(0);
    }
}

.cookie-modal-header {
    padding: 16px 20px;
    border-bottom: 1px solid #1e293b;
    display: flex;
    align-items: center;
    justify-content: space-between;
    background: #1e293b;
}

.cookie-modal-header h3 {
    margin: 0;
    font-size: 1.15rem;
    color: #00e5ff;
    display: flex;
    align-items: center;
    gap: 8px;
}

.cookie-modal-close {
    background: none;
    border: none;
    color: #94a3b8;
    font-size: 1.5rem;
    cursor: pointer;
    line-height: 1;
    padding: 0 4px;
    transition: color 0.2s;
}

.cookie-modal-close:hover {
    color: #f8fafc;
}

.cookie-modal-body {
    padding: 20px;
    max-height: 65vh;
    overflow-y: auto;
    font-size: 0.9rem;
    line-height: 1.5;
}

.cookie-section {
    background: rgba(30, 41, 59, 0.5);
    border: 1px solid #1e293b;
    border-radius: 8px;
    padding: 14px 16px;
    margin-bottom: 14px;
}

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

.cookie-section-title {
    font-weight: 700;
    color: #f8fafc;
    display: flex;
    align-items: center;
    gap: 8px;
}

.cookie-section-desc {
    color: #94a3b8;
    font-size: 0.85rem;
    margin: 0;
}

.cookie-badge-always {
    background: #10b981;
    color: #ffffff;
    font-size: 0.72rem;
    font-weight: 700;
    padding: 2px 8px;
    border-radius: 9999px;
    text-transform: uppercase;
}

/* Switch toggle */
.cookie-switch {
    position: relative;
    display: inline-block;
    width: 44px;
    height: 24px;
}

.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: #334155;
    transition: .3s cubic-bezier(0.4, 0, 0.2, 1);
    border-radius: 24px;
}

.cookie-slider:before {
    position: absolute;
    content: "";
    height: 18px;
    width: 18px;
    left: 3px;
    bottom: 3px;
    background-color: #ffffff;
    transition: .3s cubic-bezier(0.4, 0, 0.2, 1);
    border-radius: 50%;
}

.cookie-switch input:checked + .cookie-slider {
    background-color: #00e5ff;
    box-shadow: 0 0 10px rgba(0, 229, 255, 0.5);
}

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

.cookie-modal-footer {
    padding: 14px 20px;
    border-top: 1px solid #1e293b;
    background: #1e293b;
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 10px;
}

/* Footer trigger link */
.cookie-footer-link {
    cursor: pointer;
    color: #38bdf8;
    text-decoration: underline;
    font-size: 0.85rem;
    transition: color 0.2s ease;
    background: none;
    border: none;
    padding: 0;
}

.cookie-footer-link:hover {
    color: #00e5ff;
}
