/* Styles spécifiques aux pages RDV — le reset/navbar/footer/tokens
   viennent de home/static/home/css/style.css */

/* ── Layout ──────────────────────────────────────────────── */
.rdv-container {
    max-width: 560px;
    margin: 0 auto;
    padding: 7.5rem 1.2rem 5.5rem;
}

/* ── Page header ─────────────────────────────────────────── */
.rdv-header { margin-bottom: 2.2rem; }
.rdv-header h1 {
    font-family: var(--serif); font-weight: 600;
    font-size: clamp(1.7rem, 4vw, 2.3rem); letter-spacing: -0.01em;
    color: var(--ink);
    margin-bottom: .5rem;
}
.rdv-header p { color: var(--ink-soft); font-size: .98rem; }

/* ── Slot list ───────────────────────────────────────────── */
.days { display: flex; flex-direction: column; gap: 1rem; }
.day {
    background: var(--surface);
    border: 1px solid var(--line);
    border-radius: var(--radius);
    overflow: hidden;
}
.day-header {
    display: flex; align-items: baseline; gap: .6rem;
    padding: .9rem 1.1rem .6rem;
    border-bottom: 1px solid var(--line);
}
.day-name { font-weight: 700; text-transform: capitalize; font-size: .92rem; color: var(--ink); }
.day-date { color: var(--muted); text-transform: capitalize; font-size: .8rem; }
.slots {
    display: grid; grid-template-columns: repeat(3, 1fr);
    gap: .5rem; padding: .8rem .9rem .9rem;
}
.slot {
    display: flex; align-items: center; justify-content: center;
    min-height: 46px; padding: .5rem;
    border: 1px solid var(--line);
    border-radius: var(--radius);
    background: var(--paper);
    color: var(--ink);
    font-weight: 600; font-size: .9rem;
    font-variant-numeric: tabular-nums;
    transition: border-color .15s, background .15s, color .15s;
}
.slot:hover {
    border-color: var(--accent);
    background: var(--accent-soft);
    color: var(--accent);
    text-decoration: none;
}

.empty {
    text-align: center; color: var(--ink-soft);
    padding: 3rem 1.5rem;
    background: var(--surface);
    border: 1px dashed var(--line);
    border-radius: var(--radius);
    font-size: .95rem;
}
.empty a { color: var(--accent); }

/* ── Card ────────────────────────────────────────────────── */
.rdv-card {
    background: var(--surface);
    border: 1px solid var(--line);
    border-radius: var(--radius);
    padding: 2rem 1.6rem;
}
.rdv-card h1 {
    font-family: var(--serif); font-weight: 600;
    margin: .5rem 0 1.3rem;
    font-size: 1.55rem; letter-spacing: -0.01em;
    color: var(--ink);
}
.back {
    display: inline-flex; align-items: center; gap: .3rem;
    font-size: .84rem; color: var(--muted);
    padding: .2rem 0; margin-bottom: .3rem;
    transition: color .2s;
}
.back:hover { color: var(--accent); text-decoration: none; }

.slot-recap {
    font-size: 1rem; color: var(--ink);
    background: var(--accent-soft);
    border: 1px solid var(--accent-line);
    border-radius: var(--radius);
    padding: .9rem 1.1rem;
    text-transform: capitalize;
    margin-bottom: .6rem;
}

/* ── Form ────────────────────────────────────────────────── */
.rdv-form { margin-top: 1.3rem; display: flex; flex-direction: column; gap: 1.1rem; }
.field { display: flex; flex-direction: column; gap: .45rem; }
.field label {
    font-weight: 700; font-size: .76rem;
    color: var(--muted); text-transform: uppercase; letter-spacing: .06em;
}
.field input, .field textarea {
    font: inherit; font-size: .98rem;
    width: 100%; padding: .8rem 1rem;
    border: 1px solid var(--line);
    border-radius: var(--radius);
    background: var(--paper);
    color: var(--ink);
    -webkit-appearance: none;
    transition: border-color .2s, box-shadow .2s;
}
.field input::placeholder, .field textarea::placeholder { color: var(--muted); }
.field input:focus, .field textarea:focus {
    outline: none;
    border-color: var(--accent);
    box-shadow: 0 0 0 3px var(--accent-soft);
}
.field textarea { resize: vertical; min-height: 90px; }
.field-error input, .field-error textarea { border-color: var(--error); }

/* ── Segmented control (RadioSelect) ── */
#id_type_rdv { display: flex; }
#id_type_rdv > div { flex: 1; }
#id_type_rdv input[type=radio] { position: absolute; opacity: 0; pointer-events: none; }
#id_type_rdv label {
    display: flex; align-items: center; justify-content: center;
    padding: .75rem .5rem; min-height: 48px;
    border: 1px solid var(--line);
    background: var(--paper); color: var(--ink-soft);
    font-weight: 600; font-size: .88rem;
    cursor: pointer; text-align: center;
    transition: background .15s, border-color .15s, color .15s;
}
#id_type_rdv > div:first-child label { border-radius: var(--radius) 0 0 var(--radius); }
#id_type_rdv > div:last-child label { border-radius: 0 var(--radius) var(--radius) 0; margin-left: -1px; }
#id_type_rdv > div:has(input:checked) label {
    background: var(--ink); color: var(--paper);
    border-color: var(--ink); position: relative; z-index: 1; font-weight: 700;
}
.rdv-error { color: var(--error); font-size: .8rem; margin: 0; }

/* ── Bouton ──────────────────────────────────────────────── */
.rdv-btn {
    display: block; width: 100%;
    background: var(--ink); color: var(--paper);
    border: 1px solid var(--ink); padding: .95rem 1.5rem;
    border-radius: var(--radius);
    font-weight: 600; cursor: pointer;
    font-size: .98rem; text-align: center;
    text-decoration: none;
    transition: background .2s;
    margin-top: .5rem;
}
.rdv-btn:hover { background: var(--ink-soft); color: var(--paper); }

/* ── Confirmation ────────────────────────────────────────── */
.rdv-success { text-align: center; padding: .5rem .5rem 1rem; }
.rdv-success .check {
    width: 62px; height: 62px; border-radius: 50%;
    background: var(--success); color: var(--surface);
    display: flex; align-items: center; justify-content: center;
    font-size: 30px; font-weight: bold;
    margin: 0 auto 1.3rem;
    box-shadow: 0 0 0 7px var(--success-bg);
}
.rdv-success h1 { margin: 0 0 1rem; font-size: 1.5rem; }
.rdv-success .slot-recap { text-align: left; margin-bottom: 1rem; }
.recap-list {
    list-style: none;
    background: var(--paper); border: 1px solid var(--line);
    border-radius: var(--radius); overflow: hidden;
    margin: 0 0 1rem;
}
.recap-list li {
    display: flex; align-items: baseline; gap: .8rem;
    padding: .7rem 1rem; font-size: .9rem;
    border-bottom: 1px solid var(--line);
}
.recap-list li:last-child { border-bottom: none; }
.recap-label { font-weight: 700; font-size: .74rem; color: var(--muted); flex: 0 0 65px; text-transform: uppercase; }
.success-note { color: var(--ink-soft); font-size: .85rem; margin: 0 0 .5rem; }

/* ── Détail (interne) ────────────────────────────────────── */
.detail-list {
    list-style: none; margin: 1.2rem 0 0;
    background: var(--paper); border: 1px solid var(--line);
    border-radius: var(--radius); overflow: hidden;
}
.detail-list li {
    display: flex; align-items: baseline; gap: .8rem;
    padding: .85rem 1rem;
    border-bottom: 1px solid var(--line);
    font-size: .95rem; color: var(--ink);
}
.detail-list li:last-child { border-bottom: none; }
.detail-label {
    font-weight: 700; font-size: .74rem; color: var(--muted);
    text-transform: uppercase; letter-spacing: .05em;
    flex: 0 0 80px;
}
.detail-list a { color: var(--accent); }
.detail-list a:hover { text-decoration: underline; }

/* ── Messages flash ──────────────────────────────────────── */
.rdv-messages { list-style: none; padding: 0; margin: 0 0 1rem; }
.rdv-msg { padding: .8rem 1rem; border-radius: var(--radius); margin-bottom: .5rem; font-size: .9rem; }
.rdv-msg-error { background: var(--error-bg); border: 1px solid var(--error-line); color: var(--error); }
.rdv-msg-success { background: var(--success-bg); border: 1px solid var(--success-line); color: var(--success); }

@media (max-width: 640px) {
    .rdv-container { padding: 6rem 1rem 4rem; }
    .slots { grid-template-columns: repeat(2, 1fr); }
}
