/* Devis captation — composition studio */
.page-quote {
    --qb-ink: #f2efe6;
    --qb-paper: #16141a;
    --qb-paper-2: #1e1b24;
    --qb-line: rgba(242, 239, 230, 0.12);
    --qb-signal: #e50914;
    --qb-mint: #7dcea0;
    background:
        radial-gradient(1200px 600px at 10% -10%, rgba(229, 9, 20, 0.22), transparent 55%),
        radial-gradient(900px 500px at 90% 0%, rgba(125, 206, 160, 0.08), transparent 50%),
        linear-gradient(180deg, #0a0a0c 0%, #121018 40%, #0a0a0c 100%);
    color: var(--qb-ink);
    min-height: calc(100vh - 56px);
}

.qb-hero {
    padding: 2.5rem 0 1.25rem;
}
.qb-hero-brand {
    font-family: "Iowan Old Style", "Palatino Linotype", Palatino, Georgia, serif;
    font-size: clamp(2.4rem, 6vw, 4rem);
    letter-spacing: -0.04em;
    line-height: 0.95;
    margin: 0;
}
.qb-hero-brand span { color: var(--qb-signal); }
.qb-hero-lead {
    max-width: 34rem;
    margin: 1rem 0 0;
    color: rgba(242, 239, 230, 0.72);
    font-size: 1.05rem;
}

.qb-shell {
    display: grid;
    grid-template-columns: minmax(0, 1.15fr) minmax(280px, 0.85fr);
    gap: 1.25rem;
    padding-bottom: 3rem;
    align-items: start;
}
@media (max-width: 991.98px) {
    .qb-shell { grid-template-columns: 1fr; }
}

.qb-panel {
    background: linear-gradient(160deg, var(--qb-paper), var(--qb-paper-2));
    border: 1px solid var(--qb-line);
    border-radius: 18px;
    padding: 1.25rem 1.35rem 1.5rem;
}

.qb-formulas {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 0.75rem;
    margin-bottom: 0.85rem;
}
.qb-aside .qb-formulas {
    grid-template-columns: 1fr 1fr;
}
@media (max-width: 420px) {
    .qb-aside .qb-formulas { grid-template-columns: 1fr; }
}
.qb-formula {
    position: relative;
    border: 1px solid var(--qb-line);
    border-radius: 14px;
    padding: 0.85rem 0.75rem;
    cursor: pointer;
    background: rgba(0, 0, 0, 0.2);
    transition: border-color .2s, transform .2s, background .2s;
    text-align: center;
}
.qb-formula:hover { transform: translateY(-2px); }
.qb-formula:has(input:checked) {
    border-color: var(--qb-signal);
    background: rgba(229, 9, 20, 0.12);
}
.qb-formula input { position: absolute; opacity: 0; pointer-events: none; }
.qb-formula-title {
    display: block;
    font-weight: 700;
    font-size: 0.92rem;
    line-height: 1.25;
    margin: 0;
}
.qb-formula.is-disabled {
    opacity: 0.45;
    cursor: not-allowed;
    transform: none !important;
    pointer-events: none;
}
.qb-formula.is-disabled:has(input:checked) {
    border-color: var(--qb-line);
    background: rgba(0, 0, 0, 0.2);
}
.qb-formula--gift:has(input:checked) {
    border-color: var(--qb-mint);
    background: rgba(125, 206, 160, 0.1);
}

.qb-diffusion-opts {
    margin-top: 0.9rem;
    padding-top: 0.85rem;
    border-top: 1px solid var(--qb-line);
}
.qb-opts-title {
    font-size: 0.78rem;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: rgba(242, 239, 230, 0.55);
    margin: 0 0 0.5rem;
}
.qb-radio {
    display: flex;
    gap: 0.55rem;
    align-items: flex-start;
    font-size: 0.92rem;
    margin-bottom: 0.35rem;
    cursor: pointer;
}
.qb-radio input { margin-top: 0.2rem; }
.qb-select-label {
    display: block;
    font-size: 0.8rem;
    color: rgba(242, 239, 230, 0.6);
    margin: 0.65rem 0 0.3rem;
}
.qb-opts-note {
    font-size: 0.78rem;
    color: rgba(242, 239, 230, 0.55);
    margin: 0.5rem 0 0;
    line-height: 1.35;
}

.qb-section-title {
    font-size: 0.78rem;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: rgba(242, 239, 230, 0.55);
    margin: 1.25rem 0 0.65rem;
}

.qb-options {
    display: grid;
    gap: 0.5rem;
}
.qb-option {
    display: flex;
    gap: 0.75rem;
    align-items: flex-start;
    padding: 0.75rem 0.85rem;
    border-radius: 12px;
    border: 1px solid var(--qb-line);
    background: rgba(0, 0, 0, 0.18);
    cursor: pointer;
}
.qb-option input { margin-top: 0.2rem; }
.qb-option strong { display: block; }
.qb-option small { color: rgba(242, 239, 230, 0.6); }

.qb-show {
    border: 1px dashed rgba(242, 239, 230, 0.2);
    border-radius: 12px;
    padding: 0.85rem;
    margin-bottom: 0.65rem;
    background: rgba(0, 0, 0, 0.15);
}
.qb-show-head {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 0.55rem;
}

.qb-show-title-row {
    margin-bottom: 0.75rem;
}

.qb-show-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 0.75rem;
    align-items: stretch;
}
.qb-show-date-wrap {
    flex: 1 1 10rem;
    min-width: 9rem;
}
.qb-show-time-wrap {
    flex: 1.35 1 13rem;
    min-width: 12.5rem;
}
.qb-show-duration-wrap {
    flex: 1 1 9rem;
    min-width: 8.5rem;
}

.qb-shows-overlap {
    display: none;
    margin: 0.75rem 0 0.65rem;
    padding: 0.7rem 0.85rem;
    border-radius: 10px;
    background: rgba(229, 9, 20, 0.16);
    border: 1px solid rgba(229, 9, 20, 0.35);
    color: #f0b4b8;
    font-size: 0.9rem;
    line-height: 1.35;
}
.qb-shows-overlap.is-on { display: block; }

.qb-daycount {
    display: flex;
    flex-wrap: wrap;
    gap: .45rem;
}
.qb-daycount-opt {
    cursor: pointer;
    margin: 0;
}
.qb-daycount-opt input { position: absolute; opacity: 0; pointer-events: none; }
.qb-daycount-opt span {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 4.5rem;
    padding: .55rem .85rem;
    border-radius: 999px;
    border: 1px solid var(--qb-line);
    background: rgba(0,0,0,.2);
    font-size: .85rem;
    font-weight: 600;
    transition: border-color .15s, background .15s;
}
.qb-daycount-opt:hover span { border-color: rgba(242,239,230,.35); }
.qb-daycount-opt:has(input:checked) span {
    border-color: #e50914;
    background: rgba(229, 9, 20, 0.18);
}

.qb-hint {
    margin: 0.75rem 0 0;
    padding: 0.75rem 0.9rem;
    border-radius: 10px;
    background: rgba(125, 206, 160, 0.12);
    border: 1px solid rgba(125, 206, 160, 0.35);
    font-size: 0.9rem;
}

.qb-aside {
    display: flex;
    flex-direction: column;
    gap: 1rem;
    min-width: 0;
}
.qb-aside-pin {
    position: sticky;
    top: 4.75rem;
    z-index: 20;
    box-shadow: 0 18px 40px rgba(0, 0, 0, 0.35);
}
.qb-aside-pin .qb-hint {
    margin-top: 0.55rem;
    margin-bottom: 0;
    font-size: 0.82rem;
    padding: 0.55rem 0.7rem;
}
.qb-aside-pin .qb-hint--private {
    background: rgba(240, 217, 160, 0.14);
    border-color: rgba(240, 217, 160, 0.4);
    color: #f0d9a0;
}
.qb-aside-pin .qb-total {
    margin-top: 1rem;
    padding-top: 0.85rem;
    border-top: 1px solid var(--qb-line);
    font-size: 1.55rem;
}
.qb-aside-pin .qb-total-value {
    font-variant-numeric: tabular-nums;
    letter-spacing: -0.02em;
}
.qb-aside-avail:not(:empty) {
    margin-top: 0.75rem;
}

.qb-receipt-head {
    display: flex;
    justify-content: space-between;
    align-items: baseline;
    margin-bottom: 0.75rem;
}
.qb-receipt-head h2 {
    font-family: "Iowan Old Style", "Palatino Linotype", Palatino, Georgia, serif;
    font-size: 1.45rem;
    margin: 0;
}
.qb-ticket {
    font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
    font-size: 0.82rem;
    background: #0d0c10;
    border-radius: 12px;
    padding: 0.85rem;
    border: 1px dashed rgba(242, 239, 230, 0.2);
    min-height: 8rem;
}
.qb-line {
    display: flex;
    justify-content: space-between;
    gap: 0.75rem;
    padding: 0.55rem 0;
    border-bottom: 1px dotted rgba(242, 239, 230, 0.15);
}
.qb-line.is-free .qb-line-amount { color: var(--qb-mint); }
.qb-line-label { font-weight: 600; }
.qb-line-detail { color: rgba(242, 239, 230, 0.55); font-size: 0.75rem; margin-top: 0.15rem; }
.qb-line-amount { white-space: nowrap; }

.qb-total {
    display: flex;
    justify-content: space-between;
    align-items: baseline;
    margin-top: 1rem;
    font-size: 1.35rem;
    font-weight: 700;
}
.qb-total-value.is-zero { color: var(--qb-mint); }

@media (max-width: 991.98px) {
    .qb-aside-pin {
        position: sticky;
        top: 3.5rem;
    }
}

.qb-timeline {
    display: grid;
    grid-template-columns: 1fr 1.4fr 1fr;
    gap: 0.35rem;
    margin: 1rem 0;
}
.qb-tl-block {
    font-size: 0.72rem;
    padding: 0.45rem 0.5rem;
    border-radius: 8px;
    text-align: center;
}
.qb-tl-setup { background: rgba(229, 9, 20, 0.18); }
.qb-tl-show { background: rgba(242, 239, 230, 0.12); font-weight: 600; }
.qb-tl-teardown { background: rgba(125, 206, 160, 0.15); }

.qb-avail { padding: 0.65rem 0.75rem; border-radius: 10px; font-size: 0.88rem; }
.qb-avail.is-ok { background: rgba(125, 206, 160, 0.14); color: #b8e6cb; }
.qb-avail.is-warn { background: rgba(240, 217, 160, 0.16); color: #f0d9a0; }
.qb-avail.is-ko { background: rgba(229, 9, 20, 0.16); color: #f0b4b8; }
.qb-conflicts { margin: 0.5rem 0 0; padding-left: 1.1rem; font-size: 0.8rem; color: rgba(242, 239, 230, 0.7); }

.qb-map-toolbar {
    display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between;
    gap: .65rem .9rem;
    margin-bottom: .55rem;
}
.qb-map-coords { font-size: .82rem; color: rgba(242, 239, 230, 0.65); font-variant-numeric: tabular-nums; }
.qb-map {
    height: 260px;
    border-radius: 12px;
    border: 1px solid var(--qb-line);
    overflow: hidden;
    background: #0d0c10;
    z-index: 1;
}
.qb-map-status {
    margin-top: .15rem;
    margin-bottom: .35rem !important;
    color: rgba(242, 239, 230, 0.6);
}
.qb-map-status[data-kind="ok"] { color: #b8e6cb; }
.qb-map-status[data-kind="warn"] { color: #f0d9a0; }
.qb-map-status[data-kind="ko"] { color: #f0b4b8; }
.qb-map-status[data-kind="muted"] { color: rgba(242, 239, 230, 0.55); }
.qb-map .leaflet-control-attribution {
    background: rgba(0,0,0,.55);
    color: #bbb;
    font-size: .65rem;
}
.qb-map .leaflet-control-attribution a { color: #ddd; }

.qb-refine-card {
    margin-top: .35rem;
    padding: .85rem .95rem;
    border-radius: 12px;
    border: 1px dashed rgba(240, 217, 160, 0.45);
    background: rgba(240, 217, 160, 0.08);
}
.qb-map-panel {
    margin-top: .35rem;
    padding: .85rem;
    border-radius: 14px;
    border: 1px solid var(--qb-line);
    background: rgba(0, 0, 0, 0.22);
}
.qb-map-validate {
    margin-top: .75rem;
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: .65rem;
}
.qb-map-validate .btn.is-done,
.is-gps-validated .qb-map-validate .btn-accent {
    background: #2f6b4f !important;
    border-color: #2f6b4f !important;
}
.qb-address-panel.is-hidden,
.qb-map-panel.is-hidden { display: none !important; }

/* ——— Champs « label géant » (reveal) ——— */
.qb-reveal {
    position: relative;
    display: flex;
    flex-direction: column;
    justify-content: center;
    min-height: 3.85rem;
    padding: 0.75rem 1rem;
    border-radius: 14px;
    border: 1px solid var(--qb-line);
    background: rgba(0, 0, 0, 0.22);
    cursor: text;
    transition: min-height .28s ease, border-color .2s ease, background .2s ease, box-shadow .2s ease;
}
.qb-reveal:hover { border-color: rgba(242, 239, 230, 0.28); }
.qb-reveal.is-open,
.qb-reveal.has-value {
    min-height: 5.1rem;
    border-color: rgba(229, 9, 20, 0.55);
    background: rgba(229, 9, 20, 0.06);
    box-shadow: inset 0 0 0 1px rgba(229, 9, 20, 0.12);
}
.qb-reveal-label {
    font-family: inherit;
    font-size: clamp(1.05rem, 2.4vw, 1.35rem);
    font-weight: 600;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    line-height: 1.2;
    color: rgba(242, 239, 230, 0.88);
    margin: 0;
    cursor: text;
    transform-origin: left center;
    transition: font-size .28s ease, color .2s ease, letter-spacing .28s ease, opacity .2s ease;
    pointer-events: none;
}
.qb-reveal.is-open .qb-reveal-label,
.qb-reveal.has-value .qb-reveal-label {
    font-size: 0.68rem;
    letter-spacing: 0.1em;
    font-weight: 600;
    color: rgba(242, 239, 230, 0.55);
    margin-bottom: 0.35rem;
    pointer-events: auto;
}
.qb-reveal-input,
.qb-reveal-input.form-control,
.qb-reveal-input.form-select {
    display: block;
    width: 100%;
    border: 0 !important;
    background: transparent !important;
    box-shadow: none !important;
    color: var(--qb-ink) !important;
    font-size: 1.15rem !important;
    padding: 0 !important;
    height: 0;
    opacity: 0;
    margin: 0;
    overflow: hidden;
    transition: height .28s ease, opacity .2s ease, margin .2s ease;
}
.qb-reveal.is-open .qb-reveal-input,
.qb-reveal.has-value .qb-reveal-input,
.qb-reveal.is-open .qb-reveal-input.form-control,
.qb-reveal.has-value .qb-reveal-input.form-control,
.qb-reveal.is-open .qb-reveal-input.form-select,
.qb-reveal.has-value .qb-reveal-input.form-select {
    height: 1.7rem;
    opacity: 1;
    margin-top: 0.1rem;
}
.qb-reveal-input::placeholder { color: transparent; }
.qb-reveal-input:focus { outline: none !important; }

/* Tom Select dans reveal */
.qb-reveal--select .ts-wrapper {
    display: none;
    border: 0 !important;
    background: transparent !important;
    box-shadow: none !important;
}
.qb-reveal--select.is-open .ts-wrapper,
.qb-reveal--select.has-value .ts-wrapper {
    display: block;
}
.qb-reveal--select .ts-control {
    background: transparent !important;
    border: 0 !important;
    box-shadow: none !important;
    padding: 0 !important;
    min-height: 1.7rem !important;
    color: var(--qb-ink) !important;
    font-size: 1.05rem !important;
}
.qb-reveal--select .ts-control .item {
    color: var(--qb-ink) !important;
    margin: 0 !important;
}
.qb-reveal--select .ts-control input { display: none !important; }
.qb-reveal--select .ts-dropdown {
    background: #1a1820 !important;
    border: 1px solid rgba(242,239,230,.18) !important;
    border-radius: 10px !important;
    color: #f2efe6 !important;
    z-index: 2000 !important;
}
.qb-reveal--select .ts-dropdown .option {
    padding: .55rem .75rem;
}
.qb-reveal--select .ts-dropdown .option.active,
.qb-reveal--select .ts-dropdown .option:hover {
    background: rgba(229, 9, 20, 0.25) !important;
    color: #fff !important;
}
.qb-reveal--select select.tomselected { display: none !important; }

/* Dropdown Tom Select accroché au body */
.ts-dropdown {
    background: #1a1820 !important;
    border: 1px solid rgba(242,239,230,.18) !important;
    border-radius: 10px !important;
    color: #f2efe6 !important;
    z-index: 3000 !important;
    box-shadow: 0 12px 36px rgba(0,0,0,.45);
}
.ts-dropdown .option { padding: .55rem .75rem; }
.ts-dropdown .option.active,
.ts-dropdown .option:hover {
    background: rgba(229, 9, 20, 0.25) !important;
    color: #fff !important;
}
.ts-dropdown .option[data-value=""] {
    color: rgba(242,239,230,.45);
    font-style: italic;
}

/* Flatpickr time — inline fixe dans la case */
.qb-reveal--picker {
    cursor: pointer;
    min-height: 3.85rem;
}
.qb-reveal--picker.is-open,
.qb-reveal--picker.has-value {
    min-height: 6.1rem;
}
.qb-reveal--picker .qb-reveal-input,
.qb-reveal--picker .flatpickr-input,
.qb-reveal--picker .flatpickr-mobile {
    position: absolute !important;
    width: 1px !important;
    height: 1px !important;
    opacity: 0 !important;
    pointer-events: none !important;
    margin: 0 !important;
    padding: 0 !important;
    overflow: hidden !important;
}
.qb-reveal--picker .flatpickr-wrapper {
    display: none;
    width: 100%;
}
.qb-reveal--picker.is-open .flatpickr-wrapper,
.qb-reveal--picker.has-value .flatpickr-wrapper {
    display: block;
}
.qb-reveal--picker .flatpickr-calendar {
    background: transparent !important;
    border: 0 !important;
    box-shadow: none !important;
    border-radius: 0 !important;
    position: static !important;
    width: 100% !important;
    max-width: none !important;
    padding: 0 !important;
    animation: none !important;
}
.qb-reveal--picker .flatpickr-calendar.inline {
    top: auto !important;
    left: auto !important;
    right: auto !important;
}
.qb-reveal--picker .flatpickr-calendar.noCalendar {
    width: 100% !important;
}
.qb-reveal--picker .flatpickr-time {
    border-top: 0 !important;
    max-height: none !important;
    height: 2.35rem !important;
    line-height: 2.35rem !important;
    display: flex;
    align-items: center;
    justify-content: flex-start;
    gap: 0.15rem;
}
.qb-reveal--picker .flatpickr-time .numInputWrapper {
    width: 3.4rem;
    height: 2.35rem;
}
.qb-reveal--picker .flatpickr-time input.flatpickr-hour,
.qb-reveal--picker .flatpickr-time input.flatpickr-minute {
    color: var(--qb-ink) !important;
    background: transparent !important;
    font-weight: 700;
    font-size: 1.55rem !important;
    font-variant-numeric: tabular-nums;
    height: 2.35rem !important;
    line-height: 2.35rem !important;
}
.qb-reveal--picker .flatpickr-time .flatpickr-time-separator {
    color: var(--qb-ink) !important;
    font-size: 1.45rem;
    font-weight: 700;
    line-height: 2.35rem;
    height: 2.35rem;
    margin: 0 0.1rem;
}
.qb-reveal--picker .flatpickr-time .numInputWrapper span {
    border-color: rgba(242,239,230,.22) !important;
    opacity: .85;
}
.qb-reveal--picker .flatpickr-time .numInputWrapper span:hover {
    background: rgba(229,9,20,.35) !important;
}
.qb-reveal--picker .flatpickr-calendar.hasTime .flatpickr-time {
    border-top: 0 !important;
}

/* Flatpickr popup (si utilisé ailleurs) */
.flatpickr-calendar {
    background: #1a1820 !important;
    border: 1px solid rgba(242,239,230,.18) !important;
    box-shadow: 0 12px 40px rgba(0,0,0,.45) !important;
    border-radius: 12px !important;
}
.flatpickr-calendar.noCalendar {
    width: auto !important;
}
.flatpickr-time {
    border-top: 0 !important;
    max-height: none !important;
}
.flatpickr-time input,
.flatpickr-time .flatpickr-am-pm {
    color: #f2efe6 !important;
    background: transparent !important;
    font-weight: 600;
}
.flatpickr-time .flatpickr-time-separator { color: #f2efe6 !important; }
.flatpickr-time .numInputWrapper span { border-color: rgba(242,239,230,.2) !important; }
.flatpickr-time .numInputWrapper span:hover { background: rgba(229,9,20,.35) !important; }
.flatpickr-calendar.hasTime .flatpickr-time { border-top: 1px solid rgba(242,239,230,.12) !important; }

.qb-reveal--textarea { min-height: 5rem; }
.qb-reveal--textarea.is-open,
.qb-reveal--textarea.has-value { min-height: 8rem; }
.qb-reveal--textarea .qb-reveal-input {
    resize: vertical;
    line-height: 1.4;
}
.qb-reveal--textarea.is-open .qb-reveal-input,
.qb-reveal--textarea.has-value .qb-reveal-input {
    height: 4.5rem;
    opacity: 1;
}

.qb-invoice {
    background: #fff;
    color: #111;
    max-width: 820px;
    margin: 2rem auto;
    padding: 2rem 2.25rem;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.35);
}
.qb-invoice h1 {
    font-family: "Iowan Old Style", Palatino, Georgia, serif;
    font-size: 1.5rem;
    letter-spacing: 0.02em;
}
.qb-invoice table { width: 100%; border-collapse: collapse; margin: 1rem 0; }
.qb-invoice th, .qb-invoice td { border-bottom: 1px solid #ddd; padding: 0.45rem 0.35rem; text-align: left; vertical-align: top; }
.qb-invoice .muted { color: #555; }
@media print {
    .ctv-navbar, footer, .no-print { display: none !important; }
    .qb-invoice { box-shadow: none; margin: 0; max-width: none; }
    body { background: #fff !important; }
}
