/* ==========================================================================
   NUMERIS-TSP : styles du site (fond clair, Nyala, bleu #0000FF, ambre #E8A33D)
   Palette : bleu signature #0000FF, encre profonde #06062E, ambre lumiere #E8A33D,
   blanc chaud #FAF7F0 (fond), gris texte #3A3A38.
   ========================================================================== */

:root {
	--nm-bleu: #0000ff;
	--nm-encre: #06062e;
	--nm-ambre: #e8a33d;
	--nm-fond: #faf7f0;
	--nm-texte: #3a3a38;
	--nm-papier: #ffffff;
	--nm-trait: #ece6d8;
	--nm-titre: 'Numeris Titre', Georgia, 'Times New Roman', serif;
	--nm-corps: 'Numeris Corps', Georgia, 'Times New Roman', serif;
	--nm-max: 1240px;
}

/* On force la palette Kadence sur la charte (les variables Kadence sont lues par le theme parent). */
body, body p, body li, body .main-navigation a, body .site-branding a {
	font-family: var(--nm-corps);
}
body {
	--global-body-font-family: 'Numeris Corps', Georgia, 'Times New Roman', serif;
	--global-heading-font-family: 'Numeris Titre', Georgia, 'Times New Roman', serif;
	--global-primary-nav-font-family: 'Numeris Corps', Georgia, 'Times New Roman', serif;
	--global-palette1: #0000ff;
	--global-palette2: #e8a33d;
	--global-palette3: #06062e;
	--global-palette4: #3a3a38;
	--global-palette5: #55554f;
	--global-palette6: #8a8a82;
	--global-palette7: #efe9da;
	--global-palette8: #faf7f0;
	--global-palette9: #ffffff;
	background: var(--nm-fond);
	color: var(--nm-texte);
	font-family: var(--nm-corps);
	font-size: 17px;
	line-height: 1.65;
}

body h1, body h2, body h3, body h4, body .entry-title, body .site-title, body .nm-hero h1 {
	font-family: var(--nm-titre);
	font-weight: 700;
	color: var(--nm-encre);
	line-height: 1.12;
}

a { color: var(--nm-bleu); }
a:hover, a:focus { color: var(--nm-encre); }
:focus-visible { outline: 3px solid var(--nm-ambre); outline-offset: 3px; }

.site-main { background: var(--nm-fond); }
.content-bg, .entry.single-entry { background: transparent; box-shadow: none; }

/* --------------------------------------------------------------------------
   Eléments communs
   -------------------------------------------------------------------------- */
.nm-eyebrow {
	margin: 0 0 14px;
	color: var(--nm-bleu);
	font-weight: 700;
	font-size: 1.15rem;
	letter-spacing: 0.1em;
	text-transform: uppercase;
}

.nm-btn,
.wp-block-button.is-style-nm-bleu .wp-block-button__link,
.wp-block-button.is-style-nm-ambre .wp-block-button__link,
.wp-block-button.is-style-nm-contour .wp-block-button__link {
	display: inline-block;
	padding: 16px 28px;
	border-radius: 999px;
	font-family: var(--nm-corps);
	font-weight: 700;
	font-size: 1rem;
	line-height: 1.2;
	text-decoration: none;
	border: 1px solid transparent;
	transition: transform 0.15s ease, box-shadow 0.15s ease;
}
.nm-btn:hover, .wp-block-button .wp-block-button__link:hover { transform: translateY(-2px); box-shadow: 0 10px 24px rgba(6, 6, 46, 0.18); }
.nm-btn--bleu, .wp-block-button.is-style-nm-bleu .wp-block-button__link { background: var(--nm-bleu); color: #fff; }
.nm-btn--ambre, .wp-block-button.is-style-nm-ambre .wp-block-button__link { background: var(--nm-ambre); color: var(--nm-encre); }
.nm-btn--contour, .wp-block-button.is-style-nm-contour .wp-block-button__link { background: transparent; color: var(--nm-fond); border-color: var(--nm-fond); }
.nm-btn--bleu:hover, .nm-btn--ambre:hover { color: inherit; }

.nm-more, .nm-more a, a.nm-more { font-weight: 700; color: var(--nm-bleu); }
.nm-more a:hover, a.nm-more:hover { color: var(--nm-encre); }

/* --------------------------------------------------------------------------
   Hero 3D
   -------------------------------------------------------------------------- */
.nm-hero { background: var(--nm-fond); }
.nm-hero__inner {
	max-width: var(--nm-max);
	margin: 0 auto;
	padding: 16px 32px 24px;
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	gap: 32px;
}
.nm-hero__text { flex: 1 1 520px; min-width: 0; }
.nm-hero h1 {
	margin: 0 0 clamp(8px, 2vh, 18px);
	font-size: clamp(1.7rem, min(3.6vw, 5.4vh), 3.2rem);
	line-height: 1.08;
}
.nm-hero__lead { margin: 0 0 clamp(6px, 1.4vh, 12px); font-size: clamp(0.95rem, min(1.08rem, 2.3vh), 1.08rem); max-width: 36rem; }
.nm-hero__actions { display: flex; flex-wrap: wrap; gap: 14px; margin-top: clamp(12px, 2.4vh, 22px); }

.nm-hero__scene {
	position: relative;
	flex: 1 1 440px;
	min-width: 0;
	height: 480px;
}
.nm-hero__fallback,
.nm-hero__canvas {
	position: absolute;
	inset: 0;
	width: 100%;
	height: 100%;
	object-fit: contain;
}
.nm-hero__canvas[hidden] { display: none; }
.nm-hero__scene.is-3d .nm-hero__fallback { opacity: 0; transition: opacity 0.5s ease; }

/* Ordinateur : le hero tient exactement dans l'ecran (sous l'en-tete), boutons toujours visibles.
   --nm-top = hauteur de l'en-tete, mesuree par custom.js. */
@media (min-width: 768px) {
	.nm-hero {
		min-height: calc(100vh - var(--nm-top, 130px));
		min-height: calc(100svh - var(--nm-top, 130px));
		display: flex;
		align-items: center;
	}
	.nm-hero__inner { width: 100%; }
	.nm-hero__scene { height: min(480px, calc(100svh - var(--nm-top, 130px) - 40px)); min-height: 240px; }
}
@media (min-width: 768px) and (max-height: 720px) {
	.nm-hero .nm-btn { padding: 12px 22px; }
}

@media (max-width: 767px) {
	.nm-hero__inner { padding: 24px 20px 40px; }
	.nm-hero__scene { height: 300px; }
}

/* --------------------------------------------------------------------------
   Sections de l'accueil (blocs Gutenberg, classes a donner dans l'editeur)
   -------------------------------------------------------------------------- */
.nm-home-content > .wp-block-group,
.nm-home-content > .wp-block-cover { margin: 0; }

.nm-section { padding: 60px 32px; }
.nm-section > :first-child, .nm-section .wp-block-group__inner-container > :first-child { margin-top: 0 !important; }
.nm-section > :last-child, .nm-section .wp-block-group__inner-container > :last-child { margin-bottom: 0 !important; }
.nm-section .wp-block-columns { margin-bottom: 0; }
.nm-section > .wp-block-group__inner-container,
.nm-section__in { max-width: var(--nm-max); margin: 0 auto; }
.nm-section--papier { background: var(--nm-papier); border-top: 1px solid var(--nm-trait); border-bottom: 1px solid var(--nm-trait); }
.nm-section--encre { background: var(--nm-encre); color: #e9e4d6; }
.nm-section--encre h2, .nm-section--encre h3 { color: var(--nm-fond); }
.nm-section--encre .nm-eyebrow { color: var(--nm-ambre); }
.nm-section h2 { font-size: clamp(1.5rem, 2.4vw, 2.1rem); line-height: 1.18; margin: 0 0 18px; }

/* Pourquoi NUMERIS-TSP : asymetrique, photo a gauche, texte a droite */
.nm-why { align-items: flex-start !important; gap: 56px !important; flex-wrap: nowrap !important; }
.nm-why .wp-block-column:first-child { flex: 0 0 38% !important; }
.nm-why .wp-block-column:last-child { flex: 1 1 0 !important; min-width: 0; }
.nm-why .nm-eyebrow { margin-top: 0; }
.nm-why .wp-block-column > :first-child { margin-top: 0; }
@media (max-width: 781px) {
	.nm-why { flex-wrap: wrap !important; gap: 28px !important; }
	.nm-why .wp-block-column:first-child, .nm-why .wp-block-column:last-child { flex: 1 1 100% !important; }
}
.nm-photo {
	min-height: 420px;
	border-radius: 24px;
	background: #efe9da;
	display: flex;
	align-items: flex-end;
	padding: 20px;
	font-size: 0.9rem;
	color: var(--nm-texte);
}
.nm-photo img { width: 100%; height: 100%; object-fit: cover; border-radius: 24px; }

/* Services : lignes numerotees, pas de grille de cartes */
.nm-lines { display: flex; flex-direction: column; margin: 0; padding: 0; list-style: none; }
.nm-lines li {
	display: flex;
	gap: 24px;
	padding: 22px 0;
	border-top: 1px solid #d9d2c0;
	margin: 0;
}
.nm-lines li:last-child { border-bottom: 1px solid #d9d2c0; }
.nm-lines .nm-num { font-family: var(--nm-titre); font-size: 1.75rem; color: var(--nm-bleu); min-width: 48px; line-height: 1.2; font-weight: 700; }
.nm-lines strong { display: block; color: var(--nm-encre); font-size: 1.25rem; }

/* Formation phare */
.nm-glance {
	border: 1px solid rgba(250, 247, 240, 0.25);
	border-radius: 24px;
	padding: 32px;
}
.nm-glance p { margin: 0; padding: 12px 0; border-top: 1px solid rgba(250, 247, 240, 0.2); }
.nm-glance p:first-child { border-top: 0; font-family: var(--nm-titre); font-size: 1.25rem; color: var(--nm-ambre); padding-top: 0; }

/* Temoignages : un grand, un petit */
.nm-quote {
	background: var(--nm-papier);
	border: 1px solid var(--nm-trait);
	border-radius: 24px;
	padding: 36px;
	height: 100%;
}
.nm-quote--grand p:first-child { font-size: 1.4rem; color: var(--nm-encre); }
.nm-quote cite { font-style: normal; font-size: 0.95rem; }

/* Bandeau CTA ambre */
.nm-cta {
	background: var(--nm-ambre);
	border-radius: 28px;
	padding: 44px 56px;
	color: var(--nm-encre);
	max-width: var(--nm-max);
	margin: 0 auto 64px;
}
.nm-cta .wp-block-columns { margin: 0 !important; align-items: center !important; }
.nm-cta .wp-block-column > :first-child { margin-top: 0 !important; }
.nm-cta .wp-block-column > :last-child, .nm-cta p:last-child { margin-bottom: 0 !important; }
.nm-cta .wp-block-buttons { margin: 0; }
.nm-cta h2 { color: var(--nm-encre); margin: 0 0 10px; }
.nm-cta .wp-block-button .wp-block-button__link { background: var(--nm-encre); color: var(--nm-fond); }
.nm-cta-wrap { padding: 0 32px; }

/* Pages internes : en-tete et blocs */
.nm-page-head { padding: 56px 0 24px; }
.nm-page-head h1 { font-size: clamp(2.2rem, 4.4vw, 3.4rem); margin: 0 0 12px; }

/* --------------------------------------------------------------------------
   Blog
   -------------------------------------------------------------------------- */
.nm-blog { max-width: var(--nm-max); margin: 0 auto; padding: 56px 32px 88px; }
.nm-blog__head h1 { font-size: clamp(2.2rem, 4.4vw, 3.4rem); margin: 0 0 12px; }
.nm-blog__grid {
	display: grid;
	grid-template-columns: repeat(6, minmax(0, 1fr));
	gap: 28px;
	margin-top: 40px;
}
.nm-card { background: var(--nm-papier); border: 1px solid var(--nm-trait); border-radius: 24px; overflow: hidden; display: flex; flex-direction: column; }
.nm-card--feature { grid-column: span 6; flex-direction: row; }
.nm-card--std { grid-column: span 2; }
.nm-card--wide { grid-column: span 4; }
.nm-card__img img { width: 100%; height: 100%; object-fit: cover; display: block; }
.nm-card--feature .nm-card__img { flex: 1 1 50%; min-height: 320px; }
.nm-card--std .nm-card__img, .nm-card--wide .nm-card__img { aspect-ratio: 16 / 10; }
.nm-card__body { padding: 28px; flex: 1 1 50%; }
.nm-card__meta { margin: 0 0 8px; font-size: 0.9rem; color: #55554f; }
.nm-card h2 { margin: 0 0 12px; font-size: 1.5rem; }
.nm-card--feature h2 { font-size: 2.2rem; }
.nm-card h2 a { color: var(--nm-encre); text-decoration: none; }
.nm-card h2 a:hover { color: var(--nm-bleu); }
@media (max-width: 900px) {
	.nm-card--feature, .nm-card--std, .nm-card--wide { grid-column: span 6; }
	.nm-card--feature { flex-direction: column; }
}

/* --------------------------------------------------------------------------
   Pied de page (Kadence) en encre profonde
   -------------------------------------------------------------------------- */
.site-footer, .site-footer .site-footer-wrap, #colophon { background: var(--nm-encre) !important; color: #e9e4d6; }
.site-footer a { color: #e9e4d6; }
.site-footer a:hover { color: var(--nm-ambre); }
.site-footer .site-title, .site-footer h2, .site-footer h3 { color: var(--nm-fond); }

/* En-tete (Kadence) : fond clair, lien actif en bleu */
.site-header, .site-header-wrap, #masthead { background: var(--nm-fond); }
.main-navigation .primary-menu-container > ul > li.menu-item > a { color: var(--nm-encre); }
.main-navigation .primary-menu-container > ul > li.menu-item > a:hover { color: var(--nm-bleu); }

/* --------------------------------------------------------------------------
   Bandeau cookies (CSS seul + petit script)
   -------------------------------------------------------------------------- */
.numeris-cookies {
	position: fixed;
	left: 16px;
	right: 16px;
	bottom: 16px;
	z-index: 9999;
	max-width: 640px;
	margin: 0 auto;
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	gap: 12px 20px;
	padding: 16px 20px;
	background: var(--nm-encre);
	color: var(--nm-fond);
	border-radius: 16px;
	box-shadow: 0 16px 40px rgba(6, 6, 46, 0.35);
	font-size: 0.95rem;
}
.numeris-cookies[hidden] { display: none; }
.numeris-cookies p { margin: 0; flex: 1 1 280px; }
.numeris-cookies button {
	background: var(--nm-ambre);
	color: var(--nm-encre);
	border: 0;
	border-radius: 999px;
	padding: 10px 20px;
	font-weight: 700;
	cursor: pointer;
}

/* --------------------------------------------------------------------------
   Mouvement reduit et petits ecrans
   -------------------------------------------------------------------------- */
@media (prefers-reduced-motion: reduce) {
	*, *::before, *::after { animation: none !important; transition: none !important; scroll-behavior: auto !important; }
}
@media (max-width: 767px) {
	.nm-section { padding: 56px 20px; }
	.nm-cta { padding: 32px 24px; border-radius: 22px; }
	.nm-cta-wrap { padding: 0 20px; }
	.nm-lines li { gap: 16px; }
	.nm-blog { padding: 32px 20px 56px; }
}


/* --------------------------------------------------------------------------
   Pied de page NUMERIS-TSP (remplace celui de Kadence)
   -------------------------------------------------------------------------- */
#colophon, .site-footer { display: none !important; }
.nm-footer { background: var(--nm-encre); color: #e9e4d6; padding: 64px 32px 28px; font-family: var(--nm-corps); }
.nm-footer a { color: #e9e4d6; text-decoration: none; }
.nm-footer a:hover { color: var(--nm-ambre); }
.nm-footer__grid { max-width: var(--nm-max); margin: 0 auto; display: grid; grid-template-columns: 1.4fr 1fr 1.2fr; gap: 40px; }
.nm-footer__brand { font-family: var(--nm-titre); font-weight: 700; font-size: 1.8rem; color: var(--nm-fond); margin: 0 0 12px; }
.nm-footer__tag { margin: 0; max-width: 24rem; color: #c9c4b6; }
.nm-footer h2 { font-family: var(--nm-corps); font-size: 0.85rem; letter-spacing: 0.1em; text-transform: uppercase; color: var(--nm-ambre); margin: 0 0 14px; }
.nm-footer ul { list-style: none; margin: 0; padding: 0; }
.nm-footer li { margin: 0 0 8px; }
.nm-footer__bar { max-width: var(--nm-max); margin: 40px auto 0; padding-top: 20px; border-top: 1px solid rgba(233, 228, 214, 0.2); display: flex; flex-wrap: wrap; gap: 12px 24px; justify-content: space-between; font-size: 0.9rem; color: #b9b4a6; }
@media (max-width: 767px) {
	.nm-footer { padding: 44px 20px 24px; }
	.nm-footer__grid { grid-template-columns: 1fr; gap: 28px; }
}


/* --------------------------------------------------------------------------
   Regle generale : aucun lien souligne, nulle part sur le site.
   (les liens restent reperables par leur couleur et leur graisse ; le focus clavier reste visible)
   -------------------------------------------------------------------------- */
a, a:hover, a:focus, a:active, a:visited,
.entry-content a, .entry-content a:hover,
.site-main a, .site-main a:hover,
.wp-block-button__link, .wp-block-button__link:hover,
.nm-footer a, .nm-footer a:hover {
	text-decoration: none !important;
}
.entry-content p a, .nm-home-content p a { font-weight: 700; }

/* --------------------------------------------------------------------------
   Formulaires (Fluent Forms) aux couleurs NUMERIS-TSP
   -------------------------------------------------------------------------- */
.fluentform { font-family: var(--nm-corps); }
.fluentform .ff-el-input--label label { font-weight: 700; color: var(--nm-encre); font-size: 1rem; }
.fluentform .ff-el-form-control {
	font-family: var(--nm-corps);
	font-size: 1rem;
	color: var(--nm-encre);
	background: #fff;
	border: 1.5px solid #d9d2c0;
	border-radius: 12px;
	padding: 14px 16px;
	box-shadow: none;
}
.fluentform .ff-el-form-control:focus {
	border-color: var(--nm-bleu);
	box-shadow: 0 0 0 3px rgba(0, 0, 255, 0.14);
	outline: none;
}
.fluentform .ff-el-form-control::placeholder { color: #8a8a82; }
.fluentform .ff-el-group { margin-bottom: 18px; }
.fluentform .ff-el-form-check-label, .fluentform .ff_t_c { font-weight: 400; color: var(--nm-texte); }
.fluentform .ff-btn-submit {
	background: var(--nm-bleu) !important;
	color: #fff !important;
	border: 0;
	border-radius: 999px;
	padding: 16px 32px;
	font-family: var(--nm-corps);
	font-weight: 700;
	font-size: 1rem;
	line-height: 1.2;
	cursor: pointer;
	transition: transform 0.15s ease, box-shadow 0.15s ease;
}
.fluentform .ff-btn-submit:hover { transform: translateY(-2px); box-shadow: 0 10px 24px rgba(6, 6, 46, 0.18); opacity: 1; }
.fluentform .ff-btn-submit:focus-visible { outline: 3px solid var(--nm-ambre); outline-offset: 3px; }
.fluentform .text-danger, .fluentform .error { color: #b00020; font-size: 0.92rem; }
.fluentform .ff-message-success {
	background: #fff;
	color: var(--nm-encre);
	border: 1px solid var(--nm-trait);
	border-left: 5px solid var(--nm-ambre);
	border-radius: 12px;
	padding: 22px 24px;
	font-size: 1.05rem;
	box-shadow: none;
}

/* Pages internes : pas de bandeau titre Kadence (doublon avec l'en-tête de la page) ni de grand vide en haut */
body.nm-own-head .entry-hero,
body.nm-own-head .page-hero-section,
body.nm-own-head .entry-hero-container-inner { display: none !important; }
body.nm-own-head .content-area { margin-top: 0 !important; margin-bottom: 0 !important; }
body.nm-own-head .content-container.site-container { padding-top: 0 !important; padding-bottom: 0 !important; }
body.nm-own-head .entry-content-wrap,
body.nm-own-head .entry.content-bg { padding-top: 0 !important; padding-bottom: 0 !important; }
body.nm-own-head .entry-content { margin-top: 0 !important; margin-bottom: 0 !important; }
body.nm-own-head .entry-content > .nm-section:first-child { padding-top: 32px; }

/* En-tete de page avec visuel : texte en haut a gauche, image a droite */
.nm-page-head--img { display: grid; grid-template-columns: minmax(0, 1.4fr) minmax(0, 0.8fr); grid-template-rows: auto auto auto 1fr; column-gap: 56px; align-items: start; padding: 20px 0 8px; }
.nm-page-head--img > :not(.nm-page-visual) { grid-column: 1; align-self: start; }
.nm-page-head--img > .nm-page-visual { grid-column: 2; grid-row: 1 / 5; margin: 0; align-self: start; }
.nm-page-head--img .nm-eyebrow { margin: 0 0 10px; }
.nm-page-head--img h1 { font-size: clamp(2rem, 3.6vw, 3rem); margin: 0 0 16px; }
.nm-page-head--img p:not(.nm-eyebrow) { font-size: 1.15rem; max-width: 34em; margin: 0; }
.nm-page-visual img { display: block; width: 100%; height: auto; max-width: 440px; margin-left: auto; border-radius: 24px; box-shadow: 0 18px 40px rgba(6, 6, 46, 0.16); }
@media (max-width: 899px) {
	.nm-page-head--img { grid-template-columns: 1fr; grid-template-rows: none; row-gap: 8px; }
	.nm-page-head--img > .nm-page-visual { grid-column: 1; grid-row: auto; margin-top: 20px; }
	.nm-page-visual img { max-width: 360px; margin: 0 auto; }
}
/* Ancres : ne pas passer sous l'en-tete fixe */
html { scroll-padding-top: 110px; }

/* Page Formations : carte "Formation phare" a droite du formulaire */
.nm-card-encre { background: var(--nm-encre); color: #e9e4d6; border-radius: 22px; padding: 32px 30px; }
.nm-card-encre .nm-eyebrow { color: var(--nm-ambre); margin: 0 0 8px; }
.nm-card-encre h3 { color: var(--nm-fond); font-size: 1.5rem; line-height: 1.2; margin: 0 0 12px; }
.nm-card-encre h3:not(:first-of-type) { margin-top: 24px; font-size: 1.2rem; }
.nm-card-encre p, .nm-card-encre li { color: #e9e4d6; font-size: 1rem; }
.nm-card-encre ul { margin: 0 0 4px 1.1em; padding: 0; }
.nm-card-encre li { margin-bottom: 8px; }
.nm-card-encre strong { color: var(--nm-fond); }
.nm-card-encre .wp-block-buttons { margin-top: 22px; }
.nm-formations-layout > .wp-block-columns { margin-top: 20px; gap: 48px; }
.nm-formations-layout #inscription { margin: 0 0 14px; font-size: clamp(1.4rem, 2vw, 1.8rem); }

/* Menus du pied de page (Apparence > Menus) */
.nm-footer__legal ul { display: flex; flex-wrap: wrap; gap: 4px 18px; margin: 0; padding: 0; list-style: none; }
.nm-footer__legal li { margin: 0; }
