/*
------------------------------------------------
Perm'Educ — responsive.css
------------------------------------------------
*/

@media (max-width: 1200px) {
	.latest-grid { grid-template-columns: repeat(2, 1fr); }
}

/* La barre latérale devient un panneau escamotable */
@media (max-width: 1000px) {
	.pe-sidebar {
		width: 248px;
		transform: translateX(-100%);
		transition: transform .28s ease;
		box-shadow: 0 16px 40px rgba(0,0,0,.15);
	}
	.pe-sidebar.is-open { transform: translateX(0); }

	.pe-nav-toggle { display: inline-flex; align-items: center; justify-content: center; }

	.wp-site-blocks > main,
	.wp-site-blocks > footer { margin-left: 0; }

	/* hero: bandeau image plein cadre */
}

@media (max-width: 900px) {
	.permeduc-method { grid-template-columns: repeat(2, 1fr); row-gap: 40px; }
	.permeduc-method__step { border-left: none !important; padding: 24px; }

	/* Composition « méthode » : la grille restait à 4 colonnes sur mobile. */
	.method-grid { grid-template-columns: repeat(2, 1fr); gap: 24px; }
	.method-card { padding: 24px; }

	/* nook: bandeau image plein cadre */

	section { padding: 64px 24px; }
	.container { width: min(100% - 32px, 1400px); }
}

@media (max-width: 600px) {
	.permeduc-method { grid-template-columns: 1fr; }
	.method-grid { grid-template-columns: 1fr; }
	.latest-grid { grid-template-columns: 1fr; }
}

@media (max-width: 480px) {
	body { font-size: 18px; }
	h1 { font-size: 40px; }
	h2 { font-size: 30px; }
	h3 { font-size: 26px; }
}


/* Bandeaux — mobile : pleine largeur, hauteur proportionnelle */
@media (max-width: 1000px) {
	.permeduc-hero,
	.permeduc-method-band,
	.permeduc-nook-band {
		width: 100%;
		max-width: none;
		max-height: none;
	}
}
@media (max-width: 600px) {
	.permeduc-hero { min-height: 200px; }
	.permeduc-method-band,
	.permeduc-nook-band { min-height: 100px; }
	.permeduc-hero__hit {
		left: 3%;
		bottom: 14%;
		width: 48%;
		height: 40px;
	}
	.permeduc-nook-band {
		min-height: 110px;
	}
}


/* Mobile : bandeaux déjà pleine largeur (plus de décalage sidebar) */
@media (max-width: 1000px) {
	.permeduc-method-band,
	.permeduc-nook-band,
	.wp-site-blocks > footer,
	.site-footer {
		width: 100% !important;
		max-width: 100% !important;
		margin-left: 0 !important;
	}
}


/* Héros 2 colonnes → empilé sur tablette / mobile */
@media (max-width: 900px) {
	.permeduc-hero__inner {
		grid-template-columns: 1fr;
		min-height: 0;
	}
	.permeduc-hero__media {
		min-height: 260px;
		order: -1;
	}
	.permeduc-hero__content {
		max-width: 100%;
		padding: 32px 24px 48px;
	}
}
@media (max-width: 600px) {
	.permeduc-hero__media { min-height: 200px; }
	.permeduc-hero__title { font-size: 36px; }
}


/* Méthode + bandeaux — mobile */
@media (max-width: 900px) {
	.permeduc-method {
		grid-template-columns: 1fr 1fr;
		margin-top: 8px;
		gap: 40px 0;
	}
	.permeduc-method__step + .permeduc-method__step { border-left: none; }
	.permeduc-method__step:nth-child(2) { border-left: 1px solid rgba(127,152,126,.35); }
	.permeduc-method__step:nth-child(4) { border-left: 1px solid rgba(127,152,126,.35); }
	.permeduc-nook-band__content { max-width: 100%; }
}
@media (max-width: 600px) {
	.permeduc-method {
		grid-template-columns: 1fr;
		margin-top: 8px;
	}
	.permeduc-method__step + .permeduc-method__step,
	.permeduc-method__step:nth-child(2),
	.permeduc-method__step:nth-child(4) {
		border-left: none;
		border-top: 1px solid rgba(127,152,126,.3);
		padding-top: 20px;
		margin-top: 8px;
	}
	.permeduc-hero { min-height: 320px; aspect-ratio: auto; }
	.permeduc-nook-band { min-height: 280px; aspect-ratio: auto; }
}

/* ---- Bandeaux photo : le voile doit couvrir toute la colonne de texte ----
   Les deux dégradés sont taillés pour un écran large, où le texte occupe le
   tiers gauche. Sous 900px le contenu prend toute la largeur et débordait de
   la zone voilée : la signature du héros tombait à 2,60:1 et le texte du
   bandeau de clôture à 1,01:1, mesurés sur la photo composée. Le voile
   devient donc vertical et couvre toute la largeur. */
@media (max-width: 900px) {
	.permeduc-hero {
		background-image:
			linear-gradient(180deg,
				rgba(245, 239, 227, .98) 0%,
				rgba(245, 239, 227, .96) 62%,
				rgba(245, 239, 227, .90) 84%,
				rgba(245, 239, 227, .62) 100%),
			url("../images/photos/hero.jpg");
		background-position: center bottom;
	}

	.permeduc-nook-band {
		background-image:
			linear-gradient(180deg,
				rgba(245, 239, 227, .96) 0%,
				rgba(245, 239, 227, .93) 60%,
				rgba(245, 239, 227, .70) 100%),
			url("../images/photos/nook.jpg");
	}

	.permeduc-nook-band__content {
		max-width: 100%;
	}
}
