* {
  margin: 0;
  padding: 0;
  -webkit-box-sizing: border-box;
  box-sizing: border-box;
}

:root {
  --base-multiple: 10px;
}

html {
  font-size: var(--base-multiple);
}

html, body {
  overflow-x: clip;
}

body {
  font-family: sans-serif;
  color: #333;
  margin: 0;
  padding: 0;
}

ul {
  margin-left: 1.3em;
  list-style-position: outside;
}
ul ul {
  margin-left: 0.5em;
}
ul li {
  margin-bottom: 0.5em;
  margin-top: 0.5em;
}

a {
  color: inherit;
}

/* Disable format width SVG with link */
.elementor-widget-image a img[src$=".svg"] {
  width: inherit !important;
}

/* ===================== HEX SYSTEM ===================== */

/* 1. Presets: change these values, and only these */
/* 1. Presets — all cuts are 45°: --hex-y = --hex-x */
.hex                                   { --hex-x: 12; --hex-y: 12; --hex-b: 1; } /* cards, banners, programme */
.hex--lg                               { --hex-x: 14; --hex-y: 14; }             /* image blocks, newsletter */
.hex--sm, .hex-arrows .elementor-swiper-button, .hex-form .elementor-field-group, .hex-tabs .e-n-tab-title
                                       { --hex-x: 6;  --hex-y: 6;  --hex-b: 1; } /* buttons, arrows, form fields, tabs */

@property --reveal {
  syntax: '<number>';
  inherits: false;
  initial-value: 1;
}

/* 2. Shape, computed from the variables (right edge follows --reveal) */
:is(.hex, .hex-arrows .elementor-swiper-button, .hex-form .elementor-field-group, .hex-tabs .e-n-tab-title) {
  --_x: calc(var(--hex-x) * 1px);
  --_y: calc(var(--hex-y) * 1px);
  --_r: calc(var(--reveal) * 100%);
  --_shape: polygon(
    min(var(--_x), var(--_r) / 2) 0, max(var(--_r) / 2, var(--_r) - var(--_x)) 0,
    var(--_r) var(--_y), var(--_r) calc(100% - var(--_y)),
    max(var(--_r) / 2, var(--_r) - var(--_x)) 100%, min(var(--_x), var(--_r) / 2) 100%,
    0 calc(100% - var(--_y)), 0 var(--_y)
  );
}

/* 3. Apply it: to the element itself, the <a> inside a Button widget, or a form's fields and button */
.hex:not(.elementor-widget-button),
.elementor-widget-button.hex .elementor-button,
.hex-arrows .elementor-swiper-button,
.hex-form :is(.elementor-field-textual, .elementor-button),
.hex-tabs .e-n-tab-title {
  clip-path: var(--_shape);
}

/* 4. Outline: .hex-line on a Button widget, on any non-widget element (e.g. header search), or on .hex-form text fields */
:is(.elementor-widget-button.hex-line .elementor-button, .hex-line:not(.elementor-widget), .hex-form .elementor-field-group:has(> .elementor-field-textual), .hex-tabs .e-n-tab-title) {
  position: relative;
  isolation: isolate;
}

:is(.elementor-widget-button.hex-line .elementor-button, .hex-line:not(.elementor-widget), .hex-form .elementor-field-group:has(> .elementor-field-textual), .hex-tabs .e-n-tab-title)::before {
  --_L:  sqrt(var(--hex-x) * var(--hex-x) + var(--hex-y) * var(--hex-y));
  --_b:  calc(var(--hex-b) * 1px);
  --_ix: calc((var(--hex-x) + var(--hex-b) * (var(--_L) - var(--hex-x)) / var(--hex-y)) * 1px);
  --_iy: calc((var(--hex-y) + var(--hex-b) * (var(--_L) - var(--hex-y)) / var(--hex-x)) * 1px);
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  pointer-events: none;
  clip-path: polygon(
    var(--_x) 0, calc(100% - var(--_x)) 0, 100% var(--_y), 100% calc(100% - var(--_y)),
    calc(100% - var(--_x)) 100%, var(--_x) 100%, 0 calc(100% - var(--_y)), 0 var(--_y), var(--_x) 0,
    var(--_ix) var(--_b), var(--_b) var(--_iy), var(--_b) calc(100% - var(--_iy)),
    var(--_ix) calc(100% - var(--_b)), calc(100% - var(--_ix)) calc(100% - var(--_b)),
    calc(100% - var(--_b)) calc(100% - var(--_iy)), calc(100% - var(--_b)) var(--_iy),
    calc(100% - var(--_ix)) var(--_b), var(--_ix) var(--_b)
  );
  background-color: var(--hex-line-color, currentColor);
  transition-property: background-color;
  transition-duration: inherit;
  transition-timing-function: inherit;
}

:is(.elementor-widget-button.hex-line .elementor-button, .hex-line:not(.elementor-widget), .hex-form .elementor-field-group:has(> .elementor-field-textual), .hex-tabs .e-n-tab-title):is(:hover, :focus-visible, :focus-within)::before {
  background-color: var(--hex-line-hover, var(--hex-line-color, currentColor));
}

/* 5. Forms: add .hex-form to a Form widget (fields + button get the sm shape, text fields get the outline)
      In Elementor: Style › Form › Columns Gap 0 and Rows Gap 0 (the gap is set here) */
.hex-form { --hex-form-h: 30px; }

.hex-form .elementor-form-fields-wrapper {
  flex-wrap: nowrap;
  align-items: flex-start;
  gap: 12px;
}

.elementor-widget-form.hex-form .elementor-field-group:has(> .elementor-field-textual) {
  flex: 1 1 0;
  width: auto;
  max-width: none;
  min-width: 0;
}
.elementor-widget-form.hex-form .elementor-field-type-submit {
  flex: 0 0 auto;
  width: auto;
}

@media (max-width: 767px) {
  .elementor-widget-form.hex-form .elementor-form-fields-wrapper { flex-wrap: wrap; }
  .elementor-widget-form.hex-form .elementor-field-group:has(> .elementor-field-textual) { flex: 1 1 100%; }
  .elementor-widget-form.hex-form .elementor-field-type-submit { flex: 1 1 100%; }
}

.elementor-widget-form.hex-form .elementor-form :is(.elementor-field-textual, .elementor-button) {
  height: var(--hex-form-h);
  min-height: 0;
  padding-block: 0;
}
.hex-form .elementor-field-textual::placeholder { color: inherit; opacity: 1; text-transform: uppercase; }

/* error message under the field instead of stretching the outline */
.hex-form .elementor-field-group > .elementor-message { position: absolute; top: 100%; left: 0; margin-top: 4px; }

/* ===================== SLIDERS SYSTEM ===================== */

/* arrows: moved above the cards, top-left, side by side */
.e-widget-swiper.hex-arrows.elementor-element :is(.swiper, .swiper-container) ~ .elementor-swiper-button {
  top: -53px;
  bottom: auto;
  transform: none;
  width: 33px;
  height: 28px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--hex-arrow-background-color, #A7A7A7);
  transition: opacity .2s, background .2s;
}

.e-widget-swiper.hex-arrows.elementor-element :is(.swiper, .swiper-container) ~ .elementor-swiper-button:hover {
  background: var(--hex-arrow-background-color-hover, #8C8C8C);
}

/* Full-width container that holds a bleeding slider */
.slider-bleed { container-type: inline-size; }

/* Space between the container edge and the boxed content edge */
.slider-bleed .hex-arrows {
  --arrows-offset: max(0px, (100cqw - var(--container-max-width)) / 2);
}

.e-widget-swiper.hex-arrows.elementor-element :is(.swiper, .swiper-container) ~ .elementor-swiper-button-prev {
  left: var(--arrows-offset, 0px);
  right: auto;
}
.e-widget-swiper.hex-arrows.elementor-element :is(.swiper, .swiper-container) ~ .elementor-swiper-button-next {
  left: calc(var(--arrows-offset, 0px) + 41px);
  right: auto;
}
.e-widget-swiper.hex-arrows .swiper-button-disabled { opacity: .35; pointer-events: none; }
/* cards continue to the right edge; previous ones stay hidden on the left */
.elementor-widget.hex-arrows .swiper {
  overflow: visible;
  clip-path: inset(-100vh -100vw -100vh 0);
}

.e-loop-item.category-principale .course-card { background: var(--e-global-color-primary); }
.e-loop-item.category-junior     .course-card { background: var(--e-global-color-secondary); }
.e-loop-item.category-plaisir    .course-card { background: var(--e-global-color-0940727); }

/* 20KM Lausanne — Jauge dossards (Figma: header/etat-course)
 *
 * Le composant ne lit que ses propres variables (--etat-*).
 * Les variantes ne font que les redéfinir → une nouvelle déclinaison = un bloc de 5 lignes.
 */

.etat-course {
	/* Défauts = variante carte */
	--etat-track:       var(--color-interactive-disabled, rgba(136, 229, 252, .4));
	--etat-fill:        var(--e-global-color-5a62247, #faf5f4);
	--etat-height:      4px;
	--etat-font-size:   var(--e-global-typography-e274118-font-size, 8px);
	--etat-line-height: var(--text-label-s--line-height, 10px);
	--etat-tracking:    var(--text-label-s--letter-spacing, 0);

	display: flex;
	flex-direction: column;
	gap: 10px;
	width: 100%;
}

/* Variante page course : jauge 8px, remplissage foncé, Label/M, pas de pill */
.etat-course--page {
	--etat-fill:        var(--color-primary-950, #00252e);
	--etat-height:      8px;
	--etat-font-size:   var(--text-label-m, 14px);
	--etat-line-height: var(--text-label-m--line-height, 16.8px);
	--etat-tracking:    var(--text-label-m--letter-spacing, .2px);
}

body:not(.statut-ouverte) .show-if-ouverte { display: none !important; }

.etat-course__jauge {
	height: var(--etat-height);
	overflow: hidden;
	background: var(--etat-track);
}

.etat-course__fill {
	display: block;
	height: 100%;
	width: var(--etat-pct, 0%);
	background: var(--etat-fill);
	transition: width .6s ease;
}

/* Jauge → compteur → pill, empilés et alignés à gauche */
.etat-course__meta {
	display: flex;
	flex-direction: column;
	align-items: flex-start;
	gap: 10px;
}

.etat-course__pill,
.etat-course__label {
	font-family: var(--font-sans, "Martian Mono", monospace);
	font-stretch: semi-expanded;
	font-weight: 300;
	font-size: var(--etat-font-size);
	line-height: var(--etat-line-height);
	letter-spacing: var(--etat-tracking);
	text-transform: uppercase;
	white-space: nowrap;
	color: var(--color-neutral-950, #000);
}

.etat-course__pill {
	padding: 4px;
	border-radius: 22px;
	background: var(--e-global-color-cfa19a8, #e8e5e3);
}

.histoire-slider {
  /* 249px in the 1860px Figma frame = 13.4vw; grows on large screens, capped at 360px */
  --histoire-w: clamp(249px, 13.4vw, 360px);
  --histoire-w-wide: calc(var(--histoire-w) * 1.418); /* 353 / 249 ratio from Figma */
}

.histoire-slider .swiper-slide         { width: var(--histoire-w) !important; }
.histoire-slider .swiper-slide.is-wide { width: var(--histoire-w-wide) !important; }

/* reference width used only while the JS measures */
.histoire-slider.is-measuring .swiper-slide { width: 249px !important; }

@media (max-width: 767px) {
  .histoire-slider .swiper-slide,
  .histoire-slider .swiper-slide.is-wide { width: 85vw !important; }
}

/* External link icon – text widgets */
.elementor-widget-text-editor a[target="_blank"]::after {
  content: "";
  display: inline-block;
  width: .9em;
  height: .9em;
  margin-left: .15em;
  vertical-align: -.05em;
  background-color: currentColor;
  -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3E%3Cpath d='M5 3V4H11.295L3 12.295L3.705 13L12 4.705V11H13V3H5Z'/%3E%3C/svg%3E") no-repeat center / contain;
          mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3E%3Cpath d='M5 3V4H11.295L3 12.295L3.705 13L12 4.705V11H13V3H5Z'/%3E%3C/svg%3E") no-repeat center / contain;
}

/* Underlined links: draw the underline on the whole link so it runs under the icon */
.elementor-widget-text-editor span[style*="underline"]:has(> a[target="_blank"]),
.elementor-widget-text-editor a[target="_blank"] span[style*="underline"] {
  text-decoration: none !important;
}
.elementor-widget-text-editor span[style*="underline"] > a[target="_blank"],
.elementor-widget-text-editor a[target="_blank"]:has(span[style*="underline"]) {
  text-decoration: none;
  background: linear-gradient(currentColor, currentColor) left bottom 1px / 100% 1px no-repeat;
}

.interactive-path path {
  transform-box: fill-box;
  transform-origin: center;
  transition: transform 1.2s ease-out;
   transform: scale(0.95);
}


.interactive-path path:hover {
  transform: scale(3);
  transition-duration: 0.08s;
}

.btn-large a {
  padding: 13px 22px !important;
}

/* =========================================================================
   20KM — Programme des courses  [programme jour="…"]
   Couleurs et typos branchées sur le kit Elementor (post-6 / .elementor-kit-6).
   Correspondance Figma → kit en commentaire.
   ========================================================================= */

.km-prog {
	/* Couleurs */
	--km-accent:      var(--e-global-color-secondary);   /* secondary-500  #FF6600 */
	--km-closed-bg:   var(--e-global-color-1ccbd6b);     /* secondary-400  #FFA35C */
	--km-closed-hover: var(--e-global-color-0940727);    /* secondary-300  #FFC28F (hover en-tête fermé) */
	--km-panel-bg:    #ffdbb8;                           /* secondary-200  — pas encore dans le kit */
	--km-thead-bg:    #ffeddb;                           /* secondary-100  — pas encore dans le kit */
	--km-open-bg:     var(--e-global-color-e1f2c5f);     /* contrast       #000000 */
	--km-ink:         var(--e-global-color-e1f2c5f);     /* text-primary   #000000 */
	--km-ink-inv:     var(--e-global-color-81a98aa);     /* neutral-50     #F2F0EF */
	--km-info-open:   var(--e-global-color-primary);     /* button-primary #00CCFF */
	--km-info-hover:  var(--e-global-color-c83cb0e);     /* hover primary  #44D8FD */

	/* Espacements (Figma --spacing = 4px) */
	--km-gap:   10px;
	--km-pad-x: 20px;

	display: flex;
	flex-direction: column;
	gap: var(--km-gap);
}

/* ---------- En-tête ---------- */
.km-prog__head {
	display: flex;
	align-items: center;
	gap: 16px;
	padding: 14px var(--km-pad-x);
	background: var(--km-closed-bg);
	color: var(--km-ink);
	cursor: pointer;
	transition: background-color .2s, color .2s;
}
.km-prog__item:not(.is-open) .km-prog__head:hover { background: var(--km-closed-hover); }
.km-prog__item.is-open .km-prog__head {
	background: var(--km-open-bg);
	color: var(--km-ink-inv);
}

/* Utility/Subtitle — Martian Mono 16/28 500 (pas de preset kit exact) */
.km-prog__time {
	font-family: var(--e-global-typography-3f198c0-font-family), monospace;
	font-size: 14px;
	font-weight: 500;
	line-height: 28px;
	letter-spacing: -.5px;
	white-space: nowrap;
	font-variant-numeric: tabular-nums;
}
.km-prog__sep { color: var(--km-accent); }

/* Heading/H4 — kit 3f198c0 (Martian Mono 20/24 500) */
.km-prog__name,
.km-prog__price {
	font-family: var(--e-global-typography-3f198c0-font-family), monospace;
	font-size: 16px;
	font-weight: var(--e-global-typography-3f198c0-font-weight);
	line-height: var(--e-global-typography-3f198c0-line-height);
	word-spacing: var(--e-global-typography-3f198c0-word-spacing);
	letter-spacing: -.5px;
	color: inherit;
}
.km-prog__name  { margin: 0; flex: 1 1 auto; }
.km-prog__price { white-space: nowrap; }

/* ---------- Boutons (forme : .hex .hex--sm, contour : .hex-line) ---------- */
/* Label/M — kit 450d3a5 (Martian Mono 14 300) */
.km-prog__btn {
	display: inline-flex;
	align-items: center;
	gap: 8px;
	padding: 4px 8px;
	font-family: var(--e-global-typography-450d3a5-font-family), monospace;
	font-size: var(--e-global-typography-450d3a5-font-size);
	font-weight: var(--e-global-typography-450d3a5-font-weight);
	line-height: 16.8px;
	letter-spacing: .2px;
	text-transform: uppercase;
	text-decoration: none;
	white-space: nowrap;
	color: inherit;
	background: none;
	border: 0;
	border-radius: 0;
	cursor: pointer;
	transition-duration: .2s;
}

.km-prog__btn { transition: background-color .25s, color .25s; }

/* Info course
   fermé : noir / texte clair      → hover #F2F0EF / noir  (comme « voir plus »)
   ouvert : bleu primary / noir    → hover bleu clair #44D8FD / noir (comme « s'inscrire » sur /course/) */
.km-prog__btn--info,
.km-prog__btn--info:focus {
	background: var(--km-ink);
	color: var(--km-ink-inv);
}
.km-prog__item.is-open .km-prog__btn--info {
	background: var(--km-info-open);
	color: var(--km-ink);
}
.km-prog .km-prog__btn--info:hover,
.km-prog .km-prog__btn--info:focus-visible {
	background: var(--e-global-color-81a98aa);
	color: var(--km-ink);
}
.km-prog .km-prog__item.is-open .km-prog__btn--info:hover,
.km-prog .km-prog__item.is-open .km-prog__btn--info:focus-visible {
	background: var(--km-info-hover);
	color: var(--km-ink);
}

/* Toggle « Ouvrir / Fermer horaire détaillé » (contour .hex-line)
   fermé (fond orange) : contour noir   → hover fond noir, texte + icône clairs
   ouvert (fond noir)  : contour clair  → hover fond blanc, texte + icône noirs (comme « découvrir ») */
.km-prog__toggle,
.km-prog__toggle:focus {
	--hex-line-color: currentColor;
	--hex-line-hover: var(--km-ink);
	background: transparent;
	color: inherit;
}
.km-prog .km-prog__toggle:hover,
.km-prog .km-prog__toggle:focus-visible {
	background: var(--km-ink);
	color: var(--km-ink-inv);
}
.km-prog__item.is-open .km-prog__toggle {
	--hex-line-color: var(--e-global-color-81a98aa);
	--hex-line-hover: #fff;
}
.km-prog .km-prog__item.is-open .km-prog__toggle:hover,
.km-prog .km-prog__item.is-open .km-prog__toggle:focus-visible {
	background: #fff;
	color: var(--km-ink);
}

.km-prog__btn:focus-visible { outline: 2px solid var(--km-accent); outline-offset: 2px; }

.km-prog__ico         { width: 12px; height: 12px; flex: none; }
.km-prog__ico--toggle { width: 14px; height: 14px; transition: transform .2s; }
.km-prog__toggle[aria-expanded="true"] .km-prog__ico--toggle { transform: rotate(45deg); } /* ⊕ → ⊗ */

.km-prog__lbl-close,
.km-prog__toggle[aria-expanded="true"] .km-prog__lbl-open  { display: none; }
.km-prog__toggle[aria-expanded="true"] .km-prog__lbl-close { display: inline; }

/* ---------- Ouverture animée (hauteur 0 → auto via grid-template-rows) ---------- */
.km-prog__panel {
	display: grid;
	grid-template-rows: 0fr;
	transition: grid-template-rows .4s cubic-bezier(.2, .7, .2, 1);
}
.km-prog__item.is-open .km-prog__panel { grid-template-rows: 1fr; }

.km-prog__panel-inner {
	min-height: 0;
	overflow: hidden;
}
.km-prog__panel-inner > .km-prog__table {
	opacity: 0;
	transform: translateY(-8px);
	transition: opacity .2s ease, transform .3s ease;
}
.km-prog__item.is-open .km-prog__panel-inner > .km-prog__table {
	opacity: 1;
	transform: none;
	transition-delay: .1s;
}

@media (prefers-reduced-motion: reduce) {
	.km-prog__panel,
	.km-prog__panel-inner > .km-prog__table,
	.km-prog__head,
	.km-prog__btn { transition: none; }
}

/* ---------- Tableau ---------- */

.km-prog__table {
	width: 100%;
	margin: 0;
	border-collapse: collapse;
	background: var(--km-panel-bg);
	color: var(--km-ink);
}
.km-prog__table th,
.km-prog__table td {
	padding: 16px 0;
	border: 0;
	text-align: left;
	vertical-align: middle;
	background: none;
}
.km-prog__table th:first-child,
.km-prog__table td:first-child  { padding-left: 60px; width: 175px; }
.km-prog__table th:nth-child(2),
.km-prog__table td:nth-child(2) { width: 250px; }
.km-prog__table th:nth-child(3),
.km-prog__table td:nth-child(3) { width: 260px; }

/* En-têtes : Utility/Caption — Martian Mono 14/20 600 */
.km-prog__table thead { background: var(--km-thead-bg); }
.km-prog__table th {
	padding-block: 8px;
	font-family: var(--e-global-typography-450d3a5-font-family), monospace;
	font-size: 14px;
	font-weight: 600;
	line-height: 20px;
	letter-spacing: .2px;
	text-transform: uppercase;
}

/* Naissance / prix : Body/L — Inter 18 (famille du kit e6e6b86) */
.km-prog__table td {
	font-family: var(--e-global-typography-e6e6b86-font-family), sans-serif;
	font-size: 18px;
	line-height: 19.8px;
}
/* Heure : Utility/Subtitle */
.km-prog__table td.km-prog__c-heure {
	font-family: var(--e-global-typography-3f198c0-font-family), monospace;
	font-size: 14px;
	font-weight: 500;
	letter-spacing: -.5px;
	font-variant-numeric: tabular-nums;
}
/* Profil : Heading/H4 */
.km-prog__table td.km-prog__c-profil {
	font-family: var(--e-global-typography-3f198c0-font-family), monospace;
	font-size: 16px;
	font-weight: var(--e-global-typography-3f198c0-font-weight);
	line-height: var(--e-global-typography-3f198c0-line-height);
	letter-spacing: -.5px;
}

/* ---------- Tablette ---------- */
@media (max-width: 1024px) {
	.km-prog__head  { flex-wrap: wrap; row-gap: 8px; }
	.km-prog__name  { flex-basis: calc(100% - 200px); }
	.km-prog__price { margin-right: auto; }   /* prix à gauche, boutons à droite sur la 2e ligne */
}

/* ---------- Mobile ---------- */
@media (max-width: 767px) {
	.km-prog { --km-pad-x: 14px; }
	.km-prog__name,
	.km-prog__price { flex-basis: 100%; font-size: 18px; line-height: 22px; }
	.km-prog__btn   { font-size: 12px; }

	/* Tableau → cartes */
	.km-prog__table thead { display: none; }
	.km-prog__table tr {
		display: grid;
		grid-template-columns: auto 1fr;
		gap: 4px 16px;
		padding: 14px var(--km-pad-x);
		border-top: 1px solid var(--km-thead-bg);
	}
	.km-prog__table td,
	.km-prog__table td:first-child,
	.km-prog__table td:nth-child(2),
	.km-prog__table td:nth-child(3) { padding: 0; width: auto; }
	.km-prog__table td { font-size: 16px; }
	.km-prog__table td.km-prog__c-profil { font-size: 18px; }

	.km-prog__c-heure { grid-row: span 3; }
	.km-prog__table td:nth-child(n+3)::before {
		content: attr(data-label) " · ";
		font-family: var(--e-global-typography-450d3a5-font-family), monospace;
		font-size: 12px;
		letter-spacing: .2px;
		text-transform: uppercase;
	}
}