/*
Theme Name: Cohesia Theme
Author: Hermes
Description: Custom Block Theme for Cohesia - Formation & Accompagnement du Management dans le medico-social
Version: 3.5.20
Text Domain: cohesia-theme
*/

/* ===== Custom Fonts ===== */
@font-face {
	font-family: 'New York';
	src: url('https://cohesia-cb.ch/wp-content/themes/cohesia-theme/fonts/NewYork.otf') format('opentype');
	font-weight: 400;
	font-style: normal;
	font-display: swap;
}
@font-face {
	font-family: 'New York';
	src: url('https://cohesia-cb.ch/wp-content/themes/cohesia-theme/fonts/NewYork.otf') format('opentype');
	font-weight: 700;
	font-style: normal;
	font-display: swap;
}

@font-face {
	font-family: 'ITC Avant Garde';
	src: url('https://cohesia-cb.ch/wp-content/themes/cohesia-theme/fonts/ITCAvantGardeStd-Bk.ttf') format('truetype');
	font-weight: 400;
	font-style: normal;
	font-display: swap;
}
@font-face {
	font-family: 'ITC Avant Garde';
	src: url('https://cohesia-cb.ch/wp-content/themes/cohesia-theme/fonts/ITCAvantGardeStd-Bk.ttf') format('truetype');
	font-weight: 700;
	font-style: normal;
	font-display: swap;
}

body {
	font-family: 'ITC Avant Garde', 'Avant Garde', 'Century Gothic', sans-serif;
}

/* ===== Fix FSE template-part breaking sticky ===== */
.wp-block-template-part:has(.cohesia-site-nav) {
	display: contents;
}

/* Prevent any ancestor overflow from clipping sticky nav */
html, body, .wp-site-blocks {
	overflow-x: visible;
}

.headline, h1, h2, h3, h4 {
	font-family: 'New York', 'Georgia', 'Playfair Display', serif;
	letter-spacing: -0.02em;
	line-height: 1.1;
}

/* Heading colors per branding: H1/H2 dark green upper, rest black */
h1, h2 {
	color: #728b7d !important;
	text-transform: uppercase !important;
	font-weight: 800 !important;
}
h2.has-x-large-font-size {
	font-size: clamp(1.5rem, 0.9rem + 1.875vw, 2.25rem) !important;
}
h2.has-xx-large-font-size {
	font-size: clamp(1.6875rem, 0.75rem + 3vw, 2.8125rem) !important;
}
h3 {
	color: #000000;
	font-size: 2.25rem;
}
h4 {
	color: #000000;
	font-size: 1.5rem;
}
h5 {
	color: #000000;
	font-size: 1.25rem;
}
h6 {
	color: #000000;
	font-size: 1.125rem;
}

.body-copy { line-height: 1.7; }

.entry-content p, .entry-content ul, .entry-content ol {
	margin-bottom: 1.2rem;
	line-height: 1.7;
}
.entry-content h2 {
	margin-top: 2.5rem;
	margin-bottom: 1rem;
	font-size: 1.5rem;
	color: #728b7d !important;
	text-transform: uppercase !important;
}
.entry-content h3 {
	margin-top: 2rem;
	margin-bottom: 0.75rem;
	font-size: 2.25rem;
	color: #000000;
}
.entry-content ul, .entry-content ol { padding-left: 1.5rem; }

/* ===== BRAND PALETTE ===== */
.bg-sage-light { background-color: #d7d4c7; }
.bg-sage-main { background-color: #C9A646; }
.bg-sage-dark { background-color: #728b7d; }
.bg-sage-deep { background-color: #936888; }
.text-sage-main { color: #C9A646; }
.text-sage-dark { color: #728b7d; }
.text-sage-pale { color: #936888; }
.border-sage { border-color: #d7d4c7 !important; }

.gradient-sage {
	background: linear-gradient(135deg, #ffffff 0%, #d7d4c7 55%, #f0ece0 100%);
}

/* ===== Badges ===== */
.cohesia-badge {
	display: inline-flex;
	align-items: center;
	gap: 0.5rem;
	background: #ffffff;
	color: #728b7d;
	padding: 0.4rem 1rem;
	border-radius: 9999px;
	font-size: 0.875rem;
	font-weight: 600;
	box-shadow: 0 1px 2px rgba(0,0,0,0.05);
	border: 1px solid #d7d4c7;
	margin-bottom: 1.25rem;
}
.cohesia-badge img { width: 1rem; height: 1rem; object-fit: contain; }

/* ===== Cards ===== */
.cohesia-card {
	background: #ffffff;
	border: 1px solid #d7d4c7;
	border-radius: 1rem;
	padding: 2rem;
	box-shadow: 0 8px 30px -15px rgba(114,139,125,0.15);
}
.cohesia-card h3 {
	display: flex;
	align-items: center;
	gap: 0.75rem;
	font-size: 1.25rem;
	font-weight: 700;
	color: #000000;
	margin-bottom: 1.5rem;
}
.cohesia-card h3 img { width: 1.5rem; height: 1.5rem; object-fit: contain; }
.cohesia-card ul { list-style: none; margin: 0; padding: 0; }
.cohesia-card ul li {
	display: flex;
	align-items: flex-start;
	gap: 0.75rem;
	margin-bottom: 1rem;
	color: #475569;
}
.cohesia-card ul li img { width: 1rem; height: 1rem; object-fit: contain; margin-top: 0.25rem; flex-shrink: 0; }

/* ===== Tags ===== */
.cohesia-tag {
	background: #936888;
	border: 1px solid #728b7d;
	color: #f1f5f9;
	font-size: 0.75rem;
	font-weight: 600;
	padding: 0.35rem 0.9rem;
	border-radius: 9999px;
}

/* ===== Check lists ===== */
.cohesia-check-list { list-style: none; margin: 1.5rem 0 2rem; padding: 0; }
.cohesia-check-list li {
	position: relative;
	padding-left: 2rem;
	margin-bottom: 0.75rem;
	color: #e2e8f0;
	line-height: 1.7;
}
.cohesia-check-list li::before {
	content: "\2714";
	position: absolute;
	left: 0;
	top: 0.15em;
	color: #936888;
	font-weight: 700;
	width: 1.25rem;
	text-align: center;
}

/* ===== Quote box ===== */
.cohesia-quote-box {
	background: rgba(147,104,136,0.35);
	border-radius: 1rem;
	padding: 1.5rem;
}
.cohesia-quote-box h4 {
	color: #000000;
	font-size: 1.25rem;
	font-weight: 700;
	margin-bottom: 0.5rem;
}

/* ===== Contact card ===== */
.cohesia-contact-card {
	background: #ffffff;
	border: 1px solid #d7d4c7;
	border-radius: 1.5rem;
	padding: 2.5rem;
	box-shadow: 0 20px 50px -20px rgba(114,139,125,0.2);
}
.cohesia-contact-item { text-align: center; }
.cohesia-contact-item .label {
	font-size: 0.8rem;
	text-transform: uppercase;
	letter-spacing: 0.05em;
	color: #64748b;
	display: block;
	margin-bottom: 0.25rem;
}
.cohesia-contact-item a {
	font-weight: 700;
	font-size: 1.125rem;
	color: #728b7d;
}

/* ===== Images ===== */
.img-hover,
figure.img-hover img {
	transition: transform 0.4s ease;
	border-radius: 1rem;
	overflow: hidden;
}
.img-hover:hover,
figure.img-hover:hover img {
	transform: scale(1.03);
}

/* ===== Buttons ===== */
.wp-block-button .wp-block-button__link {
	border-radius: 12px;
	font-weight: 700;
	padding: 1rem 2rem;
}
.wp-block-button__link,
.cohesia-btn-primary .wp-block-button__link {
	background-color: #C9A646 !important;
	color: #ffffff !important;
}
.wp-block-button__link:hover,
.cohesia-btn-primary .wp-block-button__link:hover {
	background-color: #b08f3c !important;
}
.cohesia-btn-outline .wp-block-button__link {
	background: #ffffff !important;
	color: #000000 !important;
	border: 1px solid #728b7d;
}

/* ===== Floating call button ===== */
.cohesia-floating-call {
	position: fixed;
	bottom: 1.5rem;
	right: 1.5rem;
	z-index: 50;
	background: #C9A646;
	color: #fff;
	border-radius: 9999px;
	padding: 1rem 1.5rem;
	font-weight: 700;
	box-shadow: 0 10px 30px rgba(0,0,0,0.2);
	text-decoration: none;
}
.cohesia-floating-call:hover { background: #b08f3c; color: #fff; }


/* ===== Section A Propos - contraste garanti ===== */
#apropos {
	background-color: #566b5e !important;
	color: #ffffff !important;
}
#apropos h3,
#apropos p,
#apropos ul,
#apropos li,
#apropos a {
	color: #ffffff !important;
}
#apropos .cohesia-tag {
	background: #936888;
	color: #ffffff;
	border-color: #728b7d;
}
#apropos .cohesia-quote-box {
	background: rgba(147,104,136,0.45);
}
#apropos .cohesia-quote-box h4,
#apropos .cohesia-quote-box p {
	color: #ffffff !important;
}
#apropos .cohesia-check-list li::before {
	color: #C9A646;
}

@media (max-width: 782px) {
	.cohesia-card { padding: 1.5rem; }
	.alignwide { padding-left: 1.5rem; padding-right: 1.5rem; }
}

/* ===== Tablet padding fix for hero/alignwide sections ===== */
@media (min-width: 783px) {
	.alignwide { padding-left: 2rem; padding-right: 2rem; }
}


/* ===== Mobile nav: center items ===== */
@media (max-width: 782px) {
	.wp-block-navigation__responsive-container.is-menu-open .wp-block-navigation__container,
	.wp-block-navigation__responsive-container.is-menu-open .wp-block-navigation__responsive-container-content,
	.wp-block-navigation__responsive-container.is-menu-open .wp-block-navigation-item {
		align-items: center !important;
		justify-content: center !important;
	}
	.wp-block-navigation__responsive-container.is-menu-open .wp-block-navigation-item__label {
		text-align: center;
	}
}

/* ===== Logo in mobile dropdown menu ===== */
.wp-block-navigation__responsive-container.is-menu-open::before {
	content: '';
	display: block;
	width: 180px;
	height: 60px;
	background: url('https://cohesia-cb.ch/wp-content/uploads/2026/09/Logo_Cohesia.png') no-repeat center/contain;
	margin: 1.5rem auto 1.5rem;
	filter: brightness(1);
}

/* ===== Sticky nav ===== */
.cohesia-site-nav {
	position: sticky;
	top: 0;
	z-index: 50;
	background-color: rgba(255,255,255,0.9);
	backdrop-filter: blur(8px);
	border-bottom: 1px solid #d7d4c7;
	transition: box-shadow 0.3s ease, padding 0.3s ease;
}
.cohesia-site-nav.nav-scrolled {
	box-shadow: 0 2px 12px rgba(114,139,125,0.08);
}
.cohesia-site-nav.nav-scrolled .cohesia-site-nav-inner {
	padding-top: 0.75rem !important;
	padding-bottom: 0.75rem !important;
}
.cohesia-site-nav.nav-scrolled .cohesia-header-logo img {
	height: 68px !important;
	width: auto;
}
.cohesia-header-logo img {
	transition: height 0.3s ease;
}

/* ===== When mobile menu is open: lift nav stacking context above everything ===== */
.cohesia-site-nav:has(.wp-block-navigation__responsive-container.is-menu-open) {
	backdrop-filter: none !important;
	z-index: 999999 !important;
	position: fixed !important;
	width: 100% !important;
}
/* When menu closes, revert is automatic (nav goes back to sticky) */



/* ===== Nav link underline ===== */
.wp-block-navigation-item__content {
	position: relative;
}
.wp-block-navigation-item__content::after {
	content: '';
	position: absolute;
	left: 0; bottom: -6px;
	width: 0; height: 2px;
	background-color: #C9A646;
	transition: width 0.25s ease;
}
.wp-block-navigation-item__content:hover::after {
	width: 100%;
}

/* ===== CTA nav button "Contact" ===== */
.cohesia-nav-cta > .wp-block-navigation-item__content,
.is-style-cohesia-nav-cta > .wp-block-navigation-item__content {
	background-color: #C9A646 !important;
	color: #ffffff !important;
	border-radius: 0.75rem !important;
	padding: 0.5rem 1.25rem !important;
	transition: background-color 0.2s ease !important;
}
.cohesia-nav-cta > .wp-block-navigation-item__content:hover,
.is-style-cohesia-nav-cta > .wp-block-navigation-item__content:hover {
	background-color: #b08f3c !important;
}
.cohesia-nav-cta > .wp-block-navigation-item__content::after,
.is-style-cohesia-nav-cta > .wp-block-navigation-item__content::after {
	display: none !important;
}

/* ===== Mobile nav ===== */
}
#apropos .wp-block-column img {
	box-shadow: 0 25px 50px -12px rgba(0,0,0,0.25);
}

/* ===== Spacing ===== */
.wp-block-columns.alignwide { gap: 2rem 4rem; }
#prestations .wp-block-columns.alignwide { margin-bottom: 4rem; }
.cohesia-card { margin-bottom: 0; }
.cohesia-contact-card { margin-top: 0; }

/* Hero weight */
header#accueil h1 {
	font-weight: 800;
}

/* ===== Floating call button desktop ===== */
.cohesia-floating-call {
	display: inline-flex !important;
	align-items: center;
	gap: 0.5rem;
	visibility: visible !important;
	opacity: 1 !important;
}
@media (min-width: 783px) {
	.cohesia-floating-call {
		display: inline-flex !important;
	}
}

/* ===== Fade-in ===== */
.fade-in {
	opacity: 0;
	transform: translateY(20px);
	transition: opacity 0.7s ease-out, transform 0.7s ease-out;
}
.fade-in.visible {
	opacity: 1;
	transform: translateY(0);
}

/* ===== Logo in footer mobile menu (if collapsible) ===== */
footer .wp-block-navigation__responsive-container.is-menu-open::before {
	content: '';
	display: block;
	width: 140px;
	height: 50px;
	background: url('https://cohesia-cb.ch/wp-content/uploads/2026/09/Logo_Cohesia.png') no-repeat center/contain;
	margin: 1.5rem auto 1.5rem;
	filter: brightness(1);
}

/* ===== Card styling ===== */
/* 1. Hero badge "FORMATION SUR MESURE" hidden */
header#accueil .cohesia-badge,
#accueil .cohesia-badge {
	display: none !important;
}

/* 2. Card title icons (h3 images) → hidden */
.cohesia-card h3 img,
.cohesia-card > h3 img {
	display: none !important;
}
.cohesia-card h3 {
	gap: 0;
}

/* 3. Card list items → logo/favicon puces visible */
.cohesia-card ul {
	list-style: none;
	padding-left: 0;
	margin-left: 0;
}
.cohesia-card ul li {
	display: flex;
	align-items: flex-start;
	gap: 0.75rem;
	margin-bottom: 1rem;
	list-style-type: none;
}
.cohesia-card ul li img {
	display: inline-block !important;
	width: 1rem;
	height: 1rem;
	object-fit: contain;
	margin-top: 0.25rem;
	flex-shrink: 0;
}

/* ===== Contact section mobile: stack phone/email vertically ===== */
@media (max-width: 782px) {
	.cohesia-contact-card {
		display: block !important;
	}
	.cohesia-contact-item + .cohesia-contact-item {
		margin-top: 1.5rem;
	}
}

/* ===== Quote highlight (citation "Former pour rester debout.") ===== */
.cohesia-quote-highlight {
	background: #936888;
	padding: 1.5rem;
	border-radius: 1rem;
}
#apropos .cohesia-quote-highlight {
	background: #936888;
}

/* ===== Hero photo : réduction -40% ===== */
.cohesia-hero-figure {
	width: 60%;
	margin: 0 auto;
}

/* ===== FAQ accordion ===== */
.cohesia-faq-item {
	background: #ffffff;
	border: 1px solid #d7d4c7;
	border-radius: 1rem;
	margin-bottom: 1.5rem;
	overflow: hidden;
}
.cohesia-faq-item summary {
	cursor: pointer;
	list-style: none;
	padding: 1.5rem 3rem 1.5rem 1.5rem;
	font-size: 1.25rem;
	font-weight: 700;
	color: #000000;
	position: relative;
}
.cohesia-faq-item summary::-webkit-details-marker { display: none; }
.cohesia-faq-item summary::after {
	content: '+';
	position: absolute;
	right: 1.5rem;
	top: 1.5rem;
	font-size: 1.5rem;
	line-height: 1;
	color: #C9A646;
}
.cohesia-faq-item[open] summary::after {
	content: '\2013';
}
.cohesia-faq-item .body-copy {
	padding: 0 1.5rem 1.5rem;
	margin: 0;
}

/* ===== Hero title : -20% taille de police ===== */
.cohesia-hero-title {
	font-size: clamp(1.44rem, 0.64rem + 2.56vw, 2.4rem) !important;
	font-weight: 800 !important;
}

/* ===== Lead paragraph line break with spacing ===== */
.cohesia-lead-break {
	display: block;
	margin-bottom: 0.75rem;
}
