/* ============================================================
   PALAIS DE SOUSS — système commun du thème.
   Les couleurs viennent des presets de theme.json (charte §3.5
   étendue WCAG) ; ici : composants, motifs et mouvements.
   Le moucharabieh est un comportement, pas une décoration (§3.7).
   ============================================================ */

:root {
	--pds-ease: cubic-bezier(.22, .75, .15, 1);
	--pds-filet: rgba(176, 141, 79, .4);
	--pds-creme-voile: rgba(241, 233, 218, .82);
}

body {
	-webkit-font-smoothing: antialiased;
}

[id] {
	scroll-margin-top: 86px;
}

/* ---------- petites capitales d'introduction ---------- */
.pds-eyebrow {
	font-size: 11.5px !important;
	font-weight: 600;
	letter-spacing: .18em;
	text-transform: uppercase;
	color: var(--wp--preset--color--terre-texte);
}

.pds-eyebrow-sur-fonce {
	color: #CBB185 !important;
}

/* ---------- boutons : parité des trois portes (§3.1) ---------- */
.pds-btn,
.wp-block-button .wp-block-button__link {
	display: inline-block;
	font-family: var(--wp--preset--font-family--sans);
	font-size: 12.5px;
	font-weight: 600;
	letter-spacing: .08em;
	text-transform: uppercase;
	padding: 12px 20px;
	border: 1px solid var(--wp--preset--color--terre-fonce);
	border-radius: 2px;
	cursor: pointer;
	text-align: center;
	transition: background .25s, color .25s, border-color .25s, transform .15s;
}

.pds-btn-plein,
.wp-block-button .wp-block-button__link {
	background: var(--wp--preset--color--terre-fonce);
	color: var(--wp--preset--color--creme-sur-fonce);
}

.pds-btn-plein:hover,
.wp-block-button .wp-block-button__link:hover {
	background: var(--wp--preset--color--terre);
	border-color: var(--wp--preset--color--terre);
	color: var(--wp--preset--color--creme-sur-fonce);
}

.is-style-outline .wp-block-button__link,
.pds-btn-contour {
	background: transparent !important;
	border: 1px solid var(--wp--preset--color--terre) !important;
	color: var(--wp--preset--color--terre-texte) !important;
}

.is-style-outline .wp-block-button__link:hover,
.pds-btn-contour:hover {
	background: var(--wp--preset--color--terre-fonce) !important;
	border-color: var(--wp--preset--color--terre-fonce) !important;
	color: var(--wp--preset--color--creme-sur-fonce) !important;
}

.pds-sur-zellige .is-style-outline .wp-block-button__link {
	border-color: var(--wp--preset--color--creme-sur-fonce) !important;
	color: var(--wp--preset--color--creme-sur-fonce) !important;
}

.pds-sur-zellige .is-style-outline .wp-block-button__link:hover {
	background: var(--wp--preset--color--creme-sur-fonce) !important;
	color: var(--wp--preset--color--brun) !important;
}

/* ---------- en-tête ---------- */
.pds-entete {
	position: sticky;
	top: 0;
	z-index: 50;
	background: rgba(245, 239, 228, .94);
	backdrop-filter: blur(8px);
	border-bottom: 1px solid var(--pds-filet);
}

.pds-entete .wp-block-site-title a {
	font-family: var(--wp--preset--font-family--serif);
	font-size: 21px;
	font-weight: 500;
	color: var(--wp--preset--color--brun);
	text-decoration: none;
	white-space: nowrap;
}

.pds-nom-arabe {
	font-family: var(--wp--preset--font-family--arabe);
	font-size: 13px !important;
	color: var(--wp--preset--color--laiton-texte);
	line-height: 1;
}

.pds-entete .wp-block-navigation a {
	font-size: 13.5px;
	font-weight: 500;
	color: rgba(28, 23, 20, .74);
	background-image: linear-gradient(var(--wp--preset--color--laiton), var(--wp--preset--color--laiton));
	background-repeat: no-repeat;
	background-position: left bottom;
	background-size: 0% 1px;
	padding-bottom: 3px;
	transition: color .3s, background-size .35s var(--pds-ease);
}

.pds-entete .wp-block-navigation a:hover,
.pds-entete .wp-block-navigation .current-menu-item > a {
	color: var(--wp--preset--color--brun);
	background-size: 100% 1px;
}

.pds-entete .wp-block-buttons .wp-block-button__link {
	padding: 11px 14px;
}

/* ---------- héro de l'accueil ---------- */
.pds-hero {
	position: relative;
	min-height: 84vh;
	display: flex;
	align-items: flex-end;
	overflow: hidden;
	color: var(--wp--preset--color--creme-sur-fonce);
}

.pds-hero-fond {
	position: absolute;
	inset: 0;
	background:
		radial-gradient(120% 90% at 78% 12%, rgba(192, 96, 63, .42), transparent 55%),
		radial-gradient(90% 70% at 15% 85%, rgba(176, 141, 79, .25), transparent 60%),
		linear-gradient(160deg, #3A2A20 0%, #241A13 45%, #17100C 100%);
	animation: pds-pose 7s var(--pds-ease) both;
}

@keyframes pds-pose {
	from { transform: scale(1.06); }
	to { transform: none; }
}

.pds-hero-voile {
	position: absolute;
	inset: 0;
	background: linear-gradient(to top, rgba(23, 16, 12, .84) 0%, rgba(23, 16, 12, .28) 45%, rgba(23, 16, 12, .05) 70%);
}

.pds-hero > .wp-block-group__inner-container,
.pds-hero-contenu {
	position: relative;
	z-index: 2;
	width: 100%;
	padding-bottom: 56px;
}

.pds-hero h1 {
	color: var(--wp--preset--color--creme-sur-fonce);
	font-size: clamp(34px, 5.4vw, 64px) !important;
	line-height: 1.12;
	max-width: 15em;
}

.pds-badge-terrasse {
	display: inline-flex;
	align-items: center;
	gap: 9px;
	font-size: 12px !important;
	font-weight: 600;
	letter-spacing: .09em;
	text-transform: uppercase;
	color: var(--wp--preset--color--creme-sur-fonce) !important;
	border: 1px solid rgba(241, 233, 218, .5);
	border-radius: 2px;
	padding: 8px 14px;
}

.pds-badge-terrasse::before {
	content: "";
	width: 7px;
	height: 7px;
	border-radius: 50%;
	background: var(--wp--preset--color--laiton);
}

/* ---------- bandeau de preuve ---------- */
.pds-preuve {
	display: grid;
	grid-template-columns: repeat(4, 1fr);
	gap: 24px;
	padding: 34px 0;
	border-top: 1px solid var(--pds-filet);
	border-bottom: 1px solid var(--pds-filet);
}

.pds-stat { text-align: center; }

.pds-stat-val {
	display: block;
	font-family: var(--wp--preset--font-family--serif);
	font-size: clamp(28px, 3.4vw, 44px);
	font-variant-numeric: tabular-nums;
	line-height: 1.1;
}

.pds-stat-lab {
	display: block;
	font-size: 11.5px;
	font-weight: 600;
	letter-spacing: .12em;
	text-transform: uppercase;
	color: rgba(28, 23, 20, .74);
	margin-top: 6px;
}

@media (max-width: 720px) {
	.pds-preuve { grid-template-columns: 1fr 1fr; gap: 26px 12px; }
}

/* ---------- la carte : listes de plats ---------- */
.pds-liste-plats ul {
	list-style: none;
	padding: 0;
	margin: 0;
	max-width: 760px;
}

.pds-rubrique-titre {
	display: flex;
	align-items: baseline;
	gap: 12px;
	border-bottom: 1px solid var(--pds-filet);
	padding-bottom: 10px;
	margin-bottom: 8px;
}

.pds-rubrique-compte {
	font-family: var(--wp--preset--font-family--serif);
	font-size: .8em;
	color: var(--wp--preset--color--terre);
	font-variant-numeric: tabular-nums;
}

.pds-plat {
	padding: 12px 4px;
	margin: 0 -4px;
	border-radius: 2px;
	transition: background .25s;
}

.pds-plat:hover { background: var(--wp--preset--color--creme-2); }

.pds-plat-ligne {
	display: flex;
	align-items: baseline;
	gap: 12px;
}

.pds-plat-nom {
	font-family: var(--wp--preset--font-family--serif);
	font-size: 18px;
}

.pds-plat:hover .pds-plat-nom { color: var(--wp--preset--color--terre-texte); }

.pds-plat-points {
	flex: 1;
	border-bottom: 1px dotted rgba(176, 141, 79, .65);
	transform: translateY(-4px);
	min-width: 24px;
}

.pds-plat-prix {
	font-variant-numeric: tabular-nums;
	white-space: nowrap;
}

.pds-plat-prix-demande {
	font-style: italic;
	font-size: 13px;
	color: rgba(28, 23, 20, .74);
}

.pds-plat-desc {
	color: rgba(28, 23, 20, .74);
	font-size: 13.5px;
	margin: 3px 0 0;
	max-width: 34em;
}

.pds-plat-regimes {
	font-size: 10.5px;
	font-weight: 600;
	letter-spacing: .08em;
	text-transform: uppercase;
	color: var(--wp--preset--color--laiton-texte);
}

.pds-chip {
	display: inline-block;
	font-size: 10.5px;
	font-weight: 600;
	letter-spacing: .09em;
	text-transform: uppercase;
	color: var(--wp--preset--color--terre-texte);
	border: 1px solid var(--wp--preset--color--terre);
	border-radius: 2px;
	padding: 2px 8px;
	vertical-align: 2px;
}

/* ---------- horaires ---------- */
.pds-horaires table {
	width: 100%;
	border-collapse: collapse;
	font-size: 14px;
}

.pds-horaires td {
	padding: 7px 0;
	border-bottom: 1px solid rgba(176, 141, 79, .3);
}

.pds-horaires tr:last-child td { border-bottom: 0; }

.pds-horaires td:last-child {
	text-align: right;
	font-variant-numeric: tabular-nums;
	color: rgba(28, 23, 20, .74);
}

.pds-horaires-note {
	font-size: 12px;
	font-style: italic;
	color: rgba(28, 23, 20, .74);
	margin-top: 10px;
}

/* ---------- module de réservation ---------- */
.pds-module {
	background: var(--wp--preset--color--creme-2);
	border: 1px solid rgba(176, 141, 79, .5);
	border-radius: 2px;
	padding: clamp(24px, 3vw, 40px);
	min-height: 560px; /* le widget ne décale jamais la page (§7.1) */
	display: flex;
	flex-direction: column;
}

.pds-module-ferme { min-height: 0; }

.pds-module-titre {
	font-size: clamp(22px, 2.4vw, 28px) !important;
	font-weight: 500;
	margin: 0 0 22px;
}

.pds-etiquette {
	display: block;
	font-size: 11.5px;
	font-weight: 600;
	letter-spacing: .14em;
	text-transform: uppercase;
	color: rgba(28, 23, 20, .74);
	margin: 18px 0 10px;
}

.pds-module input[type="date"],
.pds-module input[type="text"],
.pds-module input[type="tel"],
.pds-formulaire input,
.pds-formulaire select,
.pds-formulaire textarea {
	width: 100%;
	font: inherit;
	font-size: 14.5px;
	color: var(--wp--preset--color--brun);
	background: var(--wp--preset--color--creme);
	border: 1px solid rgba(176, 141, 79, .55);
	border-radius: 2px;
	padding: 12px 14px;
	transition: border-color .25s;
}

.pds-module input:focus,
.pds-formulaire input:focus,
.pds-formulaire select:focus,
.pds-formulaire textarea:focus {
	border-color: var(--wp--preset--color--terre);
	outline: none;
}

.pds-chips {
	display: flex;
	flex-wrap: wrap;
	gap: 8px;
}

.pds-chips label {
	position: relative;
	cursor: pointer;
}

.pds-chips input {
	position: absolute;
	opacity: 0;
	width: 100%;
	height: 100%;
	cursor: pointer;
}

.pds-chip-choix {
	display: inline-block;
	font-size: 13px;
	font-weight: 500;
	border: 1px solid rgba(176, 141, 79, .55);
	border-radius: 2px;
	padding: 9px 14px;
	color: rgba(28, 23, 20, .74);
	background: var(--wp--preset--color--creme);
	transition: background .25s, color .25s, border-color .25s;
	font-variant-numeric: tabular-nums;
}

.pds-chips label:hover .pds-chip-choix {
	border-color: var(--wp--preset--color--terre);
	color: var(--wp--preset--color--terre-texte);
}

.pds-chips input:checked + .pds-chip-choix {
	background: var(--wp--preset--color--terre-fonce);
	border-color: var(--wp--preset--color--terre-fonce);
	color: var(--wp--preset--color--creme-sur-fonce);
}

.pds-chips input:focus-visible + .pds-chip-choix {
	outline: 2px solid var(--wp--preset--color--terre-fonce);
	outline-offset: 2px;
}

.pds-duo {
	display: grid;
	grid-template-columns: 1fr 1fr;
	gap: 14px;
}

.pds-trio {
	display: grid;
	grid-template-columns: 1fr 1fr 1fr;
	gap: 14px;
}

.pds-envoi { margin-top: auto; padding-top: 22px; }

.pds-envoi .pds-btn { width: 100%; padding: 15px 18px; font-size: 13px; }

.pds-module-note,
.pds-rgpd {
	font-size: 11.5px;
	font-style: italic;
	color: rgba(28, 23, 20, .74);
	margin-top: 12px;
}

.pds-module-erreur {
	color: var(--wp--preset--color--terre-texte);
	font-weight: 600;
	font-size: 13.5px;
	margin-top: 12px;
}

.pds-module-confirm {
	flex: 1;
	display: grid;
	align-content: center;
	text-align: center;
}

.pds-module-confirm-titre {
	font-family: var(--wp--preset--font-family--serif);
	font-size: clamp(22px, 2.6vw, 30px);
	margin-bottom: 8px;
}

.pds-piege {
	position: absolute !important;
	left: -9999px;
}

.pds-formulaire {
	display: grid;
	gap: 20px;
	background: var(--wp--preset--color--creme);
	border: 1px solid rgba(176, 141, 79, .45);
	border-radius: 2px;
	padding: clamp(24px, 3vw, 40px);
}

.pds-formulaire fieldset { border: 0; padding: 0; margin: 0; }

.pds-tel-grand {
	font-family: var(--wp--preset--font-family--serif);
	font-size: clamp(24px, 2.6vw, 32px);
	font-weight: 500;
	color: var(--wp--preset--color--brun);
	display: inline-block;
	border-bottom: 1px solid var(--wp--preset--color--laiton);
	padding-bottom: 2px;
}

.pds-tel-grand:hover { color: var(--wp--preset--color--terre-fonce); }

.pds-sur-zellige .pds-tel-grand { color: var(--wp--preset--color--creme-sur-fonce); }

@media (max-width: 560px) {
	.pds-duo, .pds-trio { grid-template-columns: 1fr; }
}

/* ---------- trajet des pages locales ---------- */
.pds-trajet {
	display: grid;
	grid-template-columns: repeat(3, 1fr);
	gap: clamp(24px, 3.5vw, 48px);
	align-items: start;
}

.pds-voie {
	border-top: 1px solid var(--wp--preset--color--laiton);
	padding-top: 20px;
}

.pds-voie-val {
	display: block;
	font-family: var(--wp--preset--font-family--serif);
	font-size: clamp(34px, 3.8vw, 48px);
	line-height: 1;
	color: var(--wp--preset--color--terre);
	margin-bottom: 12px;
	font-variant-numeric: tabular-nums;
}

.pds-voie h3 { font-size: 19px !important; margin: 0 0 8px; }

.pds-voie p { color: rgba(28, 23, 20, .74); font-size: 14.5px; margin: 0; }

@media (max-width: 820px) {
	.pds-trajet { grid-template-columns: 1fr; gap: 30px; }
}

/* ---------- témoignages ---------- */
.pds-avis-grille {
	display: grid;
	grid-template-columns: 1fr 1fr;
	gap: clamp(24px, 3.5vw, 48px);
}

.pds-temoin {
	font-family: var(--wp--preset--font-family--serif);
	font-style: italic;
	font-size: clamp(17px, 1.6vw, 20px);
	line-height: 1.6;
	border-left: 1px solid var(--wp--preset--color--laiton);
	padding-left: 22px;
	margin: 0;
}

.pds-temoin cite {
	display: block;
	font-family: var(--wp--preset--font-family--sans);
	font-style: normal;
	font-size: 11px;
	letter-spacing: .09em;
	text-transform: uppercase;
	color: rgba(28, 23, 20, .74);
	margin-top: 12px;
}

@media (max-width: 720px) {
	.pds-avis-grille { grid-template-columns: 1fr; }
}

/* ---------- bandeau zellige : un par page, pas plus (§3.5) ---------- */
.pds-sur-zellige {
	color: var(--pds-creme-voile);
}

.pds-sur-zellige h2, .pds-sur-zellige h3 {
	color: var(--wp--preset--color--creme-sur-fonce);
}

/* ---------- pied de page ---------- */
.pds-pied {
	background: var(--wp--preset--color--brun);
	color: rgba(241, 233, 218, .8);
	font-size: 13.5px;
}

.pds-pied ul {
	list-style: none;
	padding-left: 0;
}

.pds-pied a { color: rgba(241, 233, 218, .8); }

.pds-pied a:hover { color: var(--wp--preset--color--creme-sur-fonce); }

.pds-pied h4 {
	font-family: var(--wp--preset--font-family--sans) !important;
	font-size: 11px !important;
	font-weight: 600;
	letter-spacing: .16em;
	text-transform: uppercase;
	color: #CBB185;
}

.pds-pied-bas {
	border-top: 1px solid rgba(176, 141, 79, .3);
	font-size: 11.5px;
	color: rgba(241, 233, 218, .65);
}

.pds-pied-bas a {
	color: rgba(241, 233, 218, .85);
	border-bottom: 1px solid rgba(176, 141, 79, .5);
	padding-bottom: 1px;
}

/* ---------- musique d'ambiance ---------- */
.pds-musique {
	position: fixed;
	left: 16px;
	bottom: 16px;
	z-index: 60;
}

#pds-musique-btn {
	display: inline-flex;
	align-items: center;
	gap: 8px;
	font: inherit;
	font-size: 11.5px;
	font-weight: 600;
	letter-spacing: .08em;
	text-transform: uppercase;
	color: var(--wp--preset--color--terre-texte);
	background: rgba(245, 239, 228, .94);
	border: 1px solid var(--wp--preset--color--terre);
	border-radius: 2px;
	padding: 9px 13px;
	cursor: pointer;
	transition: background .25s, color .25s;
}

#pds-musique-btn:hover,
#pds-musique-btn.joue {
	background: var(--wp--preset--color--terre-fonce);
	border-color: var(--wp--preset--color--terre-fonce);
	color: var(--wp--preset--color--creme-sur-fonce);
}

#pds-musique-btn.rappel { animation: pds-rappel 2s ease-in-out 2; }

@keyframes pds-rappel {
	0%, 100% { transform: none; }
	50% { transform: translateY(-3px); }
}

/* ---------- révélations & moucharabieh (système commun) ---------- */
.pds-reveal {
	opacity: 0;
	transform: translateY(18px);
	transition: opacity .9s var(--pds-ease), transform .9s var(--pds-ease);
}

.pds-reveal.pds-in {
	opacity: 1;
	transform: none;
}

.pds-moucharabieh {
	-webkit-mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='56' height='56'%3E%3Cg fill='white'%3E%3Crect x='15' y='15' width='26' height='26'/%3E%3Crect x='15' y='15' width='26' height='26' transform='rotate(45 28 28)'/%3E%3C/g%3E%3C/svg%3E");
	mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='56' height='56'%3E%3Cg fill='white'%3E%3Crect x='15' y='15' width='26' height='26'/%3E%3Crect x='15' y='15' width='26' height='26' transform='rotate(45 28 28)'/%3E%3C/g%3E%3C/svg%3E");
	-webkit-mask-position: center;
	mask-position: center;
	-webkit-mask-size: 34px;
	mask-size: 34px;
	transition: opacity .9s var(--pds-ease), transform .9s var(--pds-ease),
		-webkit-mask-size 1.5s cubic-bezier(.3, 0, .1, 1), mask-size 1.5s cubic-bezier(.3, 0, .1, 1);
}

.pds-moucharabieh.pds-in {
	-webkit-mask-size: 340%;
	mask-size: 340%;
}

.pds-moucharabieh.pds-ouvert {
	-webkit-mask-image: none;
	mask-image: none;
}

/* Dérive au scroll — CSS pur ; ailleurs, repli statique propre. */
@supports (animation-timeline: view()) {
	.pds-derive {
		animation: pds-derive linear both;
		animation-timeline: view();
		animation-range: cover 0% cover 100%;
	}

	@keyframes pds-derive {
		from { transform: translateY(3.5%); }
		to { transform: translateY(-3.5%); }
	}
}

@media (prefers-reduced-motion: reduce) {
	.pds-reveal, .pds-moucharabieh {
		opacity: 1 !important;
		transform: none !important;
		transition: none !important;
		-webkit-mask-image: none !important;
		mask-image: none !important;
	}

	.pds-hero-fond, .pds-derive { animation: none !important; }

	html { scroll-behavior: auto; }
}
