/*
Theme Name: AIPM 2026
Theme URI: https://aipm-group.com/
Author: Projet24
Description: Thème bloc léger et sur mesure pour AIPM Group — Agence d'Intelligence en Projet et Management.
Version: 1.0.0
Requires at least: 6.6
Tested up to: 7.1
Requires PHP: 7.4
License: GPL-2.0-or-later
License URI: https://www.gnu.org/licenses/gpl-2.0.html
Text Domain: aipm-2026
*/

/* ---------- Base ---------- */
:root {
	--aipm-radius: 14px;
	--aipm-shadow: 0 12px 32px rgba(11, 24, 56, 0.14);
}

body { -webkit-font-smoothing: antialiased; text-rendering: optimizeLegibility; }
img { max-width: 100%; height: auto; }
:where(.wp-site-blocks) > * { margin-block-start: 0; }
.aipm-main { margin-top: 0; }
.aipm-main > .wp-block-post-content > *:first-child { margin-top: 0; }

/* Accessibilité : focus visible */
a:focus-visible, button:focus-visible, .wp-block-button__link:focus-visible {
	outline: 3px solid var(--wp--preset--color--cyan);
	outline-offset: 3px;
}

/* ---------- En-tête ---------- */
.aipm-header {
	background: #fff;
	border-bottom: 1px solid var(--wp--preset--color--border);
	position: sticky; top: 0; z-index: 50;
}
.admin-bar .aipm-header { top: 32px; }
@media (max-width: 782px) { .admin-bar .aipm-header { top: 46px; } }
.aipm-header__inner { padding-block: 14px; gap: 16px 28px; }
.aipm-brand { display: flex; align-items: center; gap: 16px; text-decoration: none; }
.aipm-brand img { height: 46px; width: auto; display: block; }
.aipm-brand__tagline {
	border-left: 1px solid var(--wp--preset--color--border);
	padding-left: 16px; font-size: 13px; line-height: 1.35;
	color: var(--wp--preset--color--muted); max-width: 190px;
}
.aipm-brand__tagline b { color: var(--wp--preset--color--royal); }
@media (max-width: 900px) { .aipm-brand__tagline { display: none; } .aipm-brand img { height: 38px; } }
.aipm-header__nav { gap: 8px 24px; }
.aipm-nav { font-size: 15px; font-weight: 500; }
.aipm-nav a { text-decoration: none; color: var(--wp--preset--color--ink); }
.aipm-nav a:hover, .aipm-nav .current-menu-item > a { color: var(--wp--preset--color--royal); }
.aipm-header .wp-block-button__link { padding: 11px 18px; font-size: 15px; }

/* ---------- Sections ---------- */
.aipm-section { padding-block: clamp(56px, 8vw, 96px); }
.aipm-section--tint { background: var(--wp--preset--color--surface); }
.aipm-section--navy { background: var(--wp--preset--color--navy); color: #E4E8F2; }
.aipm-section--navy :where(h1, h2, h3) { color: #fff; }
.aipm-eyebrow {
	font-size: 14px !important; font-weight: 600; letter-spacing: 1.5px;
	text-transform: uppercase; color: var(--wp--preset--color--royal); margin-bottom: 0.5rem;
}
.aipm-lead { font-size: 1.125rem; color: var(--wp--preset--color--muted); }
.aipm-intro { display: grid; grid-template-columns: 1.2fr 1fr; gap: 24px 48px; align-items: end; margin-bottom: 40px; }
.aipm-intro > * { margin: 0 !important; }
@media (max-width: 860px) { .aipm-intro { grid-template-columns: 1fr; } }

/* ---------- Hero ---------- */
.aipm-hero { background: var(--wp--preset--color--navy); color: #fff; padding-block: clamp(64px, 9vw, 104px); }
.aipm-hero h1 { color: #fff; margin-top: 0.75rem; }
.aipm-hero .aipm-eyebrow { color: var(--wp--preset--color--cyan-light); }
.aipm-hero .aipm-lead { color: #D6DCEA; max-width: 560px; }
.aipm-hero .wp-block-columns { align-items: center; gap: 56px; }
.aipm-hero .wp-block-button:not(.is-style-outline) .wp-block-button__link { background: var(--wp--preset--color--cyan-light); color: var(--wp--preset--color--navy); }
.aipm-hero .wp-block-button:not(.is-style-outline) .wp-block-button__link:hover { background: #fff; }
.aipm-hero .is-style-outline .wp-block-button__link { border: 1px solid #fff; color: #fff; background: transparent; }
.aipm-hero .is-style-outline .wp-block-button__link:hover { background: rgba(255,255,255,0.1); }
.aipm-keyfigures {
	background: rgba(255,255,255,0.06); border: 1px solid rgba(255,255,255,0.18);
	border-radius: 16px; padding: clamp(24px, 3vw, 36px);
}
.aipm-keyfigures__title { font-size: 14px; font-weight: 600; letter-spacing: 1.5px; text-transform: uppercase; color: var(--wp--preset--color--cyan-light); }
.aipm-stat { border-left: 3px solid var(--wp--preset--color--cyan); padding: 2px 0 2px 16px; margin-top: 20px; }
.aipm-stat > * { margin: 0 !important; }
.aipm-stat__value { font-family: var(--wp--preset--font-family--heading); font-weight: 700; font-size: 2rem; line-height: 1.1; color: #fff; }
.aipm-stat__label { font-size: 15px; color: #C9D1E3; }
.aipm-section:not(.aipm-hero) .aipm-stat__value { color: var(--wp--preset--color--navy); }
.aipm-section:not(.aipm-hero) .aipm-stat__label { color: var(--wp--preset--color--muted); }

/* ---------- Bandeau de confiance ---------- */
.aipm-strip { background: var(--wp--preset--color--surface); border-bottom: 1px solid var(--wp--preset--color--border); padding-block: 26px; }
.aipm-strip p { text-align: center; color: var(--wp--preset--color--muted); margin: 0; }
.aipm-strip strong { font-family: var(--wp--preset--font-family--heading); color: var(--wp--preset--color--ink); font-size: 1.1rem; margin-inline: 6px; }

/* ---------- Cartes ---------- */
.aipm-cards { gap: 24px; }
.aipm-card { border: 1px solid var(--wp--preset--color--border); border-radius: var(--aipm-radius); padding: 32px; height: 100%; background: #fff; }
.aipm-card > *:first-child { margin-top: 0; }
.aipm-card h3 { margin-bottom: 0.5rem; }
.aipm-card p { color: var(--wp--preset--color--muted); }
.aipm-card--accent { border-top: 4px solid var(--wp--preset--color--cyan); }
.aipm-pole { background: #fff; border-radius: var(--aipm-radius); padding: 30px; border-top: 4px solid var(--wp--preset--color--navy); height: 100%; }
.aipm-pole__num { font-family: var(--wp--preset--font-family--heading); font-weight: 700; color: var(--wp--preset--color--cyan); margin: 0 !important; }
.aipm-pole h3 { font-size: 1.3rem; margin-top: 8px; }
.aipm-pole ul { padding-left: 18px; color: var(--wp--preset--color--muted); font-size: 15px; }
.aipm-pole li { margin-bottom: 6px; }
.wp-block-column > .aipm-card, .wp-block-column > .aipm-pole { height: 100%; }
.aipm-page-content .aipm-pole { border: 1px solid var(--wp--preset--color--border); border-top: 4px solid var(--wp--preset--color--navy); }
.aipm-page-content .aipm-pole ul.is-style-pills { padding: 0; font-size: 13px; }
.aipm-page-content .aipm-pole ul.is-style-pills li { padding: 6px 12px; font-size: 13px; background: var(--wp--preset--color--surface); }
.aipm-page-content > .wp-block-post-content > .aipm-stats-row { margin-block: 32px; }

/* ---------- Listes ---------- */
ul.is-style-pills { list-style: none; padding: 0; display: flex; flex-wrap: wrap; gap: 10px; }
ul.is-style-pills li { padding: 9px 16px; border-radius: 999px; background: #fff; border: 1px solid #D5DBE7; font-size: 14px; margin: 0; }
ul.is-style-checks { list-style: none; padding: 0; }
ul.is-style-checks li { position: relative; padding-left: 36px; margin-bottom: 14px; }
ul.is-style-checks li::before {
	content: ""; position: absolute; left: 0; top: 0.2em; width: 22px; height: 22px; border-radius: 50%;
	background: var(--wp--preset--color--cyan) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='white' stroke-width='3' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='5 12 10 17 19 7'/%3E%3C/svg%3E") center / 14px no-repeat;
}
.aipm-section--navy ul.is-style-checks { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 24px 32px; font-size: 1.0625rem; }
.aipm-section--navy ul.is-style-checks li { margin: 0; }

/* ---------- Consultant ---------- */
.aipm-highlight { background: var(--wp--preset--color--navy); color: #E4E8F2; border-radius: 16px; padding: clamp(28px, 4vw, 44px); }
.aipm-highlight p { color: #E4E8F2; }
.aipm-highlight__big { font-family: var(--wp--preset--font-family--heading); font-size: clamp(1.5rem, 2.5vw, 1.9rem); line-height: 1.3; color: #fff !important; font-weight: 700; }
.aipm-highlight__small { font-size: 15px; color: var(--wp--preset--color--cyan-light) !important; }
.aipm-stats-row { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 16px; }
.aipm-stats-row .aipm-stat { margin-top: 0; }

/* ---------- CTA ---------- */
.aipm-cta { background: var(--wp--preset--color--surface); padding-block: clamp(48px, 7vw, 80px); }
.aipm-cta .wp-block-columns { align-items: center; }
.aipm-cta h2 { margin-top: 0; }

/* ---------- Bandeau de page ---------- */
.aipm-page-hero { background: var(--wp--preset--color--navy); padding-block: clamp(48px, 7vw, 80px); }
.aipm-page-hero .wp-block-post-title { color: #fff; margin: 0; }
.aipm-page-content { padding-block: clamp(40px, 6vw, 72px); }

/* ---------- Pied de page ---------- */
.aipm-footer { background: var(--wp--preset--color--deep); color: #C9D1E3; padding-block: 64px 32px; font-size: 15px; }
.aipm-footer a { color: #fff; }
.aipm-footer__cols { display: grid; grid-template-columns: 1.3fr 1fr 1fr 0.8fr; gap: 40px; }
@media (max-width: 900px) { .aipm-footer__cols { grid-template-columns: 1fr 1fr; } }
@media (max-width: 560px) { .aipm-footer__cols { grid-template-columns: 1fr; } }
.aipm-footer__title { color: #fff; font-weight: 600; margin: 0 0 12px; }
.aipm-footer__logo { display: inline-block; background: #fff; border-radius: 10px; padding: 10px 14px; }
.aipm-footer__logo img { height: 40px; width: auto; display: block; }
.aipm-footer ul { list-style: none; padding: 0; margin: 0; }
.aipm-footer li { margin-bottom: 8px; }
.aipm-footer__nav a { color: #C9D1E3; text-decoration: none; }
.aipm-footer__nav a:hover { color: #fff; }
.aipm-footer__bottom { border-top: 1px solid #24345E; margin-top: 48px; padding-top: 22px; display: flex; flex-wrap: wrap; justify-content: space-between; gap: 12px; font-size: 13px; color: #9AA6C2; }

/* ---------- Divers ---------- */
.aipm-contact-card { border: 1px solid var(--wp--preset--color--border); border-radius: var(--aipm-radius); padding: 28px; }
.aipm-contact-card h3 { margin-top: 0; font-size: 1.15rem; }
.wp-block-post-template.aipm-posts { gap: 32px; }

/* ---------- Grilles responsives (4 colonnes -> 2x2 -> 1) ---------- */
.aipm-pole h3, .aipm-card h3 { overflow-wrap: normal; word-break: normal; hyphens: manual; }
@media (max-width: 1100px) {
	.wp-block-columns.aipm-cards:has(> .wp-block-column:nth-child(4)) { flex-wrap: wrap !important; }
	.wp-block-columns.aipm-cards:has(> .wp-block-column:nth-child(4)) > .wp-block-column { flex-basis: calc(50% - 12px) !important; flex-grow: 0 !important; }
}
@media (max-width: 600px) {
	.wp-block-columns.aipm-cards:has(> .wp-block-column:nth-child(4)) > .wp-block-column { flex-basis: 100% !important; }
}
