/* ── Opération Apéro — Front Client ── */

:root {
    --primary: #e67e22;
    --primary-dark: #d35400;
    --primary-light: #f39c12;
    --bg: #fefefe;
    --bg-card: #ffffff;
    --text: #2c3e50;
    --text-light: #7f8c8d;
    --border: #ecf0f1;
    --success: #27ae60;
    --danger: #e74c3c;
    --shadow: 0 2px 12px rgba(0,0,0,0.08);
    --radius: 12px;
}

* { margin: 0; padding: 0; box-sizing: border-box; }

html { -webkit-text-size-adjust: 100%; }

body {
    font-family: 'Segoe UI', -apple-system, BlinkMacSystemFont, sans-serif;
    background: var(--bg);
    color: var(--text);
    line-height: 1.6;
    overflow-x: hidden;
}

/* ── Container (mobile first) ── */
.container {
    max-width: 720px;
    margin: 0 auto;
    padding: 12px;
}

@media (min-width: 600px) {
    .container { padding: 20px; }
}

/* ── Header (mobile first) ── */

.header {
    text-align: center;
    padding: 24px 0 20px;
}

.header h1 {
    font-size: 1.5rem;
    color: var(--primary);
    margin-bottom: 8px;
}

.header p {
    color: var(--text-light);
    font-size: 0.95rem;
}

@media (min-width: 600px) {
    .header { padding: 40px 0 30px; }
    .header h1 { font-size: 2rem; }
    .header p { font-size: 1.05rem; }
}

/* ── Stepper (mobile first) ── */

.stepper {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 6px;
    margin-bottom: 24px;
}

.stepper .step {
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 6px 12px;
    border-radius: 20px;
    font-size: 0.78rem;
    font-weight: 600;
    background: var(--border);
    color: var(--text-light);
    transition: all 0.3s;
}

@media (min-width: 600px) {
    .stepper {
        flex-wrap: nowrap;
        gap: 8px;
        margin-bottom: 32px;
    }
    .stepper .step {
        padding: 8px 16px;
        font-size: 0.85rem;
    }
}

.stepper .step.active {
    background: var(--primary);
    color: white;
}

.stepper .step.done {
    background: var(--success);
    color: white;
}

.step-number {
    width: 22px;
    height: 22px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.75rem;
    background: rgba(255,255,255,0.3);
}

/* ── Cards (mobile first) ── */

.card {
    background: var(--bg-card);
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    padding: 18px;
    margin-bottom: 16px;
}

.card h2 {
    font-size: 1.15rem;
    margin-bottom: 16px;
    color: var(--text);
}

@media (min-width: 600px) {
    .card {
        padding: 28px;
        margin-bottom: 20px;
    }
    .card h2 {
        font-size: 1.25rem;
        margin-bottom: 20px;
    }
}

/* ── Calendrier ── */

.calendar-nav {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 16px;
}

.calendar-nav button {
    background: none;
    border: 2px solid var(--border);
    border-radius: 8px;
    padding: 8px 14px;
    cursor: pointer;
    font-size: 1rem;
    color: var(--text);
    transition: all 0.2s;
}

.calendar-nav button:hover {
    border-color: var(--primary);
    color: var(--primary);
}

.calendar-nav h3 {
    font-size: 1.1rem;
    text-transform: capitalize;
}

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

.calendar-grid .day-header {
    text-align: center;
    font-size: 0.75rem;
    font-weight: 700;
    color: var(--text-light);
    padding: 8px 0;
    text-transform: uppercase;
}

.calendar-grid .day {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    border-radius: 8px;
    cursor: pointer;
    font-size: 0.9rem;
    font-weight: 500;
    transition: all 0.2s;
    border: 2px solid transparent;
    position: relative;
    padding: 8px 4px;
}

.calendar-grid .day:hover:not(.disabled):not(.empty) {
    border-color: var(--primary);
    background: rgba(230, 126, 34, 0.05);
}

.calendar-grid .day.unavailable {
    background: #fde8e8;
    color: var(--danger);
    cursor: pointer;
}

.calendar-grid .day.unavailable:hover {
    border-color: var(--danger);
    background: #fbd0d0;
}

.calendar-grid .day.selected {
    background: var(--primary);
    color: white;
    border-color: var(--primary);
}

.calendar-grid .day.disabled {
    color: #ccc;
    cursor: not-allowed;
}

.calendar-grid .day.too-soon {
    color: #bbb;
    background: #f5f5f5;
    cursor: pointer;
}

.calendar-grid .day.too-soon:hover {
    border-color: var(--primary-light);
    background: #fef3e2;
}

.calendar-grid .day.empty {
    cursor: default;
}

.calendar-grid .day .dispo-dot {
    width: 6px;
    height: 6px;
    border-radius: 50%;
    margin-top: 2px;
}

.dispo-dot.full { background: var(--success); }
.dispo-dot.partial { background: var(--primary-light); }
.dispo-dot.none { background: var(--danger); }

/* ── Formulaires ── */

.form-group {
    margin-bottom: 18px;
}

.form-group label {
    display: block;
    font-weight: 600;
    margin-bottom: 6px;
    font-size: 0.9rem;
}

.form-group input,
.form-group select,
.form-group textarea {
    width: 100%;
    padding: 12px 14px;
    border: 2px solid var(--border);
    border-radius: 8px;
    font-size: 1rem;
    transition: border-color 0.2s;
    outline: none;
    font-family: inherit;
}

.form-group textarea { resize: vertical; }

.checkbox-group {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.checkbox-label {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 0.9rem;
    cursor: pointer;
}

.checkbox-label input[type="checkbox"] {
    width: 18px;
    height: 18px;
    accent-color: var(--primary);
    cursor: pointer;
}

.cgv-label {
    font-size: 0.85rem;
    color: var(--text-light);
    line-height: 1.4;
}

.cgv-label a {
    color: var(--primary);
    text-decoration: underline;
}

.form-group input:focus,
.form-group select:focus {
    border-color: var(--primary);
}

/* Form-row : 1 colonne par défaut (mobile), 2 colonnes sur desktop */
.form-row {
    display: grid;
    grid-template-columns: 1fr;
    gap: 12px;
}

@media (min-width: 600px) {
    .form-row { grid-template-columns: 1fr 1fr; }
}

/* ── Boutons ── */

.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 14px 28px;
    border: none;
    border-radius: 8px;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s;
    width: 100%;
}

.btn-primary {
    background: var(--primary);
    color: white;
}

.btn-primary:hover {
    background: var(--primary-dark);
}

.btn-primary:disabled {
    background: #bdc3c7;
    cursor: not-allowed;
}

.btn-outline {
    background: transparent;
    border: 2px solid var(--border);
    color: var(--text);
}

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

.btn-back {
    background: transparent;
    border: 2px solid var(--border);
    color: var(--text-light);
    width: auto;
    padding: 10px 20px;
    font-size: 0.9rem;
}

/* ── Récap ── */

.recap {
    background: #fef9f3;
    border: 2px solid var(--primary-light);
    border-radius: var(--radius);
    padding: 20px;
    margin-bottom: 20px;
}

.recap-row {
    display: flex;
    justify-content: space-between;
    padding: 6px 0;
    font-size: 0.95rem;
}

.recap-row.total {
    border-top: 2px solid var(--primary-light);
    margin-top: 8px;
    padding-top: 12px;
    font-size: 1.15rem;
    font-weight: 700;
    color: var(--primary-dark);
}

/* ── Confirmation ── */

.confirmation {
    text-align: center;
    padding: 40px 20px;
}

.confirmation .check-icon {
    width: 80px;
    height: 80px;
    background: var(--success);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 20px;
    font-size: 2.5rem;
    color: white;
}

.confirmation h2 {
    color: var(--success);
    margin-bottom: 12px;
}

/* ── Alerte nb personnes ── */

.info-box {
    background: #eaf6fd;
    border-left: 4px solid #3498db;
    padding: 12px 16px;
    border-radius: 0 8px 8px 0;
    margin-bottom: 16px;
    font-size: 0.9rem;
    color: #2980b9;
}

.error-box {
    background: #fde8e8;
    border-left: 4px solid var(--danger);
    padding: 12px 16px;
    border-radius: 0 8px 8px 0;
    margin-bottom: 16px;
    font-size: 0.9rem;
    color: var(--danger);
}

/* ── Loading ── */

.loading {
    text-align: center;
    padding: 40px;
    color: var(--text-light);
}

.spinner {
    width: 32px;
    height: 32px;
    border: 3px solid var(--border);
    border-top-color: var(--primary);
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
    margin: 0 auto 12px;
}

@keyframes spin { to { transform: rotate(360deg); } }

/* ── Stripe ── */

#stripe-element {
    padding: 14px;
    border: 2px solid var(--border);
    border-radius: 8px;
    margin-bottom: 16px;
}

/* ── Modal contact ── */

.modal-overlay-client {
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,0.4);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 2000;
}

.modal-client {
    background: white;
    border-radius: var(--radius);
    box-shadow: 0 8px 32px rgba(0,0,0,0.2);
    padding: 32px;
    max-width: 420px;
    width: 90%;
    text-align: center;
    position: relative;
}

.modal-close-btn {
    position: absolute;
    top: 12px;
    right: 16px;
    background: none;
    border: none;
    font-size: 1.5rem;
    cursor: pointer;
    color: var(--text-light);
}

.modal-icon {
    font-size: 3rem;
    margin-bottom: 12px;
    color: var(--danger);
}

.modal-client h3 {
    font-size: 1.2rem;
    margin-bottom: 8px;
    color: var(--text);
}

.modal-date {
    font-weight: 600;
    color: var(--primary);
    margin-bottom: 12px;
}

.modal-msg {
    color: var(--text-light);
    font-size: 0.9rem;
    margin-bottom: 20px;
    line-height: 1.5;
}

.modal-actions {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.modal-btn {
    text-decoration: none;
    text-align: center;
}

/* ── Responsive ──
   NB: cette CSS est désormais écrite en mobile-first.
   Les styles de base visent le mobile, et sont progressivement élargis
   via des media queries `min-width` (600px pour tablette/desktop). */
