/*
Theme Name: AIMAS
Theme URI: https://aimas.org
Author: AIMAS
Description: Thème sur mesure pour le site de l'Agence Ivoirienne de Marketing Social. Compatible avec l'éditeur de blocs.
Version: 1.5.0
Requires at least: 6.4
Requires PHP: 7.4
License: GNU General Public License v2 or later
Text Domain: aimas
*/

:root {
  /* Palette tirée du logo : violet (principal), cyan (accent), gris (neutre) */
  --violet: #6a2c91;
  --violet-deep: #3d1760;
  --ink: #24143a;
  --cyan: #29a9e1;
  --cyan-deep: #0a6ea8;   /* version foncée du cyan, lisible en texte sur fond clair */
  --cyan-soft: #bce6f8;
  --cyan-tint: #e8f6fc;
  --lilac: #f1eaf7;
  --lilac-soft: #dccbea;
  --grey-tint: #f3f4f6;
  --muted: #565a66;       /* gris du logo, assombri pour le texte */
  --line: #dfe1e7;
  --white: #fff;
  --gut: max(20px, min(5vw, 64px), calc((100% - 1240px) / 2));
  --font: 'Archivo', 'Arial Narrow', Arial, sans-serif;
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
body { margin: 0; background: var(--white); color: var(--ink); font: 400 17px/1.6 var(--font); overflow-wrap: break-word; }
img { max-width: 100%; height: auto; display: block; }
a { color: var(--cyan-deep); text-underline-offset: 3px; }
a:hover { color: var(--violet); }
:focus-visible { outline: 3px solid var(--cyan); outline-offset: 2px; }
p { margin: 0 0 1em; }
ul { margin: 0 0 1em; padding-left: 1.25em; }
li { margin-bottom: .35em; }
figure { margin: 0; }
sup { font-size: .7em; line-height: 0; }

/* Titres : grandes capitales étroites et très grasses */
h1, h2, h3, h4 { font-family: var(--font); font-stretch: 75%; color: var(--violet-deep); line-height: 1.02; margin: 0 0 .55em; text-transform: uppercase; text-wrap: balance; }
h1 { font-size: clamp(2.8rem, 8.2vw, 6.6rem); font-weight: 800; }
h2 { font-size: clamp(2.1rem, 5vw, 4rem); font-weight: 800; }
h3 { font-size: clamp(1.3rem, 2vw, 1.6rem); font-weight: 700; line-height: 1.08; }
h3 a { color: inherit; text-decoration: none; }
.center { text-align: center; }

.skip { position: absolute; left: -999px; top: 0; z-index: 100; background: var(--ink); color: #fff; padding: 10px 16px; z-index: 100; }
.skip:focus { left: 10px; top: 10px; color: #fff; }

/* En-tête : plein sur les pages intérieures, transparent au-dessus de la photo d'accueil */
.site-head { position: sticky; top: 0; z-index: 50; background: #fff; box-shadow: 0 1px 0 var(--line); transition: background .2s, box-shadow .2s; }
.home .site-head { position: fixed; left: 0; right: 0; }
.admin-bar .site-head { top: 32px; }
.site-head__in { display: flex; align-items: center; justify-content: space-between; gap: 20px; padding: 10px var(--gut); }
.site-logo { display: block; background: #fff; border-radius: 12px; padding: 2px 6px; }
.site-logo img { width: 124px; height: auto; }
.nav-toggle { display: none; background: var(--violet); color: #fff; border: 0; border-radius: 99px; padding: 10px 20px; font: 700 15px var(--font); text-transform: uppercase; cursor: pointer; }
.nav { display: flex; align-items: center; gap: 12px; }
.nav ul { list-style: none; margin: 0; padding: 0; }
.nav .menu { display: flex; align-items: center; gap: 2px; }
.nav li { margin: 0; position: relative; }
.nav a { display: block; padding: 9px 13px; color: var(--ink); font-weight: 700; font-size: 15.5px; text-decoration: none; border-radius: 99px; }
.nav a:hover, .nav .current-menu-item > a { background: var(--lilac); color: var(--violet); }
.nav .menu > .menu-item-has-children > a::after { content: ''; display: inline-block; width: 6px; height: 6px; margin-left: 8px; border-right: 2px solid currentColor; border-bottom: 2px solid currentColor; transform: translateY(-3px) rotate(45deg); }
.nav .sub-menu { display: none; position: absolute; left: 0; top: 100%; min-width: 290px; padding: 12px; background: #fff; border-radius: 14px; box-shadow: 0 18px 40px rgba(36,20,58,.22); animation: drop .18s ease-out; }
.nav li:hover > .sub-menu, .nav li:focus-within > .sub-menu { display: block; }
.nav .sub-menu a { border-radius: 8px; }
.nav .sub-menu .sub-menu { display: block; position: static; min-width: 0; padding: 0 0 4px 12px; box-shadow: none; }
.nav .sub-menu .sub-menu a { font-weight: 500; padding: 6px 12px; }
.nav a.head-cta { background: var(--violet); color: #fff; padding: 10px 22px; font-weight: 800; text-transform: uppercase; white-space: nowrap; }
.nav a.head-cta:hover { background: var(--cyan-deep); color: #fff; }

@media (min-width: 1021px) {
  .site-head.is-top { background: transparent; box-shadow: none; }
  .site-head.is-top .nav .menu > li > a { color: #fff; text-shadow: 0 1px 8px rgba(0,0,0,.45); }
  .site-head.is-top .nav .menu > li > a:hover { background: rgba(255,255,255,.2); color: #fff; }
}

/* Boutons en pilule */
.wp-block-buttons { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 1.5em; }
.wp-block-button { margin: 0; }
.wp-block-button__link { display: inline-block; background: var(--violet); color: #fff; padding: 13px 28px; border: 2px solid var(--violet); border-radius: 99px; font-weight: 800; font-size: 15.5px; line-height: 1.25; text-transform: uppercase; letter-spacing: .02em; text-decoration: none; transition: background .15s, color .15s, border-color .15s, transform .15s; }
.wp-block-button__link:hover { background: var(--cyan-deep); border-color: var(--cyan-deep); color: #fff; transform: translateY(-2px); }
.wp-block-button__link::after { content: ' →'; display: inline-block; margin-left: 4px; transition: transform .18s; }
.wp-block-button__link:hover::after { transform: translateX(4px); }
.is-style-outline .wp-block-button__link { background: transparent; color: var(--violet); }
.is-style-outline .wp-block-button__link:hover { background: var(--violet); border-color: var(--violet); color: #fff; }

/* Sections */
.sec, .band, .stats, .cta { padding: clamp(56px, 8vw, 110px) var(--gut); }
.sec--pale { background: var(--cyan-tint); }
.sec--blue { background: var(--lilac); }
.sec > * + .wp-block-group { margin-top: 32px; }
.eyebrow { font-weight: 800; font-size: 14.5px; letter-spacing: .08em; text-transform: uppercase; color: var(--cyan-deep); margin-bottom: .8em; }
.lead { font-size: clamp(1.1rem, 1.8vw, 1.4rem); font-weight: 500; line-height: 1.4; max-width: 34em; }
.intro { font-size: clamp(1.1rem, 1.6vw, 1.3rem); font-weight: 500; line-height: 1.45; max-width: 46em; }
.prose { max-width: 74ch; }
.prose h2 { font-size: clamp(1.8rem, 3.6vw, 2.8rem); }
.note { font-size: .92rem; color: var(--muted); }

/* Bandeau de titre des pages intérieures */
.page-head { background: linear-gradient(110deg, var(--violet-deep), var(--violet) 45%, var(--cyan-deep)); background-size: 180% 180%; animation: drift 16s ease-in-out infinite alternate; color: #fff; padding: clamp(44px, 7vw, 96px) var(--gut) clamp(38px, 5vw, 70px); }
.page-head h1 { color: #fff; font-size: clamp(2.5rem, 6.4vw, 5.2rem); max-width: 18em; margin: 0; }
.page-head__crumb { font-weight: 800; font-size: 14.5px; letter-spacing: .08em; text-transform: uppercase; color: var(--cyan-soft); margin-bottom: .8em; }

/* Accueil : photo plein écran */
.hero { position: relative; display: flex; align-items: flex-end; min-height: min(92vh, 860px); padding: 130px var(--gut) clamp(40px, 6vw, 80px); background: var(--ink); color: #fff; overflow: hidden; isolation: isolate; }
.hero::after { content: ''; position: absolute; inset: 0; z-index: -1; background: linear-gradient(to bottom, rgba(36,20,58,.55) 0, rgba(36,20,58,.08) 22%, rgba(36,20,58,.62) 46%, rgba(36,20,58,.94) 100%); }
.hero__img { position: absolute; inset: -6% 0 0; z-index: -2; will-change: transform; }
.hero__img img { width: 100%; height: 100%; object-fit: cover; object-position: center 28%; animation: zoom 24s ease-out both; }
.hero__copy { max-width: 880px; }
.hero h1 { color: #fff; margin-bottom: .32em; font-size: clamp(2.7rem, 7vw, 5.6rem); }
.hero .eyebrow { color: var(--cyan-soft); }
.hero__copy > * { animation: rise .8s cubic-bezier(.2,.7,.2,1) both; }
.hero__copy > :nth-child(2) { animation-delay: .1s; }
.hero__copy > :nth-child(3) { animation-delay: .22s; }
.hero__copy > :nth-child(4) { animation-delay: .34s; }
.hero .lead { color: #fff; margin-bottom: 0; }
.hero .wp-block-button__link { background: var(--cyan); border-color: var(--cyan); color: var(--ink); }
.hero .wp-block-button__link:hover { background: #fff; border-color: #fff; color: var(--ink); }
.hero .is-style-outline .wp-block-button__link { background: transparent; border-color: #fff; color: #fff; }
.hero .is-style-outline .wp-block-button__link:hover { background: #fff; color: var(--ink); }

.band { position: relative; padding-block: 26px; background: var(--violet-deep); color: #fff; display: flex; flex-wrap: wrap; align-items: center; gap: 12px 26px; }
.band::before { content: ''; position: absolute; left: 0; right: 0; top: 0; height: 5px; background: linear-gradient(90deg, var(--violet), var(--cyan), var(--violet)); background-size: 200% 100%; animation: slide 7s linear infinite; }
.band__title { font-size: 1.15rem; color: var(--cyan-soft); margin: 0; }
.chips { display: flex; flex-wrap: wrap; gap: 8px; list-style: none; padding: 0; margin: 0; flex: 1 1 500px; }
.chips li { margin: 0; }
.chips a { display: block; padding: 6px 14px; border: 1.5px solid rgba(255,255,255,.45); border-radius: 99px; font-size: 14.5px; font-weight: 600; color: #fff; text-decoration: none; }
.chips a { transition: background .15s, color .15s, border-color .15s; }
.chips a:hover { background: var(--cyan); border-color: var(--cyan); color: var(--ink); }

/* Bloc d'orientation : quatre aplats bord à bord */
.paths-head { padding: clamp(56px, 8vw, 110px) var(--gut) clamp(26px, 3vw, 40px); }
.paths-head h2 { margin: 0; }
.paths { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); }
.path { position: relative; display: flex; flex-direction: column; justify-content: space-between; min-height: 300px; padding: 28px clamp(20px, 2.2vw, 34px) 30px; overflow: hidden; transition: transform .22s; }
.path:hover { transform: translateY(-6px); }
.path:nth-child(1) { background: var(--violet); color: #fff; }
.path:nth-child(1) h3, .path:nth-child(4) h3 { color: #fff; }
.path:nth-child(2) { background: var(--cyan); color: var(--ink); }
.path:nth-child(2) h3 { color: var(--ink); }
.path:nth-child(3) { background: var(--lilac-soft); color: var(--ink); }
.path:nth-child(4) { background: var(--violet-deep); color: #fff; }
.path h3 { font-size: clamp(1.7rem, 2.7vw, 2.4rem); line-height: 1; }
.path h3 a::after { content: ''; position: absolute; inset: 0; }
.path p { margin: 0; font-weight: 500; line-height: 1.4; }
.path p::after { content: ' →'; display: inline-block; margin-left: 4px; font-weight: 800; transition: transform .18s; }
.path:hover p::after { transform: translateX(6px); }

/* Blocs texte et image */
.split { display: grid; grid-template-columns: minmax(0, 1.15fr) minmax(0, 1fr); gap: clamp(28px, 5vw, 76px); align-items: center; }
.split--even { grid-template-columns: repeat(2, minmax(0, 1fr)); align-items: stretch; }
.split__img img { width: 100%; }
.split__img--contain img { max-height: 480px; width: auto; margin: auto; }
.side { display: grid; gap: 16px; }

/* Chiffres clés géants */
.stats { position: relative; overflow: hidden; isolation: isolate; background: var(--violet-deep); color: #fff; }
/* Rubans ondulés : rappel du mouvement entrelacé du logo, sans le reproduire */
.stats::after { content: ''; position: absolute; inset: auto 0 0; height: 150px; z-index: -1; opacity: .45; background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='800' height='150' fill='none' stroke-width='14'%3E%3Cpath stroke='%2329a9e1' d='M-400 75C-300 140-100 140 0 75 100 10 300 10 400 75 500 140 700 140 800 75 900 10 1100 10 1200 75'/%3E%3Cpath stroke='%236a2c91' d='M-400 75C-300 10-100 10 0 75 100 140 300 140 400 75 500 10 700 10 800 75 900 140 1100 140 1200 75'/%3E%3C/svg%3E") repeat-x 0 0 / 800px 150px; animation: wave 32s linear infinite; }
.stats h2 { color: #fff; }
.stats--home { padding-bottom: clamp(170px, 16vw, 210px); display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.15fr); gap: clamp(32px, 6vw, 90px); align-items: center; }
.stats--home h2 { font-size: clamp(2.5rem, 6vw, 5rem); }
.stats__intro p { max-width: 38em; font-size: 1.05rem; margin: 0; }
.stats--compact { padding-block: clamp(44px, 6vw, 72px); }
.stats--compact h2 { font-size: clamp(1.5rem, 3vw, 2.3rem); max-width: 26em; margin-bottom: 1em; }
.stats__grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 30px; }
.stats--home .stats__grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: clamp(26px, 3.5vw, 46px) 28px; }
.stat p { margin: 0; font-size: 16px; font-weight: 500; line-height: 1.3; text-transform: uppercase; font-stretch: 85%; }
.stat p.stat__n { font-size: clamp(2.5rem, 4.6vw, 4rem); font-weight: 800; line-height: 1; color: var(--cyan-soft); margin-bottom: 8px; font-stretch: 75%; font-variant-numeric: tabular-nums; }
.stats--home .stat p.stat__n { font-size: clamp(3.4rem, 7.6vw, 6.6rem); }
.panel p.stat__n { font-size: clamp(2.2rem, 4vw, 3.2rem); font-weight: 800; line-height: 1; color: var(--cyan-soft); font-stretch: 75%; margin-bottom: 10px; }

/* Tuiles d'expertise en aplats */
.cards { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 18px; }
.card { position: relative; background: var(--cyan-tint); padding-bottom: 14px; transition: transform .22s, box-shadow .22s; }
.card:hover { transform: translateY(-5px); box-shadow: 0 16px 30px rgba(36,20,58,.14); }
.card:nth-child(6n+2), .card:nth-child(6n+6) { background: var(--grey-tint); }
.card:nth-child(6n+3), .card:nth-child(6n+4) { background: var(--lilac); }
.sec--pale .card:nth-child(6n+1), .sec--pale .card:nth-child(6n+5) { background: #fff; }
.card > figure { overflow: hidden; }
.card > figure img { width: 100%; aspect-ratio: 4/3; object-fit: cover; transition: transform .35s; }
.card:hover > figure img { transform: scale(1.03); }
.card > h2, .card > h3, .card > p { padding-inline: 22px; }
.card > h2, .card > h3 { margin-top: 22px; }
.card > p { font-size: 16px; margin-bottom: .6em; }
.card h3 a::after { content: ''; position: absolute; inset: 0; }
.card--office > h2 { font-size: 1.7rem; }
.cards--text .card { padding-top: 4px; }

/* Produits */
.products { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 12px; margin-bottom: 8px; }
.products--4 { grid-template-columns: repeat(auto-fit, minmax(170px, 1fr)); margin-block: 22px 30px; }
.product { position: relative; background: #fff; padding: 20px 14px 18px; text-align: center; transition: transform .22s, box-shadow .22s; }
.product:hover { transform: translateY(-4px); box-shadow: 0 12px 24px rgba(36,20,58,.12); }
.sec:not(.sec--pale) .product { background: var(--cyan-tint); }
.product figure { height: 88px; display: flex; align-items: center; justify-content: center; margin-bottom: 12px; }
.product img { max-height: 88px; width: auto; mix-blend-mode: multiply; }
.product h3 { font-size: 1.2rem; margin-bottom: .25em; text-transform: none; }
.product h3 a::after { content: ''; position: absolute; inset: 0; }
.product p { font-size: 14px; color: var(--muted); margin: 0; line-height: 1.3; }

/* Actualités : tuiles photo bord à bord */
.stories { padding-block: clamp(56px, 8vw, 110px); }
.stories > :not(.wp-block-latest-posts) { margin-inline: var(--gut); }
ul.wp-block-latest-posts.wp-block-latest-posts__list.is-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 0; list-style: none; padding: 0; margin: 28px 0 0; }
ul.wp-block-latest-posts.wp-block-latest-posts__list.is-grid li { position: relative; margin: 0; width: auto !important; min-height: clamp(380px, 38vw, 540px); padding: 26px clamp(20px, 2.2vw, 34px); background: var(--violet-deep); color: #fff; overflow: hidden; display: flex; flex-direction: column; justify-content: flex-end; isolation: isolate; }
ul.wp-block-latest-posts.wp-block-latest-posts__list.is-grid li::after { content: ''; position: absolute; inset: 0; z-index: -1; background: linear-gradient(to bottom, rgba(36,20,58,0) 30%, rgba(36,20,58,.9) 100%); }
.wp-block-latest-posts__featured-image { position: absolute; inset: 0; z-index: -2; margin: 0; }
.wp-block-latest-posts__featured-image img { width: 100%; height: 100%; object-fit: cover; transition: transform .35s; }
ul.wp-block-latest-posts.is-grid li:hover .wp-block-latest-posts__featured-image img { transform: scale(1.03); }
a.wp-block-latest-posts__post-title { order: 1; font: 800 clamp(1.3rem, 2vw, 1.65rem)/1.08 var(--font); font-stretch: 75%; text-transform: uppercase; color: #fff; text-decoration: none; }
a.wp-block-latest-posts__post-title:hover { color: var(--cyan-soft); }
a.wp-block-latest-posts__post-title::before { content: ''; position: absolute; inset: 0; }
time.wp-block-latest-posts__post-date { order: 0; margin-bottom: 8px; color: var(--cyan-soft); font-size: 14px; font-weight: 600; }

/* Témoignages */
.quotes { display: grid; grid-auto-flow: column; grid-auto-columns: minmax(300px, 390px); gap: 16px; overflow-x: auto; scroll-snap-type: x proximity; padding-bottom: 16px; }
.quote { scroll-snap-align: start; background: #fff; padding: 26px; display: flex; flex-direction: column; justify-content: space-between; }
.quote p { font-size: 17px; font-weight: 500; line-height: 1.42; }
.quote .quote__by { margin: 0; font-weight: 800; font-stretch: 85%; color: var(--violet); font-size: 15px; text-transform: uppercase; }

.logos { display: flex; flex-wrap: wrap; align-items: center; justify-content: center; gap: 28px 44px; }
.logos img { max-height: 60px; max-width: 136px; width: auto; }

.cta { background: linear-gradient(110deg, var(--violet), var(--cyan-deep)); background-size: 180% 180%; animation: drift 16s ease-in-out infinite alternate; color: #fff; text-align: center; padding-block: clamp(52px, 7vw, 90px); }
.cta h2 { color: #fff; margin-bottom: .3em; }
.cta .wp-block-button__link { background: #fff; border-color: #fff; color: var(--violet); }
.cta .wp-block-button__link:hover { background: var(--ink); border-color: var(--ink); color: #fff; }
.cta .wp-block-buttons { justify-content: center; }

/* Pages intérieures */
.panel { padding: clamp(24px, 3vw, 40px); }
.panel h2 { font-size: clamp(1.8rem, 3.4vw, 2.7rem); }
.panel p:last-child { margin-bottom: 0; }
.panel--pale { background: var(--cyan-tint); }
.panel--blue { background: var(--violet); color: #fff; }
.panel--blue h2 { color: #fff; }
.panel--navy { background: var(--violet-deep); color: #fff; }
.panel--navy h2 { color: #fff; }
.panel a { overflow-wrap: anywhere; }
.org { max-width: 78ch; padding-bottom: 12px; }
.org h2 { font-size: clamp(1.8rem, 3.6vw, 2.8rem); }
.org h3 { text-transform: none; font-size: 1.2rem; }
.org + .org { border-top: 2px solid var(--lilac-soft); padding-top: 38px; margin-top: 38px; }
.projects { display: grid; gap: 12px; }
.project { background: #fff; padding: 26px 28px; }
.project h3 { max-width: 40em; }
.facts { list-style: none; padding: 0; margin: 0; display: flex; flex-wrap: wrap; gap: 4px 28px; font-size: 16px; }
.facts li { margin: 0; }
.wp-block-details { margin-top: 16px; font-size: 16px; }
.wp-block-details summary { cursor: pointer; font-weight: 800; color: var(--cyan-deep); text-transform: uppercase; font-size: 15px; letter-spacing: .02em; }
.wp-block-details[open] summary { margin-bottom: 14px; }
.tablewrap { overflow-x: auto; background: #fff; }
.wp-block-table table { width: 100%; min-width: 620px; border-collapse: collapse; font-size: 15.5px; }
.wp-block-table th { background: var(--violet-deep); color: #fff; text-align: left; padding: 12px 16px; text-transform: uppercase; font-size: 14px; letter-spacing: .03em; }
.wp-block-table td { padding: 11px 16px; border-top: 1px solid var(--line); vertical-align: top; }
.downloads { list-style: none; padding: 0; display: grid; gap: 8px; max-width: 860px; }
.downloads li { background: #fff; padding: 14px 18px; margin: 0; font-weight: 600; }
.tag { font-size: 12px; font-weight: 800; color: var(--violet); margin-left: 6px; }
.map { width: 100%; height: 100%; min-height: 400px; border: 0; display: block; background: var(--cyan-tint); }

/* Articles et liste d'actualités */
.article { max-width: 780px; margin-inline: auto; padding: clamp(40px, 6vw, 70px) 20px 80px; }
.article h1 { font-size: clamp(2.1rem, 4.6vw, 3.5rem); }
.article h2 { font-size: 1.55rem; font-stretch: 85%; text-transform: none; line-height: 1.2; margin-top: 1.4em; }
.article__meta { color: var(--muted); font-size: 15px; font-weight: 600; }
.article__img { margin-bottom: 28px; }
.article__img img { width: 100%; }
.post-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 18px; }
.post-card { background: var(--cyan-tint); transition: transform .22s, box-shadow .22s; }
.post-card:hover { transform: translateY(-5px); box-shadow: 0 16px 30px rgba(36,20,58,.14); }
.post-card img { width: 100%; aspect-ratio: 4/3; object-fit: cover; }
.post-card h2 { font-size: 1.35rem; line-height: 1.08; padding: 18px 20px 6px; margin: 0; }
.post-card h2 a { color: var(--violet-deep); text-decoration: none; }
.post-card h2 a:hover { color: var(--violet); }
.post-card time { display: block; padding: 0 20px 18px; color: var(--muted); font-size: 14px; font-weight: 600; }
.pagination { margin-top: 32px; text-align: center; }
.pagination .page-numbers { padding: 6px 12px; }

/* Pied de page */
.site-foot { background: var(--ink); color: #e4dfec; padding: clamp(50px, 6vw, 80px) var(--gut) 24px; font-size: 16px; }
.site-foot a { color: #fff; }
.site-foot a:hover { color: var(--cyan-soft); }
.site-foot h2 { color: var(--cyan-soft); font-size: 1.35rem; margin-bottom: .7em; }
.foot-grid { display: grid; grid-template-columns: 1.3fr 1.2fr 1fr; gap: 36px; }
.foot-logo { background: #fff; display: inline-block; padding: 8px 12px; border-radius: 12px; margin-bottom: 16px; }
.foot-logo img { width: 124px; }
.foot-tag { font: 800 clamp(1.5rem, 2.6vw, 2.1rem)/1.05 var(--font); font-stretch: 75%; text-transform: uppercase; color: #fff; max-width: 15em; }
.site-foot ul { list-style: none; padding: 0; }
.foot-legal { border-top: 1px solid rgba(255,255,255,.2); margin-top: 38px; padding-top: 18px; font-size: 14px; }
.foot-legal p { margin: 0; }

/* Barre de progression et en-tête compact */
.progress { position: fixed; left: 0; right: 0; top: 0; height: 4px; z-index: 60; background: linear-gradient(90deg, var(--violet), var(--cyan)); transform: scaleX(0); transform-origin: 0 50%; pointer-events: none; }
.site-logo img { transition: width .2s; }
.site-head__in { transition: padding .2s; }
.site-head.is-small .site-logo img { width: 96px; }
.site-head.is-small .site-head__in { padding-block: 5px; }

/* Apparition au défilement */
.reveal { opacity: 0; transform: translateY(24px); }
.reveal.is-in { opacity: 1; transform: none; transition: opacity .65s cubic-bezier(.2,.7,.2,1) var(--d, 0ms), transform .65s cubic-bezier(.2,.7,.2,1) var(--d, 0ms); }
.reveal.is-in:hover { transition-delay: 0ms; transition-duration: .22s; }

/* Commandes des carrousels */
.ctrls { display: flex; align-items: center; gap: 8px; margin-top: 14px; }
.ctrls--center { justify-content: center; margin-top: 20px; }
.ctrl { min-width: 46px; min-height: 46px; padding: 0 14px; background: #fff; color: var(--violet); border: 2px solid var(--violet); border-radius: 99px; font: 700 15px var(--font); cursor: pointer; transition: background .15s, color .15s; }
.ctrl:hover { background: var(--violet); color: #fff; }

/* Défilement des logos */
.logos.is-marquee { display: block; overflow: hidden; -webkit-mask-image: linear-gradient(90deg, transparent, #000 8%, #000 92%, transparent); mask-image: linear-gradient(90deg, transparent, #000 8%, #000 92%, transparent); }
.logos__track { display: flex; align-items: center; gap: 56px; width: max-content; animation: marquee 44s linear infinite; }
.logos.is-marquee:hover .logos__track, .logos.is-paused .logos__track { animation-play-state: paused; }

/* Recherche des centres BelFam */
.finder { display: grid; grid-template-columns: minmax(0, 1.4fr) minmax(0, 1fr) auto; gap: 14px; align-items: end; margin-bottom: 16px; }
.finder__f span { display: block; margin-bottom: 5px; font-weight: 700; font-size: 15px; }
.finder input, .finder select { width: 100%; height: 48px; padding: 0 16px; background: #fff; color: var(--ink); border: 2px solid var(--violet); border-radius: 99px; font: 500 16px var(--font); }
.finder__n { margin: 0 0 12px; font-weight: 700; color: var(--violet); white-space: nowrap; }
.wp-block-table tbody tr { transition: background .12s; }
.wp-block-table tbody tr:hover { background: var(--cyan-tint); }

@keyframes rise { from { opacity: 0; transform: translateY(26px); } to { opacity: 1; transform: none; } }
@keyframes zoom { from { transform: scale(1.1); } to { transform: scale(1); } }
@keyframes drop { from { opacity: 0; transform: translateY(-6px); } to { opacity: 1; transform: none; } }
@keyframes drift { from { background-position: 0 50%; } to { background-position: 100% 50%; } }
@keyframes slide { to { background-position: -200% 0; } }
@keyframes wave { to { background-position: -800px 0; } }
@keyframes marquee { to { transform: translateX(calc(-50% - 28px)); } }

/* ---------- Motion design : illustrations animées ---------- */
.m-art { display: block; pointer-events: none; overflow: visible; }
/* Seuls les éléments animés (avec une classe) : l'origine ne doit pas décaler les groupes placés par l'attribut transform */
:where(.m-art) :where([class]) { transform-box: fill-box; transform-origin: center; }
.m-art:not(.is-playing) * { animation-play-state: paused !important; }
.m-off .m-art * { animation: none !important; } /* En pause : les dessins restent complets */
.m-off .page-head, .m-off .cta, .m-off .band::before, .m-off .stats::after, .m-off .hero__img img { animation-play-state: paused !important; }

/* Bandeau des pages intérieures */
/* Place réservée d'avance à l'illustration : la page ne bouge pas quand elle arrive (critère de Google) */
.page-head { position: relative; overflow: hidden; isolation: isolate; min-height: clamp(240px, 26vw, 360px); display: flex; flex-direction: column; justify-content: center; }
.page-head h1, .page-head .page-head__crumb { max-width: 58%; }
.page-head.is-long h1 { font-size: clamp(2.1rem, 3.9vw, 3.4rem); line-height: 1.04; }
.m-head { position: absolute; right: var(--gut); top: 50%; width: clamp(240px, 32vw, 430px); height: auto; transform: translateY(-50%); z-index: -1; }

/* Accueil */
.hero { padding-bottom: clamp(92px, 10vw, 136px); }
.hero__copy { position: relative; z-index: 2; }
.m-ribbon { position: absolute; left: 0; right: 0; bottom: 0; width: 100%; height: clamp(60px, 8vw, 104px); z-index: 1; opacity: .8; overflow: hidden; }
.m-orbs { position: absolute; right: var(--gut); bottom: clamp(100px, 11vw, 140px); width: clamp(240px, 23vw, 320px); height: auto; z-index: 1; display: none; }
@media (min-width: 1240px) { .m-orbs { display: block; } }
.path { min-height: 350px; }
.path__art { width: 112px; height: 84px; margin: 10px 0 14px auto; flex: none; }
.stats > :not(.m-pulseline) { position: relative; z-index: 1; }
.m-pulseline { position: absolute; left: 0; top: 10px; width: 100%; height: 56px; }
.m-floaters { position: absolute; inset: 0; width: 100%; height: 100%; z-index: -1; overflow: hidden; }
.cta { position: relative; overflow: hidden; isolation: isolate; }
.sec--pale, .sec--blue { position: relative; }
.m-scrollwave { position: absolute; left: 0; top: 8px; width: 100%; height: 36px; overflow: hidden; }
.sec--pale > :not(.m-scrollwave), .sec--blue > :not(.m-scrollwave) { position: relative; }

/* Vocabulaire d'animation */
.m-draw { stroke-dasharray: 1; stroke-dashoffset: 0; animation: m-draw 1.5s cubic-bezier(.4,0,.2,1) var(--t, 0s) both; }
.m-long { animation-duration: 3.4s; }
.m-flow { stroke-dasharray: 5 11; animation: m-flow 1.1s linear infinite; }
.m-still { }
.m-bob { animation: m-bob 4.2s ease-in-out var(--t, 0s) infinite alternate; }
.m-pulse { animation: m-pulse 2.2s ease-in-out var(--t, 0s) infinite alternate; }
.m-ping { animation: m-ping 3.6s ease-out var(--t, 0s) infinite both; }
.m-blink { animation: m-blink 2.8s ease-in-out var(--t, 0s) infinite; }
.m-up { animation: m-up 4.6s ease-in-out var(--t, 0s) infinite both; }
.m-rise { animation: m-rise 11s linear var(--t, 0s) infinite both; }
.m-drop { animation: m-drop .9s cubic-bezier(.3,1.5,.5,1) var(--t, 0s) both; }
.m-grow { transform-origin: 50% 100%; animation: m-grow 1.1s cubic-bezier(.2,.8,.2,1) var(--t, 0s) both; }
.m-eq { transform-origin: 50% 100%; animation: m-eq 1.3s ease-in-out var(--t, 0s) infinite alternate; }
.m-type { transform-origin: 0 50%; animation: m-type 4.4s ease-in-out var(--t, 0s) infinite; }
.m-tilt { transform-origin: 20% 60%; animation: m-tilt 1.8s ease-in-out infinite alternate; }
.m-wavebeat { animation: m-blink 1.8s ease-in-out var(--t, 0s) infinite; }
.m-confetti { animation: m-confetti 3.2s ease-in-out var(--t, 0s) infinite alternate; }
.m-arrow { animation: m-arrow 4.8s cubic-bezier(.2,.8,.2,1) infinite both; }
.m-scan { animation: m-scan 6s ease-in-out infinite alternate; }
.m-plane { animation: m-plane 5.5s ease-in-out infinite; }
.m-orb { animation: m-orb 6.5s ease-in-out var(--t, 0s) infinite alternate; }
.m-sway { transform-box: view-box; transform-origin: 0 0; animation: m-sway 34s linear infinite; }
.m-travel { stroke-dasharray: .16 .84; animation: m-travel 7s linear infinite; }
.m-spin { animation: m-spin 26s linear infinite; }
.m-spinr { animation: m-spin 15s linear infinite reverse; }
.m-center { transform-box: view-box; transform-origin: 200px 140px; }
.m-c1 { animation-duration: 22s; }

@keyframes m-draw { from { stroke-dashoffset: 1; } to { stroke-dashoffset: 0; } }
@keyframes m-flow { to { stroke-dashoffset: -16; } }
@keyframes m-bob { from { transform: translateY(5px); } to { transform: translateY(-7px); } }
@keyframes m-pulse { from { transform: scale(.96); } to { transform: scale(1.07); } }
@keyframes m-ping { 0% { transform: scale(.72); opacity: .95; } 100% { transform: scale(1.32); opacity: 0; } }
@keyframes m-blink { 0%, 100% { opacity: .35; } 50% { opacity: 1; } }
@keyframes m-up { 0% { transform: translateY(30px) scale(.7); opacity: 0; } 25% { opacity: 1; } 75% { opacity: 1; } 100% { transform: translateY(-34px) scale(1.08); opacity: 0; } }
@keyframes m-rise { 0% { transform: translateY(70px) rotate(-8deg); opacity: 0; } 15% { opacity: 1; } 85% { opacity: 1; } 100% { transform: translateY(-200px) rotate(10deg); opacity: 0; } }
@keyframes m-drop { from { transform: translateY(-80px); opacity: 0; } to { transform: none; opacity: 1; } }
@keyframes m-grow { from { transform: scaleY(0); } to { transform: scaleY(1); } }
@keyframes m-eq { from { transform: scaleY(.28); } to { transform: scaleY(1); } }
@keyframes m-type { 0% { transform: scaleX(0); } 28%, 82% { transform: scaleX(1); opacity: 1; } 100% { transform: scaleX(1); opacity: .2; } }
@keyframes m-tilt { from { transform: rotate(-3deg); } to { transform: rotate(4deg); } }
@keyframes m-confetti { from { transform: translateY(12px) rotate(-30deg); } to { transform: translateY(-14px) rotate(70deg); } }
@keyframes m-arrow { 0% { transform: translate(120px, -80px); opacity: 0; } 14% { opacity: 1; } 28%, 76% { transform: none; opacity: 1; } 100% { transform: none; opacity: 0; } }
@keyframes m-scan { from { transform: translate(-46px, 40px); } to { transform: translate(138px, -38px); } }
@keyframes m-plane { 0% { transform: translate(-120px, 70px) scale(.72); opacity: 0; } 18% { opacity: 1; } 80% { opacity: 1; } 100% { transform: translate(14px, -10px) scale(1.04); opacity: 0; } }
@keyframes m-orb { from { transform: translateY(10px) rotate(-3deg); } to { transform: translateY(-12px) rotate(3deg); } }
@keyframes m-sway { to { transform: translateX(-720px); } }
@keyframes m-travel { from { stroke-dashoffset: 1; } to { stroke-dashoffset: 0; } }
@keyframes m-spin { to { transform: rotate(360deg); } }

/* Écran d'ouverture de l'accueil : une fois par visite, entièrement en CSS, il se retire même si JavaScript échoue */
html.m-intro body::before { content: 'Des solutions de santé à votre portée.'; position: fixed; inset: 0; z-index: 9999; display: flex; align-items: center; justify-content: center; padding: 0 8vw; text-align: center; background: var(--violet-deep); color: #fff; font: 800 clamp(2.4rem, 7vw, 6rem)/1.02 var(--font); font-stretch: 75%; text-transform: uppercase; pointer-events: none; animation: m-intro 1.9s cubic-bezier(.7,0,.2,1) both; }
@keyframes m-intro { 0% { color: transparent; clip-path: inset(0); } 22% { color: #fff; } 68% { clip-path: inset(0); } 99% { clip-path: inset(0 0 100% 0); visibility: visible; } 100% { clip-path: inset(0 0 100% 0); visibility: hidden; } }
html.m-intro .hero__copy > * { animation-delay: 1.45s; }
html.m-intro .hero__copy > :nth-child(2) { animation-delay: 1.55s; }
html.m-intro .hero__copy > :nth-child(3) { animation-delay: 1.67s; }
html.m-intro .hero__copy > :nth-child(4) { animation-delay: 1.79s; }

/* En-tête qui s'efface à la descente */
.m-fx .site-head { transition: transform .35s cubic-bezier(.2,.7,.2,1), background .2s, box-shadow .2s; }
.m-fx .site-head.is-away:not(:focus-within) { transform: translateY(-110%); }

/* Titres : mots révélés derrière un masque (marge pour ne pas couper les accents) */
.m-w { display: inline-block; overflow: hidden; padding-block: .16em .06em; margin-block: -.16em -.06em; vertical-align: top; }
.m-wi { display: inline-block; }
.m-fx .m-split .m-wi { transform: translateY(112%); }
.m-fx .m-split.is-shown .m-wi { transform: none; transition: transform .75s cubic-bezier(.2,.8,.2,1) calc(var(--w, 0) * 55ms); }

/* Photos : rideau */
.m-fx .m-clip img { clip-path: inset(100% 0 0 0); }
.m-fx .m-clip.is-shown img { clip-path: inset(0); transition: clip-path .95s cubic-bezier(.65,0,.2,1), transform .35s; }
.split__img img { transition: rotate .2s linear; }

/* Mots qui s'allument */
.m-fx .m-lit { opacity: .4; transition: opacity .25s linear; }
.m-fx .m-lit.is-on { opacity: 1; }

.stories { overflow-x: clip; }
.stories h2 { will-change: transform; }

/* Aplats empilés */
.m-fx .paths { display: block; }
.m-fx .path { position: sticky; top: calc(62px + var(--i, 0) * 12px); min-height: min(68vh, 560px); display: grid; grid-template-columns: minmax(0, 1fr) auto; grid-template-rows: 1fr auto; gap: 18px 30px; padding: clamp(28px, 4vw, 60px) var(--gut); border-radius: 26px 26px 0 0; box-shadow: 0 -12px 28px rgba(36,20,58,.14); }
.m-fx .path:hover { transform: none; }
.m-fx .path h3 { grid-column: 1; font-size: clamp(2.6rem, 6.6vw, 5.6rem); max-width: 11em; margin: 0; }
.m-fx .path .path__art { grid-column: 2; grid-row: 1 / span 2; align-self: center; width: clamp(120px, 24vw, 300px); height: auto; margin: 0; }
.m-fx .path p { grid-column: 1; font-size: clamp(1.05rem, 1.6vw, 1.3rem); max-width: 30em; align-self: end; }

/* Vagues du pied de page */
.site-foot { position: relative; }
.cta { padding-bottom: clamp(92px, 11vw, 150px); }
.m-footwave { position: absolute; left: 0; right: 0; bottom: calc(100% - 1px); width: 100%; height: clamp(30px, 4.5vw, 62px); overflow: hidden; }
.m-sway--slow { animation-duration: 21s; animation-direction: reverse; }

.motion-toggle { margin-top: 10px; padding: 0; background: none; border: 0; color: #fff; font: 600 14px var(--font); text-decoration: underline; text-underline-offset: 3px; cursor: pointer; }
.motion-toggle:hover { color: var(--cyan-soft); }

@media (max-width: 760px) {
  .m-fx .path { grid-template-columns: minmax(0, 1fr); grid-template-rows: auto 1fr auto; gap: 14px; }
  .m-fx .path h3 { font-size: clamp(2.3rem, 11vw, 3.4rem); }
  .m-fx .path .path__art { grid-column: 1; grid-row: 2; justify-self: end; width: 150px; }
  .page-head { min-height: 0; padding-bottom: 222px; justify-content: flex-start; }
  .page-head h1, .page-head .page-head__crumb { max-width: none; }
  .m-head { left: 50%; right: auto; top: auto; bottom: 18px; width: min(72%, 270px); transform: translateX(-50%); }
}

@media print { .reveal { opacity: 1; transform: none; } .progress, .ctrls, .m-art, .motion-toggle { display: none; } html.m-intro body::before { display: none; } .m-fx .m-clip img { clip-path: none; } .m-fx .m-split .m-wi { transform: none; } .m-fx .m-lit { opacity: 1; } }
@media (prefers-reduced-motion: reduce) { html.m-intro body::before { display: none; } }

@media (max-width: 860px) {
  .finder { grid-template-columns: minmax(0, 1fr); }
  .finder__n { margin: 0; }
}

@media (max-width: 1020px) {
  .nav-toggle { display: block; }
  .nav { display: none; position: absolute; left: 0; right: 0; top: 100%; flex-direction: column; align-items: stretch; background: #fff; box-shadow: 0 14px 26px rgba(36,20,58,.18); padding: 10px 20px 20px; max-height: calc(100vh - 80px); overflow-y: auto; }
  .nav.is-open { display: flex; }
  .nav .menu { flex-direction: column; align-items: stretch; }
  .nav .sub-menu { display: block; position: static; min-width: 0; padding: 0 0 4px 14px; box-shadow: none; }
  .nav .menu > .menu-item-has-children > a::after { display: none; }
  .nav a.head-cta { text-align: center; margin-top: 8px; }
  .site-head.is-top { background: transparent; box-shadow: none; }
  .paths { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .path { min-height: 240px; }
}

@media (max-width: 860px) {
  .split, .split--even, .stats--home { grid-template-columns: minmax(0, 1fr); }
  .stats__grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .cards, .post-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  ul.wp-block-latest-posts.wp-block-latest-posts__list.is-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .foot-grid { grid-template-columns: minmax(0, 1fr); }
  .band { display: block; }
  .band__title { margin-bottom: 12px; }
}

@media (max-width: 782px) {
  .admin-bar .site-head { top: 46px; }
}

@media (max-width: 560px) {
  body { font-size: 16px; }
  .hero { min-height: 86vh; padding-top: 110px; }
  .hero__img img { object-position: 48% 28%; }
  .cards, .post-grid { grid-template-columns: minmax(0, 1fr); }
  ul.wp-block-latest-posts.wp-block-latest-posts__list.is-grid { grid-template-columns: minmax(0, 1fr); }
  .quotes { grid-auto-columns: 86%; }
  .paths { grid-template-columns: minmax(0, 1fr); }
  .path { min-height: 190px; }
  .project { padding: 22px 20px; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { transition: none !important; animation: none !important; }
}
