/* EMGym - style chaleureux et familial pour Cassiopeia (Joomla 5/6) - version complete */

body {
  background-color: #fff8ee;
  color: #2f3a2c;
  font-family: "Trebuchet MS", "Segoe UI", sans-serif;
}

a {
  color: #2c6b37;
}

a:hover {
  color: #3f8f4b;
}

/* ================= En-tete ================= */
.container-header {
  background-color: #3f8f4b !important;
  background-image: none !important;
  border-radius: 0 0 36px 36px;
  box-shadow: 0 8px 22px rgba(60, 90, 40, 0.18);
  margin-bottom: 1.5rem;
}

.container-header .navbar-brand a,
.container-header .site-description {
  color: #ffffff !important;
  font-family: "Arial Rounded MT Bold", "Trebuchet MS", "Segoe UI", sans-serif;
}

/* Logo a gauche du titre du site */
.container-header .navbar-brand a {
  display: flex !important;
  align-items: center;
  gap: 1rem;
}

.container-header .navbar-brand a::before {
  content: "";
  flex-shrink: 0;
  width: 96px;
  height: 76px;
  box-sizing: border-box;
  padding: 8px;
  background-color: #ffffff;
  background-image: url("/images/emgym_logo.png");
  background-repeat: no-repeat;
  background-position: center;
  background-size: contain;
  background-origin: content-box;
  border-radius: 18px;
}

/* ================= Menu ================= */
.container-header .mod-menu > li > a,
.container-header .mod-menu > li > span {
  color: #ffffff !important;
  font-weight: 700;
  padding: 0.5rem 1rem;
  border-radius: 999px;
}

.container-header .mod-menu > li > a:hover,
.container-header .mod-menu > li > a:focus {
  background-color: rgba(255, 255, 255, 0.22);
  color: #ffffff !important;
}

.container-header .mod-menu > li.active > a,
.container-header .mod-menu > li.current > a {
  background-color: #ffffff;
  color: #2c6b37 !important;
}

/* Sous-menus : s'ouvrent au survol de la souris */
.container-header .mod-menu li.parent,
.container-header .mod-menu li.deeper {
  position: relative;
}

.container-header .mod-menu li.parent > ul,
.container-header .mod-menu li.deeper > ul {
  position: absolute !important;
  top: 100%;
  left: 0;
  z-index: 1000;
  min-width: 260px;
  background-color: #ffffff;
  border-radius: 18px;
  box-shadow: 0 10px 26px rgba(60, 60, 30, 0.18);
  padding: 0.5rem;
  margin: 0;
  list-style: none;
  display: none;
}

.container-header .mod-menu li.parent:hover > ul,
.container-header .mod-menu li.parent:focus-within > ul,
.container-header .mod-menu li.deeper:hover > ul,
.container-header .mod-menu li.deeper:focus-within > ul {
  display: block !important;
  visibility: visible !important;
  height: auto !important;
  opacity: 1 !important;
}

.container-header .mod-menu li.parent > ul a,
.container-header .mod-menu li.deeper > ul a {
  display: block;
  background-color: transparent;
  color: #2c6b37 !important;
  padding: 0.45rem 0.9rem;
  border-radius: 12px;
  font-weight: 600;
}

.container-header .mod-menu li.parent > ul a:hover,
.container-header .mod-menu li.deeper > ul a:hover {
  background-color: #fff1d9;
}

/* ================= Titres ================= */
h1, h2, h3, .card-header, .page-header h2 {
  font-family: "Arial Rounded MT Bold", "Trebuchet MS", "Segoe UI", sans-serif;
  color: #2f3a2c;
}

.page-header h2 a {
  color: #2c6b37;
  text-decoration: none;
}

.page-header h2 a:hover {
  color: #3f8f4b;
}

/* ================= Cartes : modules et articles ================= */
.card {
  border: 0;
  border-radius: 28px;
  background-color: #ffffff;
  box-shadow: 0 8px 22px rgba(80, 60, 20, 0.08);
  overflow: hidden;
}

.card-header {
  background-color: transparent;
  border-bottom: 0;
  font-size: 1.25rem;
}

.blog-item,
.blog-items .blog-item {
  background-color: #ffffff;
  border-radius: 28px;
  padding: 1.5rem 2rem;
  margin-bottom: 1.5rem;
  box-shadow: 0 8px 22px rgba(80, 60, 20, 0.08);
}

/* Bandeau d accueil (zone top-a), en pleine largeur */
.container-top-a > * {
  background-color: transparent;
  box-shadow: none;
  border: 0;
  margin: 0;
}

.container-top-a img {
  max-width: 100%;
  height: auto;
}

/* ================= Boutons ================= */
.btn,
.btn-primary,
.readmore .btn {
  border-radius: 999px;
  font-weight: 700;
  padding: 0.6rem 1.4rem;
}

.btn-primary,
.readmore .btn {
  background-color: #ffb347;
  border-color: #ffb347;
  color: #3a2a10;
}

.btn-primary:hover,
.readmore .btn:hover {
  background-color: #ffa21f;
  border-color: #ffa21f;
  color: #3a2a10;
}

/* ================= Pied de page ================= */
.footer {
  background-color: #2c6b37;
  background-image: none;
  color: #ffffff;
  border-radius: 36px 36px 0 0;
  margin-top: 2rem;
}

.footer a {
  color: #ffffff;
}

/* Images arrondies dans les articles */
.com-content-article img,
.blog-item img {
  border-radius: 18px;
}

/* Pas de fleches a cote des entrees de menu */
.container-header .mod-menu .mm-toggler,
.container-header .mod-menu .mm-toggler-link,
.container-header .mod-menu .mm-toggler-nolink,
.container-header .mod-menu button.mm-toggler {
  display: none !important;
}

.container-header .mod-menu li.parent > a::after,
.container-header .mod-menu li.parent > span::after,
.container-header .mod-menu li.deeper > a::after,
.container-header .mod-menu li.deeper > span::after,
.container-header .mod-menu .mm-toggler::after,
.container-header .mod-menu .dropdown-toggle::after {
  display: none !important;
  content: none !important;
  border: 0 !important;
}

/* Sous-sous-menus : s'ouvrent a droite du sous-menu, pas par-dessus */
.container-header .mod-menu li.parent li.parent > ul,
.container-header .mod-menu li.deeper li.deeper > ul,
.container-header .mod-menu li.parent li.deeper > ul {
  top: 0 !important;
  left: calc(100% - 8px) !important;
  min-width: 240px;
}

/* Logo + bandeau cote a cote, meme hauteur, centres ; titre et slogan dessous */
.container-header > .grid-child:first-child {
  display: flex !important;
  flex-wrap: wrap;
  justify-content: center;
  align-items: flex-start;
  gap: 0.75rem 1.5rem;
}

.container-header > .grid-child:first-child::before {
  content: "";
  order: 1;
  flex: 0 0 auto;
  width: 190px;
  height: 165px;
  box-sizing: border-box;
  padding: 8px;
  background-color: #ffffff;
  background-image: url("/images/emgym_logo.png");
  background-repeat: no-repeat;
  background-position: center;
  background-size: contain;
  background-origin: content-box;
  border-radius: 24px;
}

.container-header > .grid-child:first-child::after {
  content: "";
  order: 2;
  flex: 0 1 620px;
  min-width: 0;
  height: 165px;
  box-sizing: border-box;
  padding: 8px;
  background-color: #ffffff;
  background-image: url("/images/banners/Bannire_2022_3.jpg");
  background-repeat: no-repeat;
  background-position: center;
  background-size: contain;
  background-origin: content-box;
  border-radius: 24px;
}

/* Titre et slogan, centres sous la ligne logo + bandeau */
.container-header .navbar-brand {
  order: 3;
  flex: 0 0 100%;
  text-align: center;
  margin: 0 !important;
}

.container-header .navbar-brand a {
  display: inline-block !important;
  text-decoration: none !important;
}

.container-header .navbar-brand a::before {
  display: none !important;
}

/* Menu centre */
.container-header .container-nav {
  justify-content: center;
}

.container-header .mod-menu {
  justify-content: center;
  flex-wrap: wrap;
}

@media (max-width: 900px) {
  .container-header > .grid-child:first-child::after {
    flex: 1 1 100%;
  }
}
/* Sous-sous-menus : fond blanc */
.container-header .mod-menu ul ul,
.container-header .mod-menu li.parent li.parent > ul,
.container-header .mod-menu li.deeper li.deeper > ul,
.container-header .mod-menu li.parent li.deeper > ul {
  background-color: #ffffff !important;
  background-image: none !important;
  border-radius: 18px;
  box-shadow: 0 10px 26px rgba(60, 60, 30, 0.18);
  padding: 0.5rem;
  z-index: 1100;
}

.container-header .mod-menu ul ul a {
  background-color: transparent;
  color: #2c6b37 !important;
}

.container-header .mod-menu ul ul a:hover {
  background-color: #fff1d9;
}