/********************************************
 * 00 – SOMMAIRE
 * 01 – Header + Menu
 * 02 – Sous-menus (MetisMenu)
 * 03 – Breadcrumbs
 * 04 – Colonnes fixes
 * 05 – Intro Accueil
 * 06 – Listes numérotées
 * 07 – Footer
 * 08 – EngageBox (réservé)
 * 09 – Responsive (réservé)
 ********************************************/


/********************************************
 * 01 – HEADER + MENU
 ********************************************/
.container-header {
  background: linear-gradient(90deg, #2c3e50, #3498db);
  padding: 1em 2em;
  display: flex;
  align-items: center;
  justify-content: space-between;
  border-bottom: 4px solid #2980b9;
}

.container-header .navbar-brand img {
  max-height: 250px;
  width: auto;
}

.container-header .container-nav {
  flex-grow: 1;
  display: flex;
  justify-content: flex-end;
}

.container-header .container-nav ul {
  list-style: none;
  display: flex;
  gap: 1.5em;
  margin: 0;
  padding: 0;
}

.container-header .container-nav ul li a {
  color: #ffffff;
  text-decoration: none;
  font-weight: 500;
}

.container-header .container-nav ul li a:hover {
  color: #ffd700;
}
.header-below-menu {
  width: 100%;
  margin-top: 0.5rem;
}


/********************************************
 * 02 – SOUS-MENUS (MetisMenu)
 ********************************************/
.metismenu.mod-menu .mm-collapse {
  background-color: #2c3e50;
}

.metismenu.mod-menu .mm-collapse .metismenu-item a {
  color: #ffffff !important;
}

.metismenu.mod-menu .mm-collapse .metismenu-item a:hover {
  color: #ffd700 !important;
}


/********************************************
 * 03 – BREADCRUMBS
 ********************************************/
.breadcrumb {
  background: transparent;
  padding: 0.5rem 0;
  margin-bottom: 1rem;
}

.breadcrumb li,
.breadcrumb li a,
.breadcrumb li span {
  color: #ffffff !important;
  font-weight: 500;
}

.breadcrumb li a:hover {
  color: #ffd700 !important;
}

.breadcrumb .divider {
  color: #cccccc !important;
}
/* Style du fil d'Ariane placé dans le header */
.header .mod-breadcrumbs {
    width: 100%;
    max-width: var(--cassiopeia-container-max-width);
    margin-left: auto;
    margin-right: auto;
    padding-left: var(--cassiopeia-grid-gutter);
    padding-right: var(--cassiopeia-grid-gutter);
    margin-top: 0.5rem; /* Ajuste l'espace sous le menu */
}

/* Optionnel : réduire la taille du texte pour plus de discrétion */
.header .mod-breadcrumbs li {
    font-size: 0.9rem;
}


/********************************************
 * 04 – COLONNES FIXES
 ********************************************/



body.wrapper-fluid .site-grid {
  grid-template-columns: [full-start] minmax(0, 1fr)
                         [main-start] repeat(4, minmax(0, 20%))
                         [main-end] minmax(0, 1fr)
                         [full-end] !important;
}
.container-sidebar-left::before,
.container-sidebar-right::before {
    content: "";
    position:absolute;
    left: 0;
    right: 0;
    top: 0;
    bottom: 0;
    background: linear-gradient(180deg, #2c3e50 0%, #3498db 100%);
    z-index: -1;
}

.container-sidebar-left,
.container-sidebar-right {
    min-height: 200px;
    background: linear-gradient(180deg, #2c3e50 0%, #3498db 100%);
    padding: 1.5em;
    border-radius: 8px;
    color: #fff;
  overflow: visible;
}




/********************************************
 * 05 – INTRO ACCUEIL
 ********************************************/
.intro-accueil {
  background: #e6f3ff;
  padding: 2rem;
  border-left: 6px solid #4682b4;
  border-radius: 0.5rem;
  color: #333;
}

.intro-accueil h2,
.intro-accueil h3 {
  color: #2c5e85;
}


/********************************************
 * 06 – LISTES NUMÉROTÉES
 ********************************************/
ol {
  font-size: 32px;
}

ol li::marker {
  font-weight: bold;
}


/********************************************
 * 07 – FOOTER
 ********************************************/
footer.site-footer {
  background-color: #123456;
  height: 100px;
  overflow: hidden;
}


/********************************************
 * 08 – ENGAGEBOX (réservé)
 ********************************************/
/* Styles spécifiques
/* This is my custom CSS loaded with the Add Custom CSS extension. */
/* Le fil d’Ariane doit passer à la ligne */
.container-header .mod-breadcrumbs {
  flex-basis: 100%;   /* force une nouvelle ligne */
  order: 10;          /* sous le menu */
  margin-top: 0.5rem;
}

/* Alignement à gauche */
.container-header .mod-breadcrumbs .breadcrumb {
  margin: 0;
  padding: 0;
  display: inline-flex;
  justify-content: flex-start;
}

/* Fond pleine largeur pour les sidebars, contenu centré */
.container-sidebar-left,
.container-sidebar-right {
    position: relative;
    padding: 1.5rem;
    border-radius: 8px;
    color: #fff;
    min-height: 150px;
    overflow: hidden;
}

.container-sidebar-left::before,
.container-sidebar-right::before {
    content: "";
    position: absolute;
    left: 50%;
    width: 100vw; /* pleine largeur */
    transform: translateX(-50%);
    top: 0;
    bottom: 0;
    background: linear-gradient(180deg, #2c3e50 0%, #3498db 100%);
    z-index: -1;
}
/********************************************
 * 09 – CHRONIQUE
 ********************************************/
/* Bloc global de la chronique */
.fields-container {
  background: #f7f9fc;
  border-left: 6px solid #2c3e50;
  padding: 1.5rem 2rem;
  margin-bottom: 2rem;
  border-radius: 6px;
  list-style: none;
  padding-left: 0;
}

/* Chaque champ */
.field-entry {
  margin-bottom: .8rem;
  display: flex;
  gap: .5rem;
  align-items: baseline;
}

/* Titre secondaire (champ titre_h2) */
.field-entry.titre_h2 .field-value {
  font-size: 1.8rem;
  font-weight: 700;
  color: #2c3e50;
  display: block;
  margin-bottom: .5rem;
}

/* Lieu */
.field-entry.lieu .field-value {
  font-weight: 600;
  color: #3498db;
}

/* Date */
.field-entry.jouretdate .field-value {
  font-style: italic;
  color: #555;
}

/* Intro */
.field-entry.intro .field-value {
  font-size: 1.1rem;
  color: #333;
  margin-top: .5rem;
}
/* --- BOX GLOBALE CHRONIQUE --- */
.fields-container {
  background: linear-gradient(135deg, #2c3e50 0%, #3498db 100%);
  padding: 2rem;
  border-radius: 12px;
  margin-bottom: 2.5rem;
  color: #fff;
  box-shadow: 0 6px 18px rgba(0,0,0,0.15);
  border-left: 10px solid #ffd700;
  list-style: none;
  padding-left: 0;
}

/* --- TITRE PRINCIPAL (champ titre_h2) --- */
.field-entry.titre_h2 .field-value {
  font-size: 2rem;
  font-weight: 800;
  color: #ffd700;
  text-transform: uppercase;
  letter-spacing: 1px;
  margin-bottom: 1rem;
  display: block;
}

/* --- LIEU --- */
.field-entry.lieu .field-value {
  font-size: 1.2rem;
  font-weight: 600;
  color: #ffffff;
  background: rgba(255,255,255,0.15);
  padding: .3rem .8rem;
  border-radius: 6px;
  display: inline-block;
  margin-bottom: .5rem;
}

/* --- DATE --- */
.field-entry.jouretdate .field-value {
  font-size: 1rem;
  font-style: italic;
  opacity: 0.9;
  margin-bottom: 1rem;
  display: block;
}

/* --- INTRO --- */
.field-entry.intro .field-value {
  font-size: 1.15rem;
  line-height: 1.6;
  margin-top: .8rem;
  display: block;
}

/* --- ESPACEMENT ENTRE LES CHAMPS --- */
.field-entry {
  margin-bottom: .8rem;
}
/* Conteneur des trois box */
.popup-boxes {
    display: flex;
    justify-content: space-between;
    gap: 1rem;
    margin: 2rem 0;
}

/* Style des box */
.popup-box {
    flex: 1;
    padding: 1.2rem;
    text-align: center;
    background: #f7f7f7;
    border: 1px solid #ddd;
    border-radius: 6px;
    cursor: pointer;
    transition: 0.3s;
    font-weight: 600;
}

.popup-box:hover {
    background: #eaeaea;
}

/* Responsive mobile */
@media (max-width: 768px) {
    .popup-boxes {
        flex-direction: column;
    }
}
/* Conteneur des trois box */
.popup-boxes {
    display: flex;
    gap: 1rem;
    margin: 2rem 0;
}

/* Style harmonisé avec les champs Chronique */
.popup-box {
    flex: 1;
    padding: 1rem 1.2rem;
    background: #ffffff; /* même fond que les champs */
    border: 1px solid #dcdcdc; /* même bordure légère */
    border-radius: 4px; /* même arrondi que Cassiopeia */
    font-size: 1rem;
    font-weight: 500;
    color: #333;
    text-align: center;
    cursor: pointer;
    transition: background 0.25s, border-color 0.25s;
}

/* Effet hover discret, comme les champs au focus */
.popup-box:hover {
    background: #f5f5f5;
    border-color: #bfbfbf;
}

/* Responsive */
@media (max-width: 768px) {
    .popup-boxes {
        flex-direction: column;
    }
}
/* Par défaut, on cache tout */
.show-if-popup-texte,
.show-if-popup-images,
.show-if-popup-liens {
    display: none;
}

/* Si le champ existe et n'est pas vide, Joomla ajoute .field-entry-[nom] */
.item-page .field-entry-popup-texte ~ .popup-boxes .show-if-popup-texte {
    display: block;
}

.item-page .field-entry-popup-images ~ .popup-boxes .show-if-popup-images {
    display: block;
}

.item-page .field-entry-popup-liens ~ .popup-boxes .show-if-popup-liens {
    display: block;
}
/**************************************
 * CHRONIQUES – Mise en page générale
 **************************************/

.chronique {
    margin: 2.5rem 0;
    padding: 2rem;
    background: #fafafa;
    border-radius: 10px;
    border-left: 6px solid var(--cassiopeia-color-primary);
    box-shadow: 0 2px 8px rgba(0,0,0,0.05);
}

/**************************************
 * TITRE & ACCROCHE
 **************************************/

.chronique-header {
    margin-bottom: 1.5rem;
}

.chronique-titre {
    font-size: 1.9rem;
    margin: 0;
    color: var(--cassiopeia-color-primary);
}

.chronique-soustitre {
    font-size: 1.2rem;
    margin: 0.3rem 0;
    font-style: italic;
    color: #555;
}

.chronique-auteur {
    margin-top: 0.5rem;
    font-weight: 600;
    color: #333;
}

/**************************************
 * METADONNEES
 **************************************/

.chronique-meta {
    margin-bottom: 1.5rem;
    padding: 1rem;
    background: #fff;
    border-radius: 6px;
    border: 1px solid #eee;
}

.chronique-meta > div {
    margin: 0.2rem 0;
    color: #444;
}

/**************************************
 * CONTENU
 **************************************/

.chronique-content {
    margin-bottom: 2rem;
}

.chronique-illustration img {
    width: 100%;
    border-radius: 8px;
    margin-bottom: 1rem;
}

.chronique-description {
    font-size: 1.1rem;
    line-height: 1.6;
    color: #222;
}

/**************************************
 * POPUP AUTOMATIQUE
 **************************************/

.chronique-popup {
    display: none; /* EngageBox gère l’ouverture */
    padding: 1.5rem;
    background: #fff;
    border-radius: 10px;
    border: 2px solid var(--cassiopeia-color-primary);
}

.popup-texte {
    margin-bottom: 1rem;
    font-size: 1.1rem;
}

.popup-images img {
    max-width: 100%;
    border-radius: 6px;
    margin-bottom: 1rem;
}

.popup-liens a {
    display: inline-block;
    padding: 0.5rem 1rem;
    background: var(--cassiopeia-color-primary);
    color: #fff;
    border-radius: 5px;
    text-decoration: none;
}

.popup-liens a:hover {
    background: var(--cassiopeia-color-hover);
}

/**************************************
 * ANCIENS CHAMPS (masqués)
 **************************************/

.chronique-anciens-champs {
    display: none !important;
}
