/*
 * peau.css — direction « Médine éditoriale » (Lot 1 : jetons + CSS pur).
 *
 * Chargée APRÈS parcours.css et accueil.css : ses jetons :root remplacent les
 * leurs et cascadent sur les ~200 déclarations var(--sam-…) existantes. Aucun
 * gabarit n'est touché ici — le site change de peau, pas d'os. Tous les
 * sélecteurs restent dans le périmètre du plugin (.sam, classes sam-*).
 *
 * Contrastes (WCAG AA, sur --sam-papier) : encre 13:1 · vert 12:1 · laiton
 * texte 5,2:1 · gris atténué 7,8:1 (l'ancien 4,4:1 échouait sous 18 px).
 */

:root {
	--sam-vert: #163127;
	--sam-vert-clair: #1f4436;
	--sam-or: #7d6838;
	--sam-papier: #fffdf9;
	--sam-line: #dccfb8;
	--sam-mute: #4b5852;
	--sam-sable: #f4efe6;
	--sam-sable-2: #ebe4d6;
	--sam-laiton: #b99a5b;
	--sam-r-lg: 22px;
	--sam-r-md: 14px;
	--sam-ombre: 0 10px 30px -18px rgba(22, 49, 39, 0.45);
	--sam-f-titre: "Fraunces", Georgia, "Times New Roman", serif;
	--sam-f-texte: "Manrope", "Segoe UI", system-ui, -apple-system, sans-serif;
}

/* ---------- typographie : le plugin entier, jamais le thème ---------- */

.sam,
[class^="sam-"],
[class*=" sam-"] {
	font-family: var(--sam-f-texte);
	-webkit-font-smoothing: antialiased;
}

.sam h1,
.sam h2,
.sam h3,
.sam-h2,
.sam-une-t,
.sam-tete-t,
.sam-l h3,
.sam-tot-v {
	font-family: var(--sam-f-titre);
	font-weight: 600;
	letter-spacing: -0.01em;
	line-height: 1.12;
}

.sam-une-t {
	font-size: clamp(2.2rem, 5vw, 3.4rem);
	font-variation-settings: "opsz" 144;
}

/* ---------- focus visible partout, cibles confortables ---------- */

.sam :focus-visible,
[class^="sam-"]:focus-visible,
[class*=" sam-"]:focus-visible,
.sam-une :focus-visible,
.sam-rech :focus-visible,
.sam-l :focus-visible {
	/*
	 * [4.57.2] Le laiton (#b99a5b) ne fait que 2,6:1 sur le papier : sous le
	 * seuil de 3:1 exigé pour un indicateur de focus. Anneau sombre (5,4:1 sur
	 * papier) doublé d'un halo clair pour rester visible sur le vert du héros.
	 */
	outline: 3px solid var(--sam-or);
	outline-offset: 3px;
	box-shadow: 0 0 0 3px var(--sam-papier);
	border-radius: 6px;
}

.sam-rech-go,
.sam-l-cta,
.sam-entete-wa,
.sam-vide-wa,
.sam-j {
	min-height: 44px;
}

/* ---------- héros : vert de dôme, trame discrète ---------- */

.sam-une {
	background-color: var(--sam-vert);
	background-image:
		radial-gradient(rgba(255, 255, 255, 0.06) 1px, transparent 1px),
		radial-gradient(120% 90% at 20% 0%, var(--sam-vert-clair) 0%, var(--sam-vert) 55%, #0f241c 100%);
	background-size: 22px 22px, auto;
	color: var(--sam-sable);
}

.sam-une-s,
.sam-une-r {
	color: #d9d2c2;
}

/* ---------- barre de recherche : une seule carte, ombre douce ---------- */

.sam-rech-barre {
	background: var(--sam-papier);
	border-radius: var(--sam-r-lg);
	box-shadow: var(--sam-ombre);
	overflow: hidden;
}

.sam-rech-go {
	border-radius: 999px;
	background: var(--sam-vert);
	color: #fff;
	font-weight: 700;
	box-shadow: 0 6px 18px -10px rgba(22, 49, 39, 0.7);
	transition: transform 0.16s ease, background 0.16s ease;
}

.sam-rech-go:hover {
	background: var(--sam-vert-clair);
	transform: translateY(-1px);
}

.sam-opts {
	border-radius: 999px;
	padding: 0.25rem;
	background: rgba(255, 255, 255, 0.08);
	border: 1px solid rgba(255, 255, 255, 0.14);
}

.sam-opt {
	border-radius: 999px;
	min-height: 44px;
	font-weight: 700;
}

/* ---------- cartes de logement ---------- */

.sam-l {
	background: var(--sam-papier);
	border: 1px solid var(--sam-line);
	border-radius: var(--sam-r-lg);
	overflow: hidden;
	transition: transform 0.18s ease, box-shadow 0.18s ease;
}

.sam-l:hover,
.sam-l:focus-within {
	transform: translateY(-3px);
	box-shadow: var(--sam-ombre);
}

.sam-l-photo {
	aspect-ratio: 4 / 3;
	overflow: hidden;
	background: linear-gradient(135deg, #c9bda3, #8d9c8f);
}

.sam-l-photo img {
	width: 100%;
	height: 100%;
	object-fit: cover;
	display: block;
}

.sam-l-badge {
	border-radius: 999px;
	background: rgba(255, 253, 249, 0.92);
	color: var(--sam-vert);
	font-size: 0.75rem;
	font-weight: 700;
	padding: 0.35rem 0.7rem;
}

.sam-l-meta {
	color: var(--sam-mute);
}

.sam-l-prix {
	font-family: var(--sam-f-titre);
	font-weight: 600;
	color: var(--sam-vert);
	font-size: 1.55rem;
	line-height: 1.1;
	border-top: 1px dashed var(--sam-line);
	padding-top: 0.8rem;
	margin-top: 0.4rem;
}

.sam-l-prix small,
.sam-l-detail {
	font-family: var(--sam-f-texte);
	font-weight: 400;
	font-size: 0.9rem;
	color: var(--sam-mute);
}

.sam-l-cta {
	border-radius: 999px;
	font-weight: 700;
}

/* ---------- cartes : les DEUX familles (accueil en JS, page recherche en PHP) ---------- */

.sam-l-nom,
.sam-l-titre {
	font-family: var(--sam-f-titre);
	font-weight: 600;
	font-size: 1.35rem;
	line-height: 1.15;
	letter-spacing: -0.01em;
	color: var(--sam-vert);
	margin: 0.2rem 0 0.25rem;
}

.sam-l-nom a,
.sam-l-titre a {
	color: inherit;
	text-decoration: none;
}

.sam-l-det,
.sam-l-meta {
	color: var(--sam-mute);
	font-size: 0.92rem;
}

.sam-l-ph {
	aspect-ratio: 4 / 3;
	overflow: hidden;
	background: linear-gradient(135deg, #c9bda3, #8d9c8f);
}

.sam-l-ph img {
	width: 100%;
	height: 100%;
	object-fit: cover;
	display: block;
}

.sam-l-tarif,
.sam-l-prix {
	font-family: var(--sam-f-titre);
	font-weight: 600;
	font-size: 1.55rem;
	line-height: 1.15;
	color: var(--sam-vert);
	border-top: 1px dashed var(--sam-line);
	padding-top: 0.8rem;
	margin-top: 0.6rem;
}

.sam-l-tarif span,
.sam-l-tarif small,
.sam-l-tarif div,
.sam-l-prix span,
.sam-l-prix small {
	font-family: var(--sam-f-texte);
	font-weight: 400;
	font-size: 0.92rem;
	color: var(--sam-mute);
}

.sam-l-remise {
	font-family: var(--sam-f-texte);
	font-size: 0.82rem;
	font-weight: 700;
	color: var(--sam-or);
}

/* corps de carte : marge intérieure, hiérarchie titre → puces → prix → actions */

.sam .sam-l-nom,
.sam .sam-l-det,
.sam .sam-l-tarif,
.sam .sam-l-actions,
.sam .sam-l-remise {
	margin-left: 1.15rem;
	margin-right: 1.15rem;
}

.sam .sam-l-nom {
	margin-top: 1.05rem;
}

.sam .sam-l-actions {
	margin-bottom: 1.2rem;
}

.sam .sam-l-tarif {
	display: flex;
	align-items: baseline;
	flex-wrap: wrap;
	gap: 0.45rem;
	margin-top: 0.65rem;
	padding-top: 0.85rem;
	border-top: 1px dashed var(--sam-line);
}

.sam .sam-l-tarif b {
	font-family: var(--sam-f-titre);
	font-size: 1.6rem;
	font-weight: 600;
	line-height: 1;
	letter-spacing: -0.01em;
	color: var(--sam-vert);
}

.sam .sam-l-sous,
.sam-l-sous {
	flex-basis: 100%;
	margin: 0.1rem 1.15rem 0;
	font-size: 0.86rem;
	color: var(--sam-mute);
}

.sam .sam-l-puces,
.sam-l-puces {
	display: flex;
	flex-wrap: wrap;
	gap: 0.35rem;
	margin-top: 0.3rem;
	padding: 0;
	list-style: none;
}

.sam .sam-l-puces li,
.sam-l-puces li {
	font-size: 0.8rem;
	color: var(--sam-mute);
	background: var(--sam-sable);
	border-radius: 999px;
	padding: 0.22rem 0.6rem;
	line-height: 1.3;
}

/* une seule action principale par carte : Réserver en vert, WhatsApp en fantôme */

.sam-l-actions {
	display: flex;
	gap: 0.6rem;
	align-items: stretch;
	margin-top: 0.9rem;
}

.sam .sam-l-resa,
.sam .sam-l-cta,
.sam-l-resa,
.sam-l-cta {
	/* même spécificité que la base (.sam .sam-l-resa) : chargée après, la peau gagne */
	display: inline-flex;
	align-items: center;
	justify-content: center;
	flex: 1 1 auto;
	min-height: 46px;
	padding: 0.6rem 1.2rem;
	border-radius: 999px;
	background: var(--sam-vert);
	color: #fff;
	font-weight: 700;
	text-decoration: none;
	box-shadow: 0 6px 18px -10px rgba(22, 49, 39, 0.7);
	transition: transform 0.16s ease, background 0.16s ease;
}

.sam .sam-l-resa:hover,
.sam .sam-l-cta:hover,
.sam-l-resa:hover,
.sam-l-cta:hover {
	background: var(--sam-vert-clair);
	color: #fff;
	transform: translateY(-1px);
}

.sam .sam-l-wa,
.sam .sam-l-cta.sam-l-cta-wa,
.sam-l-wa,
.sam-l-cta.sam-l-cta-wa {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	gap: 0.4rem;
	flex: 0 0 auto;
	min-height: 46px;
	padding: 0.6rem 1rem;
	border-radius: 999px;
	background: transparent;
	color: var(--sam-vert);
	border: 1.5px solid var(--sam-line);
	font-weight: 700;
	text-decoration: none;
	box-shadow: none;
}

.sam .sam-l-wa:hover,
.sam .sam-l-cta.sam-l-cta-wa:hover,
.sam-l-wa:hover,
.sam-l-cta.sam-l-cta-wa:hover {
	border-color: var(--sam-vert);
	background: transparent;
	color: var(--sam-vert);
	transform: none;
}

/* ---------- carrousel : hidden souverain, image active au-dessus ----------
 * [4.57.4 — apport de l'auditeur] Mon « display: block » sur .sam-l-ph img
 * ANNULAIT l'attribut hidden : toutes les photos s'affichaient empilées, la
 * dernière du DOM au-dessus — d'où une salle de bain en tête de carte. */

.sam-l-ph img[hidden],
.sam .sam-l-ph img[hidden] {
	display: none !important;
}

.sam-l-ph img.is-on {
	z-index: 1;
}

/* ---------- carrousel : points = boutons à cible de 24 px ---------- */

.sam .sam-l-pts button,
.sam-l-pts button {
	width: 24px;
	height: 24px;
	padding: 0;
	border: 0;
	background: transparent;
	display: inline-grid;
	place-items: center;
	cursor: pointer;
}

.sam .sam-l-pts button::before,
.sam-l-pts button::before {
	content: "";
	width: 6px;
	height: 6px;
	border-radius: 50%;
	background: rgba(255, 255, 255, 0.55);
	transition: transform 0.15s ease, background 0.15s ease;
}

.sam .sam-l-pts button.is-on::before,
.sam-l-pts button.is-on::before {
	background: #fff;
	transform: scale(1.35);
}

.sam .sam-l-pts button:focus-visible,
.sam-l-pts button:focus-visible {
	outline: 2px solid var(--sam-laiton);
	outline-offset: 1px;
	border-radius: 50%;
}

.sam-l-ph {
	touch-action: pan-y;
	cursor: grab;
}

/* ---------- en-têtes de section, compteur ---------- */

.sam-tete-s,
.sam-cpt {
	color: var(--sam-mute);
}

/* ---------- états vides : une invitation, pas un mur ---------- */

.sam-vide,
.sam-empty {
	background: var(--sam-papier);
	border: 1.5px dashed var(--sam-line);
	border-radius: var(--sam-r-lg);
	padding: 2rem 1.4rem 1.9rem;
	text-align: center;
	color: var(--sam-mute);
}

/* ---------- tunnel : carte du total ---------- */

.sam-tot {
	background: var(--sam-vert);
	color: #fff;
	border-radius: var(--sam-r-lg);
}

.sam-tot-lb {
	letter-spacing: 0.14em;
	font-size: 0.68rem;
	color: var(--sam-laiton);
	font-weight: 700;
	text-transform: uppercase;
}

.sam-tot-v {
	font-size: 2.4rem;
}

/* ---------- calendrier : jours lisibles, occupé hachuré ---------- */

.sam-j {
	border-radius: 10px;
}

.sam-fiche-resume {
	color: var(--sam-mute);
}

/* ---------- en-tête : WhatsApp en pastille fantôme ---------- */

.sam-entete-wa {
	display: inline-flex;
	align-items: center;
	gap: 0.5rem;
	border: 1.5px solid var(--sam-line);
	border-radius: 999px;
	padding: 0.55rem 1.1rem;
	text-decoration: none;
	color: var(--sam-vert);
	font-weight: 700;
}

.sam-entete-wa:hover {
	border-color: var(--sam-vert);
}

/* ---------- options : bloc en cartes (aperçu validé) ---------- */

.sam .sam-opts,
.sam-opts {
	background: var(--sam-papier);
	border: 1px solid var(--sam-line);
	border-radius: var(--sam-r-lg);
	padding: 1.25rem 1.25rem 1.1rem;
	margin: 1.4rem 0;
}

.sam-opts-tete {
	display: flex;
	gap: 0.85rem;
	align-items: flex-start;
	border-left: 3px solid var(--sam-laiton);
	padding: 0 0.2rem 1rem 0.9rem;
	margin-bottom: 1rem;
}

.sam-opts-tete .sam-h2 {
	margin: 0 0 0.25rem;
	font-size: 1.35rem;
}

.sam-opts-tete p {
	margin: 0;
	color: var(--sam-mute);
	font-size: 0.92rem;
}

.sam-opts-ico {
	width: 40px;
	height: 40px;
	border-radius: 50%;
	background: linear-gradient(135deg, #e9dcb8, #c9ae6c);
	display: grid;
	place-items: center;
	color: #fff;
	font-size: 1.1rem;
	flex: none;
	box-shadow: 0 3px 10px -4px rgba(185, 154, 91, 0.7);
}

/* Le thème rend les étiquettes en ligne et neutralise les cases natives :
   la carte impose sa largeur (spécificité supérieure) et dessine sa bulle. */
.sam .sam-opts .sam-opt,
.sam-opts .sam-opt,
.sam-opt {
	display: grid;
	grid-template-columns: 24px 1fr;
	gap: 0.9rem;
	align-items: start;
	width: 100%;
	box-sizing: border-box;
	background: #fff;
	border: 1px solid var(--sam-line);
	border-radius: 14px;
	padding: 1rem 1.1rem;
	margin: 0 0 0.7rem;
	cursor: pointer;
	transition: border-color 0.15s ease, box-shadow 0.15s ease;
}

/* case native : accessible (focus, clavier, lecteur d'écran) mais invisible */
.sam-opts .sam-opt-case,
.sam-opt-case {
	position: absolute;
	width: 1px;
	height: 1px;
	margin: -1px;
	padding: 0;
	border: 0;
	overflow: hidden;
	clip: rect(0 0 0 0);
	white-space: nowrap;
}

.sam-opts .sam-opt-bulle,
.sam-opt-bulle {
	width: 24px;
	height: 24px;
	margin-top: 0.1rem;
	border-radius: 8px;
	border: 2px solid var(--sam-line);
	background: var(--sam-papier);
	display: grid;
	place-items: center;
	transition: background 0.15s ease, border-color 0.15s ease;
}

.sam-opt-bulle::after {
	content: "";
	width: 6px;
	height: 11px;
	border: solid #fff;
	border-width: 0 2.5px 2.5px 0;
	transform: rotate(45deg) translate(-1px, -1px);
	opacity: 0;
}

.sam-opt-case:checked + .sam-opt-bulle {
	background: var(--sam-vert);
	border-color: var(--sam-vert);
}

.sam-opt-case:checked + .sam-opt-bulle::after {
	opacity: 1;
}

.sam-opt-case:focus-visible + .sam-opt-bulle {
	outline: 3px solid var(--sam-or);
	outline-offset: 3px;
}

.sam-opt:hover {
	border-color: var(--sam-laiton);
}

.sam-opt:has(input:checked) {
	border-color: var(--sam-vert);
	box-shadow: 0 0 0 2px rgba(22, 49, 39, 0.12);
	background: #fbf9f3;
}

.sam-opt-corps {
	display: block;
}

.sam-opt-titre {
	font-weight: 800;
	font-size: 1.02rem;
}

.sam-opt-prix {
	display: block;
	margin: 0.2rem 0 0;
	color: var(--sam-or);
	font-weight: 800;
	white-space: normal;
}

/* Le thème rend small/em en bloc : l'unité reste collée au prix, le
   multiplicateur suit sur la même ligne. */
.sam-opts .sam-opt-prix small,
.sam-opt-prix small {
	display: inline;
	font-weight: 600;
	font-size: 0.82rem;
	margin-left: 0.15rem;
	white-space: nowrap;
}

.sam-opts .sam-opt-prix em,
.sam-opt-prix em {
	display: inline;
	font-style: normal;
	font-weight: 700;
	color: var(--sam-vert);
	margin-left: 0.45rem;
	white-space: nowrap;
}

.sam-opt-desc {
	display: block;
	margin-top: 0.25rem;
	color: var(--sam-mute);
	font-size: 0.9rem;
	font-weight: 400;
}

.sam-opts-total {
	margin-top: 0.4rem;
	background: var(--sam-vert);
	color: #fff;
	border-radius: 14px;
	padding: 1rem 1.2rem;
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 1rem;
}

.sam-opts-total b {
	font-family: var(--sam-f-titre);
	font-size: 1.35rem;
	font-weight: 600;
}

.sam-opts-total small {
	display: block;
	color: #cfc7b6;
	font-size: 0.78rem;
	margin-top: 0.1rem;
}

/* ---------- mobile : rien ne déborde, tout se lit ---------- */

@media (max-width: 40rem) {
	.sam,
	.sam-une,
	.sam-grille,
	.sam-rech {
		max-width: 100%;
		overflow-x: clip;
	}

	.sam-grille {
		grid-template-columns: 1fr;
		gap: 1.4rem;
	}

	.sam-l {
		max-width: 100%;
		min-width: 0;
	}

	.sam-l img,
	.sam-l-ph img {
		max-width: 100%;
	}

	.sam-l-nom,
	.sam-l-titre,
	.sam-tete-t {
		overflow-wrap: anywhere;
		white-space: normal;
		font-size: 1.25rem;
	}

	.sam .sam-l-tarif b {
		font-size: 1.45rem;
	}

	.sam .sam-l-actions,
	.sam-l-actions {
		flex-direction: column;
		gap: 0.55rem;
	}

	.sam .sam-l-resa,
	.sam .sam-l-cta,
	.sam .sam-l-wa,
	.sam .sam-l-cta.sam-l-cta-wa {
		flex: 1 1 100%;
		width: 100%;
	}

	.sam-une-t {
		font-size: clamp(1.7rem, 7vw, 2.4rem);
		overflow-wrap: anywhere;
	}

	.sam-rech-barre {
		border-radius: 18px;
	}

	.sam-vide,
	.sam-empty {
		padding: 1.5rem 1rem 1.4rem;
	}

	.sam-tot-v {
		font-size: 1.9rem;
	}
}

/* ---------- champ-piège anti-robot : hors écran, jamais display:none (les robots le sautent) ---------- */

.sam-piege {
	position: absolute;
	left: -9999px;
	width: 1px;
	height: 1px;
	overflow: hidden;
}

/* ---------- mouvement réduit : rien ne bouge ---------- */

@media (prefers-reduced-motion: reduce) {
	.sam-l,
	.sam-rech-go,
	.sam-vide-wa {
		transition: none;
	}

	.sam-l:hover,
	.sam-rech-go:hover {
		transform: none;
	}
}
