/* ============================================================
   Site public — Responsive (mobile-first)
   ============================================================ */

:root {
    --bleu:         #3558A2;
    --bleu-clair:   #869ECE;
    --bleu-pale:    rgba(53,88,162,.08);
    --bleu-pale2:   rgba(53,88,162,.15);
    --menthe:       #21AB88;
    --danger:       #D93B2E;
    --warning:      #E5910A;
    --bg:           #F0F2F7;
    --bg-panel:     #FFFFFF;
    --border:       #DDE2EE;
    --border-strong:#B8C3DC;
    --text-primary: #0D1B3E;
    --text-secondary:#4A5577;
    --text-muted:   #8892AA;
    --radius:       12px;
    --radius-sm:    7px;
    --font:         Arial,'Helvetica Neue',Helvetica,sans-serif;
}

*,*::before,*::after { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
    margin: 0; padding: 0;
    background: var(--bg);
    color: var(--text-primary);
    font-family: var(--font);
    font-size: 15px;
    line-height: 1.6;
    -webkit-font-smoothing: antialiased;
}
h1,h2,h3 { font-weight: 700; margin: 0 0 8px; }
a { color: var(--bleu); text-decoration: none; }
a:hover { text-decoration: underline; }
img { max-width: 100%; }

/* ── Header ───────────────────────────────────────────────────── */
.site-header {
    background: #fff;
    border-bottom: 3px solid var(--bleu);
    position: sticky;
    top: 0;
    z-index: 100;
    box-shadow: 0 2px 12px rgba(53,88,162,.08);
}
.site-header .inner {
    max-width: 900px;
    margin: 0 auto;
    padding: 12px 16px;
    display: flex;
    align-items: center;
    gap: 14px;
}
.site-header img.logo   { height: 48px; width: auto; display: block; flex-shrink: 0; }
.site-header-text       { line-height: 1.3; }
.site-header-text .title    { font-weight: 700; font-size: 15px; color: var(--bleu); }
.site-header-text .subtitle { font-size: 12px; color: var(--text-muted); }

/* ── Hero ─────────────────────────────────────────────────────── */
.hero {
    background: linear-gradient(135deg, var(--bleu) 0%, #2340a0 100%);
    color: #fff;
    text-align: center;
    padding: 36px 16px 30px;
}
.hero h1  { font-size: clamp(20px,5vw,30px); margin-bottom: 10px; font-weight: 700; }
.hero p   { opacity: .88; font-size: 14px; max-width: 540px; margin: 0 auto; }

/* ── Main wrapper ─────────────────────────────────────────────── */
.page-wrapper {
    max-width: 820px;
    margin: 0 auto;
    padding: 20px 14px 40px;
}

/* ── Cards ────────────────────────────────────────────────────── */
.card {
    background: var(--bg-panel);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 20px 18px;
    margin-bottom: 18px;
    box-shadow: 0 1px 8px rgba(53,88,162,.06);
}
.card-title    { font-size: 18px; font-weight: 700; color: var(--bleu); margin-bottom: 4px; }
.card-subtitle { color: var(--text-muted); font-size: 13.5px; margin-bottom: 18px; }

/* ── Choice grid ──────────────────────────────────────────────── */
.choice-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(min(100%,200px), 1fr));
    gap: 12px;
}
.choice-card {
    display: block;
    padding: 16px 18px;
    background: var(--bg-panel);
    border: 2px solid var(--border-strong);
    border-radius: var(--radius);
    text-decoration: none;
    color: var(--text-primary);
    transition: border-color .15s, background .15s, transform .1s;
    cursor: pointer;
}
.choice-card:hover, .choice-card:focus {
    border-color: var(--bleu);
    background: var(--bleu-pale2);
    transform: translateY(-2px);
    text-decoration: none;
}
.choice-card h3 { font-size: 15px; color: var(--bleu); margin: 0 0 4px; }
.choice-card p  { font-size: 12.5px; color: var(--text-muted); margin: 0; }

/* ── Steps bar ────────────────────────────────────────────────── */
.steps-bar {
    display: flex;
    justify-content: center;
    gap: 10px;
    margin-bottom: 20px;
}
.step-dot {
    width: 10px; height: 10px;
    border-radius: 50%;
    background: var(--border-strong);
    transition: background .2s;
}
.step-dot.done   { background: var(--menthe); }
.step-dot.active { background: var(--bleu); transform: scale(1.3); }

/* ── Date picker ──────────────────────────────────────────────── */
.date-picker-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(80px,1fr));
    gap: 8px;
}
.date-option {
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 12px 8px;
    border: 2px solid var(--border-strong);
    border-radius: var(--radius-sm);
    text-decoration: none;
    color: var(--text-primary);
    transition: border-color .15s, background .15s;
    text-align: center;
}
.date-option:hover { border-color: var(--bleu); background: var(--bleu-pale2); text-decoration: none; }
.date-option .jour-nom  { font-size: 11px; font-weight: 700; color: var(--text-muted); text-transform: uppercase; }
.date-option .jour-num  { font-size: 17px; font-weight: 700; color: var(--bleu); margin: 2px 0; }

/* ── Créneau grid ─────────────────────────────────────────────── */
.creneau-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(100px,1fr));
    gap: 8px;
}
.creneau-option {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 12px 8px;
    border: 2px solid var(--border-strong);
    border-radius: var(--radius-sm);
    text-decoration: none;
    color: var(--bleu);
    font-weight: 700;
    font-size: 15px;
    transition: border-color .15s, background .15s;
    text-align: center;
    cursor: pointer;
    background: var(--bg-panel);
}
.creneau-option:hover { border-color: var(--bleu); background: var(--bleu-pale2); text-decoration: none; }

/* ── Forms ────────────────────────────────────────────────────── */
label {
    display: block;
    font-size: 12.5px;
    font-weight: 700;
    color: var(--text-secondary);
    margin-bottom: 5px;
}
input[type="text"],input[type="email"],input[type="date"],
input[type="tel"],input[type="password"],select,textarea {
    width: 100%;
    background: #F7F8FA;
    border: 1.5px solid var(--border-strong);
    border-radius: var(--radius-sm);
    padding: 11px 12px;
    color: var(--text-primary);
    font-family: var(--font);
    font-size: 14px;
    margin-bottom: 14px;
    transition: border-color .15s, box-shadow .15s;
    -webkit-appearance: none;
}
input:focus,select:focus,textarea:focus {
    outline: none;
    border-color: var(--bleu);
    box-shadow: 0 0 0 3px rgba(53,88,162,.12);
}
.form-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 14px;
}
.form-note { font-size: 11.5px; color: var(--text-muted); margin: -10px 0 12px; }
.required-star { color: var(--danger); margin-left: 2px; }

/* ── Buttons ──────────────────────────────────────────────────── */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 7px;
    padding: 11px 20px;
    border-radius: var(--radius-sm);
    border: 1.5px solid transparent;
    font-family: var(--font);
    font-size: 14px;
    font-weight: 700;
    cursor: pointer;
    transition: background .15s, border-color .15s;
    text-decoration: none;
    white-space: nowrap;
}
.btn-primary   { background: var(--bleu); color: #fff; border-color: var(--bleu); }
.btn-primary:hover { background: #2a4585; color: #fff; text-decoration: none; }
.btn-secondary { background: var(--bg-panel); color: var(--bleu); border-color: var(--bleu-clair); }
.btn-secondary:hover { background: var(--bleu-pale2); text-decoration: none; }
.btn-sm        { padding: 7px 13px; font-size: 12.5px; }
.btn-block     { width: 100%; }

/* ── Alerts ───────────────────────────────────────────────────── */
.alert {
    padding: 12px 14px;
    border-radius: var(--radius-sm);
    font-size: 13.5px;
    margin-bottom: 14px;
    border-left: 4px solid transparent;
}
.alert-success { background: rgba(33,171,136,.1); color: #166c57; border-color: var(--menthe); }
.alert-danger  { background: rgba(217,59,46,.09); color: var(--danger); border-color: var(--danger); }
.alert-info    { background: var(--bleu-pale2); color: var(--bleu); border-color: var(--bleu); }

/* ── Confirmation ─────────────────────────────────────────────── */
.confirmation-box { text-align: center; padding: 16px 0; }
.confirmation-icon {
    width: 64px; height: 64px; border-radius: 50%;
    background: rgba(33,171,136,.12);
    color: var(--menthe);
    font-size: 28px; font-weight: 700;
    display: flex; align-items: center; justify-content: center;
    margin: 0 auto 16px;
}
.reference-box {
    background: var(--bleu-pale2);
    border: 2px solid var(--bleu-clair);
    border-radius: var(--radius-sm);
    padding: 12px 18px;
    font-family: monospace;
    font-size: 18px;
    font-weight: 700;
    color: var(--bleu);
    letter-spacing: .04em;
    display: inline-block;
    margin: 8px 0;
    word-break: break-all;
}
.detail-row {
    display: flex;
    gap: 12px;
    padding: 9px 0;
    border-bottom: 1px solid var(--border);
    font-size: 13.5px;
    flex-wrap: wrap;
}
.detail-row:last-child { border-bottom: none; }
.detail-row .label { font-weight: 700; color: var(--text-muted); min-width: 80px; }

/* ── Footer ───────────────────────────────────────────────────── */
.site-footer {
    text-align: center;
    padding: 20px 14px;
    color: var(--text-muted);
    font-size: 12px;
    border-top: 1px solid var(--border);
    margin-top: 20px;
}

/* ═══════════════════════════════════════════════════════════════
   RESPONSIVE — Mobile (max 640px)
   ═══════════════════════════════════════════════════════════════ */
@media (max-width: 640px) {

    /* Header compact */
    .site-header img.logo     { height: 36px; }
    .site-header-text .title  { font-size: 13px; }
    .site-header-text .subtitle { display: none; }

    /* Hero plus compact */
    .hero { padding: 24px 14px 20px; }
    .hero h1 { font-size: 19px; }

    /* Page wrapper plein écran */
    .page-wrapper { padding: 14px 10px 30px; }

    /* Cards padding réduit */
    .card { padding: 14px 12px; }
    .card-title { font-size: 16px; }

    /* Choice grid 1 colonne */
    .choice-grid { grid-template-columns: 1fr; }

    /* Form row → 1 colonne */
    .form-row { grid-template-columns: 1fr; gap: 0; }

    /* Date picker plus compact */
    .date-picker-grid {
        grid-template-columns: repeat(auto-fill, minmax(70px,1fr));
        gap: 6px;
    }
    .date-option .jour-num { font-size: 14px; }

    /* Créneaux 2 colonnes min */
    .creneau-grid { grid-template-columns: repeat(auto-fill, minmax(85px,1fr)); }

    /* Boutons pleine largeur sur mobile */
    .btn-primary, .btn-secondary {
        width: 100%;
        justify-content: center;
        margin-bottom: 8px;
    }

    /* Reference box police plus petite */
    .reference-box { font-size: 14px; padding: 10px 12px; }

    /* Confirmation centré */
    .confirmation-box { padding: 8px 0; }
    .confirmation-icon { width: 52px; height: 52px; font-size: 22px; }

    /* Detail rows stacked */
    .detail-row { flex-direction: column; gap: 2px; }
    .detail-row .label { min-width: auto; }

    /* Steps bar plus grande */
    .step-dot { width: 8px; height: 8px; }
}

@media (max-width: 380px) {
    .site-header img.logo { height: 30px; }
    .hero h1 { font-size: 17px; }
    .card-title { font-size: 15px; }
}
