/* =========================================================================
   BANDEAU DE CONSENTEMENT — Loi 25 (Québec)
   Opt-in : rien de non essentiel ne se charge avant le consentement.
   Refuser est aussi simple qu'accepter. Choix mémorisé + ré-ouvrable.
   ========================================================================= */

.cc-banner, .cc-modal-overlay { box-sizing: border-box; }
.cc-banner *, .cc-modal * { box-sizing: border-box; }

/* ── Bandeau bas ── */
.cc-banner {
    position: fixed;
    left: 16px;
    right: 16px;
    bottom: 16px;
    z-index: 9000;
    max-width: 720px;
    margin: 0 auto;
    padding: 20px 22px;
    border-radius: 18px;
    background: rgba(255, 255, 255, 0.92);
    -webkit-backdrop-filter: blur(18px) saturate(160%);
    backdrop-filter: blur(18px) saturate(160%);
    border: 1px solid rgba(3, 4, 94, 0.10);
    box-shadow: 0 18px 50px rgba(3, 4, 94, 0.18);
    font-family: 'Open Sans', sans-serif;
    color: #1a2a3a;
    transform: translateY(140%);
    opacity: 0;
    transition: transform 0.45s cubic-bezier(.16,1,.3,1), opacity 0.45s ease;
}
.cc-banner.cc-visible { transform: translateY(0); opacity: 1; }

.cc-banner__title {
    font-family: 'Montserrat', sans-serif;
    font-weight: 800;
    font-size: 1rem;
    color: #03045e;
    margin: 0 0 6px;
    display: flex;
    align-items: center;
    gap: 8px;
}
.cc-banner__title i, .cc-banner__title svg { width: 18px; height: 18px; color: #0077b6; }

.cc-banner__text {
    font-size: 0.86rem;
    line-height: 1.55;
    color: #586e82;
    margin: 0 0 16px;
}
.cc-banner__text a { color: #0077b6; font-weight: 600; text-decoration: underline; }
.cc-banner__text a:hover { color: #00b4d8; }

.cc-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    align-items: center;
}

.cc-btn {
    font-family: 'Montserrat', sans-serif;
    font-weight: 700;
    font-size: 0.82rem;
    padding: 11px 20px;
    border-radius: 999px;
    cursor: pointer;
    border: 1px solid transparent;
    transition: all 0.2s ease;
}
.cc-btn--accept {
    background: linear-gradient(135deg, #0077b6, #00b4d8);
    color: #fff;
    box-shadow: 0 6px 18px rgba(0, 119, 182, 0.28);
}
.cc-btn--accept:hover { filter: brightness(1.06); }
/* Refuser : même importance visuelle qu'accepter (exigence Loi 25) */
.cc-btn--refuse {
    background: #eef1f6;
    color: #1a2a3a;
    border-color: rgba(3, 4, 94, 0.12);
}
.cc-btn--refuse:hover { background: #e4e8ef; }
.cc-btn--link {
    background: transparent;
    color: #586e82;
    padding: 11px 12px;
    text-decoration: underline;
}
.cc-btn--link:hover { color: #0077b6; }

/* ── Panneau de préférences (modal) ── */
.cc-modal-overlay {
    position: fixed;
    inset: 0;
    z-index: 9100;
    display: none;
    align-items: center;
    justify-content: center;
    padding: 20px;
    background: rgba(3, 4, 94, 0.34);
    -webkit-backdrop-filter: blur(3px);
    backdrop-filter: blur(3px);
}
.cc-modal-overlay.cc-open { display: flex; }

.cc-modal {
    width: 100%;
    max-width: 560px;
    max-height: 88vh;
    overflow-y: auto;
    background: #fff;
    border-radius: 20px;
    padding: 28px;
    box-shadow: 0 30px 70px rgba(3, 4, 94, 0.3);
    font-family: 'Open Sans', sans-serif;
    color: #1a2a3a;
}
.cc-modal h2 {
    font-family: 'Montserrat', sans-serif;
    font-size: 1.2rem;
    color: #03045e;
    margin: 0 0 6px;
}
.cc-modal__intro { font-size: 0.86rem; color: #586e82; line-height: 1.55; margin: 0 0 20px; }

.cc-cat {
    border: 1px solid rgba(3, 4, 94, 0.10);
    border-radius: 14px;
    padding: 16px 18px;
    margin-bottom: 12px;
}
.cc-cat__head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    margin-bottom: 6px;
}
.cc-cat__name { font-family: 'Montserrat', sans-serif; font-weight: 700; font-size: 0.92rem; color: #03045e; }
.cc-cat__desc { font-size: 0.82rem; color: #586e82; line-height: 1.5; margin: 0; }

/* Interrupteur */
.cc-switch { position: relative; width: 46px; height: 26px; flex-shrink: 0; }
.cc-switch input { opacity: 0; width: 0; height: 0; }
.cc-slider {
    position: absolute; inset: 0; cursor: pointer;
    background: #cbd5e1; border-radius: 999px; transition: 0.25s;
}
.cc-slider::before {
    content: ''; position: absolute; height: 20px; width: 20px;
    left: 3px; top: 3px; background: #fff; border-radius: 50%; transition: 0.25s;
    box-shadow: 0 1px 3px rgba(0,0,0,0.25);
}
.cc-switch input:checked + .cc-slider { background: linear-gradient(135deg, #0077b6, #00b4d8); }
.cc-switch input:checked + .cc-slider::before { transform: translateX(20px); }
.cc-switch input:disabled + .cc-slider { background: #0077b6; opacity: 0.55; cursor: not-allowed; }

.cc-cat--locked .cc-tag {
    font-size: 0.68rem; font-weight: 700; color: #0077b6;
    background: rgba(0,180,216,0.12); padding: 3px 9px; border-radius: 999px;
    text-transform: uppercase; letter-spacing: 0.04em;
}

.cc-modal__actions { display: flex; gap: 10px; flex-wrap: wrap; margin-top: 18px; }

/* ── Placeholder qui remplace un contenu tiers non consenti (ex. Google Maps) ── */
.cc-placeholder {
    width: 100%;
    height: 100%;
    min-height: 240px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 12px;
    text-align: center;
    padding: 28px;
    background: linear-gradient(160deg, #eef3f9, #e4ecf5);
    border-radius: inherit;
    color: #586e82;
}
.cc-placeholder i, .cc-placeholder svg { width: 34px; height: 34px; color: #0077b6; }
.cc-placeholder__txt { font-size: 0.84rem; line-height: 1.5; max-width: 360px; }
.cc-placeholder__btn {
    font-family: 'Montserrat', sans-serif; font-weight: 700; font-size: 0.8rem;
    padding: 10px 18px; border-radius: 999px; cursor: pointer; border: none;
    background: linear-gradient(135deg, #0077b6, #00b4d8); color: #fff;
    box-shadow: 0 6px 16px rgba(0,119,182,0.26);
}
.cc-placeholder__btn:hover { filter: brightness(1.06); }

/* ── Responsive ── */
@media (max-width: 540px) {
    .cc-banner { padding: 18px 16px; left: 10px; right: 10px; bottom: 10px; }
    .cc-actions { flex-direction: column; align-items: stretch; }
    .cc-btn { width: 100%; text-align: center; }
    .cc-btn--link { order: 3; }
}

@media (prefers-reduced-motion: reduce) {
    .cc-banner { transition: opacity 0.3s ease; transform: none; }
}

/* Lien légal permanent injecté en bas des pages qui n'en ont pas déjà un */
.cc-legal-footer {
    text-align: center;
    padding: 16px;
    font-family: 'Open Sans', sans-serif;
    font-size: 0.78rem;
    color: #586e82;
    background: #f3f3f4;
    border-top: 1px solid rgba(3, 4, 94, 0.06);
}
.cc-legal-footer a { color: #0077b6; text-decoration: none; margin: 0 6px; }
.cc-legal-footer a:hover { text-decoration: underline; }
