/* ==========================================================================
   Maison Espaces — styles du thème (hors utilitaires Tailwind)
   ========================================================================== */

/* Polices --------------------------------------------------------------- */
@font-face { font-family: "Apple Garamond"; src: url("../fonts/AppleGaramond.ttf") format("truetype"); font-weight: 400; font-style: normal; font-display: swap; }
@font-face { font-family: "Apple Garamond"; src: url("../fonts/AppleGaramond-Italic.ttf") format("truetype"); font-weight: 400; font-style: italic; font-display: swap; }
@font-face { font-family: "Apple Garamond"; src: url("../fonts/AppleGaramond-Light.ttf") format("truetype"); font-weight: 300; font-style: normal; font-display: swap; }
@font-face { font-family: "Apple Garamond"; src: url("../fonts/AppleGaramond-LightItalic.ttf") format("truetype"); font-weight: 300; font-style: italic; font-display: swap; }
@font-face { font-family: "Apple Garamond"; src: url("../fonts/AppleGaramond-Bold.ttf") format("truetype"); font-weight: 700; font-style: normal; font-display: swap; }
@font-face { font-family: "Apple Garamond"; src: url("../fonts/AppleGaramond-BoldItalic.ttf") format("truetype"); font-weight: 700; font-style: italic; font-display: swap; }

.font-apple { font-family: "Apple Garamond", Garamond, "Times New Roman", serif; }
.font-inter, body { font-family: "Inter", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif; }

/* Base (globals.css d'origine) — dans la couche "base" pour que les utilitaires Tailwind restent prioritaires */
@layer base {
	*, *::before, *::after { margin: 0; padding: 0; box-sizing: border-box; }
	html, body { margin: 0; padding: 0; }
	body { overflow-x: hidden; -webkit-font-smoothing: antialiased; }
	a { text-decoration: none; color: inherit; }
	button, input, textarea { font: inherit; }
	ul, ol { list-style-position: inside; }
}

/* Lenis (défilement fluide) */
html.lenis, html.lenis body { height: auto; }
.lenis.lenis-smooth { scroll-behavior: auto !important; }
.lenis.lenis-smooth [data-lenis-prevent] { overscroll-behavior: contain; }
.lenis.lenis-stopped { overflow: hidden; }

/* Accessibilité */
.screen-reader-text { position: absolute !important; width: 1px; height: 1px; overflow: hidden; clip: rect(1px, 1px, 1px, 1px); white-space: nowrap; }
.screen-reader-text:focus { clip: auto; width: auto; height: auto; z-index: 100000; background: #fff; color: #000; padding: 1rem; top: 1rem; left: 1rem; }
.me-hp { position: absolute !important; left: -9999px !important; width: 1px; height: 1px; opacity: 0; }

/* Barre d'admin WordPress : décale la navigation */
.admin-bar .me-navbar { top: 32px; }
@media (max-width: 782px) { .admin-bar .me-navbar { top: 46px; } }

/* Navigation ------------------------------------------------------------ */
.me-burger span { background: var(--nav-color, #000); }
.me-menu-open .me-burger span { background: #DCFDA9; }
.me-menu-open .me-burger span:nth-child(1) { transform: translateY(8px) rotate(45deg); }
.me-menu-open .me-burger span:nth-child(2) { opacity: 0; transform: scaleX(0); }
.me-menu-open .me-burger span:nth-child(3) { transform: translateY(-8px) rotate(-45deg); }

/* Animations : état initial avant JS ------------------------------------ */
.word { display: inline-block; overflow: hidden; white-space: nowrap; vertical-align: top; }
.char { display: inline-block; will-change: transform; }
.line { overflow: hidden; }

.me-reveal-cover { display: none; }
.me-js .me-reveal-cover { display: block; }
.me-js [data-reveal="text"] > .me-reveal-inner { opacity: 0; }
.me-js [data-reveal="letters"], .me-js [data-reveal="words"] { visibility: hidden; }
.me-js [data-reveal="button"] { opacity: 0; }

/* Sans animation (mouvement réduit ou librairie non chargée) */
.me-static [data-reveal="text"] > .me-reveal-inner,
.me-static [data-reveal="button"] { opacity: 1 !important; }
.me-static [data-reveal="letters"], .me-static [data-reveal="words"] { visibility: visible !important; }
.me-static .me-reveal-cover { display: none !important; }

/* Carrousel mobile ------------------------------------------------------ */
.me-snap { scroll-snap-type: x mandatory; -webkit-overflow-scrolling: touch; scrollbar-width: none; }
.me-snap::-webkit-scrollbar { display: none; }

/* Section Œuvres : placement en grille (mobile : alterné, ordinateur : réglé dans l'admin) */
.me-art-card { grid-column-start: var(--m-cs); grid-column-end: span 5; }
@media (min-width: 768px) {
	.me-art-card { grid-column-start: var(--d-cs); grid-column-end: var(--d-ce); }
}

/* Textes riches --------------------------------------------------------- */
/* Les titres "riches" héritent de la typo de leur conteneur */
h1 p, h2 p, h3 p, h4 p { font: inherit; color: inherit; text-transform: inherit; line-height: inherit; }
s, del, .line-through { text-decoration: line-through; }

/* Paragraphes successifs : léger espacement (équivalent des blocs Prismic) */
[data-reveal="text"] p + p,
.me-rt-paragraph p + p,
.me-rt-links p + p { margin-top: 1em; }

.me-rt-paragraph a { color: #A2A876; font-weight: 700; text-decoration: underline; }
.me-rt-links a { color: inherit; text-decoration: underline; }

/* Description des sections 4 cartes (ordinateur) */
.me-fc-desc h3 { font-weight: 500; color: #ef4444; }
.me-fc-desc h3 ~ h3 { margin-top: 2rem; }

/* Mentions / CGU */
.me-rt-cgu p { color: #000; font-weight: 300; font-size: 16px; }
.me-rt-cgu h4 { color: #A2A876; font-size: 22px; font-weight: 400; }
.me-rt-cgu ul, .me-rt-cgu ol { color: #000; font-weight: 300; }

/* Journal — blocs de texte */
.me-rt-journal p { color: #A2A876; font-weight: 300; font-size: 22px; }
.me-rt-journal p + p { margin-top: 1em; }
.me-rt-journal h2 { font-family: "Apple Garamond", Garamond, serif; color: #A2A876; font-weight: 400; font-size: 60px; line-height: 1; }
.me-rt-journal h3 { font-family: "Apple Garamond", Garamond, serif; color: #A2A876; font-weight: 400; font-size: 40px; line-height: 1; }
.me-rt-journal a { color: inherit; text-decoration: underline; }

/* Contenu de l'éditeur (articles du Journal sans sections, pages simples) */
.me-prose { color: #A2A876; font-weight: 300; font-size: 22px; line-height: 1.45; }
.me-prose > * + * { margin-top: 1em; }
.me-prose h2, .me-prose h3, .me-prose h4 { font-family: "Apple Garamond", Garamond, serif; font-weight: 400; line-height: 1; margin-top: 1.5em; }
.me-prose h2 { font-size: 60px; }
.me-prose h3 { font-size: 40px; }
.me-prose h4 { font-size: 30px; }
.me-prose a { color: inherit; text-decoration: underline; }
.me-prose img { max-width: 100%; height: auto; }
.me-prose figure { margin: 2em 0; }
.me-prose figcaption { font-size: 16px; margin-top: .5em; }
.me-prose blockquote { font-family: "Apple Garamond", Garamond, serif; font-size: 42px; line-height: 1.1; padding: 1em; background: #A2A876; color: #DCFDA9; }
.me-prose ul, .me-prose ol { padding-left: 1em; }
.me-prose .wp-block-gallery, .me-prose .wp-block-columns { gap: .75rem; }
.me-prose .alignwide, .me-prose .alignfull { margin-left: calc(50% - 50vw + 1.25rem); margin-right: calc(50% - 50vw + 1.25rem); max-width: none; }

/* Pagination du Journal */
.me-pagination .page-numbers { color: #A2A876; }
.me-pagination .page-numbers.current { text-decoration: underline; }

/* Logo du bloc pied de page : moitié de sa taille sur mobile */
@media (max-width: 768px) { .me-footer-logo { width: 50%; height: auto; } }

/* Elementor ---------------------------------------------------------------
   Les widgets « Maison Espaces » sont des sections pleine largeur : ils sortent
   d'un conteneur « en boîte » et n'ont pas de marge ajoutée par Elementor. */
.elementor-widget[class*="elementor-widget-me_"] { width: 100vw; max-width: 100vw; margin-left: calc(50% - 50vw) !important; margin-right: 0 !important; }
.elementor-widget[class*="elementor-widget-me_"] > .elementor-widget-container { margin: 0; padding: 0; }

/* Photos « plein cadre » : prioritaires sur la règle d'Elementor (.elementor img { height:auto }) */
img.me-fill { position: absolute !important; inset: 0 !important; width: 100% !important; height: 100% !important; max-width: none !important; object-fit: cover !important; }
video.me-fill-video { width: 100% !important; height: 100% !important; max-width: none !important; object-fit: cover !important; }

/* Contenu en pleine largeur : les blocs « Pleine largeur » vont jusqu'aux bords de l'écran */
.me-prose--full .alignfull { margin-left: -1.25rem; margin-right: -1.25rem; }
.me-prose--full .alignwide { margin-left: 0; margin-right: 0; }
.me-prose .alignfull img, .me-prose .alignwide img { width: 100%; }

/* Fil Instagram (Smash Balloon) intégré au bloc « Suivez-nous » : grille 4 colonnes, format vertical, voile prune au survol */
.me-insta-feed #sb_instagram { padding: 0 !important; width: 100% !important; max-width: none !important; }
.me-insta-feed #sb_instagram #sbi_images { display: grid !important; grid-template-columns: repeat(4, minmax(0, 1fr)) !important; gap: 8px !important; padding: 0 !important; width: 100% !important; }
@media (max-width: 767px) { .me-insta-feed #sb_instagram #sbi_images { grid-template-columns: repeat(2, minmax(0, 1fr)) !important; } }
.me-insta-feed #sb_instagram .sbi_item { width: 100% !important; max-width: none !important; padding: 0 !important; margin: 0 !important; }
.me-insta-feed #sb_instagram .sbi_photo_wrap { position: relative; }
.me-insta-feed #sb_instagram .sbi_photo { display: block !important; position: relative; aspect-ratio: 4 / 5; height: auto !important; overflow: hidden; background-size: cover !important; background-position: center !important; }
.me-insta-feed #sb_instagram .sbi_photo img { position: absolute !important; inset: 0; width: 100% !important; height: 100% !important; max-width: none !important; object-fit: cover; opacity: 1 !important; }
.me-insta-feed #sb_instagram .sbi_photo::after { content: ""; position: absolute; inset: 0; background: #74153A; opacity: 0; transition: opacity .3s ease; pointer-events: none; }
.me-insta-feed #sb_instagram .sbi_photo:hover::after { opacity: .7; }
.me-insta-feed #sb_instagram .sb_instagram_header, .me-insta-feed #sb_instagram #sbi_load { display: none !important; }

/* Texte des cartes Collections : taille réglable (moitié sur mobile) */
.me-card-label { font-size: calc(var(--card-fs, 60px) / 2); }
@media (min-width: 768px) { .me-card-label { font-size: var(--card-fs, 60px); } }

/* Texte des cartes (section « 4 cartes ») : taille réglable, titres internes alignés sur le texte */
.me-fc-text { font-size: calc(var(--fc-fs, 22px) * .82); line-height: 1.25; }
@media (min-width: 768px) { .me-fc-text { font-size: var(--fc-fs, 22px); } }
.me-fc-text :is(p, h1, h2, h3, h4, h5, h6, li) { font-size: inherit; line-height: inherit; font-family: inherit; color: inherit; margin: 0; }
.me-fc-w, .me-fc-w :is(p, h1, h2, h3, h4, h5, h6, li, strong, b) { font-weight: var(--fc-fw) !important; }
.me-fc-text p + p, [data-reveal="text"] .me-fc-text p + p { margin-top: 0; }

/* ---------- Journal : filtre par catégories ---------- */
.me-jfilter { display: flex; align-items: baseline; gap: 40px; margin: 0 0 56px; padding: 18px 0; border-top: 1px solid rgba(162, 168, 118, .35); border-bottom: 1px solid rgba(162, 168, 118, .35); }
.me-jfilter__label { flex: none; font-family: "Inter", system-ui, sans-serif; font-size: 11px; font-weight: 400; letter-spacing: .22em; text-transform: uppercase; color: #A2A876; opacity: .85; }
.me-jfilter__list { display: flex; gap: 34px; margin: 0; padding: 0 24px 4px 0; list-style: none; overflow-x: auto; white-space: nowrap; scrollbar-width: none; -webkit-overflow-scrolling: touch; }
.me-jfilter__list::-webkit-scrollbar { display: none; }
.me-jfilter__list li { margin: 0; padding: 0; }
.me-jfilter__link { position: relative; display: inline-block; padding-bottom: 4px; font-family: "Apple Garamond", Garamond, serif; font-size: 26px; line-height: 1; font-weight: 400; text-transform: uppercase; color: #A2A876; text-decoration: none; transition: color .3s ease; }
.me-jfilter__link::after { content: ""; position: absolute; left: 0; right: 0; bottom: 0; height: 1px; background: currentColor; transform: scaleX(0); transform-origin: left; transition: transform .45s cubic-bezier(.22, .61, .36, 1); }
.me-jfilter__link:hover::after, .me-jfilter__link:focus-visible::after, .me-jfilter__link.is-active::after { transform: scaleX(1); }
.me-jfilter__link:hover, .me-jfilter__link.is-active { color: #74153A; }
.me-jfilter__link:focus-visible { outline: none; }
.me-jfilter__count { margin-left: 5px; font-family: "Inter", system-ui, sans-serif; font-size: 10px; font-weight: 400; letter-spacing: .04em; vertical-align: super; opacity: .65; }
.me-jresults { transition: opacity .35s ease; }
.me-jresults.is-loading { opacity: .2; pointer-events: none; }
@media (max-width: 767px) {
	.me-jfilter { flex-direction: column; gap: 12px; margin-bottom: 36px; padding: 14px 0; }
	.me-jfilter__list { gap: 26px; width: 100%; -webkit-mask-image: linear-gradient(to right, #000 82%, transparent); mask-image: linear-gradient(to right, #000 82%, transparent); }
	.me-jfilter__link { font-size: 22px; }
}

/* ---------- « À découvrir aussi » : bandeau défilant ---------- */
.me-marquee { overflow-x: auto; overflow-y: hidden; scrollbar-width: none; -webkit-overflow-scrolling: touch; cursor: grab; padding: 0 20px; }
.me-marquee::-webkit-scrollbar { display: none; }
.me-marquee.is-dragging { cursor: grabbing; }
.me-marquee.is-dragging a { pointer-events: none; }
.me-marquee__track { display: flex; width: max-content; }
.me-marquee__set { display: flex; gap: 12px; padding-right: 12px; }
.me-marquee__item { flex: 0 0 72vw; }
@media (min-width: 640px) { .me-marquee__item { flex-basis: 42vw; } }
@media (min-width: 768px) { .me-marquee__item { flex-basis: calc((100vw - 40px - 36px) / 4); } }
.me-marquee img { -webkit-user-drag: none; user-select: none; }

/* ---------- Fiche tenue : catégories ---------- */
.me-tenue-cats { display: flex; flex-wrap: wrap; gap: 8px; margin: 18px 0 0; padding: 0; list-style: none; }
.me-tenue-cats li { margin: 0; padding: 5px 12px 4px; border: 1px solid rgba(162, 168, 118, .55); border-radius: 999px; font-family: "Inter", system-ui, sans-serif; font-size: 11px; line-height: 1.2; letter-spacing: .16em; text-transform: uppercase; color: #A2A876; }

/* ---------- Archives : barre de tri par catégorie ---------- */
.me-afilter-hide { display: none !important; }
.me-afilter-zone { transition: opacity .3s ease; }
.me-afilter-zone.is-filtering { opacity: 0; }
.me-afilter { margin-bottom: 40px; }
@media (max-width: 767px) { .me-afilter--mobile { margin: 0; } }

/* ---------- Bouton Maison Espaces (widget Elementor) : identique aux boutons du site ---------- */
.me-btn-wrap { display: flex; justify-content: flex-start; }
.me-btn-wrap .me-btn { display: inline-flex; align-items: center; justify-content: center; text-align: center; box-sizing: border-box; border: 0; border-radius: 0; cursor: pointer; text-decoration: none !important; font-family: "Apple Garamond", Garamond, serif; font-weight: 400; text-transform: uppercase; line-height: 1.1; letter-spacing: 0; transition: opacity .3s ease, background-color .3s ease, color .3s ease, border-color .3s ease; -webkit-appearance: none; appearance: none; }
.me-btn-wrap .me-btn:hover { opacity: .8; }
.me-btn-wrap .me-btn:focus-visible { outline: 1px solid currentColor; outline-offset: 3px; }
.me-btn-wrap .me-btn--l { padding: 16px 32px; font-size: 24px; line-height: 28px; }
.me-btn-wrap .me-btn--m { padding: 10px 20px; font-size: 18px; }
.me-btn-wrap .me-btn--s { padding: 8px 16px; font-size: 16px; }
.me-btn-wrap .me-btn--full { display: flex; width: 100%; }
.me-btn-wrap .me-btn--vert { background: #DCFDA9; color: #A2A876; }
.me-btn-wrap .me-btn--olive { background: #A2A876; color: #FFFFFF; }
.me-btn-wrap .me-btn--prune { background: #74153A; color: #F7BCE6; }
.me-btn-wrap .me-btn--contour { background: transparent; color: #A2A876; box-shadow: inset 0 0 0 1px currentColor; }
.me-btn-wrap .me-btn--contour:hover { background: #A2A876; color: #FFFFFF; opacity: 1; }
.me-btn-wrap .me-btn--blanc { background: #FFFFFF; color: #A2A876; }
.elementor .me-btn-wrap .me-btn, .elementor .me-btn-wrap .me-btn:hover { text-decoration: none; }
@media (max-width: 767px) { .me-btn-wrap .me-btn--l { font-size: 20px; padding: 14px 26px; } }
