/* Demandes d’informations : écrans de l’employeur et page publique de l’agent. */

/* --- Employeur --- */
.tabs .count {
  margin-left: 4px;
  padding: 1px 6px;
  border-radius: 8px;
  background: var(--soft);
  font-size: 10px;
  color: var(--muted);
}
.invite-bulk {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  flex-wrap: wrap;
  margin: 14px 22px 0;
  padding: 12px 16px;
  border-radius: 12px;
  background: linear-gradient(90deg, #e7f0dc, #f4f8ef);
  border: 1px solid #d3e3bc;
}
.invite-bulk b {
  font-size: 12px;
  color: var(--ink);
}
.invite-all {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 11px;
  color: var(--muted);
  white-space: nowrap;
}
.invite-progress {
  display: block;
  width: 90px;
  height: 6px;
  border-radius: 3px;
  background: #edf2e8;
  overflow: hidden;
  margin-bottom: 4px;
}
.invite-progress i {
  display: block;
  height: 100%;
  border-radius: 3px;
  background: linear-gradient(90deg, #75965c, #2f6c59);
  transition: width 0.2s var(--ease-out);
}
.invite-links {
  display: grid;
  gap: 8px;
  max-height: 52vh;
  overflow-y: auto;
}
.invite-link {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 11px 13px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: #fff;
}
.invite-link > div {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 3px;
}
.invite-link b {
  font-size: 12.5px;
}
.invite-link small {
  font-size: 10.5px;
  color: var(--muted);
  overflow-wrap: anywhere;
}
.invite-grid > .org-card:nth-child(3) {
  grid-column: auto;
}
.invite-grid {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}
.invite-photos {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(130px, 1fr));
  gap: 10px;
}
.invite-photo {
  display: flex;
  flex-direction: column;
  gap: 5px;
  text-align: left;
  padding: 8px;
  border: 1px solid var(--line);
  border-radius: 12px;
  transition: box-shadow 0.15s, border-color 0.15s;
}
.invite-photo:hover {
  box-shadow: 0 4px 12px #183b3810;
}
.invite-thumb {
  display: grid;
  place-items: center;
  height: 92px;
  border-radius: 8px;
  background: var(--soft);
  overflow: hidden;
}
.invite-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  animation: fade-in 0.15s ease-out;
}
.invite-photo b {
  font-size: 11px;
  color: var(--ink);
}
.invite-photo small {
  font-size: 10px;
  color: var(--muted);
  overflow-wrap: anywhere;
}
.invite-family {
  display: grid;
  gap: 8px;
}
.invite-family > div {
  display: grid;
  grid-template-columns: auto 1fr;
  column-gap: 12px;
  align-items: center;
  padding: 10px 12px;
  border: 1px solid var(--line);
  border-radius: 12px;
}
.invite-family .avatar {
  grid-row: span 3;
}
.invite-family b {
  font-size: 12px;
}
.invite-family small {
  font-size: 10.5px;
  color: var(--muted);
}
.invite-lightbox {
  position: fixed;
  inset: 0;
  z-index: 350;
  display: grid;
  place-items: center;
  background: #0b221ee6;
  backdrop-filter: blur(6px);
  cursor: zoom-out;
  animation: fade-in 0.15s ease-out;
}
.invite-lightbox img {
  max-width: 92vw;
  max-height: 88vh;
  border-radius: 12px;
  box-shadow: 0 30px 80px #000a;
}
.invite-lightbox .close {
  position: absolute;
  top: 20px;
  right: 20px;
  background: #ffffff22;
  color: #fff;
}
@keyframes fade-in {
  from {
    opacity: 0;
  }
}
.invite-done {
  display: flex;
  gap: 14px;
  align-items: center;
  padding: 16px;
  border-radius: 14px;
  background: #e7f0dc;
}
.invite-done > .icon {
  width: 44px;
  height: 44px;
  padding: 11px;
  border-radius: 50%;
  background: #2f6c59;
  stroke: #fff;
  flex-shrink: 0;
}
.invite-done div {
  display: flex;
  flex-direction: column;
  gap: 4px;
}
.invite-done small {
  color: #4c6a45;
  font-size: 11px;
  line-height: 1.5;
}
.invite-preview {
  font-size: 11px;
  color: var(--muted);
}

/* --- Page publique de l’agent --- */
body:has(.iv-page) {
  background: radial-gradient(1200px 600px at 100% -10%, #e2edd4 0%, transparent 60%), #f4f7f0;
  overflow-y: auto !important;
}
.iv-page {
  max-width: 760px;
  margin: 0 auto;
  min-height: 100dvh;
  padding: 18px 16px 120px;
  display: flex;
  flex-direction: column;
  gap: 14px;
}
.iv-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 4px 4px 6px;
}
.iv-top .brand {
  padding: 0;
  color: #214e41;
}
.iv-top .brand strong {
  color: #214e41;
  font-size: 18px;
}
.iv-top .brand small {
  color: #839677;
}
.iv-top .brandmark i {
  background: #75965c;
}
.iv-saved {
  font-size: 10.5px;
  color: var(--muted);
  transition: opacity 0.15s;
}
.iv-saved.saving::before {
  content: '';
  display: inline-block;
  width: 8px;
  height: 8px;
  margin-right: 6px;
  border-radius: 50%;
  background: #c6a85a;
}
.iv-saved.ok {
  color: #2f6c59;
}
.iv-saved.error {
  color: var(--red);
}
.iv-steps {
  display: flex;
  gap: 6px;
  overflow-x: auto;
  scrollbar-width: none;
  padding: 2px;
}
.iv-steps button {
  display: flex;
  align-items: center;
  gap: 7px;
  padding: 6px 10px 6px 6px;
  border-radius: 999px;
  font-size: 11px;
  color: var(--muted);
  white-space: nowrap;
  background: #ffffffa8;
  border: 1px solid #e2e9dd;
  transition: background-color 0.15s, color 0.15s, border-color 0.15s;
}
.iv-steps button i {
  display: grid;
  place-items: center;
  width: 22px;
  height: 22px;
  border-radius: 50%;
  font-style: normal;
  font-size: 10px;
  background: #edf2e8;
  color: #6d7b77;
}
.iv-steps button i .icon {
  width: 12px;
  height: 12px;
  stroke: #fff;
  stroke-width: 3;
}
.iv-steps button.done i {
  background: #75965c;
}
.iv-steps button.on {
  background: #214e43;
  color: #fff;
  border-color: #214e43;
}
.iv-steps button.on i {
  background: #d3e3bc;
  color: #214e43;
}
.iv-steps button:not(.on) span {
  display: none;
}
.iv-steps button.done span {
  display: none;
}
.iv-bar {
  height: 5px;
  border-radius: 3px;
  background: #e2e9dd;
  overflow: hidden;
}
.iv-bar i {
  position: relative;
  display: block;
  height: 100%;
  border-radius: 3px;
  background: linear-gradient(90deg, #2f6c59, #75965c, #b8d294);
  overflow: hidden;
}
.iv-card {
  background: #fff;
  border: 1px solid #e2e9dd;
  border-radius: 22px;
  padding: 26px 22px;
  box-shadow: 0 20px 50px #183b380d;
}
.iv-center {
  display: grid;
  place-items: center;
  text-align: center;
  gap: 12px;
  padding: 46px 24px;
}
.iv-center h1 {
  font-size: 22px;
  color: var(--ink);
  margin: 0;
}
.iv-center p {
  margin: 0;
  color: #5e6e69;
  line-height: 1.6;
  font-size: 13.5px;
  max-width: 480px;
}
.iv-center small {
  color: var(--muted);
}
.iv-state {
  width: 64px;
  height: 64px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  background: #fbf4e5;
}
.iv-state .icon {
  width: 28px;
  height: 28px;
  stroke: #8c6f35;
}
.iv-success {
  width: 110px;
  height: 110px;
  overflow: visible;
}
.iv-success circle {
  fill: #e7f0dc;
  stroke: #75965c;
  stroke-width: 4;
  stroke-dasharray: 327;
  stroke-dashoffset: 327;
  transform: rotate(-90deg);
  transform-origin: 50% 50%;
  stroke-dashoffset: 0;
}
.iv-success path {
  fill: none;
  stroke: #2f6c59;
  stroke-width: 7;
  stroke-linecap: round;
  stroke-linejoin: round;
}
.iv-hello h1 {
  font-size: 26px;
  margin: 6px 0 12px;
  color: var(--ink);
  letter-spacing: -0.5px;
}
.iv-hello p {
  color: #4f605b;
  line-height: 1.65;
  font-size: 14px;
  margin: 0 0 18px;
}
.iv-need {
  list-style: none;
  padding: 0;
  margin: 0 0 16px;
  display: grid;
  gap: 10px;
}
.iv-need li {
  display: flex;
  gap: 14px;
  align-items: center;
  padding: 13px 14px;
  border-radius: 14px;
  background: #f6f9f2;
}
.iv-need .icon {
  width: 38px;
  height: 38px;
  padding: 9px;
  border-radius: 12px;
  background: #fff;
  stroke: #2f6c59;
  flex-shrink: 0;
}
.iv-need span {
  display: flex;
  flex-direction: column;
  gap: 2px;
}
.iv-need b {
  font-size: 13px;
  color: var(--ink);
}
.iv-need small {
  font-size: 11.5px;
  color: var(--muted);
}
.iv-deadline {
  color: var(--muted);
  font-size: 11.5px;
}
.iv-alert,
.iv-note {
  display: flex;
  gap: 12px;
  align-items: flex-start;
  padding: 14px;
  border-radius: 14px;
  margin-bottom: 16px;
  font-size: 13px;
  line-height: 1.55;
}
.iv-alert {
  background: #fbf4e5;
  color: #6e5626;
  border: 1px solid #eddfbd;
}
.iv-note {
  background: #eef4e8;
  color: #3d5a36;
}
.iv-alert div {
  display: flex;
  flex-direction: column;
  gap: 3px;
}
.iv-alert .icon,
.iv-note .icon {
  width: 18px;
  height: 18px;
  flex-shrink: 0;
  margin-top: 2px;
}
.iv-card h2 {
  font-size: 20px;
  color: var(--ink);
  margin: 0 0 6px;
  letter-spacing: -0.3px;
}
.iv-help {
  margin: 0 0 20px;
  color: #6b7a75;
  font-size: 13px;
  line-height: 1.55;
}
.iv-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px 16px;
}
.iv-field {
  display: flex;
  flex-direction: column;
  gap: 7px;
  min-width: 0;
}
.iv-field.full {
  grid-column: 1 / -1;
}
.iv-field > span {
  font-size: 12px;
  color: #43534e;
  font-weight: 500;
}
.iv-field em {
  color: #a8493e;
  font-style: normal;
}
.iv-field input,
.iv-field select {
  width: 100%;
  min-height: 48px;
  padding: 12px 14px;
  border-radius: 12px;
  border: 1px solid #d5ded7;
  background: #fff;
  font-size: 15px;
  transition: border-color 0.15s, box-shadow 0.15s;
}
.iv-field select {
  appearance: none;
  -webkit-appearance: none;
  background: #fff var(--chevron) no-repeat right 14px center / 14px;
  padding-right: 38px;
}
.iv-field input:focus,
.iv-field select:focus {
  border-color: var(--green);
  box-shadow: 0 0 0 4px #2f6c591c;
  outline: none;
}
.iv-field small {
  font-size: 11px;
  color: var(--muted);
}
.iv-choice {
  display: flex;
  gap: 8px;
}
.iv-choice button {
  flex: 1;
  min-height: 48px;
  border-radius: 12px;
  border: 1px solid #d5ded7;
  background: #fff;
  font-size: 14px;
  color: #43534e;
  transition: background-color 0.15s, border-color 0.15s, color 0.15s;
}
.iv-choice button.on {
  background: #214e43;
  border-color: #214e43;
  color: #fff;
}
.iv-photos {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
  margin-top: 18px;
}
.iv-photo {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 6px;
  min-height: 150px;
  padding: 14px 10px;
  border-radius: 16px;
  border: 2px dashed #c9d8bd;
  background: #f8fbf5;
  text-align: center;
  cursor: pointer;
  overflow: hidden;
  transition: border-color 0.15s, background-color 0.15s;
}
.iv-photo:hover {
  border-color: #75965c;
}
.iv-photo.done {
  border-style: solid;
  border-color: #b8d294;
  background: #eef5e6;
}
.iv-photo img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  opacity: 0.32;
}
.iv-photo > b,
.iv-photo > small,
.iv-photo > span,
.iv-photo > svg {
  position: relative;
}
.iv-photo b {
  font-size: 12px;
  color: var(--ink);
}
.iv-photo small {
  font-size: 10.5px;
  color: var(--muted);
}
.iv-cam,
.iv-ok {
  display: grid;
  place-items: center;
  width: 46px;
  height: 46px;
  border-radius: 50%;
  background: #fff;
  box-shadow: 0 6px 16px #183b3814;
}
.iv-cam .icon {
  width: 20px;
  height: 20px;
  stroke: #2f6c59;
}
.iv-ok {
  background: #2f6c59;
}
.iv-ok .icon {
  width: 20px;
  height: 20px;
  stroke: #fff;
  stroke-width: 3;
}
.iv-upring {
  width: 54px;
  height: 54px;
  transform: rotate(-90deg);
}
.iv-upring circle {
  fill: none;
  stroke: #e2e9dd;
  stroke-width: 4;
}
.iv-upring .v {
  stroke: #2f6c59;
  stroke-linecap: round;
  stroke-dasharray: 119.4;
  transition: stroke-dashoffset 0.25s linear;
}
.iv-photo.busy {
  border-style: solid;
}
.iv-family {
  display: grid;
  gap: 10px;
  margin-bottom: 14px;
}
.iv-member {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 14px;
  border-radius: 14px;
  border: 1px solid #e2e9dd;
}
.iv-member > div {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 2px;
}
.iv-member b {
  font-size: 13px;
}
.iv-member small {
  font-size: 11px;
  color: var(--muted);
}
.iv-empty {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 16px;
  border-radius: 14px;
  background: #f6f9f2;
  color: var(--muted);
  font-size: 12.5px;
}
.iv-member-actions {
  display: flex;
  justify-content: flex-end;
  gap: 8px;
  flex-wrap: wrap;
  margin-top: 20px;
}
.iv-review {
  display: grid;
  gap: 10px;
}
.iv-review-card {
  text-align: left;
  padding: 14px 16px;
  border-radius: 14px;
  border: 1px solid #e2e9dd;
  background: #fff;
  transition: border-color 0.15s;
}
.iv-review-card:hover {
  border-color: #b8d294;
}
.iv-review-card header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 8px;
}
.iv-review-card header b {
  font-size: 13px;
  color: var(--ink);
}
.iv-review-card header span {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font-size: 11px;
  color: var(--green);
}
.iv-review-card header .icon {
  width: 12px;
  height: 12px;
}
.iv-review-card dl {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 6px 14px;
  margin: 0;
}
.iv-review-card dt {
  font-size: 10px;
  color: var(--muted);
}
.iv-review-card dd {
  margin: 0;
  font-size: 12.5px;
  color: var(--ink);
  overflow-wrap: anywhere;
}
.iv-consent {
  display: flex;
  gap: 12px;
  align-items: flex-start;
  margin-top: 18px;
  padding: 15px;
  border-radius: 14px;
  background: #f6f9f2;
  cursor: pointer;
}
.iv-consent input {
  width: 22px;
  height: 22px;
  flex-shrink: 0;
  margin-top: 1px;
}
.iv-consent span {
  display: flex;
  flex-direction: column;
  gap: 4px;
  font-size: 13px;
}
.iv-consent small {
  color: var(--muted);
  line-height: 1.5;
}
.iv-error {
  margin-top: 14px;
  color: #a8493e;
  font-size: 12.5px;
  line-height: 1.5;
}
.iv-error:empty {
  display: none;
}
.iv-nav {
  position: fixed;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 30;
  display: flex;
  justify-content: space-between;
  gap: 10px;
  padding: 12px max(16px, calc((100vw - 760px) / 2 + 16px)) calc(12px + env(safe-area-inset-bottom));
  background: #ffffffe6;
  backdrop-filter: blur(14px);
  border-top: 1px solid #e2e9dd;
}
.iv-nav .btn {
  min-height: 50px;
  padding: 0 22px;
  font-size: 14px;
  border-radius: 14px;
}
.iv-nav .btn.primary {
  flex: 1;
  max-width: 340px;
  margin-left: auto;
  justify-content: center;
}
.iv-foot {
  display: flex;
  gap: 8px;
  align-items: flex-start;
  justify-content: center;
  color: var(--muted);
  font-size: 10.5px;
  text-align: center;
  padding: 6px 10px;
}
.iv-foot .icon {
  width: 13px;
  height: 13px;
  flex-shrink: 0;
}
@media (max-width: 560px) {
  .iv-grid {
    grid-template-columns: minmax(0, 1fr);
  }
  .iv-photos {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
  .iv-card {
    padding: 22px 16px;
    border-radius: 18px;
  }
  .iv-hello h1 {
    font-size: 23px;
  }
  .invite-grid {
    grid-template-columns: minmax(0, 1fr);
  }
}
@media (max-width: 1180px) {
  .invite-grid {
    grid-template-columns: minmax(0, 1fr);
  }
}

/* Sur la page de l’agent, la notification passe au-dessus de la barre de navigation. */
body:has(.iv-page) #toast {
  bottom: calc(92px + env(safe-area-inset-bottom));
}
