/*
Theme Name: CERAA
Theme URI: https://ceraa.fr
Author: CERAA — Club d'Entreprises des Rives de l'Aa
Description: Thème WordPress (blocs) du CERAA, reproduisant la maquette Figma du site : accueil, le club, nos membres, nos événements. Basé sur theme.json, sans classic style.css additionnel.
Requires at least: 6.5
Tested up to: 6.8
Requires PHP: 7.4
Version: 1.0.0
License: GNU General Public License v2 or later
License URI: https://www.gnu.org/licenses/gpl-2.0.html
Text Domain: ceraa
*/

/* Encart vidéo accueil : caché tant qu'aucune vidéo n'est ajoutée dans le bloc */
.ceraa-video-teaser {
	display: none;
}
.ceraa-video-teaser:has(video) {
	display: block;
}

/* Logo header : garde une hauteur cohérente sur toutes les tailles d'écran */
.ceraa-logo img {
	height: 90px;
	width: auto;
}
@media (max-width: 600px) {
	.ceraa-logo img {
		height: 60px;
	}
}


/* Menu mobile (overlay du bloc Navigation) : lisible sur fond blanc */
.wp-block-navigation__responsive-container.is-menu-open {
	background-color: #ffffff !important;
}
.wp-block-navigation__responsive-container.is-menu-open a {
	color: #1e2f53 !important;
}

/* Carte icônes (Convivialité / Développement / Échanges) : centrage du contenu */
.ceraa-icon-card {
	text-align: center;
}
.ceraa-icon-card img {
	margin: 0 auto;
}

/* Bandeau héros : garantit la lisibilité du titre sur toutes les photos */
.ceraa-hero.wp-block-cover .wp-block-cover__background {
	opacity: 1;
}

/* Formulaire de contact (pied de page) */
.ceraa-contact-form {
	display: flex;
	flex-direction: column;
	gap: 0.9rem;
	margin-top: 0.75rem;
}
.ceraa-form-row {
	display: flex;
	gap: 1rem;
}
.ceraa-form-row .ceraa-form-field {
	flex: 1;
}
.ceraa-form-field,
.ceraa-form-consent {
	display: flex;
	flex-direction: column;
	gap: 0.3rem;
}
.ceraa-contact-form label {
	font-family: var(--wp--preset--font-family--heading);
	font-weight: 600;
	font-size: 0.9rem;
	color: #1e2f53;
}
.ceraa-contact-form input[type="text"],
.ceraa-contact-form input[type="email"],
.ceraa-contact-form textarea {
	border: none;
	border-radius: 6px;
	padding: 0.65rem 0.9rem;
	font-family: inherit;
	font-size: 1rem;
	background: #ffffff;
	width: 100%;
	box-sizing: border-box;
}
.ceraa-form-consent {
	flex-direction: row;
	align-items: flex-start;
	gap: 0.6rem;
}
.ceraa-form-consent label {
	font-weight: 400;
	font-size: 0.8rem;
	color: #1e2f53;
}
.ceraa-form-consent input {
	margin-top: 0.2rem;
}
.ceraa-form-submit {
	align-self: flex-end;
	background: #ffffff;
	color: #2ba8dc;
	border: 2px solid #2ba8dc;
	border-radius: 6px;
	padding: 0.6rem 2rem;
	font-family: var(--wp--preset--font-family--heading);
	font-weight: 600;
	text-transform: uppercase;
	letter-spacing: 0.03em;
	cursor: pointer;
	transition: background 0.2s ease, color 0.2s ease;
}
.ceraa-form-submit:hover {
	background: #2ba8dc;
	color: #ffffff;
}
@media (max-width: 600px) {
	.ceraa-form-row {
		flex-direction: column;
	}
}
.ceraa-form-notice {
	border-radius: 6px;
	padding: 0.75rem 1rem;
	font-weight: 600;
	margin-bottom: 1rem;
}
.ceraa-form-notice--success {
	background: #ffffff;
	color: #2e7d32;
}
.ceraa-form-notice--error {
	background: #ffffff;
	color: #c62828;
}

/* Annuaire + carte : la carte s'étire sur toute la hauteur des vignettes à côté */
/* Grille CSS plutôt que flex : align-items:stretch y est fiable à 100% */
.ceraa-membres-row.wp-block-columns {
	display: grid !important;
	grid-template-columns: 66% 34%;
	align-items: stretch !important;
}
.ceraa-membres-row > .wp-block-column {
	width: auto !important;
	flex-basis: auto !important;
	min-width: 0;
}
.ceraa-membres-row > .wp-block-column:last-child {
	align-self: start !important;
}
.ceraa-map-embed {
	overflow: hidden;
	height: 720px !important;
	min-height: 420px;
	max-height: 720px;
	position: sticky;
	top: 1.5rem;
}
.ceraa-map-embed iframe,
.ceraa-map-embed #ceraa-members-map {
	display: block;
	width: 100%;
	height: 100%;
	min-height: 420px;
}
@media (max-width: 781px) {
	.ceraa-membres-row.wp-block-columns {
		display: block !important;
	}
	.ceraa-map-embed,
	.ceraa-map-embed iframe,
	.ceraa-map-embed #ceraa-members-map {
		min-height: 380px !important;
		height: 380px !important;
	}
}

/* Marqueur logo entreprise sur la carte des membres */
.ceraa-map-marker {
	width: 44px;
	height: 44px;
	border-radius: 50%;
	background: #ffffff;
	border: 2px solid #2ba8dc;
	box-shadow: 0 2px 6px rgba(30, 47, 83, 0.35);
	display: flex;
	align-items: center;
	justify-content: center;
	overflow: hidden;
}
.ceraa-map-marker img {
	width: 80%;
	height: 80%;
	object-fit: contain;
}
.ceraa-map-popup {
	text-align: center;
	display: block;
	color: inherit;
	text-decoration: none;
}
.ceraa-map-popup h4 {
	margin: 0 0 0.5rem;
	color: #1e2f53;
	font-family: var(--wp--preset--font-family--heading);
	font-size: 1.05rem;
}
.ceraa-map-popup__logo {
	display: block;
	width: 90px;
	height: 90px;
	object-fit: contain;
	margin: 0 auto 0.5rem;
}
.ceraa-map-popup p {
	margin: 0;
	font-size: 0.85rem;
}

/* Annuaire des membres : barre de filtre */
.ceraa-directory-filters {
	display: flex;
	gap: 1rem;
	flex-wrap: wrap;
}
.ceraa-directory-filters input {
	flex: 1;
	min-width: 180px;
	border: 1px solid #e2e2e2;
	border-radius: 6px;
	padding: 0.75rem 1rem;
	font-size: 1rem;
	font-family: inherit;
}

.ceraa-member-card {
	border: 1px solid #e2e2e2;
	border-radius: 10px;
	padding: 1rem;
	box-shadow: 0 2px 10px rgba(30, 47, 83, 0.08);
	transition: box-shadow 0.2s ease, transform 0.2s ease;
}
.ceraa-member-card:hover {
	box-shadow: 0 4px 16px rgba(30, 47, 83, 0.14);
	transform: translateY(-2px);
}
.ceraa-member-card--empty {
	min-height: 160px;
	box-shadow: none;
	border: 1px dashed #d7dbe0;
}
.ceraa-member-card a {
	display: block;
	color: inherit;
	text-decoration: none;
}

/* Page détail membre (ex. Atout Prêt, et fiche dynamique /entreprise-detail/) */
.ceraa-member-header {
	display: flex;
	align-items: center;
	flex-wrap: wrap;
	gap: 2rem;
	margin-bottom: 1.5rem;
}
.ceraa-member-header__logo {
	margin: 0 !important;
	border-radius: 8px;
}
.ceraa-member-header__logo--placeholder {
	width: 180px;
	height: 180px;
	border-radius: 8px;
	background: #e9ebee;
	display: flex;
	align-items: center;
	justify-content: center;
	font-size: 3rem;
}
.ceraa-member-gallery__placeholder {
	width: 200px;
	height: 140px;
	border-radius: 8px;
	background: #e9ebee;
}
.ceraa-member-referent-photo {
	width: 100px;
	height: 100px;
	border-radius: 8px;
	background: #e9ebee;
}
.ceraa-member-facts {
	background: #f7f7f7;
	border-radius: 10px;
	padding: 1.25rem 1.5rem;
	margin-bottom: 1.5rem;
}
.ceraa-member-facts h3 {
	margin-top: 0;
}
.ceraa-member-card__logo-placeholder {
	width: 80px;
	height: 80px;
	border-radius: 50%;
	background: #e9ebee;
	display: flex;
	align-items: center;
	justify-content: center;
	font-size: 1.75rem;
	margin: 0 auto 0.75rem;
}

/* Cartes "Les formats de rencontres" (Le Club) */
.ceraa-format-card {
	box-shadow: 0 2px 10px rgba(30, 47, 83, 0.08);
	transition: box-shadow 0.2s ease, transform 0.2s ease;
}
.ceraa-format-card:hover {
	box-shadow: 0 4px 16px rgba(30, 47, 83, 0.14);
	transform: translateY(-2px);
}

.ceraa-event-row > * {
	align-items: center;
}

/* Cartes événements (Nos Événements) — image à gauche, une ligne par événement (comme la maquette) */
.ceraa-event-grid {
	display: flex;
	flex-direction: column;
	gap: 1.5rem;
}
.ceraa-event-card {
	background: #ffffff;
	border-radius: 14px;
	box-shadow: 0 2px 10px rgba(30, 47, 83, 0.08);
	overflow: hidden;
	display: flex;
	align-items: stretch;
	padding: 1rem;
	gap: 1.25rem;
}
.ceraa-event-card__image {
	flex: 0 0 170px;
	width: 170px;
	height: 170px;
	border-radius: 10px;
	overflow: hidden;
}
.ceraa-event-card__image img {
	width: 100%;
	height: 100%;
	object-fit: cover;
	display: block;
}
.ceraa-event-card__image--placeholder {
	background: linear-gradient(135deg, #2ba8dc, #1e2f53);
	display: flex;
	align-items: center;
	justify-content: center;
	font-size: 2.5rem;
}
.ceraa-event-card__content {
	flex: 1 1 300px;
	display: flex;
	flex-direction: column;
	justify-content: center;
	padding: 0.25rem 0;
}
.ceraa-event-card__title {
	margin: 0 0 0.4rem;
	color: #1e2f53;
	font-weight: 700;
	font-size: 1.1rem;
}
.ceraa-event-card__description {
	margin: 0 0 0.75rem;
	font-size: 0.9rem;
	color: #333333;
}
.ceraa-event-card__meta {
	background: #f7f7f7;
	border-radius: 8px;
	padding: 0.55rem 0.85rem;
	display: inline-flex;
	gap: 1rem;
	font-size: 0.85rem;
	color: #2ba8dc;
	font-weight: 600;
	align-self: flex-start;
}
.ceraa-event-card__side {
	flex: 0 0 200px;
	border-left: 1px solid #e2e2e2;
	padding: 0.25rem 0 0.25rem 1.5rem;
	display: flex;
	flex-direction: column;
	justify-content: center;
	gap: 0.75rem;
}
.ceraa-event-card__lieu {
	margin: 0;
	font-size: 0.85rem;
	color: #333333;
}
.ceraa-event-card__button {
	display: block;
	text-align: center;
	background: #2ba8dc;
	color: #ffffff;
	font-family: var(--wp--preset--font-family--heading);
	font-weight: 600;
	text-transform: uppercase;
	letter-spacing: 0.03em;
	border-radius: 6px;
	padding: 0.6rem 1rem;
	text-decoration: none;
	transition: background 0.2s ease;
}
.ceraa-event-card__button:hover {
	background: #1e2f53;
	color: #ffffff;
}
.ceraa-event-card__button--disabled {
	background: #e2e2e2;
	color: #888888;
	cursor: default;
}
@media (max-width: 700px) {
	.ceraa-event-card {
		flex-direction: column;
	}
	.ceraa-event-card__image {
		width: 100%;
		height: 180px;
	}
	.ceraa-event-card__side {
		border-left: none;
		border-top: 1px solid #e2e2e2;
		padding: 0.75rem 0 0;
	}
}

/* Bandeau héros : hauteur réduite sur mobile pour laisser plus de place au contenu */
@media (max-width: 782px) {
	.ceraa-hero {
		min-height: 280px !important;
	}
	.ceraa-hero h1 {
		font-size: 1.85rem !important;
	}
}

/* Grille des membres (annuaire dynamique) */
.ceraa-member-grid {
	display: grid;
	grid-template-columns: repeat(2, 1fr);
	gap: 1rem;
}
@media (max-width: 600px) {
	.ceraa-member-grid {
		grid-template-columns: 1fr !important;
	}
}

/* Liens du pied de page (colonne "Découvrez le Club...") : pas de puce, pas de style de lien */
.ceraa-footer-links {
	list-style: none;
	padding-left: 0;
	margin-top: 0.5rem;
	display: flex;
	flex-direction: column;
	gap: 0.5rem;
}
.ceraa-footer-links li {
	padding-left: 0;
}
.ceraa-footer-links a {
	color: inherit;
	text-decoration: none;
}

/* Barre de navigation : liens répartis dans la largeur du contenu (pas jusqu'aux bords de l'écran) */
.ceraa-nav.wp-block-navigation {
	width: 100%;
}
.ceraa-nav .wp-block-navigation__container {
	width: 100%;
}

/* Lisibilité mobile : les longs paragraphes centrés deviennent illisibles sur petit écran */
@media (max-width: 600px) {
	p.has-text-align-center {
		text-align: left;
	}
}
