/* Retours client 05-10-2026 : date complète devant « Lieu de départ ». */
.ev-card__place {
  flex-wrap: wrap;
  column-gap: 18px;
  row-gap: 6px;
}
.ev-card__when,
.ev-card__where {
  display: inline-flex;
  align-items: center;
  gap: 6px;
}
.ev-card__date {
  white-space: nowrap;
}

/* ==========================================================================
   Retours client 05-10-2026 — polices et palette (pages Courses organisées)
   Ce fichier est chargé APRÈS evenements.css : il en surcharge uniquement les
   variables et quelques couleurs, sans modifier le fichier d'origine.
   ========================================================================== */

/* Polices fournies : Work Sans (titres) et Giga Sans (textes). Fichiers dans
   le dossier fonts/ du module (chemins relatifs à ce CSS). */
@font-face {
  font-family: 'Work Sans';
  font-weight: 100 900;
  font-style: normal;
  font-display: swap;
  src: url('../fonts/work-sans-var.woff2') format('woff2');
}
@font-face { font-family: 'Giga Sans'; font-weight: 400; font-style: normal; font-display: swap; src: url('../fonts/giga-sans-400.woff2') format('woff2'); }
@font-face { font-family: 'Giga Sans'; font-weight: 500; font-style: normal; font-display: swap; src: url('../fonts/giga-sans-500.woff2') format('woff2'); }
@font-face { font-family: 'Giga Sans'; font-weight: 600; font-style: normal; font-display: swap; src: url('../fonts/giga-sans-600.woff2') format('woff2'); }
@font-face { font-family: 'Giga Sans'; font-weight: 700; font-style: normal; font-display: swap; src: url('../fonts/giga-sans-700.woff2') format('woff2'); }
@font-face { font-family: 'Giga Sans'; font-weight: 800; font-style: normal; font-display: swap; src: url('../fonts/giga-sans-800.woff2') format('woff2'); }

.ev-page {
  /* Palette officielle */
  --ev-navy: #044a77;
  --ev-cyan: #3ec6fc;
  --ev-orange: #fb810a;
  --ev-lime: #afff00;
  --ev-panel: #e2f7ff;

  --ev-clay: #fb810a;
  --ev-clay-dark: #fb810a;
  --ev-teal: #3ec6fc;
  --ev-teal-dark: #044a77;
  --ev-blue: #3ec6fc;
  --ev-green: #afff00;
  --ev-sand: #e2f7ff;
  --ev-sand-2: #e2f7ff;

  --ev-font-display: 'Giga Sans', 'Montserrat', 'Segoe UI', Arial, sans-serif;
  --ev-font-body: 'Giga Sans', 'Montserrat', 'Segoe UI', Arial, sans-serif;
  --ev-font-mono: 'Giga Sans', 'Montserrat', 'Segoe UI', Arial, sans-serif;
}

/* TOUT le texte du module (titres, paragraphes, libellés, boutons, filtres,
   pagination...) : Giga Sans. Le thème impose souvent sa police avec !important,
   d'où le sélecteur universel + !important. Les icônes SVG ne sont pas du texte
   et ne sont pas concernées.
   Pour remettre les titres en Work Sans : remplacer 'Giga Sans' par 'Work Sans'
   dans --ev-font-display ci-dessus et dans la règle des titres ci-dessous. */
.ev-page,
.ev-page *,
.ev-page *::before,
.ev-page *::after {
  font-family: var(--ev-font-body) !important;
}

.ev-page h1,
.ev-page h2,
.ev-page h3,
.ev-page h4,
.ev-page h5,
.ev-page h6,
.ev-page [class*="__title"],
.ev-page [class*="-title"] {
  font-family: var(--ev-font-display) !important;
}

/* Statuts : pastille « inscriptions ouvertes » = vert de la palette. */
.ev-status-bar--ouvert .ev-status-bar__dot { background: #afff00 !important; }

/* Bandeau du listing : bleu foncé de la palette. */
.ev-hero {
  background-color: #044a77 !important;
  background-image:
    radial-gradient(circle at 12% 15%, rgba(251, 129, 10, 0.35), transparent 45%),
    radial-gradient(circle at 88% 85%, rgba(62, 198, 252, 0.4), transparent 45%) !important;
}

/* ==========================================================================
   Page détail : bannière sans texte + lien « Tous les événements » dessous
   ========================================================================== */
.ev-page .ev-visually-hidden {
  position: absolute !important;
  width: 1px !important;
  height: 1px !important;
  margin: -1px !important;
  padding: 0 !important;
  overflow: hidden !important;
  clip: rect(0, 0, 0, 0) !important;
  white-space: nowrap !important;
  border: 0 !important;
}

/* Plus de texte sur l'image : on retire aussi le voile sombre. */
.ev-detail__hero-scrim {
  display: none !important;
}

/* Lien sous la bannière. */
.ev-detail > .ev-breadcrumb {
  margin: 0 auto;
  padding-top: 16px;
  padding-bottom: 4px;
}

/* ==========================================================================
   Responsive du bloc « filtre de recherche »
   Bureau  (>= 992 px)  : une seule ligne, barre collante.
   Tablette (641-991)   : recherche pleine largeur, puis Discipline + Lieu,
                          puis boutons — barre non collante.
   Mobile  (<= 640)     : recherche pleine largeur, Discipline / Lieu côte à
                          côte, boutons côte à côte ; <= 359 px : tout empilé.
   ========================================================================== */

.ev-filterbar__form > * {
  min-width: 0;
}

.ev-field select {
  max-width: 100%;
  text-overflow: ellipsis;
}

/* Bureau : les champs se partagent la ligne sans déborder. */
@media (min-width: 992px) {
  .ev-filterbar__form {
    flex-wrap: nowrap;
  }
  .ev-field--search {
    flex: 1 1 260px;
  }
  .ev-field:not(.ev-field--search) {
    flex: 0 1 190px;
  }
  .ev-field select {
    width: 100%;
    min-width: 0;
  }
  .ev-filterbar__form .ev-btn {
    flex: 0 0 auto;
    white-space: nowrap;
  }
}

/* Tablette + mobile : grille, barre non collante (elle masquait l'écran). */
@media (max-width: 991px) {
  .ev-filterbar {
    position: static;
    padding: 16px 20px;
  }

  .ev-filterbar__form {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    align-items: end;
    gap: 14px 16px;
  }

  .ev-field--search {
    grid-column: 1 / -1;
    width: 100%;
    min-width: 0;
  }

  .ev-field select {
    width: 100%;
    min-width: 0;
  }

  .ev-filterbar__form .ev-btn {
    width: 100%;
    min-height: 46px;
    justify-content: center;
    text-align: center;
  }

  /* Seul le bouton « Filtrer » : pleine largeur ; avec « Réinitialiser » :
     côte à côte. */
  .ev-filterbar__form .ev-btn--primary:last-child {
    grid-column: 1 / -1;
  }
}

@media (max-width: 640px) {
  .ev-filterbar {
    padding: 14px 16px;
  }

  .ev-filterbar__form {
    flex-direction: initial;
    gap: 12px;
  }

  /* 16 px minimum : évite le zoom automatique d'iOS dans les champs. */
  .ev-field select,
  .ev-field input[type="text"] {
    font-size: 16px;
    min-height: 46px;
  }

  .ev-field--search input {
    min-height: 44px;
    padding: 0;
  }

  .ev-field label {
    font-size: 0.72rem;
  }
}

/* Très petit écran : tout empilé. */
@media (max-width: 359px) {
  .ev-filterbar__form {
    grid-template-columns: minmax(0, 1fr);
  }
}

/* Champ de recherche : un seul cadre (le champ texte ne doit pas avoir sa
   propre bordure à l'intérieur de celle du bloc). */
.ev-field--search input[type="text"],
.ev-field--search input[type="text"]:focus {
  border: 0 !important;
  outline: none !important;
  box-shadow: none !important;
  background: transparent !important;
  padding-left: 0 !important;
  padding-right: 0 !important;
  min-width: 0 !important;
  width: 100%;
}

.ev-field--search:focus-within {
  border-color: var(--ev-blue);
  outline: 2px solid var(--ev-blue);
  outline-offset: 1px;
}

.ev-field--search {
  min-height: 46px;
  align-items: center;
}

/* ==========================================================================
   Carte événement, mobile : bouton « Détails de la course » + flèche
   (les mots étaient collés : « DÉTAILSDE LACOURSE »). Le texte est
   maintenant sur une ligne, centré, avec la flèche alignée à son centre.
   ========================================================================== */
@media (max-width: 760px) {
  .ev-card--row .ev-card__cta {
    display: flex;
    flex-direction: row;
    align-items: center;
    justify-content: center;
    gap: 12px;
    width: 100%;
    padding: 16px 14px;
    min-height: 52px;
  }

  .ev-card--row .ev-card__cta span {
    display: inline-block;
    line-height: 1.2;
    white-space: nowrap;
    word-spacing: 0.05em;
  }

  .ev-card--row .ev-card__cta .ev-icon {
    align-self: center;
    flex: 0 0 auto;
    margin: 0;
  }
}

/* ==========================================================================
   Images des cartes (mobile + bloc « même discipline »)
   evenements.css impose width: 540px / height: 300px aux images : dans une
   colonne plus étroite l'image dépasse et est coupée à droite. Ici l'image
   suit la largeur de sa carte, avec un cadrage 16/9 centré.
   ========================================================================== */
.ev-card--grid .ev-card__media {
  width: 100% !important;
  aspect-ratio: 16 / 9 !important;
  min-height: 0 !important;
  max-height: none !important;
  margin-bottom: 0;
}

@media (max-width: 760px) {
  .ev-card--row .ev-card__media {
    width: 100% !important;
    aspect-ratio: 16 / 9 !important;
    min-height: 0 !important;
    margin-bottom: 0;
  }
}

.ev-card--grid .ev-card__img {
  position: absolute !important;
  inset: 0 !important;
  width: 100% !important;
  height: 100% !important;
  max-width: 100% !important;
  object-fit: cover !important;
  object-position: center !important;
}

@media (max-width: 760px) {
  .ev-page .ev-card--row .ev-card__img {
    position: absolute !important;
    inset: 0 !important;
    width: 100% !important;
    height: 100% !important;
    max-width: 100% !important;
    object-fit: cover !important;
    object-position: center !important;
  }
}

/* Bloc « même discipline » : cartes qui ne débordent jamais. */
.ev-similar .ev-card {
  min-width: 0;
  max-width: 100%;
}

/* Grille : les colonnes ne dépassent jamais l'écran (320 px comprises). */
.ev-grid {
  grid-template-columns: repeat(auto-fill, minmax(min(300px, 100%), 1fr));
}
.ev-grid--3 {
  grid-template-columns: repeat(auto-fill, minmax(min(280px, 100%), 1fr));
}

/* ==========================================================================
   Codes couleurs : palette officielle uniquement
   #044a77 bleu foncé · #3ec6fc cyan · #fb810a orange · #afff00 vert fluo · #e2f7ff fond clair
   (les teintes d'origine du module — #4fd18b, #e2544c, #95d403, beige… — sont remplacées)
   ========================================================================== */
.ev-status-bar { background: rgba(4, 74, 119, 0.88) !important; color: #fff !important; }
.ev-status-bar--ouvert .ev-status-bar__dot   { background: #afff00 !important; }
.ev-status-bar--imminent .ev-status-bar__dot { background: #fb810a !important; }
.ev-status-bar--termine .ev-status-bar__dot  { background: #3ec6fc !important; }

.ev-hero__subtitle { color: rgba(255, 255, 255, 0.85) !important; }
.ev-hero__stats    { border-top-color: rgba(62, 198, 252, 0.45) !important; }
.ev-hero__stat dt  { color: #3ec6fc !important; }

.ev-page .ev-tab-date { background: #fb810a !important; color: #fff !important; }
.ev-page .ev-card__cta { background: #044a77 !important; color: #fff !important; }
.ev-page .ev-card:hover .ev-card__cta { background: #3ec6fc !important; color: #044a77 !important; }
.ev-page .ev-card:hover .ev-card__cta .ev-icon { color: #044a77 !important; }
.ev-page .ev-tag { background: #e2f7ff !important; color: #044a77 !important; }
.ev-page .ev-tag .ev-icon { color: #fb810a !important; }
.ev-page .ev-bib { background: #e2f7ff !important; color: #044a77 !important; }
.ev-page .ev-card__cta .ev-icon { color: #fff; }
.ev-page .ev-card__title { color: #044a77 !important; }
.ev-page .ev-detail__section-title { color: #044a77 !important; }
