.yjpd-public, .yjpd { max-width: 1280px; }
.yjpd-info, .yjpd-admin-notice { padding: 12px 14px; border-left: 4px solid #2563eb; background: #eef5ff; border-radius: 4px; }
.yjpd-card { border: 1px solid #d8dde6; border-radius: 10px; padding: 16px; margin: 16px 0; background: #fff; box-shadow: 0 1px 4px rgba(0,0,0,.06); }
.yjpd-card h3 { margin-top: 0; }
.yjpd-success { padding: 10px 12px; background: #e7f7ea; border-left: 4px solid #1e8e3e; margin: 12px 0; }
.yjpd-badge { display: inline-block; border-radius: 999px; padding: 4px 9px; font-size: 12px; font-weight: 700; }
.yjpd-badge.ok { background: #dff5e5; color: #145c2e; }
.yjpd-badge.warn { background: #fff3cd; color: #7a5a00; }
.yjpd-badge.danger { background: #f8d7da; color: #842029; }
.yjpd-badge.neutral { background: #e9ecef; color: #333; }
.yjpd-month-nav { display: flex; justify-content: space-between; align-items: center; gap: 12px; margin: 18px 0; }
.yjpd-month-nav strong { font-size: 1.25rem; }
.yjpd-calendar { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); gap: 0; border-left: 1px solid #dfe3ea; border-top: 1px solid #dfe3ea; }
.yjpd-calendar-head { margin-bottom: 0; font-weight: 700; text-align: center; border: 0; }
.yjpd-calendar-head div { padding: 8px; background: #f6f7f9; border-right: 1px solid #dfe3ea; border-bottom: 1px solid #dfe3ea; }
.yjpd-day { min-height: 145px; border-right: 1px solid #dfe3ea; border-bottom: 1px solid #dfe3ea; padding: 8px; background: #fff; box-sizing: border-box; }
.yjpd-day-empty { background: #fafafa; }
.yjpd-today { outline: 2px solid #334155; outline-offset: -2px; }
.yjpd-day-number { font-weight: 800; margin-bottom: 6px; color: #555; }
.yjpd-course-mini { border: 1px solid #ddd; border-radius: 6px; margin-top: 8px; padding: 7px; font-size: 12px; line-height: 1.25; }
.yjpd-course-ok { background: #e7f7ea; border-color: #9bd4aa; color: #145c2e; }
.yjpd-course-danger { background: #fdecec; border-color: #f3aaaa; color: #7f1d1d; }
.yjpd-course-time { font-weight: 800; font-size: 13px; }
.yjpd-course-title { font-size: 12px; margin-top: 2px; }
.yjpd-course-count { font-size: 12px; margin-top: 4px; font-weight: 600; }
.yjpd-course-teacher { font-size: 11px; opacity: .85; margin-top: 3px; }
.yjpd-entry-card { margin-bottom: 18px; }
.yjpd-attendance-form-main { display: grid; grid-template-columns: minmax(190px, 1.2fr) minmax(220px, 1.4fr) minmax(220px, 1fr) minmax(180px, 1fr) auto; gap: 12px; align-items: end; }
.yjpd-attendance-form-main label, .yjpd-teacher-form label { display: flex; flex-direction: column; gap: 5px; font-weight: 600; }
.yjpd-attendance-form-main select, .yjpd-attendance-form-main input, .yjpd-teacher-form select, .yjpd-teacher-form input { width: 100%; box-sizing: border-box; height: 38px !important; min-height: 38px !important; padding: 7px !important; }
.yjpd-attendance-form-main button, .yjpd-teacher-form button { height: 38px; min-width: 100px; font-weight: 700; cursor: pointer; background: #2563eb; color: #fff; border: 0; border-radius: 4px; padding: 0 14px; }
.yjpd-radio-group { border: 0 !important; padding: 0 !important; display: flex; gap: 16px; align-items: center; min-height: 38px; }
.yjpd-radio-group legend { font-weight: 700; width: 100%; margin-bottom: 4px; }
.yjpd-radio-group label { display: inline-flex !important; flex-direction: row !important; gap: 5px; align-items: center !important; font-weight: 500; width: auto !important; white-space: nowrap; }
.yjpd-radio-group input[type="radio"] { width: 18px !important; height: 18px !important; min-width: 18px !important; min-height: 18px !important; margin: 0 5px 0 0 !important; padding: 0 !important; }
.yjpd-form-note { grid-column: 1 / -1; margin: 0; background: #f1f3f5; padding: 7px 9px; border-radius: 4px; font-size: 12px; color: #555; }
.yjpd-teacher-form { display: grid; grid-template-columns: minmax(180px, 1fr) minmax(260px, 1.4fr) minmax(180px, 1fr) auto; gap: 12px; align-items: end; }
.yjpd-admin-grid-form { display: grid; grid-template-columns: repeat(8, minmax(120px, 1fr)) auto; gap: 12px; align-items: end; margin: 12px 0 22px; }
.yjpd-admin-grid-form label { display: flex; flex-direction: column; gap: 5px; font-weight: 600; }
.yjpd-admin-grid-form input, .yjpd-admin-grid-form select { width: 100%; box-sizing: border-box; min-height: 34px; padding: 6px; }
.yjpd-admin-actions { display: flex; gap: 8px; align-items: center; }
.yjpd-admin-table th, .yjpd-admin-table td { vertical-align: middle; }
.yjpd-state-badge { background: #dff5e5; color: #145c2e; padding: 3px 7px; border-radius: 4px; font-size: 12px; }
.yjpd-teacher-role { padding: 3px 7px; border-radius: 4px; font-size: 12px; font-weight: 700; }
.yjpd-teacher-role.principal { background: #e8ddff; color: #4c1d95; }
.yjpd-teacher-role.secondaire { background: #dbeafe; color: #1d4ed8; }
.yjpd-teacher-role.assistant { background: #ffedd5; color: #9a3412; }
.yjpd-inline-form { display: flex; flex-wrap: wrap; gap: 5px; align-items: center; }
.yjpd-inline-form select { max-width: 170px; min-height: 30px; }
@media (max-width: 1100px) {
  .yjpd-attendance-form-main, .yjpd-teacher-form, .yjpd-admin-grid-form { grid-template-columns: 1fr 1fr; }
  .yjpd-attendance-form-main button, .yjpd-teacher-form button, .yjpd-admin-actions, .yjpd-form-note { grid-column: 1 / -1; }
}
@media (max-width: 800px) {
  .yjpd-calendar, .yjpd-calendar-head { grid-template-columns: 1fr; }
  .yjpd-calendar-head { display: none; }
  .yjpd-day-empty { display: none; }
  .yjpd-day { min-height: auto; }
  .yjpd-month-nav { flex-direction: column; }
  .yjpd-attendance-form-main, .yjpd-teacher-form, .yjpd-admin-grid-form { grid-template-columns: 1fr; }
}

/* V0.4.1 - harmonisation formulaires admin + suppression décalages */
.yjpd-admin-grid-form {
  grid-template-columns: repeat(8, minmax(130px, 1fr)) auto;
  align-items: end;
}
.yjpd-admin-grid-form label {
  margin: 0;
  line-height: 1.2;
}
.yjpd-admin-grid-form input,
.yjpd-admin-grid-form select {
  height: 38px !important;
  min-height: 38px !important;
  padding: 6px 10px !important;
  line-height: 24px !important;
  vertical-align: middle !important;
  margin: 0 !important;
}
.yjpd-admin-grid-form select {
  padding-right: 28px !important;
}
.yjpd-admin-actions .button,
.yjpd-admin-grid-form .button {
  height: 38px !important;
  min-height: 38px !important;
  line-height: 36px !important;
  padding-top: 0 !important;
  padding-bottom: 0 !important;
}
.yjpd-attendance-form-main {
  grid-template-columns: minmax(210px, 1.15fr) minmax(280px, 1.45fr) minmax(250px, 1.05fr) auto;
}
.yjpd-attendance-form-main .yjpd-form-note { grid-column: 1 / -1; }


/* V0.4.2 - corrections affichage champs admin + bouton public */
.yjpd-admin-grid-form input[type="text"],
.yjpd-admin-grid-form input[type="email"],
.yjpd-admin-grid-form select {
  height: 34px !important;
  min-height: 34px !important;
  max-height: 34px !important;
  padding: 4px 8px !important;
  line-height: 24px !important;
  font-size: 14px !important;
  vertical-align: middle !important;
}
.yjpd-admin-grid-form select {
  padding-top: 4px !important;
  padding-bottom: 4px !important;
}
.yjpd-admin-grid-form .button,
.yjpd-admin-actions .button {
  height: 34px !important;
  min-height: 34px !important;
  line-height: 32px !important;
  padding: 0 12px !important;
}
.yjpd-attendance-form-main {
  grid-template-columns: minmax(210px, 1.15fr) minmax(280px, 1.45fr) minmax(280px, 1fr) minmax(110px, auto);
  align-items: end;
}
.yjpd-attendance-form-main button {
  height: 36px !important;
  min-height: 36px !important;
  min-width: 96px !important;
  width: auto !important;
  padding: 0 14px !important;
  line-height: 36px !important;
  align-self: end;
  white-space: nowrap;
}
.yjpd-attendance-form-main .yjpd-radio-group {
  min-width: 270px;
  overflow: visible;
}
.yjpd-course-mini { cursor: help; }


/* V0.4.3 - anti-cache + harmonisation forcée admin/public + infobulle robuste */
.wrap.yjpd .yjpd-admin-grid-form {
  display: grid !important;
  grid-template-columns: repeat(8, minmax(120px, 1fr)) auto !important;
  gap: 12px !important;
  align-items: end !important;
}
.wrap.yjpd .yjpd-admin-grid-form label {
  display: flex !important;
  flex-direction: column !important;
  gap: 6px !important;
  margin: 0 !important;
  line-height: 1.2 !important;
  font-weight: 600 !important;
}
.wrap.yjpd .yjpd-admin-grid-form input,
.wrap.yjpd .yjpd-admin-grid-form select {
  box-sizing: border-box !important;
  width: 100% !important;
  height: 48px !important;
  min-height: 48px !important;
  max-height: 48px !important;
  padding: 0 12px !important;
  margin: 0 !important;
  font-size: 15px !important;
  line-height: 46px !important;
  border-radius: 4px !important;
  vertical-align: middle !important;
  transform: none !important;
}
.wrap.yjpd .yjpd-admin-grid-form select {
  -webkit-appearance: menulist !important;
  appearance: auto !important;
  padding-top: 0 !important;
  padding-bottom: 0 !important;
}
.wrap.yjpd .yjpd-admin-grid-form .button,
.wrap.yjpd .yjpd-admin-actions .button {
  height: 48px !important;
  min-height: 48px !important;
  line-height: 46px !important;
  padding: 0 18px !important;
  margin: 0 !important;
  box-sizing: border-box !important;
}

.yjpd-public .yjpd-attendance-form-main {
  display: grid !important;
  grid-template-columns: minmax(220px, 1.1fr) minmax(280px, 1.35fr) minmax(380px, auto) auto !important;
  gap: 14px !important;
  align-items: end !important;
}
.yjpd-public .yjpd-attendance-form-main label,
.yjpd-public .yjpd-teacher-form label {
  margin: 0 !important;
}
.yjpd-public .yjpd-attendance-form-main select,
.yjpd-public .yjpd-attendance-form-main input {
  height: 40px !important;
  min-height: 40px !important;
  max-height: 40px !important;
  padding: 0 10px !important;
  line-height: 38px !important;
  box-sizing: border-box !important;
}
.yjpd-public .yjpd-attendance-form-main .yjpd-radio-group {
  display: flex !important;
  flex-wrap: nowrap !important;
  gap: 18px !important;
  align-items: center !important;
  min-width: 360px !important;
  height: 40px !important;
  min-height: 40px !important;
  padding: 0 !important;
  margin: 0 !important;
  border: 0 !important;
  overflow: visible !important;
}
.yjpd-public .yjpd-attendance-form-main .yjpd-radio-group legend {
  display: block !important;
  width: auto !important;
  margin-right: 4px !important;
  margin-bottom: 0 !important;
  padding: 0 !important;
  line-height: 40px !important;
  float: left !important;
}
.yjpd-public .yjpd-attendance-form-main .yjpd-radio-group label {
  display: inline-flex !important;
  flex-direction: row !important;
  align-items: center !important;
  gap: 6px !important;
  white-space: nowrap !important;
  width: auto !important;
  min-width: 0 !important;
  margin: 0 !important;
  line-height: 40px !important;
}
.yjpd-public .yjpd-attendance-form-main .yjpd-radio-group input[type="radio"] {
  width: 18px !important;
  height: 18px !important;
  min-width: 18px !important;
  min-height: 18px !important;
  margin: 0 !important;
}
.yjpd-public .yjpd-attendance-form-main button {
  width: auto !important;
  min-width: 118px !important;
  max-width: 150px !important;
  height: 40px !important;
  min-height: 40px !important;
  line-height: 40px !important;
  padding: 0 16px !important;
  border-radius: 4px !important;
  align-self: end !important;
  justify-self: start !important;
}
.yjpd-public .yjpd-form-note { grid-column: 1 / -1 !important; }

.yjpd-course-mini {
  position: relative !important;
  overflow: visible !important;
  z-index: 1;
}
.yjpd-course-mini .yjpd-tooltip {
  display: none;
  position: absolute;
  left: 8px;
  top: calc(100% + 6px);
  min-width: 220px;
  max-width: 320px;
  padding: 10px 12px;
  border-radius: 8px;
  background: rgba(17, 24, 39, .96);
  color: #fff;
  font-size: 12px;
  line-height: 1.35;
  box-shadow: 0 8px 24px rgba(0,0,0,.25);
  white-space: normal;
  pointer-events: none;
  z-index: 9999;
}
.yjpd-course-mini:hover,
.yjpd-course-mini:focus { z-index: 50; }
.yjpd-course-mini:hover .yjpd-tooltip,
.yjpd-course-mini:focus .yjpd-tooltip { display: block; }

@media (max-width: 1200px) {
  .yjpd-public .yjpd-attendance-form-main { grid-template-columns: 1fr 1fr !important; }
  .yjpd-public .yjpd-attendance-form-main .yjpd-radio-group,
  .yjpd-public .yjpd-attendance-form-main button,
  .yjpd-public .yjpd-form-note { grid-column: 1 / -1 !important; }
}
@media (max-width: 800px) {
  .wrap.yjpd .yjpd-admin-grid-form,
  .yjpd-public .yjpd-attendance-form-main { grid-template-columns: 1fr !important; }
  .yjpd-public .yjpd-attendance-form-main .yjpd-radio-group { min-width: 0 !important; flex-wrap: wrap !important; height: auto !important; }
}

/* V0.4.5 - tableau de bord gestionnaire */
.yjpd-dashboard-cards {
  display: grid;
  grid-template-columns: repeat(4, minmax(180px, 1fr));
  gap: 14px;
  margin: 18px 0 24px;
}
.yjpd-dashboard-card {
  background: #fff;
  border: 1px solid #dcdcde;
  border-left: 5px solid #64748b;
  border-radius: 8px;
  padding: 16px;
  box-shadow: 0 1px 2px rgba(0,0,0,.04);
}
.yjpd-dashboard-card.ok { border-left-color: #16a34a; }
.yjpd-dashboard-card.danger { border-left-color: #dc2626; }
.yjpd-dashboard-card-label { font-size: 13px; font-weight: 700; color: #475569; text-transform: uppercase; letter-spacing: .03em; }
.yjpd-dashboard-card-value { font-size: 34px; line-height: 1.1; font-weight: 800; margin-top: 8px; color: #0f172a; }
.yjpd-dashboard-card-hint { margin-top: 6px; font-size: 12px; color: #64748b; }
@media (max-width: 1100px) { .yjpd-dashboard-cards { grid-template-columns: repeat(2, minmax(180px, 1fr)); } }
@media (max-width: 700px) { .yjpd-dashboard-cards { grid-template-columns: 1fr; } }

/* V0.4.6 - dashboard semaine courante */
.yjpd-dashboard-admin .yjpd-admin-notice { max-width: 980px; }


/* V0.4.7 - liste complète des inscrits + accordéon calendrier */
.yjpd-calendar,
.yjpd-day {
  overflow: visible !important;
}
.yjpd-course-mini .yjpd-tooltip {
  max-height: 280px !important;
  overflow-y: auto !important;
  white-space: pre-line !important;
}
.yjpd-course-attendees {
  margin-top: 6px !important;
  border-top: 1px solid rgba(0,0,0,.08) !important;
  padding-top: 5px !important;
}
.yjpd-course-attendees summary {
  cursor: pointer !important;
  font-size: 12px !important;
  font-weight: 700 !important;
  color: #1f2937 !important;
  list-style-position: inside !important;
}
.yjpd-present-list {
  margin: 6px 0 0 0 !important;
  padding-left: 16px !important;
  font-size: 12px !important;
  line-height: 1.3 !important;
}
.yjpd-present-list li {
  margin: 0 0 5px 0 !important;
}
.yjpd-present-list span,
.yjpd-no-present {
  color: #4b5563 !important;
  font-size: 11px !important;
}

/* V0.4.8 - inscrits simplifiés, accordéon admin, annulation cours */
.yjpd-course-cancelled {
  background: #fee2e2 !important;
  border-color: #ef4444 !important;
  color: #7f1d1d !important;
}
.yjpd-badge.cancelled {
  background: #fee2e2;
  color: #991b1b;
}
.yjpd-no-course {
  font-weight: 800 !important;
  color: #991b1b !important;
  text-transform: uppercase;
  letter-spacing: .02em;
}
.yjpd-present-list-simple li {
  margin-bottom: 2px !important;
}
.yjpd-admin-attendees summary {
  cursor: pointer;
  font-weight: 700;
}
.yjpd-admin-attendees .yjpd-present-list {
  margin-top: 6px !important;
}
.yjpd-week-table td,
.yjpd-cours-admin-table td {
  vertical-align: top;
}
.yjpd-course-row-cancelled td {
  background: #fff1f2 !important;
}
.yjpd-cancel-form .button-secondary {
  border-color: #dc2626 !important;
  color: #991b1b !important;
}


/* V0.4.9 - dashboard : lignes cliquables + compteur hors cours annulés */
.yjpd-dashboard-help {
  margin: -6px 0 10px !important;
  color: #64748b !important;
}
.yjpd-clickable-course-row {
  cursor: pointer !important;
}
.yjpd-clickable-course-row:hover td,
.yjpd-clickable-course-row[aria-expanded="true"] td {
  background: #eef6ff !important;
}
.yjpd-course-detail-row td {
  background: #f8fafc !important;
  border-top: 0 !important;
  padding: 14px 18px !important;
}
.yjpd-attendees-panel {
  max-width: 760px !important;
}
.yjpd-attendees-panel > strong {
  display: block !important;
  margin-bottom: 8px !important;
  color: #0f172a !important;
}
.yjpd-attendees-table {
  margin: 0 !important;
  background: #fff !important;
}
.yjpd-attendees-table th,
.yjpd-attendees-table td {
  padding: 7px 10px !important;
}


/* V0.4.10 - états pratiquants + liste cours allégée */
.yjpd-state-badge {
  display: inline-flex !important;
  align-items: center !important;
  min-height: 22px !important;
  padding: 3px 9px !important;
  border-radius: 999px !important;
  font-size: 12px !important;
  font-weight: 700 !important;
  line-height: 1.2 !important;
  border: 1px solid transparent !important;
}
.yjpd-state-badge.yjpd-state-actif {
  background: #dcfce7 !important;
  color: #166534 !important;
  border-color: #bbf7d0 !important;
}
.yjpd-state-badge.yjpd-state-blesse {
  background: #fee2e2 !important;
  color: #991b1b !important;
  border-color: #fecaca !important;
}
.yjpd-state-badge.yjpd-state-inactif {
  background: #f1f5f9 !important;
  color: #475569 !important;
  border-color: #e2e8f0 !important;
}
