/* ============================================================================
 * Bannière + panneau de consentement cookies — Galerie Yann.Art V5
 * Préfixe de classe : .gy-cookie-*
 * ============================================================================ */

.gy-cookie-overlay {
    position: fixed; inset: 0;
    background: rgba(0, 0, 0, 0.45);
    z-index: 9998;
    animation: gy-fade-in .25s ease-out;
}

.gy-cookie-banner,
.gy-cookie-settings {
    position: fixed;
    left: 50%;
    bottom: 32px;
    transform: translateX(-50%);
    width: calc(100% - 32px);
    max-width: 680px;
    background: #ffffff;
    color: #1a1a1a;
    border-radius: 14px;
    box-shadow: 0 18px 48px rgba(0, 0, 0, .18), 0 2px 4px rgba(0, 0, 0, .06);
    z-index: 9999;
    font-family: 'Open Sans', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    animation: gy-slide-up .3s ease-out;
}

.gy-cookie-banner-inner,
.gy-cookie-settings-inner {
    padding: 24px 28px;
}

.gy-cookie-title {
    margin: 0 0 8px;
    font-family: 'Montserrat', sans-serif;
    font-size: 18px;
    font-weight: 600;
    color: #1a1a1a;
}

.gy-cookie-desc {
    margin: 0 0 20px;
    font-size: 14px;
    line-height: 1.6;
    color: #555555;
}

.gy-cookie-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    justify-content: flex-end;
}

.gy-cookie-btn {
    appearance: none;
    border: 1px solid transparent;
    border-radius: 8px;
    padding: 10px 20px;
    font-size: 13px;
    font-weight: 600;
    letter-spacing: .3px;
    cursor: pointer;
    transition: background .2s, color .2s, border-color .2s;
    font-family: inherit;
}

.gy-cookie-btn-refuse {
    background: transparent;
    color: #666666;
    border-color: #dddddd;
}
.gy-cookie-btn-refuse:hover { background: #f5f5f5; color: #1a1a1a; }

.gy-cookie-btn-custom {
    background: #f5f5f5;
    color: #1a1a1a;
    border-color: #e5e5e5;
}
.gy-cookie-btn-custom:hover { background: #eaeaea; }

.gy-cookie-btn-accept {
    background: #0BCFE0;
    color: #ffffff;
    border-color: #0BCFE0;
}
.gy-cookie-btn-accept:hover { background: #02b5c5; border-color: #02b5c5; }

.gy-cookie-legal {
    margin: 14px 0 0;
    font-size: 12px;
    color: #888888;
    text-align: right;
}
.gy-cookie-link { color: #0BCFE0; text-decoration: none; }
.gy-cookie-link:hover { text-decoration: underline; }

/* Panneau paramètres */
.gy-cookie-settings[hidden] { display: none; }

.gy-cookie-category {
    padding: 18px 0;
    border-bottom: 1px solid #eeeeee;
}
.gy-cookie-category:last-of-type { border-bottom: none; }

.gy-cookie-category-head {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 12px;
}

.gy-cookie-category-name {
    font-weight: 600;
    font-size: 14px;
    color: #1a1a1a;
}

.gy-cookie-category-status {
    font-size: 12px;
    color: #888888;
    font-style: italic;
}

.gy-cookie-category-desc {
    margin: 8px 0 0;
    font-size: 13px;
    line-height: 1.5;
    color: #666666;
}

/* Switch toggle accessible */
.gy-cookie-switch {
    display: flex;
    align-items: center;
    gap: 12px;
    cursor: pointer;
    width: 100%;
    justify-content: space-between;
}
.gy-cookie-switch input[type="checkbox"] {
    position: absolute;
    opacity: 0;
    width: 0; height: 0;
    pointer-events: none;
}
.gy-cookie-slider {
    position: relative;
    display: inline-block;
    width: 40px; height: 22px;
    background: #cccccc;
    border-radius: 12px;
    transition: background .2s;
    flex-shrink: 0;
}
.gy-cookie-slider::before {
    content: '';
    position: absolute;
    top: 2px; left: 2px;
    width: 18px; height: 18px;
    background: #ffffff;
    border-radius: 50%;
    transition: transform .2s;
    box-shadow: 0 1px 2px rgba(0, 0, 0, .2);
}
.gy-cookie-switch input:checked + .gy-cookie-slider {
    background: #0BCFE0;
}
.gy-cookie-switch input:checked + .gy-cookie-slider::before {
    transform: translateX(18px);
}
.gy-cookie-switch input:focus-visible + .gy-cookie-slider {
    outline: 2px solid #0BCFE0;
    outline-offset: 2px;
}

/* Mobile */
@media (max-width: 600px) {
    .gy-cookie-banner,
    .gy-cookie-settings {
        bottom: 16px;
        width: calc(100% - 24px);
        max-width: none;
    }
    .gy-cookie-banner-inner,
    .gy-cookie-settings-inner {
        padding: 20px 20px;
    }
    .gy-cookie-actions { justify-content: stretch; }
    .gy-cookie-btn { flex: 1 1 calc(50% - 10px); text-align: center; }
    .gy-cookie-legal { text-align: center; }
}

@keyframes gy-slide-up {
    from { transform: translate(-50%, 20px); opacity: 0; }
    to { transform: translate(-50%, 0); opacity: 1; }
}

@keyframes gy-fade-in {
    from { opacity: 0; }
    to { opacity: 1; }
}

/* Quand la bannière est fermée par le JS (ajout de classe .is-hidden) */
.gy-cookie-banner.is-hidden,
.gy-cookie-settings.is-hidden,
.gy-cookie-overlay.is-hidden {
    display: none;
}
