/* ── Variables ── */
.resto-form-wrap {
    --resto-primary: #2271b1;
    --resto-bg: #f9f3ec;
    --resto-radius: 12px;
    --resto-step-gap: 2px;

    max-width: 560px;
    margin: 0 auto;
    font-family: inherit;
}

/* ── Step ── */
.resto-step {
    background: var(--resto-bg);
    border-radius: var(--resto-radius);
    margin-bottom: var(--resto-step-gap);
    overflow: hidden;
    transition: opacity 0.2s;
}

.resto-cal-day.is-no-resa {
    border: 1px dashed var(--resto-primary);
    opacity: 0.85;
}
.resto-step.resto-step-disabled {
    opacity: 0.5;
    pointer-events: none;
}

.resto-step-header {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 18px 20px;
    font-size: 1rem;
    font-weight: 500;
}

.resto-step-trigger {
    cursor: pointer;
}

.resto-step-icon {
    font-size: 1.1rem;
    flex-shrink: 0;
}

.resto-step-value {
    flex: 1;
    font-size: 1.8rem;
}

.resto-step-arrow {
    font-size: 1.7rem;
    color: #666;
    transition: transform 0.2s;
}

.resto-step.is-open .resto-step-arrow {
    transform: rotate(180deg);
}

.resto-step-body {
    display: none;
    padding: 0 16px 16px;
}

.resto-step.is-open .resto-step-body {
    display: block;
}

/* ── Grille personnes ── */
.resto-personnes-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 8px;
}

.resto-nb-btn {
    padding: 14px 8px;
    border: 2px solid transparent;
    border-radius: 8px;
    background: #fff;
    font-size: 1.6rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.15s;
    text-align: center;
}

.resto-nb-btn:hover {
    border-color: var(--resto-primary);
}

.resto-nb-btn.is-selected {
    background: var(--resto-primary);
    color: #fff;
    border-color: var(--resto-primary);
}

.resto-nb-more {
    grid-column: 1 / -1;
    font-size: 1.8rem;
    background: #f0f0f0;
    font-weight: 400;
    cursor: default;
    opacity: 0.7;
}

/* ── Calendrier ── */
.resto-calendar {
    background: #fff;
    border-radius: 8px;
    padding: 12px;
}

.resto-cal-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 12px;
}

.resto-cal-nav {
    background: none;
    border: none;
    font-size: 3.2rem;
    cursor: pointer;
    padding: 4px 8px;
    color: var(--resto-primary);
}

.resto-cal-title {
    font-weight: 600;
    font-size: 0.95rem;
    text-transform: capitalize;
}

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

.resto-cal-day-label {
    text-align: center;
    font-size: 1.3rem;
    color: #999;
    padding: 4px 0;
    font-weight: 600;
}

.resto-cal-day {
    aspect-ratio: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    font-size: 1.4rem;
    cursor: pointer;
    border: 2px solid transparent;
    transition: all 0.15s;
}

.resto-cal-day.is-open {
    font-weight: 600;
    border-color: var(--resto-primary);
    color: var(--resto-primary);
}

.resto-cal-day.is-open:hover {
    background: var(--resto-primary);
    color: #fff;
}

.resto-cal-day.is-selected {
    background: var(--resto-primary);
    color: #fff;
    border-color: var(--resto-primary);
}

.resto-cal-day.is-closed,
.resto-cal-day.is-past,
.resto-cal-day.is-empty {
    color: #ccc;
    cursor: default;
    pointer-events: none;
}

.resto-cal-day.is-today {
    font-weight: 700;
}

/* ── Horaires ── */
.resto-horaire-btn {
    display: flex;
    align-items: center;
    gap: 10px;
    width: 100%;
    padding: 14px 16px;
    border: 1px solid #e0e0e0;
    border-radius: 8px;
    background: #fff;
    margin-bottom: 6px;
    cursor: pointer;
    font-size: 0.95rem;
    transition: all 0.15s;
    text-align: left;
}

.resto-horaire-btn:hover:not(:disabled) {
    border-color: var(--resto-primary);
}

.resto-horaire-btn.is-selected {
    border-color: var(--resto-primary);
    background: var(--resto-primary);
    color: #fff;
}

.resto-horaire-btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
    background: #f5f5f5;
}

.resto-horaire-dot {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    background: #46b450;
    flex-shrink: 0;
}

.resto-horaire-btn span {
    font-size: 1.8rem;
}

.resto-horaire-btn:disabled .resto-horaire-dot {
    background: #ccc;
}

.resto-horaire-btn.is-selected .resto-horaire-dot {
    background: rgba(255, 255, 255, 0.7);
}

/* ── Placement ── */
.resto-placement-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 8px;
}

.resto-placement-btn {
    padding: 14px 8px;
    border: 2px solid #e0e0e0;
    border-radius: 8px;
    background: #fff;
    font-size: 1.85rem;
    cursor: pointer;
    transition: all 0.15s;
    text-align: center;
}

.resto-placement-btn:hover:not(:disabled) {
    border-color: var(--resto-primary);
}

.resto-placement-btn.is-selected {
    background: var(--resto-primary);
    color: #fff;
    border-color: var(--resto-primary);
}

.resto-placement-btn:disabled {
    opacity: 0.4;
    cursor: not-allowed;
    text-decoration: line-through;
}

/* ── Coordonnées ── */
.resto-coords-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 12px;
}

.resto-coords-grid label {
    display: flex;
    flex-direction: column;
    gap: 4px;
    font-size: 1.85rem;
    font-weight: 600;
}

.resto-coords-grid label input,
.resto-coords-grid label textarea {
    font-weight: 400;
    padding: 10px 12px;
    border: 1px solid #e0e0e0;
    border-radius: 6px;
    font-size: 1.5rem;
    width: 100%;
    box-sizing: border-box;
}

.resto-coords-grid label input:focus,
.resto-coords-grid label textarea:focus {
    border-color: var(--resto-primary);
    outline: none;
}

.resto-full {
    grid-column: 1 / -1;
}

/* ── Submit ── */
.resto-submit-btn {
    width: 100%;
    padding: 18px;
    background: var(--resto-primary);
    color: #fff;
    border: none;
    border-radius: var(--resto-radius);
    font-size: 1.1rem;
    font-weight: 600;
    cursor: pointer;
    margin-top: 8px;
    transition: opacity 0.15s;
}

.resto-submit-btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

/* ── Messages ── */
.resto-form-message {
    padding: 14px 16px;
    border-radius: 8px;
    margin-bottom: 8px;
    font-size: 1.6rem;
}

.resto-form-success {
    background: #f0faf0;
    border: 1px solid #46b450;
    color: #2a7a2a;
}

.resto-form-error {
    background: #fdf0f0;
    border: 1px solid #d63638;
    color: #d63638;
}

/* ── Mobile ── */
@media (max-width: 480px) {
    .resto-personnes-grid {
        grid-template-columns: repeat(3, 1fr);
    }

    .resto-placement-grid {
        grid-template-columns: 1fr;
    }

    .resto-coords-grid {
        grid-template-columns: 1fr;
    }
}

.wp-block-columns:not(.is-not-stacked-on-mobile)>.wp-block-column {
    flex-basis: 0;
    flex-grow: 1;
    gap: 2em;
    display: flex;
    flex-direction: column;
}