/* /var/www/tools/iris/assets/style.css */
:root{
  --cook-red: #E4002B;
  --cook-burgundy: #7A0019;
  --bg: #ffffff;
  --ink: #111827;
  --muted: #6b7280;
  --card: #ffffff;
  --line: #e5e7eb;
  --shadow: 0 10px 30px rgba(0,0,0,.08);
  --radius: 18px;
}

*{box-sizing:border-box}
body{
  margin:0;
  font-family: ui-sans-serif, system-ui, -apple-system, Segoe UI, Roboto, Arial, "Apple Color Emoji","Segoe UI Emoji";
  color:var(--ink);
  background: linear-gradient(180deg, #fff 0%, #fff 55%, rgba(228,0,43,.05) 100%);
}

.topbar{
  position: sticky;
  top: 0;
  z-index: 10;
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:16px;
  padding:16px 20px;
  background: rgba(255,255,255,.85);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--line);
}

.brand{
  display:flex;
  align-items:center;
  gap:12px;
}
.logo-dot{
  width:14px;height:14px;border-radius:50%;
  background: radial-gradient(circle at 30% 30%, var(--cook-red), var(--cook-burgundy));
  box-shadow: 0 0 0 6px rgba(228,0,43,.10);
}
.brand-title{font-weight:800; letter-spacing:.2px}
.brand-subtitle{font-size:12px; color:var(--muted)}

.pill{
  font-size:12px;
  color: #4b5563;
  border:1px solid var(--line);
  padding:8px 10px;
  border-radius:999px;
  background:#fff;
}

.container{
  max-width: 1100px;
  margin: 26px auto;
  padding: 0 16px 36px;
}

.card{
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 20px;
}

h1{margin:0 0 6px; font-size:22px}
.muted{color:var(--muted); margin:0 0 18px}

.row{
  border:1px solid var(--line);
  border-radius: 16px;
  padding: 14px;
  margin: 14px 0;
  background: linear-gradient(180deg, #fff 0%, rgba(122,0,25,.03) 100%);
}
.row-head{
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:10px;
  margin-bottom: 10px;
}
legend{
  font-weight: 800;
}

.grid{
  display:grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 12px;
}
label{display:flex; flex-direction:column; gap:6px; font-size:13px}
input, select{
  width:100%;
  padding:10px 10px;
  border-radius: 12px;
  border:1px solid var(--line);
  background:#fff;
  outline: none;
}
input:focus, select:focus{
  border-color: rgba(228,0,43,.6);
  box-shadow: 0 0 0 4px rgba(228,0,43,.12);
}

.colspan-2{grid-column: span 2}

.actions{
  display:flex;
  flex-wrap:wrap;
  gap:10px;
  margin-top: 14px;
}

.btn{
  border:1px solid var(--line);
  border-radius: 14px;
  padding: 10px 14px;
  cursor:pointer;
  background:#fff;
  font-weight:700;
}
.btn-primary{
  background: linear-gradient(135deg, var(--cook-red), var(--cook-burgundy));
  color:#fff;
  border-color: transparent;
}
.btn-ghost:hover{border-color: rgba(228,0,43,.35)}
.btn-danger{
  border-color: rgba(228,0,43,.25);
  color: var(--cook-burgundy);
}
.btn-sm{padding:7px 10px; border-radius: 12px; font-size:12px}

/* Bouton discret (ex: "Séparer établissement / adresse") */
.btn-xs{padding:6px 8px; border-radius: 12px; font-size:12px}
.btn-link{
  border-color: transparent;
  background: transparent;
  padding-left: 0;
  padding-right: 0;
  font-weight: 700;
  color: var(--cook-burgundy);
  text-align: left;
}
.btn-link:hover{ text-decoration: underline; }

.splitAddrBtn{ margin-top: 6px; }

.hint{
  margin-top: 14px;
  font-size: 12px;
  color: var(--muted);
  border-left: 4px solid rgba(228,0,43,.35);
  padding: 10px 12px;
  background: rgba(228,0,43,.04);
  border-radius: 12px;
}

.rpps-inline label{ margin:0; }

/* --------------------------- */
/* Modal popup RPPS            */
/* --------------------------- */

body.modal-open{
  overflow: hidden;
}

/* ✅ IMPORTANT: respecte le booléen HTML "hidden" */
.modal-backdrop[hidden]{
  display:none !important;
}

.modal-backdrop{
  position: fixed;
  inset: 0;
  background: rgba(17, 24, 39, .55);
  display:flex;
  align-items:center;
  justify-content:center;
  padding: 18px;
  z-index: 1000;
}

.modal{
  width: min(860px, 100%);
  max-height: min(80vh, 720px);
  background:#fff;
  border-radius: 18px;
  border: 1px solid rgba(255,255,255,.15);
  box-shadow: 0 30px 80px rgba(0,0,0,.25);
  display:flex;
  flex-direction:column;
  overflow:hidden;
}

.modal-head{
  padding: 14px 14px 10px;
  border-bottom: 1px solid var(--line);
  display:flex;
  align-items:flex-start;
  justify-content:space-between;
  gap: 10px;
}

.modal-title{ font-weight: 900; letter-spacing: .2px; }
.modal-subtitle{
  font-size: 12px;
  color: var(--muted);
  margin-top: 4px;
}

.modal-body{
  padding: 10px;
  overflow:auto;
}

.modal-foot{
  padding: 10px 14px;
  border-top: 1px solid var(--line);
  background: rgba(228,0,43,.03);
}

.modal-hint{
  font-size: 12px;
  color: var(--muted);
}

/* Résultats praticiens */
.rpps-item{
  padding: 10px 12px;
  cursor: pointer;
  border: 1px solid var(--line);
  border-radius: 14px;
  margin: 8px 0;
}
.rpps-item:hover{ background: rgba(228,0,43,.04); }
.rpps-item small{
  display:block;
  color: var(--muted);
  margin-top: 4px;
}

/* Choix établissement */
.org-card{
  border: 1px solid var(--line);
  border-radius: 14px;
  padding: 10px 12px;
  margin: 10px 0;
  background:#fff;
}
.org-title{ font-weight: 800; }
.org-meta{ font-size: 12px; color: var(--muted); margin-top: 4px; }
.org-actions{
  display:flex;
  gap:10px;
  flex-wrap:wrap;
  margin-top: 10px;
}

.rpps-loading, .rpps-empty, .rpps-error{
  padding: 10px 12px;
  color: var(--muted);
  font-size: 13px;
  border:1px dashed var(--line);
  border-radius: 14px;
  background:#fff;
}

@media (max-width: 980px){
  .grid{grid-template-columns: repeat(2, minmax(0, 1fr))}
  .colspan-2{grid-column: span 2}
}
@media (max-width: 520px){
  .grid{grid-template-columns: 1fr}
  .colspan-2{grid-column: span 1}
}

