/* ===========================================================
   AR Dark Mode — mode nuit pour tout le site
   Approche : on ne touche jamais aux photos/vidéos (elles gardent
   leurs vraies couleurs), on assombrit uniquement les fonds et
   le texte du site autour, y compris les sections Elementor qui
   ont une couleur de fond définie en ligne (via une règle générique
   qui cible tout style inline contenant "background").
   =========================================================== */

html {
	transition: background-color 0.35s ease;
}

/* Fond et texte de base */
html.ar-dark-mode,
html.ar-dark-mode body {
	background-color: #1e1a15 !important;
	color: #e9ddd0 !important;
}

/* Titres et texte, même quand Elementor leur donne une couleur en ligne */
html.ar-dark-mode h1,
html.ar-dark-mode h2,
html.ar-dark-mode h3,
html.ar-dark-mode h4,
html.ar-dark-mode h5,
html.ar-dark-mode h6,
html.ar-dark-mode p,
html.ar-dark-mode li,
html.ar-dark-mode span:not(.dashicons):not([class*="icon"]),
html.ar-dark-mode label {
	color: #e9ddd0 !important;
}

/* Liens : garde une teinte chaude cohérente avec la marque */
html.ar-dark-mode a {
	color: #e3a672 !important;
}
html.ar-dark-mode a:hover {
	color: #f0c199 !important;
}

/* En-tête et pied de page (structure Astra) */
html.ar-dark-mode .site-header,
html.ar-dark-mode .ast-header-break-point,
html.ar-dark-mode .site-footer,
html.ar-dark-mode .ast-footer-overlay,
html.ar-dark-mode .main-header-bar,
html.ar-dark-mode .main-header-bar-navigation {
	background-color: #1e1a15 !important;
	border-color: rgba(255, 255, 255, 0.08) !important;
}

/* Catch-all : toute section/élément Elementor avec une couleur de fond
   définie en ligne (le cas le plus fréquent sur ce site) est ramené
   à un fond sombre neutre cohérent avec la marque. */
html.ar-dark-mode [style*="background-color"],
html.ar-dark-mode [style*="background:"] {
	background-color: #26201a !important;
	background-image: none !important;
}

/* Sauf les éléments qui contiennent une image de fond (hero, bannières) :
   on ne veut pas casser ces visuels, seulement les blocs de texte/couleur unie. */
html.ar-dark-mode [style*="background-image"] {
	background-color: transparent !important;
}

/* Cartes produits, boutons, formulaires */
html.ar-dark-mode ul.products li.product,
html.ar-dark-mode .woocommerce ul.products li.product,
html.ar-dark-mode .elementor-widget-container,
html.ar-dark-mode input,
html.ar-dark-mode textarea,
html.ar-dark-mode select {
	background-color: #26201a !important;
	color: #e9ddd0 !important;
	border-color: rgba(255, 255, 255, 0.12) !important;
}

html.ar-dark-mode .button,
html.ar-dark-mode .woocommerce a.button,
html.ar-dark-mode .woocommerce button.button,
html.ar-dark-mode .elementor-button {
	background-color: #a0522d !important;
	color: #fff !important;
	border-color: #a0522d !important;
}

/* Photos, vidéos, logo, icônes : ne JAMAIS toucher — restent en couleurs réelles */
html.ar-dark-mode img,
html.ar-dark-mode video,
html.ar-dark-mode iframe,
html.ar-dark-mode svg {
	filter: none !important;
}

/* -----------------------------------------------------------
   Bouton bascule jour/nuit
   ----------------------------------------------------------- */

#ar-theme-toggle {
	position: fixed;
	bottom: 24px;
	right: 24px;
	z-index: 999999;
	height: 48px;
	padding: 0 18px 0 14px;
	border-radius: 24px;
	background: #3a2e28;
	color: #fff;
	border: none;
	cursor: pointer;
	display: flex;
	align-items: center;
	gap: 8px;
	box-shadow: 0 4px 14px rgba(0, 0, 0, 0.25);
	font-size: 14px;
	font-weight: 600;
	white-space: nowrap;
	transition: transform 0.25s ease, background-color 0.25s ease;
}

#ar-theme-toggle:hover {
	transform: scale(1.05);
}

#ar-theme-toggle svg {
	width: 20px;
	height: 20px;
	flex-shrink: 0;
}

html.ar-dark-mode #ar-theme-toggle {
	background: #a0522d;
}

@media (max-width: 600px) {
	#ar-theme-toggle {
		bottom: 16px;
		right: 16px;
		height: 44px;
		padding: 0 14px 0 12px;
		font-size: 13px;
	}
	#ar-theme-toggle svg {
		width: 18px;
		height: 18px;
	}
}

@media (prefers-reduced-motion: reduce) {
	html, #ar-theme-toggle {
		transition: none !important;
	}
}
