/* EFSD — Ergänzungen zu theme.json (Vorlage: app.efsd.de/web, globals.css). */

/* Kopfzeile */
.wp-site-blocks > header.wp-block-template-part { position: sticky; top: 0; z-index: 50; }
.admin-bar .wp-site-blocks > header.wp-block-template-part { top: 32px; }
.efsd-topbar a { color: inherit; text-decoration: none; }
.efsd-topbar a:hover { color: #fff; text-decoration: underline; }
.efsd-header > .wp-block-group { margin-block-start: 0; } /* blockGap du flow layout : bande beige entre topbar et mainbar */
/* Flou sur un pseudo-élément : backdrop-filter sur .efsd-mainbar en ferait le bloc conteneur du menu mobile (position: fixed) et l'enfermerait dans la barre. */
.efsd-mainbar { position: relative; isolation: isolate; background: rgba(255, 255, 255, .95); border-bottom: 1px solid var(--wp--preset--color--border); }
.efsd-mainbar::before { content: ""; position: absolute; inset: 0; z-index: -1; backdrop-filter: blur(8px); -webkit-backdrop-filter: blur(8px); }
.efsd-mainbar .wp-block-site-logo img, .efsd-logo img { height: 52px; width: auto; }
.efsd-cta .wp-block-button__link { border-radius: 9999px; padding: .55rem 1.4rem; }
/* Barre principale sans retour à la ligne : le menu cède la place, pas le bouton ni FR · DE. */
.efsd-cta, .efsd-lang { flex-shrink: 0; }
.efsd-lang.pll-switcher { width: auto; } /* Polylang : width 100 % écraserait le menu */
.efsd-cta .wp-block-button__link { white-space: nowrap; }

/* Titres de section */
.section-subtitle { font-family: var(--wp--preset--font-family--heading); font-size: .75rem; font-weight: 600; text-transform: uppercase; letter-spacing: .15em; color: var(--wp--preset--color--blue); }
.efsd-eyebrow { font-family: var(--wp--preset--font-family--heading); font-size: .75rem; font-weight: 700; text-transform: uppercase; letter-spacing: .22em; color: var(--wp--preset--color--tangerine-text); }
.section-title { font-family: var(--wp--preset--font-family--display); font-size: 2.25rem; font-weight: 700; line-height: 1.2; }
.canva-title { font-family: var(--wp--preset--font-family--heading) !important; font-weight: 800 !important; text-transform: uppercase; line-height: 1.05 !important; letter-spacing: .005em; }
.canva-title .accent { color: var(--wp--preset--color--tangerine-text); }
.wp-block-separator.section-divider { width: 48px; max-width: 48px; height: 3px; border: 0; border-radius: 2px; background: var(--wp--preset--color--gold); opacity: 1; margin-left: 0; }
.has-text-align-center + .wp-block-separator.section-divider, .wp-block-separator.section-divider.is-centered { margin-left: auto; margin-right: auto; }

/* Hero */
.efsd-hero { min-height: 85vh; }
.efsd-hero h1 { font-family: var(--wp--preset--font-family--display); }
.efsd-hero .efsd-hero-sub { color: rgba(255, 255, 255, .8); display: block; }
.efsd-hero .efsd-hero-eyebrow { color: rgba(255, 255, 255, .6); font-family: var(--wp--preset--font-family--heading); font-size: .875rem; font-weight: 600; letter-spacing: .2em; text-transform: uppercase; margin-bottom: -.5rem; }
.efsd-hero .wp-block-separator.section-divider { height: 4px; }
.event-pill { display: inline-block; background: var(--wp--preset--color--sun); color: var(--wp--preset--color--navy); font-family: var(--wp--preset--font-family--heading); font-size: .813rem; font-weight: 700; text-transform: uppercase; letter-spacing: .06em; padding: .4rem 1rem; border-radius: 9999px; }
.is-style-outline-light .wp-block-button__link { background: transparent; color: #fff; border: 2px solid rgba(255, 255, 255, .4); padding: .625rem 1.5rem; }
.is-style-outline-light .wp-block-button__link:hover { border-color: #fff; background: rgba(255, 255, 255, .08); }

/* Chiffres */
.stat-number { font-family: var(--wp--preset--font-family--display); font-size: 3.5rem; font-weight: 700; line-height: 1; color: #fff; margin: 0; }
.stat-label { font-family: var(--wp--preset--font-family--heading); font-size: .813rem; text-transform: uppercase; letter-spacing: .12em; color: rgba(255, 255, 255, .7); margin-top: .5rem; }
.stat-desc { font-size: .875rem; color: rgba(255, 255, 255, .55); margin-top: .25rem; }

/* Liens et cartes */
.btn-link a, a.btn-link { color: var(--wp--preset--color--red); font-weight: 600; text-decoration: none; }
.btn-link a:hover { text-decoration: underline; }
.efsd-card { background: #fff; border-radius: 10px; box-shadow: 0 1px 3px rgba(26, 35, 50, .06); transition: box-shadow .2s, transform .2s; overflow: hidden; }
.efsd-card:hover { box-shadow: 0 10px 30px rgba(26, 35, 50, .1); transform: translateY(-2px); }
.efsd-card .wp-block-image img, .efsd-card .wp-block-post-featured-image img { border-radius: 0; }
.efsd-why-card { background: #fff; border-radius: 10px; border-left: 4px solid var(--wp--preset--color--tangerine); }
.efsd-why-card.is-sky { border-left-color: var(--wp--preset--color--sky); }
.efsd-why-card.is-sun { border-left-color: var(--wp--preset--color--sun); }
.efsd-value-icon { width: 3rem; height: 3rem; border-radius: 9999px; background: rgba(184, 146, 45, .15); color: var(--wp--preset--color--gold); display: flex; align-items: center; justify-content: center; font-family: var(--wp--preset--font-family--display); font-weight: 700; }
.efsd-program-card .wp-block-image { margin: 0; }
.efsd-program-card .wp-block-image img { aspect-ratio: 4 / 3; object-fit: cover; width: 100%; }

.wp-block-column.efsd-card, .wp-block-column.efsd-why-card { padding: 1.75rem; }
.wp-block-column.efsd-card.efsd-program-card, .efsd-news .efsd-card { padding: 0 0 1.5rem; }
.efsd-program-card > :not(.wp-block-image), .efsd-news .efsd-card > :not(.wp-block-post-featured-image) { padding-inline: 1.5rem; }
.efsd-card h3, .efsd-why-card h3 { margin-top: 0; }
.efsd-news .wp-block-post-title a { color: var(--wp--preset--color--navy); text-decoration: none; }
.efsd-news .wp-block-post-title a:hover { color: var(--wp--preset--color--blue); }
.efsd-card.is-highlight { background: var(--wp--preset--color--blue); color: #fff; }
.efsd-card.is-highlight h3 { color: #fff; }
.efsd-card.is-highlight .btn-link a { color: var(--wp--preset--color--sun); }
.efsd-values .section-title, .efsd-values h3 { color: #fff; }
.efsd-values .efsd-eyebrow { color: var(--wp--preset--color--sun); }

.efsd-news .efsd-card > :first-child:not(.wp-block-post-featured-image) { margin-top: 1.5rem; }
.wp-site-blocks > footer { margin-block-start: 0; }

/* Pied de page */
.efsd-footer a { color: rgba(255, 255, 255, .6); text-decoration: none; font-size: .938rem; }
.efsd-footer a:hover { color: #fff; }
.efsd-footer .efsd-footer-logo img { filter: brightness(0) invert(1); height: 48px; width: auto; }
.efsd-footer .efsd-footer-nav p { margin: 0 0 .5rem; }
.efsd-partners .wp-block-image img { background: #fff; border-radius: 6px; padding: .4rem; height: 52px; width: auto; object-fit: contain; }

/* Corps de page (contenus importés) */
.entry-content h2, .wp-block-post-content h2 { font-family: var(--wp--preset--font-family--display); font-size: 1.5rem; font-weight: 700; color: var(--wp--preset--color--red); margin-top: 2.5rem; }
.wp-block-post-content h3 { font-size: 1.2rem; color: var(--wp--preset--color--navy); margin-top: 2rem; }
.wp-block-post-content h4 { font-size: 1.05rem; }
.wp-block-post-content a { text-underline-offset: 2px; }
.wp-block-post-content img { border-radius: .5rem; }

@media (max-width: 781px) {
	.section-title { font-size: 1.75rem; }
	.stat-number { font-size: 2.5rem; }
	.efsd-topbar .efsd-topbar-right { display: none; }
	.admin-bar .wp-site-blocks > header.wp-block-template-part { top: 46px; }
}

/* Sélecteur de langue Polylang (en-tête) : FR · DE */
.efsd-lang ul { display: flex; gap: .6rem; list-style: none; margin: 0; padding: 0; }
.efsd-lang a { font-family: var(--wp--preset--font-family--heading); font-size: .8rem; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; text-decoration: none; color: var(--wp--preset--color--navy); }
.efsd-lang .current-lang a { text-decoration: underline; text-underline-offset: .3em; }

/* Mobile et tablette : le menu complet tient sur une ligne à partir de ~1100 px seulement ; en dessous, menu hamburger (seuil natif du bloc : 600 px). */
@media (max-width: 1099px) {
	.efsd-mainbar .wp-block-navigation__responsive-container-open:not(.always-shown) { display: flex; }
	.efsd-mainbar .wp-block-navigation__responsive-container:not(.hidden-by-default):not(.is-menu-open) { display: none; }
}
.efsd-mainbar .wp-block-navigation__responsive-container-open svg { width: 28px; height: 28px; }
.efsd-mainbar .wp-block-navigation__responsive-container.is-menu-open { background: var(--wp--preset--color--white); color: var(--wp--preset--color--navy); padding: 1.25rem 1.5rem 2.5rem; text-align: left; }
/* Le menu est aligné à droite sur desktop (items-justified-right) ; dans l'overlay, tout à gauche. Les variables sont redéfinies sur chaque niveau de liste. */
.efsd-mainbar .is-menu-open, .efsd-mainbar .is-menu-open * { --navigation-layout-justification-setting: flex-start; --navigation-layout-justify: flex-start; }
.efsd-mainbar .is-menu-open .wp-block-navigation__responsive-container-content { padding-top: 2.5rem; }
.efsd-mainbar .is-menu-open .wp-block-navigation__container { gap: .25rem; width: 100%; }
.efsd-mainbar .is-menu-open .wp-block-navigation__container > .wp-block-navigation-item > .wp-block-navigation-item__content { font-family: var(--wp--preset--font-family--heading); font-size: 1.125rem; font-weight: 700; padding: .4rem 0; }
.efsd-mainbar .is-menu-open .wp-block-navigation__submenu-container { padding: 0 0 .5rem 1rem !important; gap: 0; }
.efsd-mainbar .is-menu-open .wp-block-navigation__submenu-container .wp-block-navigation-item__content { font-size: 1rem; padding: .35rem 0; }
.efsd-mainbar .is-menu-open .wp-block-navigation__responsive-container-close svg { width: 28px; height: 28px; }
/* L'en-tête sticky (z-index 50) enferme l'overlay ; menu ouvert, il passe devant la barre d'admin (99999), sinon elle masque le haut du menu. */
.wp-site-blocks > header.wp-block-template-part:has(.is-menu-open) { z-index: 100000; }

@media (max-width: 781px) {
	body { --wp--preset--font-size--huge: 2.25rem; }
	.wp-block-cover .wp-block-columns:has(.stat-number) { flex-wrap: wrap; gap: 1.5rem 1rem; }
	.wp-block-cover .wp-block-columns:has(.stat-number) > .wp-block-column { flex-basis: calc(50% - .5rem) !important; flex-grow: 0; }
	.stat-number { font-size: 2.25rem; }
	/* Lisible sans zoom : rien sous 13 px sur mobile (dates, eyebrows, pied de page). */
	body { --wp--preset--font-size--x-small: .8125rem; }
	.efsd-eyebrow, .section-subtitle, .wp-block-post-date, .wp-block-post-date time { font-size: .8125rem; }
	.efsd-lang a, .pll-switcher-label { font-size: .875rem; }
	.tribe-common .tribe-events-calendar-list__event-date-tag-datetime .tribe-events-calendar-list__event-date-tag-weekday { font-size: .8125rem; } /* les règles TEC sont plus spécifiques */
	.tribe-common .tribe-events-calendar-list__event-datetime, .tribe-common .tribe-events-calendar-list__event-datetime time,
	.tribe-common .tribe-events-c-nav__prev-label, .tribe-common .tribe-events-c-nav__next-label, .tribe-common .tribe-common-b2.tribe-events-c-nav__today, .tribe-common .tribe-common-c-btn-border-small.tribe-events-c-top-bar__today-button,
	.tribe-events-single .tribe-events-sub-nav a { font-size: .875rem; }
}

@media (max-width: 600px) {
	.efsd-topbar { font-size: .8rem; }
	.efsd-mainbar .wp-block-site-logo img, .efsd-logo img { height: 40px; }
	.efsd-mainbar .wp-block-group.is-nowrap { gap: .75rem; }
	.efsd-cta .wp-block-button__link { padding: .4rem .85rem; }
	/* Agenda : la gouttière négative de la grille (21 px) dépassait le padding du conteneur (19,5 px). */
	.tec-block__archive-events .tribe-common .tribe-events-l-container { padding-left: 1.5rem; padding-right: 1.5rem; }
}

@media (max-width: 480px) {
	.efsd-mainbar .efsd-cta { display: none; } /* « Inscriptions » reste dans le menu */
}

/* The Events Calendar : polices du thème, plus Helvetica. */
.tribe-common { --tec-font-family-sans-serif: var(--wp--preset--font-family--body, inherit); }
.tribe-common h1, .tribe-common h2, .tribe-common h3, .tribe-events-calendar-list__event-title { font-family: var(--wp--preset--font-family--heading, inherit); }
