/* Pilote — grille du planning des bénévoles (administration et site). */

.pilote-grille-zone { overflow-x: auto; -webkit-overflow-scrolling: touch; margin: 0 0 1em; border: 1px solid #dcdfe4; border-radius: 8px; background: #fff; }
.pilote-pgrille { border-collapse: separate; border-spacing: 0; width: 100%; min-width: 760px; font-size: 13px; line-height: 1.3; }
.pilote-pgrille th, .pilote-pgrille td { border-bottom: 1px solid #cfd4da; padding: 4px; text-align: center; vertical-align: middle; }
.pilote-grille-heure { min-width: 48px; font-size: 12px; white-space: nowrap; text-align: left !important; padding-left: 4px !important; }

/* Repères horaires : trait fort à l'heure pile, moyen à la demi-heure, pointillé au quart d'heure. */
.pilote-pgrille .pilote-t-heure { border-left: 2px solid #8c939d; }
.pilote-pgrille .pilote-t-demi { border-left: 1px solid #b3b9c1; }
.pilote-pgrille .pilote-t-quart { border-left: 1px dashed #d3d7dc; }

/* En-tête des heures, en haut et en tête de chaque lieu. */
.pilote-grille-entete th, .pilote-grille-lieu th { background: #e9edf3; color: #1d2327; font-weight: 600; border-bottom: 2px solid #8c939d; }
.pilote-grille-lieu th.pilote-grille-poste { font-size: 14px; }
.pilote-grille-lieu .pilote-grille-heure, .pilote-grille-entete .pilote-grille-heure { color: #3c434a; }
.pilote-grille-lieu .pilote-t-quart { color: #8a8f98; font-weight: 400; }
tbody .pilote-grille-lieu:not(:first-child) th { border-top: 14px solid #fff; }

.pilote-pgrille .pilote-grille-poste { position: sticky; left: 0; background: #fff; text-align: left; font-weight: 600; min-width: 170px; max-width: 240px; z-index: 1; box-shadow: 2px 0 0 #8c939d; }
.pilote-grille-lieu .pilote-grille-poste, .pilote-grille-entete .pilote-grille-poste { background: #e9edf3; z-index: 2; }
.pilote-grille-rien { background: #fafbfc; }

/* Cases : un liseré blanc sépare deux créneaux qui se suivent. */
.pilote-grille-plage { padding: 0 !important; box-shadow: inset 0 0 0 2px #fff, inset 0 0 0 3px rgba(0, 0, 0, .12); }
.pilote-etat-vide { background: #fbe3e0; }
.pilote-etat-partiel { background: #fdf0d2; }
.pilote-etat-plein { background: #dff2e7; }
.pilote-etat-neutre { background: #eef0f3; }
.pilote-grille-plage.is-selection { box-shadow: inset 0 0 0 3px var(--pilote-accent, #2a6fdb); }

.pilote-grille-lien, .pilote-grille-choix, .pilote-grille-plage > .pilote-grille-places { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 2px; padding: 6px 4px; min-height: 44px; color: inherit; text-decoration: none; }
.pilote-grille-lien:hover, .pilote-grille-lien:focus { background: rgba(42, 111, 219, .08); color: inherit; }
.pilote-grille-noms { font-size: 11px; color: #3c434a; }
.pilote-grille-attente { font-size: 11px; color: #8a5a00; }
.pilote-grille-places { font-size: 12px; color: #3c434a; }

.pilote-grille-choix { cursor: pointer; }
.pilote-grille-choix input { width: 20px; height: 20px; margin: 0; accent-color: var(--pilote-accent, #2a6fdb); }
.pilote-grille-plage:has(input:checked) { box-shadow: inset 0 0 0 3px var(--pilote-accent, #2a6fdb); background: #dbe7fb; background: color-mix(in srgb, var(--pilote-accent, #2a6fdb) 22%, #fff); }

.pilote-grille-legende { display: flex; flex-wrap: wrap; gap: 14px; margin: .5em 0; font-size: 13px; }
.pilote-grille-legende i { display: inline-block; width: 14px; height: 14px; border-radius: 3px; vertical-align: -2px; border: 1px solid rgba(0,0,0,.08); }

/* Site public */
/* Le planning ne doit jamais élargir la page (sinon tout le site glisse sur le côté). */
.pilote-planning { max-width: 100%; min-width: 0; box-sizing: border-box; overflow-x: clip; }
.pilote-planning .pilote-grille-zone { max-width: 100%; }
/* Sans cela, la grille qui défile élargit quand même la page dans Chrome / Safari. */
.pilote-grille-zone { contain: paint; }

/* Grand écran : la grille sort de la colonne de texte pour être visible en entier. */
@media (min-width: 701px) {
	.pilote-planning { overflow-x: visible; }
	.pilote-vue-grille { width: min(1180px, calc(100vw - 48px)); margin-left: calc(50% - min(590px, 50vw - 24px)); }
	.pilote-vue-liste { display: none; }
}
/* Téléphone : une liste par poste à la place de la grille. */
@media (max-width: 700px) {
	.pilote-vue-grille { display: none; }
}

/* Indication quand la grille dépasse quand même (tablette, petit écran). */
.pilote-glisser { margin: .3em 0; font-weight: 600; color: #1d4f9c; }
.pilote-vue-grille.is-deborde .pilote-grille-zone { box-shadow: inset -18px 0 14px -12px rgba(0, 0, 0, .25); }
.pilote-vue-grille.is-fin .pilote-grille-zone { box-shadow: none; }

/* Vue liste */
.pilote-liste-lieu { margin: 1.2em 0 .4em; padding: .3em .6em; background: #e9edf3; border-radius: 6px; font-size: 1.1em; }
.pilote-liste-poste { border: 1px solid #dcdfe4; border-radius: 8px; padding: .5em .7em .6em; margin: 0 0 .6em; background: #fff; }
.pilote-liste-poste h4 { margin: 0 0 .4em; font-size: 1em; display: flex; justify-content: space-between; gap: .5em; flex-wrap: wrap; }
.pilote-liste-poste h4 .pilote-grille-places { font-weight: 400; }
.pilote-liste-poste.is-complet { opacity: .7; }
.pilote-liste-creneaux { display: grid; grid-template-columns: repeat(auto-fill, minmax(140px, 1fr)); gap: 6px; }
.pilote-liste-creneau { display: grid; grid-template-columns: auto 1fr; grid-template-rows: auto; column-gap: 8px; align-items: center; padding: 6px 10px; min-height: 48px; box-sizing: border-box; border-radius: 6px; background: #fbe3e0; border: 1px solid rgba(0, 0, 0, .08); cursor: pointer; font-size: 14px; line-height: 1.25; }
.pilote-liste-creneau input { grid-row: 1 / 4; }
.pilote-liste-creneau .pilote-grille-places { font-size: 12px; grid-column: 2; }
.pilote-liste-creneau.is-complet { grid-template-columns: 1fr; }
.pilote-liste-creneau.is-complet .pilote-grille-places { grid-column: 1; }
.pilote-liste-creneau .pilote-grille-noms { grid-column: 2; font-size: 12px; }
.pilote-liste-creneau.is-complet .pilote-grille-noms { grid-column: 1; }
.pilote-grille-case .pilote-grille-noms { display: block; }
.pilote-liste-creneau input { width: 20px; height: 20px; margin: 0; accent-color: var(--pilote-accent, #2a6fdb); }
.pilote-liste-creneau .pilote-liste-heure { font-weight: 600; white-space: nowrap; }
.pilote-liste-creneau:has(input:checked) { background: #dbe7fb; background: color-mix(in srgb, var(--pilote-accent, #2a6fdb) 22%, #fff); outline: 2px solid var(--pilote-accent, #2a6fdb); }
.pilote-liste-creneau.is-complet { background: #dff2e7; cursor: default; }

.pilote-planning { margin: 2em 0; }
.pilote-planning-ok { background: #dff2e7; border-left: 4px solid #2f9e6a; padding: .7em 1em; }
.pilote-planning-erreur { background: #fbe3e0; border-left: 4px solid #c4352b; padding: .7em 1em; }
.pilote-planning-choix-resume { font-weight: 600; min-height: 1.4em; }
.pilote-planning-coordonnees { border: 1px solid #dcdfe4; border-radius: 8px; padding: 1em 1.2em; display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 0 1.2em; }
.pilote-planning-coordonnees legend { font-weight: 600; padding: 0 .4em; }
.pilote-planning-coordonnees p { margin: .4em 0; }
.pilote-planning-coordonnees input[type=text], .pilote-planning-coordonnees input[type=email], .pilote-planning-coordonnees input[type=tel], .pilote-planning-coordonnees textarea { width: 100%; box-sizing: border-box; padding: .5em; }
.pilote-planning-large { grid-column: 1 / -1; }
.pilote-planning-piege { position: absolute !important; left: -9999px !important; height: 1px; overflow: hidden; }
.pilote-planning button[type=submit] { padding: .7em 1.6em; font-size: 1.05em; cursor: pointer; }
.pilote-planning[style*="--pilote-accent"] button[type=submit] { background: var(--pilote-accent); color: var(--pilote-texte-accent, #fff); border: 1px solid var(--pilote-accent); border-radius: 8px; font-weight: 700; }
.pilote-planning .pilote-picto { color: var(--pilote-accent, inherit); }
.screen-reader-text { position: absolute !important; width: 1px; height: 1px; overflow: hidden; clip: rect(1px, 1px, 1px, 1px); white-space: nowrap; }

/* Administration */
.pilote-sous-onglets { display: flex; gap: 4px; flex-wrap: wrap; margin: 0 0 1em; border-bottom: 1px solid #dcdfe4; }
.pilote-sous-onglets a { padding: .5em 1em; text-decoration: none; border-radius: 6px 6px 0 0; color: #50575e; }
.pilote-sous-onglets a.is-actif { background: #fff; border: 1px solid #dcdfe4; border-bottom-color: #fff; margin-bottom: -1px; color: #1d2327; font-weight: 600; }
.pilote-affectes { margin: .2em 0; }
.pilote-affectes li { margin: 0 0 .3em; }
.pilote-form-bouton { display: inline; }
.pilote-form-ligne { display: flex; flex-wrap: wrap; gap: .5em; align-items: center; }
.pilote-form-ligne textarea { flex-basis: 100%; }
.pilote-lien-danger { color: #b32d2e !important; }
.pilote-statut-puce { display: inline-block; font-size: 11px; padding: 0 .5em; border-radius: 4px; background: #eef0f3; }
.pilote-statut-aff-confirme .pilote-statut-puce { background: #dff2e7; color: #1e6b46; }
.pilote-statut-aff-souhait .pilote-statut-puce { background: #e5eefc; color: #1d4f9c; }
.pilote-statut-aff-propose .pilote-statut-puce { background: #fdf0d2; color: #8a5a00; }
.pilote-statut-aff-refuse .pilote-statut-puce { background: #fbe3e0; color: #8f261e; }
.pilote-table-plages input[type=text] { width: 100%; }
.pilote-apercu { width: 100%; min-height: 420px; border: 1px solid #dcdfe4; border-radius: 6px; background: #f4f5f7; }
.pilote-apercu-court { min-height: 330px; }
.pilote-supprimer-benevole { display: block; margin-top: 1em; }

@media print {
	.pilote-grille-zone { overflow: visible; border: 0; }
	.pilote-pgrille { min-width: 0; font-size: 9pt; }
	.pilote-pgrille thead th, .pilote-pgrille .pilote-grille-poste { position: static; }
}

/* Téléphone : colonne des postes plus étroite pour laisser voir le planning. */
@media (max-width: 600px) {
	.pilote-pgrille { font-size: 12px; }
	.pilote-pgrille .pilote-grille-poste { min-width: 110px; max-width: 130px; font-size: 11.5px; }
	.pilote-grille-heure { min-width: 42px; font-size: 11px; }
}

/* Panneau d'une case : choix de plusieurs candidats */
.pilote-candidats { max-height: 260px; overflow: auto; border: 1px solid #dcdfe4; border-radius: 6px; padding: .4em .7em; background: #fff; flex-basis: 100%; }
.pilote-candidats label { display: block; padding: .25em 0; border-bottom: 1px solid #f0f0f1; }
.pilote-candidats label:last-child { border-bottom: 0; }
.pilote-candidats .pilote-occupe { opacity: .65; }
.pilote-statut-aff-pourvu .pilote-statut-puce { background: #eef0f3; color: #646970; }
.pilote-planning-info-noms { font-size: .9em; background: #f6f7f9; border-left: 4px solid var(--pilote-accent, #2a6fdb); border-radius: 4px; padding: .2em 1em; margin: .6em 0; }
.pilote-planning-info-noms p { margin: .6em 0; }
