/*
Theme Name:   Pro
Description:  Thème enfant de GeneratePress pour le site privé Pro : charte Pierre et or, menu latéral des modules et onglets en bas de page.
Author:       [Votre nom]
Template:     generatepress
Version:      0.3.3
Requires at least: 6.4
Requires PHP: 8.0
Text Domain:  pro
*/

/* ============ Charte « Pierre et or » ============
   Les couleurs viennent de la palette globale de GeneratePress
   (Personnaliser › Couleurs) : la charte en est la valeur par défaut,
   et toute modification faite dans la personnalisation s'applique aussi
   à l'en-tête, au menu des modules et aux onglets.
   La largeur reprend « Largeur du conteneur » (Personnaliser › Mise en page). */
:root {
	--oe-fond: var(--base-2, #F6F3EE);
	--oe-texte: var(--contrast, #2F2F2F);
	--oe-principale: var(--contrast-2, #707070);
	--oe-or-fonce: var(--contrast-3, #8A6A2F);
	--oe-surface: var(--base, #EDE8DF);
	--oe-accent: var(--accent, #CA9B52);
	--oe-sur-principale: var(--base-3, #FFFFFF);
	--oe-trait: #DDD5C8;
	--oe-voile: rgba(47, 47, 47, 0.45);
	--oe-titres: 'Josefin Sans', Arial, sans-serif;
	--oe-corps: 'Lora', Georgia, serif;
	--oe-rayon: 6px;
	--oe-colonne: 1200px; /* remplacé par la largeur du conteneur réglée dans la personnalisation */
}

:focus-visible { outline: 2px solid var(--oe-or-fonce); outline-offset: 2px; }
h1, h2, h3, h4, h5, h6 { text-transform: none; }


/* Coins arrondis de la charte sur les boutons et champs (les couleurs restent celles de la personnalisation) */
button, .button, input[type="submit"], input[type="button"], .wp-block-button__link,
input[type="text"], input[type="email"], input[type="password"], input[type="search"],
input[type="number"], input[type="date"], select, textarea { border-radius: var(--oe-rayon); }
button, .button, input[type="submit"], input[type="button"], .wp-block-button__link { min-height: 44px; }
input[type="text"], input[type="email"], input[type="password"], input[type="search"],
input[type="number"], input[type="date"], select { min-height: 46px; }

/* Tableaux (GeneratePress ne les règle pas) */
.entry-content table { border-collapse: collapse; width: 100%; border: none; }
.entry-content th { background: var(--oe-principale); color: var(--oe-sur-principale); text-align: left; }
.entry-content th, .entry-content td { padding: 10px 14px; border: none; }
.entry-content tbody tr:nth-child(even) { background: var(--oe-surface); }
.entry-content tr.oe-important td { background: var(--oe-accent); color: var(--oe-texte); }

/* Classes utilitaires pour les pages */
.oe-carte { padding: 14px 16px; background: var(--oe-surface); border-radius: var(--oe-rayon); }
.oe-alerte { padding: 14px 16px; background: var(--oe-accent); color: var(--oe-texte); border-radius: var(--oe-rayon); }
.oe-alerte a { color: var(--oe-texte); font-weight: 600; }
.oe-bouton {
	display: inline-flex;
	align-items: center;
	min-height: 44px;
	padding: 0 16px;
	border-radius: var(--oe-rayon);
	background: var(--oe-accent);
	color: var(--oe-texte);
	font-weight: 700;
	text-decoration: none;
}
.oe-bouton--contour { background: transparent; border: 1px solid var(--oe-principale); }

/* ============ Image mise en avant des articles ============
   L'image et l'en-tête de l'article (titre, date) sont côte à côte,
   centrés verticalement l'un par rapport à l'autre ; le contenu
   commence dessous, sur toute la largeur. */
.single article.has-post-thumbnail .inside-article {
	display: grid;
	grid-template-columns: 200px minmax(0, 1fr);
	column-gap: 30px;
	row-gap: 0;
}
.single article.has-post-thumbnail .inside-article > * { grid-column: 1 / -1; }
.single article.has-post-thumbnail .featured-image.page-header-image-single {
	grid-column: 1;
	grid-row: 1;
	align-self: center;
	margin: 0;
	padding: 0;
}
.single article.has-post-thumbnail .entry-header {
	grid-column: 2;
	grid-row: 1;
	align-self: center;
	margin: 0;
}
.single .featured-image.page-header-image-single img {
	display: block;
	max-width: 100%;
	height: auto;
	border-radius: 10px;
}
/* Sur téléphone : vignette plus petite pour laisser de la place au titre. */
@media (max-width: 600px) {
	.single article.has-post-thumbnail .inside-article {
		grid-template-columns: 110px minmax(0, 1fr);
		column-gap: 16px;
	}
}

/* ============ En-tête collant ============ */
.oe-entete {
	position: sticky;
	top: 0;
	z-index: 50;
	background: var(--oe-fond);
	border-bottom: 1px solid var(--oe-trait);
}
.admin-bar .oe-entete { top: 32px; }
.oe-entete__inner {
	max-width: var(--oe-colonne);
	margin: 0 auto;
	padding: 12px 16px;
	display: flex;
	align-items: center;
	gap: 12px;
}
.oe-entete__titres { flex: 1; min-width: 0; }
.oe-entete__titre {
	margin: 0;
	font-family: var(--oe-titres);
	font-weight: 700;
	line-height: 1.1;
	overflow-wrap: anywhere;
}
/* Couleur : « Titre du site » dans Personnaliser › Couleurs (règle .main-title a de GeneratePress) */
:where(.oe-entete__titre) a { color: var(--oe-principale); text-decoration: none; }
.oe-entete__sous-titre { margin: 4px 0 0; font-size: 14px; }
.oe-icone-bouton {
	width: 44px;
	height: 44px;
	min-height: 44px;
	flex: none;
	display: grid;
	place-items: center;
	padding: 0;
	border: 1px solid var(--oe-principale);
	border-radius: var(--oe-rayon);
	background: var(--oe-surface);
	color: var(--oe-texte);
}
.oe-icone-bouton:hover { background: var(--oe-surface); color: var(--oe-texte); filter: none; }
.oe-logo { flex: none; display: flex; align-items: center; max-width: 45%; }
/* Largeur : « Largeur du logo » de la personnalisation ; à défaut, 40 px de haut. */
.oe-logo__image {
	display: block;
	width: var(--oe-logo-largeur, auto);
	height: auto;
	max-width: 100%;
}
.oe-tiroir__tete .oe-logo__image { width: auto; height: auto; max-width: 140px; max-height: 44px; }

/* ============ Menu latéral des modules ============ */
.oe-tiroir { position: fixed; inset: 0; z-index: 100; visibility: hidden; }
.oe-tiroir.est-ouvert { visibility: visible; }
.oe-tiroir__voile {
	position: absolute;
	inset: 0;
	width: 100%;
	height: 100%;
	min-height: 0;
	padding: 0;
	border: none;
	border-radius: 0;
	background: var(--oe-voile);
	opacity: 0;
	transition: opacity .2s;
}
.oe-tiroir__voile:hover { background: var(--oe-voile); filter: none; }
.oe-tiroir.est-ouvert .oe-tiroir__voile { opacity: 1; }
.oe-tiroir__panneau {
	position: absolute;
	top: 0;
	bottom: 0;
	left: 0;
	width: 300px;
	max-width: 86vw;
	background: var(--oe-fond);
	display: flex;
	flex-direction: column;
	overflow-y: auto;
	transform: translateX(-100%);
	transition: transform .2s;
}
.oe-tiroir.est-ouvert .oe-tiroir__panneau { transform: none; }
@media (prefers-reduced-motion: reduce) {
	.oe-tiroir__voile, .oe-tiroir__panneau { transition: none; }
}
.oe-tiroir__tete {
	display: flex;
	align-items: center;
	gap: 12px;
	padding: 14px 16px;
	border-bottom: 1px solid var(--oe-trait);
}
.oe-tiroir__nom { flex: 1; font-family: var(--oe-titres); font-weight: 700; font-size: 18px; color: var(--oe-principale); }
.oe-tiroir__fermer { border: none; background: transparent; }
.oe-tiroir__fermer:hover { background: var(--oe-surface); }
.oe-modules { list-style: none; margin: 0; padding: 8px; display: flex; flex-direction: column; }
.oe-module {
	display: flex;
	align-items: center;
	gap: 12px;
	padding: 10px 12px;
	border-radius: var(--oe-rayon);
	color: var(--oe-texte);
	text-decoration: none;
}
.oe-module:hover, .oe-module[aria-current="page"] { background: var(--oe-surface); color: var(--oe-texte); }
.oe-module svg { flex: none; color: var(--oe-or-fonce); }
.oe-module__texte { display: flex; flex-direction: column; }
.oe-module__nom { font-family: var(--oe-titres); font-weight: 700; }
.oe-module__resume { font-size: 13px; }
.oe-tiroir__pied {
	margin-top: auto;
	padding: 14px 16px;
	border-top: 1px solid var(--oe-trait);
	display: flex;
	flex-direction: column;
	gap: 10px;
	font-size: 14px;
}
.oe-tiroir__actions { display: flex; flex-wrap: wrap; gap: 8px; }
.oe-tiroir__actions a {
	display: inline-flex;
	align-items: center;
	min-height: 40px;
	padding: 0 12px;
	border: 1px solid var(--oe-principale);
	border-radius: var(--oe-rayon);
	color: var(--oe-texte);
	text-decoration: none;
}
body.oe-menu-ouvert { overflow: hidden; }

/* ============ Onglets du module, en bas ============ */
.oe-onglets {
	position: fixed;
	left: 0;
	right: 0;
	bottom: 0;
	z-index: 40;
	background: var(--oe-fond);
	border-top: 1px solid var(--oe-trait);
	padding-bottom: env(safe-area-inset-bottom, 0px);
}
.oe-onglets__inner {
	max-width: var(--oe-colonne);
	margin: 0 auto;
	padding: 8px 16px;
	display: grid;
	grid-auto-columns: minmax(0, 1fr);
	grid-auto-flow: column;
	gap: 8px;
}
.oe-onglet {
	display: grid;
	place-items: center;
	min-height: 48px;
	padding: 0 6px;
	border-radius: var(--oe-rayon);
	color: var(--oe-texte);
	text-align: center;
	text-decoration: none;
	font-family: var(--oe-titres);
	font-weight: 600;
	line-height: 1.2;
}
.oe-onglet:hover { background: var(--oe-surface); color: var(--oe-texte); }
.oe-onglet[aria-current="page"] { background: var(--oe-principale); color: var(--oe-sur-principale); font-weight: 700; }
body.oe-avec-onglets .site-footer { padding-bottom: 72px; }

/* ============ Page de connexion (wp-login.php) ============ */
body.login { background: var(--oe-fond); font-family: var(--oe-corps); }
.login form { background: var(--oe-surface); border: none; border-radius: var(--oe-rayon); box-shadow: none; }
.login label { font-family: var(--oe-titres); font-weight: 600; color: var(--oe-texte); }
.login .button-primary {
	background: var(--oe-accent) !important;
	border: none !important;
	color: var(--oe-texte) !important;
	font-family: var(--oe-titres);
	font-weight: 700;
	text-shadow: none;
	box-shadow: none;
	min-height: 44px;
	border-radius: var(--oe-rayon);
}
.login #nav a, .login #backtoblog a { color: var(--oe-or-fonce) !important; }
.login .message, .login .notice, .login #login_error { border-left-color: var(--oe-or-fonce); box-shadow: none; border-radius: var(--oe-rayon); }
.login h1 a {
	background-image: var(--oe-logo-connexion, none);
	background-size: contain;
	background-position: center;
	width: var(--oe-logo-connexion-l, 80px);
	height: var(--oe-logo-connexion-h, 80px);
	max-width: 100%;
}
.oe-connexion-titre { text-align: center; font-family: var(--oe-titres); font-weight: 700; font-size: 24px; color: var(--oe-principale); margin: 8px 0 4px; }
.oe-connexion-sous-titre { text-align: center; margin: 0 0 16px; color: var(--oe-texte); }
.oe-connexion-note { max-width: 320px; margin: 16px auto 0; font-size: 14px; text-align: center; color: var(--oe-texte); }
