/*
Theme Name: OSM e brezhoneg
Description: Thème enfant de Twenty Twenty-Five pour www.openstreetmap.bzh. Reprend la mise en page de l'ancien thème Flat : colonne latérale sombre à gauche, contenu sur fond blanc, carte de Bretagne en arrière-plan. Bilingue breton / français avec WPGlobus.
Template: twentytwentyfive
Version: 1.0.2
Requires at least: 6.7
Requires PHP: 8.1
License: GNU General Public License v2 or later
Text Domain: osm-bzh
*/

/* ---------- Fond de page : la carte de Bretagne (réglage de Flat repris) ---------- */
body {
	background: #8db3dd url("assets/images/breizh_bg.png") left top / cover no-repeat fixed;
}

.wp-site-blocks {
	padding: 0;
}

/* ---------- Cadre : colonne latérale + contenu ---------- */
.osm-page {
	display: flex;
	align-items: stretch;
	max-width: 1170px;
	min-height: 100vh;
	margin: 0 auto;
	box-shadow: 0 0 14px rgba(0, 0, 0, 0.3);
}

.osm-page > .osm-barre,
.osm-page > .osm-contenu {
	margin-block-start: 0;
}

.osm-barre {
	flex: 0 0 270px;
	background: #333;
	color: #ccc;
	font-size: 15px;
}

.osm-contenu {
	flex: 1 1 auto;
	min-width: 0;
	background: #fff;
	padding: 2.5rem 3rem 4rem;
}

/* ---------- Colonne latérale ---------- */
.osm-barre a {
	color: #eee;
	text-decoration: none;
}

.osm-barre a:hover,
.osm-barre a:focus {
	color: #fff;
	text-decoration: underline;
}

.osm-barre-entete {
	padding: 2.25rem 1.25rem 1.5rem;
	text-align: center;
	border-bottom: 1px solid #444;
}

.osm-barre .wp-block-site-title {
	margin: 0;
	font-family: var(--wp--preset--font-family--roboto-slab);
	font-size: 30px;
	font-weight: 400;
	line-height: 1.2;
	text-transform: none;
}

.osm-barre .wp-block-site-tagline {
	margin: 0.8rem 0 0;
	color: #999;
	font-size: 11px;
	letter-spacing: 0.05em;
	text-transform: uppercase;
}

/* Sélecteur de langue */
.osm-langues ul {
	display: flex;
	justify-content: center;
	gap: 1.25rem;
	margin: 0;
	padding: 0.6rem 1.25rem;
	list-style: none;
	border-bottom: 1px solid #444;
	font-size: 13px;
}

.osm-langues .actif a {
	color: #fff;
	font-weight: 700;
}

/* Menu : liste des pages */
.osm-barre .osm-menu {
	margin: 0;
}

.osm-menu .wp-block-navigation__container {
	gap: 0;
	width: 100%;
}

.osm-menu .wp-block-navigation-item {
	flex-direction: column;
	align-items: stretch;
	width: 100%;
	border-bottom: 1px solid #444;
}

.osm-menu .wp-block-navigation-item__content {
	display: block;
	box-sizing: border-box;
	width: 100%;
	padding: 0.7rem 1.25rem;
	font-size: 13px;
	font-weight: 700;
	letter-spacing: 0.03em;
	text-transform: uppercase;
}

.osm-menu .current-menu-item > .wp-block-navigation-item__content,
.osm-menu [aria-current="page"] {
	background: #2a2a2a;
	color: #fff;
}

/* Sous-pages toujours visibles, en retrait (comme dans Flat) */
.osm-menu .wp-block-navigation__submenu-icon {
	display: none;
}

.osm-barre .osm-menu .wp-block-navigation__submenu-container {
	position: static;
	width: auto;
	min-width: 0;
	height: auto;
	padding: 0 0 0.4rem;
	border: 0;
	background: transparent;
	opacity: 1;
	visibility: visible;
	overflow: visible;
}

.osm-menu .wp-block-navigation__submenu-container .wp-block-navigation-item {
	border: 0;
}

/* Plus spécifique que la règle du cœur .wp-block-navigation .has-child … > .wp-block-navigation-item__content */
.osm-barre .osm-menu .has-child .wp-block-navigation__submenu-container > .wp-block-navigation-item > .wp-block-navigation-item__content {
	padding: 0.3rem 1.25rem 0.3rem 2.25rem;
	font-weight: 400;
	letter-spacing: 0;
	text-transform: none;
}

/* Menu mobile (plein écran) */
.osm-menu .wp-block-navigation__responsive-container.is-menu-open {
	background: #333;
	color: #eee;
}

.osm-menu .wp-block-navigation__responsive-container-open {
	margin: 0.6rem auto;
	color: #eee;
}

/* Blocs de la colonne (recherche, articles, catégories) */
.osm-widgets {
	padding: 0.25rem 1.25rem 2rem;
}

.osm-barre .osm-widget-titre {
	margin: 1.6rem 0 0.6rem;
	color: #888;
	font-family: inherit;
	font-size: 12px;
	font-weight: 400;
	letter-spacing: 0.05em;
	text-transform: uppercase;
}

.osm-widgets ul {
	margin: 0;
	padding-left: 1.1rem;
}

.osm-widgets li {
	margin: 0.3rem 0;
	font-size: 14px;
	line-height: 1.45;
}

.osm-widgets .wp-block-latest-posts {
	padding-left: 1.1rem;
	list-style: disc;
}

.osm-widgets .wp-block-search__input {
	border: 0;
	border-radius: 2px;
	padding: 0.5rem 0.6rem;
	font-size: 14px;
}

.osm-widgets .wp-block-search__button {
	border: 0;
	background: #3699dc;
	color: #fff;
	padding: 0.4rem 0.6rem;
	margin-left: 0;
}

/* ---------- Contenu ---------- */
.osm-contenu .wp-block-post-title,
.osm-contenu .wp-block-query-title {
	margin-top: 0;
	font-size: clamp(1.9rem, 3vw, 2.6rem);
	text-align: center;
}

.osm-meta {
	color: #888;
	font-size: 13px;
	gap: 0.35rem 1rem;
}

.osm-meta a {
	color: inherit;
}

.osm-liste .wp-block-post {
	padding-bottom: 2rem;
	border-bottom: 1px solid #eee;
}

.osm-liste .wp-block-post-title {
	font-size: 1.6rem;
	text-align: left;
}

.osm-liste .wp-block-post-title a {
	text-decoration: none;
}

.osm-navigation-articles {
	margin-top: 3rem;
	padding-top: 1rem;
	border-top: 1px solid #eee;
	font-size: 14px;
}

/* Anciennes classes d'alignement de l'éditeur classique */
.osm-contenu .alignleft {
	float: left;
	margin: 0.3rem 1.25rem 0.75rem 0;
}

.osm-contenu .alignright {
	float: right;
	margin: 0.3rem 0 0.75rem 1.25rem;
}

.osm-contenu .aligncenter {
	display: block;
	margin-left: auto;
	margin-right: auto;
}

.osm-contenu .wp-block-post-content::after {
	content: "";
	display: table;
	clear: both;
}

.osm-contenu img {
	max-width: 100%;
	height: auto;
}

/* ---------- Écrans étroits : colonne au-dessus, blocs annexes sous le contenu ---------- */
@media (max-width: 900px) {
	.osm-page {
		flex-direction: column;
		box-shadow: none;
	}

	.osm-barre {
		display: contents;
	}

	.osm-barre-entete,
	.osm-langues,
	.osm-barre .osm-menu,
	.osm-widgets {
		background: #333;
	}

	.osm-barre-entete { order: 1; padding: 1.25rem 1rem 1rem; }
	.osm-langues { order: 2; }
	.osm-barre .osm-menu { order: 3; justify-content: center; }
	.osm-contenu { order: 4; padding: 1.75rem 16px 3rem; }
	.osm-widgets { order: 5; padding: 0.5rem 16px 2rem; }

	.osm-barre .wp-block-site-title {
		font-size: 24px;
	}
}

/* ---------- Formulaires Contact Form 7 ---------- */
.wpcf7 label {
	display: block;
	font-size: 14px;
	font-weight: 700;
	letter-spacing: 0.03em;
	color: #34495e;
}

.wpcf7 input[type="text"],
.wpcf7 input[type="email"],
.wpcf7 textarea {
	box-sizing: border-box;
	width: 100%;
	max-width: 560px;
	margin-top: 0.35rem;
	padding: 0.55rem 0.7rem;
	border: 1px solid #ccc;
	border-radius: 3px;
	font: inherit;
	font-weight: 400;
	color: #444;
	background: #fafafa;
}

.wpcf7 textarea {
	height: 10rem;
}

.wpcf7 input:focus,
.wpcf7 textarea:focus {
	border-color: #3699dc;
	outline: 2px solid rgba(54, 153, 220, 0.25);
	background: #fff;
}

.wpcf7 input[type="submit"] {
	padding: 0.6rem 1.6rem;
	border: 0;
	border-radius: 3px;
	background: #3699dc;
	color: #fff;
	font: inherit;
	font-weight: 700;
	cursor: pointer;
}

.wpcf7 input[type="submit"]:hover,
.wpcf7 input[type="submit"]:focus {
	background: #2a80b9;
}

.wpcf7 .wpcf7-not-valid-tip {
	font-size: 13px;
	font-weight: 400;
}

/* ---------- Tableaux des contenus (Lexique…) ---------- */
.osm-contenu table {
	width: 100%;
	border-collapse: collapse;
}

.osm-contenu td,
.osm-contenu th {
	padding: 0.35rem 0.6rem;
	border-bottom: 1px solid #eee;
	vertical-align: top;
}

.osm-contenu td > p,
.osm-contenu th > p {
	margin: 0;
}
