/*
 * mci47.fr — compléments à Cassiopeia (Joomla 6).
 * Déployé dans : media/templates/site/cassiopeia/css/user.css
 * (fichier chargé automatiquement par Cassiopeia s'il existe).
 */

/* Encarts produits de l'accueil (ancien balisage .items > .item) : côte à côte */
.items {
  display: flex;
  flex-wrap: wrap;
  gap: 1.5rem;
  justify-content: center;
  align-items: flex-start;
}
.items > .item {
  flex: 1 1 240px;
  max-width: calc(33.333% - 1rem);
  text-align: center;
}
.items > .item:empty { display: none; }
.items > div:not(.item) { flex: 1 1 100%; }
.items img { max-width: 100%; height: auto; }

@media (max-width: 767.98px) {
  .items > .item { max-width: 100%; }
}

/* Bandeau du haut : coordonnées à gauche, hotline à droite, sur une seule ligne */
.container-topbar {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  align-items: center;
  gap: .5rem 1.5rem;
  padding: .5rem 2.5rem;
}
@media (max-width: 767.98px) {
  .container-topbar { padding: .5rem 1rem; }
}
.container-topbar .mod-custom p { margin: 0; text-align: left !important; }
.container-topbar .mod-custom br:first-child { display: none; }
.container-topbar #mod-custom112 br { display: none; }               /* adresse sur une ligne */
.container-topbar #mod-custom112 strong::after { content: " "; }
.container-topbar img { max-height: 40px; width: auto; }
@media (max-width: 575.98px) {
  .container-topbar { justify-content: center; text-align: center; }
  .container-topbar .mod-custom p { text-align: center !important; }
}

/* Logo de l'en-tête : plus compact, s'adapte à la largeur de l'écran */
.container-header .navbar-brand img { max-height: 120px; }
.container-header .navbar-brand { max-width: 100% !important; min-width: 0; }
.container-header .navbar-brand .brand-logo { display: block; max-width: 100%; }
.container-header .navbar-brand img { max-width: 100% !important; width: auto; height: auto !important; }

/* Bandeau de logos (ancien tableau sur une ligne) : passe à la ligne sur petit écran */
.mod-custom table { max-width: 100%; }
.mod-custom table img { max-width: 100%; height: auto; float: none !important; }
@media (max-width: 991.98px) {
  .container-top-a .mod-custom table,
  .container-top-a .mod-custom tbody,
  .container-top-a .mod-custom tr {
    display: flex; flex-wrap: wrap; justify-content: center; align-items: center; gap: 1rem; width: 100%;
  }
  .container-top-a .mod-custom td:empty { display: none; }
  .container-top-a .mod-custom td { flex: 0 1 45%; text-align: center; }
}

/* Anciens contenus à largeurs fixes (tableaux, vidéos, images) : jamais plus larges que l'écran */
.site-grid img, .site-grid table, .site-grid iframe, .site-grid video,
.container-bottom-a img, .container-bottom-b img, .container-topbar img { max-width: 100%; }
.site-grid img { height: auto; }
.site-grid iframe[src*="youtu"] { width: 100%; height: auto; aspect-ratio: 16 / 9; }
@media (max-width: 767.98px) {
  html, body { overflow-x: hidden; }
  .site-grid table { display: block; overflow-x: auto; }
}

/* Images des anciens contenus : ne jamais dépasser la largeur */
.com-content-article__body img,
.mod-custom img { max-width: 100%; height: auto; }
