/*
Theme Name: Bastide Free
Theme URI: https://bastideavellanne.com/
Author: Bastide Avellanne
Description: Thème léger et autonome pour Bastide Avellanne, sans constructeur de pages payant.
Version: 1.0.0
Requires at least: 6.8
Tested up to: 7.0
Requires PHP: 7.4
Text Domain: bastide-free
License: GNU General Public License v2 or later
*/

@font-face {
	font-family: "Marcellus";
	src: url("assets/fonts/Marcellus-Regular.ttf") format("truetype");
	font-style: normal;
	font-weight: 400;
	font-display: swap;
}

@font-face {
	font-family: "Cinzel";
	src: url("assets/fonts/Cinzel-Variable.ttf") format("truetype");
	font-style: normal;
	font-weight: 400 900;
	font-display: swap;
}

:root {
	--bastide-bg: #f6f6f6;
	--bastide-soft: #eeecf1;
	--bastide-room: #f8f8f8;
	--bastide-text: #606060;
	--bastide-dark: #262626;
	--bastide-darker: #1b1b1b;
	--bastide-accent: #d35c30;
	--bastide-accent-hover: #d36d47;
	--bastide-alert: #dd3333;
	--bastide-white: #fff;
	--bastide-container: 1100px;
	--bastide-shadow: 0 18px 48px rgba(26, 22, 20, .12);
	--bastide-body-font: "Marcellus", Georgia, "Times New Roman", serif;
	--bastide-heading-font: "Cinzel", Georgia, "Times New Roman", serif;
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
	margin: 0;
	background: var(--bastide-bg);
	color: var(--bastide-text);
	font-family: var(--bastide-body-font);
	font-size: 16px;
	font-weight: 400;
	line-height: 1.75;
	text-rendering: optimizeLegibility;
}
body.menu-open { overflow: hidden; }
img { display: block; max-width: 100%; height: auto; }
figure { margin: 0; }
a { color: var(--bastide-accent); text-decoration-thickness: 1px; text-underline-offset: .16em; }
a:hover { color: var(--bastide-accent-hover); }
p { margin: 0 0 1.25rem; }
ul, ol { padding-left: 1.25rem; }
h1, h2, h3, h4, h5, h6 {
	margin: 0 0 .8em;
	color: #34302e;
	font-family: var(--bastide-heading-font);
	font-weight: 400;
	line-height: 1.25;
}
h1 { color: var(--bastide-accent); font-size: clamp(1.8rem, 3vw, 2.4rem); }
h2 { font-size: clamp(1.55rem, 2.5vw, 2rem); letter-spacing: .04em; }
h3 { font-size: clamp(1.3rem, 2vw, 1.65rem); }
h4 { font-size: 1.2rem; }
h5 { font-size: 1.15rem; }
h6 { font-size: .9rem; text-transform: uppercase; letter-spacing: .08em; }
button, input, textarea, select { font: inherit; }
:focus-visible { outline: 3px solid rgba(211, 92, 48, .55); outline-offset: 3px; }
.screen-reader-text {
	position: absolute !important;
	width: 1px; height: 1px; padding: 0; margin: -1px;
	overflow: hidden; clip: rect(0, 0, 0, 0); white-space: nowrap; border: 0;
}
.screen-reader-text:focus {
	top: 8px; left: 8px; z-index: 100000;
	width: auto; height: auto; padding: .75rem 1rem; margin: 0;
	clip: auto; background: #fff; color: #111;
}
.bastide-container { width: min(calc(100% - 40px), var(--bastide-container)); margin-inline: auto; }

/* Header */
.closure-banner {
	min-height: 33px;
	display: grid;
	place-items: center;
	padding: 5px 20px;
	background: var(--bastide-alert);
	color: #fff;
	font-size: 12px;
	letter-spacing: .02em;
	text-align: center;
}
.site-header { position: relative; z-index: 50; background: var(--bastide-bg); }
.site-header__main {
	position: relative;
	display: grid;
	grid-template-columns: 1fr auto 1fr;
	align-items: center;
	min-height: 176px;
	gap: 28px;
}
.site-header__phone { justify-self: start; color: #393534; font-size: 14px; text-decoration: none; }
.site-header__phone::before { content: "☎"; margin-right: .45rem; color: var(--bastide-accent); }
.site-branding { justify-self: center; }
.site-branding img { width: min(360px, 34vw); max-height: 124px; object-fit: contain; }
.site-header__actions { justify-self: end; display: flex; align-items: center; gap: 18px; }
.language-switcher ul { display: flex; gap: 7px; margin: 0; padding: 0; list-style: none; }
.language-switcher a {
	display: grid; place-items: center; min-width: 32px; min-height: 32px;
	border-radius: 50%; color: #3d3937; font-size: 11px; text-decoration: none;
}
.language-switcher a[aria-current="page"] { background: rgba(211, 92, 48, .12); color: var(--bastide-accent); font-weight: 700; }
.header-booking { white-space: nowrap; }
.menu-toggle { display: none; border: 0; background: transparent; color: #1d1b1a; cursor: pointer; }
.menu-toggle__bars, .menu-toggle__bars::before, .menu-toggle__bars::after {
	display: block; width: 26px; height: 2px; background: currentColor; transition: transform .2s ease, opacity .2s ease;
}
.menu-toggle__bars { position: relative; }
.menu-toggle__bars::before, .menu-toggle__bars::after { content: ""; position: absolute; left: 0; }
.menu-toggle__bars::before { top: -8px; }
.menu-toggle__bars::after { top: 8px; }
.primary-navigation { min-height: 52px; border-top: 1px solid rgba(0,0,0,.045); border-bottom: 1px solid rgba(0,0,0,.055); }
.primary-menu { display: flex; align-items: stretch; justify-content: center; margin: 0; padding: 0; list-style: none; }
.primary-menu > li { position: relative; }
.primary-menu a {
	display: flex; align-items: center; min-height: 51px; padding: 0 13px;
	color: #121212; font-size: 12px; line-height: 1.2; text-decoration: none;
}
.primary-menu > li:hover > a,
.primary-menu > .current-menu-item > a,
.primary-menu > .current-menu-ancestor > a { background: rgba(211,92,47,.1); font-weight: 700; }
.primary-menu .sub-menu {
	position: absolute; top: 100%; left: 0; z-index: 60;
	min-width: 270px; max-height: min(70vh, 620px); overflow-y: auto;
	margin: 0; padding: 8px 0; list-style: none;
	background: rgba(238,236,241,.97); box-shadow: var(--bastide-shadow);
	opacity: 0; visibility: hidden; transform: translateY(8px); transition: .18s ease;
}
.primary-menu li:hover > .sub-menu,
.primary-menu li:focus-within > .sub-menu { opacity: 1; visibility: visible; transform: translateY(0); }
.primary-menu .sub-menu a { min-height: 38px; padding: 7px 16px; font-size: 13px; }
.primary-menu .sub-menu a:hover { background: #fff; color: #f53644; }
.submenu-toggle { display: none; }

/* Buttons */
.button, .bastide-button, .wp-element-button {
	display: inline-flex; align-items: center; justify-content: center; gap: .6rem;
	min-height: 46px; padding: .7rem 1.3rem;
	border: 1px solid var(--bastide-accent); border-radius: 4px;
	background: var(--bastide-accent); color: #fff;
	font-family: var(--bastide-body-font); font-size: 13px; letter-spacing: .13em;
	line-height: 1.2; text-decoration: none; text-transform: uppercase;
	cursor: pointer; transition: background .2s ease, border-color .2s ease, transform .2s ease;
}
.button:hover, .bastide-button:hover, .wp-element-button:hover { background: var(--bastide-accent-hover); border-color: var(--bastide-accent-hover); color: #fff; transform: translateY(-1px); }
.button--ghost { border-color: rgba(255,255,255,.9); background: transparent; color: #fff; }
.button--ghost:hover { border-color: #fff; background: #fff; color: #2e2927; }

/* Hero */
.home-hero { position: relative; min-height: min(70vh, 760px); overflow: hidden; background: #25211f; color: #fff; }
.home-hero__slides { min-height: inherit; }
.home-hero__slide {
	position: absolute; inset: 0; display: grid; place-items: center;
	background-position: center top; background-size: cover;
	opacity: 0; visibility: hidden; transition: opacity .9s ease;
}
.home-hero__slide::before { content: ""; position: absolute; inset: 0; background: linear-gradient(90deg, rgba(15,11,10,.35), rgba(15,11,10,.12) 50%, rgba(15,11,10,.28)); }
.home-hero__slide.is-active { opacity: 1; visibility: visible; }
.home-hero__content { position: relative; z-index: 2; width: min(calc(100% - 40px), 920px); text-align: center; }
.home-hero__eyebrow { margin-bottom: 1rem; font-size: 13px; letter-spacing: .22em; text-transform: uppercase; }
.home-hero h1 { margin-bottom: 1.2rem; color: #fff; font-size: clamp(2rem, 3vw, 2.25rem); text-shadow: 0 2px 18px rgba(0,0,0,.3); }
.home-hero__actions { display: flex; justify-content: center; flex-wrap: wrap; gap: 14px; }
.home-hero__actions .button { min-height: 54px; padding-inline: 2.7rem; }
.home-hero__dots { position: absolute; left: 50%; bottom: 25px; z-index: 3; display: flex; gap: 9px; transform: translateX(-50%); }
.home-hero__dot { width: 11px; height: 11px; padding: 0; border: 1px solid #fff; border-radius: 50%; background: transparent; cursor: pointer; }
.home-hero__dot[aria-current="true"] { background: #fff; }
.page-hero { min-height: clamp(280px, 38vw, 500px); background-position: center; background-size: cover; }
.page-hero::after { content: ""; display: block; min-height: inherit; background: linear-gradient(180deg, transparent 55%, rgba(0,0,0,.08)); }

/* Content */
.site-main { min-height: 50vh; }
.page-shell { padding: clamp(48px, 7vw, 92px) 0; }
.page-header { margin-bottom: 2.5rem; text-align: center; }
.page-id-17538 .page-shell,
.page-id-17592 .page-shell { padding-top: clamp(36px, 4vw, 56px); }
.page-id-17538 .page-header,
.page-id-17592 .page-header { margin-bottom: 1.5rem; }
.page-id-17538 .entry-content .bastide-spacer,
.page-id-17592 .entry-content .bastide-spacer { height: clamp(.75rem, 2vw, 1.25rem) !important; }
.page-id-17538 .bastide-gallery--image-grid,
.page-id-17592 .bastide-gallery--image-grid { gap: clamp(.45rem, 1vw, .8rem); margin-block: 1rem; }
.page-id-17538 .bastide-gallery--image-grid .bastide-gallery__link img,
.page-id-17592 .bastide-gallery--image-grid .bastide-gallery__link img { aspect-ratio: 1; }
.entry-content::after { content: ""; display: table; clear: both; }
.entry-content > :first-child { margin-top: 0; }
.entry-content iframe { max-width: 100%; }
.bastide-section { width: 100%; }
.bastide-section.bastide-row--full-width { max-width: 100%; margin-inline: 0 !important; }
.bastide-section.bastide-row--constrained { width: min(calc(100% - 30px), 1140px); margin-inline: auto !important; }
.bastide-section.bastide-row--grid { width: min(calc(100% - 40px), var(--bastide-container)); margin-inline: auto; }
.bastide-grid { display: flex; flex-wrap: wrap; align-items: stretch; }
.bastide-grid__column, .bastide-column { min-width: 0; width: 100%; padding-inline: 20px; }
.bastide-grid__column--1-1, .bastide-column--1-1 { flex: 0 0 100%; max-width: 100%; }
.bastide-grid__column--1-2, .bastide-column--1-2 { flex: 0 0 50%; max-width: 50%; }
.bastide-grid__column--1-3, .bastide-column--1-3 { flex: 0 0 33.3333%; max-width: 33.3333%; }
.bastide-grid__column--1-4, .bastide-column--1-4 { flex: 0 0 25%; max-width: 25%; }
.bastide-grid__column--2-3, .bastide-column--2-3 { flex: 0 0 66.6667%; max-width: 66.6667%; }
.bastide-grid__column--3-4, .bastide-column--3-4 { flex: 0 0 75%; max-width: 75%; }
.bastide-grid--inner { margin-inline: -20px; }
.bastide-prose { width: 100%; }
.has-text-align-center { text-align: center; }
.has-text-align-right { text-align: right; }
.bastide-separator { width: 91px; height: 1px; margin: 2rem auto; border: 0; background: #818181; }
.bastide-spacer { max-height: 180px; }
.room_thumbs { background: var(--bastide-room); }
.room_thumbs .bastide-grid__column { padding: 0; }
.room-card, .bastide-image-card { position: relative; min-height: 330px; overflow: hidden; background: #332d29; }
.room-card__media, .room-card__media img { width: 100%; height: 100%; min-height: inherit; }
.room-card__media img { object-fit: cover; transition: transform .65s ease; }
.room-card__overlay {
	position: absolute; inset: 0; display: flex; flex-direction: column; align-items: center; justify-content: center;
	padding: 26px; background: var(--bastide-card-overlay, rgba(0,0,0,.03)); color: #fff; text-align: center;
	transition: background .25s ease;
}
.room-card:hover .room-card__overlay { background: var(--bastide-card-hover, rgba(221,153,51,.46)); }
.room-card:hover img { transform: scale(1.035); }
.room-card__title { color: #fff; font-size: clamp(1.25rem, 2.3vw, 1.9rem); text-shadow: 0 2px 12px rgba(0,0,0,.4); }
.room-card__content { opacity: 0; transform: translateY(8px); transition: .25s ease; }
.room-card:hover .room-card__content, .room-card:focus-within .room-card__content { opacity: 1; transform: none; }
.room-card__content a { color: #fff; font-size: 13px; letter-spacing: .12em; text-transform: uppercase; }
.home-referrals { padding-block: 28px; overflow: hidden; }
.home-referrals__grid { display: grid; grid-template-columns: repeat(6, minmax(90px, 1fr)); align-items: center; gap: 28px; margin: 0; padding: 0; list-style: none; }
.home-referrals__item img { width: 100%; max-height: 84px; object-fit: contain; filter: grayscale(1); opacity: .68; transition: .2s ease; }
.home-referrals__item:hover img { filter: none; opacity: 1; }
.bastide-quote { margin: 2.4rem 0; padding: 1.5rem 2rem; border-left: 3px solid var(--bastide-accent); background: var(--bastide-soft); font-size: 1.2rem; }

/* Archives */
.archive-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 28px; }
.post-card { display: flex; flex-direction: column; overflow: hidden; background: #fff; box-shadow: 0 8px 26px rgba(30,25,22,.07); }
.post-card__image { aspect-ratio: 3 / 2; overflow: hidden; background: var(--bastide-soft); }
.post-card__image img { width: 100%; height: 100%; object-fit: cover; transition: transform .4s ease; }
.post-card:hover .post-card__image img { transform: scale(1.03); }
.post-card__body { display: flex; flex: 1; flex-direction: column; padding: 24px; }
.post-card__meta { margin-bottom: .6rem; color: #89817e; font-size: 12px; text-transform: uppercase; letter-spacing: .08em; }
.post-card__title { font-size: 1.25rem; }
.post-card__title a { color: #2d2927; text-decoration: none; }
.post-card__more { margin-top: auto; font-size: 12px; letter-spacing: .12em; text-transform: uppercase; }
.navigation.pagination { margin-top: 3rem; }
.nav-links { display: flex; justify-content: center; flex-wrap: wrap; gap: 8px; }
.page-numbers { display: grid; place-items: center; min-width: 40px; min-height: 40px; padding: 4px 10px; background: #fff; color: #292523; text-decoration: none; }
.page-numbers.current, .page-numbers:hover { background: var(--bastide-accent); color: #fff; }
.single-article { width: min(calc(100% - 40px), 900px); margin-inline: auto; }
.single-article__image { margin-bottom: 2.5rem; }

/* Contact */
.contact-layout { display: grid; grid-template-columns: minmax(0, 3fr) minmax(320px, 2fr); gap: clamp(36px, 6vw, 72px); align-items: start; }
.contact-layout__form { position: sticky; top: 28px; padding: 30px; background: #fff; box-shadow: var(--bastide-shadow); }
.bastide-map-embed { position: relative; width: 100%; min-height: 420px; overflow: hidden; background: var(--bastide-soft); }
.bastide-map-embed iframe { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; }

/* Footer */
.site-footer { background: var(--bastide-dark); color: rgba(255,255,255,.75); }
.site-footer__grid { display: grid; grid-template-columns: .7fr 1.45fr 1.15fr 1fr; gap: 46px; padding-block: 72px 52px; }
.site-footer h2 { color: #fff; font-size: 14px; letter-spacing: .1em; text-transform: uppercase; }
.site-footer p, .site-footer li { font-size: 13px; line-height: 1.8; }
.site-footer ul { margin: 0; padding: 0; list-style: none; }
.site-footer a { color: #fff; text-decoration: none; }
.site-footer a:hover { color: #f0a487; }
.footer-logo { width: 145px; opacity: .95; }
.footer-socials { display: flex; flex-wrap: wrap; gap: 10px; }
.footer-socials a { display: grid; place-items: center; min-width: 38px; min-height: 38px; padding: 6px; border: 1px solid rgba(255,255,255,.2); border-radius: 50%; font-size: 11px; }
.site-info { padding: 18px 20px; background: var(--bastide-darker); color: rgba(255,255,255,.58); font-size: 12px; text-align: center; }

/* Search and 404 */
.search-form { display: flex; max-width: 560px; margin: 2rem auto; }
.search-form label { flex: 1; }
.search-field { width: 100%; min-height: 48px; padding: .65rem .9rem; border: 1px solid #d2cfcd; background: #fff; }
.search-submit { border-radius: 0 4px 4px 0; }
.empty-state { max-width: 680px; margin: 0 auto; padding-block: 5rem; text-align: center; }

@media (max-width: 1200px) {
	:root { --bastide-container: 950px; }
	.primary-menu a { padding-inline: 9px; font-size: 11px; }
}

@media (max-width: 1000px) {
	.closure-banner, .site-header__phone, .header-booking { display: none; }
	.site-header { background: var(--bastide-soft); }
	.site-header__main { grid-template-columns: 44px 1fr auto; min-height: 100px; gap: 12px; }
	.menu-toggle { display: inline-grid; place-items: center; width: 44px; height: 44px; justify-self: start; }
	.site-branding { grid-column: 2; }
	.site-branding img { width: 180px; max-width: 45vw; max-height: 66px; }
	.site-header__actions { grid-column: 3; }
	.primary-navigation {
		position: fixed; inset: 100px 0 0 0; z-index: 100;
		overflow-y: auto; border: 0; background: rgba(238,236,241,.99);
		opacity: 0; visibility: hidden; transform: translateX(-100%); transition: .25s ease;
	}
	.admin-bar .primary-navigation { top: 132px; }
	.menu-open .primary-navigation { opacity: 1; visibility: visible; transform: none; }
	.menu-open .menu-toggle__bars { background: transparent; }
	.menu-open .menu-toggle__bars::before { top: 0; transform: rotate(45deg); }
	.menu-open .menu-toggle__bars::after { top: 0; transform: rotate(-45deg); }
	.primary-menu { display: block; padding: 18px 24px 60px; }
	.primary-menu li { position: relative; border-bottom: 1px solid rgba(0,0,0,.07); }
	.primary-menu a { min-height: 48px; padding: 10px 48px 10px 8px; font-size: 14px; }
	.primary-menu .sub-menu { position: static; display: none; max-height: none; min-width: 0; padding: 0 0 10px 16px; overflow: visible; background: transparent; box-shadow: none; opacity: 1; visibility: visible; transform: none; }
	.primary-menu .menu-item.submenu-open > .sub-menu { display: block; }
	.submenu-toggle { position: absolute; top: 6px; right: 0; z-index: 2; display: grid; place-items: center; width: 40px; height: 40px; border: 0; background: transparent; color: #111; }
	.submenu-toggle::before { content: "+"; font-size: 22px; }
	.submenu-open > .submenu-toggle::before { content: "−"; }
	.home-hero { min-height: min(70vh, 620px); }
	.page-hero { min-height: min(48vw, 420px); }
	.archive-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
	.entry-content { min-width: 0; overflow-wrap: anywhere; }
	.contact-layout { grid-template-columns: minmax(0, 1fr); }
	.contact-layout > * { min-width: 0; }
	.contact-layout__form { position: static; }
	.site-footer__grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

@media (max-width: 767px) {
	body { font-size: 15px; }
	.bastide-container { width: min(calc(100% - 30px), var(--bastide-container)); }
	.site-header__main { min-height: 92px; }
	.primary-navigation { top: 92px; }
	.admin-bar .primary-navigation { top: 138px; }
	.language-switcher a { min-width: 28px; min-height: 28px; font-size: 10px; }
	.home-hero { min-height: 560px; }
	.home-hero h1 { font-size: clamp(2rem, 9vw, 2.25rem); }
	.home-hero__actions { flex-direction: column; align-items: center; }
	.home-hero__actions .button { width: min(100%, 280px); min-height: 49px; padding-inline: 1.2rem; }
	.page-hero { min-height: 52vw; background-size: cover; background-repeat: no-repeat; background-color: #ddd8d4; }
	.page-shell { padding-block: 46px; }
	.bastide-grid__column, .bastide-column,
	.bastide-grid__column--1-2, .bastide-column--1-2,
	.bastide-grid__column--1-3, .bastide-column--1-3,
	.bastide-grid__column--1-4, .bastide-column--1-4,
	.bastide-grid__column--2-3, .bastide-column--2-3,
	.bastide-grid__column--3-4, .bastide-column--3-4 { flex-basis: 100%; max-width: 100%; }
	.room_thumbs { padding-inline: 40px; gap: 18px; }
	.room-card { min-height: 300px; }
	.room-card__content { opacity: 1; transform: none; }
	.home-referrals__grid { grid-template-columns: repeat(3, minmax(70px, 1fr)); gap: 20px; }
	.archive-grid { grid-template-columns: 1fr; }
	.contact-layout__form { padding: 22px; }
	.site-footer__grid { grid-template-columns: 1fr; gap: 26px; padding-block: 48px 38px; }
	.site-footer__brand { order: -1; }
}

@media (prefers-reduced-motion: reduce) {
	*, *::before, *::after { scroll-behavior: auto !important; animation-duration: .01ms !important; animation-iteration-count: 1 !important; transition-duration: .01ms !important; }
}
