/* =====================================================================
   Boutique Notre-Dame de la Jeunesse (Joomla 5 / Cassiopeia)
   Reprise de l'apparence de l'ancienne boutique (YOOtheme).
   A copier dans : media/templates/site/cassiopeia/css/user.css
   Les 3 polices (.woff2) sont dans : media/templates/site/cassiopeia/fonts/
   (copiées depuis ndj2022/templates/yootheme/fonts/ : inter-6fbfa375, inter-ff504004, opensans-30dc8f17)
   ===================================================================== */

/* ---- Polices hébergées (pas de Google Fonts) ---- */
@font-face { font-family: "Open Sans"; font-weight: 400; font-style: normal; font-display: swap;
  src: url("../fonts/opensans-30dc8f17.woff2") format("woff2"); }
@font-face { font-family: "Inter"; font-weight: 500; font-style: normal; font-display: swap;
  src: url("../fonts/inter-6fbfa375.woff2") format("woff2"); }
@font-face { font-family: "Inter"; font-weight: 600; font-style: normal; font-display: swap;
  src: url("../fonts/inter-ff504004.woff2") format("woff2"); }

/* ---- Couleurs et typographie ---- */
:root {
  --cassiopeia-color-primary: #28b9b3;
  --cassiopeia-color-hover: #1f918c;
  --cassiopeia-color-link: #28b9b3;
}
body { color: #666677; font-family: "Open Sans", sans-serif; }
h1, h2, h3, h4, h5, h6 { font-family: "Inter", sans-serif; font-weight: 500; color: #373157; }
a { color: #28b9b3; }
a:hover { color: #1f918c; }

/* ---- Bandeau : fond blanc, logo couleur ---- */
.container-header { background-color: #ffffff; background-image: none; box-shadow: 0 5px 15px rgba(0, 0, 0, 0.08); }
.container-header .brand-logo img, .container-header .navbar-brand img { height: 130px; width: auto; }

/* ---- Pied de page turquoise ---- */
.container-footer { background-color: #28b9b3; background-image: none; color: rgba(255, 255, 255, 0.8); }
.container-footer a { color: rgba(255, 255, 255, 0.8); }
.container-footer a:hover { color: #ffffff; }

/* ---- Menu du bandeau ---- */
.container-header .mod-menu > li > a,
.container-header .mod-menu > li > .mod-menu__heading,
.container-header .mod-menu > li > button,
.container-nav a {
  color: #373157;
  font-family: "Inter", sans-serif;
  font-weight: 500;
}
.container-header .mod-menu > li > button { background: none; border: 0; cursor: pointer; }
.container-header .mod-menu > li > a:hover,
.container-header .mod-menu > li > .mod-menu__heading:hover,
.container-header .mod-menu > li > button:hover,
.container-nav a:hover { color: #28b9b3; }

/* ---- Sous-menu "Présentation" : s'ouvre au survol ou au clic ---- */
.container-header,
.container-nav { overflow: visible; }
.container-header .mod-menu > li.parent { position: relative; }
.container-header .mod-menu__heading { cursor: pointer; }
.container-header .mod-menu__heading::after { content: " \25BE"; font-size: 0.8em; }
.container-header .mod-menu .mod-menu__sub {
  display: none;
  position: absolute;
  top: 100%;
  left: 0;
  z-index: 1000;
  min-width: 230px;
  margin: 0;
  padding: 0.5rem 0;
  background: #ffffff;
  box-shadow: 0 8px 20px rgba(0, 0, 0, 0.12);
  border-radius: 4px;
}
.container-header .mod-menu > li.parent:hover > .mod-menu__sub,
.container-header .mod-menu > li.parent:focus-within > .mod-menu__sub { display: block; }
.container-header .mod-menu .mod-menu__sub li { display: block; margin: 0; }
.container-header .mod-menu .mod-menu__sub a { display: block; padding: 0.35rem 1rem; white-space: nowrap; }
.container-header .mod-menu ul a { color: #373157; }
.container-header .mod-menu ul a:hover { color: #28b9b3; }

/* ---- Bandeau : logo à gauche, menu à droite, dans la largeur du site (écrans larges) ---- */
@media (min-width: 992px) {
  .container-header {
    display: flex;
    flex-wrap: nowrap;
    align-items: center;
    padding-left: max(1rem, calc((100% - 1320px) / 2));
    padding-right: max(1rem, calc((100% - 1320px) / 2));
  }
  .container-header .grid-child {
    width: auto;
    padding-left: 0;
    padding-right: 0;
  }
  .container-header .grid-child:not(.container-nav) { flex: 0 0 auto; }
  .container-header .container-nav {
    flex: 1 1 0;
    min-width: 0;
    margin-left: 1rem;
  }
  .container-header .container-nav ul.mod-menu {
    display: flex;
    flex-wrap: wrap;
    justify-content: flex-end;
  }
  .container-header .mod-menu > li > a,
  .container-header .mod-menu > li > .mod-menu__heading {
    white-space: nowrap;
    padding: 0.5rem 0.7rem;
  }
}

/* =====================================================================
   Mise en page du module de menu : "Collapsible Dropdown" (du template Cassiopeia)
   -> bouton menu sur téléphone, sous-menus au clic. Réglages finaux ci-dessous.
   ===================================================================== */

/* bouton de menu (téléphone) : visible sur le fond blanc */
.container-header .navbar-toggler {
  color: #373157;
  background: transparent;
  border: 1px solid #373157;
  border-radius: 4px;
  padding: 0.4rem 0.7rem;
}
.container-header .navbar-toggler .icon-menu::before { color: #373157; }

/* téléphone et petites tablettes : logo à gauche, bouton à droite, menu déroulé sous le bandeau */
@media (max-width: 991.98px) {
  .container-header {
    display: flex;
    flex-wrap: nowrap;
    align-items: center;
    justify-content: space-between;
    position: relative;
    padding: 0.5rem 1rem !important;
  }
  .container-header .grid-child {
    width: auto !important;
    margin: 0 !important;
    padding: 0 !important;
    max-width: none !important;
  }
  .container-header .container-nav { margin-left: auto !important; position: static; }
  .container-header .navbar { position: static; }
  .container-header .navbar-brand img { height: 70px; width: auto; }
  .container-header .navbar-collapse {
    position: absolute;
    left: 0;
    right: 0;
    top: 100%;
    z-index: 1000;
    padding: 0 1rem 1rem;
    background: #ffffff;
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.12);
  }
}

/* écrans larges : menu aligné à droite, entrées resserrées sur une seule ligne */
@media (min-width: 992px) {
  .container-header .navbar { justify-content: flex-end; }
  .container-header .navbar-collapse { justify-content: flex-end; }
  .container-header .metismenu.mod-menu { flex-wrap: nowrap; }
  .container-header .metismenu.mod-menu > .metismenu-item { margin: 0 !important; }
  .container-header .metismenu.mod-menu > .metismenu-item > a,
  .container-header .metismenu.mod-menu > .metismenu-item > button.mod-menu__heading {
    padding: 0.5rem 0.55rem !important;
    white-space: nowrap;
  }
}
