/*
Theme Name: ODeF Journal Child
Template: odef_articles
Description: Responsive child theme for the Relation et Action journal archive (journal.odef.ch). Replaces the table based header, adds a mobile drawer for the sidebar, fluid media, readable mobile typography and a print stylesheet. Loaded by the parent after its own stylesheets.
Version: 1.0.0
Text Domain: odef-child
License: GNU General Public License v3 or later
License URI: http://www.gnu.org/licenses/gpl-3.0.html
Updated: 2026-11-19 02:35 (Europe/Zurich)
*/

/* ==========================================================================
   Accessibility helpers
   ========================================================================== */

.screen-reader-text {
	position: absolute !important;
	width: 1px;
	height: 1px;
	margin: -1px;
	padding: 0;
	overflow: hidden;
	clip: rect(0 0 0 0);
	white-space: nowrap;
	border: 0;
}
.skip-link:focus {
	position: fixed !important;
	top: 8px;
	left: 8px;
	z-index: 100000;
	width: auto;
	height: auto;
	margin: 0;
	padding: 10px 16px;
	clip: auto;
	background: #ffffff;
	color: #222222;
	font-size: 16px;
	box-shadow: 0 2px 8px rgba(0, 0, 0, 0.3);
}

/* ==========================================================================
   Masthead (replaces the parent table, same colours and image)
   ========================================================================== */

.odef-masthead {
	padding: 22px 12px 20px;
	min-height: 160px;
	background: #7e7e74 url("../odef_articles/images/back_header.gif") left top no-repeat;
	text-align: center;
	box-sizing: border-box;
}
.odef-brand,
.odef-brand:hover,
.odef-brand:focus {
	display: block;
	text-decoration: none;
}
.odef-masthead .title_header,
.odef-masthead .sub_header,
.odef-masthead .sub_header_2 {
	display: block;
	line-height: 1.2;
}
.odef-masthead .sub_header {
	margin-top: 14px;
}
.odef-masthead .sub_header_2 {
	margin-top: 14px;
}
.odef-masthead .sub_header_2 a {
	text-decoration: none;
}
.odef-masthead .sub_header_2 a:hover,
.odef-masthead .sub_header_2 a:focus {
	text-decoration: underline;
}
.odef-tagline {
	padding: 9px 12px;
	background: #9f9c93;
	text-align: center;
	line-height: 1.3;
}

/* ==========================================================================
   Fluid media and long content (all widths)
   ========================================================================== */

.entry-content img,
.entry-summary img,
.widget-area img,
.wp-caption img {
	max-width: 100%;
	height: auto;
}
.wp-caption {
	max-width: 100%;
}
.entry-content iframe,
.entry-content embed,
.entry-content object,
.entry-content video {
	max-width: 100%;
}
.entry-content iframe[src*="youtube"],
.entry-content iframe[src*="youtu.be"],
.entry-content iframe[src*="vimeo"],
.entry-content iframe[src*="dailymotion"] {
	width: 100%;
	height: auto;
	aspect-ratio: 16 / 9;
}
.featured-image {
	max-width: 100%;
	height: auto;
}
.entry-content,
.entry-summary {
	overflow-wrap: break-word;
}

/* Mobile bar and drawer are hidden outside the phone layout */
.odef-menubar,
.odef-menu-close,
.odef-menu-backdrop {
	display: none;
}

/* ==========================================================================
   Tablet (768 to 1023 px): one readable column of home sections
   ========================================================================== */

@media screen and (min-width: 768px) and (max-width: 1023px) {
	#content .section-home.columns {
		float: none;
		width: 100%;
		margin-bottom: 1.5em;
	}
	.odef-masthead .title_header {
		font-size: 38px;
	}
}

/* ==========================================================================
   Phones (up to 767 px)
   ========================================================================== */

@media screen and (max-width: 767px) {

	/* Compact masthead */
	.site-header {
		padding-top: 0;
	}
	.odef-masthead {
		min-height: 0;
		padding: 18px 12px 16px;
	}
	.odef-masthead .title_header {
		font-size: 28px;
		letter-spacing: 0.02em;
	}
	.odef-masthead .sub_header {
		margin-top: 8px;
		font-size: 16px;
	}
	.odef-masthead .sub_header_2,
	.odef-masthead .sub_header_2 a {
		margin-top: 8px;
		font-size: 15px;
	}
	.odef-tagline .sub_title_header {
		font-size: 14px;
	}

	/* Sticky "Menu et recherche" bar (only when JavaScript runs) */
	.js .odef-menubar {
		display: block;
		position: -webkit-sticky;
		position: sticky;
		top: 0;
		z-index: 60;
		background: #7e7e74;
		box-shadow: 0 2px 6px rgba(0, 0, 0, 0.2);
	}
	.odef-menu-toggle {
		display: flex;
		align-items: center;
		gap: 10px;
		width: 100%;
		margin: 0;
		padding: 12px 16px;
		border: 0;
		background: transparent;
		color: #ffffff;
		font-family: Verdana, "Palatino Linotype", "Book Antiqua", Palatino, serif;
		font-size: 15px;
		line-height: 1.2;
		text-align: left;
		cursor: pointer;
	}
	.odef-menu-toggle:focus-visible,
	.odef-menu-close:focus-visible {
		outline: 3px solid #ffffff;
		outline-offset: -3px;
	}
	.odef-menu-icon,
	.odef-menu-icon::before,
	.odef-menu-icon::after {
		display: block;
		width: 20px;
		height: 2px;
		background: currentColor;
	}
	.odef-menu-icon {
		position: relative;
	}
	.odef-menu-icon::before,
	.odef-menu-icon::after {
		content: "";
		position: absolute;
		left: 0;
	}
	.odef-menu-icon::before {
		top: -6px;
	}
	.odef-menu-icon::after {
		top: 6px;
	}

	/* Sidebar becomes an off canvas drawer (closed from first paint: "js" is set in the head) */
	.js #main .widget-area.blog-widgets {
		position: fixed;
		top: 0;
		bottom: 0;
		left: 0 !important;
		right: auto !important;
		z-index: 100001;
		width: 88%;
		max-width: 360px;
		margin: 0;
		padding: 56px 16px 24px;
		overflow-y: auto;
		-webkit-overflow-scrolling: touch;
		background: #ffffff;
		box-shadow: 2px 0 12px rgba(0, 0, 0, 0.3);
		transform: translateX(-105%);
		visibility: hidden;
	}
	/* Animate only once the script is ready, so nothing slides on page load */
	.odef-has-drawer #main .widget-area.blog-widgets {
		transition: transform 0.25s ease, visibility 0s linear 0.25s;
	}
	.odef-menu-open #main .widget-area.blog-widgets {
		transform: none;
		visibility: visible;
		transition: transform 0.25s ease;
	}
	.odef-has-drawer .odef-menu-close {
		display: block;
		position: absolute;
		top: 8px;
		right: 8px;
		width: 44px;
		height: 44px;
		margin: 0;
		padding: 0;
		border: 0;
		background: transparent;
		color: #444444;
		font-size: 32px;
		line-height: 44px;
		cursor: pointer;
	}
	.odef-menu-open .odef-menu-backdrop {
		display: block;
		position: fixed;
		inset: 0;
		z-index: 100000;
		background: rgba(0, 0, 0, 0.45);
	}
	.odef-menu-open,
	.odef-menu-open body {
		overflow: hidden;
	}

	/* Readable text */
	.entry-summary,
	.entry-summary p,
	.section-home .entry-summary {
		font-size: 16px;
		line-height: 1.6;
	}
	.entry-content {
		line-height: 1.65;
	}
	.entry-title {
		line-height: 1.25;
	}

	/* Wide content scrolls inside its own box instead of the page */
	.entry-content table {
		display: block;
		width: auto !important;
		max-width: 100%;
		overflow-x: auto;
	}
	.entry-content pre {
		overflow-x: auto;
	}
	.entry-content .alignleft,
	.entry-content .alignright {
		float: none;
		display: block;
		margin: 0 auto 1em;
	}

	/* Footer */
	#site-info,
	#footer .left {
		float: none !important;
		text-align: center;
	}
	#site-info img {
		display: block;
		max-width: 200px;
		height: auto;
		margin: 0 auto;
	}
	.copyright_footer {
		text-align: center;
		font-size: 14px;
	}
}

/* Logged in editors: Foundation sets body { position: relative }, which pushes the
   absolute admin bar down over the masthead below 601 px; put it back at the top */
@media screen and (max-width: 600px) {
	.admin-bar #wpadminbar {
		top: -46px;
	}
}

/* Admin bar is fixed from 601 px: keep the sticky bar below it */
@media screen and (min-width: 601px) and (max-width: 767px) {
	.admin-bar .odef-menubar {
		top: 46px;
	}
}

@media (prefers-reduced-motion: reduce) {
	.odef-has-drawer #main .widget-area.blog-widgets,
	.odef-menu-open #main .widget-area.blog-widgets {
		transition: none;
	}
}

/* ==========================================================================
   Print (articles only, replaces PrintFriendly)
   ========================================================================== */

@media print {
	#wpadminbar,
	.odef-menubar,
	.odef-menu-backdrop,
	.skip-link,
	.widget-area,
	#footer-widget-area,
	.nav-single,
	.nav-previous,
	.nav-next,
	.printfriendly,
	.pf-button,
	.ssba,
	.ssba-wrap,
	.ssba-classic-2,
	.asl_w_container,
	.comments-area,
	#comments {
		display: none !important;
	}
	body,
	.row-container,
	.site-header,
	#footer {
		background: none !important;
	}
	.odef-masthead,
	.odef-tagline {
		min-height: 0;
		padding: 0 0 6pt;
		background: none !important;
		text-align: left;
	}
	.odef-masthead .title_header,
	.odef-masthead .sub_header,
	.odef-masthead .sub_header_2,
	.odef-masthead .sub_header_2 a,
	.odef-tagline .sub_title_header,
	.copyright_footer {
		color: #000000 !important;
		font-size: 11pt;
	}
	.odef-masthead .title_header {
		font-size: 16pt;
	}
	.odef-tagline {
		display: none;
	}
	#content,
	#content.columns {
		float: none !important;
		width: 100% !important;
		left: 0 !important;
		right: 0 !important;
	}
	body,
	.entry-content {
		font-size: 11pt;
		line-height: 1.5;
		color: #000000;
	}
	a {
		color: #000000 !important;
		text-decoration: underline;
	}
	/* Show where external links lead */
	.entry-content a[href^="http"]:not([href*="journal.odef.ch"])::after {
		content: " (" attr(href) ")";
		font-size: 9pt;
		word-break: break-all;
	}
	.entry-content img {
		max-width: 100% !important;
		page-break-inside: avoid;
	}
	#site-info {
		display: none;
	}
}
