/* Pages publiques du bénévolat (liste + inscription). */
.moc-pub { --moc: #0d6efd; max-width: 980px; margin: 0 auto; }
.moc-pub__intro { font-size: 1.1rem; margin-bottom: 1.2rem; }
.moc-pub__espace { margin-top: 1.5rem; text-align: center; color: #555; }
.moc-pub__evenement { margin: 0 0 1rem; color: var(--moc); }

/* Cartes des événements. */
.moc-pub-cartes { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 1.2rem; }
.moc-pub-carte { border: 1px solid #dde3ea; border-top: 5px solid var(--moc); border-radius: 10px; padding: 1.1rem 1.2rem; background: #fff; box-shadow: 0 2px 6px rgba(0,0,0,.05); display: flex; flex-direction: column; gap: .5rem; }
.moc-pub-carte__titre { font-size: 1.3rem; margin: 0; }
.moc-pub-carte__date { margin: 0; font-weight: 600; color: #444; }
.moc-pub-carte__description { color: #555; font-size: .95rem; }
.moc-pub-carte__description p:last-child { margin-bottom: 0; }
.moc-pub-carte__places { margin: 0; }
.moc-pub-carte .btn { align-self: flex-start; margin-top: auto; }
.moc-pub-jauge { height: 10px; border-radius: 5px; background: #e6ebf1; overflow: hidden; }
.moc-pub-jauge span { display: block; height: 100%; background: var(--moc); border-radius: 5px; }

/* Encadrés. */
.moc-pub-info { background: #eef4ff; border-left: 4px solid var(--moc); padding: .8rem 1rem; border-radius: 6px; margin-bottom: 1.2rem; }
.moc-pub-alerte { background: #fff6e0; border-left: 4px solid #e6a100; padding: .8rem 1rem; border-radius: 6px; margin: 1rem 0; }
.moc-pub-poste { margin: .4rem 0 .8rem; }
.moc-pub-poste p { margin: .2rem 0 0; color: #555; }
.moc-pub-piege { position: absolute !important; left: -9999px !important; width: 1px; height: 1px; overflow: hidden; }

/* Créneaux : un bloc par jour, une carte par poste. */
.moc-pub-jour { margin-bottom: 1.2rem; border: 1px solid #dde3ea; border-radius: 10px; }
.moc-pub-jour > summary { font-weight: 700; font-size: 1.1rem; padding: .7rem 1rem; }
.moc-pub-postes { display: grid; grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); gap: .8rem; padding: 0 1rem 1rem; }
.moc-pub-poste-carte { border: 1px solid #e3e8ee; border-radius: 8px; padding: .6rem .8rem; background: #fafbfd; }
.moc-pub-poste-carte__titre { font-weight: 700; color: var(--moc); margin-bottom: .4rem; }
.moc-pub-creneau { margin: 0; padding: .45rem 0; border-top: 1px dashed #e0e5eb; }
.moc-pub-creneau:first-of-type { border-top: 0; }
.moc-pub-creneau label { cursor: pointer; display: inline; }
.moc-pub-creneau--complet label { color: #999; cursor: not-allowed; }
.moc-pub-creneau--moi label { color: #2e7d32; }
.moc-pub-horaire { font-weight: 600; }
.moc-pub-badge { display: inline-block; font-size: .8rem; padding: 0 .5em; border-radius: 1em; background: #e6ebf1; color: #333; margin-left: .3em; }
.moc-pub-badge--complet { background: #f3d6d6; color: #8a1f1f; }
.moc-pub-badge--moi { background: #d9f0dc; color: #1e5e24; }
.moc-pub-noms { font-size: .85rem; color: #666; margin: .15rem 0 0 1.6rem; line-height: 1.35; }

/* Apports. */
.moc-pub-apports { width: 100%; }
.moc-pub-apports td { vertical-align: middle; }
.moc-pub-apports select { min-width: 8rem; }

/* Récapitulatif et fin. */
.moc-pub-recap { background: #fafbfd; border: 1px solid #e3e8ee; border-radius: 10px; padding: 1rem 1.2rem; margin-bottom: 1rem; }
.moc-pub-recap h3 { font-size: 1.05rem; margin: 1rem 0 .3rem; }
.moc-pub-merci { text-align: center; padding: 1rem; }
.moc-pub-merci ul { display: inline-block; text-align: left; }
.moc-pub-merci__icone { font-size: 3rem; }
.moc-pub-boutons { display: flex; flex-wrap: wrap; gap: .6rem; justify-content: center; margin: 1rem 0; }

@media (max-width: 600px) {
  .moc-pub-postes { grid-template-columns: 1fr; padding: 0 .6rem .8rem; }
  .moc-pub-boutons .btn { width: 100%; }
}

/* Fil d'étapes (ronds reliés, libellés dessous). */
.moc-pub-etapes { display: flex; list-style: none; margin: 0 0 1.8rem; padding: 0; counter-reset: none; }
.moc-pub-etapes__etape { flex: 1; position: relative; display: flex; flex-direction: column; align-items: center; text-align: center; color: #888; font-size: .95rem; }
.moc-pub-etapes__etape::before { content: ""; position: absolute; top: 13px; left: -50%; width: 100%; height: 4px; background: #c9ced4; z-index: 0; }
.moc-pub-etapes__etape:first-child::before { display: none; }
.moc-pub-etapes__etape--faite::before, .moc-pub-etapes__etape--courante::before { background: var(--moc); }
.moc-pub-etapes__rond { position: relative; z-index: 1; width: 30px; height: 30px; border-radius: 50%; display: flex; align-items: center; justify-content: center; line-height: 1; font-size: .9rem; font-weight: 700; color: #fff; background: #adb5bd; }
.moc-pub-etapes__etape--faite .moc-pub-etapes__rond { background: var(--moc); }
.moc-pub-etapes__etape--courante .moc-pub-etapes__rond { background: var(--moc); box-shadow: 0 0 0 4px color-mix(in srgb, var(--moc) 25%, transparent); }
.moc-pub-etapes__titre { margin-top: .45rem; }
.moc-pub-etapes__etape--faite .moc-pub-etapes__titre { color: var(--moc); }
.moc-pub-etapes__etape--courante .moc-pub-etapes__titre { color: #1f2933; font-weight: 700; }
@media (max-width: 600px) { .moc-pub-etapes__titre { font-size: .75rem; } }

/* Créneau coché : seule la ligne horaire + places est mise en avant (pas les noms des inscrits). */
.moc-pub-ligne { display: inline-flex; align-items: center; gap: .35em; padding: .1em .55em; margin-left: .1em; border-radius: 1em; border: 2px solid transparent; transition: background-color .15s, border-color .15s; }
.moc-pub-ligne .moc-pub-badge { margin-left: 0; }
.moc-pub-creneau:has(input:checked:not(:disabled)) .moc-pub-ligne { background: var(--moc); border-color: var(--moc); }
.moc-pub-creneau:has(input:checked:not(:disabled)) .moc-pub-horaire { color: #fff; }
.moc-pub-creneau:has(input:checked:not(:disabled)) .moc-pub-badge { background: #fff; color: var(--moc); }
.moc-pub-creneau:has(input:not(:checked):not(:disabled)) label:hover .moc-pub-ligne { border-color: color-mix(in srgb, var(--moc) 40%, transparent); }
.moc-pub-creneau--moi .moc-pub-ligne { background: #eaf6ec; }
.moc-pub-badge--nouveau { background: var(--moc); color: #fff; }

/* Fond léger aux couleurs du club sur les cases. */
.moc-pub-carte { background: color-mix(in srgb, var(--moc) 6%, #fff); }
.moc-pub-jour { background: color-mix(in srgb, var(--moc) 3%, #fff); }
.moc-pub-jour > summary { background: color-mix(in srgb, var(--moc) 10%, #fff); border-radius: 10px 10px 0 0; }
.moc-pub-jour:not([open]) > summary { border-radius: 10px; }
.moc-pub-poste-carte { background: color-mix(in srgb, var(--moc) 7%, #fff); border-color: color-mix(in srgb, var(--moc) 20%, #fff); }
.moc-pub-creneau { border-top-color: color-mix(in srgb, var(--moc) 18%, #fff); }
.moc-pub-recap { background: color-mix(in srgb, var(--moc) 6%, #fff); border-color: color-mix(in srgb, var(--moc) 20%, #fff); }
.moc-pub-apports { background: color-mix(in srgb, var(--moc) 4%, #fff); }

/* Boutons d'étapes : espacés, et pleine largeur sur téléphone. */
.moc-pub .form-actions { display: flex; flex-wrap: wrap; gap: .6rem; align-items: center; }
.moc-pub .form-actions > * { margin: 0 !important; }
@media (max-width: 600px) {
  .moc-pub .form-actions { flex-direction: column-reverse; align-items: stretch; }
  .moc-pub .form-actions .button, .moc-pub .form-actions .btn, .moc-pub .form-actions input[type="submit"] { width: 100%; }
  .moc-pub-carte .btn { align-self: stretch; text-align: center; }
}

/* Espace bénévole : de l'air entre les blocs. */
.moc-espace h3 { margin-top: 1.6rem; margin-bottom: .5rem; }
.moc-espace .form-submit, .moc-espace input[type="submit"] { margin: .6rem .6rem .6rem 0; }
.moc-espace .button, .moc-espace .btn { margin: .25rem 0; }
.moc-espace table .form-item { margin: 0; }

/* Récap /benevoles et derniers mouvements (aussi sur le tableau de bord). */
.moc-recap__barre { display: flex; justify-content: space-between; align-items: center; flex-wrap: wrap; gap: .5rem; margin-bottom: 1rem; font-weight: 700; }
.moc-recap__titre { margin: 2rem 0 .8rem; font-size: 1.4rem; }
.moc-recap__total { max-width: 420px; margin-bottom: 1.2rem; }
.moc-recap__total .moc-pub-jauge { margin-top: .4rem; }
.moc-recap__creneau--passe { opacity: .65; }
.moc-pub-badge--plein { background: #d9f0dc; color: #1e5e24; }
.moc-pub-badge--partiel { background: #fff1d6; color: #8a5a00; }
.moc-pub-badge--vide { background: #f3d6d6; color: #8a1f1f; }
.moc-recap__apports { margin: 0 1rem 1rem; padding: .7rem 1rem; border-radius: 8px; background: #fff8ec; border: 1px solid #f3e1bf; }
.moc-recap__apports h3 { font-size: 1rem; margin: 0 0 .4rem; }
.moc-recap__apports ul { margin: 0; padding-left: 1.2rem; }

.moc-mouvements-defile { overflow-x: auto; }
.moc-mouvements { width: 100%; border-collapse: collapse; font-size: .93rem; }
.moc-mouvements th { text-align: left; font-weight: 700; padding: .5rem .6rem; border-bottom: 2px solid #dfe3e8; white-space: nowrap; }
.moc-mouvements td { padding: .5rem .6rem; border-bottom: 1px solid #eceff2; vertical-align: top; }
.moc-mouvements td small { color: #6b7280; }
.moc-mouvements__pastille { display: inline-block; font-size: .72rem; font-weight: 700; text-transform: uppercase; padding: .05em .5em; border-radius: 1em; background: #d9f0dc; color: #1e5e24; margin-right: .25em; }
.moc-mouvements__pastille--retrait { background: #f3d6d6; color: #8a1f1f; }
.moc-mouvements__retrait td { color: #6b7280; }
@media (max-width: 600px) { .moc-mouvements td:first-child { white-space: nowrap; } }

/* Récap /benevoles : cases plus régulières (pas de case à cocher, donc pas de retrait). */
.moc-recap .moc-pub-jour { margin-bottom: 1.4rem; overflow: hidden; }
.moc-recap .moc-pub-jour > summary { padding: .8rem 1.1rem; }
.moc-recap .moc-pub-postes { grid-template-columns: repeat(auto-fill, minmax(min(260px, 100%), 1fr)); gap: 1rem; padding: 1rem 1.1rem 1.1rem; align-items: start; }
.moc-recap .moc-pub-poste-carte { padding: .8rem 1rem .4rem; border-radius: 10px; }
.moc-recap .moc-pub-poste-carte__titre { margin-bottom: .2rem; padding-bottom: .5rem; border-bottom: 1px solid color-mix(in srgb, var(--moc) 18%, #fff); }
.moc-recap .moc-recap__creneau { display: grid; grid-template-columns: 1fr auto; align-items: center; column-gap: .6rem; row-gap: .15rem; padding: .55rem 0; }
.moc-recap .moc-recap__creneau:first-of-type { border-top: 0; }
.moc-recap .moc-recap__creneau .moc-pub-badge { margin-left: 0; justify-self: end; }
.moc-recap .moc-recap__creneau .moc-pub-noms { grid-column: 1 / -1; margin: 0; padding-left: .1rem; }
.moc-recap .moc-recap__apports { margin: 0 1.1rem 1.1rem; }
.moc-recap .moc-recap__total { display: grid; grid-template-columns: auto 1fr; align-items: center; gap: .8rem; max-width: 520px; }
.moc-recap .moc-recap__total .moc-pub-jauge { margin: 0; }
@media (max-width: 600px) {
  .moc-recap .moc-pub-postes { padding: .7rem; gap: .7rem; }
}
.moc-recap .moc-pub-poste-carte__titre + .moc-recap__creneau { border-top: 0; }
