/* apel.blitech.fr — styles communs fête + BBQ.
   Repris fidèlement de form-fete-mockup-v5.html (charte v5 validée 2026-05-12). */

* { box-sizing: border-box; margin: 0; padding: 0; }
body {
  font-family: Georgia, 'Times New Roman', serif;
  background: #FCE8E8; color: #1a1a1a; min-height: 100vh;
  -webkit-font-smoothing: antialiased;
}
.wrap { max-width: 760px; margin: 0 auto; padding: 24px 16px 80px; }
.card { background: #FFFFFF; border-radius: 10px; overflow: hidden; box-shadow: 0 4px 16px rgba(0,0,0,.06); }
.bandeau img { display: block; width: 100%; height: auto; }
.progress { display: flex; align-items: center; gap: 8px; padding: 20px 32px 0; background: #FFFFFF; }
.progress-step { flex: 1; height: 6px; background: #F0E5D0; border-radius: 3px; transition: background .25s; }
.progress-step.active { background: #E85D2F; }
.progress-step.done { background: #3FA0A8; }
.progress-label { font-size: 12px; color: #4A3A2C; text-align: right; padding: 8px 32px 0; background: #FFFFFF; font-style: italic; }
.section { padding: 28px 32px 12px; background: #FFFFFF; display: none; }
.section.active { display: block; }
.section h2 { font-size: 22px; font-weight: bold; color: #4A3A2C; border-bottom: 2px solid #E85D2F; padding-bottom: 10px; margin-bottom: 6px; }
.section .intro { color: #555; font-size: 14px; margin: 8px 0 24px; line-height: 1.5; }
.field { margin-bottom: 22px; }
.field label.field-label { display: block; font-weight: bold; color: #1a1a1a; font-size: 15px; margin-bottom: 6px; }
.field label.field-label .req { color: #E85D2F; margin-left: 2px; }
.field input[type=text], .field input[type=email], .field input[type=tel] {
  width: 100%; border: none; border-bottom: 1.5px solid #C7B68A;
  background: transparent; padding: 10px 4px;
  font-family: inherit; font-size: 15px; color: #1a1a1a;
  transition: border-color .2s;
}
.field input:focus { outline: none; border-bottom-color: #E85D2F; }
.field input::placeholder { color: #B5A483; font-style: italic; }
.field.error input { border-bottom-color: #B91C1C; }
.field.error .help { color: #B91C1C; }
.help { font-size: 12px; color: #888; margin-top: 4px; }

/* Honeypot — caché à l'utilisateur et aux lecteurs d'écran. */
.hp-field { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; opacity: 0; }

/* Section 2 — checkboxes classes */
.checkbox-group { background: #FFFCF7; border: 1px solid #F0E5D0; border-radius: 4px; padding: 16px 18px; margin-bottom: 12px; }
.checkbox-group .group-title { font-weight: bold; color: #4A3A2C; margin-bottom: 12px; font-size: 15px; }
.checkbox-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(140px, 1fr)); gap: 6px; }
.check-tile {
  display: flex; align-items: center; font-size: 14px; color: #333;
  cursor: pointer; padding: 12px 12px; border-radius: 4px;
  transition: background .15s, border-color .15s;
  border: 1.5px solid transparent; font-weight: normal; user-select: none;
}
.check-tile:hover { background: rgba(232,93,47,.06); }
.check-tile input { margin-right: 10px; accent-color: #E85D2F; width: 18px; height: 18px; cursor: pointer; flex-shrink: 0; }
.check-tile:has(input:checked) { background: rgba(232,93,47,.10); border-color: #E85D2F; color: #E85D2F; font-weight: bold; }

.check-list { display: flex; flex-direction: column; gap: 6px; }
.check-list .check-tile { width: 100%; }

/* Sections 3, 4, 5 — option-card */
.creneau-block {
  background: #FFFCF7; border: 1px solid #F0E5D0; border-left: 4px solid #E85D2F;
  padding: 18px 20px; margin-bottom: 16px; border-radius: 4px;
}
.creneau-block .creneau-title { font-weight: bold; color: #4A3A2C; font-size: 17px; margin-bottom: 4px; }
.creneau-block .creneau-sub { color: #888; font-size: 12px; margin-bottom: 14px; }

.option-card {
  display: flex; align-items: center; justify-content: space-between;
  padding: 14px 16px;
  background: #FFFFFF;
  border: 1.5px solid #E8DDC4;
  border-radius: 4px;
  cursor: pointer;
  margin-bottom: 6px;
  transition: all .15s;
  user-select: none;
  position: relative;
}
.option-card:hover:not(.full):not(.disabled) { border-color: #E85D2F; background: #FFFCF7; }
.option-card input[type=checkbox] { position: absolute; opacity: 0; pointer-events: none; }
.option-card:has(input:checked) {
  background: rgba(232,93,47,.10);
  border-color: #E85D2F;
  border-left: 4px solid #E85D2F;
  padding-left: 13px;
}
.option-card:has(input:checked) .libelle { color: #C44A22; font-weight: bold; }
.option-card:has(input:checked)::before { content: "✓"; color: #E85D2F; font-weight: bold; font-size: 18px; margin-right: 10px; }
.option-card .libelle { flex: 1; font-size: 15px; color: #333; line-height: 1.4; }
.option-card .counter {
  font-size: 12px; color: #888; font-variant-numeric: tabular-nums;
  background: #F4F0E4; padding: 4px 10px; border-radius: 12px; margin-left: 10px; white-space: nowrap;
}
.option-card.full { cursor: not-allowed; background: #F8F4ED; border-color: #E0D4B8; opacity: 0.65; }
.option-card.full .libelle { color: #999; text-decoration: line-through; }
.option-card.full .counter { background: #FFD8D0; color: #C44A22; font-weight: bold; }

.yn-pair { display: flex; gap: 12px; }
.yn-pair .option-card { flex: 1; margin-bottom: 0; justify-content: center; padding: 14px 18px; }
.yn-pair .option-card .libelle { text-align: center; flex: 0 1 auto; }

.commit-card {
  display: flex; align-items: flex-start;
  padding: 18px 20px;
  background: #FFFFFF;
  border: 1.5px solid #E8DDC4;
  border-radius: 4px;
  cursor: pointer;
  transition: all .15s;
  user-select: none;
  position: relative;
}
.commit-card:hover { border-color: #E85D2F; background: #FFFCF7; }
.commit-card input[type=checkbox] { position: absolute; opacity: 0; pointer-events: none; }
.commit-card:has(input:checked) {
  background: rgba(232,93,47,.10);
  border-color: #E85D2F;
  border-left: 4px solid #E85D2F;
  padding-left: 17px;
}
.commit-card:has(input:checked) .commit-title { color: #C44A22; }
.commit-card .commit-mark {
  width: 24px; height: 24px; border-radius: 4px;
  border: 2px solid #C7B68A;
  margin-right: 14px; flex-shrink: 0;
  display: flex; align-items: center; justify-content: center;
  font-weight: bold; font-size: 16px; color: transparent;
  transition: all .15s;
}
.commit-card:has(input:checked) .commit-mark { background: #E85D2F; border-color: #E85D2F; color: #FFFFFF; }
.commit-card:has(input:checked) .commit-mark::before { content: "✓"; }
.commit-card .commit-body { flex: 1; }
.commit-card .commit-title { font-size: 15px; font-weight: bold; color: #333; margin-bottom: 2px; }
.commit-card .commit-desc { font-size: 13px; color: #777; line-height: 1.4; }

.rgpd { background: #FFF8EE; border-left: 4px solid #FFD86E; padding: 14px 18px; margin: 24px 0 16px; font-size: 12px; color: #5A4520; line-height: 1.5; }
.rgpd a { color: #E85D2F; }

.section-5-intro { background: #FFF8EE; border-left: 4px solid #FFD86E; padding: 14px 18px; margin-bottom: 20px; font-size: 14px; color: #5A4520; line-height: 1.6; }

.nav { display: flex; justify-content: space-between; align-items: center; padding: 20px 32px 28px; background: #FFFFFF; border-top: 1px solid #F0E5D0; gap: 12px; }
.btn { padding: 14px 28px; font-family: inherit; font-size: 15px; font-weight: bold; border-radius: 4px; cursor: pointer; border: none; transition: all .15s; }
.btn-primary { background: #E85D2F; color: #FFFFFF; }
.btn-primary:hover { background: #C44A22; }
.btn-primary:disabled { background: #C7B68A; cursor: not-allowed; }
.btn-secondary { background: transparent; color: #4A3A2C; border: 1.5px solid #C7B68A; }
.btn-secondary:hover { border-color: #4A3A2C; background: #FFF8EE; }
.btn-secondary:disabled { opacity: .4; cursor: not-allowed; }

.btn-primary.loading {
  position: relative;
  color: transparent;
}
.btn-primary.loading::after {
  content: "";
  position: absolute; inset: 0;
  display: flex; align-items: center; justify-content: center;
  color: #FFFFFF;
  background: inherit;
  animation: apel-pulse .8s infinite ease-in-out;
  border-radius: 4px;
}
.btn-primary.loading::before {
  content: "envoi…"; position: absolute; inset: 0;
  display: flex; align-items: center; justify-content: center;
  color: #FFFFFF; font-weight: bold;
}
@keyframes apel-pulse { 0%,100% { opacity: 1 } 50% { opacity: .6 } }

.footer { background: #3FA0A8; color: #FFFFFF; text-align: center; padding: 20px 32px; font-size: 13px; }

.form-error-banner {
  display: none;
  background: #FEE2E2; border-left: 4px solid #B91C1C;
  color: #7F1D1D; padding: 12px 18px; margin: 0 32px 12px;
  font-size: 14px; border-radius: 4px;
}
.form-error-banner.visible { display: block; }
.form-error-banner ul { margin: 6px 0 0 18px; padding: 0; }

/* index.php (hub) — cartes 2 events */
.hub-card {
  background: #FFFCF7;
  border: 1.5px solid #E8DDC4;
  border-left: 4px solid #E85D2F;
  border-radius: 4px;
  padding: 20px 22px;
  margin-bottom: 14px;
  transition: all .15s;
  display: block;
}
a.hub-card:hover { border-color: #E85D2F; background: #FFF8EE; box-shadow: 0 2px 8px rgba(0,0,0,.04); }
.hub-card.done { border-left-color: #3FA0A8; background: #F0F8F9; }
.hub-card.closed { opacity: .55; cursor: not-allowed; }
.hub-card-title { font-family: Georgia, serif; font-size: 18px; font-weight: bold; color: #4A3A2C; margin-bottom: 6px; }
.hub-card-state { font-size: 14px; color: #555; line-height: 1.5; }
.hub-card-state.ok { color: #0a7c3a; font-weight: bold; }
.hub-card .btn { margin-top: 10px; }

/* recap.php — page récap après soumission */
.recap-wrap { background: #FFFFFF; padding: 28px 32px; }
.recap-wrap h1 { font-size: 22px; color: #4A3A2C; margin-bottom: 4px; }
.recap-wrap .subtitle { color: #666; font-style: italic; margin-bottom: 24px; font-size: 14px; }
.recap-section { margin-bottom: 22px; }
.recap-section h2 { font-size: 16px; color: #4A3A2C; margin-bottom: 10px; border-bottom: 2px solid #E85D2F; padding-bottom: 6px; }
.recap-section .recap-table { width: 100%; border-collapse: collapse; background: #FFFCF7; border: 1px solid #F0E5D0; }
.recap-section .recap-table td { padding: 10px 12px; font-size: 14px; border-bottom: 1px solid #F0E5D0; }
.recap-section .recap-table .creneau { color: #E85D2F; font-weight: bold; width: 35%; }
.recap-extras { background: #FFF8EE; border-left: 4px solid #FFD86E; padding: 12px 16px; margin-top: 10px; font-size: 13px; color: #5A4520; }
.recap-cta-link {
  background: #FFFCF7; border: 1.5px solid #FFD86E; border-radius: 6px;
  padding: 16px 20px; margin: 24px 0;
}
.recap-cta-link p { margin: 0 0 12px; font-size: 14px; color: #5A4520; }
.recap-cta-confirm {
  background: #FFFFFF; border-top: 1px solid #F0E5D0; padding-top: 24px; margin-top: 24px; text-align: center;
}
.recap-cta-confirm .btn-primary { padding: 16px 36px; font-size: 16px; }
.recap-cta-confirm .recap-confirm-note {
  margin-top: 14px; font-size: 12px; color: #888; font-style: italic; line-height: 1.5;
}
.recap-already-confirmed {
  background: #F0F8F9; border-left: 4px solid #3FA0A8;
  padding: 12px 16px; margin-top: 24px; font-size: 14px; color: #1F5A60;
}

/* modifier.php — page hub + blocs récap */
.modif-wrap { background: #FFFFFF; padding: 28px 32px; }
.modif-wrap h1 { font-size: 22px; color: #4A3A2C; margin-bottom: 4px; }
.modif-wrap .subtitle { color: #666; font-style: italic; margin-bottom: 24px; font-size: 14px; }
.modif-bloc {
  background: #FFFCF7; border: 1px solid #F0E5D0; border-left: 4px solid #E85D2F;
  border-radius: 4px; padding: 18px 20px; margin-bottom: 16px;
}
.modif-bloc h2 { font-size: 16px; color: #4A3A2C; margin-bottom: 12px; font-weight: bold; }
.modif-bloc .modif-content { font-size: 14px; color: #333; line-height: 1.6; }
.modif-bloc .modif-content strong { color: #4A3A2C; }
.modif-bloc .modif-actions { margin-top: 14px; }
.modif-bloc .modif-actions .btn { padding: 10px 18px; font-size: 14px; }
.modif-bloc.danger { border-left-color: #B91C1C; background: #FEF2F2; }
.modif-bloc.danger h2 { color: #B91C1C; }
.modif-bloc.danger .btn { background: #B91C1C; color: #fff; }
.modif-bloc.danger .btn:hover { background: #991B1B; }
.modif-recap-table { width: 100%; border-collapse: collapse; margin-top: 8px; }
.modif-recap-table td { padding: 8px 6px; font-size: 14px; border-bottom: 1px solid #F0E5D0; }
.modif-recap-table .creneau { color: #E85D2F; font-weight: bold; width: 32%; }

/* Modals */
.modal {
  position: fixed; inset: 0;
  background: rgba(26, 26, 26, .6);
  display: none; align-items: center; justify-content: center;
  z-index: 1000; padding: 20px;
}
.modal.open { display: flex; }
.modal-content {
  background: #fff; border-radius: 8px; width: 100%; max-width: 600px;
  max-height: 90vh; overflow-y: auto; padding: 28px 32px;
  box-shadow: 0 8px 32px rgba(0,0,0,.15);
}
.modal-content h2 { font-size: 18px; color: #4A3A2C; margin-bottom: 18px; padding-bottom: 10px; border-bottom: 2px solid #E85D2F; }
.modal-content .modal-error {
  display: none; background: #FEE2E2; border-left: 4px solid #B91C1C; color: #7F1D1D;
  padding: 10px 14px; margin: 0 0 14px; font-size: 14px; border-radius: 4px;
}
.modal-content .modal-error.visible { display: block; }
.modal-content .modal-actions {
  display: flex; justify-content: flex-end; gap: 10px; margin-top: 20px;
  border-top: 1px solid #F0E5D0; padding-top: 16px;
}
.modal-content .modal-actions .btn { padding: 10px 22px; font-size: 14px; }

/* Page d'erreur token */
.error-wrap { background: #FFFFFF; padding: 40px 32px; text-align: center; }
.error-wrap h1 { color: #B91C1C; font-size: 22px; margin-bottom: 12px; }
.error-wrap p { color: #555; font-size: 15px; line-height: 1.6; }

/* merci.php */
.merci-wrap { background: #FFFFFF; padding: 32px; }
.merci-wrap h1 { font-size: 24px; color: #4A3A2C; margin-bottom: 12px; }
.merci-wrap .mail-sent {
  background: #E8F5F6; border-left: 4px solid #3FA0A8;
  padding: 12px 18px; margin: 16px 0 24px;
  font-size: 14px; color: #1F5A60; border-radius: 4px;
}
.merci-wrap .recap-table {
  width: 100%; border-collapse: collapse; margin: 16px 0;
  background: #FFFCF7; border: 1px solid #F0E5D0;
}
.merci-wrap .recap-table th,
.merci-wrap .recap-table td {
  padding: 12px; font-size: 14px; text-align: left; border-bottom: 1px solid #F0E5D0;
}
.merci-wrap .recap-table th { background: #4A3A2C; color: #fff; text-transform: uppercase; font-size: 12px; letter-spacing: 0.8px; }
.merci-wrap .recap-table td.creneau { color: #E85D2F; font-weight: bold; }
.merci-wrap .deadline { color: #666; font-size: 13px; margin-top: 16px; font-style: italic; }

@media (max-width: 620px) {
  .wrap { padding: 12px 8px 60px; }
  .section { padding: 22px 18px 8px; }
  .progress { padding: 16px 18px 0; }
  .progress-label { padding: 6px 18px 0; }
  .nav { padding: 16px 18px 22px; flex-direction: column-reverse; gap: 10px; }
  .nav .btn { width: 100%; }
  .section h2 { font-size: 19px; }
  .creneau-block { padding: 14px 14px; }
  .checkbox-grid { grid-template-columns: repeat(auto-fill, minmax(120px, 1fr)); }
  .check-tile { padding: 14px 12px; }
  .option-card { padding: 16px 14px; }
  .yn-pair { flex-direction: column; }
  .merci-wrap { padding: 22px 18px; }
  .form-error-banner { margin: 0 18px 12px; }
}
