/**
 * @file rent-modal.css
 * Styles modals locations admin — Vélothèque Uccle.
 * Utilise uniquement les variables de variables.css
 */

/* ══ OVERLAY ════════════════════════════════════════════════════ */
.modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, .5);
  z-index: 2000;
  display: none;
  align-items: center;
  justify-content: center;
  padding: 20px;
}

.modal-overlay.open {
  display: flex;
}

/* ══ BOX ════════════════════════════════════════════════════════ */
.modal-box {
  background: var(--surface-white);
  border-radius: 18px;
  width: 100%;
  max-width: 580px;
  max-height: 90vh;
  overflow-y: auto;
  padding: 28px 28px 24px;
  position: relative;
  box-shadow: 0 20px 60px rgba(0, 0, 0, .2);
}

.modal-box.wide { max-width: 700px; }

/* ══ BOUTON FERMER ══════════════════════════════════════════════ */
.modal-close-btn {
  position: absolute;
  top: 14px;
  right: 16px;
  background: var(--color-gray-100);
  border: none;
  border-radius: 50%;
  width: 30px;
  height: 30px;
  font-size: 17px;
  cursor: pointer;
  color: var(--text-muted);
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background .15s;
}

.modal-close-btn:hover {
  background: var(--border-subtle);
}

/* ══ HEADER ═════════════════════════════════════════════════════ */
.modal-htitle {
  font-size: 18px;
  font-weight: 700;
  color: var(--brand-primary);
  margin-bottom: 4px;
}

.modal-hsub {
  font-size: 13px;
  color: var(--text-muted);
  margin-bottom: 20px;
}

.modal-loading {
  text-align: center;
  padding: 40px;
  color: var(--text-muted);
  font-size: 14px;
}

/* ══ SECTIONS ═══════════════════════════════════════════════════ */
.msec {
  margin-bottom: 18px;
}

.msec-title {
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 1px;
  text-transform: uppercase;
  color: var(--brand-primary);
  margin-bottom: 10px;
  padding-bottom: 7px;
  border-bottom: 2px solid var(--color-gray-100);
}

/* ══ LIGNES INFO ════════════════════════════════════════════════ */
.mrow {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 9px 0;
  border-bottom: 1px solid var(--border-subtle);
  font-size: 13px;
  gap: 12px;
}

.mrow:last-child { border-bottom: none; }
.mrow-lbl { color: var(--text-muted); flex-shrink: 0; }
.mrow-val { font-weight: 600; text-align: right; }

/* ══ FOOTER ═════════════════════════════════════════════════════ */
.mfooter {
  display: flex;
  gap: 10px;
  justify-content: flex-end;
  border-top: 1px solid var(--border-subtle);
  padding-top: 16px;
  margin-top: 8px;
  flex-wrap: wrap;
}

/* ══ BOUTONS MODAL ══════════════════════════════════════════════ */
.mbtn {
  padding: 9px 22px;
  border-radius: 9px;
  font-size: 13px;
  font-weight: 700;
  cursor: pointer;
  font-family: inherit;
  border: none;
  transition: all .15s;
}

.mbtn-cancel {
  background: none;
  border: 1.5px solid var(--border-subtle);
  color: var(--text-muted);
}

.mbtn-cancel:hover {
  border-color: var(--color-red-700);
  color: var(--color-red-700);
}

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

.mbtn-primary:hover { background: var(--brand-secondary); }

.mbtn-success {
  background: var(--color-green-700);
  color: var(--color-white);
}

.mbtn-success:hover { opacity: .88; }

.mbtn-danger {
  background: none;
  border: 1.5px solid var(--status-error-bg);
  color: var(--color-red-700);
  margin-right: auto;
}

.mbtn-danger:hover {
  background: var(--status-error-bg);
}

/* ══ FORMULAIRE ═════════════════════════════════════════════════ */
.mgroup {
  display: flex;
  flex-direction: column;
  gap: 5px;
}

.mlabel {
  font-size: 10px;
  font-weight: 700;
  letter-spacing: .8px;
  text-transform: uppercase;
  color: var(--text-muted);
}

.req { color: var(--color-red-700); }

.minput,
.mtextarea,
.mselect {
  padding: 9px 13px;
  border: 1.5px solid var(--border-subtle);
  border-radius: 9px;
  font-size: 13px;
  font-family: inherit;
  color: var(--text-main);
  outline: none;
  transition: border-color .15s;
  background: var(--surface-white);
  width: 100%;
  box-sizing: border-box;
}

.minput:focus,
.mtextarea:focus,
.mselect:focus {
  border-color: var(--brand-primary);
}

.mtextarea {
  resize: vertical;
  min-height: 80px;
}

.mhint {
  font-size: 11px;
  color: var(--text-muted);
  margin-top: 3px;
}

/* ══ BOUTONS CAUTION ════════════════════════════════════════════ */
.caution-options,
.statut-options {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  margin-top: 6px;
}

.caution-opt,
.statut-opt {
  padding: 7px 14px;
  border: 2px solid var(--border-subtle);
  border-radius: 9px;
  font-size: 12px;
  font-weight: 700;
  cursor: pointer;
  transition: all .15s;
  background: var(--surface-white);
  font-family: inherit;
}

.caution-opt[data-v="complet"].sel {
  background: var(--status-success-bg);
  border-color: var(--color-green-700);
  color: var(--color-green-700);
}

.caution-opt[data-v="partiel"].sel {
  background: var(--status-warning-bg);
  border-color: var(--color-orange-700);
  color: var(--color-orange-700);
}

.caution-opt[data-v="aucun"].sel {
  background: var(--status-error-bg);
  border-color: var(--color-red-700);
  color: var(--color-red-700);
}

.statut-opt[data-v="disponible"].sel {
  background: var(--status-success-bg);
  border-color: var(--color-green-700);
  color: var(--color-green-700);
}

.statut-opt[data-v="maintenance"].sel {
  background: var(--status-warning-bg);
  border-color: var(--color-orange-700);
  color: var(--color-orange-700);
}

.statut-opt[data-v="vole"].sel {
  background: var(--status-error-bg);
  border-color: var(--color-red-700);
  color: var(--color-red-700);
}

/* ══ CHECKBOX ═══════════════════════════════════════════════════ */
.mcheck-row {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  padding: 10px 12px;
  border: 1.5px solid var(--border-subtle);
  border-radius: 9px;
  cursor: pointer;
  transition: border-color .15s;
}

.mcheck-row:hover {
  border-color: var(--brand-primary);
}

.mcheck-row input[type=checkbox] {
  accent-color: var(--brand-primary);
  width: 15px;
  height: 15px;
  flex-shrink: 0;
  margin-top: 2px;
}

.mcheck-label {
  font-size: 13px;
  color: var(--text-main);
  line-height: 1.4;
}

/* ══ TIMELINE EMAILS ════════════════════════════════════════════ */
.wf-timeline {
  display: flex;
  flex-direction: column;
  position: relative;
  padding-left: 22px;
}

.wf-timeline::before {
  content: '';
  position: absolute;
  left: 7px;
  top: 10px;
  bottom: 10px;
  width: 2px;
  background: var(--border-subtle);
}

.wf-step {
  position: relative;
  padding: 10px 0 10px 12px;
}

.wf-dot {
  position: absolute;
  left: -15px;
  top: 14px;
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: var(--border-subtle);
  border: 2px solid var(--surface-white);
  box-shadow: 0 0 0 2px var(--border-subtle);
}

.wf-dot.done {
  background: var(--color-green-700);
  box-shadow: 0 0 0 2px var(--color-green-700);
}

.wf-dot.danger {
  background: var(--color-red-700);
  box-shadow: 0 0 0 2px var(--color-red-700);
}

.wf-dot.warn {
  background: var(--color-orange-700);
  box-shadow: 0 0 0 2px var(--color-orange-700);
}

.wf-label  { font-size: 12px; font-weight: 700; color: var(--text-main); }
.wf-detail { font-size: 11px; color: var(--text-muted); margin-top: 2px; }
.wf-date   { font-size: 10px; color: var(--text-muted); margin-top: 1px; }

/* ══ TOAST ══════════════════════════════════════════════════════ */
.toast {
  position: fixed;
  bottom: 28px;
  right: 28px;
  background: var(--brand-primary);
  color: var(--color-white);
  padding: 13px 20px;
  border-radius: 12px;
  font-size: 13px;
  font-weight: 600;
  z-index: 3000;
  box-shadow: 0 8px 24px rgba(0, 0, 0, .16);
  transform: translateY(70px);
  opacity: 0;
  transition: all .3s;
}

.toast.show    { transform: translateY(0); opacity: 1; }
.toast.success { background: var(--color-green-700); }
.toast.warn    { background: var(--color-orange-700); }
.toast.error   { background: var(--color-red-700); }
