/* Démo v3 — coquille téléphone d'abord. Jetons repris de docs/maquettes/demo-v3.html. */
:root {
  --a-fond: #f4f7fb;
  --a-surf: #ffffff;
  --a-surf-2: #f7f9fc;
  --a-texte: #101820;
  --a-doux: #5a6778;
  --a-ligne: #e2e8f0;
  --a-champ: #ffffff;
  --a-accent: #0066FF;
  --a-accent-texte: #0058db;
  --a-sur-accent: #ffffff;
  --a-cyan: #00B8F5;
  --a-pale: #e8f1ff;
  --a-alerte: #c2410c;
  --a-alerte-fond: #fff6ef;
  --a-alerte-ligne: #fbd9c0;
  --a-ok: #0f7a4a;
  --a-ok-fond: #e6f6ee;
  --a-nav: #101820;
  --a-nav-doux: #93a2b5;
  --a-ombre: 0 1px 2px rgba(16, 24, 32, .04), 0 10px 24px -16px rgba(16, 24, 32, .28);
  --a-degrade: linear-gradient(135deg, #00B8F5 0%, #0066FF 58%, #0b3fa6 100%);
  color-scheme: light;
}

html, body {
  margin: 0;
  height: 100%;
  overflow-x: hidden;
  background: var(--a-fond);
  color: var(--a-texte);
  font-family: Inter, system-ui, -apple-system, "Segoe UI", sans-serif;
}

* { box-sizing: border-box; }

.app {
  --a-fond: #f4f7fb;
  --a-surf: #ffffff;
  --a-surf-2: #f7f9fc;
  --a-texte: #101820;
  --a-doux: #5a6778;
  --a-ligne: #e2e8f0;
  --a-champ: #ffffff;
  --a-accent: #0066FF;
  --a-accent-texte: #0058db;
  --a-sur-accent: #ffffff;
  --a-cyan: #00B8F5;
  --a-pale: #e8f1ff;
  --a-alerte: #c2410c;
  --a-alerte-fond: #fff6ef;
  --a-alerte-ligne: #fbd9c0;
  --a-ok: #0f7a4a;
  --a-ok-fond: #e6f6ee;
  --a-nav: #101820;
  --a-nav-doux: #93a2b5;
  --a-ombre: 0 1px 2px rgba(16, 24, 32, .04), 0 10px 24px -16px rgba(16, 24, 32, .28);
  --a-degrade: linear-gradient(135deg, #00B8F5 0%, #0066FF 58%, #0b3fa6 100%);
  position: relative;
  height: 100vh;
  height: 100dvh;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  background: var(--a-fond);
  color: var(--a-texte);
  font-size: 15px;
  isolation: isolate;
}

/* Sombre : variables posées ici, activées en c25. */
.app[data-sombre] {
  --a-fond: #0a0f14;
  --a-surf: #121921;
  --a-surf-2: #0f151c;
  --a-texte: #e8eef4;
  --a-doux: #8f9bab;
  --a-ligne: #232d38;
  --a-champ: #0d1319;
  --a-accent: #00B8F5;
  --a-accent-texte: #5fd3ff;
  --a-sur-accent: #04121b;
  --a-pale: #0f2633;
  --a-alerte: #ffb35c;
  --a-alerte-fond: #221a10;
  --a-alerte-ligne: #4a3517;
  --a-ok: #5fe0a4;
  --a-ok-fond: #0f2a1f;
  --a-nav: #18222d;
  --a-nav-doux: #8193a8;
  --a-ombre: none;
  --a-degrade: linear-gradient(135deg, #063b57 0%, #0a2a55 60%, #0a0f14 100%);
  color-scheme: dark;
}

.app button {
  font: inherit;
  color: inherit;
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
  touch-action: manipulation;
}
.app a {
  -webkit-tap-highlight-color: transparent;
  touch-action: manipulation;
}
.app :focus-visible {
  outline: 3px solid var(--a-accent);
  outline-offset: 2px;
}

.mono {
  font-family: "Martian Mono", ui-monospace, Menlo, monospace;
  font-variant-numeric: tabular-nums;
}

.ico {
  width: 20px;
  height: 20px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.8;
  stroke-linecap: round;
  stroke-linejoin: round;
  flex: none;
}

.app[data-ecran="accueil"]::before {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  top: 0;
  height: 268px;
  z-index: 0;
  border-radius: 0 0 28px 28px;
  background:
    linear-gradient(112deg, transparent 60%, rgba(255, 255, 255, .13) 60% 62.5%, transparent 62.5%),
    linear-gradient(112deg, transparent 72%, rgba(255, 255, 255, .08) 72% 73.5%, transparent 73.5%),
    var(--a-degrade);
}

.barre {
  position: relative;
  z-index: 2;
  flex: none;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 12px 16px 10px;
  padding-top: calc(12px + env(safe-area-inset-top, 0px));
  background: var(--a-surf);
  border-bottom: 1px solid var(--a-ligne);
}
.app[data-ecran="accueil"] .barre {
  background: transparent;
  border-color: transparent;
  color: #fff;
}
.ent { display: flex; align-items: center; gap: 10px; min-width: 0; flex: 1; }
.logo {
  width: 34px;
  height: 34px;
  border-radius: 10px;
  display: grid;
  place-items: center;
  font-weight: 800;
  font-size: 13px;
  flex: none;
  background: var(--a-accent);
  color: var(--a-sur-accent);
}
.app[data-ecran="accueil"] .logo { background: #fff; color: var(--a-accent); }
.nom {
  font-weight: 700;
  font-size: 15px;
  min-width: 0;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.nom small {
  display: block;
  font-weight: 500;
  font-size: 11px;
  opacity: .72;
  overflow: hidden;
  text-overflow: ellipsis;
}
.barre-d { display: flex; align-items: center; gap: 10px; }
.btn-visite {
  flex: none;
  border: 1px solid var(--a-ligne);
  background: transparent;
  border-radius: 999px;
  padding: 7px 13px;
  font-size: 13px !important;
  font-weight: 650;
  display: flex;
  gap: 6px;
  align-items: center;
  min-height: 38px;
}
.app[data-ecran="accueil"] .btn-visite {
  border-color: rgba(255, 255, 255, .45);
  color: #fff;
}
.btn-visite .ico { width: 16px; height: 16px; }

.ecran {
  position: relative;
  z-index: 1;
  flex: 1;
  min-height: 0;
  overflow-y: auto;
  overflow-x: hidden;
  padding: 16px 16px 118px;
  -webkit-overflow-scrolling: touch;
  display: flex;
  flex-direction: column;
  gap: 16px;
}
.ecran > * { min-width: 0; max-width: 100%; }

h2.titre {
  font-size: 27px;
  font-weight: 800;
  letter-spacing: -.9px;
  line-height: 1.1;
  margin: 0;
  text-wrap: balance;
}
.sous { margin: 5px 0 0; color: var(--a-doux); font-size: 14px; line-height: 1.4; }
.app[data-ecran="accueil"] .hero h2.titre,
.app[data-ecran="accueil"] .hero .sous { color: #fff; }
.app[data-ecran="accueil"] .hero .sous { opacity: .88; }

.adapter {
  margin-top: 10px;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  border: 0;
  background: rgba(255, 255, 255, .18);
  color: #fff;
  border-radius: 999px;
  padding: 7px 12px;
  font-size: 12.5px !important;
  font-weight: 650;
  min-height: 34px;
}

.sur {
  font-size: 10.5px;
  font-weight: 500;
  letter-spacing: .1em;
  text-transform: uppercase;
  color: var(--a-doux);
  margin: 0 0 8px;
}

.tuiles { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; }
.tuile {
  position: relative;
  text-align: left;
  padding: 11px 10px 10px;
  display: grid;
  gap: 2px;
  align-content: start;
  background: var(--a-surf);
  border: 1px solid var(--a-ligne);
  border-radius: 16px;
  box-shadow: var(--a-ombre);
  overflow: hidden;
}
.tuile i {
  font-style: normal;
  font-size: 9.5px;
  letter-spacing: .06em;
  text-transform: uppercase;
  color: var(--a-doux);
  line-height: 1.25;
}
.tuile b {
  font-size: clamp(18px, 5.4vw, 23px);
  font-weight: 800;
  letter-spacing: -.6px;
  white-space: nowrap;
  color: var(--a-accent-texte);
  font-variant-numeric: tabular-nums;
  line-height: 1.2;
}
.tuile small { font-size: 11px; color: var(--a-doux); line-height: 1.25; }
.tuile small.mal { color: var(--a-alerte); font-weight: 600; }
.tuile small.bien { color: var(--a-ok); font-weight: 600; }
.tuile svg.trait { position: absolute; right: 6px; top: 10px; width: 38px; height: 16px; }

.banniere {
  padding: 14px;
  border-radius: 16px;
  background: var(--a-alerte-fond);
  border: 1px solid var(--a-alerte-ligne);
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 4px 10px;
}
.banniere b { font-size: 15px; line-height: 1.3; }
.banniere span { grid-column: 1; font-size: 13.5px; color: var(--a-doux); line-height: 1.4; }
.banniere .x {
  grid-column: 2;
  grid-row: 1;
  border: 0;
  background: none;
  color: var(--a-doux);
  width: 32px;
  height: 32px;
  margin: -6px -6px 0 0;
  border-radius: 8px;
  font-size: 18px !important;
}
.app[data-sombre] .banniere .go { color: #1a1206; }
.banniere .go {
  grid-column: 1 / -1;
  justify-self: start;
  margin-top: 6px;
  border: 0;
  background: var(--a-alerte);
  color: #fff;
  border-radius: 10px;
  padding: 10px 14px;
  font-weight: 650;
  font-size: 14px !important;
  min-height: 42px;
}
.app[data-sombre] .banniere .go { color: #1a1206; }

.carte {
  background: var(--a-surf);
  border: 1px solid var(--a-ligne);
  border-radius: 16px;
  min-width: 0;
}
.liste { display: grid; }
.ligne {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  gap: 12px;
  padding: 13px 14px;
  border-top: 1px solid var(--a-ligne);
  align-items: start;
}
.ligne:first-child { border-top: 0; }
.heure {
  font-family: "Martian Mono", ui-monospace, monospace;
  font-size: 11.5px;
  min-width: 46px;
  color: var(--a-accent-texte);
  padding-top: 3px;
  font-variant-numeric: tabular-nums;
}
.quoi > b, .quoi > button > b { display: block; font-size: 15px; line-height: 1.3; }
.quoi > span, .quoi > button > span {
  display: block;
  font-size: 13px;
  color: var(--a-doux);
  margin-top: 2px;
  line-height: 1.35;
}
.quoi > button { border: 0; background: none; padding: 0; text-align: left; width: 100%; }
.pas {
  display: inline-block;
  font-size: 10.5px;
  font-weight: 650;
  padding: 2px 8px;
  border-radius: 999px;
  background: var(--a-ok-fond);
  color: var(--a-ok);
  margin-left: 6px;
  vertical-align: 2px;
}
.pas.att { background: var(--a-alerte-fond); color: var(--a-alerte); }
.pas.neuf { background: var(--a-pale); color: var(--a-accent-texte); }
.gestes { display: flex; gap: 6px; margin-top: 9px; flex-wrap: wrap; }
.geste {
  border: 1px solid var(--a-ligne);
  background: var(--a-surf-2);
  border-radius: 10px;
  padding: 6px 9px;
  font-size: 12.5px !important;
  font-weight: 600;
  display: inline-flex;
  gap: 5px;
  align-items: center;
  min-height: 34px;
}
.geste .ico { width: 15px; height: 15px; }
.av {
  width: 38px;
  height: 38px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  font-weight: 700;
  font-size: 12.5px;
  background: var(--a-pale);
  color: var(--a-accent-texte);
}
.recherche {
  width: 100%;
  border: 1px solid var(--a-ligne);
  background: var(--a-champ);
  color: var(--a-texte);
  border-radius: 12px;
  padding: 12px 14px;
  font: inherit;
  font-size: 16px;
}
.recherche::placeholder { color: var(--a-doux); }
.vide { padding: 22px 16px; text-align: center; color: var(--a-doux); font-size: 14px; line-height: 1.45; }
.vide b { display: block; color: var(--a-texte); margin-bottom: 4px; }
.retour {
  align-self: flex-start;
  border: 0;
  background: none;
  padding: 0;
  color: var(--a-accent-texte);
  font-weight: 600;
  font-size: 14px !important;
  display: flex;
  gap: 4px;
  align-items: center;
  min-height: 34px;
}
.onglets {
  display: flex;
  gap: 2px;
  overflow-x: auto;
  border-bottom: 1px solid var(--a-ligne);
  scrollbar-width: none;
  margin-inline: -16px;
  padding-inline: 16px;
}
.onglets button {
  flex: none;
  border: 0;
  background: none;
  padding: 10px 10px 11px;
  font-size: 13.5px !important;
  font-weight: 600;
  color: var(--a-doux);
  box-shadow: inset 0 -2px transparent;
  min-height: 42px;
}
.onglets button[aria-pressed="true"] {
  color: var(--a-texte);
  box-shadow: inset 0 -3px var(--a-accent);
}
.onglets em {
  font-style: normal;
  font-family: "Martian Mono", monospace;
  font-size: 11px;
  margin-left: 5px;
  opacity: .8;
}

.semaine { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); gap: 4px; }
.semaine button {
  border: 1px solid var(--a-ligne);
  background: var(--a-surf);
  border-radius: 12px;
  padding: 7px 0;
  display: grid;
  gap: 2px;
  font-size: 10.5px !important;
  color: var(--a-doux);
  min-height: 58px;
}
.semaine button b { font-size: 16px; color: var(--a-texte); font-weight: 700; }
.semaine button[aria-pressed="true"] {
  background: var(--a-accent);
  border-color: var(--a-accent);
  color: var(--a-sur-accent);
}
.semaine button[aria-pressed="true"] b { color: var(--a-sur-accent); }
.semaine .pt {
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: currentColor;
  justify-self: center;
  opacity: .6;
}

.fil { display: grid; gap: 14px; }
.paquet { display: grid; grid-template-columns: auto minmax(0, 1fr); gap: 10px; }
.paquet .qui { font-size: 13px; font-weight: 700; }
.paquet .qui time {
  font-weight: 400;
  color: var(--a-doux);
  margin-left: 6px;
  font-family: "Martian Mono", monospace;
  font-size: 10.5px;
}
.bulle {
  background: var(--a-surf);
  border: 1px solid var(--a-ligne);
  border-radius: 4px 14px 14px 14px;
  padding: 9px 12px;
  font-size: 14px;
  line-height: 1.4;
  margin-top: 5px;
}
.paquet.moi { grid-template-columns: minmax(0, 1fr); }
.paquet.moi > div { justify-self: end; text-align: right; }
.paquet.moi .bulle {
  background: var(--a-accent);
  color: var(--a-sur-accent);
  border-color: var(--a-accent);
  border-radius: 14px 4px 14px 14px;
  text-align: left;
}
.photo {
  margin-top: 5px;
  height: 100px;
  border-radius: 12px;
  border: 1px solid var(--a-ligne);
  background: linear-gradient(135deg, var(--a-pale), var(--a-surf-2));
  display: grid;
  align-content: end;
  padding: 8px;
  font-size: 11px;
  color: var(--a-doux);
}
.vocale {
  margin-top: 5px;
  display: flex;
  gap: 8px;
  align-items: center;
  background: var(--a-surf);
  border: 1px solid var(--a-ligne);
  border-radius: 999px;
  padding: 8px 12px;
  font-size: 11px;
  color: var(--a-doux);
}
.vocale .onde {
  flex: 1;
  height: 18px;
  background: repeating-linear-gradient(90deg, var(--a-accent) 0 2px, transparent 2px 5px);
  opacity: .6;
  -webkit-mask: linear-gradient(90deg, #000 55%, #0003 55%);
  mask: linear-gradient(90deg, #000 55%, #0003 55%);
}
.ecrire { display: flex; gap: 8px; }
.ecrire input { flex: 1; min-width: 0; }
.ecrire button {
  border: 0;
  background: var(--a-accent);
  color: var(--a-sur-accent);
  border-radius: 12px;
  padding: 0 16px;
  font-weight: 650;
  min-height: 48px;
}

.grille { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; }
.ecran > * { min-width: 0; max-width: 100%; }
.module {
  text-align: left;
  border: 1px solid var(--a-ligne);
  background: var(--a-surf);
  border-radius: 16px;
  padding: 12px;
  display: grid;
  gap: 6px;
  align-content: start;
  min-height: 108px;
}
.module .ic, .feuille .ic {
  width: 34px;
  height: 34px;
  border-radius: 10px;
  display: grid;
  place-items: center;
  background: var(--a-pale);
  color: var(--a-accent-texte);
}
.module b { font-size: 14px; line-height: 1.25; }
.module span { font-size: 12px; color: var(--a-doux); line-height: 1.3; }
.bloc-cta {
  display: grid;
  gap: 8px;
  padding: 18px 16px;
  text-align: center;
  border: 0;
  border-radius: 18px;
  background: var(--a-degrade);
  color: #fff;
}
.bloc-cta b { font-size: 17px; letter-spacing: -.3px; }
.bloc-cta span { font-size: 13.5px; opacity: .9; line-height: 1.4; }
.section { display: grid; grid-template-columns: minmax(0, 1fr); gap: 10px; }
.section > h3 { margin: 0; font-size: 17px; font-weight: 800; letter-spacing: -.3px; }
.section > p { margin: -4px 0 0; font-size: 13px; color: var(--a-doux); line-height: 1.4; }
.demande {
  display: grid;
  gap: 8px;
  padding: 14px;
  border-radius: 18px;
  background: var(--a-degrade);
  color: #fff;
}
.demande b { font-size: 17px; letter-spacing: -.3px; }
.demande span { font-size: 13px; opacity: .9; line-height: 1.4; }
.demande textarea {
  width: 100%;
  min-height: 74px;
  resize: none;
  border: 0;
  border-radius: 12px;
  padding: 11px 12px;
  font: inherit;
  font-size: 16px;
  color: #101820;
  background: #fff;
}
.demande button {
  border: 0;
  background: #101820;
  color: #fff;
  border-radius: 12px;
  min-height: 48px;
  font-weight: 700;
}
.reponse {
  display: grid;
  gap: 8px;
  padding: 14px;
  border-radius: 16px;
  background: var(--a-surf);
  border: 1px solid var(--a-ligne);
  border-left: 4px solid var(--a-ok);
}
.reponse.non { border-left-color: var(--a-accent); }
.reponse b { font-size: 15px; line-height: 1.3; }
.reponse span { font-size: 13.5px; color: var(--a-doux); line-height: 1.4; }
.reponse .rangee button, .reponse .rangee a { min-height: 46px; font-size: 14px !important; }
.modif { display: grid; grid-template-columns: minmax(0, 1fr); gap: 8px; padding: 12px 14px; border-top: 1px solid var(--a-ligne); }
.modif:first-child { border-top: 0; }
.modif > b { font-size: 14px; }
.modif > small { font-size: 12px; color: var(--a-doux); margin-top: -4px; }
.champ-ligne { display: flex; gap: 8px; min-width: 0; }
.champ-ligne input {
  flex: 1 1 auto;
  width: 100%;
  min-width: 0;
  border: 1px solid var(--a-ligne);
  background: var(--a-champ);
  color: var(--a-texte);
  border-radius: 10px;
  padding: 10px 12px;
  font: inherit;
  font-size: 16px;
}
.champ-ligne button {
  border: 0;
  background: var(--a-accent);
  color: var(--a-sur-accent);
  border-radius: 10px;
  padding: 0 14px;
  font-weight: 700;
  min-height: 44px;
  flex: none;
}
.pastilles { display: flex; gap: 8px; flex-wrap: wrap; }
.pastilles button { width: 34px; height: 34px; border-radius: 50%; border: 3px solid var(--a-surf); box-shadow: 0 0 0 1px var(--a-ligne); }
.pastilles button[aria-pressed="true"] { box-shadow: 0 0 0 2px var(--a-texte); }
.roles { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 6px; }
.roles button {
  border: 1px solid var(--a-ligne);
  background: var(--a-surf);
  border-radius: 14px;
  padding: 10px 6px;
  display: grid;
  gap: 3px;
  justify-items: center;
  text-align: center;
  min-height: 84px;
}
.roles button b { font-size: 13px; }
.roles button span { font-size: 11px; color: var(--a-doux); line-height: 1.2; }
.roles button[aria-pressed="true"] { border-color: var(--a-accent); box-shadow: inset 0 0 0 1px var(--a-accent); }
.ajoute {
  display: inline-block;
  font-size: 10.5px;
  font-weight: 650;
  padding: 2px 8px;
  border-radius: 999px;
  background: var(--a-pale);
  color: var(--a-accent-texte);
  margin-left: 6px;
  vertical-align: 2px;
}
.vue-role {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 10px;
  padding: 10px 12px;
  border-radius: 12px;
  background: var(--a-pale);
  color: var(--a-accent-texte);
  font-size: 13px;
  font-weight: 600;
}
.vue-role button {
  border: 0;
  background: var(--a-accent);
  color: var(--a-sur-accent);
  border-radius: 999px;
  padding: 7px 12px;
  font-weight: 700;
  font-size: 12.5px !important;
  min-height: 34px;
}
.punch {
  display: grid;
  gap: 4px;
  padding: 16px;
  border-radius: 18px;
  background: var(--a-surf);
  border: 1px solid var(--a-ligne);
  text-align: center;
}
.punch button {
  border: 0;
  border-radius: 14px;
  min-height: 56px;
  font-weight: 800;
  font-size: 16px !important;
  background: var(--a-ok);
  color: #fff;
}
.punch button.fin { background: var(--a-texte); color: var(--a-fond); }
.punch small { font-size: 12.5px; color: var(--a-doux); }
.gros { font-size: 28px; font-weight: 800; letter-spacing: -.8px; font-variant-numeric: tabular-nums; }
.retour-patron {
  position: absolute;
  left: 12px;
  right: 12px;
  bottom: calc(12px + env(safe-area-inset-bottom, 0px));
  z-index: 5;
  border: 0;
  border-radius: 18px;
  min-height: 54px;
  background: var(--a-nav);
  color: #fff !important;
  font-weight: 700;
  display: flex;
  gap: 8px;
  justify-content: center;
  align-items: center;
}
.carte-rencontre { padding: 16px; display: grid; gap: 8px; text-align: center; }
.carte-rencontre b { font-size: 16px; }
.carte-rencontre span { font-size: 13.5px; color: var(--a-doux); line-height: 1.4; }
.carte-rencontre a {
  border: 0;
  background: var(--a-accent);
  color: var(--a-sur-accent);
  border-radius: 14px;
  min-height: 50px;
  font-weight: 700;
  display: flex;
  align-items: center;
  justify-content: center;
  text-decoration: none;
}
.carte-prochain { padding: 16px; display: grid; gap: 6px; }
.carte-prochain .sur { margin: 0; }
.prochain-titre { font-size: 18px; }
.prochain-sous { color: var(--a-doux); font-size: 13.5px; }
.apercu { border: 1px solid var(--a-ligne); border-radius: 14px; overflow: hidden; background: var(--a-surf-2); }
.apercu div { display: flex; justify-content: space-between; gap: 10px; padding: 10px 12px; border-top: 1px solid var(--a-ligne); font-size: 13px; }
.apercu div:first-child { border-top: 0; }
.apercu div span:last-child { color: var(--a-doux); text-align: right; }
.app.clavier .nav, .app.clavier .retour-patron { display: none; }
.app.clavier .ecran { padding-bottom: 16px; }

@media (max-width: 340px) {
  .reglage { flex-direction: column; align-items: stretch; }
}

.large, a.large {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 8px;
  width: 100%;
  border: 1px solid var(--a-ligne);
  background: var(--a-surf);
  border-radius: 12px;
  padding: 13px;
  font-weight: 650;
  min-height: 50px;
  color: inherit;
  text-decoration: none;
}

.nav {
  position: absolute;
  left: 10px;
  right: 10px;
  bottom: calc(10px + env(safe-area-inset-bottom, 0px));
  z-index: 5;
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 2px;
  padding: 5px;
  border-radius: 24px;
  background: var(--a-nav);
  box-shadow: 0 16px 30px -12px rgba(8, 12, 18, .6);
}
.nav button {
  position: relative;
  border: 0;
  background: none;
  display: grid;
  justify-items: center;
  gap: 2px;
  min-height: 56px;
  padding: 7px 0 6px;
  font-size: 10.5px !important;
  font-weight: 600;
  color: var(--a-nav-doux) !important;
  border-radius: 19px;
}
.nav button[aria-current="page"] {
  color: #fff !important;
  background: var(--a-degrade);
}
.nav .n {
  position: absolute;
  top: 5px;
  left: calc(50% + 6px);
  background: #ff5a36;
  color: #fff;
  font-size: 9.5px;
  font-weight: 700;
  border-radius: 999px;
  padding: 0 5px;
  line-height: 15px;
}

.q { display: grid; gap: 8px; }
.q > b { font-size: 14px; }
.puces { display: flex; gap: 6px; flex-wrap: wrap; }
.puce {
  border: 1px solid var(--a-ligne);
  background: var(--a-surf);
  border-radius: 999px;
  padding: 8px 13px;
  font-size: 13.5px !important;
  font-weight: 600;
  min-height: 40px;
}
.puce[aria-pressed="true"] {
  background: var(--a-accent);
  border-color: var(--a-accent);
  color: var(--a-sur-accent);
}
.reglage {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  align-items: center;
  gap: 8px 12px;
  padding: 12px 14px;
  font-size: 14px;
  font-weight: 600;
}
.segments {
  display: flex;
  border: 1px solid var(--a-ligne);
  border-radius: 10px;
  padding: 2px;
  gap: 2px;
  background: var(--a-surf-2);
}
.segments button {
  border: 0;
  background: none;
  border-radius: 8px;
  padding: 6px 10px;
  font-size: 12.5px !important;
  font-weight: 600;
  color: var(--a-doux);
  min-height: 34px;
}
.segments button[aria-pressed="true"] {
  background: var(--a-surf);
  color: var(--a-texte);
  box-shadow: 0 1px 3px rgba(0, 0, 0, .12);
}

.pousse {
  position: absolute;
  left: 10px;
  right: 10px;
  top: 10px;
  z-index: 11;
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  gap: 10px;
  align-items: center;
  text-align: left;
  border: 0;
  padding: 11px 13px;
  border-radius: 18px;
  background: #fafbfd;
  color: #101820;
  box-shadow: 0 14px 34px -10px rgba(8, 12, 18, .45);
}
.pousse .logo { width: 30px; height: 30px; font-size: 11px; background: var(--a-accent); color: #fff; }
.pousse b { display: block; font-size: 13.5px; }
.pousse span { display: block; font-size: 12.5px; color: #4d5a6b; line-height: 1.3; }
.pousse small { font-size: 10.5px; color: #7b8796; font-weight: 600; letter-spacing: .02em; }

.voile {
  position: absolute;
  inset: 0;
  background: rgba(8, 12, 18, .48);
  z-index: 8;
  border: 0;
  width: 100%;
}
.feuille {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 9;
  background: var(--a-surf);
  color: var(--a-texte);
  border-radius: 24px 24px 0 0;
  padding: 10px 18px calc(18px + env(safe-area-inset-bottom, 0px));
  box-shadow: 0 -12px 30px rgba(0, 0, 0, .22);
  display: grid;
  gap: 12px;
  max-height: 86%;
  overflow-y: auto;
}
.feuille .poignee {
  width: 40px;
  height: 4px;
  border-radius: 4px;
  background: var(--a-ligne);
  justify-self: center;
}
.feuille h3 {
  margin: 0;
  font-size: 21px;
  font-weight: 800;
  letter-spacing: -.5px;
  line-height: 1.2;
}
.feuille p { margin: 0; color: var(--a-doux); font-size: 14px; line-height: 1.45; }
.feuille .etape {
  font-family: "Martian Mono", monospace;
  font-size: 11px;
  color: var(--a-accent-texte);
}
.barre-prog { height: 4px; border-radius: 4px; background: var(--a-ligne); overflow: hidden; }
.barre-prog span { display: block; height: 100%; background: var(--a-degrade); }
.rangee {
  display: flex;
  gap: 8px;
  position: sticky;
  bottom: 0;
  background: var(--a-surf);
  padding-top: 4px;
  z-index: 1;
}
.rangee button, .rangee a {
  flex: 1;
  min-height: 54px;
  border-radius: 14px;
  font-weight: 700;
  font-size: 15px !important;
  border: 1px solid var(--a-ligne);
  background: transparent;
  color: inherit;
  text-decoration: none;
  display: flex;
  align-items: center;
  justify-content: center;
}
.rangee button.plein, .rangee a.plein {
  background: var(--a-accent);
  border-color: var(--a-accent);
  color: var(--a-sur-accent);
}

.cible {
  position: relative;
  z-index: 7;
  box-shadow: 0 0 0 3px var(--a-cyan), 0 0 0 2000px rgba(8, 12, 18, .5) !important;
  border-radius: 16px;
}
.pousse.cible {
  position: absolute;
  border-radius: 18px;
}
.bienvenue .ic-lpx {
  width: 48px;
  height: 48px;
  border-radius: 14px;
  background: var(--a-degrade);
  display: grid;
  place-items: center;
  color: #fff;
}
.bienvenue .ic-lpx .ico { width: 24px; height: 24px; }
.bienvenue ul { margin: 0; padding: 0; list-style: none; display: grid; gap: 9px; }
.bienvenue li { display: flex; gap: 10px; align-items: center; font-size: 14px; font-weight: 600; }
.bienvenue li .ico { color: var(--a-accent-texte); }
.pile { display: grid; gap: 8px; }
.pile button {
  min-height: 54px;
  border-radius: 14px;
  font-weight: 700;
  font-size: 15px !important;
  border: 1px solid var(--a-ligne);
  background: transparent;
}
.pile button.plein {
  background: var(--a-accent);
  border-color: var(--a-accent);
  color: var(--a-sur-accent);
}
.bureau-seul, .lat-tete, .lat-pied { display: none; }
.feuille .petit { font-size: 12px; color: var(--a-doux); text-align: center; }
.chap { display: flex; justify-content: space-between; align-items: center; gap: 10px; }
.chap span {
  font-size: 11px;
  font-weight: 700;
  letter-spacing: .08em;
  text-transform: uppercase;
  color: var(--a-accent-texte);
}
.chap .passer {
  border: 0;
  background: none;
  color: var(--a-doux);
  font-size: 13px !important;
  font-weight: 600;
  text-decoration: underline;
  text-underline-offset: 3px;
  min-height: 36px;
  padding: 0 4px;
}
.toast {
  position: absolute;
  left: 16px;
  right: 16px;
  bottom: 92px;
  z-index: 12;
  background: var(--a-texte);
  color: var(--a-fond);
  padding: 12px 14px;
  border-radius: 14px;
  font-size: 14px;
  font-weight: 600;
  box-shadow: 0 10px 24px -8px rgba(0, 0, 0, .4);
}

@media (prefers-reduced-motion: no-preference) {
  .feuille { animation: monte .24s cubic-bezier(.2, .7, .3, 1); }
  @keyframes monte { from { transform: translateY(40px); opacity: .3; } }
  .pousse { animation: tombe .4s cubic-bezier(.2, .7, .3, 1); }
  @keyframes tombe { from { transform: translateY(-90px); } }
}

@media (min-width: 900px) {
  body { display: block; background: var(--a-fond); }
  .app {
    width: 100%;
    max-width: none;
    height: 100dvh;
    border-radius: 0;
    box-shadow: none;
    display: grid;
    grid-template-columns: 244px minmax(0, 1fr);
    grid-template-rows: auto minmax(0, 1fr);
  }
  .app.sans-lat { grid-template-columns: minmax(0, 1fr); }
  .app.sans-lat .barre, .app.sans-lat .ecran { grid-column: 1; }
  .app[data-ecran="accueil"]::before { left: 244px; height: 236px; border-radius: 0 0 0 30px; }
  .bureau-seul { display: flex; }
  .mobile-seul { display: none !important; }
  .barre { grid-column: 2; grid-row: 1; padding: 14px 32px; gap: 20px; }
  .barre .ent { display: none; }
  .cherche { flex: 1; max-width: 460px; }
  .cherche input {
    width: 100%;
    border: 1px solid var(--a-ligne);
    background: var(--a-champ);
    color: var(--a-texte);
    border-radius: 12px;
    padding: 10px 14px;
    font: inherit;
    font-size: 14px;
  }
  .app[data-ecran="accueil"] .cherche input {
    background: rgba(255, 255, 255, .16);
    border-color: rgba(255, 255, 255, .35);
    color: #fff;
  }
  .app[data-ecran="accueil"] .cherche input::placeholder { color: rgba(255, 255, 255, .8); }
  .app[data-ecran="accueil"] .moi small { color: rgba(255, 255, 255, .8); }
  .barre-d { display: flex; align-items: center; gap: 10px; }
  .moi { align-items: center; gap: 8px; font-size: 13px; font-weight: 650; }
  .moi small { display: block; font-weight: 500; color: var(--a-doux); font-size: 11px; }
  .ecran {
    grid-column: 2;
    grid-row: 2;
    padding: 22px max(32px, calc((100% - 1160px) / 2)) 40px;
    gap: 20px;
  }
  h2.titre { font-size: 32px; }
  .nav {
    position: relative;
    left: auto;
    right: auto;
    bottom: auto;
    grid-column: 1;
    grid-row: 1 / span 2;
    display: flex;
    flex-direction: column;
    gap: 4px;
    padding: 16px 12px;
    border-radius: 0;
    box-shadow: none;
    overflow-y: auto;
  }
  .nav > button, .lat-pied button, .lat-pied a {
    display: flex;
    align-items: center;
    gap: 12px;
    min-height: 46px;
    padding: 0 14px;
    font-size: 14px !important;
    border-radius: 12px;
    justify-items: start;
    color: var(--a-nav-doux) !important;
    text-decoration: none;
    border: 0;
    background: none;
    font-weight: 600;
    text-align: left;
    justify-content: flex-start;
  }
  .nav > button:hover, .lat-pied button:hover, .lat-pied a:hover {
    background: rgba(255, 255, 255, .06);
    color: #fff !important;
  }
  .nav .n { position: static; margin-left: auto; order: 3; }
  .lat-tete { display: flex; align-items: center; gap: 10px; padding: 4px 8px 18px; color: #fff; }
  .lat-tete .nom small { color: var(--a-nav-doux); }
  .lat-pied {
    display: grid;
    gap: 2px;
    margin-top: auto;
    padding-top: 14px;
    border-top: 1px solid rgba(255, 255, 255, .08);
  }
  .tuiles { gap: 14px; }
  .tuile { padding: 18px 18px 16px; gap: 4px; }
  .tuile i { font-size: 11px; }
  .tuile b { font-size: 34px; }
  .tuile small { font-size: 12.5px; }
  .tuile svg.trait { width: 64px; height: 24px; right: 14px; top: 16px; }
  .bord {
    display: grid;
    grid-template-columns: minmax(0, 1.45fr) minmax(300px, 1fr);
    grid-template-areas: "jour ban" "jour extra";
    gap: 20px;
    align-items: start;
  }
  .bord .banniere { grid-area: ban; }
  .bord-jour { grid-area: jour; }
  .bord-extra { grid-area: extra; flex-direction: column; gap: 16px; }
  .carte-tete {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 12px 14px;
    border-bottom: 1px solid var(--a-ligne);
  }
  .carte-tete b { font-size: 14px; }
  .carte-tete button {
    border: 0;
    background: none;
    color: var(--a-accent-texte);
    font-weight: 650;
    font-size: 13px !important;
  }
  .md {
    display: grid;
    grid-template-columns: minmax(300px, 380px) minmax(0, 1fr);
    gap: 20px;
    align-items: start;
  }
  .md-liste { display: flex; flex-direction: column; gap: 12px; position: sticky; top: 0; }
  .md-fiche {
    display: flex;
    flex-direction: column;
    gap: 16px;
    background: var(--a-surf);
    border: 1px solid var(--a-ligne);
    border-radius: 18px;
    padding: 22px 24px;
    min-width: 0;
  }
  .md-fiche .fil { max-height: none; }
  .ligne.choisi { background: var(--a-pale); }
  .onglets { margin-inline: 0; padding-inline: 0; }
  .grille.photos { grid-template-columns: repeat(4, minmax(0, 1fr)); }
  .sem-b { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); gap: 8px; }
  .sem-col {
    display: flex;
    flex-direction: column;
    gap: 6px;
    background: var(--a-surf);
    border: 1px solid var(--a-ligne);
    border-radius: 14px;
    padding: 10px;
    min-height: 280px;
    min-width: 0;
  }
  .sem-col.auj { border-color: var(--a-accent); box-shadow: inset 0 3px var(--a-accent); }
  .sem-tete {
    display: flex;
    justify-content: space-between;
    align-items: baseline;
    font-size: 12px;
    color: var(--a-doux);
    font-weight: 600;
    padding-bottom: 4px;
  }
  .sem-tete b { font-size: 18px; color: var(--a-texte); }
  .evt {
    text-align: left;
    border: 0;
    border-left: 3px solid var(--a-ok);
    background: var(--a-surf-2);
    border-radius: 8px;
    padding: 7px 8px;
    display: grid;
    gap: 1px;
    min-width: 0;
  }
  .evt.att { border-left-color: var(--a-alerte); }
  .evt .heure { min-width: 0; padding: 0; font-size: 10.5px; }
  .evt b { font-size: 12.5px; line-height: 1.25; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
  .evt small { font-size: 11px; color: var(--a-doux); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
  .sem-vide { margin: auto 0; font-size: 11.5px; color: var(--a-doux); text-align: center; }
  .rangee-d { display: flex; justify-content: flex-end; }
  .rangee-d .large { width: auto; padding: 0 22px; }
  .st { display: grid; grid-template-columns: minmax(0, 1.1fr) minmax(0, 1fr); gap: 20px; align-items: start; }
  .st-a, .st-b { display: flex; flex-direction: column; gap: 16px; min-width: 0; }
  .grille.modules { grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 12px; }
  .reglage { max-width: 460px; }
  .mock { display: grid; justify-items: center; gap: 10px; }
  .mock-tel {
    width: 390px;
    max-width: 100%;
    border: 9px solid #101820;
    border-radius: 36px;
    padding: 20px 16px;
    display: flex;
    flex-direction: column;
    gap: 16px;
    background: var(--a-fond);
    box-shadow: 0 30px 60px -30px rgba(16, 24, 32, .5);
  }
  .mock-web {
    width: 100%;
    max-width: 820px;
    border: 1px solid var(--a-ligne);
    border-radius: 14px;
    overflow: hidden;
    background: var(--a-fond);
    box-shadow: 0 30px 60px -30px rgba(16, 24, 32, .4);
  }
  .mock-web-barre {
    display: flex;
    gap: 6px;
    align-items: center;
    padding: 10px 14px;
    background: var(--a-surf);
    border-bottom: 1px solid var(--a-ligne);
    font-size: 12px;
    color: var(--a-doux);
  }
  .mock-web-barre i { width: 10px; height: 10px; border-radius: 50%; background: var(--a-ligne); }
  .mock-web-barre span { margin-left: 10px; }
  .mock-web-corps { padding: 24px; display: flex; flex-direction: column; gap: 16px; }
  .mock-tel h2.titre, .mock-web h2.titre { font-size: 26px; }
  .feuille {
    left: 50%;
    right: auto;
    bottom: auto;
    top: 50%;
    transform: translate(-50%, -50%);
    width: min(540px, calc(100% - 48px));
    border-radius: 22px;
    max-height: 84%;
    padding: 22px 24px;
    animation: none;
  }
  .feuille .poignee { display: none; }
  .feuille.visite {
    top: auto;
    left: auto;
    right: 24px;
    bottom: 24px;
    transform: none;
    width: 400px;
    box-shadow: 0 24px 60px -12px rgba(8, 12, 18, .5);
    border: 1px solid var(--a-ligne);
  }
  .pousse { left: auto; right: 24px; top: 18px; width: 390px; }
  .toast {
    left: 50%;
    right: auto;
    transform: translateX(-50%);
    bottom: 28px;
    width: max-content;
    max-width: 480px;
  }
  .retour-patron { left: auto; right: 24px; bottom: 24px; padding: 0 22px; }
  .rangee button, .rangee a { min-height: 48px; }
}
