:root {
  --bg-pink: #e8edf2;
  --screen: #f3f6f9;
  --panel: #ffffff;
  --stroke: #003b7a;
  --muted: #52606d;
  --accent: #e30613;
  --card-1: #dce8f5;
  --card-2: #e7edf3;
  --card-3: #f9e0e2;
  --card-4: #edf1f5;
  --card-5: #dce8f5;
  --card-6: #f5e5e6;
  --shadow: 0 18px 42px rgba(0, 59, 122, 0.16);
}

* {
  box-sizing: border-box;
}

[hidden] {
  display: none !important;
}

html, body {
  margin: 0;
  min-height: 100%;
  font-family: "Segoe UI", Tahoma, sans-serif;
  background: var(--bg-pink);
  color: var(--stroke);
}

body {
  display: block;
  min-height: 100dvh;
  background:
    linear-gradient(135deg, rgba(227, 6, 19, 0.12) 0 18%, transparent 18% 72%, rgba(0, 59, 122, 0.1) 72%),
    var(--bg-pink);
}

body.dark-theme {
  --bg-pink: #101820;
  --screen: #18232d;
  --panel: #22313d;
  --stroke: #e5edf3;
  --muted: #b4c1ca;
  --shadow: 0 18px 42px rgba(0, 0, 0, 0.32);
  background: #101820;
}

body.dark-theme .screen {
  background: linear-gradient(145deg, rgba(227, 6, 19, 0.12), rgba(24, 35, 45, 0.98) 58%), #18232d;
}

body.dark-theme .remaining-indicator,
body.dark-theme .today-intervention-card,
body.dark-theme .today-interventions-empty,
body.dark-theme .view-tile,
body.dark-theme .engin-status-card,
body.dark-theme .settings-information,
body.dark-theme .intervention-dialog form {
  background: #22313d;
  color: var(--stroke);
}

body.dark-theme .settings-information {
  border-color: #526875;
  border-left-color: #ff5966;
  box-shadow: 0 8px 20px rgba(0, 0, 0, 0.2);
}

body.dark-theme .intervention-dialog {
  border-color: #526875;
  background: #22313d;
  box-shadow: 0 18px 42px rgba(0, 0, 0, 0.5);
}

body.dark-theme .intervention-dialog::backdrop {
  background: rgba(0, 8, 16, 0.68);
  backdrop-filter: blur(4px);
}

body.dark-theme .dialog-close {
  border-color: #526875;
  background: #344755;
  color: var(--stroke);
}

body.dark-theme .dialog-secondary {
  border-color: #526875;
  background: #344755;
  color: var(--stroke);
}

body.dark-theme .form-grid input,
body.dark-theme .form-grid select,
body.dark-theme .form-grid textarea,
body.dark-theme .status-options select,
body.dark-theme .detail-field input,
body.dark-theme .detail-field select,
body.dark-theme .detail-field textarea {
  border-color: #526875;
  background: #18232d;
  color: var(--stroke);
}

body.dark-theme .engin-ip-panel,
body.dark-theme .search-result,
body.dark-theme .schema-file {
  border-color: #526875;
  background: #18232d;
  color: var(--stroke);
}

body.dark-theme .schema-file span,
body.dark-theme .schemas-state,
body.dark-theme .search-result span {
  color: var(--muted);
}

body.dark-theme .text-search-clear {
  border-color: #526875;
  background: #344755;
  color: var(--stroke);
}

body.dark-theme .text-search-clear:hover,
body.dark-theme .text-search-clear:focus-visible {
  border-color: #ff5966;
  background: #405565;
}

body.dark-theme .profile-chip {
  border-color: #526875;
  background: rgba(34, 49, 61, 0.96);
  color: var(--stroke);
  box-shadow: 0 8px 20px rgba(0, 0, 0, 0.28);
}

body.dark-theme .profile-icon {
  background: #344755;
}

body.dark-theme .profile-icon svg {
  stroke: #f4f8fb;
}

body.dark-theme .remaining-progress-track,
body.dark-theme .engin-percentage-track {
  background: #344755;
}

body.dark-theme .bottom-nav {
  background: rgba(34, 49, 61, 0.96);
  border-color: #526875;
  box-shadow: 0 12px 30px rgba(0, 0, 0, 0.42);
}

body.dark-theme .bottom-nav .nav-item {
  color: var(--stroke);
}

body.dark-theme .bottom-nav .nav-item.active {
  background: #d7192d;
  box-shadow: 0 7px 16px rgba(215, 25, 45, 0.38);
}

body.dark-theme .bottom-nav .intervention-count {
  border-color: #e5edf3;
  background: #18232d;
  color: #ff6b76;
}

body.dark-theme .bottom-nav .nav-item.active .intervention-count {
  border-color: #ffffff;
  background: #22313d;
  color: #ff9aa2;
}

body.dark-theme .login-form input,
body.dark-theme .detail-field input,
body.dark-theme .detail-field textarea,
body.dark-theme .detail-field select {
  background: #18232d;
  color: var(--stroke);
  border-color: #526875;
}

button {
  font: inherit;
}

.phone-shell {
  position: relative;
  display: flex;
  flex-direction: column;
  width: 100%;
  min-height: 100dvh;
}

.screen {
  position: relative;
  flex: 1;
  display: flex;
  flex-direction: column;
  min-height: 0;
  min-height: 100dvh;
  overflow: hidden;
  background:
    linear-gradient(145deg, rgba(227, 6, 19, 0.08), rgba(238, 244, 250, 0.96) 58%),
    #eef4fa;
  transition: background 0.25s ease;
}

.screen:not(.is-authenticated) .screen-content,
.screen:not(.is-authenticated) .bottom-nav {
  display: none;
}

.auth-screen {
  display: flex;
  flex: 1;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  padding: 34px 28px 42px;
  color: var(--stroke);
}

.auth-screen > * {
  width: min(100%, 560px);
}

.screen.is-authenticated .auth-screen {
  display: none;
}

.auth-brand {
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 54px;
}

.auth-logo {
  display: block;
  width: 130px;
  height: 130px;
  border-radius: 20px;
  object-fit: cover;
}

.auth-copy {
  max-width: 560px;
  text-align: center;
}

.auth-kicker {
  margin: 0 0 8px;
  color: var(--accent);
  font-size: 0.7rem;
  font-weight: 800;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.auth-copy h1 {
  margin: 0;
  font-size: 2.15rem;
  line-height: 1.05;
  letter-spacing: -0.05em;
}

.auth-copy p:last-child {
  margin: 12px 0 0;
  color: var(--muted);
  font-size: 0.9rem;
  line-height: 1.45;
}

.login-form {
  display: grid;
  gap: 14px;
  margin-top: 34px;
}

.login-form label {
  display: grid;
  gap: 7px;
  color: var(--stroke);
  font-size: 0.76rem;
  font-weight: 700;
  text-align: center;
}

.login-form input {
  width: 100%;
  border: 2px solid #b8c9da;
  border-radius: 10px;
  padding: 12px;
  background: #ffffff;
  color: var(--stroke);
  font: inherit;
  font-size: 0.84rem;
}

.login-form input:focus {
  outline: 3px solid rgba(227, 6, 19, 0.2);
  border-color: var(--accent);
}

.login-submit {
  margin-top: 6px;
  border: 2px solid var(--accent);
  border-radius: 10px;
  padding: 12px 16px;
  background: var(--accent);
  color: #ffffff;
  font: inherit;
  font-weight: 800;
  cursor: pointer;
}

.login-error {
  margin: 0;
  color: var(--accent);
  font-size: 0.78rem;
  text-align: center;
}

.auth-note {
  margin: auto 0 0;
  color: var(--muted);
  font-size: 0.7rem;
  text-align: center;
}

.screen-content {
  flex: 1;
  min-height: 0;
  overflow-y: auto;
  overflow-x: hidden;
  overscroll-behavior-y: contain;
  -webkit-overflow-scrolling: touch;
  padding: 12px 18px 110px;
  scrollbar-width: none;
  -ms-overflow-style: none;
}

.screen-content::-webkit-scrollbar {
  display: none;
}

.screen-content.view-carousel-enter {
  animation: view-carousel-enter 1.5s cubic-bezier(0.22, 0.8, 0.24, 1);
}

.screen-content[data-transition-direction="backward"].view-carousel-enter {
  animation-name: view-carousel-enter-backward;
}

@keyframes view-carousel-enter {
  from {
    opacity: 0.45;
    transform: perspective(900px) translateX(42px) rotateY(-18deg) scale(0.985);
    filter: blur(2px);
  }

  to {
    opacity: 1;
    transform: perspective(900px) translateX(0) rotateY(0) scale(1);
    filter: blur(0);
  }
}

@keyframes view-carousel-enter-backward {
  from {
    opacity: 0.45;
    transform: perspective(900px) translateX(-42px) rotateY(18deg) scale(0.985);
    filter: blur(2px);
  }

  to {
    opacity: 1;
    transform: perspective(900px) translateX(0) rotateY(0) scale(1);
    filter: blur(0);
  }
}

@media (prefers-reduced-motion: reduce) {
  .screen-content.view-carousel-enter {
    animation: none;
  }
}

.app-header {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-top: 2px;
  margin-bottom: 18px;
}

.profile-chip {
  position: absolute;
  right: 0;
  top: 0;
  appearance: none;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: var(--stroke);
  font-size: 0.82rem;
  font-weight: 700;
  font-family: inherit;
  cursor: pointer;
}

.profile-icon {
  display: grid;
  place-items: center;
  width: 32px;
  height: 32px;
  border: 2px solid var(--stroke);
  border-radius: 50%;
  background: #ffffff;
}

.profile-icon svg {
  width: 19px;
  height: 19px;
  fill: none;
  stroke: var(--stroke);
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.screen:not([data-view="Aujourd’hui"]) .profile-chip {
  visibility: hidden;
}

.logout-btn {
  position: absolute;
  top: 0;
  right: 0;
  display: none;
  border: 2px solid var(--accent);
  border-radius: 8px;
  padding: 7px 10px;
  background: var(--accent);
  color: #ffffff;
  font-size: 0.72rem;
  font-weight: 800;
  cursor: pointer;
}

.screen[data-view="Paramètres"] .logout-btn {
  display: block;
}

.logout-btn:focus-visible {
  outline: 3px solid rgba(227, 6, 19, 0.25);
  outline-offset: 2px;
}

.icon-btn {
  appearance: none;
  background: transparent;
  border: none;
  padding: 0;
  cursor: pointer;
}

.search-btn {
  width: 32px;
  height: 32px;
  display: grid;
  place-items: center;
  border-radius: 50%;
}

.search-btn svg {
  width: 22px;
  height: 22px;
  stroke: var(--stroke);
  fill: none;
  stroke-width: 2.2;
  stroke-linecap: round;
}

.intro {
  margin-bottom: 8px;
}

.intro h1 {
  margin: 0;
  font-size: 1.55rem;
  line-height: 1.2;
  letter-spacing: -0.04em;
  font-weight: 700;
}

.intro p {
  margin: 6px 0 0;
  color: var(--muted);
  font-size: 0.95rem;
}

.today-panel {
  margin-top: 24px;
  padding-bottom: 96px;
}

#todayPanel {
  padding-bottom: 12px;
}

#treatedPanel {
  margin-top: 8px;
}

.today-panel[hidden] {
  display: none;
}

.today-panel h2 {
  margin: 0 0 10px;
  font-size: 1rem;
}

.remaining-indicator {
  margin-bottom: 24px;
  padding: 18px;
  border: 1px solid rgba(0, 59, 122, 0.12);
  border-radius: 18px;
  background: linear-gradient(135deg, #ffffff 0%, #f4f8fc 100%);
  box-shadow: 0 10px 24px rgba(0, 59, 122, 0.1);
}

.remaining-indicator-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.remaining-indicator-header h2,
.engin-status-chart-header h2 {
  margin: 0;
  font-size: 1.05rem;
  letter-spacing: -0.02em;
  color: var(--stroke);
}

.remaining-indicator-kicker {
  margin: 0 0 4px;
  color: var(--accent);
  font-size: 0.64rem;
  font-weight: 800;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.engin-status-chart-header .remaining-indicator-kicker {
  color: var(--accent);
}

.remaining-indicator-header strong {
  color: var(--stroke);
  font-size: 1.45rem;
  letter-spacing: -0.04em;
}

.remaining-progress-track {
  height: 8px;
  margin-top: 12px;
  overflow: hidden;
  border-radius: 999px;
  background: #dce7f1;
}

.remaining-progress-bar {
  width: 0;
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, var(--accent), #ff5963);
  transition: width 0.35s ease;
}

.remaining-indicator p {
  margin: 8px 0 0;
  color: var(--muted);
  font-size: 0.72rem;
}

.today-rotation {
  min-height: 156px;
}

.today-rotation-panel[hidden] {
  display: none;
}

.today-rotation-panel {
  min-height: 156px;
  margin-bottom: 24px;
  padding: 18px;
  border: 1px solid rgba(0, 59, 122, 0.12);
  border-radius: 18px;
  background: linear-gradient(135deg, #ffffff 0%, #f4f8fc 100%);
  box-shadow: 0 10px 24px rgba(0, 59, 122, 0.1);
}

.engin-status-chart {
  margin-bottom: 24px;
  text-align: left;
}

.intervention-engin-status {
  grid-column: 1 / -1;
}

.intervention-etat-parc {
  grid-column: 1 / -1;
}

.troubleshooting-search {
  grid-column: 1 / -1;
}

.intervention-etat-parc-progress {
  background: #16803c;
}

.engin-status-chart-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
  text-align: left;
}

.engin-status-summary {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 5px 10px;
  color: var(--muted);
  font-size: 0.68rem;
  font-weight: 700;
  text-align: right;
}

.engin-status-summary span {
  white-space: nowrap;
}

.engin-status-summary strong {
  margin-left: 2px;
  font-size: 0.82rem;
}

.engin-summary-ok {
  color: #16803c;
}

.engin-summary-en-cours {
  color: #1976d2;
}

.engin-summary-hsc {
  color: #e30613;
}

.engin-status-chart-header > span {
  align-self: flex-start;
  color: var(--muted);
  font-size: 0.68rem;
  text-align: left;
}

.engin-status-bars {
  display: grid;
  gap: 10px;
  margin-top: 18px;
}

.engin-percentage-track {
  display: flex;
  height: 14px;
  overflow: hidden;
  border-radius: 999px;
  background: #dce7f1;
}

.engin-percentage-segment {
  min-width: 0;
  height: 100%;
  transition: width 0.35s ease;
}

.engin-percentage-legend {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 8px;
  margin-top: 12px;
}

.engin-percentage-row {
  min-width: 0;
}

.engin-percentage-label {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  color: var(--stroke);
  font-size: 0.74rem;
  font-weight: 700;
  white-space: nowrap;
}

.engin-percentage-label strong {
  font-size: 0.86rem;
}

.engin-percentage-ok {
  background: #16803c;
}

.engin-percentage-en-cours {
  background: #1976d2;
}

.engin-percentage-hsc {
  background: #e30613;
}

.engin-percentage-label.engin-percentage-ok {
  color: #16803c;
  background: transparent;
}

.engin-percentage-label.engin-percentage-en-cours {
  color: #1976d2;
  background: transparent;
}

.engin-percentage-label.engin-percentage-hsc {
  color: #e30613;
  background: transparent;
}

.today-interventions-list {
  display: grid;
  gap: 8px;
}

.today-intervention-card,
.today-interventions-empty {
  margin: 0;
  padding: 12px;
  border: 2px solid var(--stroke);
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.82);
}

.today-intervention-card {
  position: relative;
  width: 100%;
  border: 2px solid var(--stroke);
  text-align: left;
  color: var(--stroke);
  font: inherit;
  display: grid;
  gap: 4px;
  cursor: pointer;
}

.pending-delete-action {
  position: absolute;
  top: 50%;
  right: 12px;
  transform: translateY(-50%);
  border: 2px solid var(--accent);
  border-radius: 8px;
  padding: 7px 9px;
  background: var(--accent);
  color: #ffffff;
  font: inherit;
  font-size: 0.7rem;
  font-weight: 700;
  cursor: pointer;
}

.pending-delete-action:hover {
  background: #c90511;
}

.today-intervention-card:hover {
  background: #ffffff;
}

.today-intervention-status {
  position: absolute;
  top: 50%;
  right: 12px;
  margin: 0;
  transform: translateY(-50%);
  color: var(--stroke);
  font-size: 0.72rem;
  font-weight: 700;
  text-align: right;
}

.treated-intervention-card .today-intervention-status {
  font-size: 1rem;
  font-weight: 800;
}

.treated-intervention-card .treated-status-ok {
  color: #16803c;
}

.treated-intervention-card .treated-status-hsc {
  color: var(--accent);
}

.today-intervention-card strong {
  font-size: 0.82rem;
}

.today-intervention-card span,
.today-intervention-card p,
.today-interventions-empty {
  color: var(--muted);
  font-size: 0.72rem;
}

.today-intervention-card p {
  margin: 4px 0 0;
  line-height: 1.3;
}

.detail-summary {
  margin-bottom: 16px;
  color: var(--stroke);
  font-size: 0.85rem;
  font-weight: 700;
}

.engin-ip-panel {
  display: grid;
  gap: 6px;
  min-width: 120px;
  align-content: center;
  padding: 10px 12px;
  border: 2px solid #b8c9da;
  border-radius: 10px;
  background: #f7fbff;
  color: var(--stroke);
}

.engin-ip-label {
  font-size: 0.68rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--muted);
}

#enginIpValue {
  font-size: 0.82rem;
}

.search-result {
  display: grid;
  gap: 6px;
  margin-top: 14px;
  padding: 14px 12px;
  border-radius: 12px;
  background: #f3f9ff;
  border: 2px solid #b8c9da;
  color: var(--stroke);
}

.search-result span {
  font-size: 0.72rem;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: var(--muted);
}

.search-result strong {
  font-size: 1rem;
}

.search-dialog .dialog-header {
  margin-bottom: 18px;
}

.search-form-grid {
  gap: 14px 12px;
}

.search-form-grid label {
  display: grid;
  gap: 6px;
  color: var(--stroke);
  font-size: 0.76rem;
  font-weight: 700;
}

.search-form-grid select {
  width: 100%;
  border: 2px solid #b8c9da;
  border-radius: 10px;
  padding: 10px;
  background: #ffffff;
  color: var(--stroke);
  font: inherit;
  font-size: 0.82rem;
}

.search-form-grid select:focus {
  outline: 3px solid rgba(227, 6, 19, 0.2);
  border-color: var(--accent);
}

.search-result-panel {
  grid-column: 1 / -1;
}

.text-search-control {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 30px;
  align-items: end;
  gap: 8px;
}

.text-search-control .detail-field {
  margin-top: 14px;
}

.text-search-control .detail-field input {
  padding-right: 10px;
}

.text-search-clear {
  display: grid;
  width: 30px;
  height: 30px;
  margin-bottom: 5px;
  place-items: center;
  border: 1px solid #b8c9da;
  border-radius: 50%;
  background: #eef4f9;
  color: var(--stroke);
  font-size: 1.2rem;
  line-height: 1;
  cursor: pointer;
}

.text-search-clear:hover,
.text-search-clear:focus-visible {
  border-color: var(--accent);
  background: #ffffff;
}

.text-search-clear:focus-visible {
  outline: 3px solid rgba(227, 6, 19, 0.2);
  outline-offset: 2px;
}

.detail-field {
  display: grid;
  gap: 6px;
  margin-top: 14px;
  color: var(--stroke);
  font-size: 0.76rem;
  font-weight: 700;
}

.detail-field textarea,
.detail-field input {
  width: 100%;
  border: 2px solid #b8c9da;
  border-radius: 10px;
  padding: 10px;
  background: #ffffff;
  color: var(--stroke);
  font: inherit;
  font-size: 0.82rem;
}

.detail-field textarea {
  resize: vertical;
}

.status-ok {
  background: #16803c !important;
}

.status-hsc {
  background: var(--accent) !important;
}

.photo-preview {
  display: block;
  width: 100%;
  max-height: 180px;
  margin-top: 12px;
  border-radius: 10px;
  object-fit: cover;
}

.view-panel {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
  margin-top: 24px;
  padding-bottom: 96px;
}

.view-panel[hidden] {
  display: none;
}

.settings-information {
  display: grid;
  grid-column: 1 / -1;
  gap: 7px;
  margin-top: 4px;
  border: 1px solid var(--line);
  border-left: 4px solid var(--accent);
  border-radius: var(--radius-control);
  padding: 14px;
  background: var(--surface-soft);
  color: var(--stroke);
  font-size: 0.76rem;
  font-weight: 700;
}

.settings-information p {
  margin: 0;
  color: var(--muted);
  font-size: 0.82rem;
  font-weight: 400;
  line-height: 1.5;
}

.classified-interventions-panel {
  display: block;
}

.classified-interventions-panel .today-interventions-list {
  margin-top: 18px;
}

.classified-interventions-panel > .view-tile {
  width: 100%;
  margin-top: 18px;
}

.view-tile {
  min-height: 112px;
  padding: 16px 12px;
  border: 2px solid var(--stroke);
  border-radius: 18px;
  background: #ffffff;
  color: var(--stroke);
  text-align: center;
  cursor: pointer;
  box-shadow: 0 5px 0 rgba(31, 31, 31, 0.1);
}

.view-tile strong,
.view-tile span {
  display: block;
}

.view-tile strong {
  font-size: 0.95rem;
}

.view-tile span {
  margin-top: 8px;
  color: var(--muted);
  font-size: 0.72rem;
  line-height: 1.3;
}

.view-tile:active {
  transform: translateY(3px);
  box-shadow: 0 2px 0 rgba(31, 31, 31, 0.1);
}

.schemas-dialog form {
  max-height: min(80dvh, 620px);
}

.schemas-list {
  display: grid;
  gap: 10px;
  max-height: 52dvh;
  overflow-y: auto;
}

.schema-file {
  display: flex;
  width: 100%;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  border: 1px solid #b8c9da;
  border-radius: 10px;
  padding: 12px 14px;
  color: var(--stroke);
  background: #ffffff;
  text-decoration: none;
}

.schema-file strong {
  min-width: 0;
  overflow-wrap: anywhere;
}

.schema-file span {
  flex: 0 0 auto;
  color: var(--muted);
  font-size: 0.75rem;
}

.schemas-state {
  margin: 8px 0;
  color: var(--muted);
  font-size: 0.84rem;
  text-align: center;
}
}

.view-section-heading {
  grid-column: 1 / -1;
}

.view-section-heading h2,
.view-section-heading p {
  margin: 0;
}

.view-section-heading p {
  margin-top: 6px;
  color: var(--muted);
  font-size: 0.78rem;
}

.engin-status-list {
  display: grid;
  grid-column: 1 / -1;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
}

.engin-status-card {
  display: flex;
  min-height: 68px;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  padding: 12px;
  border: 2px solid #b8c9da;
  border-radius: 12px;
  background: #ffffff;
  cursor: pointer;
}

.engin-status-card:focus-visible {
  outline: 3px solid rgba(227, 6, 19, 0.25);
  outline-offset: 2px;
}

.engin-status-card strong {
  font-size: 0.86rem;
}

.engin-status-value {
  color: var(--muted);
  font-size: 0.72rem;
  font-weight: 700;
  text-align: right;
}

.engin-status-en-cours {
  color: var(--accent);
}

.engin-status-ok {
  color: #16803c;
}

.engin-status-hsc {
  color: var(--accent);
}

.etat-parc-panel > #backToInterventionBtn {
  grid-column: 1 / -1;
}

.intervention-dialog {
  width: min(92vw, 380px);
  padding: 0;
  border: 3px solid var(--stroke);
  border-radius: 22px;
  color: var(--stroke);
  box-shadow: 0 18px 42px rgba(0, 59, 122, 0.28);
}

.intervention-dialog::backdrop {
  background: rgba(0, 31, 64, 0.48);
  backdrop-filter: blur(3px);
}

.intervention-dialog form {
  padding: 22px;
  background: #f8fbfe;
}

.dialog-header {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 20px;
}

.dialog-kicker {
  margin: 0 0 4px;
  color: var(--accent);
  font-size: 0.72rem;
  font-weight: 700;
  text-transform: uppercase;
}

.dialog-header h2 {
  margin: 0;
  font-size: 1.2rem;
}

.notification-toggle {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  color: var(--stroke);
  font-size: 0.82rem;
  font-weight: 700;
}

.notification-toggle input {
  width: 20px;
  height: 20px;
  accent-color: var(--accent);
}

.theme-options {
  display: grid;
  gap: 10px;
  margin: 0;
  padding: 0;
  border: 0;
}

.theme-options legend {
  margin-bottom: 2px;
  color: var(--stroke);
  font-size: 0.76rem;
  font-weight: 700;
}

.theme-options label {
  display: flex;
  align-items: center;
  gap: 8px;
  color: var(--stroke);
  font-size: 0.82rem;
}

.theme-options input {
  accent-color: var(--accent);
}

.team-options {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.dialog-close {
  align-self: flex-start;
  width: 30px;
  height: 30px;
  border: 2px solid var(--stroke);
  border-radius: 50%;
  background: #ffffff;
  color: var(--stroke);
  font-size: 1.3rem;
  line-height: 1;
  cursor: pointer;
}

.form-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px 12px;
}

.form-grid label {
  display: grid;
  gap: 6px;
  color: var(--stroke);
  font-size: 0.76rem;
  font-weight: 700;
}

.priority-field {
  grid-column: 1 / -1;
  justify-items: center;
  text-align: center;
}

.priority-field select {
  min-width: 150px;
  text-align: center;
}

.form-grid input,
.form-grid select,
.form-grid textarea {
  width: 100%;
  border: 2px solid #b8c9da;
  border-radius: 10px;
  padding: 10px;
  background: #ffffff;
  color: var(--stroke);
  font: inherit;
  font-size: 0.82rem;
}

.form-grid textarea {
  resize: vertical;
}

.form-grid input:focus,
.form-grid select:focus,
.form-grid textarea:focus {
  outline: 3px solid rgba(227, 6, 19, 0.2);
  border-color: var(--accent);
}

.form-field-full {
  grid-column: 1 / -1;
}

.dialog-actions {
  display: flex;
  justify-content: center;
  gap: 10px;
  margin-top: 22px;
}

.dialog-actions button {
  border: 2px solid var(--stroke);
  border-radius: 10px;
  padding: 10px 14px;
  font-weight: 700;
  cursor: pointer;
}

.detail-actions {
  justify-content: center;
}

.dialog-secondary {
  background: #ffffff;
  color: var(--stroke);
}

.dialog-primary {
  border-color: var(--accent) !important;
  background: var(--accent);
  color: #ffffff;
}

.pattern-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
  margin-top: 8px;
  padding-bottom: 18px;
}

.pattern-card {
  position: relative;
  height: 150px;
  border: 3px solid var(--stroke);
  border-radius: 28px;
  overflow: hidden;
  background: #fff;
  box-shadow: inset 0 0 0 1px rgba(0,0,0,0.04);
  transition: transform 0.22s ease, box-shadow 0.22s ease, filter 0.22s ease;
  cursor: pointer;
}

.pattern-card:hover {
  transform: translateY(-4px) scale(1.01);
  box-shadow: 0 14px 20px rgba(17, 17, 17, 0.09);
  filter: saturate(1.05);
}

.pattern-card:active {
  transform: translateY(-1px) scale(0.995);
}

.pattern-card:nth-child(1) {
  background: var(--card-1);
}

.pattern-card:nth-child(2) {
  background: var(--card-2);
}

.pattern-card:nth-child(3) {
  background: var(--card-3);
}

.pattern-card:nth-child(4) {
  background: var(--card-4);
}

.pattern-card:nth-child(5) {
  background: var(--card-5);
}

.pattern-card:nth-child(6) {
  background: var(--card-6);
}

.pattern-art {
  position: absolute;
  inset: 0;
}

.pattern-art::before,
.pattern-art::after {
  content: "";
  position: absolute;
}

.art-1 {
  background: radial-gradient(circle at center, rgba(0,0,0,0.15) 0 12%, transparent 13%),
    radial-gradient(circle at 25% 30%, #3d3d3d 0 8%, transparent 10%),
    radial-gradient(circle at 75% 36%, #3d3d3d 0 8%, transparent 10%),
    radial-gradient(circle at 45% 68%, #3d3d3d 0 8%, transparent 10%),
    radial-gradient(circle at 80% 82%, #3d3d3d 0 8%, transparent 10%);
  background-color: #f4e7d6;
}

.art-1::before {
  inset: 24px 20px 16px 20px;
  border-radius: 50% 50% 40% 40%;
  border: 3px solid rgba(31,31,31,0.8);
  background: radial-gradient(circle at center, rgba(0,0,0,0.2) 0 40%, transparent 41%);
}

.art-1::after {
  left: 18px;
  right: 18px;
  bottom: 20px;
  height: 30px;
  border-radius: 50%;
  border: 3px solid rgba(31,31,31,0.8);
  border-top: 0;
  background: rgba(255,255,255,0.18);
}

.art-2 {
  background: linear-gradient(180deg, #f0f4ec 0%, #f0f4ec 100%);
}

.art-2::before {
  width: 80px;
  height: 80px;
  left: 50%;
  top: 50%;
  transform: translate(-50%, -50%);
  border-radius: 50%;
  border: 3px solid var(--stroke);
  background: radial-gradient(circle at center, transparent 0 36%, #f7d25f 36% 42%, transparent 43%);
}

.art-2::after {
  inset: 28px 32px 30px 32px;
  border-radius: 50%;
  border: 3px solid var(--stroke);
  background: rgba(255,255,255,0.15);
}

.art-3 {
  background: linear-gradient(135deg, rgba(255,255,255,0.15), rgba(255,255,255,0));
}

.art-3::before {
  left: 24px;
  right: 24px;
  top: 28px;
  bottom: 18px;
  border-radius: 50% 50% 40% 40%;
  border: 3px solid var(--stroke);
  background:
    radial-gradient(circle at 50% 50%, rgba(31,31,31,0.3) 0 9%, transparent 10%) 0 0 / 25% 25%,
    linear-gradient(0deg, transparent 0 58%, rgba(31,31,31,0.9) 58% 60%, transparent 60%);
}

.art-3::after {
  left: 50%;
  top: 50%;
  width: 90px;
  height: 90px;
  transform: translate(-50%, -50%);
  border-radius: 50%;
  border: 3px solid var(--stroke);
  background: rgba(255,255,255,0.2);
}

.art-4 {
  background: #f9e8f1;
}

.art-4::before {
  inset: 22px 22px 22px 22px;
  border-radius: 50%;
  border: 3px solid var(--stroke);
  background: radial-gradient(circle at center, #f5c66a 0 18%, transparent 18% 100%);
}

.art-4::after {
  width: 110px;
  height: 110px;
  left: 18px;
  top: 18px;
  border: 3px solid var(--stroke);
  border-radius: 50% 50% 0 50%;
  background: rgba(255,255,255,0.12);
}

.art-5 {
  background: linear-gradient(180deg, #efecff 0%, #efecff 100%);
}

.art-5::before {
  width: 120px;
  height: 120px;
  left: 50%;
  top: 50%;
  transform: translate(-50%, -50%);
  border-radius: 50%;
  border: 3px solid var(--stroke);
  background: radial-gradient(circle at center, rgba(0,0,0,0.2) 0 22%, transparent 23% 100%);
}

.art-5::after {
  inset: 24px 18px 28px 18px;
  border-radius: 24px;
  border: 3px solid var(--stroke);
  background: rgba(255,255,255,0.14);
}

.art-6 {
  background: #dff2ed;
}

.art-6::before {
  inset: 22px 24px 20px 24px;
  border: 3px solid var(--stroke);
  border-radius: 50%;
  background: radial-gradient(circle at 50% 50%, rgba(255,255,255,0.75) 0 22%, transparent 22% 100%);
}

.art-6::after {
  left: 22px;
  right: 22px;
  bottom: 18px;
  height: 28px;
  border: 3px solid var(--stroke);
  border-top: 0;
  border-radius: 0 0 18px 18px;
  background: rgba(255,255,255,0.22);
}

.bottom-nav {
  position: fixed;
  left: 50%;
  bottom: 18px;
  z-index: 10;
  display: flex;
  justify-content: center;
  align-items: center;
  width: fit-content;
  gap: 2px;
  transform: translateX(-50%);
  padding: 8px 10px 6px;
  background: rgba(255, 255, 255, 0.82);
  -webkit-backdrop-filter: blur(12px);
  backdrop-filter: blur(12px);
  border: 2px solid var(--stroke);
  border-radius: 24px;
  box-shadow: 0 8px 18px rgba(17, 17, 17, 0.12);
}

@media (max-width: 600px) {
  body {
    min-width: 320px;
  }

  .screen-content {
    min-height: 0;
    max-height: calc(100dvh - env(safe-area-inset-top));
    padding-right: 14px;
    padding-left: 14px;
    padding-bottom: 108px;
  }

  .auth-screen {
    padding: 28px 20px calc(28px + env(safe-area-inset-bottom));
  }

  .bottom-nav {
    right: 10px;
    bottom: calc(10px + env(safe-area-inset-bottom));
    left: 10px;
    width: auto;
    padding: 6px 5px 5px;
    transform: none;
  }

  .nav-item {
    flex: 1;
    width: auto;
    min-width: 0;
    height: 56px;
  }

  .nav-label {
    max-width: calc(100% - 4px);
    overflow: hidden;
    text-overflow: ellipsis;
  }
}

.nav-item {
  width: 78px;
  height: 58px;
  border: none;
  background: transparent;
  position: relative;
  cursor: pointer;
}

.nav-item.active {
  background: var(--accent);
  border: 2px solid var(--accent);
  border-radius: 12px;
}

.nav-item.active .dot,
.nav-item.active .nav-symbol {
  filter: brightness(0) invert(1);
}

.nav-item.active .nav-label {
  color: #ffffff;
}

.dot,
.stack,
.heart,
.user {
  position: absolute;
  left: 50%;
  top: 15px;
  transform: translate(-50%, -50%);
}

.nav-symbol {
  position: absolute;
  left: 50%;
  top: 15px;
  width: 22px;
  height: 22px;
  transform: translate(-50%, -50%);
  fill: none;
  stroke: var(--stroke);
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.intervention-count {
  position: absolute;
  top: 2px;
  right: 15px;
  min-width: 18px;
  height: 18px;
  padding: 2px 5px;
  border: 2px solid var(--stroke);
  border-radius: 10px;
  background: #ffffff;
  color: var(--accent);
  font-size: 0.65rem;
  font-weight: 700;
  line-height: 1;
  text-align: center;
}

.nav-item.active .intervention-count {
  border-color: #ffffff;
}

.nav-label {
  position: absolute;
  left: 50%;
  bottom: 5px;
  transform: translateX(-50%);
  color: var(--stroke);
  font-size: 0.65rem;
  font-weight: 600;
  line-height: 1;
  white-space: nowrap;
}

:root {
  --stroke: #003b7a;
  --muted: #5b6875;
  --accent: #e30613;
  --screen: #f3f6f9;
  --surface: #ffffff;
  --surface-soft: #edf2f6;
  --line: rgba(0, 59, 122, 0.14);
  --shadow: 0 18px 45px rgba(0, 59, 122, 0.1);
}

html,
body {
  font-family: "Avenir Next", "Trebuchet MS", sans-serif;
  background: #e8eef5;
}

body {
  background:
    linear-gradient(118deg, rgba(0, 59, 122, 0.1) 0 14%, transparent 14% 84%, rgba(227, 6, 19, 0.1) 84%),
    linear-gradient(145deg, #f7f9fb 0%, #e3eaf1 100%);
}

.screen {
  background:
    linear-gradient(160deg, rgba(255, 255, 255, 0.96), rgba(238, 243, 248, 0.98)),
    var(--screen);
}

.screen-content {
  padding-top: 24px;
}

.app-header {
  margin-bottom: 28px;
}

.profile-chip {
  top: 0;
  gap: 9px;
  padding: 5px 8px 5px 5px;
  border: 1px solid rgba(16, 45, 80, 0.1);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.8);
  box-shadow: 0 5px 16px rgba(16, 45, 80, 0.08);
}

.profile-icon {
  width: 29px;
  height: 29px;
  border: none;
  background: #e9eff6;
}

.profile-icon svg {
  width: 17px;
  height: 17px;
}

.profile-name {
  padding-right: 3px;
  font-size: 0.74rem;
}

.intro h1 {
  font-size: clamp(1.8rem, 5vw, 2.35rem);
  letter-spacing: -0.06em;
}

.intro p {
  margin-top: 8px;
  font-size: 0.88rem;
}

.today-panel {
  margin-top: 30px;
}

.today-panel > h2 {
  margin-bottom: 12px;
  color: var(--stroke);
  font-size: 0.75rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.remaining-indicator {
  margin-bottom: 28px;
  border: 1px solid rgba(16, 45, 80, 0.09);
  border-radius: 20px;
  box-shadow: 0 14px 32px rgba(16, 45, 80, 0.09);
}

.today-intervention-card,
.today-interventions-empty {
  border: 1px solid rgba(16, 45, 80, 0.1);
  border-radius: 16px;
  background: rgba(255, 255, 255, 0.88);
  box-shadow: 0 6px 18px rgba(16, 45, 80, 0.06);
}

.today-intervention-card {
  min-height: 76px;
  padding: 15px;
  transition: transform 0.2s ease, box-shadow 0.2s ease, border-color 0.2s ease;
}

.today-intervention-card:hover {
  border-color: rgba(215, 25, 45, 0.35);
  box-shadow: 0 10px 24px rgba(16, 45, 80, 0.1);
  transform: translateY(-2px);
}

.today-intervention-card strong {
  font-size: 0.86rem;
}

.pending-delete-action {
  border: none;
  border-radius: 999px;
  padding: 8px 12px;
  box-shadow: 0 5px 12px rgba(215, 25, 45, 0.2);
}

.view-panel {
  gap: 14px;
  margin-top: 30px;
}

.view-tile {
  min-height: 124px;
  padding: 18px 15px;
  border: 1px solid rgba(16, 45, 80, 0.1);
  border-radius: 16px;
  background: rgba(255, 255, 255, 0.88);
  box-shadow: 0 8px 20px rgba(16, 45, 80, 0.07);
  transition: transform 0.2s ease, box-shadow 0.2s ease, border-color 0.2s ease;
}

.view-tile:hover {
  border-color: rgba(215, 25, 45, 0.3);
  box-shadow: 0 12px 26px rgba(16, 45, 80, 0.11);
  transform: translateY(-2px);
}

.view-tile strong {
  font-size: 0.9rem;
}

.view-tile span {
  margin-top: 10px;
  line-height: 1.45;
}

.bottom-nav {
  bottom: 16px;
  padding: 6px 7px;
  border: 1px solid rgba(16, 45, 80, 0.12);
  border-radius: 20px;
  background: rgba(255, 255, 255, 0.78);
  box-shadow: 0 12px 28px rgba(16, 45, 80, 0.15);
}

.nav-item {
  height: 56px;
  border-radius: 14px;
}

.nav-item.active {
  border: none;
  border-radius: 13px;
  background: var(--accent);
  box-shadow: 0 6px 14px rgba(215, 25, 45, 0.2);
}

.nav-label {
  font-size: 0.62rem;
}

.intervention-dialog {
  border: 1px solid rgba(16, 45, 80, 0.14);
  border-radius: 20px;
  box-shadow: 0 24px 60px rgba(16, 45, 80, 0.22);
}

.intervention-dialog form {
  background: #fbfdff;
}

.dialog-close {
  border: 1px solid rgba(16, 45, 80, 0.15);
  background: #edf3f8;
}

.dialog-primary,
.login-submit {
  border: none !important;
  border-radius: 999px !important;
  box-shadow: 0 7px 15px rgba(215, 25, 45, 0.2);
}

@media (max-width: 600px) {
  .screen-content {
    padding-top: 18px;
  }

  .bottom-nav {
    bottom: calc(10px + env(safe-area-inset-bottom));
  }
}

.bottom-nav {
  bottom: 16px;
  padding: 6px 7px;
  border: 1px solid rgba(16, 45, 80, 0.12);
  border-radius: 20px;
  background: rgba(255, 255, 255, 0.78);
  box-shadow: 0 12px 28px rgba(16, 45, 80, 0.15);
}

.nav-item {
  height: 56px;
  border-radius: 14px;
}

.nav-item.active {
  border: none;
  border-radius: 13px;
  background: var(--accent);
  box-shadow: 0 6px 14px rgba(215, 25, 45, 0.2);
}

@media (max-width: 600px) {
  .bottom-nav {
    bottom: calc(10px + env(safe-area-inset-bottom));
  }
}

:root {
  --surface: rgba(255, 255, 255, 0.9);
  --surface-soft: #f5f8fc;
  --line: rgba(16, 45, 80, 0.12);
  --radius-card: 16px;
  --radius-control: 10px;
  --shadow-card: 0 8px 22px rgba(16, 45, 80, 0.08);
}

.remaining-indicator,
.today-rotation-panel,
.today-intervention-card,
.today-interventions-empty,
.view-tile,
.engin-status-card {
  border: 1px solid var(--line);
  border-radius: var(--radius-card);
  background: var(--surface);
  box-shadow: var(--shadow-card);
}

.view-tile,
.today-intervention-card,
.engin-status-card {
  transition: transform 0.2s ease, box-shadow 0.2s ease, border-color 0.2s ease;
}

.view-tile:hover,
.today-intervention-card:hover,
.engin-status-card:hover {
  border-color: rgba(215, 25, 45, 0.3);
  box-shadow: 0 12px 26px rgba(16, 45, 80, 0.11);
  transform: translateY(-2px);
}

.login-form input,
.detail-field input,
.detail-field textarea,
.detail-field select,
.form-grid input,
.form-grid select,
.form-grid textarea,
.schema-file {
  border: 1px solid #b8c9da;
  border-radius: var(--radius-control);
  background: var(--surface);
}

.intervention-dialog {
  border: 1px solid var(--line);
  border-radius: 20px;
  box-shadow: 0 24px 60px rgba(16, 45, 80, 0.22);
}

.intervention-dialog form {
  background: var(--surface-soft);
}

.dialog-actions button,
.login-submit {
  border-radius: var(--radius-control);
}

.text-search-results {
  display: grid;
  gap: 8px;
  margin-top: 14px;
  color: var(--muted);
  font-size: 0.8rem;
  line-height: 1.4;
}

.text-search-results:empty {
  display: none;
}

.text-search-result {
  margin: 0;
  padding: 10px 12px;
  border: 1px solid var(--line);
  border-radius: var(--radius-control);
  background: var(--surface-soft);
  color: var(--stroke);
  white-space: pre-wrap;
  overflow-wrap: anywhere;
}

.dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: var(--stroke);
}

.stack::before,
.stack::after {
  content: "";
  position: absolute;
  width: 16px;
  height: 12px;
  border: 2px solid var(--stroke);
  border-radius: 4px;
  background: transparent;
}

.stack::before {
  transform: translate(-50%, -35%) rotate(0deg);
}

.stack::after {
  transform: translate(-30%, -62%) rotate(0deg);
}

.heart {
  width: 16px;
  height: 16px;
  transform: translate(-50%, -50%) rotate(-45deg);
  background: var(--stroke);
  border-radius: 2px;
}

.heart::before,
.heart::after {
  content: "";
  position: absolute;
  width: 100%;
  height: 100%;
  background: var(--stroke);
  border-radius: 50%;
}

.heart::before {
  left: -8px;
  top: 0;
}

.heart::after {
  left: 0;
  top: -8px;
}

.user {
  width: 14px;
  height: 14px;
  border-radius: 50%;
  border: 2px solid var(--stroke);
  background: transparent;
}

.user::before {
  content: "";
  position: absolute;
  left: 50%;
  top: 15px;
  width: 18px;
  height: 10px;
  transform: translateX(-50%);
  border: 2px solid var(--stroke);
  border-top: 0;
  border-radius: 0 0 10px 10px;
}

.hidden {
  display: none !important;
}

.bottom-nav {
  bottom: 16px;
  padding: 6px 7px;
  border: 1px solid rgba(16, 45, 80, 0.12);
  border-radius: 20px;
  background: rgba(255, 255, 255, 0.78);
  box-shadow: 0 12px 28px rgba(16, 45, 80, 0.15);
}

.nav-item {
  height: 56px;
  border-radius: 14px;
}

.nav-item.active {
  border: none;
  border-radius: 13px;
  background: var(--accent);
  box-shadow: 0 6px 14px rgba(215, 25, 45, 0.2);
}

@media (max-width: 600px) {
  .bottom-nav {
    bottom: calc(10px + env(safe-area-inset-bottom));
  }
}

