/*
Theme Name: Eval4change
Theme URI: https://www.eval4change.com
Author: Eval4change
Description: Thème sur mesure d'Eval4change — couleurs et formes de la brochure (orange, prune, encarts rosés), trilingue avec Polylang.
Version: 1.0.2
Requires at least: 6.5
Tested up to: 6.8
Requires PHP: 7.4
License: GNU General Public License v2 or later
License URI: http://www.gnu.org/licenses/gpl-2.0.html
Text Domain: eval4change
*/

:root {
	--e4c-orange: #E97132;
	--e4c-orange-dark: #C9581F;
	--e4c-plum: #78206E;
	--e4c-navy: #1F3D50;
	--e4c-teal: #1A5E80;
	--e4c-rose: #F1E4EF;
	--e4c-peach: #FCE8DC;
	--e4c-ink: #262626;
	--e4c-grey: #595959;
	--e4c-line: #E6DCE4;
	--e4c-radius: 16px;
	--e4c-shadow: 0 1px 2px rgba(38, 38, 38, .06), 0 8px 24px rgba(120, 32, 110, .06);
}

body { -webkit-font-smoothing: antialiased; text-rendering: optimizeLegibility; }
html { scroll-behavior: smooth; }
:where(.wp-site-blocks) > * { margin-block-start: 0; }
.e4c-main > .wp-block-post-content > *:first-child { margin-block-start: 0; }

/* ---------- En-tête ---------- */
.e4c-header {
	position: sticky; top: 0; z-index: 50;
	background: rgba(255, 255, 255, .96);
	backdrop-filter: saturate(1.4) blur(8px);
	border-bottom: 1px solid var(--e4c-line);
}
.admin-bar .e4c-header { top: 32px; }
@media (max-width: 782px) { .admin-bar .e4c-header { top: 46px; } }
.e4c-header__inner {
	max-width: 1200px; margin: 0 auto;
	padding: 12px clamp(16px, 4vw, 32px);
	display: flex; align-items: center; gap: 24px;
}
.e4c-brand { display: block; line-height: 0; flex-shrink: 0; }
.e4c-brand img { width: 190px; height: auto; }
.e4c-nav { margin-left: auto; }
.e4c-nav ul { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: nowrap; gap: 2px; }
.e4c-nav a {
	display: block; padding: 8px 11px; border-radius: 999px;
	color: var(--e4c-ink); text-decoration: none; font-size: .88rem; font-weight: 500; white-space: nowrap;
	transition: background-color .15s, color .15s;
}
.e4c-nav a:hover { background: var(--e4c-peach); color: var(--e4c-orange-dark); }
.e4c-nav a[aria-current="page"] { color: var(--e4c-plum); background: var(--e4c-rose); }
.e4c-langs { display: flex; gap: 2px; list-style: none; margin: 0; padding: 3px; border: 1px solid var(--e4c-line); border-radius: 999px; }
.e4c-langs a {
	display: block; padding: 4px 9px; border-radius: 999px; font-size: .78rem; font-weight: 600;
	letter-spacing: .04em; color: var(--e4c-grey); text-decoration: none;
}
.e4c-langs a:hover { color: var(--e4c-orange-dark); }
.e4c-langs a[aria-current="true"] { background: var(--e4c-orange); color: #fff; }
.e4c-burger { display: none; }
.e4c-burger-btn { display: none; cursor: pointer; padding: 8px; margin-left: auto; border-radius: 10px; }
.e4c-burger-btn span { display: block; width: 22px; height: 2px; background: var(--e4c-ink); margin: 5px 0; border-radius: 2px; }

@media (max-width: 1240px) {
	.e4c-header__inner { flex-wrap: wrap; gap: 10px; }
	.e4c-burger-btn { display: block; }
	.e4c-brand img { width: 150px; }
	.e4c-langs a { padding: 4px 7px; }
	.e4c-nav { display: none; width: 100%; order: 3; margin: 0; }
	.e4c-nav ul { flex-direction: column; flex-wrap: wrap; padding: 8px 0 4px; }
	.e4c-nav a { padding: 11px 12px; border-radius: 10px; }
	.e4c-burger:checked ~ .e4c-nav { display: block; }
	.e4c-langs { order: 1; margin-left: auto; }
	.e4c-burger-btn { order: 2; margin-left: 0; }
}

/* ---------- Bandeau d'ouverture (héros) ---------- */
.e4c-hero {
	position: relative;
	background: var(--e4c-orange);
	color: #fff;
	padding-top: clamp(28px, 3.5vw, 48px) !important;
	padding-bottom: clamp(40px, 4.5vw, 60px) !important;
	border-bottom-left-radius: 50% clamp(24px, 4vw, 52px);
	border-bottom-right-radius: 50% clamp(24px, 4vw, 52px);
	margin-bottom: clamp(32px, 4vw, 52px) !important;
	text-align: center;
}
.e4c-hero::after {
	content: ""; position: absolute; pointer-events: none;
	left: -1%; right: 2%; bottom: -12px; height: 80px;
	border-bottom: 2px solid var(--e4c-orange);
	border-bottom-left-radius: 50% clamp(28px, 4.5vw, 60px);
	border-bottom-right-radius: 50% clamp(22px, 3.5vw, 46px);
	transform: rotate(-.6deg);
}
.e4c-hero h1 { color: #fff; font-weight: 500; letter-spacing: -.02em; margin-top: .2em !important; margin-bottom: .3em !important; font-size: clamp(2rem, 3.6vw, 2.75rem) !important; }
.e4c-hero h1::after { content: ""; display: block; width: 120px; height: 3px; background: rgba(255,255,255,.9); border-radius: 3px; margin: .45em auto 0; }
.e4c-kicker { text-transform: uppercase; letter-spacing: .14em; font-size: .78rem !important; font-weight: 600; opacity: .92; margin: 0; }
.e4c-lead { font-size: clamp(1rem, 1.4vw, 1.15rem) !important; line-height: 1.55; max-width: 46rem; margin-inline: auto !important; opacity: .97; }
.e4c-hero .wp-block-buttons { justify-content: center; margin-top: 1.2rem; }
.e4c-hero .wp-block-button__link { background: #fff; color: var(--e4c-orange-dark); }
.e4c-hero .wp-block-button__link:hover { background: var(--e4c-plum); color: #fff; }
.e4c-hero .e4c-btn-ghost .wp-block-button__link { background: transparent; color: #fff; box-shadow: inset 0 0 0 2px rgba(255,255,255,.85); }
.e4c-hero .e4c-btn-ghost .wp-block-button__link:hover { background: rgba(255,255,255,.15); }

/* ---------- Sections ---------- */
.e4c-section { padding-top: clamp(40px, 6vw, 72px) !important; padding-bottom: clamp(40px, 6vw, 72px) !important; margin-top: 0 !important; margin-bottom: 0 !important; }
.e4c-bg-rose { background: var(--e4c-rose); }
.e4c-bg-peach { background: var(--e4c-peach); }
.e4c-section > p, .e4c-section .e4c-prose p { line-height: 1.75; }
.e4c-intro { color: var(--e4c-grey); font-size: 1.05rem; line-height: 1.7; }

/* Titres en « ruban » orange, comme dans la brochure */
h2.e4c-tab {
	display: table; margin-left: 0 !important;
	background: var(--e4c-orange); color: #fff;
	font-weight: 500; letter-spacing: -.01em; line-height: 1.2;
	padding: .32em .75em .38em;
	border-radius: 3px 18px 4px 14px / 12px 4px 16px 3px;
	box-shadow: 6px 6px 0 rgba(233, 113, 50, .18);
	margin-bottom: 1.2em !important;
}
.e4c-bg-peach h2.e4c-tab { box-shadow: 6px 6px 0 rgba(120, 32, 110, .12); }
/* Alignement à gauche du titre et de l'introduction dans la colonne de la section */
.e4c-section.e4c-section > h2.e4c-tab { width: fit-content; display: block; margin-left: max(0px, calc((100% - 1200px) / 2)) !important; margin-right: auto !important; }
.e4c-section.e4c-section > .e4c-intro { max-width: 760px !important; margin-left: max(0px, calc((100% - 1200px) / 2)) !important; margin-right: auto !important; }
.e4c-section.e4c-prose > h2.e4c-tab { margin-left: max(0px, calc((100% - 760px) / 2)) !important; }

/* ---------- Chiffres clés ---------- */
.e4c-stats-wrap { padding-top: 0 !important; }
.e4c-stats { gap: 28px !important; grid-template-columns: repeat(auto-fit, minmax(min(15rem, 100%), 1fr)) !important; }
.e4c-stat {
	border-top: 3px solid var(--e4c-orange);
	padding-top: 16px !important;
}
.e4c-stat:nth-child(2) { border-color: var(--e4c-plum); }
.e4c-stat:nth-child(3) { border-color: var(--e4c-teal); }
.e4c-stat-num { font-size: clamp(2.6rem, 5vw, 3.6rem) !important; font-weight: 700; line-height: 1; color: var(--e4c-orange); margin: 0 0 .35em !important; letter-spacing: -.03em; }
.e4c-stat:nth-child(2) .e4c-stat-num { color: var(--e4c-plum); }
.e4c-stat:nth-child(3) .e4c-stat-num { color: var(--e4c-teal); }
.e4c-stat p:not(.e4c-stat-num) { color: var(--e4c-grey); margin: 0; line-height: 1.55; }

/* ---------- Cartes ---------- */
.e4c-cards { gap: 20px !important; counter-reset: e4c-card; margin-top: 2rem !important; }
.e4c-card {
	counter-increment: e4c-card;
	position: relative;
	background: #fff;
	border-radius: var(--e4c-radius);
	padding: 26px 24px 22px !important;
	box-shadow: var(--e4c-shadow);
	display: flex; flex-direction: column;
}
.e4c-section:not(.e4c-bg-rose):not(.e4c-bg-peach) .e4c-card { background: var(--e4c-peach); box-shadow: none; }
.e4c-section:not(.e4c-bg-rose):not(.e4c-bg-peach) .e4c-card:nth-child(even) { background: var(--e4c-rose); }
.e4c-card::before {
	content: counter(e4c-card, decimal-leading-zero);
	display: grid; place-items: center;
	width: 40px; height: 40px; border-radius: 50%;
	background: var(--e4c-orange); color: #fff;
	font-weight: 700; font-size: .85rem; margin-bottom: 14px;
}
.e4c-card:nth-child(even)::before { background: var(--e4c-plum); }
.e4c-cards-icons .e4c-card::before { content: ""; width: 34px; height: 6px; border-radius: 6px; margin-bottom: 18px; }
.e4c-card h3 { font-size: 1.08rem !important; color: var(--e4c-plum); margin: 0 0 .5em !important; line-height: 1.35; }
.e4c-card p { margin: 0; color: var(--e4c-ink); line-height: 1.6; font-size: .97rem; }
.e4c-card .e4c-more { margin-top: auto !important; padding-top: 14px; }
.e4c-more a { color: var(--e4c-orange-dark); font-weight: 600; text-decoration: none; }
.e4c-more a::after { content: " →"; transition: margin .15s; }
.e4c-more a:hover { color: var(--e4c-plum); }
.e4c-card:has(.e4c-more a):hover { transform: translateY(-2px); transition: transform .2s; }

/* ---------- Étapes ---------- */
.e4c-steps { counter-reset: e4c-step; gap: 18px !important; margin-top: 2rem !important; }
.e4c-step { counter-increment: e4c-step; position: relative; padding-top: 58px !important; }
.e4c-step::before {
	content: counter(e4c-step, decimal-leading-zero);
	position: absolute; top: 0; left: 0;
	width: 44px; height: 44px; border-radius: 50%;
	display: grid; place-items: center;
	background: var(--e4c-orange); color: #fff; font-weight: 700; font-size: .9rem;
	box-shadow: 0 0 0 5px var(--e4c-rose);
}
.e4c-section:not(.e4c-bg-rose) .e4c-step::before { box-shadow: 0 0 0 5px #fff; }
.e4c-step:nth-child(even)::before { background: var(--e4c-plum); }
.e4c-step::after { content: ""; position: absolute; top: 21px; left: 52px; right: -10px; height: 2px; background: repeating-linear-gradient(90deg, var(--e4c-orange) 0 6px, transparent 6px 12px); opacity: .55; }
.e4c-step:last-child::after { display: none; }
.e4c-step h3 { font-size: 1.02rem !important; color: var(--e4c-ink); margin: 0 0 .45em !important; }
.e4c-step p { margin: 0; color: var(--e4c-grey); line-height: 1.6; font-size: .95rem; }

/* ---------- Pastilles (domaines, références clients) ---------- */
ul.e4c-chips { list-style: none; padding: 0; margin: 1.6rem 0 0; display: flex; flex-wrap: wrap; gap: 10px; }
ul.e4c-chips li {
	margin: 0; padding: 9px 16px; border-radius: 999px;
	background: #fff; color: var(--e4c-plum); font-weight: 500; font-size: .95rem;
	border: 1px solid rgba(120, 32, 110, .18);
}
ul.e4c-chips li:nth-child(3n+2) { color: var(--e4c-orange-dark); border-color: rgba(233, 113, 50, .3); }
ul.e4c-chips li:nth-child(3n) { color: var(--e4c-teal); border-color: rgba(26, 94, 128, .25); }
ul.e4c-logos li { background: transparent; color: var(--e4c-ink) !important; border-color: var(--e4c-line) !important; font-size: .9rem; }

/* ---------- Fondateur ---------- */
.e4c-founder { gap: clamp(24px, 4vw, 56px) !important; align-items: flex-start !important; margin-top: 1.6rem !important; }
.e4c-avatar {
	width: 120px; height: 120px; border-radius: 50%;
	display: grid; place-items: center;
	background: var(--e4c-plum); color: #fff;
	font-size: 2.4rem !important; font-weight: 600; letter-spacing: .02em; margin: 0 0 16px !important;
	box-shadow: 10px 10px 0 var(--e4c-peach);
}
.e4c-photo { margin: 0 0 18px !important; }
.e4c-photo img { display: block; width: 180px; min-width: 180px; max-width: none; height: 180px; aspect-ratio: 1 / 1; border-radius: 50%; object-fit: cover; box-shadow: 10px 10px 0 var(--e4c-peach); }
@media (min-width: 782px) { .e4c-founder > .wp-block-column:first-child { flex: 0 0 240px !important; } }
.e4c-founder-name { font-size: 1.25rem !important; font-weight: 700; margin: 0 !important; color: var(--e4c-ink); }
.e4c-founder-role { color: var(--e4c-orange-dark); font-weight: 500; margin: .25em 0 0 !important; }
.e4c-founder .wp-block-column p { line-height: 1.75; }

/* ---------- Échelle genre ---------- */
.e4c-scale { gap: 8px !important; margin-top: 2rem !important; }
.e4c-level { border-radius: 12px; padding: 18px 16px !important; color: #fff; position: relative; }
.e4c-level p { margin: 0; line-height: 1.5; font-size: .92rem; }
.e4c-level .e4c-level-name { font-weight: 700; font-size: 1rem; margin-bottom: .4em; }
.e4c-level:nth-child(1) { background: #8C8C8C; }
.e4c-level:nth-child(2) { background: #6E7F8A; }
.e4c-level:nth-child(3) { background: var(--e4c-orange); }
.e4c-level:nth-child(4) { background: #A6417E; }
.e4c-level:nth-child(5) { background: var(--e4c-plum); }
.e4c-level:not(:last-child)::after { content: "›"; position: absolute; right: -9px; top: 50%; transform: translateY(-50%); width: 18px; height: 18px; line-height: 16px; text-align: center; border-radius: 50%; background: #fff; color: var(--e4c-ink); font-weight: 700; z-index: 1; font-size: .9rem; }

/* ---------- Références ---------- */
ul.e4c-refs { list-style: none; padding: 0; margin: 1.6rem 0 0; columns: 2 340px; column-gap: 40px; }
ul.e4c-refs li { break-inside: avoid; position: relative; padding: 10px 0 10px 22px; border-bottom: 1px solid rgba(38,38,38,.08); line-height: 1.5; font-size: .96rem; margin: 0; }
ul.e4c-refs li::before { content: ""; position: absolute; left: 0; top: 17px; width: 9px; height: 9px; border-radius: 50%; background: var(--e4c-orange); }
ul.e4c-refs li:nth-child(even)::before { background: var(--e4c-plum); }

/* ---------- Publications ---------- */
.e4c-pubs { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 24px; margin-top: 2rem; }
.e4c-pub { margin: 0; }
.e4c-pub a { display: block; text-decoration: none; color: inherit; }
.e4c-pub img { display: block; width: 100%; aspect-ratio: 1 / 1.414; object-fit: contain; object-position: center; border-radius: 8px; box-shadow: 0 2px 4px rgba(0,0,0,.08), 0 12px 24px rgba(31,61,80,.12); transition: transform .2s, box-shadow .2s; background: #fff; }
.e4c-pub a:hover img { transform: translateY(-4px) rotate(-.6deg); box-shadow: 0 4px 8px rgba(0,0,0,.08), 0 18px 32px rgba(120,32,110,.18); }
.e4c-pub span { display: block; margin-top: 12px; font-size: .82rem; line-height: 1.45; color: var(--e4c-grey); }
.e4c-pub a:hover span { color: var(--e4c-plum); }

/* ---------- Appel à l'action ---------- */
.e4c-cta {
	background: var(--e4c-plum); color: #fff; text-align: center;
	padding-top: clamp(48px, 7vw, 80px) !important; padding-bottom: clamp(48px, 7vw, 80px) !important;
	border-top-left-radius: 50% clamp(28px, 5vw, 64px);
	border-top-right-radius: 50% clamp(28px, 5vw, 64px);
	margin-top: clamp(24px, 4vw, 48px) !important; margin-bottom: 0 !important;
}
.e4c-cta h2 { color: #fff; font-weight: 500; }
.e4c-cta p { opacity: .92; max-width: 40rem; margin-inline: auto !important; line-height: 1.65; }
.e4c-cta .wp-block-buttons { justify-content: center; margin-top: 1.6rem; }
.e4c-cta .wp-block-button__link { background: var(--e4c-orange); color: #fff; }
.e4c-cta .wp-block-button__link:hover { background: #fff; color: var(--e4c-plum); }

/* ---------- Pied de page ---------- */
.e4c-footer { background: #fff; border-top: 1px solid var(--e4c-line); }
.e4c-footer__inner { max-width: 1200px; margin: 0 auto; padding: 40px clamp(16px, 4vw, 32px) 28px; display: grid; grid-template-columns: 1.3fr 1fr 1fr; gap: 32px; align-items: start; }
.e4c-footer img { width: 200px; height: auto; }
.e4c-footer p { margin: .6em 0 0; color: var(--e4c-grey); font-size: .92rem; line-height: 1.6; }
.e4c-footer h4 { margin: 0 0 .7em; font-size: .78rem; text-transform: uppercase; letter-spacing: .12em; color: var(--e4c-plum); }
.e4c-footer ul { list-style: none; margin: 0; padding: 0; }
.e4c-footer li { margin: 0 0 .45em; }
.e4c-footer a { color: var(--e4c-ink); text-decoration: none; font-size: .92rem; }
.e4c-footer a:hover { color: var(--e4c-orange-dark); text-decoration: underline; }
.e4c-footer__bottom { max-width: 1200px; margin: 0 auto; padding: 16px clamp(16px, 4vw, 32px) 28px; border-top: 1px solid var(--e4c-line); display: flex; justify-content: space-between; gap: 16px; flex-wrap: wrap; font-size: .82rem; color: var(--e4c-grey); }
@media (max-width: 760px) { .e4c-footer__inner { grid-template-columns: 1fr; } }

/* ---------- Divers ---------- */
.e4c-archive { max-width: 760px; margin: 0 auto; padding: 48px clamp(16px, 4vw, 32px); }
:where(.wp-block-button__link) { transition: background-color .15s, color .15s; }
@media (max-width: 781px) {
	.e4c-step::after, .e4c-level::after { display: none; }
	.e4c-hero { text-align: left; }
	.e4c-hero h1::after { margin-left: 0; }
	.e4c-hero .wp-block-buttons { justify-content: flex-start; }
	.e4c-lead { margin-left: 0 !important; }
}
