/* Import des Google Fonts */
@import url('https://fonts.googleapis.com/css2?family=Barlow+Condensed:wght@400;500;600;700&display=swap');
@import url('https://fonts.googleapis.com/css2?family=Alegreya:wght@400;500;700&display=swap');
@import url('https://fonts.googleapis.com/css2?family=Cormorant+Garamond:wght@400;500;600&display=swap');
/* Fonts */
html { font-size: 100%; }
body { line-height: 1.6; font-size: 1.15rem; }
h1 { margin: 0; font-family: 'Quintessential'; font-size: 1.6rem; }
h2, h3, legend, h4, h5, h6 { font-family: "Cormorant Garamond", serif;  font-weight: 700; }
h2 { font-family: "Barlow Condensed"; font-size: 2.1rem; font-weight: bold; }
h3, h4 { font-size: 1.8rem; }
p, ul, ol, dl { margin: 5px 0 10px 0; line-height: 1.8rem; }
.resource-title { margin-bottom: 15px; font-family: "Alegreya", Serif; }
#fullscreen-menu a { color: #000; font-size: 2rem; margin: 1rem 0; text-align: center; padding: 8px; text-decoration: none; font-family: "Barlow Condensed", serif; font-weight: 700; text-transform: uppercase;}
.menu-secondaire a { font-family: "Barlow Condensed", serif; font-size: 1.4rem; font-weight: 600;}
.resource-name { font-family: "Alegreya", Serif; }
.fa { font-size: 2rem; }

/* Hack theme */
/* Force la hauteur ajusté à l'écran */
html, body { height: 100%; }
body { min-height: 100vh; display: flex; flex-direction: column; }
#content, main, #wrap { flex: 1 0 auto; background: url('/files/asset/71e4c5fe48085a66e2be77aa6c5bc98a19a27232.jpg');  }
body.menu-open {  overflow: hidden; }

/* icône lien thesaurus externe */
.external-ref { margin-left: .4em; font-size: .9em; opacity: .7; }
.external-ref:hover { opacity: 1; }
#search-form { margin-bottom: 0; }
#primary-nav ul.navigation > li a { text-decoration: none; border-bottom: 0;}
.menu-secondaire { background: ivory; }

/* Affichage du logo */
a.site-title img { max-width: 70px;  margin: 0 20px;   }
header, #menu-toggle-close { height: 100px; border-width: 0 0 4px 0; background-position-x: left !important; background: url(files/asset/bed3ecdaaabdc6ed657a7f23eda100d1c465a20c.png); border-bottom: 5px solid black; color: #FFEDD4; }

/* Divers content */
#content { text-align: justify; text-indent: 15px; padding: 24px; background: url('/files/asset/71e4c5fe48085a66e2be77aa6c5bc98a19a27232.jpg'); color: #200200; }
.content-title { display: inline-flex; flex: 1; padding: 2px 7px; font-size: 1rem; }
.content-title h3, .bulk-export h3 { font-family: "Barlow Condensed"; text-transform: uppercase; font-weight: bold; border-radius: 12px; background: black; color: white; text-indent: 0; padding: 2px 4px; font-size: 1rem; }
.media-list, .resource-values, .bulk-export { border-bottom: dotted #DDD; } 
.resource-values .property { break-inside: avoid; page-break-inside: avoid; column-break-inside: avoid; }
.browse-preview { column-span: all; display: block; width: 100%; margin-top: 2rem; text-align: center; }
/*Menu principal */
nav ul { display: flex; flex-direction: row; gap: 1rem; /* espacement entre liens */ }

/* Overlay plein écran */
#fullscreen-menu { display: none; position: fixed; top: 0; left: 0;   height: 100vh; width: 100%; min-height: 100vh;  background: url('https://patrimoine.mediatheque-lecateau.fr/files/asset/d60036241555b49a131a3f2d42fe85a8c2320df8.jpg'); z-index: 9999;  overflow-y: auto;   -webkit-overflow-scrolling: touch; background-repeat: no-repeat; background-position: center center; background-size: cover; }

.media-embed .resource { margin: 0; padding: 15px 0; border-bottom: dotted; }

/* Bouton menu */
#menu-toggle { background: none; }
#menu-toggle, #menu-toggle-close { cursor: pointer; color: #FFEDD4; margin-left: auto; display: flex; }
#menu-toggle-close { border-bottom: 5px solid black; height: 100px; display: inline-flex; align-items: center; padding: 0 20px; flex: 1; width: 100%; }
#menu-close { display: inline-flex; margin-left: auto; background: none; border: none; font-size: 2rem; color: #FFEDD4;    cursor: pointer; }
/* Bouton déroulant menu principal invisible par défaut */
#primary-nav .sub-nav-toggle {  background-color: white;    color: black;  }
/* état ouvert */
.block-toggle h3, .block-toggle h4 { position: relative; padding-left: 1.2rem; cursor: pointer; }
/* flèche à gauche */
.block-toggle h3::before, .block-toggle h4::before { content: "▶"; position: absolute; left: 0; top: 50%; transform: translateY(-50%) rotate(0deg); transform-origin: 50% 50%; transition: transform 0.3s ease; font-size: 0.7em; color: #333;
}/* rotation quand ouvert */
.block-toggle.open h3::before, .block-toggle.open h4::before { transform: translateY(-50%) rotate(90deg); }

.items-colonnes { /* column-count: 2; */ }
.items-colonnes h2 { /* column-span: all; */ }
.items-colonnes .preview { display: grid; grid-template-columns: 1fr 1fr; grid-auto-rows: minmax(100px, auto); gap: 20px; }
.items-colonnes .preview h4 { padding-top:0; margin-top:0; }
.items-colonnes .preview .resource-meta { overflow: hidden; }
.items-colonnes .preview .thumbnail img { max-height: 160px; }

/* Pied de page */
footer p, footer h4 { float: none; text-align: center; margin: 0; font-size: 0.75em; font-family:'Roboto'; padding: 0; }
footer { margin: 0; padding: 0; clear: both;   background: #2C3E50; min-height: 200px; box-shadow: -2px 0px 5px #111; overflow: hidden; }
#footer_grid { display: inline-grid;justify-content: center; align-content: center; grid-template-columns: 300px 1fr 300px; width: 100%; line-height: 1em; }
footer h4 { display: block;  width: 100%; text-align: center; font-size: 1em; font-family: 'Quintessential'; padding-top: 15px; margin: 0; }
footer #col1, footer #col2, footer #col3 {  display: grid; justify-content: center; align-content: center; text-align: center; }
footer #col2 { margin-top: 10px; }
footer #col2 li { width: 50%; text-align: center; list-style-type: none; display: block; float: right; margin: 8px 0; }
footer img { height: 50px; margin: 10px 20px; }																							   
footer, footer a { color: #D1D1D1; }
footer a:hover { color: #4C9A2A; }

@media screen and (min-width: 769px) {  
#content {  width: 100%; }
#primary-nav ul.navigation {  display: flex; flex-direction: column; }
#content { width: 100%; }
#search { margin: 0; flex: 1; }

/*Menu secondaire */
.menu-secondaire { box-shadow: 2px 2px 2px #000; border-radius: 10px; border: solid 1px #FFF; display: inline-block; }
.menu-secondaire ul { display: flex; list-style: none; }
nav ul, nav ul li { margin: 0; padding: 0; list-style: none; }
nav ul li { border-radius: 10px; box-shadow: 0px 0px 8px rgb(0, 0, 0); }
nav ul li a { text-decoration: none; padding: .5rem 1rem; display: block; }

/* Contenu */
#wrap { max-width: 100%;  }  

/* Accueil */
/* conteneur des blocks */
.site-page .blocks .page-layout-normal {	display: grid; grid-template-columns: 1fr 1fr; column-gap: 3rem; }
/* les blocks à partir du 3e repassent en pleine largeur */
.site-page .blocks .page-layout-normal > .block:nth-child(n+3) { grid-column: 1 / -1; }
/* .site-page .blocks article { display: grid !important; column-gap: 2rem; align-items: start; grid-template-columns: 340px auto; gap: 20px; background: rgba(255, 252, 219, 0.4); border-radius: 20px; max-width: 80%; max-height: 300px; overflow: hidden; margin: 0 auto; border: 1px solid; grid-template-rows: 50px auto; padding: 0 20px 0 0; }
.site-page .blocks article h3, .site-page-expositions .resource h3, .site-page .resource-meta h4 {
  font-family: "Barlow Condensed";   font-size: 1.6rem;   font-weight: bold;   width: 100%;   text-align: center; }
.site-page .blocks article h3  { display: block; margin: 20px 0; }   
.site-page .blocks article img { display: block; object-fit: cover; }
.site-page .blocks article .resource-link { grid-row: 1 / span 2; }
.site-page .blocks article .media-render img { display: block;  object-fit: cover; }
.site-page .blocks article .caption { display: block; line-height: 1.8rem; padding-bottom: 15px; font-size: 1.15rem; } */

.site-page .carousel-block {  max-width: 1200px; margin: 0 auto; }
.site-page .carousel-block h2 { text-align: center; }
.site-page .carousel-block .title { font-family: "Barlow Condensed";   font-size: 1.6rem;   font-weight: bold;   width: 100%;   text-align: center; margin-bottom: 20px; }
.site-page .slick-dotted.slick-slider img {min-width: 400px; max-height: 360px;}
.site-page .slick-dotted.slick-slider { background: rgba(255, 252, 219, 0.4); border: 1px solid #ccc; border-radius: 15px; box-shadow: 0 0 8px 1px lightgray; }
.site-page .slick-dotted.slick-slider .slick-slide > div > div { display: inline-flex !important; align-content: center; align-items: center; height: 100%; padding: 15px; }
.site-page .slick-dots { position: absolute; bottom: 0px; }



/* Expositions */
.liste-expos article { display: grid !important; grid-template-columns: 250px 1fr; grid-template-rows: 50px 200px; column-gap: 1rem; margin-right: 10px; }
.liste-expos article .media-render { grid-column: 1; grid-row: 1 / span 2; 
    display: flex;
    align-items: center;      /* centre verticalement l'image ou la vidéo */
    justify-content: center;  /* centre horizontalement */
    overflow: hidden;         /* cache les parties rognées */
    height: 100%;             /* prend toute la hauteur de la grille */
}
.liste-expos article h3 { grid-column: 2; grid-row: 1; }
.liste-expos article .caption { grid-column: 2; grid-row: 2; padding: 10px; } 

/*Bloc contact pour item */
.contact-toggle {  margin-top: 1.5em; }
.contact-toggle-link { display: inline-flex; align-items: center; gap: 0.5em; font-weight: 600; text-decoration: none;  cursor: pointer; }
.contact-toggle-link i { transition: transform 0.25s ease; }
.contact-content { margin-top: 0.75em; padding-left: 1.5em; border-left: 2px solid #ddd; }

/* Menu en colonne */
#fullscreen-menu .menu-content { height: 100%; display: flex; flex-direction: column; justify-content: center; align-items: center; }
#fullscreen-menu a:hover { text-decoration: underline; }
#content-fullscreen-menu { display: flex; justify-content: center; }

/* Affichage en colonnes du DC */
.resource-values { column-count: 2; column-gap: 2rem; padding: 0; /* important */ }
.resource-values .property:first-child h4 { margin-top: 0; }

/* Toggle des blocs de texte */
.block-toggle > div { display: none; }
.block-toggle.is-open > div { display: block; }
.block-toggle h3, .block-toggle h4 { cursor: pointer; }

} /* fin media query */

@media screen and (max-width: 769px) {  
	#bureau-archives { display: none; }
	#primary-nav ul.navigation { display: flex; flex-direction: column; flex-wrap: wrap;  }
	#menu-toggle-close { background: url('files/asset/bed3ecdaaabdc6ed657a7f23eda100d1c465a20c.png'); }
	nav ul { border-radius: 0; box-shadow: 0px 0px 8px rgb(0, 0, 0); background-color: #EEE; }
	nav ul li { border-radius: 0; box-shadow: none; }
	nav ul li a { text-decoration: none; padding: 0; display: block; }	
	.items-colonnes .preview { display: block; }
	.items-colonnes .preview .resource-meta { height: auto; width: 100%; text-align: center; }
	.items-colonnes .preview .resource-meta h4 { text-indent: 0; }
	.item a.thumbnail, .media-render { width: 100%; text-align: center; text-indent: 0; }
	footer {min-height: 260px; }
	#footer_grid { display: flex; justify-content: center; align-content: center; }
	footer #col1, footer #col2, footer #col3 { justify-content: flex-start; width: 33%; display: flex; flex-direction: column; text-align: center; }														   
}