/**
 * UT Ad Manager — Habillage publicitaire (frontend)
 * Version: 1.0.0
 *
 * Breakpoints :
 * - < 1240px  : habillage masqué (tablette & mobile)
 * - ≥ 1240px  : arche visible
 * - ≥ 1700px  : arche + bandes latérales visibles
 */

/* ========================================
   BASE — masqué par défaut
   ======================================== */
.ut-adm-adwrap {
	display: none;
}

/* ========================================
   DESKTOP ≥ 1240px — arche + fond blanc
   ======================================== */
@media (min-width: 1240px) {

	/*
	 * COUPLAGE ASTRA — Ces sélecteurs ciblent les classes du thème Astra.
	 * Si le thème parent change, ces règles devront être adaptées.
	 * Le z-index 1 place le contenu au-dessus des bandes latérales (z-index 0).
	 * Les modales et overlays (cookies, lightbox) doivent utiliser z-index ≥ 100.
	 */

	/* Contenu du site — fond blanc par-dessus les bandes. */
	body.ut-adm-has-adwrap #page,
	body.ut-adm-has-adwrap .ast-container,
	body.ut-adm-has-adwrap .site-content,
	body.ut-adm-has-adwrap .ast-primary-header-bar,
	body.ut-adm-has-adwrap .ast-above-header-bar,
	body.ut-adm-has-adwrap .site-header,
	body.ut-adm-has-adwrap .site-footer {
		position: relative;
		z-index: 1;
		background-color: #fff;
	}

	/* Arche visible. */
	.ut-adm-adwrap {
		display: block;
	}

	.ut-adm-adwrap__arch {
		display: block;
		text-align: center;
		line-height: 0;
		position: relative;
		z-index: 2;
	}

	.ut-adm-adwrap__arch a {
		display: inline-block;
		line-height: 0;
	}

	.ut-adm-adwrap__arch img {
		display: block;
		max-width: 1240px;
		width: 100%;
		height: auto;
		margin: 0 auto;
	}

	/* Bandes : masquées entre 1240 et 1699px. */
	.ut-adm-adwrap__side {
		display: none;
	}

}

/* ========================================
   BANDES LATÉRALES — visible ≥ 1700px
   ======================================== */
@media (min-width: 1700px) {

	.ut-adm-adwrap__side {
		display: block;
		position: fixed;
		top: 0;
		z-index: 0;
		line-height: 0;
		cursor: pointer;
		transition: opacity 0.3s ease, visibility 0.3s ease;
	}

	.ut-adm-adwrap__side img {
		display: block;
		width: 150px;
		height: auto;
	}

	/* Bande gauche : collée au bord gauche de la zone visible */
	.ut-adm-adwrap__side--left {
		left: 0;
	}

	/* Bande droite : collée au bord droit de la zone visible */
	.ut-adm-adwrap__side--right {
		right: 0;
	}

	/* ====================================
	   SCROLL STATE — masqué après le fold
	   ==================================== */
	.ut-adm-adwrap__side.is-scrolled-past {
		visibility: hidden;
		opacity: 0;
		pointer-events: none;
	}

}
