/* Bandeau + panneau de préférences cookies */

.cookie-overlay {
    position: fixed;
    inset: 0;
    z-index: 9998;
    background: rgba(0, 0, 0, 0.55);
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.35s ease;
}

.cookie-overlay.is-visible {
    opacity: 1;
    pointer-events: auto;
}

.cookie-banner {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    z-index: 10000;
    padding: 1.25rem clamp(1rem, 3vw, 1.5rem);
    background: #111;
    border-top: 1px solid rgba(201, 167, 106, 0.3);
    box-shadow: 0 -16px 48px rgba(0, 0, 0, 0.5);
    transform: translateY(110%);
    opacity: 0;
    transition: transform 0.4s ease, opacity 0.4s ease;
}

.cookie-banner.is-visible {
    transform: translateY(0);
    opacity: 1;
}

.cookie-banner-inner {
    max-width: 1180px;
    margin: 0 auto;
}

.cookie-banner-title {
    margin: 0 0 0.5rem;
    font-size: 1.05rem;
    font-weight: 600;
    color: #f4efe6;
}

.cookie-banner-text {
    margin: 0 0 1rem;
    font-size: 0.88rem;
    line-height: 1.65;
    color: #b8b0a3;
    max-width: 900px;
}

.cookie-banner-text a {
    color: #c9a76a;
    text-decoration: underline;
    text-underline-offset: 2px;
}

.cookie-banner-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 0.55rem;
    align-items: center;
}

.cookie-btn {
    font-family: inherit;
    font-size: 0.82rem;
    font-weight: 600;
    padding: 0.6rem 1.15rem;
    border-radius: 6px;
    cursor: pointer;
    border: 1px solid transparent;
    transition: background 0.2s, border-color 0.2s, color 0.2s;
}

.cookie-btn--accept {
    background: #c9a76a;
    color: #111;
    border-color: #c9a76a;
}

.cookie-btn--accept:hover {
    background: #d4b57a;
}

.cookie-btn--reject {
    background: transparent;
    color: #f4efe6;
    border-color: rgba(255, 255, 255, 0.22);
}

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

.cookie-btn--settings {
    background: transparent;
    color: #c9a76a;
    border-color: rgba(201, 167, 106, 0.45);
}

.cookie-btn--settings:hover {
    background: rgba(201, 167, 106, 0.1);
}

/* Panneau personnalisation */
.cookie-panel {
    position: fixed;
    top: 50%;
    left: 50%;
    z-index: 10001;
    width: min(520px, calc(100vw - 2rem));
    max-height: min(90vh, 640px);
    overflow-y: auto;
    background: #141414;
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 12px;
    box-shadow: 0 24px 80px rgba(0, 0, 0, 0.6);
    transform: translate(-50%, -50%) scale(0.96);
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.3s ease, transform 0.3s ease;
}

.cookie-panel.is-visible {
    transform: translate(-50%, -50%) scale(1);
    opacity: 1;
    pointer-events: auto;
}

.cookie-panel-header {
    padding: 1.25rem 1.35rem 0.75rem;
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

.cookie-panel-header h2 {
    margin: 0 0 0.35rem;
    font-size: 1.15rem;
    font-weight: 600;
    color: #f4efe6;
}

.cookie-panel-header p {
    margin: 0;
    font-size: 0.82rem;
    line-height: 1.55;
    color: #b8b0a3;
}

.cookie-panel-body {
    padding: 1rem 1.35rem;
}

.cookie-category {
    padding: 1rem 0;
    border-bottom: 1px solid rgba(255, 255, 255, 0.07);
}

.cookie-category:last-child {
    border-bottom: none;
}

.cookie-category-head {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 1rem;
    margin-bottom: 0.4rem;
}

.cookie-category-head h3 {
    margin: 0;
    font-size: 0.92rem;
    font-weight: 600;
    color: #f4efe6;
}

.cookie-category p {
    margin: 0;
    font-size: 0.8rem;
    line-height: 1.55;
    color: #b8b0a3;
}

.cookie-badge {
    flex-shrink: 0;
    font-size: 0.68rem;
    font-weight: 600;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    padding: 0.25rem 0.55rem;
    border-radius: 4px;
    background: rgba(201, 167, 106, 0.15);
    color: #c9a76a;
    border: 1px solid rgba(201, 167, 106, 0.3);
}

.cookie-toggle {
    position: relative;
    flex-shrink: 0;
    width: 44px;
    height: 24px;
    cursor: pointer;
}

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

.cookie-toggle-slider {
    position: absolute;
    inset: 0;
    background: #333;
    border-radius: 24px;
    transition: background 0.2s;
}

.cookie-toggle-slider::before {
    content: '';
    position: absolute;
    width: 18px;
    height: 18px;
    left: 3px;
    top: 3px;
    background: #fff;
    border-radius: 50%;
    transition: transform 0.2s;
}

.cookie-toggle input:checked + .cookie-toggle-slider {
    background: #c9a76a;
}

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

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

.cookie-panel-footer {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    padding: 1rem 1.35rem 1.25rem;
    border-top: 1px solid rgba(255, 255, 255, 0.08);
}

.cookie-panel-footer .cookie-btn {
    flex: 1 1 auto;
    min-width: 120px;
    text-align: center;
}

.cookie-status-box {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 1rem 1.15rem;
    margin-bottom: 1.5rem;
    background: rgba(201, 167, 106, 0.08);
    border: 1px solid rgba(201, 167, 106, 0.25);
    border-radius: 10px;
}

.cookie-status-dot {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    flex-shrink: 0;
}

.cookie-status-dot--accepted { background: #5cb85c; }
.cookie-status-dot--rejected { background: #d9534f; }
.cookie-status-dot--pending { background: #c9a76a; }

.cookie-status-text {
    margin: 0;
    font-size: 0.88rem;
    color: #f4efe6;
}

.cookie-status-text span {
    color: #b8b0a3;
    display: block;
    font-size: 0.8rem;
    margin-top: 0.15rem;
}

.footer-legal-links {
    margin: 0.5rem 0 0;
    font-size: 0.78rem;
    color: var(--text-muted, #b8b0a3);
    text-align: center;
    line-height: 1.8;
}

.footer-legal-links a:is(:link, :visited) {
    color: var(--text-muted, #b8b0a3);
    text-decoration: none;
    transition: color 0.2s;
}

.footer-legal-links a:hover {
    color: #c9a76a;
}

.footer-legal-links span[aria-hidden="true"] {
    margin: 0 0.35rem;
    opacity: 0.5;
}

.footer-cookie-settings {
    font-family: inherit;
    font-size: inherit;
    color: var(--text-muted, #b8b0a3);
    background: none;
    border: none;
    padding: 0;
    cursor: pointer;
    text-decoration: underline;
    text-underline-offset: 2px;
}

.footer-cookie-settings:hover {
    color: #c9a76a;
}

@media (max-width: 640px) {
    .cookie-banner-actions,
    .cookie-panel-footer {
        flex-direction: column;
    }

    .cookie-btn {
        width: 100%;
        text-align: center;
    }
}
