/* JetSaveurs Cookie Consent - Styles */
:root {
    --jscc-accent: #c8102e;
    --jscc-bg-light: #ffffff;
    --jscc-text-light: #1a1a1a;
    --jscc-border-light: #e5e5e5;
    --jscc-bg-dark: #1f1f1f;
    --jscc-text-dark: #f5f5f5;
    --jscc-border-dark: #333;
    --jscc-shadow: 0 -4px 24px rgba(0,0,0,.12);
    --jscc-radius: 10px;
}

/* CRITIQUE : respecter l'attribut hidden (sinon overlay invisible bloque les clics) */
.jscc-banner[hidden],
.jscc-modal[hidden],
.jscc-floating[hidden] { display: none !important; }

/* Banner */
.jscc-banner {
    position: fixed;
    left: 16px;
    right: 16px;
    z-index: 999999;
    max-width: 1100px;
    margin: 0 auto;
    border-radius: var(--jscc-radius);
    box-shadow: var(--jscc-shadow);
    opacity: 0;
    transform: translateY(20px);
    transition: opacity .3s ease, transform .3s ease;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
    font-size: 14px;
    line-height: 1.5;
}
.jscc-banner.jscc-visible { opacity: 1; transform: translateY(0); }
.jscc-banner.jscc-bottom { bottom: 16px; }
.jscc-banner.jscc-center {
    top: 50%; left: 50%; right: auto; bottom: auto;
    transform: translate(-50%, -50%) scale(.95);
    max-width: 520px;
}
.jscc-banner.jscc-center.jscc-visible { transform: translate(-50%, -50%) scale(1); }

.jscc-light { background: var(--jscc-bg-light); color: var(--jscc-text-light); border: 1px solid var(--jscc-border-light); }
.jscc-dark  { background: var(--jscc-bg-dark);  color: var(--jscc-text-dark);  border: 1px solid var(--jscc-border-dark); }

.jscc-banner-inner { padding: 20px 24px; }
.jscc-title { margin: 0 0 8px; font-size: 17px; font-weight: 600; }
.jscc-text  { margin: 0 0 16px; font-size: 14px; }
.jscc-link  { color: var(--jscc-accent); text-decoration: underline; }

.jscc-actions {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
}

/* Buttons - boutons égaux en taille pour CNIL */
.jscc-btn {
    flex: 1 1 auto;
    min-width: 130px;
    padding: 11px 18px;
    font-size: 14px;
    font-weight: 600;
    border-radius: 6px;
    border: 1px solid transparent;
    cursor: pointer;
    transition: all .15s ease;
    font-family: inherit;
    text-align: center;
}
.jscc-btn:focus { outline: 2px solid var(--jscc-accent); outline-offset: 2px; }

.jscc-light .jscc-btn-reject,
.jscc-light .jscc-btn-customize {
    background: #fff;
    color: var(--jscc-text-light);
    border-color: #d0d0d0;
}
.jscc-light .jscc-btn-reject:hover,
.jscc-light .jscc-btn-customize:hover {
    background: #f5f5f5;
    border-color: #999;
}
.jscc-dark .jscc-btn-reject,
.jscc-dark .jscc-btn-customize {
    background: transparent;
    color: var(--jscc-text-dark);
    border-color: #555;
}
.jscc-dark .jscc-btn-reject:hover,
.jscc-dark .jscc-btn-customize:hover {
    background: #2a2a2a;
}

.jscc-btn-accept,
.jscc-btn-save {
    background: var(--jscc-accent);
    color: #fff;
    border-color: var(--jscc-accent);
}
.jscc-btn-accept:hover,
.jscc-btn-save:hover {
    filter: brightness(.9);
}

/* Modal */
.jscc-modal {
    position: fixed;
    inset: 0;
    z-index: 9999999;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition: opacity .25s ease;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
}
.jscc-modal.jscc-visible { opacity: 1; }
.jscc-modal-overlay {
    position: absolute; inset: 0;
    background: rgba(0,0,0,.55);
    backdrop-filter: blur(2px);
}
.jscc-modal-content {
    position: relative;
    width: 92%;
    max-width: 600px;
    max-height: 88vh;
    overflow: hidden;
    border-radius: var(--jscc-radius);
    box-shadow: 0 20px 60px rgba(0,0,0,.3);
    display: flex;
    flex-direction: column;
}
.jscc-light .jscc-modal-content { background: var(--jscc-bg-light); color: var(--jscc-text-light); }
.jscc-dark  .jscc-modal-content { background: var(--jscc-bg-dark);  color: var(--jscc-text-dark); }

.jscc-modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 18px 24px;
    border-bottom: 1px solid;
    border-color: inherit;
}
.jscc-light .jscc-modal-header { border-bottom-color: var(--jscc-border-light); }
.jscc-dark  .jscc-modal-header { border-bottom-color: var(--jscc-border-dark); }
.jscc-modal-header h2 { margin: 0; font-size: 18px; font-weight: 600; }
.jscc-close {
    background: none; border: none; cursor: pointer;
    font-size: 28px; line-height: 1; color: inherit;
    padding: 0; width: 32px; height: 32px;
}

.jscc-modal-body {
    padding: 20px 24px;
    overflow-y: auto;
    flex: 1;
    font-size: 14px;
    line-height: 1.5;
}

.jscc-category {
    padding: 14px 0;
    border-bottom: 1px solid;
}
.jscc-light .jscc-category { border-bottom-color: var(--jscc-border-light); }
.jscc-dark  .jscc-category { border-bottom-color: var(--jscc-border-dark); }
.jscc-category:last-child { border-bottom: none; }

.jscc-cat-header {
    display: flex; align-items: center; gap: 12px;
    margin-bottom: 6px;
}
.jscc-cat-header strong { font-size: 15px; }
.jscc-category p { margin: 0 0 0 56px; font-size: 13px; opacity: .8; }

.jscc-badge {
    margin-left: auto;
    font-size: 11px;
    padding: 3px 8px;
    background: var(--jscc-accent);
    color: #fff;
    border-radius: 99px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: .3px;
}

/* Toggle switch */
.jscc-switch {
    position: relative;
    display: inline-block;
    width: 44px;
    height: 24px;
    flex-shrink: 0;
}
.jscc-switch input { opacity: 0; width: 0; height: 0; }
.jscc-slider {
    position: absolute; inset: 0;
    background: #ccc;
    border-radius: 24px;
    cursor: pointer;
    transition: background .2s;
}
.jscc-slider::before {
    content: '';
    position: absolute;
    height: 18px; width: 18px;
    left: 3px; top: 3px;
    background: #fff;
    border-radius: 50%;
    transition: transform .2s;
}
.jscc-switch input:checked + .jscc-slider { background: var(--jscc-accent); }
.jscc-switch input:checked + .jscc-slider::before { transform: translateX(20px); }
.jscc-switch input:disabled + .jscc-slider { opacity: .6; cursor: not-allowed; }

.jscc-modal-footer {
    padding: 16px 24px;
    border-top: 1px solid;
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
}
.jscc-light .jscc-modal-footer { border-top-color: var(--jscc-border-light); }
.jscc-dark  .jscc-modal-footer { border-top-color: var(--jscc-border-dark); }

/* Floating button */
.jscc-floating {
    position: fixed;
    bottom: 20px;
    left: 20px;
    z-index: 999998;
    width: 44px;
    height: 44px;
    border-radius: 50%;
    background: var(--jscc-accent);
    color: #fff;
    border: none;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 4px 12px rgba(0,0,0,.2);
    transition: transform .15s;
}
.jscc-floating:hover { transform: scale(1.08); }

/* Mobile */
@media (max-width: 600px) {
    .jscc-banner { left: 8px; right: 8px; bottom: 8px; }
    .jscc-banner-inner { padding: 16px; }
    .jscc-actions { flex-direction: column; }
    .jscc-btn { width: 100%; min-width: 0; }
    .jscc-modal-footer { flex-direction: column; }
    .jscc-modal-footer .jscc-btn { width: 100%; }
}
