@font-face {
  font-family: "Montserrat";
  src: url("/assets/brand/fonts/Montserrat-Variable.ttf") format("truetype");
  font-style: normal;
  font-weight: 100 900;
  font-display: swap;
}

@font-face {
  font-family: "Poppins";
  src: url("/assets/brand/fonts/Poppins-Regular.ttf") format("truetype");
  font-style: normal;
  font-weight: 400;
  font-display: swap;
}

@font-face {
  font-family: "Poppins";
  src: url("/assets/brand/fonts/Poppins-SemiBold.ttf") format("truetype");
  font-style: normal;
  font-weight: 600;
  font-display: swap;
}

:root {
  color-scheme: light;
  --brand: #830a2c;
  --brand-dark: #5f071f;
  --brand-soft: #f6e9ed;
  --ink: #2c2c2c;
  --muted: #6d6765;
  --line: #e4ddd7;
  --surface: #f8f5f2;
  --panel: #ffffff;
  --sand: #dbd1c8;
  --sand-soft: #f0ebe7;
  --gold: #997e50;
  --danger: #a81817;
  --shadow-soft: 0 10px 28px rgba(44, 35, 32, 0.08);
  --shadow-brand: 0 18px 48px rgba(95, 7, 31, 0.22);
  font-family: "Poppins", ui-sans-serif, system-ui, sans-serif;
}

* { box-sizing: border-box; }

html { min-height: 100%; background: var(--surface); }

body {
  margin: 0;
  min-height: 100vh;
  background:
    radial-gradient(circle at 8% 8%, rgba(219, 209, 200, 0.38), transparent 28rem),
    linear-gradient(180deg, #fdfcfb 0%, var(--surface) 42%, #f5f1ed 100%);
  color: var(--ink);
}

body.has-configurator-open,
body.has-photo-lightbox-open { overflow: hidden; }

button,
input { font: inherit; }

button { cursor: pointer; }

svg {
  width: 1.35rem;
  height: 1.35rem;
  fill: none;
  stroke: currentColor;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-width: 1.8;
}

h1,
h2,
h3,
p { margin: 0; }

h1,
h2,
h3,
strong,
button { font-family: "Montserrat", ui-sans-serif, system-ui, sans-serif; }

h1 { font-size: clamp(1.35rem, 3vw, 1.65rem); line-height: 1.1; }
h2 { font-size: clamp(1.3rem, 3vw, 1.75rem); line-height: 1.2; }
h3 { font-size: 1rem; }

.hidden { display: none !important; }

.app-shell {
  width: 100%;
  min-height: 100vh;
  max-width: 960px;
  margin: 0 auto;
  padding: 20px 20px 116px;
}

.topbar,
.today-band,
.login-panel,
.home-tile,
.intervention-card,
.detail-card {
  border: 1px solid var(--line);
  border-radius: 22px;
  background: var(--panel);
  box-shadow: var(--shadow-soft);
}

.topbar {
  position: relative;
  isolation: isolate;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  min-height: 118px;
  padding: 22px 24px;
  overflow: hidden;
  border: 0;
  border-radius: 28px;
  background: linear-gradient(125deg, var(--brand-dark), var(--brand) 62%, #9d1239);
  color: white;
  box-shadow: var(--shadow-brand);
}

.topbar::after {
  position: absolute;
  z-index: -1;
  inset: -30% -4% -30% 55%;
  background-image: url("/assets/brand/polyhabitat-pattern-white.png");
  background-position: center;
  background-size: 480px auto;
  content: "";
  opacity: 0.075;
  transform: rotate(-4deg);
}

.brand-lockup,
.brand-context,
.topbar-actions,
.today-band,
.intervention-card-top,
.section-intro,
.configurator-toolbar-context {
  display: flex;
  align-items: center;
}

.brand-lockup { gap: 22px; min-width: 0; }
.brand-logo { display: block; width: clamp(145px, 22vw, 190px); height: auto; }

.brand-context {
  align-items: flex-start;
  flex-direction: column;
  padding-left: 22px;
  border-left: 1px solid rgba(255, 255, 255, 0.35);
}

.brand-context .eyebrow { color: rgba(255, 255, 255, 0.7); }
.brand-context h1 { color: white; }
.topbar-actions { position: relative; z-index: 1; justify-content: flex-end; gap: 10px; }

.eyebrow,
.section-label {
  display: block;
  margin-bottom: 5px;
  color: var(--brand);
  font-family: "Montserrat", ui-sans-serif, system-ui, sans-serif;
  font-size: 0.72rem;
  font-weight: 750;
  letter-spacing: 0.085em;
  line-height: 1.25;
  text-transform: uppercase;
}

.status-pill,
.source-badge,
.list-count {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 34px;
  padding: 0 12px;
  border-radius: 999px;
  background: var(--brand-soft);
  color: var(--brand);
  font-family: "Montserrat", ui-sans-serif, system-ui, sans-serif;
  font-size: 0.76rem;
  font-weight: 700;
}

.status-pill {
  gap: 8px;
  background: rgba(255, 255, 255, 0.14);
  color: white;
  backdrop-filter: blur(8px);
}

.status-pill::before {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: #d8efdc;
  box-shadow: 0 0 0 4px rgba(216, 239, 220, 0.12);
  content: "";
}

.text-button,
.icon-button,
.primary-button,
.back-button {
  min-height: 48px;
  border: 0;
  border-radius: 13px;
  padding: 0 17px;
  font-weight: 700;
  transition: transform 160ms ease, background-color 160ms ease, box-shadow 160ms ease;
}

.text-button:hover,
.icon-button:hover,
.primary-button:hover,
.back-button:hover { transform: translateY(-1px); }

.text-button {
  background: rgba(255, 255, 255, 0.1);
  color: white;
}

.icon-button {
  display: grid;
  width: 48px;
  padding: 0;
  place-items: center;
  background: var(--brand);
  color: white;
  box-shadow: 0 7px 18px rgba(131, 10, 44, 0.2);
}

.primary-button {
  background: var(--brand);
  color: white;
  box-shadow: 0 8px 20px rgba(131, 10, 44, 0.18);
}

.primary-button-wide { width: 100%; }

.back-button {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: var(--sand-soft);
  color: var(--ink);
}

.login-panel {
  display: grid;
  grid-template-columns: minmax(0, 0.88fr) minmax(320px, 1.12fr);
  margin-top: 22px;
  overflow: hidden;
}

.login-intro {
  position: relative;
  display: flex;
  min-height: 390px;
  flex-direction: column;
  justify-content: flex-end;
  padding: clamp(28px, 5vw, 48px);
  overflow: hidden;
  background: var(--ink);
  color: white;
}

.login-intro::before {
  position: absolute;
  inset: 0;
  background-image: url("/assets/brand/polyhabitat-pattern-white.png");
  background-position: 22% 20%;
  background-size: 560px auto;
  content: "";
  opacity: 0.04;
}

.login-intro > * { position: relative; z-index: 1; }
.login-intro .eyebrow { color: #d9c4cb; }
.login-intro h2 { max-width: 400px; font-size: clamp(1.65rem, 4vw, 2.55rem); }
.login-intro p:last-child { max-width: 420px; margin-top: 16px; color: #d6d1cf; line-height: 1.65; }

.login-mark {
  width: 68px;
  height: 68px;
  margin-bottom: auto;
  border-radius: 18px;
  background: var(--brand) url("/assets/brand/polyhabitat-app-icon-64.png") center / cover no-repeat;
  box-shadow: 0 12px 30px rgba(0, 0, 0, 0.24);
}

.stacked-form {
  display: grid;
  align-content: center;
  gap: 18px;
  padding: clamp(28px, 6vw, 54px);
}

.section-heading { display: grid; gap: 2px; margin-bottom: 4px; }

label {
  display: grid;
  gap: 8px;
  color: #514c49;
  font-size: 0.86rem;
  font-weight: 600;
}

input {
  width: 100%;
  min-height: 52px;
  border: 1px solid var(--line);
  border-radius: 13px;
  padding: 12px 14px;
  background: #fcfbfa;
  color: var(--ink);
}

input::placeholder { color: #a19a96; }

input:focus-visible,
button:focus-visible {
  outline: 3px solid rgba(153, 126, 80, 0.38);
  outline-offset: 3px;
}

.feedback { min-height: 22px; color: var(--danger); font-size: 0.85rem; font-weight: 600; }
.muted-text { color: var(--muted); }

.today-band {
  justify-content: space-between;
  gap: 16px;
  margin: 22px 0;
  padding: 16px 18px;
}

.today-band strong { display: block; overflow-wrap: anywhere; }
.today-actions { display: flex; flex: 0 0 auto; gap: 9px; }
.icon-button-neutral { background: var(--sand-soft); color: var(--brand); box-shadow: none; }
.view { display: none; }
.view.active { display: block; animation: view-enter 220ms ease both; }

@keyframes view-enter {
  from { opacity: 0; transform: translateY(5px); }
  to { opacity: 1; transform: translateY(0); }
}

.section-intro { justify-content: space-between; gap: 14px; margin-bottom: 14px; }
.home-intro { margin: 4px 2px 18px; }
.home-intro h2 { max-width: 570px; }

.home-grid,
.intervention-list,
.task-list,
.schedule-day-items {
  display: grid;
  gap: 16px;
}

.home-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }

.home-tile {
  position: relative;
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  align-items: center;
  gap: 16px;
  width: 100%;
  min-height: 150px;
  padding: 22px;
  overflow: hidden;
  text-align: left;
}

button.home-tile { border: 0; cursor: pointer; }
.home-tile-primary { background: var(--brand); color: white; box-shadow: var(--shadow-brand); }
.home-tile-primary { grid-column: 1 / -1; }
.home-tile-primary .section-label { color: #dec4cc; }
.home-tile-primary small { color: rgba(255, 255, 255, 0.72); }
.home-tile-secondary { background: white; }
.home-tile-stat { cursor: default; }
.home-urgent-alert { display: grid; grid-template-columns: auto minmax(0, 1fr) auto; align-items: center; gap: 14px; width: 100%; margin: 0 0 16px; border: 1px solid #e1a6a4; border-radius: 18px; padding: 16px 18px; background: linear-gradient(135deg, #fff4f3, #fce4e1); color: #981d1b; text-align: left; box-shadow: 0 10px 26px rgba(152, 29, 27, .10); }
.home-urgent-alert .tile-icon { background: #f7d7d4; color: #a71f1c; }
.home-urgent-alert strong { display: block; font-family: "Montserrat", ui-sans-serif, system-ui, sans-serif; font-size: 1rem; }
.home-urgent-alert small { display: block; margin-top: 3px; color: #8c3732; font-size: .78rem; line-height: 1.4; }

.tile-icon {
  display: grid;
  width: 52px;
  height: 52px;
  border-radius: 16px;
  place-items: center;
  background: rgba(255, 255, 255, 0.14);
  color: inherit;
}

.home-tile-secondary .tile-icon { background: var(--brand-soft); color: var(--brand); }
.tile-icon svg { width: 25px; height: 25px; }
.tile-copy { min-width: 0; }
.tile-copy strong { display: block; font-size: 1.05rem; }
.tile-copy small { display: block; margin-top: 7px; line-height: 1.45; }
.tile-arrow { font-family: "Montserrat", sans-serif; font-size: 1.5rem; }
.central-notice { margin-bottom: 16px; font-size: 0.86rem; }
.planning-mode-switch { display: inline-grid; grid-template-columns: repeat(2, minmax(0, 1fr)); margin: 0 0 16px; padding: 4px; border: 1px solid var(--line); border-radius: 14px; background: var(--panel); box-shadow: var(--shadow-soft); }
.planning-mode-button { min-height: 39px; border: 0; border-radius: 10px; padding: 0 13px; background: transparent; color: var(--muted); font-size: 0.77rem; font-weight: 750; }
.planning-mode-button.active { background: var(--ink); color: white; }

.intervention-list { gap: 26px; }
.task-list { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.overdue-metrages-list { display: grid; gap: 14px; margin-bottom: 16px; }
.overdue-metrages-panel { display: grid; gap: 10px; padding: 17px; border: 1px solid #ebc9b0; border-radius: 18px; background: #fff8f2; }
.overdue-metrage-row { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding-top: 10px; border-top: 1px solid #f0d9c9; }
.overdue-metrage-row span { color: #8a5e36; font-size: 0.78rem; font-weight: 650; text-align: right; }

.schedule-day { position: relative; display: grid; gap: 13px; }
.schedule-day:not(:last-child)::after {
  position: absolute;
  top: 39px;
  bottom: -22px;
  left: 10px;
  width: 1px;
  background: var(--sand);
  content: "";
}
.schedule-day-heading { display: flex; align-items: center; gap: 10px; }
.schedule-day-heading h3 { margin-right: auto; font-size: 1rem; text-transform: capitalize; }
.schedule-day-heading > span:last-child { color: var(--muted); font-size: 0.78rem; font-weight: 600; }
.schedule-day-dot { z-index: 1; width: 21px; height: 21px; border: 5px solid var(--brand-soft); border-radius: 50%; background: var(--brand); }
.schedule-day-items { grid-template-columns: repeat(2, minmax(0, 1fr)); margin-left: 32px; }

.intervention-card {
  display: grid;
  gap: 16px;
  padding: 18px;
  transition: transform 160ms ease, box-shadow 160ms ease;
}

.intervention-card:hover { transform: translateY(-2px); box-shadow: 0 15px 36px rgba(44, 35, 32, 0.11); }
.intervention-card-top { align-items: flex-start; justify-content: space-between; gap: 12px; }

.intervention-type {
  color: var(--brand);
  font-family: "Montserrat", ui-sans-serif, system-ui, sans-serif;
  font-size: 0.72rem;
  font-weight: 800;
  letter-spacing: 0.07em;
  text-transform: uppercase;
}

.intervention-card h2 { margin-top: 5px; font-size: 1.05rem; line-height: 1.35; }
.task-context { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin-top: 8px; }
.chantier-stage { display: inline-flex; align-items: center; min-height: 25px; border-radius: 999px; padding: 0 9px; background: #edf2ee; color: #316049; font-family: "Montserrat", ui-sans-serif, system-ui, sans-serif; font-size: 0.66rem; font-weight: 800; letter-spacing: .02em; }
.intervention-name { margin-top: 5px; color: var(--muted); font-size: 0.8rem; line-height: 1.4; }
.appointment-status { display: inline-flex; align-items: center; min-height: 25px; margin-top: 9px; border-radius: 999px; padding: 0 9px; font-family: "Montserrat", ui-sans-serif, system-ui, sans-serif; font-size: 0.67rem; font-weight: 800; letter-spacing: .02em; }
.appointment-status.is-confirmed { background: #e2f3e7; color: #17683b; }
.appointment-status.is-pending { background: #f6eee7; color: #8a5e36; }
.intervention-card.is-confirmed { border-color: #b9ddc4; border-left: 4px solid #249253; box-shadow: 0 10px 28px rgba(23, 104, 59, .10); }
.time-chip {
  display: inline-flex;
  flex: 0 0 auto;
  align-items: center;
  min-height: 30px;
  padding: 0 10px;
  border-radius: 999px;
  background: var(--brand-soft);
  color: var(--brand);
  font-family: "Montserrat", ui-sans-serif, system-ui, sans-serif;
  font-size: 0.76rem;
  font-weight: 800;
}
.intervention-card-compact { min-height: 0; }
.source-badge { min-height: 28px; background: var(--sand-soft); color: var(--muted); }

.meta-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
}

.meta-box {
  min-height: 68px;
  padding: 12px;
  border: 1px solid #eee8e4;
  border-radius: 14px;
  background: #fbf9f7;
}

.meta-box span { display: block; margin-bottom: 3px; color: var(--muted); font-size: 0.74rem; }
.meta-box strong { display: block; font-size: 0.88rem; overflow-wrap: anywhere; }
.card-actions { display: grid; }
.card-actions .primary-button { width: 100%; }

.detail-card {
  display: grid;
  gap: 14px;
  margin-top: 12px;
  padding: clamp(16px, 3.5vw, 24px);
  border-top: 4px solid var(--brand);
}

.detail-card > .primary-button { width: 100%; }
.chantier-hero { display: flex; align-items: flex-start; justify-content: space-between; gap: 16px; padding: 18px; border-radius: 18px; background: linear-gradient(135deg, #fbf5f7, #f5f1ed); }
.chantier-hero h2 { margin-top: 4px; font-size: clamp(1.35rem, 4vw, 1.8rem); line-height: 1.16; }
.chantier-hero .muted-text { margin-top: 8px; font-size: .86rem; }
.chantier-stage-large { flex: 0 0 auto; min-height: 32px; padding: 0 12px; background: white; color: var(--brand); box-shadow: 0 5px 14px rgba(70, 43, 48, .08); }
.info-section { display: grid; gap: 13px; }
.chantier-reference { display: flex; align-items: baseline; gap: 10px; min-height: 42px; padding: 10px 13px; border: 1px solid #eee8e4; border-radius: 13px; background: #fbf9f7; }
.chantier-reference span { color: var(--muted); font-size: .77rem; font-weight: 650; }
.chantier-reference strong { font-size: .92rem; overflow-wrap: anywhere; }
.technical-section { gap: 7px; }
.technical-list { display: grid; gap: 1px; overflow: hidden; border: 1px solid #eee8e4; border-radius: 15px; background: #eee8e4; }
.technical-list > div { display: grid; grid-template-columns: minmax(118px, .38fr) minmax(0, 1fr); gap: 12px; padding: 9px 13px; background: #fbf9f7; }
.technical-list span { color: var(--muted); font-size: .77rem; font-weight: 650; }
.technical-list strong { font-size: .9rem; line-height: 1.25; overflow-wrap: anywhere; }
.customer-section { padding-top: 4px; border-top: 1px solid var(--line); }
.contact-list { display: grid; gap: 1px; overflow: hidden; border: 1px solid #eee8e4; border-radius: 15px; background: #eee8e4; }
.contact-list > div { display: grid; grid-template-columns: minmax(94px, 0.34fr) minmax(0, 1fr); gap: 12px; padding: 12px 14px; background: #fbf9f7; }
.contact-list span { color: var(--muted); font-size: 0.77rem; font-weight: 600; }
.contact-list strong,
.contact-list a { overflow-wrap: anywhere; color: var(--ink); font-size: 0.9rem; }
.contact-list a { color: var(--brand); font-weight: 700; text-decoration-thickness: 1px; text-underline-offset: 3px; }
.quick-contact-actions { display: flex; gap: 10px; }
.quick-contact-button { display: grid; width: 48px; height: 48px; border: 1px solid var(--brand); border-radius: 13px; place-items: center; background: var(--brand); color: white; box-shadow: 0 8px 18px rgba(131, 10, 44, .16); }
.quick-contact-button svg { width: 21px; height: 21px; fill: none; stroke: currentColor; stroke-linecap: round; stroke-linejoin: round; stroke-width: 1.9; }
.quick-contact-button-mail { border-color: #b65b77; background: #fff8fa; color: var(--brand); box-shadow: none; }
.map-actions { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
.map-button { display: inline-flex; min-height: 48px; align-items: center; justify-content: center; border: 1px solid var(--brand); border-radius: 13px; padding: 0 12px; color: var(--brand); font-family: "Montserrat", ui-sans-serif, system-ui, sans-serif; font-size: 0.84rem; font-weight: 800; text-align: center; text-decoration: none; }
.map-button-waze { border-color: #3b79a6; background: #eef6fb; color: #27658f; }
.appointment-editor { gap: 7px; padding: 11px 12px; border: 1px solid #c8e3d0; border-radius: 15px; background: linear-gradient(135deg, #f8fdf9, #edf8f0); }
.appointment-editor h3 { font-size: .96rem; }
.appointment-form { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 7px; }
.appointment-form label { gap: 4px; font-size: .73rem; }
.appointment-form input { min-height: 40px; padding: 8px 9px; font-size: .82rem; }
.appointment-form .back-button { grid-column: 1 / -1; min-height: 36px; padding: 0 12px; justify-self: start; font-size: .8rem; }
.appointment-editor > .primary-button { min-height: 39px; font-size: .86rem; }
.appointment-confirmed-note { color: #17683b; font-size: .8rem; font-weight: 650; line-height: 1.25; }
.appointment-waiting-note { padding: 13px 15px; border: 1px dashed var(--sand); border-radius: 14px; background: var(--sand-soft); font-size: 0.84rem; line-height: 1.5; }
.photo-heading { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.chantier-photos { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px; }
.chantier-photo { display: grid; gap: 6px; overflow: hidden; border: 0; border-radius: 13px; background: transparent; color: var(--ink); font-size: 0.72rem; font-weight: 600; text-align: left; }
.chantier-photo img { display: block; width: 100%; aspect-ratio: 1; border: 1px solid var(--line); border-radius: 13px; background: var(--sand-soft); object-fit: cover; transition: transform 160ms ease; }
.chantier-photo:hover img { transform: scale(1.025); }
.chantier-photo span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.photo-lightbox { position: fixed; z-index: 200; inset: 0; display: grid; place-items: center; padding: 24px; }
.photo-lightbox-backdrop { position: absolute; inset: 0; border: 0; background: rgba(28, 22, 24, 0.84); backdrop-filter: blur(5px); }
.photo-lightbox-content { position: relative; z-index: 1; display: grid; max-width: min(1050px, 100%); max-height: calc(100vh - 48px); margin: 0; gap: 10px; color: white; }
.photo-lightbox-content img { display: block; width: auto; max-width: 100%; max-height: calc(100vh - 96px); border-radius: 16px; background: #181515; object-fit: contain; }
.photo-lightbox-content figcaption { padding: 0 4px; font-size: 0.84rem; font-weight: 600; text-align: center; }
.photo-lightbox-close { position: fixed; z-index: 2; top: max(18px, env(safe-area-inset-top)); right: max(18px, env(safe-area-inset-right)); display: grid; width: 46px; height: 46px; border: 1px solid rgba(255,255,255,.32); border-radius: 50%; place-items: center; background: rgba(255,255,255,.12); color: white; font-size: 2rem; line-height: 1; }
.configurator-launch-feedback { min-height: 22px; color: var(--muted); font-size: 0.85rem; font-weight: 600; }

.bottom-nav {
  position: fixed;
  z-index: 50;
  right: auto;
  bottom: max(14px, env(safe-area-inset-bottom));
  left: 50%;
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 5px;
  width: min(620px, calc(100% - 32px));
  padding: 7px;
  border: 1px solid rgba(228, 221, 215, 0.9);
  border-radius: 20px;
  background: rgba(255, 255, 255, 0.93);
  box-shadow: 0 16px 45px rgba(44, 35, 32, 0.17);
  backdrop-filter: blur(16px);
  transform: translateX(-50%);
}

.nav-item {
  display: flex;
  min-height: 54px;
  align-items: center;
  justify-content: center;
  gap: 9px;
  border: 0;
  border-radius: 14px;
  background: transparent;
  color: var(--muted);
  font-size: 0.76rem;
  font-weight: 700;
}

.nav-item svg { width: 20px; height: 20px; }
.nav-item.active { background: var(--brand); color: white; box-shadow: 0 6px 15px rgba(131, 10, 44, 0.18); }

.configurator-shell {
  position: fixed;
  inset: 0;
  z-index: 100;
  display: grid;
  grid-template-rows: auto minmax(0, 1fr);
  background: var(--surface);
}

.configurator-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 10px 16px;
  border-bottom: 1px solid var(--line);
  background: var(--panel);
  box-shadow: var(--shadow-soft);
}

.configurator-toolbar-context { gap: 11px; min-width: 0; }
.configurator-toolbar-context img { width: 42px; height: 42px; border-radius: 12px; }
.configurator-toolbar-context strong { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.configurator-frame { width: 100%; height: 100%; border: 0; background: white; }

@media (max-width: 760px) {
  .app-shell { padding: 14px 14px 108px; }
  .topbar { min-height: 72px; padding: 12px 16px; border-radius: 20px; }
  .brand-lockup { gap: 14px; }
  .brand-logo { width: 120px; }
  .brand-context { padding-left: 14px; }
  .brand-context .eyebrow { display: none; }
  .topbar-actions { gap: 6px; }
  .status-pill { padding: 0 10px; }
  .today-band { margin: 12px 0 16px; padding: 12px 14px; }
  .text-button { width: 46px; padding: 0; overflow: hidden; color: transparent; }
  .text-button::after { color: white; content: "↪"; font-size: 1.25rem; }
  .login-panel { grid-template-columns: 1fr; }
  .login-intro { min-height: 280px; }
  .stacked-form { padding: 28px 22px; }
  .home-grid,
  .intervention-list,
  .task-list,
  .schedule-day-items { grid-template-columns: 1fr; }
  .home-tile { min-height: 132px; }
  .home-urgent-alert { align-items: flex-start; padding: 14px; }
  .home-tile-primary { grid-column: auto; }
}

@media (max-width: 460px) {
  .app-shell { padding-inline: 10px; }
  .topbar { align-items: flex-start; gap: 10px; min-height: 96px; padding: 15px; }
  .topbar::after { left: 45%; }
  .brand-lockup { align-items: flex-start; flex-direction: column; gap: 7px; }
  .brand-logo { width: 118px; }
  .brand-context { padding-left: 0; border-left: 0; }
  .brand-context h1 { font-size: 1.05rem; }
  .topbar-actions { align-items: flex-end; flex-direction: column; }
  .status-pill { min-height: 30px; font-size: 0.68rem; }
  .text-button { min-height: 36px; }
  .today-band { margin: 14px 0 18px; padding: 13px 14px; }
  .today-band strong { max-width: 210px; font-size: 0.88rem; }
  .home-intro h2 { font-size: 1.35rem; }
  .home-tile { grid-template-columns: auto minmax(0, 1fr); gap: 13px; padding: 18px; }
  .tile-arrow { display: none; }
  .tile-icon { width: 46px; height: 46px; border-radius: 14px; }
  .section-intro { align-items: flex-start; }
  .meta-grid { grid-template-columns: 1fr; }
  .technical-list > div { grid-template-columns: minmax(104px, .38fr) minmax(0, 1fr); }
  .schedule-day-items { margin-left: 0; }
  .schedule-day:not(:last-child)::after { display: none; }
  .schedule-day-heading { gap: 8px; }
  .schedule-day-heading > span:last-child { font-size: 0.7rem; }
  .bottom-nav { gap: 2px; padding: 5px; }
  .nav-item { min-height: 50px; flex-direction: column; gap: 2px; font-size: 0.63rem; }
  .nav-item svg { width: 18px; height: 18px; }
  .contact-list > div { grid-template-columns: 1fr; gap: 3px; }
  .map-actions { grid-template-columns: 1fr; }
  .planning-mode-switch { display: grid; width: 100%; }
  .planning-mode-button { padding-inline: 8px; font-size: 0.71rem; }
  .appointment-form { grid-template-columns: 1fr; }
  .appointment-form .back-button { width: 100%; justify-content: center; }
  .overdue-metrage-row { align-items: flex-start; flex-direction: column; gap: 4px; }
  .overdue-metrage-row span { text-align: left; }
  .chantier-photos { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .configurator-toolbar { padding: 9px 10px; }
  .configurator-toolbar-context img { width: 38px; height: 38px; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { scroll-behavior: auto !important; transition: none !important; animation: none !important; }
}
