/* Thème Vivamini. Couleurs et typographies dans theme.json, ici la mise en forme des sections. */

:root {
	--vm-gutter: clamp(20px, 5vw, 64px);
	--vm-radius: 24px;
	--vm-ink: var(--wp--preset--color--encre);
	--vm-muted: var(--wp--preset--color--gris);
	--vm-petrole: var(--wp--preset--color--petrole);
	--vm-deep: var(--wp--preset--color--petrole-fonce);
	--vm-line: var(--wp--preset--color--filet);
}

body { -webkit-font-smoothing: antialiased; text-rendering: optimizeLegibility; }
img { max-width: 100%; height: auto; }
:where(a) { text-underline-offset: 3px; }
:focus-visible { outline: 3px solid var(--vm-ink); outline-offset: 2px; }
.skip-link:focus { z-index: 1000; }

/* Le contenu des pages : sections bord à bord, sans marge entre elles. */

.vm-main > .wp-block-post-content { margin-top: 0; }
.wp-block-post-content > .vm-section,
.wp-block-post-content > .vm-section + *,
.vm-main > .vm-section { margin-block-start: 0; }
.wp-site-blocks > * + * { margin-block-start: 0; }

.vm-section { padding-top: clamp(40px, 6vw, 64px); padding-bottom: clamp(40px, 6vw, 64px); }
.vm-section--top { padding-top: clamp(12px, 2vw, 16px); }
.vm-section--flush-top { padding-top: 0; }
.vm-section--ciel { background: var(--wp--preset--color--ciel); }
.vm-section--ciel-clair { background: var(--wp--preset--color--ciel-clair); padding-top: 28px; padding-bottom: 28px; }
.vm-section--vert { background: var(--wp--preset--color--vert-pale); }
.vm-section--petrole { background: var(--vm-petrole); color: #fff; }
.vm-section--petrole :where(h1, h2, h3, p) { color: #fff; }
.vm-section--petrole .vm-lead { color: var(--wp--preset--color--texte-sur-fonce); }
.vm-section--bande { background: var(--vm-petrole); color: #fff; padding-top: 28px; padding-bottom: 28px; }

.vm-ariane-wrap { padding-top: 16px; padding-bottom: 8px; }

/* Titres et chapôs */
.vm-lead { color: var(--vm-muted); box-sizing: border-box; padding-right: max(0px, calc(100% - 46em)); }
.vm-muted { color: var(--vm-muted); }
.vm-section h2.wp-block-heading { margin-top: 0; }
.vm-head-row { display: flex; align-items: baseline; justify-content: space-between; gap: 12px 24px; flex-wrap: wrap; }
.vm-head-row > * { margin: 0 !important; }

/* En-tête */
.vm-site-header { position: relative; z-index: 50; }
.vm-header {
	background: #fff; border-bottom: 1px solid var(--vm-line);
	min-height: 84px; padding: 8px var(--vm-gutter) !important; gap: 24px;
	box-sizing: border-box;
}
.vm-header__logo img { width: 100px; height: auto; }
.vm-nav { font-weight: 600; gap: 32px; }
.vm-nav .wp-block-navigation__container { gap: 32px; }
.vm-nav a { color: var(--vm-ink); text-decoration: none; }
.vm-nav a:hover, .vm-nav .current-menu-item > a, .vm-nav [aria-current="page"] { color: var(--vm-deep); text-decoration: underline; text-decoration-thickness: 2px; }
.vm-header__actions { gap: 20px; }
.vm-header__cta { margin: 0; }
.vm-header__cta .wp-block-button__link { padding: 13px 22px; font-size: 15px; }
.vm-nav .wp-block-navigation__responsive-container-open { width: 44px; height: 44px; align-items: center; justify-content: center; color: var(--vm-petrole); }
.vm-nav .wp-block-navigation__responsive-container-open:not(.always-shown) { display: none; }
@media (max-width: 781px) { .vm-nav .wp-block-navigation__responsive-container-open:not(.always-shown) { display: inline-flex; } .vm-nav .wp-block-navigation__responsive-container:not(.is-menu-open) { display: none; } }
.vm-nav .wp-block-navigation__responsive-container-open svg { width: 28px; height: 28px; }
.vm-nav .wp-block-navigation__responsive-container.is-menu-open { padding: 24px var(--vm-gutter); background: #fff; }
.vm-nav .wp-block-navigation__responsive-container.is-menu-open .wp-block-navigation__container { gap: 20px; font-size: 22px; font-family: var(--wp--preset--font-family--fredoka); }
.vm-nav .wp-block-navigation__responsive-container-close { width: 44px; height: 44px; }

@media (max-width: 1100px) and (min-width: 782px) {
	.vm-nav, .vm-nav .wp-block-navigation__container { gap: 20px; }
	.vm-header .vm-tel { display: none; }
}
@media (max-width: 781px) {
	.vm-header { min-height: 64px; gap: 8px; padding-top: 6px !important; padding-bottom: 6px !important; }
	.vm-header__logo img { width: 74px; }
	.vm-header__logo { margin-right: auto !important; }
	.vm-nav { order: 3; }
	.vm-header .vm-tel, .vm-header .wp-block-vivamini-coordonnees { display: none; }
	.vm-header__cta .wp-block-button__link { padding: 10px 16px; font-size: 14px; }
	.vm-bandeau__inner { font-size: 13px; padding: 10px 16px; }
}

/* Boutons, styles supplémentaires */
.wp-block-button.is-style-contour .wp-block-button__link { background: #fff; color: var(--vm-deep); box-shadow: inset 0 0 0 2px var(--vm-petrole); }
.wp-block-button.is-style-contour .wp-block-button__link:hover { background: var(--wp--preset--color--ciel); }
.wp-block-button.is-style-contour-sombre .wp-block-button__link { background: transparent; color: var(--vm-ink); box-shadow: inset 0 0 0 2px var(--vm-ink); }
.wp-block-button.is-style-contour-sombre .wp-block-button__link:hover { background: rgba(23,57,74,.06); }
.wp-block-button.is-style-petrole .wp-block-button__link { background: var(--vm-deep); color: #fff; }
.wp-block-button.is-style-lien .wp-block-button__link { background: transparent; color: inherit; padding-left: 0; padding-right: 0; text-decoration: underline; }
.vm-section--petrole .wp-block-button.is-style-lien .wp-block-button__link { color: #fff; }
.wp-block-buttons { gap: 14px; }
.wp-block-button__link { min-height: 48px; box-sizing: border-box; display: inline-flex; align-items: center; justify-content: center; }
.is-style-lien-fort a, p.is-style-lien-fort { font-weight: 700; }
.is-style-lien-fort a { color: var(--vm-deep); }

/* Listes */
ul.is-style-sans-puces, ol.is-style-sans-puces { list-style: none; padding-left: 0; }
ul.is-style-pastilles { list-style: none; padding: 0; margin: 0; display: flex; flex-wrap: wrap; gap: 8px; }
ul.is-style-pastilles li { display: inline-flex; align-items: center; padding: 8px 14px; border-radius: 18px; background: var(--wp--preset--color--vert-pale); color: var(--wp--preset--color--vert-fonce); font-weight: 700; font-size: 14px; line-height: 1.3; }
.vm-section--vert ul.is-style-pastilles li { background: #fff; }
ul.is-style-coches { list-style: none; padding-left: 0; }
ul.is-style-coches li { position: relative; padding-left: 30px; margin-bottom: 10px; }
ul.is-style-coches li::before { content: ""; position: absolute; left: 0; top: .35em; width: 18px; height: 18px; border-radius: 9px; background: var(--wp--preset--color--vert-pale) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 18 18'%3E%3Cpath d='M5 9.5l2.6 2.5L13 6.5' fill='none' stroke='%232F6B3A' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E") center/18px no-repeat; }

/* Étapes numérotées : liste ordonnée, une étape par élément, titre en gras. */
ol.is-style-etapes { list-style: none; counter-reset: etape; padding: 0; margin: 0; display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 24px; }
ol.is-style-etapes > li { counter-increment: etape; display: flex; flex-direction: column; gap: 6px; font-size: 15px; line-height: 1.5; color: var(--vm-muted); }
ol.is-style-etapes > li::before { content: counter(etape); display: inline-flex; align-items: center; justify-content: center; width: 40px; height: 40px; border-radius: 20px; background: var(--wp--preset--color--jaune); color: var(--vm-ink); font-family: var(--wp--preset--font-family--fredoka); font-weight: 700; font-size: 18px; margin-bottom: 6px; }
ol.is-style-etapes > li:nth-child(5n+2)::before { background: var(--wp--preset--color--orange); }
ol.is-style-etapes > li:nth-child(5n+3)::before { background: var(--wp--preset--color--corail); }
ol.is-style-etapes > li:nth-child(5n+4)::before { background: var(--wp--preset--color--vert); }
ol.is-style-etapes > li:nth-child(5n+5)::before { background: var(--vm-deep); color: #fff; }
ol.is-style-etapes > li strong { display: block; color: var(--vm-ink); font-size: 17px; }
.vm-etapes--compact ol.is-style-etapes > li::before { width: 34px; height: 34px; font-size: 16px; }
.vm-etapes--compact ol.is-style-etapes { gap: 20px; }
.vm-etapes--compact ol.is-style-etapes > li strong { font-size: 15px; }
@media (max-width: 781px) {
	ol.is-style-etapes { grid-template-columns: 1fr; gap: 18px; }
	ol.is-style-etapes > li { display: grid; grid-template-columns: 40px 1fr; column-gap: 14px; }
	ol.is-style-etapes > li::before { grid-row: span 2; margin: 0; }
}

/* Colonnes « engagements » : filet coloré au-dessus de chaque colonne. */
.wp-block-columns.is-style-engagements > .wp-block-column { border-top: 3px solid var(--wp--preset--color--jaune); padding-top: 24px; }
.wp-block-columns.is-style-engagements > .wp-block-column:nth-child(4n+2) { border-color: var(--wp--preset--color--orange); }
.wp-block-columns.is-style-engagements > .wp-block-column:nth-child(4n+3) { border-color: var(--wp--preset--color--corail); }
.wp-block-columns.is-style-engagements > .wp-block-column:nth-child(4n+4) { border-color: var(--wp--preset--color--vert); }
.wp-block-columns.is-style-engagements h3 { margin: 0 0 10px; }
.wp-block-columns.is-style-engagements p { font-size: 15px; color: var(--vm-muted); margin: 0; }

/* Groupes : cartes et blocs de couleur */
.wp-block-group.is-style-carte { background: #fff; border: 1px solid var(--vm-line); border-radius: var(--vm-radius); padding: clamp(20px, 3vw, 32px); }
.wp-block-group.is-style-bloc-ciel, .wp-block-group.is-style-bloc-sable, .wp-block-group.is-style-bloc-vert, .wp-block-group.is-style-bloc-petrole { border-radius: var(--vm-radius); padding: clamp(22px, 3vw, 32px); }
.wp-block-group.is-style-bloc-ciel { background: var(--wp--preset--color--ciel); }
.wp-block-group.is-style-bloc-sable { background: var(--wp--preset--color--sable); }
.wp-block-group.is-style-bloc-vert { background: var(--wp--preset--color--vert-pale); }
.wp-block-group.is-style-bloc-petrole { background: var(--vm-petrole); color: #fff; }
.wp-block-group.is-style-bloc-petrole :where(h2, h3, p) { color: #fff; }
.is-style-bloc-sable .is-style-lien-fort a { color: var(--wp--preset--color--brun); }
.is-style-bloc-vert .is-style-lien-fort a { color: var(--wp--preset--color--vert-fonce); }

/* Images : arrondis et emplacements photo */
.wp-block-image img { border-radius: var(--vm-radius); }
.wp-block-image.is-style-arrondi-fort img { border-radius: 28px; }
.vm-hero .wp-block-image, .vm-hero .wp-block-image img { height: 100%; }
.vm-hero .wp-block-image img { width: 100%; object-fit: cover; aspect-ratio: 4 / 3; }

/* Haut de page de l'accueil et des pages commune */
.vm-hero { padding-top: clamp(16px, 4vw, 56px); padding-bottom: clamp(32px, 4vw, 48px); }
.vm-hero > .wp-block-columns { align-items: center; gap: 56px; }
.vm-hero h1 { margin: 0 0 20px; }
.vm-hero .vm-lead { font-size: clamp(17px, 1.6vw, 20px); margin: 0 0 24px; }
.vm-hero .wp-block-vivamini-places { margin-top: 20px; }
.vm-hero .wp-block-buttons { margin-top: 20px; }
.vm-hero--commune > .wp-block-columns { align-items: stretch; gap: 48px; }
.vm-hero--commune h1 { margin-bottom: 12px; }
.vm-hero--commune .vm-lead { margin: 16px 0 0; }
@media (max-width: 781px) {
	.vm-hero > .wp-block-columns { gap: 24px; }
	.vm-hero .wp-block-image img { aspect-ratio: 16 / 10; border-radius: 20px; }
	.vm-hero .wp-block-buttons { flex-direction: column; align-items: stretch; }
	.vm-hero .wp-block-buttons .wp-block-button { width: 100%; }
	.vm-hero .wp-block-buttons .wp-block-button__link { width: 100%; }
}

/* Galerie de la page commune */
.vm-galerie.wp-block-gallery { gap: 16px; }
.vm-galerie.wp-block-gallery .wp-block-image img { border-radius: var(--vm-radius); aspect-ratio: 4 / 3; object-fit: cover; }
@media (max-width: 781px) { .vm-galerie.wp-block-gallery { gap: 10px; } .vm-galerie.wp-block-gallery .wp-block-image img { border-radius: 16px; } }

/* Les trois entrées de l'accueil */
.vm-entrees > .wp-block-columns { gap: 24px; }
.vm-entrees .wp-block-group { height: 100%; display: flex; flex-direction: column; box-sizing: border-box; }
.vm-entrees h3 { font-size: var(--wp--preset--font-size--titre-carte); margin: 0 0 12px; }
.vm-entrees p { margin: 0 0 12px; color: var(--vm-muted); }
.vm-entrees p.is-style-lien-fort { margin-top: auto; margin-bottom: 0; color: inherit; display: flex; flex-wrap: wrap; gap: 6px 18px; }
@media (max-width: 781px) { .vm-entrees > .wp-block-columns { gap: 12px; } }

/* Carte et liste des crèches */
.vm-carte-section > .wp-block-columns { align-items: center; gap: 48px; }
.vm-carte-section h2 { margin: 0 0 12px; }

/* Avis */
.vm-avis .wp-block-columns { gap: 24px; margin-top: 24px; }
.vm-avis .wp-block-quote { margin: 0; height: 100%; box-sizing: border-box; display: flex; flex-direction: column; gap: 12px; }
.vm-avis .wp-block-quote p { margin: 0; line-height: 1.55; }
.wp-block-quote { border-left-width: 1px; }

/* Actualités */
.vm-actus .wp-block-post-template { gap: 24px; }
.vm-actus .wp-block-post-date { font-size: 13px; font-weight: 700; color: var(--vm-muted); }
.vm-actus .wp-block-post-title { font-size: 20px; margin: 6px 0; }
.vm-actus .wp-block-post-title a { color: var(--vm-ink); text-decoration: none; }
.vm-actus .wp-block-post-title a:hover { text-decoration: underline; }
.vm-actus .wp-block-post-excerpt { font-size: 15px; color: var(--vm-muted); margin-top: 0; }
.vm-actus .wp-block-post-excerpt__more-text { display: none; }
.vm-actus .wp-block-post-featured-image img { border-radius: 16px; }

/* Grand encadré d'appel à l'action */
.vm-cta { display: flex; align-items: center; justify-content: space-between; gap: 24px 32px; flex-wrap: wrap; }
.vm-cta > .wp-block-group:first-child { flex: 1 1 420px; }
.vm-cta h2 { font-size: clamp(24px, 2.6vw, 30px); margin: 0 0 8px; }
.vm-cta p { margin: 0; color: var(--vm-muted); }
.vm-cta .wp-block-buttons { margin: 0; }
@media (max-width: 781px) { .vm-cta .wp-block-buttons, .vm-cta .wp-block-button, .vm-cta .wp-block-button__link { width: 100%; } }

/* Questions fréquentes */
.wp-block-details { border-bottom: 1px solid var(--vm-line); padding: 16px 0; margin: 0 !important; }
.wp-block-details summary { cursor: pointer; font-weight: 700; font-size: 17px; list-style: none; position: relative; padding-right: 36px; min-height: 28px; }
.wp-block-details summary::-webkit-details-marker { display: none; }
.wp-block-details summary::after { content: "+"; position: absolute; right: 0; top: -4px; width: 28px; height: 28px; border-radius: 14px; background: var(--wp--preset--color--ciel); color: var(--vm-deep); display: flex; align-items: center; justify-content: center; font-size: 20px; font-weight: 600; }
.wp-block-details[open] summary::after { content: "–"; }
.wp-block-details > :not(summary) { color: var(--vm-muted); margin-top: 10px; }
.vm-faq h2 { margin-top: clamp(28px, 4vw, 40px) !important; }
.vm-faq h2:first-child { margin-top: 0 !important; }

/* Tableaux de contenu */
.wp-block-table table { border-collapse: collapse; width: 100%; }
.wp-block-table th, .wp-block-table td { text-align: left; padding: 12px 12px 12px 0; border: 0; border-bottom: 1px solid var(--vm-line); }
.wp-block-table thead { border-bottom: 1px solid var(--vm-ink); }
.wp-block-table thead th { font-size: 13px; color: var(--vm-muted); }

/* Hero de la page employeurs */
.vm-hero--petrole { background: var(--vm-petrole); color: #fff; }
.vm-hero--petrole h1, .vm-hero--petrole p { color: #fff; }
.vm-hero--petrole .vm-lead { color: var(--wp--preset--color--texte-sur-fonce); }
.vm-hero--petrole .vm-small { color: #D9E6EA; font-size: 14px; }
.vm-hero--petrole .wp-block-image img { aspect-ratio: 5 / 4; }

/* Formulaires dans les pages */
.vm-form-cols > .wp-block-columns { gap: 48px; align-items: flex-start; }
.vm-form-cols h2 { font-size: clamp(24px, 2.6vw, 30px); margin: 0 0 6px; }
.vm-form-cols .is-style-carte > p, .vm-form-cols .is-style-bloc-ciel > p { color: var(--vm-muted); font-size: 15px; }
@media (max-width: 781px) { .vm-form-cols > .wp-block-columns { gap: 24px; } }

/* Pied de page */
.vm-footer { background: var(--vm-petrole); color: #E4F0F2; font-size: 14px; line-height: 1.6; padding-top: 48px; padding-bottom: 40px; }
.vm-footer__cols { gap: 32px; }
.vm-footer__logo { margin: 0 0 12px; }
.vm-footer__logo img { border-radius: 0; }
.vm-footer__title { font-family: var(--wp--preset--font-family--nunito-sans); font-size: 14px; font-weight: 700; color: #fff; margin: 0 0 10px; letter-spacing: 0; }
.vm-footer .vm-pied { grid-template-columns: repeat(2, minmax(0, 1fr)); column-gap: 32px; }
.vm-footer__links { margin: 0; display: grid; gap: 6px; }
.vm-footer__links a, .vm-footer a { color: #C6DADF; text-decoration: none; }
.vm-footer__links a:hover, .vm-footer a:hover { color: #fff; text-decoration: underline; }
.vm-footer .vm-coord__tel a, .vm-footer .vm-coord__mail a { color: #fff; }
.vm-footer .vm-coord__baseline { color: #E4F0F2; }
@media (max-width: 781px) {
	.vm-footer { padding-top: 32px; padding-bottom: 32px; }
	.vm-footer .vm-pied { grid-template-columns: 1fr; }
}

/* Article d'actualité */
.vm-article { padding-bottom: clamp(40px, 6vw, 64px); }
.vm-article__date { font-size: 14px; font-weight: 700; color: var(--vm-muted); margin-top: 16px; }
.vm-article .wp-block-post-title { margin-top: 6px; }
.vm-article .wp-block-post-featured-image img { border-radius: var(--vm-radius); }

/* Mobile : colonnes empilées plus serrées */
@media (max-width: 781px) {
	.wp-block-columns { gap: 20px; }
	.vm-section h2.wp-block-heading { margin-bottom: 12px; }
}
.wp-block-column > h2.wp-block-heading:not(:first-child) { margin-top: clamp(28px, 4vw, 44px); }

/* Accueil sur mobile : le titre puis directement les places, qui servent aussi au choix de la commune. */
@media (max-width: 781px) {
	.vm-hero--accueil .wp-block-vivamini-communes-boutons,
	.vm-hero--accueil .wp-block-column:last-child { display: none; }
	.vm-hero--accueil { padding-bottom: 20px; }
	.vm-hero--accueil .vm-lead { margin-bottom: 0; }
}

/* Titres de cartes et rythme des titres dans les textes longs */
h2.vm-card-title, h3.vm-card-title { font-size: var(--wp--preset--font-size--titre-carte) !important; margin: 0 0 10px; }
.vm-card-title a { color: var(--vm-ink); text-decoration: none; }
.vm-card-title a:hover { text-decoration: underline; }
.vm-entrees .wp-block-group > p:last-child { margin-bottom: 0; }
.vm-section :where(p, figure, ul, ol, .wp-block-buttons, .wp-block-group) + h2.wp-block-heading { margin-top: clamp(32px, 4vw, 48px); }
.vm-section :where(p, figure, ul, ol) + h3.wp-block-heading { margin-top: 28px; }

/* Page Qui sommes-nous : chiffres clés */
.vm-chiffre-bloc { text-align: center; padding: 28px 20px; }
.vm-chiffre-bloc p { margin: 0; }
.vm-chiffre { display: block; font-family: var(--wp--preset--font-family--fredoka, inherit); font-size: clamp(40px, 6vw, 56px); line-height: 1.1; color: var(--wp--preset--color--petrole, #076B8D); }
