.tmo-portal { flex: 1; padding-block: clamp(22px, 4.2vw, 65px); }
.portal-login {
  position: relative;
  isolation: isolate;
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  align-items: stretch;
  min-height: clamp(390px, 45vw, 620px);
  overflow: hidden;
  border-radius: 24px;
  background: #221a4b;
  color: #fefbf7;
}
.portal-login-copy { position: relative; z-index: 1; align-self: center; padding: clamp(26px, 5vw, 74px); }
.portal-login-copy > img { width: 128px; height: auto; padding: 7px; border-radius: 99px; background: #fff; }
.tmo-demarche .portal-login h1 { color: inherit; font-size: clamp(43px, 6.6vw, 98px); margin: 24px 0 15px; }
.portal-login-copy > p { max-width: 39ch; color: #eee7f9; }
.portal-login-copy .tmo-button { margin-top: 23px; }
.portal-login-demo { display: inline-block; margin: 14px 0 0 11px; text-decoration: underline; text-underline-offset: 4px; }
.portal-login-copy .portal-login-status { margin-top: 12px; font-size: 14px; }
.portal-auth { display: grid; max-width: 29rem; gap: 11px; margin-top: 21px; }
.portal-auth label { display: grid; gap: 4px; color: #fefbf7; font-size: 14px; font-weight: 650; }
.portal-auth input {
  width: 100%;
  min-height: 44px;
  padding: 8px 11px;
  border: 1px solid #c8bde1;
  border-radius: 8px;
  background: #fff;
  color: var(--tmo-ink);
  font: inherit;
  font-size: 16px;
}
.portal-login-copy .portal-auth .tmo-button { justify-self: start; margin-top: 3px; border: 0; }
.portal-auth-link { width: fit-content; color: #fff; text-decoration: underline; text-underline-offset: 4px; font-size: 14px; }
.portal-auth-feedback { padding: 9px 11px; border-radius: 8px; background: #fff1c3; color: #211852; font-size: 14px; }
.portal-auth-error { background: #fae8ed; color: #7c1730; }
.portal-auth-signout button { border: 0; border-bottom: 1px solid #30267866; padding-inline: 0; background: transparent; }
.portal-login-art {
  position: relative;
  isolation: isolate;
  min-height: 245px;
  overflow: hidden;
  background: radial-gradient(ellipse 80% 76% at 49% 62%, #64548e 0%, #32235e 54%, #231a4b 93%);
}
.portal-login-art::after {
  position: absolute;
  inset: 0;
  z-index: -1;
  background: linear-gradient(90deg, #221a4b, transparent 24%);
  content: '';
}
.portal-road {
  position: absolute;
  z-index: -1;
  inset: auto -15% 15% -10%;
  height: 19%;
  transform: skewX(-22deg);
  border-top: 1px solid #baacd77a;
  background: linear-gradient(#251d40, #110c20);
}
.portal-road::after {
  position: absolute;
  inset: 57% 0 auto;
  height: 2px;
  background: repeating-linear-gradient(90deg, #ffe494ce 0 34px, transparent 34px 71px);
  content: '';
}
.portal-truck {
  position: absolute;
  right: 11%;
  bottom: 22%;
  width: min(80%, 520px);
  max-height: 57%;
  object-fit: contain;
  object-position: right bottom;
  height: auto;
  filter: drop-shadow(0 24px 13px #130a23b0);
  animation: portal-route 4.4s cubic-bezier(.17, .68, .23, 1) both;
}
@keyframes portal-route {
  from { transform: translateX(-90%); opacity: 0; }
  20% { opacity: 1; }
  to { transform: translateX(0); opacity: 1; }
}
.portal-top { display: flex; flex-wrap: wrap; align-items: end; justify-content: space-between; gap: 15px; margin-bottom: 22px; }
.tmo-demarche .portal-top h1 { font-size: clamp(39px, 5.8vw, 80px); margin: 0 0 8px; }
.portal-top p:not(.tmo-eyebrow), .portal-muted { color: var(--tmo-muted); }
.portal-session-links, .portal-actions { display: flex; flex-wrap: wrap; gap: 8px 18px; }
.portal-demo {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  margin-bottom: 18px;
  padding: 14px 16px;
  border: 1px solid #30267828;
  border-radius: 12px;
  background: #eee9f7;
  color: var(--tmo-brand);
}
#portail-demo-aide { margin-top: 4px; color: var(--tmo-muted); font-size: 14px; }
.portal-demo-roles { display: flex; flex-wrap: wrap; gap: 6px; }
.portal-demo-roles a { padding: 6px 11px; border: 1px solid #30267830; border-radius: 8px; font-size: 14px; font-weight: 650; }
.portal-demo-roles a[aria-current="page"] { background: #302678; color: #fff; }
.portal-demo-roles a:hover { text-decoration: underline; }
.portal-toolbar, .portal-month { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; margin-block: 13px; }
.portal-toolbar label { display: flex; align-items: center; gap: 9px; font-weight: 700; }
.portal-toolbar > label select { width: min(240px, 57vw); }
#portail-role:not(:empty) {
  border-radius: 99px;
  padding: 5px 11px;
  background: #eee9f7;
  color: var(--tmo-brand);
  font-size: 13px;
  font-weight: 700;
}
.portal-notifications { position: relative; z-index: 2; min-width: 0; margin-left: auto; }
.portal-notifications summary {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 9px;
  min-height: 44px;
  padding: 7px 12px;
  border: 1px solid #30267840;
  border-radius: 9px;
  background: #fff;
  color: var(--tmo-brand);
  font-size: 14px;
  font-weight: 700;
  list-style: none;
  cursor: pointer;
}
.portal-notifications summary::-webkit-details-marker { display: none; }
.portal-notifications[open] summary, .portal-notifications summary:hover { background: #eee9f7; }
.portal-bell { position: relative; width: 15px; height: 14px; border: 2px solid; border-radius: 8px 8px 3px 3px; }
.portal-bell::after { position: absolute; bottom: -5px; left: 50%; width: 5px; height: 2px; border-radius: 5px; transform: translateX(-50%); background: currentColor; content: ''; }
.portal-notifications-count { min-width: 25px; padding: 3px 5px; border-radius: 20px; background: #ffd139; color: #231a4b; font-size: 13px; text-align: center; }
.portal-notifications-panel {
  position: absolute;
  inset: calc(100% + 8px) 0 auto auto;
  width: min(24rem, calc(100vw - 2rem));
  padding: 15px;
  border: 1px solid #30267840;
  border-radius: 13px;
  background: #fff;
  box-shadow: 0 14px 34px #231a4b24;
}
.portal-notifications-panel h2 { margin: 0 0 9px; color: var(--tmo-brand); font-size: 19px; }
.portal-notifications-panel ul { display: grid; gap: 7px; max-height: min(53vh, 24rem); overflow: auto; padding: 0; margin: 0; list-style: none; }
.portal-notification { display: grid; gap: 5px; padding: 11px 12px; border-radius: 8px; background: #f5f2f8; overflow-wrap: anywhere; }
.portal-notification[data-unread] { border-left: 3px solid #e5ac00; background: #f0eaf8; }
.portal-notification strong { color: var(--tmo-brand); }
.portal-notification time { font-size: 13px; color: var(--tmo-muted); }
.portal-notification-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 14px; }
.portal-notification-actions :is(button, a) { font-size: 14px; }
.portal-notification-actions button { min-height: 38px; padding: 0; border: 0; background: transparent; text-decoration: underline; text-underline-offset: 4px; color: var(--tmo-brand); font-weight: 700; }
.portal-notification-actions button:disabled { opacity: .6; }
.portal-screen-reader { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }
.portal-panel, .portal-job {
  min-width: 0;
  padding: clamp(15px, 2.7vw, 35px);
  border: 1px solid #30267824;
  border-radius: 15px;
  background: #fff;
}
.portal-panel + .portal-panel { margin-top: 10px; }
.portal-create { padding-block: 13px; margin-block: 15px; }
.portal-create summary { color: var(--tmo-brand); font-weight: 650; cursor: pointer; }
.portal-create summary::before { margin-right: 9px; content: '+'; }
.portal-create[open] summary::before { content: '−'; }
.portal-create form { margin-top: 15px; }
.portal-tabs { display: flex; flex-wrap: wrap; gap: 5px; padding: 5px; border-radius: 12px; background: #eae4f3; }
.portal-tabs button {
  padding: 8px 13px;
  min-height: 39px;
  border: 0;
  border-radius: 8px;
  background: transparent;
  color: var(--tmo-brand);
  font-weight: 700;
  font-size: 14px;
}
.portal-tabs button[aria-pressed="true"] { background: #302678; color: #fff; }
.portal-month p { min-width: 153px; text-align: center; text-transform: capitalize; font-weight: 700; }
.tmo-inner .portal-panel h2 { margin-bottom: 14px; color: var(--tmo-brand); font-size: clamp(26px, 3vw, 41px); }
.portal-planning, .portal-access { display: grid; grid-template-columns: minmax(0, 1.25fr) minmax(0, 1fr); align-items: start; gap: 13px; }
.portal-access .portal-members { grid-column: 1 / -1; }
.portal-calendar { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); gap: 4px; }
.portal-calendar-weekday { text-align: center; font-size: 13px; color: var(--tmo-muted); }
.portal-calendar-day {
  display: grid;
  align-content: start;
  gap: 2px;
  min-height: clamp(41px, 5.25vw, 74px);
  padding: 5px 3px;
  border: 1px solid #3026782f;
  border-radius: 7px;
  background: #fff;
  color: var(--tmo-brand);
  font-weight: 700;
  text-align: center;
}
.portal-calendar-day:hover { background: #f1edf7; }
.portal-calendar-day[aria-pressed="true"] { border-color: #302678; background: #302678; color: #fff; }
.portal-calendar-day small { font-size: 10px; line-height: 1.13; }
.portal-form { display: grid; gap: 10px; justify-items: start; }
.portal-form h2 { margin: 0; }
.portal-form label, .portal-proof-form label { display: grid; min-width: 0; width: 100%; font-size: 14px; font-weight: 650; }
.portal-form :is(input, select, textarea), .portal-toolbar select, .portal-proof-form :is(input, select) {
  min-width: 0;
  min-height: 42px;
  width: 100%;
  border: 1px solid #3026786b;
  border-radius: 7px;
  padding: 7px 9px;
  margin-top: 3px;
  background: #fff;
  color: var(--tmo-ink);
  font-family: inherit;
  font-size: 16px;
  font-weight: 400;
  line-height: 1.45;
}
.portal-form textarea { resize: vertical; }
.portal-form input[type="file"], .portal-proof-form input[type="file"] { font-size: 13px; }
.portal-form fieldset { display: grid; gap: 6px; width: 100%; padding: 0; margin: 0; border: 0; }
.portal-form fieldset label { display: flex; align-items: center; gap: 9px; }
.portal-form fieldset input { min-height: auto; width: auto; margin: 0; accent-color: var(--tmo-brand); }
.portal-form .portal-muted { font-size: 14px; }
.portal-pair { display: grid; width: 100%; grid-template-columns: 1fr 1fr; gap: 8px; }
.portal-button {
  align-self: center;
  width: fit-content;
  min-height: 41px;
  padding: 8px 14px;
  border: 0;
  border-radius: 8px;
  background: #302678;
  color: #fff;
  font-size: 14px;
  font-weight: 680;
  white-space: normal;
}
.portal-button:hover:enabled { background: #211852; }
.portal-button:disabled { opacity: .55; cursor: wait; }
.portal-button.portal-small { min-height: 35px; padding: 6px 10px; font-size: 13px; }
.portal-muted { font-size: 14px; }
#portail-retour:not(:empty) { padding: 9px 12px; margin-block: 8px; border-radius: 8px; background: #ece8f5; color: var(--tmo-brand); }
#portail-retour.portal-error { color: #7c1730; background: #fae8ed; }
.portal-courses { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
.portal-job { padding: 16px; background: #fbf8ff; }
.portal-job-head { display: flex; flex-wrap: wrap; align-items: start; justify-content: space-between; gap: 7px; margin-bottom: 6px; }
.portal-job-head h3 { overflow-wrap: anywhere; font-size: 22px; font-weight: 700; color: var(--tmo-brand); }
.portal-state { padding: 4px 8px; border-radius: 99px; background: #eee9f5; color: #302678; font-size: 12px; font-weight: 700; }
.portal-state.en_cours { background: #fff1c2; color: #65451b; }
.portal-state.livree { background: #e9f3e7; color: #234f29; }
.portal-trace { display: grid; grid-template-columns: 1fr 1fr; row-gap: 4px; margin-block: 10px; font-size: 13px; }
.portal-trace dt { color: var(--tmo-muted); }
.portal-proof-form { display: flex; flex-wrap: wrap; align-items: end; gap: 7px; margin-top: 9px; }
.portal-proof-form label { width: min(100%, 290px); }
.portal-proof-form .portal-button { align-self: end; }
.portal-driver-controls, .portal-proof-list { margin-top: 9px; }
.portal-proof-list { display: flex; gap: 8px; flex-wrap: wrap; padding: 0; list-style: none; }
.portal-proof-list a { display: grid; gap: 3px; color: var(--tmo-brand); text-decoration: underline; font-size: 13px; }
.portal-proof-list img { width: 100px; height: 64px; object-fit: cover; border-radius: 6px; }
.portal-chat { display: grid; gap: 7px; max-height: 400px; overflow: auto; margin-bottom: 14px; }
.portal-message { padding: 11px 14px; border-radius: 9px; background: #f1edf7; }
.portal-message header { display: flex; flex-wrap: wrap; align-items: baseline; gap: 4px 10px; }
.portal-message header span { color: var(--tmo-muted); font-size: 12px; }
.portal-message p { margin: 5px 0; white-space: pre-wrap; overflow-wrap: anywhere; }
.portal-members ul { margin: 0; padding: 0; list-style: none; }
.portal-member { display: flex; justify-content: space-between; align-items: center; gap: 10px; padding: 8px 0; border-top: 1px solid #30267824; }
.portal-member strong { display: block; overflow-wrap: anywhere; }
.portal-member small { color: var(--tmo-muted); }

@media (max-width: 760px) {
  .portal-login, .portal-planning, .portal-access, .portal-courses { grid-template-columns: minmax(0, 1fr); }
  .portal-login-copy { padding-bottom: 0; }
  .portal-login-art { min-height: clamp(230px, 61vw, 410px); }
  .portal-login-art::after { background: linear-gradient(#221a4b, transparent 36%); }
  .portal-panel + .portal-panel { margin-top: 0; }
  .portal-calendar-day { min-height: 45px; }
  .portal-toolbar label { flex-wrap: wrap; }
  .portal-toolbar, .portal-top { align-items: start; }
  .portal-session-links { gap: 8px 14px; }
}
@media (max-width: 560px) {
  .portal-notifications { flex-basis: 100%; }
  .portal-notifications-panel { inset-inline: 0; width: 100%; }
}
@media (prefers-reduced-motion: reduce) {
  .portal-truck { animation: none; }
}
