/* =====================================================
   O'CUPS — Bannière de consentement cookies
   Styles autonomes. Utilise les variables :root de style.css
   (--green-primary, --beige, etc.) qui sont chargées avant.
===================================================== */

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

/* ---------- Bannière ---------- */
.cc-banner {
    position: fixed;
    left: 50%;
    bottom: 22px;
    transform: translateX(-50%);
    width: min(940px, calc(100% - 32px));
    z-index: 9000;
    background: var(--off-white, #FCF9F6);
    border: 1px solid rgba(0, 0, 0, .06);
    border-radius: 18px;
    box-shadow: 0 16px 40px rgba(11, 93, 63, .14);
    padding: 22px 26px;
    display: none;
    grid-template-columns: 1fr auto;
    gap: 22px;
    align-items: center;
    font-family: 'Inter', sans-serif;
}
.cc-banner.is-open { display: grid; }

.cc-banner__text h2 {
    font-family: 'Poppins', sans-serif;
    font-size: 17px;
    color: var(--green-primary, #005D3F);
    margin: 0 0 6px;
}
.cc-banner__text p {
    font-size: 13.5px;
    line-height: 1.6;
    color: var(--text-secondary, #5F5E58);
    max-width: 560px;
    margin: 0;
}
.cc-banner__text a {
    color: var(--green-primary, #005D3F);
    font-weight: 600;
    text-decoration: none;
}
.cc-banner__text a:hover { text-decoration: underline; }

.cc-banner__actions {
    display: flex;
    flex-direction: column;
    gap: 10px;
    align-items: stretch;
    min-width: 210px;
}
.cc-row { display: flex; gap: 10px; }

/* ---------- Boutons ---------- */
.cc-btn {
    font-family: 'Inter', sans-serif;
    font-size: 12.5px;
    font-weight: 600;
    letter-spacing: .02em;
    height: 42px;
    padding: 0 20px;
    border-radius: 999px;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    white-space: nowrap;
    transition: all .2s ease;
    flex: 1;
}
.cc-btn--primary {
    background: #0B5D3F;
    color: var(--beige, #F5F1E8);
    border: 1px solid #0B5D3F;
}
.cc-btn--primary:hover { background: #094E35; }
.cc-btn--ghost {
    background: #fff;
    color: var(--green-primary, #005D3F);
    border: 1px solid var(--green-primary, #005D3F);
}
.cc-btn--ghost:hover { background: var(--green-light, #D0D9CA); }
.cc-btn--text {
    background: none;
    border: none;
    color: var(--text-secondary, #5F5E58);
    font-family: 'Inter', sans-serif;
    font-weight: 600;
    font-size: 12.5px;
    text-decoration: underline;
    padding: 2px;
    cursor: pointer;
}
.cc-btn--text:hover { color: var(--green-primary, #005D3F); }

/* ---------- Panneau de préférences ---------- */
.cc-modal {
    position: fixed;
    inset: 0;
    z-index: 9500;
    display: none;
    align-items: center;
    justify-content: center;
    padding: 20px;
    background: rgba(15, 28, 23, .45);
    font-family: 'Inter', sans-serif;
}
.cc-modal.is-open { display: flex; }

.cc-panel {
    background: #fff;
    border-radius: 18px;
    max-width: 560px;
    width: 100%;
    max-height: 88vh;
    overflow: auto;
    box-shadow: 0 24px 60px rgba(0, 0, 0, .25);
}
.cc-panel__head { padding: 24px 26px 6px; }
.cc-panel__head h2 {
    font-family: 'Poppins', sans-serif;
    font-size: 20px;
    color: var(--green-primary, #005D3F);
    margin: 0 0 8px;
}
.cc-panel__head p {
    font-size: 13.5px;
    line-height: 1.6;
    color: var(--text-secondary, #5F5E58);
    margin: 0;
}
.cc-panel__body { padding: 14px 26px; }

.cc-cat {
    border: 1px solid rgba(0, 0, 0, .08);
    border-radius: 14px;
    padding: 16px 18px;
    margin-bottom: 14px;
    display: flex;
    justify-content: space-between;
    gap: 16px;
    align-items: flex-start;
}
.cc-cat__info h3 {
    font-family: 'Poppins', sans-serif;
    font-size: 15px;
    margin: 0 0 4px;
    color: var(--text-primary, #1E1E1E);
}
.cc-cat__info p {
    font-size: 12.5px;
    line-height: 1.5;
    color: var(--text-secondary, #5F5E58);
    margin: 0;
}

/* Interrupteur */
.cc-switch { position: relative; width: 46px; height: 26px; flex: 0 0 auto; margin-top: 2px; }
.cc-switch input { opacity: 0; width: 0; height: 0; position: absolute; }
.cc-slider {
    position: absolute; inset: 0; border-radius: 999px;
    background: #d5d5d0; transition: .2s; cursor: pointer;
}
.cc-slider::before {
    content: ""; position: absolute; height: 20px; width: 20px; left: 3px; top: 3px;
    background: #fff; border-radius: 50%; transition: .2s; box-shadow: 0 1px 3px rgba(0, 0, 0, .25);
}
.cc-switch input:checked + .cc-slider { background: var(--green-secondary, #5F9F6D); }
.cc-switch input:checked + .cc-slider::before { transform: translateX(20px); }
.cc-switch input:disabled + .cc-slider { background: var(--green-light, #D0D9CA); cursor: not-allowed; opacity: .9; }

.cc-panel__foot {
    padding: 16px 26px 24px;
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
    border-top: 1px solid rgba(0, 0, 0, .06);
    position: sticky;
    bottom: 0;
    background: #fff;
}
.cc-panel__foot .cc-btn { flex: 1; min-width: 130px; }

/* ---------- Lien "Gestion des cookies" dans le footer ---------- */
/* Bouton calé sur le style des liens légaux voisins, desktop et mobile. */
.cc-prefs-open {
    background: none;
    border: 0;
    padding: 0;
    margin: 0;
    cursor: pointer;
    font-family: 'Inter', sans-serif;
    line-height: inherit;
}
/* Desktop — comme .footer-legal-links a */
.footer-legal-links .cc-prefs-open {
    font-size: 13px;
    font-weight: 500;
    color: #5F5E58;
    transition: color 0.2s ease;
}
.footer-legal-links .cc-prefs-open:hover { color: #0B5D3F; }
/* Mobile — comme .mobile-footer-legal a */
.mobile-footer-legal .cc-prefs-open {
    font-size: 12px;
    color: #6E6E6E;
}
.mobile-footer-legal .cc-prefs-open:hover { color: #0B5D3F; }

/* ---------- Responsive ---------- */
@media (max-width: 600px) {
    .cc-banner { grid-template-columns: 1fr; gap: 16px; padding: 18px 18px 20px; }
    .cc-banner__actions { min-width: 0; }
    .cc-btn { font-size: 12px; }
}
