/* Foire Bio de Montauban — feuille de style commune du site */

:root {
	--fba-green-dark: #204d2b;
	--fba-green: #3c7a41;
	--fba-green-light: #eef5ea;
	--fba-cream: #faf7f0;
	--fba-orange: #dd8a2e;
	--fba-text: #2b2b26;
	--fba-text-muted: #5c5c54;
	--fba-border: #e4e0d4;
	--fba-radius: 14px;
	--fba-shadow: 0 4px 18px rgba(32, 77, 43, 0.08);
	--fba-shadow-hover: 0 10px 28px rgba(32, 77, 43, 0.14);
}

/* -------- Base -------- */
body {
	background: var(--fba-cream);
	color: var(--fba-text);
}

a {
	color: var(--fba-green-dark);
}

/* Le titre de page est déjà présenté par chaque page (hero ou titre stylé) :
   on masque le titre générique du template pour éviter la répétition. */
.wp-block-post-title {
	display: none;
}

.entry-content > *:first-child {
	margin-top: 0;
}

/* Le thème ajoute un grand espace (margin-top + padding-top) entre l'en-tête
   et le contenu sur chaque page : on le supprime pour rapprocher les visuels
   du menu. */
#wp--skip-link--target {
	margin-top: 0 !important;
}

#wp--skip-link--target > .alignfull:first-child {
	padding-top: 0 !important;
}

/* Titres/texte sur une image de couverture : toujours blancs pour rester
   lisibles quelle que soit la couleur de fond choisie ailleurs. */
.wp-block-cover :where(h1, h2, h3, h4, .wp-block-heading) {
	color: #ffffff !important;
}

.wp-block-cover p:not(.fba-eyebrow) {
	color: #ffffff !important;
}

.fba-site-logo img {
	display: block;
}

/* -------- En-tête / navigation -------- */
header.wp-block-template-part {
	background: #ffffff;
	border-bottom: 1px solid var(--fba-border);
	position: sticky;
	top: 0;
	z-index: 100;
}

/* Le header étant sticky (~99px de haut), un lien d'ancre (ex: #restauration)
   scrolle par défaut jusqu'à coller le titre sous le header, qui le recouvre
   entièrement. On réserve donc de l'espace au-dessus de chaque catégorie pour
   que le titre et les premières cartes restent visibles. */
.fba-category-heading {
	scroll-margin-top: 120px;
}

.wp-block-site-title a {
	color: var(--fba-green-dark) !important;
	font-weight: 800;
	letter-spacing: -0.02em;
	text-decoration: none !important;
}

.wp-block-navigation-item__label {
	font-size: 15px;
	font-weight: 600;
	letter-spacing: 0.01em;
	color: var(--fba-text);
}

.wp-block-navigation-item a:hover .wp-block-navigation-item__label {
	color: var(--fba-green);
}

.wp-block-navigation-item.current-menu-item .wp-block-navigation-item__label {
	color: var(--fba-green-dark);
	box-shadow: inset 0 -2px 0 var(--fba-orange);
	padding-bottom: 2px;
}

/* -------- Sous-menus desktop (Programme, Exposants, Conférences, Concerts) --------
   Par défaut le bloc Navigation affiche un sous-menu plat, collé au menu et
   sans respiration : on lui donne l'apparence d'une carte (ombre, coins
   arrondis, espacements) et on met en évidence l'élément survolé. Ces règles
   sont volontairement exclues du panneau mobile (.is-menu-open), qui a déjà
   son propre style en accordéon ci-dessous. */
.wp-block-navigation__responsive-container:not(.is-menu-open) .has-child .wp-block-navigation__submenu-container {
	padding: 8px;
	border: 1px solid var(--fba-border);
	border-radius: calc(var(--fba-radius) - 4px);
	box-shadow: var(--fba-shadow-hover);
	min-width: 220px;
}

.wp-block-navigation__responsive-container:not(.is-menu-open) .has-child .wp-block-navigation__submenu-container .wp-block-navigation-item {
	border-radius: calc(var(--fba-radius) - 6px);
}

.wp-block-navigation__responsive-container:not(.is-menu-open) .has-child .wp-block-navigation__submenu-container > .wp-block-navigation-item > .wp-block-navigation-item__content {
	padding: 10px 14px;
	border-radius: calc(var(--fba-radius) - 6px);
	transition: background-color 0.15s ease, color 0.15s ease;
}

.wp-block-navigation__responsive-container:not(.is-menu-open) .has-child .wp-block-navigation__submenu-container .wp-block-navigation-item__label {
	font-size: 14px;
}

.wp-block-navigation__responsive-container:not(.is-menu-open) .has-child .wp-block-navigation__submenu-container > .wp-block-navigation-item > .wp-block-navigation-item__content:hover,
.wp-block-navigation__responsive-container:not(.is-menu-open) .has-child .wp-block-navigation__submenu-container > .wp-block-navigation-item > .wp-block-navigation-item__content:focus {
	background-color: var(--fba-green-light);
}

.wp-block-navigation__responsive-container:not(.is-menu-open) .has-child .wp-block-navigation__submenu-container > .wp-block-navigation-item > .wp-block-navigation-item__content:hover .wp-block-navigation-item__label,
.wp-block-navigation__responsive-container:not(.is-menu-open) .has-child .wp-block-navigation__submenu-container > .wp-block-navigation-item > .wp-block-navigation-item__content:focus .wp-block-navigation-item__label {
	color: var(--fba-green-dark);
}

.wp-block-navigation__responsive-container:not(.is-menu-open) .wp-block-navigation-item.has-child .wp-block-navigation__submenu-icon svg {
	transition: transform 0.2s ease;
}

.wp-block-navigation__responsive-container:not(.is-menu-open) .wp-block-navigation-item.has-child:hover .wp-block-navigation__submenu-icon svg {
	transform: rotate(180deg);
}

/* -------- Menu mobile : sous-menus repliables (accordéon) --------
   Le bloc Navigation du cœur WordPress n'affiche pas le bouton de
   repli des sous-menus (Programme, Exposants, Conférences, Concerts)
   dans le panneau mobile : tout s'affichait à plat. On force ici le
   bouton à s'afficher et on masque le sous-menu tant qu'il n'est pas
   ouvert (état porté par l'attribut aria-expanded géré par WordPress). */
.wp-block-navigation__responsive-container.is-menu-open .wp-block-navigation__container {
	align-items: stretch;
}


.wp-block-navigation__responsive-container.is-menu-open li.wp-block-navigation-item.has-child {
	display: flex;
	flex-direction: row;
	flex-wrap: wrap;
	align-items: center;
	justify-content: flex-end;
}

.wp-block-navigation__responsive-container.is-menu-open li.wp-block-navigation-item.has-child > .wp-block-navigation-item__content {
	flex: 0 0 auto;
	width: auto !important;
}

.wp-block-navigation__responsive-container.is-menu-open .wp-block-navigation-submenu__toggle {
	display: flex !important;
	align-items: center;
	justify-content: center;
	width: 32px;
	height: 32px;
	margin: 0;
	padding: 0;
	background: none;
	border: none;
	color: var(--fba-text);
	cursor: pointer;
}

.wp-block-navigation__responsive-container.is-menu-open .wp-block-navigation-submenu__toggle svg {
	width: 12px;
	height: 12px;
	transition: transform 0.2s ease;
}

.wp-block-navigation__responsive-container.is-menu-open .wp-block-navigation-submenu__toggle[aria-expanded="true"] svg {
	transform: rotate(180deg);
}

.wp-block-navigation__responsive-container.is-menu-open .wp-block-navigation-submenu__toggle[aria-expanded="false"] + .wp-block-navigation__submenu-container {
	display: none !important;
}

.wp-block-navigation__responsive-container.is-menu-open .wp-block-navigation-submenu__toggle[aria-expanded="true"] + .wp-block-navigation__submenu-container {
	display: flex !important;
	flex-direction: column;
	align-items: flex-end;
	width: 100%;
	margin: 6px 0 6px 0;
	padding-right: 16px;
	border-right: 2px solid var(--fba-border);
}

.wp-block-navigation__responsive-container.is-menu-open .wp-block-navigation__submenu-container .wp-block-navigation-item__label {
	font-weight: 500;
	font-size: 14px;
}

/* -------- Fiches conférences : image + titre côte à côte, texte en dessous -------- */
.fba-entry .fba-rounded img {
	height: 300px;
	object-fit: cover;
}

/*
 * Logos/visuels graphiques (texte, fond uni) plutôt que des photos : les
 * recadrer en object-fit:cover comme une photo zoomerait dessus et
 * couperait le texte au lieu de simplement les faire tenir dans la boîte.
 * object-fit:contain les affiche en entier, quitte à laisser un bandeau de
 * fond de part et d'autre.
 */
.fba-entry .fba-rounded.fba-logo-fit img {
	object-fit: contain;
	background: var(--fba-cream);
}

/*
 * Couverture de livre (format portrait ~2:3) : la hauteur fixe de 300px
 * ci-dessus est pensée pour des visuels au format paysage/carré et
 * couperait l'essentiel d'une couverture verticale. On repasse en hauteur
 * automatique pour respecter son ratio naturel ; la largeur (plus étroite
 * que les 380px habituels) est fixée directement sur le bloc image.
 */
.fba-entry .fba-rounded.fba-cover-fit img {
	height: auto;
	object-fit: contain;
}

.fba-entry .fba-item-place + p {
	clear: left;
}

/* -------- Titres -------- */
h1, .wp-block-heading {
	color: var(--fba-green-dark);
	letter-spacing: -0.01em;
}

.fba-eyebrow {
	display: inline-block;
	font-size: 13px;
	font-weight: 700;
	letter-spacing: 0.08em;
	text-transform: uppercase;
	color: var(--fba-orange);
	margin-bottom: 8px;
}

/*
 * has-text-align-center pose text-align:center sur l'élément lui-même, ce
 * qui ne centre que le texte à l'intérieur de sa boîte : sans ça, une boîte
 * inline-block reste collée à gauche de son parent quel que soit ce style.
 * On repasse donc en boîte de bloc, dimensionnée à son contenu et centrée
 * via des marges automatiques.
 */
.fba-eyebrow.has-text-align-center {
	display: block;
	width: fit-content;
	margin-left: auto;
	margin-right: auto;
}

/* -------- Sections -------- */
.fba-section {
	padding-top: 64px;
	padding-bottom: 64px;
}

.fba-section-tight {
	padding-top: 32px;
	padding-bottom: 32px;
}

.fba-section-alt,
.fba-band {
	background: var(--fba-green-light);
	padding: 56px 24px;
}

.fba-callout-full {
	background: var(--fba-green-dark);
	padding: 56px 24px;
}

.fba-callout-full :where(h1, h2, h3, .wp-block-heading, p) {
	color: #ffffff;
}

.fba-callout-full .wp-block-button__link {
	background-color: #ffffff !important;
	color: var(--fba-green-dark) !important;
}

.fba-callout-full .wp-block-button__link:hover {
	background-color: var(--fba-orange) !important;
	color: #ffffff !important;
}

@media (max-width: 782px) {
	.fba-section {
		padding-top: 40px;
		padding-bottom: 40px;
	}
}

/* -------- Hero / cover -------- */
.fba-hero {
	min-height: 60vh;
}

.fba-hero .wp-block-cover__inner-container {
	max-width: 760px;
	margin-inline: auto;
}

.fba-hero-compact {
	min-height: 260px;
}

.fba-lead {
	font-size: 20px;
	line-height: 1.5;
	color: var(--fba-text-muted);
}

.fba-note {
	font-size: 14px;
	font-style: italic;
	color: var(--fba-text-muted);
}

/* -------- Boutons -------- */
.wp-block-button__link {
	border-radius: 999px !important;
	padding: 12px 26px !important;
	font-weight: 700 !important;
	background-color: var(--fba-green) !important;
	transition: transform 0.15s ease, box-shadow 0.15s ease, background-color 0.15s ease;
	box-shadow: var(--fba-shadow);
}

.wp-block-button__link:hover {
	background-color: var(--fba-green-dark) !important;
	transform: translateY(-2px);
	box-shadow: var(--fba-shadow-hover);
}

.wp-block-button.is-style-outline .wp-block-button__link {
	background-color: transparent !important;
	color: var(--fba-green-dark) !important;
	box-shadow: none;
	border: 2px solid var(--fba-green) !important;
}

.wp-block-button.is-style-outline .wp-block-button__link:hover {
	background-color: var(--fba-green) !important;
	color: #fff !important;
}

/* Boutons sur fond sombre (cover) : variante claire */
.wp-block-cover .wp-block-button__link {
	background-color: #ffffff !important;
	color: var(--fba-green-dark) !important;
}

.wp-block-cover .wp-block-button__link:hover {
	background-color: var(--fba-orange) !important;
	color: #fff !important;
}

.wp-block-cover .wp-block-button.is-style-outline .wp-block-button__link {
	background-color: transparent !important;
	color: #fff !important;
	border-color: #fff !important;
}

.wp-block-cover .wp-block-button.is-style-outline .wp-block-button__link:hover {
	background-color: #fff !important;
	color: var(--fba-green-dark) !important;
}

/* -------- Images -------- */
.fba-rounded img {
	border-radius: var(--fba-radius);
	box-shadow: var(--fba-shadow);
}

/* -------- Cartes génériques (teasers, colonnes) -------- */
.fba-tile {
	background: #fff;
	border-radius: var(--fba-radius);
	box-shadow: var(--fba-shadow);
	padding: 32px;
	height: 100%;
	transition: transform 0.15s ease, box-shadow 0.15s ease;
}

.fba-reason p {
	margin-bottom: 1em;
}

.fba-reason .wp-block-buttons {
	margin-top: 8px;
}

.fba-tile:hover {
	transform: translateY(-4px);
	box-shadow: var(--fba-shadow-hover);
}

.fba-tile img {
	border-radius: calc(var(--fba-radius) - 4px);
	margin-bottom: 12px;
}

/* -------- Cartes "raisons" (pourquoi exposer, etc.) -------- */
.fba-reason {
	text-align: center;
}

.fba-reason-icon {
	width: 60px;
	height: 60px;
	border-radius: 50%;
	background: var(--fba-green-light);
	display: flex;
	align-items: center;
	justify-content: center;
	font-size: 28px;
	margin: 0 auto 16px;
}

/* -------- Bloc "callout" (appel à bénévoles, devenir partenaire...) -------- */
.fba-callout {
	background: var(--fba-green-light);
	border-radius: var(--fba-radius);
	padding: 48px 24px;
	text-align: center;
}

/* -------- Séparateurs -------- */
.wp-block-separator {
	border-top: 1px solid var(--fba-border);
	opacity: 1;
	margin: 40px 0;
}

/* -------- Fiches conférences / concerts -------- */
.fba-item-time {
	display: inline-block;
	background: var(--fba-orange);
	color: #fff;
	font-weight: 700;
	font-size: 14px;
	padding: 4px 14px;
	border-radius: 999px;
	margin-bottom: 10px;
}

.fba-item-place {
	color: var(--fba-text-muted);
	font-style: italic;
}

/* Fiches conférences/concerts : l'image garde sa taille naturelle et
   flotte à gauche — le texte démarre à sa droite puis continue en pleine
   largeur une fois l'image dépassée. Typographie aérée pour ne pas
   paraître condensée. */
.fba-entry {
	padding: 40px 0;
}

.fba-entry + .fba-entry {
	border-top: 1px solid var(--fba-border);
}

.fba-entry::after {
	content: "";
	display: block;
	clear: both;
}

.fba-entry .wp-block-image.alignleft {
	margin: 4px 32px 16px 0;
}

.fba-readable p {
	font-size: 17px;
	line-height: 1.8;
	margin-bottom: 1.2em;
}

.fba-entry .fba-item-place {
	display: block;
	margin-bottom: 16px;
	font-size: 15px;
}

.fba-entry .fba-item-meta {
	display: block;
	margin-bottom: 4px;
	font-size: 15px;
	color: var(--fba-text-muted);
	font-style: italic;
}

.fba-entry .fba-item-meta a {
	color: var(--fba-green-dark);
	font-style: normal;
}

.fba-entry h3 {
	margin-bottom: 6px;
	font-size: 26px;
}

@media (max-width: 600px) {
	.fba-entry .wp-block-image.alignleft {
		float: none;
		width: 100% !important;
		margin: 0 0 20px;
	}
}

/* -------- Espace exposant : connexion / creation de compte -------- */
.fba-auth-card {
	max-width: 440px;
	margin: 32px auto;
}

.fba-auth-card h2 {
	margin-top: 0;
	margin-bottom: 20px;
	font-size: 22px;
}

.fba-auth-forgot {
	text-align: right;
	margin-top: -8px !important;
}

.fba-auth-forgot a {
	font-size: 14px;
	color: var(--fba-text-muted);
}

.fba-auth-forgot a:hover {
	color: var(--fba-green-dark);
}

.fba-auth-register-disclosure {
	margin-top: 28px;
	padding-top: 20px;
	border-top: 1px solid var(--fba-border);
}

.fba-auth-register-disclosure summary {
	cursor: pointer;
	font-weight: 600;
	color: var(--fba-green-dark);
	list-style: none;
}

.fba-auth-register-disclosure summary::-webkit-details-marker {
	display: none;
}

.fba-auth-register-disclosure summary::before {
	content: "+ ";
	color: var(--fba-orange);
	font-weight: 800;
}

.fba-auth-register-disclosure[open] summary::before {
	content: "\2212 ";
}

.fba-auth-register-disclosure form {
	margin-top: 16px;
}

.fba-auth-card p {
	margin-bottom: 18px;
}

.fba-auth-card label {
	display: block;
	font-weight: 600;
	font-size: 14px;
	color: var(--fba-text);
}

.fba-auth-card input[type="text"],
.fba-auth-card input[type="email"],
.fba-auth-card input[type="password"] {
	width: 100%;
	margin-top: 6px;
	padding: 10px 14px;
	font-size: 15px;
	border: 1px solid var(--fba-border);
	border-radius: 10px;
	box-sizing: border-box;
}

.fba-auth-card input[type="text"]:focus,
.fba-auth-card input[type="email"]:focus,
.fba-auth-card input[type="password"]:focus {
	border-color: var(--fba-green);
	outline: 2px solid var(--fba-green-light);
}

.fba-auth-consent label,
.login-remember label {
	display: flex;
	align-items: flex-start;
	gap: 8px;
	font-weight: 400;
	font-size: 14px;
	color: var(--fba-text-muted);
}

.fba-auth-card button[type="submit"],
.fba-auth-card input[type="submit"] {
	appearance: none;
	border: none;
	border-radius: 999px;
	padding: 12px 26px;
	font-size: 15px;
	font-weight: 700;
	color: #ffffff;
	background-color: var(--fba-green);
	cursor: pointer;
	box-shadow: var(--fba-shadow);
	transition: transform 0.15s ease, box-shadow 0.15s ease, background-color 0.15s ease;
}

.fba-auth-card button[type="submit"]:hover,
.fba-auth-card input[type="submit"]:hover {
	background-color: var(--fba-green-dark);
	transform: translateY(-2px);
	box-shadow: var(--fba-shadow-hover);
}

.fba-auth-notice {
	padding: 16px 20px;
	border-radius: 10px;
	border-left: 4px solid var(--fba-green);
	background: var(--fba-green-light);
	color: var(--fba-green-dark);
	font-weight: 600;
	margin-bottom: 24px;
}

.fba-auth-notice-error {
	border-left-color: #b3261e;
	background: #fbeaea;
	color: #8c1d17;
}

.fba-auth-notice-success {
	border-left-color: var(--fba-green);
	background: var(--fba-green-light);
	color: var(--fba-green-dark);
}

/* -------- Grille des exposants -------- */
.fba-exhibitors-grid {
	display: grid;
	grid-template-columns: repeat(auto-fill, minmax(230px, 1fr));
	gap: 18px;
	margin-bottom: 44px;
}

.fba-card {
	background: #fff;
	border: 1px solid var(--fba-border);
	border-left: 4px solid var(--fba-green);
	border-radius: 10px;
	padding: 18px 20px;
	box-shadow: var(--fba-shadow);
	transition: transform 0.15s ease, box-shadow 0.15s ease;
}

.fba-card:hover {
	transform: translateY(-3px);
	box-shadow: var(--fba-shadow-hover);
}

.fba-card-name {
	font-weight: 700;
	font-size: 16px;
	color: var(--fba-green-dark);
	margin-bottom: 2px;
}

.fba-card-contact {
	font-style: italic;
	color: var(--fba-text-muted);
	font-size: 14px;
	margin-bottom: 6px;
}

.fba-card-address {
	color: var(--fba-text-muted);
	font-size: 13px;
	margin-bottom: 6px;
}

.fba-card-links,
.fba-card-line {
	font-size: 13px;
	margin-bottom: 6px;
	overflow-wrap: anywhere;
	word-break: break-word;
}

.fba-card-links a,
.fba-card-line a {
	color: var(--fba-green-dark);
	text-decoration: none;
}

.fba-card-links a:hover,
.fba-card-line a:hover {
	text-decoration: underline;
}

.fba-card-desc {
	font-size: 14px;
	color: var(--fba-text);
	margin: 8px 0 0;
}

.fba-category-heading {
	color: var(--fba-green-dark);
	border-bottom: 2px solid var(--fba-orange);
	display: inline-block;
	padding-bottom: 4px;
	margin: 44px 0 20px;
}
