/* ============================================================
   INSCRIPTION — fenêtre « Créer mon espace famille »
   ============================================================ */
.modal-panel--wizard { width: min(680px, 100%); }
.modal-panel--wizard .modal-body { overflow-wrap: normal; padding-top: 16px; flex: 1 1 auto; min-height: 0; }
@media (max-width: 640px) {
  .modal:has(.modal-panel--wizard) { padding: 0; }
  /* Plein écran sur téléphone : le corps défile, le bouton reste en bas. */
  .modal-panel--wizard { width: 100%; height: 100vh; height: 100dvh; max-height: 100dvh; border-radius: 0; }
  .modal-panel--wizard .modal-body { padding: 14px 16px 0; }
}
.rg-intro { margin: 0; color: var(--c-mute); }
.rg-form .req { color: #B42318; font-weight: 800; }
.rg-resumed { display: flex; flex-wrap: wrap; gap: 6px 12px; align-items: center; }
.rg-consent { margin-top: 4px; }
.rg-signed-in p { margin-top: 0; }
.link-btn { border: 0; background: none; padding: 0; font: inherit; font-weight: 800; color: var(--c-blue-ink); text-decoration: underline; cursor: pointer; }

/* Bas de fenêtre, toujours visible : connexion à gauche, création à droite */
.rg-nav { position: sticky; bottom: 0; display: flex; justify-content: space-between; align-items: center; flex-wrap: wrap; gap: 8px 12px; margin: 4px -24px 0; padding: 14px 24px; background: #fff; border-top: 1px solid var(--c-line); z-index: 1; }
.rg-nav .hint { margin: 0; }
@media (max-width: 640px) {
  .rg-nav { margin: 4px -16px 0; padding: 12px 16px calc(12px + env(safe-area-inset-bottom)); flex-direction: column-reverse; align-items: stretch; text-align: center; }
}


/* ============================================================
   Choix et grilles jour par jour : fenêtre d'inscription, espace
   famille, paiement (APP.Views.periodGrid, modules/registration-page/)
   ============================================================ */
.choice { display: flex; gap: 10px; align-items: flex-start; border: 1.5px solid #CDD3DB; border-radius: var(--r-sm); padding: 12px 14px; background: #fff; cursor: pointer; }
.choice:has(input:checked) { border-color: var(--c-green); background: var(--c-green-soft); }
.choice input { width: 20px; height: 20px; margin-top: 2px; accent-color: var(--c-green); }
.choice small { display: block; color: var(--c-mute); font-size: 13.5px; }
.radio-row { display: flex; flex-wrap: wrap; gap: 10px; }
.radio-row .choice { flex: 1 1 180px; }
.hp { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }


/* === Jours souhaités : grille par période (comme les formulaires papier) === */
.pg-period + .pg-period { margin-top: 22px; }
.pg-period-head { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; margin-bottom: 10px; }
.pg-period-head h4 { font-family: var(--f-display); font-size: 19px; margin: 0; }
.pg-count { margin-left: auto; font-size: 14px; font-weight: 800; color: var(--c-green-ink); }
.pg-grid-wrap { overflow-x: auto; border: 1.5px solid #CDD3DB; border-radius: var(--r-sm); background: #fff; }
.pg-grid { width: 100%; border-collapse: collapse; font-size: 15px; }
.pg-grid th, .pg-grid td { border: 1px solid var(--c-line); padding: 8px 10px; text-align: center; }
.pg-grid thead th { background: #F6F7F9; font-family: var(--f-display); font-weight: 700; font-size: 15px; line-height: 1.2; }
.pg-grid thead th.pg-day-h { text-align: left; }
.pg-grid .pg-day { text-align: left; font-weight: 800; white-space: nowrap; }
.pg-day::first-letter { text-transform: uppercase; }
.pg-note { color: #B42318; font-weight: 700; font-size: 14px; white-space: normal; }
.pg-cell { display: flex; justify-content: center; align-items: center; min-height: 32px; cursor: pointer; }
.pg-cell input { width: 22px; height: 22px; margin: 0; accent-color: var(--c-green); cursor: pointer; }
.pg-cell-label { display: none; }
.pg-grid tbody tr:has(input:checked) { background: var(--c-green-soft); }
.pg-clear, .pg-clear-h { width: 44px; }
.pg-clear-btn { border: 0; background: #F1F3F6; width: 30px; height: 30px; border-radius: 50%; font-size: 18px; line-height: 1; color: var(--c-mute); }
.pg-clear-btn:hover { background: #E4E7EC; color: var(--c-ink); }

/* Téléphone : chaque jour devient une carte, les formules des boutons étiquetés */
@media (max-width: 720px) {
  .pg-grid-wrap { border: 0; background: transparent; overflow: visible; }
  .pg-grid, .pg-grid tbody { display: block; }
  .pg-grid thead { display: none; }
  .pg-grid tr { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; background: #fff; border: 1.5px solid #CDD3DB; border-radius: var(--r-sm); padding: 10px 12px; margin-bottom: 10px; }
  .pg-grid th, .pg-grid td { border: 0; padding: 0; }
  .pg-grid .pg-day { flex: 1 0 100%; white-space: normal; margin-bottom: 2px; }
  .pg-grid td { flex: 1 1 calc(50% - 6px); }
  .pg-period--wednesdays .pg-grid td { flex-basis: 100%; }
  .pg-grid td.pg-clear { flex: 0 0 auto; order: -1; position: absolute; }
  .pg-grid tr { position: relative; }
  .pg-grid td.pg-clear { top: 8px; right: 8px; }
  .pg-cell { justify-content: flex-start; gap: 8px; border: 1px solid var(--c-line); border-radius: 8px; padding: 8px 10px; min-height: 42px; text-align: left; }
  .pg-cell:has(input:checked) { border-color: var(--c-green); background: var(--c-green-soft); }
  .pg-cell-label { display: inline; font-size: 14.5px; font-weight: 700; line-height: 1.25; }
  .pg-period--holidays .pg-grid td:nth-last-child(2) { flex-basis: 100%; }
  .pg-grid tbody tr:has(input:checked) { background: #fff; }
}
