/* Brocante CDF Houdemont · pages publiques. Tout est préfixé .cdfb pour ne pas toucher au thème. */
.cdfb {
  --ink: #1d1d1b;
  --muted: #5d5b55;
  --line: #d9d5cb;
  --paper: #faf8f3;
  --card: #ffffff;
  --green: #3c6e2a;
  --green-dark: #2c5220;
  --green-soft: #e7efe1;
  --warn: #8a5a00;
  --warn-soft: #fbf1dc;
  --error: #a32b1f;
  --error-soft: #fbe9e6;
  --radius: 6px;
  color: var(--ink);
  font-size: 1rem;
  line-height: 1.55;
  max-width: 760px;
  margin: 0 auto;
}
.cdfb *, .cdfb *::before, .cdfb *::after { box-sizing: border-box; }

.cdfb-intro { margin-bottom: 1.5rem; }
.cdfb-kicker { text-transform: uppercase; letter-spacing: .08em; font-size: .78rem; font-weight: 600; color: var(--green); margin: 0 0 .25rem; }
.cdfb-intro h2 { margin: 0 0 1rem; font-size: clamp(1.5rem, 4vw, 2rem); line-height: 1.2; }
.cdfb-facts { display: grid; grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); gap: 0; margin: 0 0 1rem; border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.cdfb-facts > div { padding: .75rem 0; }
.cdfb-facts > div + div { padding-left: 1rem; border-left: 1px solid var(--line); }
.cdfb-facts dt { font-size: .8rem; color: var(--muted); margin: 0; }
.cdfb-facts dd { margin: 0; font-weight: 600; }
@media (max-width: 560px) {
  .cdfb-facts > div + div { padding-left: 0; border-left: 0; border-top: 1px solid var(--line); }
}

.cdfb-box { padding: .9rem 1rem; border-radius: var(--radius); background: var(--paper); border-left: 4px solid var(--line); margin: 0 0 1.25rem; }
.cdfb-box--ok { background: var(--green-soft); border-color: var(--green); }
.cdfb-box--warn { background: var(--warn-soft); border-color: var(--warn); }
.cdfb-box--error { background: var(--error-soft); border-color: var(--error); }
.cdfb-box:focus { outline: 2px solid var(--ink); outline-offset: 2px; }

/* Formulaire */
.cdfb-form fieldset { border: 0; border-top: 2px solid var(--ink); padding: 1.25rem 0 .5rem; margin: 0 0 1.5rem; min-width: 0; }
.cdfb-form legend { font-size: 1.2rem; font-weight: 700; padding: 0 .6rem 0 0; display: flex; align-items: center; gap: .6rem; }
.cdfb-form legend span { display: inline-grid; place-items: center; width: 1.8rem; height: 1.8rem; border-radius: 50%; background: var(--ink); color: #fff; font-size: .9rem; }
.cdfb-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0 1rem; }
.cdfb-grid--cp { grid-template-columns: 10rem minmax(0, 1fr); }
@media (max-width: 600px) { .cdfb-grid, .cdfb-grid--cp { grid-template-columns: 1fr; } }

.cdfb-field { margin: 0 0 1rem; }
.cdfb-field > label, .cdfb-label { display: block; font-weight: 600; margin-bottom: .3rem; font-size: .95rem; }
.cdfb-field abbr { color: var(--error); text-decoration: none; border: 0; }
.cdfb input[type="text"], .cdfb input[type="email"], .cdfb input[type="tel"], .cdfb input[type="date"],
.cdfb select, .cdfb textarea {
  width: 100%; min-height: 46px; padding: .6rem .75rem; font-size: 16px; font-family: inherit; color: var(--ink);
  background: #fff; border: 1px solid #a9a597; border-radius: var(--radius); box-shadow: none;
}
.cdfb textarea { min-height: 90px; }
.cdfb input:focus, .cdfb select:focus, .cdfb textarea:focus { outline: 2px solid var(--green); outline-offset: 1px; border-color: var(--green); }
.cdfb [aria-invalid="true"] { border-color: var(--error) !important; background: var(--error-soft); }
.cdfb-hint { font-size: .85rem; color: var(--muted); margin: .3rem 0 0; }
.cdfb-err { color: var(--error); font-size: .9rem; font-weight: 600; margin: .3rem 0 0; }
.cdfb-note { background: var(--paper); padding: .75rem 1rem; border-radius: var(--radius); font-size: .92rem; margin: 0 0 1rem; }
.cdfb-sub { border-left: 3px solid var(--green); padding-left: 1rem; margin: 0 0 1rem; }
.cdfb-hp { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }

.cdfb-choices { display: flex; flex-wrap: wrap; gap: .5rem; }
.cdfb-choice { display: flex; align-items: center; gap: .5rem; min-height: 46px; padding: .5rem .9rem; border: 1px solid #a9a597; border-radius: var(--radius); cursor: pointer; background: #fff; font-weight: 500; }
.cdfb-choice:has(input:checked) { border-color: var(--green); background: var(--green-soft); box-shadow: inset 0 0 0 1px var(--green); }
.cdfb-choices--big .cdfb-choice { flex: 1 1 200px; flex-wrap: wrap; padding: .9rem 1rem; }
.cdfb-choices--big .cdfb-choice span { margin-left: auto; font-weight: 700; font-size: 1.1rem; }
.cdfb-choice input, .cdfb-check input, .cdfb-tag input { width: 1.2rem; height: 1.2rem; accent-color: var(--green); margin: 0; flex: none; }

.cdfb-tags { display: flex; flex-wrap: wrap; gap: .4rem; }
.cdfb-tag { display: inline-flex; align-items: center; gap: .4rem; padding: .45rem .75rem; border: 1px solid var(--line); border-radius: 999px; font-size: .92rem; cursor: pointer; background: #fff; min-height: 40px; }
.cdfb-tag:has(input:checked) { border-color: var(--green); background: var(--green-soft); }

.cdfb-check label { display: flex; gap: .7rem; align-items: flex-start; font-weight: 400; cursor: pointer; }
.cdfb-check input { margin-top: .2rem; }
.cdfb-check a { color: var(--green-dark); text-decoration: underline; }

.cdfb-sign-pad { position: relative; border: 1px dashed #8c887b; border-radius: var(--radius); background: #fff; height: 190px; touch-action: none; }
.cdfb-sign-pad.is-invalid { border: 2px solid var(--error); background: var(--error-soft); }
.cdfb-sign-pad canvas { width: 100%; height: 100%; display: block; cursor: crosshair; touch-action: none; }
.cdfb-sign-line { position: absolute; left: 8%; right: 8%; bottom: 42px; border-bottom: 1px solid var(--line); pointer-events: none; }
.cdfb-link { background: none; border: 0; padding: .4rem 0; color: var(--green-dark); text-decoration: underline; cursor: pointer; font-size: .9rem; }

.cdfb-submit { border-top: 2px solid var(--ink); padding-top: 1.25rem; }
.cdfb-total { font-size: 1.1rem; margin: 0 0 .75rem; }
.cdfb-total strong { font-size: 1.4rem; }
.cdfb-btn {
  display: inline-flex; align-items: center; justify-content: center; min-height: 50px; padding: .75rem 1.5rem;
  background: var(--green); color: #fff !important; border: 0; border-radius: var(--radius); font-size: 1.05rem; font-weight: 600;
  cursor: pointer; text-decoration: none !important; transition: background-color .15s ease;
}
.cdfb-btn:hover { background: var(--green-dark); }
.cdfb-btn:focus-visible { outline: 3px solid var(--ink); outline-offset: 2px; }
.cdfb-btn:disabled { opacity: .6; cursor: wait; }
.cdfb-btn--ghost { background: transparent; color: var(--green-dark) !important; border: 1px solid var(--green); }
.cdfb-btn--ghost:hover { background: var(--green-soft); }
@media (max-width: 600px) { .cdfb-submit .cdfb-btn { width: 100%; } }

/* Espace exposant */
.cdfb-status { display: inline-block; padding: .3rem .75rem; border-radius: 999px; background: var(--paper); font-weight: 600; margin: 0; }
.cdfb-status--paye, .cdfb-status--place { background: var(--green-soft); color: var(--green-dark); }
.cdfb-status--attente_paiement, .cdfb-status--liste_attente { background: var(--warn-soft); color: var(--warn); }
.cdfb-status--expire, .cdfb-status--annule, .cdfb-status--rembourse { background: var(--error-soft); color: var(--error); }

.cdfb-steps { list-style: none; padding: 0 !important; margin: 0 0 1.5rem !important; display: grid; grid-template-columns: repeat(3, 1fr); counter-reset: s; }
.cdfb-steps li { counter-increment: s; padding: .6rem .5rem .6rem 0; border-top: 4px solid var(--line); font-size: .9rem; color: var(--muted); }
.cdfb-steps li::before { content: counter(s) ". "; font-weight: 700; }
.cdfb-steps li.is-done { border-color: var(--green); color: var(--ink); font-weight: 600; }

.cdfb-card { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); padding: 1.25rem; margin: 0 0 1.25rem; }
.cdfb-card h3 { margin: 0 0 .75rem; font-size: 1.15rem; }
.cdfb-place { font-size: 1.3rem; font-weight: 700; margin: 0 0 .75rem; }
.cdfb-recap { margin: 0 0 1rem; }
.cdfb-recap > div { display: grid; grid-template-columns: 11rem 1fr; gap: 1rem; padding: .45rem 0; border-bottom: 1px solid var(--line); }
.cdfb-recap dt { color: var(--muted); }
.cdfb-recap dd { margin: 0; overflow-wrap: anywhere; }
@media (max-width: 560px) { .cdfb-recap > div { grid-template-columns: 1fr; gap: 0; } }
.cdfb-docs { display: flex; flex-wrap: wrap; gap: .5rem; }

.cdfb-qr-card { text-align: center; }
.cdfb-qr { width: 200px; max-width: 70%; margin: .5rem auto; }
.cdfb-qr svg { width: 100%; height: auto; display: block; }
.cdfb-qr-ref { font-family: ui-monospace, Menlo, monospace; font-size: 1.1rem; font-weight: 700; margin: 0; }

/* Plan (partagé avec l'administration et l'impression) */
.cdfb-plan-wrap { border: 1px solid var(--line); border-radius: var(--radius); background: #f4f2ec; overflow: hidden; }
.cdfb-plan { width: 100%; height: auto; display: block; max-height: 70vh; }
.cdfb-plan .p-bati polygon { fill: #dedad0; stroke: #c9c4b7; stroke-width: .3; }
.cdfb-plan .p-routes polyline { fill: none; stroke: #fff; stroke-width: 5; stroke-linecap: round; }
.cdfb-plan .p-rues polyline { fill: none; stroke: #fff; stroke-width: 7; stroke-linecap: round; stroke-linejoin: round; }
.cdfb-plan .seg { fill: #fff; stroke: #9a968a; stroke-width: .25; }
.cdfb-plan .seg.is-occ { fill: #9bb98c; }
.cdfb-plan .seg.is-off { fill: #cfcac0; stroke: #cfcac0; }
.cdfb-plan .seg.is-hl { fill: var(--green-dark, #2c5220); stroke: #1d1d1b; stroke-width: .5; }
.cdfb-plan .p-num text { font-size: 2.1px; fill: #6a665c; text-anchor: middle; font-family: Arial, sans-serif; }
.cdfb-plan .p-maisons text { font-size: 3px; fill: #7a766b; text-anchor: middle; font-family: Arial, sans-serif; }
.cdfb-plan .p-labels text { font-size: 1.8px; fill: #1d1d1b; text-anchor: middle; font-weight: 700; font-family: Arial, sans-serif; pointer-events: none; }
.cdfb-plan .p-noms text { font-size: 4px; fill: #1d1d1b; text-anchor: middle; font-weight: 700; font-family: Arial, sans-serif; paint-order: stroke; stroke: #fff; stroke-width: 1px; pointer-events: none; }
