/**
 * Style pour le Template "Page sans Titre"
 * Contrôle total de la mise en page avec Gutenberg
 */

/* === MASQUER LE TITRE UNIQUEMENT === */
.qslm-no-title-page h1.entry-title,
.qslm-no-title-article > .entry-title,
.qslm-no-title-page .hero-section .page-title,
body.page-template-page-no-title .entry-header .entry-title {
	display: none !important;
}

/* === CONTENEUR PRINCIPAL === */
.qslm-no-title-page {
	width: 100%;
}

/* === CONTENU PLEINE LARGEUR === */
.qslm-full-width-content {
	width: 100%;
	max-width: 100%;
	margin: 0;
	padding: 0;
}

/* === SUPPORT DES BLOCS GUTENBERG === */

/* Blocs alignés en largeur totale */
.qslm-full-width-content > .alignfull {
	width: 100vw;
	max-width: 100vw;
	margin-left: calc(50% - 50vw);
	margin-right: calc(50% - 50vw);
}

/* Blocs alignés en largeur large */
.qslm-full-width-content > .alignwide {
	width: 90vw;
	margin-left: auto;
	margin-right: auto;
}

/* Blocs standards avec container */
.qslm-full-width-content > *:not(.alignfull):not(.alignwide) {
	max-width: 1200px;
	margin-left: auto;
	margin-right: auto;
	padding-left: 20px;
	padding-right: 20px;
}

/* Exception pour les blocs Stackable avec alignfull */
.qslm-full-width-content > .stk-block.alignfull {
	padding-left: 0;
	padding-right: 0;
}

/* === MARGES DES BLOCS === */

/* Premier bloc sans marge top */
.qslm-full-width-content > *:first-child {
	margin-top: 0 !important;
}

/* Dernier bloc sans marge bottom */
.qslm-full-width-content > *:last-child {
	margin-bottom: 0 !important;
}

/* === ESPACEMENT PAR DÉFAUT === */
.qslm-full-width-content > * + * {
	margin-top: 0;
}

/* === SUPPORT BLOCKSY === */

/* Garder les breadcrumbs visibles */
.qslm-no-title-page .ct-breadcrumbs {
	display: block;
}

/* Masquer la meta de la page */
.qslm-no-title-page .entry-meta {
	display: none;
}

/* Ajuster l'espacement du header si breadcrumbs présents */
.qslm-no-title-page .entry-header {
	margin-bottom: 40px;
}

/* === COMMENTAIRES === */
.qslm-no-title-page #comments {
	max-width: 800px;
	margin: 60px auto 0;
	padding: 0 20px;
}

/* === PAGINATION === */
.qslm-no-title-page .page-links {
	max-width: 800px;
	margin: 40px auto;
	padding: 0 20px;
	text-align: center;
}

.qslm-no-title-page .page-links > * {
	display: inline-block;
	margin: 0 5px;
	padding: 8px 16px;
	background: #f8f9fa;
	border-radius: 5px;
	text-decoration: none;
	transition: all 0.3s ease;
}

.qslm-no-title-page .page-links > *:hover,
.qslm-no-title-page .page-links > .current {
	background: #FFD800;
	color: #000;
}

/* === RESPONSIVE === */

/* Tablette */
@media screen and (max-width: 1023px) {
	.qslm-full-width-content > *:not(.alignfull):not(.alignwide) {
		padding-left: 15px;
		padding-right: 15px;
	}
	
	.qslm-no-title-page #comments {
		padding: 0 15px;
	}
}

/* Mobile */
@media screen and (max-width: 767px) {
	.qslm-full-width-content > .alignwide {
		max-width: 100%;
		padding-left: 0;
		padding-right: 0;
	}
	
	.qslm-full-width-content > *:not(.alignfull):not(.alignwide) {
		padding-left: 16px;
		padding-right: 16px;
	}
	
	.qslm-no-title-page #comments {
		margin-top: 40px;
		padding: 0 16px;
	}
	
	.qslm-no-title-page .page-links {
		margin: 30px auto;
		padding: 0 16px;
	}
}

/* === COMPATIBILITÉ AVEC LES BUILDERS === */

/* Elementor */
.elementor-page .qslm-full-width-content {
	padding: 0;
}

/* Gutenberg Full Site Editing */
.wp-site-blocks .qslm-full-width-content {
	padding: 0;
}

/* === SIDEBAR (si présente) === */
.qslm-no-title-page.has-sidebar {
	display: flex;
	gap: 40px;
	max-width: 1200px;
	margin: 0 auto;
	padding: 40px 20px;
}

.qslm-no-title-page.has-sidebar .qslm-no-title-article {
	flex: 1;
}

.qslm-no-title-page.has-sidebar .sidebar {
	flex: 0 0 300px;
}

@media screen and (max-width: 1023px) {
	.qslm-no-title-page.has-sidebar {
		flex-direction: column;
		padding: 30px 15px;
	}
	
	.qslm-no-title-page.has-sidebar .sidebar {
		flex: 1;
	}
}

/* === MODE IMPRESSION === */
@media print {
	.qslm-no-title-page .page-links,
	.qslm-no-title-page #comments {
		display: none;
	}
	
	.qslm-full-width-content > .alignfull {
		width: 100%;
		margin-left: 0;
		margin-right: 0;
	}
}

/* === ANIMATIONS (optionnel) === */
@media (prefers-reduced-motion: no-preference) {
	.qslm-full-width-content > * {
		animation: qslm-fadeInUp 0.6s ease-out;
	}
	
	@keyframes qslm-fadeInUp {
		from {
			opacity: 0;
			transform: translateY(20px);
		}
		to {
			opacity: 1;
			transform: translateY(0);
		}
	}
}

/* === ACCESSIBILITÉ === */

/* Focus visible pour la navigation au clavier */
.qslm-no-title-page a:focus-visible {
	outline: 3px solid #FFD800;
	outline-offset: 2px;
}

/* Skip link */
.qslm-no-title-page .skip-link {
	position: absolute;
	top: -40px;
	left: 0;
	background: #FFD800;
	color: #000;
	padding: 8px 16px;
	text-decoration: none;
	font-weight: 700;
	z-index: 100;
}

.qslm-no-title-page .skip-link:focus {
	top: 0;
}

/* === UTILITAIRES === */

/* Classe pour forcer le container sur un bloc */
.qslm-force-container {
	max-width: 1200px !important;
	margin-left: auto !important;
	margin-right: auto !important;
	padding-left: 20px !important;
	padding-right: 20px !important;
}

/* Classe pour forcer la pleine largeur */
.qslm-force-full-width {
	width: 100vw !important;
	max-width: 100vw !important;
	margin-left: calc(50% - 50vw) !important;
	margin-right: calc(50% - 50vw) !important;
}

/* === DEBUG (à supprimer en production) === */
/*
.qslm-full-width-content > * {
	outline: 1px dashed red;
}

.qslm-full-width-content > .alignfull {
	outline: 2px solid blue;
}

.qslm-full-width-content > .alignwide {
	outline: 2px solid green;
}
*/

