/*
 * Gîte chez Olga – Pages en blocs Gutenberg.
 *
 * Feuille unique d'Unicon Child pour les contenus en blocs. Chargée sur tout le site
 * après les feuilles Unicon (style.css, shortcodes.css, responsive.css) et dans l'éditeur
 * de blocs (functions.php). Aucune liste de pages : chaque règle est limitée à la classe
 * du bloc Groupe principal de la page.
 *
 * - .olga-accueil                    : page d'accueil
 * - .olga-page                       : base commune des autres pages
 * - .olga-page--<page>               : réglages propres à une page (en plus de .olga-page)
 *
 * Nouvelle page : bloc Groupe principal avec la classe « olga-page » (et, si besoin,
 * « olga-page--<page> » pour ses réglages propres, à ajouter ici).
 * Les styles génériques des composants (carrousel, etc.) restent dans le Kit Gutenberg Pixpel.
 */

/* ==========================================================================
 * Accueil (.olga-accueil)
 * Porté depuis les « User CSS » des options Unicon et les réglages WPBakery de la page 6.
 * ======================================================================= */

/* --------------------------------------------------------------------------
 * Variables et largeur utile (reprend les paliers du .container Unicon)
 * ----------------------------------------------------------------------- */
.olga-accueil {
	--olga-accent: #cc5232;
	--olga-anthracite: #4d4e54;
	--olga-texte: #777777;
	--olga-fond-clair: #f3f3f3;
	--olga-titres: "Oswald", Arial, Helvetica, sans-serif;
	--olga-corps: "Open Sans", Arial, Helvetica, sans-serif;
	--olga-largeur: 1160px;
	font: 400 13px/1.9 var(--olga-corps);
	color: var(--olga-texte);
}

@media (max-width: 1199px) {
	.olga-accueil { --olga-largeur: 920px; }
}

@media (max-width: 959px) {
	.olga-accueil { --olga-largeur: 748px; }
}

@media (max-width: 767px) {
	.olga-accueil { --olga-largeur: 420px; }
}

@media (max-width: 479px) {
	.olga-accueil { --olga-largeur: 300px; }
}

/* Chaque section occupe toute la largeur ; son contenu est centré sur la largeur utile.
 * Sur le site, WordPress ajoute .wp-block-group__inner-container (thème classique sans theme.json) :
 * c'est alors ce conteneur qui est centré ; dans l'éditeur, ce sont les blocs enfants. */
.olga-accueil .olga-section > * {
	box-sizing: border-box;
	max-width: var(--olga-largeur);
	margin-left: auto;
	margin-right: auto;
}

.olga-accueil .olga-section > .alignfull {
	max-width: none;
}

/* --------------------------------------------------------------------------
 * Typographie (reprend les options Unicon pour un rendu identique dans l'éditeur)
 * ----------------------------------------------------------------------- */
.olga-accueil :where(p) {
	margin: 0 0 20px;
}

.olga-accueil :where(h1, h2, h3) {
	margin: 0 0 20px;
	font-family: var(--olga-titres);
	font-weight: 400;
	line-height: 1.5;
	color: var(--olga-accent);
}

.olga-accueil h1 { font-size: 18px; }
.olga-accueil h2 { font-size: 16px; }
.olga-accueil h3 { font-size: 14px; }

.olga-accueil :where(h1, h2) {
	text-align: center;
	text-transform: uppercase;
}

/* Losange sous les titres principaux */
.olga-accueil :where(h1, h2)::after {
	content: "";
	display: block;
	width: 8px;
	height: 8px;
	margin: 11px auto 0;
	background: var(--olga-accent);
	transform: rotate(45deg);
}

.olga-accueil h2.is-style-olga-sans-losange::after,
.olga-accueil .olga-cta h2::after {
	display: none;
}

.olga-accueil a {
	color: var(--olga-accent);
	text-decoration: none;
}

.olga-accueil a:hover,
.olga-accueil a:focus {
	color: var(--olga-anthracite);
}

.olga-accueil :where(figure) {
	margin: 0;
}

.olga-accueil img {
	max-width: 100%;
	height: auto;
}

/* --------------------------------------------------------------------------
 * Boutons (style de bloc « Flèche Olga » + bouton du bandeau contact)
 * ----------------------------------------------------------------------- */
.olga-accueil .wp-block-buttons {
	margin-bottom: 20px;
}

.olga-accueil .wp-block-button__link {
	display: inline-block;
	box-sizing: border-box;
	padding: 15px 25px;
	border: 0;
	border-radius: 2px;
	background: var(--olga-accent);
	color: #fff;
	font: 700 13px/13px var(--olga-titres);
	letter-spacing: 1px;
	text-transform: uppercase;
	text-align: center;
	transition: background-color 0.2s ease;
}

.olga-accueil .wp-block-button__link:hover,
.olga-accueil .wp-block-button__link:focus {
	background: #38393d;
	color: #fff;
}

.olga-accueil .is-style-olga-fleche .wp-block-button__link {
	width: 294px;
	max-width: 100%;
	padding: 14px 20px;
}

.olga-accueil .is-style-olga-fleche .wp-block-button__link::before {
	content: "";
	display: inline-block;
	width: 6px;
	height: 6px;
	margin: 0 10px 1px 0;
	border-top: 2px solid currentColor;
	border-right: 2px solid currentColor;
	transform: rotate(45deg);
	vertical-align: middle;
}

/* --------------------------------------------------------------------------
 * 1. Bandeau d'accueil avec diaporama incliné
 * ----------------------------------------------------------------------- */
.olga-accueil .olga-hero {
	position: relative;
	box-sizing: border-box;
	height: 264px;
	margin: 0 0 200px;
	padding: 0;
}

.olga-accueil .olga-hero .olga-hero__diaporama {
	position: absolute;
	top: 38px;
	left: max(10px, calc((100% - var(--olga-largeur)) / 2 + 30px));
	z-index: 2;
	width: 610px;
	max-width: calc(100% - 38px);
	margin: 0;
	border: 5px solid #fff;
	box-sizing: border-box;
	background: #fff;
	box-shadow: 3px 3px 11px rgba(0, 0, 0, 0.21);
	transform: rotate(-3deg);
	--pk-controls-color: #fff;
	--pk-dot-size: 9px;
}

.olga-accueil .olga-hero__diaporama .pk-carousel__slide img {
	width: 100%;
	height: 396px;
	object-fit: cover;
}

.olga-accueil .olga-hero__diaporama .pk-carousel__dots {
	position: absolute;
	right: 0;
	bottom: 20px;
	left: 0;
	z-index: 2;
	gap: 9px;
	margin: 0;
	/* La rangée couvre toute la largeur du cadre : seuls les points captent les clics (bouton pause accessible). */
	pointer-events: none;
}

.olga-accueil .olga-hero__diaporama .pk-carousel__dot {
	pointer-events: auto;
}

/* Flèches visibles au survol, comme l'original */
.olga-accueil .olga-hero__diaporama .pk-carousel__arrow {
	--pk-arrow-size: 60px;
	background: rgba(0, 0, 0, 0.3);
	opacity: 0;
	transition: opacity 0.3s ease;
}

.olga-accueil .olga-hero__diaporama:hover .pk-carousel__arrow,
.olga-accueil .olga-hero__diaporama .pk-carousel__arrow:focus-visible {
	opacity: 1;
}

.olga-accueil .olga-hero__diaporama .pk-carousel__arrow::before {
	width: 14px;
	height: 14px;
}

/* --------------------------------------------------------------------------
 * 2. Galerie
 * ----------------------------------------------------------------------- */
.olga-accueil .olga-galerie.wp-block-gallery {
	/* L'écart réglé dans l'éditeur (variable posée par WordPress) ; sans theme.json,
	   WordPress ne l'applique pas lui-même au conteneur flex. */
	gap: var(--wp--style--unstable-gallery-gap, 28px);
	padding: 0 14px;
	margin-top: 53px;
	margin-bottom: 44px;
}

.olga-accueil .olga-galerie.wp-block-gallery .wp-block-image img {
	aspect-ratio: 1;
	object-fit: cover;
}

/* --------------------------------------------------------------------------
 * 3. Le gîte en détail
 * ----------------------------------------------------------------------- */
.olga-accueil .olga-colonnes {
	gap: 40px;
	margin-top: 40px;
	margin-bottom: 0;
}

.olga-accueil .olga-etages h3 {
	margin: 0;
	text-transform: uppercase;
}

.olga-accueil .olga-cta {
	margin-top: 39px;
	margin-bottom: 20px;
	padding: 50px 0 30px;
	background-color: #ededed;
	background-size: cover;
	background-position: 50% 50%;
	text-align: center;
}

.olga-accueil .olga-cta h2 {
	margin-bottom: 20px;
}

.olga-accueil .olga-cta p {
	margin-right: 50px;
	margin-left: 50px;
}

.olga-accueil .olga-cta .wp-block-button__link {
	width: 250px;
	max-width: 100%;
}

/* Liste des équipements : icône + libellé */
.olga-accueil .olga-atouts {
	gap: 50px;
	margin-left: 50px;
}

.olga-accueil .olga-atout {
	gap: 0;
	min-height: 56px;
	margin: 0;
	align-items: flex-start;
}

.olga-accueil .olga-atout > .wp-block-image {
	flex: 0 0 50px;
	width: 50px;
	margin: 0;
}

.olga-accueil .olga-atout > .wp-block-image img {
	display: block;
	width: 50px;
	/* Pictogrammes 4/3 (100 x 75) : comme l'original (background-size: 50px), hauteur proportionnelle, calés en haut. */
	height: auto;
}

.olga-accueil .olga-atout > p {
	max-width: 160px;
	margin: 0;
	padding-top: 6px;
	line-height: 17px;
}

/* --------------------------------------------------------------------------
 * 4. À découvrir aux alentours
 * ----------------------------------------------------------------------- */
.olga-accueil .olga-curiosite {
	gap: 19px;
	margin-bottom: 35px;
	flex-wrap: nowrap;
	align-items: flex-start;
}

.olga-accueil .olga-curiosite > .wp-block-image {
	flex: 0 0 24px;
	margin: 0;
}

.olga-accueil .olga-curiosite > .wp-block-image img {
	display: block;
	width: 24px;
	height: 30px;
}

.olga-accueil .olga-curiosite h3 {
	margin: 0 0 5px;
	font-size: 16px;
}

.olga-accueil .olga-curiosite p {
	margin: 0 0 5px;
}

.olga-accueil .olga-curiosite p img {
	width: 25px;
	height: 20px;
	margin-right: 8px;
	vertical-align: middle;
}

.olga-accueil .olga-curiosite .olga-curiosite__infos {
	padding-left: 0;
}

/* --------------------------------------------------------------------------
 * 5. La petite histoire du gîte (ancre #histoire)
 * ----------------------------------------------------------------------- */
.olga-accueil #histoire {
	scroll-margin-top: 90px;
}

.olga-accueil .olga-histoire {
	padding: 20px 0;
}

.olga-accueil .olga-histoire .wp-block-columns {
	gap: 20px;
	margin-bottom: 0;
}

.olga-accueil .olga-histoire .wp-block-image img {
	display: block;
	width: 360px;
}

.olga-accueil .olga-histoire__texte {
	padding-top: 50px;
}

.olga-accueil .olga-histoire__texte p:last-child {
	margin-bottom: 0;
}

/* --------------------------------------------------------------------------
 * 6. Bandeau des partenaires
 * ----------------------------------------------------------------------- */
.olga-accueil .olga-logos {
	overflow-x: clip;
	padding: 20px 0;
	box-shadow: 0 -4px 8px rgba(212, 212, 212, 0.48);
}

.olga-accueil .olga-logos__carrousel {
	--pk-controls-color: #999;
	--pk-arrow-size: 40px;
}

.olga-accueil .olga-logos__carrousel .pk-carousel__slide {
	display: flex;
	align-items: center;
	justify-content: center;
	height: 85px;
}

.olga-accueil .olga-logos__carrousel .pk-carousel__slide img {
	width: auto;
	max-height: 88px;
}

.olga-accueil .olga-logos__carrousel .pk-carousel__arrow--prev { left: -50px; }
.olga-accueil .olga-logos__carrousel .pk-carousel__arrow--next { right: -50px; }

/* --------------------------------------------------------------------------
 * Tablette et mobile (paliers Unicon)
 * ----------------------------------------------------------------------- */
@media (max-width: 1199px) {
	.olga-accueil .olga-logos__carrousel .pk-carousel__arrow--prev { left: -40px; }
	.olga-accueil .olga-logos__carrousel .pk-carousel__arrow--next { right: -40px; }
}

@media (max-width: 959px) {
	.olga-accueil .olga-atouts {
		margin-left: 0;
	}

	.olga-accueil .olga-logos__carrousel {
		--pk-arrow-size: 26px;
	}

	.olga-accueil .olga-logos__carrousel .pk-carousel__arrow--prev { left: -26px; }
	.olga-accueil .olga-logos__carrousel .pk-carousel__arrow--next { right: -26px; }
}

@media (max-width: 781px) {
	/* Les colonnes natives s'empilent sous 782 px : on retrouve l'empilement de l'original. */
	.olga-accueil .olga-colonnes,
	.olga-accueil .olga-histoire .wp-block-columns {
		gap: 20px;
	}

	/* Espacements de l'empilement mobile, relevés sur l'original */
	.olga-accueil .olga-histoire .wp-block-columns {
		gap: 0;
	}

	.olga-accueil .olga-histoire {
		padding-bottom: 60px;
	}

	.olga-accueil .olga-detail .olga-colonnes {
		margin-bottom: 60px;
	}

	.olga-accueil .olga-decouvrir .olga-colonnes {
		gap: 45px;
		margin-bottom: 40px;
	}

	/* Équipements : les deux listes l'une sous l'autre, comme l'original */
	.olga-accueil .olga-atouts {
		gap: 40px;
		margin-bottom: 40px;
		margin-left: 50px;
	}
}

@media (max-width: 767px) {
	.olga-accueil .olga-hero {
		margin-bottom: 100px;
	}

	.olga-accueil .olga-hero .olga-hero__diaporama {
		left: calc((100% - var(--olga-largeur)) / 2);
		width: var(--olga-largeur);
		max-width: none;
	}

	.olga-accueil .olga-hero__diaporama .pk-carousel__slide img {
		height: auto;
		aspect-ratio: 620 / 396;
	}

	.olga-accueil .olga-hero__diaporama .pk-carousel__dots {
		bottom: 10px;
	}

	.olga-accueil .olga-logos {
		padding-bottom: 0;
	}

	/* L'original réduit l'espace sous chaque section sur mobile ; prioritaire sur la marge réglée dans l'éditeur. */
	.olga-accueil .olga-section:not(.olga-histoire, .olga-logos) {
		padding-bottom: 40px !important;
	}

	.olga-accueil .olga-logos__carrousel .pk-carousel__arrow--prev { left: -45px; }
	.olga-accueil .olga-logos__carrousel .pk-carousel__arrow--next { right: -45px; }
}

/* --------------------------------------------------------------------------
 * Éditeur de blocs : le diaporama reste dans le flux pour ne pas recouvrir
 * les sections suivantes (le rendu incliné est visible dans l'aperçu).
 * ----------------------------------------------------------------------- */
.editor-styles-wrapper .olga-accueil .olga-hero {
	height: auto;
	margin-bottom: 40px;
	padding: 24px 0;
}

.editor-styles-wrapper .olga-accueil .olga-hero .olga-hero__diaporama {
	position: relative;
	top: auto;
	left: auto;
	margin: 0 auto;
	transform: none;
}

/* ==========================================================================
 * Base commune des pages (.olga-page)
 * ======================================================================= */

.olga-page {
	--olga-accent: #cc5232;
	--olga-accent-survol: #38393d;
	--olga-texte: #777777;
	--olga-titres: "Oswald", Arial, Helvetica, sans-serif;
	--olga-corps: "Open Sans", Arial, Helvetica, sans-serif;
	font: 400 13px/1.9 var(--olga-corps);
	color: var(--olga-texte);
}

/* WPBakery entourait chaque ligne pleine largeur de 20px (marge des colonnes .vc_col-sm-12)
 * et annulait la marge du dernier élément de chaque colonne. */
.olga-page {
	margin-top: 20px;
	padding-bottom: 20px;
}

/* Enfants directs du groupe racine : dans l'éditeur, ou dans .wp-block-group__inner-container
 * que WordPress ajoute sur le site (thème classique sans theme.json). */
.olga-page > :last-child,
.olga-page > .wp-block-group__inner-container > :last-child,
.olga-page .wp-block-column > :last-child {
	margin-bottom: 0;
}

/* Sur ordinateur, WPBakery ajoutait 20px sous une dernière ligne pleine largeur (hors colonnes). */
@media (min-width: 768px) {
	.olga-page:not(:has(> .wp-block-columns:last-child, > .wp-block-group__inner-container > .wp-block-columns:last-child)) {
		padding-bottom: 40px;
	}
}

/* Sur mobile, WPBakery ne laisse pas d'espace entre le titre de page et les colonnes qui suivent. */
@media (max-width: 767px) {
	.olga-page > h1:has(+ .wp-block-columns),
	.olga-page > .wp-block-group__inner-container > h1:has(+ .wp-block-columns) {
		margin-bottom: 0;
	}
}

/* --------------------------------------------------------------------------
 * Typographie : reprend les options Unicon (identique sur le site, nécessaire dans l'éditeur)
 * ----------------------------------------------------------------------- */
.olga-page :where(p) {
	margin: 0 0 20px;
}

.olga-page :where(h1, h2, h3) {
	margin: 0 0 20px;
	font-family: var(--olga-titres);
	font-weight: 400;
	/* Unicon déclare les titres avec le raccourci « font » : interligne normal */
	line-height: normal;
	color: var(--olga-accent);
}

.olga-page h1 { font-size: 18px; }
.olga-page h2 { font-size: 16px; }
.olga-page h3 { font-size: 14px; }

.olga-page :where(h1, h2) {
	text-align: center;
	text-transform: uppercase;
}

.olga-page :where(h1, h2)::after {
	content: "";
	display: block;
	width: 8px;
	height: 8px;
	margin: 11px auto 0;
	background: var(--olga-accent);
	transform: rotate(45deg);
}

/* Style de bloc « Sans losange » (titres alignés à gauche des tarifs et des mentions légales) */
.olga-page h2.is-style-olga-sans-losange::after {
	display: none;
}

.olga-page a {
	color: var(--olga-accent);
	text-decoration: none;
}

.olga-page a:hover,
.olga-page a:focus {
	color: #4d4e54;
}

/* Unicon pose « .wp-block-image { margin: 32px auto } » */
.olga-page :where(figure) {
	margin: 0;
}

.olga-page img {
	max-width: 100%;
	height: auto;
}

/* --------------------------------------------------------------------------
 * Colonnes : gouttière de 40px et empilement sous 768px, comme les colonnes WPBakery
 * ----------------------------------------------------------------------- */
.olga-page .wp-block-columns {
	gap: 40px;
	margin: 0;
}

@media (min-width: 768px) and (max-width: 781px) {
	.olga-page .wp-block-columns {
		flex-wrap: nowrap !important;
	}

	.olga-page .wp-block-columns > .wp-block-column {
		flex-basis: 0 !important;
		flex-grow: 1;
	}
}

/* --------------------------------------------------------------------------
 * Boutons : reprend le bouton Unicon « large, color-3 »
 * ----------------------------------------------------------------------- */
.olga-page .wp-block-buttons {
	margin: 0 0 20px;
}

.olga-page .wp-block-button__link {
	display: inline-block;
	box-sizing: border-box;
	padding: 15px 25px;
	border: 2px solid var(--olga-accent);
	border-radius: 2px;
	background: var(--olga-accent);
	color: #fff;
	font: 700 13px/13px var(--olga-titres);
	letter-spacing: 1px;
	text-transform: uppercase;
	text-align: center;
	transition: background-color 0.2s ease, border-color 0.2s ease;
}

.olga-page .wp-block-button__link:hover,
.olga-page .wp-block-button__link:focus {
	border-color: var(--olga-accent-survol);
	background: var(--olga-accent-survol);
	color: #fff;
}

/* ==========================================================================
 * Contact (.olga-page--contact)
 * ======================================================================= */

/* WPBakery séparait de 40px le texte et la carte dans la colonne de gauche. */
.olga-page--contact .wp-block-column > .wp-block-image {
	margin-top: 40px;
}

/* Message de Contact Form 7 (validation, envoi réussi, erreur) : Unicon le masque toujours
 * (« .wpcf7-response-output { display: none } »). Il redevient visible une fois la réponse
 * reçue ; Contact Form 7 le garde masqué avant l'envoi (init), pendant (submitting)
 * et lors de la remise à zéro (resetting). */
.olga-page--contact .wpcf7 form:not(.init, .resetting, .submitting) .wpcf7-response-output {
	display: block;
}

/* ==========================================================================
 * Tarifs (.olga-page--tarifs)
 * ======================================================================= */

/* WPBakery séparait de 40px les deux blocs de texte de la colonne de gauche. */
.olga-page--tarifs .olga-tarifs-contact {
	margin-top: 40px;
}

/* Le bouton termine la colonne : pas de marge dessous. */
.olga-page--tarifs .olga-tarifs-contact .wp-block-buttons {
	margin-bottom: 0;
}

/* ==========================================================================
 * Le gîte en photos (.olga-page--le-gite-en-photos)
 * Galerie Unicon « style 2 » : vignettes carrées, 4 colonnes, 28px entre les photos
 * (14px de marge intérieure par vignette), 2 colonnes sous 767px.
 * ======================================================================= */

.olga-page--le-gite-en-photos .olga-galerie.wp-block-gallery {
	/* Écart réglé dans l'éditeur (variable posée par WordPress) ; sans theme.json, le gap de mise en page n'est pas appliqué. */
	gap: var(--wp--style--unstable-gallery-gap, 28px);
	box-sizing: border-box;
	margin: 0;
	padding: 34px 14px 14px;
}

.olga-page--le-gite-en-photos .olga-galerie.wp-block-gallery figure.wp-block-image img {
	aspect-ratio: 1;
	object-fit: cover;
}

/* Unicon passe la galerie sur 2 colonnes sous 767px ; WordPress ne le fait que sous 600px. */
@media (max-width: 767px) {
	.olga-page--le-gite-en-photos .olga-galerie.wp-block-gallery.has-nested-images figure.wp-block-image:not(#individual-image) {
		width: calc(50% - var(--wp--style--unstable-gallery-gap, 28px) / 2);
	}
}

/* ==========================================================================
 * À proximité (.olga-page--a-proximite)
 * Mise en forme .curiosite des options Unicon : repère orange 24x30 à gauche,
 * textes décalés de 44px, pictogrammes 25x20 devant la distance et le lien.
 * ======================================================================= */

/* Sur ordinateur, la liste démarre 25px plus bas (marges des lignes WPBakery). */
.olga-page--a-proximite > h1,
.olga-page--a-proximite > .wp-block-group__inner-container > h1 {
	margin-bottom: 45px;
}

@media (max-width: 767px) {
	.olga-page--a-proximite > h1,
	.olga-page--a-proximite > .wp-block-group__inner-container > h1 {
		margin-bottom: 20px;
	}
}

.olga-page--a-proximite .olga-curiosite {
	gap: 20px;
	margin: 0 0 40px;
	flex-wrap: nowrap;
	align-items: flex-start;
}

.olga-page--a-proximite .olga-curiosite > .wp-block-image {
	flex: 0 0 24px;
	margin: 0;
}

.olga-page--a-proximite .olga-curiosite > .wp-block-image img {
	display: block;
	width: 24px;
	height: 30px;
}

.olga-page--a-proximite .olga-curiosite__infos {
	flex: 1 1 auto;
	min-width: 0;
}

.olga-page--a-proximite .olga-curiosite h3 {
	margin: 0 0 5px;
	font-size: 16px;
}

.olga-page--a-proximite .olga-curiosite p {
	margin: 0 0 5px;
}

.olga-page--a-proximite .olga-curiosite p:last-child {
	margin-bottom: 0;
}

.olga-page--a-proximite .olga-curiosite p img {
	width: 25px;
	height: 20px;
	margin-right: 8px;
	/* Calés en haut de ligne, comme les pictogrammes flottants de l'original */
	vertical-align: top;
}
