/* La Bombarde — surcouche de styles (site + éditeur).
   Couleurs : var(--wp--preset--color--*) ; or #D7B56D jamais en texte sur fond clair. */

/* Liens : le theme.json du starter fige la taille (a:where) */
a { font-size: inherit; }

/* ---------- Marque (logo) ---------- */
.bombarde-brand { display: inline-flex; align-items: center; line-height: 0; }
.bombarde-brand img { height: 64px; width: auto; display: block; }
.bombarde-brand--pied img { height: 72px; margin-bottom: 1rem; }
@media (max-width: 600px) { .bombarde-brand img { height: 48px; } }

/* ---------- En-tête ---------- */
.bombarde-header { position: sticky; top: 0; z-index: 50; border-bottom: 1px solid rgb(215 181 109 / .35); }
.admin-bar .bombarde-header { top: 32px; }
@media (max-width: 782px) { .admin-bar .bombarde-header { top: 46px; } }
.bombarde-header .wp-block-navigation a { color: var(--wp--preset--color--base); text-decoration: none; padding-block: .35rem; border-bottom: 2px solid transparent; }
.bombarde-header .wp-block-navigation a:hover,
.bombarde-header .wp-block-navigation .current-menu-item > a { border-bottom-color: var(--wp--preset--color--accent); }
.bombarde-header .wp-block-navigation__responsive-container-open,
.bombarde-header .wp-block-navigation__responsive-container-close { color: var(--wp--preset--color--base); min-width: 44px; min-height: 44px; justify-content: center; }

/* ---------- Ligne de crêtes (rappel du logo) ---------- */
.bombarde-crete { position: relative; }
.bombarde-crete::before {
	content: ""; position: absolute; left: 0; right: 0; bottom: 100%; height: clamp(28px, 4vw, 56px);
	pointer-events: none;
	background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 1200 60' preserveAspectRatio='none'%3E%3Cpath d='M0 60V44l70-2 60-20 40-6 50 24 60-34 30 22 40-36 26 40 22-26 40 28 50-22 30 20 60-46 30 44 50 8 40-30 20 22 60-40 26 26 30-20 40 30 60-36 40 34 50-14 60 26 40-8 50 18 37 2V60Z' fill='%232B2A29'/%3E%3Cpath d='M0 44l70-2 60-20 40-6 50 24 60-34 30 22 40-36 26 40 22-26 40 28 50-22 30 20 60-46 30 44 50 8 40-30 20 22 60-40 26 26 30-20 40 30 60-36 40 34 50-14 60 26 40-8 50 18 37 2' fill='none' stroke='%23D9DBDB' stroke-width='4' vector-effect='non-scaling-stroke'/%3E%3C/svg%3E") bottom / 100% 100% no-repeat;
}
.esdi-page__head.bombarde-crete::before { display: none; }
.bombarde-header + * .esdi-page__head { margin-top: 0; }

/* ---------- Sections de l'accueil ---------- */
.bombarde-hero { text-align: center; }
.bombarde-hero .bombarde-hero__logo img { width: min(720px, 92%); height: auto; margin-inline: auto; }
.bombarde-hero h1 { color: var(--wp--preset--color--base); }
.bombarde-hero .bombarde-hero__sous-titre { font-family: var(--wp--preset--font-family--serif); font-style: italic; color: var(--wp--preset--color--accent); font-size: var(--wp--preset--font-size--large); }
.bombarde-surtitre { font-family: var(--wp--preset--font-family--sans); font-weight: 600; text-transform: uppercase; letter-spacing: .14em; font-size: var(--wp--preset--font-size--small); color: var(--wp--preset--color--accent-2); }
.has-contrast-background-color .bombarde-surtitre { color: var(--wp--preset--color--accent); }

.bombarde-carte-item { border-top: 3px solid var(--wp--preset--color--accent); padding-top: 1.25rem; }

/* Boutons secondaires (contour) */
.wp-block-button.is-style-outline > .wp-block-button__link { border: 2px solid currentColor; background: transparent; color: inherit; }
.has-contrast-background-color .wp-block-button.is-style-outline > .wp-block-button__link:hover { background: var(--wp--preset--color--base); color: var(--wp--preset--color--contrast); }
.wp-block-button__link { min-height: 44px; display: inline-flex; align-items: center; justify-content: center; text-transform: uppercase; letter-spacing: .06em; font-size: .95rem; }

/* Bandeau « à venir » */
.bombarde-a-venir { border: 2px dashed var(--wp--preset--color--accent); }

/* Texte sur fond sombre */
.has-contrast-background-color a:not(.wp-element-button) { color: var(--wp--preset--color--accent); }
.has-contrast-background-color h2, .has-contrast-background-color h3 { color: inherit; }

/* Formulaire de contact (Fluent Forms) */
.fluentform .ff-btn-submit { background: var(--wp--preset--color--accent) !important; color: var(--wp--preset--color--contrast) !important; border-radius: 2px; font-weight: 600; text-transform: uppercase; letter-spacing: .06em; min-height: 44px; }

/* Sections pleine largeur collées (pas de liseré blanc entre bandes) */
.wp-site-blocks > main, .wp-site-blocks > footer { margin-block-start: 0; }
.bombarde-accueil > .wp-block-post-content > .alignfull { margin-block-start: 0; }
@media (max-width: 600px) {
	.bombarde-hero .bombarde-hero__sous-titre { font-size: 1.05rem; }
	.bombarde-hero h1 { font-size: 2.3rem; }
	h2 { overflow-wrap: anywhere; }
}

/* Menu mobile ouvert : grandes cibles tactiles */
.bombarde-header .wp-block-navigation__responsive-container.is-menu-open .wp-block-navigation-item a { font-size: 1.4rem; padding-block: .75rem; min-height: 48px; }

/* =====================================================================
   ONE-PAGE IMMERSIVE (accueil)
   Courbes : --b-ease-out pour entrées ; aucune courbe à dépassement.
   ===================================================================== */
:root { --b-ease-out: cubic-bezier(0.23, 1, 0.32, 1); }
html { scroll-behavior: smooth; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }
[id] { scroll-margin-top: 96px; }

/* ---------- Scène d'ouverture : nuit en station ---------- */
.bombarde-scene {
	position: relative; overflow: hidden; isolation: isolate;
	min-height: min(calc(100svh - 80px), 920px); display: grid; align-content: center;
	padding-bottom: clamp(7rem, 16vw, 13rem) !important;
	background:
		radial-gradient(1px 1px at 12% 18%, rgb(255 255 255 / .7) 50%, transparent 51%),
		radial-gradient(1px 1px at 27% 8%, rgb(255 255 255 / .5) 50%, transparent 51%),
		radial-gradient(1.5px 1.5px at 44% 22%, rgb(255 255 255 / .6) 50%, transparent 51%),
		radial-gradient(1px 1px at 63% 12%, rgb(255 255 255 / .5) 50%, transparent 51%),
		radial-gradient(1.5px 1.5px at 78% 26%, rgb(255 255 255 / .6) 50%, transparent 51%),
		radial-gradient(1px 1px at 91% 9%, rgb(255 255 255 / .5) 50%, transparent 51%),
		linear-gradient(180deg, #1b1a19 0%, #2b2a29 16%, #2b2a29 100%) !important;
}
/* Sans JS : une crête enneigée statique en bas de scène */
.bombarde-scene::after {
	content: ""; position: absolute; inset: auto 0 -1px 0; height: clamp(60px, 9vw, 120px); z-index: 1;
	background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 1200 60' preserveAspectRatio='none'%3E%3Cpath d='M0 60V44l70-2 60-20 40-6 50 24 60-34 30 22 40-36 26 40 22-26 40 28 50-22 30 20 60-46 30 44 50 8 40-30 20 22 60-40 26 26 30-20 40 30 60-36 40 34 50-14 60 26 40-8 50 18 37 2V60Z' fill='%23fff'/%3E%3C/svg%3E") bottom / 100% 100% no-repeat;
}
.bombarde-scene.has-decor::after { display: none; }
.bombarde-scene > .bombarde-scene__decor { position: absolute; inset: 0; z-index: 0; pointer-events: none; max-width: none !important; margin: 0 !important; }
.bombarde-scene__neige { position: absolute; inset: 0; width: 100%; height: 100%; }
.bombarde-scene__crete { position: absolute; left: -2%; right: -2%; bottom: -1px; will-change: transform; }
.bombarde-scene__crete svg { display: block; width: 100%; }
.bombarde-scene__crete--1 svg { height: clamp(110px, 17vw, 240px); }
.bombarde-scene__crete--2 svg { height: clamp(80px, 12vw, 170px); }
.bombarde-scene__crete--3 svg { height: clamp(56px, 8vw, 110px); }
.bombarde-scene__contenu { position: relative; z-index: 2; will-change: transform; }
.bombarde-scene .bombarde-hero__logo { text-align: center; }
.bombarde-scene .bombarde-hero__logo img { display: block; width: min(760px, 92%); height: auto; margin-inline: auto; }
.bombarde-scene h1 { color: var(--wp--preset--color--base); }
.bombarde-scene .bombarde-hero__sous-titre { font-family: var(--wp--preset--font-family--serif); font-style: italic; color: var(--wp--preset--color--accent); font-size: var(--wp--preset--font-size--large); }

/* Entrée de la scène (CSS seul : visible même si le JS ne charge pas) */
@keyframes bombarde-entree { from { opacity: 0; transform: translateY(18px); } to { opacity: 1; transform: none; } }
.bombarde-entree, .bombarde-scene .wp-block-buttons { animation: bombarde-entree 900ms var(--b-ease-out) both; }
.bombarde-scene h1.bombarde-entree { animation-delay: 180ms; }
.bombarde-scene .bombarde-hero__sous-titre { animation-delay: 300ms; }
.bombarde-scene .wp-block-buttons { animation-delay: 420ms; }

/* ---------- Les trois mots (01 Pizzas / 02 Resto / 03 Après-ski) ---------- */
.bombarde-esprit { overflow: hidden; }
.bombarde-mot { display: grid !important; grid-template-columns: auto minmax(0, 1fr); column-gap: clamp(1rem, 3vw, 2.5rem); align-items: baseline; border-top: 1px solid var(--wp--preset--color--crete); max-width: 1100px !important; }
.bombarde-mot:last-child { border-bottom: 1px solid var(--wp--preset--color--crete); }
.bombarde-mot > * { margin-block: 0 !important; margin-inline: 0 !important; max-width: none !important; }
.bombarde-mot__num { font-family: var(--wp--preset--font-family--serif); font-style: italic; color: var(--wp--preset--color--accent-2); font-size: var(--wp--preset--font-size--large); grid-row: span 2; }
.bombarde-mot__titre { font-size: clamp(3.2rem, 1.6rem + 8vw, 8.5rem) !important; line-height: .9 !important; letter-spacing: .01em; }
.bombarde-mot__texte { color: var(--wp--preset--color--contrast-2); margin-top: .5rem !important; }
@media (hover: hover) and (pointer: fine) {
	.bombarde-mot__titre { transition: color 200ms ease, transform 300ms var(--b-ease-out); }
	.bombarde-mot:hover .bombarde-mot__titre { color: var(--wp--preset--color--accent-2); transform: translateX(10px); }
}

/* ---------- Bandeau défilant ---------- */
.bombarde-bandeau { overflow: hidden; }
.bombarde-defile { margin: 0; white-space: nowrap; font-family: var(--wp--preset--font-family--display); font-size: clamp(2rem, 1.2rem + 3vw, 3.6rem); line-height: 1; letter-spacing: .03em; text-transform: uppercase; }
.bombarde-defile__piste { display: inline-flex; animation: bombarde-defile 38s linear infinite; }
@keyframes bombarde-defile { to { transform: translateX(-50%); } }
@media (prefers-reduced-motion: reduce) { .bombarde-defile__piste { animation: none; } }

/* ---------- Révélations au scroll (armées par le JS seulement) ---------- */
.bombarde-anime .bombarde-reveal { opacity: 0; transform: translateY(28px); transition: opacity 700ms var(--b-ease-out), transform 900ms var(--b-ease-out); }
.bombarde-anime .bombarde-reveal.is-visible { opacity: 1; transform: none; }
.bombarde-anime .bombarde-mot.bombarde-reveal { transform: translateY(40px); }
.bombarde-anime .bombarde-mot.bombarde-reveal.is-visible { transform: none; }
.bombarde-anime .bombarde-mot:nth-of-type(2).is-visible { transition-delay: 60ms; }
@media (prefers-reduced-motion: reduce) {
	.bombarde-anime .bombarde-reveal, .bombarde-anime .bombarde-mot.bombarde-reveal { transform: none; transition: opacity 400ms ease; }
	.bombarde-entree, .bombarde-scene .wp-block-buttons { animation: none; }
	.bombarde-scene__crete, .bombarde-scene__contenu { will-change: auto; }
}

/* Mobile */
@media (max-width: 600px) {
	.bombarde-scene { min-height: 88svh; }
	.bombarde-mot { grid-template-columns: minmax(0, 1fr); }
	.bombarde-mot__num { grid-row: auto; }
}

/* Dans l'éditeur : pas d'état caché, pas de hauteur plein écran */
.editor-styles-wrapper .bombarde-reveal { opacity: 1 !important; transform: none !important; }
.editor-styles-wrapper .bombarde-scene { min-height: 0; }

@media (max-width: 600px) {
	.bombarde-scene .bombarde-hero__sous-titre { font-size: 1.05rem; }
	.bombarde-scene { min-height: calc(100svh - 64px); }
}
