/* =========================================================================
   Consentement aux cookies — bandeau (.ogc-bar) et fenêtre « Gérer mes cookies » (.ogc-modal).
   HTML : src/Consent.php ; comportement : assets/js/consent.js. Chargé sur toutes les pages : tout est isolé sous .ogc
   et redéfini explicitement (le thème a ses propres règles pour p, a, button, label).
   « Tout refuser » et « Tout accepter » ont volontairement la même présentation.
   ========================================================================= */
.ogc[hidden], .ogc [hidden] { display: none !important; }
.ogc, .ogc * { box-sizing: border-box; }
.ogc { font-family: 'Inter', 'Nunito', 'Segoe UI', Arial, sans-serif; color: #192944; -webkit-text-size-adjust: 100%; }
.ogc p { margin: 0; padding: 0; font-family: inherit; text-transform: none; letter-spacing: 0; }
.ogc a { color: #1467a2; text-decoration: underline; text-underline-offset: 2px; font-weight: 600; }
.ogc a:hover { color: #0f5592; }

/* ---- bandeau ---- */
.ogc-bar { position: fixed; z-index: 2147483000; left: 24px; bottom: 24px; width: 470px; max-width: calc(100vw - 48px); padding: 22px 24px 20px; border: 1px solid #e3eaf1; border-radius: 16px; background: #fff; box-shadow: 0 18px 50px rgba(2, 8, 47, .22); }
.ogc .ogc-bar__title { margin-bottom: 8px; font-size: 18px; line-height: 1.3; font-weight: 800; color: #02082f; }
.ogc .ogc-bar__txt { font-size: 14px; line-height: 1.55; color: #3b4a63; }
.ogc-bar__btns { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 16px; }
.ogc-bar__btns .ogc-btn { flex: 1 1 0; }
.ogc-bar__btns .ogc-btn--ghost { flex: 1 1 100%; order: 3; }

/* ---- boutons ---- */
.ogc .ogc-btn { display: inline-flex; align-items: center; justify-content: center; min-height: 44px; margin: 0; padding: 10px 16px; border: 1.5px solid #3376a8; border-radius: 10px; background: #3376a8; color: #fff; font: inherit; font-size: 14.5px; line-height: 1.2; font-weight: 700; text-transform: none; letter-spacing: 0; text-align: center; white-space: nowrap; cursor: pointer; transition: background .15s, border-color .15s, color .15s; -webkit-appearance: none; appearance: none; }
.ogc .ogc-btn:hover { background: #28618c; border-color: #28618c; }
.ogc .ogc-btn--ghost { background: #fff; color: #3376a8; border-color: #c9d8e6; }
.ogc .ogc-btn--ghost:hover { background: #f5f9fc; border-color: #3376a8; color: #28618c; }
.ogc .ogc-btn:focus-visible, .ogc .ogc-modal__x:focus-visible, .ogc a:focus-visible { outline: 3px solid #f0a020; outline-offset: 2px; }

/* ---- fenêtre ---- */
.ogc-modal { position: fixed; z-index: 2147483001; inset: 0; display: flex; align-items: center; justify-content: center; padding: 20px; }
.ogc-modal__back { position: absolute; inset: 0; background: rgba(2, 8, 47, .55); }
.ogc-modal__box { position: relative; display: flex; flex-direction: column; width: 620px; max-width: 100%; max-height: calc(100vh - 40px); max-height: calc(100dvh - 40px); border-radius: 16px; background: #fff; box-shadow: 0 24px 70px rgba(2, 8, 47, .35); outline: 0; }
.ogc-modal__head { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 20px 24px 14px; border-bottom: 1px solid #e3eaf1; }
.ogc .ogc-modal__title { font-size: 20px; line-height: 1.3; font-weight: 800; color: #02082f; }
.ogc .ogc-modal__x { display: inline-flex; align-items: center; justify-content: center; width: 40px; height: 40px; margin: 0 -8px 0 0; padding: 0; border: 0; border-radius: 10px; background: transparent; color: #5b6b85; cursor: pointer; -webkit-appearance: none; appearance: none; }
.ogc .ogc-modal__x:hover { background: #f1f5f9; color: #02082f; }
.ogc-modal__body { padding: 16px 24px 6px; overflow-y: auto; -webkit-overflow-scrolling: touch; }
.ogc .ogc-modal__intro { margin-bottom: 6px; font-size: 14px; line-height: 1.55; color: #3b4a63; }
.ogc-cat { display: flex; align-items: flex-start; justify-content: space-between; gap: 18px; padding: 16px 0; border-top: 1px solid #e3eaf1; }
.ogc-cat:first-of-type { border-top: 0; }
.ogc-cat__txt { flex: 1 1 auto; min-width: 0; }
.ogc .ogc-cat__title { margin-bottom: 4px; font-size: 15.5px; line-height: 1.35; font-weight: 700; color: #02082f; }
.ogc .ogc-cat__desc { font-size: 13.5px; line-height: 1.5; color: #5b6b85; }
.ogc .ogc-cat__always { flex: 0 0 auto; margin-top: 2px; padding: 4px 10px; border-radius: 999px; background: #eaf5ee; color: #1e7a43; font-size: 12.5px; line-height: 1.4; font-weight: 700; white-space: nowrap; }
.ogc-modal__foot { display: flex; flex-wrap: wrap; gap: 10px; padding: 16px 24px 20px; border-top: 1px solid #e3eaf1; }
.ogc-modal__foot .ogc-btn { flex: 1 1 0; }

/* ---- interrupteur ---- */
.ogc .ogc-switch { position: relative; flex: 0 0 auto; display: inline-block; width: 48px; height: 28px; margin: 0; padding: 0; cursor: pointer; }
.ogc .ogc-switch input { position: absolute; inset: 0; width: 100%; height: 100%; margin: 0; opacity: 0; cursor: pointer; }
.ogc-switch__ui { position: absolute; inset: 0; border-radius: 999px; background: #c2ccd8; transition: background .15s; pointer-events: none; }
.ogc-switch__ui::after { content: ''; position: absolute; top: 3px; left: 3px; width: 22px; height: 22px; border-radius: 50%; background: #fff; box-shadow: 0 1px 3px rgba(2, 8, 47, .3); transition: transform .15s; }
.ogc-switch input:checked + .ogc-switch__ui { background: #3376a8; }
.ogc-switch input:checked + .ogc-switch__ui::after { transform: translateX(20px); }
.ogc-switch input:focus-visible + .ogc-switch__ui { outline: 3px solid #f0a020; outline-offset: 2px; }

html.ogc-open { overflow: hidden; }

@media (max-width: 767px) {
    .ogc-bar { left: 0; right: 0; bottom: 0; width: auto; max-width: none; padding: 18px 16px calc(16px + env(safe-area-inset-bottom, 0px)); border: 0; border-top: 1px solid #e3eaf1; border-radius: 16px 16px 0 0; box-shadow: 0 -10px 40px rgba(2, 8, 47, .25); }
    .ogc .ogc-bar__title { font-size: 16.5px; }
    .ogc .ogc-bar__txt { font-size: 13.5px; }
    .ogc .ogc-btn { padding: 10px 10px; font-size: 14px; }
    .ogc-modal { padding: 0; align-items: flex-end; }
    .ogc-modal__box { width: 100%; max-height: 92vh; max-height: 92dvh; border-radius: 16px 16px 0 0; }
    .ogc-modal__head { padding: 16px 16px 12px; }
    .ogc .ogc-modal__title { font-size: 18px; }
    .ogc-modal__body { padding: 12px 16px 4px; }
    .ogc-cat { gap: 12px; padding: 14px 0; }
    .ogc-modal__foot { padding: 12px 16px calc(14px + env(safe-area-inset-bottom, 0px)); }
    .ogc-modal__foot .ogc-btn--ghost { flex: 1 1 100%; }
}
@media (prefers-reduced-motion: reduce) { .ogc .ogc-btn, .ogc-switch__ui, .ogc-switch__ui::after { transition: none; } }
@media print { .ogc { display: none !important; } }
