/* Armoricamp Booking v2 — Western/Rustic theme */

/* ── Variables ─────────────────────────────────────────────────────── */
#ab-booking-app {
    --primary: #641D1D;
    --primary-light: #8B3030;
    --dispo: #B8CEAB;
    --dispo-light: #C8D8BC;
    --occupe: #C0694B;
    --occupe-light: #D4825E;
    --select: #D9A95A;
    --brun: #5E3A1A;
    --fond: #F4EDE4;
    --font-h: 'Rye', serif;
    --font-body: 'Rancho', cursive;
    --noir: #2C2417;
}

/* ── Reset scope ───────────────────────────────────────────────────── */
#ab-booking-app *,
#ab-booking-app *::before,
#ab-booking-app *::after {
    box-sizing: border-box;
}

/* ── Page container ────────────────────────────────────────────────── */
.ab-page {
    font-family: var(--font-body);
    background: #FAF4E8;
    border-radius: 16px;
    overflow: hidden;
    width: 100%;
    max-width: 1020px;
    margin: 0 auto;
}

/* ── Hero band ─────────────────────────────────────────────────────── */
.ab-hero-band {
    background: transparent;
    padding: 16px 24px;
    padding-bottom: 0;
    text-align: center;
}

.ab-hero-ornament {
    color: var(--noir);
    font-size: 16px;
    letter-spacing: 6px;
    opacity: 0.45;
}

.ab-hero-band h1 {
    font-family: var(--font-h);
    color: var(--noir);
    font-size: 25px;
    margin: 4px 0;
}

.ab-hero-band p {
    color: var(--noir);
    font-family: var(--font-body);
    font-size: 15px;
    opacity: 0.65;
}

/* ── Main 3-column layout ──────────────────────────────────────────── */
.ab-main-layout {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    padding: 12px 16px;
    padding-top: 0;
    min-height: 520px;
}

.ab-heberg-col {
    width: 200px;
    flex-shrink: 0;
}

.ab-calendar-section {
    flex: 1;
    min-width: 0;
}

.ab-booking-panel {
    width: 280px;
    flex-shrink: 0;
}

/* ── Left column: accommodations ───────────────────────────────────── */
.ab-heberg-col {
    background: #FAF9F4;
    border-radius: 12px;
    box-shadow: 0 6px 24px rgba(0,0,0,0.15);
    padding: 16px 0;
    display: flex;
    flex-direction: column;
}

.ab-heberg-col-title {
    font-family: var(--font-h);
    color: var(--noir);
    font-size: 13px;
    padding: 0 16px 12px;
    border-bottom: 1px solid rgba(59,107,74,0.25);
    margin-bottom: 8px;
}

.ab-heberg-item {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 10px 16px;
    cursor: pointer;
    transition: background 0.15s;
    border-bottom: 1px solid rgba(0,0,0,0.04);
}

.ab-heberg-item:hover {
    background: rgba(0,0,0,0.03);
}

.ab-heberg-item.active {
    background: rgba(184,206,171,0.25);
}

.ab-heberg-item .ab-heberg-icon {
    display: block;
    width: 32px;
    height: 32px;
    flex-shrink: 0;
    opacity: 0.85;
}

.ab-heberg-info {
    flex: 1;
    min-width: 0;
}

.ab-heberg-name {
    font-family: var(--font-body);
    font-size: 15px;
    color: var(--noir);
    line-height: 1.2;
}

.ab-heberg-cap {
    font-family: var(--font-body);
    font-size: 12px;
    color: var(--noir);
    opacity: 0.5;
    font-style: italic;
}

.ab-heberg-cap-min {
    color: var(--primary);
    opacity: 0.8;
    font-style: normal;
    font-size: 11px;
}

.ab-heberg-site {
    border-top: 1px solid rgba(59,107,74,0.3);
    margin-top: 4px;
}

/* ── Calendar section ──────────────────────────────────────────────── */
.ab-calendar-section {
    padding: 20px;
    background: #FAF9F4;
    border-radius: 12px;
    box-shadow: 0 6px 24px rgba(0,0,0,0.15);
}

.ab-section-title {
    font-family: var(--font-h);
    color: var(--noir);
    font-size: 16px;
    margin-bottom: 4px;
    display: flex;
    align-items: center;
    gap: 8px;
}

.ab-section-sub {
    font-family: var(--font-body);
    color: var(--noir);
    font-size: 13px;
    opacity: 0.6;
    margin-bottom: 12px;
}

.ab-cal-nav {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 8px;
}

.ab-cal-nav-btn {
    background: transparent;
    border: 1px solid rgba(0,0,0,0.12);
    border-radius: 8px;
    width: 32px;
    height: 32px;
    cursor: pointer;
    font-size: 17px;
    color: var(--noir);
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background 0.15s;
}

.ab-cal-nav-btn:hover {
    background: rgba(0,0,0,0.05);
}

.ab-cal-month-label {
    font-family: var(--font-h);
    font-size: 15px;
    color: var(--noir);
}

.ab-cal-grid {
    display: grid;
    grid-template-columns: repeat(7, 1fr);
    gap: 6px;
}

.ab-cal-day-header {
    text-align: center;
    font-family: var(--font-body);
    font-size: 12px;
    color: var(--noir);
    padding: 4px 0 8px;
    opacity: 0.65;
    letter-spacing: 0.3px;
}

.ab-cal-day {
    aspect-ratio: 1;
    border-radius: 7px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-family: var(--font-body);
    font-size: 14px;
    cursor: pointer;
    transition: transform 0.1s, box-shadow 0.1s;
    border: 1.5px solid transparent;
    position: relative;
}

.ab-cal-day:hover {
    transform: scale(1.07);
}

.ab-cal-day.ab-empty {
    background: rgba(184,206,171,0.15);
    cursor: default;
}

.ab-cal-day.ab-empty:hover {
    transform: none;
}

.ab-cal-day.ab-libre {
    background: var(--dispo);
    color: var(--brun);
    border-color: var(--dispo-light);
}

.ab-cal-day.ab-libre:hover {
    box-shadow: 0 2px 8px rgba(184,206,171,0.5);
}

.ab-cal-day.ab-checkout {
    background: linear-gradient(135deg, var(--occupe) 40%, var(--dispo) 40%) !important;
    color: var(--brun) !important;
    border-color: var(--occupe-light) !important;
    position: relative;
}

.ab-cal-day.ab-checkout:hover {
    box-shadow: 0 2px 8px rgba(184,206,171,0.5);
}

.ab-cal-day.ab-occupe {
    background: var(--occupe);
    color: rgba(255,255,255,0.6);
    cursor: not-allowed;
    border-color: var(--occupe-light);
}

.ab-cal-day.ab-checkin {
    background: linear-gradient(135deg, var(--dispo) 40%, var(--occupe) 40%) !important;
    color: var(--brun) !important;
    border-color: var(--dispo-light) !important;
}

.ab-cal-day.ab-checkin[data-date] {
    cursor: pointer;
}

.ab-cal-day.ab-checkin[data-date]:hover {
    box-shadow: 0 2px 8px rgba(184,206,171,0.5);
}

.ab-tooltip {
    position: fixed;
    background: var(--brun);
    color: var(--fond);
    padding: 5px 12px;
    border-radius: 4px;
    font: 16px var(--font-body);
    white-space: nowrap;
    z-index: 9999;
    pointer-events: none;
    opacity: 0;
    transition: opacity 0.15s;
    transform: translateX(-50%);
}

.ab-tooltip::after {
    content: '';
    position: absolute;
    top: 100%;
    left: 50%;
    transform: translateX(-50%);
    border: 5px solid transparent;
    border-top-color: var(--brun);
}

.ab-tooltip.ab-tooltip-visible {
    opacity: 1;
}

.ab-cal-day.ab-occupe:hover {
    transform: none;
}

.ab-cal-day.ab-ferme {
    background: white;
    color: #C0B8AE;
    border-color: #DDD6C8;
    cursor: not-allowed;
}

.ab-cal-day.ab-ferme:hover {
    transform: none;
}

.ab-cal-day.ab-selected {
    background: var(--select) !important;
    color: var(--brun) !important;
    border-color: #E8C064 !important;
    font-weight: 700;
    box-shadow: 0 2px 10px rgba(217,169,90,0.5);
}

.ab-cal-day.ab-today::after {
    content: '';
    position: absolute;
    bottom: 3px;
    left: 50%;
    transform: translateX(-50%);
    width: 4px;
    height: 4px;
    border-radius: 50%;
    background: var(--noir);
    opacity: 0.5;
}

.ab-cal-day.ab-range {
    background: rgba(184,206,171,0.35) !important;
    border-color: var(--dispo) !important;
    color: var(--brun) !important;
}

.ab-legend {
    display: flex;
    gap: 12px;
    margin-top: 12px;
    flex-wrap: wrap;
}

.ab-legend-item {
    display: flex;
    align-items: center;
    gap: 6px;
    font-family: var(--font-body);
    font-size: 12px;
    color: var(--noir);
    opacity: 0.75;
}

.ab-legend-dot {
    width: 13px;
    height: 13px;
    border-radius: 50%;
    flex-shrink: 0;
    border: 1px solid rgba(0,0,0,0.1);
}

/* ── Right panel: booking ──────────────────────────────────────────── */
.ab-booking-panel {
    background: #FAF9F4;
    border-radius: 12px;
    box-shadow: 0 6px 24px rgba(0,0,0,0.15);
    padding: 20px 16px;
    display: flex;
    flex-direction: column;
}

.ab-panel-title {
    font-family: var(--font-h);
    color: var(--noir);
    font-size: 17px;
    margin-bottom: 12px;
    padding-bottom: 12px;
    border-bottom: 1px solid rgba(59,107,74,0.3);
}

.ab-selected-heberg {
    background: rgba(59,107,74,0.12);
    border: 1px solid rgba(59,107,74,0.25);
    border-radius: 8px;
    padding: 8px 12px;
    margin-bottom: 12px;
    font-family: var(--font-body);
    font-size: 16px;
    color: var(--noir);
}

.ab-selected-heberg span {
    opacity: 0.6;
    font-size: 13px;
    display: block;
    margin-bottom: 2px;
}

.ab-dates-display {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 8px;
    margin-bottom: 12px;
}

.ab-date-box {
    background: rgba(255,255,255,0.1);
    border: 1px solid rgba(0,0,0,0.12);
    border-radius: 8px;
    padding: 8px 12px;
}

.ab-date-box-label {
    font-family: var(--font-body);
    font-size: 14px;
    color: var(--primary);
    margin-bottom: 4px;
    font-weight: 600;
}

.ab-date-box-value {
    font-family: var(--font-body);
    font-size: 16px;
    color: var(--noir);
}

.ab-form-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
    margin-bottom: 8px;
    background: rgba(255,255,255,0.06);
    border: 1px solid rgba(0,0,0,0.12);
    border-radius: 8px;
    padding: 8px 12px;
}

.ab-form-row-label {
    font-family: var(--font-body);
    font-size: 15px;
    color: var(--noir);
    opacity: 0.75;
    flex: 1;
    line-height: 1.2;
}

.ab-form-row-label small {
    display: block;
    font-size: 12px;
    opacity: 0.55;
    margin-top: 2px;
}

.ab-form-select-small {
    background: rgba(255,255,255,0.12);
    border: 1px solid rgba(0,0,0,0.18);
    border-radius: 6px;
    padding: 5px 8px;
    font-family: var(--font-body);
    font-size: 16px;
    color: var(--noir);
    outline: none;
    width: 80px;
    flex-shrink: 0;
    transition: border-color 0.2s;
}

.ab-form-select-small:focus {
    border-color: var(--primary);
}

.ab-form-select-small option {
    background: #F4EDE4;
    color: var(--noir);
}

.ab-divider {
    border: none;
    border-top: 1px solid rgba(0,0,0,0.12);
    margin: 12px 0;
}

.ab-price-summary {
    background: rgba(255,255,255,0.07);
    border-radius: 7px;
    border: 1px solid rgba(0,0,0,0.1);
    padding: 12px;
    margin-bottom: 12px;
}

.ab-price-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-family: var(--font-body);
    font-size: 15px;
    color: var(--noir);
    opacity: 0.72;
    margin-bottom: 4px;
}

.ab-price-row:last-child {
    margin-bottom: 0;
}

.ab-price-row-total {
    font-size: 17px;
    opacity: 1;
    padding-top: 8px;
    border-top: 1px solid rgba(0,0,0,0.1);
}

.ab-price-row span:last-child {
    font-weight: 600;
}

.ab-btn-reserver {
    width: 100%;
    background: #C09060;
    border: none;
    border-radius: 8px;
    padding: 12px;
    font-family: var(--font-h);
    font-size: 16px;
    color: #FAF6F0;
    cursor: pointer;
    transition: background 0.2s, transform 0.1s;
    letter-spacing: 0.5px;
}

.ab-btn-reserver:hover:not(:disabled) {
    background: #D0A070;
    transform: translateY(-1px);
}

.ab-btn-reserver:active:not(:disabled) {
    transform: translateY(0);
}

.ab-btn-reserver:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

.ab-panel-note {
    font-family: var(--font-body);
    font-size: 13px;
    color: var(--noir);
    opacity: 0.5;
    text-align: center;
    margin-top: 8px;
    line-height: 1.6;
}

.ab-panel-note a {
    color: var(--primary);
    opacity: 1;
    text-decoration: underline;
    cursor: pointer;
    font-size: 14px;
}

/* ── Footer band ───────────────────────────────────────────────────── */
.ab-footer-band {
    background: transparent;
    padding: 12px 24px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
}

.ab-footer-info {
    font-family: var(--font-body);
    font-size: 13px;
    color: var(--noir);
    opacity: 0.75;
}

.ab-footer-info strong {
    color: var(--noir);
    font-weight: 700;
    opacity: 1;
}

/* ── Modal ─────────────────────────────────────────────────────────── */
.ab-modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 99999;
    display: flex;
    align-items: center;
    justify-content: center;
}

.ab-modal-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0,0,0,0.6);
}

.ab-modal-content {
    position: relative;
    background: var(--fond);
    border-radius: 16px;
    padding: 24px;
    width: 90%;
    max-width: 480px;
    max-height: 90vh;
    overflow-y: auto;
    border: 2px solid var(--primary);
}

.ab-modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 16px;
    padding-bottom: 12px;
    border-bottom: 1px solid rgba(59,107,74,0.3);
}

.ab-modal-header h3 {
    font-family: var(--font-h);
    font-size: 16px;
    color: var(--noir);
}

.ab-modal-close-btn {
    background: none;
    border: none;
    font-size: 24px;
    cursor: pointer;
    color: var(--noir);
    opacity: 0.6;
    transition: opacity 0.15s;
}

.ab-modal-close-btn:hover {
    opacity: 1;
}

.ab-modal-summary {
    background: rgba(59,107,74,0.08);
    border: 1px solid rgba(59,107,74,0.2);
    border-radius: 7px;
    padding: 12px;
    margin-bottom: 16px;
    font-family: var(--font-body);
    font-size: 13px;
    color: var(--noir);
    line-height: 1.6;
}

.ab-form-group {
    margin-bottom: 12px;
}

.ab-form-label {
    display: block;
    font-family: var(--font-body);
    font-size: 12px;
    color: var(--noir);
    opacity: 0.65;
    margin-bottom: 4px;
}

.ab-form-input {
    width: 100%;
    background: rgba(255,255,255,0.1);
    border: 1px solid rgba(0,0,0,0.18);
    border-radius: 7px;
    padding: 8px 12px;
    font-family: var(--font-body);
    font-size: 14px;
    color: var(--noir);
    outline: none;
    transition: border-color 0.2s;
}

.ab-form-input:focus {
    border-color: var(--primary);
}

.ab-form-error {
    color: #d32f2f;
    background: rgba(211,47,47,0.1);
    padding: 12px;
    border-radius: 8px;
    margin-bottom: 12px;
    font-family: var(--font-body);
    font-size: 13px;
}

.ab-btn-cancel {
    width: 100%;
    background: transparent;
    border: 1px solid rgba(0,0,0,0.18);
    border-radius: 8px;
    padding: 12px;
    font-family: var(--font-body);
    font-size: 14px;
    color: var(--noir);
    cursor: pointer;
    margin-top: 8px;
    transition: background 0.15s;
}

.ab-btn-cancel:hover {
    background: rgba(255,255,255,0.1);
}

/* ── Confirmation / Payment Failed Pages ──────────────────────────── */
.ab-confirmation-page {
    max-width: 780px;
    margin: 0 auto;
    padding: 2.5rem 2rem;
    font-family: var(--font-body);
    color: var(--noir);
    font-size: 17px;
    line-height: 1.7;
}

.ab-conf-header {
    margin-bottom: 2rem;
}

.ab-conf-header h1 {
    font-family: var(--font-h);
    color: var(--primary);
    font-size: 2.4rem;
    margin: 0 0 0.5rem;
}

.ab-conf-badge {
    display: inline-block;
    font-family: var(--font-h);
    font-size: 0.85rem;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: var(--dispo);
    border-bottom: 2px solid var(--dispo);
    padding-bottom: 2px;
}

.ab-badge-failed {
    color: var(--occupe);
    border-bottom-color: var(--occupe);
}

.ab-conf-body p {
    margin: 0.3rem 0;
}

.ab-conf-section {
    margin-top: 1.8rem;
}

.ab-conf-section h3 {
    font-family: var(--font-h);
    font-size: 1.15rem;
    color: var(--brun);
    margin: 0 0 0.4rem;
}

.ab-conf-section ul {
    padding-left: 1.4rem;
    margin: 0.3rem 0;
}

.ab-conf-section ul li {
    margin-bottom: 0.2rem;
}

.ab-conf-section a {
    color: var(--primary);
    text-decoration: underline;
}

.ab-conf-closing {
    margin-top: 2.2rem;
}

.ab-payment-failed .ab-conf-header h1 {
    color: var(--occupe);
}

/* ── Responsive ────────────────────────────────────────────────────── */
@media (max-width: 900px) {
    .ab-main-layout {
        flex-direction: column;
    }

    .ab-heberg-col,
    .ab-booking-panel {
        width: 100%;
    }

    .ab-heberg-col {
        padding: 12px 0;
    }

    #ab-heberg-list {
        display: flex;
        flex-wrap: wrap;
        gap: 0;
    }

    .ab-heberg-item {
        flex: 1 1 45%;
        min-width: 140px;
    }
}

@media (max-width: 600px) {
    .ab-hero-band h1 {
        font-size: 20px;
    }

    .ab-footer-band {
        flex-direction: column;
        text-align: center;
    }

    .ab-dates-display {
        grid-template-columns: 1fr;
    }
}
