.resource-link > img {
  width: 150px !important;
  height: 150px !important;
  object-fit: cover;
  display: block;
  margin: 0 auto;
}

/* Conteneur principal en deux colonnes : image à gauche, texte à droite */
.main-with-sidebar.cell.medium-8 {
  display: flex;
  flex-wrap: wrap;         /* autorise le retour à la ligne si l'espace manque */
  gap: 2rem;
  align-items: flex-start;
  width: 100%;
  box-sizing: border-box;
}

/* Bloc image */
.media-embeds {
  flex: 0 0 250px;       
  max-width: 100%;
  box-sizing: border-box;
}

/* Empêche l’image de déborder */
.media-render.file img {
  width: 100%;
  height: auto;
  display: block;
  object-fit: contain;
}

/* Bloc texte (métadonnées) */
.main-with-sidebar.cell.medium-8 dl {
  flex: 1;                 
  min-width: 0;        
  box-sizing: border-box;
  word-wrap: break-word;   
}

/*Pour enlever le nom du média à côté du média dans la description d'un contenu, le nom est souvent "capture d'écran..." donc pas utile*/
.resource-name {
  display: none !important;
}

/* Appliquer uniquement sur la page de facettes, pour que les vignettes s'affichent entièrement et que le titre des sites s'affiche */
body.search-page .resource-list .metadata,
body.search-page .resource-list .value,
body.search-page .resource-list .property {
  display: none;
}

body.search-page .resource-list .resource-title {
  display: block;
  font-weight: bold;
}

/* Mise en page compacte */
body.search-page .resource-list .resource {
  padding: 0.5em 0;
  display: flex;
  align-items: center;
  gap: 1em;
}

/* Vignette entière */
body.search-page .resource-thumbnail img {
  width: auto;
  max-width: 150px;
  height: auto;
  object-fit: contain;
}

/* Changement de la couleur du menu à gauche */
body.vertical-menu header {
background-color: #E5D5B8 !important;
}

.menu .active > a {
background:#E5D5B8 !important;
}

.submenu-toggle::after {
  border-color: #fff rgba(0,0,0,0) rgba(0,0,0,0) !important;
}

.search-form button {
  background-color: rgb(242, 139, 37) !important;
}

body.vertical-menu header .vertical.menu li a, body.vertical-menu header .toc-block > ul li a, body.vertical-menu header .toc-block ul ul li a, .toc-block ul body.vertical-menu header ul li a{
color: #343535 !important;
}

<script>
document.querySelectorAll('.dropdown-toggle').forEach(link => {
  link.addEventListener('click', function(event) {
    event.preventDefault(); // empêche la navigation
  });
});
</script>

/* Personnalisation du thème en beige  */

/* Couleurs générales */
body {
  background-color: #fdfaf4 !important; /* fond très clair */
  color: #2e2e2e; /* texte sombre pour contraste */
}

a,
a:visited {
  color: #c79b53 !important; /* beige doré pour les liens */
}

a:hover {
  color: #a07a3b !important;
}

/* Boutons */
button,
.button,
input[type="submit"] {
  background-color: #e5d5b8 !important;
  color: #2e2e2e !important;
  border: none !important;
}

button:hover,
.button:hover,
input[type="submit"]:hover {
  background-color: #d6c2a4 !important;
}

/* Encadrés, menus, titres de sections */
header,
footer,
nav,
.vertical.menu {
  background-color: #E5D5B8 !important;
  color: #2e2e2e !important;
}

/* Encadré actif dans le menu */
.menu .active > a {
  background: #d6c2a4 !important;
}

/* Résultats de recherche – contour des vignettes */
body.search-page .resource-list .resource {
  border: 1px solid #e5d5b8 !important;
  background-color: #fcf9f2 !important;
}

footer {
  background-color: #ffffff !important; /* fond blanc */
  color: #2e2e2e !important;            /* texte sombre pour contraste */
}

/* Barre verticale gauche (sidebar) en beige jusqu'en bas */
body.vertical-menu {
  background-color: #E5D5B8 !important;
}

/* Boutons Précédent / Suivant */
/* Style des liens "Préc." et "Suivant" */
.site-page-pagination a {
  background-color: #f28b25 !important;  /* orange */
  color: #ffffff !important;             /* texte blanc */
  padding: 0.5em 1em;
  margin: 0 0.25em;
  border-radius: 4px;
  text-decoration: none;
  display: inline-block;
  font-weight: bold;
}

/* Effet au survol */
.site-page-pagination a:hover {
  background-color: #d9761f !important;  /* orange plus foncé */
  color: #ffffff !important;
}

/* Supprime le fond beige du fil d'Ariane */
nav.breadcrumbs,
ul.breadcrumbs {
  background-color: transparent !important;
  box-shadow: none !important;
  border: none !important;
}

/* Mets les boutons à côté des éléments du menu déroulant dans la barre de navigation en beige */
/* Cible le marqueur à gauche du lien actif dans le sous-menu */
li.active.is-submenu-item.is-accordion-submenu-item a::before {
  background-color: #E5D5B8 !important;
  border-left: 8px solid #E5D5B8 !important;
  content: "";
  display: inline-block;
  height: 100%;
  position: absolute;
  left: 0;
  top: 0;
  width: 8px;
}

/* Bouton "Accéder à la page Parcourir" */
.btn-parcourir {
  background-color: #f28b25 !important;  /* orange */
  color: #ffffff !important;             /* texte blanc */
  padding: 0.5em 1em;
  margin: 0 auto;
  border-radius: 4px;
  text-decoration: none;
  display: inline-block;
  font-weight: bold;
  transition: background-color 0.3s ease;
}

.btn-parcourir:hover {
  background-color: #d9761c !important;
}

/* Création classes pour blocs de la page Bienvenue */
.homebloc {flex: 1 1 45%; padding: 1.5em; border-radius: 12px; box-shadow: 0 2px 8px rgba(0,0,0,0.05);}

.fondbeige {background-color: #E5D5B8;}
.fondorange{background-color: #F28B25;}
.fondorangefonce{background-color: #E06100;}
.fondgris{background-color: #343535;}

.colorblanc{color: white;}
.colorgris{color: #343535;}
.colorbeige{color: #E5D5B8;}
.colororange{color: #E06100;}

.titreorangegras{font-weight: bold; color: rgb(242, 139, 37);}

.boutonparcourir {
  display: block;            /* pour que margin auto fonctionne */
  width: fit-content;        /* largeur selon le contenu */
  background-color: #343535;
  color: #ffffff;
  text-decoration: none;
  padding: 0.75em 1.5em;
  border-radius: 6px;
  font-size: 1.1em;
  font-weight: bold;
  box-shadow: 0 2px 6px rgba(0,0,0,0.2);
  transition: background-color 0.3s ease;
  margin: 3em auto 0 auto;   /* top auto bottom */
}

.boutonparcourir:hover {
  background-color: #1f1f1f; /* couleur plus foncée au survol */
}

.cadrebeige{margin-top: 3em; background: #E5D5B8; padding: 1.5em; border-radius: 10px; border-left: 5px solid #F28B25; font-size: 1.1em;}

.centrertexte{text-align: center;}

.cartevignette {
  flex: 1 1 180px;  
  max-width: 180px;
  box-shadow: 0 2px 8px rgba(0,0,0,0.1);
  border-radius: 10px;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  width: 180px
  height: auto;  
}

.cartevignette .image-container {
  width: 100%;
  height: 280px;
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  background: #f0f0f0;
}


.cartevignette img {
  max-width: 100%;
  max-height: 100%;
  object-fit: contain;
  display: block;
}

.titrevignette {
  padding: 1.5em 1em;
  background-color: #F28B25;
  color: white !important;
  font-weight: bold;
  border-radius: 0 0 10px 10px;
  text-decoration: none;
  display: flex; /* Pour centrer verticalement le texte */
  align-items: center;
  justify-content: center; 
  flex-grow: 1;
  min-height: 110px; 
  box-sizing: border-box;
  width: 100%;
  word-wrap: break-word; /* Coupe les mots longs qui dépassent */
   white-space: normal; 
}

.titrevignette a {
  color: white !important;
  text-decoration: none;
  display: flex;
  text-align: center;
  height: 100%;
  width: 100%; 
  overflow-wrap: break-word;
  word-break: break-word;
  align-items: center;
   justify-content: center;
}

    .conteneur-principal {
        max-width: 1000px;
        margin: auto;
        padding: 2em;
        font-family: 'Segoe UI', Roboto, sans-serif;
        line-height: 1.6;
        color: #343535;
    }

    .message-central {
        margin-bottom: 2em;
    }

    .texte-intro {
        font-size: 1.2em;
    }

#vignettes-sur-la-meme-ligne {display: flex; flex-wrap: wrap; gap: 1em; justify-content: center; margin-top: 2em; max-width: 1000px; margin-left: auto; margin-right: auto;}

.apropos {
    max-width: 1000px;
    margin: 4em auto 2em;
    font-family: 'Segoe UI', Roboto, sans-serif;
}

.titregris {
    color: #343535;
    margin-bottom: 1.5em;
}

.field-meta label, .field-meta .label {
background-color: #E5D5B8 !important;
}
