:root {
  --petrole: #0b2745;
  --turquoise: #0d9488;
  --teal: #2dd4bf;
  --papier: #f7f4ee;
  --mint: #f0fdfa;
  --ink: #0b2745;
  --accent: #0d9488;
  --accent-soft: #ccfbf1;
  --btn-bg: #0b2745;
  --btn-text: #f7f4ee;
  --tile-bg: #ffffff;
  font-family: "Segoe UI", "Iowan Old Style", Georgia, serif;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  min-height: 100vh;
  overflow-x: hidden;
  color: var(--ink);
  background:
    radial-gradient(ellipse 120% 80% at 10% -10%, #0d948833, transparent 55%),
    radial-gradient(ellipse 90% 60% at 100% 0%, #0b274522, transparent 50%),
    linear-gradient(165deg, var(--papier) 0%, var(--mint) 45%, #e8f5f2 100%);
}

.motif {
  position: fixed;
  inset: 0;
  pointer-events: none;
  opacity: 0.12;
  background-image: url("/librairie/motif/motif_orbes.svg");
  background-size: 420px;
  background-repeat: repeat;
  z-index: 0;
}

.hero,
main,
.jopai-footer {
  position: relative;
  z-index: 1;
}

.hero {
  min-height: 18vh;
  display: flex;
  align-items: flex-end;
  padding: 1.25rem 1.5rem 1.35rem;
  margin-top: 0;
  background:
    linear-gradient(180deg, #0b2745ee 0%, #0b2745cc 55%, transparent 100%),
    url("/librairie/hero/hero_atrium.svg") center / cover no-repeat;
  color: var(--papier);
  isolation: isolate;
}

.hero-copy {
  max-width: 40rem;
}

.brand-mark {
  margin: 0 0 0.75rem;
}

.baseline {
  margin: 0;
  font-size: 1.35rem;
  font-style: italic;
  opacity: 0.95;
}

.session-line {
  margin: 0.75rem 0 0;
  font-family: system-ui, sans-serif;
  font-size: 0.85rem;
  opacity: 0.9;
}

.session-line a {
  color: var(--teal);
}

main {
  max-width: 44rem;
  margin: 0 auto;
  padding: 2rem 1.5rem 4rem;
}

.cockpit h1,
.socle h2 {
  margin: 0 0 0.35rem;
  font-size: 1.5rem;
}

.gps-tip {
  margin: 0 0 1rem;
  padding: 0.75rem 0.9rem;
  border-left: 3px solid var(--turquoise);
  background: #0d948814;
  font-family: system-ui, sans-serif;
  font-size: 0.92rem;
  color: #234;
  line-height: 1.4;
  max-width: 40rem;
}

.section-lede {
  margin: 0 0 1.25rem;
  font-family: system-ui, sans-serif;
  color: #335;
  font-size: 0.95rem;
}

.actions {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.action {
  width: 100%;
  display: block;
  text-decoration: none;
  text-align: left;
  border: 1px solid #0b274522;
  background: #ffffffcc;
  padding: 1rem 1.15rem;
  cursor: pointer;
  border-radius: 2px;
  box-sizing: border-box;
  transition: border-color 0.2s ease, transform 0.2s ease, background 0.2s ease;
}

.action:hover {
  border-color: var(--turquoise);
  background: #fff;
  transform: translateX(4px);
}

.action.is-disabled {
  opacity: 0.48;
  cursor: default;
  transform: none;
}

.action.is-disabled:hover {
  border-color: #0b274522;
  background: #ffffffcc;
  transform: none;
}

.action-nom {
  display: block;
  font-size: 1.1rem;
  font-weight: 600;
  color: var(--petrole);
}

.action-desc {
  display: block;
  margin-top: 0.25rem;
  font-family: system-ui, sans-serif;
  font-size: 0.9rem;
  color: #456;
}

.socle {
  margin-top: 2.5rem;
}

.recent {
  margin-top: 2.5rem;
  max-width: 40rem;
}

.recent-list {
  list-style: none;
  margin: 0.75rem 0 0;
  padding: 0;
  font-family: system-ui, sans-serif;
}

.recent-list li {
  padding: 0.45rem 0;
  border-bottom: 1px solid #0b274518;
}

.recent-photos {
  display: flex;
  gap: 0.5rem;
  overflow-x: auto;
  margin-top: 1rem;
  padding-bottom: 0.35rem;
}

.recent-photos img {
  height: 88px;
  width: auto;
  border-radius: 4px;
  object-fit: cover;
}

.health {
  list-style: none;
  margin: 0.75rem 0 0;
  padding: 0;
  display: flex;
  gap: 0.75rem;
  flex-wrap: wrap;
  font-family: system-ui, sans-serif;
}

.badge {
  display: inline-block;
  padding: 0.35rem 0.7rem;
  font-size: 0.8rem;
  border: 1px solid #0b274533;
  background: #fff;
}

.badge.ok {
  border-color: var(--turquoise);
  color: var(--petrole);
}

.badge.attente {
  opacity: 0.7;
}

.badge-favori {
  display: inline-block;
  font-family: system-ui, sans-serif;
  font-size: 0.7rem;
  font-weight: 600;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  padding: 0.15rem 0.45rem;
  border-radius: 3px;
  background: #0d948833;
  color: var(--petrole);
  vertical-align: middle;
}

.badge-highlight {
  display: inline-block;
  font-family: system-ui, sans-serif;
  font-size: 0.7rem;
  font-weight: 600;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  padding: 0.15rem 0.45rem;
  border-radius: 3px;
  background: #0b274522;
  color: var(--petrole);
  border: 1px solid #0b274544;
  vertical-align: middle;
}

.badge-de-ok,
.badge-de-obsolete,
.badge-de-absent {
  display: inline-block;
  font-family: system-ui, sans-serif;
  font-size: 0.7rem;
  font-weight: 600;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  padding: 0.15rem 0.45rem;
  border-radius: 3px;
  vertical-align: middle;
}

.badge-de-ok {
  background: #0d948833;
  color: var(--petrole);
}

.badge-de-obsolete {
  background: #f59e0b33;
  color: #92400e;
}

.badge-de-absent {
  background: #94a3b833;
  color: #475569;
}

.de-backfill {
  margin: 0.75rem 0 1rem;
  padding: 0.85rem 1rem;
  border: 1px solid #f59e0b66;
  background: #f59e0b14;
}

.de-backfill p {
  margin: 0 0 0.5rem;
}

.de-backfill form {
  margin: 0.65rem 0 0;
}

.de-backfill-ok {
  margin: 0.5rem 0 1rem;
}

.btn-col {
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
  align-items: stretch;
  flex: 0 0 auto;
  width: 11rem;
  align-self: start;
}

.footer-pre {
  margin: 0;
  height: 0.5rem;
}

.jopai-footer {
  margin-top: 0;
  padding: 0.85rem 1rem;
  background: #f0f2f6;
  border-top: 1px solid #d1d1d1;
  text-align: center;
}

.jopai-footer-brand {
  font-family: Montserrat, "Segoe UI", sans-serif;
  font-size: 0.72rem;
  line-height: 1.35;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  color: #0b2745;
}

.jopai-footer-brand .jop {
  font-weight: 800;
  color: #0b2745;
}

.jopai-footer-brand .ai {
  font-style: italic;
  font-weight: 600;
  color: #0d9488;
}

.jopai-footer-brand .app {
  font-style: normal;
  font-weight: 600;
  color: #0b2745;
  margin-left: 0.1rem;
}

.jopai-footer-brand .reg {
  font-size: 0.55em;
  color: #0d9488;
  vertical-align: super;
  margin-left: 1px;
}

.jopai-footer-brand .rest {
  font-weight: 400;
  color: #5b7a91;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  margin-left: 0.35rem;
  font-size: 0.55rem;
  vertical-align: middle;
}

@media (max-width: 520px) {
  .jopai-footer-brand {
    white-space: normal;
    font-size: 0.65rem;
  }

  .jopai-footer-brand .rest {
    display: block;
    margin: 0.25rem 0 0;
    letter-spacing: 0.08em;
  }
}

.ack {
  max-width: 32rem;
  margin: 4rem auto;
  padding: 0 1.5rem;
}

.ack a.back {
  color: var(--turquoise);
  font-family: system-ui, sans-serif;
}

.topnav,
.page,
.jopai-footer {
  position: relative;
  z-index: 1;
}

.chrome-bar {
  display: flex;
  flex-wrap: nowrap;
  align-items: center;
  gap: 0.55rem 0.85rem;
  padding: 0.55rem 1rem;
  padding-left: max(1rem, env(safe-area-inset-left));
  padding-right: max(1rem, env(safe-area-inset-right));
  padding-top: max(0.55rem, env(safe-area-inset-top));
  background: #0b2745f2;
  color: var(--papier);
  font-family: system-ui, sans-serif;
  min-width: 0;
}

.chrome-bar-end {
  margin-left: auto;
  display: flex;
  flex-wrap: nowrap;
  align-items: center;
  gap: 0.45rem 0.65rem;
  min-width: 0;
  flex-shrink: 0;
}

.chrome-burger {
  display: none;
  width: 44px;
  height: 44px;
  border: 0;
  background: transparent;
  color: var(--papier);
  cursor: pointer;
  padding: 0;
  flex-shrink: 0;
}

.chrome-burger-lines,
.chrome-burger-lines::before,
.chrome-burger-lines::after {
  display: block;
  width: 22px;
  height: 2px;
  background: var(--papier);
  margin: 0 auto;
  position: relative;
}

.chrome-burger-lines::before,
.chrome-burger-lines::after {
  content: "";
  position: absolute;
  left: 0;
}

.chrome-burger-lines::before {
  top: -7px;
}

.chrome-burger-lines::after {
  top: 7px;
}

.user-menu {
  position: relative;
  flex-shrink: 0;
}

.user-menu-summary {
  list-style: none;
  cursor: pointer;
  color: var(--papier);
  font-size: 0.9rem;
  padding: 0.15rem;
  user-select: none;
  display: flex;
  align-items: center;
  gap: 0.4rem;
  min-height: 44px;
}

.user-menu-summary::-webkit-details-marker {
  display: none;
}

.user-menu-summary::after {
  content: "▾";
  opacity: 0.7;
  font-size: 0.75rem;
}

.user-avatar {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  object-fit: cover;
  flex-shrink: 0;
  background: #0d9488;
}

.user-avatar-fallback {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  font-size: 0.85rem;
  color: #f7f4ee;
}

.user-menu-name {
  font-weight: 600;
  max-width: 10rem;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.user-menu-panel {
  position: absolute;
  right: 0;
  left: auto;
  top: calc(100% + 0.35rem);
  min-width: 12rem;
  max-width: min(16rem, calc(100vw - 1.25rem));
  background: #0f3356;
  border: 1px solid #ffffff22;
  border-radius: 4px;
  padding: 0.35rem 0;
  z-index: 40;
  box-shadow: 0 8px 24px #00000040;
}

.user-menu-panel a {
  display: block;
  padding: 0.7rem 0.95rem;
  min-height: 44px;
  box-sizing: border-box;
  color: var(--papier);
  text-decoration: none;
  font-size: 0.9rem;
}

.user-menu-panel a:hover {
  background: #ffffff14;
  color: var(--teal);
}

.chrome-beta {
  display: inline-flex;
  align-items: center;
  gap: 0.25rem;
  color: #2dd4bf;
  text-decoration: none;
  font-weight: 700;
  font-size: 0.78rem;
  letter-spacing: 0.04em;
  text-transform: lowercase;
  min-height: 44px;
  min-width: 44px;
  justify-content: center;
  padding: 0.15rem 0.35rem;
  border-radius: 999px;
  background: #0d948833;
  border: 1px solid #2dd4bf66;
  flex-shrink: 0;
}

.chrome-beta svg {
  display: block;
  width: 28px;
  height: 28px;
}

.chrome-drawer-panel .atelier-nav-link svg {
  width: 22px;
  height: 22px;
  margin-right: 0.35rem;
  flex-shrink: 0;
}

.beta-title-icon {
  display: inline-flex;
  vertical-align: middle;
}

.beta-title-icon svg {
  display: block;
}

.chrome-beta.on {
  background: #0d9488;
  color: #f7f4ee;
}

.chrome-admin-menu {
  position: relative;
}

.chrome-admin-menu > summary {
  list-style: none;
  cursor: pointer;
  color: #c5d4e0;
  font-size: 0.85rem;
  min-height: 44px;
  display: flex;
  align-items: center;
  padding: 0 0.4rem;
}

.chrome-admin-menu > summary::-webkit-details-marker {
  display: none;
}

.chrome-admin-menu-panel {
  position: absolute;
  right: 0;
  top: calc(100% + 0.3rem);
  min-width: 12.5rem;
  background: #0f3356;
  border: 1px solid #ffffff22;
  border-radius: 4px;
  padding: 0.35rem 0;
  z-index: 40;
  display: flex;
  flex-direction: column;
}

.chrome-admin-menu-panel .atelier-nav-link {
  display: block;
}

.atelier-chrome {
  position: relative;
  z-index: 4;
}

.atelier-nav {
  display: flex;
  flex-wrap: nowrap;
  gap: 0.1rem;
  padding: 0.35rem 1rem;
  background: #0b2745e6;
  border-top: 1px solid #ffffff18;
  font-family: system-ui, sans-serif;
}

.atelier-nav-admin {
  background: #082033;
  border-top: 1px solid #2dd4bf33;
  flex-wrap: wrap;
}

.atelier-nav-admin-tag {
  color: #2dd4bf;
  font-size: 0.7rem;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  padding: 0 0.55rem;
  display: inline-flex;
  align-items: center;
}

.atelier-nav-link {
  color: #c5d4e0;
  text-decoration: none;
  padding: 0.4rem 0.55rem;
  border-radius: 4px;
  font-size: 0.82rem;
  white-space: nowrap;
  min-height: 44px;
  display: inline-flex;
  align-items: center;
  box-sizing: border-box;
}

.atelier-nav-link:hover {
  color: var(--papier);
  background: #ffffff14;
}

.atelier-nav-link.on {
  color: var(--accent, var(--teal));
  background: #ffffff18;
  font-weight: 600;
}

.atelier-nav-link.is-disabled {
  opacity: 0.45;
  color: #8aa8b8;
  cursor: default;
}

.atelier-nav-link.is-disabled:hover {
  color: #8aa8b8;
  background: transparent;
}

.chrome-drawer {
  position: fixed;
  inset: 0;
  z-index: 30;
}

.chrome-drawer-backdrop {
  position: absolute;
  inset: 0;
  border: 0;
  width: 100%;
  height: 100%;
  background: #00000066;
  cursor: pointer;
}

.chrome-drawer-panel {
  position: absolute;
  top: 0;
  left: 0;
  height: 100%;
  width: min(20rem, 88vw);
  background: #0b2745;
  color: var(--papier);
  padding: 1rem 0.75rem;
  padding-top: max(1rem, env(safe-area-inset-top));
  padding-left: max(0.75rem, env(safe-area-inset-left));
  padding-bottom: max(1rem, env(safe-area-inset-bottom));
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  gap: 0.15rem;
  box-shadow: 8px 0 24px #00000050;
}

.chrome-drawer-title {
  margin: 0 0 0.5rem;
  font-weight: 700;
  color: var(--teal);
}

.chrome-admin-label {
  margin: 0.75rem 0 0.25rem;
  font-size: 0.7rem;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: #8aa;
}

.chrome-drawer-panel .atelier-nav-link {
  display: flex;
}

body.chrome-drawer-open {
  overflow: hidden;
}

@media (max-width: 767px) {
  .chrome-burger {
    display: inline-flex;
    align-items: center;
    justify-content: center;
  }

  .atelier-nav-desktop {
    display: none;
  }

  .chrome-admin-menu,
  .voyage-courant,
  .chrome-bar-end .tenant-switch {
    display: none;
  }

  .user-menu-name {
    max-width: 6.5rem;
  }

  .hero {
    padding-top: 1.1rem;
  }
}

.input-oneline,
input.input-oneline,
input[type="text"],
input[type="email"],
input[type="password"],
input[type="date"],
input[type="number"] {
  height: 2.75rem;
  min-height: 44px;
  max-height: 3rem;
  font-size: 16px;
  line-height: 1.25;
  resize: none;
  field-sizing: fixed;
}

.compte-name-row input {
  height: 2.75rem;
  min-height: 44px;
  max-height: 3rem;
  font-size: 16px;
}

.btn {
  min-height: 44px;
}

.gps-tip-row {
  display: flex;
  align-items: flex-start;
  gap: 0.45rem;
  margin: 0 0 1rem;
  max-width: 40rem;
}

.gps-tip-row .gps-tip {
  margin: 0;
  flex: 1;
}

.gps-help {
  position: relative;
  flex-shrink: 0;
}

.gps-help-summary {
  list-style: none;
  width: 44px;
  height: 44px;
  border-radius: 50%;
  border: 1px solid var(--turquoise);
  background: #fff;
  color: var(--turquoise);
  font-weight: 800;
  font-family: system-ui, sans-serif;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
}

.gps-help-summary::-webkit-details-marker {
  display: none;
}

.gps-help-panel {
  position: absolute;
  right: 0;
  top: calc(100% + 0.35rem);
  width: min(20rem, calc(100vw - 2rem));
  z-index: 6;
  background: #fff;
  border: 1px solid #0b274533;
  border-radius: 6px;
  padding: 0.75rem 0.85rem;
  box-shadow: 0 8px 20px #00000022;
  font-family: system-ui, sans-serif;
  font-size: 0.9rem;
  line-height: 1.4;
}

.gps-help-title {
  margin: 0 0 0.35rem;
  font-weight: 700;
  color: var(--petrole);
}

.profil-photo-row {
  display: flex;
  gap: 0.85rem;
  align-items: flex-start;
}

.profil-photo-preview {
  width: 72px;
  height: 72px;
  border-radius: 50%;
  object-fit: cover;
  background: #0d9488;
  flex-shrink: 0;
}

.profil-photo-empty {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: #fff;
  font-weight: 700;
  font-size: 1.4rem;
}

.navlook-grid {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.navlook-mock {
  display: flex;
  gap: 0.35rem;
  flex-wrap: wrap;
  padding: 0.5rem;
  background: #0b2745;
  color: #c5d4e0;
  font-family: system-ui, sans-serif;
  font-size: 0.8rem;
  margin: 0.5rem 0;
}

.navlook-mock span {
  padding: 0.35rem 0.5rem;
}

.navlook-mock-texte .on {
  font-weight: 700;
  color: #2dd4bf;
}

.navlook-mock-briques span {
  background: #0f3356;
  border-radius: 2px;
}

.navlook-mock-briques .on {
  background: #0d9488;
  color: #fff;
}

.navlook-mock-chevrons span + span::before {
  content: "› ";
  opacity: 0.6;
}

.navlook-mock-pastilles span {
  border-radius: 999px;
  background: #ffffff14;
}

.navlook-mock-pastilles .on {
  background: #0d9488;
  color: #fff;
}

.navlook-mock-onglets .on {
  border-bottom: 2px solid #2dd4bf;
  color: #2dd4bf;
}

.identite-slot {
  margin: 1rem 0;
  padding: 0.75rem;
  background: #fff;
  border: 1px solid #0b274522;
}

.identite-page {
  max-width: 58rem;
}

.identite-gallery {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(9.5rem, 1fr));
  gap: 0.75rem;
  margin: 0.65rem 0;
}

.identite-card {
  margin: 0;
  padding: 0.5rem;
  border: 1px solid #0b274518;
  border-radius: 6px;
  background: #f7f4ee;
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
  min-width: 0;
}

.identite-preview-img {
  width: 100%;
  height: 6.5rem;
  object-fit: contain;
  background: #f7f4ee;
  border-radius: 4px;
}

.identite-preview-img.identite-preview-dark {
  background: #0b2745;
}

.identite-card figcaption {
  font-size: 0.75rem;
  overflow: hidden;
  text-overflow: ellipsis;
}

.identite-ensemble {
  margin-top: 0.35rem;
}

.invitation-page .page-head {
  margin-bottom: 0.25rem;
}

.invitation-page .page-head .section-lede,
.invitation-page .meta {
  margin: 0.2rem 0 0.35rem;
}

.invitation-page .form-section {
  margin-top: 0.5rem;
}

.invitation-page .stack-form {
  gap: 0.45rem;
}

.invite-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.45rem 0.75rem;
}

@media (max-width: 560px) {
  .invite-grid {
    grid-template-columns: 1fr;
  }
}

.invitation-page textarea {
  min-height: 4.2rem;
}

html {
  overflow-x: hidden;
}

.btn {
  font-family: system-ui, sans-serif;
  border: 1px solid #0b274533;
  background: var(--tile-bg, #fff);
  color: var(--petrole);
  padding: 0.45rem 0.85rem;
  cursor: pointer;
}

.btn.primary {
  background: var(--btn-bg, var(--petrole));
  color: var(--btn-text, var(--papier));
  border-color: transparent;
}

.btn.danger {
  background: #8b1e1e;
  color: #fff;
  border-color: #8b1e1e;
}

.btn-block {
  width: 100%;
  text-align: center;
  box-sizing: border-box;
}

.btn-col .btn {
  width: 100%;
}

.mode-switch {
  display: flex;
  gap: 0.5rem;
  margin: 0.75rem 0 1rem;
}

.mode-btn.on {
  background: var(--accent-soft, var(--mint));
  border-color: var(--accent, var(--turquoise));
  font-weight: 600;
}

.mode-btn-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0.4rem 0.55rem;
  min-width: 2.75rem;
  width: fit-content;
}

.mode-btn-icon img {
  display: block;
  width: 28px;
  height: 28px;
}

.chrono-sort {
  display: flex;
  gap: 0.5rem;
  margin: 0.75rem 0 0;
}

.share-action {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  width: fit-content;
}

.share-action img {
  display: block;
  flex: 0 0 auto;
}

.share-actions {
  margin: 0.65rem 0 0.85rem;
}

.place-picker {
  display: flex;
  flex-direction: column;
  gap: 0.55rem;
  font-family: system-ui, sans-serif;
}

.place-suggestions {
  list-style: none;
  margin: 0;
  padding: 0;
  border: 1px solid #0b274522;
  background: #fff;
  max-height: 12rem;
  overflow: auto;
}

.place-suggestions li {
  margin: 0;
  border-bottom: 1px solid #0b274512;
}

.place-suggestions li:last-child {
  border-bottom: 0;
}

.place-sug-btn {
  display: block;
  width: 100%;
  text-align: left;
  border: 0;
  background: transparent;
  padding: 0.55rem 0.7rem;
  font: inherit;
  color: var(--petrole);
  cursor: pointer;
}

.place-sug-btn:hover {
  background: #0d948818;
}

.place-map {
  width: 100%;
  border: 1px solid #0b274522;
  background: #cfe0ea;
  z-index: 1;
  border-radius: 2px;
}

.place-coords {
  margin: 0;
}

.place-manual {
  font-size: 0.9rem;
}

.place-manual summary {
  cursor: pointer;
  color: #456;
}

.place-manual-fields {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.65rem;
  margin-top: 0.55rem;
}

@media (max-width: 520px) {
  .place-manual-fields {
    grid-template-columns: 1fr;
  }
}

.article-item {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  background: var(--tile-bg, #fff);
  border: 1px solid #0b274522;
  padding: 0.85rem 1rem;
}

.article-row {
  display: grid;
  grid-template-columns: 1fr minmax(4.5rem, 5.5rem) minmax(9.5rem, 11rem);
  gap: 0.85rem;
  align-items: start;
}

.article-main {
  min-width: 0;
}

.article-thumb {
  width: 100%;
  aspect-ratio: 1;
  overflow: hidden;
  background: #0b274512;
  border: 1px solid #0b274522;
  align-self: center;
}

.article-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.article-thumb-empty {
  display: grid;
  place-items: center;
  min-height: 4.5rem;
  background:
    repeating-linear-gradient(
      -45deg,
      #0b274510,
      #0b274510 6px,
      #0b274520 6px,
      #0b274520 12px
    );
}

.article-thumb-empty-label {
  font-size: 0.72rem;
  line-height: 1.2;
  text-align: center;
  color: #345;
  font-weight: 600;
  padding: 0.35rem;
  font-family: system-ui, sans-serif;
}

.section-head-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  margin-bottom: 0.75rem;
}

.section-head-row h2 {
  margin: 0;
}

/* Spécificité > .btn (règle dupliquée plus bas qui remet background:#fff). */
.btn.btn-toggle-on,
button.btn.btn-toggle-on {
  background: #94a3b8 !important;
  border-color: #64748b !important;
  color: #0f172a !important;
}

.btn.btn-toggle-on:hover,
button.btn.btn-toggle-on:hover {
  background: #8494a8 !important;
}

.btn.btn-toggle-off,
button.btn.btn-toggle-off {
  background: #0b2745 !important;
  border-color: #0b2745 !important;
  color: #f7f4ee !important;
}

.btn.btn-toggle-off:hover,
button.btn.btn-toggle-off:hover {
  background: #163a5f !important;
}

.nav-home {
  color: var(--teal);
  font-weight: 600;
  text-decoration: none;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.voyage-courant {
  margin: 0;
  font-size: 0.9rem;
}

.voyage-courant.mute {
  opacity: 0.7;
}

.page {
  max-width: 44rem;
  margin: 0 auto;
  padding: 2rem 1.5rem 4rem;
}

.page-head h1 {
  margin: 0 0 0.35rem;
}

.store-mode {
  font-family: system-ui, sans-serif;
  font-size: 0.8rem;
  color: #567;
}

.flash {
  padding: 0.65rem 0.85rem;
  background: #0d948822;
  border: 1px solid var(--turquoise);
  font-family: system-ui, sans-serif;
}

.flash-warn {
  background: #f59e0b22;
  border-color: #d97706;
}

.table-wrap {
  overflow-x: auto;
}

.data-table {
  width: 100%;
  border-collapse: collapse;
  font-family: system-ui, sans-serif;
  font-size: 0.92rem;
}

.data-table th,
.data-table td {
  text-align: left;
  padding: 0.45rem 0.55rem;
  border-bottom: 1px solid #d5dde6;
  vertical-align: middle;
}

.data-table th {
  font-size: 0.8rem;
  text-transform: uppercase;
  letter-spacing: 0.03em;
  color: #567;
}

.inline-form {
  display: inline;
}

.btn.small {
  font-size: 0.8rem;
  padding: 0.25rem 0.5rem;
}

.demo-volumes-edit {
  list-style: none;
  margin: 0.75rem 0 1rem;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 0.55rem;
  max-width: 18rem;
}

.demo-volumes-edit label {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  font-family: system-ui, sans-serif;
  font-size: 0.95rem;
}

.demo-volumes-edit input[type="number"] {
  width: 4.5rem;
  padding: 0.35rem 0.45rem;
  border: 1px solid #0b274533;
  background: #fff;
  font: inherit;
}

.demo-page .page-head {
  margin-bottom: 1.25rem;
}

.demo-status {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem 1rem;
  align-items: center;
  margin: 0.75rem 0 0;
  font-family: system-ui, sans-serif;
  font-size: 0.85rem;
  color: #345;
}

.demo-pill {
  display: inline-block;
  padding: 0.2rem 0.55rem;
  border-radius: 999px;
  background: #0b274514;
  color: var(--petrole);
  font-weight: 600;
  font-size: 0.75rem;
}

.demo-pill.on {
  background: #0d948822;
  color: #0b2745;
}

.demo-panel {
  max-width: 36rem;
  margin: 0 auto;
  padding: 1.1rem 1.25rem 1.25rem;
  background: #ffffffd9;
  border: 1px solid #0b274522;
  border-radius: 10px;
  box-shadow: 0 8px 24px #0b27450f;
}

.demo-panel-head h2 {
  margin: 0 0 0.25rem;
  font-size: 1.15rem;
}

.demo-panel-head p {
  margin: 0 0 1rem;
  font-family: system-ui, sans-serif;
  font-size: 0.8rem;
  color: #567;
  line-height: 1.35;
}

.demo-form {
  margin: 0;
}

.demo-volume-grid {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 0.65rem;
}

.demo-field {
  display: flex;
  flex-direction: column;
  gap: 0.3rem;
  margin: 0;
  font-family: system-ui, sans-serif;
  font-size: 0.78rem;
  font-weight: 600;
  color: var(--petrole);
  letter-spacing: 0.01em;
}

.demo-field input {
  width: 100%;
  box-sizing: border-box;
  padding: 0.45rem 0.4rem;
  border: 1px solid #0b274533;
  border-radius: 6px;
  background: #fff;
  font: inherit;
  font-size: 0.95rem;
  font-weight: 500;
  text-align: center;
}

.demo-actions {
  margin-top: 0.9rem;
  display: flex;
  justify-content: flex-end;
}

.demo-reset-row {
  display: flex;
  flex-wrap: wrap;
  align-items: end;
  gap: 0.65rem;
  margin-top: 1rem;
  padding-top: 1rem;
  border-top: 1px solid #0b27451a;
}

.demo-confirm {
  display: flex;
  flex-direction: column;
  gap: 0.3rem;
  margin: 0;
  flex: 1 1 10rem;
  font-family: system-ui, sans-serif;
  font-size: 0.78rem;
  font-weight: 600;
  color: var(--petrole);
}

.demo-confirm input {
  padding: 0.45rem 0.55rem;
  border: 1px solid #0b274533;
  border-radius: 6px;
  background: #fff;
  font: inherit;
  font-weight: 500;
}

.demo-foot {
  margin: 1rem 0 0;
  font-family: system-ui, sans-serif;
  font-size: 0.78rem;
  color: #567;
}

.demo-foot a {
  color: var(--turquoise);
}

@media (max-width: 640px) {
  .demo-volume-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

.tenant-switch {
  margin-left: auto;
}

.tenant-switch-label {
  display: flex;
  align-items: center;
  gap: 0.45rem;
  margin: 0;
  font-family: system-ui, sans-serif;
  font-size: 0.78rem;
  color: #c9d7e8;
}

.tenant-switch select {
  max-width: 12rem;
  padding: 0.3rem 0.45rem;
  border-radius: 6px;
  border: 1px solid #ffffff33;
  background: #0b2745;
  color: #fff;
  font: inherit;
}

.tenant-choice-page {
  max-width: 40rem;
}

.tenant-choice-form {
  margin-top: 1.25rem;
}

.tenant-card-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 0.65rem;
  margin-bottom: 1.1rem;
}

.tenant-card {
  display: flex;
  gap: 0.75rem;
  align-items: flex-start;
  margin: 0;
  padding: 0.85rem 1rem;
  border: 1px solid #0b274522;
  border-radius: 10px;
  background: #ffffffd9;
  cursor: pointer;
  font-family: system-ui, sans-serif;
}

.tenant-card.on,
.tenant-card:has(input:checked) {
  border-color: var(--turquoise);
  box-shadow: 0 0 0 1px var(--turquoise);
}

.tenant-card input {
  margin-top: 0.2rem;
}

.tenant-card-body {
  display: flex;
  flex-direction: column;
  gap: 0.2rem;
}

.tenant-card-label {
  font-weight: 650;
  color: var(--petrole);
}

.tenant-card-slug {
  font-size: 0.8rem;
  color: #567;
}

.tenant-choice-note {
  margin-top: 1rem;
  font-family: system-ui, sans-serif;
  font-size: 0.85rem;
}

.tenant-choice-note a {
  color: var(--turquoise);
}

.empty {
  font-family: system-ui, sans-serif;
  color: #456;
}

.voyage-list,
.article-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.voyage-list li {
  display: flex;
  gap: 1rem;
  justify-content: space-between;
  align-items: flex-start;
  padding: 0.9rem 1rem;
  background: #ffffffcc;
  border: 1px solid #0b274522;
}

.article-list li.article-item {
  /* colonne : rangée titre+actions, puis expandeur pleine largeur en dessous */
  justify-content: flex-start;
  align-items: stretch;
  padding: 0.9rem 1rem;
  background: #ffffffcc;
  border: 1px solid #0b274522;
}

.inactive-entries {
  margin-top: 2rem;
}

.article-list-inactive li.article-item-inactive {
  opacity: 0.85;
  background: #f4f6f8;
  border-style: dashed;
}

.voyage-list li.selected {
  border-color: var(--turquoise);
}

.voyage-tile-actions {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 0.45rem;
}

.voyage-inactiver-form {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 0.25rem;
}

.confirm-inactiver {
  font-family: system-ui, sans-serif;
  font-size: 0.8rem;
  color: #456;
  display: flex;
  align-items: center;
  gap: 0.35rem;
}

.voyage-list li.voyage-inactif {
  background: #f4f6f8;
  border-style: dashed;
}

.compte-extra-link {
  margin: 0.75rem 0 0;
}

.voyage-list li.voyage-none {
  background: #f3e8dc;
  border-color: #c45c26;
}

.voyage-list li.voyage-none.selected {
  border-color: #c45c26;
  box-shadow: inset 0 0 0 1px #c45c26;
}

.meta {
  display: block;
  margin-top: 0.2rem;
  font-family: system-ui, sans-serif;
  font-size: 0.85rem;
  color: #456;
}

.corps-preview {
  margin: 0.5rem 0 0;
  font-size: 0.95rem;
  line-height: 1.4;
}

.form-section {
  margin-top: 2.5rem;
}

.form-section-first {
  margin-top: 0;
}

/* Téléversement : zone claire + CTA (pas d'input file nu) */
.file-pick {
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
  font-family: system-ui, sans-serif;
  font-size: 0.9rem;
}

.file-pick-label {
  color: var(--petrole);
}

.file-pick-input {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

.file-pick-zone {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.65rem 1rem;
  padding: 0.85rem 1rem;
  border: 1px dashed #0d948866;
  background: #ffffffaa;
  cursor: pointer;
}

.file-pick-zone:hover {
  border-color: var(--turquoise);
  background: #fff;
}

.file-pick.is-dragover .file-pick-zone {
  border-color: #0d9488;
  background: #ccfbf1;
  box-shadow: inset 0 0 0 2px #0d948866;
}

.file-pick.has-file .file-pick-zone {
  border-style: solid;
  border-color: #0d9488aa;
}

.file-pick-cta {
  display: inline-block;
  padding: 0.45rem 0.85rem;
  border: 1px solid #0b274533;
  background: var(--btn-bg, var(--petrole));
  color: var(--btn-text, var(--papier));
  font-weight: 600;
  width: fit-content;
}

.file-pick-name {
  color: #456;
  font-size: 0.9rem;
  word-break: break-word;
}

.file-pick-input:focus-visible + .file-pick-zone {
  outline: 2px solid var(--turquoise);
  outline-offset: 2px;
}

.stack-form {
  display: flex;
  flex-direction: column;
  gap: 0.85rem;
  font-family: system-ui, sans-serif;
}

.mode-panel[hidden],
.stack-form.mode-panel[hidden],
.mode-panel.is-hidden {
  display: none !important;
}

.stack-form label {
  display: flex;
  flex-direction: column;
  gap: 0.3rem;
  font-size: 0.9rem;
}

.stack-form input,
.stack-form select,
.stack-form textarea {
  padding: 0.55rem 0.65rem;
  border: 1px solid #0b274533;
  background: #fff;
  font: inherit;
}

.stack-form fieldset {
  border: 1px solid #0b274522;
  padding: 0.85rem;
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.stack-form .check {
  flex-direction: row;
  align-items: center;
  gap: 0.5rem;
}

/* Comptes + Mon compte : cartes compactes (pas de grille Demo) */
.compte-ui-page .page-head {
  margin-bottom: 0.35rem;
}

.compte-ui-page .page-head .section-lede {
  margin-bottom: 0.5rem;
}

.compte-ui-page .form-section {
  margin-top: 1.1rem;
}

.compte-ui-page .form-section-first {
  margin-top: 0.35rem;
}

.compte-card {
  max-width: 28rem;
  padding: 0.85rem 1rem 1rem;
  background: #ffffffee;
  border: 1px solid #0b274522;
  border-radius: 6px;
}

.compte-card-wide {
  max-width: 44rem;
}

.compte-card h2 {
  margin: 0 0 0.2rem;
  font-size: 1.05rem;
  color: var(--petrole);
}

.compte-card > .section-lede {
  margin: 0 0 0.65rem;
  font-size: 0.85rem;
}

.compte-form {
  max-width: 26rem;
  gap: 0.55rem;
}

.compte-card-wide .compte-form {
  max-width: none;
}

.compte-form .btn {
  align-self: flex-start;
  width: fit-content;
  margin-top: 0.15rem;
}

.compte-name-field {
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
  font-size: 0.9rem;
  min-width: 0;
}

.compte-name-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.5rem 0.65rem;
}

.compte-name-row input {
  flex: 1 1 12rem;
  min-width: 0;
  box-sizing: border-box;
  padding: 0.5rem 0.6rem;
  border: 1px solid #0b274533;
  background: #fff;
  font: inherit;
  min-height: 2.4rem;
}

.compte-name-row .btn {
  flex: 0 0 auto;
  min-height: 2.4rem;
  box-sizing: border-box;
}

.compte-form-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.55rem 0.75rem;
}

.compte-form-grid label {
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
  font-size: 0.9rem;
  min-width: 0;
}

.compte-form-grid input {
  width: 100%;
  box-sizing: border-box;
  padding: 0.5rem 0.6rem;
  border: 1px solid #0b274533;
  background: #fff;
  font: inherit;
}

.compte-readonly {
  margin: 0.15rem 0 0;
  padding: 0;
  display: grid;
  gap: 0.3rem;
  border: 0;
}

.compte-readonly > div {
  display: grid;
  grid-template-columns: 4.5rem 1fr;
  gap: 0.35rem 0.65rem;
  align-items: baseline;
  min-width: 0;
  font-family: system-ui, sans-serif;
}

.compte-readonly dt {
  margin: 0;
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0.02em;
  text-transform: uppercase;
  color: #678;
}

.compte-readonly dd {
  margin: 0;
  font-size: 0.92rem;
  color: var(--petrole);
  word-break: break-word;
  overflow-wrap: anywhere;
}

.compte-readonly code {
  font-size: 0.88rem;
  word-break: break-all;
}

.comptes-page .compte-cell-wrap {
  word-break: break-word;
  overflow-wrap: anywhere;
}

.comptes-page .table-wrap {
  margin-top: 0.5rem;
}

@media (max-width: 560px) {
  .compte-form-grid {
    grid-template-columns: 1fr;
  }

  .compte-name-row {
    flex-direction: column;
    align-items: stretch;
  }

  .compte-name-row .btn {
    width: fit-content;
  }

  .compte-readonly > div {
    grid-template-columns: 1fr;
    gap: 0.1rem;
  }
}

.btn {
  font-family: system-ui, sans-serif;
  padding: 0.55rem 0.9rem;
  border: 1px solid #0b274533;
  background: #fff;
  color: var(--petrole);
  cursor: pointer;
}

.btn.primary {
  background: var(--btn-bg, var(--petrole));
  color: var(--btn-text, var(--papier));
  border-color: var(--btn-bg, var(--petrole));
}

.btn.primary:hover {
  background: #0d3a5c;
}

.btn.btn-none {
  background: #c45c26;
  color: #f7f4ee;
  border-color: #c45c26;
}

.back-row {
  margin-top: 2rem;
}

.back-row .back,
a.back {
  color: var(--turquoise);
  font-family: system-ui, sans-serif;
}

.media-grid {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.media-item {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  padding: 0.85rem;
  background: #ffffffcc;
  border: 1px solid #0b274522;
}

.media-row {
  display: grid;
  grid-template-columns: minmax(100px, 160px) 1fr minmax(9.5rem, 11rem);
  gap: 1rem;
  align-items: start;
}

.media-main {
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
}

.media-preview img,
.media-preview video {
  width: 100%;
  height: auto;
  max-height: 160px;
  object-fit: cover;
  display: block;
  background: #0b2745;
}

.media-attach {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem 0.75rem;
  align-items: end;
  font-family: system-ui, sans-serif;
  font-size: 0.85rem;
  padding-top: 0.35rem;
  border-top: 1px solid #0b274518;
}

.media-attach label {
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
  flex: 1 1 12rem;
}

.media-attach select {
  padding: 0.4rem;
}

.media-attach .btn {
  width: fit-content;
}

.voice-remove {
  margin-top: 0.75rem;
}

.voice-remove .btn {
  width: fit-content;
}

.page-wide {
  max-width: 56rem;
}

.map-frame {
  width: 100%;
  height: 420px;
  margin: 1rem 0;
  border: 1px solid #0b274522;
  background: #cfe0ea;
  z-index: 1;
}

.pin-legend {
  list-style: none;
  margin: 0;
  padding: 0;
  font-family: system-ui, sans-serif;
  font-size: 0.85rem;
}

.pin-legend li {
  padding: 0.25rem 0;
  border-bottom: 1px solid #0b274511;
}

.token-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.token-list li {
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  align-items: flex-start;
  padding: 0.85rem 1rem;
  background: #ffffffcc;
  border: 1px solid #0b274522;
  border-radius: 8px;
}

.token-list li.token-revoque {
  opacity: 0.55;
  filter: grayscale(0.35);
  background: #f0f2f6;
  border-style: dashed;
}

.token-main {
  flex: 1;
  min-width: 0;
}

.token-access {
  margin-top: 0.55rem;
}

.qr-sm svg {
  width: 120px;
  height: 120px;
}

.fresh-token {
  margin: 1.25rem 0;
  padding: 1rem;
  border: 1px solid var(--turquoise);
  background: #0d948815;
}

.token-link {
  margin: 0.5rem 0 0.25rem;
}

.token-vitrine-link {
  font-weight: 600;
  color: var(--turquoise);
  text-decoration: underline;
  text-underline-offset: 0.15em;
}

.token-vitrine-link:hover {
  color: var(--petrole);
}

.qr {
  margin-top: 0.75rem;
  max-width: 180px;
  background: #fff;
  padding: 0.5rem;
}

.qr svg {
  width: 100%;
  height: auto;
  display: block;
}

.preview-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 1rem;
  margin-top: 2rem;
}

.prev-card {
  background: #0b2745;
  color: #f7f4ee;
  padding: 1rem;
  font-family: system-ui, sans-serif;
}

.prev-instagram {
  border-top: 3px solid #e1306c;
}

.prev-facebook {
  border-top: 3px solid #1877f2;
}

.prev-brand {
  margin: 0;
  font-size: 0.75rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  opacity: 0.8;
}

.prev-format {
  margin: 0.25rem 0 0.75rem;
  font-size: 0.85rem;
  color: #2dd4bf;
}

.prev-media {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  margin-bottom: 0.75rem;
  background: #000;
  min-height: 120px;
}

.prev-media img,
.prev-media video {
  width: 100%;
  max-height: 220px;
  object-fit: cover;
  display: block;
}

.prev-empty {
  padding: 2rem 1rem;
  text-align: center;
  opacity: 0.6;
  font-size: 0.9rem;
}

.prev-caption {
  margin: 0;
  white-space: pre-wrap;
  font-size: 0.9rem;
  line-height: 1.4;
}

.media-pick {
  margin: 0.25rem 0;
}

.social-compose {
  border-top: 1px solid #0b274522;
  padding-top: 1.5rem;
}

.voice-box,
.media-box {
  margin-top: 0;
  padding: 0.65rem 0.75rem;
  border: 1px solid #0b274522;
  background: #f0fdfa99;
  font-family: system-ui, sans-serif;
  min-width: 0;
  overflow-x: auto;
}

.media-box {
  background: #fff8f099;
}

.voice-box summary,
.media-box summary {
  cursor: pointer;
  font-weight: 600;
  color: var(--petrole);
}

.voice-box .stack-form,
.media-box .stack-form {
  margin-top: 0.75rem;
}

.voice-box audio {
  width: 100%;
  margin: 0.35rem 0;
}

.entry-media-list {
  list-style: none;
  margin: 0.75rem 0 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 0.65rem;
}

.entry-media-item {
  display: grid;
  grid-template-columns: minmax(72px, 110px) 1fr auto;
  gap: 0.65rem;
  align-items: center;
  padding: 0.45rem 0;
  border-bottom: 1px solid #0b274518;
}

.entry-media-preview img,
.entry-media-preview video {
  width: 100%;
  max-height: 88px;
  object-fit: cover;
  display: block;
  background: #0b2745;
}

.entry-media-meta {
  min-width: 0;
}

.entry-media-remove .btn {
  width: fit-content;
  white-space: nowrap;
}

.mic-rec {
  margin: 0.5rem 0 0.85rem;
  padding: 0.65rem 0.75rem;
  border: 1px dashed #0d948866;
  background: #ffffffaa;
  font-family: system-ui, sans-serif;
  transition: border-color 0.2s ease, background 0.2s ease, box-shadow 0.2s ease;
}

.mic-rec.is-recording {
  border-style: solid;
  border-color: #b91c1c;
  background: #fef2f2;
  box-shadow: 0 0 0 3px #b91c1c22;
}

.mic-status {
  margin: 0 0 0.35rem;
  font-size: 0.9rem;
  color: #345;
  font-weight: 500;
}

.mic-status-recording {
  color: #991b1b;
  font-weight: 700;
}

.mic-status-ready {
  color: #0f766e;
  font-weight: 600;
}

.mic-timer {
  margin: 0 0 0.55rem;
  font-size: 1.35rem;
  font-variant-numeric: tabular-nums;
  font-weight: 700;
  color: #991b1b;
  letter-spacing: 0.04em;
}

.mic-start.mic-btn-recording {
  background: #b91c1c;
  border-color: #991b1b;
  color: #fff;
  animation: mic-pulse 1.1s ease-in-out infinite;
}

.mic-stop.mic-btn-stop-ready {
  background: #0f766e;
  border-color: #0f766e;
  color: #fff;
  font-weight: 700;
}

.mic-stt {
  margin: 0.85rem 0 1rem;
  padding: 0.75rem;
  display: flex;
  flex-direction: column;
  gap: 0.45rem;
  border: 2px solid #0d9488;
  background: #ecfdf8;
}

.mic-stt .mic-stt-btn {
  width: 100%;
  font-weight: 700;
  font-size: 1rem;
  padding: 0.75rem 1rem;
}

.mic-stt .mic-stt-btn:disabled {
  opacity: 0.65;
}

.mic-stt-hint {
  margin: 0;
}

.mic-progress-track {
  height: 0.55rem;
  background: #0b274518;
  border: 1px solid #0b274522;
  overflow: hidden;
}

.mic-progress-bar {
  height: 100%;
  width: 0;
  background: linear-gradient(90deg, #0d9488, #0f766e);
  transition: width 0.35s ease;
}

.mic-progress-bar.is-indeterminate {
  background: linear-gradient(
    90deg,
    #0d9488 0%,
    #99f6e4 45%,
    #0d9488 100%
  );
  background-size: 200% 100%;
  animation: mic-progress-slide 1.2s linear infinite;
}

.mic-progress-label {
  margin: 0.35rem 0 0;
  font-size: 0.85rem;
  color: #345;
}

@keyframes mic-pulse {
  0%,
  100% {
    transform: scale(1);
    box-shadow: 0 0 0 0 #b91c1c55;
  }
  50% {
    transform: scale(1.02);
    box-shadow: 0 0 0 6px #b91c1c00;
  }
}

@keyframes mic-progress-slide {
  0% {
    background-position: 100% 0;
  }
  100% {
    background-position: -100% 0;
  }
}

.mic-file-fallback {
  margin-top: 0.65rem;
  font-size: 0.9rem;
}

.mic-file-fallback summary {
  cursor: pointer;
  color: #456;
}

.voice-audio-input {
  position: absolute !important;
  width: 1px !important;
  height: 1px !important;
  padding: 0 !important;
  margin: -1px !important;
  overflow: hidden !important;
  clip: rect(0, 0, 0, 0) !important;
  border: 0 !important;
}

.btn-row {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
}

@media (max-width: 640px) {
  .article-row {
    grid-template-columns: 1fr minmax(4rem, 5rem);
  }

  .article-row .btn-col {
    grid-column: 1 / -1;
    width: 100%;
  }

  .media-row,
  .entry-media-item {
    grid-template-columns: 1fr;
  }

  .entry-media-remove .btn {
    width: 100%;
  }
}

.chrono-list {
  list-style: none;
  margin: 1.5rem 0 0;
  padding: 0 0 0 0.25rem;
  border-left: 2px solid #0d948844;
}

.chrono-day {
  position: relative;
  padding: 0 0 1.5rem 1.25rem;
}

.chrono-rail {
  position: absolute;
  left: -0.4rem;
  top: 0.35rem;
  width: 0.7rem;
  height: 0.7rem;
  border-radius: 50%;
  background: var(--turquoise);
  box-shadow: 0 0 0 3px var(--papier);
}

.chrono-date {
  display: block;
  font-family: system-ui, sans-serif;
  font-weight: 600;
  color: var(--petrole);
  margin-bottom: 0.15rem;
}

.chrono-entries {
  list-style: none;
  margin: 0.5rem 0 0;
  padding: 0;
}

.chrono-entries li {
  margin-bottom: 0.45rem;
  font-family: system-ui, sans-serif;
}

.chrono-entries .meta {
  display: block;
  font-size: 0.85rem;
  color: #567;
}

.chrono-day-counts {
  margin: 0.15rem 0 0;
  font-family: system-ui, sans-serif;
  font-size: 0.9rem;
  color: #567;
}

.chrono-count-pub,
.chrono-entry-pub {
  font-weight: 700;
  color: #0f766e;
}

.chrono-count-sep {
  color: #94a3b8;
}

.chrono-count-brouillon,
.chrono-entry-brouillon {
  font-weight: 500;
  color: #64748b;
}

.carnet-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.75rem;
}

.carnet-carte-fieldset {
  margin: 0.85rem 0 0.5rem;
  padding: 0.75rem 0.85rem;
  border: 1px solid #0b274522;
  background: color-mix(in srgb, var(--tile-bg, #fff) 92%, #0d9488 8%);
}

.carnet-carte-fieldset legend {
  font-weight: 600;
  padding: 0 0.35rem;
}

.carnet-carte-opts {
  margin-top: 0.5rem;
}

.carnet-gen-live {
  position: relative;
  margin-top: 1rem;
  padding: 0.85rem 1rem;
  border: 1px solid #0b274533;
  background: #f7f4ee;
}

.carnet-gen-live[hidden] {
  display: none !important;
}

.carnet-gen-mask {
  display: none;
  position: absolute;
  inset: 0;
  background: color-mix(in srgb, #0b2745 8%, transparent);
  pointer-events: none;
}

.carnet-gen-mask.on {
  display: block;
}

.carnet-gen-label {
  margin: 0 0 0.45rem;
  font-size: 0.95rem;
  color: #0b2745;
  font-weight: 600;
}

.carnet-gen-bar {
  height: 0.45rem;
  border-radius: 2px;
  background: #0b27451a;
  overflow: hidden;
}

.carnet-gen-bar > i {
  display: block;
  height: 100%;
  width: 12%;
  background: linear-gradient(90deg, #0d9488, #0b2745);
  transition: width 0.35s ease;
}

.carnet-gen-meta {
  margin: 0.4rem 0 0;
  font-size: 0.85rem;
  color: #667788;
}

.flash.ok {
  color: #0f766e;
}

.flash.warn {
  color: #b45309;
}

.carnet-version-list {
  list-style: none;
  margin: 0.75rem 0 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 0.65rem;
}

.carnet-version-item {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 0.75rem;
  align-items: center;
  padding: 0.75rem 0.85rem;
  border: 1px solid #0b274522;
  background: var(--tile-bg, #fff);
  font-family: system-ui, sans-serif;
}

.carnet-version-item.is-new {
  outline: 2px solid #0d9488;
  outline-offset: 1px;
  animation: carnet-version-pulse 1.2s ease;
}

@keyframes carnet-version-pulse {
  from {
    background: color-mix(in srgb, #0d9488 18%, #fff);
  }
  to {
    background: var(--tile-bg, #fff);
  }
}

.carnet-version-main {
  display: flex;
  flex-direction: column;
  gap: 0.2rem;
  min-width: 0;
}

@media (max-width: 640px) {
  .carnet-grid {
    grid-template-columns: 1fr;
  }
  .carnet-version-item {
    grid-template-columns: 1fr;
  }
}

.journal-stats-tile {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.75rem;
  margin: 1rem 0 0.5rem;
  padding: 0.9rem 1rem;
  background: linear-gradient(135deg, #0d9488 0%, #0f766e 55%, #0b2745 100%);
  color: #f7f4ee;
  font-family: system-ui, sans-serif;
  border: 1px solid #0b274533;
}

.journal-stats-tile p {
  margin: 0;
  display: flex;
  flex-direction: column;
  gap: 0.15rem;
}

.journal-stats-num {
  font-size: 1.65rem;
  font-weight: 800;
  line-height: 1.1;
  letter-spacing: -0.02em;
  color: #fff;
}

.journal-stats-num-pub {
  color: #99f6e4;
}

.journal-stats-tile span {
  font-size: 0.85rem;
  opacity: 0.92;
}

@media (max-width: 520px) {
  .journal-stats-tile {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 640px) {
  .hero {
    min-height: 16vh;
    padding-top: 1rem;
  }
  .baseline {
    font-size: 1.15rem;
  }
  .voyage-list li {
    flex-direction: column;
  }
}
