/* ===== Calendrier RDV - couleurs et disposition ===== */
:root {
    --rdv-gris: #757575;
    --rdv-vert: #43a047;
    --rdv-orange: #fb8c00;
    --rdv-rouge: #e53935;
}

#rdv-calendar-root { max-width: 900px; margin: 0 auto; font-family: inherit; }
.rdv-title-block { text-align: center; }
.rdv-title-block h1 { margin-bottom: 2px; }
.rdv-subtitle { font-size: 1.1em; color: #555; margin-bottom: 14px; }
.rdv-date-picker { padding: 6px; border: 1px solid #ccc; border-radius: 6px; font-size: 0.85em; }
#rdv-today { padding: 6px 12px; border: 1px solid #ccc; background: #fff; border-radius: 6px; cursor: pointer; font-size: 0.9em; }
.rdv-view-switch { display: flex; gap: 4px; justify-content: center; margin-bottom: 14px; }
.rdv-view-btn { padding: 6px 14px; border: 1px solid #ccc; background: #fff; border-radius: 6px; cursor: pointer; font-size: 0.9em; }
.rdv-view-btn.active { background: #4CAF50; color: #fff; border-color: #4CAF50; }

.rdv-toolbar { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-bottom: 12px; flex-wrap: wrap; }
.rdv-toolbar button#rdv-prev, .rdv-toolbar button#rdv-next {
    background: #fff; border: 1px solid #ccc; border-radius: 50%; width: 34px; height: 34px; font-size: 18px; cursor: pointer;
}
.rdv-current-label { font-weight: 600; font-size: 1.1em; flex: 1; text-align: center; min-width: 160px; }

.rdv-legend { display: flex; flex-wrap: wrap; gap: 14px; margin-bottom: 14px; font-size: 0.85em; }
.rdv-legend-item { display: flex; align-items: center; gap: 6px; }
.rdv-dot { width: 12px; height: 12px; border-radius: 50%; display: inline-block; }
.rdv-dot.rdv-ferme { background: var(--rdv-gris); }
.rdv-dot.rdv-disponible { background: var(--rdv-vert); }
.rdv-dot.rdv-attente { background: var(--rdv-orange); }
.rdv-dot.rdv-reserve { background: var(--rdv-rouge); }

.rdv-color-ferme { background: var(--rdv-gris); cursor: default; }
.rdv-color-disponible { background: var(--rdv-vert); }
.rdv-color-attente { background: var(--rdv-orange); }
.rdv-color-reserve { background: var(--rdv-rouge); }

/* Vue mois */
.rdv-month-grid { display: grid; grid-template-columns: repeat(7, 1fr); gap: 4px; }
.rdv-dow { text-align: center; font-weight: 600; font-size: 0.8em; padding: 4px 0; color: #666; }
.rdv-day { aspect-ratio: 1; display: flex; align-items: center; justify-content: center; border-radius: 6px; color: #fff; cursor: pointer; font-size: 0.9em; }
.rdv-day-empty { visibility: hidden; }
.rdv-day-disabled { opacity: 0.35; cursor: default; }

/* Vue semaine (seule vue disponible) */
.rdv-week-grid { display: grid; grid-template-columns: repeat(7, 1fr); gap: 6px; overflow-x: auto; }
.rdv-week-col { min-width: 110px; }
.rdv-week-head { text-align: center; font-size: 0.8em; font-weight: 600; margin-bottom: 4px; }
.rdv-week-lieu {
    text-align: center; font-size: 0.72em; font-weight: 700; color: #2e3b2e; background: #eef6ee;
    border-radius: 4px; padding: 3px 2px; margin-bottom: 8px; text-transform: uppercase; letter-spacing: 0.3px;
}
.rdv-week-slots { display: flex; flex-direction: column; gap: 3px; }

.rdv-slot { color: #fff; border-radius: 5px; padding: 6px 8px; font-size: 0.8em; display: flex; flex-direction: column; }
.rdv-slot.rdv-clickable { cursor: pointer; }
.rdv-slot.rdv-clickable:hover { filter: brightness(1.1); }
.rdv-slot.rdv-slot-static { cursor: default; opacity: 0.9; }
.rdv-slot-time { font-weight: 600; }
.rdv-loading { text-align: center; padding: 30px; color: #888; }

/* ===== Popups ===== */
.rdv-modal-overlay {
    position: fixed; inset: 0; background: rgba(0,0,0,0.5);
    display: flex; align-items: center; justify-content: center; z-index: 1000; padding: 16px;
}
.rdv-modal {
    background: #fff; border-radius: 10px; padding: 24px; max-width: 420px; width: 100%;
    box-shadow: 0 10px 30px rgba(0,0,0,0.25); max-height: 90vh; overflow-y: auto;
}
.rdv-modal-slot-info { font-weight: 600; margin: 8px 0 16px; }
.rdv-ville-line { font-weight: 700; text-transform: uppercase; margin: 6px 0 0; }
.rdv-modal-actions { display: flex; gap: 10px; margin-top: 18px; justify-content: flex-end; }
.rdv-modal-actions-col { flex-direction: column; }
.rdv-btn { padding: 9px 16px; border-radius: 6px; border: 1px solid #ccc; background: #fff; cursor: pointer; font-size: 0.95em; }
.rdv-btn-primary { background: #4CAF50; color: #fff; border-color: #4CAF50; }
.rdv-modal-field input, .rdv-modal-form input, .rdv-modal-form select {
    width: 100%; padding: 8px; margin-bottom: 8px; border: 1px solid #ccc; border-radius: 5px; box-sizing: border-box;
}
.rdv-modal-form { display: flex; flex-direction: column; max-height: 50vh; overflow-y: auto; }
.rdv-modal-error { color: #e53935; font-size: 0.85em; min-height: 1.2em; margin-top: 6px; }
.rdv-link { color: #2e7d32; font-size: 0.85em; text-decoration: underline; cursor: pointer; }
.rdv-hint-text { font-size: 0.85em; color: #555; background: #f3f7f3; padding: 8px 10px; border-radius: 6px; margin: 8px 0; }
.rdv-sep { border: none; border-top: 1px solid #eee; margin: 14px 0; }

.rdv-field { display: flex; flex-direction: column; margin-bottom: 8px; }
.rdv-field-label { font-size: 0.78em; color: #666; margin-bottom: 2px; }

.rdv-pw-field { position: relative; }
.rdv-pw-field input { padding-right: 34px !important; }
.rdv-pw-toggle { position: absolute; right: 4px; top: 50%; transform: translateY(-50%); background: none; border: none; cursor: pointer; font-size: 0.95em; padding: 2px 6px; }

/* ===== Responsive ===== */
@media (max-width: 600px) {
    .rdv-week-grid { grid-template-columns: repeat(3, 1fr); }
    .rdv-current-label { font-size: 1em; }
}