/* ------------------------------------------------------------------
   Bandeau RGPD + panneau de préférences.
   Instancié par /public/assets/js/cookieconsent.js
   ------------------------------------------------------------------ */

#cc-root * { box-sizing: border-box; }

/* Verrou d'interaction tant que le visiteur n'a pas fait de choix */
body.cc-locked { overflow: hidden; }

.cc-backdrop {
    position: fixed;
    inset: 0;
    z-index: 9998;
    background: rgba(12, 16, 24, 0.55);
}
.cc-backdrop[hidden] { display: none; }

.cc-banner {
    position: fixed;
    left: 16px;
    right: 16px;
    bottom: 16px;
    z-index: 9999;
    background: #fff;
    color: #0F1115;
    border: 1px solid #E7E2D9;
    border-radius: 14px;
    box-shadow: 0 12px 32px rgba(0, 0, 0, 0.18);
    padding: 18px 20px;
    display: flex;
    flex-wrap: wrap;
    gap: 14px;
    align-items: center;
    justify-content: space-between;
    max-width: 1080px;
    margin: 0 auto;
    font-family: Inter, system-ui, -apple-system, "Segoe UI", sans-serif;
    font-size: 14px;
    line-height: 1.5;
}
.cc-banner[hidden] { display: none; }

.cc-banner__text { flex: 1 1 320px; }
.cc-banner__text strong { display: block; font-weight: 600; margin-bottom: 2px; }
.cc-banner__text a { color: #B1001A; text-decoration: underline; text-underline-offset: 2px; }

.cc-banner__actions {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.cc-btn {
    font: inherit;
    padding: 9px 16px;
    border-radius: 8px;
    border: 1px solid transparent;
    cursor: pointer;
    transition: background 0.15s, border-color 0.15s;
}
.cc-btn--primary   { background: #B1001A; color: #fff; }
.cc-btn--primary:hover   { background: #8a0014; }
.cc-btn--secondary { background: transparent; color: #0F1115; border-color: #CED2D7; }
.cc-btn--secondary:hover { background: #f5f3ef; }
.cc-btn--link      { background: transparent; color: #0F1115; text-decoration: underline; border-color: transparent; padding: 9px 10px; }

/* ---------------- Prefs modal ---------------- */

.cc-modal {
    position: fixed;
    inset: 0;
    z-index: 10001;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
}
.cc-modal[hidden] { display: none; }

.cc-modal__backdrop {
    position: absolute; inset: 0;
    background: rgba(12, 16, 24, 0.55);
}

.cc-modal__panel {
    position: relative;
    max-width: 640px; width: 100%;
    background: #fff;
    border-radius: 14px;
    overflow: hidden;
    display: flex; flex-direction: column;
    max-height: 90vh;
    box-shadow: 0 24px 48px rgba(0, 0, 0, 0.25);
}

.cc-modal__head {
    padding: 18px 22px;
    border-bottom: 1px solid #eceef2;
    display: flex; justify-content: space-between; align-items: center;
}
.cc-modal__head h2 { margin: 0; font-size: 17px; font-weight: 600; }
.cc-modal__close { background: transparent; border: 0; font-size: 26px; cursor: pointer; color: #6b7280; }

.cc-modal__body {
    padding: 16px 22px;
    overflow-y: auto;
    flex: 1;
    font-size: 14px;
}

.cc-cat {
    padding: 14px 0;
    border-bottom: 1px solid #eceef2;
}
.cc-cat:last-child { border-bottom: 0; }
.cc-cat__head {
    display: flex; justify-content: space-between; align-items: center;
    gap: 12px;
}
.cc-cat__title { font-weight: 600; font-size: 14px; }
.cc-cat__desc  { color: #4b5160; font-size: 13px; margin-top: 2px; }

.cc-toggle {
    position: relative;
    width: 40px; height: 22px;
    background: #cbd5e1; border-radius: 999px;
    cursor: pointer;
    flex-shrink: 0;
    transition: background 0.15s;
}
.cc-toggle::after {
    content: ""; position: absolute;
    top: 2px; left: 2px; width: 18px; height: 18px;
    background: #fff; border-radius: 50%;
    transition: transform 0.15s;
}
.cc-toggle[aria-checked="true"] { background: #059669; }
.cc-toggle[aria-checked="true"]::after { transform: translateX(18px); }
.cc-toggle[aria-disabled="true"] { cursor: not-allowed; opacity: 0.85; }
.cc-toggle[aria-disabled="true"][aria-checked="true"] { background: #059669; }
.cc-toggle[aria-disabled="true"][aria-checked="false"] { background: #94a3b8; }

.cc-cat__details {
    margin-top: 8px; padding-left: 0;
    font-size: 12px; color: #4b5160;
}
.cc-cat__details summary { cursor: pointer; padding: 4px 0; }
.cc-cat__details table {
    width: 100%; margin-top: 6px;
    border-collapse: collapse;
    font-size: 12px;
}
.cc-cat__details th, .cc-cat__details td {
    text-align: left; padding: 4px 6px;
    border-bottom: 1px solid #eceef2;
    vertical-align: top;
}
.cc-cat__details th { background: #f7f8fa; font-weight: 600; }

.cc-modal__foot {
    padding: 14px 22px;
    border-top: 1px solid #eceef2;
    display: flex; flex-wrap: wrap; gap: 8px;
    justify-content: flex-end;
    background: #fafbfc;
}
