/* ExoMatch — planning sport + Google Agenda, 22/11/2026.
   Règles limitées à la page Séances : aucun changement de design transversal. */
body.exo-ui-coherent .exo-workouts,
body.exo-ui-coherent .exo-workouts__week-panel,
body.exo-ui-coherent .exo-workouts__week-grid,
body.exo-ui-coherent .exo-workouts__week-card,
body.exo-ui-coherent .exo-workouts__cards > article {
  min-width: 0;
  max-width: 100%;
}
body.exo-ui-coherent .exo-workouts__week-panel {
  width: 100%;
  padding: clamp(1rem, 2.4vw, 1.5rem);
  margin-top: 1.7rem;
}
body.exo-ui-coherent .exo-workouts__week-grid {
  display: grid;
  width: 100%;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 275px), 1fr));
  gap: 1rem;
}
body.exo-ui-coherent .exo-workouts__week-card {
  padding: clamp(.95rem, 2.2vw, 1.15rem) !important;
  overflow-wrap: anywhere;
  overflow: hidden;
}
body.exo-ui-coherent .exo-workouts__week-card :where(p, li, a, span, h3),
body.exo-ui-coherent .exo-workouts__week-panel > p,
body.exo-ui-coherent .exo-workouts__disclaimer {
  max-width: 100%;
  white-space: normal;
  overflow-wrap: anywhere;
  word-break: normal;
}
body.exo-ui-coherent .exo-workouts__week-card ol,
body.exo-ui-coherent .exo-workouts__cards ol {
  padding-left: 1.35rem !important;
  margin-left: 0;
  min-width: 0;
}
body.exo-ui-coherent .exo-workouts__week-help,
body.exo-ui-coherent .exo-workouts__disclaimer {
  display: block;
  width: 100%;
  margin: 1rem 0 0;
  padding: .9rem 1rem;
  font-size: .86rem;
  line-height: 1.55;
  color: #3d526f;
  border-radius: 12px;
  background: #f3f7fd;
  border: 1px solid #e1eaf5;
}
body.exo-ui-coherent .exo-workouts__disclaimer { margin: 1.2rem 0 0; }
body.exo-ui-coherent .exo-workouts__session-actions {
  display: flex;
  flex-wrap: wrap;
  gap: .6rem;
  align-items: stretch;
  min-width: 0;
  margin-top: .7rem;
}
body.exo-ui-coherent .exo-workouts__session-actions > .button { min-width: 0; max-width: 100%; }
body.exo-ui-coherent .exo-workouts__calendar-trigger { white-space: normal; }
/* Agenda : un seul composant et une seule géométrie. La fenêtre est plein écran
   sur mobile pour éviter les recadrages Android (zoom, clavier, barres Chrome). */
body.exo-ui-coherent dialog.exo-calendar {
  box-sizing: border-box !important;
  position: fixed !important;
  inset: 0 !important;
  display: none !important;
  width: min(520px,calc(100vw - 28px)) !important;
  min-width: 0 !important;
  max-width: 520px !important;
  max-height: min(90dvh,760px) !important;
  height: auto !important;
  margin: auto !important;
  padding: 0 !important;
  border: 1px solid #d8e5f5 !important;
  border-radius: 20px !important;
  background: #fff !important;
  color: #122743 !important;
  overflow: hidden !important;
  box-shadow: 0 25px 65px rgba(8,35,72,.26) !important;
  transform: none !important;
}
body.exo-ui-coherent dialog.exo-calendar[open] { display: flex !important; flex-direction: column !important; }
body.exo-ui-coherent dialog.exo-calendar::backdrop {
  background: rgba(8,24,47,.65);
  backdrop-filter: blur(2px);
  -webkit-backdrop-filter: blur(2px);
}
body.exo-ui-coherent .exo-calendar__form {
  box-sizing: border-box !important;
  display: flex !important;
  flex-direction: column !important;
  flex: 1 1 auto !important;
  width: 100% !important;
  min-width: 0 !important;
  min-height: 0 !important;
  max-height: min(90dvh,760px) !important;
  margin: 0 !important;
  padding: 0 !important;
  overflow: hidden !important;
}
body.exo-ui-coherent .exo-calendar__heading {
  box-sizing: border-box;
  display: flex;
  flex: 0 0 auto;
  align-items: start;
  justify-content: space-between;
  gap: 12px;
  min-width: 0;
  padding: 20px 20px 12px;
  border-bottom: 1px solid #eff3f8;
  background: #fff;
}
body.exo-ui-coherent .exo-calendar__heading > div { flex: 1 1 auto; min-width: 0; }
body.exo-ui-coherent .exo-calendar__heading h2 {
  margin: 5px 0 0;
  color: #152a45;
  font-size: clamp(1.28rem,4.6vw,1.65rem);
  line-height: 1.24;
  overflow-wrap: anywhere;
}
body.exo-ui-coherent .exo-calendar__close {
  box-sizing: border-box;
  display: grid;
  flex: 0 0 42px;
  place-items: center;
  width: 42px;
  height: 42px;
  padding: 0;
  border: 1px solid #d8e5f3;
  border-radius: 12px;
  background: #f2f7fd;
  color: #2d496a;
  font-size: 22px;
  cursor: pointer;
}
body.exo-ui-coherent .exo-calendar__content {
  box-sizing: border-box;
  display: block;
  flex: 1 1 auto;
  min-height: 0;
  min-width: 0;
  width: 100%;
  overflow-x: hidden;
  overflow-y: auto;
  overscroll-behavior: contain;
  -webkit-overflow-scrolling: touch;
  padding: 16px 20px 20px;
}
body.exo-ui-coherent .exo-calendar__session {
  box-sizing: border-box;
  margin: 0;
  padding: 10px 12px;
  font: 800 1rem/1.3 Inter,system-ui,sans-serif;
  background: #eff6ff;
  border: 1px solid #dceafb;
  border-radius: 12px;
  color: #0758ba;
  overflow-wrap: anywhere;
}
body.exo-ui-coherent .exo-calendar__duration {
  margin: 9px 0 15px;
  font-size: .85rem;
  color: #3b506a;
}
body.exo-ui-coherent .exo-calendar__fields {
  box-sizing: border-box;
  display: grid;
  grid-template-columns: repeat(2,minmax(0,1fr));
  gap: 12px;
  width: 100%;
  min-width: 0;
}
body.exo-ui-coherent .exo-calendar__fields label {
  box-sizing: border-box;
  display: grid;
  gap: 7px;
  min-width: 0;
  font-size: .88rem;
  font-weight: 750;
  color: #28445f;
}
body.exo-ui-coherent .exo-calendar__field-repeat { grid-column: 1 / -1; }
body.exo-ui-coherent .exo-calendar__fields :where(input,select) {
  box-sizing: border-box !important;
  display: block !important;
  width: 100% !important;
  max-width: 100% !important;
  min-width: 0 !important;
  min-height: 50px !important;
  margin: 0 !important;
  padding: 10px 12px !important;
  border: 1px solid #cadbed !important;
  border-radius: 11px !important;
  color: #162b47 !important;
  background: #fff !important;
  font: 600 16px/1.25 Inter,system-ui,sans-serif !important;
  color-scheme: light;
}
body.exo-ui-coherent .exo-calendar__reminder {
  display: grid;
  gap: 5px;
  margin: 14px 0 0;
  padding: 12px 13px;
  border: 1px solid #d9e7f7;
  border-radius: 12px;
  background: #f2f7ff;
  color: #3d5775;
  font-size: .82rem;
  line-height: 1.5;
  overflow-wrap: anywhere;
}
body.exo-ui-coherent .exo-calendar__reminder strong { color: #173858; }
body.exo-ui-coherent .exo-calendar__actions {
  box-sizing: border-box;
  display: flex;
  flex: 0 0 auto;
  align-items: stretch;
  gap: 9px;
  width: 100%;
  min-width: 0;
  margin: 0 !important;
  padding: 12px 20px 16px;
  border-top: 1px solid #e2eaf6;
  background: #fff;
}
body.exo-ui-coherent .exo-calendar__actions .button {
  box-sizing: border-box !important;
  display: inline-flex !important;
  flex: 1 1 0;
  align-items: center;
  justify-content: center;
  min-width: 0 !important;
  min-height: 49px;
  width: auto !important;
  padding: 10px !important;
  margin: 0 !important;
  font-size: .85rem;
  line-height: 1.3;
  text-align: center;
  white-space: normal;
}
body.exo-ui-coherent .exo-calendar__actions .button--primary { flex: 1.8 1 0; }
@media (max-width: 760px) {
  body.exo-ui-coherent .exo-workouts__week-grid { grid-template-columns: minmax(0,1fr); }
  body.exo-ui-coherent .exo-workouts__week-panel,
  body.exo-ui-coherent .exo-workouts__week-card { padding: .95rem !important; }
  body.exo-ui-coherent .exo-workouts__session-actions { flex-direction: column; }
  body.exo-ui-coherent .exo-workouts__session-actions > .button {
    display: inline-flex; align-items: center; justify-content: center;
    width: 100%; max-width: 100%;
  }
  body.exo-ui-coherent .exo-workouts__week-help,
  body.exo-ui-coherent .exo-workouts__disclaimer { padding: .8rem; font-size: .85rem; }
}
@media (max-width: 600px) {
  body.exo-ui-coherent dialog.exo-calendar,
  body.exo-ui-coherent dialog.exo-calendar[open] {
    position: fixed !important;
    inset: auto !important;
    top: var(--exo-calendar-vy,0px) !important;
    left: var(--exo-calendar-vx,0px) !important;
    right: auto !important;
    bottom: auto !important;
    width: var(--exo-calendar-vw,100vw) !important;
    min-width: 0 !important;
    max-width: none !important;
    height: var(--exo-calendar-vh,100dvh) !important;
    min-height: 0 !important;
    max-height: none !important;
    margin: 0 !important;
    padding: 0 !important;
    border: 0 !important;
    border-radius: 0 !important;
    box-shadow: none !important;
    transform: none !important;
  }
  body.exo-ui-coherent .exo-calendar__form {
    height: 100% !important;
    min-height: 0 !important;
    max-height: none !important;
  }
  body.exo-ui-coherent .exo-calendar__heading { padding: max(16px,env(safe-area-inset-top,0px)) 16px 12px; }
  body.exo-ui-coherent .exo-calendar__content { padding: 15px 16px 20px; }
  body.exo-ui-coherent .exo-calendar__fields { grid-template-columns: minmax(0,1fr); gap: 13px; }
  body.exo-ui-coherent .exo-calendar__field-repeat { grid-column: 1; }
  body.exo-ui-coherent .exo-calendar__actions {
    gap: 8px;
    padding: 11px 16px calc(11px + env(safe-area-inset-bottom,0px));
  }
  body.exo-ui-coherent .exo-calendar__actions .button { min-height: 50px; }
}
@media (max-width: 345px) {
  body.exo-ui-coherent .exo-calendar__actions .button { font-size: .77rem; padding: 8px 6px !important; }
  body.exo-ui-coherent .exo-calendar__heading h2 { font-size: 1.3rem; }
}
@media (max-height: 540px) and (max-width: 600px) {
  body.exo-ui-coherent .exo-calendar__heading { padding-top: 8px; padding-bottom: 8px; }
  body.exo-ui-coherent .exo-calendar__actions { padding-block: 7px calc(7px + env(safe-area-inset-bottom,0px)); }
}

/* v5 — Agenda sur mobile : la barre fixe est visible même lorsque l'agenda est ouvert. */
.exo-calendar-overlay[hidden] { display: none !important; }
@media (max-width: 1180px) {
  body.exo-ui-coherent.exo-calendar-open { overflow: hidden; }
  body.exo-ui-coherent .exo-calendar-overlay:not([hidden]) {
    position: fixed !important;
    display: block !important;
    inset: 0 !important;
    z-index: 2147482200 !important;
    background: rgba(8,24,47,.65);
  }
  body.exo-ui-coherent dialog.exo-calendar[open] {
    z-index: 2147482400 !important;
    bottom: var(--exo-tabbar-height, 76px) !important;
    max-height: calc(100dvh - var(--exo-tabbar-height, 76px) - 16px) !important;
  }
}
@media (max-width: 600px) {
  body.exo-ui-coherent dialog.exo-calendar[open] {
    bottom: auto !important;
    height: max(210px, calc(var(--exo-calendar-vh, 100dvh) - var(--exo-tabbar-height, 76px))) !important;
    max-height: calc(var(--exo-calendar-vh, 100dvh) - var(--exo-tabbar-height, 76px)) !important;
  }
}
