/* COLONIAL CLUB – Page location V1.8.1 : calendrier à gauche, formulaire à droite */

.loc-page,
.loc-modal,
.loc-photo-grid {
    --loc-orange: #f39c1f;
    --loc-orange-dark: #c97a0a;
    --loc-ink: #141414;
    --loc-muted: #6b6b6b;
    --loc-line: #e6e2dc;
    --loc-paper: #ffffff;
    --loc-soft: #faf7f2;
    --loc-free: #eaf6ec;
    --loc-free-ink: #1f6b33;
}

.loc-layout {
    display: grid;
    grid-template-columns: minmax(0, 1.15fr) minmax(0, 1fr);
    gap: 28px;
    align-items: start;
    margin: 28px 0;
}

/* ---------- Calendrier ---------- */
.loc-calendar {
    background: var(--loc-paper);
    border: 1px solid var(--loc-line);
    border-radius: 18px;
    padding: 22px;
    box-shadow: 0 12px 30px rgba(0, 0, 0, 0.06);
    position: sticky;
    top: 120px;
}

.loc-cal-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    margin-bottom: 16px;
}

.loc-cal-head h2 {
    margin: 0;
    font-size: 1.45rem;
    color: var(--loc-ink);
}

.loc-cal-nav {
    width: 44px;
    height: 44px;
    border-radius: 10px;
    border: 1px solid var(--loc-line);
    background: var(--loc-soft);
    color: var(--loc-ink);
    font-size: 1.2rem;
    font-weight: 700;
    cursor: pointer;
}

.loc-cal-nav:hover:not(:disabled) {
    border-color: var(--loc-orange);
    color: var(--loc-orange-dark);
}

.loc-cal-nav:disabled {
    opacity: 0.35;
    cursor: default;
}

.loc-weekdays,
.loc-grid {
    display: grid;
    grid-template-columns: repeat(7, minmax(0, 1fr));
    gap: 6px;
}

.loc-weekdays span {
    text-align: center;
    font-size: 0.75rem;
    font-weight: 700;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: var(--loc-muted);
    padding-bottom: 6px;
}

.loc-calendar.is-loading .loc-grid {
    opacity: 0.45;
}

.loc-day {
    position: relative;
    aspect-ratio: 1 / 1;
    min-height: 0;
    border: 1px solid var(--loc-line);
    border-radius: 10px;
    background: var(--loc-paper);
    overflow: hidden;
    padding: 0;
    cursor: pointer;
    text-align: left;
    color: var(--loc-ink);
    font: inherit;
    transition: transform 0.12s ease, box-shadow 0.12s ease, border-color 0.12s ease;
}

.loc-day.is-blank {
    border: 0;
    background: transparent;
    cursor: default;
}

.loc-day img {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.loc-day.has-booking::after {
    content: "";
    position: absolute;
    inset: 0;
    background: linear-gradient(180deg, rgba(0, 0, 0, 0.15) 0%, rgba(0, 0, 0, 0.7) 100%);
}

.loc-day-number,
.loc-day-label {
    position: absolute;
    z-index: 1;
    left: 8px;
    right: 6px;
}

.loc-day-number {
    top: 6px;
    font-weight: 800;
    font-size: 0.95rem;
}

.loc-day-label {
    bottom: 6px;
    font-size: 0.68rem;
    font-weight: 700;
    line-height: 1.15;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.loc-day.has-booking .loc-day-number,
.loc-day.has-booking .loc-day-label {
    color: #ffffff;
}

.loc-day.is-tentative img {
    filter: grayscale(0.7);
}

.loc-day.is-free {
    background: var(--loc-free);
    border-color: #cfe7d3;
}

.loc-day.is-free .loc-day-label {
    color: var(--loc-free-ink);
}

.loc-day.is-blocked {
    background: repeating-linear-gradient(135deg, #f1efec 0 8px, #e5e1db 8px 16px);
    color: var(--loc-muted);
}

.loc-day.is-past {
    opacity: 0.45;
}

.loc-day:disabled {
    cursor: default;
}

.loc-day:not(:disabled):not(.is-blank):hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 18px rgba(0, 0, 0, 0.12);
    border-color: var(--loc-orange);
}

.loc-day.is-today .loc-day-number {
    color: var(--loc-orange-dark);
}

.loc-day.has-booking.is-today .loc-day-number {
    color: var(--loc-orange);
}

.loc-day.is-selected {
    outline: 3px solid var(--loc-orange);
    outline-offset: 1px;
}

.loc-legend {
    display: flex;
    flex-wrap: wrap;
    gap: 10px 18px;
    margin-top: 16px;
    font-size: 0.82rem;
    color: var(--loc-muted);
}

.loc-legend span {
    display: inline-flex;
    align-items: center;
    gap: 6px;
}

.loc-legend i {
    width: 14px;
    height: 14px;
    border-radius: 4px;
    display: inline-block;
    border: 1px solid var(--loc-line);
}

.loc-legend .is-free { background: var(--loc-free); }
.loc-legend .is-booked { background: linear-gradient(135deg, #3a2a1a, var(--loc-orange)); }
.loc-legend .is-option { background: #9a9a9a; }
.loc-legend .is-blocked { background: repeating-linear-gradient(135deg, #f1efec 0 4px, #d9d4cc 4px 8px); }

.loc-cal-info {
    margin-top: 14px;
    padding: 12px 14px;
    border-radius: 10px;
    background: var(--loc-soft);
    font-size: 0.92rem;
    color: var(--loc-ink);
}

.loc-cal-info.is-ok { background: var(--loc-free); color: var(--loc-free-ink); }
.loc-cal-info.is-busy { background: #fdecea; color: #9b2c1f; }

.loc-cal-error {
    grid-column: 1 / -1;
    color: #9b2c1f;
}

/* ---------- Formulaire ---------- */
.loc-form {
    background: var(--loc-paper);
    border: 1px solid var(--loc-line);
    border-radius: 18px;
    padding: 24px;
    box-shadow: 0 12px 30px rgba(0, 0, 0, 0.06);
}

.loc-form h2 {
    margin: 0 0 4px;
}

.loc-form .form-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
}

.loc-form .field-wide {
    grid-column: 1 / -1;
}

.loc-form input[readonly] {
    background: var(--loc-soft);
    color: var(--loc-muted);
}

.loc-voucher {
    border: 1px dashed var(--loc-orange);
    border-radius: 12px;
    padding: 14px;
    background: #fffaf2;
}

.loc-voucher-row {
    display: flex;
    gap: 10px;
    align-items: stretch;
}

.loc-voucher-row input {
    flex: 1 1 auto;
    min-width: 0;
}

.loc-voucher-row .button {
    flex: 0 0 auto;
    white-space: nowrap;
}

.loc-steps {
    margin: 0 0 28px;
}

/* ---------- Fenêtre de détail ---------- */
.loc-modal {
    position: fixed;
    inset: 0;
    z-index: 1000;
    background: rgba(10, 10, 10, 0.6);
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 16px;
}

.loc-modal[hidden] {
    display: none;
}

body.loc-modal-open {
    overflow: hidden;
}

.loc-modal-panel {
    position: relative;
    width: min(560px, 100%);
    max-height: calc(100vh - 32px);
    overflow-y: auto;
    background: var(--loc-paper);
    border-radius: 18px;
    padding: 24px;
    box-shadow: 0 30px 60px rgba(0, 0, 0, 0.35);
}

.loc-modal-close {
    position: absolute;
    top: 12px;
    right: 12px;
    width: 40px;
    height: 40px;
    border-radius: 10px;
    border: 1px solid var(--loc-line);
    background: var(--loc-soft);
    font-size: 1.3rem;
    cursor: pointer;
}

.loc-modal-panel h2 {
    margin: 0 48px 16px 0;
    font-size: 1.25rem;
    text-transform: capitalize;
}

.loc-modal-event {
    border: 1px solid var(--loc-line);
    border-radius: 14px;
    overflow: hidden;
    margin-bottom: 14px;
}

.loc-modal-event img {
    display: block;
    width: 100%;
    height: 170px;
    object-fit: cover;
}

.loc-modal-event.is-tentative img {
    filter: grayscale(0.7);
}

.loc-modal-event > div {
    padding: 14px 16px;
}

.loc-modal-tag {
    display: inline-block;
    font-size: 0.72rem;
    font-weight: 800;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: var(--loc-orange-dark);
}

.loc-modal-event h3 {
    margin: 4px 0 10px;
    font-size: 1.15rem;
}

.loc-modal-event dl {
    display: grid;
    grid-template-columns: auto 1fr;
    gap: 6px 14px;
    margin: 0;
}

.loc-modal-event dt {
    font-weight: 700;
    color: var(--loc-muted);
}

.loc-modal-event dd {
    margin: 0;
}

.loc-modal-actions p {
    margin: 0;
    color: var(--loc-muted);
}

/* ---------- Administration des photos ---------- */
.loc-photo-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
    gap: 18px;
}

.loc-photo-card {
    background: var(--loc-paper, #fff);
    border: 1px solid #e6e2dc;
    border-radius: 14px;
    overflow: hidden;
}

.loc-photo-card img {
    display: block;
    width: 100%;
    height: 150px;
    object-fit: cover;
}

.loc-photo-card > div {
    padding: 14px;
}

.loc-photo-card form {
    margin-top: 10px;
}

.loc-photo-card small {
    display: block;
    color: #6b6b6b;
}

/* ---------- Mobile ---------- */
@media (max-width: 980px) {
    .loc-layout {
        grid-template-columns: 1fr;
    }

    .loc-calendar {
        position: static;
    }
}

@media (max-width: 560px) {
    .loc-calendar,
    .loc-form {
        padding: 14px;
        border-radius: 14px;
    }

    .loc-weekdays,
    .loc-grid {
        gap: 3px;
    }

    .loc-day {
        border-radius: 7px;
    }

    .loc-day-number {
        top: 3px;
        left: 4px;
        font-size: 0.8rem;
    }

    .loc-day-label {
        display: none;
    }

    .loc-form .form-grid {
        grid-template-columns: 1fr;
    }

    .loc-voucher-row {
        flex-direction: column;
    }
}
