/**
 * Template Mex — Commune de Mex (VD)
 * (C) 2026 Edouard Boisset - bebold.ch — GPL v2 ou ultérieure
 *
 * Couche visuelle posée sur Cassiopeia (Joomla 6).
 * Reprend fidèlement l'identité du site historique : boîte centrée sur fond bleu-gris,
 * en-tête marine, menu Montserrat en capitales, diaporama pleine largeur, post-it manuscrit.
 */

/* ---------- Polices (hébergées localement) ---------- */
@font-face {
  font-family: "Montserrat";
  font-style: normal;
  font-display: swap;
  font-weight: 100 900;
  src: url("../fonts/montserrat-latin-wght-normal.woff2") format("woff2-variations");
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
  font-family: "Montserrat";
  font-style: normal;
  font-display: swap;
  font-weight: 100 900;
  src: url("../fonts/montserrat-latin-ext-wght-normal.woff2") format("woff2-variations");
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}
/* Écriture manuscrite du post-it (police d'origine du site, générée sur MyScriptFont.com) */
@font-face {
  font-family: "All That Matters";
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url("../fonts/allthatmatters-webfont.woff") format("woff"),
       url("../fonts/allthatmatters-webfont.ttf") format("truetype");
}

/* ---------- Jetons (valeurs relevées sur le site d'origine) ---------- */
:root {
  --mex-navy: #1a3867;
  --mex-navy-dark: #132a4f;
  --mex-menu-active: #a7b1c1;
  --mex-box: #f2f2f2;
  --mex-text: #555555;
  --mex-heading: #111111;
  --mex-heading-2: #444444;
  --mex-link: #9e3a2c;
  --mex-link-footer: #003366;
  --mex-footer-text: #dddddd;
  --mex-postit: #ffffcc;
  --mex-line: #bbbbbb;
  --mex-font: "Montserrat", system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --mex-hand: "All That Matters", "Segoe Print", "Comic Sans MS", cursive;
  --mex-box-max: 1680px;
  --mex-pad: 30px;

  /* Variables Cassiopeia / Bootstrap reprises */
  --cassiopeia-color-primary: var(--mex-navy);
  --cassiopeia-color-hover: var(--mex-navy-dark);
  --cassiopeia-color-link: var(--mex-link);
  --cassiopeia-font-family-body: var(--mex-font);
  --cassiopeia-font-family-headings: var(--mex-font);
  --body-font-family: var(--mex-font);
  --body-color: var(--mex-text);
  --body-bg: var(--mex-box);
  --link-color: var(--mex-link);
  --link-color-rgb: 158, 58, 44;
  --link-hover-color: var(--mex-navy);
  --link-hover-color-rgb: 26, 56, 103;
}

/* ---------- Page ---------- */
body.site {
  min-height: 100vh;
  margin: 0;
  padding: 20px 0 26px;
  font-family: var(--mex-font);
  font-size: .95rem;              /* 15,2 px comme l'original */
  font-weight: 400;
  line-height: 1.5;
  color: var(--mex-text);
  background: transparent;
}
/* Fond bleu-gris fixe derrière la boîte */
html {
  background: #545454 url("../images/fond-page.jpg") center top / cover no-repeat fixed;
}

.mex-wrapper {
  position: relative;
  width: 94%;
  max-width: var(--mex-box-max);
  margin: 0 auto;
  background: var(--mex-box);
  box-shadow: 0 0 20px 3px rgba(0, 0, 0, .46);
}

h1, h2, h3, h4, h5, h6, .h1, .h2, .h3 {
  font-family: var(--mex-font);
  font-weight: 400;
  line-height: 1.4;
}
h1, .h1 {
  font-size: 2.09rem;             /* 33,4 px */
  color: var(--mex-heading);
  margin: 0 0 25px;
  padding-bottom: .4em;
  border-bottom: 1px dotted var(--mex-line);
}
h2, .h2 { font-size: 1.425rem; color: var(--mex-heading-2); margin: 0 0 8px; }
h3, .h3 { font-size: 1.1rem; color: var(--mex-heading-2); }
h4, .h4 { font-size: 1.05rem; color: var(--mex-heading-2); }

a, a:not([class]) { color: var(--mex-link); text-decoration: none; }
a:hover, a:focus, a:not([class]):hover, a:not([class]):focus { color: var(--mex-navy); text-decoration: underline; }
:focus-visible { outline: 2px solid #f2c230; outline-offset: 2px; }

p { margin: 0 0 10px; }
img { max-width: 100%; height: auto; }

.mex-container {
  width: 100%;
  margin-inline: auto;
  padding-inline: var(--mex-pad);
}

.skip-link {
  position: absolute;
  left: 1rem;
  top: -100px;
  z-index: 2000;
  padding: .6rem 1rem;
  background: #fff;
  color: var(--mex-navy);
  font-weight: 700;
}
.skip-link:focus { top: 1rem; }

/* ---------- Barre haute (optionnelle) ---------- */
.mex-topbar { background: var(--mex-navy-dark); color: #fff; font-size: .85rem; padding-block: .35rem; }
.mex-topbar a { color: #fff; }

/* ---------- En-tête ---------- */
.mex-header.container-header {
  background: var(--mex-navy);
  background-image: none;
  box-shadow: none;
  border: 0;
  z-index: 1000;
}
/* Comme l'original : 20 px au-dessus du logo et du menu, menu aligné en haut avec le logo
   (107 px de haut sur une ligne, 171 px quand le menu passe sous le logo) */
.mex-header__inner {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-start;
  justify-content: space-between;
  padding: 20px 20px 0;
}
.mex-brand {
  display: inline-flex;
  align-items: center;
  margin: 0;
  line-height: 0;
}
.mex-brand .brand-logo { width: 348px; height: auto; }
.mex-brand:focus-visible { outline-offset: 6px; }
.mex-brand .brand-title { color: #fff; font-size: 2.6rem; line-height: 1.1; }

.mex-nav { flex: 1 1 auto; display: flex; justify-content: flex-end; }
.mex-nav nav, .container-header .mex-nav nav { margin: 0; padding: 0; }
.mex-nav .navbar { padding: 0; justify-content: flex-end; }

/* Menu principal */
.mex-header .metismenu.mod-menu {
  flex: 0 1 auto;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 0;
  color: #fff;
}
.mex-header .metismenu.mod-menu > .metismenu-item {
  position: relative;
  flex-wrap: nowrap;
  padding: 0;
  font-size: inherit;
  line-height: inherit;
}
.mex-header .metismenu.mod-menu > .metismenu-item > a,
.mex-header .metismenu.mod-menu > .metismenu-item > button,
.mex-header .metismenu.mod-menu > .metismenu-item > span {
  display: inline-flex;
  align-items: center;
  padding: 30px 16px;
  border: 0;
  background: none;
  box-shadow: none;
  font-family: var(--mex-font);
  font-size: 1.14rem;             /* 18,2 px (120 %) */
  font-weight: 400;
  line-height: 1.5;
  letter-spacing: normal;
  text-transform: uppercase;
  text-decoration: none;
  color: #fff;
  white-space: nowrap;
  transition: color .2s ease;
}
.mex-header .metismenu.mod-menu > .metismenu-item > a:hover,
.mex-header .metismenu.mod-menu > .metismenu-item > button:hover,
.mex-header .metismenu.mod-menu > .metismenu-item:hover > a,
.mex-header .metismenu.mod-menu > .metismenu-item:hover > button,
.mex-header .metismenu.mod-menu > .metismenu-item.active > a,
.mex-header .metismenu.mod-menu > .metismenu-item.active > button {
  color: var(--mex-menu-active);
  text-decoration: none;
}
/* Pas de soulignés animés ni de flèches, comme sur le site d'origine */
.mex-header .metismenu.mod-menu > li > a:after,
.mex-header .metismenu.mod-menu > li > button:before,
.mex-header .metismenu.mod-menu > li:after,
.mex-header .metismenu.mod-menu .mm-toggler:after { content: none; display: none; }

/* Icônes devant les libellés */
.mex-header .metismenu.mod-menu > .metismenu-item [class*="fa-"] {
  padding: 0 !important;
  margin-right: 6px;
  color: inherit;
  font-size: 1em;
}

/* Bouton seul (sans texte) qui ouvre le sous-menu d'un lien : invisible sur bureau,
   le sous-menu s'ouvre au survol et au focus clavier */
.mex-header .metismenu.mod-menu > .metismenu-item > .mm-toggler-link {
  position: absolute;
  inset: 0 0 auto auto;
  width: 1px;
  height: 1px;
  padding: 0;
  overflow: hidden;
  opacity: 0;
}
.mex-header .metismenu.mod-menu > .metismenu-item > .mm-toggler-link:focus-visible {
  width: auto;
  height: auto;
  padding: 2px 6px;
  opacity: 1;
  outline-offset: 0;
}

/* Sous-menus : panneau blanc, capitales grasses en marine */
.mex-header .metismenu.mod-menu .mm-collapse {
  top: 100%;
  left: 0;
  right: auto;
  width: 280px;
  min-width: 0;
  margin: 0;
  padding: 0;
  border-radius: 0;
  background: #fff;
  box-shadow: 0 1px 3px 2px rgba(40, 40, 40, .25);
}
.mex-header .metismenu.mod-menu > .metismenu-item:last-child > .mm-collapse,
.mex-header .metismenu.mod-menu > .metismenu-item:nth-last-child(2) > .mm-collapse { left: auto; right: 0; }
/* Sur grand écran, les sous-menus ne s'ouvrent qu'au survol / focus, même si le menu mobile
   en avait laissé un déplié */
@media (min-width: 992px) {
  .mex-header .metismenu.mod-menu > .metismenu-item > .mm-collapse.mm-show { display: none; }
}
.mex-header .metismenu.mod-menu > .metismenu-item:hover > .mm-collapse,
.mex-header .metismenu.mod-menu > .metismenu-item:focus-within > .mm-collapse { display: block; }
.mex-header .metismenu.mod-menu .mm-collapse > .metismenu-item {
  display: block;
  padding: 0;
  font-size: inherit;
  line-height: inherit;
}
.mex-header .metismenu.mod-menu .mm-collapse > .metismenu-item > a {
  display: block;
  padding: 10px 14px;
  border-bottom: 1px solid #eee;
  font-size: .8125rem;            /* 13 px */
  font-weight: 700;
  line-height: 1.4;
  text-transform: uppercase;
  color: var(--mex-navy);
  white-space: normal;
}
.mex-header .metismenu.mod-menu .mm-collapse > .metismenu-item:last-child > a { border-bottom: 0; }
.mex-header .metismenu.mod-menu .mm-collapse > .metismenu-item > a:hover,
.mex-header .metismenu.mod-menu .mm-collapse > .metismenu-item > a:focus,
.mex-header .metismenu.mod-menu .mm-collapse > .metismenu-item.current > a {
  background: #f2f2f2;
  color: var(--mex-link);
  text-decoration: none;
}

/* Menu fixe au défilement (grand écran) */
@media (min-width: 992px) {
  .mex-stuck .mex-header.container-header {
    position: fixed !important;
    top: 0;
    left: 50%;
    width: 94%;
    max-width: var(--mex-box-max);
    transform: translateX(-50%);
    box-shadow: 0 2px 8px rgba(0, 0, 0, .3);
    animation: mex-slide-down .3s ease;
  }
  .mex-stuck .mex-brand { display: none; }
  .mex-stuck .mex-header .metismenu.mod-menu > .metismenu-item > a,
  .mex-stuck .mex-header .metismenu.mod-menu > .metismenu-item > button,
  .mex-stuck .mex-header .metismenu.mod-menu > .metismenu-item > span { padding-block: 6px; }
}
@keyframes mex-slide-down {
  from { transform: translate(-50%, -100%); }
  to { transform: translate(-50%, 0); }
}
@media (prefers-reduced-motion: reduce) {
  .mex-stuck .mex-header.container-header { animation: none; }
}

/* Bouton menu mobile */
.mex-header .navbar-toggler {
  display: none;
  align-items: center;
  gap: .5rem;
  margin: 0 0 0 auto;
  padding: .5rem .8rem;
  border: 1px solid rgba(255, 255, 255, .6);
  border-radius: 4px;
  color: #fff;
  font-size: 1.3rem;
  line-height: 1;
}
.mex-header .navbar-toggler:focus { box-shadow: none; }
.mex-toggler-text { font-size: .9rem; text-transform: uppercase; }

@media (max-width: 991.98px) {
  .mex-header .navbar-toggler { display: inline-flex; }
  .mex-header__inner { flex-wrap: nowrap; align-items: center; gap: 1rem; padding: 0 16px; }
  .mex-brand { margin: 14px 0; align-self: center; }
  .mex-brand .brand-logo { width: 240px; }
  .mex-nav, .mex-nav nav, .mex-nav .navbar { position: static; }
  /* Aucune transformation sur le conteneur du menu : sinon le panneau déroulant se cale sur
     le bouton (bande étroite à droite) au lieu de prendre toute la largeur de l'en-tête */
  .mex-nav, .mex-nav nav, .mex-nav .navbar { transform: none !important; }
  .mex-nav { flex: 0 0 auto; }
  .mex-header.container-header { position: relative; }
  .mex-nav .navbar-collapse {
    position: absolute;
    left: 0;
    right: 0;
    top: 100%;
    z-index: 1001;
    max-height: calc(100vh - 80px);
    overflow-y: auto;
    padding: 0 16px 12px;
    background: var(--mex-navy);
    box-shadow: 0 8px 16px rgba(0, 0, 0, .25);
  }
  .mex-header .metismenu.mod-menu { flex-direction: column; align-items: stretch; }
  .mex-header .metismenu.mod-menu > .metismenu-item {
    flex-wrap: wrap;
    width: 100%;
    border-bottom: 1px solid rgba(255, 255, 255, .15);
  }
  .mex-header .metismenu.mod-menu > .metismenu-item > a,
  .mex-header .metismenu.mod-menu > .metismenu-item > button,
  .mex-header .metismenu.mod-menu > .metismenu-item > span { flex: 1 1 auto; padding: 14px 4px; font-size: 1rem; }
  /* Sur mobile, le bouton du sous-menu redevient visible et cliquable */
  .mex-header .metismenu.mod-menu > .metismenu-item > .mm-toggler-link {
    position: static;
    flex: 0 0 auto;
    width: 3rem;
    height: auto;
    padding: 14px 0;
    opacity: 1;
    justify-content: center;
  }
  .mex-header .metismenu.mod-menu .mm-toggler:after {
    content: "";
    display: block;
    border-top: .4em solid;
    border-left: .4em solid transparent;
    border-right: .4em solid transparent;
    margin-inline-start: .5em;
  }
  .mex-header .metismenu.mod-menu > .metismenu-item:hover > .mm-collapse:not(.mm-show),
  .mex-header .metismenu.mod-menu > .metismenu-item:focus-within > .mm-collapse:not(.mm-show) { display: none; }
  .mex-header .metismenu.mod-menu .mm-collapse {
    position: static;
    flex-basis: 100%;
    width: auto;
    margin: 0 0 10px;
    box-shadow: none;
  }
}
@media (max-width: 575.98px) {
  .mex-brand .brand-logo { width: 190px; }
  .mex-toggler-text { display: none; }
}

/* ---------- Diaporama (hauteur : la moitié de l'écran, comme l'original) ---------- */
.mex-hero {
  position: relative;
  height: 50vh;
  min-height: 260px;
  max-height: 640px;
  overflow: hidden;
  background: var(--mex-navy-dark);
}
.mex-hero__slide {
  position: absolute;
  inset: 0;
  margin: 0;
  opacity: 0;
  transition: opacity 1.2s ease;
}
.mex-hero__slide.is-active { opacity: 1; }
.mex-hero__slide img { width: 100%; height: 100%; object-fit: cover; object-position: center; }
.mex-hero__pause {
  position: absolute;
  right: 12px;
  bottom: 12px;
  display: grid;
  place-items: center;
  width: 2.2rem;
  height: 2.2rem;
  padding: 0;
  border: 0;
  border-radius: 50%;
  background: rgba(0, 0, 0, .35);
  color: #fff;
  opacity: .7;
  cursor: pointer;
}
.mex-hero__pause:hover, .mex-hero__pause:focus-visible { opacity: 1; background: rgba(0, 0, 0, .6); }
@media (max-width: 767.98px) {
  /* Sur téléphone, l'image garde ses proportions */
  .mex-hero { height: auto; min-height: 0; aspect-ratio: 1680 / 440; }
}
@media (prefers-reduced-motion: reduce) {
  .mex-hero__slide { transition: none; }
}

/* ---------- Contenu ---------- */
.mex-page { padding-block: 27px 40px; }
.mex-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  column-gap: 40px;
  row-gap: 30px;
}
.has-sidebar-right .mex-layout { grid-template-columns: minmax(0, 1fr) 25%; }
@media (max-width: 991.98px) {
  .has-sidebar-right .mex-layout { grid-template-columns: minmax(0, 1fr); }
}
@media (max-width: 575.98px) {
  :root { --mex-pad: 16px; }
}

.mex-main { min-width: 0; }
.mex-main:focus { outline: none; }
.mex-main > :first-child { margin-top: 0; }
.mex-main-top { margin-bottom: 20px; }
.mex-main-bottom { margin-top: 20px; }
.mex-main .page-header { margin: 0; padding: 0; border: 0; }
.mex-main .page-header h1, .mex-main .page-header h2 { margin-top: 0; }

/* Tableaux des anciens contenus */
.mex-main table { max-width: 100%; height: auto !important; }
.mex-main table td, .mex-main table th { padding: 4px 6px; vertical-align: top; }
.mex-main .table-responsive { overflow-x: auto; }
.mex-main iframe { max-width: 100%; }
.mex-main [style*="width: 1"], .mex-main [style*="width:1"] { max-width: 100%; }
@media (max-width: 767.98px) {
  .mex-main table { display: block; overflow-x: auto; width: 100% !important; }
}

/* ---------- Colonne de droite ---------- */
.mex-sidebar { min-width: 0; padding-top: 20px; }
@media (min-width: 992px) {
  .mex-sidebar { margin-right: -20px; }
}
.mex-sidebar .card {
  margin: 0 0 20px;
  border: 0;
  border-radius: 0;
  background: none;
  box-shadow: none;
}
.mex-sidebar .card-header {
  margin: 0 0 6px;
  padding: 0;
  border: 0;
  background: none;
  font-size: 1.235rem;            /* 130 % comme les titres de modules d'origine */
  font-weight: 400;
  line-height: 36px;
  color: var(--mex-text);
}
.mex-sidebar .card-body { padding: 0; }

/* Post-it des actualités : papier jaune, écriture manuscrite, punaise bleue */
.mex-sidebar .card.postit {
  position: relative;
  width: 286px;
  max-width: calc(100% - 18px);
  margin: 0 0 89px 18px;          /* 76 px entre le post-it et la recherche, comme l'original */
  padding: 20px 10px 10px;
  background: var(--mex-postit);
  box-shadow: 5px 5px 7px #cccccc;
  transform: rotate(-5.5deg);
  font-family: var(--mex-hand);
  font-size: 20px;
  line-height: 24px;
  color: var(--mex-text);
}
.mex-sidebar .card.postit::before {
  content: "";
  position: absolute;
  top: -15px;
  left: 5px;
  width: 26px;
  height: 31px;
  background: url("../images/punaise.png") no-repeat center / contain;
}
.mex-sidebar .card.postit .card-body,
.mex-sidebar .card.postit .card-body * { font-family: var(--mex-hand); }
.mex-sidebar .card.postit p { margin: 0 0 6px; }
.mex-sidebar .card.postit ul { margin: 8px 0; padding-left: 18px; }
.mex-sidebar .card.postit a { color: var(--mex-link); text-decoration: none; }
.mex-sidebar .card.postit a:hover { text-decoration: underline; }
@media (prefers-reduced-motion: reduce) {
  .mex-sidebar .card.postit { transform: none; }
}

/* Recherche */
.mex-sidebar .mod-finder .input-group { flex-wrap: nowrap; }
.mex-sidebar .mod-finder input[type="search"],
.mex-sidebar .mod-finder input[type="text"] {
  width: 194px;
  max-width: 100%;
  height: 52px;
  padding: 6px 12px;
  border: 1px solid rgba(100, 100, 100, .2);
  border-radius: 2px;
  background: rgba(100, 100, 100, .07);
  font-size: .8125rem;
  color: #666;
}
.mex-sidebar .mod-finder .btn {
  border-radius: 0 2px 2px 0;
  background: var(--mex-navy);
  border-color: var(--mex-navy);
  color: #fff;
  font-size: .8125rem;
}
.mex-sidebar .mod-finder .btn:hover { background: var(--mex-navy-dark); }

/* ---------- Bas de page ---------- */
.mex-bottom { margin-top: 30px; display: grid; gap: 20px; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); }

/* Coordonnées : bloc marine en quatre colonnes */
.mex-footer {
  padding-block: 20px;
  background: var(--mex-navy);
  color: var(--mex-footer-text);
}
.mex-footer a { color: #fff; }
.mex-footer__contacts .mod-custom,
.mex-footer__contacts .custom {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 20px 30px;
  padding-block: 20px 0;
}
.mex-footer__contacts .one-fourth { width: auto; margin: 0; float: none; }
.mex-footer__contacts p { margin: 0 0 10px; }
.mex-footer__contacts strong { color: var(--mex-footer-text); }
@media (max-width: 991.98px) {
  .mex-footer__contacts .mod-custom, .mex-footer__contacts .custom { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 575.98px) {
  .mex-footer__contacts .mod-custom, .mex-footer__contacts .custom { grid-template-columns: minmax(0, 1fr); gap: 24px; }
  /* Smartphone : on retire les paragraphes vides et les doubles retours à la ligne
     des anciens contenus, qui créent de grands blancs entre les blocs */
  .mex-footer__contacts p.mex-empty,
  .mex-footer__contacts p:has(> br:only-child) { display: none; }
  .mex-footer__contacts br.mex-br-extra { display: none; }
  .mex-footer__contacts .one-fourth > :last-child { margin-bottom: 0; }
  .mex-footer { padding-block: 10px 20px; }
}

/* Adresse et crédits, sur le fond clair de la boîte */
.mex-sitefooter {
  padding-block: 30px 34px;
  color: var(--mex-text);
  text-align: center;
}
.mex-sitefooter p { margin: 0 0 6px; }
.mex-sitefooter a { color: var(--mex-link-footer); }
.mex-credits { font-size: .7rem; color: var(--mex-link-footer); }

/* Retour en haut */
.mex-back-top {
  position: fixed;
  right: 27px;
  bottom: 20px;
  z-index: 900;
  display: grid;
  place-items: center;
  width: 42px;
  height: 42px;
  border-radius: 3px;
  background: rgba(26, 56, 103, .85);
  color: #fff;
  opacity: 0;
  visibility: hidden;
  transition: opacity .25s ease, visibility .25s ease;
  text-decoration: none;
}
.mex-back-top.is-visible { opacity: 1; visibility: visible; }
.mex-back-top:hover, .mex-back-top:focus { background: var(--mex-navy); color: #fff; text-decoration: none; }

/* ---------- Apparition au défilement (comme scrollReveal sur l'original) ---------- */
.mex-reveal [data-mex-reveal] {
  opacity: 0;
  transform: var(--mex-reveal-from, none);
  transition: opacity var(--mex-reveal-duration, 1s) ease-in-out, transform var(--mex-reveal-duration, 1s) ease-in-out;
}
.mex-reveal [data-mex-reveal].is-revealed { opacity: 1; transform: none; }
.mex-reveal [data-mex-reveal].is-done { transition: none; }

/* ---------- Composants ---------- */
.btn-primary {
  --btn-bg: var(--mex-navy);
  --btn-border-color: var(--mex-navy);
  --btn-hover-bg: var(--mex-navy-dark);
  --btn-hover-border-color: var(--mex-navy-dark);
  --btn-active-bg: var(--mex-navy-dark);
  --btn-active-border-color: var(--mex-navy-dark);
}
.mex-main #jevents_body { max-width: 100%; overflow-x: auto; }
.mod-breadcrumbs { margin-bottom: 1rem; font-size: .85rem; }

/* ---------- Petits écrans : la boîte occupe toute la largeur ---------- */
@media (max-width: 767.98px) {
  body.site { padding: 0; }
  .mex-wrapper { width: 100%; box-shadow: none; }
}

/* ---------- Impression ---------- */
@media print {
  html { background: #fff; }
  body.site { padding: 0; background: #fff; }
  .mex-wrapper { width: 100%; box-shadow: none; background: #fff; }
  .mex-header, .mex-hero, .mex-sidebar, .mex-footer, .mex-back-top, .skip-link { display: none !important; }
}

/* ---------- Haut du contenu (position top-a, ancienne « user1 ») ----------
   Comme l'original : modules côte à côte, 30 % de la largeur du contenu chacun */
.mex-top-a {
  display: flex;
  flex-wrap: wrap;
  gap: 0 5%;
  padding-top: 20px;
  margin-bottom: 20px;
}
.mex-top-a .card {
  flex: 0 0 30%;
  min-width: 220px;
  margin: 0 0 15px;
  border: 0;
  border-radius: 0;
  background: none;
  box-shadow: none;
}
.mex-top-a .card-header {
  margin: 0 0 10px;
  padding: 0;
  border: 0;
  background: none;
  font-size: 1.235rem;
  font-weight: 400;
  line-height: 1.4;
  color: var(--mex-text);
}
.mex-top-a .card-body { padding: 0; }
.mex-top-a p { margin: 0 0 6px; }
@media (max-width: 575.98px) {
  .mex-top-a .card { flex-basis: 100%; }
}
