/* ========================================
   BANNIÈRE COOKIE CONSENT — RGPD
   ======================================== */

/* Overlay */
.cookie-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.5);
    z-index: 999998;
    opacity: 0;
    transition: opacity 0.3s ease;
    pointer-events: none;
}
.cookie-overlay.visible {
    opacity: 1;
    pointer-events: auto;
}

/* Banner */
.cookie-banner {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    z-index: 999999;
    background: #FFFFFF;
    box-shadow: 0 -4px 30px rgba(0, 0, 0, 0.15);
    transform: translateY(100%);
    transition: transform 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    font-family: var(--font-body, 'Montserrat', sans-serif);
}
.cookie-banner.visible {
    transform: translateY(0);
}

.cookie-banner-inner {
    max-width: 1200px;
    margin: 0 auto;
    padding: 28px 32px;
}

/* Header */
.cookie-banner-header {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 12px;
}
.cookie-banner-header svg {
    flex-shrink: 0;
}
.cookie-banner-title {
    font-family: var(--font-heading, 'Prata', serif);
    font-size: 1.15rem;
    font-weight: 600;
    color: #140A02;
    margin: 0;
}

/* Text */
.cookie-banner-text {
    font-size: 0.9rem;
    line-height: 1.6;
    color: #555;
    margin-bottom: 20px;
}
.cookie-banner-text a {
    color: #E0B96E;
    text-decoration: none;
    font-weight: 600;
    transition: color 0.2s;
}
.cookie-banner-text a:hover {
    color: #140A02;
    text-decoration: underline;
}

/* Buttons */
.cookie-banner-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    align-items: center;
}

.cookie-btn {
    padding: 12px 28px;
    border-radius: 50px;
    font-family: var(--font-button, 'Montserrat', sans-serif);
    font-size: 0.9rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    border: 2px solid transparent;
    letter-spacing: 0.3px;
}

.cookie-btn-accept {
    background: linear-gradient(135deg, #E0B96E, #ECC484);
    color: #000;
    border-color: #E0B96E;
}
.cookie-btn-accept:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(224, 185, 110, 0.4);
}

.cookie-btn-refuse {
    background: transparent;
    color: #140A02;
    border-color: #E5E5E5;
}
.cookie-btn-refuse:hover {
    border-color: #140A02;
    background: #F9F9F9;
    color: #140A02;
}

.cookie-btn-settings {
    background: transparent;
    color: #888;
    border: none;
    padding: 12px 16px;
    font-weight: 500;
    text-decoration: underline;
    text-underline-offset: 3px;
}
.cookie-btn-settings:hover {
    color: #140A02;
}

/* ========================================
   PANNEAU PERSONNALISATION
   ======================================== */
.cookie-settings-panel {
    display: none;
    margin-top: 20px;
    padding-top: 20px;
    border-top: 1px solid #E5E5E5;
}
.cookie-settings-panel.visible {
    display: block;
    animation: cookieSlideDown 0.3s ease-out;
}

@keyframes cookieSlideDown {
    from { opacity: 0; transform: translateY(-10px); }
    to   { opacity: 1; transform: translateY(0); }
}

.cookie-setting-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 14px 0;
    border-bottom: 1px solid #F0F0F0;
}
.cookie-setting-item:last-child {
    border-bottom: none;
}

.cookie-setting-info {
    flex: 1;
    padding-right: 20px;
}
.cookie-setting-name {
    font-weight: 600;
    font-size: 0.9rem;
    color: #140A02;
    margin-bottom: 3px;
}
.cookie-setting-desc {
    font-size: 0.8rem;
    color: #888;
    line-height: 1.4;
}

/* Toggle switch */
.cookie-toggle {
    position: relative;
    width: 48px;
    height: 26px;
    flex-shrink: 0;
}
.cookie-toggle input {
    opacity: 0;
    width: 0;
    height: 0;
}
.cookie-toggle-slider {
    position: absolute;
    inset: 0;
    background: #DDD;
    border-radius: 26px;
    cursor: pointer;
    transition: background 0.3s;
}
.cookie-toggle-slider::before {
    content: '';
    position: absolute;
    width: 20px;
    height: 20px;
    left: 3px;
    bottom: 3px;
    background: #FFF;
    border-radius: 50%;
    transition: transform 0.3s;
    box-shadow: 0 1px 3px rgba(0,0,0,0.15);
}
.cookie-toggle input:checked + .cookie-toggle-slider {
    background: #E0B96E;
}
.cookie-toggle input:checked + .cookie-toggle-slider::before {
    transform: translateX(22px);
}
.cookie-toggle input:disabled + .cookie-toggle-slider {
    opacity: 0.6;
    cursor: not-allowed;
}

/* Save prefs button */
.cookie-btn-save {
    margin-top: 16px;
    background: linear-gradient(135deg, #E0B96E, #ECC484);
    color: #000;
    border-color: #E0B96E;
}
.cookie-btn-save:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(224, 185, 110, 0.4);
}

/* ========================================
   RESPONSIVE
   ======================================== */
@media (max-width: 768px) {
    .cookie-banner-inner {
        padding: 24px 20px;
    }
    .cookie-banner-actions {
        flex-direction: column;
        width: 100%;
    }
    .cookie-btn {
        width: 100%;
        text-align: center;
    }
    .cookie-btn-settings {
        width: auto;
    }
}

@media (max-width: 480px) {
    .cookie-banner-inner {
        padding: 20px 16px;
    }
    .cookie-banner-title {
        font-size: 1.05rem;
    }
    .cookie-banner-text {
        font-size: 0.85rem;
    }
}
