/* Utilisateurs › Inviter (invite.js, owner 2026-11-28, design 5 + tableau des accès en fenêtre).
   Guide visuel : marine pour agir, or pour repérer, blocs à filet fin arrondi, champs avec le nom dans le trait. */
.iv-page { max-width: 1240px; padding-bottom: 96px; }
.iv-ic { width: 18px; height: 18px; flex: none; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.iv-lead { margin: 2px 0 18px; }
/* Rôles en onglets au-dessus de la page, « Qui voit quoi ? » au bout de la rangée (owner, 2026-11-28 : « not slider, tabs ») */
.iv { display: flex; flex-direction: column; gap: 22px; }
.iv-side { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; }
.iv-side .iv-roles { display: flex; gap: 4px; padding: 4px; border: 1px solid var(--line); border-radius: 16px; }
.iv-side .iv-role { width: auto; gap: 10px; padding: 8px 16px 8px 12px; border: 0; border-radius: 12px; }
.iv-side .iv-role.on { border: 0; padding: 8px 16px 8px 12px; background: var(--text); color: var(--bg); }
.iv-side .iv-role .iv-ico { width: 34px; height: 34px; }
.iv-side .iv-role .iv-ico .iv-ic { width: 18px; height: 18px; }
.iv-side .iv-role.on .iv-ico { background: color-mix(in srgb, var(--bg) 16%, transparent); color: var(--gold); }
.iv-side .iv-role.on .iv-rm small { color: color-mix(in srgb, var(--bg) 75%, transparent); }
.iv-side .iv-role .iv-rm b { white-space: nowrap; } .iv-role .iv-rm small { white-space: nowrap; font-size: 12.5px; }
.iv-side .iv-perm { width: auto; padding: 8px 16px 8px 8px; border-style: dashed; }
.iv-side .iv-perm > .iv-ic { width: 34px; height: 34px; padding: 8px; }
.iv-side .iv-perm small { display: none; }
@media (max-width: 999px) {
  .iv-side { flex-direction: column; align-items: stretch; }
  .iv-side .iv-roles { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .iv-side .iv-role { flex-direction: column; gap: 4px; padding: 8px 4px; text-align: center; justify-content: center; }
  .iv-side .iv-role.on { padding: 8px 4px; }
  .iv-side .iv-role .iv-rm small { display: none; }
  .iv-side .iv-role .iv-rm b { font-size: 14px; }
  .iv-side .iv-perm { justify-content: center; }
}
.iv-role, .iv-perm { display: flex; align-items: center; gap: 12px; width: 100%; padding: 12px 14px; border: 1px solid var(--line); border-radius: 14px; background: none; color: var(--text); text-align: start; cursor: pointer; font: inherit; transition: border-color .3s, background-color .3s; }
.iv-role.on { border: 1.5px solid var(--text); padding: 11.5px 13.5px; }
.iv-ico { flex: none; width: 40px; height: 40px; border-radius: 50%; display: grid; place-items: center; background: var(--s-gold-soft, var(--gold-soft)); color: var(--gold-ink, var(--gold)); }
.iv-ico .iv-ic { width: 20px; height: 20px; }
.iv-rm { display: flex; flex-direction: column; min-width: 0; flex: 1; }
.iv-rm b { overflow-wrap: anywhere; } .iv-rm small { color: var(--muted); font-size: 13px; overflow-wrap: anywhere; }
.iv-perm { border-style: dashed; }
.iv-perm > .iv-ic { width: 40px; height: 40px; padding: 10px; border-radius: 50%; background: var(--text); color: var(--bg); box-sizing: border-box; }
.iv-perm > span { display: flex; flex-direction: column; } .iv-perm small { color: var(--muted); font-size: 13px; }
.iv-main { display: flex; flex-direction: column; gap: 20px; min-width: 0; }
.iv-h h2 { margin: 0; font-size: 22px; } .iv-h .hint { margin: 4px 0 0; }
.iv-dorm { display: flex; align-items: center; gap: 14px; padding: 14px 16px; border: 1px solid var(--gold); border-radius: 16px; }
.iv-dorm .btn { flex: none; }
.iv-ways { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 260px), 1fr)); gap: 14px; align-items: start; }   /* cartes de 260 px au moins, à la ligne sinon (owner, 2026-11-28 : « not responsive ») */

.iv-way { border: 1px solid var(--line); border-radius: 18px; padding: 18px; display: flex; flex-direction: column; gap: 12px; min-width: 0; }
.iv-way h3, .iv-see h3, .iv-sent h3 { margin: 0; font-size: 17px; }
.iv-way .hint { margin: 0; }
.iv-form { display: flex; flex-direction: column; gap: 20px; padding-top: 10px; }
.iv-form .two { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.iv-form label.f { position: relative; margin: 0; display: block; }
.iv-form label.f > span:first-child { position: absolute; top: -9px; left: 12px; z-index: 2; margin: 0; padding: 0 6px; max-width: calc(100% - 24px); background: var(--panel); font-size: 12px; font-weight: 700; line-height: 18px; color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.iv-form :is(input, textarea, .ph-box) { width: 100%; box-sizing: border-box; min-height: 50px; border: 1.5px solid var(--line); border-radius: 14px; background: var(--panel); transition: border-color .3s; }
.iv-form textarea { min-height: 120px; resize: vertical; padding: 13px 14px; font: inherit; color: var(--text); }
.iv-form :is(input, textarea):focus, .iv-form .ph-box:focus-within { border-color: var(--gold); outline: none; }
.iv-form label.f:focus-within > span:first-child { color: var(--gold-ink, var(--gold)); }
.iv-form .btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; white-space: nowrap; }
.iv-res { margin: -8px 0 0; font-size: 13.5px; color: var(--late, #9c4318); }
.iv-qr { width: 136px; height: 136px; align-self: center; }
.iv-qr svg { width: 100%; height: 100%; display: block; }
.iv-link { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; border: 1.5px solid var(--line); border-radius: 14px; padding: 8px 8px 8px 12px; }
.iv-link span { flex: 1 1 100%; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: 13px; color: var(--muted); }
.iv-acts { display: flex; gap: 8px; flex-wrap: wrap; }
.iv-way .btn.small, .iv-sent .btn.small, .iv-dorm .btn.small, .iv-card .btn.small { display: inline-flex; align-items: center; gap: 7px; }
.iv-wa img { width: 18px; height: 18px; flex: none; }
.iv-recv { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 340px), 1fr)); gap: 18px; align-items: start; }
.iv-mailbox { border: 1px solid var(--line); border-radius: 18px; overflow: hidden; display: flex; flex-direction: column; }
.iv-mh { padding: 14px 16px; border-bottom: 1px solid var(--line); display: flex; flex-direction: column; gap: 2px; }
.iv-mh small { color: var(--muted); font-size: 13px; } .iv-subj { font-size: 14px; font-weight: 700; margin-top: 6px; }
.iv-subj:empty { display: none; }
#ivMailFrame { width: 100%; height: 560px; border: 0; background: #f7f3ea; display: block; }
.iv-see { display: flex; flex-direction: column; gap: 14px; min-width: 0; }
.iv-see-b { display: flex; gap: 20px; align-items: flex-start; flex-wrap: wrap; }
.iv-see-l { flex: 1; min-width: 220px; display: flex; flex-direction: column; gap: 8px; }
.iv-lh { margin: 0; font-weight: 800; font-size: 14px; } .iv-lh + .iv-l { margin-bottom: 6px; }
.iv-l { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 8px; font-size: 14.5px; }
.iv-l li { display: grid; grid-template-columns: 20px 1fr; gap: 10px; align-items: start; }
.iv-l .iv-ic { width: 20px; height: 20px; }
.iv-l.ok .iv-ic { color: var(--live, #12703f); } .iv-l.no .iv-ic { color: var(--red); } .iv-l.no li { color: var(--muted); }
/* Mini écran de la personne invitée */
.iv-ph { flex: none; width: 200px; border-radius: 30px; padding: 8px; background: #0f1f3d; box-shadow: 0 24px 50px -28px rgba(15,31,61,.55); }
.iv-ph .sc { border-radius: 23px; background: #fff; color: #0f1f3d; overflow: hidden; aspect-ratio: 9 / 18.5; display: flex; flex-direction: column; font-size: 9px; line-height: 1.35; }
.iv-ph .nt { height: 18px; display: flex; justify-content: center; align-items: center; } .iv-ph .nt i { width: 54px; height: 6px; border-radius: 9px; background: #0f1f3d; }
.iv-ph .bd { flex: 1; padding: 4px 10px 8px; display: flex; flex-direction: column; gap: 7px; overflow: hidden; }
.iv-ph .h { font: 800 1.45em/1.1 var(--display, inherit); letter-spacing: -.02em; }
.iv-ph .s { color: #4a5672; font-size: .9em; } .iv-ph .s b { color: #0f1f3d; }
.iv-ph .cd { border: 1px solid #e1e4ec; border-radius: 10px; padding: 7px 8px; display: flex; flex-direction: column; gap: 3px; }
.iv-ph .band { background: #c9a45c; color: #fff; border-radius: 10px 10px 0 0; margin: -7px -8px 3px; padding: 6px 8px; display: flex; justify-content: space-between; align-items: baseline; font-weight: 700; }
.iv-ph .band b { font: 800 1.7em/1 var(--display, inherit); }
.iv-ph .rt { display: flex; align-items: center; gap: 6px; } .iv-ph .rt i { width: 7px; height: 7px; border-radius: 50%; border: 2px solid #12703f; flex: none; } .iv-ph .rt i.b { border-color: #c0392b; }
.iv-ph .map { height: 54px; border-radius: 8px; flex: none; background: radial-gradient(circle at 30% 60%, #12703f 0 3px, transparent 4px), radial-gradient(circle at 74% 30%, #c0392b 0 3px, transparent 4px),
  linear-gradient(135deg, transparent 47%, rgba(201,164,92,.9) 48% 52%, transparent 53%), repeating-linear-gradient(0deg, #eef0f4 0 9px, #f6f7f9 9px 18px); }
.iv-ph .row { display: flex; align-items: center; gap: 6px; border: 1px solid #e1e4ec; border-radius: 8px; padding: 5px 6px; } .iv-ph .row u { flex: none; width: 14px; height: 14px; border-radius: 50%; background: #f6efe1; }
.iv-ph .sl { margin-top: auto; height: 26px; border-radius: 99px; background: #0f1f3d; color: #fff; display: flex; align-items: center; gap: 6px; padding: 3px; font-weight: 700; }
.iv-ph .sl::before { content: ''; width: 20px; height: 20px; border-radius: 50%; background: #fff; }
.iv-ph .figs { display: grid; grid-template-columns: 1fr 1fr; gap: 5px; } .iv-ph .figs > span { border: 1px solid #e1e4ec; border-radius: 8px; padding: 5px 6px; display: flex; flex-direction: column; gap: 4px; }
.iv-ph .figs b { display: block; height: 9px; width: 70%; border-radius: 4px; background: #0f1f3d; } .iv-ph .figs .g b { background: #c9a45c; }
.iv-ph .zip { margin-top: auto; background: #0f1f3d; color: #fff; border-radius: 8px; padding: 6px 8px; font-weight: 700; text-align: center; }
.iv-ph .thr { position: relative; padding-left: 22px; gap: 6px; } .iv-ph .thr::before { content: ''; position: absolute; left: 12px; top: 10px; bottom: 10px; width: 2px; background: #c9a45c; }
.iv-ph .thr > span { position: relative; } .iv-ph .thr > span::before { content: ''; position: absolute; left: -14px; top: 3px; width: 6px; height: 6px; border-radius: 50%; background: #fff; border: 2px solid #c9a45c; }
.iv-ph .drv { flex-direction: row; align-items: center; gap: 6px; } .iv-ph .drv u { width: 22px; height: 22px; border-radius: 50%; background: linear-gradient(135deg, #d9c39a, #8c7342); flex: none; }
.iv-ph .drv > span { display: flex; flex-direction: column; }
.iv-ph .gold { margin-top: auto; background: #c9a45c; color: #fff; border-radius: 8px; padding: 6px 8px; font-weight: 700; text-align: center; }
.iv-ph .tb { display: flex; justify-content: space-around; border-top: 1px solid #e1e4ec; padding: 6px 4px 8px; } .iv-ph .tb i { width: 12px; height: 12px; border-radius: 4px; background: #eceef3; } .iv-ph .tb i.on { background: #0f1f3d; }
/* Invitations envoyées */
.iv-sent { display: flex; flex-direction: column; gap: 8px; }
.iv-sent h3 { margin-bottom: 4px; }
.iv-row { display: flex; align-items: center; gap: 12px; border: 1px solid var(--line); border-radius: 14px; padding: 10px 12px 10px 14px; }
.iv-av { flex: none; width: 38px; height: 38px; border-radius: 50%; background: var(--s-panel, var(--panel-2)); display: grid; place-items: center; font-weight: 800; font-size: 13px; color: var(--muted); }
.iv-row .pill { flex: none; }
.iv-more { align-self: flex-start; }
/* Fenêtre « Qui voit quoi ? » */
.iv-perm-dlg { width: min(880px, 100%); max-width: 880px; }
.iv-perm-h { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 8px; }
.iv-perm-h h2 { margin: 0; }
.iv-tbl { border: 1px solid var(--line); border-radius: 16px; overflow: auto; max-height: min(70vh, 640px); }
.iv-tbl table { width: 100%; border-collapse: collapse; font-size: 14px; }
.iv-tbl thead th { position: sticky; top: 0; z-index: 1; background: var(--panel); padding: 14px 10px; vertical-align: bottom; border-bottom: 1px solid var(--line); }
.iv-tbl thead th > * { display: block; margin: 0 auto; text-align: center; } .iv-tbl thead .iv-ico { margin-bottom: 6px; }
.iv-tbl thead small { color: var(--muted); font-weight: 500; font-size: 12px; }
.iv-tbl :is(th.you, td.you) { background: var(--s-panel, var(--panel-2)); }
.iv-tbl tbody th { text-align: start; font-weight: 600; padding: 10px 14px; }
.iv-tbl tbody td { text-align: center; padding: 10px; }
.iv-tbl tbody tr + tr > * { border-top: 1px solid var(--line); }
.iv-tbl tr.grp th { font-family: var(--display, inherit); font-weight: 800; font-size: 13px; color: var(--gold-ink, var(--gold)); padding-top: 16px; }
.iv-y { color: var(--live, #12703f); } .iv-n { color: color-mix(in srgb, var(--muted) 55%, transparent); } .iv-p { font-size: 12px; font-weight: 800; color: var(--gold-ink, var(--gold)); }
.iv-y .iv-ic, .iv-n .iv-ic { width: 20px; height: 20px; vertical-align: middle; }
.iv-cards { display: none; }
@media (hover: hover) {
  .iv-role:not(.on):hover { background: var(--s-panel, var(--panel-2)); }
  .iv-perm:hover, .iv-row:hover { border-color: var(--text); }
  .iv-wa:hover { background: #000 !important; border-color: #000 !important; color: #fff !important; }
}

@media (max-width: 999px) {
  .iv-dorm { flex-wrap: wrap; } .iv-dorm .btn { width: 100%; justify-content: center; }
  .iv-row { flex-wrap: wrap; } .iv-row .iv-rm { flex: 1 1 calc(100% - 60px); } .iv-row .pill { margin-left: 50px; } .iv-row .btn { margin-left: auto; }
  .iv-see-b { justify-content: center; }
  #ivMailFrame { height: 480px; }
  .iv-tbl { display: none; }
  .iv-cards { display: flex; flex-direction: column; gap: 12px; max-height: 70vh; overflow-y: auto; }
  .iv-card { border: 1px solid var(--line); border-radius: 16px; padding: 14px; display: flex; flex-direction: column; gap: 12px; }
  .iv-card-h { display: flex; align-items: center; gap: 12px; }
  .iv-mini { display: grid; grid-template-columns: 1fr auto; gap: 8px 12px; font-size: 14px; align-items: center; }
  .iv-card .btn { justify-content: center; }
}
/* Lien ou QR : seulement Copier, WhatsApp et l'icône de téléchargement du QR, sur une ligne (owner, 2026-11-28) */
.iv-acts3 { flex-wrap: wrap; }
.iv-acts3 .btn { flex: 1 1 auto; justify-content: center; }
.iv-acts3 .iv-dlq { flex: 0 0 auto; width: 40px; padding: 0; }
.iv-acts3 .iv-dlq .iv-ic { width: 18px; height: 18px; }
/* Les trois cartes de la même hauteur, boutons alignés en bas (owner, 2026-11-28) */
.iv-ways { align-items: stretch; }
.iv-way > .iv-form { flex: 1; }
.iv-way > .iv-form > .btn { margin-top: auto; }
.iv-way > .iv-acts3 { margin-top: auto; }
.iv-ways.one { grid-template-columns: minmax(0, 440px); }   /* comptable : une seule carte, pas étirée sur toute la largeur */
/* « Qui voit quoi ? » : au milieu de l'écran, en-tête sobre (owner, 2026-11-28 : « open middle of screen, fix header ») */
.iv-perm-dlg { width: min(820px, calc(100vw - 48px)); max-height: min(86vh, 820px); display: flex; flex-direction: column; }
.iv-perm-dlg .iv-tbl { flex: 1; min-height: 0; max-height: none; scrollbar-width: thin; scrollbar-color: var(--line) transparent; }
.iv-tbl table { table-layout: fixed; }
.iv-tbl col.c0 { width: 32%; }
.iv-tbl thead th { padding: 14px 8px 12px; background: var(--panel); text-align: center; box-shadow: inset 0 -1px 0 var(--line); border-bottom: 0; }
.iv-tbl thead th > * { display: block; margin: 0; }
.iv-tbl .iv-th { display: flex; align-items: center; justify-content: center; gap: 7px; white-space: nowrap; }
.iv-tbl .iv-th .iv-ic { width: 18px; height: 18px; color: var(--gold-ink, var(--gold)); flex: none; }
.iv-tbl .iv-th b { font-family: var(--display, inherit); font-weight: 800; font-size: 15px; letter-spacing: -.01em; overflow: hidden; text-overflow: ellipsis; }
.iv-tbl thead small { margin-top: 2px; font-size: 12px; color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.iv-tbl thead th.you { background: var(--s-panel, var(--panel-2)); }
.iv-tbl tbody th { font-weight: 600; font-size: 14px; }
