.mgpl-public {
  display: grid;
  gap: 28px;
  width: 100%;
  max-width: 100%;
  box-sizing: border-box;
  font-family: "Segoe UI", Arial, Helvetica, sans-serif;
  color: #202124;
}

.mgpl-week {
  padding-top: 8px;
}

.mgpl-week-title {
    display: flex;
    align-items: center;
    justify-content: space-between;

   width: 100% !important;
    max-width: 100%;
    box-sizing: border-box;

    margin: 0 0 12px;
    padding: 12px 16px;

    border: 1px solid #e2e8e3;
    border-radius: 12px;

    background: #f3f8f4;
    color: #1f5c35;

    font-family: "Segoe UI", Arial, Helvetica, sans-serif;
    font-size: 17px;
    font-weight: 700;
    text-align: left;

    cursor: pointer;
}

.mgpl-week-sessions {
    display: grid;
    gap: 8px;
}

.mgpl-week-sessions.closed {
    display: none;
}

.mgpl-session {
  position: relative;
  display: grid;
  grid-template-columns:
    120px
    155px
    minmax(145px, 1fr)
    minmax(120px, 1fr)
    62px;
  gap: 16px;
  align-items: center;

  width: 100%;
  max-width: 100%;
  min-width: 0;
  box-sizing: border-box;

  padding: 13px 16px;

  border: 1px solid #e7e9e8;
border-left: 4px solid #48a65d;
border-radius: 10px;

background: #fff;
box-shadow: 0 3px 12px rgba(34, 68, 45, 0.055);
}


.mgpl-session-date {
  display: flex;
  flex-direction: column;
  gap: 2px;
  min-width: 0;
}

.mgpl-day {
  font-size: 15px;
  font-weight: 700;
  line-height: 1.2;
  color: #327443;
}

.mgpl-date {
  font-size: 13px;
  font-weight: 500;
  line-height: 1.2;
  color: #6a6a6a;
}

.mgpl-session-time {
  font-size: 17px;
  font-weight: 700;
  line-height: 1.25;
  white-space: nowrap;
  color: #202124;
}

.mgpl-time-separator {
  margin: 0 3px;
  color: #777;
  font-weight: 500;
}

.mgpl-session-level {
  min-width: 0;
}

.mgpl-session-level span {
  display: inline-flex;
  align-items: center;

  max-width: 100%;
  padding: 5px 10px;

  border-radius: 999px;

  background: #eaf5e9;
  color: #2f6b37;

  font-size: 13px;
  font-weight: 700;
  line-height: 1.2;
}

.mgpl-power-pilates .mgpl-session {
  border-left-color: #4c91c7;
}

.mgpl-power-pilates .mgpl-session-level span {
  background: #e8f1fa;
  color: #245b82;
}

.mgpl-renforcement .mgpl-session {
  border-left-color: #c89b52;
}

.mgpl-renforcement .mgpl-session-level span {
  background: #f5eee2;
  color: #735424;
}

.mgpl-session-team {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 5px;
  min-width: 0;
}

.mgpl-team-member {
  display: flex;
  align-items: baseline;
  gap: 6px;
  min-width: 0;
  line-height: 1.25;
}

.mgpl-team-role {
  font-size: 11px;
  font-weight: 700;
  color: #6a746d;
  text-transform: uppercase;
  letter-spacing: 0.025em;
}

.mgpl-team-name {
  font-size: 15px;
  font-weight: 700;
  line-height: 1.25;
  color: #1e2b22;
  overflow-wrap: anywhere;
}

.mgpl-accessory-name {
  display: inline-flex;
  align-items: center;
  gap: 5px;

  margin-top: 2px;
  padding: 4px 8px;

  border: 1px solid #e4e9e5;
  border-radius: 999px;

  background: #f7f9f7;
  color: #566158;

  font-size: 11px;
  line-height: 1.15;
}

.mgpl-accessory-label {
  font-weight: 700;
  color: #68726b;
}

.mgpl-accessory-value {
  font-weight: 600;
  color: #35423a;
}

.mgpl-session-image {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  min-width: 0;
}

.mgpl-session-image img {
  display: block;
  width: 68px;
  height: 68px;
  object-fit: cover;

  border-radius: 8px;
  border: 1px solid #ececec;

  box-shadow: 0 1px 4px rgba(0, 0, 0, 0.08);
}

.mgpl-session.is-canceled {
  opacity: 0.55;
}

.mgpl-session.is-canceled::before {
  content: "";
  position: absolute;

  left: 10px;
  right: 10px;
  top: 50%;

  height: 2px;

  background: #c91515;

  transform: translateY(-50%);

  z-index: 3;
  pointer-events: none;
}

.mgpl-cancelled-label {
  position: absolute;

  top: 50%;
  left: 50%;

  transform: translate(-50%, -50%) rotate(-7deg);

  z-index: 4;

  padding: 7px 16px;

  border-radius: 7px;

  background: #d41313;
  color: #fff;

  font-size: 13px;
  font-weight: 800;
  letter-spacing: 0.06em;

  box-shadow: 0 3px 9px rgba(0, 0, 0, 0.14);
}

.mgpl-empty {
  padding: 14px 16px;
  border: 1px solid #e5e5e5;
  border-radius: 9px;
  background: #fafafa;
  font-size: 15px;
}


/* TABLETTE */
@media (max-width: 900px) {

  .mgpl-session {
    grid-template-columns:
      105px
      135px
      minmax(120px, 1fr)
      minmax(100px, 1fr)
      56px;

    gap: 10px;
    padding: 12px 13px;
  }

  .mgpl-session-time {
    font-size: 16px;
  }

  .mgpl-team-name {
    font-size: 14px;
  }

  .mgpl-session-image img {
    width: 60px;
    height: 60px;
  }
}

/* SMARTPHONE */
@media (max-width: 700px) {

  .mgpl-public {
    display: block !important;
    width: 100% !important;
    max-width: 100% !important;
    min-width: 0 !important;
    gap: 20px;
    box-sizing: border-box !important;
  }

  .mgpl-week {
    display: block !important;
    width: 100% !important;
    max-width: 100% !important;
    min-width: 0 !important;
    padding-top: 8px;
    box-sizing: border-box !important;
  }

  .mgpl-week-title {
    position: relative !important;
    left: 0 !important;
    transform: none !important;

    display: flex !important;
    align-items: center;
    justify-content: space-between;

    width: 100% !important;
    max-width: 100% !important;
    min-width: 0 !important;
    box-sizing: border-box !important;

    margin: 0;
    padding: 13px 14px;

    border: 1px solid #dfe5e0;
    border-radius: 12px 12px 0 0;

    background: #f6faf7;
    color: #285f38;

    font-size: 17px;
    font-weight: 700;
    text-align: left;
    cursor: pointer;
  }

  .mgpl-week-title > span:first-child {
    min-width: 0;
    white-space: normal;
    overflow-wrap: anywhere;
  }

  .mgpl-week-title:hover {
    background: #f0f7f2;
  }

  .mgpl-week-title:focus-visible {
    outline: 2px solid #55ad63;
    outline-offset: 2px;
  }

  .mgpl-week-chevron {
    flex: 0 0 auto;
    margin-left: 12px;
    font-size: 23px;
    font-weight: 700;
    line-height: 1;
    transition: transform 0.18s ease;
  }

  .mgpl-week-toggle[aria-expanded="true"] .mgpl-week-chevron {
    transform: rotate(180deg);
  }

  .mgpl-week-sessions {
    display: block;
    width: 100% !important;
    max-width: 100% !important;
    min-width: 0 !important;
    box-sizing: border-box !important;

    border: 1px solid #e7e9e8;
    border-top: 0;
    border-left: 4px solid #55ad63;
    border-radius: 0 0 12px 12px;

    overflow: hidden;
    background: #fff;
  }

  .mgpl-week-sessions.closed {
    display: none !important;
  }

  .mgpl-week-sessions.open {
    display: block !important;
  }

  /*
   * Sur mobile on abandonne la grille CSS de la séance :
   * elle était la cause du contenu coupé/décalé.
   */
  .mgpl-session {
    position: relative !important;
    left: 0 !important;
    transform: none !important;

    display: block !important;

    width: 100% !important;
    max-width: 100% !important;
    min-width: 0 !important;
    height: auto !important;
    min-height: 0 !important;
    box-sizing: border-box !important;

    margin: 0 !important;
    padding: 14px 92px 14px 15px !important;

    border-radius: 0;
    border-top: 0;
    border-right: 0;
    border-bottom: 1px solid #e7e9e8;
    border-left-width: 0;
    box-shadow: none;
  }

  .mgpl-session:last-child {
    border-bottom: 0;
  }

  .mgpl-session-date {
    display: flex !important;
    flex-direction: row !important;
    align-items: baseline !important;
    gap: 7px !important;

    width: auto !important;
    min-width: 0 !important;
    max-width: 100% !important;

    margin: 0 0 3px 0 !important;
  }

  .mgpl-day {
    font-size: 14px;
  }

  .mgpl-date {
    font-size: 13px;
  }

  .mgpl-session-time {
    display: block !important;

    width: auto !important;
    min-width: 0 !important;
    max-width: 100% !important;

    margin: 0 0 4px 0 !important;

    font-size: 16px;
    font-weight: 700;
    white-space: nowrap !important;
  }

  .mgpl-session-level {
    display: block !important;

    width: auto !important;
    min-width: 0 !important;
    max-width: 100% !important;

    margin: 0 0 5px 0 !important;
  }

  .mgpl-session-level span {
    display: inline-flex !important;
    padding: 4px 8px;
    font-size: 12px;
    white-space: normal;
  }

  .mgpl-session-team {
    display: flex !important;
    flex-direction: column !important;
    align-items: flex-start !important;
    gap: 6px !important;

    width: auto !important;
    min-width: 0 !important;
    max-width: 100% !important;

    margin: 0 !important;
  }

  .mgpl-team-member {
    display: flex !important;
    flex-wrap: wrap;
    align-items: baseline;
    gap: 5px;

    width: 100%;
    min-width: 0;
  }

  .mgpl-team-role {
    font-size: 10px;
    font-weight: 700;
    color: #68726b;
    text-transform: uppercase;
    letter-spacing: 0.02em;
  }

  .mgpl-team-name {
    display: inline !important;
    font-size: 14px;
    font-weight: 700;
    color: #17241b;
  }

  .mgpl-accessory-name {
    display: inline-flex !important;
    flex-wrap: wrap;
    align-items: center;
    gap: 4px;

    width: auto !important;
    max-width: 100%;

    margin-top: 1px;
    padding: 4px 8px;

    border: 1px solid #e3e9e4;
    border-radius: 999px;

    background: #f6f8f6;

    font-size: 11px;
    line-height: 1.15;
  }

  .mgpl-accessory-label {
    font-weight: 700;
    color: #6a736c;
  }

  .mgpl-accessory-value {
    font-weight: 600;
    color: #39443c;
  }

  .mgpl-session-image {
    position: absolute !important;
    top: 50% !important;
    right: 12px !important;
    transform: translateY(-50%) !important;

    display: block !important;
    width: 68px !important;
    height: 68px !important;
    margin: 0 !important;

    visibility: visible !important;
    opacity: 1 !important;
  }

  .mgpl-session-image img {
    display: block !important;
    width: 68px !important;
    height: 68px !important;
    max-width: 68px !important;
    object-fit: cover !important;

    visibility: visible !important;
    opacity: 1 !important;

    border-radius: 8px;
  }

  .mgpl-cancelled-label {
    font-size: 12px;
    padding: 6px 12px;
  }
}


/* TRES PETITS SMARTPHONES */
@media (max-width: 380px) {

  .mgpl-week-title {
    padding: 12px 11px;
    font-size: 15px;
  }

  .mgpl-session {
    padding: 12px 78px 12px 11px !important;
  }

  .mgpl-session-time {
    font-size: 15px;
  }

  .mgpl-session-level span {
    font-size: 11px;
  }

  .mgpl-team-name {
    font-size: 13px;
  }

  .mgpl-accessory-name {
    font-size: 11px;
  }

  .mgpl-session-image {
    right: 10px !important;
    width: 54px !important;
    height: 54px !important;
  }

  .mgpl-session-image img {
    width: 54px !important;
    height: 54px !important;
    max-width: 54px !important;
  }
}


/* =========================================================
   EQUIPE PUBLIQUE : noms uniquement, sans mention "shadow"
   ========================================================= */
.mgpl-session-team {
  display: flex !important;
  flex-direction: row !important;
  flex-wrap: wrap !important;
  align-items: baseline !important;
  gap: 0 !important;
}

.mgpl-team-role {
  display: none !important;
}

.mgpl-team-name {
  display: inline !important;
  font-weight: 700;
}

.mgpl-team-separator {
  display: inline !important;
  margin: 0 4px;
  color: #7a837c;
  font-weight: 500;
}

.mgpl-accessory-name {
  flex-basis: 100% !important;
  width: fit-content !important;
  margin-top: 5px !important;
}

@media (max-width: 700px) {
  .mgpl-session-team {
    display: flex !important;
    flex-direction: row !important;
    flex-wrap: wrap !important;
    align-items: baseline !important;
  }

  .mgpl-team-name {
    font-size: 14px !important;
  }

  .mgpl-team-separator {
    margin: 0 3px;
  }

  .mgpl-accessory-name {
    flex-basis: 100% !important;
  }
}


/* =========================================================
   FINITION VISUELLE - VERSION PUBLIQUE
   Palette MyGymTonic sans vert dominant
   ========================================================= */

:root {
  --mgpl-ink: #242126;
  --mgpl-muted: #716a70;
  --mgpl-line: #e7e1e5;
  --mgpl-soft: #faf7f9;
  --mgpl-brand: #9a3f73;
  --mgpl-brand-dark: #713052;
  --mgpl-brand-soft: #f6eaf1;
  --mgpl-power: #3f78a8;
  --mgpl-power-soft: #eaf2f9;
  --mgpl-renfo: #a66f2d;
  --mgpl-renfo-soft: #f7efe3;
}

/* En-tête semaine : neutre + touche de marque */
.mgpl-week-title {
  background: var(--mgpl-soft) !important;
  color: var(--mgpl-brand-dark) !important;
  border-color: var(--mgpl-line) !important;
}

.mgpl-week-title:hover {
  background: #f6f0f4 !important;
}

.mgpl-week-title:focus-visible {
  outline-color: var(--mgpl-brand) !important;
}

/* Classic */
.mgpl-pilates-classic .mgpl-session {
  border-left-color: var(--mgpl-brand) !important;
}

.mgpl-pilates-classic .mgpl-session-level span {
  background: var(--mgpl-brand-soft) !important;
  color: var(--mgpl-brand-dark) !important;
}

/* Power */
.mgpl-power-pilates .mgpl-session {
  border-left-color: var(--mgpl-power) !important;
}

.mgpl-power-pilates .mgpl-session-level span {
  background: var(--mgpl-power-soft) !important;
  color: #2d5d83 !important;
}

/* Renforcement */
.mgpl-renforcement .mgpl-session {
  border-left-color: var(--mgpl-renfo) !important;
}

.mgpl-renforcement .mgpl-session-level span {
  background: var(--mgpl-renfo-soft) !important;
  color: #765020 !important;
}

/* Jours : fini le vert systématique */
.mgpl-day {
  color: var(--mgpl-brand-dark) !important;
}

.mgpl-power-pilates .mgpl-day {
  color: #2d5d83 !important;
}

.mgpl-renforcement .mgpl-day {
  color: #765020 !important;
}

/*
 * Accessoire : une seule information, sans répéter "Accessoire".
 * Ex. "Sans accessoire", "Ring", "Petite balle".
 */
.mgpl-accessory-name {
  display: block !important;
  flex-basis: 100% !important;
  width: auto !important;
  margin-top: 5px !important;
  padding: 0 !important;
  border: 0 !important;
  border-radius: 0 !important;
  background: transparent !important;
  color: var(--mgpl-muted) !important;
  font-size: 12px !important;
  font-weight: 500 !important;
  line-height: 1.25 !important;
}

/* Anciennes sous-parties désormais inutilisées */
.mgpl-accessory-label,
.mgpl-accessory-value {
  all: unset;
}

/* Qualificatif Renfo : visible et valorisé, sans mention d'accessoire */
.mgpl-session-qualifier {
  display: inline-flex;
  align-items: center;
  flex-basis: 100%;
  width: fit-content;
  margin-top: 6px;
  padding: 4px 9px;
  border-radius: 999px;
  background: var(--mgpl-renfo-soft);
  color: #765020;
  font-size: 12px;
  font-weight: 700;
  line-height: 1.2;
}

/* Photo accessoire plus nette et un peu plus présente */
.mgpl-session-image img {
  width: 70px !important;
  height: 70px !important;
  max-width: 70px !important;
  border-radius: 10px !important;
}

@media (max-width: 700px) {

  .mgpl-week-sessions {
    border-left-color: var(--mgpl-brand) !important;
  }

  .mgpl-power-pilates .mgpl-week-sessions {
    border-left-color: var(--mgpl-power) !important;
  }

  .mgpl-renforcement .mgpl-week-sessions {
    border-left-color: var(--mgpl-renfo) !important;
  }

  .mgpl-session {
    padding-right: 96px !important;
  }

  .mgpl-renforcement .mgpl-session {
    padding-right: 96px !important;
  }

  .mgpl-session-image {
    width: 70px !important;
    height: 70px !important;
  }

  .mgpl-session-image img {
    width: 70px !important;
    height: 70px !important;
    max-width: 70px !important;
  }

  .mgpl-accessory-name {
    margin-top: 4px !important;
    font-size: 11.5px !important;
  }

  .mgpl-session-qualifier {
    margin-top: 5px;
    font-size: 11.5px;
  }
}

@media (max-width: 380px) {

  .mgpl-session {
    padding-right: 84px !important;
  }

  .mgpl-renforcement .mgpl-session {
    padding-right: 84px !important;
  }

  .mgpl-session-image {
    width: 62px !important;
    height: 62px !important;
  }

  .mgpl-session-image img {
    width: 62px !important;
    height: 62px !important;
    max-width: 62px !important;
  }
}


/* POWER + RENFORCEMENT : liste compacte ; Classic inchangé */
.mgpl-compact-schedule { gap: 0 !important; }
.mgpl-compact-schedule .mgpl-week { padding-top: 0 !important; margin: 0 !important; }
.mgpl-compact-schedule .mgpl-week-title { display: none !important; }

.mgpl-compact-schedule .mgpl-week-sessions,
.mgpl-compact-schedule .mgpl-week-sessions.open,
.mgpl-compact-schedule .mgpl-week-sessions.closed {
  display: block !important;
  width: 100% !important;
  max-width: 100% !important;
  margin: 0 !important;
  padding: 0 !important;
  border: 0 !important;
  border-radius: 0 !important;
  background: transparent !important;
  overflow: visible !important;
}

.mgpl-compact-schedule .mgpl-session {
  margin: 0 0 12px 0 !important;
  border: 1px solid var(--mgpl-line) !important;
  border-left-width: 4px !important;
  border-radius: 10px !important;
  box-shadow: 0 2px 8px rgba(40,31,37,.035) !important;
}

.mgpl-compact-schedule .mgpl-session-date { display: block !important; }

.mgpl-compact-date {
  display: block;
  color: #777077;
  font-size: 12px;
  font-weight: 600;
  line-height: 1.25;
}

.mgpl-power-pilates .mgpl-compact-date { color: #61788c; }
.mgpl-renforcement .mgpl-compact-date { color: #7c6a55; }

@media (max-width: 700px) {
  .mgpl-compact-schedule .mgpl-session {
    margin-bottom: 10px !important;
    border-radius: 10px !important;
  }
  .mgpl-compact-date { margin-bottom: 3px; font-size: 11.5px; }
  .mgpl-power-pilates.mgpl-compact-schedule .mgpl-session { padding-right: 96px !important; }
  .mgpl-renforcement.mgpl-compact-schedule .mgpl-session { padding-right: 15px !important; }
}

@media (max-width: 380px) {
  .mgpl-power-pilates.mgpl-compact-schedule .mgpl-session { padding-right: 84px !important; }
  .mgpl-renforcement.mgpl-compact-schedule .mgpl-session { padding-right: 11px !important; }
}


/* =========================================================
   CORRECTION STRUCTURELLE V5
   Power et Renforcement n'ont plus d'accordéons hebdomadaires.
   ========================================================= */
.mgpl-power-pilates.mgpl-compact-schedule,
.mgpl-renforcement.mgpl-compact-schedule {
  display: block !important;
}

.mgpl-power-pilates.mgpl-compact-schedule > .mgpl-session,
.mgpl-renforcement.mgpl-compact-schedule > .mgpl-session {
  width: 100% !important;
  margin: 0 0 12px 0 !important;
}

@media (max-width: 700px) {
  .mgpl-power-pilates.mgpl-compact-schedule > .mgpl-session,
  .mgpl-renforcement.mgpl-compact-schedule > .mgpl-session {
    margin-bottom: 10px !important;
  }
}


/* V5.4.1 : image spécifique Renfo visible */
.mgpl-renforcement .mgpl-session-image {
  display: flex !important;
  align-items: center;
  justify-content: flex-end;
  min-width: 0;
}

.mgpl-renforcement .mgpl-session-image img {
  display: block !important;
  width: 70px !important;
  height: 70px !important;
  max-width: 70px !important;
  object-fit: cover !important;
  border-radius: 10px !important;
}

@media (max-width: 700px) {
  .mgpl-renforcement .mgpl-session-image {
    position: absolute !important;
    top: 50% !important;
    right: 12px !important;
    transform: translateY(-50%) !important;
    width: 70px !important;
    height: 70px !important;
  }
}

@media (max-width: 380px) {
  .mgpl-renforcement .mgpl-session-image {
    right: 10px !important;
    width: 62px !important;
    height: 62px !important;
  }

  .mgpl-renforcement .mgpl-session-image img {
    width: 62px !important;
    height: 62px !important;
    max-width: 62px !important;
  }
}
