/* apex - content blocks. Loaded on the site and in the block editor. */
:root {
	--apex-blue: #39b6e0;
	--apex-accent: #39b6e0;      /* links, labels, icons */
	--apex-btn-bg: #39b6e0;      /* buttons */
	--apex-btn-fg: #ffffff;
	--apex-btn-hover-bg: #ffffff;
	--apex-btn-hover-fg: #39b6e0;
	--apex-icon: #39b6e0;        /* pictograms, phone, arrows: stay blue in every palette */
	--apex-icon-filter: none;
	--apex-ink: #1b1b1b;
	--apex-text: #797979;
	--apex-line: #e5e5e5;
	--apex-light: #f6f7f8;
	--apex-label: Arimo, sans-serif;
	--apex-sans: Catamaran, sans-serif;
	--apex-gap: 30px;
}
/* Monochrome palette (Settings > apex > Palette) */
body.apex-mono, .apex-mono .editor-styles-wrapper {
	--apex-accent: #1b1b1b;
	--apex-btn-bg: #1b1b1b;
	--apex-btn-fg: #ffffff;
	--apex-btn-hover-bg: #ffffff;
	--apex-btn-hover-fg: #1b1b1b;
	--apex-text: #6b6b6b;
	--apex-icon-filter: none;   /* pictograms keep the apex blue */
}
.apex-mono .entry-content a:not(.wp-block-button__link) { text-decoration: underline; text-underline-offset: 3px; text-decoration-thickness: 1px; }
.apex-mono .entry-content a:not(.wp-block-button__link):hover { color: #6b6b6b; }

body, .editor-styles-wrapper {
	font-family: var(--apex-sans);
	font-size: 16px;
	line-height: 28px;
	color: var(--apex-text);
	-webkit-font-smoothing: antialiased;
}
.editor-styles-wrapper h1, .editor-styles-wrapper h2, .editor-styles-wrapper h3, .editor-styles-wrapper h4,
.entry-content h1, .entry-content h2, .entry-content h3, .entry-content h4 {
	font-family: var(--apex-sans);
	color: var(--apex-ink);
	font-weight: 500;
	letter-spacing: .5px;
}
.entry-content h1, .editor-styles-wrapper h1 { font-size: 40px; line-height: 48px; margin: 0 0 30px; }
.entry-content h2, .editor-styles-wrapper h2 { font-size: 30px; line-height: 38px; margin: 40px 0 20px; }
.entry-content h3, .editor-styles-wrapper h3 { font-size: 22px; line-height: 28px; margin: 30px 0 14px; }
.entry-content h4, .editor-styles-wrapper h4 { font-size: 18px; line-height: 24px; margin: 24px 0 10px; }
.entry-content p, .editor-styles-wrapper p { margin: 0 0 20px; }
.entry-content a, .editor-styles-wrapper a { color: var(--apex-accent); text-decoration: none; }
.entry-content a:hover { text-decoration: underline; }
.entry-content strong, .editor-styles-wrapper strong { color: #4a4a4a; font-weight: 600; }
.entry-content ul, .entry-content ol { margin: 0 0 20px; padding-left: 1.2em; }
.entry-content li { margin-bottom: 4px; }
.entry-content img { max-width: 100%; height: auto; }

/* Section label with a dash above ("— NOS DIFFÉRENTS TYPES DE PRESTATIONS") */
.is-style-apex-label,
.entry-content .is-style-apex-label,
.editor-styles-wrapper .is-style-apex-label {
	position: relative;
	padding-top: 12px;
	margin: 0 0 20px;
	font-family: var(--apex-label);
	font-size: 12.5px;
	font-weight: 400;
	line-height: 21px;
	letter-spacing: 1.5px;
	text-transform: uppercase;
	color: var(--apex-ink);
}
.is-style-apex-label::before {
	content: '—';
	position: absolute;
	top: 0;
	left: 0;
	font-size: 15px;
	line-height: 0;
	color: var(--apex-ink);
}

/* Kicker + display heading (home "Notre métier", digital events) */
.apex-kicker { font-family: var(--apex-label); font-size: 12.5px; letter-spacing: 1.5px; text-transform: uppercase; color: var(--apex-ink); margin-bottom: 10px !important; }
.entry-content .apex-display, .editor-styles-wrapper .apex-display { font-size: 32px; line-height: 42px; font-weight: 400; margin: 0 0 50px; }
.apex-section-title { font-size: 32px !important; line-height: 40px !important; margin: 0 0 40px !important; }
.apex-subsection { margin-top: 50px !important; }
.apex-page-title { font-size: 34px !important; line-height: 44px !important; }
.apex-quote { max-width: 400px; margin: 10px auto 50px !important; text-align: center; font-size: 30px; line-height: 40px; color: var(--apex-ink); font-weight: 400; letter-spacing: .3px; }

/* Buttons */
.wp-block-button__link, .btn {
	display: inline-block;
	padding: 17px 24px 15px;
	background: var(--apex-btn-bg);
	border: 1px solid var(--apex-btn-bg);
	color: var(--apex-btn-fg) !important;
	font-family: var(--apex-label);
	font-size: 12.5px;
	font-weight: 700;
	line-height: 15px;
	letter-spacing: 1.5px;
	text-transform: uppercase;
	border-radius: 0;
	text-decoration: none !important;
	transition: background-color .25s, color .25s;
}
.wp-block-button__link:hover, .btn:hover { background: var(--apex-btn-hover-bg); color: var(--apex-btn-hover-fg) !important; border-color: var(--apex-btn-bg); }
.is-style-apex-arrow .wp-block-button__link { position: relative; padding-right: 60px; }
.is-style-apex-arrow .wp-block-button__link::after {
	color: var(--apex-icon);
	content: '';
	position: absolute;
	right: 20px;
	top: 50%;
	width: 18px;
	height: 12px;
	transform: translateY(-50%);
	background: currentColor;
	-webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 16'%3E%3Cpath fill='none' stroke='black' stroke-width='2' d='M1 8h20m-6-6 6 6-6 6'/%3E%3C/svg%3E") no-repeat center / contain;
	mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 16'%3E%3Cpath fill='none' stroke='black' stroke-width='2' d='M1 8h20m-6-6 6 6-6 6'/%3E%3C/svg%3E") no-repeat center / contain;
}
.is-style-apex-primary .wp-block-button__link { width: 100%; text-align: center; }

/* Hero (home) */
.apex-hero { min-height: 620px !important; background: #1b1b1b; }
.apex-hero .wp-block-cover__inner-container { padding: 0 20px; }
.apex-hero .apex-hero-title { color: #fff !important; font-size: 34px !important; line-height: 44px !important; font-weight: 400 !important; text-align: center; margin-bottom: 16px; }
.apex-hero .apex-hero-text { color: #fff; font-size: 20px; line-height: 30px; text-align: center; }

/* Home intro */
.apex-intro { padding: 90px 0 40px; border-bottom: 1px solid var(--apex-line); }
.apex-intro-cols h3 { font-size: 20px !important; }
.apex-intro-cols .wp-block-column { display: flex; flex-direction: column; }
.apex-intro-cols .wp-block-buttons { margin-top: auto; }

/* Services grid (home) */
.apex-services { padding: 80px 0 20px; border-bottom: 1px solid var(--apex-line); }
.apex-service-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 40px var(--apex-gap); }
.apex-service { display: flex; flex-direction: column; }
.apex-service h3 { font-size: 22px !important; line-height: 28px !important; margin: 14px 0 12px !important; }
.apex-service p { font-size: 15px; line-height: 25px; }
.apex-service .apex-more { margin-top: auto; }
.apex-service-icon img { width: 53px; height: auto; filter: var(--apex-icon-filter); }
.apex-more a { font-size: 15px; }
.apex-more a::after { content: ' →'; }

/* Label-left rows (clients, memberships, contact) */
.apex-side-row { border-top: 1px solid var(--apex-line); padding: 36px 0; margin-top: 0 !important; margin-bottom: 0 !important; align-items: center !important; gap: 30px; }
.apex-side-row + .apex-side-row { border-top: 1px solid var(--apex-line); }
.entry-content > .apex-side-row:last-child, .apex-side-row:last-child { border-bottom: 1px solid var(--apex-line); }
.apex-side-label { font-family: var(--apex-label); font-size: 12px !important; line-height: 18px; letter-spacing: 1.5px; text-transform: uppercase; color: var(--apex-ink); margin: 0 !important; }
.apex-infos .apex-side-label { align-self: flex-start; }
.apex-infos.apex-side-row { align-items: flex-start !important; }
.apex-infos-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 10px 30px; }
.apex-info h4 { font-family: var(--apex-sans) !important; font-size: 15px !important; text-transform: none !important; letter-spacing: 0 !important; margin: 0 0 2px !important; color: var(--apex-ink); }
.apex-info p { font-size: 14px; line-height: 21px; margin: 0 0 10px; }

/* Partner logos */
.apex-partners { text-align: left; }
.apex-partners-title { font-family: var(--apex-label); font-size: 12px; letter-spacing: 1.5px; text-transform: uppercase; color: var(--apex-ink); margin-bottom: 24px !important; }
.wp-block-gallery.is-style-apex-logos { display: grid !important; grid-template-columns: repeat(4, minmax(0, 1fr)); align-items: center; justify-items: center; gap: 30px 30px !important; margin: 0 !important; }
.wp-block-gallery.is-style-apex-logos.columns-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.wp-block-gallery.is-style-apex-logos.columns-6, .apex-partners-6 .wp-block-gallery.is-style-apex-logos { grid-template-columns: repeat(6, minmax(0, 1fr)); }
.wp-block-gallery.is-style-apex-logos .wp-block-image { width: 100% !important; margin: 0 !important; display: flex !important; align-items: center; justify-content: center; height: 70px; }
.wp-block-gallery.is-style-apex-logos .wp-block-image img { width: auto !important; height: auto !important; max-height: 64px; max-width: 150px !important; object-fit: contain; filter: grayscale(1); opacity: .85; transition: filter .25s, opacity .25s; }
.wp-block-gallery.is-style-apex-logos .wp-block-image img:hover { filter: none; opacity: 1; }

/* Image | label | text (history, environment) */
.apex-textimg { gap: 30px; margin: 10px 0 60px; }
.apex-textimg .wp-block-image { margin: 0; }
.apex-textimg .wp-block-image img { width: 100%; height: auto; }
.apex-no-dash { padding-top: 0 !important; }
.apex-no-dash::before { display: none !important; }

/* Mosaic gallery: one large image + four small ones (service pages) */
.wp-block-gallery.is-style-apex-mosaic {
	display: grid !important;
	grid-template-columns: 1fr 1fr 1fr;
	grid-auto-rows: 320px;
	gap: 0 !important;
	margin-top: 60px;
	margin-bottom: 0;
}
.wp-block-gallery.is-style-apex-mosaic > .wp-block-image { width: 100% !important; margin: 0 !important; }
.wp-block-gallery.is-style-apex-mosaic > .wp-block-image:first-child { grid-row: span 2; }
.wp-block-gallery.is-style-apex-mosaic.apex-mosaic-right > .wp-block-image:first-child { grid-column: 3; grid-row: 1 / span 2; }
.wp-block-gallery.is-style-apex-mosaic > .wp-block-image img { width: 100% !important; height: 100% !important; object-fit: cover; }
.wp-block-gallery.is-style-apex-mosaic:not(:has(> .wp-block-image:nth-child(5))) { grid-auto-rows: 360px; }

/* Screens gallery (digital events) */
.wp-block-gallery.is-style-apex-screens .wp-block-image img { box-shadow: 0 10px 30px rgba(0,0,0,.08); }

/* Catalogue grid (dry hire) */
.apex-catalogue-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 30px; margin-bottom: 40px; }
.apex-catalogue-item { text-align: center; }
.apex-catalogue-item img { transition: transform .25s; }
.apex-catalogue-item a:hover img { transform: translateY(-5px); }
.apex-catalogue-item p { font-family: var(--apex-label); text-transform: uppercase; letter-spacing: 1.5px; font-size: 12.5px; }

/* Main column + contact box */
.apex-main-side { gap: 60px; }
.apex-cta-side { position: sticky; top: 120px; }
.apex-cta-side .wp-block-buttons { margin-top: 10px; }

/* Examples (fixed installations) */
.apex-example { border-top: 1px solid var(--apex-line); padding-top: 30px; margin-top: 30px; gap: 40px; }
.apex-two-col-img { gap: 50px; align-items: center !important; margin: 40px 0; }

/* Team stats */
.apex-stats h3 { font-size: 30px !important; line-height: 36px !important; color: var(--apex-accent) !important; }
.apex-cta-band { border-top: 1px solid var(--apex-line); padding: 50px 0; text-align: left; }

/* Jobs */
.wp-block-details { border-top: 1px solid var(--apex-line); padding: 18px 0; }
.wp-block-details:last-of-type { border-bottom: 1px solid var(--apex-line); }
.wp-block-details summary { cursor: pointer; font-size: 20px; line-height: 28px; color: var(--apex-ink); font-weight: 500; list-style: none; position: relative; padding-right: 30px; }
.wp-block-details summary::-webkit-details-marker { display: none; }
.wp-block-details summary::after { content: '+'; position: absolute; right: 0; top: 0; color: var(--apex-icon); font-size: 24px; }
.wp-block-details[open] summary::after { content: '–'; }
.wp-block-details > :not(summary) { margin-top: 14px; }
.apex-form-block { margin-top: 60px; padding-top: 40px; border-top: 1px solid var(--apex-line); }

/* Quote page */
.apex-devis { gap: 60px; }
.apex-steps { display: grid; grid-template-columns: minmax(0, 1fr); gap: 34px; margin: 40px 0 50px; }
.apex-step { display: grid; grid-template-columns: 70px minmax(0, 1fr); column-gap: 10px; align-items: start; }
.apex-step > * { grid-column: 2; }
.apex-step > .apex-step-icon { grid-column: 1; grid-row: 1 / span 4; margin: 0 !important; }
.apex-step-icon img { width: 48px; height: auto; filter: var(--apex-icon-filter); }
.apex-step-label { font-family: var(--apex-label); font-size: 11.5px; text-transform: uppercase; letter-spacing: 1.5px; color: var(--apex-accent); margin: 10px 0 0 !important; }
.apex-step h3 { font-size: 22px !important; line-height: 28px !important; margin: 2px 0 8px !important; }
.apex-step p { font-size: 15px; line-height: 24px; }

.apex-form-card { background: #fff; padding: 40px 40px 24px; box-shadow: 0 10px 40px rgba(0,0,0,.08); }
.apex-devis .wp-block-separator { border-top: 1px solid var(--apex-line); margin: 30px 0; }
.apex-form-title { margin-top: 0 !important; font-size: 26px !important; }

/* Contact page */
.apex-contact { gap: 50px; }

/* Parent pages: list of child pages */
.apex-children { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 30px; }
.apex-child { display: flex; flex-direction: column; padding: 30px; border: 1px solid var(--apex-line); color: var(--apex-text) !important; text-decoration: none !important; transition: border-color .25s, transform .25s; }
.apex-child:hover { border-color: var(--apex-accent); transform: translateY(-3px); }
.apex-child-title { font-size: 22px !important; line-height: 28px !important; margin: 0 0 12px !important; }
.apex-child-more { margin-top: auto; color: var(--apex-accent); display: inline-flex; align-items: center; gap: 6px; }
.apex-child-more svg { width: 18px; height: 18px; color: var(--apex-icon); }

/* Form placeholders */
.apex-form-missing { padding: 20px; border: 2px dashed var(--apex-accent); color: var(--apex-ink); background: #f0f9fd; }

@media (max-width: 1024px) {
	.apex-service-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
	.apex-children { grid-template-columns: repeat(2, minmax(0, 1fr)); }
	.wp-block-gallery.is-style-apex-mosaic { grid-auto-rows: 220px; }
}
@media (max-width: 781px) {
	.entry-content h1 { font-size: 30px; line-height: 38px; }
	.entry-content .apex-display { font-size: 24px; line-height: 32px; }
	.apex-section-title { font-size: 26px !important; line-height: 32px !important; }
	.apex-hero { min-height: 480px !important; }
	.apex-hero .wp-block-cover__inner-container { padding: 0 20px; }
.apex-hero .apex-hero-title { font-size: 26px !important; line-height: 34px !important; }
	.apex-service-grid, .apex-children, .apex-catalogue-grid, .apex-steps { grid-template-columns: minmax(0, 1fr); }
	.apex-catalogue-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
	.wp-block-gallery.is-style-apex-mosaic { grid-template-columns: minmax(0, 1fr); grid-auto-rows: auto; }
	.wp-block-gallery.is-style-apex-mosaic > .wp-block-image,
	.wp-block-gallery.is-style-apex-mosaic.apex-mosaic-right > .wp-block-image:first-child { grid-column: 1; grid-row: auto; aspect-ratio: 3 / 2; }
	.wp-block-gallery.is-style-apex-mosaic > .wp-block-image:first-child { aspect-ratio: 3 / 4; }
	.apex-side-row { padding: 26px 0; gap: 14px; }
	.wp-block-gallery.is-style-apex-logos, .wp-block-gallery.is-style-apex-logos.columns-3 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
	.apex-infos-grid { grid-template-columns: minmax(0, 1fr); }
	.apex-quote { font-size: 24px; line-height: 32px; }
	.apex-textimg .wp-block-column:first-child { max-width: 420px; }
	.apex-form-card { padding: 24px 20px 10px; }
	.apex-cta-side { position: static; }
}

/* Fluent Forms: square corners, apex look */
.fluentform .ff-el-form-control, .fluentform input[type=text], .fluentform input[type=email], .fluentform input[type=tel], .fluentform select, .fluentform textarea {
	border-radius: 0 !important;
	border: 1px solid #dcdcdc !important;
	box-shadow: none !important;
	font-family: var(--apex-sans);
	font-size: 15px;
}
.fluentform .ff-el-form-control:focus { border-color: var(--apex-ink) !important; }
.fluentform .ff-el-input--label label { font-family: var(--apex-sans); font-weight: 500 !important; color: var(--apex-ink); font-size: 14px; }
.fluentform .ff-btn-submit, .fluentform button[type=submit] {
	width: 100%;
	border-radius: 0 !important;
	background: var(--apex-btn-bg) !important;
	border: 1px solid var(--apex-btn-bg) !important;
	color: var(--apex-btn-fg) !important;
	font-family: var(--apex-label) !important;
	font-size: 12.5px !important;
	font-weight: 700 !important;
	letter-spacing: 1.5px;
	text-transform: uppercase;
	padding: 17px 20px 15px !important;
	transition: background-color .25s, color .25s;
}
.fluentform .ff-btn-submit:hover { background: var(--apex-btn-hover-bg) !important; color: var(--apex-btn-hover-fg) !important; opacity: 1 !important; }
.fluentform .ff_t_c, .fluentform .ff-el-tc { font-size: 13px; line-height: 20px; }

/* Palette "Tenue apex": labels as black tags (like the polo side tag), grey band for services */
.apex-polo .is-style-apex-label:not(.apex-no-dash) { display: inline-block; padding: 5px 10px 4px; background: #27272c; color: #fff; }
.apex-polo .is-style-apex-label:not(.apex-no-dash)::before { display: none; }
.apex-polo .apex-services { background: #878787; box-shadow: 0 0 0 100vmax #878787; clip-path: inset(0 -100vmax); border-bottom: 0; color: #27272c; }
.apex-polo .apex-services h2, .apex-polo .apex-services h3, .apex-polo .apex-services p, .apex-polo .apex-services a { color: #1b1b1d !important; }
.apex-polo .apex-services .apex-service-icon img { filter: brightness(0) opacity(.85); }
.apex-polo .apex-step-label, .apex-polo .news-card__date { color: #878787; }
.apex-polo .apex-form-card { border-top: 6px solid #27272c; }
