/* ================================================================================
   Vitame Manche : identité visuelle (direction C « Territoire », charte 2013).
   Couleurs, tailles et paddings du contenu = attributs de blocs. Ici : composants
   (carte, recherche par commune, dialogue d'appel, onglets, route, jauge, équipe),
   états, responsive et contournements Astra.
   ================================================================================ */

/* Jetons : la palette Vitame dévie de la convention sur le slot 6 (jaune-orange, clair) :
   le fond sombre du socle passe sur le slot 1 (bordeaux foncé). */
:root {
	--mx-sombre: var(--ast-global-color-1);
	--vm-carte-mer: color-mix(in srgb, var(--ast-global-color-7) 55%, #fff);
	--vm-carte-terre: color-mix(in srgb, var(--ast-global-color-6) 38%, #fff);
	--vm-carte-voisins: color-mix(in srgb, var(--ast-global-color-5) 70%, #fff);
	--vm-carte-cote: color-mix(in srgb, var(--ast-global-color-8) 45%, var(--ast-global-color-7));
	--vm-r: 28px;
}

/* Taille du texte réglable (A, A+, A++) : Astra écrit ses tailles en rem. */
html[data-vm-fs="1"] { font-size: 112.5%; }
html[data-vm-fs="2"] { font-size: 125%; }

/* ---------------------------------------------------------------- sur-header
   Piège Astra : les couleurs du composant HTML sont inertes, on les pose ici. */
.ast-above-header-bar .vm-topbar { display: flex; gap: 26px; font-size: 14px; color: #fff; white-space: nowrap; }
.ast-above-header-bar .vm-topbar a { color: #fff; font-weight: 700; text-decoration: none; }
.ast-above-header-bar .vm-topbar a:hover { text-decoration: underline; }
.vm-fs { display: inline-flex; gap: 2px; padding: 2px; border-radius: 999px; background: #fff; }
.vm-fs button { border: 0; background: none; border-radius: 999px; padding: 3px 9px; font: 700 13px/1 var(--ast-headings-font-family, 'Jost', sans-serif); color: var(--mx-texte); cursor: pointer; }
.vm-fs button:nth-child(2) { font-size: 15px; } .vm-fs button:nth-child(3) { font-size: 17px; }
.vm-fs button[aria-pressed="true"] { background: var(--mx-titre); color: #fff; }

/* ---------------------------------------------------------------- carte du Sud Manche */
.vm-carte { margin: 0; position: relative; }
.vm-carte svg.map { display: block; width: 100%; height: auto; border-radius: var(--vm-r); }
.vm-carte .map-sea { fill: var(--vm-carte-mer); }
.vm-carte .map-land { fill: var(--vm-carte-voisins); stroke: var(--vm-carte-cote); stroke-width: 1; vector-effect: non-scaling-stroke; }
.vm-carte .map-land--manche { fill: var(--vm-carte-terre); }
.vm-carte .map-zone { fill: var(--mx-appoint); fill-opacity: .2; stroke: var(--mx-appoint); stroke-width: 2; stroke-dasharray: 6 6; vector-effect: non-scaling-stroke; transition: fill-opacity .3s, stroke-opacity .3s; }
.vm-carte .map-zone.is-focus { fill-opacity: .42; stroke-dasharray: none; stroke-width: 3; }
.vm-carte .map-zone.is-muted { fill-opacity: .07; stroke-opacity: .45; }
.vm-carte .map-pt { fill: var(--mx-titre); stroke: #fff; }
.vm-carte .is-muted { opacity: .55; }
.vm-carte .map-lbl { font-family: var(--ast-headings-font-family, 'Jost', sans-serif); font-weight: 700; fill: var(--mx-titre); paint-order: stroke; stroke: #fff; stroke-linejoin: round; }
.vm-carte .map-lbl--s { font-weight: 400; font-style: italic; fill: color-mix(in srgb, var(--mx-texte) 70%, #fff); stroke: none; }
.vm-carte .map-scale line { stroke: var(--mx-titre); } .vm-carte .map-scale text { fill: var(--mx-titre); font-weight: 700; }
.vm-carte .map-mont-badge { fill: #fff; stroke: var(--vm-carte-cote); stroke-width: 1.5; vector-effect: non-scaling-stroke; }
.vm-carte .map-mont-ico path { fill: var(--mx-titre); }
.vm-carte .map-mont-ico .map-mont-water { fill: none; stroke: var(--mx-titre); stroke-width: 1.6; stroke-linecap: round; }
.vm-carte-mobile { display: none; }
html.vm-js .vm-carte:not(.is-in) .map-zone { opacity: 0; transform: scale(.6); }
.vm-carte .map-zone { transform-box: fill-box; transform-origin: center; }
.vm-carte.is-in .map-zone { transition: opacity .6s, transform 1s cubic-bezier(.2,.9,.3,1.15), fill-opacity .3s; }
.vm-carte.is-in .map-zone[data-zone="avranches"] { transition-delay: .2s; }
.vm-carte.is-in .map-zone[data-zone="saint-hilaire"] { transition-delay: .4s; }

/* Hero : la carte en plein cadre derrière le panneau (classes posées sur les containers Spectra). */
.vm-hero-carte { position: relative; overflow: hidden; }
.vm-hero-carte > .vm-carte { position: absolute; inset: 0; }
.vm-hero-carte > .vm-carte .vm-carte-principale, .vm-hero-carte > .vm-carte svg.map { position: absolute; inset: 0; width: 100%; height: 100%; border-radius: 0; }
.vm-hero-panneau { position: relative; z-index: 2; box-shadow: 0 26px 60px rgba(94, 11, 44, .18); }
.vm-hero-photo { position: absolute !important; top: -44px; right: -40px; width: 128px; z-index: 3; margin: 0 !important; }
.vm-hero-photo img { aspect-ratio: 1; object-fit: cover; border-radius: 50%; box-shadow: 0 0 0 8px #fff, 0 0 0 14px var(--ast-global-color-6); }
@media (max-width: 1000px) {
	.vm-hero-carte > .vm-carte { position: relative; inset: auto; }
	.vm-hero-carte > .vm-carte .vm-carte-principale { display: none; }
	.vm-hero-carte > .vm-carte .vm-carte-mobile { display: block; }
	.vm-hero-carte > .vm-carte .vm-carte-mobile svg.map { position: static; border-radius: 0; }
	.vm-hero-panneau { margin-top: -40px !important; }
	.vm-hero-photo { width: 96px; top: -40px; right: 14px; }
}

/* ---------------------------------------------------------------- recherche par commune */
.vm-finder { max-width: 560px; }
.vm-finder label { display: block; font-family: var(--ast-headings-font-family, 'Jost', sans-serif); font-weight: 700; color: var(--mx-titre); margin-bottom: 8px; }
.vm-finder input { width: 100%; min-height: 56px; padding: 12px 18px; border: 2px solid color-mix(in srgb, var(--mx-texte) 55%, #fff); border-radius: 14px; font-size: 1.05rem; background: #fff; }
.vm-finder input:focus { outline: none; border-color: var(--mx-accent); box-shadow: 0 0 0 3px color-mix(in srgb, var(--mx-appoint) 45%, transparent); }
.vm-finder-hit { display: grid; gap: 2px; margin-top: 12px; padding: 16px 20px; border-radius: 14px; background: var(--mx-accent); color: #fff !important; text-decoration: none !important; }
.vm-finder-hit span { color: rgba(255, 255, 255, .92); }
.vm-finder-tel { font-family: var(--ast-headings-font-family, 'Jost', sans-serif); font-size: 1.45rem; font-weight: 700; color: #fff !important; }
.vm-finder-miss { margin-top: 12px; font-weight: 600; }

/* ---------------------------------------------------------------- dialogue d'appel */
.vm-appel { width: min(520px, calc(100vw - 32px)); border: 0; border-radius: var(--vm-r); padding: 34px 30px 26px; box-shadow: 0 30px 80px rgba(0, 0, 0, .3); }
.vm-appel::backdrop { background: rgba(43, 43, 43, .55); }
.vm-appel h2 { margin: 0 0 16px; font-size: 1.7rem; }
.vm-appel ul { list-style: none; margin: 0; padding: 0; display: grid; gap: 10px; }
.vm-appel-ligne { display: grid; gap: 2px; padding: 14px 18px; border-radius: 16px; background: var(--mx-fond-2); color: var(--mx-texte) !important; text-decoration: none !important; }
.vm-appel-ligne strong { color: var(--mx-titre); }
.vm-appel-tel { font-family: var(--ast-headings-font-family, 'Jost', sans-serif); font-weight: 700; font-size: 1.35rem; color: var(--mx-accent); }
.vm-appel-ligne:hover, .vm-appel-ligne:focus-visible { outline: 3px solid var(--mx-appoint); outline-offset: 0; }
.vm-appel-horaires { margin: 16px 0 0; font-size: .92rem; }
.vm-appel-fermer { position: absolute; top: 14px; right: 16px; width: 40px; height: 40px; border: 0; border-radius: 50%; background: var(--mx-fond-2); font-size: 24px; line-height: 1; cursor: pointer; color: var(--mx-texte); }

/* ---------------------------------------------------------------- barre d'appel mobile (proposition MATRYS) */
.vm-callbar { display: none; }
@media (max-width: 767px) {
	.vm-callbar { display: flex; gap: 8px; position: fixed; left: 0; right: 0; bottom: 0; z-index: 90; padding: 10px 12px calc(10px + env(safe-area-inset-bottom, 0px)); background: #fff; box-shadow: 0 -8px 24px rgba(0, 0, 0, .12); }
	.vm-callbar-btn { flex: 1 1 0; display: grid; place-items: center; min-height: 50px; padding: 8px 10px; border-radius: 999px; border: 2px solid var(--mx-accent); color: var(--mx-accent) !important; font: 700 .95rem/1.15 var(--ast-headings-font-family, 'Jost', sans-serif); text-align: center; text-decoration: none !important; }
	.vm-callbar-btn--plein { background: var(--mx-accent); color: #fff !important; }
	body { padding-bottom: 74px; }
}

/* ---------------------------------------------------------------- onglets de services */
.vm-onglets-liste { display: flex; flex-wrap: wrap; gap: 10px; margin-bottom: 24px; }
.vm-onglets-liste [role="tab"] { font: 700 1.02rem var(--ast-headings-font-family, 'Jost', sans-serif); padding: 13px 22px; border-radius: 999px; border: 2px solid var(--mx-titre); background: #fff; color: var(--mx-titre); cursor: pointer; }
.vm-onglets-liste [role="tab"][aria-selected="true"] { background: var(--mx-titre); color: #fff; }
.vm-onglets-liste [role="tab"]:focus-visible { outline: 3px solid var(--mx-appoint); outline-offset: 3px; }
.vm-onglets.is-ready > .vm-onglet > :is(h2, h3, h4):first-child { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }
.vm-onglet[hidden] { display: none !important; }

/* ---------------------------------------------------------------- étapes sur une route */
.vm-route { position: relative; }
.vm-route::before { content: ""; position: absolute; inset: 0; z-index: 0; pointer-events: none;
	background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 1000 600' preserveAspectRatio='none'%3E%3Cpath d='M120,40 C120,180 880,140 880,300 C880,460 120,420 120,560' fill='none' stroke='%23EF7B1A' stroke-width='6' stroke-dasharray='16 14' stroke-linecap='round' vector-effect='non-scaling-stroke'/%3E%3C/svg%3E") no-repeat center / 100% 100%; }
.vm-route > * { position: relative; z-index: 1; }
.vm-route > :nth-child(2) { margin-left: auto !important; }
.vm-route > * { width: min(480px, 46%); }
.vm-num { display: grid; place-items: center; width: 56px; height: 56px; flex: 0 0 56px; border-radius: 50%; background: var(--mx-titre); color: #fff; font: 800 1.5rem/1 var(--ast-headings-font-family, 'Jost', sans-serif); }
@media (max-width: 1000px) { .vm-route::before { display: none; } .vm-route > * { width: 100%; } }

/* ---------------------------------------------------------------- jauge 50 % */
.vm-jauge { position: relative; width: min(340px, 80vw); margin: 0 auto; }
.vm-jauge svg { display: block; width: 100%; height: auto; overflow: visible; }
.vm-jauge-fond, .vm-jauge-plein { fill: none; stroke-width: 26; stroke-linecap: round; }
.vm-jauge-fond { stroke: color-mix(in srgb, var(--mx-filet) 80%, #fff); }
.vm-jauge-plein { stroke: var(--mx-appoint); stroke-dasharray: 151; stroke-dashoffset: 0; transition: stroke-dashoffset 1.4s cubic-bezier(.2, .8, .2, 1) .2s; }
html.vm-js .vm-jauge:not(.is-in) .vm-jauge-plein { stroke-dashoffset: 151; }
.vm-jauge-texte { position: absolute; left: 0; right: 0; bottom: -6px; margin: 0; text-align: center; font: 800 clamp(3rem, 2rem + 3vw, 4.6rem)/1 var(--ast-headings-font-family, 'Jost', sans-serif); color: var(--mx-titre); }

/* ---------------------------------------------------------------- équipe */
.vm-equipe { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 320px), 1fr)); gap: 22px; }
.vm-equipe-membre { display: grid; grid-template-columns: 96px minmax(0, 1fr); gap: 18px; align-items: start; }
.vm-equipe-photo { width: 96px; height: 96px; border-radius: 50%; object-fit: cover; object-position: center 22%; box-shadow: 0 0 0 4px #fff, 0 0 0 7px var(--ast-global-color-6); }
.vm-equipe-initiales { display: grid; place-items: center; background: var(--mx-titre); color: #fff; font: 800 1.6rem var(--ast-headings-font-family, 'Jost', sans-serif); }
.vm-equipe-nom { margin: 4px 0 2px; font: 700 1.15rem var(--ast-headings-font-family, 'Jost', sans-serif); color: var(--mx-titre); }
.vm-equipe-fonction { margin: 0 0 6px; font-size: .92rem; font-weight: 700; color: var(--mx-texte); }
.vm-equipe-presentation { margin: 0; font-size: .95rem; }
.vm-equipe--encadrement { grid-template-columns: repeat(auto-fill, minmax(min(100%, 260px), 1fr)); }

/* ---------------------------------------------------------------- pied de page sur fond bordeaux foncé */
.site-footer .widget, .site-footer .widget p, .site-footer .ast-footer-copyright { color: rgba(255, 255, 255, .88); }
.site-footer a { color: #fff; }
.site-footer .widget-title, .site-footer h2, .site-footer h3 { color: #fff; }

/* ================================================================ 1.2.0 */

/* En-tête : barre blanche pleine largeur (direction C), au lieu de la pilule du squelette. */
#masthead .ast-primary-header-bar { background: #fff !important; padding: 0; border-bottom: 1px solid var(--mx-filet); }
#masthead .ast-primary-header-bar .ast-builder-grid-row-container { background: none; -webkit-backdrop-filter: none; backdrop-filter: none; border: 0; border-radius: 0; box-shadow: none; padding: 0 20px; min-height: 84px; }
#masthead .ast-primary-header-bar .ast-builder-grid-row { min-height: 84px; }
#masthead.ast-header-sticked .ast-primary-header-bar, #masthead .ast-primary-header-bar.ast-header-sticked { padding-top: 0; background: #fff !important; box-shadow: 0 8px 24px rgba(43, 43, 43, .08); }
#masthead .ast-builder-button-wrap .ast-custom-button { padding: .85em 1.5em; font-size: 16px; border-radius: 999px; font-family: var(--ast-headings-font-family, 'Jost', sans-serif); font-weight: 600; }
#masthead .ast-above-header-bar .vm-topbar a:hover { color: #fff; }
@media (max-width: 1200px) {
	#masthead #ast-mobile-header .ast-primary-header-bar .ast-builder-grid-row { background: #fff; -webkit-backdrop-filter: none; backdrop-filter: none; border: 0; border-radius: 0; box-shadow: none; padding: 0 16px; }
}

/* Hero : la section Spectra porte la carte en fond, le panneau se cale à gauche du contenu. */
.vm-hero-carte { min-height: min(86vh, 780px); background: var(--vm-carte-mer); justify-content: center; }
.vm-hero-carte > .vm-carte { position: absolute !important; inset: 0; max-width: none !important; margin: 0 !important; z-index: 0; }
.vm-hero-carte > .vm-hero-panneau { position: relative; z-index: 2; width: min(600px, 100%); max-width: 600px !important; margin-left: var(--mx-gauche) !important; margin-right: auto !important; margin-top: 40px !important; }
.vm-hero-panneau .wp-block-spectra-buttons { flex-wrap: wrap; }
.vm-hero-panneau .vm-finder { margin-top: 8px; padding-top: 22px; border-top: 1px solid var(--mx-filet); max-width: none; }
.vm-surtitre { font-family: var(--ast-headings-font-family, 'Jost', sans-serif); font-weight: 600; }
figure.vm-hero-photo { position: absolute !important; top: -44px; right: -40px; width: 128px; margin: 0 !important; z-index: 3; }
figure.vm-hero-photo img { width: 128px; height: 128px; object-fit: cover; border-radius: 50% !important; box-shadow: 0 0 0 8px #fff, 0 0 0 14px var(--ast-global-color-6); }
@media (max-width: 1000px) {
	.vm-hero-carte { min-height: 0; padding-top: 0 !important; }
	.vm-hero-carte > .vm-carte { position: relative !important; inset: auto; margin: 0 -16px !important; }
	.vm-hero-carte > .vm-hero-panneau { margin: -40px auto 0 !important; }
	figure.vm-hero-photo { width: 96px; top: -40px; right: 14px; }
	figure.vm-hero-photo img { width: 96px; height: 96px; }
	.vm-hero-panneau .vm-surtitre { padding-right: 100px; }
}

/* Raisons : picto à gauche du texte. */
.vm-raison { flex-direction: row !important; align-items: flex-start !important; gap: 16px !important; }
.vm-raison > .mx-ico, .vm-raison > :first-child { flex: 0 0 auto; }
.vm-raison p { margin: 0; }

/* Étapes : la grille Spectra devient un parcours en quinconce sur la route. */
.vm-route { display: grid !important; gap: 40px !important; padding: 8px 0 !important; }
.vm-route > * { position: relative; z-index: 1; }

/* Onglets de services : pilules. */
.vm-services [role="tablist"], .vm-services .wp-block-spectra-tabs-child-tab-wrapper { gap: 10px; flex-wrap: wrap; border: 0 !important; }
.vm-services [role="tab"] { border-radius: 999px !important; font-family: var(--ast-headings-font-family, 'Jost', sans-serif); font-weight: 700; }

/* Agences sur fond bordeaux. */
.vm-agences { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 28px; }
.vm-agence { border-top: 3px solid var(--ast-global-color-6); padding-top: 20px; }
.vm-agence-nom { margin: 0 0 8px; color: #fff; font-size: 1.4rem; }
.vm-agence-adresse, .vm-agence-secteur { margin: 0 0 8px; color: rgba(255, 255, 255, .88); }
.vm-agence-tel { margin: 0 0 8px; }
.vm-agence-tel a { font-family: var(--ast-headings-font-family, 'Jost', sans-serif); font-weight: 800; font-size: 1.9rem; color: var(--ast-global-color-6) !important; text-decoration: none; }
.vm-agences-horaires { margin: 26px 0 0; color: rgba(255, 255, 255, .85); }
@media (max-width: 1000px) { .vm-agences { grid-template-columns: 1fr; } }

/* Liens sur fond jaune-orange : le rouge de marque n'y a pas le contraste suffisant. */
.vm-sur-jaune a { color: var(--mx-texte) !important; text-decoration: underline; text-decoration-color: var(--mx-titre); text-decoration-thickness: 2px; text-underline-offset: 4px; font-weight: 700; }
.vm-sur-jaune a:hover { color: var(--mx-titre) !important; }

/* ================================================================ 1.2.1 : recette de l'accueil */
.vm-hero-carte .map-scale { display: none; }
.vm-hero-panneau .vm-finder { align-self: stretch; width: 100%; }
.vm-raison .mx-ico { background: var(--mx-titre) !important; color: #fff !important; }
.vm-jauge .vm-jauge-texte { margin: 0 !important; line-height: 1; }
.vm-route > .wp-block-spectra-container { width: min(540px, 48%) !important; max-width: none !important; }
.vm-route > .wp-block-spectra-container:nth-child(2) { margin-left: auto !important; }
.vm-services .wp-block-spectra-tabs-child-tabpanel { border: 0 !important; padding: 24px 0 0 !important; }
@media (max-width: 1000px) { .vm-route > .wp-block-spectra-container { width: 100% !important; } }
