/* Rougail Mangue — site styles (complements theme.json). */

:root {
	--rm-vert: var(--wp--preset--color--vert);
	--rm-vert-nuit: var(--wp--preset--color--vert-nuit);
	--rm-creme: var(--wp--preset--color--creme);
	--rm-sable: var(--wp--preset--color--sable);
	--rm-dore: var(--wp--preset--color--dore);
	--rm-dore-clair: var(--wp--preset--color--dore-clair);
	--rm-encre: var(--wp--preset--color--encre);
	--rm-titre: var(--wp--preset--font-family--titre);
	--rm-header-h: 76px;
	--rm-section: var(--wp--preset--spacing--60);
}

html { scroll-padding-top: calc(var(--rm-header-h) + 1rem); }
body { -webkit-font-smoothing: antialiased; text-rendering: optimizeLegibility; }
::selection { background: var(--rm-dore-clair); color: var(--rm-encre); }
:where(a, button, input, select, textarea, summary):focus-visible { outline: 2px solid var(--rm-dore); outline-offset: 3px; }
img { height: auto; }

/* The main wrapper lets page content handle its own full-width sections. */
.rm-main { margin-block: 0; padding: 0; }
.rm-main > .wp-block-post-content { margin-block-start: 0; }
.wp-site-blocks > * + * { margin-block-start: 0; }

/* ---------- Header ---------- */
.rm-header {
	position: sticky; top: 0; z-index: 50;
	background: var(--rm-creme);
	border-bottom: 1px solid var(--rm-sable);
}
.admin-bar .rm-header { top: var(--wp-admin--admin-bar--height, 32px); }
.rm-header__inner { min-height: var(--rm-header-h); gap: 1.5rem; }
.rm-brand { display: inline-flex; align-items: center; gap: 0.7rem; text-decoration: none; color: var(--rm-vert); flex-shrink: 0; }
.rm-brand__mark { width: 26px; height: auto; }
.rm-brand__name {
	font-family: var(--rm-titre); font-weight: 600; font-size: 1.3rem;
	letter-spacing: 0.18em; text-transform: uppercase; white-space: nowrap;
}
.rm-header__nav { gap: clamp(1rem, 2.5vw, 2.25rem); }
.rm-nav .wp-block-navigation-item__content { color: var(--rm-encre); text-decoration: none; padding-block: 0.3rem; }
.rm-nav .wp-block-navigation-item__content:hover { color: var(--rm-dore); }
.rm-nav .current-menu-item > .wp-block-navigation-item__content,
.rm-nav [aria-current="page"] { box-shadow: inset 0 -1px 0 var(--rm-dore); }
.rm-header__cta .wp-block-button__link { padding: 0.7rem 1.2rem; font-size: 0.95rem; white-space: nowrap; }
.rm-nav .wp-block-navigation__responsive-container.is-menu-open { padding: 2rem clamp(1rem, 4vw, 2.5rem); }
.rm-nav .is-menu-open .wp-block-navigation-item__content { font-family: var(--rm-titre); font-size: 2rem; color: var(--rm-vert); }

@media (max-width: 1100px) { .rm-brand__name { font-size: 1.1rem; letter-spacing: 0.14em; } }
@media (max-width: 600px) {
	:root { --rm-header-h: 64px; }
	.rm-header__inner { gap: 0.75rem; }
	.rm-header__nav { gap: 0.75rem; flex-direction: row-reverse; }
	.rm-header__cta .wp-block-button__link { padding: 0.55rem 0.8rem; font-size: 0.85rem; }
	.rm-header__cta .wp-block-button__link::after { content: none; }
}
@media (max-width: 440px) { .rm-brand__name { display: none; } }

/* ---------- Home hero ---------- */
.rm-hero { min-height: min(calc(100svh - var(--rm-header-h)), 860px) !important; padding-block: var(--wp--preset--spacing--50) !important; }
.rm-hero .wp-block-cover__inner-container { max-width: var(--wp--style--global--wide-size); margin-inline: auto; }
.rm-hero h1 { font-size: var(--wp--preset--font-size--enorme); line-height: 1.02; max-width: 16ch; margin-block-end: 1.5rem; }
.rm-hero p { font-size: var(--wp--preset--font-size--moyen); max-width: 38ch; line-height: 1.5; }
.rm-hero .wp-block-buttons { margin-block-start: 2rem; }
@media (prefers-reduced-motion: no-preference) {
	.rm-hero .wp-block-cover__inner-container > * { animation: rm-rise 0.9s cubic-bezier(0.2, 0.7, 0.2, 1) both; }
	.rm-hero .wp-block-cover__inner-container > :nth-child(2) { animation-delay: 0.12s; }
	.rm-hero .wp-block-cover__inner-container > :nth-child(3) { animation-delay: 0.24s; }
}
@keyframes rm-rise { from { opacity: 0; transform: translateY(18px); } to { opacity: 1; transform: none; } }

/* Outline button (secondary action), used on dark backgrounds. */
.wp-block-button.is-style-outline > .wp-block-button__link {
	background: transparent; color: currentColor; border: 1px solid currentColor;
	padding: calc(0.9rem - 1px) calc(1.6rem - 1px);
}
.wp-block-button.is-style-outline > .wp-block-button__link:hover { background: var(--rm-creme); color: var(--rm-vert); border-color: var(--rm-creme); }

/* ---------- Generic sections ---------- */
.rm-section { padding-block: var(--rm-section); margin-block: 0 !important; }
.rm-section + .rm-section:not(.has-background) { padding-block-start: 0; }
.rm-kicker { font-family: var(--rm-titre); font-style: italic; font-size: var(--wp--preset--font-size--moyen); color: var(--rm-dore); margin-block-end: 0.25rem !important; }
.rm-lead { font-size: var(--wp--preset--font-size--moyen); line-height: 1.55; }
.rm-split { gap: clamp(2rem, 6vw, 6rem) !important; align-items: center !important; }
.rm-split .wp-block-image img, .rm-photo img { width: 100%; object-fit: cover; border-radius: 2px; }
.rm-photo--tall img { aspect-ratio: 4 / 5; }
.rm-photo--wide img { aspect-ratio: 16 / 10; }
.rm-link { font-weight: 500; text-decoration: none; border-bottom: 1px solid var(--rm-dore); padding-bottom: 2px; }
.rm-link:hover { color: var(--rm-dore); }

/* Mosaic of three photos with a text column. */
.rm-mosaic { display: grid; grid-template-columns: 1.3fr 1fr; grid-template-rows: auto auto; gap: 1rem; }
.rm-mosaic > figure { margin: 0 !important; }
.rm-mosaic > figure:first-child { grid-row: span 2; }
.rm-mosaic img { width: 100%; height: 100%; object-fit: cover; border-radius: 2px; }
@media (max-width: 700px) { .rm-mosaic { grid-template-columns: 1fr 1fr; } .rm-mosaic > figure:first-child { grid-column: span 2; grid-row: auto; } }

/* Full-width photo band with text. */
.rm-band { min-height: min(70vh, 640px) !important; }
.rm-band h2 { font-size: var(--wp--preset--font-size--tres-grand); }
.rm-band p { max-width: 42ch; }

/* ---------- Menus (signature: the dots are the courses) ---------- */
.rm-menus { padding-block: var(--rm-section); margin-block: 0 !important; }
.rm-menus a:where(:not(.wp-element-button)) { color: var(--rm-creme); }
.rm-menus__head p { opacity: 0.88; }
.rm-menus__list { gap: clamp(1.5rem, 4vw, 3.5rem) !important; margin-block: var(--wp--preset--spacing--50) !important; }
.rm-menu { border-top: 1px solid rgb(245 241 232 / 0.25); padding-top: 1.5rem; }
.rm-menu__name { font-size: var(--wp--preset--font-size--grand); font-weight: 500; margin: 0; }
.rm-menu__price { font-family: var(--rm-titre); font-size: var(--wp--preset--font-size--tres-grand); line-height: 1; margin-block: 1.25rem 0.75rem !important; color: var(--rm-dore-clair); }
.rm-menu__text { opacity: 0.85; max-width: 30ch; }
.rm-dots { display: flex; gap: 7px; margin-block-start: 1rem; }
.rm-dots__dot { width: 9px; height: 9px; border-radius: 50%; border: 1px solid rgb(214 162 78 / 0.55); }
.rm-dots__dot.is-on { background: var(--rm-dore-clair); border-color: var(--rm-dore-clair); }
.rm-menus__foot { border-top: 1px solid rgb(245 241 232 / 0.25); padding-top: 1.75rem; gap: 1.5rem; }
.rm-menus__foot p { margin: 0; opacity: 0.88; }

/* ---------- Inner pages ---------- */
.rm-page-hero { min-height: min(46vh, 480px) !important; margin-block: 0 !important; padding-block: var(--wp--preset--spacing--50) !important; }
.rm-page-hero:not(:has(img)) { background: var(--rm-vert); min-height: min(30vh, 300px) !important; }
.rm-page-hero .wp-block-cover__inner-container { max-width: var(--wp--style--global--wide-size); margin-inline: auto; }
.rm-page-hero__title { font-size: var(--wp--preset--font-size--enorme) !important; line-height: 1.02; }
.rm-page-content { padding-block: var(--wp--preset--spacing--50) var(--rm-section); }
.rm-page-content > .alignfull:last-child { margin-block-end: calc(-1 * var(--rm-section)) !important; }
.rm-page-content > h2 { margin-block-start: var(--wp--preset--spacing--50); }

/* Rooms */
.rm-room { padding-block: var(--wp--preset--spacing--50); border-top: 1px solid var(--rm-sable); }
.rm-room h2 { margin-block-start: 0; }
.rm-room__facts { list-style: none; padding: 0; display: flex; flex-wrap: wrap; gap: 0.4rem 1.5rem; color: var(--wp--preset--color--gris); font-size: var(--wp--preset--font-size--petit); }
.rm-room .wp-block-gallery img { border-radius: 2px; }

/* Price tables */
.rm-prices table { border-collapse: collapse; width: 100%; }
.rm-prices td, .rm-prices th { border: 0; border-bottom: 1px solid var(--rm-sable); padding: 0.85rem 0; text-align: left; vertical-align: top; }
.rm-prices td:last-child, .rm-prices th:last-child { text-align: right; white-space: nowrap; font-family: var(--rm-titre); font-size: 1.35rem; color: var(--rm-vert); }
.rm-prices thead th { font-family: var(--wp--preset--font-family--texte) !important; font-size: var(--wp--preset--font-size--petit) !important; color: var(--wp--preset--color--gris) !important; font-weight: 500; }
.rm-prices small, .rm-note { color: var(--wp--preset--color--gris); font-size: var(--wp--preset--font-size--petit); }

/* Services list */
.rm-services { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 2.5rem 2rem; }
.rm-service figure { margin: 0 0 1rem !important; }
.rm-service img { aspect-ratio: 3 / 2; object-fit: cover; width: 100%; border-radius: 2px; }
.rm-service h3 { margin-block: 0 0.4rem; }
.rm-service p { margin-block: 0.4rem; }

/* Contact */
.rm-contact-card p { margin-block: 0.3rem; }

/* ---------- Footer ---------- */
.rm-footer { padding-block: var(--wp--preset--spacing--50) var(--wp--preset--spacing--30); margin-block: 0 !important; font-size: 0.95rem; }
.rm-footer a { color: var(--rm-creme); text-decoration: none; }
.rm-footer a:hover { color: var(--rm-dore-clair); }
.rm-footer__cols { gap: 2rem 3rem !important; }
.rm-footer__logo img { width: 150px; }
.rm-footer__title { font-family: var(--wp--preset--font-family--texte) !important; font-size: 1rem !important; font-weight: 500 !important; color: var(--rm-dore-clair) !important; letter-spacing: 0.02em; }
.rm-footer__links { list-style: none; padding: 0; }
.rm-footer__links li { margin-block: 0.35rem; }
.rm-footer__legal { border-top: 1px solid rgb(245 241 232 / 0.15); margin-block-start: var(--wp--preset--spacing--40) !important; padding-top: 1.25rem; font-size: var(--wp--preset--font-size--petit); opacity: 0.75; }
.rm-footer__legal p { margin: 0; }
.rm-footer__legal a + a { margin-inline-start: 1.25rem; }

/* ---------- 404 ---------- */
.rm-404 { padding-block: var(--rm-section) !important; min-height: 50vh; }

@media (prefers-reduced-motion: reduce) {
	*, *::before, *::after { animation-duration: 0.01ms !important; transition-duration: 0.01ms !important; }
}

/* Legibility: darken covers from the bottom, where the text sits. */
.rm-hero > .wp-block-cover__background,
.rm-page-hero > .wp-block-cover__background {
	background: linear-gradient(to top, rgb(23 48 42 / 0.88) 0%, rgb(23 48 42 / 0.35) 55%, rgb(23 48 42 / 0.1) 100%) !important;
	opacity: 1 !important;
}
.rm-band > .wp-block-cover__background {
	background: linear-gradient(to right, rgb(23 48 42 / 0.85) 0%, rgb(23 48 42 / 0.2) 70%) !important;
	opacity: 1 !important;
}

/* Full-width covers keep the site's side gutters for their text. */
.rm-hero, .rm-band, .rm-page-hero {
	padding-inline: var(--wp--style--root--padding-left, clamp(1rem, 4vw, 2.5rem)) !important;
}
.rm-split--top { align-items: flex-start !important; }

/* ---------- Forms (contact) ---------- */
.rm-form { display: grid; gap: 0.25rem; }
.rm-field { display: grid; gap: 0.35rem; margin: 0 0 0.9rem; }
.rm-field label { font-weight: 500; font-size: 0.95rem; }
.rm-optional { font-weight: 400; color: var(--wp--preset--color--gris); }
.rm-form input[type="text"], .rm-form input[type="email"], .rm-form input[type="tel"], .rm-form textarea {
	font: inherit; color: var(--rm-encre); background: var(--wp--preset--color--blanc);
	border: 1px solid #cfc6b2; border-radius: 2px; padding: 0.75rem 0.9rem; width: 100%; box-sizing: border-box;
}
.rm-form input:focus, .rm-form textarea:focus { border-color: var(--rm-vert); outline: 2px solid rgb(35 71 59 / 0.2); outline-offset: 0; }
.rm-form button { cursor: pointer; border: 0; }
.rm-hp { position: absolute !important; left: -9999px; width: 1px; height: 1px; overflow: hidden; }
.rm-form-legal { font-size: var(--wp--preset--font-size--petit); color: var(--wp--preset--color--gris); }
.rm-form-success { background: var(--rm-vert); color: var(--rm-creme); padding: 1rem 1.25rem; border-radius: 2px; }
.rm-form-errors { border-left: 3px solid #a63d2a; background: #f7e6df; padding: 0.75rem 1.25rem; margin-bottom: 1rem; }
.rm-form-errors p { margin: 0.2rem 0; }
.rm-coordonnees p { margin-block: 0.35rem; }

/* Quotes use the serif, whatever the paragraph default is. */
.wp-block-quote p { font-family: var(--rm-titre); font-style: italic; font-size: var(--wp--preset--font-size--grand); line-height: 1.25; color: var(--rm-vert); }
.wp-block-quote cite { font-family: var(--wp--preset--font-family--texte); font-style: normal; font-size: var(--wp--preset--font-size--petit); color: var(--wp--preset--color--gris); }
.rm-services > * { margin-block: 0 !important; }
.rm-services { margin-block-end: var(--rm-section) !important; }

/* ---------- Dishes gallery: a 4-column grid, two photos shown larger (2 × 2) ---------- */
.rm-dishes-section { margin-inline: auto; }
.rm-dishes__head { margin-block-end: var(--wp--preset--spacing--40); }
.wp-block-gallery.rm-dishes { display: grid !important; grid-template-columns: repeat(4, minmax(0, 1fr)); grid-auto-flow: dense; gap: 0.75rem; }
.wp-block-gallery.rm-dishes > .wp-block-image { width: auto !important; margin: 0 !important; aspect-ratio: 4 / 5; }
.wp-block-gallery.rm-dishes > .wp-block-image:nth-child(1),
.wp-block-gallery.rm-dishes > .wp-block-image:nth-child(8) { grid-column: span 2; grid-row: span 2; aspect-ratio: auto; position: relative; }
/* The large tiles take their height from the two rows they span, not from the photo. */
.wp-block-gallery.rm-dishes > .wp-block-image:nth-child(1) img,
.wp-block-gallery.rm-dishes > .wp-block-image:nth-child(8) img { position: absolute; inset: 0; }
.wp-block-gallery.rm-dishes img { width: 100%; height: 100% !important; object-fit: cover; border-radius: 2px; }
@media (max-width: 700px) {
	.wp-block-gallery.rm-dishes { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0.5rem; }
	.wp-block-gallery.rm-dishes > .wp-block-image:nth-child(1),
	.wp-block-gallery.rm-dishes > .wp-block-image:nth-child(8) { grid-row: span 1; aspect-ratio: 1; }
}

/* Home: the four rooms, 2 × 2, same crop for each, room name on the photo. */
.wp-block-gallery.rm-rooms-gallery { gap: 0.75rem; }
.wp-block-gallery.rm-rooms-gallery .wp-block-image img { aspect-ratio: 4 / 3; height: auto; object-fit: cover; border-radius: 2px; }
.wp-block-gallery.rm-rooms-gallery .wp-element-caption { font-family: var(--rm-titre); font-size: 1.15rem; letter-spacing: 0.02em; }

/* Chef portrait and the three restaurant photos on La Table. */
.rm-photo--portrait img { aspect-ratio: 3 / 4; object-position: 50% 30%; }
.rm-trio { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.4fr) minmax(0, 1fr); gap: 1rem; align-items: stretch; }
.rm-trio > figure { margin: 0 !important; }
.rm-trio img { width: 100%; height: 100%; aspect-ratio: 3 / 4; object-fit: cover; border-radius: 2px; }
.rm-trio > figure:nth-child(2) img { aspect-ratio: auto; }
@media (max-width: 700px) { .rm-trio { grid-template-columns: repeat(2, minmax(0, 1fr)); } .rm-trio > figure:nth-child(2) { grid-column: span 2; grid-row: 1; } .rm-trio > figure:nth-child(2) img { aspect-ratio: 3 / 2; } }

/* Booking-by-phone card. */
.rm-phone-card { background: var(--rm-vert); color: var(--rm-creme); padding: clamp(1.75rem, 4vw, 3rem); border-radius: 2px; }
.rm-phone-card a { color: var(--rm-creme); }
.rm-phone-card .rm-phone-card__number { font-family: var(--rm-titre); font-size: var(--wp--preset--font-size--tres-grand); line-height: 1.1; margin-block: 0.5rem 1rem; }
.rm-phone-card .rm-phone-card__number a { text-decoration: none; border-bottom: 1px solid var(--rm-dore-clair); }
.rm-phone-card p { margin-block: 0.4rem; }

/* Footer: the two booking buttons. */
.rm-footer__cta { gap: 0.6rem; margin-block-start: 1rem; }
.rm-footer__cta .wp-block-button__link { padding: 0.6rem 1.1rem; font-size: 0.9rem; }
.rm-footer .rm-footer__cta .wp-block-button:not(.is-style-outline) .wp-block-button__link { color: #fff; }
