/* ========================
   THÈME CLAIR ET FOND GLOBAL
======================== */

html, body {
    height: 100%;
    font-family: system-ui, sans-serif;
    font-size: 1rem;
    background-color: var(--bs-body-bg, #121212);
    color: var(--bs-body-color, #f1f1f1);
    display: flex;
    flex-direction: column;
    overflow-x: hidden;
}

/* HOVER des liens de la NAVBAR = dropdown_hover_text + dropdown_hover_bg */
.navbar .nav-link:hover,
.navbar .nav-link:focus {
    color: var(--drop-hover-text);
    background-color: var(--drop-hover-bg);
    text-decoration: none !important;
}

/* HOVER des items du DROPDOWN = dropdown_hover_text + dropdown_hover_bg */
.navbar .dropdown-item:hover,
.navbar .dropdown-item:focus {
    color: var(--drop-hover-text);
    background-color: var(--drop-hover-bg);
    text-decoration: none !important;
}

 #filtersForm {
    overflow-x: auto;
  }

@media (max-width: 767px) {
    .col-md-3 {
        flex: 0 0 auto;
        width: 33.3333%; /* équivalent col-4 */
    }
}

/* Sur petits écrans, on simplifie: plus de translate ni 100vw */
@media (max-width: 991.98px) {
    .fullwidth-article,
    .hero-banner,
    .site-footer {
        left: auto;
        right: auto;
        transform: none;
        width: 100%;
    }
}

/* Style discret pour termes expliqués */
.glossary-term {
    border-bottom: 1px dotted currentColor;
    cursor: pointer;
    text-decoration: none;
}
.glossary-dictionary-icon {
    font-size: .78em;
    opacity: .8;
}
.glossary-term-icon-only {
    border: 0;
    text-decoration: none;
}

/* ========================
   BADGE FACEBOOK
======================== */


.sidebar-widget,
.sidebar .widget,
aside .widget {
    background: #fff;
    border: 1px solid #e5e7eb;
    border-radius: 12px;
    padding: 1rem;
    margin-bottom: 1.25rem;
    box-shadow: 0 2px 8px rgba(0,0,0,0.04);
}

.sidebar-widget h3,
.sidebar .widget h3,
aside .widget h3 {
    font-size: 1.15rem;
    margin: 0 0 0.85rem;
    padding-bottom: 0.5rem;
    border-bottom: 1px solid #eee;
}

.facebook-widget blockquote {
    margin: 0;
}

.sc-facebook-card {
    position: relative;
    overflow: hidden;
    width: 100%;
    max-width: 365px;
    background: #fff;
    border: 1px solid #d8dee6;
    border-radius: 6px;
    box-shadow: 0 2px 8px rgba(0,0,0,.08);
}

.sc-facebook-cover {
    position: relative;
    display: block;
    height: 150px;
    margin: 8px 8px 0;
    overflow: hidden;
    border-radius: 4px 4px 0 0;
    background:
      linear-gradient(135deg, rgba(72,43,26,.05), rgba(181,171,49,.2)),
      url("../../uploads/articles/PMPp2Q.jpg") center/cover no-repeat;
}

.sc-facebook-cover::after {
    content: "";
    position: absolute;
    inset: 0;
    background: linear-gradient(to bottom, rgba(255,255,255,.08), rgba(0,0,0,.16));
}

.sc-facebook-icon {
    position: absolute;
    top: 12px;
    right: 12px;
    z-index: 1;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 34px;
    height: 34px;
    color: #fff;
    background: #1877f2;
    border-radius: 50%;
    font-size: 1.15rem;
    box-shadow: 0 2px 8px rgba(0,0,0,.2);
}

.sc-facebook-body {
    position: relative;
    padding: 0 14px 14px;
}

.sc-facebook-logo {
    width: 74px;
    height: 74px;
    object-fit: cover;
    border: 4px solid #fff;
    border-radius: 50%;
    background: #fff;
    margin-top: -38px;
    box-shadow: 0 1px 4px rgba(0,0,0,.18);
}

.sc-facebook-title {
    margin-top: -30px;
    margin-left: 88px;
    font-size: 1.12rem;
    line-height: 1.12;
    font-weight: 700;
    color: #050505;
}

.sc-facebook-subtitle {
    margin: 22px 0 10px;
    font-size: .9rem;
    line-height: 1.25;
    color: #050505;
}

.sc-facebook-category {
    display: flex;
    align-items: center;
    gap: .45rem;
    margin-bottom: 16px;
    font-size: .88rem;
    font-weight: 700;
    color: #050505;
}

.sc-facebook-category i {
    font-size: .75rem;
}

.sc-facebook-button {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: .45rem;
    width: 100%;
    padding: .55rem .75rem;
    color: #fff !important;
    background: #1877f2;
    border-radius: 6px;
    font-weight: 700;
    text-decoration: none !important;
}

.sc-facebook-button:hover,
.sc-facebook-button:focus {
    color: #fff !important;
    background: #166fe5;
    text-decoration: none !important;
}


/* ========================
   HOME CINE
======================== */

.home-cinema-modal {
  background: rgba(8, 10, 18, 0.45);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
}

.home-cinema-dialog {
  max-width: 1280px;
  width: 96vw;
  margin: 1rem auto;
}

.home-cinema-content {
  background: transparent;
  box-shadow: none;
  border: 0;
}

.home-cinema-shell {
  width: 100%;
  max-width: 1180px;
  margin: 0 auto;
}

.home-cinema-player {
  position: relative;
  width: 100%;
  aspect-ratio: 16 / 9;
  overflow: hidden;
  border-radius: 24px;
  background-color: #000;
  background-position: center center;
  background-repeat: no-repeat;
  background-size: cover;
  background-image: var(--hc-poster);
  box-shadow:
    0 25px 70px rgba(0,0,0,.45),
    0 0 0 1px rgba(255,255,255,.08);
}

.home-cinema-player::before {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(to bottom, rgba(0,0,0,.08), rgba(0,0,0,.18));
  pointer-events: none;
  z-index: 1;
}

.home-cinema-player iframe,
.home-cinema-player video {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  border: 0;
  display: block;
  z-index: 2;
}

.home-cinema-empty {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  color: rgba(255,255,255,.7);
  z-index: 2;
}

.home-cinema-caption {
  text-shadow: 0 2px 12px rgba(0,0,0,.35);
}

.home-cinema-header {
  padding-top: 0.1rem;
  padding-bottom: 0.1rem;
  min-height: 0;
  border: 0;
}

.home-cinema-close {
  margin-top: -18px;
  position: relative;
  z-index: 5;
}

@media (max-width: 991.98px) {
  .home-cinema-dialog {
    width: 96vw;
    max-width: 96vw;
  }

  .home-cinema-shell {
    max-width: 100%;
  }

  .home-cinema-player {
    border-radius: 18px;
  }

  .home-cinema-close {
    margin-top: -8px;
  }
}
body.home-cinema-open #ft-floating-toolbar,
body.home-cinema-open #ft-reg-bubble,
body.home-cinema-open .ft-reg-bubble,
body.home-cinema-open toolbar#ft-floating-toolbar {
  display: none !important;
  visibility: hidden !important;
  opacity: 0 !important;
  pointer-events: none !important;
}

#homeCinemaModal {
  z-index: 2000000 !important;
}
/* ========================
   TIMELINE MACHINE
======================== */


#timeline-machine {
  min-height: 800px;
}

#timeline-machine .tl-text-content a {
  color: #0d6efd !important;
  opacity: 1 !important;
  visibility: visible !important;
  pointer-events: auto !important;
}

#timeline-machine img,
#timeline-machine .tl-media img,
#timeline-machine .tl-media-item img,
#timeline-machine .tl-media-content img {
  width: auto !important;
  max-width: 100% !important;
  height: auto !important;
  max-height: none !important;
  display: block !important;
  margin: 0 auto !important;
}

#timeline-machine a {
  pointer-events: auto !important;
  visibility: visible !important;
  opacity: 1 !important;
  text-decoration: underline !important;
}

#timeline-machine .tl-slide-content {
  overflow: visible !important;
}

/* ===== CARROUSEL ÉPHÉMÉRIDES ADAPTÉ AU THÈME ===== */
.ephem-carousel {
  position: relative;
  background: linear-gradient(135deg, rgba(72,43,26,.08), rgba(181,171,49,.10));
  border: 1px solid rgba(72,43,26,.12);
  border-radius: 1.5rem;
  padding: 1.25rem 4.5rem 3.25rem;
  overflow: hidden;
  box-shadow: 0 10px 30px rgba(0,0,0,.06);
}

.ephem-track-wrap {
  overflow: hidden;
}

.ephem-track {
  display: flex;
  transition: transform .45s ease;
  will-change: transform;
}

.ephem-slide {
  min-width: 100%;
  display: grid;
  grid-template-columns: 1.05fr 1fr;
  gap: 1.5rem;
  align-items: center;
}

.ephem-media img {
  width: 100% !important;
  max-width: 100% !important;
  height: 380px !important;
  object-fit: cover !important;
  border-radius: 1rem;
  display: block !important;
  margin: 0 !important;
  box-shadow: 0 8px 24px rgba(0,0,0,.10);
}

.ephem-date {
  font-size: 1rem;
  font-weight: 700;
  color: #773C00;
  margin-bottom: .55rem;
  text-transform: uppercase;
  letter-spacing: .08em;
}

.ephem-title {
  font-size: clamp(1.35rem, 2.2vw, 2.2rem);
  line-height: 1.1;
  font-weight: 800;
  text-transform: uppercase;
  margin-bottom: 1rem;
  color: #111;
}

.ephem-text {
  font-size: 1.05rem;
  line-height: 1.65;
  color: #444;
}

.ephem-text p {
  margin-bottom: .85rem;
}

.ephem-text a {
  color: #773C00 !important;
  font-weight: 700;
  text-decoration: underline !important;
}

.ephem-arrow {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  width: 46px;
  height: 46px;
  border: 0;
  border-radius: 999px;
  background: var(--nav-bg, #000000);
  color: var(--nav-text, #ffffff);
  font-size: 2rem;
  line-height: 1;
  z-index: 5;
  cursor: pointer;
  opacity: .95;
  box-shadow: 0 8px 20px rgba(0,0,0,.18);
}

.ephem-prev { left: 1rem; }
.ephem-next { right: 1rem; }

.ephem-arrow:hover,
.ephem-arrow:focus-visible {
  background: #482B1A;
  color: #fff;
}

.ephem-dots {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 1rem;
  display: flex;
  justify-content: center;
  gap: .55rem;
}

.ephem-dot {
  width: 11px;
  height: 11px;
  border-radius: 50%;
  border: 0;
  background: rgba(72,43,26,.25);
  cursor: pointer;
  padding: 0;
}

.ephem-dot.active {
  background: #B5AB31;
  box-shadow: 0 0 0 2px rgba(72,43,26,.15);
}

.ephem-loading {
  padding: 3rem 1rem;
  text-align: center;
  color: #666;
  width: 100%;
}

@media (max-width: 991.98px) {
  .ephem-carousel {
    padding: 1rem 1rem 3rem;
  }

  .ephem-slide {
    grid-template-columns: 1fr;
  }

  .ephem-media img {
    height: 240px !important;
  }

  .ephem-title {
    font-size: 1.3rem;
  }

  .ephem-text {
    font-size: .98rem;
  }

  .ephem-arrow {
    width: 40px;
    height: 40px;
    font-size: 1.5rem;
  }

  .ephem-prev { left: .4rem; }
  .ephem-next { right: .4rem; }
}

/* ========================
   Boutons = couleur navbar_bg
   ======================== */

/* Variables de boutons basées sur la navbar */
:root {
    --btn-bg: var(--nav-bg);
    --btn-bg-hover: color-mix(in srgb, var(--nav-bg) 88%, black);
    --btn-bg-active: color-mix(in srgb, var(--nav-bg) 80%, black);
}

/* Tous les boutons “plein” */
.btn,
.btn-primary,
.btn-secondary,
.btn-success,
.btn-info,
.btn-warning,
.btn-danger {
    background-color: var(--btn-bg) !important;
    border-color: var(--btn-bg) !important;
    color: #fff !important;
}

/* Boutons outline → on les remplit aussi avec la même couleur */
.btn-outline-primary,
.btn-outline-secondary,
.btn-outline-success,
.btn-outline-info,
.btn-outline-warning,
.btn-outline-danger {
    background-color: var(--btn-bg) !important;
    border-color: var(--btn-bg) !important;
    color: #fff !important;
}

/* Bouton spécifique annuaire, etc. */
.btn-visit {
    background-color: var(--btn-bg) !important;
    border-color: var(--btn-bg) !important;
    color: #fff !important;
}

    /* États hover / focus */
    .btn:hover,
    .btn:focus,
    .btn-outline-primary:hover,
    .btn-outline-secondary:hover,
    .btn-outline-success:hover,
    .btn-outline-info:hover,
    .btn-outline-warning:hover,
    .btn-outline-danger:hover,
    .btn-visit:hover,
    .btn-visit:focus-visible {
        background-color: var(--btn-bg-hover) !important;
        border-color: var(--btn-bg-hover) !important;
        color: #fff !important;
        box-shadow: 0 .4rem .9rem rgba(0,0,0,.15);
        transform: translateY(-1px);
        text-decoration: none !important;
    }

    /* État actif */
    .btn:active,
    .btn.active,
    .show > .btn.dropdown-toggle,
    .btn-visit:active {
        background-color: var(--btn-bg-active) !important;
        border-color: var(--btn-bg-active) !important;
        color: #fff !important;
        transform: translateY(0);
        box-shadow: 0 .2rem .5rem rgba(0,0,0,.12);
    }


/* ========================
   VARIABLES CSS
======================== */

.adsense-wrap {
  /*max-width: 300px;   /* largeur max de ton bloc (ou 100%, à adapter) */
  width: 100%;        /* ne jamais dépasser le parent */
  margin: 0 auto;     /* centrer si tu veux */
  overflow: hidden;   /* sécurité au cas où */
  margin-top:15px!important;
  margin-bottom:15px!important;
}

.adsense-wrap ins.adsbygoogle {
  width: 100% !important;  /* l’annonce ne dépasse pas le conteneur */
  max-width: 100% !important;
}

#searchForm{position:relative!important;z-index:1060!important}
/* Quand une modale est ouverte, la recherche repasse derrière le voile */
body.modal-open #searchForm{z-index:auto!important}
#searchResults{position:absolute!important;top:calc(100% + .25rem)!important;left:0!important;right:0!important;width:100%!important;max-height:min(60vh,430px)!important;overflow-y:auto!important;margin-top:0!important;background:#fff!important;box-shadow:0 .75rem 2rem rgba(0,0,0,.22);z-index:1070!important}
#searchResults:empty{display:none!important}
.search-suggestion-item{display:flex!important;justify-content:flex-start!important;align-items:center!important;width:100%!important;box-sizing:border-box;padding:.35rem .5rem;border-radius:.4rem}
.search-suggestion-item img{flex:0 0 56px}
.search-suggestion-item a{display:block;flex:1 1 auto;min-width:0;text-align:left;overflow-wrap:anywhere}
.search-suggestion-item:hover{background:#f5f2e9}
@media(max-width:575.98px){#searchResults{max-height:55vh}}

/* ========================
   VARIABLES CSS
======================== */
:root {
    --accent-color: #0d6efd;
    --accent-hover: #0b5ed7;
    --nav-bg: #000000;
    --nav-text: #FFFFFF;
    --drop-bg: #000000;
    --drop-text: #FFFFFF;
    --drop-hover-bg: #007BFF;
    --drop-hover-text: #000000; 
}

[data-bs-theme="dark"] {
    --bs-body-bg: #121212;
    --bs-body-color: #f8f9fa;
    --bs-card-bg: #1e1e1e;
    --bs-border-color: #2e2e2e;
}

/* ========================
   STRUCTURE PRINCIPALE
======================== */
main {
    flex: 1;
}

/* ========================
   SIMILAIRES ARTICLES
======================== */

.card-img-wrap {
    position: relative;
    width: 100%;
    padding-top: 56.25%; /* ratio 16/9 */
    overflow: hidden;
}

    .card-img-wrap img.img-cover {
        position: absolute;
        top: 0;
        left: 0;
        width: 100%;
        height: 100% !important;
        object-fit: cover; /* remplissage */
        object-position: center; /* centré */
    }

.similar-cards .card-body {
    padding-top: 0.75rem;
}

.similar-cards .card-title {
    margin-top: 0;
}

/* ========================
   LIENS
======================== */
/* Liens généraux */
a {
    color: var(--link);
    text-decoration: none !important;
}

a:hover, a:focus {
     color: var(--link-hover);
     text-decoration: underline !important;
    }

/* ========================
   PAGE D 'ACCUEIL
======================== */
.hero-sc {
    border-radius: 2rem;
    overflow: hidden;
    background: linear-gradient(135deg, #482B1A, #666666);
    color: #fff;
    position: relative;
    min-height: 260px;
}

.hero-sc::before {
    content: "";
    position: absolute;
    inset: 0;
    background: radial-gradient(circle at 0% 0%, rgba(255,255,255,0.18), transparent 55%);
    mix-blend-mode: screen;
}

.hero-sc-inner {
    position: relative;
    z-index: 1;
    padding: 2.5rem 2rem;
}

@media (min-width: 992px) {
    .hero-sc-inner {
        padding: 3.5rem 3rem;
    }
}

.hero-kicker {
    text-transform: uppercase;
    letter-spacing: .18em;
    font-size: .75rem;
    color: rgba(255,255,255,0.7);
}

.hero-title-sc {
    text-transform: uppercase;
    font-size: clamp(2rem, 3.2vw, 3rem);
    letter-spacing: .06em;
}

.hero-subtitle-sc {
    max-width: 40rem;
    font-size: .95rem;
    color: rgba(255,255,255,0.9);
}

.hero-sc .btn {
    border-radius: 999px;
}

.sc-section-title {
    text-transform: uppercase;
    letter-spacing: .18em;
    font-size: .8rem;
    color: #773C00;
    font-weight: bold;
}

.sc-section-heading {
    text-transform: uppercase;
    font-size: 1.6rem;
    letter-spacing: .06em;
}

.sc-card {
    border-radius: 1.5rem;
    border: none;
    overflow: hidden;
    background-color: #ffffff;
    box-shadow: 0 10px 30px rgba(0,0,0,0.06);
    transition: transform .2s ease, box-shadow .2s ease;
}

    .sc-card:hover {
        transform: translateY(-3px);
        box-shadow: 0 18px 45px rgba(0,0,0,0.09);
    }

.sc-card-img {
    aspect-ratio: 16/9;
    object-fit: cover;
    width: 100%;
}

.sc-list-hover {
    border-radius: .6rem;
    transition: transform .2s ease, box-shadow .2s ease, background-color .2s ease;
}

.sc-list-hover:hover {
    transform: translateY(-2px);
    background-color: #fff;
    box-shadow: 0 8px 24px rgba(0, 0, 0, .08);
}

.reader-library-visual {
    position: relative;
}

.reader-library-overlay {
    position: absolute !important;
    inset: auto .7rem .7rem auto !important;
    z-index: 6;
    display: grid;
    place-items: center;
    width: 36px !important;
    height: 36px !important;
    padding: 0;
    border: 1px solid rgba(255,255,255,.9);
    border-radius: 50%;
    background: rgba(47,30,20,.78);
    color: #fff;
    font-size: .95rem;
    cursor: pointer;
    box-shadow: 0 2px 8px rgba(0,0,0,.35);
    transition: transform .2s ease, background .2s ease, color .2s ease;
}

.home-library-visual .reader-library-overlay {
    bottom: 1.4rem !important;
}

.reader-library-overlay:hover,
.reader-library-overlay.is-added {
    border-color: #B5AB31;
    background: #B5AB31;
    color: #24180f;
}

.reader-library-overlay:hover {
    transform: scale(1.08);
}

.reader-library-overlay:focus-visible {
    outline: 3px solid #fff;
    outline-offset: 3px;
}

.reader-library-overlay__toast {
    position: absolute;
    right: 0;
    bottom: calc(100% + .55rem);
    width: max-content;
    max-width: min(230px, 70vw);
    padding: .35rem .55rem;
    border-radius: .35rem;
    background: #B5AB31;
    color: #24180f;
    font-size: .75rem;
    font-weight: 600;
    line-height: 1.25;
    white-space: normal;
    box-shadow: 0 2px 8px rgba(0,0,0,.2);
    opacity: 0;
    visibility: hidden;
    transform: translateY(3px);
    transition: opacity .18s ease, transform .18s ease, visibility .18s ease;
    pointer-events: none;
}

.reader-library-overlay__toast::after {
    content: "";
    position: absolute;
    right: 12px;
    top: 100%;
    border: 5px solid transparent;
    border-top-color: #B5AB31;
}

.reader-library-overlay.show-message .reader-library-overlay__toast {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

@media (prefers-reduced-motion: reduce) {
    .reader-library-overlay,
    .reader-library-overlay__toast {
        transition: none;
    }
}

/* Effet léger au survol des cartes et lignes de l'éphéméride. */
.ephemeride-card,
.ephemeride-list-item {
    transition: transform .2s ease, box-shadow .2s ease, background-color .2s ease;
}

.ephemeride-card:hover {
    transform: translateY(-3px);
    box-shadow: 0 12px 28px rgba(0, 0, 0, .12);
}

.ephemeride-card .card-img-top {
    transition: transform .3s ease;
}

.ephemeride-card:hover .card-img-top {
    transform: scale(1.025);
}

.ephemeride-list-item:hover {
    transform: translateY(-2px);
    background-color: #fff;
    box-shadow: 0 8px 22px rgba(0, 0, 0, .08);
}

@media (prefers-reduced-motion: reduce) {
    .ephemeride-card,
    .ephemeride-list-item,
    .ephemeride-card .card-img-top {
        transition: none;
    }

    .ephemeride-card:hover,
    .ephemeride-list-item:hover,
    .ephemeride-card:hover .card-img-top {
        transform: none;
    }
}

.sidebar-compact-title {
    font-size: .80rem !important;
    line-height: 1.2;
}

@media (prefers-reduced-motion: reduce) {
    .sc-list-hover { transition: none; }
    .sc-list-hover:hover { transform: none; }
}

.sc-chip {
    display: inline-flex;
    align-items: center;
    border-radius: 999px;
    padding: .2rem .8rem;
    font-size: .7rem;
    text-transform: uppercase;
    letter-spacing: .16em;
    background-color: #B5AB31;
    color: #482B1A;
}

.sc-link-arrow {
    text-transform: uppercase;
    letter-spacing: .16em;
    font-size: .72rem;
    color: #773C00;
}

    .sc-link-arrow i {
        transition: transform .2s ease;
    }

    .sc-link-arrow:hover i {
        transform: translateX(3px);
    }

.sc-newsletter {
    border-radius: 1.8rem;
    background: linear-gradient(135deg, #482B1A, #773C00);
    color: #fff;
    position: relative;
    overflow: hidden;
}

    .sc-newsletter::before {
        content: "";
        position: absolute;
        inset: 0;
        background: radial-gradient(circle at 0% 0%, rgba(255,255,255,0.15), transparent 55%);
        mix-blend-mode: screen;
    }

.sc-newsletter-inner {
    position: relative;
    z-index: 1;
}

.sc-newsletter .form-control {
    border-radius: 999px;
}

.site-newsletter-modal-content {
    color: #212529 !important;
    background-color: #fff !important;
    border: 0;
    border-radius: 1.25rem;
    box-shadow: 0 1rem 3rem rgba(0, 0, 0, .25);
}

.site-newsletter-modal-content .modal-title {
    color: #482B1A !important;
    font-weight: 700;
}

.site-newsletter-modal-content .modal-body p,
.site-newsletter-modal-content .modal-body label {
    color: #212529 !important;
}

.site-newsletter-modal-content .btn-primary {
    background-color: #773C00;
    border-color: #773C00;
}

.site-newsletter-modal-content .btn-primary:hover,
.site-newsletter-modal-content .btn-primary:focus-visible {
    background-color: #482B1A;
    border-color: #482B1A;
}

/* ========================
   STYLE NAV DEFAUT
======================== */
/* Lien pagination par défaut */
.pagination .page-link {
    color: #000 !important; /* texte noir */
    background-color: #fff !important; /* fond blanc par défaut */
    border: 1px solid #ddd !important;
}

/* Hover */
.pagination .page-link:hover {
        color: #444 !important;
        background-color: #f1f1f1 !important;
        border-color: #ccc !important;
    }

/* Page active */
.pagination .page-item.active .page-link {
    color: #fff !important; /* texte blanc */
    background-color: #000 !important; /* fond noir */
    border-color: #000 !important;
}

/* Désactivé (précédent/suivant inactifs) */
.pagination .page-item.disabled .page-link {
    color: #999 !important;
    background-color: #eee !important;
    border-color: #ddd !important;
}



/* ========================
   AJUSTEMENTS DIVERS 
======================== */
h5 {
    margin-top:-1rem;
}

.taglink {
    color:white!important
}

#favCount {
    transform: translate(-20%,-20%) !important;
}
#favCount {
    --bs-bg-opacity: 1;
    background-color: var(--drop-hover-text) !important;
    color: black;
}

#siteBanner { text-align: center; }


/* Place ce bloc APRÈS Bootstrap et après ton thème */
.site-footer {
    --bs-link-color: #ffffff;
    --bs-link-hover-color: #ffffff;
    --bs-link-color-rgb: 255, 255, 255;
    --bs-link-hover-color-rgb: 255, 255, 255;
}

/* Si un style plus spécifique cible .small a, on bétonne : */
.site-footer .small a {
        color: #ffffff !important;
}

.btn-outline-success:hover,
.btn-outline-success:focus,
.btn-outline-success.active {
    color: #fff !important;
    background-color: #198754; /* vert bootstrap */
    border-color: #198754;
}

.btn-outline-primary:hover,
.btn-outline-primary:focus,
.btn-outline-primary.active {
    color: #fff !important;
    background-color: #0d6efd; /* bleu bootstrap */
    border-color: #0d6efd;
}

.img-fluid.note-float-right {
    margin-left: 15px !important;
    margin-right: 15px !important;
    margin-top: 15px !important;
    margin-bottom: 15px !important;
  }
  .img-fluid.note-float-left {
    margin-left: 15px !important;
    margin-right: 15px !important;
    margin-top: 15px !important;
    margin-bottom: 15px !important;
  }

mark.search-hit {
    background: var(--bs-highlight-bg);
    padding: 0 .15em;
    border-radius: .2rem;
}
/* ========================
   COMPLEMENT NAVBAR
======================== */
    /* Desktop : parent + caret sur une ligne */
    .navbar-nav .nav-item.dropdown {
    display: flex;
    align-items: center;
}

.navbar-nav .dropdown-toggle-split {
    padding-left: .35rem;
}

    .navbar-nav .dropdown-toggle-split::after {
        vertical-align: middle;
        padding-left: .15rem;
    }
/* ordre par défaut */
#navContent .navbar-nav .nav-item {
    order: 0;
}

    /* Accueil tout en haut */
    #navContent .navbar-nav .nav-item.home {
        order: -20;
    }

    /* Blog juste après Accueil */
    #navContent .navbar-nav .nav-item.blog {
        order: -10;
    }



/* Mobile : le sous-menu passe DESSOUS, comme avant */
@media (max-width: 991.98px) {
    /* le <li> n’aligne plus tout en ligne */
    .navbar-nav .nav-item.dropdown {
        display: flex;
        flex-direction: column; /* empile label/caret puis le sous-menu */
        align-items: stretch; /* prend toute la largeur */
    }

    .navbar-nav .dropdown-toggle-split::after {
        vertical-align: middle;
        padding-left: .25rem;
        margin-top: -30px !important;
        float: right !important;
    }

    /* le dropdown se comporte comme un bloc normal, pas en absolu */
    .navbar-nav .dropdown-menu {
        position: static !important;
        transform: none !important;
        float: none;
        display: none; /* masqué par défaut */
        margin: 0;
        border: 0;
        box-shadow: none;
        width: 100%; /* pleine largeur du collapse */
    }

        .navbar-nav .dropdown-menu.show {
            display: block;
            margin-top: -5px !important;
        }
    /* Grossir le caret (desktop + mobile) */
    #navContent .dropdown-toggle::after,
    #navContent .dropdown-toggle-split::after {
        display: inline-block;
        transform: scale(1.2); /* ← augmente/↓diminue */
        transform-origin: center;
    }
}



/* ========================
   hover tags
======================== */

.badge-hover-muted:hover {
    color: #FF8040 !important; /* Bootstrap text-muted */
}

/* ========================
   Live résultats
======================== */

#liveResults {
    border: 1px solid #ced4da; /* Bordure extérieure grise (comme Bootstrap) */
    border-radius: 0.375rem; /* Coins arrondis */
    overflow: hidden; /* Pour que rien ne déborde */
    max-height: 300px;
    overflow-y: auto;
}

    #liveResults .list-group-item {
        border: none !important; /* Supprime les traits entre items */
    }



/* ========================
   BOUTONS
======================== */
.btn-primary {
    background-color: var(--accent-color);
    border-color: var(--accent-color);
}

.btn-primary:hover {
    background-color: var(--accent-hover);
    border-color: var(--accent-hover);
}

/* ========================
   NAVBAR & HAMBURGER
======================== */

.navbar {
    /* Publie aussi les variables Bootstrap pour cohérence */
    --bs-navbar-bg: var(--nav-bg);
    --bs-navbar-color: var(--nav-text);
    --bs-navbar-brand-color: var(--nav-text);
    --bs-dropdown-bg: var(--drop-bg);
    --bs-dropdown-color: var(--drop-text);
    --bs-dropdown-link-color: var(--drop-text);
    --bs-dropdown-link-hover-bg: var(--drop-hover-bg);
    --bs-dropdown-link-hover-color: var(--drop-hover-text);
    background-color: var(--bs-navbar-bg);
    color: var(--bs-navbar-color);
}


.navbar-toggler i {
    font-size: 1.5rem !important;
    color: #ffffff !important;
}

.navbar .dropdown-menu {
    z-index: 9999 !important;
    top: 100%;
    left: 0;
    right: auto;
}

/* Le menu natif ne passe pas par Popper : fixer aussi son ancrage. */
.navbar .dropdown-menu-end {
    right: 0;
    left: auto;
}

@media (max-width: 576px) {
    .navbar-brand {
        font-size: 1rem !important;
    }
}

/* ========================
   tags galeries
======================== */

.taglink, .badge .taglink {
    color: inherit;
    text-decoration: none;
}

    .taglink:hover {
        text-decoration: underline;
    }

/* ========================
   tags annuaire
======================== */


.tag-chip {
    font-size: .9rem;
    transition: all .15s ease-in-out;
}

    .tag-chip:hover {
        background-color: var(--bs-primary);
        color: rgb(255, 193, 7) !important;
        text-decoration: none;
    }

        .tag-chip:hover .fa-tag {
            color: rgb(255, 193, 7) !important;
        }

/* ========================
   barre recherche live
======================== */

.searchbox {
    max-width: 480px;
}
/* optionnel */
.search-results {
    position: absolute;
    top: calc(100% + .25rem);
    left: 0;
    right: 0;
    display: none; /* caché par défaut */
    background: #fff;
    border: 1px solid rgba(0,0,0,.125);
    border-radius: .375rem;
    padding: .5rem;
    max-height: 60vh;
    overflow: auto;
    z-index: 1050; /* au-dessus du contenu */
}

    .search-results p.helper {
        margin: .25rem 0;
        color: #6c757d;
    }

    .search-results .item {
        display: flex;
        align-items: center;
        gap: .5rem;
        padding: .25rem 0;
    }

        .search-results .item img {
            width: 50px;
            height: auto;
        }


/* ========================
   INSERTION GALLERIE
======================== */

.ecms-gallery img {
    display: block;
    width: 100%;
    height: auto;
}

.ecms-gallery .small {
    line-height: 1.3;
}

.ecms-gallery [loading="lazy"] {
    background: #f3f3f3;
}

/* ========================
   IMAGES DANS LE CONTENU
======================== */
.article-content h2,
#articleContent h2 {
    margin: 1.2rem 0 .6rem;
    font-weight: 700;
    font-size: 24px !important;
}

.article-content h3,
#articleContent h3 {
    margin: 1rem 0 .5rem;
    font-weight: 600;
    font-size: 20px !important;
}

.article-content img[style],
.page-content img[style] {
    height: auto !important;
    display: block;
    margin: 1rem auto;
    border-radius: 6px;
    box-shadow: 0 0 4px rgba(0, 0, 0, 0.1);
    max-width: 100%;
}

.article-content img,
.page-content img,
.content img,
article .img-fluid {
    max-width: 100%;
    height: auto;
    display: block;
    margin: 1rem auto;
    cursor: zoom-in;
}

/* Illustrations pleine largeur, sans deformation, avec une legende lisible. */
.article-content figure,
.page-content figure {
    width: 100%;
    max-width: 100%;
    margin: 1.75rem auto;
}

.article-content figure > a.popup-img,
.page-content figure > a.popup-img {
    display: block;
}

.article-content figure img,
.page-content figure img {
    width: 100% !important;
    max-width: 100% !important;
    height: auto !important;
    margin: 0 auto;
}

.article-content figcaption,
.page-content figcaption {
    margin-top: .65rem;
    font-size: .9em;
    line-height: 1.6;
    text-align: center;
    overflow-wrap: anywhere;
}

/* Trois images consecutives dans un article : affichage en colonnes. */
.article-content .article-image-columns {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 1rem;
    margin: 1.5rem 0;
    align-items: start;
}

.article-content .article-image-columns.article-image-columns-2 {
    grid-template-columns: repeat(2, minmax(0, 1fr));
}

.article-content .article-image-columns > * {
    min-width: 0;
    margin-top: 0 !important;
    margin-bottom: 0 !important;
}

.article-content .article-image-columns img,
.article-content .article-image-columns img[style] {
    display: block;
    width: 100% !important;
    max-width: 100% !important;
    aspect-ratio: 4 / 3;
    height: auto !important;
    object-fit: cover;
    object-position: center;
    margin: 0 auto !important;
}

@media (max-width: 767.98px) {
    .article-content .article-image-columns,
    .article-content .article-image-columns.article-image-columns-2 {
        grid-template-columns: 1fr;
    }
}

/* ========================
Surbrillance du bloc en cours de lecture 
======================== */
.article-content  .tts-current {
    background: #fff3cd;
    outline: 2px solid #ffc107;
    transition: background-color .2s ease-in-out;
}
/* Surbrillance progressive */
.article-content .tts-word-current {
    background: #ffe082; /* mot en cours */
    box-shadow: 0 0 0 2px #ffd54f inset;
}

.article-content .tts-word-done { /* mots déjà lus */
    background: #fff3cd;
}

/* Optionnel : focus visible */
#article-tools .btn:focus-visible {
    outline: 2px solid #0d6efd;
    outline-offset: 2px;
}
.page-content .tts-current {
    background: #fff3cd;
    outline: 2px solid #ffc107;
    transition: background-color .2s ease-in-out;
}
/* Surbrillance progressive */
.page-content .tts-word-current {
    background: #ffe082; /* mot en cours */
    box-shadow: 0 0 0 2px #ffd54f inset;
}

.page-content .tts-word-done { /* mots déjà lus */
    background: #fff3cd;
}

/* Optionnel : focus visible */
#article-tools .btn:focus-visible {
    outline: 2px solid #0d6efd;
    outline-offset: 2px;
}
/* ========================
 Accessibilité focus visible sur les boutons 
======================== */
#article-tools .btn:focus-visible {
    outline: 2px solid #0d6efd;
    outline-offset: 2px;
}
#article-tools {
    margin-top:30px;
}
/* ========================
   IMAGES GÉNÉRALES
======================== */
.card-img-top {
    width: 100% !important;
    height: 250px !important;
    object-fit: cover; /* hauteur fixe sans déformer l'image */
}

.img-fluid {
    width: 175px !important;
    max-width: 100%;   /* ne dépasse jamais sa colonne */
    height: 100px;
    object-fit: cover;
}
.img-fluid2 {
    width: 700px !important;
    max-width: 100% !important; /* jamais plus large que l'écran */
    height: auto;
}
.img-pub {
    margin-top: 10px;
    margin-bottom: 10px;
    max-width: 100%;
    height: auto;
}
/* Largeur réservée aux vignettes des listes (blog, éphéméride, recherche) uniquement,
   et non à toute la classe utilitaire Bootstrap .me-3 */
.me-3:has(> .img-fluid),
.me-3:has(> a > .img-fluid) {
    min-width: 195px;
    flex-shrink: 0; /* la vignette ne se fait pas écraser par le texte */
}

/* cas spécifique pour les 728x90 sur petits écrans */
@media (max-width: 576px) { /* smartphone Bootstrap */
    .ad-728 img {
      max-width: 95%;   /* laisse une petite marge */
      height: auto;
    }
  }

@media (max-width: 748px) {
    .card-img-top {
        width: 100% !important;
        height: 175px !important;
    }
    .ad-728 img {
        max-width: 95%;   /* laisse une petite marge */
        height: auto;
      }
    .img-pub {
    margin-top: 10px;
    margin-bottom: 10px;
    }
    .img-fluid {
        max-width: 130px !important;
        height: 100px;
    }
    .img-fluid2 {
        width: 100% !important;
        height: auto;
    }
    .me-3:has(> .img-fluid),
    .me-3:has(> a > .img-fluid) {
        min-width: 0;
    }
}

/* Smartphones : vignettes de liste plus petites pour laisser de la place au texte */
@media (max-width: 575.98px) {
    .me-3 > .img-fluid,
    .me-3 > a > .img-fluid {
        width: 96px !important;
        height: 72px !important;
    }
}

/* ========================
   ANIMATION FAVORIS
======================== */
.fav-anim {
    opacity: 1;
    transform: none;
    transition: opacity .22s ease, transform .22s ease;
    will-change: opacity, transform;
}

    /* état pré-entré : on part de plus bas, léger zoom */
    .fav-anim.will-show {
        opacity: 0;
        transform: translateY(10px) scale(.985);
    }

    /* état de sortie : on remonte un peu + fade */
    .fav-anim.will-hide {
        opacity: 0;
        transform: translateY(-10px) scale(.985);
        pointer-events: none;
    }

    /* optionnel : petit “hover lift” */
    .fav-anim:not(.will-hide):hover {
        transform: translateY(-2px);
    }


/* ========================
   CARTES ET TABLES
======================== */
.card {
    background-color: #ffffff;
    color: #212529;
    border: 1px solid #dee2e6;
}

.card-title {
    font-size:1.10rem !important;
    font-weight: 600;
    margin-top:5px !important;
}

.table th,
.table td {
    vertical-align: middle;
}

/* ========================
   AVATAR & ICONES
======================== */
img.rounded-circle {
    object-fit: cover;
    width: 32px;
    height: 32px;
}

/* Social icons = même couleur que le hover text de la navbar */
/* Social icons = même couleur que le hover text de la navbar */
.navbar .social-icon:hover,
.navbar .social-icon:hover i {
    color: var(--drop-hover-text) !important;
    text-decoration:none !important;
}

/* (Optionnel) état normal = couleur de texte de la navbar */
.social-icon,
.social-icon i {
    color: var(--bs-navbar-color, var(--nav-text, inherit));
}

.social-icon span {
    font-size: 0.75rem;
    margin-top: 0.2rem;
}

/* ========================
   AFFICHAGE GRILLE ET TABLE
======================== */
.grid-view {
    display: flex;
    flex-wrap: wrap;
}

.table-view {
    display: block;
}

/* ========================
   BOUTON ANNUAIRE & ANNUAIRE
======================== */
.btn-visit {
    /* couleurs de base */
    color: #fff !important; /* force blanc, au cas où un thème override <a> */
    background-color: var(--bs-primary);
    border-color: var(--bs-primary);
    /* petite anim élégante */
    transition: transform .15s ease, box-shadow .15s ease, background-color .2s ease, border-color .2s ease;
}

    /* Couleur de survol (fallback) */
    .btn-visit:hover,
    .btn-visit:focus-visible {
        color: #fff !important;
        background-color: #0b5ed7; /* proche du hover Bootstrap par défaut */
        border-color: #0a58ca;
        box-shadow: 0 .4rem .9rem rgba(0,0,0,.15);
        transform: translateY(-1px);
        text-decoration: none !important;
    }

/* Si le navigateur supporte color-mix, on calcule un hover dynamique à partir de --bs-primary */
@supports (color: color-mix(in srgb, black, white)) {
    .btn-visit:hover,
    .btn-visit:focus-visible {
        background-color: color-mix(in srgb, var(--bs-primary) 88%, black);
        border-color: color-mix(in srgb, var(--bs-primary) 82%, black);
    }
}

/* clic */
.btn-visit:active {
    transform: translateY(0);
    box-shadow: 0 .2rem .5rem rgba(0,0,0,.12);
}

/* icône bien alignée */
.btn-visit .fa,
.btn-visit .fa-solid {
    vertical-align: -0.05em;
}

.lead {
    font-size: 1.00rem !important;
    font-weight: 200 !important;
}

.site-back-to-top {
    position: fixed;
    right: max(16px, env(safe-area-inset-right));
    bottom: calc(84px + env(safe-area-inset-bottom));
    z-index: 3004;
    display: inline-flex;
    width: 48px;
    height: 48px;
    align-items: center;
    justify-content: center;
    border: 2px solid #fff;
    border-radius: 50%;
    background: var(--nav-bg, #183b70);
    color: #fff;
    box-shadow: 0 4px 16px rgba(0, 0, 0, .28);
    font-size: 1.15rem;
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
    transform: translateY(8px);
    transition: opacity .18s ease, transform .18s ease, visibility .18s;
}
.site-back-to-top.is-visible {
    opacity: 1;
    visibility: visible;
    pointer-events: auto;
    transform: translateY(0);
}
.site-back-to-top:hover,
.site-back-to-top:focus-visible {
    background: #b7ad22;
    color: #111;
    outline: 3px solid #fff;
    outline-offset: 2px;
}

/* Espace lecteur : couleurs reprises du thème du site. */
.reader-theme-banner {
    background: linear-gradient(135deg, var(--nav-bg, #482b1a), var(--link, #773c00)) !important;
    color: var(--nav-text, #fff) !important;
}
.reader-theme-icon,
.reader-theme-badge {
    background-color: var(--nav-bg, #482b1a) !important;
    color: var(--nav-text, #fff) !important;
}
.reader-theme-avatar-icon {
    background-color: #fff !important;
    color: var(--nav-bg, #482b1a) !important;
}
.reader-theme-inline-icon {
    color: var(--link, #773c00) !important;
}
.reader-access-form .form-check-input:checked {
    background-color: var(--nav-bg, #482b1a);
    border-color: var(--nav-bg, #482b1a);
}
.reader-access-form .form-control:focus,
.reader-access-form .form-check-input:focus {
    border-color: var(--link, #773c00);
    box-shadow: 0 0 0 .25rem color-mix(in srgb, var(--link, #773c00) 25%, transparent);
}
@media (prefers-reduced-motion: reduce) {
    .site-back-to-top { transition: none; }
}

/* Maillage interne des contenus : articles et vidéos toujours en gras. */
.article-content a[href^="/"][href*=".html"],
.article-content a[href^="https://savoirsetculture.fr/"][href*=".html"],
.article-content a[href^="https://www.savoirsetculture.fr/"][href*=".html"],
.article-content a[href*="article.php?slug="],
.article-content a[href*="video-item.php?slug="] {
  font-weight: 700;
  text-decoration-line: underline;
  text-decoration-style: dotted;
  text-underline-offset: .18em;
}
#articleContent a.internal-maillage-link,
#articleContent a.internal-content-link {
  text-decoration: underline dotted currentColor !important;
  text-underline-offset: .18em;
}

/* Effet hover léger sur les résultats de recherche en grille et en liste. */
.search-result-card,
.search-result-row {
  transition: transform .16s ease, box-shadow .16s ease, background-color .16s ease;
}
.search-result-card:hover {
  transform: translateY(-2px);
  box-shadow: 0 .4rem 1rem rgba(0, 0, 0, .12);
}
.search-result-row:hover {
  background-color: rgba(13, 110, 253, .045);
  border-radius: .35rem;
}
@media (prefers-reduced-motion: reduce) {
  .search-result-card,
  .search-result-row { transition: none; }
}

.article-content img:not([style]),
.page-content img:not([style]) {
    max-width: 100%;
    width: auto;
    height: auto;
}

/* Images de contenu : taille de lecture plafonnée, tout en gardant le lien de zoom. */
.article-content img,
.article-content img[style],
.page-content img,
.page-content img[style],
.content img,
article .img-fluid {
    max-width: min(100%, 750px) !important;
    height: auto !important;
}

/* Les images principales des templates ont historiquement une largeur fixe de 700 px. */
.popup-img > img.img-fluid2 {
    width: auto !important;
    max-width: min(100%, 750px) !important;
    height: auto !important;
}

.article-content figure img,
.page-content figure img {
    max-width: min(100%, 750px) !important;
}

/* Les images groupées restent adaptées à leur colonne, qui est déjà plus étroite. */
.article-content .article-image-columns img,
.article-content .article-image-columns img[style] {
    max-width: min(100%, 750px) !important;
}

/* Pages d'erreur : une sortie utile et accueillante plutôt qu'un écran vide.
   Couleurs du thème actif (variables définies dans includes/head.php, thème choisi dans l'admin) :
   --nav-bg / --nav-text (boutons pleins), --link (accent), --link-hover (pastille), --site-bg / --site-text (fond, textes). */
.error-page-body {
    --err-bg: color-mix(in srgb, var(--site-bg, #ffffff) 94%, var(--link, #773c00));
    --err-ink: color-mix(in srgb, var(--site-text, #212529) 82%, var(--link, #773c00));
    --err-muted: color-mix(in srgb, var(--site-text, #212529) 72%, var(--site-bg, #ffffff));
    --err-accent: var(--link, #773c00);
    --err-badge: var(--link-hover, #b5ab31);
    --err-btn-bg: var(--nav-bg, #343a40);
    --err-btn-text: var(--nav-text, #ffffff);
    background: var(--err-bg) !important;
}
.error-page {
    position: relative;
    overflow: visible;
    min-height: 950px;
    color: var(--err-ink);
    background: radial-gradient(circle at 50% 28%, color-mix(in srgb, var(--err-badge) 14%, transparent), transparent 34rem), var(--err-bg);
}
.error-page__container {
    display: grid;
    /* Garde toute la carte visible avant le footer, même avec les annonces latérales. */
    min-height: max(950px, calc(100vh - 66px));
    place-items: center;
    padding-block: clamp(3rem, 6vw, 6rem);
}
.error-page__card {
    position: relative;
    z-index: 1;
    width: min(100%, 920px);
    padding: clamp(1.5rem, 4vw, 3.5rem);
    text-align: center;
}
.error-page__code {
    position: absolute;
    z-index: -1;
    top: -2.4rem;
    left: 50%;
    color: color-mix(in srgb, var(--err-accent) 9%, transparent);
    font: 700 clamp(8rem, 22vw, 17rem)/.8 Georgia, "Times New Roman", serif;
    letter-spacing: -.08em;
    transform: translateX(-50%);
    white-space: nowrap;
}
.error-page__illustration {
    position: relative;
    display: inline-grid;
    width: clamp(9rem, 22vw, 13rem);
    height: clamp(7rem, 16vw, 10rem);
    place-items: center;
    margin-bottom: 1.1rem;
    color: var(--err-accent);
    filter: drop-shadow(0 .75rem .7rem color-mix(in srgb, var(--err-btn-bg) 14%, transparent));
}
.error-page__illustration > i { font-size: clamp(6rem, 15vw, 9rem); }
.error-page__compass {
    position: absolute;
    right: -.1rem;
    bottom: -.15rem;
    display: grid;
    width: 4.2rem;
    height: 4.2rem;
    place-items: center;
    border: .22rem solid var(--err-bg);
    border-radius: 50%;
    color: #fff;
    background: var(--err-badge);
    box-shadow: 0 .35rem 1rem color-mix(in srgb, var(--err-btn-bg) 20%, transparent);
    font-size: 2.8rem;
}
.error-page h1 {
    margin-bottom: .75rem;
    color: var(--err-ink) !important;
    font-family: Georgia, "Times New Roman", serif;
    font-size: clamp(2rem, 5vw, 3.5rem) !important;
    font-weight: 700;
    line-height: 1.1;
}
.error-page__lead {
    max-width: 730px;
    margin: 0 auto 1.75rem;
    color: var(--err-muted);
    font-size: clamp(1rem, 2vw, 1.18rem);
}
.error-page__search-title {
    margin: 0 0 .55rem;
    color: var(--err-ink);
    font-weight: 700;
}
.error-page__actions {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: .8rem;
    margin-bottom: 1.5rem;
}
.error-page__actions .btn {
    min-width: min(100%, 260px);
    padding: .75rem 1.25rem;
    border: 2px solid var(--err-btn-bg);
    border-radius: .65rem;
    font-weight: 700;
    transition: background-color .15s, color .15s, border-color .15s;
}
.error-page__primary,
.error-page__primary:hover,
.error-page__primary:focus-visible { color: var(--err-btn-text) !important; background: var(--err-btn-bg) !important; }
.error-page__primary:hover,
.error-page__primary:focus-visible { background: color-mix(in srgb, var(--err-btn-bg) 82%, var(--err-btn-text)) !important; }
.error-page__secondary { color: var(--err-ink) !important; border-color: var(--err-ink) !important; background: transparent !important; }
.error-page__secondary:hover,
.error-page__secondary:focus-visible { color: var(--err-btn-text) !important; border-color: var(--err-btn-bg) !important; background: var(--err-btn-bg) !important; }
.error-page__search {
    position: relative;
    display: flex;
    max-width: 680px;
    margin: 0 auto 1.5rem;
    z-index: 20;
}
.error-page__search .form-control {
    min-height: 52px;
    border: 1px solid color-mix(in srgb, var(--err-ink) 35%, var(--err-bg));
    border-right: 0;
    border-radius: .6rem 0 0 .6rem;
    color: var(--site-text, #212529);
    background: color-mix(in srgb, var(--site-bg, #ffffff) 85%, transparent);
}
.error-page__search .form-control::placeholder { color: var(--err-muted); opacity: .8; }
.error-page__search .form-control:focus {
    border-color: var(--err-accent);
    box-shadow: 0 0 0 .2rem color-mix(in srgb, var(--err-accent) 18%, transparent);
}
.error-page__search .btn {
    width: 58px;
    border-radius: 0 .6rem .6rem 0;
    color: var(--err-btn-text);
    background: var(--err-btn-bg);
}
.error-page__search .btn:hover,
.error-page__search .btn:focus-visible { color: var(--err-btn-text); background: color-mix(in srgb, var(--err-btn-bg) 82%, var(--err-btn-text)); }
.error-page__search #searchResults {
    color: #212529;
    text-align: left;
}
.error-page__search #searchResults a {
    color: var(--err-btn-bg) !important;
    font-weight: 700;
    text-decoration: none;
}
.error-page__links {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: .3rem .55rem;
    color: var(--err-muted);
}
.error-page__links a { color: var(--err-accent) !important; font-weight: 700; text-underline-offset: .2em; }
.error-page-body #ad-smart,
.error-page-body .site-footer.mt-5 { margin-top: 0 !important; }
@media (max-width: 575.98px) {
    .error-page { min-height: 820px; }
    .error-page__container {
        min-height: 820px;
        padding-block: 2.5rem 3.5rem;
    }
    .error-page__card { padding-inline: .25rem; }
    .error-page__code { top: -.5rem; }
    .error-page__actions { display: grid; }
    .error-page__actions .btn { width: 100%; }
    .error-page__links > span:first-child { width: 100%; }
}
@media (prefers-reduced-motion: reduce) {
    .error-page__actions .btn { transition: none; }
}
