/* ALPSEREN — Prototype interactif
   Mode anthracite définitif (pas de toggle), typo finale Cinzel/Cormorant/Inter. */

:root {
  --night:       #14110e;
  --night-elev:  #1d1916;
  --night-2:     #211d18;
  --beige:       #c29c6d;
  --beige-soft:  rgba(194,156,109,.10);
  --beige-edge:  rgba(194,156,109,.32);
  --cream:       #e8e1d2;
  --cream-72:    rgba(232,225,210,.72);
  --cream-50:    rgba(232,225,210,.50);
  --cream-38:    rgba(232,225,210,.38);
  --cream-20:    rgba(232,225,210,.20);
  --rule:        rgba(232,225,210,.08);
  --rule-edge:   rgba(232,225,210,.14);
  --green:       #7a9d6e;

  --f-display:   "Cinzel", serif;
  --f-edit:      "Cormorant Garamond", "Garamond", serif;
  --f-sys:       "Inter", "Helvetica Neue", sans-serif;
  --f-mono:      "JetBrains Mono", ui-monospace, monospace;

  --track-logo:  0.34em;
  --track-label: 0.20em;
  --track-tight: -0.010em;

  --safe-top:    54px;
  --safe-bot:    96px;
}

* { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }
body {
  font-family: var(--f-sys);
  background: #0a0907;
  color: var(--cream);
  font-feature-settings: "tnum" 1;
  font-variant-numeric: tabular-nums;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  min-height: 100vh;
  display: flex; align-items: center; justify-content: center;
  padding: 32px;
}

/* ───────── Stage : phone centered with brand label ───────── */
.stage {
  display: flex; flex-direction: column; align-items: center; gap: 24px;
}
.stage .legend {
  display: flex; flex-direction: column; align-items: center; gap: 6px;
  color: var(--cream-50);
}
.stage .legend .brand {
  font-family: var(--f-display); letter-spacing: var(--track-logo);
  font-size: 12px; color: var(--cream);
}
.stage .legend .sub {
  font-family: var(--f-mono); font-size: 10px; letter-spacing: .12em;
  text-transform: uppercase; color: var(--cream-38);
}

/* ───────── Phone shell ───────── */
.phone {
  position: relative;
  width: 380px;
  height: 780px;
  background: var(--night);
  border-radius: 44px;
  overflow: hidden;
  box-shadow:
    0 0 0 8px #1a1815,
    0 0 0 9px rgba(255,255,255,.05),
    0 30px 90px rgba(0,0,0,.55),
    0 12px 30px rgba(0,0,0,.4);
}

/* Watermark behind every screen */
.phone::before {
  content: "";
  position: absolute; inset: 0;
  background-image: url("../assets/alpseren-symbol.png");
  background-repeat: no-repeat;
  background-position: center;
  background-size: 260px auto;
  opacity: 0.07;
  pointer-events: none;
  z-index: 0;
}

/* Dynamic island / notch */
.notch {
  position: absolute;
  top: 12px; left: 50%; transform: translateX(-50%);
  width: 110px; height: 30px;
  background: #08070a;
  border-radius: 22px;
  z-index: 5;
}

/* Status bar */
.status {
  position: absolute;
  top: 18px; left: 0; right: 0;
  display: flex; justify-content: space-between; align-items: center;
  padding: 0 32px;
  z-index: 4;
  font-family: var(--f-sys); font-weight: 500; font-size: 13px;
  color: var(--cream-72);
  pointer-events: none;
}
.status .right { display: flex; gap: 6px; align-items: center; opacity: .75; }
.status .ind { width: 14px; height: 8px; border-radius: 2px; background: var(--cream-72); }
.status .ind.dim { opacity: .45; background: transparent; border: 1px solid var(--cream-72); }

/* Home indicator */
.home-bar {
  position: absolute;
  bottom: 10px; left: 50%; transform: translateX(-50%);
  width: 134px; height: 4px;
  background: var(--cream-50); border-radius: 4px;
  z-index: 6;
}

/* Screen content area */
.screen {
  position: absolute; inset: 0;
  display: flex; flex-direction: column;
  z-index: 2;
}

/* Header */
.h {
  display: grid;
  grid-template-columns: minmax(40px, auto) 1fr minmax(40px, auto);
  align-items: center;
  gap: 10px;
  padding: 54px 20px 16px;
  position: relative;
  z-index: 3;
}
.h > div { white-space: nowrap; min-height: 24px; display: flex; align-items: center; }
.h > div:first-child { justify-content: flex-start; }
.h > div:last-child { justify-content: flex-end; }
.h .title {
  font-family: var(--f-sys); font-weight: 500;
  font-size: 11.5px; letter-spacing: var(--track-label);
  text-transform: uppercase; color: var(--beige);
  justify-content: center;
}
.h .icon-btn {
  width: 36px; height: 36px;
  display: inline-flex; align-items: center; justify-content: center;
  border-radius: 12px;
  color: var(--cream-72);
  background: transparent;
  border: 0;
  cursor: pointer;
  transition: background .12s, color .12s;
  padding: 0;
}
.h .icon-btn:hover { background: rgba(232,225,210,.04); color: var(--cream); }
.h .icon-btn:active { transform: scale(.96); }

/* Scrollable body */
.body {
  flex: 1;
  overflow-y: auto;
  overflow-x: hidden;
  padding: 0 20px var(--safe-bot);
  -webkit-overflow-scrolling: touch;
}
.body::-webkit-scrollbar { width: 0; }
.body { scrollbar-width: none; }

/* ───────── Tab bar ───────── */
.tabs {
  position: absolute;
  left: 12px; right: 12px; bottom: 26px;
  height: 60px;
  background: rgba(20,17,14,.85);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border: 1px solid var(--rule-edge);
  border-radius: 22px;
  display: grid; grid-template-columns: repeat(4, 1fr);
  z-index: 6;
}
.tabs .tab {
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  gap: 3px;
  color: var(--cream-38);
  cursor: pointer;
  border: 0;
  background: transparent;
  font-family: var(--f-sys); font-weight: 500;
  font-size: 9px; letter-spacing: .18em; text-transform: uppercase;
  padding: 0;
  position: relative;
  transition: color .15s;
}
.tabs .tab:hover { color: var(--cream-72); }
.tabs .tab.active { color: var(--beige); }
.tabs .tab.active::before {
  content: "";
  position: absolute; top: 10px; left: 50%;
  width: 22px; height: 1.5px;
  background: var(--beige);
  transform: translateX(-50%);
  border-radius: 1.5px;
}
.tabs .tab svg { width: 20px; height: 20px; }

/* ───────── Typography helpers ───────── */
.label {
  font-family: var(--f-sys); font-weight: 500;
  font-size: 10.5px; letter-spacing: var(--track-label);
  text-transform: uppercase; color: var(--beige);
}
.label.dim { color: var(--cream-38); }
.label.cream { color: var(--cream); }
.mono { font-family: var(--f-mono); font-size: 10px; letter-spacing: .04em; color: var(--cream-50); }
.eyebrow {
  font-family: var(--f-sys); font-weight: 500;
  font-size: 10px; letter-spacing: .22em;
  text-transform: uppercase; color: var(--beige);
}
.editorial { font-family: var(--f-edit); font-weight: 300; }
.italic { font-style: italic; }

/* ───────── Date headers (Agenda) ───────── */
.date-row {
  display: flex; align-items: center; gap: 12px;
  padding: 22px 0 12px;
}
.date-row .lbl {
  font-family: var(--f-sys); font-weight: 500;
  font-size: 10.5px; letter-spacing: var(--track-label);
  text-transform: uppercase; color: var(--beige);
}
.date-row .line { flex: 1; height: 1px; background: var(--beige-edge); opacity: .6; }

/* ───────── Intervention row ───────── */
.iv {
  display: grid;
  grid-template-columns: 64px 1fr auto;
  gap: 12px;
  align-items: center;
  padding: 14px 4px;
  border-bottom: 1px solid var(--rule);
  cursor: pointer;
  position: relative;
  transition: background .12s;
  border-radius: 4px;
}
.iv:hover { background: rgba(232,225,210,.02); }
.iv:active { background: rgba(232,225,210,.04); }
.iv .time {
  font-family: var(--f-sys); font-weight: 300;
  font-size: 24px; line-height: 1; color: var(--cream);
  letter-spacing: var(--track-tight);
}
.iv .meta { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.iv .svc {
  font-family: var(--f-sys); font-weight: 400; font-size: 14px;
  color: var(--cream); white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.iv .sub {
  font-family: var(--f-sys); font-weight: 400; font-size: 11px;
  color: var(--cream-50); letter-spacing: 0.03em;
}
.iv .chev { color: var(--cream-38); }

/* ───────── Detail header card ───────── */
.dtl-hero { padding: 16px 0 8px; }
.dtl-hero .date { color: var(--cream-50); font-size: 11px; font-family: var(--f-sys); font-weight: 500; letter-spacing: .18em; text-transform: uppercase; }
.dtl-hero .time {
  font-family: var(--f-sys); font-weight: 300; font-size: 38px;
  line-height: 1; margin-top: 8px; letter-spacing: var(--track-tight);
}
.dtl-hero .svc {
  font-family: var(--f-edit); font-weight: 300; font-size: 26px;
  line-height: 1.1; margin-top: 8px; color: var(--cream);
}

/* ───────── Timeline (status) ───────── */
.tl {
  display: flex; align-items: center; gap: 4px;
  padding: 18px 0 12px;
}
.tl .step { display: flex; flex-direction: column; align-items: center; gap: 6px; flex: 0 0 auto; }
.tl .dot {
  width: 10px; height: 10px; border-radius: 50%;
  background: transparent; border: 1.2px solid var(--cream-38);
}
.tl .step.done .dot, .tl .step.now .dot { background: var(--beige); border-color: var(--beige); }
.tl .step.now .dot { box-shadow: 0 0 0 4px rgba(194,156,109,.16); }
.tl .step .lbl {
  font-family: var(--f-sys); font-weight: 500;
  font-size: 8px; letter-spacing: .14em; text-transform: uppercase;
  color: var(--cream-38); white-space: nowrap;
}
.tl .step.done .lbl, .tl .step.now .lbl { color: var(--cream); }
.tl .seg { flex: 1; height: 1px; background: var(--rule-edge); margin-top: -16px; }
.tl .seg.done { background: var(--beige); }

/* ───────── Section ───────── */
.section { margin-top: 22px; }
.section > .head {
  font-family: var(--f-sys); font-weight: 500;
  font-size: 10px; letter-spacing: var(--track-label);
  text-transform: uppercase; color: var(--beige);
  margin-bottom: 10px;
}

/* ───────── Avatar ───────── */
.av {
  width: 38px; height: 38px; border-radius: 50%;
  background: rgba(232,225,210,.04);
  border: 1px solid var(--rule-edge);
  display: inline-flex; align-items: center; justify-content: center;
  font-family: var(--f-sys); font-weight: 500;
  font-size: 12px; color: var(--cream-72);
  letter-spacing: .04em;
}

/* ───────── Prestataire row ───────── */
.prest-row { display: flex; align-items: center; gap: 12px; padding: 4px 0; }
.prest-row .meta { flex: 1; min-width: 0; }
.prest-row .name { font-family: var(--f-sys); font-weight: 400; font-size: 14px; color: var(--cream); }
.prest-row .org { font-family: var(--f-sys); font-weight: 400; font-size: 11px; color: var(--cream-50); margin-top: 1px; }
.prest-row .contact {
  font-family: var(--f-sys); font-weight: 500; font-size: 10px;
  letter-spacing: .18em; text-transform: uppercase; color: var(--beige);
  padding: 6px 12px; border: 1px solid var(--beige-edge);
  border-radius: 999px; background: var(--beige-soft);
  cursor: pointer;
}
.prest-row .contact:hover { background: rgba(194,156,109,.16); }

/* ───────── Note Benjamin ───────── */
.note {
  font-family: var(--f-edit); font-weight: 400; font-style: italic;
  font-size: 16px; line-height: 1.45; color: var(--cream-72);
  padding: 4px 0 6px 14px;
  border-left: 1.5px solid var(--beige);
  margin-top: 4px;
}
.note .sig {
  display: block;
  font-family: var(--f-sys); font-weight: 500; font-style: normal;
  font-size: 9px; letter-spacing: .18em; text-transform: uppercase;
  color: var(--beige); margin-top: 8px;
}

/* ───────── Placeholder card ───────── */
.placeholder {
  border: 1px dashed var(--rule-edge);
  border-radius: 8px;
  padding: 18px 16px;
  text-align: center;
  background: rgba(232,225,210,.015);
}
.placeholder .txt {
  font-family: var(--f-edit); font-weight: 400; font-style: italic;
  font-size: 14px; color: var(--cream-50);
  line-height: 1.45;
}

/* ───────── Messages ───────── */
.day-sep {
  display: flex; align-items: center; gap: 12px; padding: 18px 0 12px;
}
.day-sep .lbl {
  font-family: var(--f-sys); font-weight: 500;
  font-size: 10px; letter-spacing: var(--track-label);
  text-transform: uppercase; color: var(--cream-50);
}
.day-sep .line { flex: 1; height: 1px; background: var(--rule); }

.bub {
  max-width: 80%;
  padding: 10px 14px;
  border-radius: 16px;
  margin: 4px 0;
  font-family: var(--f-sys); font-weight: 400;
  font-size: 13.5px; line-height: 1.45;
}
.bub.me {
  margin-left: auto;
  background: rgba(232,225,210,.04);
  border: 1px solid var(--rule-edge);
  border-bottom-right-radius: 6px;
  color: var(--cream);
}
.bub.them {
  background: var(--beige-soft);
  border: 1px solid var(--beige-edge);
  border-bottom-left-radius: 6px;
  color: var(--cream);
}
.bub .sig {
  display: block;
  font-family: var(--f-sys); font-weight: 500;
  font-size: 8.5px; letter-spacing: .18em; text-transform: uppercase;
  color: var(--beige); margin-top: 6px;
}

.composer {
  position: absolute;
  left: 12px; right: 12px; bottom: 26px;
  display: flex; gap: 8px; align-items: center;
  height: 60px;
  padding: 0 12px;
  background: rgba(20,17,14,.92);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border: 1px solid var(--rule-edge);
  border-radius: 22px;
  z-index: 6;
}
.composer input {
  flex: 1; background: transparent; border: 0; outline: 0;
  color: var(--cream); font-family: var(--f-sys); font-weight: 400;
  font-size: 14px;
  padding: 0;
}
.composer input::placeholder { color: var(--cream-38); font-style: italic; font-family: var(--f-edit); font-size: 15px; }
.composer .send {
  width: 36px; height: 36px;
  border-radius: 12px;
  background: var(--beige);
  border: 0; color: var(--night);
  display: inline-flex; align-items: center; justify-content: center;
  cursor: pointer;
  transition: opacity .15s;
}
.composer .send:disabled { opacity: .3; cursor: not-allowed; }

/* ───────── Demandes ───────── */
.dem-card {
  padding: 14px 16px;
  border: 1px solid var(--rule);
  border-radius: 10px;
  margin-bottom: 10px;
  cursor: pointer;
  transition: background .12s, border-color .12s;
  background: rgba(232,225,210,.012);
}
.dem-card:hover { background: rgba(232,225,210,.025); border-color: var(--rule-edge); }
.dem-card .top { display: flex; justify-content: space-between; align-items: center; margin-bottom: 8px; }
.dem-card .ttl { font-family: var(--f-sys); font-weight: 400; font-size: 13.5px; line-height: 1.35; color: var(--cream); }

.pill {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 3px 10px; border-radius: 999px;
  font-family: var(--f-sys); font-weight: 500;
  font-size: 9px; letter-spacing: .18em; text-transform: uppercase;
  border: 1px solid var(--rule-edge);
  background: rgba(232,225,210,.02);
  color: var(--cream-50);
}
.pill .led {
  width: 5px; height: 5px; border-radius: 50%;
  background: currentColor;
}
.pill.confirmed { color: var(--beige); border-color: var(--beige-edge); background: var(--beige-soft); }
.pill.treated { color: var(--green); border-color: rgba(122,157,110,.4); background: rgba(122,157,110,.10); }
.pill.treated .led { box-shadow: 0 0 5px var(--green); }

/* ───────── FAB ───────── */
.fab {
  position: absolute;
  right: 24px; bottom: 102px;
  width: 56px; height: 56px;
  border-radius: 50%;
  background: var(--beige);
  color: var(--night);
  display: flex; align-items: center; justify-content: center;
  border: 0;
  cursor: pointer;
  z-index: 5;
  box-shadow: 0 8px 24px rgba(0,0,0,.4), 0 2px 6px rgba(0,0,0,.3);
  transition: transform .15s, box-shadow .15s;
}
.fab:hover { transform: translateY(-2px); box-shadow: 0 12px 30px rgba(0,0,0,.45); }
.fab:active { transform: translateY(0); }

/* ───────── Profil rows ───────── */
.profile-hero {
  text-align: center; padding: 16px 0 22px;
}
.profile-hero .av-lg {
  width: 64px; height: 64px; border-radius: 50%;
  background: rgba(232,225,210,.04);
  border: 1px solid var(--rule-edge);
  display: inline-flex; align-items: center; justify-content: center;
  font-family: var(--f-sys); font-weight: 500;
  font-size: 20px; color: var(--cream);
  letter-spacing: .04em;
}
.profile-hero .name {
  font-family: var(--f-sys); font-weight: 500;
  font-size: 14px; letter-spacing: var(--track-label);
  text-transform: uppercase; color: var(--cream); margin-top: 14px;
}
.profile-hero .sub {
  font-family: var(--f-mono); font-size: 10px; letter-spacing: .12em;
  text-transform: uppercase; color: var(--cream-50); margin-top: 6px;
}

.row {
  display: flex; align-items: center; justify-content: space-between;
  padding: 14px 4px;
  border-bottom: 1px solid var(--rule);
  font-family: var(--f-sys); font-weight: 400; font-size: 14px;
  cursor: pointer;
  transition: background .12s;
}
.row.no-tap { cursor: default; }
.row:hover:not(.no-tap) { background: rgba(232,225,210,.015); }
.row .k { color: var(--cream); }
.row .v { color: var(--cream-50); font-size: 12px; }

.toggle {
  display: inline-flex; border: 1px solid var(--rule-edge);
  border-radius: 999px; overflow: hidden;
}
.toggle button {
  font-family: var(--f-sys); font-weight: 500;
  font-size: 10.5px; letter-spacing: .16em;
  padding: 5px 12px; border: 0; background: transparent;
  color: var(--cream-50); cursor: pointer;
}
.toggle button.on {
  background: var(--beige-soft); color: var(--beige);
}

.switch {
  position: relative;
  width: 36px; height: 20px;
  border-radius: 999px;
  background: rgba(232,225,210,.10);
  cursor: pointer;
  transition: background .2s;
}
.switch::after {
  content: ""; position: absolute;
  top: 2px; left: 2px;
  width: 16px; height: 16px;
  border-radius: 50%; background: var(--cream);
  transition: transform .2s;
}
.switch.on { background: var(--beige); }
.switch.on::after { transform: translateX(16px); background: var(--night); }

/* ───────── New Demande form ───────── */
.chip {
  display: inline-flex; align-items: center;
  padding: 6px 12px; border-radius: 999px;
  border: 1px solid var(--rule-edge);
  font-family: var(--f-sys); font-weight: 500;
  font-size: 11px; color: var(--cream-72);
  background: transparent;
  cursor: pointer;
  transition: all .12s;
}
.chip:hover { color: var(--cream); border-color: var(--cream-38); }
.chip.on { background: var(--beige-soft); color: var(--beige); border-color: var(--beige-edge); }

.field {
  padding: 12px 14px;
  border: 1px solid var(--rule-edge);
  border-radius: 10px;
  background: rgba(232,225,210,.015);
  font-family: var(--f-sys); font-weight: 400; font-size: 14px;
  color: var(--cream);
  width: 100%;
  outline: 0;
  resize: none;
}
.field::placeholder { color: var(--cream-38); font-style: italic; font-family: var(--f-edit); font-size: 15px; }
.field:focus { border-color: var(--beige-edge); }

.cta {
  display: block; width: 100%;
  padding: 14px 16px;
  border: 1px solid var(--beige);
  border-radius: 999px;
  background: var(--beige);
  color: var(--night);
  font-family: var(--f-sys); font-weight: 500;
  font-size: 11px; letter-spacing: .22em; text-transform: uppercase;
  cursor: pointer;
  margin-top: 18px;
  transition: filter .15s;
}
.cta:hover { filter: brightness(1.08); }
.cta.ghost {
  background: transparent; color: var(--beige);
}

/* ───────── Empty state ───────── */
.empty {
  display: flex; flex-direction: column;
  align-items: center; text-align: center;
  padding: 36px 12px 0;
}
.empty .small-mark { width: 36px; height: auto; opacity: .55; margin-bottom: 18px; }
.empty .phrase {
  font-family: var(--f-edit); font-weight: 300; font-style: italic;
  font-size: 19px; line-height: 1.4; color: var(--cream); max-width: 240px;
}
.empty .sig {
  font-family: var(--f-sys); font-weight: 500;
  font-size: 9px; letter-spacing: .22em; text-transform: uppercase;
  color: var(--beige); margin-top: 18px;
}

/* ───────── Screen transitions ───────── */
.screen-slide-enter { transform: translateX(100%); opacity: 0; }
.screen-slide-enter-active { transform: translateX(0); opacity: 1; transition: transform .28s cubic-bezier(.2,.7,.3,1), opacity .2s; }
.screen-slide-exit { transform: translateX(0); opacity: 1; }
.screen-slide-exit-active { transform: translateX(-30%); opacity: 0; transition: transform .28s cubic-bezier(.2,.7,.3,1), opacity .2s; }

/* small ergonomics */
.click-target { user-select: none; -webkit-tap-highlight-color: transparent; }
